Compare commits
4847 commits
Marlin_RTO
...
2.0.x
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ba2939b1dc | ||
|
|
ee7476a0bf | ||
|
|
88a2ac92d5 | ||
|
|
3ccb3801f2 | ||
|
|
cc7fbabc96 | ||
|
|
28a9708ddb | ||
|
|
d896dedf9b | ||
|
|
00709017e2 | ||
|
|
b7d9b05952 | ||
|
|
f7f1224941 | ||
|
|
fd8d83b7c8 | ||
|
|
52fc0b896d | ||
|
|
ba045d6852 | ||
|
|
54bdcb4691 | ||
|
|
2a2666326b | ||
|
|
3bba5d55bf | ||
|
|
5d07d83e78 | ||
|
|
37f97bc013 | ||
|
|
6d31bbe2bf | ||
|
|
e2e1776a14 | ||
|
|
bd196e7efc | ||
|
|
dffe7b9072 | ||
|
|
2b326ebc84 | ||
|
|
f4ff6a673f | ||
|
|
cc915a25ed | ||
|
|
600870f22b | ||
|
|
04882e2f34 | ||
|
|
c6cf3da276 | ||
|
|
8a5c3782b8 | ||
|
|
beb17d8855 | ||
|
|
4ee717f7c4 | ||
|
|
e680196c59 | ||
|
|
ce92abfe47 | ||
|
|
50410aaeaa | ||
|
|
35c40bc376 | ||
|
|
aae644c507 | ||
|
|
ce830f8a71 | ||
|
|
d3d423a322 | ||
|
|
8b060a3902 | ||
|
|
faae900747 | ||
|
|
11662bf2b6 | ||
|
|
887e2637c0 | ||
|
|
958f05e4b4 | ||
|
|
9126a2e654 | ||
|
|
5070fae231 | ||
|
|
454f9d6319 | ||
|
|
59b6b32e6e | ||
|
|
6d9709e20d | ||
|
|
7a484959d5 | ||
|
|
78060f55e6 | ||
|
|
3fca19fbab | ||
|
|
b8700e0aa8 | ||
|
|
d66bc5cec2 | ||
|
|
fb28c6041a | ||
|
|
0f9d57e03a | ||
|
|
32377849da | ||
|
|
0975c487f0 | ||
|
|
d07ad63016 | ||
|
|
1a5a3cf253 | ||
|
|
6f6901180c | ||
|
|
9cc6297292 | ||
|
|
cf53bc2dd2 | ||
|
|
f4f4ea05e1 | ||
|
|
2b845e5a75 | ||
|
|
6fcbf11454 | ||
|
|
8a69147adf | ||
|
|
f8ceedea5c | ||
|
|
a4e4226578 | ||
|
|
e76fd6bd33 | ||
|
|
437bee418b | ||
|
|
31238de937 | ||
|
|
cb8c99c4f8 | ||
|
|
2fe81d0cb2 | ||
|
|
fb7d7ee7b4 | ||
|
|
d99fdcf526 | ||
|
|
e4d2234a04 | ||
|
|
bea919da6e | ||
|
|
2fb22cc116 | ||
|
|
d4b6542ce1 | ||
|
|
7d47ee732e | ||
|
|
6ceacd62f9 | ||
|
|
2ce6741731 | ||
|
|
2213eb3317 | ||
|
|
b947590082 | ||
|
|
20bcaa78f6 | ||
|
|
9834a36a17 | ||
|
|
90801f8815 | ||
|
|
4d1357e318 | ||
|
|
8d090cbdbb | ||
|
|
ec5b78d18b | ||
|
|
d33317eadb | ||
|
|
f8375a3ea2 | ||
|
|
5a02959d18 | ||
|
|
cc123bc657 | ||
|
|
4f6a0605bf | ||
|
|
b89700ed35 | ||
|
|
ca853fbe19 | ||
|
|
1ba2548fb2 | ||
|
|
1332be77a5 | ||
|
|
a7f334387c | ||
|
|
e8177735a0 | ||
|
|
aac0326f7f | ||
|
|
41774ec9de | ||
|
|
60155aa442 | ||
|
|
169ec65e72 | ||
|
|
660420050b | ||
|
|
0ddb4d88a9 | ||
|
|
9142f5446a | ||
|
|
6d4c82f4d8 | ||
|
|
4424645e04 | ||
|
|
05517e2096 | ||
|
|
be7bbadabe | ||
|
|
d4a5b10133 | ||
|
|
4584a52ba5 | ||
|
|
27bdf4b24e | ||
|
|
c2c6a679ea | ||
|
|
1c372df449 | ||
|
|
3a91ab4706 | ||
|
|
303d871ca7 | ||
|
|
00c09e95ac | ||
|
|
f3de0f6c53 | ||
|
|
7415e4e66d | ||
|
|
6572d7131f | ||
|
|
d9d920e0b3 | ||
|
|
cd5735130d | ||
|
|
3245a5fdf6 | ||
|
|
37cf156223 | ||
|
|
d2741c8680 | ||
|
|
dd118e2f36 | ||
|
|
4975e93350 | ||
|
|
82e602c847 | ||
|
|
88d7f4d7be | ||
|
|
5cf2cf2be9 | ||
|
|
a7f5d38da7 | ||
|
|
ec4a0a3e0d | ||
|
|
97e0d55073 | ||
|
|
7efd740950 | ||
|
|
61d96ce1c9 | ||
|
|
f902e208a3 | ||
|
|
178a1da165 | ||
|
|
7ce91c5ffe | ||
|
|
23faf902ab | ||
|
|
da6c8317a7 | ||
|
|
6bb6f7f288 | ||
|
|
b3223d7b41 | ||
|
|
568f292883 | ||
|
|
4b928b2da8 | ||
|
|
928d874dea | ||
|
|
ecc8013812 | ||
|
|
6634bedb25 | ||
|
|
e3d4e328f9 | ||
|
|
93421f3a00 | ||
|
|
023cb54fae | ||
|
|
90bc1993b6 | ||
|
|
362145f608 | ||
|
|
5d0429ee2a | ||
|
|
5f5f76956f | ||
|
|
fd8cd31504 | ||
|
|
a87c517da5 | ||
|
|
d051c2adbd | ||
|
|
63e7ae793b | ||
|
|
79dc8a2297 | ||
|
|
225487f9db | ||
|
|
47aa61c0ec | ||
|
|
1bfc51ad5c | ||
|
|
fb48cd0ab4 | ||
|
|
0251eb85b2 | ||
|
|
d8ed749045 | ||
|
|
77b06dce0c | ||
|
|
4f73ac7289 | ||
|
|
60ab7a1ddb | ||
|
|
76d8d1742c | ||
|
|
8e0fac897b | ||
|
|
0c7035d8a3 | ||
|
|
b5e4511de8 | ||
|
|
98bcb25fd4 | ||
|
|
af8f9f790a | ||
|
|
9fd06fa767 | ||
|
|
4696142a31 | ||
|
|
435e1535cc | ||
|
|
4628f0e237 | ||
|
|
e65deacabb | ||
|
|
55ba5044ef | ||
|
|
648269e0ec | ||
|
|
5b56d6698a | ||
|
|
62206c0386 | ||
|
|
a52afd2aeb | ||
|
|
da1a60aeb6 | ||
|
|
3eaa19fdb0 | ||
|
|
c539254101 | ||
|
|
24d8daa01b | ||
|
|
073b7f1e3a | ||
|
|
5926bacea1 | ||
|
|
c5204807e9 | ||
|
|
9d5a9621de | ||
|
|
9cf8537051 | ||
|
|
56ed55ddba | ||
|
|
217bae9ff1 | ||
|
|
250bfac0cc | ||
|
|
57a87a278b | ||
|
|
0b7d69d06f | ||
|
|
79d4123319 | ||
|
|
648e7f73a5 | ||
|
|
941b890881 | ||
|
|
0f9eb480aa | ||
|
|
0473f7ee58 | ||
|
|
3a89d34e7f | ||
|
|
cd85fa3abe | ||
|
|
979876e958 | ||
|
|
cf8316bfbb | ||
|
|
49ca16c3fb | ||
|
|
d93471fdad | ||
|
|
872516f9f9 | ||
|
|
7c7e663911 | ||
|
|
c04d5624da | ||
|
|
d07ce9ef21 | ||
|
|
dcf3587d9a | ||
|
|
94244c1d93 | ||
|
|
ed39317203 | ||
|
|
1917ed8741 | ||
|
|
6f8282f01e | ||
|
|
4f390ea18f | ||
|
|
cb9a34c6f7 | ||
|
|
6759aff220 | ||
|
|
b33f4ba300 | ||
|
|
85089898be | ||
|
|
4d65ab5a0b | ||
|
|
abf1222f1d | ||
|
|
b2ba9009d0 | ||
|
|
21ee7be30a | ||
|
|
9b78138600 | ||
|
|
160f70be63 | ||
|
|
b98946b5c1 | ||
|
|
20ac0faa86 | ||
|
|
700e0fe7d7 | ||
|
|
328d8b5952 | ||
|
|
006b7f3f17 | ||
|
|
6eebcb5e48 | ||
|
|
0b01aa8276 | ||
|
|
049fbc92a9 | ||
|
|
bc7720c0cd | ||
|
|
40fdf8f087 | ||
|
|
4fc1aba848 | ||
|
|
828a582f4d | ||
|
|
d1d8417a61 | ||
|
|
5c3140811d | ||
|
|
4268d86da1 | ||
|
|
bb017038d4 | ||
|
|
d3f1f3533d | ||
|
|
a445746a8b | ||
|
|
b709baba7a | ||
|
|
ef1d154a4a | ||
|
|
a4bc9e669c | ||
|
|
5ea7a8373a | ||
|
|
f29baed540 | ||
|
|
d19fc64392 | ||
|
|
2b789ddab9 | ||
|
|
86b71b83fa | ||
|
|
486731162f | ||
|
|
b6ab163814 | ||
|
|
2ea1bf0e1d | ||
|
|
d9ad8caf02 | ||
|
|
14314b68ec | ||
|
|
3002e1cd60 | ||
|
|
00e738e485 | ||
|
|
9913333c33 | ||
|
|
1d6a92751b | ||
|
|
e97e6865c3 | ||
|
|
55dcff746b | ||
|
|
691f02acab | ||
|
|
1f25312b65 | ||
|
|
26858fdebf | ||
|
|
7d8d0010e3 | ||
|
|
277042bc4e | ||
|
|
768182c691 | ||
|
|
ab06d5c7fb | ||
|
|
f97b8c835a | ||
|
|
f375d9bd7b | ||
|
|
e3d855673e | ||
|
|
62268aae65 | ||
|
|
09ddb5a724 | ||
|
|
56c44b053d | ||
|
|
2979da73cf | ||
|
|
d3ac4ba83d | ||
|
|
203e44e026 | ||
|
|
4ab4dbb8a1 | ||
|
|
41c7ae5d54 | ||
|
|
2a72961be4 | ||
|
|
8d76d8c081 | ||
|
|
c8995b91e2 | ||
|
|
e492c613f7 | ||
|
|
ca194ca52e | ||
|
|
b90e7c421f | ||
|
|
6ac8f5abb7 | ||
|
|
e0b413cf19 | ||
|
|
a12ac5e175 | ||
|
|
462d3eeab1 | ||
|
|
97ec6c1be6 | ||
|
|
21070c0aaf | ||
|
|
a96c5209d1 | ||
|
|
e8dcbd8300 | ||
|
|
cb75bec06d | ||
|
|
1e124e6713 | ||
|
|
84ad7cdc29 | ||
|
|
195d20cef2 | ||
|
|
91c8c6d96e | ||
|
|
1a4b82a5d6 | ||
|
|
4955aa5b78 | ||
|
|
131ddeaeba | ||
|
|
b07dd44ec2 | ||
|
|
1793de4a28 | ||
|
|
646d90f3da | ||
|
|
bd9dc73d3d | ||
|
|
5db62d7abd | ||
|
|
076f59c630 | ||
|
|
66694a213f | ||
|
|
e2edfabc3c | ||
|
|
f7fe499305 | ||
|
|
f67ad6fd70 | ||
|
|
c488070859 | ||
|
|
4b124352ef | ||
|
|
5dadba432e | ||
|
|
dd6cbbbbad | ||
|
|
638f6f0f06 | ||
|
|
b36163d53a | ||
|
|
6036a0df6b | ||
|
|
bff0c68078 | ||
|
|
34fb9c7071 | ||
|
|
d84aff701e | ||
|
|
fa5a1f7d7f | ||
|
|
ca105493aa | ||
|
|
434e43cc42 | ||
|
|
a9f7e855d8 | ||
|
|
8cededa7dd | ||
|
|
b6e4acec9d | ||
|
|
aa92fa7ee3 | ||
|
|
563eda4b6b | ||
|
|
8652a7bdd2 | ||
|
|
93167afaf5 | ||
|
|
02ea13b511 | ||
|
|
d6574a03a1 | ||
|
|
ec02aee46c | ||
|
|
04909a2010 | ||
|
|
6b549e1971 | ||
|
|
bb8606ac29 | ||
|
|
45d22d4f09 | ||
|
|
a37cf24900 | ||
|
|
b8c4098de2 | ||
|
|
4f67642122 | ||
|
|
e2ee05c976 | ||
|
|
7e65464dd7 | ||
|
|
d10b11ad9f | ||
|
|
db8522b411 | ||
|
|
ba6c41b798 | ||
|
|
bf316d9ec5 | ||
|
|
7807b613d5 | ||
|
|
28a0650cf3 | ||
|
|
16e1dbbb21 | ||
|
|
853aec2c9a | ||
|
|
38cd7b9938 | ||
|
|
3426c7fc94 | ||
|
|
64e181979c | ||
|
|
a4809b3a47 | ||
|
|
a62ae2aa2d | ||
|
|
d3c5161476 | ||
|
|
60b61de395 | ||
|
|
f205bff2cc | ||
|
|
092aad1813 | ||
|
|
2cbc84855b | ||
|
|
167e42af99 | ||
|
|
c55f477520 | ||
|
|
ed775ac985 | ||
|
|
19818a95a2 | ||
|
|
96e29cd7e5 | ||
|
|
e70440b7cb | ||
|
|
bb64aa7841 | ||
|
|
0e8cdd1938 | ||
|
|
f7ff3f0803 | ||
|
|
8f730cfb6e | ||
|
|
6cfc4b5711 | ||
|
|
1b097d0467 | ||
|
|
e69bbc3531 | ||
|
|
5038cddfd5 | ||
|
|
1b28a28ced | ||
|
|
b11c3ddbed | ||
|
|
56b35fc103 | ||
|
|
aaba9b7880 | ||
|
|
16cb4303a4 | ||
|
|
506deedfdd | ||
|
|
3ddb720722 | ||
|
|
567d77f1cb | ||
|
|
f01cb240d7 | ||
|
|
ff5c8d3570 | ||
|
|
3b9e0c3dde | ||
|
|
ee28a10795 | ||
|
|
ca4eaf92b4 | ||
|
|
bd690f12bc | ||
|
|
9590fcd855 | ||
|
|
b14f630f26 | ||
|
|
6dd054895b | ||
|
|
f62578efec | ||
|
|
d2d6c167df | ||
|
|
276d78461e | ||
|
|
911cdd4d2f | ||
|
|
ce3df42e22 | ||
|
|
f642656bff | ||
|
|
b15c207d08 | ||
|
|
81f5973afc | ||
|
|
f7b261a363 | ||
|
|
837dc4727d | ||
|
|
8318d90e85 | ||
|
|
852e5ae042 | ||
|
|
0a1b865987 | ||
|
|
58cfdb8f57 | ||
|
|
2ef6c8ba97 | ||
|
|
e3c0891d2b | ||
|
|
c2d5b63a98 | ||
|
|
ee69fb00a6 | ||
|
|
b84c69072e | ||
|
|
97cb0a8c3e | ||
|
|
fd646d0d66 | ||
|
|
18adfe87bc | ||
|
|
b3ca43fe78 | ||
|
|
b68e591e58 | ||
|
|
fd9c6983d3 | ||
|
|
da144dcf3b | ||
|
|
1d92badecd | ||
|
|
242064fa99 | ||
|
|
ad2d1b6e31 | ||
|
|
7b2f7a94fa | ||
|
|
f2f1d8fa21 | ||
|
|
da4eaebdc9 | ||
|
|
cec035688d | ||
|
|
5e08efb0fc | ||
|
|
35e11e5f8b | ||
|
|
821d9e374e | ||
|
|
c3fdc7f81e | ||
|
|
4c8bb99059 | ||
|
|
b2abeff9ad | ||
|
|
99ba866d8d | ||
|
|
6bcfb58cd4 | ||
|
|
7a5d408bc0 | ||
|
|
d69c2a90b7 | ||
|
|
a9912681b4 | ||
|
|
41718cf55f | ||
|
|
c61e980c9c | ||
|
|
d922c002ca | ||
|
|
6da477e6bf | ||
|
|
3341fc6728 | ||
|
|
99fb65f359 | ||
|
|
04b12dde49 | ||
|
|
3b1f84a9b7 | ||
|
|
181a35181b | ||
|
|
3a00ebd758 | ||
|
|
11b2bd835d | ||
|
|
b615431aa6 | ||
|
|
4856ac5028 | ||
|
|
04c10eda92 | ||
|
|
5823ebb446 | ||
|
|
ca0ebf10d1 | ||
|
|
ef749bb69d | ||
|
|
978e0e49c7 | ||
|
|
02a500dc93 | ||
|
|
fa5ca8678c | ||
|
|
01359cff6b | ||
|
|
5e3411029d | ||
|
|
4d36baf375 | ||
|
|
5701387ab9 | ||
|
|
c175cce56e | ||
|
|
dd587d45db | ||
|
|
1d240ce5a3 | ||
|
|
5847f9c718 | ||
|
|
2465f2fd74 | ||
|
|
6b0d154956 | ||
|
|
b058aee1d4 | ||
|
|
90158f9f67 | ||
|
|
cc50c4956d | ||
|
|
37b56d6347 | ||
|
|
ad59adfe24 | ||
|
|
f3b37229fa | ||
|
|
117df87d19 | ||
|
|
bba157e5bd | ||
|
|
8faa31df54 | ||
|
|
38ce5966e1 | ||
|
|
73ce80af3a | ||
|
|
121cd42c41 | ||
|
|
cf1c57a04d | ||
|
|
95f990a656 | ||
|
|
251c5c47aa | ||
|
|
e549d474aa | ||
|
|
5eae8e7830 | ||
|
|
fc95946380 | ||
|
|
05d95171cc | ||
|
|
5804761b5d | ||
|
|
37b03dea8d | ||
|
|
83e15f7701 | ||
|
|
3dd21a2770 | ||
|
|
b160e8b93f | ||
|
|
de37196760 | ||
|
|
62da2c97d0 | ||
|
|
159dcd8e8a | ||
|
|
f205cd7d2c | ||
|
|
aaf1ee78a4 | ||
|
|
b80cc09b13 | ||
|
|
de5cca6b1f | ||
|
|
84b96d3d47 | ||
|
|
5d14c3712f | ||
|
|
b5ece63778 | ||
|
|
a63ad32f71 | ||
|
|
cead93713f | ||
|
|
92076c6560 | ||
|
|
5e5daf1ff2 | ||
|
|
de68b3753f | ||
|
|
84b92d8f2f | ||
|
|
b9f0c06d83 | ||
|
|
6924b2deaa | ||
|
|
f949287aec | ||
|
|
3eef000e2a | ||
|
|
d0222e5c76 | ||
|
|
e02817b077 | ||
|
|
0bc8d315d8 | ||
|
|
89722d2196 | ||
|
|
0dbebc2835 | ||
|
|
6f26ed23ee | ||
|
|
11702dc059 | ||
|
|
bc688f27dc | ||
|
|
d20d459132 | ||
|
|
c5ec80d6c7 | ||
|
|
60500c0c49 | ||
|
|
0a81eb15e2 | ||
|
|
97c655967f | ||
|
|
87ff532a41 | ||
|
|
451f48231d | ||
|
|
8c88c33d9f | ||
|
|
1d2d616a7c | ||
|
|
f23393c1ec | ||
|
|
2c61e6ba28 | ||
|
|
9156c32a54 | ||
|
|
8b637e436c | ||
|
|
d1e20eb29f | ||
|
|
715271190c | ||
|
|
c5b3031c69 | ||
|
|
e27f031a55 | ||
|
|
e1191ded02 | ||
|
|
42fbd527f3 | ||
|
|
f9b1da7beb | ||
|
|
0b46fcdce6 | ||
|
|
b4b19aef7f | ||
|
|
748c8a7ecd | ||
|
|
a9e6af8566 | ||
|
|
2af216cf82 | ||
|
|
1e5d73579c | ||
|
|
2119e19bff | ||
|
|
6027055695 | ||
|
|
469f63f74d | ||
|
|
f34024af34 | ||
|
|
2a72f491e4 | ||
|
|
f1ffca1d2d | ||
|
|
9ca070fa10 | ||
|
|
e78f1237ea | ||
|
|
3aecd92298 | ||
|
|
cea097df83 | ||
|
|
0a86291e66 | ||
|
|
a847f37d43 | ||
|
|
4a55bdb165 | ||
|
|
c6233b1ea8 | ||
|
|
805fb4cb1b | ||
|
|
12bc63913c | ||
|
|
1c94033f7c | ||
|
|
12ebb71155 | ||
|
|
d96691f8ad | ||
|
|
cfc36684aa | ||
|
|
e85d828b24 | ||
|
|
0ddef5544a | ||
|
|
d579b70b7e | ||
|
|
a3795e3e48 | ||
|
|
afce012960 | ||
|
|
6f0885a3a3 | ||
|
|
b9d4b0ddce | ||
|
|
f51388f287 | ||
|
|
c2363a81b4 | ||
|
|
f4aba99624 | ||
|
|
e34684a9c7 | ||
|
|
bd0430dc38 | ||
|
|
4abad60bf1 | ||
|
|
e90bbb37d4 | ||
|
|
6dd2b1210f | ||
|
|
9424567189 | ||
|
|
1d6868852b | ||
|
|
b880712889 | ||
|
|
6b0e8e5fd5 | ||
|
|
11e29754e6 | ||
|
|
ed3df41a7e | ||
|
|
0223ca8abb | ||
|
|
05c999a809 | ||
|
|
246eac0c82 | ||
|
|
ef90cb7c97 | ||
|
|
76b67d55e2 | ||
|
|
55e519a06f | ||
|
|
e78f19bc87 | ||
|
|
2d33a9fd7c | ||
|
|
b40440cf38 | ||
|
|
3513ea7ae1 | ||
|
|
0451e43adb | ||
|
|
95b76a65c3 | ||
|
|
c9718504c5 | ||
|
|
b73ac40fa3 | ||
|
|
0e1cb10909 | ||
|
|
b670001269 | ||
|
|
7a0af01e69 | ||
|
|
7ed66d06a0 | ||
|
|
0f6826ffc0 | ||
|
|
56c3deb423 | ||
|
|
2c238e4fc2 | ||
|
|
4457b9d5d2 | ||
|
|
d09347d603 | ||
|
|
c1b2379204 | ||
|
|
5e0958edbf | ||
|
|
c4dd0082a1 | ||
|
|
c765bb05d7 | ||
|
|
b6051efe5b | ||
|
|
8f725e25b5 | ||
|
|
e35a1d396f | ||
|
|
69490e1122 | ||
|
|
b64113411c | ||
|
|
0f64e7912f | ||
|
|
d884d1eda8 | ||
|
|
b0c6cfb051 | ||
|
|
abc5c93986 | ||
|
|
95c2cc3966 | ||
|
|
73fc0778b8 | ||
|
|
5513e67512 | ||
|
|
0eab9fc08c | ||
|
|
ca78a57b1d | ||
|
|
915847b75a | ||
|
|
8a55f9405c | ||
|
|
c2e0e61fe8 | ||
|
|
1815866877 | ||
|
|
354a9e5970 | ||
|
|
f52a1eb111 | ||
|
|
d6c177008f | ||
|
|
67b2b78717 | ||
|
|
759d63d76a | ||
|
|
35bb616d32 | ||
|
|
588d40aedf | ||
|
|
ea94716a87 | ||
|
|
d6682c8609 | ||
|
|
9546847dc1 | ||
|
|
d3b2c09221 | ||
|
|
12e7106a8a | ||
|
|
ea8c3a9388 | ||
|
|
378b5685b3 | ||
|
|
9a0b9de3ba | ||
|
|
9ee891c4a6 | ||
|
|
6f14d2d37f | ||
|
|
af8be58d92 | ||
|
|
764fc81761 | ||
|
|
9f5b8c9bbc | ||
|
|
e48489482c | ||
|
|
ee4910c5d7 | ||
|
|
62c00aac2c | ||
|
|
a6b8b12a6a | ||
|
|
c02451b602 | ||
|
|
c8f7aceb20 | ||
|
|
dc6d8357a6 | ||
|
|
0fad9535d1 | ||
|
|
f9b6c504df | ||
|
|
52a0895635 | ||
|
|
db0436cc61 | ||
|
|
2266a4c68a | ||
|
|
697ef2636e | ||
|
|
81cc803ade | ||
|
|
67db7c0294 | ||
|
|
481b8ff2d9 | ||
|
|
ea520e670a | ||
|
|
6df927d3b2 | ||
|
|
6eb19cef11 | ||
|
|
aa40deb901 | ||
|
|
7bf89f2b9f | ||
|
|
ed7110838e | ||
|
|
7ca0a7df19 | ||
|
|
3641972d0d | ||
|
|
91dc74ff16 | ||
|
|
bb89e33e24 | ||
|
|
382c566a77 | ||
|
|
7448b65567 | ||
|
|
90380d5664 | ||
|
|
8c205c5ff6 | ||
|
|
f6a2b64091 | ||
|
|
2c15a787c7 | ||
|
|
097347b575 | ||
|
|
e401b0c8ee | ||
|
|
299d1fea24 | ||
|
|
842dea4bd5 | ||
|
|
7b6629c08c | ||
|
|
e25da63721 | ||
|
|
652c75ceb9 | ||
|
|
c43bbcce15 | ||
|
|
70fa4c9323 | ||
|
|
e5bc9d31cc | ||
|
|
39105384ba | ||
|
|
d7e06198c5 | ||
|
|
992dc14c86 | ||
|
|
21cc924b75 | ||
|
|
2d6c17b044 | ||
|
|
34b84d3e63 | ||
|
|
bfcf7ac2fd | ||
|
|
69b5b91c91 | ||
|
|
ca4ade4c44 | ||
|
|
48151d1778 | ||
|
|
30ee0d3800 | ||
|
|
f4e15967e8 | ||
|
|
ed96b507b9 | ||
|
|
29753baeee | ||
|
|
31349fd69a | ||
|
|
59e4de8a55 | ||
|
|
3b80690a71 | ||
|
|
c1dcc56a0b | ||
|
|
e392745c86 | ||
|
|
ad1470b5d2 | ||
|
|
8474050adb | ||
|
|
a907e15ae6 | ||
|
|
319e93f55d | ||
|
|
5a96695ead | ||
|
|
90135803a3 | ||
|
|
2330ee48f2 | ||
|
|
ce3fb61604 | ||
|
|
c6a066c0be | ||
|
|
aae5f7229c | ||
|
|
834c265e2c | ||
|
|
452072cc08 | ||
|
|
f445bc26e5 | ||
|
|
520c0ab96b | ||
|
|
4ace981ba0 | ||
|
|
859ccd2e28 | ||
|
|
43a994e0df | ||
|
|
d0f2fde920 | ||
|
|
4275466f49 | ||
|
|
b0aad414ec | ||
|
|
eb5f8b693b | ||
|
|
c135db1ce7 | ||
|
|
2a650a2793 | ||
|
|
c3d2ffc09c | ||
|
|
1fb2fffdbf | ||
|
|
2a9ad52ab1 | ||
|
|
a73e61078d | ||
|
|
f011c6968b | ||
|
|
d55a53f9bb | ||
|
|
ea569ca29e | ||
|
|
a0bbdde421 | ||
|
|
40fce56585 | ||
|
|
2139141f99 | ||
|
|
25c7c43a82 | ||
|
|
1ea4e393c9 | ||
|
|
7434d40f8d | ||
|
|
e65e2f33f1 | ||
|
|
07966ea82b | ||
|
|
3bfbd47c6d | ||
|
|
e52afa8b19 | ||
|
|
819e48972d | ||
|
|
b6cd8b230e | ||
|
|
2b286a101a | ||
|
|
8982756b40 | ||
|
|
31167c158b | ||
|
|
d236b3dcf5 | ||
|
|
f604560c63 | ||
|
|
9944403cbf | ||
|
|
106cf0d71e | ||
|
|
ac50a355a3 | ||
|
|
900d4cf8e7 | ||
|
|
e424dfc885 | ||
|
|
8000182bb9 | ||
|
|
67db50c699 | ||
|
|
1399d75022 | ||
|
|
6350b98fc2 | ||
|
|
eed32457e3 | ||
|
|
8225d66b55 | ||
|
|
bc9e5e2abc | ||
|
|
eddd0d91a4 | ||
|
|
d8c3aed038 | ||
|
|
a173f33997 | ||
|
|
d2363c5b35 | ||
|
|
ef2657d565 | ||
|
|
88e4dffe88 | ||
|
|
8e20691f42 | ||
|
|
424569b4c4 | ||
|
|
c8e99d572c | ||
|
|
fa3cfa19be | ||
|
|
f13ca24ade | ||
|
|
031f308d39 | ||
|
|
c7b553c7b2 | ||
|
|
697b5fddf7 | ||
|
|
e58c2d27fc | ||
|
|
23806aeb3c | ||
|
|
0b30de1b8e | ||
|
|
1c13428d84 | ||
|
|
caeba33d28 | ||
|
|
51be595573 | ||
|
|
2603a237f9 | ||
|
|
749589b088 | ||
|
|
c4b11e03b9 | ||
|
|
c81ef492e3 | ||
|
|
8b96d885e4 | ||
|
|
b5f5736c90 | ||
|
|
f4c258dc23 | ||
|
|
642112d3eb | ||
|
|
6d571a547c | ||
|
|
884e2146a1 | ||
|
|
420efc18f4 | ||
|
|
8358f3eadb | ||
|
|
636813a83a | ||
|
|
fe46704848 | ||
|
|
a4b46eaf8f | ||
|
|
aea60d9450 | ||
|
|
138d0622ee | ||
|
|
955971486b | ||
|
|
fc99665c01 | ||
|
|
bc43a28587 | ||
|
|
10601a932a | ||
|
|
e1d07f9541 | ||
|
|
9a52193cc6 | ||
|
|
5ba1cbaf8e | ||
|
|
8609f5b2f2 | ||
|
|
1e41998dc6 | ||
|
|
7db3391524 | ||
|
|
62db10919a | ||
|
|
3e5158c430 | ||
|
|
2668288e6c | ||
|
|
0c4cf2ce32 | ||
|
|
40f55f8b98 | ||
|
|
0a49ad1ccf | ||
|
|
1d504e596d | ||
|
|
eef2931150 | ||
|
|
2ddd7d2d8d | ||
|
|
92435ef5ea | ||
|
|
c12111e2cc | ||
|
|
ea20c77df9 | ||
|
|
85e48bbb0d | ||
|
|
c6f3511d84 | ||
|
|
fe969ec6d3 | ||
|
|
bbe8400c5a | ||
|
|
b1609e82a0 | ||
|
|
67305f7976 | ||
|
|
3bf990ec34 | ||
|
|
2de22aae2d | ||
|
|
e2cc966621 | ||
|
|
75119c433a | ||
|
|
a9fc8c3f2a | ||
|
|
3eda8b5a8f | ||
|
|
c352aeb32e | ||
|
|
ca5a8ea827 | ||
|
|
265ab19ed2 | ||
|
|
bcf7ac7483 | ||
|
|
63c280a6ca | ||
|
|
f2b2b391db | ||
|
|
0fa345f98f | ||
|
|
2f28e8ba13 | ||
|
|
bac760207c | ||
|
|
8994cc8b26 | ||
|
|
eda2fd8dbe | ||
|
|
5ac66b0f95 | ||
|
|
215b400038 | ||
|
|
d7561c4b98 | ||
|
|
cfd31ff70e | ||
|
|
45488a431a | ||
|
|
1a5663fbf4 | ||
|
|
89704ce7f9 | ||
|
|
19024306fc | ||
|
|
941d72fd8d | ||
|
|
2840e3a8f9 | ||
|
|
968979f42d | ||
|
|
859b047a23 | ||
|
|
8313302266 | ||
|
|
9a0b0d8469 | ||
|
|
fda1ef2dd3 | ||
|
|
bf25cc8412 | ||
|
|
6371782263 | ||
|
|
f350e9d0cb | ||
|
|
9e2f142391 | ||
|
|
fcb8c5a1c1 | ||
|
|
a500862dc6 | ||
|
|
2d1cbf8e1d | ||
|
|
d5bfc5b07b | ||
|
|
076b2112a3 | ||
|
|
6f90967780 | ||
|
|
8477dbf65d | ||
|
|
419f31f371 | ||
|
|
ce62209bce | ||
|
|
a0b27e6702 | ||
|
|
5f9624f70b | ||
|
|
142e65192d | ||
|
|
a1f3d2f3cd | ||
|
|
c9a260ee12 | ||
|
|
ad08722d0d | ||
|
|
7119596170 | ||
|
|
53cb2963dc | ||
|
|
544f7202a3 | ||
|
|
33d1e77e2e | ||
|
|
2bf63e29c6 | ||
|
|
48d9a5367b | ||
|
|
785f442c8c | ||
|
|
bda380513a | ||
|
|
e380498512 | ||
|
|
6515100807 | ||
|
|
657eeab013 | ||
|
|
dcb90a8d61 | ||
|
|
d2d52e3c34 | ||
|
|
815c8d2b55 | ||
|
|
46112b9d50 | ||
|
|
801f99edad | ||
|
|
2ad3da98d4 | ||
|
|
3430d45f53 | ||
|
|
7628895ac8 | ||
|
|
6ee81f0d26 | ||
|
|
200ba87d63 | ||
|
|
30832ce915 | ||
|
|
9b92d5fb0e | ||
|
|
a740b6b318 | ||
|
|
11ef4833f8 | ||
|
|
84c43e9ee7 | ||
|
|
4724af1011 | ||
|
|
3bf0d8d161 | ||
|
|
a49319f3dd | ||
|
|
094bf40063 | ||
|
|
6c994002af | ||
|
|
38ccc769f7 | ||
|
|
8b320f9095 | ||
|
|
f402ab7afb | ||
|
|
5fefecc526 | ||
|
|
f3bf343c89 | ||
|
|
5fbea83840 | ||
|
|
f776260d7a | ||
|
|
de89a4b7c1 | ||
|
|
7d7f58c3e3 | ||
|
|
fe7452c5cb | ||
|
|
8c0c8e4046 | ||
|
|
59dfba3bb8 | ||
|
|
9bfdc88e52 | ||
|
|
929b3f6af9 | ||
|
|
0578bbbf5d | ||
|
|
e6e15dd764 | ||
|
|
7554836589 | ||
|
|
dde8fb9efb | ||
|
|
8292136f77 | ||
|
|
62e903c463 | ||
|
|
4f1ebb4440 | ||
|
|
461647fcee | ||
|
|
31eb487da5 | ||
|
|
f7346b6ee1 | ||
|
|
8cfcabe146 | ||
|
|
4e51240563 | ||
|
|
9bf768a3fb | ||
|
|
60bed3434b | ||
|
|
7b2a056656 | ||
|
|
0b0ba7dcf6 | ||
|
|
7be748b9b7 | ||
|
|
1e32df4c75 | ||
|
|
7696dea1c6 | ||
|
|
bce9527709 | ||
|
|
63c43de9b4 | ||
|
|
94063e3a87 | ||
|
|
213d4b890e | ||
|
|
6e01079b48 | ||
|
|
e275cd3798 | ||
|
|
daa5bbc5eb | ||
|
|
fac3a7d147 | ||
|
|
c60600ebb9 | ||
|
|
d9077e51e8 | ||
|
|
d9593c8ed4 | ||
|
|
c73894308c | ||
|
|
b8fe3bbd6d | ||
|
|
2ec482a102 | ||
|
|
df04a427f3 | ||
|
|
3de1421d72 | ||
|
|
847bdeecaf | ||
|
|
45a01a3eca | ||
|
|
76a65ffe74 | ||
|
|
3e73993734 | ||
|
|
64876f7781 | ||
|
|
6ae7a40f99 | ||
|
|
1d654b559d | ||
|
|
6ec89031ee | ||
|
|
5a92462c0f | ||
|
|
21bfb94357 | ||
|
|
6d92f56582 | ||
|
|
104d020222 | ||
|
|
27beade888 | ||
|
|
69d4bc9271 | ||
|
|
18a01f2c40 | ||
|
|
b88cf2edcb | ||
|
|
2e03c7939c | ||
|
|
219812e3bb | ||
|
|
ac6a58010d | ||
|
|
73e0937f49 | ||
|
|
d853a70556 | ||
|
|
d4aa197744 | ||
|
|
ab19a27f63 | ||
|
|
181739d0d1 | ||
|
|
a06a0c5b88 | ||
|
|
98fdc67f1d | ||
|
|
798dc68847 | ||
|
|
c2d66a5df0 | ||
|
|
7664e552f1 | ||
|
|
0fbedf5b4c | ||
|
|
df9cad6a53 | ||
|
|
d35dd2a47e | ||
|
|
e6079bd14e | ||
|
|
aecfc05748 | ||
|
|
8a22ef0c83 | ||
|
|
174e41c17d | ||
|
|
2f3077f219 | ||
|
|
1475fd312a | ||
|
|
4680aa659c | ||
|
|
25aade1cf1 | ||
|
|
9d545f1231 | ||
|
|
3381a4ab03 | ||
|
|
e22e0763d9 | ||
|
|
fcd1678a17 | ||
|
|
00e7599c8c | ||
|
|
3b87fc19e4 | ||
|
|
df7250baa8 | ||
|
|
33127f4476 | ||
|
|
86c1125380 | ||
|
|
e5b0892f08 | ||
|
|
32dc874928 | ||
|
|
8d3caa9944 | ||
|
|
de6a725b04 | ||
|
|
ba9a9bbe58 | ||
|
|
71b41c963b | ||
|
|
52aa459a2d | ||
|
|
91fe0e1022 | ||
|
|
7a9bb6bc86 | ||
|
|
37f86d9e08 | ||
|
|
209fd2d0cb | ||
|
|
2af270ca42 | ||
|
|
60be3b19be | ||
|
|
a95a60c7ea | ||
|
|
8f3d17699a | ||
|
|
8fd3af0c79 | ||
|
|
34a2fd7b09 | ||
|
|
703e97b7af | ||
|
|
a2153c15ee | ||
|
|
c262b9c5a3 | ||
|
|
6be76af617 | ||
|
|
10e875cd79 | ||
|
|
6947dc139e | ||
|
|
7c26a54d3f | ||
|
|
1aa9d44783 | ||
|
|
0332666d38 | ||
|
|
544b16639e | ||
|
|
a4c981469e | ||
|
|
9ce950e3c1 | ||
|
|
7a03c5a0c6 | ||
|
|
9df7992de8 | ||
|
|
39f703310b | ||
|
|
7a2cc782b4 | ||
|
|
852a8d6685 | ||
|
|
3fd8ef52c5 | ||
|
|
2acdd2fadc | ||
|
|
973a6990b5 | ||
|
|
ac5249a76c | ||
|
|
d2b7671253 | ||
|
|
eeabe66fc4 | ||
|
|
39263efef7 | ||
|
|
90e1035e9b | ||
|
|
97e47b4494 | ||
|
|
65104b7d78 | ||
|
|
bab37dcfae | ||
|
|
0080305fa6 | ||
|
|
7655620fd0 | ||
|
|
c55475e8e7 | ||
|
|
d571a4d389 | ||
|
|
98196673aa | ||
|
|
9fe781ccaf | ||
|
|
b8947ac8a5 | ||
|
|
2efe28ca59 | ||
|
|
cd8e6a1ad7 | ||
|
|
4c4be32ad7 | ||
|
|
ebe8f2c605 | ||
|
|
38d1587091 | ||
|
|
1c32f10039 | ||
|
|
714df3001a | ||
|
|
2a959cde6f | ||
|
|
5e23fd6ef1 | ||
|
|
9a6934874a | ||
|
|
36efe75ad1 | ||
|
|
0c68794fa9 | ||
|
|
9a4a768ee3 | ||
|
|
120fcd1215 | ||
|
|
3ea1c8a6fa | ||
|
|
6b3ed0f320 | ||
|
|
ef02358378 | ||
|
|
7613383e7b | ||
|
|
cba4c5a756 | ||
|
|
739b738e7f | ||
|
|
8d425c6720 | ||
|
|
db32af9171 | ||
|
|
208af8cb15 | ||
|
|
52f3f3b5ab | ||
|
|
9381a76d75 | ||
|
|
e4d8336175 | ||
|
|
288447d01e | ||
|
|
93946c2868 | ||
|
|
9b7807d40f | ||
|
|
dcd02284be | ||
|
|
2e21c72542 | ||
|
|
2107bc5836 | ||
|
|
a226b281af | ||
|
|
6edc2c3690 | ||
|
|
b4aebbe78d | ||
|
|
76bc7bf7b8 | ||
|
|
306578d7be | ||
|
|
3efbe9a1c4 | ||
|
|
0b762189b4 | ||
|
|
9b820d71a6 | ||
|
|
bd8436d1c5 | ||
|
|
7f5730ea3b | ||
|
|
3c080ee3e6 | ||
|
|
a521b0edbb | ||
|
|
b335c38162 | ||
|
|
391f7fd742 | ||
|
|
e8b0796fc7 | ||
|
|
c26725c5a0 | ||
|
|
5e6faa999d | ||
|
|
2d758663db | ||
|
|
36adbfa41c | ||
|
|
ef43520d56 | ||
|
|
2fbce22910 | ||
|
|
7b0891b3fa | ||
|
|
3d3d2a923b | ||
|
|
f03f76ecfb | ||
|
|
1d714512f0 | ||
|
|
e7a6a52eda | ||
|
|
bd82b8bc7e | ||
|
|
4b35ff1f07 | ||
|
|
56e3106b63 | ||
|
|
2c959123e5 | ||
|
|
5f7a75979f | ||
|
|
7c3909bc3f | ||
|
|
07a6bf9b84 | ||
|
|
0eeb5e2a29 | ||
|
|
89b17b5463 | ||
|
|
4f003fc7a7 | ||
|
|
f709c565a1 | ||
|
|
9fa5119333 | ||
|
|
630b4ecfff | ||
|
|
919e53a5d4 | ||
|
|
01c646a892 | ||
|
|
94291eb59f | ||
|
|
f6e820b4e9 | ||
|
|
cd2652b2fc | ||
|
|
66676e6dd4 | ||
|
|
0b3a96412c | ||
|
|
035d6cd16d | ||
|
|
9b90dfaa48 | ||
|
|
267c25fd53 | ||
|
|
7eac76d31b | ||
|
|
c56b66543d | ||
|
|
37176ed2b9 | ||
|
|
0777e391be | ||
|
|
5d1498f2cb | ||
|
|
5507b6073c | ||
|
|
c536b8de62 | ||
|
|
967c1d8534 | ||
|
|
fc98383659 | ||
|
|
fec416f9db | ||
|
|
5ae45bab18 | ||
|
|
65daf3ba40 | ||
|
|
c7f9eb7b21 | ||
|
|
8f7f7f7c45 | ||
|
|
c4d57462dc | ||
|
|
33217b0dd0 | ||
|
|
8b3c7dda75 | ||
|
|
3d45a4bd23 | ||
|
|
011ecc341a | ||
|
|
e1ad955897 | ||
|
|
8f86f7c601 | ||
|
|
3bee705feb | ||
|
|
ef74ca60c0 | ||
|
|
eebb68cd7f | ||
|
|
4ed912eb23 | ||
|
|
21067ab062 | ||
|
|
02a054cda4 | ||
|
|
1752cd4fe5 | ||
|
|
4895546238 | ||
|
|
f907de272a | ||
|
|
75c17c7a67 | ||
|
|
28518c2352 | ||
|
|
aa832a05c7 | ||
|
|
11f7695907 | ||
|
|
b700b3cde6 | ||
|
|
307c48fe0a | ||
|
|
4d3a2bd22c | ||
|
|
be7e04056f | ||
|
|
58ac9f257c | ||
|
|
d2a5d51f69 | ||
|
|
3a27933ae7 | ||
|
|
d7f90c36df | ||
|
|
4af83430b5 | ||
|
|
75b91550f3 | ||
|
|
e25402b541 | ||
|
|
94dd9ce73d | ||
|
|
cf8c14b1b0 | ||
|
|
2efbca5535 | ||
|
|
e11a806460 | ||
|
|
ab2b98e425 | ||
|
|
55d66fb897 | ||
|
|
df22b96d72 | ||
|
|
07252ad0b3 | ||
|
|
b151feb31e | ||
|
|
44b71103df | ||
|
|
69f211cf78 | ||
|
|
239c45dc11 | ||
|
|
d5b791a26a | ||
|
|
76efba686b | ||
|
|
2f6262c27b | ||
|
|
4dce03fa42 | ||
|
|
e222ba4c81 | ||
|
|
19873f04d4 | ||
|
|
f263787f07 | ||
|
|
c3aeed0dcc | ||
|
|
468b813bc1 | ||
|
|
6d90d1e1f5 | ||
|
|
88bdd26c99 | ||
|
|
fd453d23b9 | ||
|
|
33bb7859d4 | ||
|
|
8a9c14ea1d | ||
|
|
00d35ccc14 | ||
|
|
5a5be7e287 | ||
|
|
0fec478562 | ||
|
|
d666ef00e0 | ||
|
|
1563d128d8 | ||
|
|
d34c22ac22 | ||
|
|
c3946dd017 | ||
|
|
5de87361e9 | ||
|
|
d96c769fd6 | ||
|
|
2ae00db43e | ||
|
|
a5b2e3e63c | ||
|
|
eb91dbce42 | ||
|
|
abd42e5dea | ||
|
|
000ec9fc13 | ||
|
|
875cd4e081 | ||
|
|
ccfd5c1010 | ||
|
|
cba58b1027 | ||
|
|
90a432279b | ||
|
|
9338fb87e9 | ||
|
|
b55dd2cb82 | ||
|
|
f779d1be3f | ||
|
|
27f0f10590 | ||
|
|
1af6a6d4f9 | ||
|
|
a0d0ce464e | ||
|
|
15f6f53638 | ||
|
|
5d0deba938 | ||
|
|
78fe411c7d | ||
|
|
776d7761d9 | ||
|
|
1bbd77646e | ||
|
|
87875e0de8 | ||
|
|
ad7a6e10a7 | ||
|
|
b420fdaa87 | ||
|
|
4a5a3d27ed | ||
|
|
8e8ba46cb6 | ||
|
|
8ad056013c | ||
|
|
a12b021733 | ||
|
|
50fa87f1cf | ||
|
|
d78ce58b6f | ||
|
|
3a42b6c5c6 | ||
|
|
f94ab84dac | ||
|
|
360e07c90f | ||
|
|
a794538c54 | ||
|
|
cbf349b5eb | ||
|
|
e7f3b625b0 | ||
|
|
880f73d471 | ||
|
|
3fcb36d8dc | ||
|
|
bbe2cb75ad | ||
|
|
927e29b93e | ||
|
|
3210155ab7 | ||
|
|
9110f756ad | ||
|
|
fd4c025e98 | ||
|
|
720795ac7d | ||
|
|
847ea583f6 | ||
|
|
d353d67a34 | ||
|
|
f5577b320b | ||
|
|
c16818b261 | ||
|
|
78a5079558 | ||
|
|
aca2e149ab | ||
|
|
f5d809f366 | ||
|
|
d194688020 | ||
|
|
7d0ea3e2c4 | ||
|
|
0f0b1aff55 | ||
|
|
0ce532547a | ||
|
|
d8b8d88276 | ||
|
|
1c43870cec | ||
|
|
03020dd31e | ||
|
|
3a9f8a00bf | ||
|
|
880f63b008 | ||
|
|
bc856fd8ec | ||
|
|
2824e67d95 | ||
|
|
089a0af119 | ||
|
|
e990a98404 | ||
|
|
791873b10d | ||
|
|
808f632997 | ||
|
|
4edaffebfb | ||
|
|
cdbc7cc52c | ||
|
|
cae2b7bf4e | ||
|
|
3cdc9b8156 | ||
|
|
c834b313a5 | ||
|
|
9038278735 | ||
|
|
f59c0ab842 | ||
|
|
6ce0c94d12 | ||
|
|
e9c8da35c5 | ||
|
|
421825259e | ||
|
|
e6ccec17a6 | ||
|
|
22da1b2b31 | ||
|
|
a7a76f123d | ||
|
|
e3321920f3 | ||
|
|
f090a927f4 | ||
|
|
ac7b484703 | ||
|
|
a2e9a02429 | ||
|
|
7894937737 | ||
|
|
4cdd51cd3a | ||
|
|
37752bd8bb | ||
|
|
333092c488 | ||
|
|
2493cf0364 | ||
|
|
7aed32df00 | ||
|
|
a97ae51cc7 | ||
|
|
e4903396d4 | ||
|
|
dfb5968bfe | ||
|
|
07c9dc4142 | ||
|
|
a65198882f | ||
|
|
8647d6b8d8 | ||
|
|
48919c54fb | ||
|
|
7af0da7f93 | ||
|
|
c2bd9dd4f5 | ||
|
|
dbdfe61644 | ||
|
|
397fa59eee | ||
|
|
5158106c12 | ||
|
|
3645e59893 | ||
|
|
71a4ab3331 | ||
|
|
556406a127 | ||
|
|
a1523d6419 | ||
|
|
3ea23712eb | ||
|
|
d6badb77a4 | ||
|
|
293a0997c9 | ||
|
|
079644d012 | ||
|
|
e1fc6f7e25 | ||
|
|
966e0e4a77 | ||
|
|
d6f39a69af | ||
|
|
1d81bb7a2b | ||
|
|
c47feb1cfe | ||
|
|
fad9235cd8 | ||
|
|
07b3f38269 | ||
|
|
86a3efda6f | ||
|
|
8dd9afe4f9 | ||
|
|
da0f63cd1c | ||
|
|
0e06aaa2bc | ||
|
|
723d4d6f61 | ||
|
|
65f6a373b0 | ||
|
|
bc01d8d023 | ||
|
|
ed0799d653 | ||
|
|
df8b7dfc40 | ||
|
|
e7e9304819 | ||
|
|
2b9d2dce16 | ||
|
|
be0e313c07 | ||
|
|
11ce281694 | ||
|
|
9f86dde195 | ||
|
|
f263782f1b | ||
|
|
62e8c2dd87 | ||
|
|
514afddeb4 | ||
|
|
7f5dc7b919 | ||
|
|
c47bdae9f2 | ||
|
|
192c7c27b9 | ||
|
|
0518dec60d | ||
|
|
178ca2bcdf | ||
|
|
5236889377 | ||
|
|
015c4e6fbd | ||
|
|
0f9a14dfda | ||
|
|
e7f020f3f2 | ||
|
|
d83ad6f321 | ||
|
|
c759729478 | ||
|
|
ac0a7f2281 | ||
|
|
e0e87ca19a | ||
|
|
528907cb16 | ||
|
|
96ab16a9dd | ||
|
|
0ea26d538b | ||
|
|
747a4bb623 | ||
|
|
9b886c2ad4 | ||
|
|
223aa5cc4e | ||
|
|
d029a09810 | ||
|
|
765a9f3471 | ||
|
|
fc11e72174 | ||
|
|
add34aa286 | ||
|
|
b35dc5f0b4 | ||
|
|
fc74c6a7b6 | ||
|
|
2f7e5cf7dd | ||
|
|
747b964295 | ||
|
|
a84990961a | ||
|
|
53fe572bbd | ||
|
|
de648bfdc1 | ||
|
|
e71b25a555 | ||
|
|
8752fbd92c | ||
|
|
bed41af868 | ||
|
|
129b270628 | ||
|
|
3655e240f5 | ||
|
|
98ef161bfe | ||
|
|
54a12ee1d6 | ||
|
|
d6a4c3079d | ||
|
|
8122468a36 | ||
|
|
5c150c0c94 | ||
|
|
5ec1a8bb2b | ||
|
|
dd6781217a | ||
|
|
0175189c34 | ||
|
|
adb6334ba0 | ||
|
|
4dea020050 | ||
|
|
c86ee574ec | ||
|
|
f2ed18d150 | ||
|
|
1986e1cdf8 | ||
|
|
0aeee64cca | ||
|
|
075a86b076 | ||
|
|
7124b2164d | ||
|
|
efc19260a7 | ||
|
|
5d515c3a2f | ||
|
|
68face848a | ||
|
|
7455bb09b3 | ||
|
|
41e944da00 | ||
|
|
4113481c4e | ||
|
|
3260228009 | ||
|
|
bef9b9b07e | ||
|
|
edd6f6c5f2 | ||
|
|
c87d73045b | ||
|
|
e3ebbe25e0 | ||
|
|
cd4060a99c | ||
|
|
adb7a88428 | ||
|
|
580d314fbe | ||
|
|
fe154fa5de | ||
|
|
717c216851 | ||
|
|
27c281eec3 | ||
|
|
e7a9f17371 | ||
|
|
2460a3dfbb | ||
|
|
2c325c2a7d | ||
|
|
9340a33980 | ||
|
|
e62b52da99 | ||
|
|
7988e31f5e | ||
|
|
1674df00b1 | ||
|
|
29874b21b6 | ||
|
|
04cea864bc | ||
|
|
3151856e98 | ||
|
|
1738c13bc2 | ||
|
|
71db5c1605 | ||
|
|
14daf1ee5e | ||
|
|
84dec5da10 | ||
|
|
de45ac41ad | ||
|
|
83eec683c9 | ||
|
|
abea6d5787 | ||
|
|
252178fe62 | ||
|
|
c768605bde | ||
|
|
1f5824247f | ||
|
|
e8205af6fb | ||
|
|
e5dcab8fd2 | ||
|
|
40922c7da7 | ||
|
|
c1672220fd | ||
|
|
d37bfa3b4e | ||
|
|
129b1bb8d4 | ||
|
|
f6e80d576d | ||
|
|
b14c933171 | ||
|
|
2fc0df1b39 | ||
|
|
a662079cbc | ||
|
|
775a4294fc | ||
|
|
3b987dfcec | ||
|
|
c39873759f | ||
|
|
85187290a7 | ||
|
|
695e014075 | ||
|
|
090a90a036 | ||
|
|
095a1123c1 | ||
|
|
41ffe9851d | ||
|
|
5c1970a229 | ||
|
|
9f85165101 | ||
|
|
8dbbcfd382 | ||
|
|
fa48fbb9b8 | ||
|
|
8b2d55e345 | ||
|
|
cee07f3f6b | ||
|
|
118bd2f8b2 | ||
|
|
a96be32fae | ||
|
|
983a8cee45 | ||
|
|
6bead0c1b0 | ||
|
|
ad980a72f7 | ||
|
|
7ec45f4382 | ||
|
|
81b0548518 | ||
|
|
aa32c47fb5 | ||
|
|
7070ea0b49 | ||
|
|
59cb1466b7 | ||
|
|
9c759e5f74 | ||
|
|
4e96a014a8 | ||
|
|
8c11ecaf73 | ||
|
|
1f55986ed2 | ||
|
|
318a16637b | ||
|
|
8bad6e11e2 | ||
|
|
112245ee48 | ||
|
|
924fa6045c | ||
|
|
f29d6f802f | ||
|
|
201c991cfa | ||
|
|
23c5701178 | ||
|
|
eb6c992bfb | ||
|
|
bd44f041e8 | ||
|
|
d78fbce827 | ||
|
|
627aa8db2d | ||
|
|
e7004550c4 | ||
|
|
a31b7339cd | ||
|
|
4e3a793f1e | ||
|
|
9bff67bc74 | ||
|
|
8bbcbc528c | ||
|
|
8f66dbfcd5 | ||
|
|
8799f8bfdb | ||
|
|
972d1bf5b4 | ||
|
|
b5530775c9 | ||
|
|
13118dbd8d | ||
|
|
0f39386d9b | ||
|
|
7674befa47 | ||
|
|
b579f5dc99 | ||
|
|
7f490c08da | ||
|
|
982197b162 | ||
|
|
57f488738b | ||
|
|
b21edce943 | ||
|
|
2a71e4f336 | ||
|
|
64d092935b | ||
|
|
5eb6fb1c2f | ||
|
|
20f93404a7 | ||
|
|
3db784f3c7 | ||
|
|
7b9eb233cb | ||
|
|
c99773bae0 | ||
|
|
8ff25a9566 | ||
|
|
e9f451bffe | ||
|
|
3b14158979 | ||
|
|
913de024a9 | ||
|
|
1da49d0ac5 | ||
|
|
ca4423ed2a | ||
|
|
6cd99e6a77 | ||
|
|
6d18f715e4 | ||
|
|
459a0dae29 | ||
|
|
3a72b0fd41 | ||
|
|
f0248c9ed9 | ||
|
|
c0801e900d | ||
|
|
5a6daa7c54 | ||
|
|
e3da86fb45 | ||
|
|
0578e9b16e | ||
|
|
7e58739a1f | ||
|
|
631addbbb4 | ||
|
|
d4ac78535c | ||
|
|
70863fbd55 | ||
|
|
7709261ea9 | ||
|
|
ab1863ac48 | ||
|
|
72b63e9520 | ||
|
|
a698bfdc2a | ||
|
|
efc739a880 | ||
|
|
fd1af0189e | ||
|
|
83a60f15ff | ||
|
|
c083728e4c | ||
|
|
5e28b0f471 | ||
|
|
3a07b4412d | ||
|
|
5171e9da93 | ||
|
|
af62d7f937 | ||
|
|
12d05e4835 | ||
|
|
07e22d1d65 | ||
|
|
d3e232d1c1 | ||
|
|
646599d0d9 | ||
|
|
eb4d5120bf | ||
|
|
e0c0173f73 | ||
|
|
552f7a91d0 | ||
|
|
ad4a9eb73a | ||
|
|
5aa528781f | ||
|
|
af23c0480e | ||
|
|
624ab24a5c | ||
|
|
66334820ca | ||
|
|
2c4e054e9a | ||
|
|
49c5f614c6 | ||
|
|
6b5347ee39 | ||
|
|
b1a50d54e2 | ||
|
|
736521a3f1 | ||
|
|
870a1f753a | ||
|
|
cc822bf70f | ||
|
|
5da6819277 | ||
|
|
362c9ae79a | ||
|
|
ac93df43cd | ||
|
|
4b256a6fa8 | ||
|
|
45fae55929 | ||
|
|
4a3fcd0bf9 | ||
|
|
edd1b76a9a | ||
|
|
c4db8e49a7 | ||
|
|
3473b21710 | ||
|
|
5e9a10dbae | ||
|
|
f7d663c7db | ||
|
|
1d609d2bbd | ||
|
|
6c9ca1bec2 | ||
|
|
730804289c | ||
|
|
39c34e4992 | ||
|
|
b946530ef6 | ||
|
|
9b145c7c73 | ||
|
|
ac755fce82 | ||
|
|
97e87d8262 | ||
|
|
c669420134 | ||
|
|
f8497b8171 | ||
|
|
bfbd976c09 | ||
|
|
a75a25cd7c | ||
|
|
4f55723527 | ||
|
|
77b82d300a | ||
|
|
e5d39063a2 | ||
|
|
be62ab2d02 | ||
|
|
d6e767e36b | ||
|
|
b29aae6c0c | ||
|
|
9f8ee31144 | ||
|
|
8164cac797 | ||
|
|
a80eda41bc | ||
|
|
bafe8d920a | ||
|
|
633b716a3a | ||
|
|
832951ec44 | ||
|
|
18b875dc9f | ||
|
|
6fd7f4fe1b | ||
|
|
263a7beeb5 | ||
|
|
6913a4dfa8 | ||
|
|
025c50cc6d | ||
|
|
02cce7d4b4 | ||
|
|
0a7e7a6fa5 | ||
|
|
daa32013b1 | ||
|
|
ec1b86d9cb | ||
|
|
cf597e2bb1 | ||
|
|
e76f2ed4cb | ||
|
|
b5c2190b38 | ||
|
|
28008aced0 | ||
|
|
70af080813 | ||
|
|
5ebba4b19f | ||
|
|
cdcd45d651 | ||
|
|
e78f607ef3 | ||
|
|
6b9a17be16 | ||
|
|
4250a98908 | ||
|
|
ba4f49f4a2 | ||
|
|
5b438fb20d | ||
|
|
5071fe82ab | ||
|
|
91cff02596 | ||
|
|
454cbcce51 | ||
|
|
6bfae5de6f | ||
|
|
3e685777a8 | ||
|
|
d13b153230 | ||
|
|
3a6f776c4b | ||
|
|
ca305b03b7 | ||
|
|
1955eea1b8 | ||
|
|
42fa9fc570 | ||
|
|
130d0395d0 | ||
|
|
c5f1ff9ee1 | ||
|
|
9040394e8e | ||
|
|
955ce393df | ||
|
|
92278a45ed | ||
|
|
089cc68a04 | ||
|
|
a254354e68 | ||
|
|
5e197df89a | ||
|
|
8ba5ef8cae | ||
|
|
9a51f29efa | ||
|
|
ebd2bcc177 | ||
|
|
9717b3044f | ||
|
|
2bcc2ec7d1 | ||
|
|
529d57bddf | ||
|
|
0ba18848af | ||
|
|
b2328d089a | ||
|
|
29ec868c4b | ||
|
|
1d431fe8d2 | ||
|
|
2b759b9e8d | ||
|
|
5f27f7de47 | ||
|
|
282f4678cd | ||
|
|
2471a8bb91 | ||
|
|
7bf3581b02 | ||
|
|
b9b29bf4c0 | ||
|
|
20df64814e | ||
|
|
34c92bbc17 | ||
|
|
c41f3f8582 | ||
|
|
8670df08a2 | ||
|
|
eeec4c27e7 | ||
|
|
730690ea03 | ||
|
|
3543873da7 | ||
|
|
c505626c42 | ||
|
|
484e1a624c | ||
|
|
ac3e27c026 | ||
|
|
1ab6f910b6 | ||
|
|
cfd49740eb | ||
|
|
7e8505fc11 | ||
|
|
f9aec2685c | ||
|
|
5d16497bed | ||
|
|
9f53bbd791 | ||
|
|
e1d367e05a | ||
|
|
f30897500d | ||
|
|
68de12acbf | ||
|
|
6320f9795c | ||
|
|
22b974691e | ||
|
|
4ef627d79f | ||
|
|
19991e269b | ||
|
|
b8b225c8b5 | ||
|
|
a1f026f57a | ||
|
|
2b788e9aa6 | ||
|
|
140e4ac507 | ||
|
|
1c52d76668 | ||
|
|
178735b958 | ||
|
|
4c179ba3f7 | ||
|
|
05f51e9355 | ||
|
|
75e3aa12c5 | ||
|
|
99a5074372 | ||
|
|
4c6f695bea | ||
|
|
8bc3e63871 | ||
|
|
4d400910b4 | ||
|
|
42208bc031 | ||
|
|
199a1ba0e5 | ||
|
|
4360142bd1 | ||
|
|
ddce1c6ef2 | ||
|
|
72fae2faa5 | ||
|
|
64a81f887a | ||
|
|
64b96f3908 | ||
|
|
52a1268089 | ||
|
|
5584da388c | ||
|
|
efdaf940a5 | ||
|
|
71ec89a112 | ||
|
|
1087e318e5 | ||
|
|
150237f712 | ||
|
|
63dd0f249d | ||
|
|
0b984519c3 | ||
|
|
073e4443e8 | ||
|
|
00ba053c90 | ||
|
|
ff0c931e47 | ||
|
|
a16f3baecc | ||
|
|
49a66bc4cc | ||
|
|
f3f692adf7 | ||
|
|
af84e362cc | ||
|
|
082117c4bb | ||
|
|
0e17d10bf3 | ||
|
|
68077149e2 | ||
|
|
62d7d49719 | ||
|
|
1d8d91afc6 | ||
|
|
a83ad2d9d4 | ||
|
|
0306c1bb0c | ||
|
|
4a733796bd | ||
|
|
0fd0554b5f | ||
|
|
fa6e7cb733 | ||
|
|
7b02a62da8 | ||
|
|
189c101793 | ||
|
|
1c556cd90d | ||
|
|
e442663e2a | ||
|
|
71539bcbeb | ||
|
|
d5790e09a5 | ||
|
|
b26f7fca3f | ||
|
|
2836834d7e | ||
|
|
d8b2726fd3 | ||
|
|
3f87f912c5 | ||
|
|
dd6a7ca197 | ||
|
|
fa4a6cdb5c | ||
|
|
3bef7a4450 | ||
|
|
e561f744fa | ||
|
|
0b45493557 | ||
|
|
18a7276909 | ||
|
|
28b48fc9bb | ||
|
|
10b4fa91eb | ||
|
|
a33d08928a | ||
|
|
15e6ee6c7c | ||
|
|
a9549f7a08 | ||
|
|
cc1ff27256 | ||
|
|
0ce83dee95 | ||
|
|
38873596ec | ||
|
|
ffcbba4447 | ||
|
|
b9b07387d7 | ||
|
|
90e2c42031 | ||
|
|
84b6e11bd5 | ||
|
|
894762259b | ||
|
|
f0cbc85a07 | ||
|
|
130e36d766 | ||
|
|
5d3cfbdc9b | ||
|
|
f55abfeb95 | ||
|
|
38bf5523e1 | ||
|
|
12b3807a7f | ||
|
|
3a3429b1ef | ||
|
|
86812432f3 | ||
|
|
54aff83179 | ||
|
|
78fea4a9ca | ||
|
|
bb68eaa69e | ||
|
|
62b9d7dc73 | ||
|
|
00d71ff0eb | ||
|
|
9b4192cdd0 | ||
|
|
0ebd2f44d4 | ||
|
|
f312ddfa4f | ||
|
|
d83382eb55 | ||
|
|
793939a365 | ||
|
|
7bf2190f03 | ||
|
|
081ef46e76 | ||
|
|
15b6ad41bc | ||
|
|
0268c1d02c | ||
|
|
38a9706e16 | ||
|
|
62d9e3f50e | ||
|
|
3ded99b894 | ||
|
|
4c76314c26 | ||
|
|
f1dbfaf706 | ||
|
|
7d4fa9d504 | ||
|
|
64ab254f26 | ||
|
|
ff78f79762 | ||
|
|
202840e750 | ||
|
|
bfad23d3e2 | ||
|
|
7f9c62437e | ||
|
|
72b4d91d2e | ||
|
|
ee6003be87 | ||
|
|
4716dac874 | ||
|
|
0e72c315a0 | ||
|
|
4937519d51 | ||
|
|
63469ed8f7 | ||
|
|
22556a7bbf | ||
|
|
c4cbc54484 | ||
|
|
7a4758a6a2 | ||
|
|
995a9238b3 | ||
|
|
5296af94d2 | ||
|
|
0d342bac51 | ||
|
|
832d33ce9d | ||
|
|
c3cab37d7e | ||
|
|
e58d1bf974 | ||
|
|
90b6324563 | ||
|
|
43d3463d5d | ||
|
|
e64b7a3ab2 | ||
|
|
1af05797d7 | ||
|
|
9a8de23858 | ||
|
|
5b3d968634 | ||
|
|
300b81bfcb | ||
|
|
0a6ae664bd | ||
|
|
c4df5cf9a6 | ||
|
|
e6a7be922b | ||
|
|
1525c2530e | ||
|
|
016e4c0193 | ||
|
|
be642610ae | ||
|
|
02f61832c0 | ||
|
|
dabf393920 | ||
|
|
e4679c1b78 | ||
|
|
62f52ebb3a | ||
|
|
e8e25b80d1 | ||
|
|
2822c0890a | ||
|
|
c45d6b2017 | ||
|
|
8d4dd88bf9 | ||
|
|
3c9464eea4 | ||
|
|
5b12627e14 | ||
|
|
9caf5c05e7 | ||
|
|
50889c0f94 | ||
|
|
99b6a132bc | ||
|
|
e6a675e6ec | ||
|
|
1bc6509d02 | ||
|
|
1db9d9f76f | ||
|
|
8737c35ded | ||
|
|
e8ed4329ea | ||
|
|
a5f72330fb | ||
|
|
9bb8176d34 | ||
|
|
9b45f342ee | ||
|
|
e4eaf32b4d | ||
|
|
0c3cae59d9 | ||
|
|
131acf304b | ||
|
|
8bd6b60a01 | ||
|
|
e2eef1256a | ||
|
|
a0a93e35ae | ||
|
|
2325bede8a | ||
|
|
56cd747c8b | ||
|
|
48098b1675 | ||
|
|
f6a6704b66 | ||
|
|
5e3e8fcdb9 | ||
|
|
0949c0f326 | ||
|
|
81f31efaee | ||
|
|
c49e987b1e | ||
|
|
3572fa22a0 | ||
|
|
1d1dc8e339 | ||
|
|
bbfbcb8a5d | ||
|
|
44d400db83 | ||
|
|
4a71285c34 | ||
|
|
6357619ab2 | ||
|
|
e3611ad209 | ||
|
|
95d5a0c480 | ||
|
|
838a420e27 | ||
|
|
248b7dfa59 | ||
|
|
0d166f9c7d | ||
|
|
86c18ea6e0 | ||
|
|
b7a67f6f74 | ||
|
|
1c042bbaea | ||
|
|
899db41a5c | ||
|
|
2ef6b86ccd | ||
|
|
342f65eb8e | ||
|
|
0eae26a7be | ||
|
|
fd346c6cd1 | ||
|
|
d3a8a81756 | ||
|
|
b7f86bffd5 | ||
|
|
79810b7fcb | ||
|
|
84c874c53b | ||
|
|
04d64351a2 | ||
|
|
c8ac908db2 | ||
|
|
b57ef4b261 | ||
|
|
1a5cbc9052 | ||
|
|
f36225c3e0 | ||
|
|
97b5a5f469 | ||
|
|
a1f5245e27 | ||
|
|
ef8f829513 | ||
|
|
d9cdb4ae19 | ||
|
|
451062553e | ||
|
|
0fcf2b1110 | ||
|
|
f36f084465 | ||
|
|
f6468f0af3 | ||
|
|
439e73d79c | ||
|
|
0547d9d651 | ||
|
|
3b34fbd4c4 | ||
|
|
a05a65e7d2 | ||
|
|
aec211fc80 | ||
|
|
1084068a3e | ||
|
|
e9ae585647 | ||
|
|
dda76e50a9 | ||
|
|
37849969ad | ||
|
|
707349d492 | ||
|
|
f6a6839a82 | ||
|
|
79c2f05e7d | ||
|
|
4dca6d50c0 | ||
|
|
23fc81f1af | ||
|
|
d035bfb1a9 | ||
|
|
80400ab3f8 | ||
|
|
a338dce83f | ||
|
|
4108c5d01f | ||
|
|
9520e5121c | ||
|
|
e94f782f51 | ||
|
|
6d1f6a9516 | ||
|
|
a578749622 | ||
|
|
0d0dfba203 | ||
|
|
91a399ae7f | ||
|
|
2b9eb4437b | ||
|
|
5bd66241df | ||
|
|
1bb1ce7475 | ||
|
|
c305c2cc6b | ||
|
|
b310047ded | ||
|
|
bda4957f9b | ||
|
|
f10d3564e1 | ||
|
|
bc483b2354 | ||
|
|
2d7f94cae1 | ||
|
|
7481563bd9 | ||
|
|
bd550bb45a | ||
|
|
b419ca254b | ||
|
|
7eed008e8e | ||
|
|
53dfeed6c0 | ||
|
|
ef513ef7fb | ||
|
|
7b304cee16 | ||
|
|
ea7363a8f4 | ||
|
|
8e1a21cf53 | ||
|
|
fc773c2784 | ||
|
|
bfe4ceedd1 | ||
|
|
ffd8b595d1 | ||
|
|
1457e40208 | ||
|
|
1ad53cee1f | ||
|
|
53f1e5ff5b | ||
|
|
0e6ef65aec | ||
|
|
ee17051933 | ||
|
|
c4ffe74d71 | ||
|
|
55b2af9464 | ||
|
|
b4ee420a37 | ||
|
|
f926351fa8 | ||
|
|
51f2733b7f | ||
|
|
fc4a42bbdc | ||
|
|
89ccd463d7 | ||
|
|
473d640e88 | ||
|
|
57499291d3 | ||
|
|
56e51efeea | ||
|
|
d22eb261cf | ||
|
|
fbf2f36cae | ||
|
|
536778812f | ||
|
|
e8941d2bd8 | ||
|
|
d854c8fa5f | ||
|
|
e9a97127f7 | ||
|
|
0391e5bcc7 | ||
|
|
d02a867424 | ||
|
|
2d820e6204 | ||
|
|
f9f7697b96 | ||
|
|
409d7378d9 | ||
|
|
669fe74096 | ||
|
|
36d08f8ad3 | ||
|
|
8a7661df89 | ||
|
|
6e658a7c04 | ||
|
|
95046c9047 | ||
|
|
5beca89412 | ||
|
|
5ac9d9754e | ||
|
|
5e7943f19f | ||
|
|
5a5e1d0401 | ||
|
|
a88b91b3ed | ||
|
|
5c4c052fd7 | ||
|
|
d26c32375e | ||
|
|
994c695862 | ||
|
|
f154e94981 | ||
|
|
b7f8163291 | ||
|
|
675295692b | ||
|
|
d1e55a2d1d | ||
|
|
5e1f0e5e90 | ||
|
|
bdcccee203 | ||
|
|
d70dad6807 | ||
|
|
93e35880ce | ||
|
|
9b970cf12f | ||
|
|
022b6b9067 | ||
|
|
fc07b0ea30 | ||
|
|
a484adcb30 | ||
|
|
31679640c0 | ||
|
|
3469a0a1a0 | ||
|
|
38c0f800d6 | ||
|
|
57e37b6c24 | ||
|
|
07509febcd | ||
|
|
e593da1c23 | ||
|
|
7f87a044cd | ||
|
|
b841b9bd01 | ||
|
|
ceeba58dc9 | ||
|
|
a49c6608c9 | ||
|
|
9903bc8d36 | ||
|
|
aa4db785f2 | ||
|
|
00e27503ce | ||
|
|
f7e3a5ad85 | ||
|
|
3cade6245e | ||
|
|
d7aee3b7b6 | ||
|
|
64fdc4f24b | ||
|
|
295aa3d60d | ||
|
|
1d0452c41e | ||
|
|
96a5e64bb8 | ||
|
|
595e684658 | ||
|
|
21dc07c40a | ||
|
|
cda363a15e | ||
|
|
9f44452834 | ||
|
|
7a50dbc00d | ||
|
|
3162d378ff | ||
|
|
d129ac1b37 | ||
|
|
1ea529b9c1 | ||
|
|
5ffabd56eb | ||
|
|
d0e1166cce | ||
|
|
5b75a018b7 | ||
|
|
c75b560604 | ||
|
|
a2cda631d9 | ||
|
|
a7b0b390cd | ||
|
|
9ff2d34bf8 | ||
|
|
92ad973729 | ||
|
|
0be8b22d3c | ||
|
|
4e1f2f89f6 | ||
|
|
ac32ed74b4 | ||
|
|
89f9902053 | ||
|
|
c6f7ea9f22 | ||
|
|
747b2b9bf4 | ||
|
|
23bdc1556d | ||
|
|
ec03e46ffa | ||
|
|
47edbd9220 | ||
|
|
00c83e9ca6 | ||
|
|
832321f55d | ||
|
|
941a09b6ac | ||
|
|
16787c94af | ||
|
|
28d83b42e1 | ||
|
|
23c5266076 | ||
|
|
0673f335e1 | ||
|
|
1c9ccce520 | ||
|
|
9c021158e5 | ||
|
|
254d352fca | ||
|
|
baa101253a | ||
|
|
a333bba725 | ||
|
|
ac7ee4b94a | ||
|
|
2230ef6e09 | ||
|
|
24eaf2d7e0 | ||
|
|
f4196d394b | ||
|
|
ebdf8b6b1a | ||
|
|
59f9bb2120 | ||
|
|
f339a39654 | ||
|
|
a3d88aebed | ||
|
|
d5bc5547ee | ||
|
|
f8065da48f | ||
|
|
127fb9860c | ||
|
|
c5179cffb4 | ||
|
|
0d8c81b2a6 | ||
|
|
856013cc0f | ||
|
|
0b6c2d893e | ||
|
|
b6d857f1d6 | ||
|
|
2e235aff03 | ||
|
|
87992f3669 | ||
|
|
64ebec50dc | ||
|
|
e3b02757d3 | ||
|
|
70325a6a0f | ||
|
|
d81de7f521 | ||
|
|
deff538909 | ||
|
|
a9a78f2831 | ||
|
|
10f7bbee32 | ||
|
|
b49a0e39d5 | ||
|
|
53f77dfadf | ||
|
|
937dca4432 | ||
|
|
bbe0ffb2fa | ||
|
|
1bad8f1b17 | ||
|
|
5f06f42ccd | ||
|
|
e5edbf9d35 | ||
|
|
865071a946 | ||
|
|
329f5b4df9 | ||
|
|
dcdaa2025f | ||
|
|
0400783444 | ||
|
|
768a1d2713 | ||
|
|
711fb26ae5 | ||
|
|
7f15968ce7 | ||
|
|
262ff9584c | ||
|
|
af4c62b422 | ||
|
|
4a6f625f86 | ||
|
|
e0c71344ed | ||
|
|
42a336f8bc | ||
|
|
a0badf572e | ||
|
|
a358b72ec8 | ||
|
|
6e8dcba698 | ||
|
|
9d6b2ebf50 | ||
|
|
dc8d8cb39c | ||
|
|
509e1ab053 | ||
|
|
e9dadacf7b | ||
|
|
6a514a1e8e | ||
|
|
1ea78cdd69 | ||
|
|
303ddb862a | ||
|
|
f3d64b7115 | ||
|
|
98382fcea5 | ||
|
|
629c039eed | ||
|
|
2a7f1091ce | ||
|
|
3d4aa015a8 | ||
|
|
6b53431116 | ||
|
|
e45c4d6aa3 | ||
|
|
7b512742f4 | ||
|
|
b065a60dd0 | ||
|
|
ae3504594c | ||
|
|
edc671edea | ||
|
|
50688f03fb | ||
|
|
98814e1c47 | ||
|
|
23d1801022 | ||
|
|
c2342c3528 | ||
|
|
96cf556139 | ||
|
|
31fdaea269 | ||
|
|
1c48817a47 | ||
|
|
0d52eaa875 | ||
|
|
5ebef425ce | ||
|
|
5dfa152ba2 | ||
|
|
1c4f672eae | ||
|
|
1bcd47e65f | ||
|
|
1465fc0632 | ||
|
|
07a61057ba | ||
|
|
39fcb5b5f8 | ||
|
|
bb5717c5b3 | ||
|
|
f3155af444 | ||
|
|
ab61c09bff | ||
|
|
a087a653cd | ||
|
|
b65ab21733 | ||
|
|
37df0c1f22 | ||
|
|
7f8ca85e69 | ||
|
|
f64649933f | ||
|
|
68da497f35 | ||
|
|
afd865d8dd | ||
|
|
0832a60db3 | ||
|
|
cb4cd76086 | ||
|
|
54f75ebbfe | ||
|
|
454984376c | ||
|
|
0369929ffc | ||
|
|
6134bff81b | ||
|
|
b2c670fd94 | ||
|
|
530e92e653 | ||
|
|
cb7817093f | ||
|
|
9114a14eca | ||
|
|
3874f4a097 | ||
|
|
01e4b0c067 | ||
|
|
bdd0517a5b | ||
|
|
3dc49fd1c6 | ||
|
|
849ac80e90 | ||
|
|
7126a5e5a7 | ||
|
|
c061656659 | ||
|
|
25a7ceabdb | ||
|
|
9b6d2da9bf | ||
|
|
709d037b8e | ||
|
|
102c9595f2 | ||
|
|
4718b8ad02 | ||
|
|
efc3873149 | ||
|
|
6c2438deae | ||
|
|
b258cc85bf | ||
|
|
19f840a9b5 | ||
|
|
83a4e8559c | ||
|
|
b24b0f385f | ||
|
|
690ed531b6 | ||
|
|
27943f9e31 | ||
|
|
1ee648ecd2 | ||
|
|
6b4166e67f | ||
|
|
0138c0b55b | ||
|
|
8431af2bff | ||
|
|
f83bc0aa13 | ||
|
|
4d8e7cdb30 | ||
|
|
2d74c2042a | ||
|
|
e585c37d7d | ||
|
|
1803f672f8 | ||
|
|
74e5199808 | ||
|
|
441ee3e53f | ||
|
|
a63491e6eb | ||
|
|
3a88cfd992 | ||
|
|
0f2ee414db | ||
|
|
0f14e0e978 | ||
|
|
5a98c83eef | ||
|
|
752a1e76ab | ||
|
|
ce9a4afe95 | ||
|
|
e0df35e6b5 | ||
|
|
289c5dcccb | ||
|
|
98f83dc756 | ||
|
|
0550f30790 | ||
|
|
077eeaa0f4 | ||
|
|
12417d087b | ||
|
|
a5a143f944 | ||
|
|
cf1e19d167 | ||
|
|
1cea1687f3 | ||
|
|
f786cc5145 | ||
|
|
049e8d5963 | ||
|
|
993802c404 | ||
|
|
ff6518c0a8 | ||
|
|
8ccfdaca02 | ||
|
|
e7519c50b6 | ||
|
|
c1aac3a0c9 | ||
|
|
43d0391d82 | ||
|
|
fc9f8d27eb | ||
|
|
d0282e5ba8 | ||
|
|
1d150e41b6 | ||
|
|
55595d444d | ||
|
|
2142beb2e5 | ||
|
|
c497a491f4 | ||
|
|
b11551c767 | ||
|
|
441e822fb3 | ||
|
|
47c19aa2b3 | ||
|
|
4a5dee6356 | ||
|
|
0fcd1f4a49 | ||
|
|
48e264e4e1 | ||
|
|
8f09d2e790 | ||
|
|
b2a275891c | ||
|
|
bdd366b97c | ||
|
|
20964ca7dc | ||
|
|
b904ba0f29 | ||
|
|
4ede13e36a | ||
|
|
751cd1f533 | ||
|
|
4cffee3ca3 | ||
|
|
47e4e5f1db | ||
|
|
5681017d0c | ||
|
|
ab8b24fdba | ||
|
|
ab9f0f2c4f | ||
|
|
e81b946f06 | ||
|
|
967f951789 | ||
|
|
a3229b30ec | ||
|
|
798f34abcd | ||
|
|
31e329f143 | ||
|
|
9906e96ffb | ||
|
|
7116a8645c | ||
|
|
2dab109baa | ||
|
|
aa89bb71f9 | ||
|
|
814d908a8a | ||
|
|
4d4e692c81 | ||
|
|
4d9a5fef3b | ||
|
|
e9bd6ef9fe | ||
|
|
865055e07a | ||
|
|
2bd6dc02d6 | ||
|
|
40bbe58371 | ||
|
|
d33ca3d058 | ||
|
|
f19fa64e98 | ||
|
|
0f57818f2d | ||
|
|
aa93e1f21a | ||
|
|
27cb4db80e | ||
|
|
d1d143781e | ||
|
|
bd321d4b7c | ||
|
|
ac2d7ab14c | ||
|
|
94e18ce324 | ||
|
|
a022defe06 | ||
|
|
227951a4ec | ||
|
|
3f4636e916 | ||
|
|
602ca5dea6 | ||
|
|
fcfde7c2f5 | ||
|
|
a4709ba765 | ||
|
|
7e9c846ec3 | ||
|
|
9fd35c84ce | ||
|
|
8e7d1004cf | ||
|
|
32028902c3 | ||
|
|
bb93ea1be4 | ||
|
|
e110f5abce | ||
|
|
ac71cdc265 | ||
|
|
4762dfe797 | ||
|
|
af61f37b65 | ||
|
|
b9703fdf36 | ||
|
|
5e5045c4ee | ||
|
|
5639b8ca20 | ||
|
|
28e1614c2e | ||
|
|
86d0bc1af5 | ||
|
|
48b7a1e66e | ||
|
|
770adcfa15 | ||
|
|
624336f453 | ||
|
|
7b29c60c46 | ||
|
|
534f2d69c1 | ||
|
|
37874a6472 | ||
|
|
b9d351899a | ||
|
|
7010f92c4b | ||
|
|
6e0bcb80a2 | ||
|
|
4ff708cb3a | ||
|
|
9ca25118d0 | ||
|
|
b3f81eead5 | ||
|
|
776632c503 | ||
|
|
8061836e74 | ||
|
|
249f600ceb | ||
|
|
8d157a4520 | ||
|
|
ed6bbe012b | ||
|
|
4db68d704f | ||
|
|
bb5b1e19b0 | ||
|
|
47805e18f8 | ||
|
|
0be9fdb455 | ||
|
|
84ce3a6bea | ||
|
|
711703dcd1 | ||
|
|
a84e3d1b80 | ||
|
|
9201197878 | ||
|
|
814a2eaf8f | ||
|
|
d9b0b964be | ||
|
|
d13573c9cd | ||
|
|
786617e375 | ||
|
|
e6dfc991ae | ||
|
|
a89f4703df | ||
|
|
41b5d720e2 | ||
|
|
4ee3502c8f | ||
|
|
f5b5b9e8ec | ||
|
|
f088c6a850 | ||
|
|
cf87d3c700 | ||
|
|
e9805a0bcb | ||
|
|
51fd226a4d | ||
|
|
d80ef43c19 | ||
|
|
35cd545106 | ||
|
|
1fe0646d25 | ||
|
|
328ddda654 | ||
|
|
55991962be | ||
|
|
b9116d4050 | ||
|
|
15f94e5ee5 | ||
|
|
ea3217cd46 | ||
|
|
76b861d759 | ||
|
|
7360e9343a | ||
|
|
bdb452ed81 | ||
|
|
65ef774e8d | ||
|
|
a920b10483 | ||
|
|
ed8f1ca9cf | ||
|
|
ca6d00b862 | ||
|
|
23d21dd81c | ||
|
|
a7d7f36871 | ||
|
|
a5df89eef7 | ||
|
|
93db4f4535 | ||
|
|
f0d952d33a | ||
|
|
ad28da7eb4 | ||
|
|
288af0ddf6 | ||
|
|
e7d9db284e | ||
|
|
7c60853219 | ||
|
|
c6f694a247 | ||
|
|
4e6e02bc3e | ||
|
|
e3ddf6e81a | ||
|
|
899e0fcdbb | ||
|
|
35b1149d96 | ||
|
|
c80eda073f | ||
|
|
7d24f152d8 | ||
|
|
61225e685d | ||
|
|
d5c1c72a76 | ||
|
|
aaf018e5a0 | ||
|
|
583fc4ee2a | ||
|
|
55c3929359 | ||
|
|
c5713b5e98 | ||
|
|
be498d6280 | ||
|
|
b09b469dd5 | ||
|
|
319e2b5760 | ||
|
|
f139642e0f | ||
|
|
abb44cf564 | ||
|
|
ade76e53de | ||
|
|
cc4d3a215e | ||
|
|
d4f5821cd6 | ||
|
|
9aff30da0c | ||
|
|
78899fc241 | ||
|
|
7a342ecb93 | ||
|
|
0f8c3ed29a | ||
|
|
9720d21301 | ||
|
|
c2cec563dc | ||
|
|
9e8021d6a4 | ||
|
|
e7b22a0ed4 | ||
|
|
ab0fe1a7dd | ||
|
|
4fc000fe90 | ||
|
|
e0f68cda1e | ||
|
|
5d4e309dd3 | ||
|
|
6fd13879ae | ||
|
|
600429a067 | ||
|
|
e690471739 | ||
|
|
732bf89878 | ||
|
|
c58cc113dd | ||
|
|
014b739bac | ||
|
|
f8ad15fde8 | ||
|
|
167ecd8620 | ||
|
|
408751d5e0 | ||
|
|
12a244f24f | ||
|
|
f12285015a | ||
|
|
93f0012959 | ||
|
|
f6a799c7b3 | ||
|
|
82fb046013 | ||
|
|
2a7e1d459f | ||
|
|
464d98d178 | ||
|
|
ccf61eca84 | ||
|
|
ff4301a422 | ||
|
|
326d5b84e7 | ||
|
|
5edd5d1e1f | ||
|
|
9895e6d766 | ||
|
|
b3d7d33faf | ||
|
|
cf8541a7a7 | ||
|
|
cd3ec5a77b | ||
|
|
0737b1aecf | ||
|
|
e02b06672c | ||
|
|
0f5d457252 | ||
|
|
475041656c | ||
|
|
04a55c9188 | ||
|
|
6bcd4eb12d | ||
|
|
efeb6efe77 | ||
|
|
b7db91c46d | ||
|
|
0b0b822671 | ||
|
|
77f500b857 | ||
|
|
3642a12fc1 | ||
|
|
af214ff121 | ||
|
|
62b875f918 | ||
|
|
2c42526763 | ||
|
|
d64ab63026 | ||
|
|
f00b48f9a8 | ||
|
|
160c8be191 | ||
|
|
7aaa8bc8bd | ||
|
|
52a8bbefcf | ||
|
|
6241bcf0c8 | ||
|
|
9470554f63 | ||
|
|
f368c14a61 | ||
|
|
f2ce4a25a3 | ||
|
|
11f1392026 | ||
|
|
725ec68faa | ||
|
|
16ae9ee88b | ||
|
|
9b88c3e79b | ||
|
|
0652f19673 | ||
|
|
bb381e22b2 | ||
|
|
0d7736d663 | ||
|
|
40de135d4d | ||
|
|
dd0c5de4c7 | ||
|
|
832cb7e1ac | ||
|
|
7af99d03d3 | ||
|
|
bf850827f7 | ||
|
|
e0e406dbcc | ||
|
|
b2eda1af2f | ||
|
|
0ff57c640c | ||
|
|
3949d246df | ||
|
|
b7b303f4bf | ||
|
|
53abfdc2c3 | ||
|
|
8668571bee | ||
|
|
faacfe13c2 | ||
|
|
d47f29bd4c | ||
|
|
fe4c69b64a | ||
|
|
93097af0ed | ||
|
|
99f983d066 | ||
|
|
0074d63962 | ||
|
|
7622973a31 | ||
|
|
d57a668097 | ||
|
|
437978d349 | ||
|
|
a988f9304d | ||
|
|
21867c7fef | ||
|
|
d37bd33c31 | ||
|
|
b4f82d1081 | ||
|
|
f06602ff7e | ||
|
|
ee20f21a24 | ||
|
|
7714152013 | ||
|
|
5ad9257df4 | ||
|
|
62aa137548 | ||
|
|
37550e9d98 | ||
|
|
05eed72b69 | ||
|
|
df09532a9c | ||
|
|
59378db7de | ||
|
|
c8e348731f | ||
|
|
7a1fa2177c | ||
|
|
1df90aaf0e | ||
|
|
ac8083588b | ||
|
|
e79666a82b | ||
|
|
b20d5a7cc6 | ||
|
|
5641adb01b | ||
|
|
d8aeeb8ff6 | ||
|
|
2cf35267c4 | ||
|
|
6f60838736 | ||
|
|
ac466ecf74 | ||
|
|
3664beec29 | ||
|
|
13cf417a98 | ||
|
|
541a9f2b85 | ||
|
|
b119c14017 | ||
|
|
46763efb75 | ||
|
|
6a865a6146 | ||
|
|
dc14d4a13c | ||
|
|
e6055dce76 | ||
|
|
b4d48fdc91 | ||
|
|
af80653f3f | ||
|
|
a525cc06c1 | ||
|
|
914605c89c | ||
|
|
89490171ef | ||
|
|
c0005e939c | ||
|
|
1df6c7a46c | ||
|
|
5becda25c5 | ||
|
|
cb1cb72c76 | ||
|
|
e34aa1ff8f | ||
|
|
58f81f8e7e | ||
|
|
d45ab47139 | ||
|
|
9dcccc11ba | ||
|
|
cc822c1a05 | ||
|
|
cd791f1cba | ||
|
|
59508edf64 | ||
|
|
e84389c976 | ||
|
|
19b7be067c | ||
|
|
d04561805b | ||
|
|
71526fa5ce | ||
|
|
56595a4c9c | ||
|
|
211ff67440 | ||
|
|
c6ffa7f38d | ||
|
|
519cc1bc67 | ||
|
|
4134c6398a | ||
|
|
9188ce1a8d | ||
|
|
51ae13fc8c | ||
|
|
5449088a8e | ||
|
|
fc6a0937b8 | ||
|
|
a1ad01e4ab | ||
|
|
f8498d8a52 | ||
|
|
e854eb933d | ||
|
|
8924c0f1ec | ||
|
|
203d260a41 | ||
|
|
0076e1e792 | ||
|
|
a3ec573984 | ||
|
|
ff55601dc3 | ||
|
|
b90dff020e | ||
|
|
43aba9f918 | ||
|
|
1ac629f919 | ||
|
|
5d81d7cefe | ||
|
|
895f64fbab | ||
|
|
b7dfbb6af5 | ||
|
|
c83c2a5022 | ||
|
|
6b945eb548 | ||
|
|
0322348924 | ||
|
|
72d791a736 | ||
|
|
719615a6b6 | ||
|
|
273cbe931e | ||
|
|
df48ef6df3 | ||
|
|
acbe84c8ef | ||
|
|
b82c0978cc | ||
|
|
d0ef7b6588 | ||
|
|
1952982c01 | ||
|
|
d52b908627 | ||
|
|
438835f6a5 | ||
|
|
f9400b6a3c | ||
|
|
7cd72de8bc | ||
|
|
806d64e1bf | ||
|
|
e3fd0519b3 | ||
|
|
e3ff27c95a | ||
|
|
98f614ddb1 | ||
|
|
087fe0e9d6 | ||
|
|
b198f321c8 | ||
|
|
15efe8d839 | ||
|
|
1e57c6e6e3 | ||
|
|
a9c259c77a | ||
|
|
55b8547f04 | ||
|
|
b7a9481e01 | ||
|
|
139b7196a0 | ||
|
|
24706aedbd | ||
|
|
d0dd1a387e | ||
|
|
f307ff68f7 | ||
|
|
74746c6573 | ||
|
|
10bbed7f69 | ||
|
|
178dcd6fd8 | ||
|
|
4564ad2920 | ||
|
|
50e4545255 | ||
|
|
43d6e9fa43 | ||
|
|
5e9898600b | ||
|
|
f2d93f61c3 | ||
|
|
7c5e6900e1 | ||
|
|
7e72768433 | ||
|
|
81b9c7c6ee | ||
|
|
ddded80ff3 | ||
|
|
8683d4abfd | ||
|
|
0ca6abce72 | ||
|
|
e942b352c6 | ||
|
|
41ea2d8c31 | ||
|
|
be3c4a7930 | ||
|
|
f28f191ebf | ||
|
|
a628d77798 | ||
|
|
6509dc04f5 | ||
|
|
2277c6dffc | ||
|
|
1834d86df5 | ||
|
|
a6b0223eea | ||
|
|
1b9fc64d8a | ||
|
|
f57ce2b40a | ||
|
|
ebfdf740bc | ||
|
|
5f18f5bb90 | ||
|
|
5221e2d991 | ||
|
|
02bbc51195 | ||
|
|
a8aca59c04 | ||
|
|
4c16661153 | ||
|
|
d683f98019 | ||
|
|
dc65788511 | ||
|
|
a18d16fb8b | ||
|
|
62e4e05a19 | ||
|
|
c0d5b57cf9 | ||
|
|
665e45e0ba | ||
|
|
455dabb183 | ||
|
|
ee7558a622 | ||
|
|
1f48eaf03a | ||
|
|
d49d40f7b0 | ||
|
|
b72fd7ea9c | ||
|
|
b2e1f77f58 | ||
|
|
9a209012b5 | ||
|
|
39578a5919 | ||
|
|
8cbb5350ad | ||
|
|
04e4eb35be | ||
|
|
ddd9d9032a | ||
|
|
c3f09e2b1b | ||
|
|
f98999ca20 | ||
|
|
f362dab7be | ||
|
|
0b4aedf13e | ||
|
|
661c3cfc99 | ||
|
|
25c4c2f24e | ||
|
|
da1bda493e | ||
|
|
e9cf46a9a5 | ||
|
|
66d0221077 | ||
|
|
9c288a682d | ||
|
|
149e9b733e | ||
|
|
53124ca6b7 | ||
|
|
bd6d144cdb | ||
|
|
5288c399ce | ||
|
|
4e8d9fe59b | ||
|
|
3819f79945 | ||
|
|
df1e51258a | ||
|
|
ebc9a8a0b0 | ||
|
|
4ff59d178d | ||
|
|
bd2b44c4ed | ||
|
|
bafcd084cc | ||
|
|
6fc4d4c3b7 | ||
|
|
9aaa056286 | ||
|
|
48e2f90304 | ||
|
|
07eb213046 | ||
|
|
5e13fe989f | ||
|
|
938a49f989 | ||
|
|
9e7e8e229c | ||
|
|
6c62732ae1 | ||
|
|
f5092e92a4 | ||
|
|
4e5941fa57 | ||
|
|
7fc4f7b815 | ||
|
|
97493dc62a | ||
|
|
13d725d24d | ||
|
|
58521fb0eb | ||
|
|
ed2c2bcd17 | ||
|
|
7d7404157a | ||
|
|
6ed2bf631d | ||
|
|
514223f960 | ||
|
|
1452e41ead | ||
|
|
de78b61d35 | ||
|
|
6a312fae80 | ||
|
|
f412267766 | ||
|
|
1803c27afb | ||
|
|
86e0b9eb05 | ||
|
|
7f117bfc60 | ||
|
|
12e0581f24 | ||
|
|
252f31b6f1 | ||
|
|
bcf630d8d1 | ||
|
|
c44b5fd13a | ||
|
|
a7a5607c1b | ||
|
|
d5a34afa56 | ||
|
|
712aaa26d5 | ||
|
|
1a1375964f | ||
|
|
4bb17a55ac | ||
|
|
787d522036 | ||
|
|
b590ae4875 | ||
|
|
ce74e4b3e4 | ||
|
|
356b582a9f | ||
|
|
b73744f9e7 | ||
|
|
b39ab3db37 | ||
|
|
34d521234d | ||
|
|
73ac213cdd | ||
|
|
b71a755a30 | ||
|
|
c353eaa146 | ||
|
|
c7acd5c45b | ||
|
|
7c3d52cd6b | ||
|
|
2405ccb7ef | ||
|
|
282c39e3d0 | ||
|
|
d277e93f4d | ||
|
|
f01f0d1956 | ||
|
|
7d8c38693f | ||
|
|
a06010e08a | ||
|
|
4c00ddae56 | ||
|
|
6282655d77 | ||
|
|
98233b1de0 | ||
|
|
eb1a368277 | ||
|
|
7a569ad4d0 | ||
|
|
847e4ced11 | ||
|
|
7e95ee9e4b | ||
|
|
d63e0f6d98 | ||
|
|
9c218381c5 | ||
|
|
896162b722 | ||
|
|
c96844fae2 | ||
|
|
02d400e413 | ||
|
|
20fbb751f1 | ||
|
|
d5f5203880 | ||
|
|
2386c147ad | ||
|
|
c4090b1375 | ||
|
|
85a7f8c5b4 | ||
|
|
79635f8e94 | ||
|
|
843a19102c | ||
|
|
18821f29d5 | ||
|
|
15bea5043c | ||
|
|
61e3f119f4 | ||
|
|
3d0ead7dcb | ||
|
|
465c6d9230 | ||
|
|
ffb418b226 | ||
|
|
acd76e8609 | ||
|
|
bbbfb0015b | ||
|
|
ef8ce2e2e5 | ||
|
|
f9961ddebb | ||
|
|
3348a7d223 | ||
|
|
2435c6082a | ||
|
|
ae7ae89bb3 | ||
|
|
3f129b6574 | ||
|
|
5bf635cec2 | ||
|
|
1ab3521351 | ||
|
|
f1162243f6 | ||
|
|
832be5dd36 | ||
|
|
7cf1befbec | ||
|
|
69bd636f22 | ||
|
|
1d574b0f6a | ||
|
|
3eacc3bfce | ||
|
|
2b628553d3 | ||
|
|
05cd483413 | ||
|
|
f4b198a9f5 | ||
|
|
e3278f22f3 | ||
|
|
f9992c5f33 | ||
|
|
3648bce886 | ||
|
|
6091e6300a | ||
|
|
41a3fbceac | ||
|
|
47d19bab40 | ||
|
|
c590e8ac05 | ||
|
|
75927e17dd | ||
|
|
fe6ba4fd70 | ||
|
|
584c86bed1 | ||
|
|
54abf3aeba | ||
|
|
dcc39421c5 | ||
|
|
66338ed515 | ||
|
|
ff482a3247 | ||
|
|
f055f7c535 | ||
|
|
841c8ce0d9 | ||
|
|
3c3a956a17 | ||
|
|
565a0e11ed | ||
|
|
4f5e197c80 | ||
|
|
713157f712 | ||
|
|
5949c24afc | ||
|
|
dbea6f0022 | ||
|
|
8bca3fcf2c | ||
|
|
ca0f47985b | ||
|
|
0693767efa | ||
|
|
1c3a1ab2c6 | ||
|
|
8ac52aedff | ||
|
|
dbee0e9c54 | ||
|
|
068c303742 | ||
|
|
ec3f29a33a | ||
|
|
eed7c2fe2f | ||
|
|
6172cd2528 | ||
|
|
94948d3dcb | ||
|
|
14573cb823 | ||
|
|
a3052da703 | ||
|
|
b7b0021b5c | ||
|
|
94d3153fb6 | ||
|
|
ca1a3476cb | ||
|
|
91c3b8e3ca | ||
|
|
4cdf7a1b93 | ||
|
|
72876d9045 | ||
|
|
8d036e94bf | ||
|
|
70b3f4ded5 | ||
|
|
01fd3f904f | ||
|
|
50e1bf57b9 | ||
|
|
18dd5cb46a | ||
|
|
bf3cd8e5aa | ||
|
|
37d3c7288f | ||
|
|
7496e1cd67 | ||
|
|
060b360be3 | ||
|
|
6b1c4dec46 | ||
|
|
85f0556118 | ||
|
|
cff502c6d4 | ||
|
|
53af7cad0a | ||
|
|
beffcd856b | ||
|
|
123ecfe613 | ||
|
|
2d2d9da9f2 | ||
|
|
a07c4af393 | ||
|
|
7ad5208267 | ||
|
|
6b05d5d65d | ||
|
|
8e044ea898 | ||
|
|
293b890940 | ||
|
|
2563e32aa3 | ||
|
|
d9bbe0ff02 | ||
|
|
d577b3c21e | ||
|
|
89a2161cac | ||
|
|
75efa3cdac | ||
|
|
cdd5056aba | ||
|
|
c97c393c4a | ||
|
|
12344085c0 | ||
|
|
12c595c61f | ||
|
|
23bb40d0ea | ||
|
|
9958f5e322 | ||
|
|
59152f2671 | ||
|
|
c9817105fb | ||
|
|
e6a114b853 | ||
|
|
b97bb14a7a | ||
|
|
54069823a0 | ||
|
|
f6505c8ee2 | ||
|
|
93dcc22aae | ||
|
|
451a942e95 | ||
|
|
b4715b29bb | ||
|
|
34b73426e5 | ||
|
|
4078f2672e | ||
|
|
a2e412c0ce | ||
|
|
d59d9b5973 | ||
|
|
ee240d21b9 | ||
|
|
be051c890f | ||
|
|
ee444d7d07 | ||
|
|
c8e096785f | ||
|
|
8778e12342 | ||
|
|
2747ab7643 | ||
|
|
586b334c2a | ||
|
|
87b16ed5f6 | ||
|
|
8fca85042b | ||
|
|
25cf7dee40 | ||
|
|
66f1da762f | ||
|
|
26fa08548c | ||
|
|
944920176f | ||
|
|
0f4d3e1bca | ||
|
|
1eeef30097 | ||
|
|
c014f8dc78 | ||
|
|
d068470e18 | ||
|
|
ba91bca1eb | ||
|
|
0bcb64403c | ||
|
|
05ef9b2f55 | ||
|
|
2aef83ddcd | ||
|
|
23cffb2c21 | ||
|
|
9223261ea9 | ||
|
|
d25231aea8 | ||
|
|
7ebfae27e3 | ||
|
|
f5a1fabd38 | ||
|
|
3f77d6a551 | ||
|
|
38983fdfa9 | ||
|
|
8196ced2de | ||
|
|
0ebaea94be | ||
|
|
e1d65b8937 | ||
|
|
ca5da026d6 | ||
|
|
a61c91ae9e | ||
|
|
1d8ad7cf71 | ||
|
|
95963121b0 | ||
|
|
7b99c26e80 | ||
|
|
3ac76f0489 | ||
|
|
b2a4b6f34e | ||
|
|
b8e4b993d6 | ||
|
|
6341aefda3 | ||
|
|
0f386d06a1 | ||
|
|
081e4506ca | ||
|
|
ca084dcfe8 | ||
|
|
604bdf0b43 | ||
|
|
b7796bcce6 | ||
|
|
318356b6bc | ||
|
|
d2f211c7e1 | ||
|
|
9d12788a9a | ||
|
|
1769f43226 | ||
|
|
f218405c36 | ||
|
|
155765646e | ||
|
|
7183a586d9 | ||
|
|
c7825e6719 | ||
|
|
1461ee4d36 | ||
|
|
9e9e578234 | ||
|
|
8033bc87ea | ||
|
|
d6a16525c2 | ||
|
|
f6b604ff49 | ||
|
|
7fbf40c20c | ||
|
|
da601d5114 | ||
|
|
20fc66f875 | ||
|
|
750256948e | ||
|
|
d527c46481 | ||
|
|
848dd740ba | ||
|
|
04a9962cb5 | ||
|
|
334777c201 | ||
|
|
8c73017a69 | ||
|
|
62d2a65025 | ||
|
|
09ee5a5da1 | ||
|
|
efeea9bccf | ||
|
|
e61e54acfd | ||
|
|
0a280f00c2 | ||
|
|
f2ad1ceb13 | ||
|
|
9c87786464 | ||
|
|
fdef32ce77 | ||
|
|
7924e0d819 | ||
|
|
5c0e5c599f | ||
|
|
dd6efe96e7 | ||
|
|
6429b8bfb8 | ||
|
|
e604f76703 | ||
|
|
9d8e3d4d6f | ||
|
|
2526e2d32e | ||
|
|
d858f44b35 | ||
|
|
c3d1671b6d | ||
|
|
778466a2ed | ||
|
|
42f35491e0 | ||
|
|
0309a5f3af | ||
|
|
9434b81a82 | ||
|
|
6b35951e92 | ||
|
|
012f577bb0 | ||
|
|
4be98221f6 | ||
|
|
1fb3c4055d | ||
|
|
f7aac7a5b0 | ||
|
|
de122c9bbe | ||
|
|
4581957d93 | ||
|
|
bd1ced14e7 | ||
|
|
8c2cfaa907 | ||
|
|
69641f1420 | ||
|
|
825c2c3dc4 | ||
|
|
f1942f6ec0 | ||
|
|
5e777601f3 | ||
|
|
0cc524b84f | ||
|
|
33f6d77281 | ||
|
|
5a7c0216f7 | ||
|
|
6039893981 | ||
|
|
8664b8e97b | ||
|
|
5c6e82743e | ||
|
|
0b47558a09 | ||
|
|
bb4a252567 | ||
|
|
67f8ba6fed | ||
|
|
19e21a8f10 | ||
|
|
05995d1fd6 | ||
|
|
29c12905f5 | ||
|
|
1432d44eed | ||
|
|
94397dbdb4 | ||
|
|
17cd1a4f26 | ||
|
|
dfcd437486 | ||
|
|
3f678b0be5 | ||
|
|
4d1a662571 | ||
|
|
08434b3605 | ||
|
|
cd09e35f90 | ||
|
|
c5be59ddfe | ||
|
|
af5a7a2925 | ||
|
|
33d54c0d5a | ||
|
|
403eefd272 | ||
|
|
bc93ac53b5 | ||
|
|
d2072f9ace | ||
|
|
c8e476ad60 | ||
|
|
9a3ee3be53 | ||
|
|
9d9e2deb9b | ||
|
|
823178c272 | ||
|
|
6715fd159c | ||
|
|
9e49f154d8 | ||
|
|
8bdb3d9970 | ||
|
|
587d4a6373 | ||
|
|
fecf808d80 | ||
|
|
66bfad3ced | ||
|
|
1bcc5c98a9 | ||
|
|
c3ff53a61c | ||
|
|
4575978a1f | ||
|
|
274934ad81 | ||
|
|
179d6c4ed1 | ||
|
|
36dfbaea8c | ||
|
|
263d7d37af | ||
|
|
24ce8beb48 | ||
|
|
4cc103958e | ||
|
|
0fbb26c28f | ||
|
|
a26b57a36d | ||
|
|
059f575d93 | ||
|
|
a67830bf67 | ||
|
|
03df3f4a88 | ||
|
|
c6be989fca | ||
|
|
13d8dc0b79 | ||
|
|
dc21e2e691 | ||
|
|
fa533846a7 | ||
|
|
af4bcb629a | ||
|
|
d7172a4558 | ||
|
|
03dbe16ccc | ||
|
|
f085199f5b | ||
|
|
d78086ccdc | ||
|
|
9c5086e6af | ||
|
|
0745d48993 | ||
|
|
e7aba49c49 | ||
|
|
5ea5d71258 | ||
|
|
5d2519ed50 | ||
|
|
d2d71caa3b | ||
|
|
8cc0b4bf5e | ||
|
|
3129fd06f0 | ||
|
|
9479ec32f7 | ||
|
|
a7f1021265 | ||
|
|
2971b48a12 | ||
|
|
9624c90cfb | ||
|
|
a6f682d860 | ||
|
|
f3e4e6c68f | ||
|
|
f9f20bb454 | ||
|
|
eb3a3d249e | ||
|
|
535018ef0e | ||
|
|
528c9885f2 | ||
|
|
c8e30b6639 | ||
|
|
3e5620283e | ||
|
|
92c35d14a4 | ||
|
|
f13fbafe31 | ||
|
|
5873b0b032 | ||
|
|
77f637763c | ||
|
|
535eeace5f | ||
|
|
3914bcfbb1 | ||
|
|
922b597f94 | ||
|
|
0fa7d86918 | ||
|
|
eecfcd124d | ||
|
|
a0d782e46e | ||
|
|
fd9f067a48 | ||
|
|
4268c1f1a5 | ||
|
|
579e4396e2 | ||
|
|
fb579212ea | ||
|
|
1fe195926f | ||
|
|
fc39c925ca | ||
|
|
a9c5d524bb | ||
|
|
f499cecf0d | ||
|
|
5bc2fb022c | ||
|
|
534c105a7a | ||
|
|
4af9908764 | ||
|
|
8f0aedeead | ||
|
|
6fdb0bec07 | ||
|
|
d4974ea719 | ||
|
|
d493cafc4a | ||
|
|
4e58f9387a | ||
|
|
2d98bb39bd | ||
|
|
e3660bca25 | ||
|
|
ab792d004c | ||
|
|
f89eb8bf35 | ||
|
|
4bd1e55093 | ||
|
|
52a7a8cb26 | ||
|
|
6285776943 | ||
|
|
18c9182903 | ||
|
|
2e27e3ba04 | ||
|
|
337361d588 | ||
|
|
8119e511a1 | ||
|
|
6132cf900b | ||
|
|
21993b75f4 | ||
|
|
8efa3455c2 | ||
|
|
e85eca2630 | ||
|
|
940c59d9da | ||
|
|
e1942715ce | ||
|
|
ee5e46b46b | ||
|
|
fd945d1070 | ||
|
|
3334163e73 | ||
|
|
70ce4f5b36 | ||
|
|
9ac348ef7b | ||
|
|
5e2582a31b | ||
|
|
7682751646 | ||
|
|
96a1c6540e | ||
|
|
f59a7e8b07 | ||
|
|
3765e67434 | ||
|
|
6f8b8c394d | ||
|
|
0c035c0a7a | ||
|
|
3db1a80b4c | ||
|
|
f8b8cbfc53 | ||
|
|
c2b319360d | ||
|
|
202d3ab3c9 | ||
|
|
fdbc733376 | ||
|
|
128eed6b57 | ||
|
|
27952648cf | ||
|
|
eb08aeab7d | ||
|
|
d98b9d54f1 | ||
|
|
c1b99c43b6 | ||
|
|
0b154c2d71 | ||
|
|
bc58e678bd | ||
|
|
c942ca130f | ||
|
|
e349b1c920 | ||
|
|
659d06d9b9 | ||
|
|
e44fccf3d2 | ||
|
|
f8aa52346f | ||
|
|
842466f4d9 | ||
|
|
1165c26ab4 | ||
|
|
eae543adf3 | ||
|
|
8837cd3b53 | ||
|
|
eb7840dabb | ||
|
|
e5d73f68c8 | ||
|
|
eefe3f595a | ||
|
|
180f9a4c22 | ||
|
|
c4bb458763 | ||
|
|
6b02b89ab4 | ||
|
|
1579091c20 | ||
|
|
e8e81d3609 | ||
|
|
290466578f | ||
|
|
fec52e61ea | ||
|
|
17abb94532 | ||
|
|
97e9c95f47 | ||
|
|
59e97e5e52 | ||
|
|
2351592abf | ||
|
|
d74efd9d46 | ||
|
|
7084f3647a | ||
|
|
1c3df51f87 | ||
|
|
bf610d87f7 | ||
|
|
d34364a086 | ||
|
|
ead6bb267d | ||
|
|
a3dc1e461b | ||
|
|
b6095fd084 | ||
|
|
1088846cae | ||
|
|
05f4033a34 | ||
|
|
585a8a96b4 | ||
|
|
7085781c71 | ||
|
|
369fb2806d | ||
|
|
a589456a14 | ||
|
|
601b2d9f51 | ||
|
|
79f49040f1 | ||
|
|
a6bec53905 | ||
|
|
5c3ec6306f | ||
|
|
a7c41d28af | ||
|
|
1005f225f3 | ||
|
|
d9303b2137 | ||
|
|
f96d2a5b4a | ||
|
|
dca0c3d02a | ||
|
|
7501e40e0b | ||
|
|
dc6fa04f68 | ||
|
|
e5aa453293 | ||
|
|
6899ed2026 | ||
|
|
a38b9da672 | ||
|
|
5b2fd3ad86 | ||
|
|
93adb7e944 | ||
|
|
9cd66f6f77 | ||
|
|
977cfa4494 | ||
|
|
39e1726498 | ||
|
|
b714cfd4f0 | ||
|
|
00e2f6da8f | ||
|
|
71d8c6f742 | ||
|
|
a80b1e6d5f | ||
|
|
fd2bc3a212 | ||
|
|
4cc83b6330 | ||
|
|
f0be92259b | ||
|
|
1ea9a36d11 | ||
|
|
92e513e76e | ||
|
|
6920b7fe91 | ||
|
|
d472934a70 | ||
|
|
ec13aa0dc1 | ||
|
|
3d153486da | ||
|
|
5c15f6f64b | ||
|
|
68108789d0 | ||
|
|
fac0e63058 | ||
|
|
42b5ccafc9 | ||
|
|
ca4d6f4470 | ||
|
|
522df57a45 | ||
|
|
c9aa68ef7a | ||
|
|
9e19f004d0 | ||
|
|
839255eed4 | ||
|
|
305f277843 | ||
|
|
523feeee3c | ||
|
|
9dfa5ba3a5 | ||
|
|
f2c5740d06 | ||
|
|
2c5436e315 | ||
|
|
b8cc61262f | ||
|
|
57ed063ba1 | ||
|
|
06324df072 | ||
|
|
27c487bab7 | ||
|
|
ebb1a7dc1f | ||
|
|
5ccf8c2c33 | ||
|
|
ef2a2eb984 | ||
|
|
abc9b52692 | ||
|
|
5535a047d7 | ||
|
|
bae8d0a4bd | ||
|
|
02859eb2b1 | ||
|
|
3d75490b6e | ||
|
|
93bc1b17f9 | ||
|
|
f0de56a797 | ||
|
|
81d629bc47 | ||
|
|
45bde333d5 | ||
|
|
475ccfad62 | ||
|
|
fdaa374490 | ||
|
|
77b4f23edc | ||
|
|
1204f2fca8 | ||
|
|
d4be970c8b | ||
|
|
39a5e3ca6e | ||
|
|
74e1573b14 | ||
|
|
2d84bcb4cd | ||
|
|
eaf1c0954e | ||
|
|
ce02c6cee2 | ||
|
|
cbe4bf2ba8 | ||
|
|
e139c1d9d9 | ||
|
|
21e1148d98 | ||
|
|
a49478cefa | ||
|
|
bcbd2ff21c | ||
|
|
d2f20803ba | ||
|
|
6dcb85927a | ||
|
|
e96468566d | ||
|
|
a85cd042d8 | ||
|
|
91bb0f5439 | ||
|
|
b2b7c583eb | ||
|
|
82cafc9b19 | ||
|
|
65a2903aab | ||
|
|
d3add3c34f | ||
|
|
f1eaed7e98 | ||
|
|
19b24a349c | ||
|
|
4a5f135c5d | ||
|
|
89964ec30d | ||
|
|
cd36809c06 | ||
|
|
3cd9a92dcc | ||
|
|
80c6f98d2f | ||
|
|
b0d8ba3894 | ||
|
|
70586d3a6c | ||
|
|
8babf55b18 | ||
|
|
948c3f580b | ||
|
|
3218c4b33f | ||
|
|
179095c387 | ||
|
|
42be684e69 | ||
|
|
340d827dc1 | ||
|
|
7de605c5c3 | ||
|
|
e5a5273edb | ||
|
|
98c6c6f1aa | ||
|
|
caa87d5fe1 | ||
|
|
ad1c061e7b | ||
|
|
4e479caf61 | ||
|
|
cf9ac4c847 | ||
|
|
f7de453da8 | ||
|
|
828cc71847 | ||
|
|
94f2e82897 | ||
|
|
881e5a48bc | ||
|
|
d4c210f21b | ||
|
|
44c8f29e47 | ||
|
|
ed0e6afacb | ||
|
|
9817976375 | ||
|
|
a7bb1fc322 | ||
|
|
f990ebfb09 | ||
|
|
056efaba91 | ||
|
|
a23021b823 | ||
|
|
5519054f50 | ||
|
|
3ae3bf5d33 | ||
|
|
01e8813286 | ||
|
|
cb60001784 | ||
|
|
c0e917ea83 | ||
|
|
ab99a80793 | ||
|
|
84d0bc5c17 | ||
|
|
a2ba0aaaac | ||
|
|
be37c38aa2 | ||
|
|
ba22857f93 | ||
|
|
1a349c7522 | ||
|
|
9821ec2afd | ||
|
|
96d52649b8 | ||
|
|
2b1c2a0db9 | ||
|
|
8b81c0e88f | ||
|
|
e7307af42d | ||
|
|
439e28783b | ||
|
|
3a75342508 | ||
|
|
c1bb3278d4 | ||
|
|
c0497234b9 | ||
|
|
cdf4ed87a1 | ||
|
|
8916acf083 | ||
|
|
8873c583d3 | ||
|
|
dc02d0720d | ||
|
|
052aa23efe | ||
|
|
7a42132002 | ||
|
|
10a71e332d | ||
|
|
4fa8053638 | ||
|
|
a210f80adc | ||
|
|
253d0f9671 | ||
|
|
535b70057e | ||
|
|
021c4ccf5f | ||
|
|
fe02241044 | ||
|
|
67e0238c89 | ||
|
|
750a16ad38 | ||
|
|
b6546ea33a | ||
|
|
8ff49d6b46 | ||
|
|
f69e02ef04 | ||
|
|
31450d9d6b | ||
|
|
9736a21de2 | ||
|
|
2bf11da5ab | ||
|
|
66e16af29d | ||
|
|
eb6dec03bd | ||
|
|
44e4f853c8 | ||
|
|
c6e6365e15 | ||
|
|
41b7f16ab8 | ||
|
|
ec4bfb0054 | ||
|
|
de462f2b8a | ||
|
|
b7573c6e69 | ||
|
|
8be146642f | ||
|
|
6a2a10a154 | ||
|
|
371969b531 | ||
|
|
ae9232962e | ||
|
|
f7eeae8424 | ||
|
|
8aad29fb6e | ||
|
|
1620738701 | ||
|
|
0f79fb9821 | ||
|
|
ce2b4bc20c | ||
|
|
3358caed14 | ||
|
|
720bc7c00b | ||
|
|
274809aced | ||
|
|
ff55088491 | ||
|
|
d4415dcf59 | ||
|
|
d6265df962 | ||
|
|
c6f74ba887 | ||
|
|
16409eb233 | ||
|
|
82ecaa767e | ||
|
|
54358fbe28 | ||
|
|
c28e08c849 | ||
|
|
de8fee6aea | ||
|
|
448d482d3c | ||
|
|
108d0df565 | ||
|
|
18e396b102 | ||
|
|
c9be936d4a | ||
|
|
2f932a11b3 | ||
|
|
fb9d30673f | ||
|
|
ca7f56e60b | ||
|
|
56c4a96180 | ||
|
|
4b9f6d531b | ||
|
|
ced30b1054 | ||
|
|
10b85be405 | ||
|
|
24655a6bf3 | ||
|
|
dab2f0c89c | ||
|
|
0ca64a0ea3 | ||
|
|
d16954dc88 | ||
|
|
19aafb9050 | ||
|
|
6550a222aa | ||
|
|
3ea073ace6 | ||
|
|
6978bb5ea5 | ||
|
|
688c53220d | ||
|
|
fe2c710b39 | ||
|
|
34c8204d25 | ||
|
|
e6cf7860e8 | ||
|
|
14fb683682 | ||
|
|
e89a47c8b5 | ||
|
|
b615b492ba | ||
|
|
f39d025a80 | ||
|
|
49027721e9 | ||
|
|
7f05f5e002 | ||
|
|
c9a8db33c3 | ||
|
|
946f6bdeaa | ||
|
|
b3f42d2519 | ||
|
|
872e172bcd | ||
|
|
77c67085bf | ||
|
|
9174aa376f | ||
|
|
07c998afe5 | ||
|
|
a9445d557e | ||
|
|
4d5a1984e2 | ||
|
|
a8d68b7c8a | ||
|
|
1a09c4dea5 | ||
|
|
9da02d2114 | ||
|
|
ae9afb333e | ||
|
|
93cd66ac11 | ||
|
|
d7d80418ae | ||
|
|
2fde1475cb | ||
|
|
7e16835c83 | ||
|
|
8b63e3701f | ||
|
|
81209f5310 | ||
|
|
39c0c2aebe | ||
|
|
6664b90bbb | ||
|
|
8ce84fa44f | ||
|
|
00cc1079af | ||
|
|
ce656e2a26 | ||
|
|
decfe3424f | ||
|
|
b961251899 | ||
|
|
2580104c8b | ||
|
|
cd302f9464 | ||
|
|
064177154c | ||
|
|
9f136a7c67 | ||
|
|
49627069a5 | ||
|
|
30a3db4f22 | ||
|
|
8c55bd5451 | ||
|
|
98f3a3d5c3 | ||
|
|
e3846ec7a1 | ||
|
|
8934b32f1b | ||
|
|
8e23e9b16c | ||
|
|
07dac315a9 | ||
|
|
a4aa3621c0 | ||
|
|
cf762d2c73 | ||
|
|
12d21e642f | ||
|
|
5986194c36 | ||
|
|
aa0383a83b | ||
|
|
3d9d72e8db | ||
|
|
1b1a4677f5 | ||
|
|
07b41a8c3f | ||
|
|
71b2700c3c | ||
|
|
f5afaaef5b | ||
|
|
def4bb987d | ||
|
|
78557076ff | ||
|
|
6578aa4e1b | ||
|
|
2247bf1ba5 | ||
|
|
1db7013e3b | ||
|
|
17778d1c2a | ||
|
|
be69ec5b32 | ||
|
|
9c83135d40 | ||
|
|
5df051fdee | ||
|
|
0f6f5132c1 | ||
|
|
c41b005f33 | ||
|
|
8f99d45045 | ||
|
|
eeaef2410a | ||
|
|
bb0bcbaec0 | ||
|
|
52383633e7 | ||
|
|
81d550754a | ||
|
|
4b365552db | ||
|
|
a9acd2f497 | ||
|
|
a31cb910f5 | ||
|
|
49ea1c635a | ||
|
|
19d4a9ab77 | ||
|
|
4df4c47994 | ||
|
|
ed0c70f0a0 | ||
|
|
c461af2f3a | ||
|
|
dd06017f64 | ||
|
|
9131b11944 | ||
|
|
4c872a01f2 | ||
|
|
75aeb41ab7 | ||
|
|
bf64dd4db6 | ||
|
|
391250b04f | ||
|
|
27d30c1be8 | ||
|
|
3f6424076b | ||
|
|
cf3631226b | ||
|
|
c12b6ba760 | ||
|
|
5b13abcacb | ||
|
|
089d12df16 | ||
|
|
5307f42917 | ||
|
|
2290b269dc | ||
|
|
6b2d42434c | ||
|
|
da5bdea324 | ||
|
|
aacb904e1f | ||
|
|
651f3eeed0 | ||
|
|
35aabd1834 | ||
|
|
21f377d94a | ||
|
|
ce5f94c8f4 | ||
|
|
287df7a61f | ||
|
|
66d51272af | ||
|
|
903863dcb6 | ||
|
|
eb1c9113c2 | ||
|
|
9a56a88200 | ||
|
|
24c23b60fa | ||
|
|
1aa60bce32 | ||
|
|
3021097888 | ||
|
|
6fb3db1633 | ||
|
|
a17f057daa | ||
|
|
f2cfa408b7 | ||
|
|
26de051e92 | ||
|
|
cfb44e4a26 | ||
|
|
9722038ad3 | ||
|
|
50c9b33ed7 | ||
|
|
29afd11cbf | ||
|
|
dfdbd1e75f | ||
|
|
12a270fd29 | ||
|
|
fc73a8b004 | ||
|
|
bf8bfb5c66 | ||
|
|
648a91bce8 | ||
|
|
18904c42f6 | ||
|
|
8bc3b80176 | ||
|
|
bc2ff9b41f | ||
|
|
f7792c0192 | ||
|
|
2a21a9a062 | ||
|
|
f93c60a6f0 | ||
|
|
7d1eafc80a | ||
|
|
26e7e33698 | ||
|
|
04715e04ee | ||
|
|
356410dcfc | ||
|
|
2a96d4e23a | ||
|
|
1ef95013f0 | ||
|
|
c88d9ae282 | ||
|
|
892f0e75ea | ||
|
|
8cf5504a34 | ||
|
|
c3e5225531 | ||
|
|
9439fab7fd | ||
|
|
a373d3f557 | ||
|
|
b0a4ea79b8 | ||
|
|
f30b89953d | ||
|
|
a3f034b95e | ||
|
|
b7eeb5b13b | ||
|
|
0ca2073625 | ||
|
|
662e7da8a4 | ||
|
|
cccc51ee0e | ||
|
|
80ce0d2bdb | ||
|
|
455f0de817 | ||
|
|
7e07a3888b | ||
|
|
5ca8d51e12 | ||
|
|
293018f76c | ||
|
|
ffb76b75d7 | ||
|
|
4138b1f9ae | ||
|
|
764f0d9c1c | ||
|
|
66e22d9f5a | ||
|
|
fda8606388 | ||
|
|
950fd4aa4c | ||
|
|
9206c0e869 | ||
|
|
34d2801bbe | ||
|
|
fa3b5fb059 | ||
|
|
858b2fa21a | ||
|
|
f6ec00d776 | ||
|
|
bbcb61e042 | ||
|
|
e4260a41cb | ||
|
|
9d9030a39c | ||
|
|
123e58d9c3 | ||
|
|
93ab16c6e4 | ||
|
|
6572848d7f | ||
|
|
688b54d66a | ||
|
|
f889cc6ea6 | ||
|
|
07021c85c8 | ||
|
|
d70929f7c0 | ||
|
|
e3a468f2cd | ||
|
|
8e8e48f900 | ||
|
|
34ae76025e | ||
|
|
bd494a6bd6 | ||
|
|
e09d8811c1 | ||
|
|
0f04ba016f | ||
|
|
bf4a0db97f | ||
|
|
6d92a0a33b | ||
|
|
32afe1d102 | ||
|
|
5515f88452 | ||
|
|
5f42d3a8b4 | ||
|
|
d3bb5b69ba | ||
|
|
b315157053 | ||
|
|
3c179bbd47 | ||
|
|
352734494b | ||
|
|
b14cc0d7c5 | ||
|
|
c6d39319de | ||
|
|
212860f090 | ||
|
|
7b838f31be | ||
|
|
36a0376c36 | ||
|
|
df7733425c | ||
|
|
605ec0a478 | ||
|
|
90121047d9 | ||
|
|
81cee05476 | ||
|
|
47fd74a98d | ||
|
|
49229d97db | ||
|
|
8924389dfc | ||
|
|
49e83dd7c8 | ||
|
|
14fe41f6b2 | ||
|
|
f8bede6b5e | ||
|
|
0ef5d667b6 | ||
|
|
1c86fbc60b | ||
|
|
74f44783ac | ||
|
|
bc5a1fe562 | ||
|
|
e1bf34bdc9 | ||
|
|
7cce6b8d68 | ||
|
|
1210b73530 | ||
|
|
beb2ed145e | ||
|
|
44caf70917 | ||
|
|
612eaa87bd | ||
|
|
c5dc2e5a71 | ||
|
|
48d1bd29cb | ||
|
|
9f69fbe5ee | ||
|
|
fc52c43a26 | ||
|
|
24b1818245 | ||
|
|
a49919396a | ||
|
|
2b5046659a | ||
|
|
cc862a8213 | ||
|
|
fafd73a3af | ||
|
|
2298923a9b | ||
|
|
41f61a12b8 | ||
|
|
594f6b14be | ||
|
|
a74aad3b4a | ||
|
|
4ef364a073 | ||
|
|
610abd7b88 | ||
|
|
cfca07852a | ||
|
|
aeec9ef76b | ||
|
|
7b4c3bd92a | ||
|
|
9bf65eacaa | ||
|
|
3cd19a8ec0 | ||
|
|
402f1f7307 | ||
|
|
87e7193259 | ||
|
|
256f810df2 | ||
|
|
1dad6e754b | ||
|
|
84ac5b360b | ||
|
|
9b5f9dda0e | ||
|
|
85fb33a060 | ||
|
|
62ef54cb81 | ||
|
|
7907eec04c | ||
|
|
efe651e749 | ||
|
|
0b056970c6 | ||
|
|
06f3273531 | ||
|
|
7ccbcf2eaa | ||
|
|
9558962d59 | ||
|
|
737d3d9283 | ||
|
|
07afe69cee | ||
|
|
451ea996c9 | ||
|
|
d7b0369e39 | ||
|
|
785c01f2bc | ||
|
|
7f1e0c5670 | ||
|
|
48bd8899bd | ||
|
|
dcaefc68a5 | ||
|
|
211563e533 | ||
|
|
8075893352 | ||
|
|
940ff8e7c8 | ||
|
|
991ee7552b | ||
|
|
3eee880967 | ||
|
|
93dd097b1c | ||
|
|
3bf43b6c1e | ||
|
|
4e7187b926 | ||
|
|
5108e4b6aa | ||
|
|
456a0ee76b | ||
|
|
7b78a20fb7 | ||
|
|
a613bcad2d | ||
|
|
62b36d1b98 | ||
|
|
f22c9a1ae1 | ||
|
|
746c38f4be | ||
|
|
529c111572 | ||
|
|
75eca5c4f8 | ||
|
|
9cd9d39319 | ||
|
|
227f29090d | ||
|
|
fa3739aa23 | ||
|
|
88bedf3a57 | ||
|
|
3f758d9e00 | ||
|
|
beb9cc91f6 | ||
|
|
51acbb2201 | ||
|
|
ad4ffa1d2f | ||
|
|
e53d7e5517 | ||
|
|
6b96eaa15b | ||
|
|
23ec650410 | ||
|
|
6811e2921b | ||
|
|
40aff7e1f2 | ||
|
|
059269d732 | ||
|
|
af725c81e3 | ||
|
|
11adcf1ce3 | ||
|
|
5dcb25664f | ||
|
|
a504366138 | ||
|
|
24e956d168 | ||
|
|
483822f3aa | ||
|
|
23a8707ef1 | ||
|
|
172abc305b | ||
|
|
a36782ac1d | ||
|
|
f9a50f451d | ||
|
|
9853331b34 | ||
|
|
a4c24511f7 | ||
|
|
c837e9250c | ||
|
|
f96eaad1ea | ||
|
|
421d526ba7 | ||
|
|
b07360f32a | ||
|
|
79955f0c89 | ||
|
|
09f1b58146 | ||
|
|
e2a77ed881 | ||
|
|
24177954dd | ||
|
|
ee73e17c9b | ||
|
|
68004174d9 | ||
|
|
7076d8706b | ||
|
|
c48e6be366 | ||
|
|
3cad0f08d9 | ||
|
|
1ec9953e7e | ||
|
|
fd9d3ae181 | ||
|
|
e7b3720b81 | ||
|
|
7da63fa03f | ||
|
|
6d0ce033c2 | ||
|
|
3fcab8dbf1 | ||
|
|
66f7065248 | ||
|
|
2f32a6612d | ||
|
|
c791d2abeb | ||
|
|
15357af67c | ||
|
|
0181e57417 | ||
|
|
c369477cb0 | ||
|
|
e5438a9a03 | ||
|
|
e7682eea42 | ||
|
|
51d1e0f1dd | ||
|
|
ee243e4edf | ||
|
|
bf54251a10 | ||
|
|
9372e2603c | ||
|
|
3272d0db01 | ||
|
|
95beafa9a2 | ||
|
|
408a5f08dc | ||
|
|
8a6308b498 | ||
|
|
cf3c746029 | ||
|
|
2740cc64d8 | ||
|
|
39ebca6b5f | ||
|
|
93dcb537ef | ||
|
|
142c8e2fed | ||
|
|
e43afb1a58 | ||
|
|
9ccbd382e7 | ||
|
|
b6279abd30 | ||
|
|
ed9eaa1942 | ||
|
|
610fb46683 | ||
|
|
db89fc0304 | ||
|
|
503905c628 | ||
|
|
73726d56b3 | ||
|
|
5051909c3c | ||
|
|
63f6ad3fd2 | ||
|
|
c6632925e3 | ||
|
|
e2dd2268e8 | ||
|
|
0f9c49ccba | ||
|
|
d77ef437db | ||
|
|
ca7f6ff287 | ||
|
|
6ff81a33c1 | ||
|
|
0c4d3e6622 | ||
|
|
04ae3ba1fd | ||
|
|
78d7349fd7 | ||
|
|
875e673a8c | ||
|
|
81ca5a4cd4 | ||
|
|
4e35e6c705 | ||
|
|
4a48b70c0b | ||
|
|
44216749c6 | ||
|
|
4228fd3e03 | ||
|
|
5f70c876ae | ||
|
|
ea1ee02b53 | ||
|
|
bddb776ddb | ||
|
|
d0c1eee53b | ||
|
|
4ac28ba6b3 | ||
|
|
b65cb5704d | ||
|
|
69c333ead9 | ||
|
|
0a6835fbea | ||
|
|
2e3d121ac4 | ||
|
|
d83a7924e6 | ||
|
|
e6f6ed76c8 | ||
|
|
08f21335a6 | ||
|
|
7c8ee0cd5b | ||
|
|
520585c5ed | ||
|
|
e1acc09c6e | ||
|
|
836435c5ef | ||
|
|
bf28ad4b6c | ||
|
|
866e2d41dc | ||
|
|
ab8052887f | ||
|
|
12d340cf2a | ||
|
|
e8dc87a2b7 | ||
|
|
7ca1fea22b | ||
|
|
35160dfb7a | ||
|
|
92ed9a2bb6 | ||
|
|
5f49b65c1f | ||
|
|
9b578ca343 | ||
|
|
9992c424f5 | ||
|
|
b1c13bce58 | ||
|
|
455ee23499 | ||
|
|
df75a606ff | ||
|
|
20dc45bca7 | ||
|
|
db373f130c | ||
|
|
6fe90f0324 | ||
|
|
aa0f7afbe6 | ||
|
|
57aaa9110b | ||
|
|
6a71df2925 | ||
|
|
9dd4252b39 | ||
|
|
bdfffee037 | ||
|
|
84273557f9 | ||
|
|
62b4265410 | ||
|
|
b18316dd37 | ||
|
|
f2ba0a5ae7 | ||
|
|
7e58d33a2e | ||
|
|
8bc5817559 | ||
|
|
64ee064ded | ||
|
|
14b561f182 | ||
|
|
9e86fc3831 | ||
|
|
9fd3e64ba8 | ||
|
|
509dc283f2 | ||
|
|
2adc37becc | ||
|
|
492883859e | ||
|
|
9898f53361 | ||
|
|
1e59a2ac73 | ||
|
|
ae42206500 | ||
|
|
d72946a8d7 | ||
|
|
cee3b172b9 | ||
|
|
052f2ac352 | ||
|
|
e6ebd30f60 | ||
|
|
a8edd4f6d4 | ||
|
|
ac81c007a6 | ||
|
|
610e9cf76a | ||
|
|
3656ef4a2d | ||
|
|
6b8611ad56 | ||
|
|
5018fdacbe | ||
|
|
4900c28bf6 | ||
|
|
ba31d39f6d | ||
|
|
f9b2b3e4f5 | ||
|
|
9ea99b49be | ||
|
|
9cb5c57b84 | ||
|
|
321a5e6580 | ||
|
|
0e3c9e726d | ||
|
|
5e38d70697 | ||
|
|
fae2b7edc3 | ||
|
|
c8a83fb122 | ||
|
|
9abe9aff56 | ||
|
|
7e0008f5b3 | ||
|
|
81c2c3ec11 | ||
|
|
c29820f649 | ||
|
|
a2b3ad6d0a | ||
|
|
e9d9cf2b5b | ||
|
|
1de6e7fb9d | ||
|
|
9a56d90150 | ||
|
|
9cee81d47e | ||
|
|
3221658a78 | ||
|
|
028b78f623 | ||
|
|
cf12fc8366 | ||
|
|
bf7b28b456 | ||
|
|
27693cec29 | ||
|
|
3c47e1b4d1 | ||
|
|
0dfd76ba55 | ||
|
|
027a901bec | ||
|
|
692a0198f9 | ||
|
|
63d95862fa | ||
|
|
0992d1a4c8 | ||
|
|
cd1ef33c8c | ||
|
|
72c7751768 | ||
|
|
cacec5764a | ||
|
|
83e214478e | ||
|
|
240ea1bbb3 | ||
|
|
27a4927ed1 | ||
|
|
d44e5b1fde | ||
|
|
10b9632bed | ||
|
|
f1810689ff | ||
|
|
2d5b93e850 | ||
|
|
b21ca53dfc | ||
|
|
af92ee9dd6 | ||
|
|
5d2c5877f7 | ||
|
|
2aa35e95af | ||
|
|
20a41e2f7b | ||
|
|
46445a5a16 | ||
|
|
2cfa9e9008 | ||
|
|
a0a5c31c05 | ||
|
|
8b7c3eec83 | ||
|
|
fbc7b51a24 | ||
|
|
5de7b5b35e | ||
|
|
4961d8aa3e | ||
|
|
de0046fc8b | ||
|
|
c9079165ee | ||
|
|
04086fc455 | ||
|
|
a3f67acd6d | ||
|
|
d992dfe7d5 | ||
|
|
b1f739e27b | ||
|
|
5679fae11e | ||
|
|
de0f35f2d9 | ||
|
|
f0d14b83bc | ||
|
|
c6466c23fe | ||
|
|
7240e3a68f | ||
|
|
6d9aaca082 | ||
|
|
c6dbe6e9d6 | ||
|
|
e40636a7c1 | ||
|
|
5a2c68e995 | ||
|
|
b46ca9aa94 | ||
|
|
eb91f08725 | ||
|
|
fe346cd4d1 | ||
|
|
e3ab54753b | ||
|
|
ffc2c2d7c5 | ||
|
|
263f8edff8 | ||
|
|
6bd0a0be97 | ||
|
|
13a12f8a87 | ||
|
|
d2e0c03afb | ||
|
|
7462fe3068 | ||
|
|
0d3ea59bcf | ||
|
|
ef3b93daa1 | ||
|
|
aacc1148b0 | ||
|
|
c5e96544b5 | ||
|
|
02dc72acb6 | ||
|
|
d96f7d6068 | ||
|
|
380c771988 | ||
|
|
32332bcd03 | ||
|
|
407202cc0f | ||
|
|
a0ca98f699 | ||
|
|
a8fa275dc6 | ||
|
|
5eeffab5e5 | ||
|
|
d8329d858d | ||
|
|
9562a02c5a | ||
|
|
70e6a3db8a | ||
|
|
f3cf95a937 | ||
|
|
144018736a | ||
|
|
5b2c37d6c1 | ||
|
|
3fb8489ae3 | ||
|
|
b376c7e374 | ||
|
|
58bca67883 | ||
|
|
c4443f885e | ||
|
|
d9f0ed8247 | ||
|
|
691e5c3bb8 | ||
|
|
49cf92dc36 | ||
|
|
d20eab4f83 | ||
|
|
59353546e8 | ||
|
|
09eb30dc05 | ||
|
|
5c1aa5162d | ||
|
|
ad8b82d054 | ||
|
|
3a916b4ef2 | ||
|
|
5d3928cb01 | ||
|
|
9a515cbd32 | ||
|
|
f5bcc00570 | ||
|
|
cc8a871705 | ||
|
|
67bee06e43 | ||
|
|
f89b375fb9 | ||
|
|
87162658c4 | ||
|
|
6214c997c0 | ||
|
|
4555ae448f | ||
|
|
a5ea3e2f15 | ||
|
|
8e0ac93d60 | ||
|
|
0278ad0a6d | ||
|
|
c03df89921 | ||
|
|
050eac03af | ||
|
|
ad91476d26 | ||
|
|
d63da4592d | ||
|
|
51ff5b68fa | ||
|
|
388babbcea | ||
|
|
d94e077901 | ||
|
|
11d6a939df | ||
|
|
10c8c034bd | ||
|
|
31ff7da7ac | ||
|
|
0375e92847 | ||
|
|
013bb469ca | ||
|
|
e52bcc9408 | ||
|
|
98b55421a5 | ||
|
|
785a7028bf | ||
|
|
aa1d587128 | ||
|
|
fa11427ec6 | ||
|
|
4df9509ead | ||
|
|
1f7e220387 | ||
|
|
e3ce346f24 | ||
|
|
77b4176152 | ||
|
|
3419099f0a | ||
|
|
4c43e6c48b | ||
|
|
b824a517aa | ||
|
|
e4d080e63c | ||
|
|
c36989c39e | ||
|
|
12503fce06 | ||
|
|
33a08fc6f7 | ||
|
|
2efbcc90c5 | ||
|
|
60e82e3929 | ||
|
|
00fc43144a | ||
|
|
c7d618b4d9 | ||
|
|
d54741eda8 | ||
|
|
fb3302feda | ||
|
|
dbead66988 | ||
|
|
afbec5ff7e | ||
|
|
645ca7af7a | ||
|
|
44571775bd | ||
|
|
8d95019442 | ||
|
|
893ee68b52 | ||
|
|
39f1222060 | ||
|
|
543fc4c117 | ||
|
|
cfdb38eda4 | ||
|
|
4771e372a1 | ||
|
|
56fdcf93d1 | ||
|
|
7ce13a6ec1 | ||
|
|
6df51201ae | ||
|
|
2e5a3b01fd | ||
|
|
15738ea506 | ||
|
|
bc87e97357 | ||
|
|
2212da453a | ||
|
|
2513f6b550 | ||
|
|
38bef9da91 | ||
|
|
367d392880 | ||
|
|
bf8b38e0f7 | ||
|
|
d71dc5cf42 | ||
|
|
7640b328df | ||
|
|
599cdc3f0f | ||
|
|
35ae5daf2d | ||
|
|
3f36a38512 | ||
|
|
fa0d909dd3 | ||
|
|
bd4160dbaf | ||
|
|
71773b128d | ||
|
|
edc4e037c4 | ||
|
|
57afd0ab37 | ||
|
|
05c2f80826 | ||
|
|
b0553d2d97 | ||
|
|
fa236e9718 | ||
|
|
2f1e1dcb42 | ||
|
|
99d0022fae | ||
|
|
9a6b90f47d | ||
|
|
a2e3226597 | ||
|
|
4fbbce9a35 | ||
|
|
998ce55be0 | ||
|
|
e2e2a55d9b | ||
|
|
5b7ad3a5a0 | ||
|
|
7fde3ed915 | ||
|
|
7de6476b3d | ||
|
|
2c10222e87 | ||
|
|
4ab433d391 | ||
|
|
ab781de5a0 | ||
|
|
eb4bf93ea4 | ||
|
|
f37df28d17 | ||
|
|
f8a39919fa | ||
|
|
ddbe4cfa20 | ||
|
|
4200f9ed62 | ||
|
|
dc88747770 | ||
|
|
2356970a91 | ||
|
|
a79b9bbe6b | ||
|
|
2616e4d4d9 | ||
|
|
5d28575d4d | ||
|
|
808b076000 | ||
|
|
833c2e54a1 | ||
|
|
38363902c7 | ||
|
|
64253e1a58 | ||
|
|
92a4984066 | ||
|
|
e15354e387 | ||
|
|
88cc1d1a31 | ||
|
|
76e9ee33aa | ||
|
|
562f2321d2 | ||
|
|
edf025ed8d | ||
|
|
02fec89a0d | ||
|
|
15aa932aa6 | ||
|
|
5eb82ca6a8 | ||
|
|
109e67169c | ||
|
|
31b0be74af | ||
|
|
f6ab62bc13 | ||
|
|
9f5e4e5ad8 | ||
|
|
608a6810e7 | ||
|
|
80359c9937 | ||
|
|
a43e892fb5 | ||
|
|
631d867dc9 | ||
|
|
89bbc30a09 | ||
|
|
44c22e3935 | ||
|
|
3c9a7926c2 | ||
|
|
758c6c9464 | ||
|
|
422dd6666e | ||
|
|
03e109c4a3 | ||
|
|
50917ccda6 | ||
|
|
ba39186364 | ||
|
|
1424b368cf | ||
|
|
3a1b6fe8c1 | ||
|
|
19af90face | ||
|
|
992cdc8d14 | ||
|
|
33a6d52965 | ||
|
|
52665f54ad | ||
|
|
18458ec42b | ||
|
|
d4ed9b3ef1 | ||
|
|
ca7b2f574f | ||
|
|
208ab8b366 | ||
|
|
567d03a269 | ||
|
|
c041eec699 | ||
|
|
27203c62b8 | ||
|
|
3025ddf179 | ||
|
|
e00aad84af | ||
|
|
31c240a8db | ||
|
|
84fc400aba | ||
|
|
ab2816c870 | ||
|
|
d2bdb71c13 | ||
|
|
be9a409980 | ||
|
|
ce40c2e87c | ||
|
|
bdc2f10b90 | ||
|
|
9f0e1834ec | ||
|
|
1ace97e946 | ||
|
|
7cf9b93f26 | ||
|
|
2c8d12d3ec | ||
|
|
c2b90c44e4 | ||
|
|
a0dadc8c62 | ||
|
|
18996d2595 | ||
|
|
e56c13670d | ||
|
|
7f1b69b0c8 | ||
|
|
0feeef2604 | ||
|
|
894f5c24a8 | ||
|
|
bace52afd7 | ||
|
|
584f9cd449 | ||
|
|
d9a3fea022 | ||
|
|
773fa5c40f | ||
|
|
f7efe6f6c5 | ||
|
|
2bd6ce4b62 | ||
|
|
27115ff7eb | ||
|
|
08a8bd10ca | ||
|
|
3e2a4c3b26 | ||
|
|
8d271f20fe | ||
|
|
9737608f0a | ||
|
|
5cd0fa3ce1 | ||
|
|
3983cacbcf | ||
|
|
43b29c093b | ||
|
|
166e567ab8 | ||
|
|
6de3d34378 | ||
|
|
7ee35c2611 | ||
|
|
936f982392 | ||
|
|
0e37fe8776 | ||
|
|
5a316664e5 | ||
|
|
fcb16ceb29 | ||
|
|
9ae7cca5e9 | ||
|
|
f3b6cb4d34 | ||
|
|
ae03753ef1 | ||
|
|
95d3f3953a | ||
|
|
6ddd81c178 | ||
|
|
7c9ff322f3 | ||
|
|
ce8cb6a5d9 | ||
|
|
f269766408 | ||
|
|
e1604198ff | ||
|
|
113af46a1b | ||
|
|
413e303ad5 | ||
|
|
19cf72e057 | ||
|
|
d81342254a | ||
|
|
e1587da228 | ||
|
|
524c6c10bf | ||
|
|
1bd9a63049 | ||
|
|
3c49396370 | ||
|
|
ab6908a513 | ||
|
|
69aaf5d096 | ||
|
|
2f8e89adc3 | ||
|
|
870757aa17 | ||
|
|
b96cc30cd0 | ||
|
|
9e394139e5 | ||
|
|
b35a7c2c87 | ||
|
|
691e925adc | ||
|
|
1497fb388a | ||
|
|
b5fd2fb58b | ||
|
|
c03bac9ad4 | ||
|
|
a49f0205ea | ||
|
|
9091110460 | ||
|
|
10d855cb21 | ||
|
|
d97bb4c41c | ||
|
|
2f176d6fb8 | ||
|
|
ca73b2f465 | ||
|
|
df1043516e | ||
|
|
4200bd2fc1 | ||
|
|
e10943d0d8 | ||
|
|
d4d1b28a06 | ||
|
|
0d720a6ff4 | ||
|
|
0a7ea7063f | ||
|
|
afe79ba22b | ||
|
|
fdb97a3e9c | ||
|
|
433518de74 | ||
|
|
5cfc1cdacc | ||
|
|
3c88cac2e9 | ||
|
|
6fb4001b58 | ||
|
|
ca1be02bf0 | ||
|
|
38c2ca9281 | ||
|
|
4d1093b386 | ||
|
|
4fa1c52688 | ||
|
|
a5e3384691 | ||
|
|
0358ffcd4c | ||
|
|
95223cb28e | ||
|
|
6fe39e6117 | ||
|
|
c3cb449990 | ||
|
|
f6edd2c472 | ||
|
|
68bbac207e | ||
|
|
6a57d0b381 | ||
|
|
996f7d1642 | ||
|
|
988b5aa4e6 | ||
|
|
7d927b6691 | ||
|
|
31e213e427 | ||
|
|
f0503372d9 | ||
|
|
a1d03fe7ba | ||
|
|
159d7eefda | ||
|
|
97da6c1da5 | ||
|
|
17a8c37148 | ||
|
|
ddeca7a358 | ||
|
|
02ab66fca3 | ||
|
|
a79d80c78e | ||
|
|
0da636e1a3 | ||
|
|
3845baf398 | ||
|
|
48a3502656 | ||
|
|
621fbe99de | ||
|
|
f214118e45 | ||
|
|
aad770bce8 | ||
|
|
3f91233f6d | ||
|
|
0e0cc13650 | ||
|
|
24fffb8d93 | ||
|
|
8f9b246d0e | ||
|
|
808df82b36 | ||
|
|
ae91914260 | ||
|
|
2b54e98f50 | ||
|
|
0eca236dcd | ||
|
|
f4d1f13358 | ||
|
|
aa74a900f5 | ||
|
|
a073293b6a | ||
|
|
2117a45d1a | ||
|
|
0f07ba4f09 | ||
|
|
00cdd41b5f | ||
|
|
7d53b79596 | ||
|
|
18c32996c1 | ||
|
|
7c1a5e3c47 | ||
|
|
b4994ad12e | ||
|
|
2f35747f29 | ||
|
|
6453b82a5e | ||
|
|
48a581ba2e | ||
|
|
f7d96c5b28 | ||
|
|
54fdf57b8c | ||
|
|
dbe4126e07 | ||
|
|
e5801b75f8 | ||
|
|
bb30927549 | ||
|
|
dc65d96aca | ||
|
|
a1cf49935d | ||
|
|
75f2665f2e | ||
|
|
e1f951813a | ||
|
|
52108192d1 | ||
|
|
0495fcd475 | ||
|
|
c2cf8ffa82 | ||
|
|
4e5a915ef8 | ||
|
|
a5911765c3 | ||
|
|
99e5e8362f | ||
|
|
6411680364 | ||
|
|
8a3f1d6932 | ||
|
|
c6991109b7 | ||
|
|
ca9eb14f6a | ||
|
|
acf266fe78 | ||
|
|
424aa05cc2 | ||
|
|
ce563d7c2e | ||
|
|
02cc63d6d4 | ||
|
|
f4c16e683b | ||
|
|
712e23c383 | ||
|
|
20c20dacb7 | ||
|
|
7bb5d4bfe8 | ||
|
|
e6805582a6 | ||
|
|
d08f27e27b | ||
|
|
cdb562d558 | ||
|
|
8f4c6e6d1a | ||
|
|
f11c6d5d02 | ||
|
|
64a4649290 | ||
|
|
294521439e | ||
|
|
59b18aaeef | ||
|
|
85f149befe | ||
|
|
7fde8d9d1e | ||
|
|
3644c940bf | ||
|
|
1a79878dff | ||
|
|
7cfce20cd3 | ||
|
|
dc4786a504 | ||
|
|
3e867008f0 | ||
|
|
eb78aed863 | ||
|
|
ed3ab5e212 | ||
|
|
f9299c4461 | ||
|
|
082f6a27de | ||
|
|
459f4fef60 | ||
|
|
a403d9a50c | ||
|
|
432c21456f | ||
|
|
fb8111553e | ||
|
|
2919f3045d | ||
|
|
19fea772e5 | ||
|
|
0d30ccf767 | ||
|
|
1fd8e2c649 | ||
|
|
b402040059 | ||
|
|
1d33784bf9 | ||
|
|
a0ef6198ff | ||
|
|
8ae6f1e556 | ||
|
|
e6484d9dab | ||
|
|
5f2d75f45b | ||
|
|
da42f27c9e | ||
|
|
de4561c980 | ||
|
|
917cf3c7f0 | ||
|
|
709a6356f7 | ||
|
|
bcf347403b | ||
|
|
ba7e35cbab | ||
|
|
d372e7e477 | ||
|
|
6a8fb0f25f | ||
|
|
a59d3d4323 | ||
|
|
7f244f9b9c | ||
|
|
813a4ea107 | ||
|
|
c4237b529f | ||
|
|
01f75591c6 | ||
|
|
288340cb6c | ||
|
|
2aaa681dea | ||
|
|
81e753064a | ||
|
|
74c47803f7 | ||
|
|
637fb20c75 | ||
|
|
d9cf5e4883 | ||
|
|
cb643d87df | ||
|
|
14a7faf087 | ||
|
|
60cb36bef3 | ||
|
|
4f2473053c | ||
|
|
7557f8d68c | ||
|
|
371d9a1acf | ||
|
|
135c74017c | ||
|
|
54ba44ee37 | ||
|
|
b01a630bd0 | ||
|
|
44ed34475b | ||
|
|
3a16cb6d7f | ||
|
|
814d93c7cf | ||
|
|
3877bf9704 | ||
|
|
cfc5e96b4b | ||
|
|
594898aea7 | ||
|
|
530ef5846f | ||
|
|
14ddda285c | ||
|
|
f8c5d31864 | ||
|
|
b7a8dcc35d | ||
|
|
f7127c44f8 | ||
|
|
33abb86b7e | ||
|
|
367a9f65aa | ||
|
|
33f3c75213 | ||
|
|
9d59a9c840 | ||
|
|
3829d6ccf8 | ||
|
|
d35dcafa3d | ||
|
|
98cf546771 | ||
|
|
4dad489a50 | ||
|
|
8dcc28c9ae | ||
|
|
4c8a6eee7b | ||
|
|
fcaed685b2 | ||
|
|
0572be9439 | ||
|
|
c6e09c2689 | ||
|
|
7a5e637a37 | ||
|
|
902d5b0f8b | ||
|
|
9a4a463ec4 | ||
|
|
55144284c2 | ||
|
|
97de9d54a5 | ||
|
|
a7b3a61424 | ||
|
|
daf07e4200 | ||
|
|
3bb8b3529a | ||
|
|
6cf8d40f41 | ||
|
|
f6321f878a | ||
|
|
7d15854514 | ||
|
|
e8bda62d2a | ||
|
|
18fedafbc5 | ||
|
|
b22716e938 | ||
|
|
fa47ce369a | ||
|
|
ef81b5f03e | ||
|
|
4388015f1a | ||
|
|
b7e38ea249 | ||
|
|
50b2fbd031 | ||
|
|
055cb2b956 | ||
|
|
9fbd73d931 | ||
|
|
0947b92734 | ||
|
|
11c7945365 | ||
|
|
64389acdf1 | ||
|
|
7a361ad36a | ||
|
|
261c6f4b96 | ||
|
|
2224a4d61a | ||
|
|
e874f9664c | ||
|
|
3c58b16c9f | ||
|
|
aaf862aef2 | ||
|
|
c986239837 | ||
|
|
69d869c3d9 | ||
|
|
0c1cd9f590 | ||
|
|
8be91677df | ||
|
|
03ef2d6c82 | ||
|
|
95d154a91f | ||
|
|
61db0b65b6 | ||
|
|
4f9ec9ab45 | ||
|
|
929a513a6b | ||
|
|
01b5c810d5 | ||
|
|
cd88ea2106 | ||
|
|
cecc238f68 | ||
|
|
439a3e8463 | ||
|
|
5b24ce9024 | ||
|
|
d94b50a3d8 | ||
|
|
dec721c52b | ||
|
|
6aae199572 | ||
|
|
0a638cc022 | ||
|
|
e5019a0481 | ||
|
|
1980931153 | ||
|
|
09d6db491a | ||
|
|
d545f984b0 | ||
|
|
730f223100 | ||
|
|
d857cdfb27 | ||
|
|
4a7c6f7241 | ||
|
|
31113c5adf | ||
|
|
b57343c255 | ||
|
|
1fcc13b011 | ||
|
|
29c53f2402 | ||
|
|
caca3c8503 | ||
|
|
f1efcfed14 | ||
|
|
3b186a55ac | ||
|
|
02f8f4187a | ||
|
|
82c96c971e | ||
|
|
8a0992d921 | ||
|
|
e98d195901 | ||
|
|
fd2998efd5 | ||
|
|
d29cb09b3e | ||
|
|
5b1d52671c | ||
|
|
7109dadd21 | ||
|
|
4975b13b74 | ||
|
|
b738972e69 | ||
|
|
ee423dcdd0 | ||
|
|
c5642a894f | ||
|
|
0946cbcdca | ||
|
|
4def8b3b5e | ||
|
|
d51e5690f4 | ||
|
|
ec9d21a234 | ||
|
|
817a37169a | ||
|
|
643e0066a0 | ||
|
|
8ea4eeb785 | ||
|
|
4bcb63b705 | ||
|
|
50ee747787 | ||
|
|
90a58488b5 | ||
|
|
a4c15dc54f | ||
|
|
fc3f1c4572 | ||
|
|
88c57eaf55 | ||
|
|
1f93d2bcf7 | ||
|
|
826d570162 | ||
|
|
9d13f07d09 | ||
|
|
5fbe5cabc8 | ||
|
|
4ae9a06c60 | ||
|
|
c0b75f49b6 | ||
|
|
5a4fd8e0a6 | ||
|
|
7f225b9421 | ||
|
|
06674a321a | ||
|
|
c1e17037e5 | ||
|
|
d3605cfc26 | ||
|
|
93e958f695 | ||
|
|
22d7fed60a | ||
|
|
779b2709ec | ||
|
|
8ebb4dc294 | ||
|
|
7ee5894360 | ||
|
|
43ecdb606f | ||
|
|
984c4ba8c7 | ||
|
|
56a94c2a26 | ||
|
|
66580f32c2 | ||
|
|
3e9ffaddb6 | ||
|
|
d97e31db4c | ||
|
|
ca21ac6b9b | ||
|
|
0e610815e4 | ||
|
|
7a075a5dc9 | ||
|
|
2d92f333f5 | ||
|
|
d2bb53702a | ||
|
|
5e586a6b39 | ||
|
|
d82c350de7 | ||
|
|
edfd106bc5 | ||
|
|
f4c128ecaa | ||
|
|
54ec5528a0 | ||
|
|
ebf585b673 | ||
|
|
052d102ded | ||
|
|
664e20754d | ||
|
|
1eb5249598 | ||
|
|
075a22ed65 | ||
|
|
3ceab8474c | ||
|
|
98c2fc4e42 | ||
|
|
f19fd642ce | ||
|
|
cda5ef08fa | ||
|
|
9ad3aed0ef | ||
|
|
d631267548 | ||
|
|
0ee1a92971 | ||
|
|
690c4e8457 | ||
|
|
143b2896e0 | ||
|
|
a163c89c6a | ||
|
|
fea2363a2e | ||
|
|
be6271767f | ||
|
|
50af1d1e08 | ||
|
|
df907a905f | ||
|
|
da17f8ad37 | ||
|
|
a3923424c7 | ||
|
|
a0c795b097 | ||
|
|
9da6809ac3 | ||
|
|
471f403a67 | ||
|
|
30a49f5ee2 | ||
|
|
4e0c935959 | ||
|
|
47483e8c17 | ||
|
|
6093df11dc | ||
|
|
4260282df7 | ||
|
|
bed15fcd81 | ||
|
|
c239131ff5 | ||
|
|
8ab1c16ebd | ||
|
|
56150ec030 | ||
|
|
c4734b947b | ||
|
|
24c5e57bb6 | ||
|
|
fd7fd55662 | ||
|
|
78ccedd6a8 | ||
|
|
b60abc7c37 | ||
|
|
ccdbf20f60 | ||
|
|
d08847b1a6 | ||
|
|
7665dff58b | ||
|
|
4ed6397e5d | ||
|
|
9c8f083d6c | ||
|
|
525ea554a1 | ||
|
|
ef724edd80 | ||
|
|
b169320a03 | ||
|
|
81b1e9d272 | ||
|
|
6471a75a22 | ||
|
|
147e270208 | ||
|
|
8def25e475 | ||
|
|
812f6a7dd7 | ||
|
|
4f72e041f2 | ||
|
|
488a17b3f5 | ||
|
|
4dbaa6369f | ||
|
|
959ed32636 | ||
|
|
812bfec65e | ||
|
|
1624722566 | ||
|
|
e574f01568 | ||
|
|
5a470d4a49 | ||
|
|
34ea458667 | ||
|
|
4c5ca89d8c | ||
|
|
8517d5f915 | ||
|
|
b3b4e6dc45 | ||
|
|
f7e682eeee | ||
|
|
a813900fce | ||
|
|
04f173790f | ||
|
|
c536ee1122 | ||
|
|
c31e1735dd | ||
|
|
93d5b945dd | ||
|
|
f34f09c821 | ||
|
|
eefd7676a3 | ||
|
|
486f2a66a9 | ||
|
|
2613ddf61c | ||
|
|
b779b42ffd | ||
|
|
427bc64ba1 | ||
|
|
3866aeac52 | ||
|
|
498dfa291e | ||
|
|
fed84f2961 | ||
|
|
d5ab4cd22a | ||
|
|
3cbc3ecdd7 | ||
|
|
1769249876 | ||
|
|
5182eaf661 | ||
|
|
07a0822ebe | ||
|
|
b2ad2c8751 | ||
|
|
63be48ada6 | ||
|
|
82ff7c6542 | ||
|
|
44fa7fb18c | ||
|
|
cc2bc67440 | ||
|
|
fc84878cba | ||
|
|
cd066bfeba | ||
|
|
c10edb0998 | ||
|
|
32880ff42a | ||
|
|
0c85869c26 | ||
|
|
b99f0776d6 | ||
|
|
8014e1cc9d | ||
|
|
bd05816fd8 | ||
|
|
3c21483c88 | ||
|
|
e0956bb572 | ||
|
|
c04cf127f7 | ||
|
|
9c0e05552e | ||
|
|
176654791e | ||
|
|
60dbd8161c | ||
|
|
b7ca93ba37 | ||
|
|
608be966d7 | ||
|
|
67b22760d9 | ||
|
|
f5e8e8b53d | ||
|
|
f5eab912ed | ||
|
|
8696f882a9 | ||
|
|
56d2dcb184 | ||
|
|
d1ff22b983 | ||
|
|
2c9586be0c | ||
|
|
6e3caf23b6 | ||
|
|
19f49db96f | ||
|
|
8d630362b7 | ||
|
|
e4cf175163 | ||
|
|
5ba6607181 | ||
|
|
2fb2e286ee | ||
|
|
3eb9838dca | ||
|
|
f5b31e218d | ||
|
|
31c28d0dd2 | ||
|
|
fce150f094 | ||
|
|
323c088356 | ||
|
|
9f77df2590 | ||
|
|
cafabf2055 | ||
|
|
f5498168ae | ||
|
|
6e041b9c61 | ||
|
|
eb5600acd2 | ||
|
|
42f8b6c530 | ||
|
|
f319087372 | ||
|
|
74bbb13008 | ||
|
|
549d11225a | ||
|
|
724c2ed9b4 | ||
|
|
2cff0d1f39 | ||
|
|
44f2a82a56 | ||
|
|
946cf8b453 | ||
|
|
f2adb4b9cc | ||
|
|
484ca68228 | ||
|
|
1d366db764 | ||
|
|
b5d7f69b51 | ||
|
|
b780b69c62 | ||
|
|
9cd3529108 | ||
|
|
66d44c72c3 | ||
|
|
72d8adfd1e | ||
|
|
1946f729fd | ||
|
|
56057bcecd | ||
|
|
4ed579cafc | ||
|
|
9e663a624b | ||
|
|
98c32d8df1 | ||
|
|
3583e2b449 | ||
|
|
5536228359 | ||
|
|
f9b80e7217 | ||
|
|
5ead026967 | ||
|
|
d632e44c8c | ||
|
|
1f9806875c | ||
|
|
63ce8baa55 | ||
|
|
3a935fd72b | ||
|
|
b063b1b722 | ||
|
|
43cf913048 | ||
|
|
0161d3f733 | ||
|
|
3b0d2330b6 | ||
|
|
6896847210 | ||
|
|
9cd5471202 | ||
|
|
9f11e0284c | ||
|
|
d87ab3ed20 | ||
|
|
587a64d80c | ||
|
|
96f313fb41 | ||
|
|
423ab029b2 | ||
|
|
489017995e | ||
|
|
a489c9fa52 | ||
|
|
3a9ad9f2b1 | ||
|
|
143d4ec043 | ||
|
|
829effc1fe | ||
|
|
37ff663b02 | ||
|
|
a964f098b3 | ||
|
|
8055ed24ff | ||
|
|
774a6e8199 | ||
|
|
c825c419d4 | ||
|
|
182b1405d9 | ||
|
|
2bf18950ab | ||
|
|
ac5f2762b7 | ||
|
|
6fbc87301f | ||
|
|
c1e8bd6add | ||
|
|
3c9daf322a | ||
|
|
4b7a0a5b39 | ||
|
|
ab8425f1b5 | ||
|
|
3028a620af | ||
|
|
ad60f0691c | ||
|
|
5580773191 | ||
|
|
d015f746cc | ||
|
|
dacb5324e8 | ||
|
|
bf9dd4f4cf | ||
|
|
e8031b1152 | ||
|
|
fbfb48cce0 | ||
|
|
1a00d1bdaf | ||
|
|
a07ac6312f | ||
|
|
53c535a0c1 | ||
|
|
55dec02ca1 | ||
|
|
7243101135 | ||
|
|
9613f00877 | ||
|
|
5d487ef40e | ||
|
|
a9061714f2 | ||
|
|
aebbb2359d | ||
|
|
0a549fd1f2 | ||
|
|
a80ba8fc6e | ||
|
|
e48cbff10d | ||
|
|
7a04eb3a8b | ||
|
|
2f873a119f | ||
|
|
a93e9e6e9b | ||
|
|
aa72884a6e | ||
|
|
46360f18b4 | ||
|
|
e229b831fa | ||
|
|
a553ab82e0 | ||
|
|
3a46212dd8 | ||
|
|
fc31da1114 | ||
|
|
3a3ab3391f | ||
|
|
e5ae7a07d1 | ||
|
|
6ee2af5e2d | ||
|
|
d801f85963 | ||
|
|
8d3a92fc4a | ||
|
|
44369d536a | ||
|
|
b641571098 | ||
|
|
eeef4e630a | ||
|
|
9969c06cb5 | ||
|
|
427c80119a | ||
|
|
55ac2f4c23 | ||
|
|
b640b3b0d6 | ||
|
|
2e5e689a7f | ||
|
|
b381cad399 | ||
|
|
9090065e9f | ||
|
|
4eb798dbdc | ||
|
|
1fb9b299d4 | ||
|
|
d26d9d5b81 | ||
|
|
c6a5c74208 | ||
|
|
aa9202260d | ||
|
|
8c02dd971b | ||
|
|
3847c08f7e | ||
|
|
71e19baf69 | ||
|
|
4cc1c2627e | ||
|
|
75a0d46edf | ||
|
|
a81763c237 | ||
|
|
bc22641002 | ||
|
|
eded90bf87 | ||
|
|
27a84fd021 | ||
|
|
67a3c5a16a | ||
|
|
5b7dd553d3 | ||
|
|
df768e7d8f | ||
|
|
3c13c9e3e9 | ||
|
|
a768df83cb | ||
|
|
c36773bffb | ||
|
|
9c71bff5e8 | ||
|
|
9deb23aa47 | ||
|
|
0519ef0802 | ||
|
|
3ec3872730 | ||
|
|
6bdbe3299e | ||
|
|
bc75eb2c64 | ||
|
|
d82bcdeea1 | ||
|
|
c90e26dfa6 | ||
|
|
96bbda5d48 | ||
|
|
f98f4ac7ea | ||
|
|
8bf596bd4c | ||
|
|
056561df93 | ||
|
|
cce4931342 | ||
|
|
8b5e51c9aa | ||
|
|
bf0c809ff2 | ||
|
|
9ac9649183 | ||
|
|
9bf5d4331c | ||
|
|
0139762a96 | ||
|
|
2ecb124e42 | ||
|
|
f56968ba0b | ||
|
|
2d2cd628c6 | ||
|
|
84b59d58fb | ||
|
|
06e2afe8e0 | ||
|
|
af939c158a | ||
|
|
3d5be2ea4b | ||
|
|
e5b4bf22d4 | ||
|
|
42fb7c14b0 | ||
|
|
61fbd0aa59 | ||
|
|
254b68fe2c | ||
|
|
870bfd08f5 | ||
|
|
5ddf52d58e | ||
|
|
213e94bce2 | ||
|
|
a40458405a | ||
|
|
951b25163e | ||
|
|
ea13a77dcb | ||
|
|
ab9d5eb38d | ||
|
|
8653cedee4 | ||
|
|
26208a5c2f | ||
|
|
9b6be0ae0f | ||
|
|
af3bf6c956 | ||
|
|
a44ef27897 | ||
|
|
d338e4d875 | ||
|
|
25b980dddb | ||
|
|
ddaef1a60c | ||
|
|
49d4ed4d3f | ||
|
|
1407afad73 | ||
|
|
45e738876a | ||
|
|
d43d4e4219 | ||
|
|
d8d76cd2ba | ||
|
|
e8d2cf4fb5 | ||
|
|
50cbca4c55 | ||
|
|
3cb5517ddb | ||
|
|
d332fcb8fa | ||
|
|
43940d59ed | ||
|
|
b2c1cd7eda | ||
|
|
d556dc1865 | ||
|
|
9b5c1a5e77 | ||
|
|
272d4a5167 | ||
|
|
07d33849b0 | ||
|
|
a3e8cb1e44 | ||
|
|
cf5284cdf2 | ||
|
|
0bd54392b7 | ||
|
|
ce82015d5f | ||
|
|
cef1de89d0 | ||
|
|
d52deeb15a | ||
|
|
d6d48e63fb | ||
|
|
2ef7175b42 | ||
|
|
7f94ca950e | ||
|
|
5f6aabccbe | ||
|
|
ec9aa4f468 | ||
|
|
906a24fa81 | ||
|
|
ee253991d4 | ||
|
|
8dbb305e8e | ||
|
|
55e810d512 | ||
|
|
d5017e2788 | ||
|
|
7db0113b53 | ||
|
|
191df5e17d | ||
|
|
f2ecf8d510 | ||
|
|
74cd6cb4fc | ||
|
|
bfcf570d68 | ||
|
|
c0d9058e25 | ||
|
|
dffb4c63dc | ||
|
|
d6b0fbd771 | ||
|
|
cb7844c8d4 | ||
|
|
07db08e39d | ||
|
|
ca0e308105 | ||
|
|
65b8f3821b | ||
|
|
c447d75916 | ||
|
|
cf0b9eb37c | ||
|
|
e8d677620c | ||
|
|
0fcdfdeed6 | ||
|
|
acac2adfc8 | ||
|
|
49823a4939 | ||
|
|
68bb75c847 | ||
|
|
52a37913c1 | ||
|
|
77b9a41f1f | ||
|
|
e09c144674 | ||
|
|
33056046a3 | ||
|
|
d5141c4e03 | ||
|
|
03fc4d31d0 | ||
|
|
65b36642f8 | ||
|
|
acb91b1b3f | ||
|
|
fc326b3dde | ||
|
|
2067619a26 | ||
|
|
07fe8d28be | ||
|
|
517b4f4cd4 | ||
|
|
72a750e0eb | ||
|
|
bb561baf9e | ||
|
|
fcf6d127fd | ||
|
|
8daadd2c8c | ||
|
|
c40ea1f0fd | ||
|
|
1358bd9319 | ||
|
|
001f26b642 | ||
|
|
348004c34f | ||
|
|
3e58b3a5d4 | ||
|
|
c3229e1b34 | ||
|
|
2abf3d258d | ||
|
|
d6955f25b2 | ||
|
|
f6f2246f59 | ||
|
|
ee53f7d813 | ||
|
|
d619ba2685 | ||
|
|
6b1967ed33 | ||
|
|
d777cef837 | ||
|
|
e3f7b69105 | ||
|
|
0e5bcdf695 | ||
|
|
0dedb3e139 | ||
|
|
ab4549d2bc | ||
|
|
80f9473fb4 | ||
|
|
c75f5a376b | ||
|
|
366fae684c | ||
|
|
f4c625d3a1 | ||
|
|
3019713402 | ||
|
|
606a4362b3 | ||
|
|
ccef14e2b2 | ||
|
|
b3154b2120 | ||
|
|
b0fd8f2d74 | ||
|
|
389376c40e | ||
|
|
e78bdd654d | ||
|
|
8ae113ff36 | ||
|
|
2e98437392 | ||
|
|
6d862b2916 | ||
|
|
11ac75edcb | ||
|
|
4d5566a6b7 | ||
|
|
8489673cea | ||
|
|
fb8a07660a | ||
|
|
3c40933713 | ||
|
|
a3ec805c97 | ||
|
|
b30ca652ae | ||
|
|
e10f730478 | ||
|
|
e2ab78d876 | ||
|
|
a644d8cb93 | ||
|
|
693865a649 | ||
|
|
9903305dda | ||
|
|
14df753086 | ||
|
|
2ecfda80ac | ||
|
|
bb47009656 | ||
|
|
3286325044 | ||
|
|
7d5c336c56 | ||
|
|
71d06ef1b2 | ||
|
|
d89d8fe852 | ||
|
|
70e7a465d8 | ||
|
|
935b120949 | ||
|
|
1410e79e7f | ||
|
|
e4389f7d23 | ||
|
|
bdc9889d3a | ||
|
|
321f9140d1 | ||
|
|
23114aeb81 | ||
|
|
1667ed9d1c | ||
|
|
93839e2f73 | ||
|
|
ad21a4f07b | ||
|
|
b682a1961a | ||
|
|
a0a3b23e35 | ||
|
|
95d793456b | ||
|
|
d016b572e3 | ||
|
|
84926b1d5a | ||
|
|
c575c5d5f6 | ||
|
|
6b1a4f30a8 | ||
|
|
ab7bfa86e2 | ||
|
|
241168926d | ||
|
|
cb6454118c | ||
|
|
eeab4141db | ||
|
|
cb9dc56630 | ||
|
|
f2e630a05e | ||
|
|
0b602ae101 | ||
|
|
dc11131656 | ||
|
|
d6b9327c11 | ||
|
|
aa6e8e9325 | ||
|
|
5490a664f5 | ||
|
|
cee34f7290 | ||
|
|
884ad75cb8 | ||
|
|
18e456d38d | ||
|
|
6742026568 | ||
|
|
04bdff4115 | ||
|
|
ccbd045f02 | ||
|
|
1104054d73 | ||
|
|
217e0efd20 | ||
|
|
849dea92a8 | ||
|
|
a2b0260f0f | ||
|
|
a4cdffdd69 | ||
|
|
ddcbf80f23 | ||
|
|
c411e7eb0d | ||
|
|
83105590a0 | ||
|
|
4163c1a514 | ||
|
|
ea9eb2fc8f | ||
|
|
afdd4803f8 | ||
|
|
d3d6be8210 | ||
|
|
beab9733f8 | ||
|
|
5a74b12b45 | ||
|
|
f38570ac55 | ||
|
|
17494099a9 | ||
|
|
140caf99b8 | ||
|
|
10590c2f80 | ||
|
|
e4ee607fc8 | ||
|
|
bae8f82ba8 | ||
|
|
c5e5cc5e9f | ||
|
|
54bd124665 | ||
|
|
5fbfbde532 | ||
|
|
378f354939 | ||
|
|
65045ba54b | ||
|
|
09a2bee8aa | ||
|
|
115abf9c53 | ||
|
|
0780913848 | ||
|
|
39732838b4 | ||
|
|
53bd0b55cb | ||
|
|
722d186ca0 | ||
|
|
1718eff54a | ||
|
|
f5c210d33d | ||
|
|
d948c6e867 | ||
|
|
c437bb08f1 | ||
|
|
8323a08642 | ||
|
|
4d99f9d96a | ||
|
|
6286afd456 | ||
|
|
1a6f2b29b8 | ||
|
|
bc06406d7d | ||
|
|
66f83d33e6 | ||
|
|
84ed9b5a63 | ||
|
|
215eee4fe5 | ||
|
|
ff51e7322d | ||
|
|
809b232fa2 | ||
|
|
f79a5a9dee | ||
|
|
c37d3ae97d | ||
|
|
4fb2134f00 | ||
|
|
b220a825a7 | ||
|
|
1933d5d6fb | ||
|
|
8bce5370c7 | ||
|
|
64d629ba2a | ||
|
|
8584d3697d | ||
|
|
06949ae510 | ||
|
|
d882717d98 | ||
|
|
4f883d5971 | ||
|
|
fe9f088d60 | ||
|
|
b6aae2b322 | ||
|
|
7391e23332 |
2702 changed files with 634775 additions and 415671 deletions
|
|
@ -1,293 +0,0 @@
|
||||||
# Python CircleCI 2.0 configuration file
|
|
||||||
#
|
|
||||||
# Check https://circleci.com/docs/2.0/language-python/ for more details
|
|
||||||
#
|
|
||||||
version: 2
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
docker:
|
|
||||||
# specify the version you desire here
|
|
||||||
# use `-browsers` prefix for selenium tests, e.g. `3.6.1-browsers`
|
|
||||||
- image: circleci/python:2.7.13
|
|
||||||
|
|
||||||
# Specify service dependencies here if necessary
|
|
||||||
# CircleCI maintains a library of pre-built images
|
|
||||||
# documented at https://circleci.com/docs/2.0/circleci-images/
|
|
||||||
# - image: circleci/postgres:9.4
|
|
||||||
environment:
|
|
||||||
TEST_PLATFORM: "-e megaatmega2560"
|
|
||||||
|
|
||||||
working_directory: ~/Marlin
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- checkout
|
|
||||||
|
|
||||||
- restore_cache:
|
|
||||||
paths:
|
|
||||||
- ~/.platformio
|
|
||||||
- ~/Marlin/.piolibdeps
|
|
||||||
keys:
|
|
||||||
- v1-dependencies-{{ checksum "~/Marlin/platformio.ini" }}
|
|
||||||
# fallback to using the latest cache if no exact match is found
|
|
||||||
- v1-dependencies-
|
|
||||||
|
|
||||||
- run:
|
|
||||||
name: install dependencies
|
|
||||||
command: |
|
|
||||||
sudo pip install -U platformio
|
|
||||||
|
|
||||||
# run tests!
|
|
||||||
- run:
|
|
||||||
name: run tests
|
|
||||||
command: |
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# Fetch the tag information for the current branch
|
|
||||||
ls -la
|
|
||||||
git fetch origin --tags
|
|
||||||
#
|
|
||||||
# Publish the buildroot script folder
|
|
||||||
chmod +x buildroot/bin/*
|
|
||||||
export PATH=`pwd`/buildroot/bin/:${PATH}
|
|
||||||
|
|
||||||
# Generate custom version include
|
|
||||||
generate_version ./Marlin/src/inc
|
|
||||||
cat ./Marlin/src/inc/_Version.h
|
|
||||||
#
|
|
||||||
# Backup pins_RAMPS.h
|
|
||||||
#
|
|
||||||
cp Marlin/src/pins/pins_RAMPS.h Marlin/src/pins/pins_RAMPS.h.backup
|
|
||||||
#
|
|
||||||
|
|
||||||
env_backup
|
|
||||||
|
|
||||||
#################################
|
|
||||||
# Build all sample configurations
|
|
||||||
#################################
|
|
||||||
|
|
||||||
echo testing megaatmega2560 targets...
|
|
||||||
export TEST_PLATFORM="-e megaatmega2560"
|
|
||||||
restore_configs
|
|
||||||
echo use_example_configs adafruit/ST7565
|
|
||||||
use_example_configs adafruit/ST7565
|
|
||||||
build_marlin_pio ./ ${TEST_PLATFORM}
|
|
||||||
restore_configs
|
|
||||||
echo use_example_configs BQ/Hephestos
|
|
||||||
use_example_configs BQ/Hephestos
|
|
||||||
build_marlin_pio ./ ${TEST_PLATFORM}
|
|
||||||
restore_configs
|
|
||||||
echo use_example_configs BQ/Hephestos_2
|
|
||||||
use_example_configs BQ/Hephestos_2
|
|
||||||
build_marlin_pio ./ ${TEST_PLATFORM}
|
|
||||||
restore_configs
|
|
||||||
echo use_example_configs BQ/WITBOX
|
|
||||||
use_example_configs BQ/WITBOX
|
|
||||||
build_marlin_pio ./ ${TEST_PLATFORM}
|
|
||||||
restore_configs
|
|
||||||
echo use_example_configs AliExpress/CL-260
|
|
||||||
use_example_configs AliExpress/CL-260
|
|
||||||
build_marlin_pio ./ ${TEST_PLATFORM}
|
|
||||||
restore_configs
|
|
||||||
echo use_example_configs Cartesio
|
|
||||||
use_example_configs Cartesio
|
|
||||||
build_marlin_pio ./ ${TEST_PLATFORM}
|
|
||||||
restore_configs
|
|
||||||
echo use_example_configs delta/FLSUN/auto_calibrate
|
|
||||||
use_example_configs delta/FLSUN/auto_calibrate
|
|
||||||
build_marlin_pio ./ ${TEST_PLATFORM}
|
|
||||||
restore_configs
|
|
||||||
echo use_example_configs delta/FLSUN/kossel_mini
|
|
||||||
use_example_configs delta/FLSUN/kossel_mini
|
|
||||||
build_marlin_pio ./ ${TEST_PLATFORM}
|
|
||||||
restore_configs
|
|
||||||
echo use_example_configs delta/generic
|
|
||||||
use_example_configs delta/generic
|
|
||||||
build_marlin_pio ./ ${TEST_PLATFORM}
|
|
||||||
restore_configs
|
|
||||||
echo use_example_configs delta/kossel_mini
|
|
||||||
use_example_configs delta/kossel_mini
|
|
||||||
build_marlin_pio ./ ${TEST_PLATFORM}
|
|
||||||
restore_configs
|
|
||||||
echo use_example_configs delta/kossel_xl
|
|
||||||
use_example_configs delta/kossel_xl
|
|
||||||
build_marlin_pio ./ ${TEST_PLATFORM}
|
|
||||||
restore_configs
|
|
||||||
echo use_example_configs Felix
|
|
||||||
use_example_configs Felix
|
|
||||||
build_marlin_pio ./ ${TEST_PLATFORM}
|
|
||||||
restore_configs
|
|
||||||
echo use_example_configs Felix/DUAL
|
|
||||||
use_example_configs Felix/DUAL
|
|
||||||
build_marlin_pio ./ ${TEST_PLATFORM}
|
|
||||||
restore_configs
|
|
||||||
echo use_example_configs gCreate/gMax1.5+
|
|
||||||
use_example_configs gCreate/gMax1.5+
|
|
||||||
build_marlin_pio ./ ${TEST_PLATFORM}
|
|
||||||
restore_configs
|
|
||||||
echo use_example_configs Geeetech/GT2560
|
|
||||||
use_example_configs Geeetech/GT2560
|
|
||||||
build_marlin_pio ./ ${TEST_PLATFORM}
|
|
||||||
restore_configs
|
|
||||||
echo use_example_configs Geeetech/I3_Pro_X-GT2560
|
|
||||||
use_example_configs Geeetech/I3_Pro_X-GT2560
|
|
||||||
build_marlin_pio ./ ${TEST_PLATFORM}
|
|
||||||
restore_configs
|
|
||||||
echo use_example_configs Infitary/i3-M508
|
|
||||||
use_example_configs Infitary/i3-M508
|
|
||||||
build_marlin_pio ./ ${TEST_PLATFORM}
|
|
||||||
restore_configs
|
|
||||||
#
|
|
||||||
# Disabled due to compile failure on E0_AUTO_FAN_PIN PB8
|
|
||||||
#
|
|
||||||
# use_example_configs Malyan/M200
|
|
||||||
# build_marlin_pio ./ ${TEST_PLATFORM}
|
|
||||||
# restore_configs
|
|
||||||
echo use_example_configs Micromake/C1/basic
|
|
||||||
use_example_configs Micromake/C1/basic
|
|
||||||
build_marlin_pio ./ ${TEST_PLATFORM}
|
|
||||||
restore_configs
|
|
||||||
echo use_example_configs Micromake/C1/enhanced
|
|
||||||
use_example_configs Micromake/C1/enhanced
|
|
||||||
build_marlin_pio ./ ${TEST_PLATFORM}
|
|
||||||
restore_configs
|
|
||||||
echo use_example_configs RepRapWorld/Megatronics
|
|
||||||
use_example_configs RepRapWorld/Megatronics
|
|
||||||
build_marlin_pio ./ ${TEST_PLATFORM}
|
|
||||||
restore_configs
|
|
||||||
echo use_example_configs RigidBot
|
|
||||||
use_example_configs RigidBot
|
|
||||||
build_marlin_pio ./ ${TEST_PLATFORM}
|
|
||||||
restore_configs
|
|
||||||
echo use_example_configs SCARA
|
|
||||||
use_example_configs SCARA
|
|
||||||
build_marlin_pio ./ ${TEST_PLATFORM}
|
|
||||||
restore_configs
|
|
||||||
echo use_example_configs Velleman/K8200
|
|
||||||
use_example_configs Velleman/K8200
|
|
||||||
build_marlin_pio ./ ${TEST_PLATFORM}
|
|
||||||
restore_configs
|
|
||||||
echo use_example_configs Velleman/K8400/Dual-head
|
|
||||||
use_example_configs Velleman/K8400/Dual-head
|
|
||||||
build_marlin_pio ./ ${TEST_PLATFORM}
|
|
||||||
restore_configs
|
|
||||||
echo use_example_configs Velleman/K8400
|
|
||||||
use_example_configs Velleman/K8400
|
|
||||||
build_marlin_pio ./ ${TEST_PLATFORM}
|
|
||||||
restore_configs
|
|
||||||
echo use_example_configs Wanhao/Duplicator6
|
|
||||||
use_example_configs Wanhao/Duplicator6
|
|
||||||
build_marlin_pio ./ ${TEST_PLATFORM}
|
|
||||||
#
|
|
||||||
# Disabled due to compile failure on https://github.com/stawel/SlowSoftI2CMaster
|
|
||||||
#
|
|
||||||
# - Requires https://github.com/stawel/SlowSoftI2CMaster
|
|
||||||
# restore_configs
|
|
||||||
# use_example_configs wt150
|
|
||||||
# build_marlin_pio ./ ${TEST_PLATFORM}
|
|
||||||
|
|
||||||
|
|
||||||
echo testing anet10 targets...
|
|
||||||
export TEST_PLATFORM="-e anet10"
|
|
||||||
restore_configs
|
|
||||||
echo use_example_configs Anet/A6
|
|
||||||
use_example_configs Anet/A6
|
|
||||||
build_marlin_pio ./ ${TEST_PLATFORM}
|
|
||||||
restore_configs
|
|
||||||
echo use_example_configs Anet/A8
|
|
||||||
use_example_configs Anet/A8
|
|
||||||
build_marlin_pio ./ ${TEST_PLATFORM}
|
|
||||||
restore_configs
|
|
||||||
echo use_example_configs Creality/CR-10
|
|
||||||
use_example_configs Creality/CR-10
|
|
||||||
build_marlin_pio ./ ${TEST_PLATFORM}
|
|
||||||
restore_configs
|
|
||||||
echo use_example_configs Malyan/M150
|
|
||||||
use_example_configs Malyan/M150
|
|
||||||
build_marlin_pio ./ ${TEST_PLATFORM}
|
|
||||||
restore_configs
|
|
||||||
echo use_example_configs Sanguinololu
|
|
||||||
use_example_configs Sanguinololu
|
|
||||||
build_marlin_pio ./ ${TEST_PLATFORM}
|
|
||||||
restore_configs
|
|
||||||
echo use_example_configs TinyBoy2
|
|
||||||
use_example_configs TinyBoy2
|
|
||||||
build_marlin_pio ./ ${TEST_PLATFORM}
|
|
||||||
|
|
||||||
|
|
||||||
echo testing rambo targets...
|
|
||||||
export TEST_PLATFORM="-e rambo"
|
|
||||||
restore_configs
|
|
||||||
echo use_example_configs AlephObjects/TAZ4
|
|
||||||
use_example_configs AlephObjects/TAZ4
|
|
||||||
build_marlin_pio ./ ${TEST_PLATFORM}
|
|
||||||
|
|
||||||
|
|
||||||
echo testing teensy20 targets...
|
|
||||||
export TEST_PLATFORM="-e teensy20"
|
|
||||||
#
|
|
||||||
# Disabled due to Z_MIN_PIN related compile failure
|
|
||||||
#
|
|
||||||
# restore_configs
|
|
||||||
# use_example_configs delta/kossel_pro
|
|
||||||
# build_marlin_pio ./ ${TEST_PLATFORM}
|
|
||||||
restore_configs
|
|
||||||
echo use_example_configs makibox
|
|
||||||
use_example_configs makibox
|
|
||||||
build_marlin_pio ./ ${TEST_PLATFORM}
|
|
||||||
|
|
||||||
|
|
||||||
echo testing sanguino_atmega644p targets...
|
|
||||||
export TEST_PLATFORM="-e sanguino_atmega644p"
|
|
||||||
restore_configs
|
|
||||||
echo use_example_configs tvrrug/Round2
|
|
||||||
use_example_configs tvrrug/Round2
|
|
||||||
build_marlin_pio ./ ${TEST_PLATFORM}
|
|
||||||
|
|
||||||
|
|
||||||
echo testing LPC1768 targets...
|
|
||||||
export TEST_PLATFORM="-e LPC1768"
|
|
||||||
restore_configs
|
|
||||||
echo use_example_configs FolgerTech/i3-2020
|
|
||||||
use_example_configs FolgerTech/i3-2020
|
|
||||||
build_marlin_pio ./ ${TEST_PLATFORM}
|
|
||||||
restore_configs
|
|
||||||
echo use_example_configs Mks/Sbase
|
|
||||||
use_example_configs Mks/Sbase
|
|
||||||
build_marlin_pio ./ ${TEST_PLATFORM}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Disabled due to numerous compile failures
|
|
||||||
#
|
|
||||||
# echo testing STM32F1 targets...
|
|
||||||
# export TEST_PLATFORM="-e STM32F1"
|
|
||||||
# restore_configs
|
|
||||||
# use_example_configs STM32F10
|
|
||||||
# build_marlin_pio ./ ${TEST_PLATFORM}
|
|
||||||
# restore_configs
|
|
||||||
# use_example_configs stm32f103ret6
|
|
||||||
# build_marlin_pio ./ ${TEST_PLATFORM}
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# Disabled due do pin related compile failures
|
|
||||||
#
|
|
||||||
# echo testing DUE targets...
|
|
||||||
# export TEST_PLATFORM="-e DUE"
|
|
||||||
# restore_configs
|
|
||||||
# use_example_configs UltiMachine/Archim2
|
|
||||||
# build_marlin_pio ./ ${TEST_PLATFORM}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Remove temp files from dependencies tree prior to caching
|
|
||||||
rm -rf ~/Marlin/.piolibdeps/_tmp_*
|
|
||||||
|
|
||||||
#
|
|
||||||
# Restore the environment
|
|
||||||
#
|
|
||||||
env_restore
|
|
||||||
|
|
||||||
- save_cache:
|
|
||||||
paths:
|
|
||||||
- ~/.platformio
|
|
||||||
- ~/Marlin/.piolibdeps
|
|
||||||
key: v1-dependencies-{{ checksum "~/Marlin/platformio.ini" }}
|
|
||||||
19
.editorconfig
Normal file
19
.editorconfig
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
# editorconfig.org
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[{*.patch,syntax_test_*}]
|
||||||
|
trim_trailing_whitespace = false
|
||||||
|
|
||||||
|
[{*.c,*.cpp,*.h}]
|
||||||
|
charset = utf-8
|
||||||
|
|
||||||
|
[{*.c,*.cpp,*.h,Makefile}]
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
insert_final_newline = true
|
||||||
|
end_of_line = lf
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
[{*.py,*.conf,*.sublime-project}]
|
||||||
|
indent_style = tab
|
||||||
|
indent_size = 4
|
||||||
3
.github/FUNDING.yml
vendored
Normal file
3
.github/FUNDING.yml
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
github: [thinkyhead]
|
||||||
|
patreon: thinkyhead
|
||||||
|
custom: ["https://www.thinkyhead.com/donate-to-marlin"]
|
||||||
59
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
59
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
|
|
@ -0,0 +1,59 @@
|
||||||
|
---
|
||||||
|
name: Bug report
|
||||||
|
about: Report a bug in Marlin
|
||||||
|
title: "[BUG] (short description)"
|
||||||
|
labels: ''
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<!--
|
||||||
|
|
||||||
|
Please follow the instructions below. Failure to do so may result in your issue being closed.
|
||||||
|
|
||||||
|
### Before Reporting a Bug
|
||||||
|
|
||||||
|
1. Test with the `bugfix-2.0.x` branch to see whether the issue still exists.
|
||||||
|
|
||||||
|
2. Get troubleshooting help from the Marlin community to confirm it's a bug and not just a configuration error. Links at https://github.com/MarlinFirmware/Marlin/issues/new/choose
|
||||||
|
|
||||||
|
### Instructions
|
||||||
|
|
||||||
|
1. Fill out every section of the template below.
|
||||||
|
|
||||||
|
2. Always attach configuration files, regardless of whether you think they are involved.
|
||||||
|
|
||||||
|
3. Read and understand Marlin's Code of Conduct. By filing an Issue, you are expected to comply with it, including treating everyone with respect: https://github.com/MarlinFirmware/Marlin/blob/master/.github/code_of_conduct.md
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
### Bug Description
|
||||||
|
|
||||||
|
<!-- Describe the bug in this section. (You can remove this invisible comment.) -->
|
||||||
|
|
||||||
|
### Configuration Files
|
||||||
|
|
||||||
|
**Required:** Include a ZIP file containing `Configuration.h` and `Configuration_adv.h`.
|
||||||
|
|
||||||
|
If you've made any other modifications describe them in detail here.
|
||||||
|
|
||||||
|
### Steps to Reproduce
|
||||||
|
|
||||||
|
<!-- Describe the steps needed to reproduce the issue. (You can remove this invisible comment.) -->
|
||||||
|
|
||||||
|
1. [First Step]
|
||||||
|
2. [Second Step]
|
||||||
|
3. [and so on...]
|
||||||
|
|
||||||
|
**Expected behavior:**
|
||||||
|
|
||||||
|
<!-- Describe what you expected to happen here. (You can remove this invisible comment.) -->
|
||||||
|
|
||||||
|
**Actual behavior:**
|
||||||
|
|
||||||
|
<!-- Describe what actually happens here. (You can remove this invisible comment.) -->
|
||||||
|
|
||||||
|
#### Additional Information
|
||||||
|
|
||||||
|
* Provide pictures or links to videos that clearly demonstrate the issue.
|
||||||
|
* See [Contributing to Marlin](https://github.com/MarlinFirmware/Marlin/blob/2.0.x/.github/contributing.md) for additional guidelines.
|
||||||
17
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
17
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
blank_issues_enabled: false
|
||||||
|
contact_links:
|
||||||
|
- name: Marlin Documentation
|
||||||
|
url: http://marlinfw.org/
|
||||||
|
about: Lots of documentation on installing and using Marlin.
|
||||||
|
- name: MarlinFirmware Facebook group
|
||||||
|
url: https://www.facebook.com/groups/1049718498464482
|
||||||
|
about: Please ask and answer questions here.
|
||||||
|
- name: Marlin on Discord
|
||||||
|
url: https://discord.gg/n5NJ59y
|
||||||
|
about: Join the Discord server for support and discussion.
|
||||||
|
- name: Marlin Discussion Forum
|
||||||
|
url: http://forums.reprap.org/list.php?415
|
||||||
|
about: A searchable web forum hosted by RepRap dot org.
|
||||||
|
- name: Marlin Videos on YouTube
|
||||||
|
url: https://www.youtube.com/results?search_query=marlin+firmware
|
||||||
|
about: Tutorials and more from Marlin users all around the world. Great for new users!
|
||||||
35
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
35
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
---
|
||||||
|
name: Feature request
|
||||||
|
about: Request a Feature
|
||||||
|
title: "[FR] (feature request title)"
|
||||||
|
labels: 'T: Feature Request'
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<!--
|
||||||
|
|
||||||
|
Have you read Marlin's Code of Conduct? By filing an Issue, you are expected to comply with it, including treating everyone with respect: https://github.com/MarlinFirmware/Marlin/blob/master/.github/code_of_conduct.md
|
||||||
|
|
||||||
|
Do you want to ask a question? Are you looking for support? Please don't post here. Instead please use one of the support links at https://github.com/MarlinFirmware/Marlin/issues/new/choose
|
||||||
|
|
||||||
|
Before filing an issue be sure to test the "bugfix" branches to see whether the issue has been resolved.
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
### Description
|
||||||
|
|
||||||
|
<!-- Description of the requested feature -->
|
||||||
|
|
||||||
|
### Feature Workflow
|
||||||
|
|
||||||
|
<!-- Please describe the feature's behavior, user interaction, etc. -->
|
||||||
|
|
||||||
|
1. [First Action]
|
||||||
|
2. [Second Action]
|
||||||
|
3. [and so on...]
|
||||||
|
|
||||||
|
#### Additional Information
|
||||||
|
|
||||||
|
* Provide pictures or links that demonstrate a similar feature or concept.
|
||||||
|
* See [How Can I Contribute](#how-can-i-contribute) for additional guidelines.
|
||||||
19
.github/contributing.md
vendored
19
.github/contributing.md
vendored
|
|
@ -34,16 +34,15 @@ This project and everyone participating in it is governed by the [Marlin Code of
|
||||||
|
|
||||||
We have a Message Board and a Facebook group where our knowledgable user community can provide helpful advice if you have questions.
|
We have a Message Board and a Facebook group where our knowledgable user community can provide helpful advice if you have questions.
|
||||||
|
|
||||||
* [Marlin RepRap forum](http://forums.reprap.org/list.php?415)
|
* [Marlin RepRap forum](https://reprap.org/forum/list.php?415)
|
||||||
* [MarlinFirmware on Facebook](https://www.facebook.com/groups/1049718498464482/)
|
* [MarlinFirmware on Facebook](https://www.facebook.com/groups/1049718498464482/)
|
||||||
|
|
||||||
If chat is more your speed, you can join the MarlinFirmware Slack team:
|
If chat is more your speed, you can join the MarlinFirmware Discord server:
|
||||||
|
|
||||||
* Join the Marlin Slack Team
|
* Use the link https://discord.gg/n5NJ59y to join up as a General User.
|
||||||
* To obtain group access, please [send a request](http://www.thinkyhead.com/contact/9) to @thinkyhead.
|
* Even though our Discord is pretty active, it may take a while for community members to respond — please be patient!
|
||||||
* Even though Slack is a chat service, sometimes it takes several hours for community members to respond — please be patient!
|
|
||||||
* Use the `#general` channel for general questions or discussion about Marlin.
|
* Use the `#general` channel for general questions or discussion about Marlin.
|
||||||
* Other channels exist for certain topics. Check the channel list.
|
* Other channels exist for certain topics or are limited to Patrons. Check the channel list.
|
||||||
|
|
||||||
## How Can I Contribute?
|
## How Can I Contribute?
|
||||||
|
|
||||||
|
|
@ -93,7 +92,7 @@ Before creating a suggestion, please check [this list](#before-submitting-a-sugg
|
||||||
|
|
||||||
#### Before Submitting a Feature Request
|
#### Before Submitting a Feature Request
|
||||||
|
|
||||||
* **Check the [Marlin website](http://marlinfw.org/)** for tips — you might discover that the feature is already included. Most importantly, check if you're using [the latest version of Marlin](https://github.com/MarlinFirmware/Marlin/releases) and if you can get the desired behavior by changing [Marlin's config settings](http://marlinfw.org/docs/configuration/configuration.html).
|
* **Check the [Marlin website](https://marlinfw.org/)** for tips — you might discover that the feature is already included. Most importantly, check if you're using [the latest version of Marlin](https://github.com/MarlinFirmware/Marlin/releases) and if you can get the desired behavior by changing [Marlin's config settings](https://marlinfw.org/docs/configuration/configuration.html).
|
||||||
* **Perform a [cursory search](https://github.com/MarlinFirmware/Marlin/issues?q=is%3Aissue)** to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
|
* **Perform a [cursory search](https://github.com/MarlinFirmware/Marlin/issues?q=is%3Aissue)** to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
|
||||||
|
|
||||||
#### How Do I Submit A (Good) Feature Request?
|
#### How Do I Submit A (Good) Feature Request?
|
||||||
|
|
@ -117,12 +116,12 @@ Unsure where to begin contributing to Marlin? You can start by looking through t
|
||||||
|
|
||||||
### Pull Requests
|
### Pull Requests
|
||||||
|
|
||||||
Pull Requests should always be targeted to working branches (e.g., `bugfix-1.1.x` and/or `bugfix-2.0.x`) and never to release branches (e.g., `1.1.x`). If this is your first Pull Request, please read our [Guide to Pull Requests](http://marlinfw.org/docs/development/getting_started_pull_requests.html) and Github's [Pull Request](https://help.github.com/articles/creating-a-pull-request/) documentation.
|
Pull Requests should always be targeted to working branches (e.g., `bugfix-1.1.x` and/or `bugfix-2.0.x`) and never to release branches (e.g., `1.1.x`). If this is your first Pull Request, please read our [Guide to Pull Requests](https://marlinfw.org/docs/development/getting_started_pull_requests.html) and Github's [Pull Request](https://help.github.com/articles/creating-a-pull-request/) documentation.
|
||||||
|
|
||||||
* Fill in [the required template](pull_request_template.md).
|
* Fill in [the required template](pull_request_template.md).
|
||||||
* Don't include issue numbers in the PR title.
|
* Don't include issue numbers in the PR title.
|
||||||
* Include pictures, diagrams, and links to videos in your Pull Request to demonstrate your changes, if needed.
|
* Include pictures, diagrams, and links to videos in your Pull Request to demonstrate your changes, if needed.
|
||||||
* Follow the [Coding Standards](http://marlinfw.org/docs/development/coding_standards.html) posted on our website.
|
* Follow the [Coding Standards](https://marlinfw.org/docs/development/coding_standards.html) posted on our website.
|
||||||
* Document new code with clear and concise comments.
|
* Document new code with clear and concise comments.
|
||||||
* End all files with a newline.
|
* End all files with a newline.
|
||||||
|
|
||||||
|
|
@ -137,7 +136,7 @@ Pull Requests should always be targeted to working branches (e.g., `bugfix-1.1.x
|
||||||
|
|
||||||
### C++ Coding Standards
|
### C++ Coding Standards
|
||||||
|
|
||||||
* Please read and follow the [Coding Standards](http://marlinfw.org/docs/development/coding_standards.html) posted on our website. Failure to follow these guidelines will delay evaluation and acceptance of Pull Requests.
|
* Please read and follow the [Coding Standards](https://marlinfw.org/docs/development/coding_standards.html) posted on our website. Failure to follow these guidelines will delay evaluation and acceptance of Pull Requests.
|
||||||
|
|
||||||
### Documentation
|
### Documentation
|
||||||
|
|
||||||
|
|
|
||||||
34
.github/issue_template.md
vendored
34
.github/issue_template.md
vendored
|
|
@ -1,31 +1,11 @@
|
||||||
<!--
|
# NO SUPPORT REQUESTS PLEASE
|
||||||
|
|
||||||
Have you read Marlin's Code of Conduct? By filing an Issue, you are expected to comply with it, including treating everyone with respect: https://github.com/MarlinFirmware/Marlin/blob/master/.github/code_of_conduct.md
|
Do you want to ask a question? Are you looking for support? Please don't post here. Support Requests posted here will be automatically closed!
|
||||||
|
|
||||||
Do you want to ask a question? Are you looking for support? Please don't post here. Instead please use the Marlin Firmware forum at http://forums.reprap.org/list.php?415 or the Marlin Facebook Group https://www.facebook.com/groups/1049718498464482/.
|
Instead use one of the following options:
|
||||||
|
|
||||||
Before filing an issue be sure to test the 1.1 and/or 2.0 "bugfix" branches to see whether the issue is already addressed.
|
- The Marlin Firmware forum at https://reprap.org/forum/list.php?415
|
||||||
|
- The MarlinFirmware Facebook Group at https://www.facebook.com/groups/1049718498464482/
|
||||||
|
- The MarlinFirmware Discord Server at https://discord.gg/n5NJ59y.
|
||||||
|
|
||||||
-->
|
Before filing an issue be sure to test the latest "bugfix" branch to see whether the issue is already addressed.
|
||||||
|
|
||||||
### Description
|
|
||||||
|
|
||||||
<!-- Description of the bug or requested feature -->
|
|
||||||
|
|
||||||
### Steps to Reproduce
|
|
||||||
|
|
||||||
<!-- If this is a Bug Report, please describe the steps needed to reproduce the issue -->
|
|
||||||
|
|
||||||
1. [First Step]
|
|
||||||
2. [Second Step]
|
|
||||||
3. [and so on...]
|
|
||||||
|
|
||||||
**Expected behavior:** [What you expect to happen]
|
|
||||||
|
|
||||||
**Actual behavior:** [What actually happens]
|
|
||||||
|
|
||||||
#### Additional Information
|
|
||||||
|
|
||||||
* Include a ZIP file containing your `Configuration.h` and `Configuration_adv.h` files.
|
|
||||||
* Provide pictures or links to videos that clearly demonstrate the issue.
|
|
||||||
* See [How Can I Contribute](#how-can-i-contribute) for additional guidelines.
|
|
||||||
|
|
|
||||||
40
.github/lock.yml
vendored
Normal file
40
.github/lock.yml
vendored
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
#
|
||||||
|
# Configuration for Lock Threads - https://github.com/dessant/lock-threads-app
|
||||||
|
#
|
||||||
|
|
||||||
|
# Number of days of inactivity before a closed issue or pull request is locked
|
||||||
|
daysUntilLock: 60
|
||||||
|
|
||||||
|
# Skip issues and pull requests created before a given timestamp. Timestamp must
|
||||||
|
# follow ISO 8601 (`YYYY-MM-DD`). Set to `false` to disable
|
||||||
|
skipCreatedBefore: false
|
||||||
|
|
||||||
|
# Issues and pull requests with these labels will be ignored. Set to `[]` to disable
|
||||||
|
exemptLabels: [ 'no-locking' ]
|
||||||
|
|
||||||
|
# Label to add before locking, such as `outdated`. Set to `false` to disable
|
||||||
|
lockLabel: false
|
||||||
|
|
||||||
|
# Comment to post before locking. Set to `false` to disable
|
||||||
|
lockComment: >
|
||||||
|
This thread has been automatically locked since there has not been
|
||||||
|
any recent activity after it was closed. Please open a new issue for
|
||||||
|
related bugs.
|
||||||
|
|
||||||
|
# Assign `resolved` as the reason for locking. Set to `false` to disable
|
||||||
|
setLockReason: true
|
||||||
|
|
||||||
|
# Limit to only `issues` or `pulls`
|
||||||
|
# only: issues
|
||||||
|
|
||||||
|
# Optionally, specify configuration settings just for `issues` or `pulls`
|
||||||
|
# issues:
|
||||||
|
# exemptLabels:
|
||||||
|
# - help-wanted
|
||||||
|
# lockLabel: outdated
|
||||||
|
|
||||||
|
# pulls:
|
||||||
|
# daysUntilLock: 30
|
||||||
|
|
||||||
|
# Repository to extend settings from
|
||||||
|
# _extends: repo
|
||||||
4
.github/pull_request_template.md
vendored
4
.github/pull_request_template.md
vendored
|
|
@ -14,6 +14,10 @@ We must be able to understand your proposed change from this description. If we
|
||||||
|
|
||||||
<!-- What does this fix or improve? -->
|
<!-- What does this fix or improve? -->
|
||||||
|
|
||||||
|
### Configurations
|
||||||
|
|
||||||
|
<!-- Attach any Configuration.h, Configuration_adv.h, or platformio.ini files needed to compile/test your Pull Request. -->
|
||||||
|
|
||||||
### Related Issues
|
### Related Issues
|
||||||
|
|
||||||
<!-- Whether this fixes a bug or fulfills a feature request, please list any related Issues here. -->
|
<!-- Whether this fixes a bug or fulfills a feature request, please list any related Issues here. -->
|
||||||
|
|
|
||||||
35
.github/workflows/bump-date.yml
vendored
Normal file
35
.github/workflows/bump-date.yml
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
#
|
||||||
|
# bump-date.yml
|
||||||
|
# Bump the distribution date once per day
|
||||||
|
#
|
||||||
|
|
||||||
|
name: Bump Distribution Date
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 0 * * *'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
bump_date:
|
||||||
|
name: Bump Distribution Date
|
||||||
|
if: github.repository == 'MarlinFirmware/Marlin'
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Check out bugfix-2.0.x
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
ref: bugfix-2.0.x
|
||||||
|
|
||||||
|
- name: Bump Distribution Date
|
||||||
|
run: |
|
||||||
|
# Inline Bump Script
|
||||||
|
DIST=$( date +"%Y-%m-%d" )
|
||||||
|
eval "sed -E -i 's/(#define +STRING_DISTRIBUTION_DATE) .*$/\1 \"$DIST\"/g' Marlin/src/inc/Version.h" && \
|
||||||
|
git config user.name "${GITHUB_ACTOR}" && \
|
||||||
|
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" && \
|
||||||
|
git add . && \
|
||||||
|
git commit -m "[cron] Bump distribution date ($DIST)" && \
|
||||||
|
git push
|
||||||
33
.github/workflows/check-pr.yml
vendored
Normal file
33
.github/workflows/check-pr.yml
vendored
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
#
|
||||||
|
# check-pr.yml
|
||||||
|
# Close PRs directed at release branches
|
||||||
|
#
|
||||||
|
|
||||||
|
name: PR Bad Target
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- 1.0.x
|
||||||
|
- 1.1.x
|
||||||
|
- 2.0.x
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
bad_target:
|
||||||
|
name: PR Bad Target
|
||||||
|
if: github.repository == 'MarlinFirmware/Marlin'
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: peter-evans/close-pull@v1
|
||||||
|
with:
|
||||||
|
delete-branch: false
|
||||||
|
comment: >
|
||||||
|
Thanks for your contribution! Unfortunately we can't accept PRs directed at release branches. We make patches to the bugfix branches and only later do we push them out as releases.
|
||||||
|
|
||||||
|
Please redo this PR starting with the `bugfix-2.0.x` branch and be careful to target `bugfix-2.0.x` when resubmitting the PR.
|
||||||
|
|
||||||
|
It may help to set your fork's default branch to `bugfix-2.0.x`.
|
||||||
|
|
||||||
|
See [this page](http://marlinfw.org/docs/development/getting_started_pull_requests.html) for full instructions.
|
||||||
27
.github/workflows/close-stale.yml
vendored
Normal file
27
.github/workflows/close-stale.yml
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
#
|
||||||
|
# close-stale.yml
|
||||||
|
# Close open issues after a period of inactivity
|
||||||
|
#
|
||||||
|
|
||||||
|
name: Close Stale Issues
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "22 1 * * *"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
stale:
|
||||||
|
name: Close Stale Issues
|
||||||
|
if: github.repository == 'MarlinFirmware/Marlin'
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/stale@v3
|
||||||
|
with:
|
||||||
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
stale-issue-message: 'This issue has had no activity in the last 30 days. Please add a reply if you want to keep this issue active, otherwise it will be automatically closed within 7 days.'
|
||||||
|
days-before-stale: 30
|
||||||
|
days-before-close: 7
|
||||||
|
stale-issue-label: 'stale-closing-soon'
|
||||||
|
exempt-issue-labels: 'T: Feature Request'
|
||||||
32
.github/workflows/lock-closed.yml
vendored
Normal file
32
.github/workflows/lock-closed.yml
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
#
|
||||||
|
# lock-closed.yml
|
||||||
|
# Lock closed issues after a period of inactivity
|
||||||
|
#
|
||||||
|
|
||||||
|
name: Lock Closed Issues
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 1/13 * * *'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lock:
|
||||||
|
name: Lock Closed Issues
|
||||||
|
if: github.repository == 'MarlinFirmware/Marlin'
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: dessant/lock-threads@v2
|
||||||
|
with:
|
||||||
|
github-token: ${{ github.token }}
|
||||||
|
process-only: 'issues'
|
||||||
|
issue-lock-inactive-days: '60'
|
||||||
|
issue-exclude-created-before: ''
|
||||||
|
issue-exclude-labels: 'no-locking'
|
||||||
|
issue-lock-labels: ''
|
||||||
|
issue-lock-comment: >
|
||||||
|
This issue has been automatically locked since there
|
||||||
|
has not been any recent activity after it was closed.
|
||||||
|
Please open a new issue for related bugs.
|
||||||
|
issue-lock-reason: ''
|
||||||
123
.github/workflows/test-builds.yml
vendored
Normal file
123
.github/workflows/test-builds.yml
vendored
Normal file
|
|
@ -0,0 +1,123 @@
|
||||||
|
#
|
||||||
|
# test-builds.yml
|
||||||
|
# Do test builds to catch compile errors
|
||||||
|
#
|
||||||
|
|
||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- bugfix-2.0.x
|
||||||
|
paths-ignore:
|
||||||
|
- config/**
|
||||||
|
- data/**
|
||||||
|
- docs/**
|
||||||
|
- '**/*.md'
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- bugfix-2.0.x
|
||||||
|
paths-ignore:
|
||||||
|
- config/**
|
||||||
|
- data/**
|
||||||
|
- docs/**
|
||||||
|
- '**/*.md'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test_builds:
|
||||||
|
name: Run All Tests
|
||||||
|
if: github.repository == 'MarlinFirmware/Marlin'
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
test-platform:
|
||||||
|
# Base Environments
|
||||||
|
|
||||||
|
- DUE
|
||||||
|
- esp32
|
||||||
|
- linux_native
|
||||||
|
- mega2560
|
||||||
|
- teensy31
|
||||||
|
- teensy35
|
||||||
|
- teensy41
|
||||||
|
- SAMD51_grandcentral_m4
|
||||||
|
|
||||||
|
# Extended AVR Environments
|
||||||
|
|
||||||
|
- FYSETC_F6_13
|
||||||
|
- mega1280
|
||||||
|
- rambo
|
||||||
|
- sanguino1284p
|
||||||
|
- sanguino644p
|
||||||
|
|
||||||
|
# Extended STM32 Environments
|
||||||
|
|
||||||
|
- STM32F103RC_btt
|
||||||
|
- STM32F103RC_btt_USB
|
||||||
|
- STM32F103RE_btt
|
||||||
|
- STM32F103RE_btt_USB
|
||||||
|
- STM32F103RC_fysetc
|
||||||
|
- STM32F103RC_meeb
|
||||||
|
- jgaurora_a5s_a1
|
||||||
|
- STM32F103VE_longer
|
||||||
|
- STM32F407VE_black
|
||||||
|
- STM32F401VE_STEVAL
|
||||||
|
- BIGTREE_BTT002
|
||||||
|
- BIGTREE_SKR_PRO
|
||||||
|
- BIGTREE_GTR_V1_0
|
||||||
|
- mks_robin
|
||||||
|
- mks_robin_stm32
|
||||||
|
- ARMED
|
||||||
|
- FYSETC_S6
|
||||||
|
- STM32F070CB_malyan
|
||||||
|
- STM32F070RB_malyan
|
||||||
|
- malyan_M300
|
||||||
|
- mks_robin_lite
|
||||||
|
- FLYF407ZG
|
||||||
|
- rumba32
|
||||||
|
- mks_robin_pro
|
||||||
|
- STM32F103RET6_creality
|
||||||
|
- LERDGEX
|
||||||
|
- mks_robin_nano35
|
||||||
|
|
||||||
|
# Put lengthy tests last
|
||||||
|
|
||||||
|
- LPC1768
|
||||||
|
- LPC1769
|
||||||
|
|
||||||
|
# STM32 with non-STM framework. both broken for now. they should use HAL_STM32 which is working.
|
||||||
|
|
||||||
|
#- STM32F4
|
||||||
|
#- STM32F7
|
||||||
|
|
||||||
|
# Non-working environment tests
|
||||||
|
#- at90usb1286_cdc
|
||||||
|
#- at90usb1286_dfu
|
||||||
|
#- STM32F103CB_malyan
|
||||||
|
#- mks_robin_mini
|
||||||
|
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Select Python 3.7
|
||||||
|
uses: actions/setup-python@v1
|
||||||
|
with:
|
||||||
|
python-version: '3.7' # Version range or exact version of a Python version to use, using semvers version range syntax.
|
||||||
|
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
|
||||||
|
|
||||||
|
- name: Install PlatformIO
|
||||||
|
run: |
|
||||||
|
pip install -U https://github.com/platformio/platformio-core/archive/develop.zip
|
||||||
|
platformio update
|
||||||
|
|
||||||
|
- name: Check out the PR
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Run ${{ matrix.test-platform }} Tests
|
||||||
|
run: |
|
||||||
|
# Inline tests script
|
||||||
|
chmod +x buildroot/bin/*
|
||||||
|
chmod +x buildroot/tests/*
|
||||||
|
export PATH=./buildroot/bin/:./buildroot/tests/:${PATH}
|
||||||
|
run_tests . ${{ matrix.test-platform }}
|
||||||
22
.github/workflows/unlock-reopened.yml
vendored
Normal file
22
.github/workflows/unlock-reopened.yml
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
#
|
||||||
|
# unlock-reopened.yml
|
||||||
|
# Unlock an issue whenever it is re-opened
|
||||||
|
#
|
||||||
|
|
||||||
|
name: "Unlock reopened issue"
|
||||||
|
|
||||||
|
on:
|
||||||
|
issues:
|
||||||
|
types: [reopened]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
unlock:
|
||||||
|
name: Unlock Reopened
|
||||||
|
if: github.repository == 'MarlinFirmware/Marlin'
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: OSDKDev/unlock-issues@v1.1
|
||||||
|
with:
|
||||||
|
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
19
.gitignore
vendored
19
.gitignore
vendored
|
|
@ -1,9 +1,9 @@
|
||||||
#
|
#
|
||||||
# Marlin 3D Printer Firmware
|
# Marlin 3D Printer Firmware
|
||||||
# Copyright (C) 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
# Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
#
|
#
|
||||||
# Based on Sprinter and grbl.
|
# Based on Sprinter and grbl.
|
||||||
# Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
|
# Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
|
|
||||||
# Our automatic versioning scheme generates the following file
|
# Our automatic versioning scheme generates the following file
|
||||||
|
|
@ -146,6 +146,9 @@ Marlin/*/*/readme.txt
|
||||||
Marlin/*/*/*/readme.txt
|
Marlin/*/*/*/readme.txt
|
||||||
Marlin/*/*/*/*/readme.txt
|
Marlin/*/*/*/*/readme.txt
|
||||||
|
|
||||||
|
# Secure Credentials
|
||||||
|
Configuration_Secure.h
|
||||||
|
|
||||||
#Visual Studio
|
#Visual Studio
|
||||||
*.sln
|
*.sln
|
||||||
*.vcxproj
|
*.vcxproj
|
||||||
|
|
@ -171,3 +174,13 @@ CMakeListsPrivate.txt
|
||||||
|
|
||||||
#CLion
|
#CLion
|
||||||
cmake-build-*
|
cmake-build-*
|
||||||
|
|
||||||
|
#Eclipse
|
||||||
|
.project
|
||||||
|
.cproject
|
||||||
|
.pydevproject
|
||||||
|
.settings
|
||||||
|
.classpath
|
||||||
|
|
||||||
|
#Python
|
||||||
|
__pycache__
|
||||||
|
|
|
||||||
52
.travis.yml
52
.travis.yml
|
|
@ -1,52 +0,0 @@
|
||||||
dist: trusty
|
|
||||||
sudo: false
|
|
||||||
|
|
||||||
language: python
|
|
||||||
python:
|
|
||||||
- "2.7"
|
|
||||||
|
|
||||||
notifications:
|
|
||||||
email: false
|
|
||||||
|
|
||||||
# Cache PlatformIO packages using Travis CI container-based infrastructure
|
|
||||||
sudo: false
|
|
||||||
cache:
|
|
||||||
pip: true
|
|
||||||
directories:
|
|
||||||
- "~/.platformio"
|
|
||||||
|
|
||||||
env:
|
|
||||||
- TEST_PLATFORM="megaatmega2560"
|
|
||||||
- TEST_PLATFORM="LPC1768"
|
|
||||||
- TEST_PLATFORM="DUE"
|
|
||||||
- TEST_PLATFORM="STM32F1"
|
|
||||||
- TEST_PLATFORM="teensy35"
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
#
|
|
||||||
# Fetch the tag information for the current branch
|
|
||||||
- git fetch origin --tags
|
|
||||||
#
|
|
||||||
# Publish the buildroot script folder
|
|
||||||
- chmod +x ${TRAVIS_BUILD_DIR}/buildroot/bin/*
|
|
||||||
- export PATH=${TRAVIS_BUILD_DIR}/buildroot/bin/:${PATH}
|
|
||||||
- chmod +x ${TRAVIS_BUILD_DIR}/buildroot/share/tests/*
|
|
||||||
- export PATH=${TRAVIS_BUILD_DIR}/buildroot/share/tests/:${PATH}
|
|
||||||
|
|
||||||
install:
|
|
||||||
#- pip install -U platformio
|
|
||||||
- pip install -U https://github.com/platformio/platformio-core/archive/develop.zip
|
|
||||||
|
|
||||||
before_script:
|
|
||||||
# Update PlatformIO packages
|
|
||||||
- platformio update
|
|
||||||
#
|
|
||||||
# Change current working directory to the build dir
|
|
||||||
- cd ${TRAVIS_BUILD_DIR}
|
|
||||||
#
|
|
||||||
# Generate custom version include
|
|
||||||
- generate_version ${TRAVIS_BUILD_DIR}/Marlin/src/inc
|
|
||||||
- cat ${TRAVIS_BUILD_DIR}/Marlin/src/inc/_Version.h
|
|
||||||
#
|
|
||||||
script:
|
|
||||||
- start_tests ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
|
|
||||||
13
LICENSE
13
LICENSE
|
|
@ -3,7 +3,7 @@
|
||||||
GNU GENERAL PUBLIC LICENSE
|
GNU GENERAL PUBLIC LICENSE
|
||||||
Version 3, 29 June 2007
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
Copyright (c) 2007 Free Software Foundation, Inc. <https://www.fsf.org/>
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
of this license document, but changing it is not allowed.
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
|
@ -634,7 +634,7 @@ 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.
|
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.}
|
{one line to give the program's name and a brief idea of what it does.}
|
||||||
Copyright (C) {year} {name of author}
|
Copyright (c) {year} {name of author}
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -647,14 +647,14 @@ the "copyright" line and a pointer to where the full notice is found.
|
||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
If the program does terminal interaction, make it output a short
|
If the program does terminal interaction, make it output a short
|
||||||
notice like this when it starts in an interactive mode:
|
notice like this when it starts in an interactive mode:
|
||||||
|
|
||||||
{project} Copyright (C) {year} {fullname}
|
{project} Copyright (c) {year} {fullname}
|
||||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
This is free software, and you are welcome to redistribute it
|
This is free software, and you are welcome to redistribute it
|
||||||
under certain conditions; type `show c' for details.
|
under certain conditions; type `show c' for details.
|
||||||
|
|
@ -666,12 +666,11 @@ 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,
|
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.
|
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
|
For more information on this, and how to apply and follow the GNU GPL, see
|
||||||
<http://www.gnu.org/licenses/>.
|
<https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
The GNU General Public License does not permit incorporating your program
|
The GNU General Public License does not permit incorporating your program
|
||||||
into proprietary programs. If your program is a subroutine library, you
|
into proprietary programs. If your program is a subroutine library, you
|
||||||
may consider it more useful to permit linking proprietary applications with
|
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
|
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
|
Public License instead of this License. But first, please read
|
||||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
590
Marlin/Makefile
590
Marlin/Makefile
|
|
@ -14,7 +14,7 @@
|
||||||
# Detailed instructions for using the makefile:
|
# Detailed instructions for using the makefile:
|
||||||
#
|
#
|
||||||
# 1. Modify the line containing "ARDUINO_INSTALL_DIR" to point to the directory that
|
# 1. Modify the line containing "ARDUINO_INSTALL_DIR" to point to the directory that
|
||||||
# contains the Arduino installation (for example, under Mac OS X, this
|
# contains the Arduino installation (for example, under macOS, this
|
||||||
# might be /Applications/Arduino.app/Contents/Resources/Java).
|
# might be /Applications/Arduino.app/Contents/Resources/Java).
|
||||||
#
|
#
|
||||||
# 2. Modify the line containing "UPLOAD_PORT" to refer to the filename
|
# 2. Modify the line containing "UPLOAD_PORT" to refer to the filename
|
||||||
|
|
@ -22,8 +22,10 @@
|
||||||
# (e.g. UPLOAD_PORT = /dev/tty.USB0). If the exact name of this file
|
# (e.g. UPLOAD_PORT = /dev/tty.USB0). If the exact name of this file
|
||||||
# changes, you can use * as a wild card (e.g. UPLOAD_PORT = /dev/tty.usb*).
|
# changes, you can use * as a wild card (e.g. UPLOAD_PORT = /dev/tty.usb*).
|
||||||
#
|
#
|
||||||
# 3. Set the line containing "MCU" to match your board's processor.
|
# 3. Set the line containing "MCU" to match your board's processor. Set
|
||||||
# Older one's are atmega8 based, newer ones like Arduino Mini, Bluetooth
|
# "PROG_MCU" as the AVR part name corresponding to "MCU". You can use the
|
||||||
|
# following command to get a list of correspondences: `avrdude -c alf -p x`
|
||||||
|
# Older boards are atmega8 based, newer ones like Arduino Mini, Bluetooth
|
||||||
# or Diecimila have the atmega168. If you're using a LilyPad Arduino,
|
# or Diecimila have the atmega168. If you're using a LilyPad Arduino,
|
||||||
# change F_CPU to 8000000. If you are using Gen7 electronics, you
|
# change F_CPU to 8000000. If you are using Gen7 electronics, you
|
||||||
# probably need to use 20000000. Either way, you must regenerate
|
# probably need to use 20000000. Either way, you must regenerate
|
||||||
|
|
@ -34,18 +36,18 @@
|
||||||
# 5. Type "make upload", reset your Arduino board, and press enter to
|
# 5. Type "make upload", reset your Arduino board, and press enter to
|
||||||
# upload your program to the Arduino board.
|
# upload your program to the Arduino board.
|
||||||
#
|
#
|
||||||
# Note that all settings at the top of this file can be overriden from
|
# Note that all settings at the top of this file can be overridden from
|
||||||
# the command line with, for example, "make HARDWARE_MOTHERBOARD=71"
|
# the command line with, for example, "make HARDWARE_MOTHERBOARD=71"
|
||||||
#
|
#
|
||||||
# To compile for RAMPS (atmega2560) with Arduino 1.6.9 at root/arduino you would use...
|
# To compile for RAMPS (atmega2560) with Arduino 1.6.9 at root/arduino you would use...
|
||||||
#
|
#
|
||||||
# make ARDUINO_VERSION=10609 AVR_TOOLS_PATH=/root/arduino/hardware/tools/avr/bin/ \
|
# make ARDUINO_VERSION=10609 AVR_TOOLS_PATH=/root/arduino/hardware/tools/avr/bin/ \
|
||||||
# HARDWARE_MOTHERBOARD=33 ARDUINO_INSTALL_DIR=/root/arduino
|
# HARDWARE_MOTHERBOARD=1200 ARDUINO_INSTALL_DIR=/root/arduino
|
||||||
#
|
#
|
||||||
# To compile and upload simply add "upload" to the end of the line...
|
# To compile and upload simply add "upload" to the end of the line...
|
||||||
#
|
#
|
||||||
# make ARDUINO_VERSION=10609 AVR_TOOLS_PATH=/root/arduino/hardware/tools/avr/bin/ \
|
# make ARDUINO_VERSION=10609 AVR_TOOLS_PATH=/root/arduino/hardware/tools/avr/bin/ \
|
||||||
# HARDWARE_MOTHERBOARD=33 ARDUINO_INSTALL_DIR=/root/arduino upload
|
# HARDWARE_MOTHERBOARD=1200 ARDUINO_INSTALL_DIR=/root/arduino upload
|
||||||
#
|
#
|
||||||
# If uploading doesn't work try adding the parameter "AVRDUDE_PROGRAMMER=wiring" or
|
# If uploading doesn't work try adding the parameter "AVRDUDE_PROGRAMMER=wiring" or
|
||||||
# start upload manually (using stk500) like so:
|
# start upload manually (using stk500) like so:
|
||||||
|
|
@ -57,7 +59,26 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
# This defines the board to compile for (see boards.h for your board's ID)
|
# This defines the board to compile for (see boards.h for your board's ID)
|
||||||
HARDWARE_MOTHERBOARD ?= 11
|
HARDWARE_MOTHERBOARD ?= 1020
|
||||||
|
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
# Windows
|
||||||
|
ARDUINO_INSTALL_DIR ?= ${HOME}/Arduino
|
||||||
|
ARDUINO_USER_DIR ?= ${HOME}/Arduino
|
||||||
|
else
|
||||||
|
UNAME_S := $(shell uname -s)
|
||||||
|
ifeq ($(UNAME_S),Linux)
|
||||||
|
# Linux
|
||||||
|
ARDUINO_INSTALL_DIR ?= /usr/share/arduino
|
||||||
|
ARDUINO_USER_DIR ?= ${HOME}/Arduino
|
||||||
|
endif
|
||||||
|
ifeq ($(UNAME_S),Darwin)
|
||||||
|
# Darwin (macOS)
|
||||||
|
ARDUINO_INSTALL_DIR ?= /Applications/Arduino.app/Contents/Java
|
||||||
|
ARDUINO_USER_DIR ?= ${HOME}/Documents/Arduino
|
||||||
|
AVR_TOOLS_PATH ?= /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
# Arduino source install directory, and version number
|
# Arduino source install directory, and version number
|
||||||
# On most linuxes this will be /usr/share/arduino
|
# On most linuxes this will be /usr/share/arduino
|
||||||
|
|
@ -67,35 +88,44 @@ ARDUINO_VERSION ?= 106
|
||||||
# The installed Libraries are in the User folder
|
# The installed Libraries are in the User folder
|
||||||
ARDUINO_USER_DIR ?= ${HOME}/Arduino
|
ARDUINO_USER_DIR ?= ${HOME}/Arduino
|
||||||
|
|
||||||
# You can optionally set a path to the avr-gcc tools. Requires a trailing slash. (ex: /usr/local/avr-gcc/bin)
|
# You can optionally set a path to the avr-gcc tools.
|
||||||
|
# Requires a trailing slash. For example, /usr/local/avr-gcc/bin/
|
||||||
AVR_TOOLS_PATH ?=
|
AVR_TOOLS_PATH ?=
|
||||||
|
|
||||||
# Programmer configuration
|
# Programmer configuration
|
||||||
UPLOAD_RATE ?= 57600
|
UPLOAD_RATE ?= 57600
|
||||||
AVRDUDE_PROGRAMMER ?= arduino
|
AVRDUDE_PROGRAMMER ?= arduino
|
||||||
# on most linuxes this will be /dev/ttyACM0 or /dev/ttyACM1
|
# On most linuxes this will be /dev/ttyACM0 or /dev/ttyACM1
|
||||||
UPLOAD_PORT ?= /dev/ttyUSB0
|
UPLOAD_PORT ?= /dev/ttyUSB0
|
||||||
|
|
||||||
#Directory used to build files in, contains all the build files, from object files to the final hex file
|
# Directory used to build files in, contains all the build files, from object
|
||||||
#on linux it is best to put an absolute path like /home/username/tmp .
|
# files to the final hex file on linux it is best to put an absolute path
|
||||||
|
# like /home/username/tmp .
|
||||||
BUILD_DIR ?= applet
|
BUILD_DIR ?= applet
|
||||||
|
|
||||||
# This defines whether Liquid_TWI2 support will be built
|
# This defines whether Liquid_TWI2 support will be built
|
||||||
LIQUID_TWI2 ?= 0
|
LIQUID_TWI2 ?= 0
|
||||||
|
|
||||||
# this defines if Wire is needed
|
# This defines if Wire is needed
|
||||||
WIRE ?= 0
|
WIRE ?= 0
|
||||||
|
|
||||||
# this defines if U8GLIB is needed (may require RELOC_WORKAROUND)
|
# This defines if Tone is needed (i.e SPEAKER is defined in Configuration.h)
|
||||||
U8GLIB ?= 1
|
# Disabling this (and SPEAKER) saves approximatively 350 bytes of memory.
|
||||||
|
TONE ?= 1
|
||||||
|
|
||||||
# this defines whether to include the Trinamic TMC2630Stepper
|
# This defines if U8GLIB is needed (may require RELOC_WORKAROUND)
|
||||||
TMC2630 ?= 1
|
U8GLIB ?= 0
|
||||||
|
|
||||||
|
# This defines whether to include the Trinamic TMCStepper library
|
||||||
|
TMC ?= 0
|
||||||
|
|
||||||
|
# This defines whether to include the AdaFruit NeoPixel library
|
||||||
|
NEOPIXEL ?= 0
|
||||||
|
|
||||||
############
|
############
|
||||||
# Try to automatically determine whether RELOC_WORKAROUND is needed based
|
# Try to automatically determine whether RELOC_WORKAROUND is needed based
|
||||||
# on GCC versions:
|
# on GCC versions:
|
||||||
# http://www.avrfreaks.net/comment/1789106#comment-1789106
|
# https://www.avrfreaks.net/comment/1789106#comment-1789106
|
||||||
|
|
||||||
CC_MAJ:=$(shell $(CC) -dM -E - < /dev/null | grep __GNUC__ | cut -f3 -d\ )
|
CC_MAJ:=$(shell $(CC) -dM -E - < /dev/null | grep __GNUC__ | cut -f3 -d\ )
|
||||||
CC_MIN:=$(shell $(CC) -dM -E - < /dev/null | grep __GNUC_MINOR__ | cut -f3 -d\ )
|
CC_MIN:=$(shell $(CC) -dM -E - < /dev/null | grep __GNUC_MINOR__ | cut -f3 -d\ )
|
||||||
|
|
@ -122,298 +152,444 @@ ifeq ($(HARDWARE_MOTHERBOARD),0)
|
||||||
#
|
#
|
||||||
|
|
||||||
# MEGA/RAMPS up to 1.2
|
# MEGA/RAMPS up to 1.2
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),3)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1000)
|
||||||
|
|
||||||
# RAMPS 1.3 (Power outputs: Hotend, Fan, Bed)
|
# RAMPS 1.3 (Power outputs: Hotend, Fan, Bed)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),33)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1010)
|
||||||
# RAMPS 1.3 (Power outputs: Hotend0, Hotend1, Bed)
|
# RAMPS 1.3 (Power outputs: Hotend0, Hotend1, Bed)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),34)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1011)
|
||||||
# RAMPS 1.3 (Power outputs: Hotend, Fan0, Fan1)
|
# RAMPS 1.3 (Power outputs: Hotend, Fan0, Fan1)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),35)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1012)
|
||||||
# RAMPS 1.3 (Power outputs: Hotend0, Hotend1, Fan)
|
# RAMPS 1.3 (Power outputs: Hotend0, Hotend1, Fan)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),36)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1013)
|
||||||
# RAMPS 1.3 (Power outputs: Spindle, Controller Fan)
|
# RAMPS 1.3 (Power outputs: Spindle, Controller Fan)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),38)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1014)
|
||||||
|
|
||||||
# RAMPS 1.4 (Power outputs: Hotend, Fan, Bed)
|
# RAMPS 1.4 (Power outputs: Hotend, Fan, Bed)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),43)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1020)
|
||||||
# RAMPS 1.4 (Power outputs: Hotend0, Hotend1, Bed)
|
# RAMPS 1.4 (Power outputs: Hotend0, Hotend1, Bed)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),44)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1021)
|
||||||
# RAMPS 1.4 (Power outputs: Hotend, Fan0, Fan1)
|
# RAMPS 1.4 (Power outputs: Hotend, Fan0, Fan1)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),45)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1022)
|
||||||
# RAMPS 1.4 (Power outputs: Hotend0, Hotend1, Fan)
|
# RAMPS 1.4 (Power outputs: Hotend0, Hotend1, Fan)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),46)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1023)
|
||||||
# RAMPS 1.4 (Power outputs: Spindle, Controller Fan)
|
# RAMPS 1.4 (Power outputs: Spindle, Controller Fan)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),48)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1024)
|
||||||
|
|
||||||
# RAMPS Plus 3DYMY (Power outputs: Hotend, Fan, Bed)
|
# RAMPS Plus 3DYMY (Power outputs: Hotend, Fan, Bed)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),143)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1030)
|
||||||
# RAMPS Plus 3DYMY (Power outputs: Hotend0, Hotend1, Bed)
|
# RAMPS Plus 3DYMY (Power outputs: Hotend0, Hotend1, Bed)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),144)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1031)
|
||||||
# RAMPS Plus 3DYMY (Power outputs: Hotend, Fan0, Fan1)
|
# RAMPS Plus 3DYMY (Power outputs: Hotend, Fan0, Fan1)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),145)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1032)
|
||||||
# RAMPS Plus 3DYMY (Power outputs: Hotend0, Hotend1, Fan)
|
# RAMPS Plus 3DYMY (Power outputs: Hotend0, Hotend1, Fan)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),146)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1033)
|
||||||
# RAMPS Plus 3DYMY (Power outputs: Spindle, Controller Fan)
|
# RAMPS Plus 3DYMY (Power outputs: Spindle, Controller Fan)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),148)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1034)
|
||||||
|
|
||||||
#
|
#
|
||||||
# RAMPS Derivatives - ATmega1280, ATmega2560
|
# RAMPS Derivatives - ATmega1280, ATmega2560
|
||||||
#
|
#
|
||||||
|
|
||||||
# 3Drag Controller
|
# 3Drag Controller
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),77)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1100)
|
||||||
# Velleman K8200 Controller (derived from 3Drag Controller)
|
# Velleman K8200 Controller (derived from 3Drag Controller)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),78)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1101)
|
||||||
# Velleman K8400 Controller (derived from 3Drag Controller)
|
# Velleman K8400 Controller (derived from 3Drag Controller)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),79)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1102)
|
||||||
|
# Velleman K8600 Controller (Vertex Nano)
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1103)
|
||||||
|
# Velleman K8800 Controller (Vertex Delta)
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1104)
|
||||||
# 2PrintBeta BAM&DICE with STK drivers
|
# 2PrintBeta BAM&DICE with STK drivers
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),401)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1105)
|
||||||
# 2PrintBeta BAM&DICE Due with STK drivers
|
# 2PrintBeta BAM&DICE Due with STK drivers
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),402)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1106)
|
||||||
# MKS BASE v1.0
|
# MKS BASE v1.0
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),40)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1107)
|
||||||
|
# MKS v1.4 with A4982 stepper drivers
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1108)
|
||||||
# MKS v1.5 with Allegro A4982 stepper drivers
|
# MKS v1.5 with Allegro A4982 stepper drivers
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),405)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1109)
|
||||||
|
# MKS v1.6 with Allegro A4982 stepper drivers
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1110)
|
||||||
# MKS BASE 1.0 with Heroic HR4982 stepper drivers
|
# MKS BASE 1.0 with Heroic HR4982 stepper drivers
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),41)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1111)
|
||||||
# MKS GEN v1.3 or 1.4
|
# MKS GEN v1.3 or 1.4
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),47)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1112)
|
||||||
# MKS GEN L
|
# MKS GEN L
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),53)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1113)
|
||||||
# zrib V2.0 control board (Chinese knock off RAMPS replica)
|
# zrib V2.0 control board (Chinese knock off RAMPS replica)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),504)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1114)
|
||||||
|
# BigTreeTech or BIQU KFB2.0
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1115)
|
||||||
# Felix 2.0+ Electronics Board (RAMPS like)
|
# Felix 2.0+ Electronics Board (RAMPS like)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),37)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1116)
|
||||||
# Invent-A-Part RigidBoard
|
# Invent-A-Part RigidBoard
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),42)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1117)
|
||||||
# Invent-A-Part RigidBoard V2
|
# Invent-A-Part RigidBoard V2
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),52)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1118)
|
||||||
# Sainsmart 2-in-1 board
|
# Sainsmart 2-in-1 board
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),49)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1119)
|
||||||
# Ultimaker
|
# Ultimaker
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),7)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1120)
|
||||||
# Ultimaker (Older electronics. Pre 1.5.4. This is rare)
|
# Ultimaker (Older electronics. Pre 1.5.4. This is rare)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),71)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1121)
|
||||||
MCU ?= atmega1280
|
MCU ?= atmega1280
|
||||||
|
PROG_MCU ?= m1280
|
||||||
|
|
||||||
# Azteeg X3
|
# Azteeg X3
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),67)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1122)
|
||||||
# Azteeg X3 Pro
|
# Azteeg X3 Pro
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),68)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1123)
|
||||||
# Ultimainboard 2.x (Uses TEMP_SENSOR 20)
|
# Ultimainboard 2.x (Uses TEMP_SENSOR 20)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),72)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1124)
|
||||||
# Rumba
|
# Rumba
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),80)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1125)
|
||||||
|
# Raise3D Rumba
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1126)
|
||||||
|
# Rapide Lite RL200 Rumba
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1127)
|
||||||
|
# Formbot T-Rex 2 Plus
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1128)
|
||||||
|
# Formbot T-Rex 3
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1129)
|
||||||
|
# Formbot Raptor
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1130)
|
||||||
|
# Formbot Raptor 2
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1131)
|
||||||
# bq ZUM Mega 3D
|
# bq ZUM Mega 3D
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),503)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1132)
|
||||||
# MakeBoard Mini v2.1.2 is a control board sold by MicroMake
|
# MakeBoard Mini v2.1.2 is a control board sold by MicroMake
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),431)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1133)
|
||||||
# TriGorilla Anycubic version 1.3 based on RAMPS EFB
|
# TriGorilla Anycubic version 1.3 based on RAMPS EFB
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),343)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1134)
|
||||||
# TriGorilla Anycubic version 1.4 based on RAMPS EFB
|
# TriGorilla Anycubic version 1.4 based on RAMPS EFB
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),443)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1135)
|
||||||
|
# TriGorilla Anycubic version 1.4 Rev 1.1
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1136)
|
||||||
# Creality: Ender-4, CR-8
|
# Creality: Ender-4, CR-8
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),243)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1137)
|
||||||
|
# Creality: CR10S, CR20, CR-X
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1138)
|
||||||
|
# Dagoma F5
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1139)
|
||||||
|
# FYSETC F6 1.3
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1140)
|
||||||
|
# FYSETC F6 1.5
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1141)
|
||||||
|
# Duplicator i3 Plus
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1142)
|
||||||
|
# VORON
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1143)
|
||||||
|
# TRONXY V3 1.0
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1144)
|
||||||
|
# Z-Bolt X Series
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1145)
|
||||||
|
# TT OSCAR
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1146)
|
||||||
|
# Overlord/Overlord Pro
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1147)
|
||||||
|
# ADIMLab Gantry v1
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1148)
|
||||||
|
# ADIMLab Gantry v2
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1149)
|
||||||
|
# BIQU Tango V1
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1150)
|
||||||
|
# MKS GEN L V2
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1151)
|
||||||
|
# MKS GEN L V2.1
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1152)
|
||||||
|
# Copymaster 3D
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1153)
|
||||||
|
# Ortur 4
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1154)
|
||||||
|
# Tenlog D3 Hero
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1155)
|
||||||
|
|
||||||
|
#
|
||||||
|
# RAMBo and derivatives
|
||||||
|
#
|
||||||
|
|
||||||
|
# Rambo
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1200)
|
||||||
|
# Mini-Rambo
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1201)
|
||||||
|
# Mini-Rambo 1.0a
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1202)
|
||||||
|
# Einsy Rambo
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1203)
|
||||||
|
# Einsy Retro
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1204)
|
||||||
|
# abee Scoovo X9H
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1205)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Other ATmega1280, ATmega2560
|
# Other ATmega1280, ATmega2560
|
||||||
#
|
#
|
||||||
|
|
||||||
# Cartesio CN Controls V11
|
# Cartesio CN Controls V11
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),111)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1300)
|
||||||
# Cartesio CN Controls V12
|
# Cartesio CN Controls V12
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),112)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1301)
|
||||||
|
# Cartesio CN Controls V15
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1302)
|
||||||
# Cheaptronic v1.0
|
# Cheaptronic v1.0
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),2)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1303)
|
||||||
# Cheaptronic v2.0
|
# Cheaptronic v2.0
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),21)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1304)
|
||||||
# Makerbot Mightyboard Revision E
|
# Makerbot Mightyboard Revision E
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),200)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1305)
|
||||||
# Megatronics
|
# Megatronics
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),70)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1306)
|
||||||
# Megatronics v2.0
|
# Megatronics v2.0
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),701)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1307)
|
||||||
# Megatronics v3.0
|
# Megatronics v3.0
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),703)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1308)
|
||||||
# Megatronics v3.1
|
# Megatronics v3.1
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),704)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1309)
|
||||||
# Rambo
|
# Megatronics v3.2
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),301)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1310)
|
||||||
# Mini-Rambo
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),302)
|
|
||||||
# Mini-Rambo 1.0a
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),303)
|
|
||||||
# Einsy Rambo
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),304)
|
|
||||||
# Einsy Retro
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),305)
|
|
||||||
# Elefu Ra Board (v3)
|
# Elefu Ra Board (v3)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),21)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1311)
|
||||||
# Leapfrog
|
# Leapfrog
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),999)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1312)
|
||||||
# Mega controller
|
# Mega controller
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),310)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1313)
|
||||||
# abee Scoovo X9H
|
# Geeetech GT2560 Rev B for Mecreator2
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),321)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1314)
|
||||||
# Geeetech GT2560 Rev. A
|
# Geeetech GT2560 Rev. A
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),74)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1315)
|
||||||
# Geeetech GT2560 Rev. A+ (with auto level probe)
|
# Geeetech GT2560 Rev. A+ (with auto level probe)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),75)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1316)
|
||||||
|
# Geeetech GT2560 Rev B for A10(M/D)
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1317)
|
||||||
|
# Geeetech GT2560 Rev B for A20(M/D)
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1318)
|
||||||
|
# Einstart retrofit
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1319)
|
||||||
|
# Wanhao 0ne+ i3 Mini
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1320)
|
||||||
|
|
||||||
#
|
#
|
||||||
# ATmega1281, ATmega2561
|
# ATmega1281, ATmega2561
|
||||||
#
|
#
|
||||||
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),702)
|
# Minitronics v1.0/1.1
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1400)
|
||||||
MCU ?= atmega1281
|
MCU ?= atmega1281
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),25)
|
PROG_MCU ?= m1281
|
||||||
|
# Silvergate v1.0
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1401)
|
||||||
MCU ?= atmega1281
|
MCU ?= atmega1281
|
||||||
|
PROG_MCU ?= m1281
|
||||||
|
|
||||||
#
|
#
|
||||||
# Sanguinololu and Derivatives - ATmega644P, ATmega1284P
|
# Sanguinololu and Derivatives - ATmega644P, ATmega1284P
|
||||||
#
|
#
|
||||||
|
|
||||||
# Sanguinololu < 1.2
|
# Sanguinololu < 1.2
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),6)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1500)
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
HARDWARE_VARIANT ?= Sanguino
|
||||||
MCU ?= atmega644p
|
MCU ?= atmega644p
|
||||||
|
PROG_MCU ?= m644p
|
||||||
# Sanguinololu 1.2 and above
|
# Sanguinololu 1.2 and above
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),62)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1501)
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
HARDWARE_VARIANT ?= Sanguino
|
||||||
MCU ?= atmega644p
|
MCU ?= atmega644p
|
||||||
|
PROG_MCU ?= m644p
|
||||||
# Melzi
|
# Melzi
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),63)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1502)
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
HARDWARE_VARIANT ?= Sanguino
|
||||||
MCU ?= atmega644p
|
MCU ?= atmega644p
|
||||||
|
PROG_MCU ?= m644p
|
||||||
|
# Melzi V2.0
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1503)
|
||||||
|
HARDWARE_VARIANT ?= Sanguino
|
||||||
|
MCU ?= atmega1284p
|
||||||
|
PROG_MCU ?= m1284p
|
||||||
# Melzi with ATmega1284 (MaKr3d version)
|
# Melzi with ATmega1284 (MaKr3d version)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),66)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1504)
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
HARDWARE_VARIANT ?= Sanguino
|
||||||
MCU ?= atmega1284p
|
MCU ?= atmega1284p
|
||||||
|
PROG_MCU ?= m1284p
|
||||||
# Melzi Creality3D board (for CR-10 etc)
|
# Melzi Creality3D board (for CR-10 etc)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),89)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1505)
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
HARDWARE_VARIANT ?= Sanguino
|
||||||
MCU ?= atmega1284p
|
MCU ?= atmega1284p
|
||||||
|
PROG_MCU ?= m1284p
|
||||||
# Melzi Malyan M150 board
|
# Melzi Malyan M150 board
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),92)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1506)
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
HARDWARE_VARIANT ?= Sanguino
|
||||||
MCU ?= atmega1284p
|
MCU ?= atmega1284p
|
||||||
|
PROG_MCU ?= m1284p
|
||||||
# Tronxy X5S
|
# Tronxy X5S
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),505)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1507)
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
HARDWARE_VARIANT ?= Sanguino
|
||||||
MCU ?= atmega1284p
|
MCU ?= atmega1284p
|
||||||
|
PROG_MCU ?= m1284p
|
||||||
# STB V1.1
|
# STB V1.1
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),64)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1508)
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
HARDWARE_VARIANT ?= Sanguino
|
||||||
MCU ?= atmega1284p
|
MCU ?= atmega1284p
|
||||||
|
PROG_MCU ?= m1284p
|
||||||
# Azteeg X1
|
# Azteeg X1
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),65)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1509)
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
HARDWARE_VARIANT ?= Sanguino
|
||||||
MCU ?= atmega1284p
|
MCU ?= atmega1284p
|
||||||
|
PROG_MCU ?= m1284p
|
||||||
# Anet 1.0 (Melzi clone)
|
# Anet 1.0 (Melzi clone)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),69)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1510)
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
HARDWARE_VARIANT ?= Sanguino
|
||||||
MCU ?= atmega1284p
|
MCU ?= atmega1284p
|
||||||
|
PROG_MCU ?= m1284p
|
||||||
|
|
||||||
#
|
#
|
||||||
# Other ATmega644P, ATmega644, ATmega1284P
|
# Other ATmega644P, ATmega644, ATmega1284P
|
||||||
#
|
#
|
||||||
|
|
||||||
# Gen3 Monolithic Electronics
|
# Gen3 Monolithic Electronics
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),22)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1600)
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
HARDWARE_VARIANT ?= Sanguino
|
||||||
MCU ?= atmega644p
|
MCU ?= atmega644p
|
||||||
|
PROG_MCU ?= m644p
|
||||||
# Gen3+
|
# Gen3+
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),9)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1601)
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
HARDWARE_VARIANT ?= Sanguino
|
||||||
MCU ?= atmega644p
|
MCU ?= atmega644p
|
||||||
|
PROG_MCU ?= m644p
|
||||||
# Gen6
|
# Gen6
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),5)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1602)
|
||||||
HARDWARE_VARIANT ?= Gen6
|
HARDWARE_VARIANT ?= Gen6
|
||||||
MCU ?= atmega644p
|
MCU ?= atmega644p
|
||||||
|
PROG_MCU ?= m644p
|
||||||
# Gen6 deluxe
|
# Gen6 deluxe
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),51)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1603)
|
||||||
HARDWARE_VARIANT ?= Gen6
|
HARDWARE_VARIANT ?= Gen6
|
||||||
MCU ?= atmega644p
|
MCU ?= atmega644p
|
||||||
|
PROG_MCU ?= m644p
|
||||||
# Gen7 custom (Alfons3 Version)
|
# Gen7 custom (Alfons3 Version)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),10)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1604)
|
||||||
HARDWARE_VARIANT ?= Gen7
|
HARDWARE_VARIANT ?= Gen7
|
||||||
MCU ?= atmega644
|
MCU ?= atmega644
|
||||||
|
PROG_MCU ?= m644
|
||||||
F_CPU ?= 20000000
|
F_CPU ?= 20000000
|
||||||
# Gen7 v1.1, v1.2
|
# Gen7 v1.1, v1.2
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),11)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1605)
|
||||||
HARDWARE_VARIANT ?= Gen7
|
HARDWARE_VARIANT ?= Gen7
|
||||||
MCU ?= atmega644p
|
MCU ?= atmega644p
|
||||||
|
PROG_MCU ?= m644p
|
||||||
F_CPU ?= 20000000
|
F_CPU ?= 20000000
|
||||||
# Gen7 v1.3
|
# Gen7 v1.3
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),12)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1606)
|
||||||
HARDWARE_VARIANT ?= Gen7
|
HARDWARE_VARIANT ?= Gen7
|
||||||
MCU ?= atmega644p
|
MCU ?= atmega644p
|
||||||
|
PROG_MCU ?= m644p
|
||||||
F_CPU ?= 20000000
|
F_CPU ?= 20000000
|
||||||
# Gen7 v1.4
|
# Gen7 v1.4
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),13)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1607)
|
||||||
HARDWARE_VARIANT ?= Gen7
|
HARDWARE_VARIANT ?= Gen7
|
||||||
MCU ?= atmega1284p
|
MCU ?= atmega1284p
|
||||||
|
PROG_MCU ?= m1284p
|
||||||
F_CPU ?= 20000000
|
F_CPU ?= 20000000
|
||||||
# Alpha OMCA board
|
# Alpha OMCA board
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),90)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1608)
|
||||||
HARDWARE_VARIANT ?= SanguinoA
|
HARDWARE_VARIANT ?= SanguinoA
|
||||||
MCU ?= atmega644
|
MCU ?= atmega644
|
||||||
|
PROG_MCU ?= m644
|
||||||
# Final OMCA board
|
# Final OMCA board
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),91)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1609)
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
HARDWARE_VARIANT ?= Sanguino
|
||||||
MCU ?= atmega644p
|
MCU ?= atmega644p
|
||||||
|
PROG_MCU ?= m644p
|
||||||
# Sethi 3D_1
|
# Sethi 3D_1
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),20)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1610)
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
HARDWARE_VARIANT ?= Sanguino
|
||||||
MCU ?= atmega644p
|
MCU ?= atmega644p
|
||||||
|
PROG_MCU ?= m644p
|
||||||
|
|
||||||
#
|
#
|
||||||
# Teensyduino - AT90USB1286, AT90USB1286P
|
# Teensyduino - AT90USB1286, AT90USB1286P
|
||||||
#
|
#
|
||||||
|
|
||||||
# Teensylu
|
# Teensylu
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),8)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1700)
|
||||||
HARDWARE_VARIANT ?= Teensy
|
HARDWARE_VARIANT ?= Teensy
|
||||||
MCU ?= at90usb1286
|
MCU ?= at90usb1286
|
||||||
|
PROG_MCU ?= usb1286
|
||||||
# Printrboard (AT90USB1286)
|
# Printrboard (AT90USB1286)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),81)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1701)
|
||||||
HARDWARE_VARIANT ?= Teensy
|
HARDWARE_VARIANT ?= Teensy
|
||||||
MCU ?= at90usb1286
|
MCU ?= at90usb1286
|
||||||
|
PROG_MCU ?= usb1286
|
||||||
# Printrboard Revision F (AT90USB1286)
|
# Printrboard Revision F (AT90USB1286)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),811)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1702)
|
||||||
HARDWARE_VARIANT ?= Teensy
|
HARDWARE_VARIANT ?= Teensy
|
||||||
MCU ?= at90usb1286
|
MCU ?= at90usb1286
|
||||||
|
PROG_MCU ?= usb1286
|
||||||
# Brainwave (AT90USB646)
|
# Brainwave (AT90USB646)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),82)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1703)
|
||||||
HARDWARE_VARIANT ?= Teensy
|
HARDWARE_VARIANT ?= Teensy
|
||||||
MCU ?= at90usb646
|
MCU ?= at90usb646
|
||||||
|
PROG_MCU ?= usb646
|
||||||
# Brainwave Pro (AT90USB1286)
|
# Brainwave Pro (AT90USB1286)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),83)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1704)
|
||||||
HARDWARE_VARIANT ?= Teensy
|
HARDWARE_VARIANT ?= Teensy
|
||||||
MCU ?= at90usb1286
|
MCU ?= at90usb1286
|
||||||
|
PROG_MCU ?= usb1286
|
||||||
# SAV Mk-I (AT90USB1286)
|
# SAV Mk-I (AT90USB1286)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),84)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1705)
|
||||||
HARDWARE_VARIANT ?= Teensy
|
HARDWARE_VARIANT ?= Teensy
|
||||||
MCU ?= at90usb1286
|
MCU ?= at90usb1286
|
||||||
|
PROG_MCU ?= usb1286
|
||||||
# Teensy++2.0 (AT90USB1286)
|
# Teensy++2.0 (AT90USB1286)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),85)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1706)
|
||||||
HARDWARE_VARIANT ?= Teensy
|
HARDWARE_VARIANT ?= Teensy
|
||||||
MCU ?= at90usb1286
|
MCU ?= at90usb1286
|
||||||
|
PROG_MCU ?= usb1286
|
||||||
# 5DPrint D8 Driver Board
|
# 5DPrint D8 Driver Board
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),88)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1707)
|
||||||
HARDWARE_VARIANT ?= Teensy
|
HARDWARE_VARIANT ?= Teensy
|
||||||
MCU ?= at90usb1286
|
MCU ?= at90usb1286
|
||||||
|
PROG_MCU ?= usb1286
|
||||||
|
|
||||||
|
# UltiMachine Archim1 (with DRV8825 drivers)
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),3023)
|
||||||
|
HARDWARE_VARIANT ?= archim
|
||||||
|
MCPU = cortex-m3
|
||||||
|
F_CPU = 84000000
|
||||||
|
IS_MCU = 0
|
||||||
|
# UltiMachine Archim2 (with TMC2130 drivers)
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),3024)
|
||||||
|
HARDWARE_VARIANT ?= archim
|
||||||
|
MCPU = cortex-m3
|
||||||
|
F_CPU = 84000000
|
||||||
|
IS_MCU = 0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Be sure to regenerate speed_lookuptable.h with create_speed_lookuptable.py
|
# Be sure to regenerate speed_lookuptable.h with create_speed_lookuptable.py
|
||||||
# if you are setting this to something other than 16MHz
|
# if you are setting this to something other than 16MHz
|
||||||
|
# Do not put the UL suffix, it's done later on.
|
||||||
# Set to 16Mhz if not yet set.
|
# Set to 16Mhz if not yet set.
|
||||||
F_CPU ?= 16000000
|
F_CPU ?= 16000000
|
||||||
|
|
||||||
|
# Set to microcontroller if IS_MCU not yet set
|
||||||
|
IS_MCU ?= 1
|
||||||
|
|
||||||
|
ifeq ($(IS_MCU),1)
|
||||||
# Set to arduino, ATmega2560 if not yet set.
|
# Set to arduino, ATmega2560 if not yet set.
|
||||||
HARDWARE_VARIANT ?= arduino
|
HARDWARE_VARIANT ?= arduino
|
||||||
MCU ?= atmega2560
|
MCU ?= atmega2560
|
||||||
|
PROG_MCU ?= m2560
|
||||||
|
|
||||||
|
TOOL_PREFIX = avr
|
||||||
|
MCU_FLAGS = -mmcu=$(MCU)
|
||||||
|
SIZE_FLAGS = --mcu=$(MCU) -C
|
||||||
|
else
|
||||||
|
TOOL_PREFIX = arm-none-eabi
|
||||||
|
CPU_FLAGS = -mthumb -mcpu=$(MCPU)
|
||||||
|
SIZE_FLAGS = -A
|
||||||
|
endif
|
||||||
|
|
||||||
# Arduino contained the main source code for the Arduino
|
# Arduino contained the main source code for the Arduino
|
||||||
# Libraries, the "hardware variant" are for boards
|
# Libraries, the "hardware variant" are for boards
|
||||||
|
|
@ -434,63 +610,91 @@ VPATH = .
|
||||||
VPATH += $(BUILD_DIR)
|
VPATH += $(BUILD_DIR)
|
||||||
VPATH += $(HARDWARE_SRC)
|
VPATH += $(HARDWARE_SRC)
|
||||||
|
|
||||||
# U8glib
|
|
||||||
VPATH += $(ARDUINO_USER_DIR)/libraries/U8glib
|
|
||||||
VPATH += $(ARDUINO_USER_DIR)/libraries/U8glib/clib
|
|
||||||
|
|
||||||
ifeq ($(HARDWARE_VARIANT), $(filter $(HARDWARE_VARIANT),arduino Teensy Sanguino))
|
ifeq ($(HARDWARE_VARIANT), $(filter $(HARDWARE_VARIANT),arduino Teensy Sanguino))
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/marlin/avr/libraries/LiquidCrystal/src
|
# Old libraries (avr-core 1.6.21 < / Arduino < 1.6.8)
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/marlin/avr/libraries/SPI
|
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/SPI
|
||||||
|
# New libraries (avr-core >= 1.6.21 / Arduino >= 1.6.8)
|
||||||
|
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/SPI/src
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(IS_MCU),1)
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/cores/arduino
|
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/cores/arduino
|
||||||
|
|
||||||
|
# Old libraries (avr-core 1.6.21 < / Arduino < 1.6.8)
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/SPI
|
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/SPI
|
||||||
|
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/SoftwareSerial
|
||||||
|
# New libraries (avr-core >= 1.6.21 / Arduino >= 1.6.8)
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/SPI/src
|
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/SPI/src
|
||||||
|
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/SoftwareSerial/src
|
||||||
|
endif
|
||||||
|
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/LiquidCrystal/src
|
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/LiquidCrystal/src
|
||||||
|
|
||||||
ifeq ($(LIQUID_TWI2), 1)
|
ifeq ($(LIQUID_TWI2), 1)
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire
|
WIRE = 1
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire/utility
|
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/LiquidTWI2
|
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/LiquidTWI2
|
||||||
endif
|
endif
|
||||||
ifeq ($(WIRE), 1)
|
ifeq ($(WIRE), 1)
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire
|
# Old libraries (avr-core 1.6.21 / Arduino < 1.6.8)
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire/utility
|
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/Wire
|
||||||
|
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/Wire/utility
|
||||||
|
# New libraries (avr-core >= 1.6.21 / Arduino >= 1.6.8)
|
||||||
|
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/Wire/src
|
||||||
|
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/Wire/src/utility
|
||||||
endif
|
endif
|
||||||
ifeq ($(NEOPIXEL), 1)
|
ifeq ($(NEOPIXEL), 1)
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Adafruit_NeoPixel
|
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Adafruit_NeoPixel
|
||||||
endif
|
endif
|
||||||
ifeq ($(U8GLIB), 1)
|
ifeq ($(U8GLIB), 1)
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/U8glib
|
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/U8glib
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/U8glib/clib
|
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/U8glib/csrc
|
||||||
|
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/U8glib/cppsrc
|
||||||
|
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/U8glib/fntsrc
|
||||||
endif
|
endif
|
||||||
ifeq ($(TMC2630), 1)
|
ifeq ($(TMC), 1)
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/TMC2130Stepper/src
|
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/TMCStepper/src
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/TMC2130Stepper/src/source
|
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/TMCStepper/src/source
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(HARDWARE_VARIANT), arduino)
|
ifeq ($(HARDWARE_VARIANT), arduino)
|
||||||
HARDWARE_SUB_VARIANT ?= mega
|
HARDWARE_SUB_VARIANT ?= mega
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/variants/$(HARDWARE_SUB_VARIANT)
|
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/variants/$(HARDWARE_SUB_VARIANT)
|
||||||
else
|
else ifeq ($(HARDWARE_VARIANT), Sanguino)
|
||||||
ifeq ($(HARDWARE_VARIANT), Sanguino)
|
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/marlin/avr/variants/sanguino
|
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/marlin/avr/variants/sanguino
|
||||||
|
else ifeq ($(HARDWARE_VARIANT), archim)
|
||||||
|
VPATH += $(ARDUINO_INSTALL_DIR)/packages/ultimachine/hardware/sam/1.6.9-b/system/libsam
|
||||||
|
VPATH += $(ARDUINO_INSTALL_DIR)/packages/ultimachine/hardware/sam/1.6.9-b/system/CMSIS/CMSIS/Include/
|
||||||
|
VPATH += $(ARDUINO_INSTALL_DIR)/packages/ultimachine/hardware/sam/1.6.9-b/system/CMSIS/Device/ATMEL/
|
||||||
|
VPATH += $(ARDUINO_INSTALL_DIR)/packages/ultimachine/hardware/sam/1.6.9-b/cores/arduino
|
||||||
|
VPATH += $(ARDUINO_INSTALL_DIR)/packages/ultimachine/hardware/sam/1.6.9-b/cores/arduino/avr
|
||||||
|
VPATH += $(ARDUINO_INSTALL_DIR)/packages/ultimachine/hardware/sam/1.6.9-b/cores/arduino/USB
|
||||||
|
VPATH += $(ARDUINO_INSTALL_DIR)/packages/ultimachine/hardware/sam/1.6.9-b/libraries/Wire/src
|
||||||
|
VPATH += $(ARDUINO_INSTALL_DIR)/packages/ultimachine/hardware/sam/1.6.9-b/libraries/SPI/src
|
||||||
|
VPATH += $(ARDUINO_INSTALL_DIR)/packages/ultimachine/hardware/sam/1.6.9-b/libraries/U8glib/src/clib
|
||||||
|
VPATH += $(ARDUINO_INSTALL_DIR)/packages/ultimachine/hardware/sam/1.6.9-b/variants/archim
|
||||||
|
LDSCRIPT = $(ARDUINO_INSTALL_DIR)/packages/ultimachine/hardware/sam/1.6.9-b/variants/archim/linker_scripts/gcc/flash.ld
|
||||||
|
LDLIBS = $(ARDUINO_INSTALL_DIR)/packages/ultimachine/hardware/sam/1.6.9-b/variants/archim/libsam_sam3x8e_gcc_rel.a
|
||||||
else
|
else
|
||||||
HARDWARE_SUB_VARIANT ?= standard
|
HARDWARE_SUB_VARIANT ?= standard
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/$(HARDWARE_VARIANT)/variants/$(HARDWARE_SUB_VARIANT)
|
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/$(HARDWARE_VARIANT)/variants/$(HARDWARE_SUB_VARIANT)
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
LIB_SRC = wiring.c \
|
LIB_SRC = wiring.c \
|
||||||
wiring_analog.c wiring_digital.c \
|
wiring_analog.c wiring_digital.c \
|
||||||
wiring_pulse.c \
|
|
||||||
wiring_shift.c WInterrupts.c hooks.c
|
wiring_shift.c WInterrupts.c hooks.c
|
||||||
|
|
||||||
|
ifeq ($(HARDWARE_VARIANT), archim)
|
||||||
|
LIB_ASRC += wiring_pulse_asm.S
|
||||||
|
else
|
||||||
|
LIB_SRC += wiring_pulse.c
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(HARDWARE_VARIANT), Teensy)
|
ifeq ($(HARDWARE_VARIANT), Teensy)
|
||||||
LIB_SRC = wiring.c
|
LIB_SRC = wiring.c
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/teensy/cores/teensy
|
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/teensy/cores/teensy
|
||||||
endif
|
endif
|
||||||
|
|
||||||
LIB_CXXSRC = WMath.cpp WString.cpp Print.cpp SPI.cpp Tone.cpp
|
LIB_CXXSRC = WMath.cpp WString.cpp Print.cpp SPI.cpp
|
||||||
|
|
||||||
ifeq ($(NEOPIXEL), 1)
|
ifeq ($(NEOPIXEL), 1)
|
||||||
LIB_CXXSRC += Adafruit_NeoPixel.cpp
|
LIB_CXXSRC += Adafruit_NeoPixel.cpp
|
||||||
|
|
@ -508,13 +712,23 @@ LIB_SRC += twi.c
|
||||||
LIB_CXXSRC += Wire.cpp
|
LIB_CXXSRC += Wire.cpp
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(U8GLIB), 1)
|
ifeq ($(TONE), 1)
|
||||||
LIB_CXXSRC += U8glib.cpp
|
LIB_CXXSRC += Tone.cpp
|
||||||
LIB_SRC += u8g_ll_api.c u8g_bitmap.c u8g_clip.c u8g_com_null.c u8g_delay.c u8g_page.c u8g_pb.c u8g_pb16h1.c u8g_rect.c u8g_state.c u8g_font.c u8g_font_data.c
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(TMC2630), 1)
|
ifeq ($(U8GLIB), 1)
|
||||||
LIB_CXXSRC += TMC2130Stepper.cpp TMC2130Stepper_COOLCONF.cpp TMC2130Stepper_DRV_STATUS.cpp TMC2130Stepper_IHOLD_IRUN.cpp TMC2130Stepper_CHOPCONF.cpp TMC2130Stepper_GCONF.cpp TMC2130Stepper_PWMCONF.cpp SW_SPI.cpp
|
LIB_CXXSRC += U8glib.cpp
|
||||||
|
LIB_SRC += u8g_ll_api.c u8g_bitmap.c u8g_clip.c u8g_com_null.c u8g_delay.c \
|
||||||
|
u8g_page.c u8g_pb.c u8g_pb16h1.c u8g_rect.c u8g_state.c u8g_font.c \
|
||||||
|
u8g_font_6x13.c u8g_font_04b_03.c u8g_font_5x8.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(TMC), 1)
|
||||||
|
LIB_CXXSRC += TMCStepper.cpp COOLCONF.cpp DRV_STATUS.cpp IHOLD_IRUN.cpp \
|
||||||
|
CHOPCONF.cpp GCONF.cpp PWMCONF.cpp DRV_CONF.cpp DRVCONF.cpp DRVCTRL.cpp \
|
||||||
|
DRVSTATUS.cpp ENCMODE.cpp RAMP_STAT.cpp SGCSCONF.cpp SHORT_CONF.cpp \
|
||||||
|
SMARTEN.cpp SW_MODE.cpp SW_SPI.cpp TMC2130Stepper.cpp TMC2208Stepper.cpp \
|
||||||
|
TMC2209Stepper.cpp TMC2660Stepper.cpp TMC5130Stepper.cpp TMC5160Stepper.cpp
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(RELOC_WORKAROUND), 1)
|
ifeq ($(RELOC_WORKAROUND), 1)
|
||||||
|
|
@ -544,50 +758,79 @@ OPT = s
|
||||||
DEFINES ?=
|
DEFINES ?=
|
||||||
|
|
||||||
# Program settings
|
# Program settings
|
||||||
CC = $(AVR_TOOLS_PATH)avr-gcc
|
CC = $(AVR_TOOLS_PATH)$(TOOL_PREFIX)-gcc
|
||||||
CXX = $(AVR_TOOLS_PATH)avr-g++
|
CXX = $(AVR_TOOLS_PATH)$(TOOL_PREFIX)-g++
|
||||||
OBJCOPY = $(AVR_TOOLS_PATH)avr-objcopy
|
OBJCOPY = $(AVR_TOOLS_PATH)$(TOOL_PREFIX)-objcopy
|
||||||
OBJDUMP = $(AVR_TOOLS_PATH)avr-objdump
|
OBJDUMP = $(AVR_TOOLS_PATH)$(TOOL_PREFIX)-objdump
|
||||||
AR = $(AVR_TOOLS_PATH)avr-ar
|
AR = $(AVR_TOOLS_PATH)$(TOOL_PREFIX)-ar
|
||||||
SIZE = $(AVR_TOOLS_PATH)avr-size
|
SIZE = $(AVR_TOOLS_PATH)$(TOOL_PREFIX)-size
|
||||||
NM = $(AVR_TOOLS_PATH)avr-nm
|
NM = $(AVR_TOOLS_PATH)$(TOOL_PREFIX)-nm
|
||||||
AVRDUDE = avrdude
|
AVRDUDE = avrdude
|
||||||
REMOVE = rm -f
|
REMOVE = rm -f
|
||||||
MV = mv -f
|
MV = mv -f
|
||||||
|
|
||||||
# Place -D or -U options here
|
# Place -D or -U options here
|
||||||
CDEFS = -DF_CPU=$(F_CPU) ${addprefix -D , $(DEFINES)}
|
CDEFS = -DF_CPU=$(F_CPU)UL ${addprefix -D , $(DEFINES)} -DARDUINO=$(ARDUINO_VERSION)
|
||||||
CXXDEFS = $(CDEFS)
|
CXXDEFS = $(CDEFS)
|
||||||
|
|
||||||
ifeq ($(HARDWARE_VARIANT), Teensy)
|
ifeq ($(HARDWARE_VARIANT), Teensy)
|
||||||
CDEFS += -DUSB_SERIAL
|
CDEFS += -DUSB_SERIAL
|
||||||
LIB_SRC += usb.c pins_teensy.c
|
LIB_SRC += usb.c pins_teensy.c
|
||||||
LIB_CXXSRC += usb_api.cpp
|
LIB_CXXSRC += usb_api.cpp
|
||||||
|
|
||||||
|
else ifeq ($(HARDWARE_VARIANT), archim)
|
||||||
|
CDEFS += -DARDUINO_SAM_ARCHIM -DARDUINO_ARCH_SAM -D__SAM3X8E__
|
||||||
|
CDEFS += -DUSB_VID=0x27B1 -DUSB_PID=0x0001 -DUSBCON
|
||||||
|
CDEFS += '-DUSB_MANUFACTURER="UltiMachine"' '-DUSB_PRODUCT_STRING="Archim"'
|
||||||
|
|
||||||
|
LIB_CXXSRC += variant.cpp IPAddress.cpp Reset.cpp RingBuffer.cpp Stream.cpp \
|
||||||
|
UARTClass.cpp USARTClass.cpp abi.cpp new.cpp watchdog.cpp CDC.cpp \
|
||||||
|
PluggableUSB.cpp USBCore.cpp
|
||||||
|
|
||||||
|
LIB_SRC += cortex_handlers.c iar_calls_sam3.c syscalls_sam3.c dtostrf.c itoa.c
|
||||||
|
|
||||||
|
ifeq ($(U8GLIB), 1)
|
||||||
|
LIB_SRC += u8g_com_api.c u8g_pb32h1.c
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Add all the source directories as include directories too
|
# Add all the source directories as include directories too
|
||||||
CINCS = ${addprefix -I ,${VPATH}}
|
CINCS = ${addprefix -I ,${VPATH}}
|
||||||
CXXINCS = ${addprefix -I ,${VPATH}}
|
CXXINCS = ${addprefix -I ,${VPATH}}
|
||||||
|
|
||||||
|
# Silence warnings for library code (won't work for .h files, unfortunately)
|
||||||
|
LIBWARN = -w -Wno-packed-bitfield-compat
|
||||||
|
|
||||||
# Compiler flag to set the C/CPP Standard level.
|
# Compiler flag to set the C/CPP Standard level.
|
||||||
CSTANDARD = -std=gnu99
|
CSTANDARD = -std=gnu99
|
||||||
CXXSTANDARD = -std=gnu++11
|
CXXSTANDARD = -std=gnu++11
|
||||||
CDEBUG = -g$(DEBUG)
|
CDEBUG = -g$(DEBUG)
|
||||||
CWARN = -Wall -Wstrict-prototypes
|
CWARN = -Wall -Wstrict-prototypes -Wno-packed-bitfield-compat -Wno-pragmas -Wunused-parameter
|
||||||
CTUNING = -w -fsigned-char -funsigned-bitfields -fpack-struct \
|
CXXWARN = -Wall -Wno-packed-bitfield-compat -Wno-pragmas -Wunused-parameter
|
||||||
-fshort-enums -ffunction-sections -fdata-sections -flto \
|
CTUNING = -fsigned-char -funsigned-bitfields -fno-exceptions \
|
||||||
-DARDUINO=$(ARDUINO_VERSION)
|
-fshort-enums -ffunction-sections -fdata-sections
|
||||||
ifneq ($(HARDWARE_MOTHERBOARD),)
|
ifneq ($(HARDWARE_MOTHERBOARD),)
|
||||||
CTUNING += -DMOTHERBOARD=${HARDWARE_MOTHERBOARD}
|
CTUNING += -DMOTHERBOARD=${HARDWARE_MOTHERBOARD}
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#CEXTRA = -Wa,-adhlns=$(<:.c=.lst)
|
#CEXTRA = -Wa,-adhlns=$(<:.c=.lst)
|
||||||
CEXTRA = -fno-use-cxa-atexit -fno-threadsafe-statics
|
CXXEXTRA = -fno-use-cxa-atexit -fno-threadsafe-statics -fno-rtti
|
||||||
|
CFLAGS := $(CDEBUG) $(CDEFS) $(CINCS) -O$(OPT) $(CEXTRA) $(CTUNING) $(CSTANDARD)
|
||||||
CFLAGS := $(CDEBUG) $(CDEFS) $(CINCS) -O$(OPT) $(CWARN) $(CEXTRA) $(CTUNING) $(CSTANDARD)
|
CXXFLAGS := $(CDEFS) $(CINCS) -O$(OPT) $(CXXEXTRA) $(CTUNING) $(CXXSTANDARD)
|
||||||
CXXFLAGS := $(CDEFS) $(CINCS) -O$(OPT) -Wall $(CEXTRA) $(CTUNING) $(CXXSTANDARD)
|
ASFLAGS := $(CDEFS)
|
||||||
#ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs
|
#ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs
|
||||||
LDFLAGS = -lm
|
|
||||||
|
|
||||||
|
ifeq ($(HARDWARE_VARIANT), archim)
|
||||||
|
LD_PREFIX = -Wl,--gc-sections,-Map,Marlin.ino.map,--cref,--check-sections,--entry=Reset_Handler,--unresolved-symbols=report-all,--warn-common,--warn-section-align
|
||||||
|
LD_SUFFIX = $(LDLIBS)
|
||||||
|
|
||||||
|
LDFLAGS = -lm -T$(LDSCRIPT) -u _sbrk -u link -u _close -u _fstat -u _isatty
|
||||||
|
LDFLAGS += -u _lseek -u _read -u _write -u _exit -u kill -u _getpid
|
||||||
|
else
|
||||||
|
LD_PREFIX = -Wl,--gc-sections,--relax
|
||||||
|
LDFLAGS = -lm
|
||||||
|
CTUNING += -flto
|
||||||
|
endif
|
||||||
|
|
||||||
# Programming support using avrdude. Settings and variables.
|
# Programming support using avrdude. Settings and variables.
|
||||||
AVRDUDE_PORT = $(UPLOAD_PORT)
|
AVRDUDE_PORT = $(UPLOAD_PORT)
|
||||||
|
|
@ -598,7 +841,7 @@ else
|
||||||
AVRDUDE_CONF = $(ARDUINO_INSTALL_DIR)/hardware/tools/avr/etc/avrdude.conf
|
AVRDUDE_CONF = $(ARDUINO_INSTALL_DIR)/hardware/tools/avr/etc/avrdude.conf
|
||||||
endif
|
endif
|
||||||
AVRDUDE_FLAGS = -D -C$(AVRDUDE_CONF) \
|
AVRDUDE_FLAGS = -D -C$(AVRDUDE_CONF) \
|
||||||
-p$(MCU) -P$(AVRDUDE_PORT) -c$(AVRDUDE_PROGRAMMER) \
|
-p$(PROG_MCU) -P$(AVRDUDE_PORT) -c$(AVRDUDE_PROGRAMMER) \
|
||||||
-b$(UPLOAD_RATE)
|
-b$(UPLOAD_RATE)
|
||||||
|
|
||||||
# Since Marlin 2.0, the source files may be distributed into several
|
# Since Marlin 2.0, the source files may be distributed into several
|
||||||
|
|
@ -619,9 +862,9 @@ LST = $(LIB_ASRC:.S=.lst) $(LIB_CXXSRC:.cpp=.lst) $(LIB_SRC:.c=.lst)
|
||||||
|
|
||||||
# Combine all necessary flags and optional flags.
|
# Combine all necessary flags and optional flags.
|
||||||
# Add target processor to flags.
|
# Add target processor to flags.
|
||||||
ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS)
|
ALL_CFLAGS = $(MCU_FLAGS) $(CPU_FLAGS) $(CFLAGS) -I.
|
||||||
ALL_CXXFLAGS = -mmcu=$(MCU) $(CXXFLAGS)
|
ALL_CXXFLAGS = $(MCU_FLAGS) $(CPU_FLAGS) $(CXXFLAGS)
|
||||||
ALL_ASFLAGS = -mmcu=$(MCU) -x assembler-with-cpp $(ASFLAGS)
|
ALL_ASFLAGS = $(MCU_FLAGS) $(CPU_FLAGS) $(ASFLAGS) -x assembler-with-cpp
|
||||||
|
|
||||||
# set V=1 (eg, "make V=1") to print the full commands etc.
|
# set V=1 (eg, "make V=1") to print the full commands etc.
|
||||||
ifneq ($V,1)
|
ifneq ($V,1)
|
||||||
|
|
@ -639,9 +882,10 @@ $(shell mkdir -p $(dir $(OBJ)))
|
||||||
# Default target.
|
# Default target.
|
||||||
all: sizeafter
|
all: sizeafter
|
||||||
|
|
||||||
build: elf hex
|
build: elf hex bin
|
||||||
|
|
||||||
elf: $(BUILD_DIR)/$(TARGET).elf
|
elf: $(BUILD_DIR)/$(TARGET).elf
|
||||||
|
bin: $(BUILD_DIR)/$(TARGET).bin
|
||||||
hex: $(BUILD_DIR)/$(TARGET).hex
|
hex: $(BUILD_DIR)/$(TARGET).hex
|
||||||
eep: $(BUILD_DIR)/$(TARGET).eep
|
eep: $(BUILD_DIR)/$(TARGET).eep
|
||||||
lss: $(BUILD_DIR)/$(TARGET).lss
|
lss: $(BUILD_DIR)/$(TARGET).lss
|
||||||
|
|
@ -660,7 +904,7 @@ endif
|
||||||
|
|
||||||
# Display size of file.
|
# Display size of file.
|
||||||
HEXSIZE = $(SIZE) --target=$(FORMAT) $(BUILD_DIR)/$(TARGET).hex
|
HEXSIZE = $(SIZE) --target=$(FORMAT) $(BUILD_DIR)/$(TARGET).hex
|
||||||
ELFSIZE = $(SIZE) --mcu=$(MCU) -C $(BUILD_DIR)/$(TARGET).elf; \
|
ELFSIZE = $(SIZE) $(SIZE_FLAGS) $(BUILD_DIR)/$(TARGET).elf; \
|
||||||
$(SIZE) $(BUILD_DIR)/$(TARGET).elf
|
$(SIZE) $(BUILD_DIR)/$(TARGET).elf
|
||||||
sizebefore:
|
sizebefore:
|
||||||
$P if [ -f $(BUILD_DIR)/$(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(HEXSIZE); echo; fi
|
$P if [ -f $(BUILD_DIR)/$(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(HEXSIZE); echo; fi
|
||||||
|
|
@ -685,13 +929,17 @@ extcoff: $(TARGET).elf
|
||||||
$(COFFCONVERT) -O coff-ext-avr $(BUILD_DIR)/$(TARGET).elf $(TARGET).cof
|
$(COFFCONVERT) -O coff-ext-avr $(BUILD_DIR)/$(TARGET).elf $(TARGET).cof
|
||||||
|
|
||||||
|
|
||||||
.SUFFIXES: .elf .hex .eep .lss .sym
|
.SUFFIXES: .elf .hex .eep .lss .sym .bin
|
||||||
.PRECIOUS: .o
|
.PRECIOUS: .o
|
||||||
|
|
||||||
.elf.hex:
|
.elf.hex:
|
||||||
$(Pecho) " COPY $@"
|
$(Pecho) " COPY $@"
|
||||||
$P $(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@
|
$P $(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@
|
||||||
|
|
||||||
|
.elf.bin:
|
||||||
|
$(Pecho) " COPY $@"
|
||||||
|
$P $(OBJCOPY) -O binary -R .eeprom $< $@
|
||||||
|
|
||||||
.elf.eep:
|
.elf.eep:
|
||||||
-$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \
|
-$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \
|
||||||
--change-section-lma .eeprom=0 -O $(FORMAT) $< $@
|
--change-section-lma .eeprom=0 -O $(FORMAT) $< $@
|
||||||
|
|
@ -708,28 +956,32 @@ extcoff: $(TARGET).elf
|
||||||
|
|
||||||
$(BUILD_DIR)/$(TARGET).elf: $(OBJ) Configuration.h
|
$(BUILD_DIR)/$(TARGET).elf: $(OBJ) Configuration.h
|
||||||
$(Pecho) " CXX $@"
|
$(Pecho) " CXX $@"
|
||||||
$P $(CC) $(LD_PREFIX) $(ALL_CXXFLAGS) -Wl,--gc-sections,--relax -o $@ -L. $(OBJ) $(LDFLAGS) $(LD_SUFFIX)
|
$P $(CXX) $(LD_PREFIX) $(ALL_CXXFLAGS) -o $@ -L. $(OBJ) $(LDFLAGS) $(LD_SUFFIX)
|
||||||
|
|
||||||
# Object files that were found in "src" will be stored in $(BUILD_DIR)
|
# Object files that were found in "src" will be stored in $(BUILD_DIR)
|
||||||
# in directories that mirror the structure of "src"
|
# in directories that mirror the structure of "src"
|
||||||
|
|
||||||
$(BUILD_DIR)/%.o: %.c Configuration.h Configuration_adv.h $(MAKEFILE)
|
$(BUILD_DIR)/%.o: %.c Configuration.h Configuration_adv.h $(MAKEFILE)
|
||||||
$(Pecho) " CC $<"
|
$(Pecho) " CC $<"
|
||||||
$P $(CC) -MMD -c $(ALL_CFLAGS) $< -o $@
|
$P $(CC) -MMD -c $(ALL_CFLAGS) $(CWARN) $< -o $@
|
||||||
|
|
||||||
$(BUILD_DIR)/%.o: %.cpp Configuration.h Configuration_adv.h $(MAKEFILE)
|
$(BUILD_DIR)/%.o: %.cpp Configuration.h Configuration_adv.h $(MAKEFILE)
|
||||||
$(Pecho) " CXX $<"
|
$(Pecho) " CXX $<"
|
||||||
$P $(CXX) -MMD -c $(ALL_CXXFLAGS) $< -o $@
|
$P $(CXX) -MMD -c $(ALL_CXXFLAGS) $(CXXWARN) $< -o $@
|
||||||
|
|
||||||
# Object files for Arduino libs will be created in $(BUILD_DIR)/arduino
|
# Object files for Arduino libs will be created in $(BUILD_DIR)/arduino
|
||||||
|
|
||||||
$(BUILD_DIR)/arduino/%.o: %.c Configuration.h Configuration_adv.h $(MAKEFILE)
|
$(BUILD_DIR)/arduino/%.o: %.c Configuration.h Configuration_adv.h $(MAKEFILE)
|
||||||
$(Pecho) " CC $<"
|
$(Pecho) " CC $<"
|
||||||
$P $(CC) -MMD -c $(ALL_CFLAGS) $< -o $@
|
$P $(CC) -MMD -c $(ALL_CFLAGS) $(LIBWARN) $< -o $@
|
||||||
|
|
||||||
$(BUILD_DIR)/arduino/%.o: %.cpp Configuration.h Configuration_adv.h $(MAKEFILE)
|
$(BUILD_DIR)/arduino/%.o: %.cpp Configuration.h Configuration_adv.h $(MAKEFILE)
|
||||||
$(Pecho) " CXX $<"
|
$(Pecho) " CXX $<"
|
||||||
$P $(CXX) -MMD -c $(ALL_CXXFLAGS) $< -o $@
|
$P $(CXX) -MMD -c $(ALL_CXXFLAGS) $(LIBWARN) $< -o $@
|
||||||
|
|
||||||
|
$(BUILD_DIR)/arduino/%.o: %.S $(MAKEFILE)
|
||||||
|
$(Pecho) " CXX $<"
|
||||||
|
$P $(CXX) -MMD -c $(ALL_ASFLAGS) $< -o $@
|
||||||
|
|
||||||
# Target: clean project.
|
# Target: clean project.
|
||||||
clean:
|
clean:
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,8 @@
|
||||||
/*
|
/*==============================================================================
|
||||||
================================================================================
|
|
||||||
|
|
||||||
Marlin Firmware
|
Marlin Firmware
|
||||||
|
|
||||||
(c) 2011-2018 MarlinFirmware
|
(c) 2011-2020 MarlinFirmware
|
||||||
Portions of Marlin are (c) by their respective authors.
|
Portions of Marlin are (c) by their respective authors.
|
||||||
All code complies with GPLv2 and/or GPLv3
|
All code complies with GPLv2 and/or GPLv3
|
||||||
|
|
||||||
|
|
@ -12,30 +11,33 @@
|
||||||
Greetings! Thank you for choosing Marlin 2 as your 3D printer firmware.
|
Greetings! Thank you for choosing Marlin 2 as your 3D printer firmware.
|
||||||
|
|
||||||
To configure Marlin you must edit Configuration.h and Configuration_adv.h
|
To configure Marlin you must edit Configuration.h and Configuration_adv.h
|
||||||
located in the root 'Marlin' folder. Check the config/examples folder to see if
|
located in the root 'Marlin' folder. Check our Configurations repository to
|
||||||
there's a more suitable starting-point for your specific hardware.
|
see if there's a more suitable starting-point for your specific hardware.
|
||||||
|
|
||||||
Before diving in, we recommend the following essential links:
|
Before diving in, we recommend the following essential links:
|
||||||
|
|
||||||
Marlin Firmware Official Website
|
Marlin Firmware Official Website
|
||||||
|
|
||||||
- http://marlinfw.org/
|
- https://marlinfw.org/
|
||||||
The official Marlin Firmware website contains the most up-to-date
|
The official Marlin Firmware website contains the most up-to-date
|
||||||
documentation. Contributions are always welcome!
|
documentation. Contributions are always welcome!
|
||||||
|
|
||||||
Configuration
|
Configuration
|
||||||
|
|
||||||
|
- https://github.com/MarlinFirmware/Configurations
|
||||||
|
Example configurations for several printer models.
|
||||||
|
|
||||||
- https://www.youtube.com/watch?v=3gwWVFtdg-4
|
- https://www.youtube.com/watch?v=3gwWVFtdg-4
|
||||||
A good 20-minute overview of Marlin configuration by Tom Sanladerer.
|
A good 20-minute overview of Marlin configuration by Tom Sanladerer.
|
||||||
(Applies to Marlin 1.0.x, so Jerk and Acceleration should be halved.)
|
(Applies to Marlin 1.0.x, so Jerk and Acceleration should be halved.)
|
||||||
Also... https://www.google.com/search?tbs=vid%3A1&q=configure+marlin
|
Also... https://www.google.com/search?tbs=vid%3A1&q=configure+marlin
|
||||||
|
|
||||||
- http://marlinfw.org/docs/configuration/configuration.html
|
- https://marlinfw.org/docs/configuration/configuration.html
|
||||||
Marlin's configuration options are explained in more detail here.
|
Marlin's configuration options are explained in more detail here.
|
||||||
|
|
||||||
Getting Help
|
Getting Help
|
||||||
|
|
||||||
- http://forums.reprap.org/list.php?415
|
- https://reprap.org/forum/list.php?415
|
||||||
The Marlin Discussion Forum is a great place to get help from other Marlin
|
The Marlin Discussion Forum is a great place to get help from other Marlin
|
||||||
users who may have experienced similar issues to your own.
|
users who may have experienced similar issues to your own.
|
||||||
|
|
||||||
|
|
@ -45,9 +47,11 @@ Getting Help
|
||||||
|
|
||||||
Contributing
|
Contributing
|
||||||
|
|
||||||
- http://marlinfw.org/docs/development/contributing.html
|
- https://marlinfw.org/docs/development/contributing.html
|
||||||
If you'd like to contribute to Marlin, read this first!
|
If you'd like to contribute to Marlin, read this first!
|
||||||
|
|
||||||
- http://marlinfw.org/docs/development/coding_standards.html
|
- https://marlinfw.org/docs/development/coding_standards.html
|
||||||
Before submitting code get to know the Coding Standards.
|
Before submitting code get to know the Coding Standards.
|
||||||
*/
|
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------*/
|
||||||
|
|
|
||||||
76
Marlin/Version.h
Normal file
76
Marlin/Version.h
Normal file
|
|
@ -0,0 +1,76 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
////////////////////////////
|
||||||
|
// VENDOR VERSION EXAMPLE //
|
||||||
|
////////////////////////////
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Marlin release version identifier
|
||||||
|
*/
|
||||||
|
//#define SHORT_BUILD_VERSION "2.0.7.2"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Verbose version identifier which should contain a reference to the location
|
||||||
|
* from where the binary was downloaded or the source code was compiled.
|
||||||
|
*/
|
||||||
|
//#define DETAILED_BUILD_VERSION SHORT_BUILD_VERSION
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The STRING_DISTRIBUTION_DATE represents when the binary file was built,
|
||||||
|
* here we define this default string as the date where the latest release
|
||||||
|
* version was tagged.
|
||||||
|
*/
|
||||||
|
//#define STRING_DISTRIBUTION_DATE "2020-07-09"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defines a generic printer name to be output to the LCD after booting Marlin.
|
||||||
|
*/
|
||||||
|
//#define MACHINE_NAME "3D Printer"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The SOURCE_CODE_URL is the location where users will find the Marlin Source
|
||||||
|
* Code which is installed on the device. In most cases —unless the manufacturer
|
||||||
|
* has a distinct Github fork— the Source Code URL should just be the main
|
||||||
|
* Marlin repository.
|
||||||
|
*/
|
||||||
|
//#define SOURCE_CODE_URL "https://github.com/MarlinFirmware/Marlin"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default generic printer UUID.
|
||||||
|
*/
|
||||||
|
//#define DEFAULT_MACHINE_UUID "cede2a2f-41a2-4748-9b12-c55c62f367ff"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The WEBSITE_URL is the location where users can get more information such as
|
||||||
|
* documentation about a specific Marlin release.
|
||||||
|
*/
|
||||||
|
//#define WEBSITE_URL "https://marlinfw.org"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the vendor info the serial USB interface, if changable
|
||||||
|
* Currently only supported by DUE platform
|
||||||
|
*/
|
||||||
|
//#define USB_DEVICE_VENDOR_ID 0x0000
|
||||||
|
//#define USB_DEVICE_PRODUCT_ID 0x0000
|
||||||
|
//#define USB_DEVICE_MANUFACTURE_NAME WEBSITE_URL
|
||||||
|
|
@ -33,4 +33,4 @@ PlatformIO will find your libraries automatically, configure preprocessor's
|
||||||
include paths and build them.
|
include paths and build them.
|
||||||
|
|
||||||
More information about PlatformIO Library Dependency Finder
|
More information about PlatformIO Library Dependency Finder
|
||||||
- http://docs.platformio.org/page/librarymanager/ldf.html
|
- https://docs.platformio.org/page/librarymanager/ldf.html
|
||||||
|
|
|
||||||
78
Marlin/src/HAL/AVR/HAL.cpp
Normal file
78
Marlin/src/HAL/AVR/HAL.cpp
Normal file
|
|
@ -0,0 +1,78 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#ifdef __AVR__
|
||||||
|
|
||||||
|
#include "../../inc/MarlinConfig.h"
|
||||||
|
#include "HAL.h"
|
||||||
|
|
||||||
|
// ------------------------
|
||||||
|
// Public Variables
|
||||||
|
// ------------------------
|
||||||
|
|
||||||
|
//uint8_t MCUSR;
|
||||||
|
|
||||||
|
// ------------------------
|
||||||
|
// Public functions
|
||||||
|
// ------------------------
|
||||||
|
|
||||||
|
void HAL_init() {
|
||||||
|
// Init Servo Pins
|
||||||
|
#define INIT_SERVO(N) OUT_WRITE(SERVO##N##_PIN, LOW)
|
||||||
|
#if HAS_SERVO_0
|
||||||
|
INIT_SERVO(0);
|
||||||
|
#endif
|
||||||
|
#if HAS_SERVO_1
|
||||||
|
INIT_SERVO(1);
|
||||||
|
#endif
|
||||||
|
#if HAS_SERVO_2
|
||||||
|
INIT_SERVO(2);
|
||||||
|
#endif
|
||||||
|
#if HAS_SERVO_3
|
||||||
|
INIT_SERVO(3);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#if ENABLED(SDSUPPORT)
|
||||||
|
|
||||||
|
#include "../../sd/SdFatUtil.h"
|
||||||
|
int freeMemory() { return SdFatUtil::FreeRam(); }
|
||||||
|
|
||||||
|
#else // !SDSUPPORT
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
extern char __bss_end;
|
||||||
|
extern char __heap_start;
|
||||||
|
extern void* __brkval;
|
||||||
|
|
||||||
|
int freeMemory() {
|
||||||
|
int free_memory;
|
||||||
|
if ((int)__brkval == 0)
|
||||||
|
free_memory = ((int)&free_memory) - ((int)&__bss_end);
|
||||||
|
else
|
||||||
|
free_memory = ((int)&free_memory) - ((int)__brkval);
|
||||||
|
return free_memory;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // !SDSUPPORT
|
||||||
|
|
||||||
|
#endif // __AVR__
|
||||||
191
Marlin/src/HAL/AVR/HAL.h
Normal file
191
Marlin/src/HAL/AVR/HAL.h
Normal file
|
|
@ -0,0 +1,191 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "../shared/Marduino.h"
|
||||||
|
#include "../shared/HAL_SPI.h"
|
||||||
|
#include "fastio.h"
|
||||||
|
#include "watchdog.h"
|
||||||
|
#include "math.h"
|
||||||
|
|
||||||
|
#ifdef IS_AT90USB
|
||||||
|
#include <HardwareSerial.h>
|
||||||
|
#else
|
||||||
|
#define HardwareSerial_h // Hack to prevent HardwareSerial.h header inclusion
|
||||||
|
#include "MarlinSerial.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <util/delay.h>
|
||||||
|
#include <avr/eeprom.h>
|
||||||
|
#include <avr/pgmspace.h>
|
||||||
|
#include <avr/interrupt.h>
|
||||||
|
#include <avr/io.h>
|
||||||
|
|
||||||
|
#ifndef pgm_read_ptr
|
||||||
|
// Compatibility for avr-libc 1.8.0-4.1 included with Ubuntu for
|
||||||
|
// Windows Subsystem for Linux on Windows 10 as of 10/18/2019
|
||||||
|
#define pgm_read_ptr_far(address_long) (void*)__ELPM_word((uint32_t)(address_long))
|
||||||
|
#define pgm_read_ptr_near(address_short) (void*)__LPM_word((uint16_t)(address_short))
|
||||||
|
#define pgm_read_ptr(address_short) pgm_read_ptr_near(address_short)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ------------------------
|
||||||
|
// Defines
|
||||||
|
// ------------------------
|
||||||
|
|
||||||
|
// AVR PROGMEM extension for sprintf_P
|
||||||
|
#define S_FMT "%S"
|
||||||
|
|
||||||
|
// AVR PROGMEM extension for string define
|
||||||
|
#define PGMSTR(NAM,STR) const char NAM[] PROGMEM = STR
|
||||||
|
|
||||||
|
#ifndef CRITICAL_SECTION_START
|
||||||
|
#define CRITICAL_SECTION_START() unsigned char _sreg = SREG; cli()
|
||||||
|
#define CRITICAL_SECTION_END() SREG = _sreg
|
||||||
|
#endif
|
||||||
|
#define ISRS_ENABLED() TEST(SREG, SREG_I)
|
||||||
|
#define ENABLE_ISRS() sei()
|
||||||
|
#define DISABLE_ISRS() cli()
|
||||||
|
|
||||||
|
// ------------------------
|
||||||
|
// Types
|
||||||
|
// ------------------------
|
||||||
|
|
||||||
|
typedef int8_t pin_t;
|
||||||
|
|
||||||
|
#define SHARED_SERVOS HAS_SERVOS
|
||||||
|
#define HAL_SERVO_LIB Servo
|
||||||
|
|
||||||
|
// ------------------------
|
||||||
|
// Public Variables
|
||||||
|
// ------------------------
|
||||||
|
|
||||||
|
//extern uint8_t MCUSR;
|
||||||
|
|
||||||
|
// Serial ports
|
||||||
|
#ifdef IS_AT90USB
|
||||||
|
#define MYSERIAL0 TERN(BLUETOOTH, bluetoothSerial, Serial)
|
||||||
|
#else
|
||||||
|
#if !WITHIN(SERIAL_PORT, -1, 3)
|
||||||
|
#error "SERIAL_PORT must be from -1 to 3. Please update your configuration."
|
||||||
|
#endif
|
||||||
|
#define MYSERIAL0 customizedSerial1
|
||||||
|
|
||||||
|
#ifdef SERIAL_PORT_2
|
||||||
|
#if !WITHIN(SERIAL_PORT_2, -1, 3)
|
||||||
|
#error "SERIAL_PORT_2 must be from -1 to 3. Please update your configuration."
|
||||||
|
#endif
|
||||||
|
#define MYSERIAL1 customizedSerial2
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef LCD_SERIAL_PORT
|
||||||
|
#if !WITHIN(LCD_SERIAL_PORT, -1, 3)
|
||||||
|
#error "LCD_SERIAL_PORT must be from -1 to 3. Please update your configuration."
|
||||||
|
#endif
|
||||||
|
#define LCD_SERIAL lcdSerial
|
||||||
|
#if HAS_DGUS_LCD
|
||||||
|
#define SERIAL_GET_TX_BUFFER_FREE() LCD_SERIAL.get_tx_buffer_free()
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ------------------------
|
||||||
|
// Public functions
|
||||||
|
// ------------------------
|
||||||
|
|
||||||
|
void HAL_init();
|
||||||
|
|
||||||
|
//void cli();
|
||||||
|
|
||||||
|
//void _delay_ms(const int delay);
|
||||||
|
|
||||||
|
inline void HAL_clear_reset_source() { MCUSR = 0; }
|
||||||
|
inline uint8_t HAL_get_reset_source() { return MCUSR; }
|
||||||
|
|
||||||
|
inline void HAL_reboot() {} // reboot the board or restart the bootloader
|
||||||
|
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wunused-function"
|
||||||
|
extern "C" {
|
||||||
|
int freeMemory();
|
||||||
|
}
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
|
||||||
|
// ADC
|
||||||
|
#ifdef DIDR2
|
||||||
|
#define HAL_ANALOG_SELECT(ind) do{ if (ind < 8) SBI(DIDR0, ind); else SBI(DIDR2, ind & 0x07); }while(0)
|
||||||
|
#else
|
||||||
|
#define HAL_ANALOG_SELECT(ind) SBI(DIDR0, ind);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
inline void HAL_adc_init() {
|
||||||
|
ADCSRA = _BV(ADEN) | _BV(ADSC) | _BV(ADIF) | 0x07;
|
||||||
|
DIDR0 = 0;
|
||||||
|
#ifdef DIDR2
|
||||||
|
DIDR2 = 0;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#define SET_ADMUX_ADCSRA(ch) ADMUX = _BV(REFS0) | (ch & 0x07); SBI(ADCSRA, ADSC)
|
||||||
|
#ifdef MUX5
|
||||||
|
#define HAL_START_ADC(ch) if (ch > 7) ADCSRB = _BV(MUX5); else ADCSRB = 0; SET_ADMUX_ADCSRA(ch)
|
||||||
|
#else
|
||||||
|
#define HAL_START_ADC(ch) ADCSRB = 0; SET_ADMUX_ADCSRA(ch)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define HAL_ADC_VREF 5.0
|
||||||
|
#define HAL_ADC_RESOLUTION 10
|
||||||
|
#define HAL_READ_ADC() ADC
|
||||||
|
#define HAL_ADC_READY() !TEST(ADCSRA, ADSC)
|
||||||
|
|
||||||
|
#define GET_PIN_MAP_PIN(index) index
|
||||||
|
#define GET_PIN_MAP_INDEX(pin) pin
|
||||||
|
#define PARSED_PIN_INDEX(code, dval) parser.intval(code, dval)
|
||||||
|
|
||||||
|
#define HAL_SENSITIVE_PINS 0, 1
|
||||||
|
|
||||||
|
#ifdef __AVR_AT90USB1286__
|
||||||
|
#define JTAG_DISABLE() do{ MCUCR = 0x80; MCUCR = 0x80; }while(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// AVR compatibility
|
||||||
|
#define strtof strtod
|
||||||
|
|
||||||
|
#define HAL_CAN_SET_PWM_FREQ // This HAL supports PWM Frequency adjustment
|
||||||
|
|
||||||
|
/**
|
||||||
|
* set_pwm_frequency
|
||||||
|
* Sets the frequency of the timer corresponding to the provided pin
|
||||||
|
* as close as possible to the provided desired frequency. Internally
|
||||||
|
* calculates the required waveform generation mode, prescaler and
|
||||||
|
* resolution values required and sets the timer registers accordingly.
|
||||||
|
* NOTE that the frequency is applied to all pins on the timer (Ex OC3A, OC3B and OC3B)
|
||||||
|
* NOTE that there are limitations, particularly if using TIMER2. (see Configuration_adv.h -> FAST FAN PWM Settings)
|
||||||
|
*/
|
||||||
|
void set_pwm_frequency(const pin_t pin, int f_desired);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* set_pwm_duty
|
||||||
|
* Sets the PWM duty cycle of the provided pin to the provided value
|
||||||
|
* Optionally allows inverting the duty cycle [default = false]
|
||||||
|
* Optionally allows changing the maximum size of the provided value to enable finer PWM duty control [default = 255]
|
||||||
|
*/
|
||||||
|
void set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v_size=255, const bool invert=false);
|
||||||
253
Marlin/src/HAL/AVR/HAL_SPI.cpp
Normal file
253
Marlin/src/HAL/AVR/HAL_SPI.cpp
Normal file
|
|
@ -0,0 +1,253 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adapted from Arduino Sd2Card Library
|
||||||
|
* Copyright (c) 2009 by William Greiman
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* HAL for AVR - SPI functions
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef __AVR__
|
||||||
|
|
||||||
|
#include "../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
|
void spiBegin() {
|
||||||
|
OUT_WRITE(SS_PIN, HIGH);
|
||||||
|
SET_OUTPUT(SCK_PIN);
|
||||||
|
SET_INPUT(MISO_PIN);
|
||||||
|
SET_OUTPUT(MOSI_PIN);
|
||||||
|
|
||||||
|
#if DISABLED(SOFTWARE_SPI)
|
||||||
|
// SS must be in output mode even it is not chip select
|
||||||
|
//SET_OUTPUT(SS_PIN);
|
||||||
|
// set SS high - may be chip select for another SPI device
|
||||||
|
//#if SET_SPI_SS_HIGH
|
||||||
|
//WRITE(SS_PIN, HIGH);
|
||||||
|
//#endif
|
||||||
|
// set a default rate
|
||||||
|
spiInit(1);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#if NONE(SOFTWARE_SPI, FORCE_SOFT_SPI)
|
||||||
|
|
||||||
|
// ------------------------
|
||||||
|
// Hardware SPI
|
||||||
|
// ------------------------
|
||||||
|
|
||||||
|
// make sure SPCR rate is in expected bits
|
||||||
|
#if (SPR0 != 0 || SPR1 != 1)
|
||||||
|
#error "unexpected SPCR bits"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize hardware SPI
|
||||||
|
* Set SCK rate to F_CPU/pow(2, 1 + spiRate) for spiRate [0,6]
|
||||||
|
*/
|
||||||
|
void spiInit(uint8_t spiRate) {
|
||||||
|
// See avr processor documentation
|
||||||
|
CBI(
|
||||||
|
#ifdef PRR
|
||||||
|
PRR
|
||||||
|
#elif defined(PRR0)
|
||||||
|
PRR0
|
||||||
|
#endif
|
||||||
|
, PRSPI);
|
||||||
|
|
||||||
|
SPCR = _BV(SPE) | _BV(MSTR) | (spiRate >> 1);
|
||||||
|
SPSR = spiRate & 1 || spiRate == 6 ? 0 : _BV(SPI2X);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** SPI receive a byte */
|
||||||
|
uint8_t spiRec() {
|
||||||
|
SPDR = 0xFF;
|
||||||
|
while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
|
||||||
|
return SPDR;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** SPI read data */
|
||||||
|
void spiRead(uint8_t* buf, uint16_t nbyte) {
|
||||||
|
if (nbyte-- == 0) return;
|
||||||
|
SPDR = 0xFF;
|
||||||
|
for (uint16_t i = 0; i < nbyte; i++) {
|
||||||
|
while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
|
||||||
|
buf[i] = SPDR;
|
||||||
|
SPDR = 0xFF;
|
||||||
|
}
|
||||||
|
while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
|
||||||
|
buf[nbyte] = SPDR;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** SPI send a byte */
|
||||||
|
void spiSend(uint8_t b) {
|
||||||
|
SPDR = b;
|
||||||
|
while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
|
||||||
|
}
|
||||||
|
|
||||||
|
/** SPI send block */
|
||||||
|
void spiSendBlock(uint8_t token, const uint8_t* buf) {
|
||||||
|
SPDR = token;
|
||||||
|
for (uint16_t i = 0; i < 512; i += 2) {
|
||||||
|
while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
|
||||||
|
SPDR = buf[i];
|
||||||
|
while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
|
||||||
|
SPDR = buf[i + 1];
|
||||||
|
}
|
||||||
|
while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/** begin spi transaction */
|
||||||
|
void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode) {
|
||||||
|
// Based on Arduino SPI library
|
||||||
|
// Clock settings are defined as follows. Note that this shows SPI2X
|
||||||
|
// inverted, so the bits form increasing numbers. Also note that
|
||||||
|
// fosc/64 appears twice
|
||||||
|
// SPR1 SPR0 ~SPI2X Freq
|
||||||
|
// 0 0 0 fosc/2
|
||||||
|
// 0 0 1 fosc/4
|
||||||
|
// 0 1 0 fosc/8
|
||||||
|
// 0 1 1 fosc/16
|
||||||
|
// 1 0 0 fosc/32
|
||||||
|
// 1 0 1 fosc/64
|
||||||
|
// 1 1 0 fosc/64
|
||||||
|
// 1 1 1 fosc/128
|
||||||
|
|
||||||
|
// We find the fastest clock that is less than or equal to the
|
||||||
|
// given clock rate. The clock divider that results in clock_setting
|
||||||
|
// is 2 ^^ (clock_div + 1). If nothing is slow enough, we'll use the
|
||||||
|
// slowest (128 == 2 ^^ 7, so clock_div = 6).
|
||||||
|
uint8_t clockDiv;
|
||||||
|
|
||||||
|
// When the clock is known at compiletime, use this if-then-else
|
||||||
|
// cascade, which the compiler knows how to completely optimize
|
||||||
|
// away. When clock is not known, use a loop instead, which generates
|
||||||
|
// shorter code.
|
||||||
|
if (__builtin_constant_p(spiClock)) {
|
||||||
|
if (spiClock >= F_CPU / 2) clockDiv = 0;
|
||||||
|
else if (spiClock >= F_CPU / 4) clockDiv = 1;
|
||||||
|
else if (spiClock >= F_CPU / 8) clockDiv = 2;
|
||||||
|
else if (spiClock >= F_CPU / 16) clockDiv = 3;
|
||||||
|
else if (spiClock >= F_CPU / 32) clockDiv = 4;
|
||||||
|
else if (spiClock >= F_CPU / 64) clockDiv = 5;
|
||||||
|
else clockDiv = 6;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
uint32_t clockSetting = F_CPU / 2;
|
||||||
|
clockDiv = 0;
|
||||||
|
while (clockDiv < 6 && spiClock < clockSetting) {
|
||||||
|
clockSetting /= 2;
|
||||||
|
clockDiv++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Compensate for the duplicate fosc/64
|
||||||
|
if (clockDiv == 6) clockDiv = 7;
|
||||||
|
|
||||||
|
// Invert the SPI2X bit
|
||||||
|
clockDiv ^= 0x1;
|
||||||
|
|
||||||
|
SPCR = _BV(SPE) | _BV(MSTR) | ((bitOrder == LSBFIRST) ? _BV(DORD) : 0) |
|
||||||
|
(dataMode << CPHA) | ((clockDiv >> 1) << SPR0);
|
||||||
|
SPSR = clockDiv | 0x01;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#else // SOFTWARE_SPI || FORCE_SOFT_SPI
|
||||||
|
|
||||||
|
// ------------------------
|
||||||
|
// Software SPI
|
||||||
|
// ------------------------
|
||||||
|
|
||||||
|
// nop to tune soft SPI timing
|
||||||
|
#define nop asm volatile ("\tnop\n")
|
||||||
|
|
||||||
|
void spiInit(uint8_t) { /* do nothing */ }
|
||||||
|
|
||||||
|
// Begin SPI transaction, set clock, bit order, data mode
|
||||||
|
void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode) { /* do nothing */ }
|
||||||
|
|
||||||
|
// Soft SPI receive byte
|
||||||
|
uint8_t spiRec() {
|
||||||
|
uint8_t data = 0;
|
||||||
|
// no interrupts during byte receive - about 8µs
|
||||||
|
cli();
|
||||||
|
// output pin high - like sending 0xFF
|
||||||
|
WRITE(MOSI_PIN, HIGH);
|
||||||
|
|
||||||
|
LOOP_L_N(i, 8) {
|
||||||
|
WRITE(SCK_PIN, HIGH);
|
||||||
|
|
||||||
|
nop; // adjust so SCK is nice
|
||||||
|
nop;
|
||||||
|
|
||||||
|
data <<= 1;
|
||||||
|
|
||||||
|
if (READ(MISO_PIN)) data |= 1;
|
||||||
|
|
||||||
|
WRITE(SCK_PIN, LOW);
|
||||||
|
}
|
||||||
|
|
||||||
|
sei();
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Soft SPI read data
|
||||||
|
void spiRead(uint8_t* buf, uint16_t nbyte) {
|
||||||
|
for (uint16_t i = 0; i < nbyte; i++)
|
||||||
|
buf[i] = spiRec();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Soft SPI send byte
|
||||||
|
void spiSend(uint8_t data) {
|
||||||
|
// no interrupts during byte send - about 8µs
|
||||||
|
cli();
|
||||||
|
LOOP_L_N(i, 8) {
|
||||||
|
WRITE(SCK_PIN, LOW);
|
||||||
|
WRITE(MOSI_PIN, data & 0x80);
|
||||||
|
data <<= 1;
|
||||||
|
WRITE(SCK_PIN, HIGH);
|
||||||
|
}
|
||||||
|
|
||||||
|
nop; // hold SCK high for a few ns
|
||||||
|
nop;
|
||||||
|
nop;
|
||||||
|
nop;
|
||||||
|
|
||||||
|
WRITE(SCK_PIN, LOW);
|
||||||
|
|
||||||
|
sei();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Soft SPI send block
|
||||||
|
void spiSendBlock(uint8_t token, const uint8_t* buf) {
|
||||||
|
spiSend(token);
|
||||||
|
for (uint16_t i = 0; i < 512; i++)
|
||||||
|
spiSend(buf[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // SOFTWARE_SPI || FORCE_SOFT_SPI
|
||||||
|
|
||||||
|
#endif // __AVR__
|
||||||
802
Marlin/src/HAL/AVR/MarlinSerial.cpp
Normal file
802
Marlin/src/HAL/AVR/MarlinSerial.cpp
Normal file
|
|
@ -0,0 +1,802 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* MarlinSerial.cpp - Hardware serial library for Wiring
|
||||||
|
* Copyright (c) 2006 Nicholas Zambetti. All right reserved.
|
||||||
|
*
|
||||||
|
* Modified 23 November 2006 by David A. Mellis
|
||||||
|
* Modified 28 September 2010 by Mark Sproul
|
||||||
|
* Modified 14 February 2016 by Andreas Hardtung (added tx buffer)
|
||||||
|
* Modified 01 October 2017 by Eduardo José Tagle (added XON/XOFF)
|
||||||
|
* Modified 10 June 2018 by Eduardo José Tagle (See #10991)
|
||||||
|
* Templatized 01 October 2018 by Eduardo José Tagle to allow multiple instances
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef __AVR__
|
||||||
|
|
||||||
|
// Disable HardwareSerial.cpp to support chips without a UART (Attiny, etc.)
|
||||||
|
|
||||||
|
#include "../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
|
#if !IS_AT90USB && (defined(UBRRH) || defined(UBRR0H) || defined(UBRR1H) || defined(UBRR2H) || defined(UBRR3H))
|
||||||
|
|
||||||
|
#include "MarlinSerial.h"
|
||||||
|
#include "../../MarlinCore.h"
|
||||||
|
|
||||||
|
#if ENABLED(DIRECT_STEPPING)
|
||||||
|
#include "../../feature/direct_stepping.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
template<typename Cfg> typename MarlinSerial<Cfg>::ring_buffer_r MarlinSerial<Cfg>::rx_buffer = { 0, 0, { 0 } };
|
||||||
|
template<typename Cfg> typename MarlinSerial<Cfg>::ring_buffer_t MarlinSerial<Cfg>::tx_buffer = { 0 };
|
||||||
|
template<typename Cfg> bool MarlinSerial<Cfg>::_written = false;
|
||||||
|
template<typename Cfg> uint8_t MarlinSerial<Cfg>::xon_xoff_state = MarlinSerial<Cfg>::XON_XOFF_CHAR_SENT | MarlinSerial<Cfg>::XON_CHAR;
|
||||||
|
template<typename Cfg> uint8_t MarlinSerial<Cfg>::rx_dropped_bytes = 0;
|
||||||
|
template<typename Cfg> uint8_t MarlinSerial<Cfg>::rx_buffer_overruns = 0;
|
||||||
|
template<typename Cfg> uint8_t MarlinSerial<Cfg>::rx_framing_errors = 0;
|
||||||
|
template<typename Cfg> typename MarlinSerial<Cfg>::ring_buffer_pos_t MarlinSerial<Cfg>::rx_max_enqueued = 0;
|
||||||
|
|
||||||
|
// A SW memory barrier, to ensure GCC does not overoptimize loops
|
||||||
|
#define sw_barrier() asm volatile("": : :"memory");
|
||||||
|
|
||||||
|
#include "../../feature/e_parser.h"
|
||||||
|
|
||||||
|
// "Atomically" read the RX head index value without disabling interrupts:
|
||||||
|
// This MUST be called with RX interrupts enabled, and CAN'T be called
|
||||||
|
// from the RX ISR itself!
|
||||||
|
template<typename Cfg>
|
||||||
|
FORCE_INLINE typename MarlinSerial<Cfg>::ring_buffer_pos_t MarlinSerial<Cfg>::atomic_read_rx_head() {
|
||||||
|
if (Cfg::RX_SIZE > 256) {
|
||||||
|
// Keep reading until 2 consecutive reads return the same value,
|
||||||
|
// meaning there was no update in-between caused by an interrupt.
|
||||||
|
// This works because serial RX interrupts happen at a slower rate
|
||||||
|
// than successive reads of a variable, so 2 consecutive reads with
|
||||||
|
// the same value means no interrupt updated it.
|
||||||
|
ring_buffer_pos_t vold, vnew = rx_buffer.head;
|
||||||
|
sw_barrier();
|
||||||
|
do {
|
||||||
|
vold = vnew;
|
||||||
|
vnew = rx_buffer.head;
|
||||||
|
sw_barrier();
|
||||||
|
} while (vold != vnew);
|
||||||
|
return vnew;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// With an 8bit index, reads are always atomic. No need for special handling
|
||||||
|
return rx_buffer.head;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
volatile bool MarlinSerial<Cfg>::rx_tail_value_not_stable = false;
|
||||||
|
template<typename Cfg>
|
||||||
|
volatile uint16_t MarlinSerial<Cfg>::rx_tail_value_backup = 0;
|
||||||
|
|
||||||
|
// Set RX tail index, taking into account the RX ISR could interrupt
|
||||||
|
// the write to this variable in the middle - So a backup strategy
|
||||||
|
// is used to ensure reads of the correct values.
|
||||||
|
// -Must NOT be called from the RX ISR -
|
||||||
|
template<typename Cfg>
|
||||||
|
FORCE_INLINE void MarlinSerial<Cfg>::atomic_set_rx_tail(typename MarlinSerial<Cfg>::ring_buffer_pos_t value) {
|
||||||
|
if (Cfg::RX_SIZE > 256) {
|
||||||
|
// Store the new value in the backup
|
||||||
|
rx_tail_value_backup = value;
|
||||||
|
sw_barrier();
|
||||||
|
// Flag we are about to change the true value
|
||||||
|
rx_tail_value_not_stable = true;
|
||||||
|
sw_barrier();
|
||||||
|
// Store the new value
|
||||||
|
rx_buffer.tail = value;
|
||||||
|
sw_barrier();
|
||||||
|
// Signal the new value is completely stored into the value
|
||||||
|
rx_tail_value_not_stable = false;
|
||||||
|
sw_barrier();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
rx_buffer.tail = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get the RX tail index, taking into account the read could be
|
||||||
|
// interrupting in the middle of the update of that index value
|
||||||
|
// -Called from the RX ISR -
|
||||||
|
template<typename Cfg>
|
||||||
|
FORCE_INLINE typename MarlinSerial<Cfg>::ring_buffer_pos_t MarlinSerial<Cfg>::atomic_read_rx_tail() {
|
||||||
|
if (Cfg::RX_SIZE > 256) {
|
||||||
|
// If the true index is being modified, return the backup value
|
||||||
|
if (rx_tail_value_not_stable) return rx_tail_value_backup;
|
||||||
|
}
|
||||||
|
// The true index is stable, return it
|
||||||
|
return rx_buffer.tail;
|
||||||
|
}
|
||||||
|
|
||||||
|
// (called with RX interrupts disabled)
|
||||||
|
template<typename Cfg>
|
||||||
|
FORCE_INLINE void MarlinSerial<Cfg>::store_rxd_char() {
|
||||||
|
|
||||||
|
static EmergencyParser::State emergency_state; // = EP_RESET
|
||||||
|
|
||||||
|
// This must read the R_UCSRA register before reading the received byte to detect error causes
|
||||||
|
if (Cfg::DROPPED_RX && B_DOR && !++rx_dropped_bytes) --rx_dropped_bytes;
|
||||||
|
if (Cfg::RX_OVERRUNS && B_DOR && !++rx_buffer_overruns) --rx_buffer_overruns;
|
||||||
|
if (Cfg::RX_FRAMING_ERRORS && B_FE && !++rx_framing_errors) --rx_framing_errors;
|
||||||
|
|
||||||
|
// Read the character from the USART
|
||||||
|
uint8_t c = R_UDR;
|
||||||
|
|
||||||
|
#if ENABLED(DIRECT_STEPPING)
|
||||||
|
if (page_manager.maybe_store_rxd_char(c)) return;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Get the tail - Nothing can alter its value while this ISR is executing, but there's
|
||||||
|
// a chance that this ISR interrupted the main process while it was updating the index.
|
||||||
|
// The backup mechanism ensures the correct value is always returned.
|
||||||
|
const ring_buffer_pos_t t = atomic_read_rx_tail();
|
||||||
|
|
||||||
|
// Get the head pointer - This ISR is the only one that modifies its value, so it's safe to read here
|
||||||
|
ring_buffer_pos_t h = rx_buffer.head;
|
||||||
|
|
||||||
|
// Get the next element
|
||||||
|
ring_buffer_pos_t i = (ring_buffer_pos_t)(h + 1) & (ring_buffer_pos_t)(Cfg::RX_SIZE - 1);
|
||||||
|
|
||||||
|
if (Cfg::EMERGENCYPARSER) emergency_parser.update(emergency_state, c);
|
||||||
|
|
||||||
|
// If the character is to be stored at the index just before the tail
|
||||||
|
// (such that the head would advance to the current tail), the RX FIFO is
|
||||||
|
// full, so don't write the character or advance the head.
|
||||||
|
if (i != t) {
|
||||||
|
rx_buffer.buffer[h] = c;
|
||||||
|
h = i;
|
||||||
|
}
|
||||||
|
else if (Cfg::DROPPED_RX && !++rx_dropped_bytes)
|
||||||
|
--rx_dropped_bytes;
|
||||||
|
|
||||||
|
if (Cfg::MAX_RX_QUEUED) {
|
||||||
|
// Calculate count of bytes stored into the RX buffer
|
||||||
|
const ring_buffer_pos_t rx_count = (ring_buffer_pos_t)(h - t) & (ring_buffer_pos_t)(Cfg::RX_SIZE - 1);
|
||||||
|
|
||||||
|
// Keep track of the maximum count of enqueued bytes
|
||||||
|
NOLESS(rx_max_enqueued, rx_count);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Cfg::XONOFF) {
|
||||||
|
// If the last char that was sent was an XON
|
||||||
|
if ((xon_xoff_state & XON_XOFF_CHAR_MASK) == XON_CHAR) {
|
||||||
|
|
||||||
|
// Bytes stored into the RX buffer
|
||||||
|
const ring_buffer_pos_t rx_count = (ring_buffer_pos_t)(h - t) & (ring_buffer_pos_t)(Cfg::RX_SIZE - 1);
|
||||||
|
|
||||||
|
// If over 12.5% of RX buffer capacity, send XOFF before running out of
|
||||||
|
// RX buffer space .. 325 bytes @ 250kbits/s needed to let the host react
|
||||||
|
// and stop sending bytes. This translates to 13mS propagation time.
|
||||||
|
if (rx_count >= (Cfg::RX_SIZE) / 8) {
|
||||||
|
|
||||||
|
// At this point, definitely no TX interrupt was executing, since the TX ISR can't be preempted.
|
||||||
|
// Don't enable the TX interrupt here as a means to trigger the XOFF char, because if it happens
|
||||||
|
// to be in the middle of trying to disable the RX interrupt in the main program, eventually the
|
||||||
|
// enabling of the TX interrupt could be undone. The ONLY reliable thing this can do to ensure
|
||||||
|
// the sending of the XOFF char is to send it HERE AND NOW.
|
||||||
|
|
||||||
|
// About to send the XOFF char
|
||||||
|
xon_xoff_state = XOFF_CHAR | XON_XOFF_CHAR_SENT;
|
||||||
|
|
||||||
|
// Wait until the TX register becomes empty and send it - Here there could be a problem
|
||||||
|
// - While waiting for the TX register to empty, the RX register could receive a new
|
||||||
|
// character. This must also handle that situation!
|
||||||
|
while (!B_UDRE) {
|
||||||
|
|
||||||
|
if (B_RXC) {
|
||||||
|
// A char arrived while waiting for the TX buffer to be empty - Receive and process it!
|
||||||
|
|
||||||
|
i = (ring_buffer_pos_t)(h + 1) & (ring_buffer_pos_t)(Cfg::RX_SIZE - 1);
|
||||||
|
|
||||||
|
// Read the character from the USART
|
||||||
|
c = R_UDR;
|
||||||
|
|
||||||
|
if (Cfg::EMERGENCYPARSER) emergency_parser.update(emergency_state, c);
|
||||||
|
|
||||||
|
// If the character is to be stored at the index just before the tail
|
||||||
|
// (such that the head would advance to the current tail), the FIFO is
|
||||||
|
// full, so don't write the character or advance the head.
|
||||||
|
if (i != t) {
|
||||||
|
rx_buffer.buffer[h] = c;
|
||||||
|
h = i;
|
||||||
|
}
|
||||||
|
else if (Cfg::DROPPED_RX && !++rx_dropped_bytes)
|
||||||
|
--rx_dropped_bytes;
|
||||||
|
}
|
||||||
|
sw_barrier();
|
||||||
|
}
|
||||||
|
|
||||||
|
R_UDR = XOFF_CHAR;
|
||||||
|
|
||||||
|
// Clear the TXC bit -- "can be cleared by writing a one to its bit
|
||||||
|
// location". This makes sure flush() won't return until the bytes
|
||||||
|
// actually got written
|
||||||
|
B_TXC = 1;
|
||||||
|
|
||||||
|
// At this point there could be a race condition between the write() function
|
||||||
|
// and this sending of the XOFF char. This interrupt could happen between the
|
||||||
|
// wait to be empty TX buffer loop and the actual write of the character. Since
|
||||||
|
// the TX buffer is full because it's sending the XOFF char, the only way to be
|
||||||
|
// sure the write() function will succeed is to wait for the XOFF char to be
|
||||||
|
// completely sent. Since an extra character could be received during the wait
|
||||||
|
// it must also be handled!
|
||||||
|
while (!B_UDRE) {
|
||||||
|
|
||||||
|
if (B_RXC) {
|
||||||
|
// A char arrived while waiting for the TX buffer to be empty - Receive and process it!
|
||||||
|
|
||||||
|
i = (ring_buffer_pos_t)(h + 1) & (ring_buffer_pos_t)(Cfg::RX_SIZE - 1);
|
||||||
|
|
||||||
|
// Read the character from the USART
|
||||||
|
c = R_UDR;
|
||||||
|
|
||||||
|
if (Cfg::EMERGENCYPARSER)
|
||||||
|
emergency_parser.update(emergency_state, c);
|
||||||
|
|
||||||
|
// If the character is to be stored at the index just before the tail
|
||||||
|
// (such that the head would advance to the current tail), the FIFO is
|
||||||
|
// full, so don't write the character or advance the head.
|
||||||
|
if (i != t) {
|
||||||
|
rx_buffer.buffer[h] = c;
|
||||||
|
h = i;
|
||||||
|
}
|
||||||
|
else if (Cfg::DROPPED_RX && !++rx_dropped_bytes)
|
||||||
|
--rx_dropped_bytes;
|
||||||
|
}
|
||||||
|
sw_barrier();
|
||||||
|
}
|
||||||
|
|
||||||
|
// At this point everything is ready. The write() function won't
|
||||||
|
// have any issues writing to the UART TX register if it needs to!
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Store the new head value - The main loop will retry until the value is stable
|
||||||
|
rx_buffer.head = h;
|
||||||
|
}
|
||||||
|
|
||||||
|
// (called with TX irqs disabled)
|
||||||
|
template<typename Cfg>
|
||||||
|
FORCE_INLINE void MarlinSerial<Cfg>::_tx_udr_empty_irq() {
|
||||||
|
if (Cfg::TX_SIZE > 0) {
|
||||||
|
// Read positions
|
||||||
|
uint8_t t = tx_buffer.tail;
|
||||||
|
const uint8_t h = tx_buffer.head;
|
||||||
|
|
||||||
|
if (Cfg::XONOFF) {
|
||||||
|
// If an XON char is pending to be sent, do it now
|
||||||
|
if (xon_xoff_state == XON_CHAR) {
|
||||||
|
|
||||||
|
// Send the character
|
||||||
|
R_UDR = XON_CHAR;
|
||||||
|
|
||||||
|
// clear the TXC bit -- "can be cleared by writing a one to its bit
|
||||||
|
// location". This makes sure flush() won't return until the bytes
|
||||||
|
// actually got written
|
||||||
|
B_TXC = 1;
|
||||||
|
|
||||||
|
// Remember we sent it.
|
||||||
|
xon_xoff_state = XON_CHAR | XON_XOFF_CHAR_SENT;
|
||||||
|
|
||||||
|
// If nothing else to transmit, just disable TX interrupts.
|
||||||
|
if (h == t) B_UDRIE = 0; // (Non-atomic, could be reenabled by the main program, but eventually this will succeed)
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// If nothing to transmit, just disable TX interrupts. This could
|
||||||
|
// happen as the result of the non atomicity of the disabling of RX
|
||||||
|
// interrupts that could end reenabling TX interrupts as a side effect.
|
||||||
|
if (h == t) {
|
||||||
|
B_UDRIE = 0; // (Non-atomic, could be reenabled by the main program, but eventually this will succeed)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// There is something to TX, Send the next byte
|
||||||
|
const uint8_t c = tx_buffer.buffer[t];
|
||||||
|
t = (t + 1) & (Cfg::TX_SIZE - 1);
|
||||||
|
R_UDR = c;
|
||||||
|
tx_buffer.tail = t;
|
||||||
|
|
||||||
|
// Clear the TXC bit (by writing a one to its bit location).
|
||||||
|
// Ensures flush() won't return until the bytes are actually written/
|
||||||
|
B_TXC = 1;
|
||||||
|
|
||||||
|
// Disable interrupts if there is nothing to transmit following this byte
|
||||||
|
if (h == t) B_UDRIE = 0; // (Non-atomic, could be reenabled by the main program, but eventually this will succeed)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Public Methods
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::begin(const long baud) {
|
||||||
|
uint16_t baud_setting;
|
||||||
|
bool useU2X = true;
|
||||||
|
|
||||||
|
#if F_CPU == 16000000UL && SERIAL_PORT == 0
|
||||||
|
// Hard-coded exception for compatibility with the bootloader shipped
|
||||||
|
// with the Duemilanove and previous boards, and the firmware on the
|
||||||
|
// 8U2 on the Uno and Mega 2560.
|
||||||
|
if (baud == 57600) useU2X = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
R_UCSRA = 0;
|
||||||
|
if (useU2X) {
|
||||||
|
B_U2X = 1;
|
||||||
|
baud_setting = (F_CPU / 4 / baud - 1) / 2;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
baud_setting = (F_CPU / 8 / baud - 1) / 2;
|
||||||
|
|
||||||
|
// assign the baud_setting, a.k.a. ubbr (USART Baud Rate Register)
|
||||||
|
R_UBRRH = baud_setting >> 8;
|
||||||
|
R_UBRRL = baud_setting;
|
||||||
|
|
||||||
|
B_RXEN = 1;
|
||||||
|
B_TXEN = 1;
|
||||||
|
B_RXCIE = 1;
|
||||||
|
if (Cfg::TX_SIZE > 0) B_UDRIE = 0;
|
||||||
|
_written = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::end() {
|
||||||
|
B_RXEN = 0;
|
||||||
|
B_TXEN = 0;
|
||||||
|
B_RXCIE = 0;
|
||||||
|
B_UDRIE = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
int MarlinSerial<Cfg>::peek() {
|
||||||
|
const ring_buffer_pos_t h = atomic_read_rx_head(), t = rx_buffer.tail;
|
||||||
|
return h == t ? -1 : rx_buffer.buffer[t];
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
int MarlinSerial<Cfg>::read() {
|
||||||
|
const ring_buffer_pos_t h = atomic_read_rx_head();
|
||||||
|
|
||||||
|
// Read the tail. Main thread owns it, so it is safe to directly read it
|
||||||
|
ring_buffer_pos_t t = rx_buffer.tail;
|
||||||
|
|
||||||
|
// If nothing to read, return now
|
||||||
|
if (h == t) return -1;
|
||||||
|
|
||||||
|
// Get the next char
|
||||||
|
const int v = rx_buffer.buffer[t];
|
||||||
|
t = (ring_buffer_pos_t)(t + 1) & (Cfg::RX_SIZE - 1);
|
||||||
|
|
||||||
|
// Advance tail - Making sure the RX ISR will always get an stable value, even
|
||||||
|
// if it interrupts the writing of the value of that variable in the middle.
|
||||||
|
atomic_set_rx_tail(t);
|
||||||
|
|
||||||
|
if (Cfg::XONOFF) {
|
||||||
|
// If the XOFF char was sent, or about to be sent...
|
||||||
|
if ((xon_xoff_state & XON_XOFF_CHAR_MASK) == XOFF_CHAR) {
|
||||||
|
// Get count of bytes in the RX buffer
|
||||||
|
const ring_buffer_pos_t rx_count = (ring_buffer_pos_t)(h - t) & (ring_buffer_pos_t)(Cfg::RX_SIZE - 1);
|
||||||
|
if (rx_count < (Cfg::RX_SIZE) / 10) {
|
||||||
|
if (Cfg::TX_SIZE > 0) {
|
||||||
|
// Signal we want an XON character to be sent.
|
||||||
|
xon_xoff_state = XON_CHAR;
|
||||||
|
// Enable TX ISR. Non atomic, but it will eventually enable them
|
||||||
|
B_UDRIE = 1;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// If not using TX interrupts, we must send the XON char now
|
||||||
|
xon_xoff_state = XON_CHAR | XON_XOFF_CHAR_SENT;
|
||||||
|
while (!B_UDRE) sw_barrier();
|
||||||
|
R_UDR = XON_CHAR;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return v;
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
typename MarlinSerial<Cfg>::ring_buffer_pos_t MarlinSerial<Cfg>::available() {
|
||||||
|
const ring_buffer_pos_t h = atomic_read_rx_head(), t = rx_buffer.tail;
|
||||||
|
return (ring_buffer_pos_t)(Cfg::RX_SIZE + h - t) & (Cfg::RX_SIZE - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::flush() {
|
||||||
|
|
||||||
|
// Set the tail to the head:
|
||||||
|
// - Read the RX head index in a safe way. (See atomic_read_rx_head.)
|
||||||
|
// - Set the tail, making sure the RX ISR will always get a stable value, even
|
||||||
|
// if it interrupts the writing of the value of that variable in the middle.
|
||||||
|
atomic_set_rx_tail(atomic_read_rx_head());
|
||||||
|
|
||||||
|
if (Cfg::XONOFF) {
|
||||||
|
// If the XOFF char was sent, or about to be sent...
|
||||||
|
if ((xon_xoff_state & XON_XOFF_CHAR_MASK) == XOFF_CHAR) {
|
||||||
|
if (Cfg::TX_SIZE > 0) {
|
||||||
|
// Signal we want an XON character to be sent.
|
||||||
|
xon_xoff_state = XON_CHAR;
|
||||||
|
// Enable TX ISR. Non atomic, but it will eventually enable it.
|
||||||
|
B_UDRIE = 1;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// If not using TX interrupts, we must send the XON char now
|
||||||
|
xon_xoff_state = XON_CHAR | XON_XOFF_CHAR_SENT;
|
||||||
|
while (!B_UDRE) sw_barrier();
|
||||||
|
R_UDR = XON_CHAR;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::write(const uint8_t c) {
|
||||||
|
if (Cfg::TX_SIZE == 0) {
|
||||||
|
|
||||||
|
_written = true;
|
||||||
|
while (!B_UDRE) sw_barrier();
|
||||||
|
R_UDR = c;
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
|
_written = true;
|
||||||
|
|
||||||
|
// If the TX interrupts are disabled and the data register
|
||||||
|
// is empty, just write the byte to the data register and
|
||||||
|
// be done. This shortcut helps significantly improve the
|
||||||
|
// effective datarate at high (>500kbit/s) bitrates, where
|
||||||
|
// interrupt overhead becomes a slowdown.
|
||||||
|
// Yes, there is a race condition between the sending of the
|
||||||
|
// XOFF char at the RX ISR, but it is properly handled there
|
||||||
|
if (!B_UDRIE && B_UDRE) {
|
||||||
|
R_UDR = c;
|
||||||
|
|
||||||
|
// clear the TXC bit -- "can be cleared by writing a one to its bit
|
||||||
|
// location". This makes sure flush() won't return until the bytes
|
||||||
|
// actually got written
|
||||||
|
B_TXC = 1;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const uint8_t i = (tx_buffer.head + 1) & (Cfg::TX_SIZE - 1);
|
||||||
|
|
||||||
|
// If global interrupts are disabled (as the result of being called from an ISR)...
|
||||||
|
if (!ISRS_ENABLED()) {
|
||||||
|
|
||||||
|
// Make room by polling if it is possible to transmit, and do so!
|
||||||
|
while (i == tx_buffer.tail) {
|
||||||
|
|
||||||
|
// If we can transmit another byte, do it.
|
||||||
|
if (B_UDRE) _tx_udr_empty_irq();
|
||||||
|
|
||||||
|
// Make sure compiler rereads tx_buffer.tail
|
||||||
|
sw_barrier();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Interrupts are enabled, just wait until there is space
|
||||||
|
while (i == tx_buffer.tail) sw_barrier();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Store new char. head is always safe to move
|
||||||
|
tx_buffer.buffer[tx_buffer.head] = c;
|
||||||
|
tx_buffer.head = i;
|
||||||
|
|
||||||
|
// Enable TX ISR - Non atomic, but it will eventually enable TX ISR
|
||||||
|
B_UDRIE = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::flushTX() {
|
||||||
|
|
||||||
|
if (Cfg::TX_SIZE == 0) {
|
||||||
|
// No bytes written, no need to flush. This special case is needed since there's
|
||||||
|
// no way to force the TXC (transmit complete) bit to 1 during initialization.
|
||||||
|
if (!_written) return;
|
||||||
|
|
||||||
|
// Wait until everything was transmitted
|
||||||
|
while (!B_TXC) sw_barrier();
|
||||||
|
|
||||||
|
// At this point nothing is queued anymore (DRIE is disabled) and
|
||||||
|
// the hardware finished transmission (TXC is set).
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
|
// No bytes written, no need to flush. This special case is needed since there's
|
||||||
|
// no way to force the TXC (transmit complete) bit to 1 during initialization.
|
||||||
|
if (!_written) return;
|
||||||
|
|
||||||
|
// If global interrupts are disabled (as the result of being called from an ISR)...
|
||||||
|
if (!ISRS_ENABLED()) {
|
||||||
|
|
||||||
|
// Wait until everything was transmitted - We must do polling, as interrupts are disabled
|
||||||
|
while (tx_buffer.head != tx_buffer.tail || !B_TXC) {
|
||||||
|
|
||||||
|
// If there is more space, send an extra character
|
||||||
|
if (B_UDRE) _tx_udr_empty_irq();
|
||||||
|
|
||||||
|
sw_barrier();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Wait until everything was transmitted
|
||||||
|
while (tx_buffer.head != tx_buffer.tail || !B_TXC) sw_barrier();
|
||||||
|
}
|
||||||
|
|
||||||
|
// At this point nothing is queued anymore (DRIE is disabled) and
|
||||||
|
// the hardware finished transmission (TXC is set).
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Imports from print.h
|
||||||
|
*/
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::print(char c, int base) {
|
||||||
|
print((long)c, base);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::print(unsigned char b, int base) {
|
||||||
|
print((unsigned long)b, base);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::print(int n, int base) {
|
||||||
|
print((long)n, base);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::print(unsigned int n, int base) {
|
||||||
|
print((unsigned long)n, base);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::print(long n, int base) {
|
||||||
|
if (base == 0) write(n);
|
||||||
|
else if (base == 10) {
|
||||||
|
if (n < 0) { print('-'); n = -n; }
|
||||||
|
printNumber(n, 10);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
printNumber(n, base);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::print(unsigned long n, int base) {
|
||||||
|
if (base == 0) write(n);
|
||||||
|
else printNumber(n, base);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::print(double n, int digits) {
|
||||||
|
printFloat(n, digits);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::println() {
|
||||||
|
print('\r');
|
||||||
|
print('\n');
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::println(const String& s) {
|
||||||
|
print(s);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::println(const char c[]) {
|
||||||
|
print(c);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::println(char c, int base) {
|
||||||
|
print(c, base);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::println(unsigned char b, int base) {
|
||||||
|
print(b, base);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::println(int n, int base) {
|
||||||
|
print(n, base);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::println(unsigned int n, int base) {
|
||||||
|
print(n, base);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::println(long n, int base) {
|
||||||
|
print(n, base);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::println(unsigned long n, int base) {
|
||||||
|
print(n, base);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::println(double n, int digits) {
|
||||||
|
print(n, digits);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Private Methods
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::printNumber(unsigned long n, uint8_t base) {
|
||||||
|
if (n) {
|
||||||
|
unsigned char buf[8 * sizeof(long)]; // Enough space for base 2
|
||||||
|
int8_t i = 0;
|
||||||
|
while (n) {
|
||||||
|
buf[i++] = n % base;
|
||||||
|
n /= base;
|
||||||
|
}
|
||||||
|
while (i--)
|
||||||
|
print((char)(buf[i] + (buf[i] < 10 ? '0' : 'A' - 10)));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
print('0');
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::printFloat(double number, uint8_t digits) {
|
||||||
|
// Handle negative numbers
|
||||||
|
if (number < 0.0) {
|
||||||
|
print('-');
|
||||||
|
number = -number;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Round correctly so that print(1.999, 2) prints as "2.00"
|
||||||
|
double rounding = 0.5;
|
||||||
|
LOOP_L_N(i, digits) rounding *= 0.1;
|
||||||
|
number += rounding;
|
||||||
|
|
||||||
|
// Extract the integer part of the number and print it
|
||||||
|
unsigned long int_part = (unsigned long)number;
|
||||||
|
double remainder = number - (double)int_part;
|
||||||
|
print(int_part);
|
||||||
|
|
||||||
|
// Print the decimal point, but only if there are digits beyond
|
||||||
|
if (digits) {
|
||||||
|
print('.');
|
||||||
|
// Extract digits from the remainder one at a time
|
||||||
|
while (digits--) {
|
||||||
|
remainder *= 10.0;
|
||||||
|
int toPrint = int(remainder);
|
||||||
|
print(toPrint);
|
||||||
|
remainder -= toPrint;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Hookup ISR handlers
|
||||||
|
ISR(SERIAL_REGNAME(USART, SERIAL_PORT, _RX_vect)) {
|
||||||
|
MarlinSerial<MarlinSerialCfg<SERIAL_PORT>>::store_rxd_char();
|
||||||
|
}
|
||||||
|
|
||||||
|
ISR(SERIAL_REGNAME(USART, SERIAL_PORT, _UDRE_vect)) {
|
||||||
|
MarlinSerial<MarlinSerialCfg<SERIAL_PORT>>::_tx_udr_empty_irq();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Preinstantiate
|
||||||
|
template class MarlinSerial<MarlinSerialCfg<SERIAL_PORT>>;
|
||||||
|
|
||||||
|
// Instantiate
|
||||||
|
MarlinSerial<MarlinSerialCfg<SERIAL_PORT>> customizedSerial1;
|
||||||
|
|
||||||
|
#ifdef SERIAL_PORT_2
|
||||||
|
|
||||||
|
// Hookup ISR handlers
|
||||||
|
ISR(SERIAL_REGNAME(USART, SERIAL_PORT_2, _RX_vect)) {
|
||||||
|
MarlinSerial<MarlinSerialCfg<SERIAL_PORT_2>>::store_rxd_char();
|
||||||
|
}
|
||||||
|
|
||||||
|
ISR(SERIAL_REGNAME(USART, SERIAL_PORT_2, _UDRE_vect)) {
|
||||||
|
MarlinSerial<MarlinSerialCfg<SERIAL_PORT_2>>::_tx_udr_empty_irq();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Preinstantiate
|
||||||
|
template class MarlinSerial<MarlinSerialCfg<SERIAL_PORT_2>>;
|
||||||
|
|
||||||
|
// Instantiate
|
||||||
|
MarlinSerial<MarlinSerialCfg<SERIAL_PORT_2>> customizedSerial2;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef MMU2_SERIAL_PORT
|
||||||
|
|
||||||
|
ISR(SERIAL_REGNAME(USART, MMU2_SERIAL_PORT, _RX_vect)) {
|
||||||
|
MarlinSerial<MMU2SerialCfg<MMU2_SERIAL_PORT>>::store_rxd_char();
|
||||||
|
}
|
||||||
|
|
||||||
|
ISR(SERIAL_REGNAME(USART, MMU2_SERIAL_PORT, _UDRE_vect)) {
|
||||||
|
MarlinSerial<MMU2SerialCfg<MMU2_SERIAL_PORT>>::_tx_udr_empty_irq();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Preinstantiate
|
||||||
|
template class MarlinSerial<MMU2SerialCfg<MMU2_SERIAL_PORT>>;
|
||||||
|
|
||||||
|
// Instantiate
|
||||||
|
MarlinSerial<MMU2SerialCfg<MMU2_SERIAL_PORT>> mmuSerial;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef LCD_SERIAL_PORT
|
||||||
|
|
||||||
|
ISR(SERIAL_REGNAME(USART, LCD_SERIAL_PORT, _RX_vect)) {
|
||||||
|
MarlinSerial<LCDSerialCfg<LCD_SERIAL_PORT>>::store_rxd_char();
|
||||||
|
}
|
||||||
|
|
||||||
|
ISR(SERIAL_REGNAME(USART, LCD_SERIAL_PORT, _UDRE_vect)) {
|
||||||
|
MarlinSerial<LCDSerialCfg<LCD_SERIAL_PORT>>::_tx_udr_empty_irq();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Preinstantiate
|
||||||
|
template class MarlinSerial<LCDSerialCfg<LCD_SERIAL_PORT>>;
|
||||||
|
|
||||||
|
// Instantiate
|
||||||
|
MarlinSerial<LCDSerialCfg<LCD_SERIAL_PORT>> lcdSerial;
|
||||||
|
|
||||||
|
#if HAS_DGUS_LCD
|
||||||
|
template<typename Cfg>
|
||||||
|
typename MarlinSerial<Cfg>::ring_buffer_pos_t MarlinSerial<Cfg>::get_tx_buffer_free() {
|
||||||
|
const ring_buffer_pos_t t = tx_buffer.tail, // next byte to send.
|
||||||
|
h = tx_buffer.head; // next pos for queue.
|
||||||
|
int ret = t - h - 1;
|
||||||
|
if (ret < 0) ret += Cfg::TX_SIZE + 1;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // !IS_AT90USB && (UBRRH || UBRR0H || UBRR1H || UBRR2H || UBRR3H)
|
||||||
|
|
||||||
|
// For AT90USB targets use the UART for BT interfacing
|
||||||
|
#if BOTH(IS_AT90USB, BLUETOOTH)
|
||||||
|
HardwareSerial bluetoothSerial;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // __AVR__
|
||||||
332
Marlin/src/HAL/AVR/MarlinSerial.h
Normal file
332
Marlin/src/HAL/AVR/MarlinSerial.h
Normal file
|
|
@ -0,0 +1,332 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
/**
|
||||||
|
* MarlinSerial.h - Hardware serial library for Wiring
|
||||||
|
* Copyright (c) 2006 Nicholas Zambetti. All right reserved.
|
||||||
|
*
|
||||||
|
* Modified 28 September 2010 by Mark Sproul
|
||||||
|
* Modified 14 February 2016 by Andreas Hardtung (added tx buffer)
|
||||||
|
* Modified 01 October 2017 by Eduardo José Tagle (added XON/XOFF)
|
||||||
|
* Templatized 01 October 2018 by Eduardo José Tagle to allow multiple instances
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <WString.h>
|
||||||
|
|
||||||
|
#include "../../inc/MarlinConfigPre.h"
|
||||||
|
|
||||||
|
#ifndef SERIAL_PORT
|
||||||
|
#define SERIAL_PORT 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef USBCON
|
||||||
|
|
||||||
|
// The presence of the UBRRH register is used to detect a UART.
|
||||||
|
#define UART_PRESENT(port) ((port == 0 && (defined(UBRRH) || defined(UBRR0H))) || \
|
||||||
|
(port == 1 && defined(UBRR1H)) || (port == 2 && defined(UBRR2H)) || \
|
||||||
|
(port == 3 && defined(UBRR3H)))
|
||||||
|
|
||||||
|
// These are macros to build serial port register names for the selected SERIAL_PORT (C preprocessor
|
||||||
|
// requires two levels of indirection to expand macro values properly)
|
||||||
|
#define SERIAL_REGNAME(registerbase,number,suffix) _SERIAL_REGNAME(registerbase,number,suffix)
|
||||||
|
#if SERIAL_PORT == 0 && (!defined(UBRR0H) || !defined(UDR0)) // use un-numbered registers if necessary
|
||||||
|
#define _SERIAL_REGNAME(registerbase,number,suffix) registerbase##suffix
|
||||||
|
#else
|
||||||
|
#define _SERIAL_REGNAME(registerbase,number,suffix) registerbase##number##suffix
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Registers used by MarlinSerial class (expanded depending on selected serial port)
|
||||||
|
|
||||||
|
// Templated 8bit register (generic)
|
||||||
|
#define UART_REGISTER_DECL_BASE(registerbase, suffix) \
|
||||||
|
template<int portNr> struct R_##registerbase##x##suffix {}
|
||||||
|
|
||||||
|
// Templated 8bit register (specialization for each port)
|
||||||
|
#define UART_REGISTER_DECL(port, registerbase, suffix) \
|
||||||
|
template<> struct R_##registerbase##x##suffix<port> { \
|
||||||
|
constexpr R_##registerbase##x##suffix(int) {} \
|
||||||
|
FORCE_INLINE void operator=(uint8_t newVal) const { SERIAL_REGNAME(registerbase,port,suffix) = newVal; } \
|
||||||
|
FORCE_INLINE operator uint8_t() const { return SERIAL_REGNAME(registerbase,port,suffix); } \
|
||||||
|
}
|
||||||
|
|
||||||
|
// Templated 1bit register (generic)
|
||||||
|
#define UART_BIT_DECL_BASE(registerbase, suffix, bit) \
|
||||||
|
template<int portNr>struct B_##bit##x {}
|
||||||
|
|
||||||
|
// Templated 1bit register (specialization for each port)
|
||||||
|
#define UART_BIT_DECL(port, registerbase, suffix, bit) \
|
||||||
|
template<> struct B_##bit##x<port> { \
|
||||||
|
constexpr B_##bit##x(int) {} \
|
||||||
|
FORCE_INLINE void operator=(int newVal) const { \
|
||||||
|
if (newVal) \
|
||||||
|
SBI(SERIAL_REGNAME(registerbase,port,suffix),SERIAL_REGNAME(bit,port,)); \
|
||||||
|
else \
|
||||||
|
CBI(SERIAL_REGNAME(registerbase,port,suffix),SERIAL_REGNAME(bit,port,)); \
|
||||||
|
} \
|
||||||
|
FORCE_INLINE operator bool() const { return TEST(SERIAL_REGNAME(registerbase,port,suffix),SERIAL_REGNAME(bit,port,)); } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define UART_DECL_BASE() \
|
||||||
|
UART_REGISTER_DECL_BASE(UCSR,A);\
|
||||||
|
UART_REGISTER_DECL_BASE(UDR,);\
|
||||||
|
UART_REGISTER_DECL_BASE(UBRR,H);\
|
||||||
|
UART_REGISTER_DECL_BASE(UBRR,L);\
|
||||||
|
UART_BIT_DECL_BASE(UCSR,B,RXEN);\
|
||||||
|
UART_BIT_DECL_BASE(UCSR,B,TXEN);\
|
||||||
|
UART_BIT_DECL_BASE(UCSR,A,TXC);\
|
||||||
|
UART_BIT_DECL_BASE(UCSR,B,RXCIE);\
|
||||||
|
UART_BIT_DECL_BASE(UCSR,A,UDRE);\
|
||||||
|
UART_BIT_DECL_BASE(UCSR,A,FE);\
|
||||||
|
UART_BIT_DECL_BASE(UCSR,A,DOR);\
|
||||||
|
UART_BIT_DECL_BASE(UCSR,B,UDRIE);\
|
||||||
|
UART_BIT_DECL_BASE(UCSR,A,RXC);\
|
||||||
|
UART_BIT_DECL_BASE(UCSR,A,U2X)
|
||||||
|
|
||||||
|
#define UART_DECL(port) \
|
||||||
|
UART_REGISTER_DECL(port,UCSR,A);\
|
||||||
|
UART_REGISTER_DECL(port,UDR,);\
|
||||||
|
UART_REGISTER_DECL(port,UBRR,H);\
|
||||||
|
UART_REGISTER_DECL(port,UBRR,L);\
|
||||||
|
UART_BIT_DECL(port,UCSR,B,RXEN);\
|
||||||
|
UART_BIT_DECL(port,UCSR,B,TXEN);\
|
||||||
|
UART_BIT_DECL(port,UCSR,A,TXC);\
|
||||||
|
UART_BIT_DECL(port,UCSR,B,RXCIE);\
|
||||||
|
UART_BIT_DECL(port,UCSR,A,UDRE);\
|
||||||
|
UART_BIT_DECL(port,UCSR,A,FE);\
|
||||||
|
UART_BIT_DECL(port,UCSR,A,DOR);\
|
||||||
|
UART_BIT_DECL(port,UCSR,B,UDRIE);\
|
||||||
|
UART_BIT_DECL(port,UCSR,A,RXC);\
|
||||||
|
UART_BIT_DECL(port,UCSR,A,U2X)
|
||||||
|
|
||||||
|
// Declare empty templates
|
||||||
|
UART_DECL_BASE();
|
||||||
|
|
||||||
|
// And all the specializations for each possible serial port
|
||||||
|
#if UART_PRESENT(0)
|
||||||
|
UART_DECL(0);
|
||||||
|
#endif
|
||||||
|
#if UART_PRESENT(1)
|
||||||
|
UART_DECL(1);
|
||||||
|
#endif
|
||||||
|
#if UART_PRESENT(2)
|
||||||
|
UART_DECL(2);
|
||||||
|
#endif
|
||||||
|
#if UART_PRESENT(3)
|
||||||
|
UART_DECL(3);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define DEC 10
|
||||||
|
#define HEX 16
|
||||||
|
#define OCT 8
|
||||||
|
#define BIN 2
|
||||||
|
#define BYTE 0
|
||||||
|
|
||||||
|
// Templated type selector
|
||||||
|
template<bool b, typename T, typename F> struct TypeSelector { typedef T type;} ;
|
||||||
|
template<typename T, typename F> struct TypeSelector<false, T, F> { typedef F type; };
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
class MarlinSerial {
|
||||||
|
protected:
|
||||||
|
// Registers
|
||||||
|
static constexpr R_UCSRxA<Cfg::PORT> R_UCSRA = 0;
|
||||||
|
static constexpr R_UDRx<Cfg::PORT> R_UDR = 0;
|
||||||
|
static constexpr R_UBRRxH<Cfg::PORT> R_UBRRH = 0;
|
||||||
|
static constexpr R_UBRRxL<Cfg::PORT> R_UBRRL = 0;
|
||||||
|
|
||||||
|
// Bits
|
||||||
|
static constexpr B_RXENx<Cfg::PORT> B_RXEN = 0;
|
||||||
|
static constexpr B_TXENx<Cfg::PORT> B_TXEN = 0;
|
||||||
|
static constexpr B_TXCx<Cfg::PORT> B_TXC = 0;
|
||||||
|
static constexpr B_RXCIEx<Cfg::PORT> B_RXCIE = 0;
|
||||||
|
static constexpr B_UDREx<Cfg::PORT> B_UDRE = 0;
|
||||||
|
static constexpr B_FEx<Cfg::PORT> B_FE = 0;
|
||||||
|
static constexpr B_DORx<Cfg::PORT> B_DOR = 0;
|
||||||
|
static constexpr B_UDRIEx<Cfg::PORT> B_UDRIE = 0;
|
||||||
|
static constexpr B_RXCx<Cfg::PORT> B_RXC = 0;
|
||||||
|
static constexpr B_U2Xx<Cfg::PORT> B_U2X = 0;
|
||||||
|
|
||||||
|
// Base size of type on buffer size
|
||||||
|
typedef typename TypeSelector<(Cfg::RX_SIZE>256), uint16_t, uint8_t>::type ring_buffer_pos_t;
|
||||||
|
|
||||||
|
struct ring_buffer_r {
|
||||||
|
volatile ring_buffer_pos_t head, tail;
|
||||||
|
unsigned char buffer[Cfg::RX_SIZE];
|
||||||
|
};
|
||||||
|
|
||||||
|
struct ring_buffer_t {
|
||||||
|
volatile uint8_t head, tail;
|
||||||
|
unsigned char buffer[Cfg::TX_SIZE];
|
||||||
|
};
|
||||||
|
|
||||||
|
static ring_buffer_r rx_buffer;
|
||||||
|
static ring_buffer_t tx_buffer;
|
||||||
|
static bool _written;
|
||||||
|
|
||||||
|
static constexpr uint8_t XON_XOFF_CHAR_SENT = 0x80, // XON / XOFF Character was sent
|
||||||
|
XON_XOFF_CHAR_MASK = 0x1F; // XON / XOFF character to send
|
||||||
|
|
||||||
|
// XON / XOFF character definitions
|
||||||
|
static constexpr uint8_t XON_CHAR = 17, XOFF_CHAR = 19;
|
||||||
|
static uint8_t xon_xoff_state,
|
||||||
|
rx_dropped_bytes,
|
||||||
|
rx_buffer_overruns,
|
||||||
|
rx_framing_errors;
|
||||||
|
static ring_buffer_pos_t rx_max_enqueued;
|
||||||
|
|
||||||
|
static FORCE_INLINE ring_buffer_pos_t atomic_read_rx_head();
|
||||||
|
|
||||||
|
static volatile bool rx_tail_value_not_stable;
|
||||||
|
static volatile uint16_t rx_tail_value_backup;
|
||||||
|
|
||||||
|
static FORCE_INLINE void atomic_set_rx_tail(ring_buffer_pos_t value);
|
||||||
|
static FORCE_INLINE ring_buffer_pos_t atomic_read_rx_tail();
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
FORCE_INLINE static void store_rxd_char();
|
||||||
|
FORCE_INLINE static void _tx_udr_empty_irq();
|
||||||
|
|
||||||
|
public:
|
||||||
|
MarlinSerial() {};
|
||||||
|
static void begin(const long);
|
||||||
|
static void end();
|
||||||
|
static int peek();
|
||||||
|
static int read();
|
||||||
|
static void flush();
|
||||||
|
static ring_buffer_pos_t available();
|
||||||
|
static void write(const uint8_t c);
|
||||||
|
static void flushTX();
|
||||||
|
#if HAS_DGUS_LCD
|
||||||
|
static ring_buffer_pos_t get_tx_buffer_free();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static inline bool emergency_parser_enabled() { return Cfg::EMERGENCYPARSER; }
|
||||||
|
|
||||||
|
FORCE_INLINE static uint8_t dropped() { return Cfg::DROPPED_RX ? rx_dropped_bytes : 0; }
|
||||||
|
FORCE_INLINE static uint8_t buffer_overruns() { return Cfg::RX_OVERRUNS ? rx_buffer_overruns : 0; }
|
||||||
|
FORCE_INLINE static uint8_t framing_errors() { return Cfg::RX_FRAMING_ERRORS ? rx_framing_errors : 0; }
|
||||||
|
FORCE_INLINE static ring_buffer_pos_t rxMaxEnqueued() { return Cfg::MAX_RX_QUEUED ? rx_max_enqueued : 0; }
|
||||||
|
|
||||||
|
FORCE_INLINE static void write(const char* str) { while (*str) write(*str++); }
|
||||||
|
FORCE_INLINE static void write(const uint8_t* buffer, size_t size) { while (size--) write(*buffer++); }
|
||||||
|
FORCE_INLINE static void print(const String& s) { for (int i = 0; i < (int)s.length(); i++) write(s[i]); }
|
||||||
|
FORCE_INLINE static void print(const char* str) { write(str); }
|
||||||
|
|
||||||
|
static void print(char, int = BYTE);
|
||||||
|
static void print(unsigned char, int = BYTE);
|
||||||
|
static void print(int, int = DEC);
|
||||||
|
static void print(unsigned int, int = DEC);
|
||||||
|
static void print(long, int = DEC);
|
||||||
|
static void print(unsigned long, int = DEC);
|
||||||
|
static void print(double, int = 2);
|
||||||
|
|
||||||
|
static void println(const String& s);
|
||||||
|
static void println(const char[]);
|
||||||
|
static void println(char, int = BYTE);
|
||||||
|
static void println(unsigned char, int = BYTE);
|
||||||
|
static void println(int, int = DEC);
|
||||||
|
static void println(unsigned int, int = DEC);
|
||||||
|
static void println(long, int = DEC);
|
||||||
|
static void println(unsigned long, int = DEC);
|
||||||
|
static void println(double, int = 2);
|
||||||
|
static void println();
|
||||||
|
operator bool() { return true; }
|
||||||
|
|
||||||
|
private:
|
||||||
|
static void printNumber(unsigned long, const uint8_t);
|
||||||
|
static void printFloat(double, uint8_t);
|
||||||
|
};
|
||||||
|
|
||||||
|
template <uint8_t serial>
|
||||||
|
struct MarlinSerialCfg {
|
||||||
|
static constexpr int PORT = serial;
|
||||||
|
static constexpr unsigned int RX_SIZE = RX_BUFFER_SIZE;
|
||||||
|
static constexpr unsigned int TX_SIZE = TX_BUFFER_SIZE;
|
||||||
|
static constexpr bool XONOFF = ENABLED(SERIAL_XON_XOFF);
|
||||||
|
static constexpr bool EMERGENCYPARSER = ENABLED(EMERGENCY_PARSER);
|
||||||
|
static constexpr bool DROPPED_RX = ENABLED(SERIAL_STATS_DROPPED_RX);
|
||||||
|
static constexpr bool RX_OVERRUNS = ENABLED(SERIAL_STATS_RX_BUFFER_OVERRUNS);
|
||||||
|
static constexpr bool RX_FRAMING_ERRORS = ENABLED(SERIAL_STATS_RX_FRAMING_ERRORS);
|
||||||
|
static constexpr bool MAX_RX_QUEUED = ENABLED(SERIAL_STATS_MAX_RX_QUEUED);
|
||||||
|
};
|
||||||
|
extern MarlinSerial<MarlinSerialCfg<SERIAL_PORT>> customizedSerial1;
|
||||||
|
|
||||||
|
#ifdef SERIAL_PORT_2
|
||||||
|
|
||||||
|
extern MarlinSerial<MarlinSerialCfg<SERIAL_PORT_2>> customizedSerial2;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // !USBCON
|
||||||
|
|
||||||
|
#ifdef MMU2_SERIAL_PORT
|
||||||
|
template <uint8_t serial>
|
||||||
|
struct MMU2SerialCfg {
|
||||||
|
static constexpr int PORT = serial;
|
||||||
|
static constexpr bool XONOFF = false;
|
||||||
|
static constexpr bool EMERGENCYPARSER = false;
|
||||||
|
static constexpr bool DROPPED_RX = false;
|
||||||
|
static constexpr bool RX_FRAMING_ERRORS = false;
|
||||||
|
static constexpr bool MAX_RX_QUEUED = false;
|
||||||
|
static constexpr unsigned int RX_SIZE = 32;
|
||||||
|
static constexpr unsigned int TX_SIZE = 32;
|
||||||
|
static constexpr bool RX_OVERRUNS = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
extern MarlinSerial<MMU2SerialCfg<MMU2_SERIAL_PORT>> mmuSerial;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef LCD_SERIAL_PORT
|
||||||
|
|
||||||
|
template <uint8_t serial>
|
||||||
|
struct LCDSerialCfg {
|
||||||
|
static constexpr int PORT = serial;
|
||||||
|
static constexpr bool XONOFF = false;
|
||||||
|
static constexpr bool EMERGENCYPARSER = ENABLED(EMERGENCY_PARSER);
|
||||||
|
static constexpr bool DROPPED_RX = false;
|
||||||
|
static constexpr bool RX_FRAMING_ERRORS = false;
|
||||||
|
static constexpr bool MAX_RX_QUEUED = false;
|
||||||
|
#if HAS_DGUS_LCD
|
||||||
|
static constexpr unsigned int RX_SIZE = DGUS_RX_BUFFER_SIZE;
|
||||||
|
static constexpr unsigned int TX_SIZE = DGUS_TX_BUFFER_SIZE;
|
||||||
|
static constexpr bool RX_OVERRUNS = ENABLED(SERIAL_STATS_RX_BUFFER_OVERRUNS);
|
||||||
|
#elif EITHER(ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON)
|
||||||
|
static constexpr unsigned int RX_SIZE = 64;
|
||||||
|
static constexpr unsigned int TX_SIZE = 128;
|
||||||
|
static constexpr bool RX_OVERRUNS = false;
|
||||||
|
#else
|
||||||
|
static constexpr unsigned int RX_SIZE = 64;
|
||||||
|
static constexpr unsigned int TX_SIZE = 128;
|
||||||
|
static constexpr bool RX_OVERRUNS = false
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
extern MarlinSerial<LCDSerialCfg<LCD_SERIAL_PORT>> lcdSerial;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Use the UART for Bluetooth in AT90USB configurations
|
||||||
|
#if BOTH(IS_AT90USB, BLUETOOTH)
|
||||||
|
extern HardwareSerial bluetoothSerial;
|
||||||
|
#endif
|
||||||
216
Marlin/src/HAL/AVR/Servo.cpp
Normal file
216
Marlin/src/HAL/AVR/Servo.cpp
Normal file
|
|
@ -0,0 +1,216 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* servo.cpp - Interrupt driven Servo library for Arduino using 16 bit timers- Version 2
|
||||||
|
* Copyright (c) 2009 Michael Margolis. All right reserved.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A servo is activated by creating an instance of the Servo class passing the desired pin to the attach() method.
|
||||||
|
* The servos are pulsed in the background using the value most recently written using the write() method
|
||||||
|
*
|
||||||
|
* Note that analogWrite of PWM on pins associated with the timer are disabled when the first servo is attached.
|
||||||
|
* Timers are seized as needed in groups of 12 servos - 24 servos use two timers, 48 servos will use four.
|
||||||
|
*
|
||||||
|
* The methods are:
|
||||||
|
*
|
||||||
|
* Servo - Class for manipulating servo motors connected to Arduino pins.
|
||||||
|
*
|
||||||
|
* attach(pin) - Attach a servo motor to an i/o pin.
|
||||||
|
* attach(pin, min, max) - Attach to a pin, setting min and max values in microseconds
|
||||||
|
* Default min is 544, max is 2400
|
||||||
|
*
|
||||||
|
* write() - Set the servo angle in degrees. (Invalid angles —over MIN_PULSE_WIDTH— are treated as µs.)
|
||||||
|
* writeMicroseconds() - Set the servo pulse width in microseconds.
|
||||||
|
* move(pin, angle) - Sequence of attach(pin), write(angle), safe_delay(servo_delay[servoIndex]).
|
||||||
|
* With DEACTIVATE_SERVOS_AFTER_MOVE it detaches after servo_delay[servoIndex].
|
||||||
|
* read() - Get the last-written servo pulse width as an angle between 0 and 180.
|
||||||
|
* readMicroseconds() - Get the last-written servo pulse width in microseconds.
|
||||||
|
* attached() - Return true if a servo is attached.
|
||||||
|
* detach() - Stop an attached servo from pulsing its i/o pin.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef __AVR__
|
||||||
|
|
||||||
|
#include "../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
|
#if HAS_SERVOS
|
||||||
|
|
||||||
|
#include <avr/interrupt.h>
|
||||||
|
|
||||||
|
#include "../shared/servo.h"
|
||||||
|
#include "../shared/servo_private.h"
|
||||||
|
|
||||||
|
static volatile int8_t Channel[_Nbr_16timers]; // counter for the servo being pulsed for each timer (or -1 if refresh interval)
|
||||||
|
|
||||||
|
|
||||||
|
/************ static functions common to all instances ***********************/
|
||||||
|
|
||||||
|
static inline void handle_interrupts(timer16_Sequence_t timer, volatile uint16_t* TCNTn, volatile uint16_t* OCRnA) {
|
||||||
|
if (Channel[timer] < 0)
|
||||||
|
*TCNTn = 0; // channel set to -1 indicated that refresh interval completed so reset the timer
|
||||||
|
else {
|
||||||
|
if (SERVO_INDEX(timer, Channel[timer]) < ServoCount && SERVO(timer, Channel[timer]).Pin.isActive)
|
||||||
|
extDigitalWrite(SERVO(timer, Channel[timer]).Pin.nbr, LOW); // pulse this channel low if activated
|
||||||
|
}
|
||||||
|
|
||||||
|
Channel[timer]++; // increment to the next channel
|
||||||
|
if (SERVO_INDEX(timer, Channel[timer]) < ServoCount && Channel[timer] < SERVOS_PER_TIMER) {
|
||||||
|
*OCRnA = *TCNTn + SERVO(timer, Channel[timer]).ticks;
|
||||||
|
if (SERVO(timer, Channel[timer]).Pin.isActive) // check if activated
|
||||||
|
extDigitalWrite(SERVO(timer, Channel[timer]).Pin.nbr, HIGH); // it's an active channel so pulse it high
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// finished all channels so wait for the refresh period to expire before starting over
|
||||||
|
if (((unsigned)*TCNTn) + 4 < usToTicks(REFRESH_INTERVAL)) // allow a few ticks to ensure the next OCR1A not missed
|
||||||
|
*OCRnA = (unsigned int)usToTicks(REFRESH_INTERVAL);
|
||||||
|
else
|
||||||
|
*OCRnA = *TCNTn + 4; // at least REFRESH_INTERVAL has elapsed
|
||||||
|
Channel[timer] = -1; // this will get incremented at the end of the refresh period to start again at the first channel
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifndef WIRING // Wiring pre-defines signal handlers so don't define any if compiling for the Wiring platform
|
||||||
|
|
||||||
|
// Interrupt handlers for Arduino
|
||||||
|
#ifdef _useTimer1
|
||||||
|
SIGNAL(TIMER1_COMPA_vect) { handle_interrupts(_timer1, &TCNT1, &OCR1A); }
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef _useTimer3
|
||||||
|
SIGNAL(TIMER3_COMPA_vect) { handle_interrupts(_timer3, &TCNT3, &OCR3A); }
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef _useTimer4
|
||||||
|
SIGNAL(TIMER4_COMPA_vect) { handle_interrupts(_timer4, &TCNT4, &OCR4A); }
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef _useTimer5
|
||||||
|
SIGNAL(TIMER5_COMPA_vect) { handle_interrupts(_timer5, &TCNT5, &OCR5A); }
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#else // WIRING
|
||||||
|
|
||||||
|
// Interrupt handlers for Wiring
|
||||||
|
#ifdef _useTimer1
|
||||||
|
void Timer1Service() { handle_interrupts(_timer1, &TCNT1, &OCR1A); }
|
||||||
|
#endif
|
||||||
|
#ifdef _useTimer3
|
||||||
|
void Timer3Service() { handle_interrupts(_timer3, &TCNT3, &OCR3A); }
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // WIRING
|
||||||
|
|
||||||
|
/****************** end of static functions ******************************/
|
||||||
|
|
||||||
|
void initISR(timer16_Sequence_t timer) {
|
||||||
|
#ifdef _useTimer1
|
||||||
|
if (timer == _timer1) {
|
||||||
|
TCCR1A = 0; // normal counting mode
|
||||||
|
TCCR1B = _BV(CS11); // set prescaler of 8
|
||||||
|
TCNT1 = 0; // clear the timer count
|
||||||
|
#if defined(__AVR_ATmega8__) || defined(__AVR_ATmega128__)
|
||||||
|
SBI(TIFR, OCF1A); // clear any pending interrupts;
|
||||||
|
SBI(TIMSK, OCIE1A); // enable the output compare interrupt
|
||||||
|
#else
|
||||||
|
// here if not ATmega8 or ATmega128
|
||||||
|
SBI(TIFR1, OCF1A); // clear any pending interrupts;
|
||||||
|
SBI(TIMSK1, OCIE1A); // enable the output compare interrupt
|
||||||
|
#endif
|
||||||
|
#ifdef WIRING
|
||||||
|
timerAttach(TIMER1OUTCOMPAREA_INT, Timer1Service);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef _useTimer3
|
||||||
|
if (timer == _timer3) {
|
||||||
|
TCCR3A = 0; // normal counting mode
|
||||||
|
TCCR3B = _BV(CS31); // set prescaler of 8
|
||||||
|
TCNT3 = 0; // clear the timer count
|
||||||
|
#ifdef __AVR_ATmega128__
|
||||||
|
SBI(TIFR, OCF3A); // clear any pending interrupts;
|
||||||
|
SBI(ETIMSK, OCIE3A); // enable the output compare interrupt
|
||||||
|
#else
|
||||||
|
SBI(TIFR3, OCF3A); // clear any pending interrupts;
|
||||||
|
SBI(TIMSK3, OCIE3A); // enable the output compare interrupt
|
||||||
|
#endif
|
||||||
|
#ifdef WIRING
|
||||||
|
timerAttach(TIMER3OUTCOMPAREA_INT, Timer3Service); // for Wiring platform only
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef _useTimer4
|
||||||
|
if (timer == _timer4) {
|
||||||
|
TCCR4A = 0; // normal counting mode
|
||||||
|
TCCR4B = _BV(CS41); // set prescaler of 8
|
||||||
|
TCNT4 = 0; // clear the timer count
|
||||||
|
TIFR4 = _BV(OCF4A); // clear any pending interrupts;
|
||||||
|
TIMSK4 = _BV(OCIE4A); // enable the output compare interrupt
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef _useTimer5
|
||||||
|
if (timer == _timer5) {
|
||||||
|
TCCR5A = 0; // normal counting mode
|
||||||
|
TCCR5B = _BV(CS51); // set prescaler of 8
|
||||||
|
TCNT5 = 0; // clear the timer count
|
||||||
|
TIFR5 = _BV(OCF5A); // clear any pending interrupts;
|
||||||
|
TIMSK5 = _BV(OCIE5A); // enable the output compare interrupt
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void finISR(timer16_Sequence_t timer) {
|
||||||
|
// Disable use of the given timer
|
||||||
|
#ifdef WIRING
|
||||||
|
if (timer == _timer1) {
|
||||||
|
CBI(
|
||||||
|
#if defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__)
|
||||||
|
TIMSK1
|
||||||
|
#else
|
||||||
|
TIMSK
|
||||||
|
#endif
|
||||||
|
, OCIE1A); // disable timer 1 output compare interrupt
|
||||||
|
timerDetach(TIMER1OUTCOMPAREA_INT);
|
||||||
|
}
|
||||||
|
else if (timer == _timer3) {
|
||||||
|
CBI(
|
||||||
|
#if defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__)
|
||||||
|
TIMSK3
|
||||||
|
#else
|
||||||
|
ETIMSK
|
||||||
|
#endif
|
||||||
|
, OCIE3A); // disable the timer3 output compare A interrupt
|
||||||
|
timerDetach(TIMER3OUTCOMPAREA_INT);
|
||||||
|
}
|
||||||
|
#else // !WIRING
|
||||||
|
// For arduino - in future: call here to a currently undefined function to reset the timer
|
||||||
|
UNUSED(timer);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // HAS_SERVOS
|
||||||
|
|
||||||
|
#endif // __AVR__
|
||||||
93
Marlin/src/HAL/AVR/ServoTimers.h
Normal file
93
Marlin/src/HAL/AVR/ServoTimers.h
Normal file
|
|
@ -0,0 +1,93 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ServoTimers.h - Interrupt driven Servo library for Arduino using 16 bit timers- Version 2
|
||||||
|
* Copyright (c) 2009 Michael Margolis. All right reserved.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library 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
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defines for 16 bit timers used with Servo library
|
||||||
|
*
|
||||||
|
* If _useTimerX is defined then TimerX is a 16 bit timer on the current board
|
||||||
|
* timer16_Sequence_t enumerates the sequence that the timers should be allocated
|
||||||
|
* _Nbr_16timers indicates how many 16 bit timers are available.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* AVR Only definitions
|
||||||
|
* --------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define TRIM_DURATION 2 // compensation ticks to trim adjust for digitalWrite delays
|
||||||
|
#define SERVO_TIMER_PRESCALER 8 // timer prescaler
|
||||||
|
|
||||||
|
// Say which 16 bit timers can be used and in what order
|
||||||
|
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
|
||||||
|
//#define _useTimer1
|
||||||
|
#define _useTimer4
|
||||||
|
#if NUM_SERVOS > SERVOS_PER_TIMER
|
||||||
|
#define _useTimer3
|
||||||
|
#if !HAS_MOTOR_CURRENT_PWM && SERVOS > 2 * SERVOS_PER_TIMER
|
||||||
|
#define _useTimer5 // Timer 5 is used for motor current PWM and can't be used for servos.
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#elif defined(__AVR_ATmega32U4__)
|
||||||
|
#define _useTimer3
|
||||||
|
#elif defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__)
|
||||||
|
#define _useTimer3
|
||||||
|
#elif defined(__AVR_ATmega128__) || defined(__AVR_ATmega1281__) || defined(__AVR_ATmega1284P__) || defined(__AVR_ATmega2561__)
|
||||||
|
#define _useTimer3
|
||||||
|
#else
|
||||||
|
// everything else
|
||||||
|
#endif
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
#ifdef _useTimer1
|
||||||
|
_timer1,
|
||||||
|
#endif
|
||||||
|
#ifdef _useTimer3
|
||||||
|
_timer3,
|
||||||
|
#endif
|
||||||
|
#ifdef _useTimer4
|
||||||
|
_timer4,
|
||||||
|
#endif
|
||||||
|
#ifdef _useTimer5
|
||||||
|
_timer5,
|
||||||
|
#endif
|
||||||
|
_Nbr_16timers
|
||||||
|
} timer16_Sequence_t;
|
||||||
74
Marlin/src/HAL/AVR/eeprom.cpp
Normal file
74
Marlin/src/HAL/AVR/eeprom.cpp
Normal file
|
|
@ -0,0 +1,74 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#ifdef __AVR__
|
||||||
|
|
||||||
|
#include "../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
|
#if EITHER(EEPROM_SETTINGS, SD_FIRMWARE_UPDATE)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PersistentStore for Arduino-style EEPROM interface
|
||||||
|
* with implementations supplied by the framework.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "../shared/eeprom_api.h"
|
||||||
|
|
||||||
|
#ifndef MARLIN_EEPROM_SIZE
|
||||||
|
#define MARLIN_EEPROM_SIZE size_t(E2END + 1)
|
||||||
|
#endif
|
||||||
|
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; }
|
||||||
|
bool PersistentStore::access_start() { return true; }
|
||||||
|
bool PersistentStore::access_finish() { return true; }
|
||||||
|
|
||||||
|
bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
|
||||||
|
while (size--) {
|
||||||
|
uint8_t * const p = (uint8_t * const)pos;
|
||||||
|
uint8_t v = *value;
|
||||||
|
// EEPROM has only ~100,000 write cycles,
|
||||||
|
// so only write bytes that have changed!
|
||||||
|
if (v != eeprom_read_byte(p)) {
|
||||||
|
eeprom_write_byte(p, v);
|
||||||
|
if (eeprom_read_byte(p) != v) {
|
||||||
|
SERIAL_ECHO_MSG(STR_ERR_EEPROM_WRITE);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
crc16(crc, &v, 1);
|
||||||
|
pos++;
|
||||||
|
value++;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
|
||||||
|
do {
|
||||||
|
uint8_t c = eeprom_read_byte((uint8_t*)pos);
|
||||||
|
if (writing) *value = c;
|
||||||
|
crc16(crc, &c, 1);
|
||||||
|
pos++;
|
||||||
|
value++;
|
||||||
|
} while (--size);
|
||||||
|
return false; // always assume success for AVR's
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // EEPROM_SETTINGS || SD_FIRMWARE_UPDATE
|
||||||
|
#endif // __AVR__
|
||||||
261
Marlin/src/HAL/AVR/endstop_interrupts.h
Normal file
261
Marlin/src/HAL/AVR/endstop_interrupts.h
Normal file
|
|
@ -0,0 +1,261 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Endstop Interrupts
|
||||||
|
*
|
||||||
|
* Without endstop interrupts the endstop pins must be polled continually in
|
||||||
|
* the temperature-ISR via endstops.update(), most of the time finding no change.
|
||||||
|
* With this feature endstops.update() is called only when we know that at
|
||||||
|
* least one endstop has changed state, saving valuable CPU cycles.
|
||||||
|
*
|
||||||
|
* This feature only works when all used endstop pins can generate either an
|
||||||
|
* 'external interrupt' or a 'pin change interrupt'.
|
||||||
|
*
|
||||||
|
* Test whether pins issue interrupts on your board by flashing 'pin_interrupt_test.ino'.
|
||||||
|
* (Located in Marlin/buildroot/share/pin_interrupt_test/pin_interrupt_test.ino)
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "../../module/endstops.h"
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
// One ISR for all EXT-Interrupts
|
||||||
|
void endstop_ISR() { endstops.update(); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Patch for pins_arduino.h (...\Arduino\hardware\arduino\avr\variants\mega\pins_arduino.h)
|
||||||
|
*
|
||||||
|
* These macros for the Arduino MEGA do not include the two connected pins on Port J (D14, D15).
|
||||||
|
* So we extend them here because these are the normal pins for Y_MIN and Y_MAX on RAMPS.
|
||||||
|
* There are more PCI-enabled processor pins on Port J, but they are not connected to Arduino MEGA.
|
||||||
|
*/
|
||||||
|
#if defined(ARDUINO_AVR_MEGA2560) || defined(ARDUINO_AVR_MEGA)
|
||||||
|
|
||||||
|
#define digitalPinHasPCICR(p) (WITHIN(p, 10, 15) || WITHIN(p, 50, 53) || WITHIN(p, 62, 69))
|
||||||
|
|
||||||
|
#undef digitalPinToPCICR
|
||||||
|
#define digitalPinToPCICR(p) (digitalPinHasPCICR(p) ? (&PCICR) : nullptr)
|
||||||
|
|
||||||
|
#undef digitalPinToPCICRbit
|
||||||
|
#define digitalPinToPCICRbit(p) (WITHIN(p, 10, 13) || WITHIN(p, 50, 53) ? 0 : \
|
||||||
|
WITHIN(p, 14, 15) ? 1 : \
|
||||||
|
WITHIN(p, 62, 69) ? 2 : \
|
||||||
|
0)
|
||||||
|
|
||||||
|
#undef digitalPinToPCMSK
|
||||||
|
#define digitalPinToPCMSK(p) (WITHIN(p, 10, 13) || WITHIN(p, 50, 53) ? (&PCMSK0) : \
|
||||||
|
WITHIN(p, 14, 15) ? (&PCMSK1) : \
|
||||||
|
WITHIN(p, 62, 69) ? (&PCMSK2) : \
|
||||||
|
nullptr)
|
||||||
|
|
||||||
|
#undef digitalPinToPCMSKbit
|
||||||
|
#define digitalPinToPCMSKbit(p) (WITHIN(p, 10, 13) ? ((p) - 6) : \
|
||||||
|
(p) == 14 || (p) == 51 ? 2 : \
|
||||||
|
(p) == 15 || (p) == 52 ? 1 : \
|
||||||
|
(p) == 50 ? 3 : \
|
||||||
|
(p) == 53 ? 0 : \
|
||||||
|
WITHIN(p, 62, 69) ? ((p) - 62) : \
|
||||||
|
0)
|
||||||
|
|
||||||
|
#elif defined(__AVR_ATmega164A__) || defined(__AVR_ATmega164P__) || defined(__AVR_ATmega324A__) || \
|
||||||
|
defined(__AVR_ATmega324P__) || defined(__AVR_ATmega324PA__) || defined(__AVR_ATmega324PB__) || \
|
||||||
|
defined(__AVR_ATmega644A__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284__) || \
|
||||||
|
defined(__AVR_ATmega1284P__)
|
||||||
|
|
||||||
|
#define digitalPinHasPCICR(p) WITHIN(p, 0, NUM_DIGITAL_PINS)
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#error "Unsupported AVR variant!"
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
// Install Pin change interrupt for a pin. Can be called multiple times.
|
||||||
|
void pciSetup(const int8_t pin) {
|
||||||
|
if (digitalPinHasPCICR(pin)) {
|
||||||
|
SBI(*digitalPinToPCMSK(pin), digitalPinToPCMSKbit(pin)); // enable pin
|
||||||
|
SBI(PCIFR, digitalPinToPCICRbit(pin)); // clear any outstanding interrupt
|
||||||
|
SBI(PCICR, digitalPinToPCICRbit(pin)); // enable interrupt for the group
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Handlers for pin change interrupts
|
||||||
|
#ifdef PCINT0_vect
|
||||||
|
ISR(PCINT0_vect) { endstop_ISR(); }
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef PCINT1_vect
|
||||||
|
ISR(PCINT1_vect, ISR_ALIASOF(PCINT0_vect));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef PCINT2_vect
|
||||||
|
ISR(PCINT2_vect, ISR_ALIASOF(PCINT0_vect));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef PCINT3_vect
|
||||||
|
ISR(PCINT3_vect, ISR_ALIASOF(PCINT0_vect));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void setup_endstop_interrupts() {
|
||||||
|
#define _ATTACH(P) attachInterrupt(digitalPinToInterrupt(P), endstop_ISR, CHANGE)
|
||||||
|
#if HAS_X_MAX
|
||||||
|
#if (digitalPinToInterrupt(X_MAX_PIN) != NOT_AN_INTERRUPT)
|
||||||
|
_ATTACH(X_MAX_PIN);
|
||||||
|
#else
|
||||||
|
static_assert(digitalPinHasPCICR(X_MAX_PIN), "X_MAX_PIN is not interrupt-capable");
|
||||||
|
pciSetup(X_MAX_PIN);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#if HAS_X_MIN
|
||||||
|
#if (digitalPinToInterrupt(X_MIN_PIN) != NOT_AN_INTERRUPT)
|
||||||
|
_ATTACH(X_MIN_PIN);
|
||||||
|
#else
|
||||||
|
static_assert(digitalPinHasPCICR(X_MIN_PIN), "X_MIN_PIN is not interrupt-capable");
|
||||||
|
pciSetup(X_MIN_PIN);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#if HAS_Y_MAX
|
||||||
|
#if (digitalPinToInterrupt(Y_MAX_PIN) != NOT_AN_INTERRUPT)
|
||||||
|
_ATTACH(Y_MAX_PIN);
|
||||||
|
#else
|
||||||
|
static_assert(digitalPinHasPCICR(Y_MAX_PIN), "Y_MAX_PIN is not interrupt-capable");
|
||||||
|
pciSetup(Y_MAX_PIN);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#if HAS_Y_MIN
|
||||||
|
#if (digitalPinToInterrupt(Y_MIN_PIN) != NOT_AN_INTERRUPT)
|
||||||
|
_ATTACH(Y_MIN_PIN);
|
||||||
|
#else
|
||||||
|
static_assert(digitalPinHasPCICR(Y_MIN_PIN), "Y_MIN_PIN is not interrupt-capable");
|
||||||
|
pciSetup(Y_MIN_PIN);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#if HAS_Z_MAX
|
||||||
|
#if (digitalPinToInterrupt(Z_MAX_PIN) != NOT_AN_INTERRUPT)
|
||||||
|
_ATTACH(Z_MAX_PIN);
|
||||||
|
#else
|
||||||
|
static_assert(digitalPinHasPCICR(Z_MAX_PIN), "Z_MAX_PIN is not interrupt-capable");
|
||||||
|
pciSetup(Z_MAX_PIN);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#if HAS_Z_MIN
|
||||||
|
#if (digitalPinToInterrupt(Z_MIN_PIN) != NOT_AN_INTERRUPT)
|
||||||
|
_ATTACH(Z_MIN_PIN);
|
||||||
|
#else
|
||||||
|
static_assert(digitalPinHasPCICR(Z_MIN_PIN), "Z_MIN_PIN is not interrupt-capable");
|
||||||
|
pciSetup(Z_MIN_PIN);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#if HAS_X2_MAX
|
||||||
|
#if (digitalPinToInterrupt(X2_MAX_PIN) != NOT_AN_INTERRUPT)
|
||||||
|
_ATTACH(X2_MAX_PIN);
|
||||||
|
#else
|
||||||
|
static_assert(digitalPinHasPCICR(X2_MAX_PIN), "X2_MAX_PIN is not interrupt-capable");
|
||||||
|
pciSetup(X2_MAX_PIN);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#if HAS_X2_MIN
|
||||||
|
#if (digitalPinToInterrupt(X2_MIN_PIN) != NOT_AN_INTERRUPT)
|
||||||
|
_ATTACH(X2_MIN_PIN);
|
||||||
|
#else
|
||||||
|
static_assert(digitalPinHasPCICR(X2_MIN_PIN), "X2_MIN_PIN is not interrupt-capable");
|
||||||
|
pciSetup(X2_MIN_PIN);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#if HAS_Y2_MAX
|
||||||
|
#if (digitalPinToInterrupt(Y2_MAX_PIN) != NOT_AN_INTERRUPT)
|
||||||
|
_ATTACH(Y2_MAX_PIN);
|
||||||
|
#else
|
||||||
|
static_assert(digitalPinHasPCICR(Y2_MAX_PIN), "Y2_MAX_PIN is not interrupt-capable");
|
||||||
|
pciSetup(Y2_MAX_PIN);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#if HAS_Y2_MIN
|
||||||
|
#if (digitalPinToInterrupt(Y2_MIN_PIN) != NOT_AN_INTERRUPT)
|
||||||
|
_ATTACH(Y2_MIN_PIN);
|
||||||
|
#else
|
||||||
|
static_assert(digitalPinHasPCICR(Y2_MIN_PIN), "Y2_MIN_PIN is not interrupt-capable");
|
||||||
|
pciSetup(Y2_MIN_PIN);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#if HAS_Z2_MAX
|
||||||
|
#if (digitalPinToInterrupt(Z2_MAX_PIN) != NOT_AN_INTERRUPT)
|
||||||
|
_ATTACH(Z2_MAX_PIN);
|
||||||
|
#else
|
||||||
|
static_assert(digitalPinHasPCICR(Z2_MAX_PIN), "Z2_MAX_PIN is not interrupt-capable");
|
||||||
|
pciSetup(Z2_MAX_PIN);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#if HAS_Z2_MIN
|
||||||
|
#if (digitalPinToInterrupt(Z2_MIN_PIN) != NOT_AN_INTERRUPT)
|
||||||
|
_ATTACH(Z2_MIN_PIN);
|
||||||
|
#else
|
||||||
|
static_assert(digitalPinHasPCICR(Z2_MIN_PIN), "Z2_MIN_PIN is not interrupt-capable");
|
||||||
|
pciSetup(Z2_MIN_PIN);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#if HAS_Z3_MAX
|
||||||
|
#if (digitalPinToInterrupt(Z3_MAX_PIN) != NOT_AN_INTERRUPT)
|
||||||
|
_ATTACH(Z3_MAX_PIN);
|
||||||
|
#else
|
||||||
|
static_assert(digitalPinHasPCICR(Z3_MAX_PIN), "Z3_MAX_PIN is not interrupt-capable");
|
||||||
|
pciSetup(Z3_MAX_PIN);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#if HAS_Z3_MIN
|
||||||
|
#if (digitalPinToInterrupt(Z3_MIN_PIN) != NOT_AN_INTERRUPT)
|
||||||
|
_ATTACH(Z3_MIN_PIN);
|
||||||
|
#else
|
||||||
|
static_assert(digitalPinHasPCICR(Z3_MIN_PIN), "Z3_MIN_PIN is not interrupt-capable");
|
||||||
|
pciSetup(Z3_MIN_PIN);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#if HAS_Z4_MAX
|
||||||
|
#if (digitalPinToInterrupt(Z4_MAX_PIN) != NOT_AN_INTERRUPT)
|
||||||
|
_ATTACH(Z4_MAX_PIN);
|
||||||
|
#else
|
||||||
|
static_assert(digitalPinHasPCICR(Z4_MAX_PIN), "Z4_MAX_PIN is not interrupt-capable");
|
||||||
|
pciSetup(Z4_MAX_PIN);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#if HAS_Z4_MIN
|
||||||
|
#if (digitalPinToInterrupt(Z4_MIN_PIN) != NOT_AN_INTERRUPT)
|
||||||
|
_ATTACH(Z4_MIN_PIN);
|
||||||
|
#else
|
||||||
|
static_assert(digitalPinHasPCICR(Z4_MIN_PIN), "Z4_MIN_PIN is not interrupt-capable");
|
||||||
|
pciSetup(Z4_MIN_PIN);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#if HAS_Z_MIN_PROBE_PIN
|
||||||
|
#if (digitalPinToInterrupt(Z_MIN_PROBE_PIN) != NOT_AN_INTERRUPT)
|
||||||
|
_ATTACH(Z_MIN_PROBE_PIN);
|
||||||
|
#else
|
||||||
|
static_assert(digitalPinHasPCICR(Z_MIN_PROBE_PIN), "Z_MIN_PROBE_PIN is not interrupt-capable");
|
||||||
|
pciSetup(Z_MIN_PROBE_PIN);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// If we arrive here without raising an assertion, each pin has either an EXT-interrupt or a PCI.
|
||||||
|
}
|
||||||
282
Marlin/src/HAL/AVR/fast_pwm.cpp
Normal file
282
Marlin/src/HAL/AVR/fast_pwm.cpp
Normal file
|
|
@ -0,0 +1,282 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#ifdef __AVR__
|
||||||
|
|
||||||
|
#include "../../inc/MarlinConfigPre.h"
|
||||||
|
|
||||||
|
#if NEEDS_HARDWARE_PWM // Specific meta-flag for features that mandate PWM
|
||||||
|
|
||||||
|
#include "HAL.h"
|
||||||
|
|
||||||
|
struct Timer {
|
||||||
|
volatile uint8_t* TCCRnQ[3]; // max 3 TCCR registers per timer
|
||||||
|
volatile uint16_t* OCRnQ[3]; // max 3 OCR registers per timer
|
||||||
|
volatile uint16_t* ICRn; // max 1 ICR register per timer
|
||||||
|
uint8_t n; // the timer number [0->5]
|
||||||
|
uint8_t q; // the timer output [0->2] (A->C)
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* get_pwm_timer
|
||||||
|
* Get the timer information and register of the provided pin.
|
||||||
|
* Return a Timer struct containing this information.
|
||||||
|
* Used by set_pwm_frequency, set_pwm_duty
|
||||||
|
*/
|
||||||
|
Timer get_pwm_timer(const pin_t pin) {
|
||||||
|
uint8_t q = 0;
|
||||||
|
switch (digitalPinToTimer(pin)) {
|
||||||
|
// Protect reserved timers (TIMER0 & TIMER1)
|
||||||
|
#ifdef TCCR0A
|
||||||
|
#if !AVR_AT90USB1286_FAMILY
|
||||||
|
case TIMER0A:
|
||||||
|
#endif
|
||||||
|
case TIMER0B:
|
||||||
|
#endif
|
||||||
|
#ifdef TCCR1A
|
||||||
|
case TIMER1A: case TIMER1B:
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
|
#if defined(TCCR2) || defined(TCCR2A)
|
||||||
|
#ifdef TCCR2
|
||||||
|
case TIMER2: {
|
||||||
|
Timer timer = {
|
||||||
|
/*TCCRnQ*/ { &TCCR2, nullptr, nullptr },
|
||||||
|
/*OCRnQ*/ { (uint16_t*)&OCR2, nullptr, nullptr },
|
||||||
|
/*ICRn*/ nullptr,
|
||||||
|
/*n, q*/ 2, 0
|
||||||
|
};
|
||||||
|
}
|
||||||
|
#elif defined(TCCR2A)
|
||||||
|
#if ENABLED(USE_OCR2A_AS_TOP)
|
||||||
|
case TIMER2A: break; // protect TIMER2A
|
||||||
|
case TIMER2B: {
|
||||||
|
Timer timer = {
|
||||||
|
/*TCCRnQ*/ { &TCCR2A, &TCCR2B, nullptr },
|
||||||
|
/*OCRnQ*/ { (uint16_t*)&OCR2A, (uint16_t*)&OCR2B, nullptr },
|
||||||
|
/*ICRn*/ nullptr,
|
||||||
|
/*n, q*/ 2, 1
|
||||||
|
};
|
||||||
|
return timer;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
case TIMER2B: ++q;
|
||||||
|
case TIMER2A: {
|
||||||
|
Timer timer = {
|
||||||
|
/*TCCRnQ*/ { &TCCR2A, &TCCR2B, nullptr },
|
||||||
|
/*OCRnQ*/ { (uint16_t*)&OCR2A, (uint16_t*)&OCR2B, nullptr },
|
||||||
|
/*ICRn*/ nullptr,
|
||||||
|
2, q
|
||||||
|
};
|
||||||
|
return timer;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#ifdef OCR3C
|
||||||
|
case TIMER3C: ++q;
|
||||||
|
case TIMER3B: ++q;
|
||||||
|
case TIMER3A: {
|
||||||
|
Timer timer = {
|
||||||
|
/*TCCRnQ*/ { &TCCR3A, &TCCR3B, &TCCR3C },
|
||||||
|
/*OCRnQ*/ { &OCR3A, &OCR3B, &OCR3C },
|
||||||
|
/*ICRn*/ &ICR3,
|
||||||
|
/*n, q*/ 3, q
|
||||||
|
};
|
||||||
|
return timer;
|
||||||
|
}
|
||||||
|
#elif defined(OCR3B)
|
||||||
|
case TIMER3B: ++q;
|
||||||
|
case TIMER3A: {
|
||||||
|
Timer timer = {
|
||||||
|
/*TCCRnQ*/ { &TCCR3A, &TCCR3B, nullptr },
|
||||||
|
/*OCRnQ*/ { &OCR3A, &OCR3B, nullptr },
|
||||||
|
/*ICRn*/ &ICR3,
|
||||||
|
/*n, q*/ 3, q
|
||||||
|
};
|
||||||
|
return timer;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef TCCR4A
|
||||||
|
case TIMER4C: ++q;
|
||||||
|
case TIMER4B: ++q;
|
||||||
|
case TIMER4A: {
|
||||||
|
Timer timer = {
|
||||||
|
/*TCCRnQ*/ { &TCCR4A, &TCCR4B, &TCCR4C },
|
||||||
|
/*OCRnQ*/ { &OCR4A, &OCR4B, &OCR4C },
|
||||||
|
/*ICRn*/ &ICR4,
|
||||||
|
/*n, q*/ 4, q
|
||||||
|
};
|
||||||
|
return timer;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef TCCR5A
|
||||||
|
case TIMER5C: ++q;
|
||||||
|
case TIMER5B: ++q;
|
||||||
|
case TIMER5A: {
|
||||||
|
Timer timer = {
|
||||||
|
/*TCCRnQ*/ { &TCCR5A, &TCCR5B, &TCCR5C },
|
||||||
|
/*OCRnQ*/ { &OCR5A, &OCR5B, &OCR5C },
|
||||||
|
/*ICRn*/ &ICR5,
|
||||||
|
/*n, q*/ 5, q
|
||||||
|
};
|
||||||
|
return timer;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
Timer timer = {
|
||||||
|
/*TCCRnQ*/ { nullptr, nullptr, nullptr },
|
||||||
|
/*OCRnQ*/ { nullptr, nullptr, nullptr },
|
||||||
|
/*ICRn*/ nullptr,
|
||||||
|
0, 0
|
||||||
|
};
|
||||||
|
return timer;
|
||||||
|
}
|
||||||
|
|
||||||
|
void set_pwm_frequency(const pin_t pin, int f_desired) {
|
||||||
|
Timer timer = get_pwm_timer(pin);
|
||||||
|
if (timer.n == 0) return; // Don't proceed if protected timer or not recognised
|
||||||
|
uint16_t size;
|
||||||
|
if (timer.n == 2) size = 255; else size = 65535;
|
||||||
|
|
||||||
|
uint16_t res = 255; // resolution (TOP value)
|
||||||
|
uint8_t j = 0; // prescaler index
|
||||||
|
uint8_t wgm = 1; // waveform generation mode
|
||||||
|
|
||||||
|
// Calculating the prescaler and resolution to use to achieve closest frequency
|
||||||
|
if (f_desired != 0) {
|
||||||
|
int f = (F_CPU) / (2 * 1024 * size) + 1; // Initialize frequency as lowest (non-zero) achievable
|
||||||
|
uint16_t prescaler[] = { 0, 1, 8, /*TIMER2 ONLY*/32, 64, /*TIMER2 ONLY*/128, 256, 1024 };
|
||||||
|
|
||||||
|
// loop over prescaler values
|
||||||
|
LOOP_S_L_N(i, 1, 8) {
|
||||||
|
uint16_t res_temp_fast = 255, res_temp_phase_correct = 255;
|
||||||
|
if (timer.n == 2) {
|
||||||
|
// No resolution calculation for TIMER2 unless enabled USE_OCR2A_AS_TOP
|
||||||
|
#if ENABLED(USE_OCR2A_AS_TOP)
|
||||||
|
const uint16_t rtf = (F_CPU) / (prescaler[i] * f_desired);
|
||||||
|
res_temp_fast = rtf - 1;
|
||||||
|
res_temp_phase_correct = rtf / 2;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Skip TIMER2 specific prescalers when not TIMER2
|
||||||
|
if (i == 3 || i == 5) continue;
|
||||||
|
const uint16_t rtf = (F_CPU) / (prescaler[i] * f_desired);
|
||||||
|
res_temp_fast = rtf - 1;
|
||||||
|
res_temp_phase_correct = rtf / 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
LIMIT(res_temp_fast, 1U, size);
|
||||||
|
LIMIT(res_temp_phase_correct, 1U, size);
|
||||||
|
// Calculate frequencies of test prescaler and resolution values
|
||||||
|
const int f_temp_fast = (F_CPU) / (prescaler[i] * (1 + res_temp_fast)),
|
||||||
|
f_temp_phase_correct = (F_CPU) / (2 * prescaler[i] * res_temp_phase_correct),
|
||||||
|
f_diff = ABS(f - f_desired),
|
||||||
|
f_fast_diff = ABS(f_temp_fast - f_desired),
|
||||||
|
f_phase_diff = ABS(f_temp_phase_correct - f_desired);
|
||||||
|
|
||||||
|
// If FAST values are closest to desired f
|
||||||
|
if (f_fast_diff < f_diff && f_fast_diff <= f_phase_diff) {
|
||||||
|
// Remember this combination
|
||||||
|
f = f_temp_fast;
|
||||||
|
res = res_temp_fast;
|
||||||
|
j = i;
|
||||||
|
// Set the Wave Generation Mode to FAST PWM
|
||||||
|
if (timer.n == 2) {
|
||||||
|
wgm = (
|
||||||
|
#if ENABLED(USE_OCR2A_AS_TOP)
|
||||||
|
WGM2_FAST_PWM_OCR2A
|
||||||
|
#else
|
||||||
|
WGM2_FAST_PWM
|
||||||
|
#endif
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else wgm = WGM_FAST_PWM_ICRn;
|
||||||
|
}
|
||||||
|
// If PHASE CORRECT values are closes to desired f
|
||||||
|
else if (f_phase_diff < f_diff) {
|
||||||
|
f = f_temp_phase_correct;
|
||||||
|
res = res_temp_phase_correct;
|
||||||
|
j = i;
|
||||||
|
// Set the Wave Generation Mode to PWM PHASE CORRECT
|
||||||
|
if (timer.n == 2) {
|
||||||
|
wgm = (
|
||||||
|
#if ENABLED(USE_OCR2A_AS_TOP)
|
||||||
|
WGM2_PWM_PC_OCR2A
|
||||||
|
#else
|
||||||
|
WGM2_PWM_PC
|
||||||
|
#endif
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else wgm = WGM_PWM_PC_ICRn;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_SET_WGMnQ(timer.TCCRnQ, wgm);
|
||||||
|
_SET_CSn(timer.TCCRnQ, j);
|
||||||
|
|
||||||
|
if (timer.n == 2) {
|
||||||
|
#if ENABLED(USE_OCR2A_AS_TOP)
|
||||||
|
_SET_OCRnQ(timer.OCRnQ, 0, res); // Set OCR2A value (TOP) = res
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
else
|
||||||
|
_SET_ICRn(timer.ICRn, res); // Set ICRn value (TOP) = res
|
||||||
|
}
|
||||||
|
|
||||||
|
void set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v_size/*=255*/, const bool invert/*=false*/) {
|
||||||
|
// If v is 0 or v_size (max), digitalWrite to LOW or HIGH.
|
||||||
|
// Note that digitalWrite also disables pwm output for us (sets COM bit to 0)
|
||||||
|
if (v == 0)
|
||||||
|
digitalWrite(pin, invert);
|
||||||
|
else if (v == v_size)
|
||||||
|
digitalWrite(pin, !invert);
|
||||||
|
else {
|
||||||
|
Timer timer = get_pwm_timer(pin);
|
||||||
|
if (timer.n == 0) return; // Don't proceed if protected timer or not recognised
|
||||||
|
// Set compare output mode to CLEAR -> SET or SET -> CLEAR (if inverted)
|
||||||
|
_SET_COMnQ(timer.TCCRnQ, (timer.q
|
||||||
|
#ifdef TCCR2
|
||||||
|
+ (timer.q == 2) // COM20 is on bit 4 of TCCR2, thus requires q + 1 in the macro
|
||||||
|
#endif
|
||||||
|
), COM_CLEAR_SET + invert
|
||||||
|
);
|
||||||
|
|
||||||
|
uint16_t top;
|
||||||
|
if (timer.n == 2) { // if TIMER2
|
||||||
|
top = (
|
||||||
|
#if ENABLED(USE_OCR2A_AS_TOP)
|
||||||
|
*timer.OCRnQ[0] // top = OCR2A
|
||||||
|
#else
|
||||||
|
255 // top = 0xFF (max)
|
||||||
|
#endif
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
top = *timer.ICRn; // top = ICRn
|
||||||
|
|
||||||
|
_SET_OCRnQ(timer.OCRnQ, timer.q, v * float(top) / float(v_size)); // Scale 8/16-bit v to top value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // NEEDS_HARDWARE_PWM
|
||||||
|
#endif // __AVR__
|
||||||
288
Marlin/src/HAL/AVR/fastio.cpp
Normal file
288
Marlin/src/HAL/AVR/fastio.cpp
Normal file
|
|
@ -0,0 +1,288 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fast I/O for extended pins
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef __AVR__
|
||||||
|
|
||||||
|
#include "fastio.h"
|
||||||
|
|
||||||
|
#ifdef FASTIO_EXT_START
|
||||||
|
|
||||||
|
#include "../shared/Marduino.h"
|
||||||
|
|
||||||
|
#define _IS_EXT(P) WITHIN(P, FASTIO_EXT_START, FASTIO_EXT_END)
|
||||||
|
|
||||||
|
void extDigitalWrite(const int8_t pin, const uint8_t state) {
|
||||||
|
#define _WCASE(N) case N: WRITE(N, state); break
|
||||||
|
switch (pin) {
|
||||||
|
default: digitalWrite(pin, state);
|
||||||
|
#if _IS_EXT(70)
|
||||||
|
_WCASE(70);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(71)
|
||||||
|
_WCASE(71);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(72)
|
||||||
|
_WCASE(72);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(73)
|
||||||
|
_WCASE(73);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(74)
|
||||||
|
_WCASE(74);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(75)
|
||||||
|
_WCASE(75);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(76)
|
||||||
|
_WCASE(76);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(77)
|
||||||
|
_WCASE(77);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(78)
|
||||||
|
_WCASE(78);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(79)
|
||||||
|
_WCASE(79);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(80)
|
||||||
|
_WCASE(80);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(81)
|
||||||
|
_WCASE(81);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(82)
|
||||||
|
_WCASE(82);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(83)
|
||||||
|
_WCASE(83);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(84)
|
||||||
|
_WCASE(84);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(85)
|
||||||
|
_WCASE(85);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(86)
|
||||||
|
_WCASE(86);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(87)
|
||||||
|
_WCASE(87);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(88)
|
||||||
|
_WCASE(88);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(89)
|
||||||
|
_WCASE(89);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(90)
|
||||||
|
_WCASE(90);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(91)
|
||||||
|
_WCASE(91);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(92)
|
||||||
|
_WCASE(92);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(93)
|
||||||
|
_WCASE(93);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(94)
|
||||||
|
_WCASE(94);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(95)
|
||||||
|
_WCASE(95);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(96)
|
||||||
|
_WCASE(96);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(97)
|
||||||
|
_WCASE(97);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(98)
|
||||||
|
_WCASE(98);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(99)
|
||||||
|
_WCASE(99);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(100)
|
||||||
|
_WCASE(100);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t extDigitalRead(const int8_t pin) {
|
||||||
|
#define _RCASE(N) case N: return READ(N)
|
||||||
|
switch (pin) {
|
||||||
|
default: return digitalRead(pin);
|
||||||
|
#if _IS_EXT(70)
|
||||||
|
_RCASE(70);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(71)
|
||||||
|
_RCASE(71);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(72)
|
||||||
|
_RCASE(72);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(73)
|
||||||
|
_RCASE(73);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(74)
|
||||||
|
_RCASE(74);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(75)
|
||||||
|
_RCASE(75);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(76)
|
||||||
|
_RCASE(76);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(77)
|
||||||
|
_RCASE(77);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(78)
|
||||||
|
_RCASE(78);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(79)
|
||||||
|
_RCASE(79);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(80)
|
||||||
|
_RCASE(80);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(81)
|
||||||
|
_RCASE(81);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(82)
|
||||||
|
_RCASE(82);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(83)
|
||||||
|
_RCASE(83);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(84)
|
||||||
|
_RCASE(84);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(85)
|
||||||
|
_RCASE(85);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(86)
|
||||||
|
_RCASE(86);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(87)
|
||||||
|
_RCASE(87);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(88)
|
||||||
|
_RCASE(88);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(89)
|
||||||
|
_RCASE(89);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(90)
|
||||||
|
_RCASE(90);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(91)
|
||||||
|
_RCASE(91);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(92)
|
||||||
|
_RCASE(92);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(93)
|
||||||
|
_RCASE(93);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(94)
|
||||||
|
_RCASE(94);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(95)
|
||||||
|
_RCASE(95);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(96)
|
||||||
|
_RCASE(96);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(97)
|
||||||
|
_RCASE(97);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(98)
|
||||||
|
_RCASE(98);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(99)
|
||||||
|
_RCASE(99);
|
||||||
|
#endif
|
||||||
|
#if _IS_EXT(100)
|
||||||
|
_RCASE(100);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
/**
|
||||||
|
* Set Timer 5 PWM frequency in Hz, from 3.8Hz up to ~16MHz
|
||||||
|
* with a minimum resolution of 100 steps.
|
||||||
|
*
|
||||||
|
* DC values -1.0 to 1.0. Negative duty cycle inverts the pulse.
|
||||||
|
*/
|
||||||
|
uint16_t set_pwm_frequency_hz(const float &hz, const float dca, const float dcb, const float dcc) {
|
||||||
|
float count = 0;
|
||||||
|
if (hz > 0 && (dca || dcb || dcc)) {
|
||||||
|
count = float(F_CPU) / hz; // 1x prescaler, TOP for 16MHz base freq.
|
||||||
|
uint16_t prescaler; // Range of 30.5Hz (65535) 64.5KHz (>31)
|
||||||
|
|
||||||
|
if (count >= 255. * 256.) { prescaler = 1024; SET_CS(5, PRESCALER_1024); }
|
||||||
|
else if (count >= 255. * 64.) { prescaler = 256; SET_CS(5, PRESCALER_256); }
|
||||||
|
else if (count >= 255. * 8.) { prescaler = 64; SET_CS(5, PRESCALER_64); }
|
||||||
|
else if (count >= 255.) { prescaler = 8; SET_CS(5, PRESCALER_8); }
|
||||||
|
else { prescaler = 1; SET_CS(5, PRESCALER_1); }
|
||||||
|
|
||||||
|
count /= float(prescaler);
|
||||||
|
const float pwm_top = round(count); // Get the rounded count
|
||||||
|
|
||||||
|
ICR5 = (uint16_t)pwm_top - 1; // Subtract 1 for TOP
|
||||||
|
OCR5A = pwm_top * ABS(dca); // Update and scale DCs
|
||||||
|
OCR5B = pwm_top * ABS(dcb);
|
||||||
|
OCR5C = pwm_top * ABS(dcc);
|
||||||
|
_SET_COM(5, A, dca ? (dca < 0 ? COM_SET_CLEAR : COM_CLEAR_SET) : COM_NORMAL); // Set compare modes
|
||||||
|
_SET_COM(5, B, dcb ? (dcb < 0 ? COM_SET_CLEAR : COM_CLEAR_SET) : COM_NORMAL);
|
||||||
|
_SET_COM(5, C, dcc ? (dcc < 0 ? COM_SET_CLEAR : COM_CLEAR_SET) : COM_NORMAL);
|
||||||
|
|
||||||
|
SET_WGM(5, FAST_PWM_ICRn); // Fast PWM with ICR5 as TOP
|
||||||
|
|
||||||
|
//SERIAL_ECHOLNPGM("Timer 5 Settings:");
|
||||||
|
//SERIAL_ECHOLNPAIR(" Prescaler=", prescaler);
|
||||||
|
//SERIAL_ECHOLNPAIR(" TOP=", ICR5);
|
||||||
|
//SERIAL_ECHOLNPAIR(" OCR5A=", OCR5A);
|
||||||
|
//SERIAL_ECHOLNPAIR(" OCR5B=", OCR5B);
|
||||||
|
//SERIAL_ECHOLNPAIR(" OCR5C=", OCR5C);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Restore the default for Timer 5
|
||||||
|
SET_WGM(5, PWM_PC_8); // PWM 8-bit (Phase Correct)
|
||||||
|
SET_COMS(5, NORMAL, NORMAL, NORMAL); // Do nothing
|
||||||
|
SET_CS(5, PRESCALER_64); // 16MHz / 64 = 250KHz
|
||||||
|
OCR5A = OCR5B = OCR5C = 0;
|
||||||
|
}
|
||||||
|
return round(count);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // FASTIO_EXT_START
|
||||||
|
#endif // __AVR__
|
||||||
373
Marlin/src/HAL/AVR/fastio.h
Normal file
373
Marlin/src/HAL/AVR/fastio.h
Normal file
|
|
@ -0,0 +1,373 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fast I/O Routines for AVR
|
||||||
|
* Use direct port manipulation to save scads of processor time.
|
||||||
|
* Contributed by Triffid_Hunter and modified by Kliment, thinkyhead, Bob-the-Kuhn, et.al.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <avr/io.h>
|
||||||
|
|
||||||
|
#if defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1286P__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB646P__) || defined(__AVR_AT90USB647__)
|
||||||
|
#define AVR_AT90USB1286_FAMILY 1
|
||||||
|
#elif defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644PA__) || defined(__AVR_ATmega1284P__)
|
||||||
|
#define AVR_ATmega1284_FAMILY 1
|
||||||
|
#elif defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
|
||||||
|
#define AVR_ATmega2560_FAMILY 1
|
||||||
|
#elif defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__)
|
||||||
|
#define AVR_ATmega2561_FAMILY 1
|
||||||
|
#elif defined(__AVR_ATmega168__) || defined(__AVR_ATmega328__) || defined(__AVR_ATmega328P__)
|
||||||
|
#define AVR_ATmega328_FAMILY 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Include Ports and Functions
|
||||||
|
*/
|
||||||
|
#if AVR_ATmega328_FAMILY
|
||||||
|
#include "fastio/fastio_168.h"
|
||||||
|
#elif AVR_ATmega1284_FAMILY
|
||||||
|
#include "fastio/fastio_644.h"
|
||||||
|
#elif AVR_ATmega2560_FAMILY
|
||||||
|
#include "fastio/fastio_1280.h"
|
||||||
|
#elif AVR_AT90USB1286_FAMILY
|
||||||
|
#include "fastio/fastio_AT90USB.h"
|
||||||
|
#elif AVR_ATmega2561_FAMILY
|
||||||
|
#include "fastio/fastio_1281.h"
|
||||||
|
#else
|
||||||
|
#error "No FastIO definition for the selected AVR Board."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Magic I/O routines
|
||||||
|
*
|
||||||
|
* Now you can simply SET_OUTPUT(PIN); WRITE(PIN, HIGH); WRITE(PIN, LOW);
|
||||||
|
*
|
||||||
|
* Why double up on these macros? see https://gcc.gnu.org/onlinedocs/cpp/Stringification.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define _READ(IO) TEST(DIO ## IO ## _RPORT, DIO ## IO ## _PIN)
|
||||||
|
|
||||||
|
#define _WRITE_NC(IO,V) do{ \
|
||||||
|
if (V) SBI(DIO ## IO ## _WPORT, DIO ## IO ## _PIN); \
|
||||||
|
else CBI(DIO ## IO ## _WPORT, DIO ## IO ## _PIN); \
|
||||||
|
}while(0)
|
||||||
|
|
||||||
|
#define _WRITE_C(IO,V) do{ \
|
||||||
|
uint8_t port_bits = DIO ## IO ## _WPORT; /* Get a mask from the current port bits */ \
|
||||||
|
if (V) port_bits = ~port_bits; /* For setting bits, invert the mask */ \
|
||||||
|
DIO ## IO ## _RPORT = port_bits & _BV(DIO ## IO ## _PIN); /* Atomically toggle the output port bits */ \
|
||||||
|
}while(0)
|
||||||
|
|
||||||
|
#define _WRITE(IO,V) do{ if (&(DIO ## IO ## _RPORT) < (uint8_t*)0x100) _WRITE_NC(IO,V); else _WRITE_C(IO,V); }while(0)
|
||||||
|
|
||||||
|
#define _TOGGLE(IO) (DIO ## IO ## _RPORT = _BV(DIO ## IO ## _PIN))
|
||||||
|
|
||||||
|
#define _SET_INPUT(IO) CBI(DIO ## IO ## _DDR, DIO ## IO ## _PIN)
|
||||||
|
#define _SET_OUTPUT(IO) SBI(DIO ## IO ## _DDR, DIO ## IO ## _PIN)
|
||||||
|
|
||||||
|
#define _IS_INPUT(IO) !TEST(DIO ## IO ## _DDR, DIO ## IO ## _PIN)
|
||||||
|
#define _IS_OUTPUT(IO) TEST(DIO ## IO ## _DDR, DIO ## IO ## _PIN)
|
||||||
|
|
||||||
|
// digitalRead/Write wrappers
|
||||||
|
#ifdef FASTIO_EXT_START
|
||||||
|
void extDigitalWrite(const int8_t pin, const uint8_t state);
|
||||||
|
uint8_t extDigitalRead(const int8_t pin);
|
||||||
|
#else
|
||||||
|
#define extDigitalWrite(IO,V) digitalWrite(IO,V)
|
||||||
|
#define extDigitalRead(IO) digitalRead(IO)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define READ(IO) _READ(IO)
|
||||||
|
#define WRITE(IO,V) _WRITE(IO,V)
|
||||||
|
#define TOGGLE(IO) _TOGGLE(IO)
|
||||||
|
|
||||||
|
#define SET_INPUT(IO) _SET_INPUT(IO)
|
||||||
|
#define SET_INPUT_PULLUP(IO) do{ _SET_INPUT(IO); _WRITE(IO, HIGH); }while(0)
|
||||||
|
#define SET_INPUT_PULLDOWN SET_INPUT
|
||||||
|
#define SET_OUTPUT(IO) _SET_OUTPUT(IO)
|
||||||
|
#define SET_PWM SET_OUTPUT
|
||||||
|
|
||||||
|
#define IS_INPUT(IO) _IS_INPUT(IO)
|
||||||
|
#define IS_OUTPUT(IO) _IS_OUTPUT(IO)
|
||||||
|
|
||||||
|
#define OUT_WRITE(IO,V) do{ SET_OUTPUT(IO); WRITE(IO,V); }while(0)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Timer and Interrupt Control
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Waveform Generation Modes
|
||||||
|
enum WaveGenMode : char {
|
||||||
|
WGM_NORMAL, // 0
|
||||||
|
WGM_PWM_PC_8, // 1
|
||||||
|
WGM_PWM_PC_9, // 2
|
||||||
|
WGM_PWM_PC_10, // 3
|
||||||
|
WGM_CTC_OCRnA, // 4 COM OCnx
|
||||||
|
WGM_FAST_PWM_8, // 5
|
||||||
|
WGM_FAST_PWM_9, // 6
|
||||||
|
WGM_FAST_PWM_10, // 7
|
||||||
|
WGM_PWM_PC_FC_ICRn, // 8
|
||||||
|
WGM_PWM_PC_FC_OCRnA, // 9 COM OCnA
|
||||||
|
WGM_PWM_PC_ICRn, // 10
|
||||||
|
WGM_PWM_PC_OCRnA, // 11 COM OCnA
|
||||||
|
WGM_CTC_ICRn, // 12 COM OCnx
|
||||||
|
WGM_reserved, // 13
|
||||||
|
WGM_FAST_PWM_ICRn, // 14 COM OCnA
|
||||||
|
WGM_FAST_PWM_OCRnA // 15 COM OCnA
|
||||||
|
};
|
||||||
|
|
||||||
|
// Wavefore Generation Modes (Timer 2 only)
|
||||||
|
enum WaveGenMode2 : char {
|
||||||
|
WGM2_NORMAL, // 0
|
||||||
|
WGM2_PWM_PC, // 1
|
||||||
|
WGM2_CTC_OCR2A, // 2
|
||||||
|
WGM2_FAST_PWM, // 3
|
||||||
|
WGM2_reserved_1, // 4
|
||||||
|
WGM2_PWM_PC_OCR2A, // 5
|
||||||
|
WGM2_reserved_2, // 6
|
||||||
|
WGM2_FAST_PWM_OCR2A, // 7
|
||||||
|
};
|
||||||
|
|
||||||
|
// Compare Modes
|
||||||
|
enum CompareMode : char {
|
||||||
|
COM_NORMAL, // 0
|
||||||
|
COM_TOGGLE, // 1 Non-PWM: OCnx ... Both PWM (WGM 9,11,14,15): OCnA only ... else NORMAL
|
||||||
|
COM_CLEAR_SET, // 2 Non-PWM: OCnx ... Fast PWM: OCnx/Bottom ... PF-FC: OCnx Up/Down
|
||||||
|
COM_SET_CLEAR // 3 Non-PWM: OCnx ... Fast PWM: OCnx/Bottom ... PF-FC: OCnx Up/Down
|
||||||
|
};
|
||||||
|
|
||||||
|
// Clock Sources
|
||||||
|
enum ClockSource : char {
|
||||||
|
CS_NONE, // 0
|
||||||
|
CS_PRESCALER_1, // 1
|
||||||
|
CS_PRESCALER_8, // 2
|
||||||
|
CS_PRESCALER_64, // 3
|
||||||
|
CS_PRESCALER_256, // 4
|
||||||
|
CS_PRESCALER_1024, // 5
|
||||||
|
CS_EXT_FALLING, // 6
|
||||||
|
CS_EXT_RISING // 7
|
||||||
|
};
|
||||||
|
|
||||||
|
// Clock Sources (Timer 2 only)
|
||||||
|
enum ClockSource2 : char {
|
||||||
|
CS2_NONE, // 0
|
||||||
|
CS2_PRESCALER_1, // 1
|
||||||
|
CS2_PRESCALER_8, // 2
|
||||||
|
CS2_PRESCALER_32, // 3
|
||||||
|
CS2_PRESCALER_64, // 4
|
||||||
|
CS2_PRESCALER_128, // 5
|
||||||
|
CS2_PRESCALER_256, // 6
|
||||||
|
CS2_PRESCALER_1024 // 7
|
||||||
|
};
|
||||||
|
|
||||||
|
// Get interrupt bits in an orderly way
|
||||||
|
// Ex: cs = GET_CS(0); coma1 = GET_COM(A,1);
|
||||||
|
#define GET_WGM(T) (((TCCR##T##A >> WGM##T##0) & 0x3) | ((TCCR##T##B >> WGM##T##2 << 2) & 0xC))
|
||||||
|
#define GET_CS(T) ((TCCR##T##B >> CS##T##0) & 0x7)
|
||||||
|
#define GET_COM(T,Q) ((TCCR##T##Q >> COM##T##Q##0) & 0x3)
|
||||||
|
#define GET_COMA(T) GET_COM(T,A)
|
||||||
|
#define GET_COMB(T) GET_COM(T,B)
|
||||||
|
#define GET_COMC(T) GET_COM(T,C)
|
||||||
|
#define GET_ICNC(T) (!!(TCCR##T##B & _BV(ICNC##T)))
|
||||||
|
#define GET_ICES(T) (!!(TCCR##T##B & _BV(ICES##T)))
|
||||||
|
#define GET_FOC(T,Q) (!!(TCCR##T##C & _BV(FOC##T##Q)))
|
||||||
|
#define GET_FOCA(T) GET_FOC(T,A)
|
||||||
|
#define GET_FOCB(T) GET_FOC(T,B)
|
||||||
|
#define GET_FOCC(T) GET_FOC(T,C)
|
||||||
|
|
||||||
|
// Set Wave Generation Mode bits
|
||||||
|
// Ex: SET_WGM(5,CTC_ICRn);
|
||||||
|
#define _SET_WGM(T,V) do{ \
|
||||||
|
TCCR##T##A = (TCCR##T##A & ~(0x3 << WGM##T##0)) | (( int(V) & 0x3) << WGM##T##0); \
|
||||||
|
TCCR##T##B = (TCCR##T##B & ~(0x3 << WGM##T##2)) | (((int(V) >> 2) & 0x3) << WGM##T##2); \
|
||||||
|
}while(0)
|
||||||
|
#define SET_WGM(T,V) _SET_WGM(T,WGM_##V)
|
||||||
|
// Runtime (see set_pwm_frequency):
|
||||||
|
#define _SET_WGMnQ(TCCRnQ, V) do{ \
|
||||||
|
*(TCCRnQ)[0] = (*(TCCRnQ)[0] & ~(0x3 << 0)) | (( int(V) & 0x3) << 0); \
|
||||||
|
*(TCCRnQ)[1] = (*(TCCRnQ)[1] & ~(0x3 << 3)) | (((int(V) >> 2) & 0x3) << 3); \
|
||||||
|
}while(0)
|
||||||
|
|
||||||
|
// Set Clock Select bits
|
||||||
|
// Ex: SET_CS3(PRESCALER_64);
|
||||||
|
#define _SET_CS(T,V) (TCCR##T##B = (TCCR##T##B & ~(0x7 << CS##T##0)) | ((int(V) & 0x7) << CS##T##0))
|
||||||
|
#define _SET_CS0(V) _SET_CS(0,V)
|
||||||
|
#define _SET_CS1(V) _SET_CS(1,V)
|
||||||
|
#ifdef TCCR2
|
||||||
|
#define _SET_CS2(V) (TCCR2 = (TCCR2 & ~(0x7 << CS20)) | (int(V) << CS20))
|
||||||
|
#else
|
||||||
|
#define _SET_CS2(V) _SET_CS(2,V)
|
||||||
|
#endif
|
||||||
|
#define _SET_CS3(V) _SET_CS(3,V)
|
||||||
|
#define _SET_CS4(V) _SET_CS(4,V)
|
||||||
|
#define _SET_CS5(V) _SET_CS(5,V)
|
||||||
|
#define SET_CS0(V) _SET_CS0(CS_##V)
|
||||||
|
#define SET_CS1(V) _SET_CS1(CS_##V)
|
||||||
|
#ifdef TCCR2
|
||||||
|
#define SET_CS2(V) _SET_CS2(CS2_##V)
|
||||||
|
#else
|
||||||
|
#define SET_CS2(V) _SET_CS2(CS_##V)
|
||||||
|
#endif
|
||||||
|
#define SET_CS3(V) _SET_CS3(CS_##V)
|
||||||
|
#define SET_CS4(V) _SET_CS4(CS_##V)
|
||||||
|
#define SET_CS5(V) _SET_CS5(CS_##V)
|
||||||
|
#define SET_CS(T,V) SET_CS##T(V)
|
||||||
|
// Runtime (see set_pwm_frequency)
|
||||||
|
#define _SET_CSn(TCCRnQ, V) do{ \
|
||||||
|
(*(TCCRnQ)[1] = (*(TCCRnQ[1]) & ~(0x7 << 0)) | ((int(V) & 0x7) << 0)); \
|
||||||
|
}while(0)
|
||||||
|
|
||||||
|
// Set Compare Mode bits
|
||||||
|
// Ex: SET_COMS(4,CLEAR_SET,CLEAR_SET,CLEAR_SET);
|
||||||
|
#define _SET_COM(T,Q,V) (TCCR##T##Q = (TCCR##T##Q & ~(0x3 << COM##T##Q##0)) | (int(V) << COM##T##Q##0))
|
||||||
|
#define SET_COM(T,Q,V) _SET_COM(T,Q,COM_##V)
|
||||||
|
#define SET_COMA(T,V) SET_COM(T,A,V)
|
||||||
|
#define SET_COMB(T,V) SET_COM(T,B,V)
|
||||||
|
#define SET_COMC(T,V) SET_COM(T,C,V)
|
||||||
|
#define SET_COMS(T,V1,V2,V3) do{ SET_COMA(T,V1); SET_COMB(T,V2); SET_COMC(T,V3); }while(0)
|
||||||
|
// Runtime (see set_pwm_duty)
|
||||||
|
#define _SET_COMnQ(TCCRnQ, Q, V) do{ \
|
||||||
|
(*(TCCRnQ)[0] = (*(TCCRnQ)[0] & ~(0x3 << (6-2*(Q)))) | (int(V) << (6-2*(Q)))); \
|
||||||
|
}while(0)
|
||||||
|
|
||||||
|
// Set OCRnQ register
|
||||||
|
// Runtime (see set_pwm_duty):
|
||||||
|
#define _SET_OCRnQ(OCRnQ, Q, V) do{ \
|
||||||
|
(*(OCRnQ)[(Q)] = (0x0000) | (int(V) & 0xFFFF)); \
|
||||||
|
}while(0)
|
||||||
|
|
||||||
|
// Set ICRn register (one per timer)
|
||||||
|
// Runtime (see set_pwm_frequency)
|
||||||
|
#define _SET_ICRn(ICRn, V) do{ \
|
||||||
|
(*(ICRn) = (0x0000) | (int(V) & 0xFFFF)); \
|
||||||
|
}while(0)
|
||||||
|
|
||||||
|
// Set Noise Canceler bit
|
||||||
|
// Ex: SET_ICNC(2,1)
|
||||||
|
#define SET_ICNC(T,V) (TCCR##T##B = (V) ? TCCR##T##B | _BV(ICNC##T) : TCCR##T##B & ~_BV(ICNC##T))
|
||||||
|
|
||||||
|
// Set Input Capture Edge Select bit
|
||||||
|
// Ex: SET_ICES(5,0)
|
||||||
|
#define SET_ICES(T,V) (TCCR##T##B = (V) ? TCCR##T##B | _BV(ICES##T) : TCCR##T##B & ~_BV(ICES##T))
|
||||||
|
|
||||||
|
// Set Force Output Compare bit
|
||||||
|
// Ex: SET_FOC(3,A,1)
|
||||||
|
#define SET_FOC(T,Q,V) (TCCR##T##C = (V) ? TCCR##T##C | _BV(FOC##T##Q) : TCCR##T##C & ~_BV(FOC##T##Q))
|
||||||
|
#define SET_FOCA(T,V) SET_FOC(T,A,V)
|
||||||
|
#define SET_FOCB(T,V) SET_FOC(T,B,V)
|
||||||
|
#define SET_FOCC(T,V) SET_FOC(T,C,V)
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PWM availability macros
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Determine which harware PWMs are already in use
|
||||||
|
#define _PWM_CHK_FAN_B(P) (P == E0_AUTO_FAN_PIN || P == E1_AUTO_FAN_PIN || P == E2_AUTO_FAN_PIN || P == E3_AUTO_FAN_PIN || P == E4_AUTO_FAN_PIN || P == E5_AUTO_FAN_PIN || P == E6_AUTO_FAN_PIN || P == E7_AUTO_FAN_PIN || P == CHAMBER_AUTO_FAN_PIN)
|
||||||
|
#if PIN_EXISTS(CONTROLLER_FAN)
|
||||||
|
#define PWM_CHK_FAN_B(P) (_PWM_CHK_FAN_B(P) || P == CONTROLLER_FAN_PIN)
|
||||||
|
#else
|
||||||
|
#define PWM_CHK_FAN_B(P) _PWM_CHK_FAN_B(P)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if ANY_PIN(FAN, FAN1, FAN2, FAN3, FAN4, FAN5, FAN6, FAN7)
|
||||||
|
#if PIN_EXISTS(FAN7)
|
||||||
|
#define PWM_CHK_FAN_A(P) (P == FAN0_PIN || P == FAN1_PIN || P == FAN2_PIN || P == FAN3_PIN || P == FAN4_PIN || P == FAN5_PIN || P == FAN6_PIN || P == FAN7_PIN)
|
||||||
|
#elif PIN_EXISTS(FAN6)
|
||||||
|
#define PWM_CHK_FAN_A(P) (P == FAN0_PIN || P == FAN1_PIN || P == FAN2_PIN || P == FAN3_PIN || P == FAN4_PIN || P == FAN5_PIN || P == FAN6_PIN)
|
||||||
|
#elif PIN_EXISTS(FAN5)
|
||||||
|
#define PWM_CHK_FAN_A(P) (P == FAN0_PIN || P == FAN1_PIN || P == FAN2_PIN || P == FAN3_PIN || P == FAN4_PIN || P == FAN5_PIN)
|
||||||
|
#elif PIN_EXISTS(FAN4)
|
||||||
|
#define PWM_CHK_FAN_A(P) (P == FAN0_PIN || P == FAN1_PIN || P == FAN2_PIN || P == FAN3_PIN || P == FAN4_PIN)
|
||||||
|
#elif PIN_EXISTS(FAN3)
|
||||||
|
#define PWM_CHK_FAN_A(P) (P == FAN0_PIN || P == FAN1_PIN || P == FAN2_PIN || P == FAN3_PIN)
|
||||||
|
#elif PIN_EXISTS(FAN2)
|
||||||
|
#define PWM_CHK_FAN_A(P) (P == FAN0_PIN || P == FAN1_PIN || P == FAN2_PIN)
|
||||||
|
#elif PIN_EXISTS(FAN1)
|
||||||
|
#define PWM_CHK_FAN_A(P) (P == FAN0_PIN || P == FAN1_PIN)
|
||||||
|
#else
|
||||||
|
#define PWM_CHK_FAN_A(P) (P == FAN0_PIN)
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#define PWM_CHK_FAN_A(P) false
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if HAS_MOTOR_CURRENT_PWM
|
||||||
|
#if PIN_EXISTS(MOTOR_CURRENT_PWM_XY)
|
||||||
|
#define PWM_CHK_MOTOR_CURRENT(P) (P == MOTOR_CURRENT_PWM_E || P == MOTOR_CURRENT_PWM_Z || P == MOTOR_CURRENT_PWM_XY)
|
||||||
|
#elif PIN_EXISTS(MOTOR_CURRENT_PWM_Z)
|
||||||
|
#define PWM_CHK_MOTOR_CURRENT(P) (P == MOTOR_CURRENT_PWM_E || P == MOTOR_CURRENT_PWM_Z)
|
||||||
|
#else
|
||||||
|
#define PWM_CHK_MOTOR_CURRENT(P) (P == MOTOR_CURRENT_PWM_E)
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#define PWM_CHK_MOTOR_CURRENT(P) false
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef NUM_SERVOS
|
||||||
|
#if AVR_ATmega2560_FAMILY
|
||||||
|
#define PWM_CHK_SERVO(P) (P == 5 || (NUM_SERVOS > 12 && P == 6) || (NUM_SERVOS > 24 && P == 46)) // PWMS 3A, 4A & 5A
|
||||||
|
#elif AVR_ATmega2561_FAMILY
|
||||||
|
#define PWM_CHK_SERVO(P) (P == 5) // PWM3A
|
||||||
|
#elif AVR_ATmega1284_FAMILY
|
||||||
|
#define PWM_CHK_SERVO(P) false
|
||||||
|
#elif AVR_AT90USB1286_FAMILY
|
||||||
|
#define PWM_CHK_SERVO(P) (P == 16) // PWM3A
|
||||||
|
#elif AVR_ATmega328_FAMILY
|
||||||
|
#define PWM_CHK_SERVO(P) false
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#define PWM_CHK_SERVO(P) false
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if ENABLED(BARICUDA)
|
||||||
|
#if HAS_HEATER_1 && HAS_HEATER_2
|
||||||
|
#define PWM_CHK_HEATER(P) (P == HEATER_1_PIN || P == HEATER_2_PIN)
|
||||||
|
#elif HAS_HEATER_1
|
||||||
|
#define PWM_CHK_HEATER(P) (P == HEATER_1_PIN)
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#define PWM_CHK_HEATER(P) false
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define PWM_CHK(P) (PWM_CHK_HEATER(P) || PWM_CHK_SERVO(P) || PWM_CHK_MOTOR_CURRENT(P) || PWM_CHK_FAN_A(P) || PWM_CHK_FAN_B(P))
|
||||||
|
|
||||||
|
#endif // PWM_CHK is not used in Marlin
|
||||||
|
|
||||||
|
// define which hardware PWMs are available for the current CPU
|
||||||
|
// all timer 1 PWMS deleted from this list because they are never available
|
||||||
|
#if AVR_ATmega2560_FAMILY
|
||||||
|
#define PWM_PIN(P) ((P >= 2 && P <= 10) || P == 13 || P == 44 || P == 45 || P == 46)
|
||||||
|
#elif AVR_ATmega2561_FAMILY
|
||||||
|
#define PWM_PIN(P) ((P >= 2 && P <= 6) || P == 9)
|
||||||
|
#elif AVR_ATmega1284_FAMILY
|
||||||
|
#define PWM_PIN(P) (P == 3 || P == 4 || P == 14 || P == 15)
|
||||||
|
#elif AVR_AT90USB1286_FAMILY
|
||||||
|
#define PWM_PIN(P) (P == 0 || P == 1 || P == 14 || P == 15 || P == 16 || P == 24)
|
||||||
|
#elif AVR_ATmega328_FAMILY
|
||||||
|
#define PWM_PIN(P) (P == 3 || P == 5 || P == 6 || P == 11)
|
||||||
|
#else
|
||||||
|
#error "unknown CPU"
|
||||||
|
#endif
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,9 +1,9 @@
|
||||||
/**
|
/**
|
||||||
* Marlin 3D Printer Firmware
|
* Marlin 3D Printer Firmware
|
||||||
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
*
|
*
|
||||||
* Based on Sprinter and grbl.
|
* Based on Sprinter and grbl.
|
||||||
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -16,9 +16,10 @@
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pin mapping for the 1281 and 2561
|
* Pin mapping for the 1281 and 2561
|
||||||
|
|
@ -27,10 +28,7 @@
|
||||||
* Port: A0 A1 A2 A3 A4 A5 A6 A7 B0 B1 B2 B3 B4 B5 B6 B7 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7 E0 E1 E2 E3 E4 E5 E6 E7 F0 F1 F2 F3 F4 F5 F6 F7 G0 G1 G2 G3 G4 G5
|
* Port: A0 A1 A2 A3 A4 A5 A6 A7 B0 B1 B2 B3 B4 B5 B6 B7 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7 E0 E1 E2 E3 E4 E5 E6 E7 F0 F1 F2 F3 F4 F5 F6 F7 G0 G1 G2 G3 G4 G5
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _FASTIO_1281_H_
|
#include "../fastio.h"
|
||||||
#define _FASTIO_1281_H_
|
|
||||||
|
|
||||||
#include "fastio_AVR.h"
|
|
||||||
|
|
||||||
// change for your board
|
// change for your board
|
||||||
#define DEBUG_LED DIO46
|
#define DEBUG_LED DIO46
|
||||||
|
|
@ -65,13 +63,13 @@
|
||||||
#define DIO0_RPORT PINE
|
#define DIO0_RPORT PINE
|
||||||
#define DIO0_WPORT PORTE
|
#define DIO0_WPORT PORTE
|
||||||
#define DIO0_DDR DDRE
|
#define DIO0_DDR DDRE
|
||||||
#define DIO0_PWM NULL
|
#define DIO0_PWM nullptr
|
||||||
|
|
||||||
#define DIO1_PIN PINE1
|
#define DIO1_PIN PINE1
|
||||||
#define DIO1_RPORT PINE
|
#define DIO1_RPORT PINE
|
||||||
#define DIO1_WPORT PORTE
|
#define DIO1_WPORT PORTE
|
||||||
#define DIO1_DDR DDRE
|
#define DIO1_DDR DDRE
|
||||||
#define DIO1_PWM NULL
|
#define DIO1_PWM nullptr
|
||||||
|
|
||||||
#define DIO2_PIN PINE4
|
#define DIO2_PIN PINE4
|
||||||
#define DIO2_RPORT PINE
|
#define DIO2_RPORT PINE
|
||||||
|
|
@ -125,339 +123,339 @@
|
||||||
#define DIO10_RPORT PINB
|
#define DIO10_RPORT PINB
|
||||||
#define DIO10_WPORT PORTB
|
#define DIO10_WPORT PORTB
|
||||||
#define DIO10_DDR DDRB
|
#define DIO10_DDR DDRB
|
||||||
#define DIO10_PWM NULL
|
#define DIO10_PWM nullptr
|
||||||
|
|
||||||
#define DIO11_PIN PINB2
|
#define DIO11_PIN PINB2
|
||||||
#define DIO11_RPORT PINB
|
#define DIO11_RPORT PINB
|
||||||
#define DIO11_WPORT PORTB
|
#define DIO11_WPORT PORTB
|
||||||
#define DIO11_DDR DDRB
|
#define DIO11_DDR DDRB
|
||||||
#define DIO11_PWM NULL
|
#define DIO11_PWM nullptr
|
||||||
|
|
||||||
#define DIO12_PIN PINB3
|
#define DIO12_PIN PINB3
|
||||||
#define DIO12_RPORT PINB
|
#define DIO12_RPORT PINB
|
||||||
#define DIO12_WPORT PORTB
|
#define DIO12_WPORT PORTB
|
||||||
#define DIO12_DDR DDRB
|
#define DIO12_DDR DDRB
|
||||||
#define DIO12_PWM NULL
|
#define DIO12_PWM nullptr
|
||||||
|
|
||||||
#define DIO13_PIN PINE2
|
#define DIO13_PIN PINE2
|
||||||
#define DIO13_RPORT PINE
|
#define DIO13_RPORT PINE
|
||||||
#define DIO13_WPORT PORTE
|
#define DIO13_WPORT PORTE
|
||||||
#define DIO13_DDR DDRE
|
#define DIO13_DDR DDRE
|
||||||
#define DIO13_PWM NULL
|
#define DIO13_PWM nullptr
|
||||||
|
|
||||||
#define DIO14_PIN PINE6
|
#define DIO14_PIN PINE6
|
||||||
#define DIO14_RPORT PINE
|
#define DIO14_RPORT PINE
|
||||||
#define DIO14_WPORT PORTE
|
#define DIO14_WPORT PORTE
|
||||||
#define DIO14_DDR DDRE
|
#define DIO14_DDR DDRE
|
||||||
#define DIO14_PWM NULL
|
#define DIO14_PWM nullptr
|
||||||
|
|
||||||
#define DIO15_PIN PINE7
|
#define DIO15_PIN PINE7
|
||||||
#define DIO15_RPORT PINE
|
#define DIO15_RPORT PINE
|
||||||
#define DIO15_WPORT PORTE
|
#define DIO15_WPORT PORTE
|
||||||
#define DIO15_DDR DDRE
|
#define DIO15_DDR DDRE
|
||||||
#define DIO15_PWM NULL
|
#define DIO15_PWM nullptr
|
||||||
|
|
||||||
#define DIO16_PIN PINB0
|
#define DIO16_PIN PINB0
|
||||||
#define DIO16_RPORT PINB
|
#define DIO16_RPORT PINB
|
||||||
#define DIO16_WPORT PORTB
|
#define DIO16_WPORT PORTB
|
||||||
#define DIO16_DDR DDRB
|
#define DIO16_DDR DDRB
|
||||||
#define DIO16_PWM NULL
|
#define DIO16_PWM nullptr
|
||||||
|
|
||||||
#define DIO17_PIN PIND0
|
#define DIO17_PIN PIND0
|
||||||
#define DIO17_RPORT PIND
|
#define DIO17_RPORT PIND
|
||||||
#define DIO17_WPORT PORTD
|
#define DIO17_WPORT PORTD
|
||||||
#define DIO17_DDR DDRD
|
#define DIO17_DDR DDRD
|
||||||
#define DIO17_PWM NULL
|
#define DIO17_PWM nullptr
|
||||||
|
|
||||||
#define DIO18_PIN PIND1
|
#define DIO18_PIN PIND1
|
||||||
#define DIO18_RPORT PIND
|
#define DIO18_RPORT PIND
|
||||||
#define DIO18_WPORT PORTD
|
#define DIO18_WPORT PORTD
|
||||||
#define DIO18_DDR DDRD
|
#define DIO18_DDR DDRD
|
||||||
#define DIO18_PWM NULL
|
#define DIO18_PWM nullptr
|
||||||
|
|
||||||
#define DIO19_PIN PIND2
|
#define DIO19_PIN PIND2
|
||||||
#define DIO19_RPORT PIND
|
#define DIO19_RPORT PIND
|
||||||
#define DIO19_WPORT PORTD
|
#define DIO19_WPORT PORTD
|
||||||
#define DIO19_DDR DDRD
|
#define DIO19_DDR DDRD
|
||||||
#define DIO19_PWM NULL
|
#define DIO19_PWM nullptr
|
||||||
|
|
||||||
#define DIO20_PIN PIND3
|
#define DIO20_PIN PIND3
|
||||||
#define DIO20_RPORT PIND
|
#define DIO20_RPORT PIND
|
||||||
#define DIO20_WPORT PORTD
|
#define DIO20_WPORT PORTD
|
||||||
#define DIO20_DDR DDRD
|
#define DIO20_DDR DDRD
|
||||||
#define DIO20_PWM NULL
|
#define DIO20_PWM nullptr
|
||||||
|
|
||||||
#define DIO21_PIN PIND4
|
#define DIO21_PIN PIND4
|
||||||
#define DIO21_RPORT PIND
|
#define DIO21_RPORT PIND
|
||||||
#define DIO21_WPORT PORTD
|
#define DIO21_WPORT PORTD
|
||||||
#define DIO21_DDR DDRD
|
#define DIO21_DDR DDRD
|
||||||
#define DIO21_PWM NULL
|
#define DIO21_PWM nullptr
|
||||||
|
|
||||||
#define DIO22_PIN PIND5
|
#define DIO22_PIN PIND5
|
||||||
#define DIO22_RPORT PIND
|
#define DIO22_RPORT PIND
|
||||||
#define DIO22_WPORT PORTD
|
#define DIO22_WPORT PORTD
|
||||||
#define DIO22_DDR DDRD
|
#define DIO22_DDR DDRD
|
||||||
#define DIO22_PWM NULL
|
#define DIO22_PWM nullptr
|
||||||
|
|
||||||
#define DIO23_PIN PIND6
|
#define DIO23_PIN PIND6
|
||||||
#define DIO23_RPORT PIND
|
#define DIO23_RPORT PIND
|
||||||
#define DIO23_WPORT PORTD
|
#define DIO23_WPORT PORTD
|
||||||
#define DIO23_DDR DDRD
|
#define DIO23_DDR DDRD
|
||||||
#define DIO23_PWM NULL
|
#define DIO23_PWM nullptr
|
||||||
|
|
||||||
#define DIO24_PIN PIND7
|
#define DIO24_PIN PIND7
|
||||||
#define DIO24_RPORT PIND
|
#define DIO24_RPORT PIND
|
||||||
#define DIO24_WPORT PORTD
|
#define DIO24_WPORT PORTD
|
||||||
#define DIO24_DDR DDRD
|
#define DIO24_DDR DDRD
|
||||||
#define DIO24_PWM NULL
|
#define DIO24_PWM nullptr
|
||||||
|
|
||||||
#define DIO25_PIN PING0
|
#define DIO25_PIN PING0
|
||||||
#define DIO25_RPORT PING
|
#define DIO25_RPORT PING
|
||||||
#define DIO25_WPORT PORTG
|
#define DIO25_WPORT PORTG
|
||||||
#define DIO25_DDR DDRG
|
#define DIO25_DDR DDRG
|
||||||
#define DIO25_PWM NULL
|
#define DIO25_PWM nullptr
|
||||||
|
|
||||||
#define DIO26_PIN PING1
|
#define DIO26_PIN PING1
|
||||||
#define DIO26_RPORT PING
|
#define DIO26_RPORT PING
|
||||||
#define DIO26_WPORT PORTG
|
#define DIO26_WPORT PORTG
|
||||||
#define DIO26_DDR DDRG
|
#define DIO26_DDR DDRG
|
||||||
#define DIO26_PWM NULL
|
#define DIO26_PWM nullptr
|
||||||
|
|
||||||
#define DIO27_PIN PING2
|
#define DIO27_PIN PING2
|
||||||
#define DIO27_RPORT PING
|
#define DIO27_RPORT PING
|
||||||
#define DIO27_WPORT PORTG
|
#define DIO27_WPORT PORTG
|
||||||
#define DIO27_DDR DDRG
|
#define DIO27_DDR DDRG
|
||||||
#define DIO27_PWM NULL
|
#define DIO27_PWM nullptr
|
||||||
|
|
||||||
#define DIO28_PIN PING3
|
#define DIO28_PIN PING3
|
||||||
#define DIO28_RPORT PING
|
#define DIO28_RPORT PING
|
||||||
#define DIO28_WPORT PORTG
|
#define DIO28_WPORT PORTG
|
||||||
#define DIO28_DDR DDRG
|
#define DIO28_DDR DDRG
|
||||||
#define DIO28_PWM NULL
|
#define DIO28_PWM nullptr
|
||||||
|
|
||||||
#define DIO29_PIN PING4
|
#define DIO29_PIN PING4
|
||||||
#define DIO29_RPORT PING
|
#define DIO29_RPORT PING
|
||||||
#define DIO29_WPORT PORTG
|
#define DIO29_WPORT PORTG
|
||||||
#define DIO29_DDR DDRG
|
#define DIO29_DDR DDRG
|
||||||
#define DIO29_PWM NULL
|
#define DIO29_PWM nullptr
|
||||||
|
|
||||||
#define DIO30_PIN PINC0
|
#define DIO30_PIN PINC0
|
||||||
#define DIO30_RPORT PINC
|
#define DIO30_RPORT PINC
|
||||||
#define DIO30_WPORT PORTC
|
#define DIO30_WPORT PORTC
|
||||||
#define DIO30_DDR DDRC
|
#define DIO30_DDR DDRC
|
||||||
#define DIO30_PWM NULL
|
#define DIO30_PWM nullptr
|
||||||
|
|
||||||
#define DIO31_PIN PINC1
|
#define DIO31_PIN PINC1
|
||||||
#define DIO31_RPORT PINC
|
#define DIO31_RPORT PINC
|
||||||
#define DIO31_WPORT PORTC
|
#define DIO31_WPORT PORTC
|
||||||
#define DIO31_DDR DDRC
|
#define DIO31_DDR DDRC
|
||||||
#define DIO31_PWM NULL
|
#define DIO31_PWM nullptr
|
||||||
|
|
||||||
#define DIO32_PIN PINC2
|
#define DIO32_PIN PINC2
|
||||||
#define DIO32_RPORT PINC
|
#define DIO32_RPORT PINC
|
||||||
#define DIO32_WPORT PORTC
|
#define DIO32_WPORT PORTC
|
||||||
#define DIO32_DDR DDRC
|
#define DIO32_DDR DDRC
|
||||||
#define DIO32_PWM NULL
|
#define DIO32_PWM nullptr
|
||||||
|
|
||||||
#define DIO33_PIN PINC3
|
#define DIO33_PIN PINC3
|
||||||
#define DIO33_RPORT PINC
|
#define DIO33_RPORT PINC
|
||||||
#define DIO33_WPORT PORTC
|
#define DIO33_WPORT PORTC
|
||||||
#define DIO33_DDR DDRC
|
#define DIO33_DDR DDRC
|
||||||
#define DIO33_PWM NULL
|
#define DIO33_PWM nullptr
|
||||||
|
|
||||||
#define DIO34_PIN PINC4
|
#define DIO34_PIN PINC4
|
||||||
#define DIO34_RPORT PINC
|
#define DIO34_RPORT PINC
|
||||||
#define DIO34_WPORT PORTC
|
#define DIO34_WPORT PORTC
|
||||||
#define DIO34_DDR DDRC
|
#define DIO34_DDR DDRC
|
||||||
#define DIO34_PWM NULL
|
#define DIO34_PWM nullptr
|
||||||
|
|
||||||
#define DIO35_PIN PINC5
|
#define DIO35_PIN PINC5
|
||||||
#define DIO35_RPORT PINC
|
#define DIO35_RPORT PINC
|
||||||
#define DIO35_WPORT PORTC
|
#define DIO35_WPORT PORTC
|
||||||
#define DIO35_DDR DDRC
|
#define DIO35_DDR DDRC
|
||||||
#define DIO35_PWM NULL
|
#define DIO35_PWM nullptr
|
||||||
|
|
||||||
#define DIO36_PIN PINC6
|
#define DIO36_PIN PINC6
|
||||||
#define DIO36_RPORT PINC
|
#define DIO36_RPORT PINC
|
||||||
#define DIO36_WPORT PORTC
|
#define DIO36_WPORT PORTC
|
||||||
#define DIO36_DDR DDRC
|
#define DIO36_DDR DDRC
|
||||||
#define DIO36_PWM NULL
|
#define DIO36_PWM nullptr
|
||||||
|
|
||||||
#define DIO37_PIN PINC7
|
#define DIO37_PIN PINC7
|
||||||
#define DIO37_RPORT PINC
|
#define DIO37_RPORT PINC
|
||||||
#define DIO37_WPORT PORTC
|
#define DIO37_WPORT PORTC
|
||||||
#define DIO37_DDR DDRC
|
#define DIO37_DDR DDRC
|
||||||
#define DIO37_PWM NULL
|
#define DIO37_PWM nullptr
|
||||||
|
|
||||||
#define DIO38_PIN PINA0
|
#define DIO38_PIN PINA0
|
||||||
#define DIO38_RPORT PINA
|
#define DIO38_RPORT PINA
|
||||||
#define DIO38_WPORT PORTA
|
#define DIO38_WPORT PORTA
|
||||||
#define DIO38_DDR DDRA
|
#define DIO38_DDR DDRA
|
||||||
#define DIO38_PWM NULL
|
#define DIO38_PWM nullptr
|
||||||
|
|
||||||
#define DIO39_PIN PINA1
|
#define DIO39_PIN PINA1
|
||||||
#define DIO39_RPORT PINA
|
#define DIO39_RPORT PINA
|
||||||
#define DIO39_WPORT PORTA
|
#define DIO39_WPORT PORTA
|
||||||
#define DIO39_DDR DDRA
|
#define DIO39_DDR DDRA
|
||||||
#define DIO39_PWM NULL
|
#define DIO39_PWM nullptr
|
||||||
|
|
||||||
#define DIO40_PIN PINA2
|
#define DIO40_PIN PINA2
|
||||||
#define DIO40_RPORT PINA
|
#define DIO40_RPORT PINA
|
||||||
#define DIO40_WPORT PORTA
|
#define DIO40_WPORT PORTA
|
||||||
#define DIO40_DDR DDRA
|
#define DIO40_DDR DDRA
|
||||||
#define DIO40_PWM NULL
|
#define DIO40_PWM nullptr
|
||||||
|
|
||||||
#define DIO41_PIN PINA3
|
#define DIO41_PIN PINA3
|
||||||
#define DIO41_RPORT PINA
|
#define DIO41_RPORT PINA
|
||||||
#define DIO41_WPORT PORTA
|
#define DIO41_WPORT PORTA
|
||||||
#define DIO41_DDR DDRA
|
#define DIO41_DDR DDRA
|
||||||
#define DIO41_PWM NULL
|
#define DIO41_PWM nullptr
|
||||||
|
|
||||||
#define DIO42_PIN PINA4
|
#define DIO42_PIN PINA4
|
||||||
#define DIO42_RPORT PINA
|
#define DIO42_RPORT PINA
|
||||||
#define DIO42_WPORT PORTA
|
#define DIO42_WPORT PORTA
|
||||||
#define DIO42_DDR DDRA
|
#define DIO42_DDR DDRA
|
||||||
#define DIO42_PWM NULL
|
#define DIO42_PWM nullptr
|
||||||
|
|
||||||
#define DIO43_PIN PINA5
|
#define DIO43_PIN PINA5
|
||||||
#define DIO43_RPORT PINA
|
#define DIO43_RPORT PINA
|
||||||
#define DIO43_WPORT PORTA
|
#define DIO43_WPORT PORTA
|
||||||
#define DIO43_DDR DDRA
|
#define DIO43_DDR DDRA
|
||||||
#define DIO43_PWM NULL
|
#define DIO43_PWM nullptr
|
||||||
|
|
||||||
#define DIO44_PIN PINA6
|
#define DIO44_PIN PINA6
|
||||||
#define DIO44_RPORT PINA
|
#define DIO44_RPORT PINA
|
||||||
#define DIO44_WPORT PORTA
|
#define DIO44_WPORT PORTA
|
||||||
#define DIO44_DDR DDRA
|
#define DIO44_DDR DDRA
|
||||||
#define DIO44_PWM NULL
|
#define DIO44_PWM nullptr
|
||||||
|
|
||||||
#define DIO45_PIN PINA7
|
#define DIO45_PIN PINA7
|
||||||
#define DIO45_RPORT PINA
|
#define DIO45_RPORT PINA
|
||||||
#define DIO45_WPORT PORTA
|
#define DIO45_WPORT PORTA
|
||||||
#define DIO45_DDR DDRA
|
#define DIO45_DDR DDRA
|
||||||
#define DIO45_PWM NULL
|
#define DIO45_PWM nullptr
|
||||||
|
|
||||||
#define DIO46_PIN PINF0
|
#define DIO46_PIN PINF0
|
||||||
#define DIO46_RPORT PINF
|
#define DIO46_RPORT PINF
|
||||||
#define DIO46_WPORT PORTF
|
#define DIO46_WPORT PORTF
|
||||||
#define DIO46_DDR DDRF
|
#define DIO46_DDR DDRF
|
||||||
#define DIO46_PWM NULL
|
#define DIO46_PWM nullptr
|
||||||
|
|
||||||
#define DIO47_PIN PINF1
|
#define DIO47_PIN PINF1
|
||||||
#define DIO47_RPORT PINF
|
#define DIO47_RPORT PINF
|
||||||
#define DIO47_WPORT PORTF
|
#define DIO47_WPORT PORTF
|
||||||
#define DIO47_DDR DDRF
|
#define DIO47_DDR DDRF
|
||||||
#define DIO47_PWM NULL
|
#define DIO47_PWM nullptr
|
||||||
|
|
||||||
#define DIO48_PIN PINF2
|
#define DIO48_PIN PINF2
|
||||||
#define DIO48_RPORT PINF
|
#define DIO48_RPORT PINF
|
||||||
#define DIO48_WPORT PORTF
|
#define DIO48_WPORT PORTF
|
||||||
#define DIO48_DDR DDRF
|
#define DIO48_DDR DDRF
|
||||||
#define DIO48_PWM NULL
|
#define DIO48_PWM nullptr
|
||||||
|
|
||||||
#define DIO49_PIN PINF3
|
#define DIO49_PIN PINF3
|
||||||
#define DIO49_RPORT PINF
|
#define DIO49_RPORT PINF
|
||||||
#define DIO49_WPORT PORTF
|
#define DIO49_WPORT PORTF
|
||||||
#define DIO49_DDR DDRF
|
#define DIO49_DDR DDRF
|
||||||
#define DIO49_PWM NULL
|
#define DIO49_PWM nullptr
|
||||||
|
|
||||||
#define DIO50_PIN PINF4
|
#define DIO50_PIN PINF4
|
||||||
#define DIO50_RPORT PINF
|
#define DIO50_RPORT PINF
|
||||||
#define DIO50_WPORT PORTF
|
#define DIO50_WPORT PORTF
|
||||||
#define DIO50_DDR DDRF
|
#define DIO50_DDR DDRF
|
||||||
#define DIO50_PWM NULL
|
#define DIO50_PWM nullptr
|
||||||
|
|
||||||
#define DIO51_PIN PINF5
|
#define DIO51_PIN PINF5
|
||||||
#define DIO51_RPORT PINF
|
#define DIO51_RPORT PINF
|
||||||
#define DIO51_WPORT PORTF
|
#define DIO51_WPORT PORTF
|
||||||
#define DIO51_DDR DDRF
|
#define DIO51_DDR DDRF
|
||||||
#define DIO51_PWM NULL
|
#define DIO51_PWM nullptr
|
||||||
|
|
||||||
#define DIO52_PIN PINF6
|
#define DIO52_PIN PINF6
|
||||||
#define DIO52_RPORT PINF
|
#define DIO52_RPORT PINF
|
||||||
#define DIO52_WPORT PORTF
|
#define DIO52_WPORT PORTF
|
||||||
#define DIO52_DDR DDRF
|
#define DIO52_DDR DDRF
|
||||||
#define DIO52_PWM NULL
|
#define DIO52_PWM nullptr
|
||||||
|
|
||||||
#define DIO53_PIN PINF7
|
#define DIO53_PIN PINF7
|
||||||
#define DIO53_RPORT PINF
|
#define DIO53_RPORT PINF
|
||||||
#define DIO53_WPORT PORTF
|
#define DIO53_WPORT PORTF
|
||||||
#define DIO53_DDR DDRF
|
#define DIO53_DDR DDRF
|
||||||
#define DIO53_PWM NULL
|
#define DIO53_PWM nullptr
|
||||||
|
|
||||||
#undef PA0
|
#undef PA0
|
||||||
#define PA0_PIN PINA0
|
#define PA0_PIN PINA0
|
||||||
#define PA0_RPORT PINA
|
#define PA0_RPORT PINA
|
||||||
#define PA0_WPORT PORTA
|
#define PA0_WPORT PORTA
|
||||||
#define PA0_DDR DDRA
|
#define PA0_DDR DDRA
|
||||||
#define PA0_PWM NULL
|
#define PA0_PWM nullptr
|
||||||
#undef PA1
|
#undef PA1
|
||||||
#define PA1_PIN PINA1
|
#define PA1_PIN PINA1
|
||||||
#define PA1_RPORT PINA
|
#define PA1_RPORT PINA
|
||||||
#define PA1_WPORT PORTA
|
#define PA1_WPORT PORTA
|
||||||
#define PA1_DDR DDRA
|
#define PA1_DDR DDRA
|
||||||
#define PA1_PWM NULL
|
#define PA1_PWM nullptr
|
||||||
#undef PA2
|
#undef PA2
|
||||||
#define PA2_PIN PINA2
|
#define PA2_PIN PINA2
|
||||||
#define PA2_RPORT PINA
|
#define PA2_RPORT PINA
|
||||||
#define PA2_WPORT PORTA
|
#define PA2_WPORT PORTA
|
||||||
#define PA2_DDR DDRA
|
#define PA2_DDR DDRA
|
||||||
#define PA2_PWM NULL
|
#define PA2_PWM nullptr
|
||||||
#undef PA3
|
#undef PA3
|
||||||
#define PA3_PIN PINA3
|
#define PA3_PIN PINA3
|
||||||
#define PA3_RPORT PINA
|
#define PA3_RPORT PINA
|
||||||
#define PA3_WPORT PORTA
|
#define PA3_WPORT PORTA
|
||||||
#define PA3_DDR DDRA
|
#define PA3_DDR DDRA
|
||||||
#define PA3_PWM NULL
|
#define PA3_PWM nullptr
|
||||||
#undef PA4
|
#undef PA4
|
||||||
#define PA4_PIN PINA4
|
#define PA4_PIN PINA4
|
||||||
#define PA4_RPORT PINA
|
#define PA4_RPORT PINA
|
||||||
#define PA4_WPORT PORTA
|
#define PA4_WPORT PORTA
|
||||||
#define PA4_DDR DDRA
|
#define PA4_DDR DDRA
|
||||||
#define PA4_PWM NULL
|
#define PA4_PWM nullptr
|
||||||
#undef PA5
|
#undef PA5
|
||||||
#define PA5_PIN PINA5
|
#define PA5_PIN PINA5
|
||||||
#define PA5_RPORT PINA
|
#define PA5_RPORT PINA
|
||||||
#define PA5_WPORT PORTA
|
#define PA5_WPORT PORTA
|
||||||
#define PA5_DDR DDRA
|
#define PA5_DDR DDRA
|
||||||
#define PA5_PWM NULL
|
#define PA5_PWM nullptr
|
||||||
#undef PA6
|
#undef PA6
|
||||||
#define PA6_PIN PINA6
|
#define PA6_PIN PINA6
|
||||||
#define PA6_RPORT PINA
|
#define PA6_RPORT PINA
|
||||||
#define PA6_WPORT PORTA
|
#define PA6_WPORT PORTA
|
||||||
#define PA6_DDR DDRA
|
#define PA6_DDR DDRA
|
||||||
#define PA6_PWM NULL
|
#define PA6_PWM nullptr
|
||||||
#undef PA7
|
#undef PA7
|
||||||
#define PA7_PIN PINA7
|
#define PA7_PIN PINA7
|
||||||
#define PA7_RPORT PINA
|
#define PA7_RPORT PINA
|
||||||
#define PA7_WPORT PORTA
|
#define PA7_WPORT PORTA
|
||||||
#define PA7_DDR DDRA
|
#define PA7_DDR DDRA
|
||||||
#define PA7_PWM NULL
|
#define PA7_PWM nullptr
|
||||||
|
|
||||||
#undef PB0
|
#undef PB0
|
||||||
#define PB0_PIN PINB0
|
#define PB0_PIN PINB0
|
||||||
#define PB0_RPORT PINB
|
#define PB0_RPORT PINB
|
||||||
#define PB0_WPORT PORTB
|
#define PB0_WPORT PORTB
|
||||||
#define PB0_DDR DDRB
|
#define PB0_DDR DDRB
|
||||||
#define PB0_PWM NULL
|
#define PB0_PWM nullptr
|
||||||
#undef PB1
|
#undef PB1
|
||||||
#define PB1_PIN PINB1
|
#define PB1_PIN PINB1
|
||||||
#define PB1_RPORT PINB
|
#define PB1_RPORT PINB
|
||||||
#define PB1_WPORT PORTB
|
#define PB1_WPORT PORTB
|
||||||
#define PB1_DDR DDRB
|
#define PB1_DDR DDRB
|
||||||
#define PB1_PWM NULL
|
#define PB1_PWM nullptr
|
||||||
#undef PB2
|
#undef PB2
|
||||||
#define PB2_PIN PINB2
|
#define PB2_PIN PINB2
|
||||||
#define PB2_RPORT PINB
|
#define PB2_RPORT PINB
|
||||||
#define PB2_WPORT PORTB
|
#define PB2_WPORT PORTB
|
||||||
#define PB2_DDR DDRB
|
#define PB2_DDR DDRB
|
||||||
#define PB2_PWM NULL
|
#define PB2_PWM nullptr
|
||||||
#undef PB3
|
#undef PB3
|
||||||
#define PB3_PIN PINB3
|
#define PB3_PIN PINB3
|
||||||
#define PB3_RPORT PINB
|
#define PB3_RPORT PINB
|
||||||
#define PB3_WPORT PORTB
|
#define PB3_WPORT PORTB
|
||||||
#define PB3_DDR DDRB
|
#define PB3_DDR DDRB
|
||||||
#define PB3_PWM NULL
|
#define PB3_PWM nullptr
|
||||||
#undef PB4
|
#undef PB4
|
||||||
#define PB4_PIN PINB4
|
#define PB4_PIN PINB4
|
||||||
#define PB4_RPORT PINB
|
#define PB4_RPORT PINB
|
||||||
|
|
@ -469,13 +467,13 @@
|
||||||
#define PB5_RPORT PINB
|
#define PB5_RPORT PINB
|
||||||
#define PB5_WPORT PORTB
|
#define PB5_WPORT PORTB
|
||||||
#define PB5_DDR DDRB
|
#define PB5_DDR DDRB
|
||||||
#define PB5_PWM NULL
|
#define PB5_PWM nullptr
|
||||||
#undef PB6
|
#undef PB6
|
||||||
#define PB6_PIN PINB6
|
#define PB6_PIN PINB6
|
||||||
#define PB6_RPORT PINB
|
#define PB6_RPORT PINB
|
||||||
#define PB6_WPORT PORTB
|
#define PB6_WPORT PORTB
|
||||||
#define PB6_DDR DDRB
|
#define PB6_DDR DDRB
|
||||||
#define PB6_PWM NULL
|
#define PB6_PWM nullptr
|
||||||
#undef PB7
|
#undef PB7
|
||||||
#define PB7_PIN PINB7
|
#define PB7_PIN PINB7
|
||||||
#define PB7_RPORT PINB
|
#define PB7_RPORT PINB
|
||||||
|
|
@ -488,117 +486,117 @@
|
||||||
#define PC0_RPORT PINC
|
#define PC0_RPORT PINC
|
||||||
#define PC0_WPORT PORTC
|
#define PC0_WPORT PORTC
|
||||||
#define PC0_DDR DDRC
|
#define PC0_DDR DDRC
|
||||||
#define PC0_PWM NULL
|
#define PC0_PWM nullptr
|
||||||
#undef PC1
|
#undef PC1
|
||||||
#define PC1_PIN PINC1
|
#define PC1_PIN PINC1
|
||||||
#define PC1_RPORT PINC
|
#define PC1_RPORT PINC
|
||||||
#define PC1_WPORT PORTC
|
#define PC1_WPORT PORTC
|
||||||
#define PC1_DDR DDRC
|
#define PC1_DDR DDRC
|
||||||
#define PC1_PWM NULL
|
#define PC1_PWM nullptr
|
||||||
#undef PC2
|
#undef PC2
|
||||||
#define PC2_PIN PINC2
|
#define PC2_PIN PINC2
|
||||||
#define PC2_RPORT PINC
|
#define PC2_RPORT PINC
|
||||||
#define PC2_WPORT PORTC
|
#define PC2_WPORT PORTC
|
||||||
#define PC2_DDR DDRC
|
#define PC2_DDR DDRC
|
||||||
#define PC2_PWM NULL
|
#define PC2_PWM nullptr
|
||||||
#undef PC3
|
#undef PC3
|
||||||
#define PC3_PIN PINC3
|
#define PC3_PIN PINC3
|
||||||
#define PC3_RPORT PINC
|
#define PC3_RPORT PINC
|
||||||
#define PC3_WPORT PORTC
|
#define PC3_WPORT PORTC
|
||||||
#define PC3_DDR DDRC
|
#define PC3_DDR DDRC
|
||||||
#define PC3_PWM NULL
|
#define PC3_PWM nullptr
|
||||||
#undef PC4
|
#undef PC4
|
||||||
#define PC4_PIN PINC4
|
#define PC4_PIN PINC4
|
||||||
#define PC4_RPORT PINC
|
#define PC4_RPORT PINC
|
||||||
#define PC4_WPORT PORTC
|
#define PC4_WPORT PORTC
|
||||||
#define PC4_DDR DDRC
|
#define PC4_DDR DDRC
|
||||||
#define PC4_PWM NULL
|
#define PC4_PWM nullptr
|
||||||
#undef PC5
|
#undef PC5
|
||||||
#define PC5_PIN PINC5
|
#define PC5_PIN PINC5
|
||||||
#define PC5_RPORT PINC
|
#define PC5_RPORT PINC
|
||||||
#define PC5_WPORT PORTC
|
#define PC5_WPORT PORTC
|
||||||
#define PC5_DDR DDRC
|
#define PC5_DDR DDRC
|
||||||
#define PC5_PWM NULL
|
#define PC5_PWM nullptr
|
||||||
#undef PC6
|
#undef PC6
|
||||||
#define PC6_PIN PINC6
|
#define PC6_PIN PINC6
|
||||||
#define PC6_RPORT PINC
|
#define PC6_RPORT PINC
|
||||||
#define PC6_WPORT PORTC
|
#define PC6_WPORT PORTC
|
||||||
#define PC6_DDR DDRC
|
#define PC6_DDR DDRC
|
||||||
#define PC6_PWM NULL
|
#define PC6_PWM nullptr
|
||||||
#undef PC7
|
#undef PC7
|
||||||
#define PC7_PIN PINC7
|
#define PC7_PIN PINC7
|
||||||
#define PC7_RPORT PINC
|
#define PC7_RPORT PINC
|
||||||
#define PC7_WPORT PORTC
|
#define PC7_WPORT PORTC
|
||||||
#define PC7_DDR DDRC
|
#define PC7_DDR DDRC
|
||||||
#define PC7_PWM NULL
|
#define PC7_PWM nullptr
|
||||||
|
|
||||||
#undef PD0
|
#undef PD0
|
||||||
#define PD0_PIN PIND0
|
#define PD0_PIN PIND0
|
||||||
#define PD0_RPORT PIND
|
#define PD0_RPORT PIND
|
||||||
#define PD0_WPORT PORTD
|
#define PD0_WPORT PORTD
|
||||||
#define PD0_DDR DDRD
|
#define PD0_DDR DDRD
|
||||||
#define PD0_PWM NULL
|
#define PD0_PWM nullptr
|
||||||
#undef PD1
|
#undef PD1
|
||||||
#define PD1_PIN PIND1
|
#define PD1_PIN PIND1
|
||||||
#define PD1_RPORT PIND
|
#define PD1_RPORT PIND
|
||||||
#define PD1_WPORT PORTD
|
#define PD1_WPORT PORTD
|
||||||
#define PD1_DDR DDRD
|
#define PD1_DDR DDRD
|
||||||
#define PD1_PWM NULL
|
#define PD1_PWM nullptr
|
||||||
#undef PD2
|
#undef PD2
|
||||||
#define PD2_PIN PIND2
|
#define PD2_PIN PIND2
|
||||||
#define PD2_RPORT PIND
|
#define PD2_RPORT PIND
|
||||||
#define PD2_WPORT PORTD
|
#define PD2_WPORT PORTD
|
||||||
#define PD2_DDR DDRD
|
#define PD2_DDR DDRD
|
||||||
#define PD2_PWM NULL
|
#define PD2_PWM nullptr
|
||||||
#undef PD3
|
#undef PD3
|
||||||
#define PD3_PIN PIND3
|
#define PD3_PIN PIND3
|
||||||
#define PD3_RPORT PIND
|
#define PD3_RPORT PIND
|
||||||
#define PD3_WPORT PORTD
|
#define PD3_WPORT PORTD
|
||||||
#define PD3_DDR DDRD
|
#define PD3_DDR DDRD
|
||||||
#define PD3_PWM NULL
|
#define PD3_PWM nullptr
|
||||||
#undef PD4
|
#undef PD4
|
||||||
#define PD4_PIN PIND4
|
#define PD4_PIN PIND4
|
||||||
#define PD4_RPORT PIND
|
#define PD4_RPORT PIND
|
||||||
#define PD4_WPORT PORTD
|
#define PD4_WPORT PORTD
|
||||||
#define PD4_DDR DDRD
|
#define PD4_DDR DDRD
|
||||||
#define PD4_PWM NULL
|
#define PD4_PWM nullptr
|
||||||
#undef PD5
|
#undef PD5
|
||||||
#define PD5_PIN PIND5
|
#define PD5_PIN PIND5
|
||||||
#define PD5_RPORT PIND
|
#define PD5_RPORT PIND
|
||||||
#define PD5_WPORT PORTD
|
#define PD5_WPORT PORTD
|
||||||
#define PD5_DDR DDRD
|
#define PD5_DDR DDRD
|
||||||
#define PD5_PWM NULL
|
#define PD5_PWM nullptr
|
||||||
#undef PD6
|
#undef PD6
|
||||||
#define PD6_PIN PIND6
|
#define PD6_PIN PIND6
|
||||||
#define PD6_RPORT PIND
|
#define PD6_RPORT PIND
|
||||||
#define PD6_WPORT PORTD
|
#define PD6_WPORT PORTD
|
||||||
#define PD6_DDR DDRD
|
#define PD6_DDR DDRD
|
||||||
#define PD6_PWM NULL
|
#define PD6_PWM nullptr
|
||||||
#undef PD7
|
#undef PD7
|
||||||
#define PD7_PIN PIND7
|
#define PD7_PIN PIND7
|
||||||
#define PD7_RPORT PIND
|
#define PD7_RPORT PIND
|
||||||
#define PD7_WPORT PORTD
|
#define PD7_WPORT PORTD
|
||||||
#define PD7_DDR DDRD
|
#define PD7_DDR DDRD
|
||||||
#define PD7_PWM NULL
|
#define PD7_PWM nullptr
|
||||||
|
|
||||||
#undef PE0
|
#undef PE0
|
||||||
#define PE0_PIN PINE0
|
#define PE0_PIN PINE0
|
||||||
#define PE0_RPORT PINE
|
#define PE0_RPORT PINE
|
||||||
#define PE0_WPORT PORTE
|
#define PE0_WPORT PORTE
|
||||||
#define PE0_DDR DDRE
|
#define PE0_DDR DDRE
|
||||||
#define PE0_PWM NULL
|
#define PE0_PWM nullptr
|
||||||
#undef PE1
|
#undef PE1
|
||||||
#define PE1_PIN PINE1
|
#define PE1_PIN PINE1
|
||||||
#define PE1_RPORT PINE
|
#define PE1_RPORT PINE
|
||||||
#define PE1_WPORT PORTE
|
#define PE1_WPORT PORTE
|
||||||
#define PE1_DDR DDRE
|
#define PE1_DDR DDRE
|
||||||
#define PE1_PWM NULL
|
#define PE1_PWM nullptr
|
||||||
#undef PE2
|
#undef PE2
|
||||||
#define PE2_PIN PINE2
|
#define PE2_PIN PINE2
|
||||||
#define PE2_RPORT PINE
|
#define PE2_RPORT PINE
|
||||||
#define PE2_WPORT PORTE
|
#define PE2_WPORT PORTE
|
||||||
#define PE2_DDR DDRE
|
#define PE2_DDR DDRE
|
||||||
#define PE2_PWM NULL
|
#define PE2_PWM nullptr
|
||||||
#undef PE3
|
#undef PE3
|
||||||
#define PE3_PIN PINE3
|
#define PE3_PIN PINE3
|
||||||
#define PE3_RPORT PINE
|
#define PE3_RPORT PINE
|
||||||
|
|
@ -622,98 +620,96 @@
|
||||||
#define PE6_RPORT PINE
|
#define PE6_RPORT PINE
|
||||||
#define PE6_WPORT PORTE
|
#define PE6_WPORT PORTE
|
||||||
#define PE6_DDR DDRE
|
#define PE6_DDR DDRE
|
||||||
#define PE6_PWM NULL
|
#define PE6_PWM nullptr
|
||||||
#undef PE7
|
#undef PE7
|
||||||
#define PE7_PIN PINE7
|
#define PE7_PIN PINE7
|
||||||
#define PE7_RPORT PINE
|
#define PE7_RPORT PINE
|
||||||
#define PE7_WPORT PORTE
|
#define PE7_WPORT PORTE
|
||||||
#define PE7_DDR DDRE
|
#define PE7_DDR DDRE
|
||||||
#define PE7_PWM NULL
|
#define PE7_PWM nullptr
|
||||||
|
|
||||||
#undef PF0
|
#undef PF0
|
||||||
#define PF0_PIN PINF0
|
#define PF0_PIN PINF0
|
||||||
#define PF0_RPORT PINF
|
#define PF0_RPORT PINF
|
||||||
#define PF0_WPORT PORTF
|
#define PF0_WPORT PORTF
|
||||||
#define PF0_DDR DDRF
|
#define PF0_DDR DDRF
|
||||||
#define PF0_PWM NULL
|
#define PF0_PWM nullptr
|
||||||
#undef PF1
|
#undef PF1
|
||||||
#define PF1_PIN PINF1
|
#define PF1_PIN PINF1
|
||||||
#define PF1_RPORT PINF
|
#define PF1_RPORT PINF
|
||||||
#define PF1_WPORT PORTF
|
#define PF1_WPORT PORTF
|
||||||
#define PF1_DDR DDRF
|
#define PF1_DDR DDRF
|
||||||
#define PF1_PWM NULL
|
#define PF1_PWM nullptr
|
||||||
#undef PF2
|
#undef PF2
|
||||||
#define PF2_PIN PINF2
|
#define PF2_PIN PINF2
|
||||||
#define PF2_RPORT PINF
|
#define PF2_RPORT PINF
|
||||||
#define PF2_WPORT PORTF
|
#define PF2_WPORT PORTF
|
||||||
#define PF2_DDR DDRF
|
#define PF2_DDR DDRF
|
||||||
#define PF2_PWM NULL
|
#define PF2_PWM nullptr
|
||||||
#undef PF3
|
#undef PF3
|
||||||
#define PF3_PIN PINF3
|
#define PF3_PIN PINF3
|
||||||
#define PF3_RPORT PINF
|
#define PF3_RPORT PINF
|
||||||
#define PF3_WPORT PORTF
|
#define PF3_WPORT PORTF
|
||||||
#define PF3_DDR DDRF
|
#define PF3_DDR DDRF
|
||||||
#define PF3_PWM NULL
|
#define PF3_PWM nullptr
|
||||||
#undef PF4
|
#undef PF4
|
||||||
#define PF4_PIN PINF4
|
#define PF4_PIN PINF4
|
||||||
#define PF4_RPORT PINF
|
#define PF4_RPORT PINF
|
||||||
#define PF4_WPORT PORTF
|
#define PF4_WPORT PORTF
|
||||||
#define PF4_DDR DDRF
|
#define PF4_DDR DDRF
|
||||||
#define PF4_PWM NULL
|
#define PF4_PWM nullptr
|
||||||
#undef PF5
|
#undef PF5
|
||||||
#define PF5_PIN PINF5
|
#define PF5_PIN PINF5
|
||||||
#define PF5_RPORT PINF
|
#define PF5_RPORT PINF
|
||||||
#define PF5_WPORT PORTF
|
#define PF5_WPORT PORTF
|
||||||
#define PF5_DDR DDRF
|
#define PF5_DDR DDRF
|
||||||
#define PF5_PWM NULL
|
#define PF5_PWM nullptr
|
||||||
#undef PF6
|
#undef PF6
|
||||||
#define PF6_PIN PINF6
|
#define PF6_PIN PINF6
|
||||||
#define PF6_RPORT PINF
|
#define PF6_RPORT PINF
|
||||||
#define PF6_WPORT PORTF
|
#define PF6_WPORT PORTF
|
||||||
#define PF6_DDR DDRF
|
#define PF6_DDR DDRF
|
||||||
#define PF6_PWM NULL
|
#define PF6_PWM nullptr
|
||||||
#undef PF7
|
#undef PF7
|
||||||
#define PF7_PIN PINF7
|
#define PF7_PIN PINF7
|
||||||
#define PF7_RPORT PINF
|
#define PF7_RPORT PINF
|
||||||
#define PF7_WPORT PORTF
|
#define PF7_WPORT PORTF
|
||||||
#define PF7_DDR DDRF
|
#define PF7_DDR DDRF
|
||||||
#define PF7_PWM NULL
|
#define PF7_PWM nullptr
|
||||||
|
|
||||||
#undef PG0
|
#undef PG0
|
||||||
#define PG0_PIN PING0
|
#define PG0_PIN PING0
|
||||||
#define PG0_RPORT PING
|
#define PG0_RPORT PING
|
||||||
#define PG0_WPORT PORTG
|
#define PG0_WPORT PORTG
|
||||||
#define PG0_DDR DDRG
|
#define PG0_DDR DDRG
|
||||||
#define PG0_PWM NULL
|
#define PG0_PWM nullptr
|
||||||
#undef PG1
|
#undef PG1
|
||||||
#define PG1_PIN PING1
|
#define PG1_PIN PING1
|
||||||
#define PG1_RPORT PING
|
#define PG1_RPORT PING
|
||||||
#define PG1_WPORT PORTG
|
#define PG1_WPORT PORTG
|
||||||
#define PG1_DDR DDRG
|
#define PG1_DDR DDRG
|
||||||
#define PG1_PWM NULL
|
#define PG1_PWM nullptr
|
||||||
#undef PG2
|
#undef PG2
|
||||||
#define PG2_PIN PING2
|
#define PG2_PIN PING2
|
||||||
#define PG2_RPORT PING
|
#define PG2_RPORT PING
|
||||||
#define PG2_WPORT PORTG
|
#define PG2_WPORT PORTG
|
||||||
#define PG2_DDR DDRG
|
#define PG2_DDR DDRG
|
||||||
#define PG2_PWM NULL
|
#define PG2_PWM nullptr
|
||||||
#undef PG3
|
#undef PG3
|
||||||
#define PG3_PIN PING3
|
#define PG3_PIN PING3
|
||||||
#define PG3_RPORT PING
|
#define PG3_RPORT PING
|
||||||
#define PG3_WPORT PORTG
|
#define PG3_WPORT PORTG
|
||||||
#define PG3_DDR DDRG
|
#define PG3_DDR DDRG
|
||||||
#define PG3_PWM NULL
|
#define PG3_PWM nullptr
|
||||||
#undef PG4
|
#undef PG4
|
||||||
#define PG4_PIN PING4
|
#define PG4_PIN PING4
|
||||||
#define PG4_RPORT PING
|
#define PG4_RPORT PING
|
||||||
#define PG4_WPORT PORTG
|
#define PG4_WPORT PORTG
|
||||||
#define PG4_DDR DDRG
|
#define PG4_DDR DDRG
|
||||||
#define PG4_PWM NULL
|
#define PG4_PWM nullptr
|
||||||
#undef PG5
|
#undef PG5
|
||||||
#define PG5_PIN PING5
|
#define PG5_PIN PING5
|
||||||
#define PG5_RPORT PING
|
#define PG5_RPORT PING
|
||||||
#define PG5_WPORT PORTG
|
#define PG5_WPORT PORTG
|
||||||
#define PG5_DDR DDRG
|
#define PG5_DDR DDRG
|
||||||
#define PG5_PWM &OCR0B
|
#define PG5_PWM &OCR0B
|
||||||
|
|
||||||
#endif // _FASTIO_1281_H_
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
/**
|
/**
|
||||||
* Marlin 3D Printer Firmware
|
* Marlin 3D Printer Firmware
|
||||||
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
*
|
*
|
||||||
* Based on Sprinter and grbl.
|
* Based on Sprinter and grbl.
|
||||||
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -16,9 +16,10 @@
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pin mapping for the 168, 328, and 328P
|
* Pin mapping for the 168, 328, and 328P
|
||||||
|
|
@ -27,10 +28,7 @@
|
||||||
* Port: B0 B1 B2 B3 B4 B5 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7
|
* Port: B0 B1 B2 B3 B4 B5 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _FASTIO_168_H_
|
#include "../fastio.h"
|
||||||
#define _FASTIO_168_H_
|
|
||||||
|
|
||||||
#include "fastio_AVR.h"
|
|
||||||
|
|
||||||
#define DEBUG_LED AIO5
|
#define DEBUG_LED AIO5
|
||||||
|
|
||||||
|
|
@ -62,19 +60,19 @@
|
||||||
#define DIO0_RPORT PIND
|
#define DIO0_RPORT PIND
|
||||||
#define DIO0_WPORT PORTD
|
#define DIO0_WPORT PORTD
|
||||||
#define DIO0_DDR DDRD
|
#define DIO0_DDR DDRD
|
||||||
#define DIO0_PWM NULL
|
#define DIO0_PWM nullptr
|
||||||
|
|
||||||
#define DIO1_PIN PIND1
|
#define DIO1_PIN PIND1
|
||||||
#define DIO1_RPORT PIND
|
#define DIO1_RPORT PIND
|
||||||
#define DIO1_WPORT PORTD
|
#define DIO1_WPORT PORTD
|
||||||
#define DIO1_DDR DDRD
|
#define DIO1_DDR DDRD
|
||||||
#define DIO1_PWM NULL
|
#define DIO1_PWM nullptr
|
||||||
|
|
||||||
#define DIO2_PIN PIND2
|
#define DIO2_PIN PIND2
|
||||||
#define DIO2_RPORT PIND
|
#define DIO2_RPORT PIND
|
||||||
#define DIO2_WPORT PORTD
|
#define DIO2_WPORT PORTD
|
||||||
#define DIO2_DDR DDRD
|
#define DIO2_DDR DDRD
|
||||||
#define DIO2_PWM NULL
|
#define DIO2_PWM nullptr
|
||||||
|
|
||||||
#define DIO3_PIN PIND3
|
#define DIO3_PIN PIND3
|
||||||
#define DIO3_RPORT PIND
|
#define DIO3_RPORT PIND
|
||||||
|
|
@ -86,7 +84,7 @@
|
||||||
#define DIO4_RPORT PIND
|
#define DIO4_RPORT PIND
|
||||||
#define DIO4_WPORT PORTD
|
#define DIO4_WPORT PORTD
|
||||||
#define DIO4_DDR DDRD
|
#define DIO4_DDR DDRD
|
||||||
#define DIO4_PWM NULL
|
#define DIO4_PWM nullptr
|
||||||
|
|
||||||
#define DIO5_PIN PIND5
|
#define DIO5_PIN PIND5
|
||||||
#define DIO5_RPORT PIND
|
#define DIO5_RPORT PIND
|
||||||
|
|
@ -104,25 +102,25 @@
|
||||||
#define DIO7_RPORT PIND
|
#define DIO7_RPORT PIND
|
||||||
#define DIO7_WPORT PORTD
|
#define DIO7_WPORT PORTD
|
||||||
#define DIO7_DDR DDRD
|
#define DIO7_DDR DDRD
|
||||||
#define DIO7_PWM NULL
|
#define DIO7_PWM nullptr
|
||||||
|
|
||||||
#define DIO8_PIN PINB0
|
#define DIO8_PIN PINB0
|
||||||
#define DIO8_RPORT PINB
|
#define DIO8_RPORT PINB
|
||||||
#define DIO8_WPORT PORTB
|
#define DIO8_WPORT PORTB
|
||||||
#define DIO8_DDR DDRB
|
#define DIO8_DDR DDRB
|
||||||
#define DIO8_PWM NULL
|
#define DIO8_PWM nullptr
|
||||||
|
|
||||||
#define DIO9_PIN PINB1
|
#define DIO9_PIN PINB1
|
||||||
#define DIO9_RPORT PINB
|
#define DIO9_RPORT PINB
|
||||||
#define DIO9_WPORT PORTB
|
#define DIO9_WPORT PORTB
|
||||||
#define DIO9_DDR DDRB
|
#define DIO9_DDR DDRB
|
||||||
#define DIO9_PWM NULL
|
#define DIO9_PWM nullptr
|
||||||
|
|
||||||
#define DIO10_PIN PINB2
|
#define DIO10_PIN PINB2
|
||||||
#define DIO10_RPORT PINB
|
#define DIO10_RPORT PINB
|
||||||
#define DIO10_WPORT PORTB
|
#define DIO10_WPORT PORTB
|
||||||
#define DIO10_DDR DDRB
|
#define DIO10_DDR DDRB
|
||||||
#define DIO10_PWM NULL
|
#define DIO10_PWM nullptr
|
||||||
|
|
||||||
#define DIO11_PIN PINB3
|
#define DIO11_PIN PINB3
|
||||||
#define DIO11_RPORT PINB
|
#define DIO11_RPORT PINB
|
||||||
|
|
@ -134,82 +132,82 @@
|
||||||
#define DIO12_RPORT PINB
|
#define DIO12_RPORT PINB
|
||||||
#define DIO12_WPORT PORTB
|
#define DIO12_WPORT PORTB
|
||||||
#define DIO12_DDR DDRB
|
#define DIO12_DDR DDRB
|
||||||
#define DIO12_PWM NULL
|
#define DIO12_PWM nullptr
|
||||||
|
|
||||||
#define DIO13_PIN PINB5
|
#define DIO13_PIN PINB5
|
||||||
#define DIO13_RPORT PINB
|
#define DIO13_RPORT PINB
|
||||||
#define DIO13_WPORT PORTB
|
#define DIO13_WPORT PORTB
|
||||||
#define DIO13_DDR DDRB
|
#define DIO13_DDR DDRB
|
||||||
#define DIO13_PWM NULL
|
#define DIO13_PWM nullptr
|
||||||
|
|
||||||
#define DIO14_PIN PINC0
|
#define DIO14_PIN PINC0
|
||||||
#define DIO14_RPORT PINC
|
#define DIO14_RPORT PINC
|
||||||
#define DIO14_WPORT PORTC
|
#define DIO14_WPORT PORTC
|
||||||
#define DIO14_DDR DDRC
|
#define DIO14_DDR DDRC
|
||||||
#define DIO14_PWM NULL
|
#define DIO14_PWM nullptr
|
||||||
|
|
||||||
#define DIO15_PIN PINC1
|
#define DIO15_PIN PINC1
|
||||||
#define DIO15_RPORT PINC
|
#define DIO15_RPORT PINC
|
||||||
#define DIO15_WPORT PORTC
|
#define DIO15_WPORT PORTC
|
||||||
#define DIO15_DDR DDRC
|
#define DIO15_DDR DDRC
|
||||||
#define DIO15_PWM NULL
|
#define DIO15_PWM nullptr
|
||||||
|
|
||||||
#define DIO16_PIN PINC2
|
#define DIO16_PIN PINC2
|
||||||
#define DIO16_RPORT PINC
|
#define DIO16_RPORT PINC
|
||||||
#define DIO16_WPORT PORTC
|
#define DIO16_WPORT PORTC
|
||||||
#define DIO16_DDR DDRC
|
#define DIO16_DDR DDRC
|
||||||
#define DIO16_PWM NULL
|
#define DIO16_PWM nullptr
|
||||||
|
|
||||||
#define DIO17_PIN PINC3
|
#define DIO17_PIN PINC3
|
||||||
#define DIO17_RPORT PINC
|
#define DIO17_RPORT PINC
|
||||||
#define DIO17_WPORT PORTC
|
#define DIO17_WPORT PORTC
|
||||||
#define DIO17_DDR DDRC
|
#define DIO17_DDR DDRC
|
||||||
#define DIO17_PWM NULL
|
#define DIO17_PWM nullptr
|
||||||
|
|
||||||
#define DIO18_PIN PINC4
|
#define DIO18_PIN PINC4
|
||||||
#define DIO18_RPORT PINC
|
#define DIO18_RPORT PINC
|
||||||
#define DIO18_WPORT PORTC
|
#define DIO18_WPORT PORTC
|
||||||
#define DIO18_DDR DDRC
|
#define DIO18_DDR DDRC
|
||||||
#define DIO18_PWM NULL
|
#define DIO18_PWM nullptr
|
||||||
|
|
||||||
#define DIO19_PIN PINC5
|
#define DIO19_PIN PINC5
|
||||||
#define DIO19_RPORT PINC
|
#define DIO19_RPORT PINC
|
||||||
#define DIO19_WPORT PORTC
|
#define DIO19_WPORT PORTC
|
||||||
#define DIO19_DDR DDRC
|
#define DIO19_DDR DDRC
|
||||||
#define DIO19_PWM NULL
|
#define DIO19_PWM nullptr
|
||||||
|
|
||||||
#define DIO20_PIN PINC6
|
#define DIO20_PIN PINC6
|
||||||
#define DIO20_RPORT PINC
|
#define DIO20_RPORT PINC
|
||||||
#define DIO20_WPORT PORTC
|
#define DIO20_WPORT PORTC
|
||||||
#define DIO20_DDR DDRC
|
#define DIO20_DDR DDRC
|
||||||
#define DIO20_PWM NULL
|
#define DIO20_PWM nullptr
|
||||||
|
|
||||||
#define DIO21_PIN PINC7
|
#define DIO21_PIN PINC7
|
||||||
#define DIO21_RPORT PINC
|
#define DIO21_RPORT PINC
|
||||||
#define DIO21_WPORT PORTC
|
#define DIO21_WPORT PORTC
|
||||||
#define DIO21_DDR DDRC
|
#define DIO21_DDR DDRC
|
||||||
#define DIO21_PWM NULL
|
#define DIO21_PWM nullptr
|
||||||
|
|
||||||
#undef PB0
|
#undef PB0
|
||||||
#define PB0_PIN PINB0
|
#define PB0_PIN PINB0
|
||||||
#define PB0_RPORT PINB
|
#define PB0_RPORT PINB
|
||||||
#define PB0_WPORT PORTB
|
#define PB0_WPORT PORTB
|
||||||
#define PB0_DDR DDRB
|
#define PB0_DDR DDRB
|
||||||
#define PB0_PWM NULL
|
#define PB0_PWM nullptr
|
||||||
|
|
||||||
#undef PB1
|
#undef PB1
|
||||||
#define PB1_PIN PINB1
|
#define PB1_PIN PINB1
|
||||||
#define PB1_RPORT PINB
|
#define PB1_RPORT PINB
|
||||||
#define PB1_WPORT PORTB
|
#define PB1_WPORT PORTB
|
||||||
#define PB1_DDR DDRB
|
#define PB1_DDR DDRB
|
||||||
#define PB1_PWM NULL
|
#define PB1_PWM nullptr
|
||||||
|
|
||||||
#undef PB2
|
#undef PB2
|
||||||
#define PB2_PIN PINB2
|
#define PB2_PIN PINB2
|
||||||
#define PB2_RPORT PINB
|
#define PB2_RPORT PINB
|
||||||
#define PB2_WPORT PORTB
|
#define PB2_WPORT PORTB
|
||||||
#define PB2_DDR DDRB
|
#define PB2_DDR DDRB
|
||||||
#define PB2_PWM NULL
|
#define PB2_PWM nullptr
|
||||||
|
|
||||||
#undef PB3
|
#undef PB3
|
||||||
#define PB3_PIN PINB3
|
#define PB3_PIN PINB3
|
||||||
|
|
@ -223,105 +221,105 @@
|
||||||
#define PB4_RPORT PINB
|
#define PB4_RPORT PINB
|
||||||
#define PB4_WPORT PORTB
|
#define PB4_WPORT PORTB
|
||||||
#define PB4_DDR DDRB
|
#define PB4_DDR DDRB
|
||||||
#define PB4_PWM NULL
|
#define PB4_PWM nullptr
|
||||||
|
|
||||||
#undef PB5
|
#undef PB5
|
||||||
#define PB5_PIN PINB5
|
#define PB5_PIN PINB5
|
||||||
#define PB5_RPORT PINB
|
#define PB5_RPORT PINB
|
||||||
#define PB5_WPORT PORTB
|
#define PB5_WPORT PORTB
|
||||||
#define PB5_DDR DDRB
|
#define PB5_DDR DDRB
|
||||||
#define PB5_PWM NULL
|
#define PB5_PWM nullptr
|
||||||
|
|
||||||
#undef PB6
|
#undef PB6
|
||||||
#define PB6_PIN PINB6
|
#define PB6_PIN PINB6
|
||||||
#define PB6_RPORT PINB
|
#define PB6_RPORT PINB
|
||||||
#define PB6_WPORT PORTB
|
#define PB6_WPORT PORTB
|
||||||
#define PB6_DDR DDRB
|
#define PB6_DDR DDRB
|
||||||
#define PB6_PWM NULL
|
#define PB6_PWM nullptr
|
||||||
|
|
||||||
#undef PB7
|
#undef PB7
|
||||||
#define PB7_PIN PINB7
|
#define PB7_PIN PINB7
|
||||||
#define PB7_RPORT PINB
|
#define PB7_RPORT PINB
|
||||||
#define PB7_WPORT PORTB
|
#define PB7_WPORT PORTB
|
||||||
#define PB7_DDR DDRB
|
#define PB7_DDR DDRB
|
||||||
#define PB7_PWM NULL
|
#define PB7_PWM nullptr
|
||||||
|
|
||||||
#undef PC0
|
#undef PC0
|
||||||
#define PC0_PIN PINC0
|
#define PC0_PIN PINC0
|
||||||
#define PC0_RPORT PINC
|
#define PC0_RPORT PINC
|
||||||
#define PC0_WPORT PORTC
|
#define PC0_WPORT PORTC
|
||||||
#define PC0_DDR DDRC
|
#define PC0_DDR DDRC
|
||||||
#define PC0_PWM NULL
|
#define PC0_PWM nullptr
|
||||||
|
|
||||||
#undef PC1
|
#undef PC1
|
||||||
#define PC1_PIN PINC1
|
#define PC1_PIN PINC1
|
||||||
#define PC1_RPORT PINC
|
#define PC1_RPORT PINC
|
||||||
#define PC1_WPORT PORTC
|
#define PC1_WPORT PORTC
|
||||||
#define PC1_DDR DDRC
|
#define PC1_DDR DDRC
|
||||||
#define PC1_PWM NULL
|
#define PC1_PWM nullptr
|
||||||
|
|
||||||
#undef PC2
|
#undef PC2
|
||||||
#define PC2_PIN PINC2
|
#define PC2_PIN PINC2
|
||||||
#define PC2_RPORT PINC
|
#define PC2_RPORT PINC
|
||||||
#define PC2_WPORT PORTC
|
#define PC2_WPORT PORTC
|
||||||
#define PC2_DDR DDRC
|
#define PC2_DDR DDRC
|
||||||
#define PC2_PWM NULL
|
#define PC2_PWM nullptr
|
||||||
|
|
||||||
#undef PC3
|
#undef PC3
|
||||||
#define PC3_PIN PINC3
|
#define PC3_PIN PINC3
|
||||||
#define PC3_RPORT PINC
|
#define PC3_RPORT PINC
|
||||||
#define PC3_WPORT PORTC
|
#define PC3_WPORT PORTC
|
||||||
#define PC3_DDR DDRC
|
#define PC3_DDR DDRC
|
||||||
#define PC3_PWM NULL
|
#define PC3_PWM nullptr
|
||||||
|
|
||||||
#undef PC4
|
#undef PC4
|
||||||
#define PC4_PIN PINC4
|
#define PC4_PIN PINC4
|
||||||
#define PC4_RPORT PINC
|
#define PC4_RPORT PINC
|
||||||
#define PC4_WPORT PORTC
|
#define PC4_WPORT PORTC
|
||||||
#define PC4_DDR DDRC
|
#define PC4_DDR DDRC
|
||||||
#define PC4_PWM NULL
|
#define PC4_PWM nullptr
|
||||||
|
|
||||||
#undef PC5
|
#undef PC5
|
||||||
#define PC5_PIN PINC5
|
#define PC5_PIN PINC5
|
||||||
#define PC5_RPORT PINC
|
#define PC5_RPORT PINC
|
||||||
#define PC5_WPORT PORTC
|
#define PC5_WPORT PORTC
|
||||||
#define PC5_DDR DDRC
|
#define PC5_DDR DDRC
|
||||||
#define PC5_PWM NULL
|
#define PC5_PWM nullptr
|
||||||
|
|
||||||
#undef PC6
|
#undef PC6
|
||||||
#define PC6_PIN PINC6
|
#define PC6_PIN PINC6
|
||||||
#define PC6_RPORT PINC
|
#define PC6_RPORT PINC
|
||||||
#define PC6_WPORT PORTC
|
#define PC6_WPORT PORTC
|
||||||
#define PC6_DDR DDRC
|
#define PC6_DDR DDRC
|
||||||
#define PC6_PWM NULL
|
#define PC6_PWM nullptr
|
||||||
|
|
||||||
#undef PC7
|
#undef PC7
|
||||||
#define PC7_PIN PINC7
|
#define PC7_PIN PINC7
|
||||||
#define PC7_RPORT PINC
|
#define PC7_RPORT PINC
|
||||||
#define PC7_WPORT PORTC
|
#define PC7_WPORT PORTC
|
||||||
#define PC7_DDR DDRC
|
#define PC7_DDR DDRC
|
||||||
#define PC7_PWM NULL
|
#define PC7_PWM nullptr
|
||||||
|
|
||||||
#undef PD0
|
#undef PD0
|
||||||
#define PD0_PIN PIND0
|
#define PD0_PIN PIND0
|
||||||
#define PD0_RPORT PIND
|
#define PD0_RPORT PIND
|
||||||
#define PD0_WPORT PORTD
|
#define PD0_WPORT PORTD
|
||||||
#define PD0_DDR DDRD
|
#define PD0_DDR DDRD
|
||||||
#define PD0_PWM NULL
|
#define PD0_PWM nullptr
|
||||||
|
|
||||||
#undef PD1
|
#undef PD1
|
||||||
#define PD1_PIN PIND1
|
#define PD1_PIN PIND1
|
||||||
#define PD1_RPORT PIND
|
#define PD1_RPORT PIND
|
||||||
#define PD1_WPORT PORTD
|
#define PD1_WPORT PORTD
|
||||||
#define PD1_DDR DDRD
|
#define PD1_DDR DDRD
|
||||||
#define PD1_PWM NULL
|
#define PD1_PWM nullptr
|
||||||
|
|
||||||
#undef PD2
|
#undef PD2
|
||||||
#define PD2_PIN PIND2
|
#define PD2_PIN PIND2
|
||||||
#define PD2_RPORT PIND
|
#define PD2_RPORT PIND
|
||||||
#define PD2_WPORT PORTD
|
#define PD2_WPORT PORTD
|
||||||
#define PD2_DDR DDRD
|
#define PD2_DDR DDRD
|
||||||
#define PD2_PWM NULL
|
#define PD2_PWM nullptr
|
||||||
|
|
||||||
#undef PD3
|
#undef PD3
|
||||||
#define PD3_PIN PIND3
|
#define PD3_PIN PIND3
|
||||||
|
|
@ -335,7 +333,7 @@
|
||||||
#define PD4_RPORT PIND
|
#define PD4_RPORT PIND
|
||||||
#define PD4_WPORT PORTD
|
#define PD4_WPORT PORTD
|
||||||
#define PD4_DDR DDRD
|
#define PD4_DDR DDRD
|
||||||
#define PD4_PWM NULL
|
#define PD4_PWM nullptr
|
||||||
|
|
||||||
#undef PD5
|
#undef PD5
|
||||||
#define PD5_PIN PIND5
|
#define PD5_PIN PIND5
|
||||||
|
|
@ -356,6 +354,4 @@
|
||||||
#define PD7_RPORT PIND
|
#define PD7_RPORT PIND
|
||||||
#define PD7_WPORT PORTD
|
#define PD7_WPORT PORTD
|
||||||
#define PD7_DDR DDRD
|
#define PD7_DDR DDRD
|
||||||
#define PD7_PWM NULL
|
#define PD7_PWM nullptr
|
||||||
|
|
||||||
#endif // _FASTIO_168_H_
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
/**
|
/**
|
||||||
* Marlin 3D Printer Firmware
|
* Marlin 3D Printer Firmware
|
||||||
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
*
|
*
|
||||||
* Based on Sprinter and grbl.
|
* Based on Sprinter and grbl.
|
||||||
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -16,9 +16,10 @@
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pin mapping for the 644, 644p, 644pa, and 1284p
|
* Pin mapping for the 644, 644p, 644pa, and 1284p
|
||||||
|
|
@ -53,10 +54,7 @@
|
||||||
* +--------+
|
* +--------+
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _FASTIO_644_H_
|
#include "../fastio.h"
|
||||||
#define _FASTIO_644_H_
|
|
||||||
|
|
||||||
#include "fastio_AVR.h"
|
|
||||||
|
|
||||||
#define DEBUG_LED DIO0
|
#define DEBUG_LED DIO0
|
||||||
|
|
||||||
|
|
@ -93,464 +91,462 @@
|
||||||
#define DIO0_RPORT PINB
|
#define DIO0_RPORT PINB
|
||||||
#define DIO0_WPORT PORTB
|
#define DIO0_WPORT PORTB
|
||||||
#define DIO0_DDR DDRB
|
#define DIO0_DDR DDRB
|
||||||
#define DIO0_PWM NULL
|
#define DIO0_PWM nullptr
|
||||||
|
|
||||||
#define DIO1_PIN PINB1
|
#define DIO1_PIN PINB1
|
||||||
#define DIO1_RPORT PINB
|
#define DIO1_RPORT PINB
|
||||||
#define DIO1_WPORT PORTB
|
#define DIO1_WPORT PORTB
|
||||||
#define DIO1_DDR DDRB
|
#define DIO1_DDR DDRB
|
||||||
#define DIO1_PWM NULL
|
#define DIO1_PWM nullptr
|
||||||
|
|
||||||
#define DIO2_PIN PINB2
|
#define DIO2_PIN PINB2
|
||||||
#define DIO2_RPORT PINB
|
#define DIO2_RPORT PINB
|
||||||
#define DIO2_WPORT PORTB
|
#define DIO2_WPORT PORTB
|
||||||
#define DIO2_DDR DDRB
|
#define DIO2_DDR DDRB
|
||||||
#define DIO2_PWM NULL
|
#define DIO2_PWM nullptr
|
||||||
|
|
||||||
#define DIO3_PIN PINB3
|
#define DIO3_PIN PINB3
|
||||||
#define DIO3_RPORT PINB
|
#define DIO3_RPORT PINB
|
||||||
#define DIO3_WPORT PORTB
|
#define DIO3_WPORT PORTB
|
||||||
#define DIO3_DDR DDRB
|
#define DIO3_DDR DDRB
|
||||||
#define DIO3_PWM OCR0A
|
#define DIO3_PWM &OCR0A
|
||||||
|
|
||||||
#define DIO4_PIN PINB4
|
#define DIO4_PIN PINB4
|
||||||
#define DIO4_RPORT PINB
|
#define DIO4_RPORT PINB
|
||||||
#define DIO4_WPORT PORTB
|
#define DIO4_WPORT PORTB
|
||||||
#define DIO4_DDR DDRB
|
#define DIO4_DDR DDRB
|
||||||
#define DIO4_PWM OCR0B
|
#define DIO4_PWM &OCR0B
|
||||||
|
|
||||||
#define DIO5_PIN PINB5
|
#define DIO5_PIN PINB5
|
||||||
#define DIO5_RPORT PINB
|
#define DIO5_RPORT PINB
|
||||||
#define DIO5_WPORT PORTB
|
#define DIO5_WPORT PORTB
|
||||||
#define DIO5_DDR DDRB
|
#define DIO5_DDR DDRB
|
||||||
#define DIO5_PWM NULL
|
#define DIO5_PWM nullptr
|
||||||
|
|
||||||
#define DIO6_PIN PINB6
|
#define DIO6_PIN PINB6
|
||||||
#define DIO6_RPORT PINB
|
#define DIO6_RPORT PINB
|
||||||
#define DIO6_WPORT PORTB
|
#define DIO6_WPORT PORTB
|
||||||
#define DIO6_DDR DDRB
|
#define DIO6_DDR DDRB
|
||||||
#define DIO6_PWM NULL
|
#define DIO6_PWM nullptr
|
||||||
|
|
||||||
#define DIO7_PIN PINB7
|
#define DIO7_PIN PINB7
|
||||||
#define DIO7_RPORT PINB
|
#define DIO7_RPORT PINB
|
||||||
#define DIO7_WPORT PORTB
|
#define DIO7_WPORT PORTB
|
||||||
#define DIO7_DDR DDRB
|
#define DIO7_DDR DDRB
|
||||||
#define DIO7_PWM NULL
|
#define DIO7_PWM nullptr
|
||||||
|
|
||||||
#define DIO8_PIN PIND0
|
#define DIO8_PIN PIND0
|
||||||
#define DIO8_RPORT PIND
|
#define DIO8_RPORT PIND
|
||||||
#define DIO8_WPORT PORTD
|
#define DIO8_WPORT PORTD
|
||||||
#define DIO8_DDR DDRD
|
#define DIO8_DDR DDRD
|
||||||
#define DIO8_PWM NULL
|
#define DIO8_PWM nullptr
|
||||||
|
|
||||||
#define DIO9_PIN PIND1
|
#define DIO9_PIN PIND1
|
||||||
#define DIO9_RPORT PIND
|
#define DIO9_RPORT PIND
|
||||||
#define DIO9_WPORT PORTD
|
#define DIO9_WPORT PORTD
|
||||||
#define DIO9_DDR DDRD
|
#define DIO9_DDR DDRD
|
||||||
#define DIO9_PWM NULL
|
#define DIO9_PWM nullptr
|
||||||
|
|
||||||
#define DIO10_PIN PIND2
|
#define DIO10_PIN PIND2
|
||||||
#define DIO10_RPORT PIND
|
#define DIO10_RPORT PIND
|
||||||
#define DIO10_WPORT PORTD
|
#define DIO10_WPORT PORTD
|
||||||
#define DIO10_DDR DDRD
|
#define DIO10_DDR DDRD
|
||||||
#define DIO10_PWM NULL
|
#define DIO10_PWM nullptr
|
||||||
|
|
||||||
#define DIO11_PIN PIND3
|
#define DIO11_PIN PIND3
|
||||||
#define DIO11_RPORT PIND
|
#define DIO11_RPORT PIND
|
||||||
#define DIO11_WPORT PORTD
|
#define DIO11_WPORT PORTD
|
||||||
#define DIO11_DDR DDRD
|
#define DIO11_DDR DDRD
|
||||||
#define DIO11_PWM NULL
|
#define DIO11_PWM nullptr
|
||||||
|
|
||||||
#define DIO12_PIN PIND4
|
#define DIO12_PIN PIND4
|
||||||
#define DIO12_RPORT PIND
|
#define DIO12_RPORT PIND
|
||||||
#define DIO12_WPORT PORTD
|
#define DIO12_WPORT PORTD
|
||||||
#define DIO12_DDR DDRD
|
#define DIO12_DDR DDRD
|
||||||
#define DIO12_PWM OCR1B
|
#define DIO12_PWM &OCR1B
|
||||||
|
|
||||||
#define DIO13_PIN PIND5
|
#define DIO13_PIN PIND5
|
||||||
#define DIO13_RPORT PIND
|
#define DIO13_RPORT PIND
|
||||||
#define DIO13_WPORT PORTD
|
#define DIO13_WPORT PORTD
|
||||||
#define DIO13_DDR DDRD
|
#define DIO13_DDR DDRD
|
||||||
#define DIO13_PWM OCR1A
|
#define DIO13_PWM &OCR1A
|
||||||
|
|
||||||
#define DIO14_PIN PIND6
|
#define DIO14_PIN PIND6
|
||||||
#define DIO14_RPORT PIND
|
#define DIO14_RPORT PIND
|
||||||
#define DIO14_WPORT PORTD
|
#define DIO14_WPORT PORTD
|
||||||
#define DIO14_DDR DDRD
|
#define DIO14_DDR DDRD
|
||||||
#define DIO14_PWM OCR2B
|
#define DIO14_PWM &OCR2B
|
||||||
|
|
||||||
#define DIO15_PIN PIND7
|
#define DIO15_PIN PIND7
|
||||||
#define DIO15_RPORT PIND
|
#define DIO15_RPORT PIND
|
||||||
#define DIO15_WPORT PORTD
|
#define DIO15_WPORT PORTD
|
||||||
#define DIO15_DDR DDRD
|
#define DIO15_DDR DDRD
|
||||||
#define DIO15_PWM OCR2A
|
#define DIO15_PWM &OCR2A
|
||||||
|
|
||||||
#define DIO16_PIN PINC0
|
#define DIO16_PIN PINC0
|
||||||
#define DIO16_RPORT PINC
|
#define DIO16_RPORT PINC
|
||||||
#define DIO16_WPORT PORTC
|
#define DIO16_WPORT PORTC
|
||||||
#define DIO16_DDR DDRC
|
#define DIO16_DDR DDRC
|
||||||
#define DIO16_PWM NULL
|
#define DIO16_PWM nullptr
|
||||||
|
|
||||||
#define DIO17_PIN PINC1
|
#define DIO17_PIN PINC1
|
||||||
#define DIO17_RPORT PINC
|
#define DIO17_RPORT PINC
|
||||||
#define DIO17_WPORT PORTC
|
#define DIO17_WPORT PORTC
|
||||||
#define DIO17_DDR DDRC
|
#define DIO17_DDR DDRC
|
||||||
#define DIO17_PWM NULL
|
#define DIO17_PWM nullptr
|
||||||
|
|
||||||
#define DIO18_PIN PINC2
|
#define DIO18_PIN PINC2
|
||||||
#define DIO18_RPORT PINC
|
#define DIO18_RPORT PINC
|
||||||
#define DIO18_WPORT PORTC
|
#define DIO18_WPORT PORTC
|
||||||
#define DIO18_DDR DDRC
|
#define DIO18_DDR DDRC
|
||||||
#define DIO18_PWM NULL
|
#define DIO18_PWM nullptr
|
||||||
|
|
||||||
#define DIO19_PIN PINC3
|
#define DIO19_PIN PINC3
|
||||||
#define DIO19_RPORT PINC
|
#define DIO19_RPORT PINC
|
||||||
#define DIO19_WPORT PORTC
|
#define DIO19_WPORT PORTC
|
||||||
#define DIO19_DDR DDRC
|
#define DIO19_DDR DDRC
|
||||||
#define DIO19_PWM NULL
|
#define DIO19_PWM nullptr
|
||||||
|
|
||||||
#define DIO20_PIN PINC4
|
#define DIO20_PIN PINC4
|
||||||
#define DIO20_RPORT PINC
|
#define DIO20_RPORT PINC
|
||||||
#define DIO20_WPORT PORTC
|
#define DIO20_WPORT PORTC
|
||||||
#define DIO20_DDR DDRC
|
#define DIO20_DDR DDRC
|
||||||
#define DIO20_PWM NULL
|
#define DIO20_PWM nullptr
|
||||||
|
|
||||||
#define DIO21_PIN PINC5
|
#define DIO21_PIN PINC5
|
||||||
#define DIO21_RPORT PINC
|
#define DIO21_RPORT PINC
|
||||||
#define DIO21_WPORT PORTC
|
#define DIO21_WPORT PORTC
|
||||||
#define DIO21_DDR DDRC
|
#define DIO21_DDR DDRC
|
||||||
#define DIO21_PWM NULL
|
#define DIO21_PWM nullptr
|
||||||
|
|
||||||
#define DIO22_PIN PINC6
|
#define DIO22_PIN PINC6
|
||||||
#define DIO22_RPORT PINC
|
#define DIO22_RPORT PINC
|
||||||
#define DIO22_WPORT PORTC
|
#define DIO22_WPORT PORTC
|
||||||
#define DIO22_DDR DDRC
|
#define DIO22_DDR DDRC
|
||||||
#define DIO22_PWM NULL
|
#define DIO22_PWM nullptr
|
||||||
|
|
||||||
#define DIO23_PIN PINC7
|
#define DIO23_PIN PINC7
|
||||||
#define DIO23_RPORT PINC
|
#define DIO23_RPORT PINC
|
||||||
#define DIO23_WPORT PORTC
|
#define DIO23_WPORT PORTC
|
||||||
#define DIO23_DDR DDRC
|
#define DIO23_DDR DDRC
|
||||||
#define DIO23_PWM NULL
|
#define DIO23_PWM nullptr
|
||||||
|
|
||||||
#define DIO24_PIN PINA7
|
#define DIO24_PIN PINA7
|
||||||
#define DIO24_RPORT PINA
|
#define DIO24_RPORT PINA
|
||||||
#define DIO24_WPORT PORTA
|
#define DIO24_WPORT PORTA
|
||||||
#define DIO24_DDR DDRA
|
#define DIO24_DDR DDRA
|
||||||
#define DIO24_PWM NULL
|
#define DIO24_PWM nullptr
|
||||||
|
|
||||||
#define DIO25_PIN PINA6
|
#define DIO25_PIN PINA6
|
||||||
#define DIO25_RPORT PINA
|
#define DIO25_RPORT PINA
|
||||||
#define DIO25_WPORT PORTA
|
#define DIO25_WPORT PORTA
|
||||||
#define DIO25_DDR DDRA
|
#define DIO25_DDR DDRA
|
||||||
#define DIO25_PWM NULL
|
#define DIO25_PWM nullptr
|
||||||
|
|
||||||
#define DIO26_PIN PINA5
|
#define DIO26_PIN PINA5
|
||||||
#define DIO26_RPORT PINA
|
#define DIO26_RPORT PINA
|
||||||
#define DIO26_WPORT PORTA
|
#define DIO26_WPORT PORTA
|
||||||
#define DIO26_DDR DDRA
|
#define DIO26_DDR DDRA
|
||||||
#define DIO26_PWM NULL
|
#define DIO26_PWM nullptr
|
||||||
|
|
||||||
#define DIO27_PIN PINA4
|
#define DIO27_PIN PINA4
|
||||||
#define DIO27_RPORT PINA
|
#define DIO27_RPORT PINA
|
||||||
#define DIO27_WPORT PORTA
|
#define DIO27_WPORT PORTA
|
||||||
#define DIO27_DDR DDRA
|
#define DIO27_DDR DDRA
|
||||||
#define DIO27_PWM NULL
|
#define DIO27_PWM nullptr
|
||||||
|
|
||||||
#define DIO28_PIN PINA3
|
#define DIO28_PIN PINA3
|
||||||
#define DIO28_RPORT PINA
|
#define DIO28_RPORT PINA
|
||||||
#define DIO28_WPORT PORTA
|
#define DIO28_WPORT PORTA
|
||||||
#define DIO28_DDR DDRA
|
#define DIO28_DDR DDRA
|
||||||
#define DIO28_PWM NULL
|
#define DIO28_PWM nullptr
|
||||||
|
|
||||||
#define DIO29_PIN PINA2
|
#define DIO29_PIN PINA2
|
||||||
#define DIO29_RPORT PINA
|
#define DIO29_RPORT PINA
|
||||||
#define DIO29_WPORT PORTA
|
#define DIO29_WPORT PORTA
|
||||||
#define DIO29_DDR DDRA
|
#define DIO29_DDR DDRA
|
||||||
#define DIO29_PWM NULL
|
#define DIO29_PWM nullptr
|
||||||
|
|
||||||
#define DIO30_PIN PINA1
|
#define DIO30_PIN PINA1
|
||||||
#define DIO30_RPORT PINA
|
#define DIO30_RPORT PINA
|
||||||
#define DIO30_WPORT PORTA
|
#define DIO30_WPORT PORTA
|
||||||
#define DIO30_DDR DDRA
|
#define DIO30_DDR DDRA
|
||||||
#define DIO30_PWM NULL
|
#define DIO30_PWM nullptr
|
||||||
|
|
||||||
#define DIO31_PIN PINA0
|
#define DIO31_PIN PINA0
|
||||||
#define DIO31_RPORT PINA
|
#define DIO31_RPORT PINA
|
||||||
#define DIO31_WPORT PORTA
|
#define DIO31_WPORT PORTA
|
||||||
#define DIO31_DDR DDRA
|
#define DIO31_DDR DDRA
|
||||||
#define DIO31_PWM NULL
|
#define DIO31_PWM nullptr
|
||||||
|
|
||||||
#define AIO0_PIN PINA0
|
#define AIO0_PIN PINA0
|
||||||
#define AIO0_RPORT PINA
|
#define AIO0_RPORT PINA
|
||||||
#define AIO0_WPORT PORTA
|
#define AIO0_WPORT PORTA
|
||||||
#define AIO0_DDR DDRA
|
#define AIO0_DDR DDRA
|
||||||
#define AIO0_PWM NULL
|
#define AIO0_PWM nullptr
|
||||||
|
|
||||||
#define AIO1_PIN PINA1
|
#define AIO1_PIN PINA1
|
||||||
#define AIO1_RPORT PINA
|
#define AIO1_RPORT PINA
|
||||||
#define AIO1_WPORT PORTA
|
#define AIO1_WPORT PORTA
|
||||||
#define AIO1_DDR DDRA
|
#define AIO1_DDR DDRA
|
||||||
#define AIO1_PWM NULL
|
#define AIO1_PWM nullptr
|
||||||
|
|
||||||
#define AIO2_PIN PINA2
|
#define AIO2_PIN PINA2
|
||||||
#define AIO2_RPORT PINA
|
#define AIO2_RPORT PINA
|
||||||
#define AIO2_WPORT PORTA
|
#define AIO2_WPORT PORTA
|
||||||
#define AIO2_DDR DDRA
|
#define AIO2_DDR DDRA
|
||||||
#define AIO2_PWM NULL
|
#define AIO2_PWM nullptr
|
||||||
|
|
||||||
#define AIO3_PIN PINA3
|
#define AIO3_PIN PINA3
|
||||||
#define AIO3_RPORT PINA
|
#define AIO3_RPORT PINA
|
||||||
#define AIO3_WPORT PORTA
|
#define AIO3_WPORT PORTA
|
||||||
#define AIO3_DDR DDRA
|
#define AIO3_DDR DDRA
|
||||||
#define AIO3_PWM NULL
|
#define AIO3_PWM nullptr
|
||||||
|
|
||||||
#define AIO4_PIN PINA4
|
#define AIO4_PIN PINA4
|
||||||
#define AIO4_RPORT PINA
|
#define AIO4_RPORT PINA
|
||||||
#define AIO4_WPORT PORTA
|
#define AIO4_WPORT PORTA
|
||||||
#define AIO4_DDR DDRA
|
#define AIO4_DDR DDRA
|
||||||
#define AIO4_PWM NULL
|
#define AIO4_PWM nullptr
|
||||||
|
|
||||||
#define AIO5_PIN PINA5
|
#define AIO5_PIN PINA5
|
||||||
#define AIO5_RPORT PINA
|
#define AIO5_RPORT PINA
|
||||||
#define AIO5_WPORT PORTA
|
#define AIO5_WPORT PORTA
|
||||||
#define AIO5_DDR DDRA
|
#define AIO5_DDR DDRA
|
||||||
#define AIO5_PWM NULL
|
#define AIO5_PWM nullptr
|
||||||
|
|
||||||
#define AIO6_PIN PINA6
|
#define AIO6_PIN PINA6
|
||||||
#define AIO6_RPORT PINA
|
#define AIO6_RPORT PINA
|
||||||
#define AIO6_WPORT PORTA
|
#define AIO6_WPORT PORTA
|
||||||
#define AIO6_DDR DDRA
|
#define AIO6_DDR DDRA
|
||||||
#define AIO6_PWM NULL
|
#define AIO6_PWM nullptr
|
||||||
|
|
||||||
#define AIO7_PIN PINA7
|
#define AIO7_PIN PINA7
|
||||||
#define AIO7_RPORT PINA
|
#define AIO7_RPORT PINA
|
||||||
#define AIO7_WPORT PORTA
|
#define AIO7_WPORT PORTA
|
||||||
#define AIO7_DDR DDRA
|
#define AIO7_DDR DDRA
|
||||||
#define AIO7_PWM NULL
|
#define AIO7_PWM nullptr
|
||||||
|
|
||||||
#undef PA0
|
#undef PA0
|
||||||
#define PA0_PIN PINA0
|
#define PA0_PIN PINA0
|
||||||
#define PA0_RPORT PINA
|
#define PA0_RPORT PINA
|
||||||
#define PA0_WPORT PORTA
|
#define PA0_WPORT PORTA
|
||||||
#define PA0_DDR DDRA
|
#define PA0_DDR DDRA
|
||||||
#define PA0_PWM NULL
|
#define PA0_PWM nullptr
|
||||||
|
|
||||||
#undef PA1
|
#undef PA1
|
||||||
#define PA1_PIN PINA1
|
#define PA1_PIN PINA1
|
||||||
#define PA1_RPORT PINA
|
#define PA1_RPORT PINA
|
||||||
#define PA1_WPORT PORTA
|
#define PA1_WPORT PORTA
|
||||||
#define PA1_DDR DDRA
|
#define PA1_DDR DDRA
|
||||||
#define PA1_PWM NULL
|
#define PA1_PWM nullptr
|
||||||
|
|
||||||
#undef PA2
|
#undef PA2
|
||||||
#define PA2_PIN PINA2
|
#define PA2_PIN PINA2
|
||||||
#define PA2_RPORT PINA
|
#define PA2_RPORT PINA
|
||||||
#define PA2_WPORT PORTA
|
#define PA2_WPORT PORTA
|
||||||
#define PA2_DDR DDRA
|
#define PA2_DDR DDRA
|
||||||
#define PA2_PWM NULL
|
#define PA2_PWM nullptr
|
||||||
|
|
||||||
#undef PA3
|
#undef PA3
|
||||||
#define PA3_PIN PINA3
|
#define PA3_PIN PINA3
|
||||||
#define PA3_RPORT PINA
|
#define PA3_RPORT PINA
|
||||||
#define PA3_WPORT PORTA
|
#define PA3_WPORT PORTA
|
||||||
#define PA3_DDR DDRA
|
#define PA3_DDR DDRA
|
||||||
#define PA3_PWM NULL
|
#define PA3_PWM nullptr
|
||||||
|
|
||||||
#undef PA4
|
#undef PA4
|
||||||
#define PA4_PIN PINA4
|
#define PA4_PIN PINA4
|
||||||
#define PA4_RPORT PINA
|
#define PA4_RPORT PINA
|
||||||
#define PA4_WPORT PORTA
|
#define PA4_WPORT PORTA
|
||||||
#define PA4_DDR DDRA
|
#define PA4_DDR DDRA
|
||||||
#define PA4_PWM NULL
|
#define PA4_PWM nullptr
|
||||||
|
|
||||||
#undef PA5
|
#undef PA5
|
||||||
#define PA5_PIN PINA5
|
#define PA5_PIN PINA5
|
||||||
#define PA5_RPORT PINA
|
#define PA5_RPORT PINA
|
||||||
#define PA5_WPORT PORTA
|
#define PA5_WPORT PORTA
|
||||||
#define PA5_DDR DDRA
|
#define PA5_DDR DDRA
|
||||||
#define PA5_PWM NULL
|
#define PA5_PWM nullptr
|
||||||
|
|
||||||
#undef PA6
|
#undef PA6
|
||||||
#define PA6_PIN PINA6
|
#define PA6_PIN PINA6
|
||||||
#define PA6_RPORT PINA
|
#define PA6_RPORT PINA
|
||||||
#define PA6_WPORT PORTA
|
#define PA6_WPORT PORTA
|
||||||
#define PA6_DDR DDRA
|
#define PA6_DDR DDRA
|
||||||
#define PA6_PWM NULL
|
#define PA6_PWM nullptr
|
||||||
|
|
||||||
#undef PA7
|
#undef PA7
|
||||||
#define PA7_PIN PINA7
|
#define PA7_PIN PINA7
|
||||||
#define PA7_RPORT PINA
|
#define PA7_RPORT PINA
|
||||||
#define PA7_WPORT PORTA
|
#define PA7_WPORT PORTA
|
||||||
#define PA7_DDR DDRA
|
#define PA7_DDR DDRA
|
||||||
#define PA7_PWM NULL
|
#define PA7_PWM nullptr
|
||||||
|
|
||||||
#undef PB0
|
#undef PB0
|
||||||
#define PB0_PIN PINB0
|
#define PB0_PIN PINB0
|
||||||
#define PB0_RPORT PINB
|
#define PB0_RPORT PINB
|
||||||
#define PB0_WPORT PORTB
|
#define PB0_WPORT PORTB
|
||||||
#define PB0_DDR DDRB
|
#define PB0_DDR DDRB
|
||||||
#define PB0_PWM NULL
|
#define PB0_PWM nullptr
|
||||||
|
|
||||||
#undef PB1
|
#undef PB1
|
||||||
#define PB1_PIN PINB1
|
#define PB1_PIN PINB1
|
||||||
#define PB1_RPORT PINB
|
#define PB1_RPORT PINB
|
||||||
#define PB1_WPORT PORTB
|
#define PB1_WPORT PORTB
|
||||||
#define PB1_DDR DDRB
|
#define PB1_DDR DDRB
|
||||||
#define PB1_PWM NULL
|
#define PB1_PWM nullptr
|
||||||
|
|
||||||
#undef PB2
|
#undef PB2
|
||||||
#define PB2_PIN PINB2
|
#define PB2_PIN PINB2
|
||||||
#define PB2_RPORT PINB
|
#define PB2_RPORT PINB
|
||||||
#define PB2_WPORT PORTB
|
#define PB2_WPORT PORTB
|
||||||
#define PB2_DDR DDRB
|
#define PB2_DDR DDRB
|
||||||
#define PB2_PWM NULL
|
#define PB2_PWM nullptr
|
||||||
|
|
||||||
#undef PB3
|
#undef PB3
|
||||||
#define PB3_PIN PINB3
|
#define PB3_PIN PINB3
|
||||||
#define PB3_RPORT PINB
|
#define PB3_RPORT PINB
|
||||||
#define PB3_WPORT PORTB
|
#define PB3_WPORT PORTB
|
||||||
#define PB3_DDR DDRB
|
#define PB3_DDR DDRB
|
||||||
#define PB3_PWM OCR0A
|
#define PB3_PWM &OCR0A
|
||||||
|
|
||||||
#undef PB4
|
#undef PB4
|
||||||
#define PB4_PIN PINB4
|
#define PB4_PIN PINB4
|
||||||
#define PB4_RPORT PINB
|
#define PB4_RPORT PINB
|
||||||
#define PB4_WPORT PORTB
|
#define PB4_WPORT PORTB
|
||||||
#define PB4_DDR DDRB
|
#define PB4_DDR DDRB
|
||||||
#define PB4_PWM OCR0B
|
#define PB4_PWM &OCR0B
|
||||||
|
|
||||||
#undef PB5
|
#undef PB5
|
||||||
#define PB5_PIN PINB5
|
#define PB5_PIN PINB5
|
||||||
#define PB5_RPORT PINB
|
#define PB5_RPORT PINB
|
||||||
#define PB5_WPORT PORTB
|
#define PB5_WPORT PORTB
|
||||||
#define PB5_DDR DDRB
|
#define PB5_DDR DDRB
|
||||||
#define PB5_PWM NULL
|
#define PB5_PWM nullptr
|
||||||
|
|
||||||
#undef PB6
|
#undef PB6
|
||||||
#define PB6_PIN PINB6
|
#define PB6_PIN PINB6
|
||||||
#define PB6_RPORT PINB
|
#define PB6_RPORT PINB
|
||||||
#define PB6_WPORT PORTB
|
#define PB6_WPORT PORTB
|
||||||
#define PB6_DDR DDRB
|
#define PB6_DDR DDRB
|
||||||
#define PB6_PWM NULL
|
#define PB6_PWM nullptr
|
||||||
|
|
||||||
#undef PB7
|
#undef PB7
|
||||||
#define PB7_PIN PINB7
|
#define PB7_PIN PINB7
|
||||||
#define PB7_RPORT PINB
|
#define PB7_RPORT PINB
|
||||||
#define PB7_WPORT PORTB
|
#define PB7_WPORT PORTB
|
||||||
#define PB7_DDR DDRB
|
#define PB7_DDR DDRB
|
||||||
#define PB7_PWM NULL
|
#define PB7_PWM nullptr
|
||||||
|
|
||||||
#undef PC0
|
#undef PC0
|
||||||
#define PC0_PIN PINC0
|
#define PC0_PIN PINC0
|
||||||
#define PC0_RPORT PINC
|
#define PC0_RPORT PINC
|
||||||
#define PC0_WPORT PORTC
|
#define PC0_WPORT PORTC
|
||||||
#define PC0_DDR DDRC
|
#define PC0_DDR DDRC
|
||||||
#define PC0_PWM NULL
|
#define PC0_PWM nullptr
|
||||||
|
|
||||||
#undef PC1
|
#undef PC1
|
||||||
#define PC1_PIN PINC1
|
#define PC1_PIN PINC1
|
||||||
#define PC1_RPORT PINC
|
#define PC1_RPORT PINC
|
||||||
#define PC1_WPORT PORTC
|
#define PC1_WPORT PORTC
|
||||||
#define PC1_DDR DDRC
|
#define PC1_DDR DDRC
|
||||||
#define PC1_PWM NULL
|
#define PC1_PWM nullptr
|
||||||
|
|
||||||
#undef PC2
|
#undef PC2
|
||||||
#define PC2_PIN PINC2
|
#define PC2_PIN PINC2
|
||||||
#define PC2_RPORT PINC
|
#define PC2_RPORT PINC
|
||||||
#define PC2_WPORT PORTC
|
#define PC2_WPORT PORTC
|
||||||
#define PC2_DDR DDRC
|
#define PC2_DDR DDRC
|
||||||
#define PC2_PWM NULL
|
#define PC2_PWM nullptr
|
||||||
|
|
||||||
#undef PC3
|
#undef PC3
|
||||||
#define PC3_PIN PINC3
|
#define PC3_PIN PINC3
|
||||||
#define PC3_RPORT PINC
|
#define PC3_RPORT PINC
|
||||||
#define PC3_WPORT PORTC
|
#define PC3_WPORT PORTC
|
||||||
#define PC3_DDR DDRC
|
#define PC3_DDR DDRC
|
||||||
#define PC3_PWM NULL
|
#define PC3_PWM nullptr
|
||||||
|
|
||||||
#undef PC4
|
#undef PC4
|
||||||
#define PC4_PIN PINC4
|
#define PC4_PIN PINC4
|
||||||
#define PC4_RPORT PINC
|
#define PC4_RPORT PINC
|
||||||
#define PC4_WPORT PORTC
|
#define PC4_WPORT PORTC
|
||||||
#define PC4_DDR DDRC
|
#define PC4_DDR DDRC
|
||||||
#define PC4_PWM NULL
|
#define PC4_PWM nullptr
|
||||||
|
|
||||||
#undef PC5
|
#undef PC5
|
||||||
#define PC5_PIN PINC5
|
#define PC5_PIN PINC5
|
||||||
#define PC5_RPORT PINC
|
#define PC5_RPORT PINC
|
||||||
#define PC5_WPORT PORTC
|
#define PC5_WPORT PORTC
|
||||||
#define PC5_DDR DDRC
|
#define PC5_DDR DDRC
|
||||||
#define PC5_PWM NULL
|
#define PC5_PWM nullptr
|
||||||
|
|
||||||
#undef PC6
|
#undef PC6
|
||||||
#define PC6_PIN PINC6
|
#define PC6_PIN PINC6
|
||||||
#define PC6_RPORT PINC
|
#define PC6_RPORT PINC
|
||||||
#define PC6_WPORT PORTC
|
#define PC6_WPORT PORTC
|
||||||
#define PC6_DDR DDRC
|
#define PC6_DDR DDRC
|
||||||
#define PC6_PWM NULL
|
#define PC6_PWM nullptr
|
||||||
|
|
||||||
#undef PC7
|
#undef PC7
|
||||||
#define PC7_PIN PINC7
|
#define PC7_PIN PINC7
|
||||||
#define PC7_RPORT PINC
|
#define PC7_RPORT PINC
|
||||||
#define PC7_WPORT PORTC
|
#define PC7_WPORT PORTC
|
||||||
#define PC7_DDR DDRC
|
#define PC7_DDR DDRC
|
||||||
#define PC7_PWM NULL
|
#define PC7_PWM nullptr
|
||||||
|
|
||||||
#undef PD0
|
#undef PD0
|
||||||
#define PD0_PIN PIND0
|
#define PD0_PIN PIND0
|
||||||
#define PD0_RPORT PIND
|
#define PD0_RPORT PIND
|
||||||
#define PD0_WPORT PORTD
|
#define PD0_WPORT PORTD
|
||||||
#define PD0_DDR DDRD
|
#define PD0_DDR DDRD
|
||||||
#define PD0_PWM NULL
|
#define PD0_PWM nullptr
|
||||||
|
|
||||||
#undef PD1
|
#undef PD1
|
||||||
#define PD1_PIN PIND1
|
#define PD1_PIN PIND1
|
||||||
#define PD1_RPORT PIND
|
#define PD1_RPORT PIND
|
||||||
#define PD1_WPORT PORTD
|
#define PD1_WPORT PORTD
|
||||||
#define PD1_DDR DDRD
|
#define PD1_DDR DDRD
|
||||||
#define PD1_PWM NULL
|
#define PD1_PWM nullptr
|
||||||
|
|
||||||
#undef PD2
|
#undef PD2
|
||||||
#define PD2_PIN PIND2
|
#define PD2_PIN PIND2
|
||||||
#define PD2_RPORT PIND
|
#define PD2_RPORT PIND
|
||||||
#define PD2_WPORT PORTD
|
#define PD2_WPORT PORTD
|
||||||
#define PD2_DDR DDRD
|
#define PD2_DDR DDRD
|
||||||
#define PD2_PWM NULL
|
#define PD2_PWM nullptr
|
||||||
|
|
||||||
#undef PD3
|
#undef PD3
|
||||||
#define PD3_PIN PIND3
|
#define PD3_PIN PIND3
|
||||||
#define PD3_RPORT PIND
|
#define PD3_RPORT PIND
|
||||||
#define PD3_WPORT PORTD
|
#define PD3_WPORT PORTD
|
||||||
#define PD3_DDR DDRD
|
#define PD3_DDR DDRD
|
||||||
#define PD3_PWM NULL
|
#define PD3_PWM nullptr
|
||||||
|
|
||||||
#undef PD4
|
#undef PD4
|
||||||
#define PD4_PIN PIND4
|
#define PD4_PIN PIND4
|
||||||
#define PD4_RPORT PIND
|
#define PD4_RPORT PIND
|
||||||
#define PD4_WPORT PORTD
|
#define PD4_WPORT PORTD
|
||||||
#define PD4_DDR DDRD
|
#define PD4_DDR DDRD
|
||||||
#define PD4_PWM NULL
|
#define PD4_PWM nullptr
|
||||||
|
|
||||||
#undef PD5
|
#undef PD5
|
||||||
#define PD5_PIN PIND5
|
#define PD5_PIN PIND5
|
||||||
#define PD5_RPORT PIND
|
#define PD5_RPORT PIND
|
||||||
#define PD5_WPORT PORTD
|
#define PD5_WPORT PORTD
|
||||||
#define PD5_DDR DDRD
|
#define PD5_DDR DDRD
|
||||||
#define PD5_PWM NULL
|
#define PD5_PWM nullptr
|
||||||
|
|
||||||
#undef PD6
|
#undef PD6
|
||||||
#define PD6_PIN PIND6
|
#define PD6_PIN PIND6
|
||||||
#define PD6_RPORT PIND
|
#define PD6_RPORT PIND
|
||||||
#define PD6_WPORT PORTD
|
#define PD6_WPORT PORTD
|
||||||
#define PD6_DDR DDRD
|
#define PD6_DDR DDRD
|
||||||
#define PD6_PWM OCR2B
|
#define PD6_PWM &OCR2B
|
||||||
|
|
||||||
#undef PD7
|
#undef PD7
|
||||||
#define PD7_PIN PIND7
|
#define PD7_PIN PIND7
|
||||||
#define PD7_RPORT PIND
|
#define PD7_RPORT PIND
|
||||||
#define PD7_WPORT PORTD
|
#define PD7_WPORT PORTD
|
||||||
#define PD7_DDR DDRD
|
#define PD7_DDR DDRD
|
||||||
#define PD7_PWM OCR2A
|
#define PD7_PWM &OCR2A
|
||||||
|
|
||||||
#endif // _FASTIO_644_H_
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
/**
|
/**
|
||||||
* Marlin 3D Printer Firmware
|
* Marlin 3D Printer Firmware
|
||||||
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
*
|
*
|
||||||
* Based on Sprinter and grbl.
|
* Based on Sprinter and grbl.
|
||||||
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -16,9 +16,10 @@
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pin mapping (Teensy) for AT90USB646, 647, 1286, and 1287
|
* Pin mapping (Teensy) for AT90USB646, 647, 1286, and 1287
|
||||||
|
|
@ -28,10 +29,7 @@
|
||||||
* The logical pins 46 and 47 are not supported by Teensyduino, but are supported below as E2 and E3
|
* The logical pins 46 and 47 are not supported by Teensyduino, but are supported below as E2 and E3
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _FASTIO_AT90USB_H_
|
#include "../fastio.h"
|
||||||
#define _FASTIO_AT90USB_H_
|
|
||||||
|
|
||||||
#include "fastio_AVR.h"
|
|
||||||
|
|
||||||
// change for your board
|
// change for your board
|
||||||
#define DEBUG_LED DIO31 /* led D5 red */
|
#define DEBUG_LED DIO31 /* led D5 red */
|
||||||
|
|
@ -47,325 +45,325 @@
|
||||||
#define DIO0_PIN PIND0
|
#define DIO0_PIN PIND0
|
||||||
#define DIO0_RPORT PIND
|
#define DIO0_RPORT PIND
|
||||||
#define DIO0_WPORT PORTD
|
#define DIO0_WPORT PORTD
|
||||||
#define DIO0_PWM NULL
|
#define DIO0_PWM 0
|
||||||
#define DIO0_DDR DDRD
|
#define DIO0_DDR DDRD
|
||||||
|
|
||||||
#define DIO1_PIN PIND1
|
#define DIO1_PIN PIND1
|
||||||
#define DIO1_RPORT PIND
|
#define DIO1_RPORT PIND
|
||||||
#define DIO1_WPORT PORTD
|
#define DIO1_WPORT PORTD
|
||||||
#define DIO1_PWM NULL
|
#define DIO1_PWM 0
|
||||||
#define DIO1_DDR DDRD
|
#define DIO1_DDR DDRD
|
||||||
|
|
||||||
#define DIO2_PIN PIND2
|
#define DIO2_PIN PIND2
|
||||||
#define DIO2_RPORT PIND
|
#define DIO2_RPORT PIND
|
||||||
#define DIO2_WPORT PORTD
|
#define DIO2_WPORT PORTD
|
||||||
#define DIO2_PWM NULL
|
#define DIO2_PWM 0
|
||||||
#define DIO2_DDR DDRD
|
#define DIO2_DDR DDRD
|
||||||
|
|
||||||
#define DIO3_PIN PIND3
|
#define DIO3_PIN PIND3
|
||||||
#define DIO3_RPORT PIND
|
#define DIO3_RPORT PIND
|
||||||
#define DIO3_WPORT PORTD
|
#define DIO3_WPORT PORTD
|
||||||
#define DIO3_PWM NULL
|
#define DIO3_PWM 0
|
||||||
#define DIO3_DDR DDRD
|
#define DIO3_DDR DDRD
|
||||||
|
|
||||||
#define DIO4_PIN PIND4
|
#define DIO4_PIN PIND4
|
||||||
#define DIO4_RPORT PIND
|
#define DIO4_RPORT PIND
|
||||||
#define DIO4_WPORT PORTD
|
#define DIO4_WPORT PORTD
|
||||||
#define DIO4_PWM NULL
|
#define DIO4_PWM 0
|
||||||
#define DIO4_DDR DDRD
|
#define DIO4_DDR DDRD
|
||||||
|
|
||||||
#define DIO5_PIN PIND5
|
#define DIO5_PIN PIND5
|
||||||
#define DIO5_RPORT PIND
|
#define DIO5_RPORT PIND
|
||||||
#define DIO5_WPORT PORTD
|
#define DIO5_WPORT PORTD
|
||||||
#define DIO5_PWM NULL
|
#define DIO5_PWM 0
|
||||||
#define DIO5_DDR DDRD
|
#define DIO5_DDR DDRD
|
||||||
|
|
||||||
#define DIO6_PIN PIND6
|
#define DIO6_PIN PIND6
|
||||||
#define DIO6_RPORT PIND
|
#define DIO6_RPORT PIND
|
||||||
#define DIO6_WPORT PORTD
|
#define DIO6_WPORT PORTD
|
||||||
#define DIO6_PWM NULL
|
#define DIO6_PWM 0
|
||||||
#define DIO6_DDR DDRD
|
#define DIO6_DDR DDRD
|
||||||
|
|
||||||
#define DIO7_PIN PIND7
|
#define DIO7_PIN PIND7
|
||||||
#define DIO7_RPORT PIND
|
#define DIO7_RPORT PIND
|
||||||
#define DIO7_WPORT PORTD
|
#define DIO7_WPORT PORTD
|
||||||
#define DIO7_PWM NULL
|
#define DIO7_PWM 0
|
||||||
#define DIO7_DDR DDRD
|
#define DIO7_DDR DDRD
|
||||||
|
|
||||||
#define DIO8_PIN PINE0
|
#define DIO8_PIN PINE0
|
||||||
#define DIO8_RPORT PINE
|
#define DIO8_RPORT PINE
|
||||||
#define DIO8_WPORT PORTE
|
#define DIO8_WPORT PORTE
|
||||||
#define DIO8_PWM NULL
|
#define DIO8_PWM 0
|
||||||
#define DIO8_DDR DDRE
|
#define DIO8_DDR DDRE
|
||||||
|
|
||||||
#define DIO9_PIN PINE1
|
#define DIO9_PIN PINE1
|
||||||
#define DIO9_RPORT PINE
|
#define DIO9_RPORT PINE
|
||||||
#define DIO9_WPORT PORTE
|
#define DIO9_WPORT PORTE
|
||||||
#define DIO9_PWM NULL
|
#define DIO9_PWM 0
|
||||||
#define DIO9_DDR DDRE
|
#define DIO9_DDR DDRE
|
||||||
|
|
||||||
#define DIO10_PIN PINC0
|
#define DIO10_PIN PINC0
|
||||||
#define DIO10_RPORT PINC
|
#define DIO10_RPORT PINC
|
||||||
#define DIO10_WPORT PORTC
|
#define DIO10_WPORT PORTC
|
||||||
#define DIO10_PWM NULL
|
#define DIO10_PWM 0
|
||||||
#define DIO10_DDR DDRC
|
#define DIO10_DDR DDRC
|
||||||
|
|
||||||
#define DIO11_PIN PINC1
|
#define DIO11_PIN PINC1
|
||||||
#define DIO11_RPORT PINC
|
#define DIO11_RPORT PINC
|
||||||
#define DIO11_WPORT PORTC
|
#define DIO11_WPORT PORTC
|
||||||
#define DIO11_PWM NULL
|
#define DIO11_PWM 0
|
||||||
#define DIO11_DDR DDRC
|
#define DIO11_DDR DDRC
|
||||||
|
|
||||||
#define DIO12_PIN PINC2
|
#define DIO12_PIN PINC2
|
||||||
#define DIO12_RPORT PINC
|
#define DIO12_RPORT PINC
|
||||||
#define DIO12_WPORT PORTC
|
#define DIO12_WPORT PORTC
|
||||||
#define DIO12_PWM NULL
|
#define DIO12_PWM 0
|
||||||
#define DIO12_DDR DDRC
|
#define DIO12_DDR DDRC
|
||||||
|
|
||||||
#define DIO13_PIN PINC3
|
#define DIO13_PIN PINC3
|
||||||
#define DIO13_RPORT PINC
|
#define DIO13_RPORT PINC
|
||||||
#define DIO13_WPORT PORTC
|
#define DIO13_WPORT PORTC
|
||||||
#define DIO13_PWM NULL
|
#define DIO13_PWM 0
|
||||||
#define DIO13_DDR DDRC
|
#define DIO13_DDR DDRC
|
||||||
|
|
||||||
#define DIO14_PIN PINC4
|
#define DIO14_PIN PINC4
|
||||||
#define DIO14_RPORT PINC
|
#define DIO14_RPORT PINC
|
||||||
#define DIO14_WPORT PORTC
|
#define DIO14_WPORT PORTC
|
||||||
#define DIO14_PWM NULL
|
#define DIO14_PWM 0 // OC3C
|
||||||
#define DIO14_DDR DDRC
|
#define DIO14_DDR DDRC
|
||||||
|
|
||||||
#define DIO15_PIN PINC5
|
#define DIO15_PIN PINC5
|
||||||
#define DIO15_RPORT PINC
|
#define DIO15_RPORT PINC
|
||||||
#define DIO15_WPORT PORTC
|
#define DIO15_WPORT PORTC
|
||||||
#define DIO15_PWM NULL
|
#define DIO15_PWM 0 // OC3B
|
||||||
#define DIO15_DDR DDRC
|
#define DIO15_DDR DDRC
|
||||||
|
|
||||||
#define DIO16_PIN PINC6
|
#define DIO16_PIN PINC6
|
||||||
#define DIO16_RPORT PINC
|
#define DIO16_RPORT PINC
|
||||||
#define DIO16_WPORT PORTC
|
#define DIO16_WPORT PORTC
|
||||||
#define DIO16_PWM NULL
|
#define DIO16_PWM 0 // OC3A
|
||||||
#define DIO16_DDR DDRC
|
#define DIO16_DDR DDRC
|
||||||
|
|
||||||
#define DIO17_PIN PINC7
|
#define DIO17_PIN PINC7
|
||||||
#define DIO17_RPORT PINC
|
#define DIO17_RPORT PINC
|
||||||
#define DIO17_WPORT PORTC
|
#define DIO17_WPORT PORTC
|
||||||
#define DIO17_PWM NULL
|
#define DIO17_PWM 0
|
||||||
#define DIO17_DDR DDRC
|
#define DIO17_DDR DDRC
|
||||||
|
|
||||||
#define DIO18_PIN PINE6
|
#define DIO18_PIN PINE6
|
||||||
#define DIO18_RPORT PINE
|
#define DIO18_RPORT PINE
|
||||||
#define DIO18_WPORT PORTE
|
#define DIO18_WPORT PORTE
|
||||||
#define DIO18_PWM NULL
|
#define DIO18_PWM 0
|
||||||
#define DIO18_DDR DDRE
|
#define DIO18_DDR DDRE
|
||||||
|
|
||||||
#define DIO19_PIN PINE7
|
#define DIO19_PIN PINE7
|
||||||
#define DIO19_RPORT PINE
|
#define DIO19_RPORT PINE
|
||||||
#define DIO19_WPORT PORTE
|
#define DIO19_WPORT PORTE
|
||||||
#define DIO19_PWM NULL
|
#define DIO19_PWM 0
|
||||||
#define DIO19_DDR DDRE
|
#define DIO19_DDR DDRE
|
||||||
|
|
||||||
#define DIO20_PIN PINB0
|
#define DIO20_PIN PINB0
|
||||||
#define DIO20_RPORT PINB
|
#define DIO20_RPORT PINB
|
||||||
#define DIO20_WPORT PORTB
|
#define DIO20_WPORT PORTB
|
||||||
#define DIO20_PWM NULL
|
#define DIO20_PWM 0
|
||||||
#define DIO20_DDR DDRB
|
#define DIO20_DDR DDRB
|
||||||
|
|
||||||
#define DIO21_PIN PINB1
|
#define DIO21_PIN PINB1
|
||||||
#define DIO21_RPORT PINB
|
#define DIO21_RPORT PINB
|
||||||
#define DIO21_WPORT PORTB
|
#define DIO21_WPORT PORTB
|
||||||
#define DIO21_PWM NULL
|
#define DIO21_PWM 0
|
||||||
#define DIO21_DDR DDRB
|
#define DIO21_DDR DDRB
|
||||||
|
|
||||||
#define DIO22_PIN PINB2
|
#define DIO22_PIN PINB2
|
||||||
#define DIO22_RPORT PINB
|
#define DIO22_RPORT PINB
|
||||||
#define DIO22_WPORT PORTB
|
#define DIO22_WPORT PORTB
|
||||||
#define DIO22_PWM NULL
|
#define DIO22_PWM 0
|
||||||
#define DIO22_DDR DDRB
|
#define DIO22_DDR DDRB
|
||||||
|
|
||||||
#define DIO23_PIN PINB3
|
#define DIO23_PIN PINB3
|
||||||
#define DIO23_RPORT PINB
|
#define DIO23_RPORT PINB
|
||||||
#define DIO23_WPORT PORTB
|
#define DIO23_WPORT PORTB
|
||||||
#define DIO23_PWM NULL
|
#define DIO23_PWM 0
|
||||||
#define DIO23_DDR DDRB
|
#define DIO23_DDR DDRB
|
||||||
|
|
||||||
#define DIO24_PIN PINB4
|
#define DIO24_PIN PINB4
|
||||||
#define DIO24_RPORT PINB
|
#define DIO24_RPORT PINB
|
||||||
#define DIO24_WPORT PORTB
|
#define DIO24_WPORT PORTB
|
||||||
#define DIO24_PWM NULL
|
#define DIO24_PWM 0 // OC2A
|
||||||
#define DIO24_DDR DDRB
|
#define DIO24_DDR DDRB
|
||||||
|
|
||||||
#define DIO25_PIN PINB5
|
#define DIO25_PIN PINB5
|
||||||
#define DIO25_RPORT PINB
|
#define DIO25_RPORT PINB
|
||||||
#define DIO25_WPORT PORTB
|
#define DIO25_WPORT PORTB
|
||||||
#define DIO25_PWM NULL
|
#define DIO25_PWM 0 // OC1A
|
||||||
#define DIO25_DDR DDRB
|
#define DIO25_DDR DDRB
|
||||||
|
|
||||||
#define DIO26_PIN PINB6
|
#define DIO26_PIN PINB6
|
||||||
#define DIO26_RPORT PINB
|
#define DIO26_RPORT PINB
|
||||||
#define DIO26_WPORT PORTB
|
#define DIO26_WPORT PORTB
|
||||||
#define DIO26_PWM NULL
|
#define DIO26_PWM 0 // OC1B
|
||||||
#define DIO26_DDR DDRB
|
#define DIO26_DDR DDRB
|
||||||
|
|
||||||
#define DIO27_PIN PINB7
|
#define DIO27_PIN PINB7
|
||||||
#define DIO27_RPORT PINB
|
#define DIO27_RPORT PINB
|
||||||
#define DIO27_WPORT PORTB
|
#define DIO27_WPORT PORTB
|
||||||
#define DIO27_PWM NULL
|
#define DIO27_PWM 0 // OC1C
|
||||||
#define DIO27_DDR DDRB
|
#define DIO27_DDR DDRB
|
||||||
|
|
||||||
#define DIO28_PIN PINA0
|
#define DIO28_PIN PINA0
|
||||||
#define DIO28_RPORT PINA
|
#define DIO28_RPORT PINA
|
||||||
#define DIO28_WPORT PORTA
|
#define DIO28_WPORT PORTA
|
||||||
#define DIO28_PWM NULL
|
#define DIO28_PWM 0
|
||||||
#define DIO28_DDR DDRA
|
#define DIO28_DDR DDRA
|
||||||
|
|
||||||
#define DIO29_PIN PINA1
|
#define DIO29_PIN PINA1
|
||||||
#define DIO29_RPORT PINA
|
#define DIO29_RPORT PINA
|
||||||
#define DIO29_WPORT PORTA
|
#define DIO29_WPORT PORTA
|
||||||
#define DIO29_PWM NULL
|
#define DIO29_PWM 0
|
||||||
#define DIO29_DDR DDRA
|
#define DIO29_DDR DDRA
|
||||||
|
|
||||||
#define DIO30_PIN PINA2
|
#define DIO30_PIN PINA2
|
||||||
#define DIO30_RPORT PINA
|
#define DIO30_RPORT PINA
|
||||||
#define DIO30_WPORT PORTA
|
#define DIO30_WPORT PORTA
|
||||||
#define DIO30_PWM NULL
|
#define DIO30_PWM 0
|
||||||
#define DIO30_DDR DDRA
|
#define DIO30_DDR DDRA
|
||||||
|
|
||||||
#define DIO31_PIN PINA3
|
#define DIO31_PIN PINA3
|
||||||
#define DIO31_RPORT PINA
|
#define DIO31_RPORT PINA
|
||||||
#define DIO31_WPORT PORTA
|
#define DIO31_WPORT PORTA
|
||||||
#define DIO31_PWM NULL
|
#define DIO31_PWM 0
|
||||||
#define DIO31_DDR DDRA
|
#define DIO31_DDR DDRA
|
||||||
|
|
||||||
#define DIO32_PIN PINA4
|
#define DIO32_PIN PINA4
|
||||||
#define DIO32_RPORT PINA
|
#define DIO32_RPORT PINA
|
||||||
#define DIO32_WPORT PORTA
|
#define DIO32_WPORT PORTA
|
||||||
#define DIO32_PWM NULL
|
#define DIO32_PWM 0
|
||||||
#define DIO32_DDR DDRA
|
#define DIO32_DDR DDRA
|
||||||
|
|
||||||
#define DIO33_PIN PINA5
|
#define DIO33_PIN PINA5
|
||||||
#define DIO33_RPORT PINA
|
#define DIO33_RPORT PINA
|
||||||
#define DIO33_WPORT PORTA
|
#define DIO33_WPORT PORTA
|
||||||
#define DIO33_PWM NULL
|
#define DIO33_PWM 0
|
||||||
#define DIO33_DDR DDRA
|
#define DIO33_DDR DDRA
|
||||||
|
|
||||||
#define DIO34_PIN PINA6
|
#define DIO34_PIN PINA6
|
||||||
#define DIO34_RPORT PINA
|
#define DIO34_RPORT PINA
|
||||||
#define DIO34_WPORT PORTA
|
#define DIO34_WPORT PORTA
|
||||||
#define DIO34_PWM NULL
|
#define DIO34_PWM 0
|
||||||
#define DIO34_DDR DDRA
|
#define DIO34_DDR DDRA
|
||||||
|
|
||||||
#define DIO35_PIN PINA7
|
#define DIO35_PIN PINA7
|
||||||
#define DIO35_RPORT PINA
|
#define DIO35_RPORT PINA
|
||||||
#define DIO35_WPORT PORTA
|
#define DIO35_WPORT PORTA
|
||||||
#define DIO35_PWM NULL
|
#define DIO35_PWM 0
|
||||||
#define DIO35_DDR DDRA
|
#define DIO35_DDR DDRA
|
||||||
|
|
||||||
#define DIO36_PIN PINE4
|
#define DIO36_PIN PINE4
|
||||||
#define DIO36_RPORT PINE
|
#define DIO36_RPORT PINE
|
||||||
#define DIO36_WPORT PORTE
|
#define DIO36_WPORT PORTE
|
||||||
#define DIO36_PWM NULL
|
#define DIO36_PWM 0
|
||||||
#define DIO36_DDR DDRE
|
#define DIO36_DDR DDRE
|
||||||
|
|
||||||
#define DIO37_PIN PINE5
|
#define DIO37_PIN PINE5
|
||||||
#define DIO37_RPORT PINE
|
#define DIO37_RPORT PINE
|
||||||
#define DIO37_WPORT PORTE
|
#define DIO37_WPORT PORTE
|
||||||
#define DIO37_PWM NULL
|
#define DIO37_PWM 0
|
||||||
#define DIO37_DDR DDRE
|
#define DIO37_DDR DDRE
|
||||||
|
|
||||||
#define DIO38_PIN PINF0
|
#define DIO38_PIN PINF0
|
||||||
#define DIO38_RPORT PINF
|
#define DIO38_RPORT PINF
|
||||||
#define DIO38_WPORT PORTF
|
#define DIO38_WPORT PORTF
|
||||||
#define DIO38_PWM NULL
|
#define DIO38_PWM 0
|
||||||
#define DIO38_DDR DDRF
|
#define DIO38_DDR DDRF
|
||||||
|
|
||||||
#define DIO39_PIN PINF1
|
#define DIO39_PIN PINF1
|
||||||
#define DIO39_RPORT PINF
|
#define DIO39_RPORT PINF
|
||||||
#define DIO39_WPORT PORTF
|
#define DIO39_WPORT PORTF
|
||||||
#define DIO39_PWM NULL
|
#define DIO39_PWM 0
|
||||||
#define DIO39_DDR DDRF
|
#define DIO39_DDR DDRF
|
||||||
|
|
||||||
#define DIO40_PIN PINF2
|
#define DIO40_PIN PINF2
|
||||||
#define DIO40_RPORT PINF
|
#define DIO40_RPORT PINF
|
||||||
#define DIO40_WPORT PORTF
|
#define DIO40_WPORT PORTF
|
||||||
#define DIO40_PWM NULL
|
#define DIO40_PWM 0
|
||||||
#define DIO40_DDR DDRF
|
#define DIO40_DDR DDRF
|
||||||
|
|
||||||
#define DIO41_PIN PINF3
|
#define DIO41_PIN PINF3
|
||||||
#define DIO41_RPORT PINF
|
#define DIO41_RPORT PINF
|
||||||
#define DIO41_WPORT PORTF
|
#define DIO41_WPORT PORTF
|
||||||
#define DIO41_PWM NULL
|
#define DIO41_PWM 0
|
||||||
#define DIO41_DDR DDRF
|
#define DIO41_DDR DDRF
|
||||||
|
|
||||||
#define DIO42_PIN PINF4
|
#define DIO42_PIN PINF4
|
||||||
#define DIO42_RPORT PINF
|
#define DIO42_RPORT PINF
|
||||||
#define DIO42_WPORT PORTF
|
#define DIO42_WPORT PORTF
|
||||||
#define DIO42_PWM NULL
|
#define DIO42_PWM 0
|
||||||
#define DIO42_DDR DDRF
|
#define DIO42_DDR DDRF
|
||||||
|
|
||||||
#define DIO43_PIN PINF5
|
#define DIO43_PIN PINF5
|
||||||
#define DIO43_RPORT PINF
|
#define DIO43_RPORT PINF
|
||||||
#define DIO43_WPORT PORTF
|
#define DIO43_WPORT PORTF
|
||||||
#define DIO43_PWM NULL
|
#define DIO43_PWM 0
|
||||||
#define DIO43_DDR DDRF
|
#define DIO43_DDR DDRF
|
||||||
|
|
||||||
#define DIO44_PIN PINF6
|
#define DIO44_PIN PINF6
|
||||||
#define DIO44_RPORT PINF
|
#define DIO44_RPORT PINF
|
||||||
#define DIO44_WPORT PORTF
|
#define DIO44_WPORT PORTF
|
||||||
#define DIO44_PWM NULL
|
#define DIO44_PWM 0
|
||||||
#define DIO44_DDR DDRF
|
#define DIO44_DDR DDRF
|
||||||
|
|
||||||
#define DIO45_PIN PINF7
|
#define DIO45_PIN PINF7
|
||||||
#define DIO45_RPORT PINF
|
#define DIO45_RPORT PINF
|
||||||
#define DIO45_WPORT PORTF
|
#define DIO45_WPORT PORTF
|
||||||
#define DIO45_PWM NULL
|
#define DIO45_PWM 0
|
||||||
#define DIO45_DDR DDRF
|
#define DIO45_DDR DDRF
|
||||||
|
|
||||||
#define AIO0_PIN PINF0
|
#define AIO0_PIN PINF0
|
||||||
#define AIO0_RPORT PINF
|
#define AIO0_RPORT PINF
|
||||||
#define AIO0_WPORT PORTF
|
#define AIO0_WPORT PORTF
|
||||||
#define AIO0_PWM NULL
|
#define AIO0_PWM 0
|
||||||
#define AIO0_DDR DDRF
|
#define AIO0_DDR DDRF
|
||||||
|
|
||||||
#define AIO1_PIN PINF1
|
#define AIO1_PIN PINF1
|
||||||
#define AIO1_RPORT PINF
|
#define AIO1_RPORT PINF
|
||||||
#define AIO1_WPORT PORTF
|
#define AIO1_WPORT PORTF
|
||||||
#define AIO1_PWM NULL
|
#define AIO1_PWM 0
|
||||||
#define AIO1_DDR DDRF
|
#define AIO1_DDR DDRF
|
||||||
|
|
||||||
#define AIO2_PIN PINF2
|
#define AIO2_PIN PINF2
|
||||||
#define AIO2_RPORT PINF
|
#define AIO2_RPORT PINF
|
||||||
#define AIO2_WPORT PORTF
|
#define AIO2_WPORT PORTF
|
||||||
#define AIO2_PWM NULL
|
#define AIO2_PWM 0
|
||||||
#define AIO2_DDR DDRF
|
#define AIO2_DDR DDRF
|
||||||
|
|
||||||
#define AIO3_PIN PINF3
|
#define AIO3_PIN PINF3
|
||||||
#define AIO3_RPORT PINF
|
#define AIO3_RPORT PINF
|
||||||
#define AIO3_WPORT PORTF
|
#define AIO3_WPORT PORTF
|
||||||
#define AIO3_PWM NULL
|
#define AIO3_PWM 0
|
||||||
#define AIO3_DDR DDRF
|
#define AIO3_DDR DDRF
|
||||||
|
|
||||||
#define AIO4_PIN PINF4
|
#define AIO4_PIN PINF4
|
||||||
#define AIO4_RPORT PINF
|
#define AIO4_RPORT PINF
|
||||||
#define AIO4_WPORT PORTF
|
#define AIO4_WPORT PORTF
|
||||||
#define AIO4_PWM NULL
|
#define AIO4_PWM 0
|
||||||
#define AIO4_DDR DDRF
|
#define AIO4_DDR DDRF
|
||||||
|
|
||||||
#define AIO5_PIN PINF5
|
#define AIO5_PIN PINF5
|
||||||
#define AIO5_RPORT PINF
|
#define AIO5_RPORT PINF
|
||||||
#define AIO5_WPORT PORTF
|
#define AIO5_WPORT PORTF
|
||||||
#define AIO5_PWM NULL
|
#define AIO5_PWM 0
|
||||||
#define AIO5_DDR DDRF
|
#define AIO5_DDR DDRF
|
||||||
|
|
||||||
#define AIO6_PIN PINF6
|
#define AIO6_PIN PINF6
|
||||||
#define AIO6_RPORT PINF
|
#define AIO6_RPORT PINF
|
||||||
#define AIO6_WPORT PORTF
|
#define AIO6_WPORT PORTF
|
||||||
#define AIO6_PWM NULL
|
#define AIO6_PWM 0
|
||||||
#define AIO6_DDR DDRF
|
#define AIO6_DDR DDRF
|
||||||
|
|
||||||
#define AIO7_PIN PINF7
|
#define AIO7_PIN PINF7
|
||||||
#define AIO7_RPORT PINF
|
#define AIO7_RPORT PINF
|
||||||
#define AIO7_WPORT PORTF
|
#define AIO7_WPORT PORTF
|
||||||
#define AIO7_PWM NULL
|
#define AIO7_PWM 0
|
||||||
#define AIO7_DDR DDRF
|
#define AIO7_DDR DDRF
|
||||||
|
|
||||||
//-- Begin not supported by Teensyduino
|
//-- Begin not supported by Teensyduino
|
||||||
|
|
@ -373,13 +371,13 @@
|
||||||
#define DIO46_PIN PINE2
|
#define DIO46_PIN PINE2
|
||||||
#define DIO46_RPORT PINE
|
#define DIO46_RPORT PINE
|
||||||
#define DIO46_WPORT PORTE
|
#define DIO46_WPORT PORTE
|
||||||
#define DIO46_PWM NULL
|
#define DIO46_PWM 0
|
||||||
#define DIO46_DDR DDRE
|
#define DIO46_DDR DDRE
|
||||||
|
|
||||||
#define DIO47_PIN PINE3
|
#define DIO47_PIN PINE3
|
||||||
#define DIO47_RPORT PINE
|
#define DIO47_RPORT PINE
|
||||||
#define DIO47_WPORT PORTE
|
#define DIO47_WPORT PORTE
|
||||||
#define DIO47_PWM NULL
|
#define DIO47_PWM 0
|
||||||
#define DIO47_DDR DDRE
|
#define DIO47_DDR DDRE
|
||||||
|
|
||||||
#define TEENSY_E2 46
|
#define TEENSY_E2 46
|
||||||
|
|
@ -391,300 +389,300 @@
|
||||||
#define PA0_PIN PINA0
|
#define PA0_PIN PINA0
|
||||||
#define PA0_RPORT PINA
|
#define PA0_RPORT PINA
|
||||||
#define PA0_WPORT PORTA
|
#define PA0_WPORT PORTA
|
||||||
#define PA0_PWM NULL
|
#define PA0_PWM 0
|
||||||
#define PA0_DDR DDRA
|
#define PA0_DDR DDRA
|
||||||
#undef PA1
|
#undef PA1
|
||||||
#define PA1_PIN PINA1
|
#define PA1_PIN PINA1
|
||||||
#define PA1_RPORT PINA
|
#define PA1_RPORT PINA
|
||||||
#define PA1_WPORT PORTA
|
#define PA1_WPORT PORTA
|
||||||
#define PA1_PWM NULL
|
#define PA1_PWM 0
|
||||||
#define PA1_DDR DDRA
|
#define PA1_DDR DDRA
|
||||||
#undef PA2
|
#undef PA2
|
||||||
#define PA2_PIN PINA2
|
#define PA2_PIN PINA2
|
||||||
#define PA2_RPORT PINA
|
#define PA2_RPORT PINA
|
||||||
#define PA2_WPORT PORTA
|
#define PA2_WPORT PORTA
|
||||||
#define PA2_PWM NULL
|
#define PA2_PWM 0
|
||||||
#define PA2_DDR DDRA
|
#define PA2_DDR DDRA
|
||||||
#undef PA3
|
#undef PA3
|
||||||
#define PA3_PIN PINA3
|
#define PA3_PIN PINA3
|
||||||
#define PA3_RPORT PINA
|
#define PA3_RPORT PINA
|
||||||
#define PA3_WPORT PORTA
|
#define PA3_WPORT PORTA
|
||||||
#define PA3_PWM NULL
|
#define PA3_PWM 0
|
||||||
#define PA3_DDR DDRA
|
#define PA3_DDR DDRA
|
||||||
#undef PA4
|
#undef PA4
|
||||||
#define PA4_PIN PINA4
|
#define PA4_PIN PINA4
|
||||||
#define PA4_RPORT PINA
|
#define PA4_RPORT PINA
|
||||||
#define PA4_WPORT PORTA
|
#define PA4_WPORT PORTA
|
||||||
#define PA4_PWM NULL
|
#define PA4_PWM 0
|
||||||
#define PA4_DDR DDRA
|
#define PA4_DDR DDRA
|
||||||
#undef PA5
|
#undef PA5
|
||||||
#define PA5_PIN PINA5
|
#define PA5_PIN PINA5
|
||||||
#define PA5_RPORT PINA
|
#define PA5_RPORT PINA
|
||||||
#define PA5_WPORT PORTA
|
#define PA5_WPORT PORTA
|
||||||
#define PA5_PWM NULL
|
#define PA5_PWM 0
|
||||||
#define PA5_DDR DDRA
|
#define PA5_DDR DDRA
|
||||||
#undef PA6
|
#undef PA6
|
||||||
#define PA6_PIN PINA6
|
#define PA6_PIN PINA6
|
||||||
#define PA6_RPORT PINA
|
#define PA6_RPORT PINA
|
||||||
#define PA6_WPORT PORTA
|
#define PA6_WPORT PORTA
|
||||||
#define PA6_PWM NULL
|
#define PA6_PWM 0
|
||||||
#define PA6_DDR DDRA
|
#define PA6_DDR DDRA
|
||||||
#undef PA7
|
#undef PA7
|
||||||
#define PA7_PIN PINA7
|
#define PA7_PIN PINA7
|
||||||
#define PA7_RPORT PINA
|
#define PA7_RPORT PINA
|
||||||
#define PA7_WPORT PORTA
|
#define PA7_WPORT PORTA
|
||||||
#define PA7_PWM NULL
|
#define PA7_PWM 0
|
||||||
#define PA7_DDR DDRA
|
#define PA7_DDR DDRA
|
||||||
|
|
||||||
#undef PB0
|
#undef PB0
|
||||||
#define PB0_PIN PINB0
|
#define PB0_PIN PINB0
|
||||||
#define PB0_RPORT PINB
|
#define PB0_RPORT PINB
|
||||||
#define PB0_WPORT PORTB
|
#define PB0_WPORT PORTB
|
||||||
#define PB0_PWM NULL
|
#define PB0_PWM 0
|
||||||
#define PB0_DDR DDRB
|
#define PB0_DDR DDRB
|
||||||
#undef PB1
|
#undef PB1
|
||||||
#define PB1_PIN PINB1
|
#define PB1_PIN PINB1
|
||||||
#define PB1_RPORT PINB
|
#define PB1_RPORT PINB
|
||||||
#define PB1_WPORT PORTB
|
#define PB1_WPORT PORTB
|
||||||
#define PB1_PWM NULL
|
#define PB1_PWM 0
|
||||||
#define PB1_DDR DDRB
|
#define PB1_DDR DDRB
|
||||||
#undef PB2
|
#undef PB2
|
||||||
#define PB2_PIN PINB2
|
#define PB2_PIN PINB2
|
||||||
#define PB2_RPORT PINB
|
#define PB2_RPORT PINB
|
||||||
#define PB2_WPORT PORTB
|
#define PB2_WPORT PORTB
|
||||||
#define PB2_PWM NULL
|
#define PB2_PWM 0
|
||||||
#define PB2_DDR DDRB
|
#define PB2_DDR DDRB
|
||||||
#undef PB3
|
#undef PB3
|
||||||
#define PB3_PIN PINB3
|
#define PB3_PIN PINB3
|
||||||
#define PB3_RPORT PINB
|
#define PB3_RPORT PINB
|
||||||
#define PB3_WPORT PORTB
|
#define PB3_WPORT PORTB
|
||||||
#define PB3_PWM NULL
|
#define PB3_PWM 0
|
||||||
#define PB3_DDR DDRB
|
#define PB3_DDR DDRB
|
||||||
#undef PB4
|
#undef PB4
|
||||||
#define PB4_PIN PINB4
|
#define PB4_PIN PINB4
|
||||||
#define PB4_RPORT PINB
|
#define PB4_RPORT PINB
|
||||||
#define PB4_WPORT PORTB
|
#define PB4_WPORT PORTB
|
||||||
#define PB4_PWM NULL
|
#define PB4_PWM 0
|
||||||
#define PB4_DDR DDRB
|
#define PB4_DDR DDRB
|
||||||
#undef PB5
|
#undef PB5
|
||||||
#define PB5_PIN PINB5
|
#define PB5_PIN PINB5
|
||||||
#define PB5_RPORT PINB
|
#define PB5_RPORT PINB
|
||||||
#define PB5_WPORT PORTB
|
#define PB5_WPORT PORTB
|
||||||
#define PB5_PWM NULL
|
#define PB5_PWM 0
|
||||||
#define PB5_DDR DDRB
|
#define PB5_DDR DDRB
|
||||||
#undef PB6
|
#undef PB6
|
||||||
#define PB6_PIN PINB6
|
#define PB6_PIN PINB6
|
||||||
#define PB6_RPORT PINB
|
#define PB6_RPORT PINB
|
||||||
#define PB6_WPORT PORTB
|
#define PB6_WPORT PORTB
|
||||||
#define PB6_PWM NULL
|
#define PB6_PWM 0
|
||||||
#define PB6_DDR DDRB
|
#define PB6_DDR DDRB
|
||||||
#undef PB7
|
#undef PB7
|
||||||
#define PB7_PIN PINB7
|
#define PB7_PIN PINB7
|
||||||
#define PB7_RPORT PINB
|
#define PB7_RPORT PINB
|
||||||
#define PB7_WPORT PORTB
|
#define PB7_WPORT PORTB
|
||||||
#define PB7_PWM NULL
|
#define PB7_PWM 0
|
||||||
#define PB7_DDR DDRB
|
#define PB7_DDR DDRB
|
||||||
|
|
||||||
#undef PC0
|
#undef PC0
|
||||||
#define PC0_PIN PINC0
|
#define PC0_PIN PINC0
|
||||||
#define PC0_RPORT PINC
|
#define PC0_RPORT PINC
|
||||||
#define PC0_WPORT PORTC
|
#define PC0_WPORT PORTC
|
||||||
#define PC0_PWM NULL
|
#define PC0_PWM 0
|
||||||
#define PC0_DDR DDRC
|
#define PC0_DDR DDRC
|
||||||
#undef PC1
|
#undef PC1
|
||||||
#define PC1_PIN PINC1
|
#define PC1_PIN PINC1
|
||||||
#define PC1_RPORT PINC
|
#define PC1_RPORT PINC
|
||||||
#define PC1_WPORT PORTC
|
#define PC1_WPORT PORTC
|
||||||
#define PC1_PWM NULL
|
#define PC1_PWM 0
|
||||||
#define PC1_DDR DDRC
|
#define PC1_DDR DDRC
|
||||||
#undef PC2
|
#undef PC2
|
||||||
#define PC2_PIN PINC2
|
#define PC2_PIN PINC2
|
||||||
#define PC2_RPORT PINC
|
#define PC2_RPORT PINC
|
||||||
#define PC2_WPORT PORTC
|
#define PC2_WPORT PORTC
|
||||||
#define PC2_PWM NULL
|
#define PC2_PWM 0
|
||||||
#define PC2_DDR DDRC
|
#define PC2_DDR DDRC
|
||||||
#undef PC3
|
#undef PC3
|
||||||
#define PC3_PIN PINC3
|
#define PC3_PIN PINC3
|
||||||
#define PC3_RPORT PINC
|
#define PC3_RPORT PINC
|
||||||
#define PC3_WPORT PORTC
|
#define PC3_WPORT PORTC
|
||||||
#define PC3_PWM NULL
|
#define PC3_PWM 0
|
||||||
#define PC3_DDR DDRC
|
#define PC3_DDR DDRC
|
||||||
#undef PC4
|
#undef PC4
|
||||||
#define PC4_PIN PINC4
|
#define PC4_PIN PINC4
|
||||||
#define PC4_RPORT PINC
|
#define PC4_RPORT PINC
|
||||||
#define PC4_WPORT PORTC
|
#define PC4_WPORT PORTC
|
||||||
#define PC4_PWM NULL
|
#define PC4_PWM 0
|
||||||
#define PC4_DDR DDRC
|
#define PC4_DDR DDRC
|
||||||
#undef PC5
|
#undef PC5
|
||||||
#define PC5_PIN PINC5
|
#define PC5_PIN PINC5
|
||||||
#define PC5_RPORT PINC
|
#define PC5_RPORT PINC
|
||||||
#define PC5_WPORT PORTC
|
#define PC5_WPORT PORTC
|
||||||
#define PC5_PWM NULL
|
#define PC5_PWM 0
|
||||||
#define PC5_DDR DDRC
|
#define PC5_DDR DDRC
|
||||||
#undef PC6
|
#undef PC6
|
||||||
#define PC6_PIN PINC6
|
#define PC6_PIN PINC6
|
||||||
#define PC6_RPORT PINC
|
#define PC6_RPORT PINC
|
||||||
#define PC6_WPORT PORTC
|
#define PC6_WPORT PORTC
|
||||||
#define PC6_PWM NULL
|
#define PC6_PWM 0
|
||||||
#define PC6_DDR DDRC
|
#define PC6_DDR DDRC
|
||||||
#undef PC7
|
#undef PC7
|
||||||
#define PC7_PIN PINC7
|
#define PC7_PIN PINC7
|
||||||
#define PC7_RPORT PINC
|
#define PC7_RPORT PINC
|
||||||
#define PC7_WPORT PORTC
|
#define PC7_WPORT PORTC
|
||||||
#define PC7_PWM NULL
|
#define PC7_PWM 0
|
||||||
#define PC7_DDR DDRC
|
#define PC7_DDR DDRC
|
||||||
|
|
||||||
#undef PD0
|
#undef PD0
|
||||||
#define PD0_PIN PIND0
|
#define PD0_PIN PIND0
|
||||||
#define PD0_RPORT PIND
|
#define PD0_RPORT PIND
|
||||||
#define PD0_WPORT PORTD
|
#define PD0_WPORT PORTD
|
||||||
#define PD0_PWM NULL
|
#define PD0_PWM 0 // OC0B
|
||||||
#define PD0_DDR DDRD
|
#define PD0_DDR DDRD
|
||||||
#undef PD1
|
#undef PD1
|
||||||
#define PD1_PIN PIND1
|
#define PD1_PIN PIND1
|
||||||
#define PD1_RPORT PIND
|
#define PD1_RPORT PIND
|
||||||
#define PD1_WPORT PORTD
|
#define PD1_WPORT PORTD
|
||||||
#define PD1_PWM NULL
|
#define PD1_PWM 0 // OC2B
|
||||||
#define PD1_DDR DDRD
|
#define PD1_DDR DDRD
|
||||||
#undef PD2
|
#undef PD2
|
||||||
#define PD2_PIN PIND2
|
#define PD2_PIN PIND2
|
||||||
#define PD2_RPORT PIND
|
#define PD2_RPORT PIND
|
||||||
#define PD2_WPORT PORTD
|
#define PD2_WPORT PORTD
|
||||||
#define PD2_PWM NULL
|
#define PD2_PWM 0
|
||||||
#define PD2_DDR DDRD
|
#define PD2_DDR DDRD
|
||||||
#undef PD3
|
#undef PD3
|
||||||
#define PD3_PIN PIND3
|
#define PD3_PIN PIND3
|
||||||
#define PD3_RPORT PIND
|
#define PD3_RPORT PIND
|
||||||
#define PD3_WPORT PORTD
|
#define PD3_WPORT PORTD
|
||||||
#define PD3_PWM NULL
|
#define PD3_PWM 0
|
||||||
#define PD3_DDR DDRD
|
#define PD3_DDR DDRD
|
||||||
#undef PD4
|
#undef PD4
|
||||||
#define PD4_PIN PIND4
|
#define PD4_PIN PIND4
|
||||||
#define PD4_RPORT PIND
|
#define PD4_RPORT PIND
|
||||||
#define PD4_WPORT PORTD
|
#define PD4_WPORT PORTD
|
||||||
#define PD4_PWM NULL
|
#define PD4_PWM 0
|
||||||
#define PD4_DDR DDRD
|
#define PD4_DDR DDRD
|
||||||
#undef PD5
|
#undef PD5
|
||||||
#define PD5_PIN PIND5
|
#define PD5_PIN PIND5
|
||||||
#define PD5_RPORT PIND
|
#define PD5_RPORT PIND
|
||||||
#define PD5_WPORT PORTD
|
#define PD5_WPORT PORTD
|
||||||
#define PD5_PWM NULL
|
#define PD5_PWM 0
|
||||||
#define PD5_DDR DDRD
|
#define PD5_DDR DDRD
|
||||||
#undef PD6
|
#undef PD6
|
||||||
#define PD6_PIN PIND6
|
#define PD6_PIN PIND6
|
||||||
#define PD6_RPORT PIND
|
#define PD6_RPORT PIND
|
||||||
#define PD6_WPORT PORTD
|
#define PD6_WPORT PORTD
|
||||||
#define PD6_PWM NULL
|
#define PD6_PWM 0
|
||||||
#define PD6_DDR DDRD
|
#define PD6_DDR DDRD
|
||||||
#undef PD7
|
#undef PD7
|
||||||
#define PD7_PIN PIND7
|
#define PD7_PIN PIND7
|
||||||
#define PD7_RPORT PIND
|
#define PD7_RPORT PIND
|
||||||
#define PD7_WPORT PORTD
|
#define PD7_WPORT PORTD
|
||||||
#define PD7_PWM NULL
|
#define PD7_PWM 0
|
||||||
#define PD7_DDR DDRD
|
#define PD7_DDR DDRD
|
||||||
|
|
||||||
#undef PE0
|
#undef PE0
|
||||||
#define PE0_PIN PINE0
|
#define PE0_PIN PINE0
|
||||||
#define PE0_RPORT PINE
|
#define PE0_RPORT PINE
|
||||||
#define PE0_WPORT PORTE
|
#define PE0_WPORT PORTE
|
||||||
#define PE0_PWM NULL
|
#define PE0_PWM 0
|
||||||
#define PE0_DDR DDRE
|
#define PE0_DDR DDRE
|
||||||
#undef PE1
|
#undef PE1
|
||||||
#define PE1_PIN PINE1
|
#define PE1_PIN PINE1
|
||||||
#define PE1_RPORT PINE
|
#define PE1_RPORT PINE
|
||||||
#define PE1_WPORT PORTE
|
#define PE1_WPORT PORTE
|
||||||
#define PE1_PWM NULL
|
#define PE1_PWM 0
|
||||||
#define PE1_DDR DDRE
|
#define PE1_DDR DDRE
|
||||||
#undef PE2
|
#undef PE2
|
||||||
#define PE2_PIN PINE2
|
#define PE2_PIN PINE2
|
||||||
#define PE2_RPORT PINE
|
#define PE2_RPORT PINE
|
||||||
#define PE2_WPORT PORTE
|
#define PE2_WPORT PORTE
|
||||||
#define PE2_PWM NULL
|
#define PE2_PWM 0
|
||||||
#define PE2_DDR DDRE
|
#define PE2_DDR DDRE
|
||||||
#undef PE3
|
#undef PE3
|
||||||
#define PE3_PIN PINE3
|
#define PE3_PIN PINE3
|
||||||
#define PE3_RPORT PINE
|
#define PE3_RPORT PINE
|
||||||
#define PE3_WPORT PORTE
|
#define PE3_WPORT PORTE
|
||||||
#define PE3_PWM NULL
|
#define PE3_PWM 0
|
||||||
#define PE3_DDR DDRE
|
#define PE3_DDR DDRE
|
||||||
#undef PE4
|
#undef PE4
|
||||||
#define PE4_PIN PINE4
|
#define PE4_PIN PINE4
|
||||||
#define PE4_RPORT PINE
|
#define PE4_RPORT PINE
|
||||||
#define PE4_WPORT PORTE
|
#define PE4_WPORT PORTE
|
||||||
#define PE4_PWM NULL
|
#define PE4_PWM 0
|
||||||
#define PE4_DDR DDRE
|
#define PE4_DDR DDRE
|
||||||
#undef PE5
|
#undef PE5
|
||||||
#define PE5_PIN PINE5
|
#define PE5_PIN PINE5
|
||||||
#define PE5_RPORT PINE
|
#define PE5_RPORT PINE
|
||||||
#define PE5_WPORT PORTE
|
#define PE5_WPORT PORTE
|
||||||
#define PE5_PWM NULL
|
#define PE5_PWM 0
|
||||||
#define PE5_DDR DDRE
|
#define PE5_DDR DDRE
|
||||||
#undef PE6
|
#undef PE6
|
||||||
#define PE6_PIN PINE6
|
#define PE6_PIN PINE6
|
||||||
#define PE6_RPORT PINE
|
#define PE6_RPORT PINE
|
||||||
#define PE6_WPORT PORTE
|
#define PE6_WPORT PORTE
|
||||||
#define PE6_PWM NULL
|
#define PE6_PWM 0
|
||||||
#define PE6_DDR DDRE
|
#define PE6_DDR DDRE
|
||||||
#undef PE7
|
#undef PE7
|
||||||
#define PE7_PIN PINE7
|
#define PE7_PIN PINE7
|
||||||
#define PE7_RPORT PINE
|
#define PE7_RPORT PINE
|
||||||
#define PE7_WPORT PORTE
|
#define PE7_WPORT PORTE
|
||||||
#define PE7_PWM NULL
|
#define PE7_PWM 0
|
||||||
#define PE7_DDR DDRE
|
#define PE7_DDR DDRE
|
||||||
|
|
||||||
#undef PF0
|
#undef PF0
|
||||||
#define PF0_PIN PINF0
|
#define PF0_PIN PINF0
|
||||||
#define PF0_RPORT PINF
|
#define PF0_RPORT PINF
|
||||||
#define PF0_WPORT PORTF
|
#define PF0_WPORT PORTF
|
||||||
#define PF0_PWM NULL
|
#define PF0_PWM 0
|
||||||
#define PF0_DDR DDRF
|
#define PF0_DDR DDRF
|
||||||
#undef PF1
|
#undef PF1
|
||||||
#define PF1_PIN PINF1
|
#define PF1_PIN PINF1
|
||||||
#define PF1_RPORT PINF
|
#define PF1_RPORT PINF
|
||||||
#define PF1_WPORT PORTF
|
#define PF1_WPORT PORTF
|
||||||
#define PF1_PWM NULL
|
#define PF1_PWM 0
|
||||||
#define PF1_DDR DDRF
|
#define PF1_DDR DDRF
|
||||||
#undef PF2
|
#undef PF2
|
||||||
#define PF2_PIN PINF2
|
#define PF2_PIN PINF2
|
||||||
#define PF2_RPORT PINF
|
#define PF2_RPORT PINF
|
||||||
#define PF2_WPORT PORTF
|
#define PF2_WPORT PORTF
|
||||||
#define PF2_PWM NULL
|
#define PF2_PWM 0
|
||||||
#define PF2_DDR DDRF
|
#define PF2_DDR DDRF
|
||||||
#undef PF3
|
#undef PF3
|
||||||
#define PF3_PIN PINF3
|
#define PF3_PIN PINF3
|
||||||
#define PF3_RPORT PINF
|
#define PF3_RPORT PINF
|
||||||
#define PF3_WPORT PORTF
|
#define PF3_WPORT PORTF
|
||||||
#define PF3_PWM NULL
|
#define PF3_PWM 0
|
||||||
#define PF3_DDR DDRF
|
#define PF3_DDR DDRF
|
||||||
#undef PF4
|
#undef PF4
|
||||||
#define PF4_PIN PINF4
|
#define PF4_PIN PINF4
|
||||||
#define PF4_RPORT PINF
|
#define PF4_RPORT PINF
|
||||||
#define PF4_WPORT PORTF
|
#define PF4_WPORT PORTF
|
||||||
#define PF4_PWM NULL
|
#define PF4_PWM 0
|
||||||
#define PF4_DDR DDRF
|
#define PF4_DDR DDRF
|
||||||
#undef PF5
|
#undef PF5
|
||||||
#define PF5_PIN PINF5
|
#define PF5_PIN PINF5
|
||||||
#define PF5_RPORT PINF
|
#define PF5_RPORT PINF
|
||||||
#define PF5_WPORT PORTF
|
#define PF5_WPORT PORTF
|
||||||
#define PF5_PWM NULL
|
#define PF5_PWM 0
|
||||||
#define PF5_DDR DDRF
|
#define PF5_DDR DDRF
|
||||||
#undef PF6
|
#undef PF6
|
||||||
#define PF6_PIN PINF6
|
#define PF6_PIN PINF6
|
||||||
#define PF6_RPORT PINF
|
#define PF6_RPORT PINF
|
||||||
#define PF6_WPORT PORTF
|
#define PF6_WPORT PORTF
|
||||||
#define PF6_PWM NULL
|
#define PF6_PWM 0
|
||||||
#define PF6_DDR DDRF
|
#define PF6_DDR DDRF
|
||||||
#undef PF7
|
#undef PF7
|
||||||
#define PF7_PIN PINF7
|
#define PF7_PIN PINF7
|
||||||
#define PF7_RPORT PINF
|
#define PF7_RPORT PINF
|
||||||
#define PF7_WPORT PORTF
|
#define PF7_WPORT PORTF
|
||||||
#define PF7_PWM NULL
|
#define PF7_PWM 0
|
||||||
#define PF7_DDR DDRF
|
#define PF7_DDR DDRF
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* some of the pin mapping functions of the Teensduino extension to the Arduino IDE
|
* Some of the pin mapping functions of the Teensduino extension to the Arduino IDE
|
||||||
* do not function the same as the other Arduino extensions
|
* do not function the same as the other Arduino extensions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//digitalPinToTimer(pin) function works like Arduino but Timers are not defined
|
//digitalPinToTimer(pin) function works like Arduino but Timers are not defined
|
||||||
|
|
@ -697,5 +695,3 @@
|
||||||
#define TIMER3A 5
|
#define TIMER3A 5
|
||||||
#define TIMER3B 4
|
#define TIMER3B 4
|
||||||
#define TIMER3C 3
|
#define TIMER3C 3
|
||||||
|
|
||||||
#endif // _FASTIO_AT90USB_H_
|
|
||||||
26
Marlin/src/HAL/AVR/inc/Conditionals_LCD.h
Normal file
26
Marlin/src/HAL/AVR/inc/Conditionals_LCD.h
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#if HAS_SPI_TFT || HAS_FSMC_TFT
|
||||||
|
#error "Sorry! TFT displays are not available for HAL/AVR."
|
||||||
|
#endif
|
||||||
22
Marlin/src/HAL/AVR/inc/Conditionals_adv.h
Normal file
22
Marlin/src/HAL/AVR/inc/Conditionals_adv.h
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
22
Marlin/src/HAL/AVR/inc/Conditionals_post.h
Normal file
22
Marlin/src/HAL/AVR/inc/Conditionals_post.h
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
58
Marlin/src/HAL/AVR/inc/SanityCheck.h
Normal file
58
Marlin/src/HAL/AVR/inc/SanityCheck.h
Normal file
|
|
@ -0,0 +1,58 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test AVR-specific configuration values for errors at compile-time.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks for FAST PWM
|
||||||
|
*/
|
||||||
|
#if ENABLED(FAST_PWM_FAN) && (ENABLED(USE_OCR2A_AS_TOP) && defined(TCCR2))
|
||||||
|
#error "USE_OCR2A_AS_TOP does not apply to devices with a single output TIMER2"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sanity checks for Spindle / Laser PWM
|
||||||
|
*/
|
||||||
|
#if ENABLED(SPINDLE_LASER_PWM)
|
||||||
|
#include "../ServoTimers.h" // Needed to check timer availability (_useTimer3)
|
||||||
|
#if SPINDLE_LASER_PWM_PIN == 4 || WITHIN(SPINDLE_LASER_PWM_PIN, 11, 13)
|
||||||
|
#error "Counter/Timer for SPINDLE_LASER_PWM_PIN is used by a system interrupt."
|
||||||
|
#elif NUM_SERVOS > 0 && defined(_useTimer3) && (WITHIN(SPINDLE_LASER_PWM_PIN, 2, 3) || SPINDLE_LASER_PWM_PIN == 5)
|
||||||
|
#error "Counter/Timer for SPINDLE_LASER_PWM_PIN is used by the servo system."
|
||||||
|
#endif
|
||||||
|
#elif defined(SPINDLE_LASER_FREQUENCY)
|
||||||
|
#error "SPINDLE_LASER_FREQUENCY requires SPINDLE_LASER_PWM."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Trinamic library includes SoftwareSerial.h, leading to a compile error.
|
||||||
|
*/
|
||||||
|
#if BOTH(HAS_TRINAMIC_CONFIG, ENDSTOP_INTERRUPTS_FEATURE)
|
||||||
|
#error "TMCStepper includes SoftwareSerial.h which is incompatible with ENDSTOP_INTERRUPTS_FEATURE. Disable ENDSTOP_INTERRUPTS_FEATURE to continue."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BOTH(HAS_TMC_SW_SERIAL, MONITOR_DRIVER_STATUS)
|
||||||
|
#error "MONITOR_DRIVER_STATUS causes performance issues when used with SoftwareSerial-connected drivers. Disable MONITOR_DRIVER_STATUS or use hardware serial to continue."
|
||||||
|
#endif
|
||||||
113
Marlin/src/HAL/AVR/math.h
Normal file
113
Marlin/src/HAL/AVR/math.h
Normal file
|
|
@ -0,0 +1,113 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Optimized math functions for AVR
|
||||||
|
*/
|
||||||
|
|
||||||
|
// intRes = longIn1 * longIn2 >> 24
|
||||||
|
// uses:
|
||||||
|
// A[tmp] to store 0
|
||||||
|
// B[tmp] to store bits 16-23 of the 48bit result. The top bit is used to round the two byte result.
|
||||||
|
// note that the lower two bytes and the upper byte of the 48bit result are not calculated.
|
||||||
|
// this can cause the result to be out by one as the lower bytes may cause carries into the upper ones.
|
||||||
|
// B A are bits 24-39 and are the returned value
|
||||||
|
// C B A is longIn1
|
||||||
|
// D C B A is longIn2
|
||||||
|
//
|
||||||
|
static FORCE_INLINE uint16_t MultiU24X32toH16(uint32_t longIn1, uint32_t longIn2) {
|
||||||
|
uint8_t tmp1;
|
||||||
|
uint8_t tmp2;
|
||||||
|
uint16_t intRes;
|
||||||
|
__asm__ __volatile__(
|
||||||
|
A("clr %[tmp1]")
|
||||||
|
A("mul %A[longIn1], %B[longIn2]")
|
||||||
|
A("mov %[tmp2], r1")
|
||||||
|
A("mul %B[longIn1], %C[longIn2]")
|
||||||
|
A("movw %A[intRes], r0")
|
||||||
|
A("mul %C[longIn1], %C[longIn2]")
|
||||||
|
A("add %B[intRes], r0")
|
||||||
|
A("mul %C[longIn1], %B[longIn2]")
|
||||||
|
A("add %A[intRes], r0")
|
||||||
|
A("adc %B[intRes], r1")
|
||||||
|
A("mul %A[longIn1], %C[longIn2]")
|
||||||
|
A("add %[tmp2], r0")
|
||||||
|
A("adc %A[intRes], r1")
|
||||||
|
A("adc %B[intRes], %[tmp1]")
|
||||||
|
A("mul %B[longIn1], %B[longIn2]")
|
||||||
|
A("add %[tmp2], r0")
|
||||||
|
A("adc %A[intRes], r1")
|
||||||
|
A("adc %B[intRes], %[tmp1]")
|
||||||
|
A("mul %C[longIn1], %A[longIn2]")
|
||||||
|
A("add %[tmp2], r0")
|
||||||
|
A("adc %A[intRes], r1")
|
||||||
|
A("adc %B[intRes], %[tmp1]")
|
||||||
|
A("mul %B[longIn1], %A[longIn2]")
|
||||||
|
A("add %[tmp2], r1")
|
||||||
|
A("adc %A[intRes], %[tmp1]")
|
||||||
|
A("adc %B[intRes], %[tmp1]")
|
||||||
|
A("lsr %[tmp2]")
|
||||||
|
A("adc %A[intRes], %[tmp1]")
|
||||||
|
A("adc %B[intRes], %[tmp1]")
|
||||||
|
A("mul %D[longIn2], %A[longIn1]")
|
||||||
|
A("add %A[intRes], r0")
|
||||||
|
A("adc %B[intRes], r1")
|
||||||
|
A("mul %D[longIn2], %B[longIn1]")
|
||||||
|
A("add %B[intRes], r0")
|
||||||
|
A("clr r1")
|
||||||
|
: [intRes] "=&r" (intRes),
|
||||||
|
[tmp1] "=&r" (tmp1),
|
||||||
|
[tmp2] "=&r" (tmp2)
|
||||||
|
: [longIn1] "d" (longIn1),
|
||||||
|
[longIn2] "d" (longIn2)
|
||||||
|
: "cc"
|
||||||
|
);
|
||||||
|
return intRes;
|
||||||
|
}
|
||||||
|
|
||||||
|
// intRes = intIn1 * intIn2 >> 16
|
||||||
|
// uses:
|
||||||
|
// r26 to store 0
|
||||||
|
// r27 to store the byte 1 of the 24 bit result
|
||||||
|
static FORCE_INLINE uint16_t MultiU16X8toH16(uint8_t charIn1, uint16_t intIn2) {
|
||||||
|
uint8_t tmp;
|
||||||
|
uint16_t intRes;
|
||||||
|
__asm__ __volatile__ (
|
||||||
|
A("clr %[tmp]")
|
||||||
|
A("mul %[charIn1], %B[intIn2]")
|
||||||
|
A("movw %A[intRes], r0")
|
||||||
|
A("mul %[charIn1], %A[intIn2]")
|
||||||
|
A("add %A[intRes], r1")
|
||||||
|
A("adc %B[intRes], %[tmp]")
|
||||||
|
A("lsr r0")
|
||||||
|
A("adc %A[intRes], %[tmp]")
|
||||||
|
A("adc %B[intRes], %[tmp]")
|
||||||
|
A("clr r1")
|
||||||
|
: [intRes] "=&r" (intRes),
|
||||||
|
[tmp] "=&r" (tmp)
|
||||||
|
: [charIn1] "d" (charIn1),
|
||||||
|
[intIn2] "d" (intIn2)
|
||||||
|
: "cc"
|
||||||
|
);
|
||||||
|
return intRes;
|
||||||
|
}
|
||||||
403
Marlin/src/HAL/AVR/pinsDebug.h
Normal file
403
Marlin/src/HAL/AVR/pinsDebug.h
Normal file
|
|
@ -0,0 +1,403 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PWM print routines for Atmel 8 bit AVR CPUs
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
|
#define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS
|
||||||
|
|
||||||
|
#if MB(BQ_ZUM_MEGA_3D, MIGHTYBOARD_REVE, MINIRAMBO, SCOOVO_X9H, TRIGORILLA_14)
|
||||||
|
#define AVR_ATmega2560_FAMILY_PLUS_70 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if AVR_AT90USB1286_FAMILY
|
||||||
|
|
||||||
|
// Working with Teensyduino extension so need to re-define some things
|
||||||
|
#include "pinsDebug_Teensyduino.h"
|
||||||
|
// Can't use the "digitalPinToPort" function from the Teensyduino type IDEs
|
||||||
|
// portModeRegister takes a different argument
|
||||||
|
#define digitalPinToTimer_DEBUG(p) digitalPinToTimer(p)
|
||||||
|
#define digitalPinToBitMask_DEBUG(p) digitalPinToBitMask(p)
|
||||||
|
#define digitalPinToPort_DEBUG(p) digitalPinToPort_Teensy(p)
|
||||||
|
#define GET_PINMODE(pin) (*portModeRegister(pin) & digitalPinToBitMask_DEBUG(pin))
|
||||||
|
|
||||||
|
#elif AVR_ATmega2560_FAMILY_PLUS_70 // So we can access/display all the pins on boards using more than 70
|
||||||
|
|
||||||
|
#include "pinsDebug_plus_70.h"
|
||||||
|
#define digitalPinToTimer_DEBUG(p) digitalPinToTimer_plus_70(p)
|
||||||
|
#define digitalPinToBitMask_DEBUG(p) digitalPinToBitMask_plus_70(p)
|
||||||
|
#define digitalPinToPort_DEBUG(p) digitalPinToPort_plus_70(p)
|
||||||
|
bool GET_PINMODE(int8_t pin) {return *portModeRegister(digitalPinToPort_DEBUG(pin)) & digitalPinToBitMask_DEBUG(pin); }
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#define digitalPinToTimer_DEBUG(p) digitalPinToTimer(p)
|
||||||
|
#define digitalPinToBitMask_DEBUG(p) digitalPinToBitMask(p)
|
||||||
|
#define digitalPinToPort_DEBUG(p) digitalPinToPort(p)
|
||||||
|
bool GET_PINMODE(int8_t pin) {return *portModeRegister(digitalPinToPort_DEBUG(pin)) & digitalPinToBitMask_DEBUG(pin); }
|
||||||
|
#define GET_ARRAY_PIN(p) pgm_read_byte(&pin_array[p].pin)
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define VALID_PIN(pin) (pin >= 0 && pin < NUM_DIGITAL_PINS ? 1 : 0)
|
||||||
|
#if AVR_ATmega1284_FAMILY
|
||||||
|
#define DIGITAL_PIN_TO_ANALOG_PIN(P) int(analogInputToDigitalPin(0) - (P))
|
||||||
|
#define IS_ANALOG(P) ((P) >= analogInputToDigitalPin(7) && (P) <= analogInputToDigitalPin(0))
|
||||||
|
#else
|
||||||
|
#define DIGITAL_PIN_TO_ANALOG_PIN(P) int((P) - analogInputToDigitalPin(0))
|
||||||
|
#define IS_ANALOG(P) ((P) >= analogInputToDigitalPin(0) && ((P) <= analogInputToDigitalPin(15) || (P) <= analogInputToDigitalPin(7)))
|
||||||
|
#endif
|
||||||
|
#define GET_ARRAY_PIN(p) pgm_read_byte(&pin_array[p].pin)
|
||||||
|
#define MULTI_NAME_PAD 26 // space needed to be pretty if not first name assigned to a pin
|
||||||
|
|
||||||
|
void PRINT_ARRAY_NAME(uint8_t x) {
|
||||||
|
char *name_mem_pointer = (char*)pgm_read_ptr(&pin_array[x].name);
|
||||||
|
LOOP_L_N(y, MAX_NAME_LENGTH) {
|
||||||
|
char temp_char = pgm_read_byte(name_mem_pointer + y);
|
||||||
|
if (temp_char != 0)
|
||||||
|
SERIAL_CHAR(temp_char);
|
||||||
|
else {
|
||||||
|
LOOP_L_N(i, MAX_NAME_LENGTH - y) SERIAL_CHAR(' ');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#define GET_ARRAY_IS_DIGITAL(x) pgm_read_byte(&pin_array[x].is_digital)
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(__AVR_ATmega1284P__) // 1284 IDE extensions set this to the number of
|
||||||
|
#undef NUM_DIGITAL_PINS // digital only pins while all other CPUs have it
|
||||||
|
#define NUM_DIGITAL_PINS 32 // set to digital only + digital/analog
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define PWM_PRINT(V) do{ sprintf_P(buffer, PSTR("PWM: %4d"), V); SERIAL_ECHO(buffer); }while(0)
|
||||||
|
#define PWM_CASE(N,Z) \
|
||||||
|
case TIMER##N##Z: \
|
||||||
|
if (TCCR##N##A & (_BV(COM##N##Z##1) | _BV(COM##N##Z##0))) { \
|
||||||
|
PWM_PRINT(OCR##N##Z); \
|
||||||
|
return true; \
|
||||||
|
} else return false
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Print a pin's PWM status.
|
||||||
|
* Return true if it's currently a PWM pin.
|
||||||
|
*/
|
||||||
|
static bool pwm_status(uint8_t pin) {
|
||||||
|
char buffer[20]; // for the sprintf statements
|
||||||
|
|
||||||
|
switch (digitalPinToTimer_DEBUG(pin)) {
|
||||||
|
|
||||||
|
#if defined(TCCR0A) && defined(COM0A1)
|
||||||
|
#ifdef TIMER0A
|
||||||
|
#if !AVR_AT90USB1286_FAMILY // not available in Teensyduino type IDEs
|
||||||
|
PWM_CASE(0, A);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
PWM_CASE(0, B);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(TCCR1A) && defined(COM1A1)
|
||||||
|
PWM_CASE(1, A);
|
||||||
|
PWM_CASE(1, B);
|
||||||
|
#if defined(COM1C1) && defined(TIMER1C)
|
||||||
|
PWM_CASE(1, C);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(TCCR2A) && defined(COM2A1)
|
||||||
|
PWM_CASE(2, A);
|
||||||
|
PWM_CASE(2, B);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(TCCR3A) && defined(COM3A1)
|
||||||
|
PWM_CASE(3, A);
|
||||||
|
PWM_CASE(3, B);
|
||||||
|
#ifdef COM3C1
|
||||||
|
PWM_CASE(3, C);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef TCCR4A
|
||||||
|
PWM_CASE(4, A);
|
||||||
|
PWM_CASE(4, B);
|
||||||
|
PWM_CASE(4, C);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(TCCR5A) && defined(COM5A1)
|
||||||
|
PWM_CASE(5, A);
|
||||||
|
PWM_CASE(5, B);
|
||||||
|
PWM_CASE(5, C);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
case NOT_ON_TIMER:
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
SERIAL_ECHO_SP(2);
|
||||||
|
} // pwm_status
|
||||||
|
|
||||||
|
|
||||||
|
const volatile uint8_t* const PWM_other[][3] PROGMEM = {
|
||||||
|
{ &TCCR0A, &TCCR0B, &TIMSK0 },
|
||||||
|
{ &TCCR1A, &TCCR1B, &TIMSK1 },
|
||||||
|
#if defined(TCCR2A) && defined(COM2A1)
|
||||||
|
{ &TCCR2A, &TCCR2B, &TIMSK2 },
|
||||||
|
#endif
|
||||||
|
#if defined(TCCR3A) && defined(COM3A1)
|
||||||
|
{ &TCCR3A, &TCCR3B, &TIMSK3 },
|
||||||
|
#endif
|
||||||
|
#ifdef TCCR4A
|
||||||
|
{ &TCCR4A, &TCCR4B, &TIMSK4 },
|
||||||
|
#endif
|
||||||
|
#if defined(TCCR5A) && defined(COM5A1)
|
||||||
|
{ &TCCR5A, &TCCR5B, &TIMSK5 },
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const volatile uint8_t* const PWM_OCR[][3] PROGMEM = {
|
||||||
|
|
||||||
|
#ifdef TIMER0A
|
||||||
|
{ &OCR0A, &OCR0B, 0 },
|
||||||
|
#else
|
||||||
|
{ 0, &OCR0B, 0 },
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(COM1C1) && defined(TIMER1C)
|
||||||
|
{ (const uint8_t*)&OCR1A, (const uint8_t*)&OCR1B, (const uint8_t*)&OCR1C },
|
||||||
|
#else
|
||||||
|
{ (const uint8_t*)&OCR1A, (const uint8_t*)&OCR1B, 0 },
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(TCCR2A) && defined(COM2A1)
|
||||||
|
{ &OCR2A, &OCR2B, 0 },
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(TCCR3A) && defined(COM3A1)
|
||||||
|
#ifdef COM3C1
|
||||||
|
{ (const uint8_t*)&OCR3A, (const uint8_t*)&OCR3B, (const uint8_t*)&OCR3C },
|
||||||
|
#else
|
||||||
|
{ (const uint8_t*)&OCR3A, (const uint8_t*)&OCR3B, 0 },
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef TCCR4A
|
||||||
|
{ (const uint8_t*)&OCR4A, (const uint8_t*)&OCR4B, (const uint8_t*)&OCR4C },
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(TCCR5A) && defined(COM5A1)
|
||||||
|
{ (const uint8_t*)&OCR5A, (const uint8_t*)&OCR5B, (const uint8_t*)&OCR5C },
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#define TCCR_A(T) pgm_read_word(&PWM_other[T][0])
|
||||||
|
#define TCCR_B(T) pgm_read_word(&PWM_other[T][1])
|
||||||
|
#define TIMSK(T) pgm_read_word(&PWM_other[T][2])
|
||||||
|
#define CS_0 0
|
||||||
|
#define CS_1 1
|
||||||
|
#define CS_2 2
|
||||||
|
#define WGM_0 0
|
||||||
|
#define WGM_1 1
|
||||||
|
#define WGM_2 3
|
||||||
|
#define WGM_3 4
|
||||||
|
#define TOIE 0
|
||||||
|
|
||||||
|
#define OCR_VAL(T, L) pgm_read_word(&PWM_OCR[T][L])
|
||||||
|
|
||||||
|
static void err_is_counter() { SERIAL_ECHOPGM(" non-standard PWM mode"); }
|
||||||
|
static void err_is_interrupt() { SERIAL_ECHOPGM(" compare interrupt enabled"); }
|
||||||
|
static void err_prob_interrupt() { SERIAL_ECHOPGM(" overflow interrupt enabled"); }
|
||||||
|
static void print_is_also_tied() { SERIAL_ECHOPGM(" is also tied to this pin"); SERIAL_ECHO_SP(14); }
|
||||||
|
|
||||||
|
inline void com_print(const uint8_t N, const uint8_t Z) {
|
||||||
|
const uint8_t *TCCRA = (uint8_t*)TCCR_A(N);
|
||||||
|
SERIAL_ECHOPGM(" COM");
|
||||||
|
SERIAL_CHAR('0' + N, Z);
|
||||||
|
SERIAL_ECHOPAIR(": ", int((*TCCRA >> (6 - Z * 2)) & 0x03));
|
||||||
|
}
|
||||||
|
|
||||||
|
void timer_prefix(uint8_t T, char L, uint8_t N) { // T - timer L - pwm N - WGM bit layout
|
||||||
|
char buffer[20]; // for the sprintf statements
|
||||||
|
const uint8_t *TCCRB = (uint8_t*)TCCR_B(T),
|
||||||
|
*TCCRA = (uint8_t*)TCCR_A(T);
|
||||||
|
uint8_t WGM = (((*TCCRB & _BV(WGM_2)) >> 1) | (*TCCRA & (_BV(WGM_0) | _BV(WGM_1))));
|
||||||
|
if (N == 4) WGM |= ((*TCCRB & _BV(WGM_3)) >> 1);
|
||||||
|
|
||||||
|
SERIAL_ECHOPGM(" TIMER");
|
||||||
|
SERIAL_CHAR(T + '0', L);
|
||||||
|
SERIAL_ECHO_SP(3);
|
||||||
|
|
||||||
|
if (N == 3) {
|
||||||
|
const uint8_t *OCRVAL8 = (uint8_t*)OCR_VAL(T, L - 'A');
|
||||||
|
PWM_PRINT(*OCRVAL8);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
const uint16_t *OCRVAL16 = (uint16_t*)OCR_VAL(T, L - 'A');
|
||||||
|
PWM_PRINT(*OCRVAL16);
|
||||||
|
}
|
||||||
|
SERIAL_ECHOPAIR(" WGM: ", WGM);
|
||||||
|
com_print(T,L);
|
||||||
|
SERIAL_ECHOPAIR(" CS: ", (*TCCRB & (_BV(CS_0) | _BV(CS_1) | _BV(CS_2)) ));
|
||||||
|
|
||||||
|
SERIAL_ECHOPGM(" TCCR");
|
||||||
|
SERIAL_CHAR(T + '0');
|
||||||
|
SERIAL_ECHOPAIR("A: ", *TCCRA);
|
||||||
|
|
||||||
|
SERIAL_ECHOPGM(" TCCR");
|
||||||
|
SERIAL_CHAR(T + '0');
|
||||||
|
SERIAL_ECHOPAIR("B: ", *TCCRB);
|
||||||
|
|
||||||
|
const uint8_t *TMSK = (uint8_t*)TIMSK(T);
|
||||||
|
SERIAL_ECHOPGM(" TIMSK");
|
||||||
|
SERIAL_CHAR(T + '0');
|
||||||
|
SERIAL_ECHOPAIR(": ", *TMSK);
|
||||||
|
|
||||||
|
const uint8_t OCIE = L - 'A' + 1;
|
||||||
|
if (N == 3) { if (WGM == 0 || WGM == 2 || WGM == 4 || WGM == 6) err_is_counter(); }
|
||||||
|
else { if (WGM == 0 || WGM == 4 || WGM == 12 || WGM == 13) err_is_counter(); }
|
||||||
|
if (TEST(*TMSK, OCIE)) err_is_interrupt();
|
||||||
|
if (TEST(*TMSK, TOIE)) err_prob_interrupt();
|
||||||
|
}
|
||||||
|
|
||||||
|
static void pwm_details(uint8_t pin) {
|
||||||
|
switch (digitalPinToTimer_DEBUG(pin)) {
|
||||||
|
|
||||||
|
#if defined(TCCR0A) && defined(COM0A1)
|
||||||
|
#ifdef TIMER0A
|
||||||
|
#if !AVR_AT90USB1286_FAMILY // not available in Teensyduino type IDEs
|
||||||
|
case TIMER0A: timer_prefix(0, 'A', 3); break;
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
case TIMER0B: timer_prefix(0, 'B', 3); break;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(TCCR1A) && defined(COM1A1)
|
||||||
|
case TIMER1A: timer_prefix(1, 'A', 4); break;
|
||||||
|
case TIMER1B: timer_prefix(1, 'B', 4); break;
|
||||||
|
#if defined(COM1C1) && defined(TIMER1C)
|
||||||
|
case TIMER1C: timer_prefix(1, 'C', 4); break;
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(TCCR2A) && defined(COM2A1)
|
||||||
|
case TIMER2A: timer_prefix(2, 'A', 3); break;
|
||||||
|
case TIMER2B: timer_prefix(2, 'B', 3); break;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(TCCR3A) && defined(COM3A1)
|
||||||
|
case TIMER3A: timer_prefix(3, 'A', 4); break;
|
||||||
|
case TIMER3B: timer_prefix(3, 'B', 4); break;
|
||||||
|
#ifdef COM3C1
|
||||||
|
case TIMER3C: timer_prefix(3, 'C', 4); break;
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef TCCR4A
|
||||||
|
case TIMER4A: timer_prefix(4, 'A', 4); break;
|
||||||
|
case TIMER4B: timer_prefix(4, 'B', 4); break;
|
||||||
|
case TIMER4C: timer_prefix(4, 'C', 4); break;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(TCCR5A) && defined(COM5A1)
|
||||||
|
case TIMER5A: timer_prefix(5, 'A', 4); break;
|
||||||
|
case TIMER5B: timer_prefix(5, 'B', 4); break;
|
||||||
|
case TIMER5C: timer_prefix(5, 'C', 4); break;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
case NOT_ON_TIMER: break;
|
||||||
|
|
||||||
|
}
|
||||||
|
SERIAL_ECHOPGM(" ");
|
||||||
|
|
||||||
|
// on pins that have two PWMs, print info on second PWM
|
||||||
|
#if AVR_ATmega2560_FAMILY || AVR_AT90USB1286_FAMILY
|
||||||
|
// looking for port B7 - PWMs 0A and 1C
|
||||||
|
if (digitalPinToPort_DEBUG(pin) == 'B' - 64 && 0x80 == digitalPinToBitMask_DEBUG(pin)) {
|
||||||
|
#if !AVR_AT90USB1286_FAMILY
|
||||||
|
SERIAL_ECHOPGM("\n .");
|
||||||
|
SERIAL_ECHO_SP(18);
|
||||||
|
SERIAL_ECHOPGM("TIMER1C");
|
||||||
|
print_is_also_tied();
|
||||||
|
timer_prefix(1, 'C', 4);
|
||||||
|
#else
|
||||||
|
SERIAL_ECHOPGM("\n .");
|
||||||
|
SERIAL_ECHO_SP(18);
|
||||||
|
SERIAL_ECHOPGM("TIMER0A");
|
||||||
|
print_is_also_tied();
|
||||||
|
timer_prefix(0, 'A', 3);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
UNUSED(print_is_also_tied);
|
||||||
|
#endif
|
||||||
|
} // pwm_details
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef digitalRead_mod // Use Teensyduino's version of digitalRead - it doesn't disable the PWMs
|
||||||
|
int digitalRead_mod(const int8_t pin) { // same as digitalRead except the PWM stop section has been removed
|
||||||
|
const uint8_t port = digitalPinToPort_DEBUG(pin);
|
||||||
|
return (port != NOT_A_PIN) && (*portInputRegister(port) & digitalPinToBitMask_DEBUG(pin)) ? HIGH : LOW;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef PRINT_PORT
|
||||||
|
|
||||||
|
void print_port(int8_t pin) { // print port number
|
||||||
|
#ifdef digitalPinToPort_DEBUG
|
||||||
|
uint8_t x;
|
||||||
|
SERIAL_ECHOPGM(" Port: ");
|
||||||
|
#if AVR_AT90USB1286_FAMILY
|
||||||
|
x = (pin == 46 || pin == 47) ? 'E' : digitalPinToPort_DEBUG(pin) + 64;
|
||||||
|
#else
|
||||||
|
x = digitalPinToPort_DEBUG(pin) + 64;
|
||||||
|
#endif
|
||||||
|
SERIAL_CHAR(x);
|
||||||
|
|
||||||
|
#if AVR_AT90USB1286_FAMILY
|
||||||
|
if (pin == 46)
|
||||||
|
x = '2';
|
||||||
|
else if (pin == 47)
|
||||||
|
x = '3';
|
||||||
|
else {
|
||||||
|
uint8_t temp = digitalPinToBitMask_DEBUG(pin);
|
||||||
|
for (x = '0'; x < '9' && temp != 1; x++) temp >>= 1;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
uint8_t temp = digitalPinToBitMask_DEBUG(pin);
|
||||||
|
for (x = '0'; x < '9' && temp != 1; x++) temp >>= 1;
|
||||||
|
#endif
|
||||||
|
SERIAL_CHAR(x);
|
||||||
|
#else
|
||||||
|
SERIAL_ECHO_SP(10);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#define PRINT_PORT(p) print_port(p)
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0)
|
||||||
|
|
@ -1,9 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* Marlin 3D Printer Firmware
|
* Marlin 3D Printer Firmware
|
||||||
* Copyright (C) 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
*
|
|
||||||
* Based on Sprinter and grbl.
|
|
||||||
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
|
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -16,12 +13,10 @@
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
#pragma once
|
||||||
#ifndef _PINSDEBUG_TEENSYSUINO_H_
|
|
||||||
#define _PINSDEBUG_TEENSYSUINO_H_
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// some of the pin mapping functions of the Teensduino extension to the Arduino IDE
|
// some of the pin mapping functions of the Teensduino extension to the Arduino IDE
|
||||||
|
|
@ -107,9 +102,7 @@ const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
|
||||||
|
|
||||||
// digitalPinToBitMask(pin) is OK
|
// digitalPinToBitMask(pin) is OK
|
||||||
|
|
||||||
#define digitalRead_mod(p) digitalRead(p) // Teensyduino's version of digitalRead doesn't
|
#define digitalRead_mod(p) extDigitalRead(p) // Teensyduino's version of digitalRead doesn't
|
||||||
// disable the PWMs so we can use it as is
|
// disable the PWMs so we can use it as is
|
||||||
|
|
||||||
// portModeRegister(pin) is OK
|
// portModeRegister(pin) is OK
|
||||||
|
|
||||||
#endif // _PINSDEBUG_TEENSYSUINO_H_
|
|
||||||
|
|
@ -1,10 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* Marlin 3D Printer Firmware
|
* Marlin 3D Printer Firmware
|
||||||
* Copyright (C) 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
|
||||||
*
|
|
||||||
* Based on Sprinter and grbl.
|
|
||||||
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
|
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -17,26 +13,21 @@
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Structures for 2560 family boards that use more than 70 pins
|
* Structures for 2560 family boards that use more than 70 pins
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _PINSDEBUG_PLUS_70_H_
|
#if MB(BQ_ZUM_MEGA_3D, MINIRAMBO, SCOOVO_X9H, TRIGORILLA_14)
|
||||||
#define _PINSDEBUG_PLUS_70_H_
|
|
||||||
|
|
||||||
#undef NUM_DIGITAL_PINS
|
#undef NUM_DIGITAL_PINS
|
||||||
#if MB(BQ_ZUM_MEGA_3D)
|
|
||||||
#define NUM_DIGITAL_PINS 85
|
#define NUM_DIGITAL_PINS 85
|
||||||
#elif MB(MIGHTYBOARD_REVE)
|
#elif MB(MIGHTYBOARD_REVE)
|
||||||
|
#undef NUM_DIGITAL_PINS
|
||||||
#define NUM_DIGITAL_PINS 80
|
#define NUM_DIGITAL_PINS 80
|
||||||
#elif MB(MINIRAMBO)
|
|
||||||
#define NUM_DIGITAL_PINS 85
|
|
||||||
#elif MB(SCOOVO_X9H)
|
|
||||||
#define NUM_DIGITAL_PINS 85
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define PA 1
|
#define PA 1
|
||||||
|
|
@ -53,7 +44,7 @@
|
||||||
|
|
||||||
const uint8_t PROGMEM digital_pin_to_port_PGM_plus_70[] = {
|
const uint8_t PROGMEM digital_pin_to_port_PGM_plus_70[] = {
|
||||||
// PORTLIST
|
// PORTLIST
|
||||||
// -------------------------------------------
|
// ------------------------
|
||||||
PE , // PE 0 ** 0 ** USART0_RX
|
PE , // PE 0 ** 0 ** USART0_RX
|
||||||
PE , // PE 1 ** 1 ** USART0_TX
|
PE , // PE 1 ** 1 ** USART0_TX
|
||||||
PE , // PE 4 ** 2 ** PWM2
|
PE , // PE 4 ** 2 ** PWM2
|
||||||
|
|
@ -146,7 +137,7 @@ const uint8_t PROGMEM digital_pin_to_port_PGM_plus_70[] = {
|
||||||
|
|
||||||
const uint8_t PROGMEM digital_pin_to_bit_mask_PGM_plus_70[] = {
|
const uint8_t PROGMEM digital_pin_to_bit_mask_PGM_plus_70[] = {
|
||||||
// PIN IN PORT
|
// PIN IN PORT
|
||||||
// -------------------------------------------
|
// ------------------------
|
||||||
_BV( 0 ) , // PE 0 ** 0 ** USART0_RX
|
_BV( 0 ) , // PE 0 ** 0 ** USART0_RX
|
||||||
_BV( 1 ) , // PE 1 ** 1 ** USART0_TX
|
_BV( 1 ) , // PE 1 ** 1 ** USART0_TX
|
||||||
_BV( 4 ) , // PE 4 ** 2 ** PWM2
|
_BV( 4 ) , // PE 4 ** 2 ** PWM2
|
||||||
|
|
@ -240,7 +231,7 @@ const uint8_t PROGMEM digital_pin_to_bit_mask_PGM_plus_70[] = {
|
||||||
|
|
||||||
const uint8_t PROGMEM digital_pin_to_timer_PGM_plus_70[] = {
|
const uint8_t PROGMEM digital_pin_to_timer_PGM_plus_70[] = {
|
||||||
// TIMERS
|
// TIMERS
|
||||||
// -------------------------------------------
|
// ------------------------
|
||||||
NOT_ON_TIMER , // PE 0 ** 0 ** USART0_RX
|
NOT_ON_TIMER , // PE 0 ** 0 ** USART0_RX
|
||||||
NOT_ON_TIMER , // PE 1 ** 1 ** USART0_TX
|
NOT_ON_TIMER , // PE 1 ** 1 ** USART0_TX
|
||||||
TIMER3B , // PE 4 ** 2 ** PWM2
|
TIMER3B , // PE 4 ** 2 ** PWM2
|
||||||
|
|
@ -336,6 +327,3 @@ const uint8_t PROGMEM digital_pin_to_timer_PGM_plus_70[] = {
|
||||||
* PCINT14 J5 76
|
* PCINT14 J5 76
|
||||||
* PCINT15 J6 77
|
* PCINT15 J6 77
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#endif // _PINSDEBUG_PLUS_70_H_
|
|
||||||
65
Marlin/src/HAL/AVR/spi_pins.h
Normal file
65
Marlin/src/HAL/AVR/spi_pins.h
Normal file
|
|
@ -0,0 +1,65 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define SPI Pins: SCK, MISO, MOSI, SS
|
||||||
|
*/
|
||||||
|
#if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328__) || defined(__AVR_ATmega328P__)
|
||||||
|
#define AVR_SCK_PIN 13
|
||||||
|
#define AVR_MISO_PIN 12
|
||||||
|
#define AVR_MOSI_PIN 11
|
||||||
|
#define AVR_SS_PIN 10
|
||||||
|
#elif defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644PA__) || defined(__AVR_ATmega1284P__)
|
||||||
|
#define AVR_SCK_PIN 7
|
||||||
|
#define AVR_MISO_PIN 6
|
||||||
|
#define AVR_MOSI_PIN 5
|
||||||
|
#define AVR_SS_PIN 4
|
||||||
|
#elif defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
|
||||||
|
#define AVR_SCK_PIN 52
|
||||||
|
#define AVR_MISO_PIN 50
|
||||||
|
#define AVR_MOSI_PIN 51
|
||||||
|
#define AVR_SS_PIN 53
|
||||||
|
#elif defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__)
|
||||||
|
#define AVR_SCK_PIN 21
|
||||||
|
#define AVR_MISO_PIN 23
|
||||||
|
#define AVR_MOSI_PIN 22
|
||||||
|
#define AVR_SS_PIN 20
|
||||||
|
#elif defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__)
|
||||||
|
#define AVR_SCK_PIN 10
|
||||||
|
#define AVR_MISO_PIN 12
|
||||||
|
#define AVR_MOSI_PIN 11
|
||||||
|
#define AVR_SS_PIN 16
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef SCK_PIN
|
||||||
|
#define SCK_PIN AVR_SCK_PIN
|
||||||
|
#endif
|
||||||
|
#ifndef MISO_PIN
|
||||||
|
#define MISO_PIN AVR_MISO_PIN
|
||||||
|
#endif
|
||||||
|
#ifndef MOSI_PIN
|
||||||
|
#define MOSI_PIN AVR_MOSI_PIN
|
||||||
|
#endif
|
||||||
|
#ifndef SS_PIN
|
||||||
|
#define SS_PIN AVR_SS_PIN
|
||||||
|
#endif
|
||||||
260
Marlin/src/HAL/AVR/timers.h
Normal file
260
Marlin/src/HAL/AVR/timers.h
Normal file
|
|
@ -0,0 +1,260 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
// ------------------------
|
||||||
|
// Types
|
||||||
|
// ------------------------
|
||||||
|
|
||||||
|
typedef uint16_t hal_timer_t;
|
||||||
|
#define HAL_TIMER_TYPE_MAX 0xFFFF
|
||||||
|
|
||||||
|
// ------------------------
|
||||||
|
// Defines
|
||||||
|
// ------------------------
|
||||||
|
|
||||||
|
#define HAL_TIMER_RATE ((F_CPU) / 8) // i.e., 2MHz or 2.5MHz
|
||||||
|
|
||||||
|
#ifndef STEP_TIMER_NUM
|
||||||
|
#define STEP_TIMER_NUM 1
|
||||||
|
#endif
|
||||||
|
#ifndef PULSE_TIMER_NUM
|
||||||
|
#define PULSE_TIMER_NUM STEP_TIMER_NUM
|
||||||
|
#endif
|
||||||
|
#ifndef TEMP_TIMER_NUM
|
||||||
|
#define TEMP_TIMER_NUM 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define TEMP_TIMER_FREQUENCY ((F_CPU) / 64.0 / 256.0)
|
||||||
|
|
||||||
|
#define STEPPER_TIMER_RATE HAL_TIMER_RATE
|
||||||
|
#define STEPPER_TIMER_PRESCALE 8
|
||||||
|
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) // Cannot be of type double
|
||||||
|
|
||||||
|
#define PULSE_TIMER_RATE STEPPER_TIMER_RATE // frequency of pulse timer
|
||||||
|
#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
|
||||||
|
#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
|
||||||
|
|
||||||
|
#define ENABLE_STEPPER_DRIVER_INTERRUPT() SBI(TIMSK1, OCIE1A)
|
||||||
|
#define DISABLE_STEPPER_DRIVER_INTERRUPT() CBI(TIMSK1, OCIE1A)
|
||||||
|
#define STEPPER_ISR_ENABLED() TEST(TIMSK1, OCIE1A)
|
||||||
|
|
||||||
|
#define ENABLE_TEMPERATURE_INTERRUPT() SBI(TIMSK0, OCIE0B)
|
||||||
|
#define DISABLE_TEMPERATURE_INTERRUPT() CBI(TIMSK0, OCIE0B)
|
||||||
|
#define TEMPERATURE_ISR_ENABLED() TEST(TIMSK0, OCIE0B)
|
||||||
|
|
||||||
|
FORCE_INLINE void HAL_timer_start(const uint8_t timer_num, const uint32_t) {
|
||||||
|
switch (timer_num) {
|
||||||
|
case STEP_TIMER_NUM:
|
||||||
|
// waveform generation = 0100 = CTC
|
||||||
|
SET_WGM(1, CTC_OCRnA);
|
||||||
|
|
||||||
|
// output mode = 00 (disconnected)
|
||||||
|
SET_COMA(1, NORMAL);
|
||||||
|
|
||||||
|
// Set the timer pre-scaler
|
||||||
|
// Generally we use a divider of 8, resulting in a 2MHz timer
|
||||||
|
// frequency on a 16MHz MCU. If you are going to change this, be
|
||||||
|
// sure to regenerate speed_lookuptable.h with
|
||||||
|
// create_speed_lookuptable.py
|
||||||
|
SET_CS(1, PRESCALER_8); // CS 2 = 1/8 prescaler
|
||||||
|
|
||||||
|
// Init Stepper ISR to 122 Hz for quick starting
|
||||||
|
// (F_CPU) / (STEPPER_TIMER_PRESCALE) / frequency
|
||||||
|
OCR1A = 0x4000;
|
||||||
|
TCNT1 = 0;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TEMP_TIMER_NUM:
|
||||||
|
// Use timer0 for temperature measurement
|
||||||
|
// Interleave temperature interrupt with millies interrupt
|
||||||
|
OCR0B = 128;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#define TIMER_OCR_1 OCR1A
|
||||||
|
#define TIMER_COUNTER_1 TCNT1
|
||||||
|
|
||||||
|
#define TIMER_OCR_0 OCR0A
|
||||||
|
#define TIMER_COUNTER_0 TCNT0
|
||||||
|
|
||||||
|
#define _CAT(a,V...) a##V
|
||||||
|
#define HAL_timer_set_compare(timer, compare) (_CAT(TIMER_OCR_, timer) = compare)
|
||||||
|
#define HAL_timer_get_compare(timer) _CAT(TIMER_OCR_, timer)
|
||||||
|
#define HAL_timer_get_count(timer) _CAT(TIMER_COUNTER_, timer)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* On AVR there is no hardware prioritization and preemption of
|
||||||
|
* interrupts, so this emulates it. The UART has first priority
|
||||||
|
* (otherwise, characters will be lost due to UART overflow).
|
||||||
|
* Then: Stepper, Endstops, Temperature, and -finally- all others.
|
||||||
|
*/
|
||||||
|
#define HAL_timer_isr_prologue(TIMER_NUM)
|
||||||
|
#define HAL_timer_isr_epilogue(TIMER_NUM)
|
||||||
|
|
||||||
|
/* 18 cycles maximum latency */
|
||||||
|
#ifndef HAL_STEP_TIMER_ISR
|
||||||
|
|
||||||
|
#define HAL_STEP_TIMER_ISR() \
|
||||||
|
extern "C" void TIMER1_COMPA_vect() __attribute__ ((signal, naked, used, externally_visible)); \
|
||||||
|
extern "C" void TIMER1_COMPA_vect_bottom() asm ("TIMER1_COMPA_vect_bottom") __attribute__ ((used, externally_visible, noinline)); \
|
||||||
|
void TIMER1_COMPA_vect() { \
|
||||||
|
__asm__ __volatile__ ( \
|
||||||
|
A("push r16") /* 2 Save R16 */ \
|
||||||
|
A("in r16, __SREG__") /* 1 Get SREG */ \
|
||||||
|
A("push r16") /* 2 Save SREG into stack */ \
|
||||||
|
A("lds r16, %[timsk0]") /* 2 Load into R0 the Temperature timer Interrupt mask register */ \
|
||||||
|
A("push r16") /* 2 Save TIMSK0 into the stack */ \
|
||||||
|
A("andi r16,~%[msk0]") /* 1 Disable the temperature ISR */ \
|
||||||
|
A("sts %[timsk0], r16") /* 2 And set the new value */ \
|
||||||
|
A("lds r16, %[timsk1]") /* 2 Load into R0 the stepper timer Interrupt mask register [TIMSK1] */ \
|
||||||
|
A("andi r16,~%[msk1]") /* 1 Disable the stepper ISR */ \
|
||||||
|
A("sts %[timsk1], r16") /* 2 And set the new value */ \
|
||||||
|
A("push r16") /* 2 Save TIMSK1 into stack */ \
|
||||||
|
A("in r16, 0x3B") /* 1 Get RAMPZ register */ \
|
||||||
|
A("push r16") /* 2 Save RAMPZ into stack */ \
|
||||||
|
A("in r16, 0x3C") /* 1 Get EIND register */ \
|
||||||
|
A("push r0") /* C runtime can modify all the following registers without restoring them */ \
|
||||||
|
A("push r1") \
|
||||||
|
A("push r18") \
|
||||||
|
A("push r19") \
|
||||||
|
A("push r20") \
|
||||||
|
A("push r21") \
|
||||||
|
A("push r22") \
|
||||||
|
A("push r23") \
|
||||||
|
A("push r24") \
|
||||||
|
A("push r25") \
|
||||||
|
A("push r26") \
|
||||||
|
A("push r27") \
|
||||||
|
A("push r30") \
|
||||||
|
A("push r31") \
|
||||||
|
A("clr r1") /* C runtime expects this register to be 0 */ \
|
||||||
|
A("call TIMER1_COMPA_vect_bottom") /* Call the bottom handler - No inlining allowed, otherwise registers used are not saved */ \
|
||||||
|
A("pop r31") \
|
||||||
|
A("pop r30") \
|
||||||
|
A("pop r27") \
|
||||||
|
A("pop r26") \
|
||||||
|
A("pop r25") \
|
||||||
|
A("pop r24") \
|
||||||
|
A("pop r23") \
|
||||||
|
A("pop r22") \
|
||||||
|
A("pop r21") \
|
||||||
|
A("pop r20") \
|
||||||
|
A("pop r19") \
|
||||||
|
A("pop r18") \
|
||||||
|
A("pop r1") \
|
||||||
|
A("pop r0") \
|
||||||
|
A("out 0x3C, r16") /* 1 Restore EIND register */ \
|
||||||
|
A("pop r16") /* 2 Get the original RAMPZ register value */ \
|
||||||
|
A("out 0x3B, r16") /* 1 Restore RAMPZ register to its original value */ \
|
||||||
|
A("pop r16") /* 2 Get the original TIMSK1 value but with stepper ISR disabled */ \
|
||||||
|
A("ori r16,%[msk1]") /* 1 Reenable the stepper ISR */ \
|
||||||
|
A("cli") /* 1 Disable global interrupts - Reenabling Stepper ISR can reenter amd temperature can reenter, and we want that, if it happens, after this ISR has ended */ \
|
||||||
|
A("sts %[timsk1], r16") /* 2 And restore the old value - This reenables the stepper ISR */ \
|
||||||
|
A("pop r16") /* 2 Get the temperature timer Interrupt mask register [TIMSK0] */ \
|
||||||
|
A("sts %[timsk0], r16") /* 2 And restore the old value - This reenables the temperature ISR */ \
|
||||||
|
A("pop r16") /* 2 Get the old SREG value */ \
|
||||||
|
A("out __SREG__, r16") /* 1 And restore the SREG value */ \
|
||||||
|
A("pop r16") /* 2 Restore R16 value */ \
|
||||||
|
A("reti") /* 4 Return from interrupt */ \
|
||||||
|
: \
|
||||||
|
: [timsk0] "i" ((uint16_t)&TIMSK0), \
|
||||||
|
[timsk1] "i" ((uint16_t)&TIMSK1), \
|
||||||
|
[msk0] "M" ((uint8_t)(1<<OCIE0B)),\
|
||||||
|
[msk1] "M" ((uint8_t)(1<<OCIE1A)) \
|
||||||
|
: \
|
||||||
|
); \
|
||||||
|
} \
|
||||||
|
void TIMER1_COMPA_vect_bottom()
|
||||||
|
|
||||||
|
#endif // HAL_STEP_TIMER_ISR
|
||||||
|
|
||||||
|
#ifndef HAL_TEMP_TIMER_ISR
|
||||||
|
|
||||||
|
/* 14 cycles maximum latency */
|
||||||
|
#define HAL_TEMP_TIMER_ISR() \
|
||||||
|
extern "C" void TIMER0_COMPB_vect() __attribute__ ((signal, naked, used, externally_visible)); \
|
||||||
|
extern "C" void TIMER0_COMPB_vect_bottom() asm ("TIMER0_COMPB_vect_bottom") __attribute__ ((used, externally_visible, noinline)); \
|
||||||
|
void TIMER0_COMPB_vect() { \
|
||||||
|
__asm__ __volatile__ ( \
|
||||||
|
A("push r16") /* 2 Save R16 */ \
|
||||||
|
A("in r16, __SREG__") /* 1 Get SREG */ \
|
||||||
|
A("push r16") /* 2 Save SREG into stack */ \
|
||||||
|
A("lds r16, %[timsk0]") /* 2 Load into R0 the Temperature timer Interrupt mask register */ \
|
||||||
|
A("andi r16,~%[msk0]") /* 1 Disable the temperature ISR */ \
|
||||||
|
A("sts %[timsk0], r16") /* 2 And set the new value */ \
|
||||||
|
A("sei") /* 1 Enable global interrupts - It is safe, as the temperature ISR is disabled, so we cannot reenter it */ \
|
||||||
|
A("push r16") /* 2 Save TIMSK0 into stack */ \
|
||||||
|
A("in r16, 0x3B") /* 1 Get RAMPZ register */ \
|
||||||
|
A("push r16") /* 2 Save RAMPZ into stack */ \
|
||||||
|
A("in r16, 0x3C") /* 1 Get EIND register */ \
|
||||||
|
A("push r0") /* C runtime can modify all the following registers without restoring them */ \
|
||||||
|
A("push r1") \
|
||||||
|
A("push r18") \
|
||||||
|
A("push r19") \
|
||||||
|
A("push r20") \
|
||||||
|
A("push r21") \
|
||||||
|
A("push r22") \
|
||||||
|
A("push r23") \
|
||||||
|
A("push r24") \
|
||||||
|
A("push r25") \
|
||||||
|
A("push r26") \
|
||||||
|
A("push r27") \
|
||||||
|
A("push r30") \
|
||||||
|
A("push r31") \
|
||||||
|
A("clr r1") /* C runtime expects this register to be 0 */ \
|
||||||
|
A("call TIMER0_COMPB_vect_bottom") /* Call the bottom handler - No inlining allowed, otherwise registers used are not saved */ \
|
||||||
|
A("pop r31") \
|
||||||
|
A("pop r30") \
|
||||||
|
A("pop r27") \
|
||||||
|
A("pop r26") \
|
||||||
|
A("pop r25") \
|
||||||
|
A("pop r24") \
|
||||||
|
A("pop r23") \
|
||||||
|
A("pop r22") \
|
||||||
|
A("pop r21") \
|
||||||
|
A("pop r20") \
|
||||||
|
A("pop r19") \
|
||||||
|
A("pop r18") \
|
||||||
|
A("pop r1") \
|
||||||
|
A("pop r0") \
|
||||||
|
A("out 0x3C, r16") /* 1 Restore EIND register */ \
|
||||||
|
A("pop r16") /* 2 Get the original RAMPZ register value */ \
|
||||||
|
A("out 0x3B, r16") /* 1 Restore RAMPZ register to its original value */ \
|
||||||
|
A("pop r16") /* 2 Get the original TIMSK0 value but with temperature ISR disabled */ \
|
||||||
|
A("ori r16,%[msk0]") /* 1 Enable temperature ISR */ \
|
||||||
|
A("cli") /* 1 Disable global interrupts - We must do this, as we will reenable the temperature ISR, and we don't want to reenter this handler until the current one is done */ \
|
||||||
|
A("sts %[timsk0], r16") /* 2 And restore the old value */ \
|
||||||
|
A("pop r16") /* 2 Get the old SREG */ \
|
||||||
|
A("out __SREG__, r16") /* 1 And restore the SREG value */ \
|
||||||
|
A("pop r16") /* 2 Restore R16 */ \
|
||||||
|
A("reti") /* 4 Return from interrupt */ \
|
||||||
|
: \
|
||||||
|
: [timsk0] "i"((uint16_t)&TIMSK0), \
|
||||||
|
[msk0] "M" ((uint8_t)(1<<OCIE0B)) \
|
||||||
|
: \
|
||||||
|
); \
|
||||||
|
} \
|
||||||
|
void TIMER0_COMPB_vect_bottom()
|
||||||
|
|
||||||
|
#endif // HAL_TEMP_TIMER_ISR
|
||||||
193
Marlin/src/HAL/AVR/u8g_com_HAL_AVR_sw_spi.cpp
Normal file
193
Marlin/src/HAL/AVR/u8g_com_HAL_AVR_sw_spi.cpp
Normal file
|
|
@ -0,0 +1,193 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Based on u8g_com_st7920_hw_spi.c
|
||||||
|
*
|
||||||
|
* Universal 8bit Graphics Library
|
||||||
|
*
|
||||||
|
* Copyright (c) 2011, olikraus@gmail.com
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without modification,
|
||||||
|
* are permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* * Redistributions of source code must retain the above copyright notice, this list
|
||||||
|
* of conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* * 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.
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined(ARDUINO) && !defined(ARDUINO_ARCH_STM32) && !defined(ARDUINO_ARCH_SAM)
|
||||||
|
|
||||||
|
#include "../../inc/MarlinConfigPre.h"
|
||||||
|
|
||||||
|
#if HAS_MARLINUI_U8GLIB
|
||||||
|
|
||||||
|
#include "../shared/Marduino.h"
|
||||||
|
#include "../shared/Delay.h"
|
||||||
|
|
||||||
|
#include <U8glib.h>
|
||||||
|
|
||||||
|
uint8_t u8g_bitData, u8g_bitNotData, u8g_bitClock, u8g_bitNotClock;
|
||||||
|
volatile uint8_t *u8g_outData, *u8g_outClock;
|
||||||
|
|
||||||
|
static void u8g_com_arduino_init_shift_out(uint8_t dataPin, uint8_t clockPin) {
|
||||||
|
u8g_outData = portOutputRegister(digitalPinToPort(dataPin));
|
||||||
|
u8g_outClock = portOutputRegister(digitalPinToPort(clockPin));
|
||||||
|
u8g_bitData = digitalPinToBitMask(dataPin);
|
||||||
|
u8g_bitClock = digitalPinToBitMask(clockPin);
|
||||||
|
|
||||||
|
u8g_bitNotClock = u8g_bitClock;
|
||||||
|
u8g_bitNotClock ^= 0xFF;
|
||||||
|
|
||||||
|
u8g_bitNotData = u8g_bitData;
|
||||||
|
u8g_bitNotData ^= 0xFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
void u8g_spiSend_sw_AVR_mode_0(uint8_t val) {
|
||||||
|
uint8_t bitData = u8g_bitData,
|
||||||
|
bitNotData = u8g_bitNotData,
|
||||||
|
bitClock = u8g_bitClock,
|
||||||
|
bitNotClock = u8g_bitNotClock;
|
||||||
|
volatile uint8_t *outData = u8g_outData,
|
||||||
|
*outClock = u8g_outClock;
|
||||||
|
U8G_ATOMIC_START();
|
||||||
|
LOOP_L_N(i, 8) {
|
||||||
|
if (val & 0x80)
|
||||||
|
*outData |= bitData;
|
||||||
|
else
|
||||||
|
*outData &= bitNotData;
|
||||||
|
*outClock |= bitClock;
|
||||||
|
val <<= 1;
|
||||||
|
*outClock &= bitNotClock;
|
||||||
|
}
|
||||||
|
U8G_ATOMIC_END();
|
||||||
|
}
|
||||||
|
|
||||||
|
void u8g_spiSend_sw_AVR_mode_3(uint8_t val) {
|
||||||
|
uint8_t bitData = u8g_bitData,
|
||||||
|
bitNotData = u8g_bitNotData,
|
||||||
|
bitClock = u8g_bitClock,
|
||||||
|
bitNotClock = u8g_bitNotClock;
|
||||||
|
volatile uint8_t *outData = u8g_outData,
|
||||||
|
*outClock = u8g_outClock;
|
||||||
|
U8G_ATOMIC_START();
|
||||||
|
LOOP_L_N(i, 8) {
|
||||||
|
*outClock &= bitNotClock;
|
||||||
|
if (val & 0x80)
|
||||||
|
*outData |= bitData;
|
||||||
|
else
|
||||||
|
*outData &= bitNotData;
|
||||||
|
*outClock |= bitClock;
|
||||||
|
val <<= 1;
|
||||||
|
}
|
||||||
|
U8G_ATOMIC_END();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if ENABLED(FYSETC_MINI_12864)
|
||||||
|
#define SPISEND_SW_AVR u8g_spiSend_sw_AVR_mode_3
|
||||||
|
#else
|
||||||
|
#define SPISEND_SW_AVR u8g_spiSend_sw_AVR_mode_0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
uint8_t u8g_com_HAL_AVR_sw_sp_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) {
|
||||||
|
switch (msg) {
|
||||||
|
case U8G_COM_MSG_INIT:
|
||||||
|
u8g_com_arduino_init_shift_out(u8g->pin_list[U8G_PI_MOSI], u8g->pin_list[U8G_PI_SCK]);
|
||||||
|
u8g_com_arduino_assign_pin_output_high(u8g);
|
||||||
|
u8g_com_arduino_digital_write(u8g, U8G_PI_SCK, 0);
|
||||||
|
u8g_com_arduino_digital_write(u8g, U8G_PI_MOSI, 0);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case U8G_COM_MSG_STOP:
|
||||||
|
break;
|
||||||
|
|
||||||
|
case U8G_COM_MSG_RESET:
|
||||||
|
if (U8G_PIN_NONE != u8g->pin_list[U8G_PI_RESET]) u8g_com_arduino_digital_write(u8g, U8G_PI_RESET, arg_val);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case U8G_COM_MSG_CHIP_SELECT:
|
||||||
|
#if ENABLED(FYSETC_MINI_12864) // LCD SPI is running mode 3 while SD card is running mode 0
|
||||||
|
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
|
||||||
|
// the next chip select goes active
|
||||||
|
u8g_com_arduino_digital_write(u8g, U8G_PI_SCK, 1); // Set SCK to mode 3 idle state before CS goes active
|
||||||
|
u8g_com_arduino_digital_write(u8g, U8G_PI_CS, LOW);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
u8g_com_arduino_digital_write(u8g, U8G_PI_CS, HIGH);
|
||||||
|
u8g_com_arduino_digital_write(u8g, U8G_PI_SCK, 0); // Set SCK to mode 0 idle state after CS goes inactive
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
u8g_com_arduino_digital_write(u8g, U8G_PI_CS, !arg_val);
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
|
|
||||||
|
case U8G_COM_MSG_WRITE_BYTE:
|
||||||
|
SPISEND_SW_AVR(arg_val);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case U8G_COM_MSG_WRITE_SEQ: {
|
||||||
|
uint8_t *ptr = (uint8_t *)arg_ptr;
|
||||||
|
while (arg_val > 0) {
|
||||||
|
SPISEND_SW_AVR(*ptr++);
|
||||||
|
arg_val--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case U8G_COM_MSG_WRITE_SEQ_P: {
|
||||||
|
uint8_t *ptr = (uint8_t *)arg_ptr;
|
||||||
|
while (arg_val > 0) {
|
||||||
|
SPISEND_SW_AVR(u8g_pgm_read(ptr));
|
||||||
|
ptr++;
|
||||||
|
arg_val--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case U8G_COM_MSG_ADDRESS: /* define cmd (arg_val = 0) or data mode (arg_val = 1) */
|
||||||
|
u8g_com_arduino_digital_write(u8g, U8G_PI_A0, arg_val);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // HAS_MARLINUI_U8GLIB
|
||||||
|
#endif // ARDUINO_ARCH_SAM
|
||||||
70
Marlin/src/HAL/AVR/watchdog.cpp
Normal file
70
Marlin/src/HAL/AVR/watchdog.cpp
Normal file
|
|
@ -0,0 +1,70 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#ifdef __AVR__
|
||||||
|
|
||||||
|
#include "../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
|
#if ENABLED(USE_WATCHDOG)
|
||||||
|
|
||||||
|
#include "watchdog.h"
|
||||||
|
|
||||||
|
#include "../../MarlinCore.h"
|
||||||
|
|
||||||
|
// Initialize watchdog with 8s timeout, if possible. Otherwise, make it 4s.
|
||||||
|
void watchdog_init() {
|
||||||
|
#if ENABLED(WATCHDOG_DURATION_8S) && defined(WDTO_8S)
|
||||||
|
#define WDTO_NS WDTO_8S
|
||||||
|
#else
|
||||||
|
#define WDTO_NS WDTO_4S
|
||||||
|
#endif
|
||||||
|
#if ENABLED(WATCHDOG_RESET_MANUAL)
|
||||||
|
// Enable the watchdog timer, but only for the interrupt.
|
||||||
|
// Take care, as this requires the correct order of operation, with interrupts disabled.
|
||||||
|
// See the datasheet of any AVR chip for details.
|
||||||
|
wdt_reset();
|
||||||
|
cli();
|
||||||
|
_WD_CONTROL_REG = _BV(_WD_CHANGE_BIT) | _BV(WDE);
|
||||||
|
_WD_CONTROL_REG = _BV(WDIE) | (WDTO_NS & 0x07) | ((WDTO_NS & 0x08) << 2); // WDTO_NS directly does not work. bit 0-2 are consecutive in the register but the highest value bit is at bit 5
|
||||||
|
// So worked for up to WDTO_2S
|
||||||
|
sei();
|
||||||
|
wdt_reset();
|
||||||
|
#else
|
||||||
|
wdt_enable(WDTO_NS); // The function handles the upper bit correct.
|
||||||
|
#endif
|
||||||
|
//delay(10000); // test it!
|
||||||
|
}
|
||||||
|
|
||||||
|
//===========================================================================
|
||||||
|
//=================================== ISR ===================================
|
||||||
|
//===========================================================================
|
||||||
|
|
||||||
|
// Watchdog timer interrupt, called if main program blocks >4sec and manual reset is enabled.
|
||||||
|
#if ENABLED(WATCHDOG_RESET_MANUAL)
|
||||||
|
ISR(WDT_vect) {
|
||||||
|
sei(); // With the interrupt driven serial we need to allow interrupts.
|
||||||
|
SERIAL_ERROR_MSG(STR_WATCHDOG_FIRED);
|
||||||
|
minkill(); // interrupt-safe final kill and infinite loop
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // USE_WATCHDOG
|
||||||
|
#endif // __AVR__
|
||||||
31
Marlin/src/HAL/AVR/watchdog.h
Normal file
31
Marlin/src/HAL/AVR/watchdog.h
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <avr/wdt.h>
|
||||||
|
|
||||||
|
// Initialize watchdog with a 4 second interrupt time
|
||||||
|
void watchdog_init();
|
||||||
|
|
||||||
|
// Reset watchdog. MUST be called at least every 4 seconds after the
|
||||||
|
// first watchdog_init or AVR will go into emergency procedures.
|
||||||
|
inline void HAL_watchdog_refresh() { wdt_reset(); }
|
||||||
342
Marlin/src/HAL/DUE/DebugMonitor.cpp
Normal file
342
Marlin/src/HAL/DUE/DebugMonitor.cpp
Normal file
|
|
@ -0,0 +1,342 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#ifdef ARDUINO_ARCH_SAM
|
||||||
|
|
||||||
|
#include "../../core/macros.h"
|
||||||
|
#include "../../core/serial.h"
|
||||||
|
|
||||||
|
#include "../shared/backtrace/unwinder.h"
|
||||||
|
#include "../shared/backtrace/unwmemaccess.h"
|
||||||
|
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
// Debug monitor that dumps to the Programming port all status when
|
||||||
|
// an exception or WDT timeout happens - And then resets the board
|
||||||
|
|
||||||
|
// All the Monitor routines must run with interrupts disabled and
|
||||||
|
// under an ISR execution context. That is why we cannot reuse the
|
||||||
|
// Serial interrupt routines or any C runtime, as we don't know the
|
||||||
|
// state we are when running them
|
||||||
|
|
||||||
|
// A SW memory barrier, to ensure GCC does not overoptimize loops
|
||||||
|
#define sw_barrier() __asm__ volatile("": : :"memory");
|
||||||
|
|
||||||
|
// (re)initialize UART0 as a monitor output to 250000,n,8,1
|
||||||
|
static void TXBegin() {
|
||||||
|
|
||||||
|
// Disable UART interrupt in NVIC
|
||||||
|
NVIC_DisableIRQ( UART_IRQn );
|
||||||
|
|
||||||
|
// We NEED memory barriers to ensure Interrupts are actually disabled!
|
||||||
|
// ( https://dzone.com/articles/nvic-disabling-interrupts-on-arm-cortex-m-and-the )
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
|
||||||
|
// Disable clock
|
||||||
|
pmc_disable_periph_clk( ID_UART );
|
||||||
|
|
||||||
|
// Configure PMC
|
||||||
|
pmc_enable_periph_clk( ID_UART );
|
||||||
|
|
||||||
|
// Disable PDC channel
|
||||||
|
UART->UART_PTCR = UART_PTCR_RXTDIS | UART_PTCR_TXTDIS;
|
||||||
|
|
||||||
|
// Reset and disable receiver and transmitter
|
||||||
|
UART->UART_CR = UART_CR_RSTRX | UART_CR_RSTTX | UART_CR_RXDIS | UART_CR_TXDIS;
|
||||||
|
|
||||||
|
// Configure mode: 8bit, No parity, 1 bit stop
|
||||||
|
UART->UART_MR = UART_MR_CHMODE_NORMAL | US_MR_CHRL_8_BIT | US_MR_NBSTOP_1_BIT | UART_MR_PAR_NO;
|
||||||
|
|
||||||
|
// Configure baudrate (asynchronous, no oversampling) to BAUDRATE bauds
|
||||||
|
UART->UART_BRGR = (SystemCoreClock / (BAUDRATE << 4));
|
||||||
|
|
||||||
|
// Enable receiver and transmitter
|
||||||
|
UART->UART_CR = UART_CR_RXEN | UART_CR_TXEN;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Send character through UART with no interrupts
|
||||||
|
static void TX(char c) {
|
||||||
|
while (!(UART->UART_SR & UART_SR_TXRDY)) { WDT_Restart(WDT); sw_barrier(); };
|
||||||
|
UART->UART_THR = c;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Send String through UART
|
||||||
|
static void TX(const char* s) {
|
||||||
|
while (*s) TX(*s++);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void TXDigit(uint32_t d) {
|
||||||
|
if (d < 10) TX((char)(d+'0'));
|
||||||
|
else if (d < 16) TX((char)(d+'A'-10));
|
||||||
|
else TX('?');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Send Hex number thru UART
|
||||||
|
static void TXHex(uint32_t v) {
|
||||||
|
TX("0x");
|
||||||
|
for (uint8_t i = 0; i < 8; i++, v <<= 4)
|
||||||
|
TXDigit((v >> 28) & 0xF);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Send Decimal number thru UART
|
||||||
|
static void TXDec(uint32_t v) {
|
||||||
|
if (!v) {
|
||||||
|
TX('0');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
char nbrs[14];
|
||||||
|
char *p = &nbrs[0];
|
||||||
|
while (v != 0) {
|
||||||
|
*p++ = '0' + (v % 10);
|
||||||
|
v /= 10;
|
||||||
|
}
|
||||||
|
do {
|
||||||
|
p--;
|
||||||
|
TX(*p);
|
||||||
|
} while (p != &nbrs[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Dump a backtrace entry
|
||||||
|
static bool UnwReportOut(void* ctx, const UnwReport* bte) {
|
||||||
|
int* p = (int*)ctx;
|
||||||
|
|
||||||
|
(*p)++;
|
||||||
|
TX('#'); TXDec(*p); TX(" : ");
|
||||||
|
TX(bte->name?bte->name:"unknown"); TX('@'); TXHex(bte->function);
|
||||||
|
TX('+'); TXDec(bte->address - bte->function);
|
||||||
|
TX(" PC:");TXHex(bte->address); TX('\n');
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef UNW_DEBUG
|
||||||
|
void UnwPrintf(const char* format, ...) {
|
||||||
|
char dest[256];
|
||||||
|
va_list argptr;
|
||||||
|
va_start(argptr, format);
|
||||||
|
vsprintf(dest, format, argptr);
|
||||||
|
va_end(argptr);
|
||||||
|
TX(&dest[0]);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Table of function pointers for passing to the unwinder */
|
||||||
|
static const UnwindCallbacks UnwCallbacks = {
|
||||||
|
UnwReportOut,
|
||||||
|
UnwReadW,
|
||||||
|
UnwReadH,
|
||||||
|
UnwReadB
|
||||||
|
#ifdef UNW_DEBUG
|
||||||
|
, UnwPrintf
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* HardFaultHandler_C:
|
||||||
|
* This is called from the HardFault_HandlerAsm with a pointer the Fault stack
|
||||||
|
* as the parameter. We can then read the values from the stack and place them
|
||||||
|
* into local variables for ease of reading.
|
||||||
|
* We then read the various Fault Status and Address Registers to help decode
|
||||||
|
* cause of the fault.
|
||||||
|
* The function ends with a BKPT instruction to force control back into the debugger
|
||||||
|
*/
|
||||||
|
extern "C"
|
||||||
|
void HardFault_HandlerC(unsigned long *sp, unsigned long lr, unsigned long cause) {
|
||||||
|
|
||||||
|
static const char* causestr[] = {
|
||||||
|
"NMI","Hard","Mem","Bus","Usage","Debug","WDT","RSTC"
|
||||||
|
};
|
||||||
|
|
||||||
|
UnwindFrame btf;
|
||||||
|
|
||||||
|
// Dump report to the Programming port (interrupts are DISABLED)
|
||||||
|
TXBegin();
|
||||||
|
TX("\n\n## Software Fault detected ##\n");
|
||||||
|
TX("Cause: "); TX(causestr[cause]); TX('\n');
|
||||||
|
|
||||||
|
TX("R0 : "); TXHex(((unsigned long)sp[0])); TX('\n');
|
||||||
|
TX("R1 : "); TXHex(((unsigned long)sp[1])); TX('\n');
|
||||||
|
TX("R2 : "); TXHex(((unsigned long)sp[2])); TX('\n');
|
||||||
|
TX("R3 : "); TXHex(((unsigned long)sp[3])); TX('\n');
|
||||||
|
TX("R12 : "); TXHex(((unsigned long)sp[4])); TX('\n');
|
||||||
|
TX("LR : "); TXHex(((unsigned long)sp[5])); TX('\n');
|
||||||
|
TX("PC : "); TXHex(((unsigned long)sp[6])); TX('\n');
|
||||||
|
TX("PSR : "); TXHex(((unsigned long)sp[7])); TX('\n');
|
||||||
|
|
||||||
|
// Configurable Fault Status Register
|
||||||
|
// Consists of MMSR, BFSR and UFSR
|
||||||
|
TX("CFSR : "); TXHex((*((volatile unsigned long *)(0xE000ED28)))); TX('\n');
|
||||||
|
|
||||||
|
// Hard Fault Status Register
|
||||||
|
TX("HFSR : "); TXHex((*((volatile unsigned long *)(0xE000ED2C)))); TX('\n');
|
||||||
|
|
||||||
|
// Debug Fault Status Register
|
||||||
|
TX("DFSR : "); TXHex((*((volatile unsigned long *)(0xE000ED30)))); TX('\n');
|
||||||
|
|
||||||
|
// Auxiliary Fault Status Register
|
||||||
|
TX("AFSR : "); TXHex((*((volatile unsigned long *)(0xE000ED3C)))); TX('\n');
|
||||||
|
|
||||||
|
// Read the Fault Address Registers. These may not contain valid values.
|
||||||
|
// Check BFARVALID/MMARVALID to see if they are valid values
|
||||||
|
// MemManage Fault Address Register
|
||||||
|
TX("MMAR : "); TXHex((*((volatile unsigned long *)(0xE000ED34)))); TX('\n');
|
||||||
|
|
||||||
|
// Bus Fault Address Register
|
||||||
|
TX("BFAR : "); TXHex((*((volatile unsigned long *)(0xE000ED38)))); TX('\n');
|
||||||
|
|
||||||
|
TX("ExcLR: "); TXHex(lr); TX('\n');
|
||||||
|
TX("ExcSP: "); TXHex((unsigned long)sp); TX('\n');
|
||||||
|
|
||||||
|
btf.sp = ((unsigned long)sp) + 8*4; // The original stack pointer
|
||||||
|
btf.fp = btf.sp;
|
||||||
|
btf.lr = ((unsigned long)sp[5]);
|
||||||
|
btf.pc = ((unsigned long)sp[6]) | 1; // Force Thumb, as CORTEX only support it
|
||||||
|
|
||||||
|
// Perform a backtrace
|
||||||
|
TX("\nBacktrace:\n\n");
|
||||||
|
int ctr = 0;
|
||||||
|
UnwindStart(&btf, &UnwCallbacks, &ctr);
|
||||||
|
|
||||||
|
// Disable all NVIC interrupts
|
||||||
|
NVIC->ICER[0] = 0xFFFFFFFF;
|
||||||
|
NVIC->ICER[1] = 0xFFFFFFFF;
|
||||||
|
|
||||||
|
// Relocate VTOR table to default position
|
||||||
|
SCB->VTOR = 0;
|
||||||
|
|
||||||
|
// Disable USB
|
||||||
|
otg_disable();
|
||||||
|
|
||||||
|
// Restart watchdog
|
||||||
|
WDT_Restart(WDT);
|
||||||
|
|
||||||
|
// Reset controller
|
||||||
|
NVIC_SystemReset();
|
||||||
|
for (;;) WDT_Restart(WDT);
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__((naked)) void NMI_Handler() {
|
||||||
|
__asm__ __volatile__ (
|
||||||
|
".syntax unified" "\n\t"
|
||||||
|
A("tst lr, #4")
|
||||||
|
A("ite eq")
|
||||||
|
A("mrseq r0, msp")
|
||||||
|
A("mrsne r0, psp")
|
||||||
|
A("mov r1,lr")
|
||||||
|
A("mov r2,#0")
|
||||||
|
A("b HardFault_HandlerC")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__((naked)) void HardFault_Handler() {
|
||||||
|
__asm__ __volatile__ (
|
||||||
|
".syntax unified" "\n\t"
|
||||||
|
A("tst lr, #4")
|
||||||
|
A("ite eq")
|
||||||
|
A("mrseq r0, msp")
|
||||||
|
A("mrsne r0, psp")
|
||||||
|
A("mov r1,lr")
|
||||||
|
A("mov r2,#1")
|
||||||
|
A("b HardFault_HandlerC")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__((naked)) void MemManage_Handler() {
|
||||||
|
__asm__ __volatile__ (
|
||||||
|
".syntax unified" "\n\t"
|
||||||
|
A("tst lr, #4")
|
||||||
|
A("ite eq")
|
||||||
|
A("mrseq r0, msp")
|
||||||
|
A("mrsne r0, psp")
|
||||||
|
A("mov r1,lr")
|
||||||
|
A("mov r2,#2")
|
||||||
|
A("b HardFault_HandlerC")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__((naked)) void BusFault_Handler() {
|
||||||
|
__asm__ __volatile__ (
|
||||||
|
".syntax unified" "\n\t"
|
||||||
|
A("tst lr, #4")
|
||||||
|
A("ite eq")
|
||||||
|
A("mrseq r0, msp")
|
||||||
|
A("mrsne r0, psp")
|
||||||
|
A("mov r1,lr")
|
||||||
|
A("mov r2,#3")
|
||||||
|
A("b HardFault_HandlerC")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__((naked)) void UsageFault_Handler() {
|
||||||
|
__asm__ __volatile__ (
|
||||||
|
".syntax unified" "\n\t"
|
||||||
|
A("tst lr, #4")
|
||||||
|
A("ite eq")
|
||||||
|
A("mrseq r0, msp")
|
||||||
|
A("mrsne r0, psp")
|
||||||
|
A("mov r1,lr")
|
||||||
|
A("mov r2,#4")
|
||||||
|
A("b HardFault_HandlerC")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__((naked)) void DebugMon_Handler() {
|
||||||
|
__asm__ __volatile__ (
|
||||||
|
".syntax unified" "\n\t"
|
||||||
|
A("tst lr, #4")
|
||||||
|
A("ite eq")
|
||||||
|
A("mrseq r0, msp")
|
||||||
|
A("mrsne r0, psp")
|
||||||
|
A("mov r1,lr")
|
||||||
|
A("mov r2,#5")
|
||||||
|
A("b HardFault_HandlerC")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* This is NOT an exception, it is an interrupt handler - Nevertheless, the framing is the same */
|
||||||
|
__attribute__((naked)) void WDT_Handler() {
|
||||||
|
__asm__ __volatile__ (
|
||||||
|
".syntax unified" "\n\t"
|
||||||
|
A("tst lr, #4")
|
||||||
|
A("ite eq")
|
||||||
|
A("mrseq r0, msp")
|
||||||
|
A("mrsne r0, psp")
|
||||||
|
A("mov r1,lr")
|
||||||
|
A("mov r2,#6")
|
||||||
|
A("b HardFault_HandlerC")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__((naked)) void RSTC_Handler() {
|
||||||
|
__asm__ __volatile__ (
|
||||||
|
".syntax unified" "\n\t"
|
||||||
|
A("tst lr, #4")
|
||||||
|
A("ite eq")
|
||||||
|
A("mrseq r0, msp")
|
||||||
|
A("mrsne r0, psp")
|
||||||
|
A("mov r1,lr")
|
||||||
|
A("mov r2,#7")
|
||||||
|
A("b HardFault_HandlerC")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // ARDUINO_ARCH_SAM
|
||||||
105
Marlin/src/HAL/DUE/HAL.cpp
Normal file
105
Marlin/src/HAL/DUE/HAL.cpp
Normal file
|
|
@ -0,0 +1,105 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* HAL for Arduino Due and compatible (SAM3X8E)
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef ARDUINO_ARCH_SAM
|
||||||
|
|
||||||
|
#include "../../inc/MarlinConfig.h"
|
||||||
|
#include "HAL.h"
|
||||||
|
|
||||||
|
#include <Wire.h>
|
||||||
|
#include "usb/usb_task.h"
|
||||||
|
|
||||||
|
// ------------------------
|
||||||
|
// Public Variables
|
||||||
|
// ------------------------
|
||||||
|
|
||||||
|
uint16_t HAL_adc_result;
|
||||||
|
|
||||||
|
// ------------------------
|
||||||
|
// Public functions
|
||||||
|
// ------------------------
|
||||||
|
|
||||||
|
// HAL initialization task
|
||||||
|
void HAL_init() {
|
||||||
|
// Initialize the USB stack
|
||||||
|
#if ENABLED(SDSUPPORT)
|
||||||
|
OUT_WRITE(SDSS, HIGH); // Try to set SDSS inactive before any other SPI users start up
|
||||||
|
#endif
|
||||||
|
usb_task_init();
|
||||||
|
}
|
||||||
|
|
||||||
|
// HAL idle task
|
||||||
|
void HAL_idletask() {
|
||||||
|
// Perform USB stack housekeeping
|
||||||
|
usb_task_idle();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Disable interrupts
|
||||||
|
void cli() { noInterrupts(); }
|
||||||
|
|
||||||
|
// Enable interrupts
|
||||||
|
void sei() { interrupts(); }
|
||||||
|
|
||||||
|
void HAL_clear_reset_source() { }
|
||||||
|
|
||||||
|
uint8_t HAL_get_reset_source() {
|
||||||
|
switch ((RSTC->RSTC_SR >> 8) & 0x07) {
|
||||||
|
case 0: return RST_POWER_ON;
|
||||||
|
case 1: return RST_BACKUP;
|
||||||
|
case 2: return RST_WATCHDOG;
|
||||||
|
case 3: return RST_SOFTWARE;
|
||||||
|
case 4: return RST_EXTERNAL;
|
||||||
|
default: return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void _delay_ms(const int delay_ms) {
|
||||||
|
// Todo: port for Due?
|
||||||
|
delay(delay_ms);
|
||||||
|
}
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
extern unsigned int _ebss; // end of bss section
|
||||||
|
}
|
||||||
|
|
||||||
|
// Return free memory between end of heap (or end bss) and whatever is current
|
||||||
|
int freeMemory() {
|
||||||
|
int free_memory, heap_end = (int)_sbrk(0);
|
||||||
|
return (int)&free_memory - (heap_end ?: (int)&_ebss);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ------------------------
|
||||||
|
// ADC
|
||||||
|
// ------------------------
|
||||||
|
|
||||||
|
void HAL_adc_start_conversion(const uint8_t ch) {
|
||||||
|
HAL_adc_result = analogRead(ch);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint16_t HAL_adc_get_result() {
|
||||||
|
// nop
|
||||||
|
return HAL_adc_result;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // ARDUINO_ARCH_SAM
|
||||||
167
Marlin/src/HAL/DUE/HAL.h
Normal file
167
Marlin/src/HAL/DUE/HAL.h
Normal file
|
|
@ -0,0 +1,167 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
*
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
|
||||||
|
* Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
/**
|
||||||
|
* HAL for Arduino Due and compatible (SAM3X8E)
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define CPU_32_BIT
|
||||||
|
|
||||||
|
#include "../shared/Marduino.h"
|
||||||
|
#include "../shared/eeprom_if.h"
|
||||||
|
#include "../shared/math_32bit.h"
|
||||||
|
#include "../shared/HAL_SPI.h"
|
||||||
|
#include "fastio.h"
|
||||||
|
#include "watchdog.h"
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#define _MSERIAL(X) Serial##X
|
||||||
|
#define MSERIAL(X) _MSERIAL(X)
|
||||||
|
#define Serial0 Serial
|
||||||
|
|
||||||
|
// Define MYSERIAL0/1 before MarlinSerial includes!
|
||||||
|
#if SERIAL_PORT == -1 || ENABLED(EMERGENCY_PARSER)
|
||||||
|
#define MYSERIAL0 customizedSerial1
|
||||||
|
#elif WITHIN(SERIAL_PORT, 0, 3)
|
||||||
|
#define MYSERIAL0 MSERIAL(SERIAL_PORT)
|
||||||
|
#else
|
||||||
|
#error "The required SERIAL_PORT must be from -1 to 3. Please update your configuration."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef SERIAL_PORT_2
|
||||||
|
#if SERIAL_PORT_2 == -1 || ENABLED(EMERGENCY_PARSER)
|
||||||
|
#define MYSERIAL1 customizedSerial2
|
||||||
|
#elif WITHIN(SERIAL_PORT_2, 0, 3)
|
||||||
|
#define MYSERIAL1 MSERIAL(SERIAL_PORT_2)
|
||||||
|
#else
|
||||||
|
#error "SERIAL_PORT_2 must be from -1 to 3. Please update your configuration."
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef LCD_SERIAL_PORT
|
||||||
|
#if LCD_SERIAL_PORT == -1
|
||||||
|
#define LCD_SERIAL lcdSerial
|
||||||
|
#elif WITHIN(LCD_SERIAL_PORT, 0, 3)
|
||||||
|
#define LCD_SERIAL MSERIAL(LCD_SERIAL_PORT)
|
||||||
|
#else
|
||||||
|
#error "LCD_SERIAL_PORT must be from -1 to 3. Please update your configuration."
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "MarlinSerial.h"
|
||||||
|
#include "MarlinSerialUSB.h"
|
||||||
|
|
||||||
|
// On AVR this is in math.h?
|
||||||
|
#define square(x) ((x)*(x))
|
||||||
|
|
||||||
|
#ifndef strncpy_P
|
||||||
|
#define strncpy_P(dest, src, num) strncpy((dest), (src), (num))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Fix bug in pgm_read_ptr
|
||||||
|
#undef pgm_read_ptr
|
||||||
|
#define pgm_read_ptr(addr) (*((void**)(addr)))
|
||||||
|
#undef pgm_read_word
|
||||||
|
#define pgm_read_word(addr) (*((uint16_t*)(addr)))
|
||||||
|
|
||||||
|
typedef int8_t pin_t;
|
||||||
|
|
||||||
|
#define SHARED_SERVOS HAS_SERVOS
|
||||||
|
#define HAL_SERVO_LIB Servo
|
||||||
|
|
||||||
|
//
|
||||||
|
// Interrupts
|
||||||
|
//
|
||||||
|
#define CRITICAL_SECTION_START() uint32_t primask = __get_PRIMASK(); __disable_irq()
|
||||||
|
#define CRITICAL_SECTION_END() if (!primask) __enable_irq()
|
||||||
|
#define ISRS_ENABLED() (!__get_PRIMASK())
|
||||||
|
#define ENABLE_ISRS() __enable_irq()
|
||||||
|
#define DISABLE_ISRS() __disable_irq()
|
||||||
|
|
||||||
|
void cli(); // Disable interrupts
|
||||||
|
void sei(); // Enable interrupts
|
||||||
|
|
||||||
|
void HAL_clear_reset_source(); // clear reset reason
|
||||||
|
uint8_t HAL_get_reset_source(); // get reset reason
|
||||||
|
|
||||||
|
inline void HAL_reboot() {} // reboot the board or restart the bootloader
|
||||||
|
|
||||||
|
//
|
||||||
|
// ADC
|
||||||
|
//
|
||||||
|
extern uint16_t HAL_adc_result; // result of last ADC conversion
|
||||||
|
|
||||||
|
#ifndef analogInputToDigitalPin
|
||||||
|
#define analogInputToDigitalPin(p) ((p < 12U) ? (p) + 54U : -1)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define HAL_ANALOG_SELECT(ch)
|
||||||
|
|
||||||
|
inline void HAL_adc_init() {}//todo
|
||||||
|
|
||||||
|
#define HAL_ADC_VREF 3.3
|
||||||
|
#define HAL_ADC_RESOLUTION 10
|
||||||
|
#define HAL_START_ADC(ch) HAL_adc_start_conversion(ch)
|
||||||
|
#define HAL_READ_ADC() HAL_adc_result
|
||||||
|
#define HAL_ADC_READY() true
|
||||||
|
|
||||||
|
void HAL_adc_start_conversion(const uint8_t ch);
|
||||||
|
uint16_t HAL_adc_get_result();
|
||||||
|
|
||||||
|
//
|
||||||
|
// Pin Map
|
||||||
|
//
|
||||||
|
#define GET_PIN_MAP_PIN(index) index
|
||||||
|
#define GET_PIN_MAP_INDEX(pin) pin
|
||||||
|
#define PARSED_PIN_INDEX(code, dval) parser.intval(code, dval)
|
||||||
|
|
||||||
|
//
|
||||||
|
// Tone
|
||||||
|
//
|
||||||
|
void toneInit();
|
||||||
|
void tone(const pin_t _pin, const unsigned int frequency, const unsigned long duration=0);
|
||||||
|
void noTone(const pin_t _pin);
|
||||||
|
|
||||||
|
// Enable hooks into idle and setup for HAL
|
||||||
|
#define HAL_IDLETASK 1
|
||||||
|
void HAL_idletask();
|
||||||
|
void HAL_init();
|
||||||
|
|
||||||
|
//
|
||||||
|
// Utility functions
|
||||||
|
//
|
||||||
|
void _delay_ms(const int delay);
|
||||||
|
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wunused-function"
|
||||||
|
int freeMemory();
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
char *dtostrf(double __val, signed char __width, unsigned char __prec, char *__s);
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
825
Marlin/src/HAL/DUE/HAL_SPI.cpp
Normal file
825
Marlin/src/HAL/DUE/HAL_SPI.cpp
Normal file
|
|
@ -0,0 +1,825 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Software SPI functions originally from Arduino Sd2Card Library
|
||||||
|
* Copyright (c) 2009 by William Greiman
|
||||||
|
*
|
||||||
|
* Completely rewritten and tuned by Eduardo José Tagle in 2017/2018
|
||||||
|
* in ARM thumb2 inline assembler and tuned for maximum speed and performance
|
||||||
|
* allowing SPI clocks of up to 12 Mhz to increase SD card read/write performance
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* HAL for Arduino Due and compatible (SAM3X8E)
|
||||||
|
*
|
||||||
|
* For ARDUINO_ARCH_SAM
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef ARDUINO_ARCH_SAM
|
||||||
|
|
||||||
|
#include "../../inc/MarlinConfig.h"
|
||||||
|
#include "../shared/Delay.h"
|
||||||
|
|
||||||
|
// ------------------------
|
||||||
|
// Public functions
|
||||||
|
// ------------------------
|
||||||
|
|
||||||
|
#if EITHER(DUE_SOFTWARE_SPI, FORCE_SOFT_SPI)
|
||||||
|
|
||||||
|
// ------------------------
|
||||||
|
// Software SPI
|
||||||
|
// ------------------------
|
||||||
|
|
||||||
|
// Make sure GCC optimizes this file.
|
||||||
|
// Note that this line triggers a bug in GCC which is fixed by casting.
|
||||||
|
// See the note below.
|
||||||
|
#pragma GCC optimize (3)
|
||||||
|
|
||||||
|
typedef uint8_t (*pfnSpiTransfer)(uint8_t b);
|
||||||
|
typedef void (*pfnSpiRxBlock)(uint8_t* buf, uint32_t nbyte);
|
||||||
|
typedef void (*pfnSpiTxBlock)(const uint8_t* buf, uint32_t nbyte);
|
||||||
|
|
||||||
|
/* ---------------- Macros to be able to access definitions from asm */
|
||||||
|
#define _PORT(IO) DIO ## IO ## _WPORT
|
||||||
|
#define _PIN_MASK(IO) MASK(DIO ## IO ## _PIN)
|
||||||
|
#define _PIN_SHIFT(IO) DIO ## IO ## _PIN
|
||||||
|
#define PORT(IO) _PORT(IO)
|
||||||
|
#define PIN_MASK(IO) _PIN_MASK(IO)
|
||||||
|
#define PIN_SHIFT(IO) _PIN_SHIFT(IO)
|
||||||
|
|
||||||
|
// run at ~8 .. ~10Mhz - Tx version (Rx data discarded)
|
||||||
|
static uint8_t spiTransferTx0(uint8_t bout) { // using Mode 0
|
||||||
|
uint32_t MOSI_PORT_PLUS30 = ((uint32_t) PORT(MOSI_PIN)) + 0x30; /* SODR of port */
|
||||||
|
uint32_t MOSI_MASK = PIN_MASK(MOSI_PIN);
|
||||||
|
uint32_t SCK_PORT_PLUS30 = ((uint32_t) PORT(SCK_PIN)) + 0x30; /* SODR of port */
|
||||||
|
uint32_t SCK_MASK = PIN_MASK(SCK_PIN);
|
||||||
|
uint32_t idx = 0;
|
||||||
|
|
||||||
|
/* Negate bout, as the assembler requires a negated value */
|
||||||
|
bout = ~bout;
|
||||||
|
|
||||||
|
/* The software SPI routine */
|
||||||
|
__asm__ __volatile__(
|
||||||
|
A(".syntax unified") // is to prevent CM0,CM1 non-unified syntax
|
||||||
|
|
||||||
|
/* Bit 7 */
|
||||||
|
A("ubfx %[idx],%[txval],#7,#1") /* Place bit 7 in bit 0 of idx*/
|
||||||
|
|
||||||
|
A("str %[mosi_mask],[%[mosi_port], %[idx],LSL #2]") /* Access the proper SODR or CODR registers based on that bit */
|
||||||
|
A("str %[sck_mask],[%[sck_port]]") /* SODR */
|
||||||
|
A("ubfx %[idx],%[txval],#6,#1") /* Place bit 6 in bit 0 of idx*/
|
||||||
|
A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
|
||||||
|
|
||||||
|
/* Bit 6 */
|
||||||
|
A("str %[mosi_mask],[%[mosi_port], %[idx],LSL #2]") /* Access the proper SODR or CODR registers based on that bit */
|
||||||
|
A("str %[sck_mask],[%[sck_port]]") /* SODR */
|
||||||
|
A("ubfx %[idx],%[txval],#5,#1") /* Place bit 5 in bit 0 of idx*/
|
||||||
|
A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
|
||||||
|
|
||||||
|
/* Bit 5 */
|
||||||
|
A("str %[mosi_mask],[%[mosi_port], %[idx],LSL #2]") /* Access the proper SODR or CODR registers based on that bit */
|
||||||
|
A("str %[sck_mask],[%[sck_port]]") /* SODR */
|
||||||
|
A("ubfx %[idx],%[txval],#4,#1") /* Place bit 4 in bit 0 of idx*/
|
||||||
|
A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
|
||||||
|
|
||||||
|
/* Bit 4 */
|
||||||
|
A("str %[mosi_mask],[%[mosi_port], %[idx],LSL #2]") /* Access the proper SODR or CODR registers based on that bit */
|
||||||
|
A("str %[sck_mask],[%[sck_port]]") /* SODR */
|
||||||
|
A("ubfx %[idx],%[txval],#3,#1") /* Place bit 3 in bit 0 of idx*/
|
||||||
|
A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
|
||||||
|
|
||||||
|
/* Bit 3 */
|
||||||
|
A("str %[mosi_mask],[%[mosi_port], %[idx],LSL #2]") /* Access the proper SODR or CODR registers based on that bit */
|
||||||
|
A("str %[sck_mask],[%[sck_port]]") /* SODR */
|
||||||
|
A("ubfx %[idx],%[txval],#2,#1") /* Place bit 2 in bit 0 of idx*/
|
||||||
|
A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
|
||||||
|
|
||||||
|
/* Bit 2 */
|
||||||
|
A("str %[mosi_mask],[%[mosi_port], %[idx],LSL #2]") /* Access the proper SODR or CODR registers based on that bit */
|
||||||
|
A("str %[sck_mask],[%[sck_port]]") /* SODR */
|
||||||
|
A("ubfx %[idx],%[txval],#1,#1") /* Place bit 1 in bit 0 of idx*/
|
||||||
|
A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
|
||||||
|
|
||||||
|
/* Bit 1 */
|
||||||
|
A("str %[mosi_mask],[%[mosi_port], %[idx],LSL #2]") /* Access the proper SODR or CODR registers based on that bit */
|
||||||
|
A("str %[sck_mask],[%[sck_port]]") /* SODR */
|
||||||
|
A("ubfx %[idx],%[txval],#0,#1") /* Place bit 0 in bit 0 of idx*/
|
||||||
|
A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
|
||||||
|
|
||||||
|
/* Bit 0 */
|
||||||
|
A("str %[mosi_mask],[%[mosi_port], %[idx],LSL #2]") /* Access the proper SODR or CODR registers based on that bit */
|
||||||
|
A("str %[sck_mask],[%[sck_port]]") /* SODR */
|
||||||
|
A("nop") /* Result will be 0 */
|
||||||
|
A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
|
||||||
|
|
||||||
|
: [idx]"+r"( idx )
|
||||||
|
: [txval]"r"( bout ) ,
|
||||||
|
[mosi_mask]"r"( MOSI_MASK ),
|
||||||
|
[mosi_port]"r"( MOSI_PORT_PLUS30 ),
|
||||||
|
[sck_mask]"r"( SCK_MASK ),
|
||||||
|
[sck_port]"r"( SCK_PORT_PLUS30 )
|
||||||
|
: "cc"
|
||||||
|
);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Calculates the bit band alias address and returns a pointer address to word.
|
||||||
|
// addr: The byte address of bitbanding bit.
|
||||||
|
// bit: The bit position of bitbanding bit.
|
||||||
|
#define BITBAND_ADDRESS(addr, bit) \
|
||||||
|
(((uint32_t)(addr) & 0xF0000000) + 0x02000000 + ((uint32_t)(addr)&0xFFFFF)*32 + (bit)*4)
|
||||||
|
|
||||||
|
// run at ~8 .. ~10Mhz - Rx version (Tx line not altered)
|
||||||
|
static uint8_t spiTransferRx0(uint8_t) { // using Mode 0
|
||||||
|
uint32_t bin = 0;
|
||||||
|
uint32_t work = 0;
|
||||||
|
uint32_t BITBAND_MISO_PORT = BITBAND_ADDRESS( ((uint32_t)PORT(MISO_PIN))+0x3C, PIN_SHIFT(MISO_PIN)); /* PDSR of port in bitband area */
|
||||||
|
uint32_t SCK_PORT_PLUS30 = ((uint32_t) PORT(SCK_PIN)) + 0x30; /* SODR of port */
|
||||||
|
uint32_t SCK_MASK = PIN_MASK(SCK_PIN);
|
||||||
|
|
||||||
|
/* The software SPI routine */
|
||||||
|
__asm__ __volatile__(
|
||||||
|
A(".syntax unified") // is to prevent CM0,CM1 non-unified syntax
|
||||||
|
|
||||||
|
/* bit 7 */
|
||||||
|
A("str %[sck_mask],[%[sck_port]]") /* SODR */
|
||||||
|
A("ldr %[work],[%[bitband_miso_port]]") /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
|
||||||
|
A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
|
||||||
|
A("bfi %[bin],%[work],#7,#1") /* Store read bit as the bit 7 */
|
||||||
|
|
||||||
|
/* bit 6 */
|
||||||
|
A("str %[sck_mask],[%[sck_port]]") /* SODR */
|
||||||
|
A("ldr %[work],[%[bitband_miso_port]]") /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
|
||||||
|
A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
|
||||||
|
A("bfi %[bin],%[work],#6,#1") /* Store read bit as the bit 6 */
|
||||||
|
|
||||||
|
/* bit 5 */
|
||||||
|
A("str %[sck_mask],[%[sck_port]]") /* SODR */
|
||||||
|
A("ldr %[work],[%[bitband_miso_port]]") /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
|
||||||
|
A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
|
||||||
|
A("bfi %[bin],%[work],#5,#1") /* Store read bit as the bit 5 */
|
||||||
|
|
||||||
|
/* bit 4 */
|
||||||
|
A("str %[sck_mask],[%[sck_port]]") /* SODR */
|
||||||
|
A("ldr %[work],[%[bitband_miso_port]]") /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
|
||||||
|
A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
|
||||||
|
A("bfi %[bin],%[work],#4,#1") /* Store read bit as the bit 4 */
|
||||||
|
|
||||||
|
/* bit 3 */
|
||||||
|
A("str %[sck_mask],[%[sck_port]]") /* SODR */
|
||||||
|
A("ldr %[work],[%[bitband_miso_port]]") /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
|
||||||
|
A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
|
||||||
|
A("bfi %[bin],%[work],#3,#1") /* Store read bit as the bit 3 */
|
||||||
|
|
||||||
|
/* bit 2 */
|
||||||
|
A("str %[sck_mask],[%[sck_port]]") /* SODR */
|
||||||
|
A("ldr %[work],[%[bitband_miso_port]]") /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
|
||||||
|
A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
|
||||||
|
A("bfi %[bin],%[work],#2,#1") /* Store read bit as the bit 2 */
|
||||||
|
|
||||||
|
/* bit 1 */
|
||||||
|
A("str %[sck_mask],[%[sck_port]]") /* SODR */
|
||||||
|
A("ldr %[work],[%[bitband_miso_port]]") /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
|
||||||
|
A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
|
||||||
|
A("bfi %[bin],%[work],#1,#1") /* Store read bit as the bit 1 */
|
||||||
|
|
||||||
|
/* bit 0 */
|
||||||
|
A("str %[sck_mask],[%[sck_port]]") /* SODR */
|
||||||
|
A("ldr %[work],[%[bitband_miso_port]]") /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
|
||||||
|
A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
|
||||||
|
A("bfi %[bin],%[work],#0,#1") /* Store read bit as the bit 0 */
|
||||||
|
|
||||||
|
: [bin]"+r"(bin),
|
||||||
|
[work]"+r"(work)
|
||||||
|
: [bitband_miso_port]"r"( BITBAND_MISO_PORT ),
|
||||||
|
[sck_mask]"r"( SCK_MASK ),
|
||||||
|
[sck_port]"r"( SCK_PORT_PLUS30 )
|
||||||
|
: "cc"
|
||||||
|
);
|
||||||
|
|
||||||
|
return bin;
|
||||||
|
}
|
||||||
|
|
||||||
|
// run at ~4Mhz
|
||||||
|
static uint8_t spiTransfer1(uint8_t b) { // using Mode 0
|
||||||
|
int bits = 8;
|
||||||
|
do {
|
||||||
|
WRITE(MOSI_PIN, b & 0x80);
|
||||||
|
b <<= 1; // little setup time
|
||||||
|
|
||||||
|
WRITE(SCK_PIN, HIGH);
|
||||||
|
DELAY_NS(125); // 10 cycles @ 84mhz
|
||||||
|
|
||||||
|
b |= (READ(MISO_PIN) != 0);
|
||||||
|
|
||||||
|
WRITE(SCK_PIN, LOW);
|
||||||
|
DELAY_NS(125); // 10 cycles @ 84mhz
|
||||||
|
} while (--bits);
|
||||||
|
return b;
|
||||||
|
}
|
||||||
|
|
||||||
|
// all the others
|
||||||
|
static uint32_t spiDelayCyclesX4 = (F_CPU) / 1000000; // 4µs => 125khz
|
||||||
|
|
||||||
|
static uint8_t spiTransferX(uint8_t b) { // using Mode 0
|
||||||
|
int bits = 8;
|
||||||
|
do {
|
||||||
|
WRITE(MOSI_PIN, b & 0x80);
|
||||||
|
b <<= 1; // little setup time
|
||||||
|
|
||||||
|
WRITE(SCK_PIN, HIGH);
|
||||||
|
__delay_4cycles(spiDelayCyclesX4);
|
||||||
|
|
||||||
|
b |= (READ(MISO_PIN) != 0);
|
||||||
|
|
||||||
|
WRITE(SCK_PIN, LOW);
|
||||||
|
__delay_4cycles(spiDelayCyclesX4);
|
||||||
|
} while (--bits);
|
||||||
|
return b;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Pointers to generic functions for byte transfers
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Note: The cast is unnecessary, but without it, this file triggers a GCC 4.8.3-2014 bug.
|
||||||
|
* Later GCC versions do not have this problem, but at this time (May 2018) Arduino still
|
||||||
|
* uses that buggy and obsolete GCC version!!
|
||||||
|
*/
|
||||||
|
static pfnSpiTransfer spiTransferRx = (pfnSpiTransfer)spiTransferX;
|
||||||
|
static pfnSpiTransfer spiTransferTx = (pfnSpiTransfer)spiTransferX;
|
||||||
|
|
||||||
|
// Block transfers run at ~8 .. ~10Mhz - Tx version (Rx data discarded)
|
||||||
|
static void spiTxBlock0(const uint8_t* ptr, uint32_t todo) {
|
||||||
|
uint32_t MOSI_PORT_PLUS30 = ((uint32_t) PORT(MOSI_PIN)) + 0x30; /* SODR of port */
|
||||||
|
uint32_t MOSI_MASK = PIN_MASK(MOSI_PIN);
|
||||||
|
uint32_t SCK_PORT_PLUS30 = ((uint32_t) PORT(SCK_PIN)) + 0x30; /* SODR of port */
|
||||||
|
uint32_t SCK_MASK = PIN_MASK(SCK_PIN);
|
||||||
|
uint32_t work = 0;
|
||||||
|
uint32_t txval = 0;
|
||||||
|
|
||||||
|
/* The software SPI routine */
|
||||||
|
__asm__ __volatile__(
|
||||||
|
A(".syntax unified") // is to prevent CM0,CM1 non-unified syntax
|
||||||
|
|
||||||
|
L("loop%=")
|
||||||
|
A("ldrb.w %[txval], [%[ptr]], #1") /* Load value to send, increment buffer */
|
||||||
|
A("mvn %[txval],%[txval]") /* Negate value */
|
||||||
|
|
||||||
|
/* Bit 7 */
|
||||||
|
A("ubfx %[work],%[txval],#7,#1") /* Place bit 7 in bit 0 of work*/
|
||||||
|
|
||||||
|
A("str %[mosi_mask],[%[mosi_port], %[work],LSL #2]") /* Access the proper SODR or CODR registers based on that bit */
|
||||||
|
A("str %[sck_mask],[%[sck_port]]") /* SODR */
|
||||||
|
A("ubfx %[work],%[txval],#6,#1") /* Place bit 6 in bit 0 of work*/
|
||||||
|
A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
|
||||||
|
|
||||||
|
/* Bit 6 */
|
||||||
|
A("str %[mosi_mask],[%[mosi_port], %[work],LSL #2]") /* Access the proper SODR or CODR registers based on that bit */
|
||||||
|
A("str %[sck_mask],[%[sck_port]]") /* SODR */
|
||||||
|
A("ubfx %[work],%[txval],#5,#1") /* Place bit 5 in bit 0 of work*/
|
||||||
|
A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
|
||||||
|
|
||||||
|
/* Bit 5 */
|
||||||
|
A("str %[mosi_mask],[%[mosi_port], %[work],LSL #2]") /* Access the proper SODR or CODR registers based on that bit */
|
||||||
|
A("str %[sck_mask],[%[sck_port]]") /* SODR */
|
||||||
|
A("ubfx %[work],%[txval],#4,#1") /* Place bit 4 in bit 0 of work*/
|
||||||
|
A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
|
||||||
|
|
||||||
|
/* Bit 4 */
|
||||||
|
A("str %[mosi_mask],[%[mosi_port], %[work],LSL #2]") /* Access the proper SODR or CODR registers based on that bit */
|
||||||
|
A("str %[sck_mask],[%[sck_port]]") /* SODR */
|
||||||
|
A("ubfx %[work],%[txval],#3,#1") /* Place bit 3 in bit 0 of work*/
|
||||||
|
A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
|
||||||
|
|
||||||
|
/* Bit 3 */
|
||||||
|
A("str %[mosi_mask],[%[mosi_port], %[work],LSL #2]") /* Access the proper SODR or CODR registers based on that bit */
|
||||||
|
A("str %[sck_mask],[%[sck_port]]") /* SODR */
|
||||||
|
A("ubfx %[work],%[txval],#2,#1") /* Place bit 2 in bit 0 of work*/
|
||||||
|
A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
|
||||||
|
|
||||||
|
/* Bit 2 */
|
||||||
|
A("str %[mosi_mask],[%[mosi_port], %[work],LSL #2]") /* Access the proper SODR or CODR registers based on that bit */
|
||||||
|
A("str %[sck_mask],[%[sck_port]]") /* SODR */
|
||||||
|
A("ubfx %[work],%[txval],#1,#1") /* Place bit 1 in bit 0 of work*/
|
||||||
|
A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
|
||||||
|
|
||||||
|
/* Bit 1 */
|
||||||
|
A("str %[mosi_mask],[%[mosi_port], %[work],LSL #2]") /* Access the proper SODR or CODR registers based on that bit */
|
||||||
|
A("str %[sck_mask],[%[sck_port]]") /* SODR */
|
||||||
|
A("ubfx %[work],%[txval],#0,#1") /* Place bit 0 in bit 0 of work*/
|
||||||
|
A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
|
||||||
|
|
||||||
|
/* Bit 0 */
|
||||||
|
A("str %[mosi_mask],[%[mosi_port], %[work],LSL #2]") /* Access the proper SODR or CODR registers based on that bit */
|
||||||
|
A("str %[sck_mask],[%[sck_port]]") /* SODR */
|
||||||
|
A("subs %[todo],#1") /* Decrement count of pending words to send, update status */
|
||||||
|
A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
|
||||||
|
A("bne.n loop%=") /* Repeat until done */
|
||||||
|
|
||||||
|
: [ptr]"+r" ( ptr ) ,
|
||||||
|
[todo]"+r" ( todo ) ,
|
||||||
|
[work]"+r"( work ) ,
|
||||||
|
[txval]"+r"( txval )
|
||||||
|
: [mosi_mask]"r"( MOSI_MASK ),
|
||||||
|
[mosi_port]"r"( MOSI_PORT_PLUS30 ),
|
||||||
|
[sck_mask]"r"( SCK_MASK ),
|
||||||
|
[sck_port]"r"( SCK_PORT_PLUS30 )
|
||||||
|
: "cc"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void spiRxBlock0(uint8_t* ptr, uint32_t todo) {
|
||||||
|
uint32_t bin = 0;
|
||||||
|
uint32_t work = 0;
|
||||||
|
uint32_t BITBAND_MISO_PORT = BITBAND_ADDRESS( ((uint32_t)PORT(MISO_PIN))+0x3C, PIN_SHIFT(MISO_PIN)); /* PDSR of port in bitband area */
|
||||||
|
uint32_t SCK_PORT_PLUS30 = ((uint32_t) PORT(SCK_PIN)) + 0x30; /* SODR of port */
|
||||||
|
uint32_t SCK_MASK = PIN_MASK(SCK_PIN);
|
||||||
|
|
||||||
|
/* The software SPI routine */
|
||||||
|
__asm__ __volatile__(
|
||||||
|
A(".syntax unified") // is to prevent CM0,CM1 non-unified syntax
|
||||||
|
|
||||||
|
L("loop%=")
|
||||||
|
|
||||||
|
/* bit 7 */
|
||||||
|
A("str %[sck_mask],[%[sck_port]]") /* SODR */
|
||||||
|
A("ldr %[work],[%[bitband_miso_port]]") /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
|
||||||
|
A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
|
||||||
|
A("bfi %[bin],%[work],#7,#1") /* Store read bit as the bit 7 */
|
||||||
|
|
||||||
|
/* bit 6 */
|
||||||
|
A("str %[sck_mask],[%[sck_port]]") /* SODR */
|
||||||
|
A("ldr %[work],[%[bitband_miso_port]]") /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
|
||||||
|
A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
|
||||||
|
A("bfi %[bin],%[work],#6,#1") /* Store read bit as the bit 6 */
|
||||||
|
|
||||||
|
/* bit 5 */
|
||||||
|
A("str %[sck_mask],[%[sck_port]]") /* SODR */
|
||||||
|
A("ldr %[work],[%[bitband_miso_port]]") /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
|
||||||
|
A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
|
||||||
|
A("bfi %[bin],%[work],#5,#1") /* Store read bit as the bit 5 */
|
||||||
|
|
||||||
|
/* bit 4 */
|
||||||
|
A("str %[sck_mask],[%[sck_port]]") /* SODR */
|
||||||
|
A("ldr %[work],[%[bitband_miso_port]]") /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
|
||||||
|
A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
|
||||||
|
A("bfi %[bin],%[work],#4,#1") /* Store read bit as the bit 4 */
|
||||||
|
|
||||||
|
/* bit 3 */
|
||||||
|
A("str %[sck_mask],[%[sck_port]]") /* SODR */
|
||||||
|
A("ldr %[work],[%[bitband_miso_port]]") /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
|
||||||
|
A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
|
||||||
|
A("bfi %[bin],%[work],#3,#1") /* Store read bit as the bit 3 */
|
||||||
|
|
||||||
|
/* bit 2 */
|
||||||
|
A("str %[sck_mask],[%[sck_port]]") /* SODR */
|
||||||
|
A("ldr %[work],[%[bitband_miso_port]]") /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
|
||||||
|
A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
|
||||||
|
A("bfi %[bin],%[work],#2,#1") /* Store read bit as the bit 2 */
|
||||||
|
|
||||||
|
/* bit 1 */
|
||||||
|
A("str %[sck_mask],[%[sck_port]]") /* SODR */
|
||||||
|
A("ldr %[work],[%[bitband_miso_port]]") /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
|
||||||
|
A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
|
||||||
|
A("bfi %[bin],%[work],#1,#1") /* Store read bit as the bit 1 */
|
||||||
|
|
||||||
|
/* bit 0 */
|
||||||
|
A("str %[sck_mask],[%[sck_port]]") /* SODR */
|
||||||
|
A("ldr %[work],[%[bitband_miso_port]]") /* PDSR on bitband area for required bit: work will be 1 or 0 based on port */
|
||||||
|
A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
|
||||||
|
A("bfi %[bin],%[work],#0,#1") /* Store read bit as the bit 0 */
|
||||||
|
|
||||||
|
A("subs %[todo],#1") /* Decrement count of pending words to send, update status */
|
||||||
|
A("strb.w %[bin], [%[ptr]], #1") /* Store read value into buffer, increment buffer pointer */
|
||||||
|
A("bne.n loop%=") /* Repeat until done */
|
||||||
|
|
||||||
|
: [ptr]"+r"(ptr),
|
||||||
|
[todo]"+r"(todo),
|
||||||
|
[bin]"+r"(bin),
|
||||||
|
[work]"+r"(work)
|
||||||
|
: [bitband_miso_port]"r"( BITBAND_MISO_PORT ),
|
||||||
|
[sck_mask]"r"( SCK_MASK ),
|
||||||
|
[sck_port]"r"( SCK_PORT_PLUS30 )
|
||||||
|
: "cc"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void spiTxBlockX(const uint8_t* buf, uint32_t todo) {
|
||||||
|
do {
|
||||||
|
(void)spiTransferTx(*buf++);
|
||||||
|
} while (--todo);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void spiRxBlockX(uint8_t* buf, uint32_t todo) {
|
||||||
|
do {
|
||||||
|
*buf++ = spiTransferRx(0xFF);
|
||||||
|
} while (--todo);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Pointers to generic functions for block tranfers
|
||||||
|
static pfnSpiTxBlock spiTxBlock = (pfnSpiTxBlock)spiTxBlockX;
|
||||||
|
static pfnSpiRxBlock spiRxBlock = (pfnSpiRxBlock)spiRxBlockX;
|
||||||
|
|
||||||
|
#if MB(ALLIGATOR)
|
||||||
|
#define _SS_WRITE(S) WRITE(SS_PIN, S)
|
||||||
|
#else
|
||||||
|
#define _SS_WRITE(S) NOOP
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void spiBegin() {
|
||||||
|
SET_OUTPUT(SS_PIN);
|
||||||
|
_SS_WRITE(HIGH);
|
||||||
|
SET_OUTPUT(SCK_PIN);
|
||||||
|
SET_INPUT(MISO_PIN);
|
||||||
|
SET_OUTPUT(MOSI_PIN);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t spiRec() {
|
||||||
|
_SS_WRITE(LOW);
|
||||||
|
WRITE(MOSI_PIN, HIGH); // Output 1s 1
|
||||||
|
uint8_t b = spiTransferRx(0xFF);
|
||||||
|
_SS_WRITE(HIGH);
|
||||||
|
return b;
|
||||||
|
}
|
||||||
|
|
||||||
|
void spiRead(uint8_t* buf, uint16_t nbyte) {
|
||||||
|
if (nbyte) {
|
||||||
|
_SS_WRITE(LOW);
|
||||||
|
WRITE(MOSI_PIN, HIGH); // Output 1s 1
|
||||||
|
spiRxBlock(buf, nbyte);
|
||||||
|
_SS_WRITE(HIGH);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void spiSend(uint8_t b) {
|
||||||
|
_SS_WRITE(LOW);
|
||||||
|
(void)spiTransferTx(b);
|
||||||
|
_SS_WRITE(HIGH);
|
||||||
|
}
|
||||||
|
|
||||||
|
void spiSendBlock(uint8_t token, const uint8_t* buf) {
|
||||||
|
_SS_WRITE(LOW);
|
||||||
|
(void)spiTransferTx(token);
|
||||||
|
spiTxBlock(buf, 512);
|
||||||
|
_SS_WRITE(HIGH);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* spiRate should be
|
||||||
|
* 0 : 8 - 10 MHz
|
||||||
|
* 1 : 4 - 5 MHz
|
||||||
|
* 2 : 2 - 2.5 MHz
|
||||||
|
* 3 : 1 - 1.25 MHz
|
||||||
|
* 4 : 500 - 625 kHz
|
||||||
|
* 5 : 250 - 312 kHz
|
||||||
|
* 6 : 125 - 156 kHz
|
||||||
|
*/
|
||||||
|
void spiInit(uint8_t spiRate) {
|
||||||
|
switch (spiRate) {
|
||||||
|
case 0:
|
||||||
|
spiTransferTx = (pfnSpiTransfer)spiTransferTx0;
|
||||||
|
spiTransferRx = (pfnSpiTransfer)spiTransferRx0;
|
||||||
|
spiTxBlock = (pfnSpiTxBlock)spiTxBlock0;
|
||||||
|
spiRxBlock = (pfnSpiRxBlock)spiRxBlock0;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
spiTransferTx = (pfnSpiTransfer)spiTransfer1;
|
||||||
|
spiTransferRx = (pfnSpiTransfer)spiTransfer1;
|
||||||
|
spiTxBlock = (pfnSpiTxBlock)spiTxBlockX;
|
||||||
|
spiRxBlock = (pfnSpiRxBlock)spiRxBlockX;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
spiDelayCyclesX4 = ((F_CPU) / 1000000) >> (6 - spiRate);
|
||||||
|
spiTransferTx = (pfnSpiTransfer)spiTransferX;
|
||||||
|
spiTransferRx = (pfnSpiTransfer)spiTransferX;
|
||||||
|
spiTxBlock = (pfnSpiTxBlock)spiTxBlockX;
|
||||||
|
spiRxBlock = (pfnSpiRxBlock)spiRxBlockX;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
_SS_WRITE(HIGH);
|
||||||
|
WRITE(MOSI_PIN, HIGH);
|
||||||
|
WRITE(SCK_PIN, LOW);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Begin SPI transaction, set clock, bit order, data mode */
|
||||||
|
void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode) {
|
||||||
|
// TODO: to be implemented
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma GCC reset_options
|
||||||
|
|
||||||
|
#else // !SOFTWARE_SPI
|
||||||
|
|
||||||
|
#define WHILE_TX(N) while ((SPI0->SPI_SR & SPI_SR_TDRE) == (N))
|
||||||
|
#define WHILE_RX(N) while ((SPI0->SPI_SR & SPI_SR_RDRF) == (N))
|
||||||
|
#define FLUSH_TX() do{ WHILE_RX(1) SPI0->SPI_RDR; }while(0)
|
||||||
|
|
||||||
|
#if MB(ALLIGATOR)
|
||||||
|
|
||||||
|
// slave selects controlled by SPI controller
|
||||||
|
// doesn't support changing SPI speeds for SD card
|
||||||
|
|
||||||
|
// ------------------------
|
||||||
|
// hardware SPI
|
||||||
|
// ------------------------
|
||||||
|
static bool spiInitialized = false;
|
||||||
|
|
||||||
|
void spiInit(uint8_t spiRate) {
|
||||||
|
if (spiInitialized) return;
|
||||||
|
|
||||||
|
// 8.4 MHz, 4 MHz, 2 MHz, 1 MHz, 0.5 MHz, 0.329 MHz, 0.329 MHz
|
||||||
|
constexpr int spiDivider[] = { 10, 21, 42, 84, 168, 255, 255 };
|
||||||
|
if (spiRate > 6) spiRate = 1;
|
||||||
|
|
||||||
|
// Set SPI mode 1, clock, select not active after transfer, with delay between transfers
|
||||||
|
SPI_ConfigureNPCS(SPI0, SPI_CHAN_DAC,
|
||||||
|
SPI_CSR_CSAAT | SPI_CSR_SCBR(spiDivider[spiRate]) |
|
||||||
|
SPI_CSR_DLYBCT(1));
|
||||||
|
// Set SPI mode 0, clock, select not active after transfer, with delay between transfers
|
||||||
|
SPI_ConfigureNPCS(SPI0, SPI_CHAN_EEPROM1, SPI_CSR_NCPHA |
|
||||||
|
SPI_CSR_CSAAT | SPI_CSR_SCBR(spiDivider[spiRate]) |
|
||||||
|
SPI_CSR_DLYBCT(1));
|
||||||
|
|
||||||
|
// Set SPI mode 0, clock, select not active after transfer, with delay between transfers
|
||||||
|
SPI_ConfigureNPCS(SPI0, SPI_CHAN, SPI_CSR_NCPHA |
|
||||||
|
SPI_CSR_CSAAT | SPI_CSR_SCBR(spiDivider[spiRate]) |
|
||||||
|
SPI_CSR_DLYBCT(1));
|
||||||
|
SPI_Enable(SPI0);
|
||||||
|
spiInitialized = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void spiBegin() {
|
||||||
|
if (spiInitialized) return;
|
||||||
|
|
||||||
|
// Configure SPI pins
|
||||||
|
PIO_Configure(
|
||||||
|
g_APinDescription[SCK_PIN].pPort,
|
||||||
|
g_APinDescription[SCK_PIN].ulPinType,
|
||||||
|
g_APinDescription[SCK_PIN].ulPin,
|
||||||
|
g_APinDescription[SCK_PIN].ulPinConfiguration);
|
||||||
|
PIO_Configure(
|
||||||
|
g_APinDescription[MOSI_PIN].pPort,
|
||||||
|
g_APinDescription[MOSI_PIN].ulPinType,
|
||||||
|
g_APinDescription[MOSI_PIN].ulPin,
|
||||||
|
g_APinDescription[MOSI_PIN].ulPinConfiguration);
|
||||||
|
PIO_Configure(
|
||||||
|
g_APinDescription[MISO_PIN].pPort,
|
||||||
|
g_APinDescription[MISO_PIN].ulPinType,
|
||||||
|
g_APinDescription[MISO_PIN].ulPin,
|
||||||
|
g_APinDescription[MISO_PIN].ulPinConfiguration);
|
||||||
|
|
||||||
|
// set master mode, peripheral select, fault detection
|
||||||
|
SPI_Configure(SPI0, ID_SPI0, SPI_MR_MSTR | SPI_MR_MODFDIS | SPI_MR_PS);
|
||||||
|
SPI_Enable(SPI0);
|
||||||
|
|
||||||
|
SET_OUTPUT(DAC0_SYNC);
|
||||||
|
#if HAS_MULTI_EXTRUDER
|
||||||
|
SET_OUTPUT(DAC1_SYNC);
|
||||||
|
WRITE(DAC1_SYNC, HIGH);
|
||||||
|
#endif
|
||||||
|
SET_OUTPUT(SPI_EEPROM1_CS);
|
||||||
|
SET_OUTPUT(SPI_EEPROM2_CS);
|
||||||
|
SET_OUTPUT(SPI_FLASH_CS);
|
||||||
|
WRITE(DAC0_SYNC, HIGH);
|
||||||
|
WRITE(SPI_EEPROM1_CS, HIGH);
|
||||||
|
WRITE(SPI_EEPROM2_CS, HIGH);
|
||||||
|
WRITE(SPI_FLASH_CS, HIGH);
|
||||||
|
WRITE(SS_PIN, HIGH);
|
||||||
|
|
||||||
|
OUT_WRITE(SDSS, LOW);
|
||||||
|
|
||||||
|
PIO_Configure(
|
||||||
|
g_APinDescription[SPI_PIN].pPort,
|
||||||
|
g_APinDescription[SPI_PIN].ulPinType,
|
||||||
|
g_APinDescription[SPI_PIN].ulPin,
|
||||||
|
g_APinDescription[SPI_PIN].ulPinConfiguration
|
||||||
|
);
|
||||||
|
|
||||||
|
spiInit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Read single byte from SPI
|
||||||
|
uint8_t spiRec() {
|
||||||
|
// write dummy byte with address and end transmission flag
|
||||||
|
SPI0->SPI_TDR = 0x000000FF | SPI_PCS(SPI_CHAN) | SPI_TDR_LASTXFER;
|
||||||
|
|
||||||
|
WHILE_TX(0);
|
||||||
|
WHILE_RX(0);
|
||||||
|
|
||||||
|
//DELAY_US(1U);
|
||||||
|
return SPI0->SPI_RDR;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t spiRec(uint32_t chan) {
|
||||||
|
|
||||||
|
WHILE_TX(0);
|
||||||
|
FLUSH_RX();
|
||||||
|
|
||||||
|
// write dummy byte with address and end transmission flag
|
||||||
|
SPI0->SPI_TDR = 0x000000FF | SPI_PCS(chan) | SPI_TDR_LASTXFER;
|
||||||
|
WHILE_RX(0);
|
||||||
|
|
||||||
|
return SPI0->SPI_RDR;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Read from SPI into buffer
|
||||||
|
void spiRead(uint8_t* buf, uint16_t nbyte) {
|
||||||
|
if (!nbyte) return;
|
||||||
|
--nbyte;
|
||||||
|
for (int i = 0; i < nbyte; i++) {
|
||||||
|
//WHILE_TX(0);
|
||||||
|
SPI0->SPI_TDR = 0x000000FF | SPI_PCS(SPI_CHAN);
|
||||||
|
WHILE_RX(0);
|
||||||
|
buf[i] = SPI0->SPI_RDR;
|
||||||
|
//DELAY_US(1U);
|
||||||
|
}
|
||||||
|
buf[nbyte] = spiRec();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Write single byte to SPI
|
||||||
|
void spiSend(const byte b) {
|
||||||
|
// write byte with address and end transmission flag
|
||||||
|
SPI0->SPI_TDR = (uint32_t)b | SPI_PCS(SPI_CHAN) | SPI_TDR_LASTXFER;
|
||||||
|
WHILE_TX(0);
|
||||||
|
WHILE_RX(0);
|
||||||
|
SPI0->SPI_RDR;
|
||||||
|
//DELAY_US(1U);
|
||||||
|
}
|
||||||
|
|
||||||
|
void spiSend(const uint8_t* buf, size_t nbyte) {
|
||||||
|
if (!nbyte) return;
|
||||||
|
--nbyte;
|
||||||
|
for (size_t i = 0; i < nbyte; i++) {
|
||||||
|
SPI0->SPI_TDR = (uint32_t)buf[i] | SPI_PCS(SPI_CHAN);
|
||||||
|
WHILE_TX(0);
|
||||||
|
WHILE_RX(0);
|
||||||
|
SPI0->SPI_RDR;
|
||||||
|
//DELAY_US(1U);
|
||||||
|
}
|
||||||
|
spiSend(buf[nbyte]);
|
||||||
|
}
|
||||||
|
|
||||||
|
void spiSend(uint32_t chan, byte b) {
|
||||||
|
WHILE_TX(0);
|
||||||
|
// write byte with address and end transmission flag
|
||||||
|
SPI0->SPI_TDR = (uint32_t)b | SPI_PCS(chan) | SPI_TDR_LASTXFER;
|
||||||
|
WHILE_RX(0);
|
||||||
|
FLUSH_RX();
|
||||||
|
}
|
||||||
|
|
||||||
|
void spiSend(uint32_t chan, const uint8_t* buf, size_t nbyte) {
|
||||||
|
if (!nbyte) return;
|
||||||
|
--nbyte;
|
||||||
|
for (size_t i = 0; i < nbyte; i++) {
|
||||||
|
WHILE_TX(0);
|
||||||
|
SPI0->SPI_TDR = (uint32_t)buf[i] | SPI_PCS(chan);
|
||||||
|
WHILE_RX(0);
|
||||||
|
FLUSH_RX();
|
||||||
|
}
|
||||||
|
spiSend(chan, buf[nbyte]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Write from buffer to SPI
|
||||||
|
void spiSendBlock(uint8_t token, const uint8_t* buf) {
|
||||||
|
SPI0->SPI_TDR = (uint32_t)token | SPI_PCS(SPI_CHAN);
|
||||||
|
WHILE_TX(0);
|
||||||
|
//WHILE_RX(0);
|
||||||
|
//SPI0->SPI_RDR;
|
||||||
|
for (int i = 0; i < 511; i++) {
|
||||||
|
SPI0->SPI_TDR = (uint32_t)buf[i] | SPI_PCS(SPI_CHAN);
|
||||||
|
WHILE_TX(0);
|
||||||
|
WHILE_RX(0);
|
||||||
|
SPI0->SPI_RDR;
|
||||||
|
//DELAY_US(1U);
|
||||||
|
}
|
||||||
|
spiSend(buf[511]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Begin SPI transaction, set clock, bit order, data mode */
|
||||||
|
void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode) {
|
||||||
|
// TODO: to be implemented
|
||||||
|
}
|
||||||
|
|
||||||
|
#else // U8G compatible hardware SPI
|
||||||
|
|
||||||
|
#define SPI_MODE_0_DUE_HW 2 // DUE CPHA control bit is inverted
|
||||||
|
#define SPI_MODE_1_DUE_HW 3
|
||||||
|
#define SPI_MODE_2_DUE_HW 0
|
||||||
|
#define SPI_MODE_3_DUE_HW 1
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The DUE SPI controller is set up so the upper word of the longword
|
||||||
|
* written to the transmit data register selects which SPI Chip Select
|
||||||
|
* Register is used. This allows different streams to have different SPI
|
||||||
|
* settings.
|
||||||
|
*
|
||||||
|
* In practice it's spooky. Some combinations hang the system, while others
|
||||||
|
* upset the peripheral device.
|
||||||
|
*
|
||||||
|
* SPI mode should be the same for all streams. The FYSETC_MINI_12864 gets
|
||||||
|
* upset if the clock phase changes after chip select goes active.
|
||||||
|
*
|
||||||
|
* SPI_CSR_CSAAT should be set for all streams. If not the WHILE_TX(0)
|
||||||
|
* macro returns immediately which can result in the SPI chip select going
|
||||||
|
* inactive before all the data has been sent.
|
||||||
|
*
|
||||||
|
* The TMC2130 library uses SPI0->SPI_CSR[3].
|
||||||
|
*
|
||||||
|
* The U8G hardware SPI uses SPI0->SPI_CSR[0]. The system hangs and/or the
|
||||||
|
* FYSETC_MINI_12864 gets upset if lower baud rates are used and the SD card
|
||||||
|
* is inserted or removed.
|
||||||
|
*
|
||||||
|
* The SD card uses SPI0->SPI_CSR[3]. Efforts were made to use [1] and [2]
|
||||||
|
* but they all resulted in hangs or garbage on the LCD.
|
||||||
|
*
|
||||||
|
* The SPI controlled chip selects are NOT enabled in the GPIO controller.
|
||||||
|
* The application must control the chip select.
|
||||||
|
*
|
||||||
|
* All of the above can be avoided by defining FORCE_SOFT_SPI to force the
|
||||||
|
* display to use software SPI.
|
||||||
|
*/
|
||||||
|
|
||||||
|
void spiInit(uint8_t spiRate=6) { // Default to slowest rate if not specified)
|
||||||
|
// Also sets U8G SPI rate to 4MHz and the SPI mode to 3
|
||||||
|
|
||||||
|
// 8.4 MHz, 4 MHz, 2 MHz, 1 MHz, 0.5 MHz, 0.329 MHz, 0.329 MHz
|
||||||
|
constexpr int spiDivider[] = { 10, 21, 42, 84, 168, 255, 255 };
|
||||||
|
if (spiRate > 6) spiRate = 1;
|
||||||
|
|
||||||
|
// Enable PIOA and SPI0
|
||||||
|
REG_PMC_PCER0 = (1UL << ID_PIOA) | (1UL << ID_SPI0);
|
||||||
|
|
||||||
|
// Disable PIO on A26 and A27
|
||||||
|
REG_PIOA_PDR = 0x0C000000;
|
||||||
|
OUT_WRITE(SDSS, HIGH);
|
||||||
|
|
||||||
|
// Reset SPI0 (from sam lib)
|
||||||
|
SPI0->SPI_CR = SPI_CR_SPIDIS;
|
||||||
|
SPI0->SPI_CR = SPI_CR_SWRST;
|
||||||
|
SPI0->SPI_CR = SPI_CR_SWRST;
|
||||||
|
SPI0->SPI_CR = SPI_CR_SPIEN;
|
||||||
|
|
||||||
|
// TMC2103 compatible setup
|
||||||
|
// Master mode, no fault detection, PCS bits in data written to TDR select CSR register
|
||||||
|
SPI0->SPI_MR = SPI_MR_MSTR | SPI_MR_PS | SPI_MR_MODFDIS;
|
||||||
|
// SPI mode 3, 8 Bit data transfer, baud rate
|
||||||
|
SPI0->SPI_CSR[3] = SPI_CSR_SCBR(spiDivider[spiRate]) | SPI_CSR_CSAAT | SPI_MODE_3_DUE_HW; // use same CSR as TMC2130
|
||||||
|
SPI0->SPI_CSR[0] = SPI_CSR_SCBR(spiDivider[1]) | SPI_CSR_CSAAT | SPI_MODE_3_DUE_HW; // U8G default to 4MHz
|
||||||
|
}
|
||||||
|
|
||||||
|
void spiBegin() { spiInit(); }
|
||||||
|
|
||||||
|
static uint8_t spiTransfer(uint8_t data) {
|
||||||
|
WHILE_TX(0);
|
||||||
|
SPI0->SPI_TDR = (uint32_t)data | 0x00070000UL; // Add TMC2130 PCS bits to every byte (use SPI0->SPI_CSR[3])
|
||||||
|
WHILE_TX(0);
|
||||||
|
WHILE_RX(0);
|
||||||
|
return SPI0->SPI_RDR;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t spiRec() { return (uint8_t)spiTransfer(0xFF); }
|
||||||
|
|
||||||
|
void spiRead(uint8_t* buf, uint16_t nbyte) {
|
||||||
|
for (int i = 0; i < nbyte; i++)
|
||||||
|
buf[i] = spiTransfer(0xFF);
|
||||||
|
}
|
||||||
|
|
||||||
|
void spiSend(uint8_t data) { spiTransfer(data); }
|
||||||
|
|
||||||
|
void spiSend(const uint8_t* buf, size_t nbyte) {
|
||||||
|
for (uint16_t i = 0; i < nbyte; i++)
|
||||||
|
spiTransfer(buf[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
void spiSendBlock(uint8_t token, const uint8_t* buf) {
|
||||||
|
spiTransfer(token);
|
||||||
|
for (uint16_t i = 0; i < 512; i++)
|
||||||
|
spiTransfer(buf[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // !ALLIGATOR
|
||||||
|
#endif // !SOFTWARE_SPI
|
||||||
|
|
||||||
|
#endif // ARDUINO_ARCH_SAM
|
||||||
98
Marlin/src/HAL/DUE/InterruptVectors.cpp
Normal file
98
Marlin/src/HAL/DUE/InterruptVectors.cpp
Normal file
|
|
@ -0,0 +1,98 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* InterruptVectors_Due.cpp - This module relocates the Interrupt vector table to SRAM,
|
||||||
|
* allowing to register new interrupt handlers at runtime. Specially valuable and needed
|
||||||
|
* because Arduino runtime allocates some interrupt handlers that we NEED to override to
|
||||||
|
* properly support extended functionality, as for example, USB host or USB device (MSD, MTP)
|
||||||
|
* and custom serial port handlers, and we don't actually want to modify and/or recompile the
|
||||||
|
* Arduino runtime. We just want to run as much as possible on Stock Arduino
|
||||||
|
*
|
||||||
|
* Copyright (c) 2017 Eduardo José Tagle. All right reserved
|
||||||
|
*/
|
||||||
|
#ifdef ARDUINO_ARCH_SAM
|
||||||
|
|
||||||
|
#include "../../inc/MarlinConfig.h"
|
||||||
|
#include "HAL.h"
|
||||||
|
#include "InterruptVectors.h"
|
||||||
|
|
||||||
|
/* The relocated Exception/Interrupt Table - According to the ARM
|
||||||
|
reference manual, alignment to 128 bytes should suffice, but in
|
||||||
|
practice, we need alignment to 256 bytes to make this work in all
|
||||||
|
cases */
|
||||||
|
__attribute__ ((aligned(256)))
|
||||||
|
static DeviceVectors ram_tab = { nullptr };
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function checks if the exception/interrupt table is already in SRAM or not.
|
||||||
|
* If it is not, then it copies the ROM table to the SRAM and relocates the table
|
||||||
|
* by reprogramming the NVIC registers
|
||||||
|
*/
|
||||||
|
static pfnISR_Handler* get_relocated_table_addr() {
|
||||||
|
// Get the address of the interrupt/exception table
|
||||||
|
uint32_t isrtab = SCB->VTOR;
|
||||||
|
|
||||||
|
// If already relocated, we are done!
|
||||||
|
if (isrtab >= IRAM0_ADDR)
|
||||||
|
return (pfnISR_Handler*)isrtab;
|
||||||
|
|
||||||
|
// Get the address of the table stored in FLASH
|
||||||
|
const pfnISR_Handler* romtab = (const pfnISR_Handler*)isrtab;
|
||||||
|
|
||||||
|
// Copy it to SRAM
|
||||||
|
memcpy(&ram_tab, romtab, sizeof(ram_tab));
|
||||||
|
|
||||||
|
// Disable global interrupts
|
||||||
|
CRITICAL_SECTION_START();
|
||||||
|
|
||||||
|
// Set the vector table base address to the SRAM copy
|
||||||
|
SCB->VTOR = (uint32_t)(&ram_tab);
|
||||||
|
|
||||||
|
// Reenable interrupts
|
||||||
|
CRITICAL_SECTION_END();
|
||||||
|
|
||||||
|
// Return the address of the table
|
||||||
|
return (pfnISR_Handler*)(&ram_tab);
|
||||||
|
}
|
||||||
|
|
||||||
|
pfnISR_Handler install_isr(IRQn_Type irq, pfnISR_Handler newHandler) {
|
||||||
|
// Get the address of the relocated table
|
||||||
|
pfnISR_Handler *isrtab = get_relocated_table_addr();
|
||||||
|
|
||||||
|
// Disable global interrupts
|
||||||
|
CRITICAL_SECTION_START();
|
||||||
|
|
||||||
|
// Get the original handler
|
||||||
|
pfnISR_Handler oldHandler = isrtab[irq + 16];
|
||||||
|
|
||||||
|
// Install the new one
|
||||||
|
isrtab[irq + 16] = newHandler;
|
||||||
|
|
||||||
|
// Reenable interrupts
|
||||||
|
CRITICAL_SECTION_END();
|
||||||
|
|
||||||
|
// Return the original one
|
||||||
|
return oldHandler;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
45
Marlin/src/HAL/DUE/InterruptVectors.h
Normal file
45
Marlin/src/HAL/DUE/InterruptVectors.h
Normal file
|
|
@ -0,0 +1,45 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
/**
|
||||||
|
* InterruptVectors_Due.h
|
||||||
|
*
|
||||||
|
* This module relocates the Interrupt vector table to SRAM, allowing new
|
||||||
|
* interrupt handlers to be added at runtime. This is required because the
|
||||||
|
* Arduino runtime steals interrupt handlers that Marlin MUST use to support
|
||||||
|
* extended functionality such as USB hosts and USB devices (MSD, MTP) and
|
||||||
|
* custom serial port handlers. Rather than modifying and/or recompiling the
|
||||||
|
* Arduino runtime, We just want to run as much as possible on Stock Arduino.
|
||||||
|
*
|
||||||
|
* Copyright (c) 2017 Eduardo José Tagle. All right reserved
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef ARDUINO_ARCH_SAM
|
||||||
|
|
||||||
|
// ISR handler type
|
||||||
|
typedef void (*pfnISR_Handler)();
|
||||||
|
|
||||||
|
// Install a new interrupt vector handler for the given irq, returning the old one
|
||||||
|
pfnISR_Handler install_isr(IRQn_Type irq, pfnISR_Handler newHandler);
|
||||||
|
|
||||||
|
#endif // ARDUINO_ARCH_SAM
|
||||||
641
Marlin/src/HAL/DUE/MarlinSerial.cpp
Normal file
641
Marlin/src/HAL/DUE/MarlinSerial.cpp
Normal file
|
|
@ -0,0 +1,641 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* MarlinSerial_Due.cpp - Hardware serial library for Arduino DUE
|
||||||
|
* Copyright (c) 2017 Eduardo José Tagle. All right reserved
|
||||||
|
* Based on MarlinSerial for AVR, copyright (c) 2006 Nicholas Zambetti. All right reserved.
|
||||||
|
*/
|
||||||
|
#ifdef ARDUINO_ARCH_SAM
|
||||||
|
|
||||||
|
#include "../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
|
#include "MarlinSerial.h"
|
||||||
|
#include "InterruptVectors.h"
|
||||||
|
#include "../../MarlinCore.h"
|
||||||
|
|
||||||
|
template<typename Cfg> typename MarlinSerial<Cfg>::ring_buffer_r MarlinSerial<Cfg>::rx_buffer = { 0, 0, { 0 } };
|
||||||
|
template<typename Cfg> typename MarlinSerial<Cfg>::ring_buffer_t MarlinSerial<Cfg>::tx_buffer = { 0 };
|
||||||
|
template<typename Cfg> bool MarlinSerial<Cfg>::_written = false;
|
||||||
|
template<typename Cfg> uint8_t MarlinSerial<Cfg>::xon_xoff_state = MarlinSerial<Cfg>::XON_XOFF_CHAR_SENT | MarlinSerial<Cfg>::XON_CHAR;
|
||||||
|
template<typename Cfg> uint8_t MarlinSerial<Cfg>::rx_dropped_bytes = 0;
|
||||||
|
template<typename Cfg> uint8_t MarlinSerial<Cfg>::rx_buffer_overruns = 0;
|
||||||
|
template<typename Cfg> uint8_t MarlinSerial<Cfg>::rx_framing_errors = 0;
|
||||||
|
template<typename Cfg> typename MarlinSerial<Cfg>::ring_buffer_pos_t MarlinSerial<Cfg>::rx_max_enqueued = 0;
|
||||||
|
|
||||||
|
// A SW memory barrier, to ensure GCC does not overoptimize loops
|
||||||
|
#define sw_barrier() asm volatile("": : :"memory");
|
||||||
|
|
||||||
|
#include "../../feature/e_parser.h"
|
||||||
|
|
||||||
|
// (called with RX interrupts disabled)
|
||||||
|
template<typename Cfg>
|
||||||
|
FORCE_INLINE void MarlinSerial<Cfg>::store_rxd_char() {
|
||||||
|
|
||||||
|
static EmergencyParser::State emergency_state; // = EP_RESET
|
||||||
|
|
||||||
|
// Get the tail - Nothing can alter its value while we are at this ISR
|
||||||
|
const ring_buffer_pos_t t = rx_buffer.tail;
|
||||||
|
|
||||||
|
// Get the head pointer
|
||||||
|
ring_buffer_pos_t h = rx_buffer.head;
|
||||||
|
|
||||||
|
// Get the next element
|
||||||
|
ring_buffer_pos_t i = (ring_buffer_pos_t)(h + 1) & (ring_buffer_pos_t)(Cfg::RX_SIZE - 1);
|
||||||
|
|
||||||
|
// Read the character from the USART
|
||||||
|
uint8_t c = HWUART->UART_RHR;
|
||||||
|
|
||||||
|
if (Cfg::EMERGENCYPARSER) emergency_parser.update(emergency_state, c);
|
||||||
|
|
||||||
|
// If the character is to be stored at the index just before the tail
|
||||||
|
// (such that the head would advance to the current tail), the RX FIFO is
|
||||||
|
// full, so don't write the character or advance the head.
|
||||||
|
if (i != t) {
|
||||||
|
rx_buffer.buffer[h] = c;
|
||||||
|
h = i;
|
||||||
|
}
|
||||||
|
else if (Cfg::DROPPED_RX && !++rx_dropped_bytes)
|
||||||
|
--rx_dropped_bytes;
|
||||||
|
|
||||||
|
const ring_buffer_pos_t rx_count = (ring_buffer_pos_t)(h - t) & (ring_buffer_pos_t)(Cfg::RX_SIZE - 1);
|
||||||
|
// Calculate count of bytes stored into the RX buffer
|
||||||
|
|
||||||
|
// Keep track of the maximum count of enqueued bytes
|
||||||
|
if (Cfg::MAX_RX_QUEUED) NOLESS(rx_max_enqueued, rx_count);
|
||||||
|
|
||||||
|
if (Cfg::XONOFF) {
|
||||||
|
// If the last char that was sent was an XON
|
||||||
|
if ((xon_xoff_state & XON_XOFF_CHAR_MASK) == XON_CHAR) {
|
||||||
|
|
||||||
|
// Bytes stored into the RX buffer
|
||||||
|
const ring_buffer_pos_t rx_count = (ring_buffer_pos_t)(h - t) & (ring_buffer_pos_t)(Cfg::RX_SIZE - 1);
|
||||||
|
|
||||||
|
// If over 12.5% of RX buffer capacity, send XOFF before running out of
|
||||||
|
// RX buffer space .. 325 bytes @ 250kbits/s needed to let the host react
|
||||||
|
// and stop sending bytes. This translates to 13mS propagation time.
|
||||||
|
if (rx_count >= (Cfg::RX_SIZE) / 8) {
|
||||||
|
|
||||||
|
// At this point, definitely no TX interrupt was executing, since the TX isr can't be preempted.
|
||||||
|
// Don't enable the TX interrupt here as a means to trigger the XOFF char, because if it happens
|
||||||
|
// to be in the middle of trying to disable the RX interrupt in the main program, eventually the
|
||||||
|
// enabling of the TX interrupt could be undone. The ONLY reliable thing this can do to ensure
|
||||||
|
// the sending of the XOFF char is to send it HERE AND NOW.
|
||||||
|
|
||||||
|
// About to send the XOFF char
|
||||||
|
xon_xoff_state = XOFF_CHAR | XON_XOFF_CHAR_SENT;
|
||||||
|
|
||||||
|
// Wait until the TX register becomes empty and send it - Here there could be a problem
|
||||||
|
// - While waiting for the TX register to empty, the RX register could receive a new
|
||||||
|
// character. This must also handle that situation!
|
||||||
|
uint32_t status;
|
||||||
|
while (!((status = HWUART->UART_SR) & UART_SR_TXRDY)) {
|
||||||
|
|
||||||
|
if (status & UART_SR_RXRDY) {
|
||||||
|
// We received a char while waiting for the TX buffer to be empty - Receive and process it!
|
||||||
|
|
||||||
|
i = (ring_buffer_pos_t)(h + 1) & (ring_buffer_pos_t)(Cfg::RX_SIZE - 1);
|
||||||
|
|
||||||
|
// Read the character from the USART
|
||||||
|
c = HWUART->UART_RHR;
|
||||||
|
|
||||||
|
if (Cfg::EMERGENCYPARSER) emergency_parser.update(emergency_state, c);
|
||||||
|
|
||||||
|
// If the character is to be stored at the index just before the tail
|
||||||
|
// (such that the head would advance to the current tail), the FIFO is
|
||||||
|
// full, so don't write the character or advance the head.
|
||||||
|
if (i != t) {
|
||||||
|
rx_buffer.buffer[h] = c;
|
||||||
|
h = i;
|
||||||
|
}
|
||||||
|
else if (Cfg::DROPPED_RX && !++rx_dropped_bytes)
|
||||||
|
--rx_dropped_bytes;
|
||||||
|
}
|
||||||
|
sw_barrier();
|
||||||
|
}
|
||||||
|
|
||||||
|
HWUART->UART_THR = XOFF_CHAR;
|
||||||
|
|
||||||
|
// At this point there could be a race condition between the write() function
|
||||||
|
// and this sending of the XOFF char. This interrupt could happen between the
|
||||||
|
// wait to be empty TX buffer loop and the actual write of the character. Since
|
||||||
|
// the TX buffer is full because it's sending the XOFF char, the only way to be
|
||||||
|
// sure the write() function will succeed is to wait for the XOFF char to be
|
||||||
|
// completely sent. Since an extra character could be received during the wait
|
||||||
|
// it must also be handled!
|
||||||
|
while (!((status = HWUART->UART_SR) & UART_SR_TXRDY)) {
|
||||||
|
|
||||||
|
if (status & UART_SR_RXRDY) {
|
||||||
|
// A char arrived while waiting for the TX buffer to be empty - Receive and process it!
|
||||||
|
|
||||||
|
i = (ring_buffer_pos_t)(h + 1) & (ring_buffer_pos_t)(Cfg::RX_SIZE - 1);
|
||||||
|
|
||||||
|
// Read the character from the USART
|
||||||
|
c = HWUART->UART_RHR;
|
||||||
|
|
||||||
|
if (Cfg::EMERGENCYPARSER) emergency_parser.update(emergency_state, c);
|
||||||
|
|
||||||
|
// If the character is to be stored at the index just before the tail
|
||||||
|
// (such that the head would advance to the current tail), the FIFO is
|
||||||
|
// full, so don't write the character or advance the head.
|
||||||
|
if (i != t) {
|
||||||
|
rx_buffer.buffer[h] = c;
|
||||||
|
h = i;
|
||||||
|
}
|
||||||
|
else if (Cfg::DROPPED_RX && !++rx_dropped_bytes)
|
||||||
|
--rx_dropped_bytes;
|
||||||
|
}
|
||||||
|
sw_barrier();
|
||||||
|
}
|
||||||
|
|
||||||
|
// At this point everything is ready. The write() function won't
|
||||||
|
// have any issues writing to the UART TX register if it needs to!
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Store the new head value
|
||||||
|
rx_buffer.head = h;
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
FORCE_INLINE void MarlinSerial<Cfg>::_tx_thr_empty_irq() {
|
||||||
|
if (Cfg::TX_SIZE > 0) {
|
||||||
|
// Read positions
|
||||||
|
uint8_t t = tx_buffer.tail;
|
||||||
|
const uint8_t h = tx_buffer.head;
|
||||||
|
|
||||||
|
if (Cfg::XONOFF) {
|
||||||
|
// If an XON char is pending to be sent, do it now
|
||||||
|
if (xon_xoff_state == XON_CHAR) {
|
||||||
|
|
||||||
|
// Send the character
|
||||||
|
HWUART->UART_THR = XON_CHAR;
|
||||||
|
|
||||||
|
// Remember we sent it.
|
||||||
|
xon_xoff_state = XON_CHAR | XON_XOFF_CHAR_SENT;
|
||||||
|
|
||||||
|
// If nothing else to transmit, just disable TX interrupts.
|
||||||
|
if (h == t) HWUART->UART_IDR = UART_IDR_TXRDY;
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// If nothing to transmit, just disable TX interrupts. This could
|
||||||
|
// happen as the result of the non atomicity of the disabling of RX
|
||||||
|
// interrupts that could end reenabling TX interrupts as a side effect.
|
||||||
|
if (h == t) {
|
||||||
|
HWUART->UART_IDR = UART_IDR_TXRDY;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// There is something to TX, Send the next byte
|
||||||
|
const uint8_t c = tx_buffer.buffer[t];
|
||||||
|
t = (t + 1) & (Cfg::TX_SIZE - 1);
|
||||||
|
HWUART->UART_THR = c;
|
||||||
|
tx_buffer.tail = t;
|
||||||
|
|
||||||
|
// Disable interrupts if there is nothing to transmit following this byte
|
||||||
|
if (h == t) HWUART->UART_IDR = UART_IDR_TXRDY;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::UART_ISR() {
|
||||||
|
const uint32_t status = HWUART->UART_SR;
|
||||||
|
|
||||||
|
// Data received?
|
||||||
|
if (status & UART_SR_RXRDY) store_rxd_char();
|
||||||
|
|
||||||
|
if (Cfg::TX_SIZE > 0) {
|
||||||
|
// Something to send, and TX interrupts are enabled (meaning something to send)?
|
||||||
|
if ((status & UART_SR_TXRDY) && (HWUART->UART_IMR & UART_IMR_TXRDY)) _tx_thr_empty_irq();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Acknowledge errors
|
||||||
|
if ((status & UART_SR_OVRE) || (status & UART_SR_FRAME)) {
|
||||||
|
if (Cfg::DROPPED_RX && (status & UART_SR_OVRE) && !++rx_dropped_bytes) --rx_dropped_bytes;
|
||||||
|
if (Cfg::RX_OVERRUNS && (status & UART_SR_OVRE) && !++rx_buffer_overruns) --rx_buffer_overruns;
|
||||||
|
if (Cfg::RX_FRAMING_ERRORS && (status & UART_SR_FRAME) && !++rx_framing_errors) --rx_framing_errors;
|
||||||
|
|
||||||
|
// TODO: error reporting outside ISR
|
||||||
|
HWUART->UART_CR = UART_CR_RSTSTA;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Public Methods
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::begin(const long baud_setting) {
|
||||||
|
|
||||||
|
// Disable UART interrupt in NVIC
|
||||||
|
NVIC_DisableIRQ( HWUART_IRQ );
|
||||||
|
|
||||||
|
// We NEED memory barriers to ensure Interrupts are actually disabled!
|
||||||
|
// ( https://dzone.com/articles/nvic-disabling-interrupts-on-arm-cortex-m-and-the )
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
|
||||||
|
// Disable clock
|
||||||
|
pmc_disable_periph_clk( HWUART_IRQ_ID );
|
||||||
|
|
||||||
|
// Configure PMC
|
||||||
|
pmc_enable_periph_clk( HWUART_IRQ_ID );
|
||||||
|
|
||||||
|
// Disable PDC channel
|
||||||
|
HWUART->UART_PTCR = UART_PTCR_RXTDIS | UART_PTCR_TXTDIS;
|
||||||
|
|
||||||
|
// Reset and disable receiver and transmitter
|
||||||
|
HWUART->UART_CR = UART_CR_RSTRX | UART_CR_RSTTX | UART_CR_RXDIS | UART_CR_TXDIS;
|
||||||
|
|
||||||
|
// Configure mode: 8bit, No parity, 1 bit stop
|
||||||
|
HWUART->UART_MR = UART_MR_CHMODE_NORMAL | US_MR_CHRL_8_BIT | US_MR_NBSTOP_1_BIT | UART_MR_PAR_NO;
|
||||||
|
|
||||||
|
// Configure baudrate (asynchronous, no oversampling)
|
||||||
|
HWUART->UART_BRGR = (SystemCoreClock / (baud_setting << 4));
|
||||||
|
|
||||||
|
// Configure interrupts
|
||||||
|
HWUART->UART_IDR = 0xFFFFFFFF;
|
||||||
|
HWUART->UART_IER = UART_IER_RXRDY | UART_IER_OVRE | UART_IER_FRAME;
|
||||||
|
|
||||||
|
// Install interrupt handler
|
||||||
|
install_isr(HWUART_IRQ, UART_ISR);
|
||||||
|
|
||||||
|
// Configure priority. We need a very high priority to avoid losing characters
|
||||||
|
// and we need to be able to preempt the Stepper ISR and everything else!
|
||||||
|
// (this could probably be fixed by using DMA with the Serial port)
|
||||||
|
NVIC_SetPriority(HWUART_IRQ, 1);
|
||||||
|
|
||||||
|
// Enable UART interrupt in NVIC
|
||||||
|
NVIC_EnableIRQ(HWUART_IRQ);
|
||||||
|
|
||||||
|
// Enable receiver and transmitter
|
||||||
|
HWUART->UART_CR = UART_CR_RXEN | UART_CR_TXEN;
|
||||||
|
|
||||||
|
if (Cfg::TX_SIZE > 0) _written = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::end() {
|
||||||
|
// Disable UART interrupt in NVIC
|
||||||
|
NVIC_DisableIRQ( HWUART_IRQ );
|
||||||
|
|
||||||
|
// We NEED memory barriers to ensure Interrupts are actually disabled!
|
||||||
|
// ( https://dzone.com/articles/nvic-disabling-interrupts-on-arm-cortex-m-and-the )
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
|
||||||
|
pmc_disable_periph_clk( HWUART_IRQ_ID );
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
int MarlinSerial<Cfg>::peek() {
|
||||||
|
const int v = rx_buffer.head == rx_buffer.tail ? -1 : rx_buffer.buffer[rx_buffer.tail];
|
||||||
|
return v;
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
int MarlinSerial<Cfg>::read() {
|
||||||
|
|
||||||
|
const ring_buffer_pos_t h = rx_buffer.head;
|
||||||
|
ring_buffer_pos_t t = rx_buffer.tail;
|
||||||
|
|
||||||
|
if (h == t) return -1;
|
||||||
|
|
||||||
|
int v = rx_buffer.buffer[t];
|
||||||
|
t = (ring_buffer_pos_t)(t + 1) & (Cfg::RX_SIZE - 1);
|
||||||
|
|
||||||
|
// Advance tail
|
||||||
|
rx_buffer.tail = t;
|
||||||
|
|
||||||
|
if (Cfg::XONOFF) {
|
||||||
|
// If the XOFF char was sent, or about to be sent...
|
||||||
|
if ((xon_xoff_state & XON_XOFF_CHAR_MASK) == XOFF_CHAR) {
|
||||||
|
// Get count of bytes in the RX buffer
|
||||||
|
const ring_buffer_pos_t rx_count = (ring_buffer_pos_t)(h - t) & (ring_buffer_pos_t)(Cfg::RX_SIZE - 1);
|
||||||
|
// When below 10% of RX buffer capacity, send XON before running out of RX buffer bytes
|
||||||
|
if (rx_count < (Cfg::RX_SIZE) / 10) {
|
||||||
|
if (Cfg::TX_SIZE > 0) {
|
||||||
|
// Signal we want an XON character to be sent.
|
||||||
|
xon_xoff_state = XON_CHAR;
|
||||||
|
// Enable TX isr.
|
||||||
|
HWUART->UART_IER = UART_IER_TXRDY;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// If not using TX interrupts, we must send the XON char now
|
||||||
|
xon_xoff_state = XON_CHAR | XON_XOFF_CHAR_SENT;
|
||||||
|
while (!(HWUART->UART_SR & UART_SR_TXRDY)) sw_barrier();
|
||||||
|
HWUART->UART_THR = XON_CHAR;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return v;
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
typename MarlinSerial<Cfg>::ring_buffer_pos_t MarlinSerial<Cfg>::available() {
|
||||||
|
const ring_buffer_pos_t h = rx_buffer.head, t = rx_buffer.tail;
|
||||||
|
return (ring_buffer_pos_t)(Cfg::RX_SIZE + h - t) & (Cfg::RX_SIZE - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::flush() {
|
||||||
|
rx_buffer.tail = rx_buffer.head;
|
||||||
|
|
||||||
|
if (Cfg::XONOFF) {
|
||||||
|
if ((xon_xoff_state & XON_XOFF_CHAR_MASK) == XOFF_CHAR) {
|
||||||
|
if (Cfg::TX_SIZE > 0) {
|
||||||
|
// Signal we want an XON character to be sent.
|
||||||
|
xon_xoff_state = XON_CHAR;
|
||||||
|
// Enable TX isr.
|
||||||
|
HWUART->UART_IER = UART_IER_TXRDY;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// If not using TX interrupts, we must send the XON char now
|
||||||
|
xon_xoff_state = XON_CHAR | XON_XOFF_CHAR_SENT;
|
||||||
|
while (!(HWUART->UART_SR & UART_SR_TXRDY)) sw_barrier();
|
||||||
|
HWUART->UART_THR = XON_CHAR;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::write(const uint8_t c) {
|
||||||
|
_written = true;
|
||||||
|
|
||||||
|
if (Cfg::TX_SIZE == 0) {
|
||||||
|
while (!(HWUART->UART_SR & UART_SR_TXRDY)) sw_barrier();
|
||||||
|
HWUART->UART_THR = c;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
|
// If the TX interrupts are disabled and the data register
|
||||||
|
// is empty, just write the byte to the data register and
|
||||||
|
// be done. This shortcut helps significantly improve the
|
||||||
|
// effective datarate at high (>500kbit/s) bitrates, where
|
||||||
|
// interrupt overhead becomes a slowdown.
|
||||||
|
// Yes, there is a race condition between the sending of the
|
||||||
|
// XOFF char at the RX isr, but it is properly handled there
|
||||||
|
if (!(HWUART->UART_IMR & UART_IMR_TXRDY) && (HWUART->UART_SR & UART_SR_TXRDY)) {
|
||||||
|
HWUART->UART_THR = c;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const uint8_t i = (tx_buffer.head + 1) & (Cfg::TX_SIZE - 1);
|
||||||
|
|
||||||
|
// If global interrupts are disabled (as the result of being called from an ISR)...
|
||||||
|
if (!ISRS_ENABLED()) {
|
||||||
|
|
||||||
|
// Make room by polling if it is possible to transmit, and do so!
|
||||||
|
while (i == tx_buffer.tail) {
|
||||||
|
// If we can transmit another byte, do it.
|
||||||
|
if (HWUART->UART_SR & UART_SR_TXRDY) _tx_thr_empty_irq();
|
||||||
|
// Make sure compiler rereads tx_buffer.tail
|
||||||
|
sw_barrier();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Interrupts are enabled, just wait until there is space
|
||||||
|
while (i == tx_buffer.tail) sw_barrier();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Store new char. head is always safe to move
|
||||||
|
tx_buffer.buffer[tx_buffer.head] = c;
|
||||||
|
tx_buffer.head = i;
|
||||||
|
|
||||||
|
// Enable TX isr - Non atomic, but it will eventually enable TX isr
|
||||||
|
HWUART->UART_IER = UART_IER_TXRDY;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::flushTX() {
|
||||||
|
// TX
|
||||||
|
|
||||||
|
if (Cfg::TX_SIZE == 0) {
|
||||||
|
// No bytes written, no need to flush. This special case is needed since there's
|
||||||
|
// no way to force the TXC (transmit complete) bit to 1 during initialization.
|
||||||
|
if (!_written) return;
|
||||||
|
|
||||||
|
// Wait until everything was transmitted
|
||||||
|
while (!(HWUART->UART_SR & UART_SR_TXEMPTY)) sw_barrier();
|
||||||
|
|
||||||
|
// At this point nothing is queued anymore (DRIE is disabled) and
|
||||||
|
// the hardware finished transmission (TXC is set).
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// If we have never written a byte, no need to flush. This special
|
||||||
|
// case is needed since there is no way to force the TXC (transmit
|
||||||
|
// complete) bit to 1 during initialization
|
||||||
|
if (!_written) return;
|
||||||
|
|
||||||
|
// If global interrupts are disabled (as the result of being called from an ISR)...
|
||||||
|
if (!ISRS_ENABLED()) {
|
||||||
|
|
||||||
|
// Wait until everything was transmitted - We must do polling, as interrupts are disabled
|
||||||
|
while (tx_buffer.head != tx_buffer.tail || !(HWUART->UART_SR & UART_SR_TXEMPTY)) {
|
||||||
|
// If there is more space, send an extra character
|
||||||
|
if (HWUART->UART_SR & UART_SR_TXRDY) _tx_thr_empty_irq();
|
||||||
|
sw_barrier();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Wait until everything was transmitted
|
||||||
|
while (tx_buffer.head != tx_buffer.tail || !(HWUART->UART_SR & UART_SR_TXEMPTY)) sw_barrier();
|
||||||
|
}
|
||||||
|
|
||||||
|
// At this point nothing is queued anymore (DRIE is disabled) and
|
||||||
|
// the hardware finished transmission (TXC is set).
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Imports from print.h
|
||||||
|
*/
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::print(char c, int base) {
|
||||||
|
print((long)c, base);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::print(unsigned char b, int base) {
|
||||||
|
print((unsigned long)b, base);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::print(int n, int base) {
|
||||||
|
print((long)n, base);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::print(unsigned int n, int base) {
|
||||||
|
print((unsigned long)n, base);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::print(long n, int base) {
|
||||||
|
if (base == 0) write(n);
|
||||||
|
else if (base == 10) {
|
||||||
|
if (n < 0) { print('-'); n = -n; }
|
||||||
|
printNumber(n, 10);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
printNumber(n, base);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::print(unsigned long n, int base) {
|
||||||
|
if (base == 0) write(n);
|
||||||
|
else printNumber(n, base);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::print(double n, int digits) {
|
||||||
|
printFloat(n, digits);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::println() {
|
||||||
|
print('\r');
|
||||||
|
print('\n');
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::println(const String& s) {
|
||||||
|
print(s);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::println(const char c[]) {
|
||||||
|
print(c);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::println(char c, int base) {
|
||||||
|
print(c, base);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::println(unsigned char b, int base) {
|
||||||
|
print(b, base);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::println(int n, int base) {
|
||||||
|
print(n, base);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::println(unsigned int n, int base) {
|
||||||
|
print(n, base);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::println(long n, int base) {
|
||||||
|
print(n, base);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::println(unsigned long n, int base) {
|
||||||
|
print(n, base);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::println(double n, int digits) {
|
||||||
|
print(n, digits);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Private Methods
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::printNumber(unsigned long n, uint8_t base) {
|
||||||
|
if (n) {
|
||||||
|
unsigned char buf[8 * sizeof(long)]; // Enough space for base 2
|
||||||
|
int8_t i = 0;
|
||||||
|
while (n) {
|
||||||
|
buf[i++] = n % base;
|
||||||
|
n /= base;
|
||||||
|
}
|
||||||
|
while (i--)
|
||||||
|
print((char)(buf[i] + (buf[i] < 10 ? '0' : 'A' - 10)));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
print('0');
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::printFloat(double number, uint8_t digits) {
|
||||||
|
// Handle negative numbers
|
||||||
|
if (number < 0.0) {
|
||||||
|
print('-');
|
||||||
|
number = -number;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Round correctly so that print(1.999, 2) prints as "2.00"
|
||||||
|
double rounding = 0.5;
|
||||||
|
LOOP_L_N(i, digits) rounding *= 0.1;
|
||||||
|
number += rounding;
|
||||||
|
|
||||||
|
// Extract the integer part of the number and print it
|
||||||
|
unsigned long int_part = (unsigned long)number;
|
||||||
|
double remainder = number - (double)int_part;
|
||||||
|
print(int_part);
|
||||||
|
|
||||||
|
// Print the decimal point, but only if there are digits beyond
|
||||||
|
if (digits) {
|
||||||
|
print('.');
|
||||||
|
// Extract digits from the remainder one at a time
|
||||||
|
while (digits--) {
|
||||||
|
remainder *= 10.0;
|
||||||
|
int toPrint = int(remainder);
|
||||||
|
print(toPrint);
|
||||||
|
remainder -= toPrint;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// If not using the USB port as serial port
|
||||||
|
#if SERIAL_PORT >= 0
|
||||||
|
template class MarlinSerial<MarlinSerialCfg<SERIAL_PORT>>; // Define
|
||||||
|
MarlinSerial<MarlinSerialCfg<SERIAL_PORT>> customizedSerial1; // Instantiate
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(SERIAL_PORT_2) && SERIAL_PORT_2 >= 0
|
||||||
|
template class MarlinSerial<MarlinSerialCfg<SERIAL_PORT_2>>; // Define
|
||||||
|
MarlinSerial<MarlinSerialCfg<SERIAL_PORT_2>> customizedSerial2; // Instantiate
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // ARDUINO_ARCH_SAM
|
||||||
182
Marlin/src/HAL/DUE/MarlinSerial.h
Normal file
182
Marlin/src/HAL/DUE/MarlinSerial.h
Normal file
|
|
@ -0,0 +1,182 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
/**
|
||||||
|
* MarlinSerial_Due.h - Hardware serial library for Arduino DUE
|
||||||
|
* Copyright (c) 2017 Eduardo José Tagle. All right reserved
|
||||||
|
* Based on MarlinSerial for AVR, copyright (c) 2006 Nicholas Zambetti. All right reserved.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <WString.h>
|
||||||
|
|
||||||
|
#include "../../inc/MarlinConfigPre.h"
|
||||||
|
|
||||||
|
#define DEC 10
|
||||||
|
#define HEX 16
|
||||||
|
#define OCT 8
|
||||||
|
#define BIN 2
|
||||||
|
|
||||||
|
// Define constants and variables for buffering incoming serial data. We're
|
||||||
|
// using a ring buffer (I think), in which rx_buffer_head is the index of the
|
||||||
|
// location to which to write the next incoming character and rx_buffer_tail
|
||||||
|
// is the index of the location from which to read.
|
||||||
|
// 256 is the max limit due to uint8_t head and tail. Use only powers of 2. (...,16,32,64,128,256)
|
||||||
|
#ifndef RX_BUFFER_SIZE
|
||||||
|
#define RX_BUFFER_SIZE 128
|
||||||
|
#endif
|
||||||
|
#ifndef TX_BUFFER_SIZE
|
||||||
|
#define TX_BUFFER_SIZE 32
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//#if ENABLED(SERIAL_XON_XOFF) && RX_BUFFER_SIZE < 1024
|
||||||
|
// #error "SERIAL_XON_XOFF requires RX_BUFFER_SIZE >= 1024 for reliable transfers without drops."
|
||||||
|
//#elif RX_BUFFER_SIZE && (RX_BUFFER_SIZE < 2 || !IS_POWER_OF_2(RX_BUFFER_SIZE))
|
||||||
|
// #error "RX_BUFFER_SIZE must be a power of 2 greater than 1."
|
||||||
|
//#elif TX_BUFFER_SIZE && (TX_BUFFER_SIZE < 2 || TX_BUFFER_SIZE > 256 || !IS_POWER_OF_2(TX_BUFFER_SIZE))
|
||||||
|
// #error "TX_BUFFER_SIZE must be 0, a power of 2 greater than 1, and no greater than 256."
|
||||||
|
//#endif
|
||||||
|
|
||||||
|
// Templated type selector
|
||||||
|
template<bool b, typename T, typename F> struct TypeSelector { typedef T type;} ;
|
||||||
|
template<typename T, typename F> struct TypeSelector<false, T, F> { typedef F type; };
|
||||||
|
|
||||||
|
// Templated structure wrapper
|
||||||
|
template<typename S, unsigned int addr> struct StructWrapper {
|
||||||
|
constexpr StructWrapper(int) {}
|
||||||
|
FORCE_INLINE S* operator->() const { return (S*)addr; }
|
||||||
|
};
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
class MarlinSerial {
|
||||||
|
protected:
|
||||||
|
// Information for all supported UARTs
|
||||||
|
static constexpr uint32_t BASES[] = {0x400E0800U, 0x40098000U, 0x4009C000U, 0x400A0000U, 0x400A4000U};
|
||||||
|
static constexpr IRQn_Type IRQS[] = { UART_IRQn, USART0_IRQn, USART1_IRQn, USART2_IRQn, USART3_IRQn};
|
||||||
|
static constexpr int IRQ_IDS[] = { ID_UART, ID_USART0, ID_USART1, ID_USART2, ID_USART3};
|
||||||
|
|
||||||
|
// Alias for shorter code
|
||||||
|
static constexpr StructWrapper<Uart,BASES[Cfg::PORT]> HWUART = 0;
|
||||||
|
static constexpr IRQn_Type HWUART_IRQ = IRQS[Cfg::PORT];
|
||||||
|
static constexpr int HWUART_IRQ_ID = IRQ_IDS[Cfg::PORT];
|
||||||
|
|
||||||
|
// Base size of type on buffer size
|
||||||
|
typedef typename TypeSelector<(Cfg::RX_SIZE>256), uint16_t, uint8_t>::type ring_buffer_pos_t;
|
||||||
|
|
||||||
|
struct ring_buffer_r {
|
||||||
|
volatile ring_buffer_pos_t head, tail;
|
||||||
|
unsigned char buffer[Cfg::RX_SIZE];
|
||||||
|
};
|
||||||
|
|
||||||
|
struct ring_buffer_t {
|
||||||
|
volatile uint8_t head, tail;
|
||||||
|
unsigned char buffer[Cfg::TX_SIZE];
|
||||||
|
};
|
||||||
|
|
||||||
|
static ring_buffer_r rx_buffer;
|
||||||
|
static ring_buffer_t tx_buffer;
|
||||||
|
static bool _written;
|
||||||
|
|
||||||
|
static constexpr uint8_t XON_XOFF_CHAR_SENT = 0x80, // XON / XOFF Character was sent
|
||||||
|
XON_XOFF_CHAR_MASK = 0x1F; // XON / XOFF character to send
|
||||||
|
|
||||||
|
// XON / XOFF character definitions
|
||||||
|
static constexpr uint8_t XON_CHAR = 17, XOFF_CHAR = 19;
|
||||||
|
static uint8_t xon_xoff_state,
|
||||||
|
rx_dropped_bytes,
|
||||||
|
rx_buffer_overruns,
|
||||||
|
rx_framing_errors;
|
||||||
|
static ring_buffer_pos_t rx_max_enqueued;
|
||||||
|
|
||||||
|
FORCE_INLINE static void store_rxd_char();
|
||||||
|
FORCE_INLINE static void _tx_thr_empty_irq();
|
||||||
|
static void UART_ISR();
|
||||||
|
|
||||||
|
public:
|
||||||
|
MarlinSerial() {};
|
||||||
|
static void begin(const long);
|
||||||
|
static void end();
|
||||||
|
static int peek();
|
||||||
|
static int read();
|
||||||
|
static void flush();
|
||||||
|
static ring_buffer_pos_t available();
|
||||||
|
static void write(const uint8_t c);
|
||||||
|
static void flushTX();
|
||||||
|
|
||||||
|
static inline bool emergency_parser_enabled() { return Cfg::EMERGENCYPARSER; }
|
||||||
|
|
||||||
|
FORCE_INLINE static uint8_t dropped() { return Cfg::DROPPED_RX ? rx_dropped_bytes : 0; }
|
||||||
|
FORCE_INLINE static uint8_t buffer_overruns() { return Cfg::RX_OVERRUNS ? rx_buffer_overruns : 0; }
|
||||||
|
FORCE_INLINE static uint8_t framing_errors() { return Cfg::RX_FRAMING_ERRORS ? rx_framing_errors : 0; }
|
||||||
|
FORCE_INLINE static ring_buffer_pos_t rxMaxEnqueued() { return Cfg::MAX_RX_QUEUED ? rx_max_enqueued : 0; }
|
||||||
|
|
||||||
|
FORCE_INLINE static void write(const char* str) { while (*str) write(*str++); }
|
||||||
|
FORCE_INLINE static void write(const uint8_t* buffer, size_t size) { while (size--) write(*buffer++); }
|
||||||
|
FORCE_INLINE static void print(const String& s) { for (int i = 0; i < (int)s.length(); i++) write(s[i]); }
|
||||||
|
FORCE_INLINE static void print(const char* str) { write(str); }
|
||||||
|
|
||||||
|
static void print(char, int = 0);
|
||||||
|
static void print(unsigned char, int = 0);
|
||||||
|
static void print(int, int = DEC);
|
||||||
|
static void print(unsigned int, int = DEC);
|
||||||
|
static void print(long, int = DEC);
|
||||||
|
static void print(unsigned long, int = DEC);
|
||||||
|
static void print(double, int = 2);
|
||||||
|
|
||||||
|
static void println(const String& s);
|
||||||
|
static void println(const char[]);
|
||||||
|
static void println(char, int = 0);
|
||||||
|
static void println(unsigned char, int = 0);
|
||||||
|
static void println(int, int = DEC);
|
||||||
|
static void println(unsigned int, int = DEC);
|
||||||
|
static void println(long, int = DEC);
|
||||||
|
static void println(unsigned long, int = DEC);
|
||||||
|
static void println(double, int = 2);
|
||||||
|
static void println();
|
||||||
|
operator bool() { return true; }
|
||||||
|
|
||||||
|
private:
|
||||||
|
static void printNumber(unsigned long, const uint8_t);
|
||||||
|
static void printFloat(double, uint8_t);
|
||||||
|
};
|
||||||
|
|
||||||
|
// Serial port configuration
|
||||||
|
template <uint8_t serial>
|
||||||
|
struct MarlinSerialCfg {
|
||||||
|
static constexpr int PORT = serial;
|
||||||
|
static constexpr unsigned int RX_SIZE = RX_BUFFER_SIZE;
|
||||||
|
static constexpr unsigned int TX_SIZE = TX_BUFFER_SIZE;
|
||||||
|
static constexpr bool XONOFF = ENABLED(SERIAL_XON_XOFF);
|
||||||
|
static constexpr bool EMERGENCYPARSER = ENABLED(EMERGENCY_PARSER);
|
||||||
|
static constexpr bool DROPPED_RX = ENABLED(SERIAL_STATS_DROPPED_RX);
|
||||||
|
static constexpr bool RX_OVERRUNS = ENABLED(SERIAL_STATS_RX_BUFFER_OVERRUNS);
|
||||||
|
static constexpr bool RX_FRAMING_ERRORS = ENABLED(SERIAL_STATS_RX_FRAMING_ERRORS);
|
||||||
|
static constexpr bool MAX_RX_QUEUED = ENABLED(SERIAL_STATS_MAX_RX_QUEUED);
|
||||||
|
};
|
||||||
|
|
||||||
|
#if SERIAL_PORT >= 0
|
||||||
|
extern MarlinSerial<MarlinSerialCfg<SERIAL_PORT>> customizedSerial1;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(SERIAL_PORT_2) && SERIAL_PORT_2 >= 0
|
||||||
|
extern MarlinSerial<MarlinSerialCfg<SERIAL_PORT_2>> customizedSerial2;
|
||||||
|
#endif
|
||||||
290
Marlin/src/HAL/DUE/MarlinSerialUSB.cpp
Normal file
290
Marlin/src/HAL/DUE/MarlinSerialUSB.cpp
Normal file
|
|
@ -0,0 +1,290 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* MarlinSerial_Due.cpp - Hardware serial library for Arduino DUE
|
||||||
|
* Copyright (c) 2017 Eduardo José Tagle. All right reserved
|
||||||
|
* Based on MarlinSerial for AVR, copyright (c) 2006 Nicholas Zambetti. All right reserved.
|
||||||
|
*/
|
||||||
|
#ifdef ARDUINO_ARCH_SAM
|
||||||
|
|
||||||
|
#include "../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
|
#if HAS_USB_SERIAL
|
||||||
|
|
||||||
|
#include "MarlinSerialUSB.h"
|
||||||
|
|
||||||
|
#if ENABLED(EMERGENCY_PARSER)
|
||||||
|
#include "../../feature/e_parser.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Imports from Atmel USB Stack/CDC implementation
|
||||||
|
extern "C" {
|
||||||
|
bool usb_task_cdc_isenabled();
|
||||||
|
bool usb_task_cdc_dtr_active();
|
||||||
|
bool udi_cdc_is_rx_ready();
|
||||||
|
int udi_cdc_getc();
|
||||||
|
bool udi_cdc_is_tx_ready();
|
||||||
|
int udi_cdc_putc(int value);
|
||||||
|
};
|
||||||
|
|
||||||
|
// Pending character
|
||||||
|
static int pending_char = -1;
|
||||||
|
|
||||||
|
#if ENABLED(EMERGENCY_PARSER)
|
||||||
|
static EmergencyParser::State emergency_state; // = EP_RESET
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Public Methods
|
||||||
|
void MarlinSerialUSB::begin(const long) {}
|
||||||
|
|
||||||
|
void MarlinSerialUSB::end() {}
|
||||||
|
|
||||||
|
int MarlinSerialUSB::peek() {
|
||||||
|
if (pending_char >= 0)
|
||||||
|
return pending_char;
|
||||||
|
|
||||||
|
// If USB CDC not enumerated or not configured on the PC side
|
||||||
|
if (!usb_task_cdc_isenabled())
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
// If no bytes sent from the PC
|
||||||
|
if (!udi_cdc_is_rx_ready())
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
pending_char = udi_cdc_getc();
|
||||||
|
|
||||||
|
TERN_(EMERGENCY_PARSER, emergency_parser.update(emergency_state, (char)pending_char));
|
||||||
|
|
||||||
|
return pending_char;
|
||||||
|
}
|
||||||
|
|
||||||
|
int MarlinSerialUSB::read() {
|
||||||
|
if (pending_char >= 0) {
|
||||||
|
int ret = pending_char;
|
||||||
|
pending_char = -1;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If USB CDC not enumerated or not configured on the PC side
|
||||||
|
if (!usb_task_cdc_isenabled())
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
// If no bytes sent from the PC
|
||||||
|
if (!udi_cdc_is_rx_ready())
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
int c = udi_cdc_getc();
|
||||||
|
|
||||||
|
TERN_(EMERGENCY_PARSER, emergency_parser.update(emergency_state, (char)c));
|
||||||
|
|
||||||
|
return c;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool MarlinSerialUSB::available() {
|
||||||
|
/* If Pending chars */
|
||||||
|
return pending_char >= 0 ||
|
||||||
|
/* or USB CDC enumerated and configured on the PC side and some
|
||||||
|
bytes where sent to us */
|
||||||
|
(usb_task_cdc_isenabled() && udi_cdc_is_rx_ready());
|
||||||
|
}
|
||||||
|
|
||||||
|
void MarlinSerialUSB::flush() { }
|
||||||
|
void MarlinSerialUSB::flushTX() { }
|
||||||
|
|
||||||
|
void MarlinSerialUSB::write(const uint8_t c) {
|
||||||
|
|
||||||
|
/* Do not even bother sending anything if USB CDC is not enumerated
|
||||||
|
or not configured on the PC side or there is no program on the PC
|
||||||
|
listening to our messages */
|
||||||
|
if (!usb_task_cdc_isenabled() || !usb_task_cdc_dtr_active())
|
||||||
|
return;
|
||||||
|
|
||||||
|
/* Wait until the PC has read the pending to be sent data */
|
||||||
|
while (usb_task_cdc_isenabled() &&
|
||||||
|
usb_task_cdc_dtr_active() &&
|
||||||
|
!udi_cdc_is_tx_ready()) {
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Do not even bother sending anything if USB CDC is not enumerated
|
||||||
|
or not configured on the PC side or there is no program on the PC
|
||||||
|
listening to our messages at this point */
|
||||||
|
if (!usb_task_cdc_isenabled() || !usb_task_cdc_dtr_active())
|
||||||
|
return;
|
||||||
|
|
||||||
|
// Fifo full
|
||||||
|
// udi_cdc_signal_overrun();
|
||||||
|
udi_cdc_putc(c);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Imports from print.h
|
||||||
|
*/
|
||||||
|
|
||||||
|
void MarlinSerialUSB::print(char c, int base) {
|
||||||
|
print((long)c, base);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MarlinSerialUSB::print(unsigned char b, int base) {
|
||||||
|
print((unsigned long)b, base);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MarlinSerialUSB::print(int n, int base) {
|
||||||
|
print((long)n, base);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MarlinSerialUSB::print(unsigned int n, int base) {
|
||||||
|
print((unsigned long)n, base);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MarlinSerialUSB::print(long n, int base) {
|
||||||
|
if (base == 0)
|
||||||
|
write(n);
|
||||||
|
else if (base == 10) {
|
||||||
|
if (n < 0) {
|
||||||
|
print('-');
|
||||||
|
n = -n;
|
||||||
|
}
|
||||||
|
printNumber(n, 10);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
printNumber(n, base);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MarlinSerialUSB::print(unsigned long n, int base) {
|
||||||
|
if (base == 0) write(n);
|
||||||
|
else printNumber(n, base);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MarlinSerialUSB::print(double n, int digits) {
|
||||||
|
printFloat(n, digits);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MarlinSerialUSB::println() {
|
||||||
|
print('\r');
|
||||||
|
print('\n');
|
||||||
|
}
|
||||||
|
|
||||||
|
void MarlinSerialUSB::println(const String& s) {
|
||||||
|
print(s);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MarlinSerialUSB::println(const char c[]) {
|
||||||
|
print(c);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MarlinSerialUSB::println(char c, int base) {
|
||||||
|
print(c, base);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MarlinSerialUSB::println(unsigned char b, int base) {
|
||||||
|
print(b, base);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MarlinSerialUSB::println(int n, int base) {
|
||||||
|
print(n, base);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MarlinSerialUSB::println(unsigned int n, int base) {
|
||||||
|
print(n, base);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MarlinSerialUSB::println(long n, int base) {
|
||||||
|
print(n, base);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MarlinSerialUSB::println(unsigned long n, int base) {
|
||||||
|
print(n, base);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MarlinSerialUSB::println(double n, int digits) {
|
||||||
|
print(n, digits);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Private Methods
|
||||||
|
|
||||||
|
void MarlinSerialUSB::printNumber(unsigned long n, uint8_t base) {
|
||||||
|
if (n) {
|
||||||
|
unsigned char buf[8 * sizeof(long)]; // Enough space for base 2
|
||||||
|
int8_t i = 0;
|
||||||
|
while (n) {
|
||||||
|
buf[i++] = n % base;
|
||||||
|
n /= base;
|
||||||
|
}
|
||||||
|
while (i--)
|
||||||
|
print((char)(buf[i] + (buf[i] < 10 ? '0' : 'A' - 10)));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
print('0');
|
||||||
|
}
|
||||||
|
|
||||||
|
void MarlinSerialUSB::printFloat(double number, uint8_t digits) {
|
||||||
|
// Handle negative numbers
|
||||||
|
if (number < 0.0) {
|
||||||
|
print('-');
|
||||||
|
number = -number;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Round correctly so that print(1.999, 2) prints as "2.00"
|
||||||
|
double rounding = 0.5;
|
||||||
|
LOOP_L_N(i, digits)
|
||||||
|
rounding *= 0.1;
|
||||||
|
|
||||||
|
number += rounding;
|
||||||
|
|
||||||
|
// Extract the integer part of the number and print it
|
||||||
|
unsigned long int_part = (unsigned long)number;
|
||||||
|
double remainder = number - (double)int_part;
|
||||||
|
print(int_part);
|
||||||
|
|
||||||
|
// Print the decimal point, but only if there are digits beyond
|
||||||
|
if (digits) {
|
||||||
|
print('.');
|
||||||
|
// Extract digits from the remainder one at a time
|
||||||
|
while (digits--) {
|
||||||
|
remainder *= 10.0;
|
||||||
|
int toPrint = int(remainder);
|
||||||
|
print(toPrint);
|
||||||
|
remainder -= toPrint;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Preinstantiate
|
||||||
|
#if SERIAL_PORT == -1
|
||||||
|
MarlinSerialUSB customizedSerial1;
|
||||||
|
#endif
|
||||||
|
#if SERIAL_PORT_2 == -1
|
||||||
|
MarlinSerialUSB customizedSerial2;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // HAS_USB_SERIAL
|
||||||
|
#endif // ARDUINO_ARCH_SAM
|
||||||
99
Marlin/src/HAL/DUE/MarlinSerialUSB.h
Normal file
99
Marlin/src/HAL/DUE/MarlinSerialUSB.h
Normal file
|
|
@ -0,0 +1,99 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
/**
|
||||||
|
* MarlinSerialUSB_Due.h - Hardware Serial over USB (CDC) library for Arduino DUE
|
||||||
|
* Copyright (c) 2017 Eduardo José Tagle. All right reserved
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
|
#if HAS_USB_SERIAL
|
||||||
|
|
||||||
|
#include <WString.h>
|
||||||
|
|
||||||
|
#define DEC 10
|
||||||
|
#define HEX 16
|
||||||
|
#define OCT 8
|
||||||
|
#define BIN 2
|
||||||
|
|
||||||
|
class MarlinSerialUSB {
|
||||||
|
|
||||||
|
public:
|
||||||
|
MarlinSerialUSB() {};
|
||||||
|
static void begin(const long);
|
||||||
|
static void end();
|
||||||
|
static int peek();
|
||||||
|
static int read();
|
||||||
|
static void flush();
|
||||||
|
static void flushTX();
|
||||||
|
static bool available();
|
||||||
|
static void write(const uint8_t c);
|
||||||
|
|
||||||
|
#if ENABLED(SERIAL_STATS_DROPPED_RX)
|
||||||
|
FORCE_INLINE static uint32_t dropped() { return 0; }
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
|
||||||
|
FORCE_INLINE static int rxMaxEnqueued() { return 0; }
|
||||||
|
#endif
|
||||||
|
|
||||||
|
FORCE_INLINE static void write(const char* str) { while (*str) write(*str++); }
|
||||||
|
FORCE_INLINE static void write(const uint8_t* buffer, size_t size) { while (size--) write(*buffer++); }
|
||||||
|
FORCE_INLINE static void print(const String& s) { for (int i = 0; i < (int)s.length(); i++) write(s[i]); }
|
||||||
|
FORCE_INLINE static void print(const char* str) { write(str); }
|
||||||
|
|
||||||
|
static void print(char, int = 0);
|
||||||
|
static void print(unsigned char, int = 0);
|
||||||
|
static void print(int, int = DEC);
|
||||||
|
static void print(unsigned int, int = DEC);
|
||||||
|
static void print(long, int = DEC);
|
||||||
|
static void print(unsigned long, int = DEC);
|
||||||
|
static void print(double, int = 2);
|
||||||
|
|
||||||
|
static void println(const String& s);
|
||||||
|
static void println(const char[]);
|
||||||
|
static void println(char, int = 0);
|
||||||
|
static void println(unsigned char, int = 0);
|
||||||
|
static void println(int, int = DEC);
|
||||||
|
static void println(unsigned int, int = DEC);
|
||||||
|
static void println(long, int = DEC);
|
||||||
|
static void println(unsigned long, int = DEC);
|
||||||
|
static void println(double, int = 2);
|
||||||
|
static void println();
|
||||||
|
operator bool() { return true; }
|
||||||
|
|
||||||
|
private:
|
||||||
|
static void printNumber(unsigned long, const uint8_t);
|
||||||
|
static void printFloat(double, uint8_t);
|
||||||
|
};
|
||||||
|
|
||||||
|
#if SERIAL_PORT == -1
|
||||||
|
extern MarlinSerialUSB customizedSerial1;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if SERIAL_PORT_2 == -1
|
||||||
|
extern MarlinSerialUSB customizedSerial2;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // HAS_USB_SERIAL
|
||||||
159
Marlin/src/HAL/DUE/Servo.cpp
Normal file
159
Marlin/src/HAL/DUE/Servo.cpp
Normal file
|
|
@ -0,0 +1,159 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
Copyright (c) 2013 Arduino LLC. All right reserved.
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library 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
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef ARDUINO_ARCH_SAM
|
||||||
|
|
||||||
|
#include "../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
|
#if HAS_SERVOS
|
||||||
|
|
||||||
|
#include "../shared/servo.h"
|
||||||
|
#include "../shared/servo_private.h"
|
||||||
|
|
||||||
|
static volatile int8_t Channel[_Nbr_16timers]; // counter for the servo being pulsed for each timer (or -1 if refresh interval)
|
||||||
|
|
||||||
|
// ------------------------
|
||||||
|
/// Interrupt handler for the TC0 channel 1.
|
||||||
|
// ------------------------
|
||||||
|
void Servo_Handler(timer16_Sequence_t timer, Tc *pTc, uint8_t channel);
|
||||||
|
|
||||||
|
#ifdef _useTimer1
|
||||||
|
void HANDLER_FOR_TIMER1() { Servo_Handler(_timer1, TC_FOR_TIMER1, CHANNEL_FOR_TIMER1); }
|
||||||
|
#endif
|
||||||
|
#ifdef _useTimer2
|
||||||
|
void HANDLER_FOR_TIMER2() { Servo_Handler(_timer2, TC_FOR_TIMER2, CHANNEL_FOR_TIMER2); }
|
||||||
|
#endif
|
||||||
|
#ifdef _useTimer3
|
||||||
|
void HANDLER_FOR_TIMER3() { Servo_Handler(_timer3, TC_FOR_TIMER3, CHANNEL_FOR_TIMER3); }
|
||||||
|
#endif
|
||||||
|
#ifdef _useTimer4
|
||||||
|
void HANDLER_FOR_TIMER4() { Servo_Handler(_timer4, TC_FOR_TIMER4, CHANNEL_FOR_TIMER4); }
|
||||||
|
#endif
|
||||||
|
#ifdef _useTimer5
|
||||||
|
void HANDLER_FOR_TIMER5() { Servo_Handler(_timer5, TC_FOR_TIMER5, CHANNEL_FOR_TIMER5); }
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void Servo_Handler(timer16_Sequence_t timer, Tc *tc, uint8_t channel) {
|
||||||
|
// clear interrupt
|
||||||
|
tc->TC_CHANNEL[channel].TC_SR;
|
||||||
|
if (Channel[timer] < 0)
|
||||||
|
tc->TC_CHANNEL[channel].TC_CCR |= TC_CCR_SWTRG; // channel set to -1 indicated that refresh interval completed so reset the timer
|
||||||
|
else if (SERVO_INDEX(timer, Channel[timer]) < ServoCount && SERVO(timer, Channel[timer]).Pin.isActive)
|
||||||
|
extDigitalWrite(SERVO(timer, Channel[timer]).Pin.nbr, LOW); // pulse this channel low if activated
|
||||||
|
|
||||||
|
Channel[timer]++; // increment to the next channel
|
||||||
|
if (SERVO_INDEX(timer, Channel[timer]) < ServoCount && Channel[timer] < SERVOS_PER_TIMER) {
|
||||||
|
tc->TC_CHANNEL[channel].TC_RA = tc->TC_CHANNEL[channel].TC_CV + SERVO(timer,Channel[timer]).ticks;
|
||||||
|
if (SERVO(timer,Channel[timer]).Pin.isActive) // check if activated
|
||||||
|
extDigitalWrite(SERVO(timer, Channel[timer]).Pin.nbr, HIGH); // its an active channel so pulse it high
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// finished all channels so wait for the refresh period to expire before starting over
|
||||||
|
tc->TC_CHANNEL[channel].TC_RA =
|
||||||
|
tc->TC_CHANNEL[channel].TC_CV < usToTicks(REFRESH_INTERVAL) - 4
|
||||||
|
? (unsigned int)usToTicks(REFRESH_INTERVAL) // allow a few ticks to ensure the next OCR1A not missed
|
||||||
|
: tc->TC_CHANNEL[channel].TC_CV + 4; // at least REFRESH_INTERVAL has elapsed
|
||||||
|
Channel[timer] = -1; // this will get incremented at the end of the refresh period to start again at the first channel
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void _initISR(Tc *tc, uint32_t channel, uint32_t id, IRQn_Type irqn) {
|
||||||
|
pmc_enable_periph_clk(id);
|
||||||
|
TC_Configure(tc, channel,
|
||||||
|
TC_CMR_TCCLKS_TIMER_CLOCK3 | // MCK/32
|
||||||
|
TC_CMR_WAVE | // Waveform mode
|
||||||
|
TC_CMR_WAVSEL_UP_RC ); // Counter running up and reset when equals to RC
|
||||||
|
|
||||||
|
/* 84MHz, MCK/32, for 1.5ms: 3937 */
|
||||||
|
TC_SetRA(tc, channel, 2625); // 1ms
|
||||||
|
|
||||||
|
/* Configure and enable interrupt */
|
||||||
|
NVIC_EnableIRQ(irqn);
|
||||||
|
// TC_IER_CPAS: RA Compare
|
||||||
|
tc->TC_CHANNEL[channel].TC_IER = TC_IER_CPAS;
|
||||||
|
|
||||||
|
// Enables the timer clock and performs a software reset to start the counting
|
||||||
|
TC_Start(tc, channel);
|
||||||
|
}
|
||||||
|
|
||||||
|
void initISR(timer16_Sequence_t timer) {
|
||||||
|
#ifdef _useTimer1
|
||||||
|
if (timer == _timer1)
|
||||||
|
_initISR(TC_FOR_TIMER1, CHANNEL_FOR_TIMER1, ID_TC_FOR_TIMER1, IRQn_FOR_TIMER1);
|
||||||
|
#endif
|
||||||
|
#ifdef _useTimer2
|
||||||
|
if (timer == _timer2)
|
||||||
|
_initISR(TC_FOR_TIMER2, CHANNEL_FOR_TIMER2, ID_TC_FOR_TIMER2, IRQn_FOR_TIMER2);
|
||||||
|
#endif
|
||||||
|
#ifdef _useTimer3
|
||||||
|
if (timer == _timer3)
|
||||||
|
_initISR(TC_FOR_TIMER3, CHANNEL_FOR_TIMER3, ID_TC_FOR_TIMER3, IRQn_FOR_TIMER3);
|
||||||
|
#endif
|
||||||
|
#ifdef _useTimer4
|
||||||
|
if (timer == _timer4)
|
||||||
|
_initISR(TC_FOR_TIMER4, CHANNEL_FOR_TIMER4, ID_TC_FOR_TIMER4, IRQn_FOR_TIMER4);
|
||||||
|
#endif
|
||||||
|
#ifdef _useTimer5
|
||||||
|
if (timer == _timer5)
|
||||||
|
_initISR(TC_FOR_TIMER5, CHANNEL_FOR_TIMER5, ID_TC_FOR_TIMER5, IRQn_FOR_TIMER5);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void finISR(timer16_Sequence_t) {
|
||||||
|
#ifdef _useTimer1
|
||||||
|
TC_Stop(TC_FOR_TIMER1, CHANNEL_FOR_TIMER1);
|
||||||
|
#endif
|
||||||
|
#ifdef _useTimer2
|
||||||
|
TC_Stop(TC_FOR_TIMER2, CHANNEL_FOR_TIMER2);
|
||||||
|
#endif
|
||||||
|
#ifdef _useTimer3
|
||||||
|
TC_Stop(TC_FOR_TIMER3, CHANNEL_FOR_TIMER3);
|
||||||
|
#endif
|
||||||
|
#ifdef _useTimer4
|
||||||
|
TC_Stop(TC_FOR_TIMER4, CHANNEL_FOR_TIMER4);
|
||||||
|
#endif
|
||||||
|
#ifdef _useTimer5
|
||||||
|
TC_Stop(TC_FOR_TIMER5, CHANNEL_FOR_TIMER5);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // HAS_SERVOS
|
||||||
|
|
||||||
|
#endif // ARDUINO_ARCH_SAM
|
||||||
107
Marlin/src/HAL/DUE/ServoTimers.h
Normal file
107
Marlin/src/HAL/DUE/ServoTimers.h
Normal file
|
|
@ -0,0 +1,107 @@
|
||||||
|
/**
|
||||||
|
* Copyright (c) 2013 Arduino LLC. All right reserved.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library 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
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defines for 16 bit timers used with Servo library
|
||||||
|
*
|
||||||
|
* If _useTimerX is defined then TimerX is a 32 bit timer on the current board
|
||||||
|
* timer16_Sequence_t enumerates the sequence that the timers should be allocated
|
||||||
|
* _Nbr_16timers indicates how many timers are available.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SAM Only definitions
|
||||||
|
* --------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
// For SAM3X:
|
||||||
|
//!#define _useTimer1
|
||||||
|
//!#define _useTimer2
|
||||||
|
#define _useTimer3
|
||||||
|
//!#define _useTimer4
|
||||||
|
#define _useTimer5
|
||||||
|
|
||||||
|
#define TRIM_DURATION 2 // compensation ticks to trim adjust for digitalWrite delays
|
||||||
|
#define SERVO_TIMER_PRESCALER 32 // timer prescaler
|
||||||
|
|
||||||
|
/*
|
||||||
|
TC0, chan 0 => TC0_Handler
|
||||||
|
TC0, chan 1 => TC1_Handler
|
||||||
|
TC0, chan 2 => TC2_Handler
|
||||||
|
TC1, chan 0 => TC3_Handler
|
||||||
|
TC1, chan 1 => TC4_Handler
|
||||||
|
TC1, chan 2 => TC5_Handler
|
||||||
|
TC2, chan 0 => TC6_Handler
|
||||||
|
TC2, chan 1 => TC7_Handler
|
||||||
|
TC2, chan 2 => TC8_Handler
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef _useTimer1
|
||||||
|
#define TC_FOR_TIMER1 TC1
|
||||||
|
#define CHANNEL_FOR_TIMER1 0
|
||||||
|
#define ID_TC_FOR_TIMER1 ID_TC3
|
||||||
|
#define IRQn_FOR_TIMER1 TC3_IRQn
|
||||||
|
#define HANDLER_FOR_TIMER1 TC3_Handler
|
||||||
|
#endif
|
||||||
|
#ifdef _useTimer2
|
||||||
|
#define TC_FOR_TIMER2 TC1
|
||||||
|
#define CHANNEL_FOR_TIMER2 1
|
||||||
|
#define ID_TC_FOR_TIMER2 ID_TC4
|
||||||
|
#define IRQn_FOR_TIMER2 TC4_IRQn
|
||||||
|
#define HANDLER_FOR_TIMER2 TC4_Handler
|
||||||
|
#endif
|
||||||
|
#ifdef _useTimer3
|
||||||
|
#define TC_FOR_TIMER3 TC1
|
||||||
|
#define CHANNEL_FOR_TIMER3 2
|
||||||
|
#define ID_TC_FOR_TIMER3 ID_TC5
|
||||||
|
#define IRQn_FOR_TIMER3 TC5_IRQn
|
||||||
|
#define HANDLER_FOR_TIMER3 TC5_Handler
|
||||||
|
#endif
|
||||||
|
#ifdef _useTimer4
|
||||||
|
#define TC_FOR_TIMER4 TC0
|
||||||
|
#define CHANNEL_FOR_TIMER4 2
|
||||||
|
#define ID_TC_FOR_TIMER4 ID_TC2
|
||||||
|
#define IRQn_FOR_TIMER4 TC2_IRQn
|
||||||
|
#define HANDLER_FOR_TIMER4 TC2_Handler
|
||||||
|
#endif
|
||||||
|
#ifdef _useTimer5
|
||||||
|
#define TC_FOR_TIMER5 TC0
|
||||||
|
#define CHANNEL_FOR_TIMER5 0
|
||||||
|
#define ID_TC_FOR_TIMER5 ID_TC0
|
||||||
|
#define IRQn_FOR_TIMER5 TC0_IRQn
|
||||||
|
#define HANDLER_FOR_TIMER5 TC0_Handler
|
||||||
|
#endif
|
||||||
|
|
||||||
|
typedef enum : unsigned char {
|
||||||
|
#ifdef _useTimer1
|
||||||
|
_timer1,
|
||||||
|
#endif
|
||||||
|
#ifdef _useTimer2
|
||||||
|
_timer2,
|
||||||
|
#endif
|
||||||
|
#ifdef _useTimer3
|
||||||
|
_timer3,
|
||||||
|
#endif
|
||||||
|
#ifdef _useTimer4
|
||||||
|
_timer4,
|
||||||
|
#endif
|
||||||
|
#ifdef _useTimer5
|
||||||
|
_timer5,
|
||||||
|
#endif
|
||||||
|
_Nbr_16timers
|
||||||
|
} timer16_Sequence_t;
|
||||||
60
Marlin/src/HAL/DUE/Tone.cpp
Normal file
60
Marlin/src/HAL/DUE/Tone.cpp
Normal file
|
|
@ -0,0 +1,60 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description: Tone function for Arduino Due and compatible (SAM3X8E)
|
||||||
|
* Derived from https://forum.arduino.cc/index.php?topic=136500.msg2903012#msg2903012
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef ARDUINO_ARCH_SAM
|
||||||
|
|
||||||
|
#include "../../inc/MarlinConfig.h"
|
||||||
|
#include "HAL.h"
|
||||||
|
|
||||||
|
static pin_t tone_pin;
|
||||||
|
volatile static int32_t toggles;
|
||||||
|
|
||||||
|
void tone(const pin_t _pin, const unsigned int frequency, const unsigned long duration) {
|
||||||
|
tone_pin = _pin;
|
||||||
|
toggles = 2 * frequency * duration / 1000;
|
||||||
|
HAL_timer_start(TONE_TIMER_NUM, 2 * frequency);
|
||||||
|
}
|
||||||
|
|
||||||
|
void noTone(const pin_t _pin) {
|
||||||
|
HAL_timer_disable_interrupt(TONE_TIMER_NUM);
|
||||||
|
extDigitalWrite(_pin, LOW);
|
||||||
|
}
|
||||||
|
|
||||||
|
HAL_TONE_TIMER_ISR() {
|
||||||
|
static uint8_t pin_state = 0;
|
||||||
|
HAL_timer_isr_prologue(TONE_TIMER_NUM);
|
||||||
|
|
||||||
|
if (toggles) {
|
||||||
|
toggles--;
|
||||||
|
extDigitalWrite(tone_pin, (pin_state ^= 1));
|
||||||
|
}
|
||||||
|
else noTone(tone_pin); // turn off interrupt
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // ARDUINO_ARCH_SAM
|
||||||
149
Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_shared_hw_spi.cpp
Normal file
149
Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_shared_hw_spi.cpp
Normal file
|
|
@ -0,0 +1,149 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Based on u8g_com_msp430_hw_spi.c
|
||||||
|
*
|
||||||
|
* Universal 8bit Graphics Library
|
||||||
|
*
|
||||||
|
* Copyright (c) 2012, olikraus@gmail.com
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without modification,
|
||||||
|
* are permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* * Redistributions of source code must retain the above copyright notice, this list
|
||||||
|
* of conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* * 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.
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef __SAM3X8E__
|
||||||
|
|
||||||
|
#include "../../../inc/MarlinConfigPre.h"
|
||||||
|
|
||||||
|
#if HAS_MARLINUI_U8GLIB
|
||||||
|
|
||||||
|
#include <U8glib.h>
|
||||||
|
|
||||||
|
#include "../../../MarlinCore.h"
|
||||||
|
|
||||||
|
void spiBegin();
|
||||||
|
void spiInit(uint8_t spiRate);
|
||||||
|
void spiSend(uint8_t b);
|
||||||
|
void spiSend(const uint8_t* buf, size_t n);
|
||||||
|
|
||||||
|
#include "../../shared/Marduino.h"
|
||||||
|
#include "../fastio.h"
|
||||||
|
|
||||||
|
void u8g_SetPIOutput_DUE_hw_spi(u8g_t *u8g, uint8_t pin_index) {
|
||||||
|
PIO_Configure(g_APinDescription[u8g->pin_list[pin_index]].pPort, PIO_OUTPUT_1,
|
||||||
|
g_APinDescription[u8g->pin_list[pin_index]].ulPin, g_APinDescription[u8g->pin_list[pin_index]].ulPinConfiguration); // OUTPUT
|
||||||
|
}
|
||||||
|
|
||||||
|
void u8g_SetPILevel_DUE_hw_spi(u8g_t *u8g, uint8_t pin_index, uint8_t level) {
|
||||||
|
volatile Pio* port = g_APinDescription[u8g->pin_list[pin_index]].pPort;
|
||||||
|
uint32_t mask = g_APinDescription[u8g->pin_list[pin_index]].ulPin;
|
||||||
|
if (level) port->PIO_SODR = mask;
|
||||||
|
else port->PIO_CODR = mask;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t u8g_com_HAL_DUE_shared_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) {
|
||||||
|
switch (msg) {
|
||||||
|
case U8G_COM_MSG_STOP:
|
||||||
|
break;
|
||||||
|
|
||||||
|
case U8G_COM_MSG_INIT:
|
||||||
|
u8g_SetPILevel_DUE_hw_spi(u8g, U8G_PI_CS, 1);
|
||||||
|
u8g_SetPILevel_DUE_hw_spi(u8g, U8G_PI_A0, 1);
|
||||||
|
|
||||||
|
u8g_SetPIOutput_DUE_hw_spi(u8g, U8G_PI_CS);
|
||||||
|
u8g_SetPIOutput_DUE_hw_spi(u8g, U8G_PI_A0);
|
||||||
|
|
||||||
|
u8g_Delay(5);
|
||||||
|
|
||||||
|
spiBegin();
|
||||||
|
|
||||||
|
#ifndef SPI_SPEED
|
||||||
|
#define SPI_SPEED SPI_FULL_SPEED // use same SPI speed as SD card
|
||||||
|
#endif
|
||||||
|
spiInit(2);
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case U8G_COM_MSG_ADDRESS: /* define cmd (arg_val = 0) or data mode (arg_val = 1) */
|
||||||
|
u8g_SetPILevel_DUE_hw_spi(u8g, U8G_PI_A0, arg_val);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case U8G_COM_MSG_CHIP_SELECT:
|
||||||
|
u8g_SetPILevel_DUE_hw_spi(u8g, U8G_PI_CS, (arg_val ? 0 : 1));
|
||||||
|
break;
|
||||||
|
|
||||||
|
case U8G_COM_MSG_RESET:
|
||||||
|
break;
|
||||||
|
|
||||||
|
case U8G_COM_MSG_WRITE_BYTE:
|
||||||
|
|
||||||
|
spiSend((uint8_t)arg_val);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case U8G_COM_MSG_WRITE_SEQ: {
|
||||||
|
uint8_t *ptr = (uint8_t*) arg_ptr;
|
||||||
|
while (arg_val > 0) {
|
||||||
|
spiSend(*ptr++);
|
||||||
|
arg_val--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case U8G_COM_MSG_WRITE_SEQ_P: {
|
||||||
|
uint8_t *ptr = (uint8_t*) arg_ptr;
|
||||||
|
while (arg_val > 0) {
|
||||||
|
spiSend(*ptr++);
|
||||||
|
arg_val--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // HAS_MARLINUI_U8GLIB
|
||||||
|
|
||||||
|
#endif // __SAM3X8E__
|
||||||
185
Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_st7920_sw_spi.cpp
Normal file
185
Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_st7920_sw_spi.cpp
Normal file
|
|
@ -0,0 +1,185 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Based on u8g_com_st7920_hw_spi.c
|
||||||
|
*
|
||||||
|
* Universal 8bit Graphics Library
|
||||||
|
*
|
||||||
|
* Copyright (c) 2011, olikraus@gmail.com
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without modification,
|
||||||
|
* are permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* * Redistributions of source code must retain the above copyright notice, this list
|
||||||
|
* of conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* * 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.
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef ARDUINO_ARCH_SAM
|
||||||
|
|
||||||
|
#include "../../../inc/MarlinConfigPre.h"
|
||||||
|
|
||||||
|
#if ENABLED(U8GLIB_ST7920)
|
||||||
|
|
||||||
|
#include "../../shared/Delay.h"
|
||||||
|
|
||||||
|
#include <U8glib.h>
|
||||||
|
|
||||||
|
#include "u8g_com_HAL_DUE_sw_spi_shared.h"
|
||||||
|
|
||||||
|
#define SPISEND_SW_DUE u8g_spiSend_sw_DUE_mode_0
|
||||||
|
|
||||||
|
static uint8_t rs_last_state = 255;
|
||||||
|
|
||||||
|
static void u8g_com_DUE_st7920_write_byte_sw_spi(uint8_t rs, uint8_t val) {
|
||||||
|
if (rs != rs_last_state) { // time to send a command/data byte
|
||||||
|
rs_last_state = rs;
|
||||||
|
SPISEND_SW_DUE(rs ? 0x0FA : 0x0F8); // Command or Data
|
||||||
|
DELAY_US(40); // give the controller some time to process the data: 20 is bad, 30 is OK, 40 is safe
|
||||||
|
}
|
||||||
|
SPISEND_SW_DUE(val & 0xF0);
|
||||||
|
SPISEND_SW_DUE(val << 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t u8g_com_HAL_DUE_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) {
|
||||||
|
switch (msg) {
|
||||||
|
case U8G_COM_MSG_INIT:
|
||||||
|
SCK_pPio = g_APinDescription[u8g->pin_list[U8G_PI_SCK]].pPort;
|
||||||
|
SCK_dwMask = g_APinDescription[u8g->pin_list[U8G_PI_SCK]].ulPin;
|
||||||
|
MOSI_pPio = g_APinDescription[u8g->pin_list[U8G_PI_MOSI]].pPort;
|
||||||
|
MOSI_dwMask = g_APinDescription[u8g->pin_list[U8G_PI_MOSI]].ulPin;
|
||||||
|
|
||||||
|
u8g_SetPILevel_DUE(u8g, U8G_PI_CS, 0);
|
||||||
|
u8g_SetPIOutput_DUE(u8g, U8G_PI_CS);
|
||||||
|
u8g_SetPILevel_DUE(u8g, U8G_PI_SCK, 0);
|
||||||
|
u8g_SetPIOutput_DUE(u8g, U8G_PI_SCK);
|
||||||
|
u8g_SetPILevel_DUE(u8g, U8G_PI_MOSI, 0);
|
||||||
|
u8g_SetPIOutput_DUE(u8g, U8G_PI_MOSI);
|
||||||
|
|
||||||
|
SCK_pPio->PIO_CODR = SCK_dwMask; //SCK low - needed at power up but not after reset
|
||||||
|
MOSI_pPio->PIO_CODR = MOSI_dwMask; //MOSI low - needed at power up but not after reset
|
||||||
|
|
||||||
|
u8g_Delay(5);
|
||||||
|
|
||||||
|
u8g->pin_list[U8G_PI_A0_STATE] = 0; /* initial RS state: command mode */
|
||||||
|
break;
|
||||||
|
|
||||||
|
case U8G_COM_MSG_STOP:
|
||||||
|
break;
|
||||||
|
|
||||||
|
case U8G_COM_MSG_RESET:
|
||||||
|
if (U8G_PIN_NONE != u8g->pin_list[U8G_PI_RESET]) u8g_SetPILevel_DUE(u8g, U8G_PI_RESET, arg_val);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case U8G_COM_MSG_ADDRESS: /* define cmd (arg_val = 0) or data mode (arg_val = 1) */
|
||||||
|
u8g->pin_list[U8G_PI_A0_STATE] = arg_val;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case U8G_COM_MSG_CHIP_SELECT:
|
||||||
|
if (U8G_PIN_NONE != u8g->pin_list[U8G_PI_CS])
|
||||||
|
u8g_SetPILevel_DUE(u8g, U8G_PI_CS, arg_val); //note: the st7920 has an active high chip select
|
||||||
|
break;
|
||||||
|
|
||||||
|
case U8G_COM_MSG_WRITE_BYTE:
|
||||||
|
|
||||||
|
u8g_com_DUE_st7920_write_byte_sw_spi(u8g->pin_list[U8G_PI_A0_STATE], arg_val);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case U8G_COM_MSG_WRITE_SEQ: {
|
||||||
|
uint8_t *ptr = (uint8_t*) arg_ptr;
|
||||||
|
while (arg_val > 0) {
|
||||||
|
u8g_com_DUE_st7920_write_byte_sw_spi(u8g->pin_list[U8G_PI_A0_STATE], *ptr++);
|
||||||
|
arg_val--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case U8G_COM_MSG_WRITE_SEQ_P: {
|
||||||
|
uint8_t *ptr = (uint8_t*) arg_ptr;
|
||||||
|
while (arg_val > 0) {
|
||||||
|
u8g_com_DUE_st7920_write_byte_sw_spi(u8g->pin_list[U8G_PI_A0_STATE], *ptr++);
|
||||||
|
arg_val--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if ENABLED(LIGHTWEIGHT_UI)
|
||||||
|
#include "../../../lcd/ultralcd.h"
|
||||||
|
#include "../../shared/HAL_ST7920.h"
|
||||||
|
|
||||||
|
#define ST7920_CS_PIN LCD_PINS_RS
|
||||||
|
|
||||||
|
#if DOGM_SPI_DELAY_US > 0
|
||||||
|
#define U8G_DELAY() DELAY_US(DOGM_SPI_DELAY_US)
|
||||||
|
#else
|
||||||
|
#define U8G_DELAY() DELAY_US(10)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void ST7920_cs() {
|
||||||
|
WRITE(ST7920_CS_PIN, HIGH);
|
||||||
|
U8G_DELAY();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ST7920_ncs() {
|
||||||
|
WRITE(ST7920_CS_PIN, LOW);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ST7920_set_cmd() {
|
||||||
|
SPISEND_SW_DUE(0xF8);
|
||||||
|
DELAY_US(40);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ST7920_set_dat() {
|
||||||
|
SPISEND_SW_DUE(0xFA);
|
||||||
|
DELAY_US(40);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ST7920_write_byte(const uint8_t val) {
|
||||||
|
SPISEND_SW_DUE(val & 0xF0);
|
||||||
|
SPISEND_SW_DUE(val << 4);
|
||||||
|
}
|
||||||
|
#endif // LIGHTWEIGHT_UI
|
||||||
|
|
||||||
|
#endif // U8GLIB_ST7920
|
||||||
|
#endif // ARDUINO_ARCH_SAM
|
||||||
148
Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_sw_spi.cpp
Normal file
148
Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_sw_spi.cpp
Normal file
|
|
@ -0,0 +1,148 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Based on u8g_com_std_sw_spi.c
|
||||||
|
*
|
||||||
|
* Universal 8bit Graphics Library
|
||||||
|
*
|
||||||
|
* Copyright (c) 2015, olikraus@gmail.com
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without modification,
|
||||||
|
* are permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* * Redistributions of source code must retain the above copyright notice, this list
|
||||||
|
* of conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* * 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.
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef ARDUINO_ARCH_SAM
|
||||||
|
|
||||||
|
#include "../../../inc/MarlinConfigPre.h"
|
||||||
|
|
||||||
|
#if HAS_MARLINUI_U8GLIB && DISABLED(U8GLIB_ST7920)
|
||||||
|
|
||||||
|
#undef SPI_SPEED
|
||||||
|
#define SPI_SPEED 2 // About 2 MHz
|
||||||
|
|
||||||
|
#include "u8g_com_HAL_DUE_sw_spi_shared.h"
|
||||||
|
|
||||||
|
#include "../../shared/Marduino.h"
|
||||||
|
#include "../../shared/Delay.h"
|
||||||
|
|
||||||
|
#include <U8glib.h>
|
||||||
|
|
||||||
|
#if ENABLED(FYSETC_MINI_12864)
|
||||||
|
#define SPISEND_SW_DUE u8g_spiSend_sw_DUE_mode_3
|
||||||
|
#else
|
||||||
|
#define SPISEND_SW_DUE u8g_spiSend_sw_DUE_mode_0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
uint8_t u8g_com_HAL_DUE_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) {
|
||||||
|
switch (msg) {
|
||||||
|
case U8G_COM_MSG_INIT:
|
||||||
|
SCK_pPio = g_APinDescription[u8g->pin_list[U8G_PI_SCK]].pPort;
|
||||||
|
SCK_dwMask = g_APinDescription[u8g->pin_list[U8G_PI_SCK]].ulPin;
|
||||||
|
MOSI_pPio = g_APinDescription[u8g->pin_list[U8G_PI_MOSI]].pPort;
|
||||||
|
MOSI_dwMask = g_APinDescription[u8g->pin_list[U8G_PI_MOSI]].ulPin;
|
||||||
|
u8g_SetPIOutput_DUE(u8g, U8G_PI_SCK);
|
||||||
|
u8g_SetPIOutput_DUE(u8g, U8G_PI_MOSI);
|
||||||
|
u8g_SetPIOutput_DUE(u8g, U8G_PI_CS);
|
||||||
|
u8g_SetPIOutput_DUE(u8g, U8G_PI_A0);
|
||||||
|
if (U8G_PIN_NONE != u8g->pin_list[U8G_PI_RESET]) u8g_SetPIOutput_DUE(u8g, U8G_PI_RESET);
|
||||||
|
u8g_SetPILevel_DUE(u8g, U8G_PI_SCK, 0);
|
||||||
|
u8g_SetPILevel_DUE(u8g, U8G_PI_MOSI, 0);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case U8G_COM_MSG_STOP:
|
||||||
|
break;
|
||||||
|
|
||||||
|
case U8G_COM_MSG_RESET:
|
||||||
|
if (U8G_PIN_NONE != u8g->pin_list[U8G_PI_RESET]) u8g_SetPILevel_DUE(u8g, U8G_PI_RESET, arg_val);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case U8G_COM_MSG_CHIP_SELECT:
|
||||||
|
#if ENABLED(FYSETC_MINI_12864) // LCD SPI is running mode 3 while SD card is running mode 0
|
||||||
|
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
|
||||||
|
// the next chip select goes active
|
||||||
|
u8g_SetPILevel_DUE(u8g, U8G_PI_SCK, 1); //set SCK to mode 3 idle state before CS goes active
|
||||||
|
u8g_SetPILevel_DUE(u8g, U8G_PI_CS, LOW);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
u8g_SetPILevel_DUE(u8g, U8G_PI_CS, HIGH);
|
||||||
|
u8g_SetPILevel_DUE(u8g, U8G_PI_SCK, 0); //set SCK to mode 0 idle state after CS goes inactive
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
u8g_SetPILevel_DUE(u8g, U8G_PI_CS, !arg_val);
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
|
|
||||||
|
case U8G_COM_MSG_WRITE_BYTE:
|
||||||
|
SPISEND_SW_DUE(arg_val);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case U8G_COM_MSG_WRITE_SEQ: {
|
||||||
|
uint8_t *ptr = (uint8_t *)arg_ptr;
|
||||||
|
while (arg_val > 0) {
|
||||||
|
SPISEND_SW_DUE(*ptr++);
|
||||||
|
arg_val--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case U8G_COM_MSG_WRITE_SEQ_P: {
|
||||||
|
uint8_t *ptr = (uint8_t *)arg_ptr;
|
||||||
|
while (arg_val > 0) {
|
||||||
|
SPISEND_SW_DUE(u8g_pgm_read(ptr));
|
||||||
|
ptr++;
|
||||||
|
arg_val--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case U8G_COM_MSG_ADDRESS: /* define cmd (arg_val = 0) or data mode (arg_val = 1) */
|
||||||
|
u8g_SetPILevel_DUE(u8g, U8G_PI_A0, arg_val);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // HAS_MARLINUI_U8GLIB && !U8GLIB_ST7920
|
||||||
|
#endif // ARDUINO_ARCH_SAM
|
||||||
112
Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_sw_spi_shared.cpp
Normal file
112
Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_sw_spi_shared.cpp
Normal file
|
|
@ -0,0 +1,112 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Based on u8g_com_st7920_hw_spi.c
|
||||||
|
*
|
||||||
|
* Universal 8bit Graphics Library
|
||||||
|
*
|
||||||
|
* Copyright (c) 2011, olikraus@gmail.com
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without modification,
|
||||||
|
* are permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* * Redistributions of source code must retain the above copyright notice, this list
|
||||||
|
* of conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* * 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.
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef ARDUINO_ARCH_SAM
|
||||||
|
|
||||||
|
#include "../../../inc/MarlinConfigPre.h"
|
||||||
|
|
||||||
|
#if HAS_MARLINUI_U8GLIB
|
||||||
|
|
||||||
|
#include "../../shared/Delay.h"
|
||||||
|
|
||||||
|
#include <U8glib.h>
|
||||||
|
|
||||||
|
#include "u8g_com_HAL_DUE_sw_spi_shared.h"
|
||||||
|
|
||||||
|
void u8g_SetPIOutput_DUE(u8g_t *u8g, uint8_t pin_index) {
|
||||||
|
PIO_Configure(g_APinDescription[u8g->pin_list[pin_index]].pPort, PIO_OUTPUT_1,
|
||||||
|
g_APinDescription[u8g->pin_list[pin_index]].ulPin, g_APinDescription[u8g->pin_list[pin_index]].ulPinConfiguration); // OUTPUT
|
||||||
|
}
|
||||||
|
|
||||||
|
void u8g_SetPILevel_DUE(u8g_t *u8g, uint8_t pin_index, uint8_t level) {
|
||||||
|
volatile Pio* port = g_APinDescription[u8g->pin_list[pin_index]].pPort;
|
||||||
|
uint32_t mask = g_APinDescription[u8g->pin_list[pin_index]].ulPin;
|
||||||
|
if (level) port->PIO_SODR = mask; else port->PIO_CODR = mask;
|
||||||
|
}
|
||||||
|
|
||||||
|
Pio *SCK_pPio, *MOSI_pPio;
|
||||||
|
uint32_t SCK_dwMask, MOSI_dwMask;
|
||||||
|
|
||||||
|
void u8g_spiSend_sw_DUE_mode_0(uint8_t val) { // 3MHz
|
||||||
|
LOOP_L_N(i, 8) {
|
||||||
|
if (val & 0x80)
|
||||||
|
MOSI_pPio->PIO_SODR = MOSI_dwMask;
|
||||||
|
else
|
||||||
|
MOSI_pPio->PIO_CODR = MOSI_dwMask;
|
||||||
|
DELAY_NS(48);
|
||||||
|
SCK_pPio->PIO_SODR = SCK_dwMask;
|
||||||
|
DELAY_NS(905);
|
||||||
|
val <<= 1;
|
||||||
|
SCK_pPio->PIO_CODR = SCK_dwMask;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void u8g_spiSend_sw_DUE_mode_3(uint8_t val) { // 3.5MHz
|
||||||
|
LOOP_L_N(i, 8) {
|
||||||
|
SCK_pPio->PIO_CODR = SCK_dwMask;
|
||||||
|
DELAY_NS(50);
|
||||||
|
if (val & 0x80)
|
||||||
|
MOSI_pPio->PIO_SODR = MOSI_dwMask;
|
||||||
|
else
|
||||||
|
MOSI_pPio->PIO_CODR = MOSI_dwMask;
|
||||||
|
val <<= 1;
|
||||||
|
DELAY_NS(10);
|
||||||
|
SCK_pPio->PIO_SODR = SCK_dwMask;
|
||||||
|
DELAY_NS(70);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // HAS_MARLINUI_U8GLIB
|
||||||
|
#endif // ARDUINO_ARCH_SAM
|
||||||
35
Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_sw_spi_shared.h
Normal file
35
Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_sw_spi_shared.h
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "../../../inc/MarlinConfigPre.h"
|
||||||
|
#include "../../shared/Marduino.h"
|
||||||
|
#include <U8glib.h>
|
||||||
|
|
||||||
|
void u8g_SetPIOutput_DUE(u8g_t *u8g, uint8_t pin_index);
|
||||||
|
void u8g_SetPILevel_DUE(u8g_t *u8g, uint8_t pin_index, uint8_t level);
|
||||||
|
|
||||||
|
void u8g_spiSend_sw_DUE_mode_0(uint8_t val);
|
||||||
|
void u8g_spiSend_sw_DUE_mode_3(uint8_t val);
|
||||||
|
|
||||||
|
extern Pio *SCK_pPio, *MOSI_pPio;
|
||||||
|
extern uint32_t SCK_dwMask, MOSI_dwMask;
|
||||||
1011
Marlin/src/HAL/DUE/eeprom_flash.cpp
Normal file
1011
Marlin/src/HAL/DUE/eeprom_flash.cpp
Normal file
File diff suppressed because it is too large
Load diff
77
Marlin/src/HAL/DUE/eeprom_wired.cpp
Normal file
77
Marlin/src/HAL/DUE/eeprom_wired.cpp
Normal file
|
|
@ -0,0 +1,77 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
*
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
|
||||||
|
* Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
|
||||||
|
* Copyright (c) 2016 Victor Perez victor_pv@hotmail.com
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#ifdef ARDUINO_ARCH_SAM
|
||||||
|
|
||||||
|
#include "../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
|
#if USE_WIRED_EEPROM
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PersistentStore for Arduino-style EEPROM interface
|
||||||
|
* with simple implementations supplied by Marlin.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "../shared/eeprom_if.h"
|
||||||
|
#include "../shared/eeprom_api.h"
|
||||||
|
|
||||||
|
#ifndef MARLIN_EEPROM_SIZE
|
||||||
|
#error "MARLIN_EEPROM_SIZE is required for I2C / SPI EEPROM."
|
||||||
|
#endif
|
||||||
|
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; }
|
||||||
|
bool PersistentStore::access_start() { eeprom_init(); return true; }
|
||||||
|
bool PersistentStore::access_finish() { return true; }
|
||||||
|
|
||||||
|
bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
|
||||||
|
while (size--) {
|
||||||
|
uint8_t * const p = (uint8_t * const)pos;
|
||||||
|
uint8_t v = *value;
|
||||||
|
// EEPROM has only ~100,000 write cycles,
|
||||||
|
// so only write bytes that have changed!
|
||||||
|
if (v != eeprom_read_byte(p)) {
|
||||||
|
eeprom_write_byte(p, v);
|
||||||
|
delay(2);
|
||||||
|
if (eeprom_read_byte(p) != v) {
|
||||||
|
SERIAL_ECHO_MSG(STR_ERR_EEPROM_WRITE);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
crc16(crc, &v, 1);
|
||||||
|
pos++;
|
||||||
|
value++;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
|
||||||
|
do {
|
||||||
|
uint8_t c = eeprom_read_byte((uint8_t*)pos);
|
||||||
|
if (writing) *value = c;
|
||||||
|
crc16(crc, &c, 1);
|
||||||
|
pos++;
|
||||||
|
value++;
|
||||||
|
} while (--size);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // USE_WIRED_EEPROM
|
||||||
|
#endif // ARDUINO_ARCH_SAM
|
||||||
67
Marlin/src/HAL/DUE/endstop_interrupts.h
Normal file
67
Marlin/src/HAL/DUE/endstop_interrupts.h
Normal file
|
|
@ -0,0 +1,67 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Endstop Interrupts
|
||||||
|
*
|
||||||
|
* Without endstop interrupts the endstop pins must be polled continually in
|
||||||
|
* the temperature-ISR via endstops.update(), most of the time finding no change.
|
||||||
|
* With this feature endstops.update() is called only when we know that at
|
||||||
|
* least one endstop has changed state, saving valuable CPU cycles.
|
||||||
|
*
|
||||||
|
* This feature only works when all used endstop pins can generate an 'external interrupt'.
|
||||||
|
*
|
||||||
|
* Test whether pins issue interrupts on your board by flashing 'pin_interrupt_test.ino'.
|
||||||
|
* (Located in Marlin/buildroot/share/pin_interrupt_test/pin_interrupt_test.ino)
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "../../module/endstops.h"
|
||||||
|
|
||||||
|
// One ISR for all EXT-Interrupts
|
||||||
|
void endstop_ISR() { endstops.update(); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Endstop interrupts for Due based targets.
|
||||||
|
* On Due, all pins support external interrupt capability.
|
||||||
|
*/
|
||||||
|
|
||||||
|
void setup_endstop_interrupts() {
|
||||||
|
#define _ATTACH(P) attachInterrupt(digitalPinToInterrupt(P), endstop_ISR, CHANGE)
|
||||||
|
TERN_(HAS_X_MAX, _ATTACH(X_MAX_PIN));
|
||||||
|
TERN_(HAS_X_MIN, _ATTACH(X_MIN_PIN));
|
||||||
|
TERN_(HAS_Y_MAX, _ATTACH(Y_MAX_PIN));
|
||||||
|
TERN_(HAS_Y_MIN, _ATTACH(Y_MIN_PIN));
|
||||||
|
TERN_(HAS_Z_MAX, _ATTACH(Z_MAX_PIN));
|
||||||
|
TERN_(HAS_Z_MIN, _ATTACH(Z_MIN_PIN));
|
||||||
|
TERN_(HAS_X2_MAX, _ATTACH(X2_MAX_PIN));
|
||||||
|
TERN_(HAS_X2_MIN, _ATTACH(X2_MIN_PIN));
|
||||||
|
TERN_(HAS_Y2_MAX, _ATTACH(Y2_MAX_PIN));
|
||||||
|
TERN_(HAS_Y2_MIN, _ATTACH(Y2_MIN_PIN));
|
||||||
|
TERN_(HAS_Z2_MAX, _ATTACH(Z2_MAX_PIN));
|
||||||
|
TERN_(HAS_Z2_MIN, _ATTACH(Z2_MIN_PIN));
|
||||||
|
TERN_(HAS_Z3_MAX, _ATTACH(Z3_MAX_PIN));
|
||||||
|
TERN_(HAS_Z3_MIN, _ATTACH(Z3_MIN_PIN));
|
||||||
|
TERN_(HAS_Z4_MAX, _ATTACH(Z4_MAX_PIN));
|
||||||
|
TERN_(HAS_Z4_MIN, _ATTACH(Z4_MIN_PIN));
|
||||||
|
TERN_(HAS_Z_MIN_PROBE_PIN, _ATTACH(Z_MIN_PROBE_PIN));
|
||||||
|
}
|
||||||
562
Marlin/src/HAL/DUE/fastio.h
Normal file
562
Marlin/src/HAL/DUE/fastio.h
Normal file
|
|
@ -0,0 +1,562 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fast I/O Routines for SAM3X8E
|
||||||
|
* Use direct port manipulation to save scads of processor time.
|
||||||
|
* Contributed by Triffid_Hunter and modified by Kliment, thinkyhead, Bob-the-Kuhn, et.al.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description: Fast IO functions for Arduino Due and compatible (SAM3X8E)
|
||||||
|
*
|
||||||
|
* For ARDUINO_ARCH_SAM
|
||||||
|
* Note the code here was specifically crafted by disassembling what GCC produces
|
||||||
|
* out of it, so GCC is able to optimize it out as much as possible to the least
|
||||||
|
* amount of instructions. Be very carefull if you modify them, as "clean code"
|
||||||
|
* leads to less efficient compiled code!!
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <pins_arduino.h>
|
||||||
|
|
||||||
|
#include "../../inc/MarlinConfigPre.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Utility functions
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Due has 12 PWMs assigned to logical pins 2-13.
|
||||||
|
// 6, 7, 8 & 9 come from the PWM controller. The others come from the timers.
|
||||||
|
#define PWM_PIN(P) WITHIN(P, 2, 13)
|
||||||
|
|
||||||
|
#ifndef MASK
|
||||||
|
#define MASK(PIN) (1 << PIN)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Magic I/O routines
|
||||||
|
*
|
||||||
|
* Now you can simply SET_OUTPUT(STEP); WRITE(STEP, HIGH); WRITE(STEP, LOW);
|
||||||
|
*
|
||||||
|
* Why double up on these macros? see https://gcc.gnu.org/onlinedocs/cpp/Stringification.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Read a pin
|
||||||
|
#define _READ(IO) bool(DIO ## IO ## _WPORT -> PIO_PDSR & MASK(DIO ## IO ## _PIN))
|
||||||
|
|
||||||
|
// Write to a pin
|
||||||
|
#define _WRITE(IO,V) do { \
|
||||||
|
volatile Pio* port = (DIO ## IO ## _WPORT); \
|
||||||
|
const uint32_t mask = MASK(DIO ## IO ## _PIN); \
|
||||||
|
if (V) port->PIO_SODR = mask; \
|
||||||
|
else port->PIO_CODR = mask; \
|
||||||
|
}while(0)
|
||||||
|
|
||||||
|
// Toggle a pin
|
||||||
|
#define _TOGGLE(IO) _WRITE(IO, !READ(IO))
|
||||||
|
|
||||||
|
#if MB(PRINTRBOARD_G2)
|
||||||
|
|
||||||
|
#include "fastio/G2_pins.h"
|
||||||
|
|
||||||
|
// Set pin as input
|
||||||
|
#define _SET_INPUT(IO) do{ \
|
||||||
|
pmc_enable_periph_clk(G2_g_APinDescription[IO].ulPeripheralId); \
|
||||||
|
PIO_Configure((DIO ## IO ## _WPORT), PIO_INPUT, MASK(DIO ## IO ## _PIN), 0); \
|
||||||
|
}while(0)
|
||||||
|
|
||||||
|
// Set pin as output
|
||||||
|
#define _SET_OUTPUT(IO) do{ \
|
||||||
|
uint32_t mask = MASK(G2_g_APinDescription[IO].ulPeripheralId); \
|
||||||
|
if ((PMC->PMC_PCSR0 & mask) != (mask)) PMC->PMC_PCER0 = mask; \
|
||||||
|
volatile Pio* port = (DIO ## IO ## _WPORT); \
|
||||||
|
mask = MASK(DIO ## IO ## _PIN); \
|
||||||
|
if (_READ(IO)) port->PIO_SODR = mask; \
|
||||||
|
else port->PIO_CODR = mask; \
|
||||||
|
port->PIO_IDR = mask; \
|
||||||
|
const uint32_t pin_config = G2_g_APinDescription[IO].ulPinConfiguration; \
|
||||||
|
if (pin_config & PIO_PULLUP) port->PIO_PUER = mask; \
|
||||||
|
else port->PIO_PUDR = mask; \
|
||||||
|
if (pin_config & PIO_OPENDRAIN) port->PIO_MDER = mask; \
|
||||||
|
else port->PIO_MDDR = mask; \
|
||||||
|
port->PIO_PER = mask; \
|
||||||
|
port->PIO_OER = mask; \
|
||||||
|
g_pinStatus[IO] = (g_pinStatus[IO] & 0xF0) | PIN_STATUS_DIGITAL_OUTPUT; \
|
||||||
|
}while(0)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set pin as output with comments
|
||||||
|
* #define _SET_OUTPUT(IO) do{ \
|
||||||
|
* uint32_t mask = MASK(G2_g_APinDescription[IO].ulPeripheralId); \
|
||||||
|
* if ((PMC->PMC_PCSR0 & mask ) != (mask)) PMC->PMC_PCER0 = mask; \ // enable PIO clock if not already enabled
|
||||||
|
*
|
||||||
|
* volatile Pio* port = (DIO ## IO ## _WPORT); \
|
||||||
|
* const uint32_t mask = MASK(DIO ## IO ## _PIN); \
|
||||||
|
* if (_READ(IO)) port->PIO_SODR = mask; \ // set output to match input BEFORE setting direction or will glitch the output
|
||||||
|
* else port->PIO_CODR = mask; \
|
||||||
|
*
|
||||||
|
* port->PIO_IDR = mask; \ // disable interrupt
|
||||||
|
*
|
||||||
|
* uint32_t pin_config = G2_g_APinDescription[IO].ulPinConfiguration; \
|
||||||
|
* if (pin_config & PIO_PULLUP) pPio->PIO_PUER = mask; \ // enable pullup if necessary
|
||||||
|
* else pPio->PIO_PUDR = mask; \
|
||||||
|
*
|
||||||
|
* if (pin_config & PIO_OPENDRAIN) port->PIO_MDER = mask; \ // Enable multi-drive if necessary
|
||||||
|
* else port->PIO_MDDR = mask; \
|
||||||
|
*
|
||||||
|
* port->PIO_PER = mask; \
|
||||||
|
* port->PIO_OER = mask; \ // set to output
|
||||||
|
*
|
||||||
|
* g_pinStatus[IO] = (g_pinStatus[IO] & 0xF0) | PIN_STATUS_DIGITAL_OUTPUT; \
|
||||||
|
* }while(0)
|
||||||
|
*/
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
// Set pin as input
|
||||||
|
#define _SET_INPUT(IO) do{ \
|
||||||
|
pmc_enable_periph_clk(g_APinDescription[IO].ulPeripheralId); \
|
||||||
|
PIO_Configure(digitalPinToPort(IO), PIO_INPUT, digitalPinToBitMask(IO), 0); \
|
||||||
|
}while(0)
|
||||||
|
|
||||||
|
// Set pin as output
|
||||||
|
#define _SET_OUTPUT(IO) do{ \
|
||||||
|
pmc_enable_periph_clk(g_APinDescription[IO].ulPeripheralId); \
|
||||||
|
PIO_Configure(digitalPinToPort(IO), _READ(IO) ? PIO_OUTPUT_1 : PIO_OUTPUT_0, digitalPinToBitMask(IO), g_APinDescription[IO].ulPinConfiguration); \
|
||||||
|
g_pinStatus[IO] = (g_pinStatus[IO] & 0xF0) | PIN_STATUS_DIGITAL_OUTPUT; \
|
||||||
|
}while(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Set pin as input with pullup mode
|
||||||
|
#define _PULLUP(IO,V) pinMode(IO, (V) ? INPUT_PULLUP : INPUT)
|
||||||
|
|
||||||
|
// Read a pin (wrapper)
|
||||||
|
#define READ(IO) _READ(IO)
|
||||||
|
|
||||||
|
// Write to a pin (wrapper)
|
||||||
|
#define WRITE(IO,V) _WRITE(IO,V)
|
||||||
|
|
||||||
|
// Toggle a pin (wrapper)
|
||||||
|
#define TOGGLE(IO) _TOGGLE(IO)
|
||||||
|
|
||||||
|
// Set pin as input (wrapper)
|
||||||
|
#define SET_INPUT(IO) _SET_INPUT(IO)
|
||||||
|
// Set pin as input with pullup (wrapper)
|
||||||
|
#define SET_INPUT_PULLUP(IO) do{ _SET_INPUT(IO); _PULLUP(IO, HIGH); }while(0)
|
||||||
|
// Set pin as output (wrapper) - reads the pin and sets the output to that value
|
||||||
|
#define SET_OUTPUT(IO) _SET_OUTPUT(IO)
|
||||||
|
// Set pin as PWM
|
||||||
|
#define SET_PWM SET_OUTPUT
|
||||||
|
|
||||||
|
// Check if pin is an input
|
||||||
|
#define IS_INPUT(IO) ((digitalPinToPort(IO)->PIO_OSR & digitalPinToBitMask(IO)) == 0)
|
||||||
|
// Check if pin is an output
|
||||||
|
#define IS_OUTPUT(IO) ((digitalPinToPort(IO)->PIO_OSR & digitalPinToBitMask(IO)) != 0)
|
||||||
|
|
||||||
|
// Shorthand
|
||||||
|
#define OUT_WRITE(IO,V) do{ SET_OUTPUT(IO); WRITE(IO,V); }while(0)
|
||||||
|
|
||||||
|
// digitalRead/Write wrappers
|
||||||
|
#define extDigitalRead(IO) digitalRead(IO)
|
||||||
|
#define extDigitalWrite(IO,V) digitalWrite(IO,V)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ports and functions
|
||||||
|
* Added as necessary or if I feel like it- not a comprehensive list!
|
||||||
|
*/
|
||||||
|
|
||||||
|
// UART
|
||||||
|
#define RXD DIO0
|
||||||
|
#define TXD DIO1
|
||||||
|
|
||||||
|
// TWI (I2C)
|
||||||
|
#define SCL DIO21
|
||||||
|
#define SDA DIO20
|
||||||
|
|
||||||
|
/**
|
||||||
|
* pins
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define DIO0_PIN 8
|
||||||
|
#define DIO0_WPORT PIOA
|
||||||
|
|
||||||
|
#define DIO1_PIN 9
|
||||||
|
#define DIO1_WPORT PIOA
|
||||||
|
|
||||||
|
#define DIO2_PIN 25
|
||||||
|
#define DIO2_WPORT PIOB
|
||||||
|
|
||||||
|
#define DIO3_PIN 28
|
||||||
|
#define DIO3_WPORT PIOC
|
||||||
|
|
||||||
|
#define DIO4_PIN 26
|
||||||
|
#define DIO4_WPORT PIOC
|
||||||
|
|
||||||
|
#define DIO5_PIN 25
|
||||||
|
#define DIO5_WPORT PIOC
|
||||||
|
|
||||||
|
#define DIO6_PIN 24
|
||||||
|
#define DIO6_WPORT PIOC
|
||||||
|
|
||||||
|
#define DIO7_PIN 23
|
||||||
|
#define DIO7_WPORT PIOC
|
||||||
|
|
||||||
|
#define DIO8_PIN 22
|
||||||
|
#define DIO8_WPORT PIOC
|
||||||
|
|
||||||
|
#define DIO9_PIN 21
|
||||||
|
#define DIO9_WPORT PIOC
|
||||||
|
|
||||||
|
#define DIO10_PIN 29
|
||||||
|
#define DIO10_WPORT PIOC
|
||||||
|
|
||||||
|
#define DIO11_PIN 7
|
||||||
|
#define DIO11_WPORT PIOD
|
||||||
|
|
||||||
|
#define DIO12_PIN 8
|
||||||
|
#define DIO12_WPORT PIOD
|
||||||
|
|
||||||
|
#define DIO13_PIN 27
|
||||||
|
#define DIO13_WPORT PIOB
|
||||||
|
|
||||||
|
#define DIO14_PIN 4
|
||||||
|
#define DIO14_WPORT PIOD
|
||||||
|
|
||||||
|
#define DIO15_PIN 5
|
||||||
|
#define DIO15_WPORT PIOD
|
||||||
|
|
||||||
|
#define DIO16_PIN 13
|
||||||
|
#define DIO16_WPORT PIOA
|
||||||
|
|
||||||
|
#define DIO17_PIN 12
|
||||||
|
#define DIO17_WPORT PIOA
|
||||||
|
|
||||||
|
#define DIO18_PIN 11
|
||||||
|
#define DIO18_WPORT PIOA
|
||||||
|
|
||||||
|
#define DIO19_PIN 10
|
||||||
|
#define DIO19_WPORT PIOA
|
||||||
|
|
||||||
|
#define DIO20_PIN 12
|
||||||
|
#define DIO20_WPORT PIOB
|
||||||
|
|
||||||
|
#define DIO21_PIN 13
|
||||||
|
#define DIO21_WPORT PIOB
|
||||||
|
|
||||||
|
#define DIO22_PIN 26
|
||||||
|
#define DIO22_WPORT PIOB
|
||||||
|
|
||||||
|
#define DIO23_PIN 14
|
||||||
|
#define DIO23_WPORT PIOA
|
||||||
|
|
||||||
|
#define DIO24_PIN 15
|
||||||
|
#define DIO24_WPORT PIOA
|
||||||
|
|
||||||
|
#define DIO25_PIN 0
|
||||||
|
#define DIO25_WPORT PIOD
|
||||||
|
|
||||||
|
#define DIO26_PIN 1
|
||||||
|
#define DIO26_WPORT PIOD
|
||||||
|
|
||||||
|
#define DIO27_PIN 2
|
||||||
|
#define DIO27_WPORT PIOD
|
||||||
|
|
||||||
|
#define DIO28_PIN 3
|
||||||
|
#define DIO28_WPORT PIOD
|
||||||
|
|
||||||
|
#define DIO29_PIN 6
|
||||||
|
#define DIO29_WPORT PIOD
|
||||||
|
|
||||||
|
#define DIO30_PIN 9
|
||||||
|
#define DIO30_WPORT PIOD
|
||||||
|
|
||||||
|
#define DIO31_PIN 7
|
||||||
|
#define DIO31_WPORT PIOA
|
||||||
|
|
||||||
|
#define DIO32_PIN 10
|
||||||
|
#define DIO32_WPORT PIOD
|
||||||
|
|
||||||
|
#define DIO33_PIN 1
|
||||||
|
#define DIO33_WPORT PIOC
|
||||||
|
|
||||||
|
#if !MB(PRINTRBOARD_G2) // normal DUE pin mapping
|
||||||
|
|
||||||
|
#define DIO34_PIN 2
|
||||||
|
#define DIO34_WPORT PIOC
|
||||||
|
|
||||||
|
#define DIO35_PIN 3
|
||||||
|
#define DIO35_WPORT PIOC
|
||||||
|
|
||||||
|
#define DIO36_PIN 4
|
||||||
|
#define DIO36_WPORT PIOC
|
||||||
|
|
||||||
|
#define DIO37_PIN 5
|
||||||
|
#define DIO37_WPORT PIOC
|
||||||
|
|
||||||
|
#define DIO38_PIN 6
|
||||||
|
#define DIO38_WPORT PIOC
|
||||||
|
|
||||||
|
#define DIO39_PIN 7
|
||||||
|
#define DIO39_WPORT PIOC
|
||||||
|
|
||||||
|
#define DIO40_PIN 8
|
||||||
|
#define DIO40_WPORT PIOC
|
||||||
|
|
||||||
|
#define DIO41_PIN 9
|
||||||
|
#define DIO41_WPORT PIOC
|
||||||
|
|
||||||
|
#endif // !PRINTRBOARD_G2
|
||||||
|
|
||||||
|
#define DIO42_PIN 19
|
||||||
|
#define DIO42_WPORT PIOA
|
||||||
|
|
||||||
|
#define DIO43_PIN 20
|
||||||
|
#define DIO43_WPORT PIOA
|
||||||
|
|
||||||
|
#define DIO44_PIN 19
|
||||||
|
#define DIO44_WPORT PIOC
|
||||||
|
|
||||||
|
#define DIO45_PIN 18
|
||||||
|
#define DIO45_WPORT PIOC
|
||||||
|
|
||||||
|
#define DIO46_PIN 17
|
||||||
|
#define DIO46_WPORT PIOC
|
||||||
|
|
||||||
|
#define DIO47_PIN 16
|
||||||
|
#define DIO47_WPORT PIOC
|
||||||
|
|
||||||
|
#define DIO48_PIN 15
|
||||||
|
#define DIO48_WPORT PIOC
|
||||||
|
|
||||||
|
#define DIO49_PIN 14
|
||||||
|
#define DIO49_WPORT PIOC
|
||||||
|
|
||||||
|
#define DIO50_PIN 13
|
||||||
|
#define DIO50_WPORT PIOC
|
||||||
|
|
||||||
|
#define DIO51_PIN 12
|
||||||
|
#define DIO51_WPORT PIOC
|
||||||
|
|
||||||
|
#define DIO52_PIN 21
|
||||||
|
#define DIO52_WPORT PIOB
|
||||||
|
|
||||||
|
#define DIO53_PIN 14
|
||||||
|
#define DIO53_WPORT PIOB
|
||||||
|
|
||||||
|
#define DIO54_PIN 16
|
||||||
|
#define DIO54_WPORT PIOA
|
||||||
|
|
||||||
|
#define DIO55_PIN 24
|
||||||
|
#define DIO55_WPORT PIOA
|
||||||
|
|
||||||
|
#define DIO56_PIN 23
|
||||||
|
#define DIO56_WPORT PIOA
|
||||||
|
|
||||||
|
#define DIO57_PIN 22
|
||||||
|
#define DIO57_WPORT PIOA
|
||||||
|
|
||||||
|
#define DIO58_PIN 6
|
||||||
|
#define DIO58_WPORT PIOA
|
||||||
|
|
||||||
|
#define DIO59_PIN 4
|
||||||
|
#define DIO59_WPORT PIOA
|
||||||
|
|
||||||
|
#define DIO60_PIN 3
|
||||||
|
#define DIO60_WPORT PIOA
|
||||||
|
|
||||||
|
#define DIO61_PIN 2
|
||||||
|
#define DIO61_WPORT PIOA
|
||||||
|
|
||||||
|
#define DIO62_PIN 17
|
||||||
|
#define DIO62_WPORT PIOB
|
||||||
|
|
||||||
|
#define DIO63_PIN 18
|
||||||
|
#define DIO63_WPORT PIOB
|
||||||
|
|
||||||
|
#define DIO64_PIN 19
|
||||||
|
#define DIO64_WPORT PIOB
|
||||||
|
|
||||||
|
#define DIO65_PIN 20
|
||||||
|
#define DIO65_WPORT PIOB
|
||||||
|
|
||||||
|
#define DIO66_PIN 15
|
||||||
|
#define DIO66_WPORT PIOB
|
||||||
|
|
||||||
|
#define DIO67_PIN 16
|
||||||
|
#define DIO67_WPORT PIOB
|
||||||
|
|
||||||
|
#define DIO68_PIN 1
|
||||||
|
#define DIO68_WPORT PIOA
|
||||||
|
|
||||||
|
#define DIO69_PIN 0
|
||||||
|
#define DIO69_WPORT PIOA
|
||||||
|
|
||||||
|
#define DIO70_PIN 17
|
||||||
|
#define DIO70_WPORT PIOA
|
||||||
|
|
||||||
|
#define DIO71_PIN 18
|
||||||
|
#define DIO71_WPORT PIOA
|
||||||
|
|
||||||
|
#define DIO72_PIN 30
|
||||||
|
#define DIO72_WPORT PIOC
|
||||||
|
|
||||||
|
#define DIO73_PIN 21
|
||||||
|
#define DIO73_WPORT PIOA
|
||||||
|
|
||||||
|
#define DIO74_PIN 25
|
||||||
|
#define DIO74_WPORT PIOA
|
||||||
|
|
||||||
|
#define DIO75_PIN 26
|
||||||
|
#define DIO75_WPORT PIOA
|
||||||
|
|
||||||
|
#define DIO76_PIN 27
|
||||||
|
#define DIO76_WPORT PIOA
|
||||||
|
|
||||||
|
#define DIO77_PIN 28
|
||||||
|
#define DIO77_WPORT PIOA
|
||||||
|
|
||||||
|
#define DIO78_PIN 23
|
||||||
|
#define DIO78_WPORT PIOB
|
||||||
|
|
||||||
|
#define DIO79_PIN 17
|
||||||
|
#define DIO79_WPORT PIOA
|
||||||
|
|
||||||
|
#define DIO80_PIN 12
|
||||||
|
#define DIO80_WPORT PIOB
|
||||||
|
|
||||||
|
#define DIO81_PIN 8
|
||||||
|
#define DIO81_WPORT PIOA
|
||||||
|
|
||||||
|
#define DIO82_PIN 11
|
||||||
|
#define DIO82_WPORT PIOA
|
||||||
|
|
||||||
|
#define DIO83_PIN 13
|
||||||
|
#define DIO83_WPORT PIOA
|
||||||
|
|
||||||
|
#define DIO84_PIN 4
|
||||||
|
#define DIO84_WPORT PIOD
|
||||||
|
|
||||||
|
#define DIO85_PIN 11
|
||||||
|
#define DIO85_WPORT PIOB
|
||||||
|
|
||||||
|
#define DIO86_PIN 21
|
||||||
|
#define DIO86_WPORT PIOB
|
||||||
|
|
||||||
|
#define DIO87_PIN 29
|
||||||
|
#define DIO87_WPORT PIOA
|
||||||
|
|
||||||
|
#define DIO88_PIN 15
|
||||||
|
#define DIO88_WPORT PIOB
|
||||||
|
|
||||||
|
#define DIO89_PIN 14
|
||||||
|
#define DIO89_WPORT PIOB
|
||||||
|
|
||||||
|
#define DIO90_PIN 1
|
||||||
|
#define DIO90_WPORT PIOA
|
||||||
|
|
||||||
|
#define DIO91_PIN 15
|
||||||
|
#define DIO91_WPORT PIOB
|
||||||
|
|
||||||
|
#if ARDUINO_SAM_ARCHIM
|
||||||
|
|
||||||
|
#define DIO92_PIN 11
|
||||||
|
#define DIO92_WPORT PIOC
|
||||||
|
|
||||||
|
#define DIO93_PIN 2
|
||||||
|
#define DIO93_WPORT PIOB
|
||||||
|
|
||||||
|
#define DIO94_PIN 1
|
||||||
|
#define DIO94_WPORT PIOB
|
||||||
|
|
||||||
|
#define DIO95_PIN 0
|
||||||
|
#define DIO95_WPORT PIOB
|
||||||
|
|
||||||
|
#define DIO96_PIN 10
|
||||||
|
#define DIO96_WPORT PIOC
|
||||||
|
|
||||||
|
#define DIO97_PIN 24
|
||||||
|
#define DIO97_WPORT PIOB
|
||||||
|
|
||||||
|
#define DIO98_PIN 7
|
||||||
|
#define DIO98_WPORT PIOB
|
||||||
|
|
||||||
|
#define DIO99_PIN 6
|
||||||
|
#define DIO99_WPORT PIOB
|
||||||
|
|
||||||
|
#define DIO100_PIN 8
|
||||||
|
#define DIO100_WPORT PIOB
|
||||||
|
|
||||||
|
#define DIO101_PIN 5
|
||||||
|
#define DIO101_WPORT PIOB
|
||||||
|
|
||||||
|
#define DIO102_PIN 4
|
||||||
|
#define DIO102_WPORT PIOB
|
||||||
|
|
||||||
|
#define DIO103_PIN 3
|
||||||
|
#define DIO103_WPORT PIOB
|
||||||
|
|
||||||
|
#define DIO104_PIN 20
|
||||||
|
#define DIO104_WPORT PIOC
|
||||||
|
|
||||||
|
#define DIO105_PIN 22
|
||||||
|
#define DIO105_WPORT PIOB
|
||||||
|
|
||||||
|
#define DIO106_PIN 27
|
||||||
|
#define DIO106_WPORT PIOC
|
||||||
|
|
||||||
|
#define DIO107_PIN 10
|
||||||
|
#define DIO107_WPORT PIOB
|
||||||
|
|
||||||
|
#define DIO108_PIN 9
|
||||||
|
#define DIO108_WPORT PIOB
|
||||||
|
|
||||||
|
#else // !ARDUINO_SAM_ARCHIM
|
||||||
|
|
||||||
|
#define DIO92_PIN 5
|
||||||
|
#define DIO92_WPORT PIOA
|
||||||
|
|
||||||
|
#define DIO93_PIN 12
|
||||||
|
#define DIO93_WPORT PIOB
|
||||||
|
|
||||||
|
#define DIO94_PIN 22
|
||||||
|
#define DIO94_WPORT PIOB
|
||||||
|
|
||||||
|
#define DIO95_PIN 23
|
||||||
|
#define DIO95_WPORT PIOB
|
||||||
|
|
||||||
|
#define DIO96_PIN 24
|
||||||
|
#define DIO96_WPORT PIOB
|
||||||
|
|
||||||
|
#define DIO97_PIN 20
|
||||||
|
#define DIO97_WPORT PIOC
|
||||||
|
|
||||||
|
#define DIO98_PIN 27
|
||||||
|
#define DIO98_WPORT PIOC
|
||||||
|
|
||||||
|
#define DIO99_PIN 10
|
||||||
|
#define DIO99_WPORT PIOC
|
||||||
|
|
||||||
|
#define DIO100_PIN 11
|
||||||
|
#define DIO100_WPORT PIOC
|
||||||
|
|
||||||
|
#endif // !ARDUINO_SAM_ARCHIM
|
||||||
206
Marlin/src/HAL/DUE/fastio/G2_PWM.cpp
Normal file
206
Marlin/src/HAL/DUE/fastio/G2_PWM.cpp
Normal file
|
|
@ -0,0 +1,206 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The PWM module is only used to generate interrupts at specified times. It
|
||||||
|
* is NOT used to directly toggle pins. The ISR writes to the pin assigned to
|
||||||
|
* that interrupt.
|
||||||
|
*
|
||||||
|
* All PWMs use the same repetition rate. The G2 needs about 10KHz min in order to
|
||||||
|
* not have obvious ripple on the Vref signals.
|
||||||
|
*
|
||||||
|
* The data structures are setup to minimize the computation done by the ISR which
|
||||||
|
* minimizes ISR execution time. Execution times are 0.8 to 1.1 microseconds.
|
||||||
|
*
|
||||||
|
* FIve PWM interrupt sources are used. Channel 0 sets the base period. All Vref
|
||||||
|
* signals are set active when this counter overflows and resets to zero. The compare
|
||||||
|
* values in channels 1-4 are set to give the desired duty cycle for that Vref pin.
|
||||||
|
* When counter 0 matches the compare value then that channel generates an interrupt.
|
||||||
|
* The ISR checks the source of the interrupt and sets the corresponding pin inactive.
|
||||||
|
*
|
||||||
|
* Some jitter in the Vref signal is OK so the interrupt priority is left at its default value.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "../../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
|
#if MB(PRINTRBOARD_G2)
|
||||||
|
|
||||||
|
#include "G2_PWM.h"
|
||||||
|
|
||||||
|
#if PIN_EXISTS(MOTOR_CURRENT_PWM_X)
|
||||||
|
#define G2_PWM_X 1
|
||||||
|
#else
|
||||||
|
#define G2_PWM_X 0
|
||||||
|
#endif
|
||||||
|
#if PIN_EXISTS(MOTOR_CURRENT_PWM_Y)
|
||||||
|
#define G2_PWM_Y 1
|
||||||
|
#else
|
||||||
|
#define G2_PWM_Y 0
|
||||||
|
#endif
|
||||||
|
#if PIN_EXISTS(MOTOR_CURRENT_PWM_Z)
|
||||||
|
#define G2_PWM_Z 1
|
||||||
|
#else
|
||||||
|
#define G2_PWM_Z 0
|
||||||
|
#endif
|
||||||
|
#if PIN_EXISTS(MOTOR_CURRENT_PWM_E)
|
||||||
|
#define G2_PWM_E 1
|
||||||
|
#else
|
||||||
|
#define G2_PWM_E 0
|
||||||
|
#endif
|
||||||
|
#define G2_MASK_X(V) (G2_PWM_X * (V))
|
||||||
|
#define G2_MASK_Y(V) (G2_PWM_Y * (V))
|
||||||
|
#define G2_MASK_Z(V) (G2_PWM_Z * (V))
|
||||||
|
#define G2_MASK_E(V) (G2_PWM_E * (V))
|
||||||
|
|
||||||
|
volatile uint32_t *SODR_A = &PIOA->PIO_SODR,
|
||||||
|
*SODR_B = &PIOB->PIO_SODR,
|
||||||
|
*CODR_A = &PIOA->PIO_CODR,
|
||||||
|
*CODR_B = &PIOB->PIO_CODR;
|
||||||
|
|
||||||
|
PWM_map ISR_table[NUM_PWMS] = PWM_MAP_INIT;
|
||||||
|
|
||||||
|
void Stepper::digipot_init() {
|
||||||
|
|
||||||
|
#if PIN_EXISTS(MOTOR_CURRENT_PWM_X)
|
||||||
|
OUT_WRITE(MOTOR_CURRENT_PWM_X_PIN, 0); // init pins
|
||||||
|
#endif
|
||||||
|
#if PIN_EXISTS(MOTOR_CURRENT_PWM_Y)
|
||||||
|
OUT_WRITE(MOTOR_CURRENT_PWM_Y_PIN, 0);
|
||||||
|
#endif
|
||||||
|
#if G2_PWM_Z
|
||||||
|
OUT_WRITE(MOTOR_CURRENT_PWM_Z_PIN, 0);
|
||||||
|
#endif
|
||||||
|
#if G2_PWM_E
|
||||||
|
OUT_WRITE(MOTOR_CURRENT_PWM_E_PIN, 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define WPKEY (0x50574D << 8) // “PWM” in ASCII
|
||||||
|
#define WPCMD_DIS_SW 0 // command to disable Write Protect SW
|
||||||
|
#define WPRG_ALL (PWM_WPCR_WPRG0 | PWM_WPCR_WPRG1 | PWM_WPCR_WPRG2 | PWM_WPCR_WPRG3 | PWM_WPCR_WPRG4 | PWM_WPCR_WPRG5) // all Write Protect Groups
|
||||||
|
|
||||||
|
#define PWM_CLOCK_F F_CPU / 1000000UL // set clock to 1MHz
|
||||||
|
|
||||||
|
PMC->PMC_PCER1 = PMC_PCER1_PID36; // enable PWM controller clock (disabled on power up)
|
||||||
|
|
||||||
|
PWM->PWM_WPCR = WPKEY | WPRG_ALL | WPCMD_DIS_SW; // enable setting of all PWM registers
|
||||||
|
PWM->PWM_CLK = PWM_CLOCK_F; // enable CLK_A and set it to 1MHz, leave CLK_B disabled
|
||||||
|
PWM->PWM_CH_NUM[0].PWM_CMR = 0b1011; // set channel 0 to Clock A input & to left aligned
|
||||||
|
if (G2_PWM_X) PWM->PWM_CH_NUM[1].PWM_CMR = 0b1011; // set channel 1 to Clock A input & to left aligned
|
||||||
|
if (G2_PWM_Y) PWM->PWM_CH_NUM[2].PWM_CMR = 0b1011; // set channel 2 to Clock A input & to left aligned
|
||||||
|
if (G2_PWM_Z) PWM->PWM_CH_NUM[3].PWM_CMR = 0b1011; // set channel 3 to Clock A input & to left aligned
|
||||||
|
if (G2_PWM_E) PWM->PWM_CH_NUM[4].PWM_CMR = 0b1011; // set channel 4 to Clock A input & to left aligned
|
||||||
|
|
||||||
|
PWM->PWM_CH_NUM[0].PWM_CPRD = PWM_PERIOD_US; // set channel 0 Period
|
||||||
|
|
||||||
|
PWM->PWM_IER2 = PWM_IER1_CHID0; // generate interrupt when counter0 overflows
|
||||||
|
PWM->PWM_IER2 = PWM_IER2_CMPM0
|
||||||
|
| G2_MASK_X(PWM_IER2_CMPM1)
|
||||||
|
| G2_MASK_Y(PWM_IER2_CMPM2)
|
||||||
|
| G2_MASK_Z(PWM_IER2_CMPM3)
|
||||||
|
| G2_MASK_E(PWM_IER2_CMPM4)
|
||||||
|
; // generate interrupt on compare event
|
||||||
|
|
||||||
|
if (G2_PWM_X) PWM->PWM_CMP[1].PWM_CMPV = 0x010000000LL | G2_VREF_COUNT(G2_VREF(motor_current_setting[0])); // interrupt when counter0 == CMPV - used to set Motor 1 PWM inactive
|
||||||
|
if (G2_PWM_Y) PWM->PWM_CMP[2].PWM_CMPV = 0x010000000LL | G2_VREF_COUNT(G2_VREF(motor_current_setting[0])); // interrupt when counter0 == CMPV - used to set Motor 2 PWM inactive
|
||||||
|
if (G2_PWM_Z) PWM->PWM_CMP[3].PWM_CMPV = 0x010000000LL | G2_VREF_COUNT(G2_VREF(motor_current_setting[1])); // interrupt when counter0 == CMPV - used to set Motor 3 PWM inactive
|
||||||
|
if (G2_PWM_E) PWM->PWM_CMP[4].PWM_CMPV = 0x010000000LL | G2_VREF_COUNT(G2_VREF(motor_current_setting[2])); // interrupt when counter0 == CMPV - used to set Motor 4 PWM inactive
|
||||||
|
|
||||||
|
if (G2_PWM_X) PWM->PWM_CMP[1].PWM_CMPM = 0x0001; // enable compare event
|
||||||
|
if (G2_PWM_Y) PWM->PWM_CMP[2].PWM_CMPM = 0x0001; // enable compare event
|
||||||
|
if (G2_PWM_Z) PWM->PWM_CMP[3].PWM_CMPM = 0x0001; // enable compare event
|
||||||
|
if (G2_PWM_E) PWM->PWM_CMP[4].PWM_CMPM = 0x0001; // enable compare event
|
||||||
|
|
||||||
|
PWM->PWM_SCM = PWM_SCM_UPDM_MODE0 | PWM_SCM_SYNC0
|
||||||
|
| G2_MASK_X(PWM_SCM_SYNC1)
|
||||||
|
| G2_MASK_Y(PWM_SCM_SYNC2)
|
||||||
|
| G2_MASK_Z(PWM_SCM_SYNC3)
|
||||||
|
| G2_MASK_E(PWM_SCM_SYNC4)
|
||||||
|
; // sync 1-4 with 0, use mode 0 for updates
|
||||||
|
|
||||||
|
PWM->PWM_ENA = PWM_ENA_CHID0
|
||||||
|
| G2_MASK_X(PWM_ENA_CHID1)
|
||||||
|
| G2_MASK_Y(PWM_ENA_CHID2)
|
||||||
|
| G2_MASK_Z(PWM_ENA_CHID3)
|
||||||
|
| G2_MASK_E(PWM_ENA_CHID4)
|
||||||
|
; // enable channels used by G2
|
||||||
|
|
||||||
|
PWM->PWM_IER1 = PWM_IER1_CHID0
|
||||||
|
| G2_MASK_X(PWM_IER1_CHID1)
|
||||||
|
| G2_MASK_Y(PWM_IER1_CHID2)
|
||||||
|
| G2_MASK_Z(PWM_IER1_CHID3)
|
||||||
|
| G2_MASK_E(PWM_IER1_CHID4)
|
||||||
|
; // enable interrupts for channels used by G2
|
||||||
|
|
||||||
|
NVIC_EnableIRQ(PWM_IRQn); // Enable interrupt handler
|
||||||
|
NVIC_SetPriority(PWM_IRQn, NVIC_EncodePriority(0, 10, 0)); // normal priority for PWM module (can stand some jitter on the Vref signals)
|
||||||
|
}
|
||||||
|
|
||||||
|
void Stepper::set_digipot_current(const uint8_t driver, const int16_t current) {
|
||||||
|
|
||||||
|
if (!(PWM->PWM_CH_NUM[0].PWM_CPRD == PWM_PERIOD_US)) digipot_init(); // Init PWM system if needed
|
||||||
|
|
||||||
|
switch (driver) {
|
||||||
|
case 0:
|
||||||
|
if (G2_PWM_X) PWM->PWM_CMP[1].PWM_CMPVUPD = 0x010000000LL | G2_VREF_COUNT(G2_VREF(current)); // update X & Y
|
||||||
|
if (G2_PWM_Y) PWM->PWM_CMP[2].PWM_CMPVUPD = 0x010000000LL | G2_VREF_COUNT(G2_VREF(current));
|
||||||
|
if (G2_PWM_X) PWM->PWM_CMP[1].PWM_CMPMUPD = 0x0001; // enable compare event
|
||||||
|
if (G2_PWM_Y) PWM->PWM_CMP[2].PWM_CMPMUPD = 0x0001; // enable compare event
|
||||||
|
if (G2_PWM_X || G2_PWM_Y) PWM->PWM_SCUC = PWM_SCUC_UPDULOCK; // tell the PWM controller to update the values on the next cycle
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
if (G2_PWM_Z) {
|
||||||
|
PWM->PWM_CMP[3].PWM_CMPVUPD = 0x010000000LL | G2_VREF_COUNT(G2_VREF(current)); // update Z
|
||||||
|
PWM->PWM_CMP[3].PWM_CMPMUPD = 0x0001; // enable compare event
|
||||||
|
PWM->PWM_SCUC = PWM_SCUC_UPDULOCK; // tell the PWM controller to update the values on the next cycle
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
if (G2_PWM_E) {
|
||||||
|
PWM->PWM_CMP[4].PWM_CMPVUPD = 0x010000000LL | G2_VREF_COUNT(G2_VREF(current)); // update E
|
||||||
|
PWM->PWM_CMP[4].PWM_CMPMUPD = 0x0001; // enable compare event
|
||||||
|
PWM->PWM_SCUC = PWM_SCUC_UPDULOCK; // tell the PWM controller to update the values on the next cycle
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
volatile uint32_t PWM_ISR1_STATUS, PWM_ISR2_STATUS;
|
||||||
|
|
||||||
|
void PWM_Handler() {
|
||||||
|
PWM_ISR1_STATUS = PWM->PWM_ISR1;
|
||||||
|
PWM_ISR2_STATUS = PWM->PWM_ISR2;
|
||||||
|
if (PWM_ISR1_STATUS & PWM_IER1_CHID0) { // CHAN_0 interrupt
|
||||||
|
if (G2_PWM_X) *ISR_table[0].set_register = ISR_table[0].write_mask; // set X to active
|
||||||
|
if (G2_PWM_Y) *ISR_table[1].set_register = ISR_table[1].write_mask; // set Y to active
|
||||||
|
if (G2_PWM_Z) *ISR_table[2].set_register = ISR_table[2].write_mask; // set Z to active
|
||||||
|
if (G2_PWM_E) *ISR_table[3].set_register = ISR_table[3].write_mask; // set E to active
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (G2_PWM_X && (PWM_ISR2_STATUS & PWM_IER2_CMPM1)) *ISR_table[0].clr_register = ISR_table[0].write_mask; // set X to inactive
|
||||||
|
if (G2_PWM_Y && (PWM_ISR2_STATUS & PWM_IER2_CMPM2)) *ISR_table[1].clr_register = ISR_table[1].write_mask; // set Y to inactive
|
||||||
|
if (G2_PWM_Z && (PWM_ISR2_STATUS & PWM_IER2_CMPM3)) *ISR_table[2].clr_register = ISR_table[2].write_mask; // set Z to inactive
|
||||||
|
if (G2_PWM_E && (PWM_ISR2_STATUS & PWM_IER2_CMPM4)) *ISR_table[3].clr_register = ISR_table[3].write_mask; // set E to inactive
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // PRINTRBOARD_G2
|
||||||
78
Marlin/src/HAL/DUE/fastio/G2_PWM.h
Normal file
78
Marlin/src/HAL/DUE/fastio/G2_PWM.h
Normal file
|
|
@ -0,0 +1,78 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This module is stripped down version of the LPC1768_PWM.h file from
|
||||||
|
* PR #7500. It is hardwired for the PRINTRBOARD_G2 Motor Current needs.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "../../../inc/MarlinConfigPre.h"
|
||||||
|
#include "../../../module/stepper.h"
|
||||||
|
//C:\Users\bobku\Documents\GitHub\Marlin-Bob-2\Marlin\src\module\stepper.h
|
||||||
|
//C:\Users\bobku\Documents\GitHub\Marlin-Bob-2\Marlin\src\HAL\HAL_DUE\G2_PWM.h
|
||||||
|
|
||||||
|
#define PWM_PERIOD_US 100 // base repetition rate in micro seconds
|
||||||
|
|
||||||
|
typedef struct { // holds the data needed by the ISR to control the Vref pin
|
||||||
|
volatile uint32_t* set_register;
|
||||||
|
volatile uint32_t* clr_register;
|
||||||
|
uint32_t write_mask;
|
||||||
|
} PWM_map;
|
||||||
|
|
||||||
|
#define G2_VREF(I) (uint32_t)(I * 5 * 0.15) // desired Vref * 1000 (scaled so don't loose accuracy in next step)
|
||||||
|
|
||||||
|
#define G2_VREF_COUNT(Q) (uint32_t)map(constrain(Q, 500, 3.3 * 1000), 0, 3.3 * 1000, 0, PWM_PERIOD_US) // under 500 the results are very non-linear
|
||||||
|
|
||||||
|
extern volatile uint32_t *SODR_A, *SODR_B, *CODR_A, *CODR_B;
|
||||||
|
|
||||||
|
#define _PIN(IO) (DIO ## IO ## _PIN)
|
||||||
|
|
||||||
|
#define PWM_MAP_INIT_ROW(IO,ZZ) { ZZ == 'A' ? SODR_A : SODR_B, ZZ == 'A' ? CODR_A : CODR_B, 1 << _PIN(IO) }
|
||||||
|
|
||||||
|
|
||||||
|
#define PWM_MAP_INIT { PWM_MAP_INIT_ROW(MOTOR_CURRENT_PWM_X_PIN, 'B'), \
|
||||||
|
PWM_MAP_INIT_ROW(MOTOR_CURRENT_PWM_Y_PIN, 'B'), \
|
||||||
|
PWM_MAP_INIT_ROW(MOTOR_CURRENT_PWM_Z_PIN, 'B'), \
|
||||||
|
PWM_MAP_INIT_ROW(MOTOR_CURRENT_PWM_E_PIN, 'A'), \
|
||||||
|
};
|
||||||
|
|
||||||
|
#define NUM_PWMS 4
|
||||||
|
|
||||||
|
extern PWM_map ISR_table[NUM_PWMS];
|
||||||
|
|
||||||
|
extern uint32_t motor_current_setting[3];
|
||||||
|
|
||||||
|
#define IR_BIT(p) (WITHIN(p, 0, 3) ? (p) : (p) + 4)
|
||||||
|
#define COPY_ACTIVE_TABLE() do{ LOOP_L_N(i, 6) work_table[i] = active_table[i]; }while(0)
|
||||||
|
|
||||||
|
#define PWM_MR0 19999 // base repetition rate minus one count - 20mS
|
||||||
|
#define PWM_PR 24 // prescaler value - prescaler divide by 24 + 1 - 1 MHz output
|
||||||
|
#define PWM_PCLKSEL0 0x00 // select clock source for prescaler - defaults to 25MHz on power up
|
||||||
|
// 0: 25MHz, 1: 100MHz, 2: 50MHz, 3: 12.5MHZ to PWM1 prescaler
|
||||||
|
#define MR0_MARGIN 200 // if channel value too close to MR0 the system locks up
|
||||||
|
|
||||||
|
extern bool PWM_table_swap; // flag to tell the ISR that the tables have been swapped
|
||||||
|
|
||||||
|
#define HAL_G2_PWM_ISR void PWM_Handler()
|
||||||
|
|
||||||
|
extern volatile uint32_t PWM_ISR1_STATUS, PWM_ISR2_STATUS;
|
||||||
278
Marlin/src/HAL/DUE/fastio/G2_pins.h
Normal file
278
Marlin/src/HAL/DUE/fastio/G2_pins.h
Normal file
|
|
@ -0,0 +1,278 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This file contains the custom port/pin definitions for the PRINTRBOARD_G2
|
||||||
|
* motherboard. This motherboard uses the SAM3X8C which is a subset of the
|
||||||
|
* SAM3X8E used in the DUE board. It uses port/pin pairs that are not
|
||||||
|
* available using the DUE definitions.
|
||||||
|
*
|
||||||
|
* The first part is a copy of the pin descriptions in the
|
||||||
|
* "variants\arduino_due_x\variant.cpp" file but with pins 34-41 replaced by
|
||||||
|
* the G2 pins.
|
||||||
|
*
|
||||||
|
* The second part is the FASTIO port/pin definitions.
|
||||||
|
*
|
||||||
|
* THESE PINS CAN ONLY BE ACCESSED VIA FASTIO COMMANDS.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
Copyright (c) 2011 Arduino. All right reserved.
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library 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 Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
typedef struct _G2_PinDescription {
|
||||||
|
Pio* pPort;
|
||||||
|
uint32_t ulPin;
|
||||||
|
uint32_t ulPeripheralId;
|
||||||
|
EPioType ulPinType;
|
||||||
|
uint32_t ulPinConfiguration;
|
||||||
|
uint32_t ulPinAttribute;
|
||||||
|
EAnalogChannel ulAnalogChannel; /* Analog pin in the Arduino context (label on the board) */
|
||||||
|
EAnalogChannel ulADCChannelNumber; /* ADC Channel number in the SAM device */
|
||||||
|
EPWMChannel ulPWMChannel;
|
||||||
|
ETCChannel ulTCChannel;
|
||||||
|
} G2_PinDescription;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This section is a copy of the pin descriptions in the "variants\arduino_due_x\variant.cpp" file
|
||||||
|
* with pins 34-41 replaced by the G2 pins.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pins descriptions
|
||||||
|
*/
|
||||||
|
const G2_PinDescription G2_g_APinDescription[] = {
|
||||||
|
// 0 .. 53 - Digital pins
|
||||||
|
// ----------------------
|
||||||
|
// 0/1 - UART (Serial)
|
||||||
|
{ PIOA, PIO_PA8A_URXD, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // URXD
|
||||||
|
{ PIOA, PIO_PA9A_UTXD, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // UTXD
|
||||||
|
|
||||||
|
// 2
|
||||||
|
{ PIOB, PIO_PB25B_TIOA0, ID_PIOB, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), NO_ADC, NO_ADC, NOT_ON_PWM, TC0_CHA0 }, // TIOA0
|
||||||
|
{ PIOC, PIO_PC28B_TIOA7, ID_PIOC, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), NO_ADC, NO_ADC, NOT_ON_PWM, TC2_CHA7 }, // TIOA7
|
||||||
|
{ PIOC, PIO_PC26B_TIOB6, ID_PIOC, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), NO_ADC, NO_ADC, NOT_ON_PWM, TC2_CHB6 }, // TIOB6
|
||||||
|
|
||||||
|
// 5
|
||||||
|
{ PIOC, PIO_PC25B_TIOA6, ID_PIOC, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), NO_ADC, NO_ADC, NOT_ON_PWM, TC2_CHA6 }, // TIOA6
|
||||||
|
{ PIOC, PIO_PC24B_PWML7, ID_PIOC, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM), NO_ADC, NO_ADC, PWM_CH7, NOT_ON_TIMER }, // PWML7
|
||||||
|
{ PIOC, PIO_PC23B_PWML6, ID_PIOC, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM), NO_ADC, NO_ADC, PWM_CH6, NOT_ON_TIMER }, // PWML6
|
||||||
|
{ PIOC, PIO_PC22B_PWML5, ID_PIOC, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM), NO_ADC, NO_ADC, PWM_CH5, NOT_ON_TIMER }, // PWML5
|
||||||
|
{ PIOC, PIO_PC21B_PWML4, ID_PIOC, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM), NO_ADC, NO_ADC, PWM_CH4, NOT_ON_TIMER }, // PWML4
|
||||||
|
// 10
|
||||||
|
{ PIOC, PIO_PC29B_TIOB7, ID_PIOC, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), NO_ADC, NO_ADC, NOT_ON_PWM, TC2_CHB7 }, // TIOB7
|
||||||
|
{ PIOD, PIO_PD7B_TIOA8, ID_PIOD, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), NO_ADC, NO_ADC, NOT_ON_PWM, TC2_CHA8 }, // TIOA8
|
||||||
|
{ PIOD, PIO_PD8B_TIOB8, ID_PIOD, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), NO_ADC, NO_ADC, NOT_ON_PWM, TC2_CHB8 }, // TIOB8
|
||||||
|
|
||||||
|
// 13 - AMBER LED
|
||||||
|
{ PIOB, PIO_PB27B_TIOB0, ID_PIOB, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), NO_ADC, NO_ADC, NOT_ON_PWM, TC0_CHB0 }, // TIOB0
|
||||||
|
|
||||||
|
// 14/15 - USART3 (Serial3)
|
||||||
|
{ PIOD, PIO_PD4B_TXD3, ID_PIOD, PIO_PERIPH_B, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // TXD3
|
||||||
|
{ PIOD, PIO_PD5B_RXD3, ID_PIOD, PIO_PERIPH_B, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // RXD3
|
||||||
|
|
||||||
|
// 16/17 - USART1 (Serial2)
|
||||||
|
{ PIOA, PIO_PA13A_TXD1, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // TXD1
|
||||||
|
{ PIOA, PIO_PA12A_RXD1, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // RXD1
|
||||||
|
|
||||||
|
// 18/19 - USART0 (Serial1)
|
||||||
|
{ PIOA, PIO_PA11A_TXD0, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // TXD0
|
||||||
|
{ PIOA, PIO_PA10A_RXD0, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // RXD0
|
||||||
|
|
||||||
|
// 20/21 - TWI1
|
||||||
|
{ PIOB, PIO_PB12A_TWD1, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // TWD1 - SDA0
|
||||||
|
{ PIOB, PIO_PB13A_TWCK1, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // TWCK1 - SCL0
|
||||||
|
|
||||||
|
// 22
|
||||||
|
{ PIOB, PIO_PB26, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 22
|
||||||
|
{ PIOA, PIO_PA14, ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 23
|
||||||
|
{ PIOA, PIO_PA15, ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 24
|
||||||
|
{ PIOD, PIO_PD0, ID_PIOD, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 25
|
||||||
|
|
||||||
|
// 26
|
||||||
|
{ PIOD, PIO_PD1, ID_PIOD, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 26
|
||||||
|
{ PIOD, PIO_PD2, ID_PIOD, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 27
|
||||||
|
{ PIOD, PIO_PD3, ID_PIOD, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 28
|
||||||
|
{ PIOD, PIO_PD6, ID_PIOD, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 29
|
||||||
|
|
||||||
|
// 30
|
||||||
|
{ PIOD, PIO_PD9, ID_PIOD, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 30
|
||||||
|
{ PIOA, PIO_PA7, ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 31
|
||||||
|
{ PIOD, PIO_PD10, ID_PIOD, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 32
|
||||||
|
{ PIOC, PIO_PC1, ID_PIOC, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 33
|
||||||
|
|
||||||
|
// 34
|
||||||
|
|
||||||
|
// start of custom pins
|
||||||
|
{ PIOA, PIO_PA29, ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 34 Y_STEP_PIN
|
||||||
|
{ PIOB, PIO_PB1, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 35 Y_DIR_PIN
|
||||||
|
{ PIOB, PIO_PB0, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 36 Y_ENABLE_PIN
|
||||||
|
{ PIOB, PIO_PB22, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 37 E0_ENABLE_PIN
|
||||||
|
{ PIOB, PIO_PB11, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 38 E0_MS1_PIN
|
||||||
|
{ PIOB, PIO_PB10, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 39 E0_MS3_PIN
|
||||||
|
{ PIOA, PIO_PA5, ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 40 HEATER_0_PIN
|
||||||
|
{ PIOB, PIO_PB24, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 41 HEATER_BED_PIN
|
||||||
|
// end of custom pins
|
||||||
|
|
||||||
|
// 42
|
||||||
|
{ PIOA, PIO_PA19, ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 42
|
||||||
|
{ PIOA, PIO_PA20, ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 43
|
||||||
|
{ PIOC, PIO_PC19, ID_PIOC, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 44
|
||||||
|
{ PIOC, PIO_PC18, ID_PIOC, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 45
|
||||||
|
|
||||||
|
// 46
|
||||||
|
{ PIOC, PIO_PC17, ID_PIOC, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 46
|
||||||
|
{ PIOC, PIO_PC16, ID_PIOC, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 47
|
||||||
|
{ PIOC, PIO_PC15, ID_PIOC, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 48
|
||||||
|
{ PIOC, PIO_PC14, ID_PIOC, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 49
|
||||||
|
|
||||||
|
// 50
|
||||||
|
{ PIOC, PIO_PC13, ID_PIOC, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 50
|
||||||
|
{ PIOC, PIO_PC12, ID_PIOC, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 51
|
||||||
|
{ PIOB, PIO_PB21, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 52
|
||||||
|
{ PIOB, PIO_PB14, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 53
|
||||||
|
|
||||||
|
|
||||||
|
// 54 .. 65 - Analog pins
|
||||||
|
// ----------------------
|
||||||
|
{ PIOA, PIO_PA16X1_AD7, ID_PIOA, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC0, ADC7, NOT_ON_PWM, NOT_ON_TIMER }, // AD0
|
||||||
|
{ PIOA, PIO_PA24X1_AD6, ID_PIOA, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC1, ADC6, NOT_ON_PWM, NOT_ON_TIMER }, // AD1
|
||||||
|
{ PIOA, PIO_PA23X1_AD5, ID_PIOA, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC2, ADC5, NOT_ON_PWM, NOT_ON_TIMER }, // AD2
|
||||||
|
{ PIOA, PIO_PA22X1_AD4, ID_PIOA, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC3, ADC4, NOT_ON_PWM, NOT_ON_TIMER }, // AD3
|
||||||
|
// 58
|
||||||
|
{ PIOA, PIO_PA6X1_AD3, ID_PIOA, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC4, ADC3, NOT_ON_PWM, TC0_CHB2 }, // AD4
|
||||||
|
{ PIOA, PIO_PA4X1_AD2, ID_PIOA, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC5, ADC2, NOT_ON_PWM, NOT_ON_TIMER }, // AD5
|
||||||
|
{ PIOA, PIO_PA3X1_AD1, ID_PIOA, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC6, ADC1, NOT_ON_PWM, TC0_CHB1 }, // AD6
|
||||||
|
{ PIOA, PIO_PA2X1_AD0, ID_PIOA, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC7, ADC0, NOT_ON_PWM, TC0_CHA1 }, // AD7
|
||||||
|
// 62
|
||||||
|
{ PIOB, PIO_PB17X1_AD10, ID_PIOB, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC8, ADC10, NOT_ON_PWM, NOT_ON_TIMER }, // AD8
|
||||||
|
{ PIOB, PIO_PB18X1_AD11, ID_PIOB, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC9, ADC11, NOT_ON_PWM, NOT_ON_TIMER }, // AD9
|
||||||
|
{ PIOB, PIO_PB19X1_AD12, ID_PIOB, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC10, ADC12, NOT_ON_PWM, NOT_ON_TIMER }, // AD10
|
||||||
|
{ PIOB, PIO_PB20X1_AD13, ID_PIOB, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC11, ADC13, NOT_ON_PWM, NOT_ON_TIMER }, // AD11
|
||||||
|
|
||||||
|
// 66/67 - DAC0/DAC1
|
||||||
|
{ PIOB, PIO_PB15X1_DAC0, ID_PIOB, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC12, DA0, NOT_ON_PWM, NOT_ON_TIMER }, // DAC0
|
||||||
|
{ PIOB, PIO_PB16X1_DAC1, ID_PIOB, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC13, DA1, NOT_ON_PWM, NOT_ON_TIMER }, // DAC1
|
||||||
|
|
||||||
|
// 68/69 - CANRX0/CANTX0
|
||||||
|
{ PIOA, PIO_PA1A_CANRX0, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, ADC14, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // CANRX
|
||||||
|
{ PIOA, PIO_PA0A_CANTX0, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, ADC15, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // CANTX
|
||||||
|
|
||||||
|
// 70/71 - TWI0
|
||||||
|
{ PIOA, PIO_PA17A_TWD0, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // TWD0 - SDA1
|
||||||
|
{ PIOA, PIO_PA18A_TWCK0, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // TWCK0 - SCL1
|
||||||
|
|
||||||
|
// 72/73 - LEDs
|
||||||
|
{ PIOC, PIO_PC30, ID_PIOC, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // LED AMBER RXL
|
||||||
|
{ PIOA, PIO_PA21, ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // LED AMBER TXL
|
||||||
|
|
||||||
|
// 74/75/76 - SPI
|
||||||
|
{ PIOA, PIO_PA25A_SPI0_MISO,ID_PIOA,PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // MISO
|
||||||
|
{ PIOA, PIO_PA26A_SPI0_MOSI,ID_PIOA,PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // MOSI
|
||||||
|
{ PIOA, PIO_PA27A_SPI0_SPCK,ID_PIOA,PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // SPCK
|
||||||
|
|
||||||
|
// 77 - SPI CS0
|
||||||
|
{ PIOA, PIO_PA28A_SPI0_NPCS0,ID_PIOA,PIO_PERIPH_A,PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // NPCS0
|
||||||
|
|
||||||
|
// 78 - SPI CS3 (unconnected)
|
||||||
|
{ PIOB, PIO_PB23B_SPI0_NPCS3,ID_PIOB,PIO_PERIPH_B,PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // NPCS3
|
||||||
|
|
||||||
|
// 79 .. 84 - "All pins" masks
|
||||||
|
|
||||||
|
// 79 - TWI0 all pins
|
||||||
|
{ PIOA, PIO_PA17A_TWD0|PIO_PA18A_TWCK0, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER },
|
||||||
|
// 80 - TWI1 all pins
|
||||||
|
{ PIOB, PIO_PB12A_TWD1|PIO_PB13A_TWCK1, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER },
|
||||||
|
// 81 - UART (Serial) all pins
|
||||||
|
{ PIOA, PIO_PA8A_URXD|PIO_PA9A_UTXD, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER },
|
||||||
|
// 82 - USART0 (Serial1) all pins
|
||||||
|
{ PIOA, PIO_PA11A_TXD0|PIO_PA10A_RXD0, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER },
|
||||||
|
// 83 - USART1 (Serial2) all pins
|
||||||
|
{ PIOA, PIO_PA13A_TXD1|PIO_PA12A_RXD1, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER },
|
||||||
|
// 84 - USART3 (Serial3) all pins
|
||||||
|
{ PIOD, PIO_PD4B_TXD3|PIO_PD5B_RXD3, ID_PIOD, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER },
|
||||||
|
|
||||||
|
// 85 - USB
|
||||||
|
{ PIOB, PIO_PB11A_UOTGID|PIO_PB10A_UOTGVBOF, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL,NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // ID - VBOF
|
||||||
|
|
||||||
|
// 86 - SPI CS2
|
||||||
|
{ PIOB, PIO_PB21B_SPI0_NPCS2, ID_PIOB, PIO_PERIPH_B, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // NPCS2
|
||||||
|
|
||||||
|
// 87 - SPI CS1
|
||||||
|
{ PIOA, PIO_PA29A_SPI0_NPCS1, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // NPCS1
|
||||||
|
|
||||||
|
// 88/89 - CANRX1/CANTX1 (same physical pin for 66/53)
|
||||||
|
{ PIOB, PIO_PB15A_CANRX1, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // CANRX1
|
||||||
|
{ PIOB, PIO_PB14A_CANTX1, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // CANTX1
|
||||||
|
|
||||||
|
// 90 .. 91 - "All CAN pins" masks
|
||||||
|
// 90 - CAN0 all pins
|
||||||
|
{ PIOA, PIO_PA1A_CANRX0|PIO_PA0A_CANTX0, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER },
|
||||||
|
// 91 - CAN1 all pins
|
||||||
|
{ PIOB, PIO_PB15A_CANRX1|PIO_PB14A_CANTX1, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER },
|
||||||
|
|
||||||
|
// END
|
||||||
|
{ nullptr, 0, 0, PIO_NOT_A_PIN, PIO_DEFAULT, 0, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }
|
||||||
|
};
|
||||||
|
|
||||||
|
// This section replaces the FASTIO definitions of pins 34-41
|
||||||
|
|
||||||
|
#define DIO34_PIN 29
|
||||||
|
#define DIO34_WPORT PIOA // only available via FASTIO // 34 PA29 - Y_STEP_PIN
|
||||||
|
|
||||||
|
#define DIO35_PIN 1
|
||||||
|
#define DIO35_WPORT PIOB // only available via FASTIO // 35 PAB1 - Y_DIR_PIN
|
||||||
|
|
||||||
|
#define DIO36_PIN 0
|
||||||
|
#define DIO36_WPORT PIOB // only available via FASTIO // 36 PB0 - Y_ENABLE_PIN
|
||||||
|
|
||||||
|
#define DIO37_PIN 22
|
||||||
|
#define DIO37_WPORT PIOB // only available via FASTIO // 37 PB22 - E0_ENABLE_PIN
|
||||||
|
|
||||||
|
#define DIO38_PIN 11
|
||||||
|
#define DIO38_WPORT PIOB // only available via FASTIO // 38 PB11 - E0_MS1_PIN
|
||||||
|
|
||||||
|
#define DIO39_PIN 10
|
||||||
|
#define DIO39_WPORT PIOB // only available via FASTIO // 39 PB10 - E0_MS3_PIN
|
||||||
|
|
||||||
|
#define DIO40_PIN 5
|
||||||
|
#define DIO40_WPORT PIOA // only available via FASTIO // 40 PA5 - HEATER_0_PIN
|
||||||
|
|
||||||
|
#define DIO41_PIN 24
|
||||||
|
#define DIO41_WPORT PIOB // only available via FASTIO // 41 PB24 - HEATER_BED_PIN
|
||||||
26
Marlin/src/HAL/DUE/inc/Conditionals_LCD.h
Normal file
26
Marlin/src/HAL/DUE/inc/Conditionals_LCD.h
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#if HAS_SPI_TFT || HAS_FSMC_TFT
|
||||||
|
#error "Sorry! TFT displays are not available for HAL/DUE."
|
||||||
|
#endif
|
||||||
22
Marlin/src/HAL/DUE/inc/Conditionals_adv.h
Normal file
22
Marlin/src/HAL/DUE/inc/Conditionals_adv.h
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
28
Marlin/src/HAL/DUE/inc/Conditionals_post.h
Normal file
28
Marlin/src/HAL/DUE/inc/Conditionals_post.h
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#if USE_FALLBACK_EEPROM
|
||||||
|
#define FLASH_EEPROM_EMULATION
|
||||||
|
#elif EITHER(I2C_EEPROM, SPI_EEPROM)
|
||||||
|
#define USE_SHARED_EEPROM 1
|
||||||
|
#endif
|
||||||
61
Marlin/src/HAL/DUE/inc/SanityCheck.h
Normal file
61
Marlin/src/HAL/DUE/inc/SanityCheck.h
Normal file
|
|
@ -0,0 +1,61 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test Arduino Due specific configuration values for errors at compile-time.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* HARDWARE VS. SOFTWARE SPI COMPATIBILITY
|
||||||
|
*
|
||||||
|
* DUE selects hardware vs. software SPI depending on whether one of the hardware-controllable SDSS pins is in use.
|
||||||
|
*
|
||||||
|
* The hardware SPI controller doesn't allow software SPIs to control any shared pins.
|
||||||
|
*
|
||||||
|
* When DUE software SPI is used then Trinamic drivers must use the TMC softSPI.
|
||||||
|
*
|
||||||
|
* When DUE hardware SPI is used then a Trinamic driver can use either its hardware SPI or, if there are no shared
|
||||||
|
* pins, its software SPI.
|
||||||
|
*
|
||||||
|
* Usually the hardware SPI pins are only available to the LCD. This makes the DUE hard SPI used at the same time
|
||||||
|
* as the TMC2130 soft SPI the most common setup.
|
||||||
|
*/
|
||||||
|
#define _IS_HW_SPI(P) (defined(TMC_SW_##P) && (TMC_SW_##P == MOSI_PIN || TMC_SW_##P == MISO_PIN || TMC_SW_##P == SCK_PIN))
|
||||||
|
|
||||||
|
#if ENABLED(SDSUPPORT) && HAS_DRIVER(TMC2130)
|
||||||
|
#if ENABLED(TMC_USE_SW_SPI)
|
||||||
|
#if DISABLED(DUE_SOFTWARE_SPI) && (_IS_HW_SPI(MOSI) || _IS_HW_SPI(MISO) || _IS_HW_SPI(SCK))
|
||||||
|
#error "DUE hardware SPI is required but is incompatible with TMC2130 software SPI. Either disable TMC_USE_SW_SPI or use separate pins for the two SPIs."
|
||||||
|
#endif
|
||||||
|
#elif ENABLED(DUE_SOFTWARE_SPI)
|
||||||
|
#error "DUE software SPI is required but is incompatible with TMC2130 hardware SPI. Enable TMC_USE_SW_SPI to fix."
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY
|
||||||
|
#error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on DUE."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if HAS_TMC_SW_SERIAL
|
||||||
|
#error "TMC220x Software Serial is not supported on this platform."
|
||||||
|
#endif
|
||||||
182
Marlin/src/HAL/DUE/pinsDebug.h
Normal file
182
Marlin/src/HAL/DUE/pinsDebug.h
Normal file
|
|
@ -0,0 +1,182 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Support routines for Due
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Translation of routines & variables used by pinsDebug.h
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "../shared/Marduino.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Due/Marlin quirks
|
||||||
|
*
|
||||||
|
* a) determining the state of a pin
|
||||||
|
* The Due/Arduino status definitions for the g_pinStatus[pin] array are:
|
||||||
|
* #define PIN_STATUS_DIGITAL_INPUT_PULLUP (0x01)
|
||||||
|
* #define PIN_STATUS_DIGITAL_INPUT (0x02)
|
||||||
|
* #define PIN_STATUS_DIGITAL_OUTPUT (0x03)
|
||||||
|
* #define PIN_STATUS_ANALOG (0x04)
|
||||||
|
* #define PIN_STATUS_PWM (0x05)
|
||||||
|
* #define PIN_STATUS_TIMER (0x06)
|
||||||
|
*
|
||||||
|
* These are only valid if the following Due/Arduino provided functions are used:
|
||||||
|
* analogRead
|
||||||
|
* analogWrite
|
||||||
|
* digitalWrite
|
||||||
|
* pinMode
|
||||||
|
*
|
||||||
|
* The FASTIO routines do not touch the g_pinStatus[pin] array.
|
||||||
|
*
|
||||||
|
* The net result is that both the g_pinStatus[pin] array and the PIO_OSR register
|
||||||
|
* needs to be looked at when determining if a pin is an input or an output.
|
||||||
|
*
|
||||||
|
* b) Due has only pins 6, 7, 8 & 9 enabled for PWMs. FYI - they run at 1KHz
|
||||||
|
*
|
||||||
|
* c) NUM_DIGITAL_PINS does not include the analog pins
|
||||||
|
*
|
||||||
|
* d) Pins 0-78 are defined for Due but 78 has a comment of "unconnected!". 78 is
|
||||||
|
* included just in case.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define NUMBER_PINS_TOTAL PINS_COUNT
|
||||||
|
|
||||||
|
#define digitalRead_mod(p) extDigitalRead(p) // AVR digitalRead disabled PWM before it read the pin
|
||||||
|
#define PRINT_PORT(p)
|
||||||
|
#define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
|
||||||
|
#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%02d"), p); SERIAL_ECHO(buffer); }while(0)
|
||||||
|
#define GET_ARRAY_PIN(p) pin_array[p].pin
|
||||||
|
#define GET_ARRAY_IS_DIGITAL(p) pin_array[p].is_digital
|
||||||
|
#define VALID_PIN(pin) (pin >= 0 && pin < (int8_t)NUMBER_PINS_TOTAL ? 1 : 0)
|
||||||
|
#define DIGITAL_PIN_TO_ANALOG_PIN(p) int(p - analogInputToDigitalPin(0))
|
||||||
|
#define IS_ANALOG(P) WITHIN(P, char(analogInputToDigitalPin(0)), char(analogInputToDigitalPin(NUM_ANALOG_INPUTS - 1)))
|
||||||
|
#define pwm_status(pin) (((g_pinStatus[pin] & 0xF) == PIN_STATUS_PWM) && \
|
||||||
|
((g_APinDescription[pin].ulPinAttribute & PIN_ATTR_PWM) == PIN_ATTR_PWM))
|
||||||
|
#define MULTI_NAME_PAD 14 // space needed to be pretty if not first name assigned to a pin
|
||||||
|
|
||||||
|
bool GET_PINMODE(int8_t pin) { // 1: output, 0: input
|
||||||
|
volatile Pio* port = g_APinDescription[pin].pPort;
|
||||||
|
uint32_t mask = g_APinDescription[pin].ulPin;
|
||||||
|
uint8_t pin_status = g_pinStatus[pin] & 0xF;
|
||||||
|
return ( (pin_status == 0 && (port->PIO_OSR & mask))
|
||||||
|
|| pin_status == PIN_STATUS_DIGITAL_OUTPUT
|
||||||
|
|| pwm_status(pin));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void pwm_details(int32_t pin) {
|
||||||
|
if (pwm_status(pin)) {
|
||||||
|
uint32_t chan = g_APinDescription[pin].ulPWMChannel;
|
||||||
|
SERIAL_ECHOPAIR("PWM = ", PWM_INTERFACE->PWM_CH_NUM[chan].PWM_CDTY);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DUE Board pin | PORT | Label
|
||||||
|
* ----------------+--------+-------
|
||||||
|
* 0 | PA8 | "RX0"
|
||||||
|
* 1 | PA9 | "TX0"
|
||||||
|
* 2 TIOA0 | PB25 |
|
||||||
|
* 3 TIOA7 | PC28 |
|
||||||
|
* 4 NPCS1 | PA29 |
|
||||||
|
* TIOB6 | PC26 |
|
||||||
|
* 5 TIOA6 | PC25 |
|
||||||
|
* 6 PWML7 | PC24 |
|
||||||
|
* 7 PWML6 | PC23 |
|
||||||
|
* 8 PWML5 | PC22 |
|
||||||
|
* 9 PWML4 | PC21 |
|
||||||
|
* 10 NPCS0 | PA28 |
|
||||||
|
* TIOB7 | PC29 |
|
||||||
|
* 11 TIOA8 | PD7 |
|
||||||
|
* 12 TIOB8 | PD8 |
|
||||||
|
* 13 TIOB0 | PB27 | LED AMBER "L"
|
||||||
|
* 14 TXD3 | PD4 | "TX3"
|
||||||
|
* 15 RXD3 | PD5 | "RX3"
|
||||||
|
* 16 TXD1 | PA13 | "TX2"
|
||||||
|
* 17 RXD1 | PA12 | "RX2"
|
||||||
|
* 18 TXD0 | PA11 | "TX1"
|
||||||
|
* 19 RXD0 | PA10 | "RX1"
|
||||||
|
* 20 | PB12 | "SDA"
|
||||||
|
* 21 | PB13 | "SCL"
|
||||||
|
* 22 | PB26 |
|
||||||
|
* 23 | PA14 |
|
||||||
|
* 24 | PA15 |
|
||||||
|
* 25 | PD0 |
|
||||||
|
* 26 | PD1 |
|
||||||
|
* 27 | PD2 |
|
||||||
|
* 28 | PD3 |
|
||||||
|
* 29 | PD6 |
|
||||||
|
* 30 | PD9 |
|
||||||
|
* 31 | PA7 |
|
||||||
|
* 32 | PD10 |
|
||||||
|
* 33 | PC1 |
|
||||||
|
* 34 | PC2 |
|
||||||
|
* 35 | PC3 |
|
||||||
|
* 36 | PC4 |
|
||||||
|
* 37 | PC5 |
|
||||||
|
* 38 | PC6 |
|
||||||
|
* 39 | PC7 |
|
||||||
|
* 40 | PC8 |
|
||||||
|
* 41 | PC9 |
|
||||||
|
* 42 | PA19 |
|
||||||
|
* 43 | PA20 |
|
||||||
|
* 44 | PC19 |
|
||||||
|
* 45 | PC18 |
|
||||||
|
* 46 | PC17 |
|
||||||
|
* 47 | PC16 |
|
||||||
|
* 48 | PC15 |
|
||||||
|
* 49 | PC14 |
|
||||||
|
* 50 | PC13 |
|
||||||
|
* 51 | PC12 |
|
||||||
|
* 52 NPCS2 | PB21 |
|
||||||
|
* 53 | PB14 |
|
||||||
|
* 54 | PA16 | "A0"
|
||||||
|
* 55 | PA24 | "A1"
|
||||||
|
* 56 | PA23 | "A2"
|
||||||
|
* 57 | PA22 | "A3"
|
||||||
|
* 58 TIOB2 | PA6 | "A4"
|
||||||
|
* 69 | PA4 | "A5"
|
||||||
|
* 60 TIOB1 | PA3 | "A6"
|
||||||
|
* 61 TIOA1 | PA2 | "A7"
|
||||||
|
* 62 | PB17 | "A8"
|
||||||
|
* 63 | PB18 | "A9"
|
||||||
|
* 64 | PB19 | "A10"
|
||||||
|
* 65 | PB20 | "A11"
|
||||||
|
* 66 | PB15 | "DAC0"
|
||||||
|
* 67 | PB16 | "DAC1"
|
||||||
|
* 68 | PA1 | "CANRX"
|
||||||
|
* 69 | PA0 | "CANTX"
|
||||||
|
* 70 | PA17 | "SDA1"
|
||||||
|
* 71 | PA18 | "SCL1"
|
||||||
|
* 72 | PC30 | LED AMBER "RX"
|
||||||
|
* 73 | PA21 | LED AMBER "TX"
|
||||||
|
* 74 MISO | PA25 |
|
||||||
|
* 75 MOSI | PA26 |
|
||||||
|
* 76 SCLK | PA27 |
|
||||||
|
* 77 NPCS0 | PA28 |
|
||||||
|
* 78 NPCS3 | PB23 | unconnected!
|
||||||
|
*
|
||||||
|
* USB pin | PORT
|
||||||
|
* ----------------+--------
|
||||||
|
* ID | PB11
|
||||||
|
* VBOF | PB10
|
||||||
|
*/
|
||||||
64
Marlin/src/HAL/DUE/spi_pins.h
Normal file
64
Marlin/src/HAL/DUE/spi_pins.h
Normal file
|
|
@ -0,0 +1,64 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define SPI Pins: SCK, MISO, MOSI, SS
|
||||||
|
*
|
||||||
|
* Available chip select pins for HW SPI are 4 10 52 77
|
||||||
|
*/
|
||||||
|
#if SDSS == 4 || SDSS == 10 || SDSS == 52 || SDSS == 77 || SDSS == 87
|
||||||
|
#if SDSS == 4
|
||||||
|
#define SPI_PIN 87
|
||||||
|
#define SPI_CHAN 1
|
||||||
|
#elif SDSS == 10
|
||||||
|
#define SPI_PIN 77
|
||||||
|
#define SPI_CHAN 0
|
||||||
|
#elif SDSS == 52
|
||||||
|
#define SPI_PIN 86
|
||||||
|
#define SPI_CHAN 2
|
||||||
|
#elif SDSS == 77
|
||||||
|
#define SPI_PIN 77
|
||||||
|
#define SPI_CHAN 0
|
||||||
|
#else
|
||||||
|
#define SPI_PIN 87
|
||||||
|
#define SPI_CHAN 1
|
||||||
|
#endif
|
||||||
|
#define SCK_PIN 76
|
||||||
|
#define MISO_PIN 74
|
||||||
|
#define MOSI_PIN 75
|
||||||
|
#else
|
||||||
|
// defaults
|
||||||
|
#define DUE_SOFTWARE_SPI
|
||||||
|
#ifndef SCK_PIN
|
||||||
|
#define SCK_PIN 52
|
||||||
|
#endif
|
||||||
|
#ifndef MISO_PIN
|
||||||
|
#define MISO_PIN 50
|
||||||
|
#endif
|
||||||
|
#ifndef MOSI_PIN
|
||||||
|
#define MOSI_PIN 51
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* A.28, A.29, B.21, C.26, C.29 */
|
||||||
|
#define SS_PIN SDSS
|
||||||
132
Marlin/src/HAL/DUE/timers.cpp
Normal file
132
Marlin/src/HAL/DUE/timers.cpp
Normal file
|
|
@ -0,0 +1,132 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
*
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
|
||||||
|
* Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* HAL Timers for Arduino Due and compatible (SAM3X8E)
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef ARDUINO_ARCH_SAM
|
||||||
|
|
||||||
|
// ------------------------
|
||||||
|
// Includes
|
||||||
|
// ------------------------
|
||||||
|
#include "../../inc/MarlinConfig.h"
|
||||||
|
#include "HAL.h"
|
||||||
|
|
||||||
|
// ------------------------
|
||||||
|
// Local defines
|
||||||
|
// ------------------------
|
||||||
|
|
||||||
|
#define NUM_HARDWARE_TIMERS 9
|
||||||
|
|
||||||
|
// ------------------------
|
||||||
|
// Private Variables
|
||||||
|
// ------------------------
|
||||||
|
|
||||||
|
const tTimerConfig TimerConfig [NUM_HARDWARE_TIMERS] = {
|
||||||
|
{ TC0, 0, TC0_IRQn, 3}, // 0 - [servo timer5]
|
||||||
|
{ TC0, 1, TC1_IRQn, 0}, // 1
|
||||||
|
{ TC0, 2, TC2_IRQn, 2}, // 2 - stepper
|
||||||
|
{ TC1, 0, TC3_IRQn, 0}, // 3 - stepper for BOARD_ARCHIM1
|
||||||
|
{ TC1, 1, TC4_IRQn, 15}, // 4 - temperature
|
||||||
|
{ TC1, 2, TC5_IRQn, 3}, // 5 - [servo timer3]
|
||||||
|
{ TC2, 0, TC6_IRQn, 14}, // 6 - tone
|
||||||
|
{ TC2, 1, TC7_IRQn, 0}, // 7
|
||||||
|
{ TC2, 2, TC8_IRQn, 0}, // 8
|
||||||
|
};
|
||||||
|
|
||||||
|
// ------------------------
|
||||||
|
// Public functions
|
||||||
|
// ------------------------
|
||||||
|
|
||||||
|
/*
|
||||||
|
Timer_clock1: Prescaler 2 -> 42MHz
|
||||||
|
Timer_clock2: Prescaler 8 -> 10.5MHz
|
||||||
|
Timer_clock3: Prescaler 32 -> 2.625MHz
|
||||||
|
Timer_clock4: Prescaler 128 -> 656.25kHz
|
||||||
|
*/
|
||||||
|
|
||||||
|
void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
|
||||||
|
Tc *tc = TimerConfig[timer_num].pTimerRegs;
|
||||||
|
IRQn_Type irq = TimerConfig[timer_num].IRQ_Id;
|
||||||
|
uint32_t channel = TimerConfig[timer_num].channel;
|
||||||
|
|
||||||
|
// Disable interrupt, just in case it was already enabled
|
||||||
|
NVIC_DisableIRQ(irq);
|
||||||
|
|
||||||
|
// We NEED memory barriers to ensure Interrupts are actually disabled!
|
||||||
|
// ( https://dzone.com/articles/nvic-disabling-interrupts-on-arm-cortex-m-and-the )
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
|
||||||
|
// Disable timer interrupt
|
||||||
|
tc->TC_CHANNEL[channel].TC_IDR = TC_IDR_CPCS;
|
||||||
|
|
||||||
|
// Stop timer, just in case, to be able to reconfigure it
|
||||||
|
TC_Stop(tc, channel);
|
||||||
|
|
||||||
|
pmc_set_writeprotect(false);
|
||||||
|
pmc_enable_periph_clk((uint32_t)irq);
|
||||||
|
NVIC_SetPriority(irq, TimerConfig [timer_num].priority);
|
||||||
|
|
||||||
|
// wave mode, reset counter on match with RC,
|
||||||
|
TC_Configure(tc, channel, TC_CMR_WAVE | TC_CMR_WAVSEL_UP_RC | TC_CMR_TCCLKS_TIMER_CLOCK1);
|
||||||
|
|
||||||
|
// Set compare value
|
||||||
|
TC_SetRC(tc, channel, VARIANT_MCK / 2 / frequency);
|
||||||
|
|
||||||
|
// And start timer
|
||||||
|
TC_Start(tc, channel);
|
||||||
|
|
||||||
|
// enable interrupt on RC compare
|
||||||
|
tc->TC_CHANNEL[channel].TC_IER = TC_IER_CPCS;
|
||||||
|
|
||||||
|
// Finally, enable IRQ
|
||||||
|
NVIC_EnableIRQ(irq);
|
||||||
|
}
|
||||||
|
|
||||||
|
void HAL_timer_enable_interrupt(const uint8_t timer_num) {
|
||||||
|
IRQn_Type irq = TimerConfig[timer_num].IRQ_Id;
|
||||||
|
NVIC_EnableIRQ(irq);
|
||||||
|
}
|
||||||
|
|
||||||
|
void HAL_timer_disable_interrupt(const uint8_t timer_num) {
|
||||||
|
IRQn_Type irq = TimerConfig[timer_num].IRQ_Id;
|
||||||
|
NVIC_DisableIRQ(irq);
|
||||||
|
|
||||||
|
// We NEED memory barriers to ensure Interrupts are actually disabled!
|
||||||
|
// ( https://dzone.com/articles/nvic-disabling-interrupts-on-arm-cortex-m-and-the )
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
}
|
||||||
|
|
||||||
|
// missing from CMSIS: Check if interrupt is enabled or not
|
||||||
|
static bool NVIC_GetEnabledIRQ(IRQn_Type IRQn) {
|
||||||
|
return (NVIC->ISER[(uint32_t)(IRQn) >> 5] & (1 << ((uint32_t)(IRQn) & 0x1F))) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool HAL_timer_interrupt_enabled(const uint8_t timer_num) {
|
||||||
|
IRQn_Type irq = TimerConfig[timer_num].IRQ_Id;
|
||||||
|
return NVIC_GetEnabledIRQ(irq);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // ARDUINO_ARCH_SAM
|
||||||
128
Marlin/src/HAL/DUE/timers.h
Normal file
128
Marlin/src/HAL/DUE/timers.h
Normal file
|
|
@ -0,0 +1,128 @@
|
||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
*
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
/**
|
||||||
|
* HAL Timers for Arduino Due and compatible (SAM3X8E)
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
// ------------------------
|
||||||
|
// Defines
|
||||||
|
// ------------------------
|
||||||
|
|
||||||
|
#define FORCE_INLINE __attribute__((always_inline)) inline
|
||||||
|
|
||||||
|
typedef uint32_t hal_timer_t;
|
||||||
|
#define HAL_TIMER_TYPE_MAX 0xFFFFFFFF
|
||||||
|
|
||||||
|
#define HAL_TIMER_RATE ((F_CPU) / 2) // frequency of timers peripherals
|
||||||
|
|
||||||
|
#ifndef STEP_TIMER_NUM
|
||||||
|
#define STEP_TIMER_NUM 2 // Timer Index for Stepper
|
||||||
|
#endif
|
||||||
|
#ifndef PULSE_TIMER_NUM
|
||||||
|
#define PULSE_TIMER_NUM STEP_TIMER_NUM
|
||||||
|
#endif
|
||||||
|
#ifndef TEMP_TIMER_NUM
|
||||||
|
#define TEMP_TIMER_NUM 4 // Timer Index for Temperature
|
||||||
|
#endif
|
||||||
|
#ifndef TONE_TIMER_NUM
|
||||||
|
#define TONE_TIMER_NUM 6 // index of timer to use for beeper tones
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define TEMP_TIMER_FREQUENCY 1000 // temperature interrupt frequency
|
||||||
|
|
||||||
|
#define STEPPER_TIMER_RATE HAL_TIMER_RATE // frequency of stepper timer (HAL_TIMER_RATE / STEPPER_TIMER_PRESCALE)
|
||||||
|
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) // stepper timer ticks per µs
|
||||||
|
#define STEPPER_TIMER_PRESCALE (CYCLES_PER_MICROSECOND / STEPPER_TIMER_TICKS_PER_US)
|
||||||
|
|
||||||
|
#define PULSE_TIMER_RATE STEPPER_TIMER_RATE // frequency of pulse timer
|
||||||
|
#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
|
||||||
|
#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
|
||||||
|
|
||||||
|
#define ENABLE_STEPPER_DRIVER_INTERRUPT() HAL_timer_enable_interrupt(STEP_TIMER_NUM)
|
||||||
|
#define DISABLE_STEPPER_DRIVER_INTERRUPT() HAL_timer_disable_interrupt(STEP_TIMER_NUM)
|
||||||
|
#define STEPPER_ISR_ENABLED() HAL_timer_interrupt_enabled(STEP_TIMER_NUM)
|
||||||
|
|
||||||
|
#define ENABLE_TEMPERATURE_INTERRUPT() HAL_timer_enable_interrupt(TEMP_TIMER_NUM)
|
||||||
|
#define DISABLE_TEMPERATURE_INTERRUPT() HAL_timer_disable_interrupt(TEMP_TIMER_NUM)
|
||||||
|
|
||||||
|
#ifndef HAL_STEP_TIMER_ISR
|
||||||
|
#define HAL_STEP_TIMER_ISR() void TC2_Handler()
|
||||||
|
#endif
|
||||||
|
#ifndef HAL_TEMP_TIMER_ISR
|
||||||
|
#define HAL_TEMP_TIMER_ISR() void TC4_Handler()
|
||||||
|
#endif
|
||||||
|
#ifndef HAL_TONE_TIMER_ISR
|
||||||
|
#define HAL_TONE_TIMER_ISR() void TC6_Handler()
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ------------------------
|
||||||
|
// Types
|
||||||
|
// ------------------------
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
Tc *pTimerRegs;
|
||||||
|
uint16_t channel;
|
||||||
|
IRQn_Type IRQ_Id;
|
||||||
|
uint8_t priority;
|
||||||
|
} tTimerConfig;
|
||||||
|
|
||||||
|
// ------------------------
|
||||||
|
// Public Variables
|
||||||
|
// ------------------------
|
||||||
|
|
||||||
|
extern const tTimerConfig TimerConfig[];
|
||||||
|
|
||||||
|
// ------------------------
|
||||||
|
// Public functions
|
||||||
|
// ------------------------
|
||||||
|
|
||||||
|
void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency);
|
||||||
|
|
||||||
|
FORCE_INLINE static void HAL_timer_set_compare(const uint8_t timer_num, const hal_timer_t compare) {
|
||||||
|
const tTimerConfig * const pConfig = &TimerConfig[timer_num];
|
||||||
|
pConfig->pTimerRegs->TC_CHANNEL[pConfig->channel].TC_RC = compare;
|
||||||
|
}
|
||||||
|
|
||||||
|
FORCE_INLINE static hal_timer_t HAL_timer_get_compare(const uint8_t timer_num) {
|
||||||
|
const tTimerConfig * const pConfig = &TimerConfig[timer_num];
|
||||||
|
return pConfig->pTimerRegs->TC_CHANNEL[pConfig->channel].TC_RC;
|
||||||
|
}
|
||||||
|
|
||||||
|
FORCE_INLINE static hal_timer_t HAL_timer_get_count(const uint8_t timer_num) {
|
||||||
|
const tTimerConfig * const pConfig = &TimerConfig[timer_num];
|
||||||
|
return pConfig->pTimerRegs->TC_CHANNEL[pConfig->channel].TC_CV;
|
||||||
|
}
|
||||||
|
|
||||||
|
void HAL_timer_enable_interrupt(const uint8_t timer_num);
|
||||||
|
void HAL_timer_disable_interrupt(const uint8_t timer_num);
|
||||||
|
bool HAL_timer_interrupt_enabled(const uint8_t timer_num);
|
||||||
|
|
||||||
|
FORCE_INLINE static void HAL_timer_isr_prologue(const uint8_t timer_num) {
|
||||||
|
const tTimerConfig * const pConfig = &TimerConfig[timer_num];
|
||||||
|
// Reading the status register clears the interrupt flag
|
||||||
|
pConfig->pTimerRegs->TC_CHANNEL[pConfig->channel].TC_SR;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define HAL_timer_isr_epilogue(TIMER_NUM)
|
||||||
18
Marlin/src/HAL/DUE/upload_extra_script.py
Normal file
18
Marlin/src/HAL/DUE/upload_extra_script.py
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
#
|
||||||
|
# Set upload_command
|
||||||
|
#
|
||||||
|
# Windows: bossac.exe
|
||||||
|
# Other: leave unchanged
|
||||||
|
#
|
||||||
|
|
||||||
|
import platform
|
||||||
|
current_OS = platform.system()
|
||||||
|
|
||||||
|
if current_OS == 'Windows':
|
||||||
|
|
||||||
|
Import("env")
|
||||||
|
|
||||||
|
# Use bossac.exe on Windows
|
||||||
|
env.Replace(
|
||||||
|
UPLOADCMD="bossac --info --unlock --write --verify --reset --erase -U false --boot $SOURCE"
|
||||||
|
)
|
||||||
|
|
@ -40,15 +40,12 @@
|
||||||
* \asf_license_stop
|
* \asf_license_stop
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/*
|
#pragma once
|
||||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
|
||||||
|
/**
|
||||||
|
* Support and FAQ: visit <a href="https://www.atmel.com/design-support/">Atmel Support</a>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef ARDUINO_DUE_X_H_INCLUDED
|
|
||||||
#define ARDUINO_DUE_X_H_INCLUDED
|
|
||||||
|
|
||||||
/* ------------------------------------------------------------------------ */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \page arduino_due_x_opfreq "Arduino Due/X - Operating frequencies"
|
* \page arduino_due_x_opfreq "Arduino Due/X - Operating frequencies"
|
||||||
* This page lists several definition related to the board operating frequency
|
* This page lists several definition related to the board operating frequency
|
||||||
|
|
@ -96,8 +93,5 @@
|
||||||
#define USB_VBOF_GPIO (PIO_PB10_IDX)
|
#define USB_VBOF_GPIO (PIO_PB10_IDX)
|
||||||
#define USB_VBOF_FLAGS (PIO_PERIPH_A | PIO_DEFAULT)
|
#define USB_VBOF_FLAGS (PIO_PERIPH_A | PIO_DEFAULT)
|
||||||
/*! Active level of the USB_VBOF output pin. */
|
/*! Active level of the USB_VBOF output pin. */
|
||||||
#define USB_VBOF_ACTIVE_LEVEL LOW
|
#define USB_VBOF_ACTIVE_STATE LOW
|
||||||
/* ------------------------------------------------------------------------ */
|
/* ------------------------------------------------------------------------ */
|
||||||
|
|
||||||
|
|
||||||
#endif /* ARDUINO_DUE_X_H_INCLUDED */
|
|
||||||
|
|
@ -41,7 +41,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
* Support and FAQ: visit <a href="https://www.atmel.com/design-support/">Atmel Support</a>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef UTILS_COMPILER_H
|
#ifndef UTILS_COMPILER_H
|
||||||
|
|
@ -105,7 +105,7 @@
|
||||||
* \brief Marking \a v as a unused parameter or value.
|
* \brief Marking \a v as a unused parameter or value.
|
||||||
*/
|
*/
|
||||||
#ifndef UNUSED
|
#ifndef UNUSED
|
||||||
#define UNUSED(x) (void) (x)
|
#define UNUSED(x) ((void)(x))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -169,7 +169,7 @@
|
||||||
* heuristics and inline the function no matter how big it thinks it
|
* heuristics and inline the function no matter how big it thinks it
|
||||||
* becomes.
|
* becomes.
|
||||||
*/
|
*/
|
||||||
#if defined(__CC_ARM)
|
#ifdef __CC_ARM
|
||||||
# define __always_inline __forceinline
|
# define __always_inline __forceinline
|
||||||
#elif (defined __GNUC__)
|
#elif (defined __GNUC__)
|
||||||
#ifdef __always_inline
|
#ifdef __always_inline
|
||||||
|
|
@ -187,7 +187,7 @@
|
||||||
* This annotation instructs the compiler to ignore its inlining
|
* This annotation instructs the compiler to ignore its inlining
|
||||||
* heuristics and not inline the function.
|
* heuristics and not inline the function.
|
||||||
*/
|
*/
|
||||||
#if defined(__CC_ARM)
|
#ifdef __CC_ARM
|
||||||
# define __no_inline __attribute__((noinline))
|
# define __no_inline __attribute__((noinline))
|
||||||
#elif (defined __GNUC__)
|
#elif (defined __GNUC__)
|
||||||
# define __no_inline __attribute__((__noinline__))
|
# define __no_inline __attribute__((__noinline__))
|
||||||
|
|
@ -204,7 +204,7 @@
|
||||||
*
|
*
|
||||||
* \param expr Expression to evaluate and supposed to be nonzero.
|
* \param expr Expression to evaluate and supposed to be nonzero.
|
||||||
*/
|
*/
|
||||||
#if defined(_ASSERT_ENABLE_)
|
#ifdef _ASSERT_ENABLE_
|
||||||
# if defined(TEST_SUITE_DEFINE_ASSERT_MACRO)
|
# if defined(TEST_SUITE_DEFINE_ASSERT_MACRO)
|
||||||
// Assert() is defined in unit_test/suite.h
|
// Assert() is defined in unit_test/suite.h
|
||||||
# include "unit_test/suite.h"
|
# include "unit_test/suite.h"
|
||||||
|
|
@ -230,7 +230,7 @@
|
||||||
|
|
||||||
/* Define NO_INIT attribute */
|
/* Define NO_INIT attribute */
|
||||||
#if 0 //ndef NO_INIT
|
#if 0 //ndef NO_INIT
|
||||||
#if defined ( __CC_ARM )
|
#ifdef __CC_ARM
|
||||||
# define NO_INIT __attribute__((zero_init))
|
# define NO_INIT __attribute__((zero_init))
|
||||||
#elif defined ( __ICCARM__ )
|
#elif defined ( __ICCARM__ )
|
||||||
# define NO_INIT __no_init
|
# define NO_INIT __no_init
|
||||||
|
|
@ -262,7 +262,7 @@
|
||||||
//! @{
|
//! @{
|
||||||
typedef unsigned char Bool; //!< Boolean.
|
typedef unsigned char Bool; //!< Boolean.
|
||||||
#ifndef __cplusplus
|
#ifndef __cplusplus
|
||||||
#if !defined(__bool_true_false_are_defined)
|
#ifndef __bool_true_false_are_defined
|
||||||
typedef unsigned char bool; //!< Boolean.
|
typedef unsigned char bool; //!< Boolean.
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -443,9 +443,9 @@ typedef struct
|
||||||
#define DISABLE 0
|
#define DISABLE 0
|
||||||
#define ENABLE 1
|
#define ENABLE 1
|
||||||
#ifndef __cplusplus
|
#ifndef __cplusplus
|
||||||
#if !defined(__bool_true_false_are_defined)
|
#ifndef __bool_true_false_are_defined
|
||||||
#define false 0
|
#define false (1==0)
|
||||||
#define true 1
|
#define true (1==1)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#ifndef PASS
|
#ifndef PASS
|
||||||
|
|
@ -609,37 +609,37 @@ typedef struct
|
||||||
# define clz(u) ((u) ? __CLZ(u) : 32)
|
# define clz(u) ((u) ? __CLZ(u) : 32)
|
||||||
#else
|
#else
|
||||||
# define clz(u) (((u) == 0) ? 32 : \
|
# define clz(u) (((u) == 0) ? 32 : \
|
||||||
((u) & (1ul << 31)) ? 0 : \
|
((u) & (1UL << 31)) ? 0 : \
|
||||||
((u) & (1ul << 30)) ? 1 : \
|
((u) & (1UL << 30)) ? 1 : \
|
||||||
((u) & (1ul << 29)) ? 2 : \
|
((u) & (1UL << 29)) ? 2 : \
|
||||||
((u) & (1ul << 28)) ? 3 : \
|
((u) & (1UL << 28)) ? 3 : \
|
||||||
((u) & (1ul << 27)) ? 4 : \
|
((u) & (1UL << 27)) ? 4 : \
|
||||||
((u) & (1ul << 26)) ? 5 : \
|
((u) & (1UL << 26)) ? 5 : \
|
||||||
((u) & (1ul << 25)) ? 6 : \
|
((u) & (1UL << 25)) ? 6 : \
|
||||||
((u) & (1ul << 24)) ? 7 : \
|
((u) & (1UL << 24)) ? 7 : \
|
||||||
((u) & (1ul << 23)) ? 8 : \
|
((u) & (1UL << 23)) ? 8 : \
|
||||||
((u) & (1ul << 22)) ? 9 : \
|
((u) & (1UL << 22)) ? 9 : \
|
||||||
((u) & (1ul << 21)) ? 10 : \
|
((u) & (1UL << 21)) ? 10 : \
|
||||||
((u) & (1ul << 20)) ? 11 : \
|
((u) & (1UL << 20)) ? 11 : \
|
||||||
((u) & (1ul << 19)) ? 12 : \
|
((u) & (1UL << 19)) ? 12 : \
|
||||||
((u) & (1ul << 18)) ? 13 : \
|
((u) & (1UL << 18)) ? 13 : \
|
||||||
((u) & (1ul << 17)) ? 14 : \
|
((u) & (1UL << 17)) ? 14 : \
|
||||||
((u) & (1ul << 16)) ? 15 : \
|
((u) & (1UL << 16)) ? 15 : \
|
||||||
((u) & (1ul << 15)) ? 16 : \
|
((u) & (1UL << 15)) ? 16 : \
|
||||||
((u) & (1ul << 14)) ? 17 : \
|
((u) & (1UL << 14)) ? 17 : \
|
||||||
((u) & (1ul << 13)) ? 18 : \
|
((u) & (1UL << 13)) ? 18 : \
|
||||||
((u) & (1ul << 12)) ? 19 : \
|
((u) & (1UL << 12)) ? 19 : \
|
||||||
((u) & (1ul << 11)) ? 20 : \
|
((u) & (1UL << 11)) ? 20 : \
|
||||||
((u) & (1ul << 10)) ? 21 : \
|
((u) & (1UL << 10)) ? 21 : \
|
||||||
((u) & (1ul << 9)) ? 22 : \
|
((u) & (1UL << 9)) ? 22 : \
|
||||||
((u) & (1ul << 8)) ? 23 : \
|
((u) & (1UL << 8)) ? 23 : \
|
||||||
((u) & (1ul << 7)) ? 24 : \
|
((u) & (1UL << 7)) ? 24 : \
|
||||||
((u) & (1ul << 6)) ? 25 : \
|
((u) & (1UL << 6)) ? 25 : \
|
||||||
((u) & (1ul << 5)) ? 26 : \
|
((u) & (1UL << 5)) ? 26 : \
|
||||||
((u) & (1ul << 4)) ? 27 : \
|
((u) & (1UL << 4)) ? 27 : \
|
||||||
((u) & (1ul << 3)) ? 28 : \
|
((u) & (1UL << 3)) ? 28 : \
|
||||||
((u) & (1ul << 2)) ? 29 : \
|
((u) & (1UL << 2)) ? 29 : \
|
||||||
((u) & (1ul << 1)) ? 30 : \
|
((u) & (1UL << 1)) ? 30 : \
|
||||||
31)
|
31)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -654,38 +654,38 @@ typedef struct
|
||||||
#if (defined __GNUC__) || (defined __CC_ARM)
|
#if (defined __GNUC__) || (defined __CC_ARM)
|
||||||
# define ctz(u) ((u) ? __builtin_ctz(u) : 32)
|
# define ctz(u) ((u) ? __builtin_ctz(u) : 32)
|
||||||
#else
|
#else
|
||||||
# define ctz(u) ((u) & (1ul << 0) ? 0 : \
|
# define ctz(u) ((u) & (1UL << 0) ? 0 : \
|
||||||
(u) & (1ul << 1) ? 1 : \
|
(u) & (1UL << 1) ? 1 : \
|
||||||
(u) & (1ul << 2) ? 2 : \
|
(u) & (1UL << 2) ? 2 : \
|
||||||
(u) & (1ul << 3) ? 3 : \
|
(u) & (1UL << 3) ? 3 : \
|
||||||
(u) & (1ul << 4) ? 4 : \
|
(u) & (1UL << 4) ? 4 : \
|
||||||
(u) & (1ul << 5) ? 5 : \
|
(u) & (1UL << 5) ? 5 : \
|
||||||
(u) & (1ul << 6) ? 6 : \
|
(u) & (1UL << 6) ? 6 : \
|
||||||
(u) & (1ul << 7) ? 7 : \
|
(u) & (1UL << 7) ? 7 : \
|
||||||
(u) & (1ul << 8) ? 8 : \
|
(u) & (1UL << 8) ? 8 : \
|
||||||
(u) & (1ul << 9) ? 9 : \
|
(u) & (1UL << 9) ? 9 : \
|
||||||
(u) & (1ul << 10) ? 10 : \
|
(u) & (1UL << 10) ? 10 : \
|
||||||
(u) & (1ul << 11) ? 11 : \
|
(u) & (1UL << 11) ? 11 : \
|
||||||
(u) & (1ul << 12) ? 12 : \
|
(u) & (1UL << 12) ? 12 : \
|
||||||
(u) & (1ul << 13) ? 13 : \
|
(u) & (1UL << 13) ? 13 : \
|
||||||
(u) & (1ul << 14) ? 14 : \
|
(u) & (1UL << 14) ? 14 : \
|
||||||
(u) & (1ul << 15) ? 15 : \
|
(u) & (1UL << 15) ? 15 : \
|
||||||
(u) & (1ul << 16) ? 16 : \
|
(u) & (1UL << 16) ? 16 : \
|
||||||
(u) & (1ul << 17) ? 17 : \
|
(u) & (1UL << 17) ? 17 : \
|
||||||
(u) & (1ul << 18) ? 18 : \
|
(u) & (1UL << 18) ? 18 : \
|
||||||
(u) & (1ul << 19) ? 19 : \
|
(u) & (1UL << 19) ? 19 : \
|
||||||
(u) & (1ul << 20) ? 20 : \
|
(u) & (1UL << 20) ? 20 : \
|
||||||
(u) & (1ul << 21) ? 21 : \
|
(u) & (1UL << 21) ? 21 : \
|
||||||
(u) & (1ul << 22) ? 22 : \
|
(u) & (1UL << 22) ? 22 : \
|
||||||
(u) & (1ul << 23) ? 23 : \
|
(u) & (1UL << 23) ? 23 : \
|
||||||
(u) & (1ul << 24) ? 24 : \
|
(u) & (1UL << 24) ? 24 : \
|
||||||
(u) & (1ul << 25) ? 25 : \
|
(u) & (1UL << 25) ? 25 : \
|
||||||
(u) & (1ul << 26) ? 26 : \
|
(u) & (1UL << 26) ? 26 : \
|
||||||
(u) & (1ul << 27) ? 27 : \
|
(u) & (1UL << 27) ? 27 : \
|
||||||
(u) & (1ul << 28) ? 28 : \
|
(u) & (1UL << 28) ? 28 : \
|
||||||
(u) & (1ul << 29) ? 29 : \
|
(u) & (1UL << 29) ? 29 : \
|
||||||
(u) & (1ul << 30) ? 30 : \
|
(u) & (1UL << 30) ? 30 : \
|
||||||
(u) & (1ul << 31) ? 31 : \
|
(u) & (1UL << 31) ? 31 : \
|
||||||
32)
|
32)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -998,14 +998,14 @@ typedef U8 Byte; //!< 8-bit unsigned integer.
|
||||||
#endif // #ifndef __ASSEMBLY__
|
#endif // #ifndef __ASSEMBLY__
|
||||||
|
|
||||||
|
|
||||||
#if defined(__ICCARM__)
|
#ifdef __ICCARM__
|
||||||
#define SHORTENUM __packed
|
#define SHORTENUM __packed
|
||||||
#elif defined(__GNUC__)
|
#elif defined(__GNUC__)
|
||||||
#define SHORTENUM __attribute__((packed))
|
#define SHORTENUM __attribute__((packed))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* No operation */
|
/* No operation */
|
||||||
#if defined(__ICCARM__)
|
#ifdef __ICCARM__
|
||||||
#define nop() __no_operation()
|
#define nop() __no_operation()
|
||||||
#elif defined(__GNUC__)
|
#elif defined(__GNUC__)
|
||||||
#define nop() (__NOP())
|
#define nop() (__NOP())
|
||||||
|
|
@ -1112,8 +1112,7 @@ static inline uint32_t convert_byte_array_to_32_bit(uint8_t *data)
|
||||||
uint8_t u8[8];
|
uint8_t u8[8];
|
||||||
}long_addr;
|
}long_addr;
|
||||||
uint8_t index;
|
uint8_t index;
|
||||||
for (index = 0; index < 4; index++)
|
for (index = 0; index < 4; index++) {
|
||||||
{
|
|
||||||
long_addr.u8[index] = *data++;
|
long_addr.u8[index] = *data++;
|
||||||
}
|
}
|
||||||
return long_addr.u32;
|
return long_addr.u32;
|
||||||
|
|
@ -41,7 +41,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
* Support and FAQ: visit <a href="https://www.atmel.com/design-support/">Atmel Support</a>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _CONF_ACCESS_H_
|
#ifndef _CONF_ACCESS_H_
|
||||||
|
|
@ -41,7 +41,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
* Support and FAQ: visit <a href="https://www.atmel.com/design-support/">Atmel Support</a>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CONF_CLOCK_H_INCLUDED
|
#ifndef CONF_CLOCK_H_INCLUDED
|
||||||
|
|
@ -41,26 +41,22 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
* Support and FAQ: visit <a href="https://www.atmel.com/design-support/">Atmel Support</a>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _CONF_USB_H_
|
#ifndef _CONF_USB_H_
|
||||||
#define _CONF_USB_H_
|
#define _CONF_USB_H_
|
||||||
|
|
||||||
#undef UNUSED /* To avoid a macro clash as macros.h already defines it */
|
#undef UNUSED /* To avoid a macro clash as macros.h already defines it */
|
||||||
#include "../../../core/macros.h" /* For ENABLED()/DISABLED() */
|
#include "../../../inc/MarlinConfigPre.h"
|
||||||
#include "../../../../Configuration.h" /* For CUSTOM_MACHINE_NAME definition - We just need the name, no C++ allowed! */
|
|
||||||
#include "compiler.h"
|
#include "compiler.h"
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* USB Device Configuration
|
* USB Device Configuration
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//! Device definition (mandatory)
|
//! Device definition (mandatory)
|
||||||
#define USB_DEVICE_VENDOR_ID 0x03EB /* ATMEL VID */
|
|
||||||
#define USB_DEVICE_PRODUCT_ID 0x2424 /* MSC / CDC */
|
|
||||||
#define USB_DEVICE_MAJOR_VERSION 1
|
#define USB_DEVICE_MAJOR_VERSION 1
|
||||||
#define USB_DEVICE_MINOR_VERSION 0
|
#define USB_DEVICE_MINOR_VERSION 0
|
||||||
#define USB_DEVICE_POWER 100 // Consumption on Vbus line (mA)
|
#define USB_DEVICE_POWER 100 // Consumption on Vbus line (mA)
|
||||||
|
|
@ -70,15 +66,6 @@
|
||||||
// (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_SELF_POWERED)
|
// (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_SELF_POWERED)
|
||||||
// (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_BUS_POWERED)
|
// (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_BUS_POWERED)
|
||||||
|
|
||||||
//! USB Device string definitions (Optional)
|
|
||||||
#define USB_DEVICE_MANUFACTURE_NAME "marlinfw.org"
|
|
||||||
#ifdef CUSTOM_MACHINE_NAME
|
|
||||||
#define USB_DEVICE_PRODUCT_NAME CUSTOM_MACHINE_NAME
|
|
||||||
#else
|
|
||||||
#define USB_DEVICE_PRODUCT_NAME "3D Printer"
|
|
||||||
#endif
|
|
||||||
#define USB_DEVICE_SERIAL_NAME "123985739853"
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Device speeds support
|
* Device speeds support
|
||||||
* Low speed not supported by CDC and MSC
|
* Low speed not supported by CDC and MSC
|
||||||
|
|
@ -53,7 +53,7 @@
|
||||||
*
|
*
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
/*
|
/*
|
||||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
* Support and FAQ: visit <a href="https://www.atmel.com/design-support/">Atmel Support</a>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef ARDUINO_ARCH_SAM
|
#ifdef ARDUINO_ARCH_SAM
|
||||||
|
|
@ -53,7 +53,7 @@
|
||||||
*
|
*
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
/*
|
/*
|
||||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
* Support and FAQ: visit <a href="https://www.atmel.com/design-support/">Atmel Support</a>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -41,7 +41,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
* Support and FAQ: visit <a href="https://www.atmel.com/design-support/">Atmel Support</a>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CHIP_GENCLK_H_INCLUDED
|
#ifndef CHIP_GENCLK_H_INCLUDED
|
||||||
|
|
@ -41,7 +41,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
* Support and FAQ: visit <a href="https://www.atmel.com/design-support/">Atmel Support</a>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _MREPEAT_H_
|
#ifndef _MREPEAT_H_
|
||||||
|
|
@ -41,7 +41,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
* Support and FAQ: visit <a href="https://www.atmel.com/design-support/">Atmel Support</a>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CHIP_OSC_H_INCLUDED
|
#ifndef CHIP_OSC_H_INCLUDED
|
||||||
|
|
@ -61,27 +61,27 @@ extern "C" {
|
||||||
* Below BOARD_XXX macros are related to the specific board, and
|
* Below BOARD_XXX macros are related to the specific board, and
|
||||||
* should be defined by the board code, otherwise default value are used.
|
* should be defined by the board code, otherwise default value are used.
|
||||||
*/
|
*/
|
||||||
#if !defined(BOARD_FREQ_SLCK_XTAL)
|
#ifndef BOARD_FREQ_SLCK_XTAL
|
||||||
# warning The board slow clock xtal frequency has not been defined.
|
# warning The board slow clock xtal frequency has not been defined.
|
||||||
# define BOARD_FREQ_SLCK_XTAL (32768UL)
|
# define BOARD_FREQ_SLCK_XTAL (32768UL)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(BOARD_FREQ_SLCK_BYPASS)
|
#ifndef BOARD_FREQ_SLCK_BYPASS
|
||||||
# warning The board slow clock bypass frequency has not been defined.
|
# warning The board slow clock bypass frequency has not been defined.
|
||||||
# define BOARD_FREQ_SLCK_BYPASS (32768UL)
|
# define BOARD_FREQ_SLCK_BYPASS (32768UL)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(BOARD_FREQ_MAINCK_XTAL)
|
#ifndef BOARD_FREQ_MAINCK_XTAL
|
||||||
# warning The board main clock xtal frequency has not been defined.
|
# warning The board main clock xtal frequency has not been defined.
|
||||||
# define BOARD_FREQ_MAINCK_XTAL (12000000UL)
|
# define BOARD_FREQ_MAINCK_XTAL (12000000UL)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(BOARD_FREQ_MAINCK_BYPASS)
|
#ifndef BOARD_FREQ_MAINCK_BYPASS
|
||||||
# warning The board main clock bypass frequency has not been defined.
|
# warning The board main clock bypass frequency has not been defined.
|
||||||
# define BOARD_FREQ_MAINCK_BYPASS (12000000UL)
|
# define BOARD_FREQ_MAINCK_BYPASS (12000000UL)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(BOARD_OSC_STARTUP_US)
|
#ifndef BOARD_OSC_STARTUP_US
|
||||||
# warning The board main clock xtal startup time has not been defined.
|
# warning The board main clock xtal startup time has not been defined.
|
||||||
# define BOARD_OSC_STARTUP_US (15625UL)
|
# define BOARD_OSC_STARTUP_US (15625UL)
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -41,7 +41,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
* Support and FAQ: visit <a href="https://www.atmel.com/design-support/">Atmel Support</a>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CHIP_PLL_H_INCLUDED
|
#ifndef CHIP_PLL_H_INCLUDED
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue