Compare commits
	
		
			1375 Commits
		
	
	
		
			2.0.5.3_Me
			...
			f7eac586fb
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| f7eac586fb | |||
| 
						 | 
					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 | ||
| 09beed85c2 | |||
| 4f755578b1 | |||
| 
						 | 
					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 | 
							
								
								
									
										2
									
								
								.github/FUNDING.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/FUNDING.yml
									
									
									
									
										vendored
									
									
								
							@@ -1,3 +1,3 @@
 | 
			
		||||
github: [thinkyhead]
 | 
			
		||||
patreon: thinkyhead
 | 
			
		||||
custom: ["http://www.thinkyhead.com/donate-to-marlin"]
 | 
			
		||||
custom: ["https://www.thinkyhead.com/donate-to-marlin"]
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								.github/ISSUE_TEMPLATE/feature_request.md
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/ISSUE_TEMPLATE/feature_request.md
									
									
									
									
										vendored
									
									
								
							@@ -2,7 +2,7 @@
 | 
			
		||||
name: Feature request
 | 
			
		||||
about: Request a Feature
 | 
			
		||||
title: "[FR] (feature request title)"
 | 
			
		||||
labels: ''
 | 
			
		||||
labels: 'T: Feature Request'
 | 
			
		||||
assignees: ''
 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										21
									
								
								.github/contributing.md
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										21
									
								
								.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.
 | 
			
		||||
 | 
			
		||||
* [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/)
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
  * To obtain group access, please [send a request](http://www.thinkyhead.com/contact/9) to @thinkyhead.
 | 
			
		||||
  * 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.
 | 
			
		||||
  * Other channels exist for certain topics. Check the channel list.
 | 
			
		||||
* Use the link https://discord.gg/n5NJ59y to join up as a General User.
 | 
			
		||||
* Even though our Discord is pretty active, it may take a while for community members to respond — please be patient!
 | 
			
		||||
* Use the `#general` channel for general questions or discussion about Marlin.
 | 
			
		||||
* Other channels exist for certain topics or are limited to Patrons. Check the channel list.
 | 
			
		||||
 | 
			
		||||
## 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
 | 
			
		||||
 | 
			
		||||
* **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.
 | 
			
		||||
 | 
			
		||||
#### 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 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).
 | 
			
		||||
* 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.
 | 
			
		||||
* 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.
 | 
			
		||||
* 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
 | 
			
		||||
 | 
			
		||||
* 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
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										17
									
								
								.github/issue_template.md
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										17
									
								
								.github/issue_template.md
									
									
									
									
										vendored
									
									
								
							@@ -1,16 +1,11 @@
 | 
			
		||||
# NO SUPPORT REQUESTS PLEASE
 | 
			
		||||
 | 
			
		||||
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. Support Requests posted here will be automatically closed!
 | 
			
		||||
 | 
			
		||||
This Issue Queue is for Marlin bug reports and development-related issues, and we prefer not to handle user-support questions here. See https://github.com/MarlinFirmware/Marlin/blob/1.1.x/.github/contributing.md#i-dont-want-to-read-this-whole-thing-i-just-have-a-question.
 | 
			
		||||
Instead use one of the following options:
 | 
			
		||||
 | 
			
		||||
For best results getting help with configuration and troubleshooting, please use the following resources:
 | 
			
		||||
- 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.
 | 
			
		||||
 | 
			
		||||
- RepRap.org Marlin Forum http://forums.reprap.org/list.php?415
 | 
			
		||||
- Tom's 3D Forums https://discuss.toms3d.org/
 | 
			
		||||
- Facebook Group "Marlin Firmware" https://www.facebook.com/groups/1049718498464482/
 | 
			
		||||
- Facebook Group "Marlin Firmware for 3D Printers" https://www.facebook.com/groups/3Dtechtalk/
 | 
			
		||||
- Marlin Configuration https://www.youtube.com/results?search_query=marlin+configuration on YouTube
 | 
			
		||||
- Marlin Discord server. Join link: https://discord.gg/n5NJ59y
 | 
			
		||||
 | 
			
		||||
After seeking help from the community, if the consensus points to to a bug in Marlin, then you should post a Bug Report at https://github.com/MarlinFirmware/Marlin/issues/new/choose).
 | 
			
		||||
Before filing an issue be sure to test the latest "bugfix" branch to see whether the issue is already addressed.
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										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? -->
 | 
			
		||||
 | 
			
		||||
### Configurations
 | 
			
		||||
 | 
			
		||||
<!-- Attach any Configuration.h, Configuration_adv.h, or platformio.ini files needed to compile/test your Pull Request. -->
 | 
			
		||||
 | 
			
		||||
### Related Issues
 | 
			
		||||
 | 
			
		||||
<!-- Whether this fixes a bug or fulfills a feature request, please list any related Issues here. -->
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										7
									
								
								.github/workflows/bad-target.md
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										7
									
								
								.github/workflows/bad-target.md
									
									
									
									
										vendored
									
									
								
							@@ -1,7 +0,0 @@
 | 
			
		||||
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.
 | 
			
		||||
							
								
								
									
										3
									
								
								.github/workflows/bump-date.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.github/workflows/bump-date.yml
									
									
									
									
										vendored
									
									
								
							@@ -11,6 +11,8 @@ on:
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  bump_date:
 | 
			
		||||
    name: Bump Distribution Date
 | 
			
		||||
    if: github.repository == 'MarlinFirmware/Marlin'
 | 
			
		||||
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
 | 
			
		||||
@@ -24,7 +26,6 @@ jobs:
 | 
			
		||||
    - name: Bump Distribution Date
 | 
			
		||||
      run: |
 | 
			
		||||
        # Inline Bump Script
 | 
			
		||||
        [[ "$GITHUB_REPOSITORY" == "MarlinFirmware/Marlin" ]] || exit 0
 | 
			
		||||
        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}" && \
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										22
									
								
								.github/workflows/check-pr.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										22
									
								
								.github/workflows/check-pr.yml
									
									
									
									
										vendored
									
									
								
							@@ -1,6 +1,6 @@
 | 
			
		||||
#
 | 
			
		||||
# comment-pr.yml
 | 
			
		||||
# Add a comment to any PR directed to a release branch
 | 
			
		||||
# check-pr.yml
 | 
			
		||||
# Close PRs directed at release branches
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
name: PR Bad Target
 | 
			
		||||
@@ -14,14 +14,20 @@ on:
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  bad_target:
 | 
			
		||||
 | 
			
		||||
    name: PR Bad Target
 | 
			
		||||
    if: github.repository == 'MarlinFirmware/Marlin'
 | 
			
		||||
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v1
 | 
			
		||||
      - uses: harupy/comment-on-pr@master
 | 
			
		||||
        env:
 | 
			
		||||
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
 | 
			
		||||
    - uses: peter-evans/close-pull@v1
 | 
			
		||||
      with:
 | 
			
		||||
          filename: bad-target.md
 | 
			
		||||
        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: ''
 | 
			
		||||
							
								
								
									
										37
									
								
								.github/workflows/test-builds.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										37
									
								
								.github/workflows/test-builds.yml
									
									
									
									
										vendored
									
									
								
							@@ -9,7 +9,14 @@ on:
 | 
			
		||||
  pull_request:
 | 
			
		||||
    branches:
 | 
			
		||||
    - bugfix-2.0.x
 | 
			
		||||
    - dev-2.1.x
 | 
			
		||||
    paths-ignore:
 | 
			
		||||
    - config/**
 | 
			
		||||
    - data/**
 | 
			
		||||
    - docs/**
 | 
			
		||||
    - '**/*.md'
 | 
			
		||||
  push:
 | 
			
		||||
    branches:
 | 
			
		||||
    - bugfix-2.0.x
 | 
			
		||||
    paths-ignore:
 | 
			
		||||
    - config/**
 | 
			
		||||
    - data/**
 | 
			
		||||
@@ -18,6 +25,8 @@ on:
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  test_builds:
 | 
			
		||||
    name: Run All Tests
 | 
			
		||||
    if: github.repository == 'MarlinFirmware/Marlin'
 | 
			
		||||
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
 | 
			
		||||
@@ -32,6 +41,7 @@ jobs:
 | 
			
		||||
        - mega2560
 | 
			
		||||
        - teensy31
 | 
			
		||||
        - teensy35
 | 
			
		||||
        - teensy41
 | 
			
		||||
        - SAMD51_grandcentral_m4
 | 
			
		||||
 | 
			
		||||
        # Extended AVR Environments
 | 
			
		||||
@@ -49,14 +59,28 @@ jobs:
 | 
			
		||||
        - 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
 | 
			
		||||
 | 
			
		||||
@@ -69,14 +93,10 @@ jobs:
 | 
			
		||||
        #- STM32F7
 | 
			
		||||
 | 
			
		||||
        # Non-working environment tests
 | 
			
		||||
 | 
			
		||||
        #- BIGTREE_BTT002
 | 
			
		||||
        #- at90usb1286_cdc
 | 
			
		||||
        #- at90usb1286_dfu
 | 
			
		||||
        #- STM32F103CB_malyan
 | 
			
		||||
        #- mks_robin_lite
 | 
			
		||||
        #- mks_robin_mini
 | 
			
		||||
        #- mks_robin_nano
 | 
			
		||||
 | 
			
		||||
    steps:
 | 
			
		||||
 | 
			
		||||
@@ -88,7 +108,7 @@ jobs:
 | 
			
		||||
 | 
			
		||||
    - name: Install PlatformIO
 | 
			
		||||
      run: |
 | 
			
		||||
        pip install -U https://github.com/platformio/platformio-core/archive/master.zip
 | 
			
		||||
        pip install -U https://github.com/platformio/platformio-core/archive/develop.zip
 | 
			
		||||
        platformio update
 | 
			
		||||
 | 
			
		||||
    - name: Check out the PR
 | 
			
		||||
@@ -97,8 +117,7 @@ jobs:
 | 
			
		||||
    - name: Run ${{ matrix.test-platform }} Tests
 | 
			
		||||
      run: |
 | 
			
		||||
        # Inline tests script
 | 
			
		||||
        [[ "$GITHUB_REPOSITORY" == "MarlinFirmware/Marlin" ]] || exit 0
 | 
			
		||||
        chmod +x buildroot/bin/*
 | 
			
		||||
        chmod +x buildroot/share/tests/*
 | 
			
		||||
        export PATH=./buildroot/bin/:./buildroot/share/tests/:${PATH}
 | 
			
		||||
        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 }}"
 | 
			
		||||
							
								
								
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@@ -16,7 +16,7 @@
 | 
			
		||||
# GNU General Public License for more details.
 | 
			
		||||
#
 | 
			
		||||
# You should have received a copy of the GNU General Public License
 | 
			
		||||
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
# along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
# Our automatic versioning scheme generates the following file
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										9
									
								
								LICENSE
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								LICENSE
									
									
									
									
									
								
							@@ -3,7 +3,7 @@
 | 
			
		||||
                    GNU GENERAL PUBLIC LICENSE
 | 
			
		||||
                       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
 | 
			
		||||
 of this license document, but changing it is not allowed.
 | 
			
		||||
 | 
			
		||||
@@ -647,7 +647,7 @@ the "copyright" line and a pointer to where the full notice is found.
 | 
			
		||||
    GNU General Public License for more details.
 | 
			
		||||
 | 
			
		||||
    You should have received a copy of the GNU General Public License
 | 
			
		||||
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
    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.
 | 
			
		||||
 | 
			
		||||
@@ -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,
 | 
			
		||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
 | 
			
		||||
For more information on this, and how to apply and follow the GNU GPL, see
 | 
			
		||||
<http://www.gnu.org/licenses/>.
 | 
			
		||||
<https://www.gnu.org/licenses/>.
 | 
			
		||||
 | 
			
		||||
  The GNU General Public License does not permit incorporating your program
 | 
			
		||||
into proprietary programs.  If your program is a subroutine library, you
 | 
			
		||||
may consider it more useful to permit linking proprietary applications with
 | 
			
		||||
the library.  If this is what you want to do, use the GNU Lesser General
 | 
			
		||||
Public License instead of this License.  But first, please read
 | 
			
		||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
 | 
			
		||||
 | 
			
		||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
#pragma once
 | 
			
		||||
@@ -34,9 +34,8 @@
 | 
			
		||||
 * - Extra features
 | 
			
		||||
 *
 | 
			
		||||
 * Advanced settings can be found in Configuration_adv.h
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
#define CONFIGURATION_H_VERSION 020005
 | 
			
		||||
#define CONFIGURATION_H_VERSION 020007
 | 
			
		||||
 | 
			
		||||
//===========================================================================
 | 
			
		||||
//============================= Getting Started =============================
 | 
			
		||||
@@ -45,13 +44,13 @@
 | 
			
		||||
/**
 | 
			
		||||
 * Here are some standard links for getting your machine calibrated:
 | 
			
		||||
 *
 | 
			
		||||
 * http://reprap.org/wiki/Calibration
 | 
			
		||||
 * http://youtu.be/wAL9d7FgInk
 | 
			
		||||
 * https://reprap.org/wiki/Calibration
 | 
			
		||||
 * https://youtu.be/wAL9d7FgInk
 | 
			
		||||
 * http://calculator.josefprusa.cz
 | 
			
		||||
 * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide
 | 
			
		||||
 * http://www.thingiverse.com/thing:5573
 | 
			
		||||
 * https://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide
 | 
			
		||||
 * https://www.thingiverse.com/thing:5573
 | 
			
		||||
 * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap
 | 
			
		||||
 * http://www.thingiverse.com/thing:298812
 | 
			
		||||
 * https://www.thingiverse.com/thing:298812
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
//===========================================================================
 | 
			
		||||
@@ -140,13 +139,13 @@
 | 
			
		||||
#define CUSTOM_MACHINE_NAME "SKR i3"
 | 
			
		||||
 | 
			
		||||
// Printer's unique ID, used by some programs to differentiate between machines.
 | 
			
		||||
// Choose your own or use a service like http://www.uuidgenerator.net/version4
 | 
			
		||||
// Choose your own or use a service like https://www.uuidgenerator.net/version4
 | 
			
		||||
//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
 | 
			
		||||
 | 
			
		||||
// @section extruder
 | 
			
		||||
 | 
			
		||||
// This defines the number of extruders
 | 
			
		||||
// :[1, 2, 3, 4, 5, 6, 7, 8]
 | 
			
		||||
// :[0, 1, 2, 3, 4, 5, 6, 7, 8]
 | 
			
		||||
#define EXTRUDERS 1
 | 
			
		||||
 | 
			
		||||
// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
 | 
			
		||||
@@ -155,6 +154,13 @@
 | 
			
		||||
// For Cyclops or any "multi-extruder" that shares a single nozzle.
 | 
			
		||||
//#define SINGLENOZZLE
 | 
			
		||||
 | 
			
		||||
// Save and restore temperature and fan speed on tool-change.
 | 
			
		||||
// Set standby for the unselected tool with M104/106/109 T...
 | 
			
		||||
#if ENABLED(SINGLENOZZLE)
 | 
			
		||||
  //#define SINGLENOZZLE_STANDBY_TEMP
 | 
			
		||||
  //#define SINGLENOZZLE_STANDBY_FAN
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Průša MK2 Single Nozzle Multi-Material Multiplexer, and variants.
 | 
			
		||||
 *
 | 
			
		||||
@@ -175,7 +181,7 @@
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Prusa Multi-Material Unit v2
 | 
			
		||||
 * Průša Multi-Material Unit v2
 | 
			
		||||
 *
 | 
			
		||||
 * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
 | 
			
		||||
 * Requires EXTRUDERS = 5
 | 
			
		||||
@@ -233,8 +239,8 @@
 | 
			
		||||
 | 
			
		||||
  #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
 | 
			
		||||
 | 
			
		||||
    #define MPE_FAST_SPEED      9000      // (mm/m) Speed for travel before last distance point
 | 
			
		||||
    #define MPE_SLOW_SPEED      4500      // (mm/m) Speed for last distance travel to park and couple
 | 
			
		||||
    #define MPE_FAST_SPEED      9000      // (mm/min) Speed for travel before last distance point
 | 
			
		||||
    #define MPE_SLOW_SPEED      4500      // (mm/min) Speed for last distance travel to park and couple
 | 
			
		||||
    #define MPE_TRAVEL_DISTANCE   10      // (mm) Last distance point
 | 
			
		||||
    #define MPE_COMPENSATION       0      // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
 | 
			
		||||
 | 
			
		||||
@@ -282,8 +288,8 @@
 | 
			
		||||
    #if ENABLED(PRIME_BEFORE_REMOVE)
 | 
			
		||||
      #define SWITCHING_TOOLHEAD_PRIME_MM           20  // (mm)   Extruder prime length
 | 
			
		||||
      #define SWITCHING_TOOLHEAD_RETRACT_MM         10  // (mm)   Retract after priming length
 | 
			
		||||
      #define SWITCHING_TOOLHEAD_PRIME_FEEDRATE    300  // (mm/m) Extruder prime feedrate
 | 
			
		||||
      #define SWITCHING_TOOLHEAD_RETRACT_FEEDRATE 2400  // (mm/m) Extruder retract feedrate
 | 
			
		||||
      #define SWITCHING_TOOLHEAD_PRIME_FEEDRATE    300  // (mm/min) Extruder prime feedrate
 | 
			
		||||
      #define SWITCHING_TOOLHEAD_RETRACT_FEEDRATE 2400  // (mm/min) Extruder retract feedrate
 | 
			
		||||
    #endif
 | 
			
		||||
  #elif ENABLED(ELECTROMAGNETIC_SWITCHING_TOOLHEAD)
 | 
			
		||||
    #define SWITCHING_TOOLHEAD_Z_HOP          2         // (mm) Z raise for switching
 | 
			
		||||
@@ -328,10 +334,10 @@
 | 
			
		||||
//#define PSU_NAME "Power Supply"
 | 
			
		||||
 | 
			
		||||
#if ENABLED(PSU_CONTROL)
 | 
			
		||||
  #define PSU_ACTIVE_HIGH false     // Set 'false' for ATX, 'true' for X-Box
 | 
			
		||||
  #define PSU_ACTIVE_STATE LOW      // Set 'LOW' for ATX, 'HIGH' for X-Box
 | 
			
		||||
 | 
			
		||||
  //#define PSU_DEFAULT_OFF         // Keep power off until enabled directly with M80
 | 
			
		||||
  //#define PSU_POWERUP_DELAY 100   // (ms) Delay for the PSU to warm up to full power
 | 
			
		||||
  //#define PSU_POWERUP_DELAY 250   // (ms) Delay for the PSU to warm up to full power
 | 
			
		||||
 | 
			
		||||
  //#define AUTO_POWER_CONTROL      // Enable automatic control of the PS_ON pin
 | 
			
		||||
  #if ENABLED(AUTO_POWER_CONTROL)
 | 
			
		||||
@@ -345,11 +351,10 @@
 | 
			
		||||
  #endif
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
// @section temperature
 | 
			
		||||
 | 
			
		||||
//===========================================================================
 | 
			
		||||
//============================= Thermal Settings ============================
 | 
			
		||||
//===========================================================================
 | 
			
		||||
// @section temperature
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * --NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
 | 
			
		||||
@@ -369,8 +374,9 @@
 | 
			
		||||
 *   202 : 200k thermistor - Copymaster 3D
 | 
			
		||||
 *     3 : Mendel-parts thermistor (4.7k pullup)
 | 
			
		||||
 *     4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
 | 
			
		||||
 *     5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
 | 
			
		||||
 *     5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan, J-Head, and E3D) (4.7k pullup)
 | 
			
		||||
 *   501 : 100K Zonestar (Tronxy X3A) Thermistor
 | 
			
		||||
 *   502 : 100K Zonestar Thermistor used by hot bed in Zonestar Průša P802M
 | 
			
		||||
 *   512 : 100k RPW-Ultra hotend thermistor (4.7k pullup)
 | 
			
		||||
 *     6 : 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup)
 | 
			
		||||
 *     7 : 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup)
 | 
			
		||||
@@ -378,13 +384,16 @@
 | 
			
		||||
 *     8 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup)
 | 
			
		||||
 *     9 : 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup)
 | 
			
		||||
 *    10 : 100k RS thermistor 198-961 (4.7k pullup)
 | 
			
		||||
 *    11 : 100k beta 3950 1% thermistor (4.7k pullup)
 | 
			
		||||
 *    11 : 100k beta 3950 1% thermistor (Used in Keenovo AC silicone mats and most Wanhao i3 machines) (4.7k pullup)
 | 
			
		||||
 *    12 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
 | 
			
		||||
 *    13 : 100k Hisens 3950  1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
 | 
			
		||||
 *    15 : 100k thermistor calibration for JGAurora A5 hotend
 | 
			
		||||
 *    18 : ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327
 | 
			
		||||
 *    20 : Pt100 with circuit in the Ultimainboard V2.x with 5v excitation (AVR)
 | 
			
		||||
 *    21 : Pt100 with circuit in the Ultimainboard V2.x with 3.3v excitation (STM32 \ LPC176x....)
 | 
			
		||||
 *    22 : 100k (hotend) with 4.7k pullup to 3.3V and 220R to analog input (as in GTM32 Pro vB)
 | 
			
		||||
 *    23 : 100k (bed) with 4.7k pullup to 3.3v and 220R to analog input (as in GTM32 Pro vB)
 | 
			
		||||
 *    30 : Kis3d Silicone heating mat 200W/300W with 6mm precision cast plate (EN AW 5083) NTC100K / B3950 (4.7k pullup)
 | 
			
		||||
 *   201 : Pt100 with circuit in Overlord, similar to Ultimainboard V2.x
 | 
			
		||||
 *    60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
 | 
			
		||||
 *    61 : 100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup
 | 
			
		||||
@@ -400,7 +409,7 @@
 | 
			
		||||
 *    52 : 200k thermistor - ATC Semitec 204GT-2 (1k pullup)
 | 
			
		||||
 *    55 : 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup)
 | 
			
		||||
 *
 | 
			
		||||
 *  1047 : Pt1000 with 4k7 pullup
 | 
			
		||||
 *  1047 : Pt1000 with 4k7 pullup (E3D)
 | 
			
		||||
 *  1010 : Pt1000 with 1k pullup (non standard)
 | 
			
		||||
 *   147 : Pt100 with 4k7 pullup
 | 
			
		||||
 *   110 : Pt100 with 1k pullup (non standard)
 | 
			
		||||
@@ -427,6 +436,12 @@
 | 
			
		||||
#define DUMMY_THERMISTOR_998_VALUE 25
 | 
			
		||||
#define DUMMY_THERMISTOR_999_VALUE 100
 | 
			
		||||
 | 
			
		||||
// Resistor values when using a MAX31865 (sensor -5)
 | 
			
		||||
// Sensor value is typically 100 (PT100) or 1000 (PT1000)
 | 
			
		||||
// Calibration value is typically 430 ohm for AdaFruit PT100 modules and 4300 ohm for AdaFruit PT1000 modules.
 | 
			
		||||
//#define MAX31865_SENSOR_OHMS      100
 | 
			
		||||
//#define MAX31865_CALIBRATION_OHMS 430
 | 
			
		||||
 | 
			
		||||
// Use temp sensor 1 as a redundant sensor with sensor 0. If the readings
 | 
			
		||||
// from the two sensors differ too much the print will be aborted.
 | 
			
		||||
//#define TEMP_SENSOR_1_AS_REDUNDANT
 | 
			
		||||
@@ -468,56 +483,32 @@
 | 
			
		||||
//===========================================================================
 | 
			
		||||
//============================= PID Settings ================================
 | 
			
		||||
//===========================================================================
 | 
			
		||||
// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning
 | 
			
		||||
// PID Tuning Guide here: https://reprap.org/wiki/PID_Tuning
 | 
			
		||||
 | 
			
		||||
// Comment the following line to disable PID and enable bang-bang.
 | 
			
		||||
#define PIDTEMP
 | 
			
		||||
#define BANG_MAX 255     // Limits current to nozzle while in bang-bang mode; 255=full current
 | 
			
		||||
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
 | 
			
		||||
#define PID_K1 0.95      // Smoothing factor within any PID loop
 | 
			
		||||
 | 
			
		||||
#if ENABLED(PIDTEMP)
 | 
			
		||||
  //#define PID_EDIT_MENU         // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
 | 
			
		||||
  //#define PID_AUTOTUNE_MENU     // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
 | 
			
		||||
  //#define PID_DEBUG             // Sends debug data to the serial port. Use 'M303 D' to toggle activation.
 | 
			
		||||
  //#define PID_OPENLOOP 1        // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
 | 
			
		||||
  //#define SLOW_PWM_HEATERS      // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
 | 
			
		||||
  //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
 | 
			
		||||
                                  // Set/get with gcode: M301 E[extruder number, 0-2]
 | 
			
		||||
  #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
 | 
			
		||||
                                  // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
 | 
			
		||||
 | 
			
		||||
  // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
 | 
			
		||||
 | 
			
		||||
  // Ultimaker
 | 
			
		||||
  //#define DEFAULT_Kp 22.2
 | 
			
		||||
  //#define DEFAULT_Ki 1.08
 | 
			
		||||
  //#define DEFAULT_Kd 114
 | 
			
		||||
 | 
			
		||||
  // Wanhao Duplicator i3
 | 
			
		||||
  //#define DEFAULT_Kp 29
 | 
			
		||||
  //#define DEFAULT_Ki 2.00
 | 
			
		||||
  //#define DEFAULT_Kd 97
 | 
			
		||||
 | 
			
		||||
  // Defaults from https://www.itsalllost.com/wanhao-i3-32bit-upgrade/
 | 
			
		||||
  //#define DEFAULT_Kp 17.45
 | 
			
		||||
  //#define DEFAULT_Ki 0.84
 | 
			
		||||
  //#define DEFAULT_Kd 90.41
 | 
			
		||||
 | 
			
		||||
  // MakerGear
 | 
			
		||||
  //#define DEFAULT_Kp 7.0
 | 
			
		||||
  //#define DEFAULT_Ki 0.1
 | 
			
		||||
  //#define DEFAULT_Kd 12
 | 
			
		||||
 | 
			
		||||
  // Mendel Parts V9 on 12V
 | 
			
		||||
  //#define DEFAULT_Kp 63.0
 | 
			
		||||
  //#define DEFAULT_Ki 2.25
 | 
			
		||||
  //#define DEFAULT_Kd 440
 | 
			
		||||
 | 
			
		||||
  #if ENABLED(PID_PARAMS_PER_HOTEND)
 | 
			
		||||
    // Specify between 1 and HOTENDS values per array.
 | 
			
		||||
    // If fewer than EXTRUDER values are provided, the last element will be repeated.
 | 
			
		||||
    #define DEFAULT_Kp_LIST {  22.20,  22.20 }
 | 
			
		||||
    #define DEFAULT_Ki_LIST {   1.08,   1.08 }
 | 
			
		||||
    #define DEFAULT_Kd_LIST { 114.00, 114.00 }
 | 
			
		||||
  #else
 | 
			
		||||
    // Defaults from PID Tuning
 | 
			
		||||
    #define DEFAULT_Kp  23.66
 | 
			
		||||
    #define DEFAULT_Ki   1.42
 | 
			
		||||
    #define DEFAULT_Kd  98.72
 | 
			
		||||
 | 
			
		||||
  #endif
 | 
			
		||||
#endif // PIDTEMP
 | 
			
		||||
 | 
			
		||||
//===========================================================================
 | 
			
		||||
@@ -553,29 +544,8 @@
 | 
			
		||||
  //#define MIN_BED_POWER 0
 | 
			
		||||
  //#define PID_BED_DEBUG // Sends debug data to the serial port.
 | 
			
		||||
 | 
			
		||||
  //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
 | 
			
		||||
  //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
 | 
			
		||||
  //#define DEFAULT_bedKp 10.00
 | 
			
		||||
  //#define DEFAULT_bedKi .023
 | 
			
		||||
  //#define DEFAULT_bedKd 305.4
 | 
			
		||||
 | 
			
		||||
  // Wanhao Duplicator i3
 | 
			
		||||
  //#define  DEFAULT_bedKp 249.52
 | 
			
		||||
  //#define  DEFAULT_bedKi 47.89
 | 
			
		||||
  //#define  DEFAULT_bedKd 325.03
 | 
			
		||||
 | 
			
		||||
  // Defaults from https://www.itsalllost.com/wanhao-i3-32bit-upgrade/
 | 
			
		||||
  //#define  DEFAULT_bedKp 602.82
 | 
			
		||||
  //#define  DEFAULT_bedKi 114.98
 | 
			
		||||
  //#define  DEFAULT_bedKd 790.15
 | 
			
		||||
 | 
			
		||||
  //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
 | 
			
		||||
  //from pidautotune
 | 
			
		||||
  //#define DEFAULT_bedKp 97.1
 | 
			
		||||
  //#define DEFAULT_bedKi 1.41
 | 
			
		||||
  //#define DEFAULT_bedKd 1675.16
 | 
			
		||||
 | 
			
		||||
  // Defaults from PID Tuning
 | 
			
		||||
  // 120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
 | 
			
		||||
  // from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
 | 
			
		||||
  #define DEFAULT_bedKp 148.74
 | 
			
		||||
  #define DEFAULT_bedKi 29.72
 | 
			
		||||
  #define DEFAULT_bedKd 496.30
 | 
			
		||||
@@ -583,6 +553,14 @@
 | 
			
		||||
  // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
 | 
			
		||||
#endif // PIDTEMPBED
 | 
			
		||||
 | 
			
		||||
#if EITHER(PIDTEMP, PIDTEMPBED)
 | 
			
		||||
  //#define PID_DEBUG             // Sends debug data to the serial port. Use 'M303 D' to toggle activation.
 | 
			
		||||
  //#define PID_OPENLOOP          // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
 | 
			
		||||
  //#define SLOW_PWM_HEATERS      // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
 | 
			
		||||
  #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
 | 
			
		||||
                                  // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
// @section extruder
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@@ -629,7 +607,7 @@
 | 
			
		||||
 | 
			
		||||
// @section machine
 | 
			
		||||
 | 
			
		||||
// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics
 | 
			
		||||
// Enable one of the options below for CoreXY, CoreXZ, or CoreYZ kinematics,
 | 
			
		||||
// either in the usual order or reversed
 | 
			
		||||
//#define COREXY
 | 
			
		||||
//#define COREXZ
 | 
			
		||||
@@ -637,6 +615,7 @@
 | 
			
		||||
//#define COREYX
 | 
			
		||||
//#define COREZX
 | 
			
		||||
//#define COREZY
 | 
			
		||||
//#define MARKFORGED_XY  // MarkForged. See https://reprap.org/forum/read.php?152,504042
 | 
			
		||||
 | 
			
		||||
//===========================================================================
 | 
			
		||||
//============================== Endstop Settings ===========================
 | 
			
		||||
@@ -732,7 +711,7 @@
 | 
			
		||||
 * Enable if your probe or endstops falsely trigger due to noise.
 | 
			
		||||
 *
 | 
			
		||||
 * - Higher values may affect repeatability or accuracy of some bed probes.
 | 
			
		||||
 * - To fix noise install a 100nF ceramic capacitor inline with the switch.
 | 
			
		||||
 * - To fix noise install a 100nF ceramic capacitor in parallel with the switch.
 | 
			
		||||
 * - This feature is not required for common micro-switches mounted on PCBs
 | 
			
		||||
 *   based on the Makerbot design, which already have the 100nF capacitor.
 | 
			
		||||
 *
 | 
			
		||||
@@ -740,6 +719,9 @@
 | 
			
		||||
 */
 | 
			
		||||
//#define ENDSTOP_NOISE_THRESHOLD 2
 | 
			
		||||
 | 
			
		||||
// Check for stuck or disconnected endstops during homing moves.
 | 
			
		||||
//#define DETECT_BROKEN_ENDSTOP
 | 
			
		||||
 | 
			
		||||
//=============================================================================
 | 
			
		||||
//============================== Movement Settings ============================
 | 
			
		||||
//=============================================================================
 | 
			
		||||
@@ -833,10 +815,12 @@
 | 
			
		||||
 *
 | 
			
		||||
 * See:
 | 
			
		||||
 *   https://reprap.org/forum/read.php?1,739819
 | 
			
		||||
 *   http://blog.kyneticcnc.com/2018/10/computing-junction-deviation-for-marlin.html
 | 
			
		||||
 *   https://blog.kyneticcnc.com/2018/10/computing-junction-deviation-for-marlin.html
 | 
			
		||||
 */
 | 
			
		||||
#if DISABLED(CLASSIC_JERK)
 | 
			
		||||
  #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
 | 
			
		||||
  #define JUNCTION_DEVIATION_MM 0.013 // (mm) Distance from real junction edge
 | 
			
		||||
  #define JD_HANDLE_SMALL_SEGMENTS    // Use curvature estimation instead of just the junction angle
 | 
			
		||||
                                      // for small segments (< 1mm) with large junction angles (> 135°).
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@@ -855,16 +839,19 @@
 | 
			
		||||
// @section probes
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// See http://marlinfw.org/docs/configuration/probes.html
 | 
			
		||||
// See https://marlinfw.org/docs/configuration/probes.html
 | 
			
		||||
//
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
 | 
			
		||||
 *
 | 
			
		||||
 * Enable this option for a probe connected to the Z Min endstop pin.
 | 
			
		||||
 * Enable this option for a probe connected to the Z-MIN pin.
 | 
			
		||||
 * The probe replaces the Z-MIN endstop and is used for Z homing.
 | 
			
		||||
 * (Automatically enables USE_PROBE_FOR_Z_HOMING.)
 | 
			
		||||
 */
 | 
			
		||||
#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
 | 
			
		||||
 | 
			
		||||
// Force the use of the probe for Z-axis homing
 | 
			
		||||
//#define USE_PROBE_FOR_Z_HOMING
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Z_MIN_PROBE_PIN
 | 
			
		||||
 *
 | 
			
		||||
@@ -879,7 +866,6 @@
 | 
			
		||||
 *    - For simple switches connect...
 | 
			
		||||
 *      - normally-closed switches to GND and D32.
 | 
			
		||||
 *      - normally-open switches to 5V and D32.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
//#define Z_MIN_PROBE_PIN 32 // Pin 32 is the RAMPS default
 | 
			
		||||
 | 
			
		||||
@@ -921,6 +907,11 @@
 | 
			
		||||
 */
 | 
			
		||||
#define BLTOUCH
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Pressure sensor with a BLTouch-like interface
 | 
			
		||||
 */
 | 
			
		||||
//#define CREALITY_TOUCH
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Touch-MI Probe by hotends.fr
 | 
			
		||||
 *
 | 
			
		||||
@@ -972,38 +963,48 @@
 | 
			
		||||
//
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Z Probe to nozzle (X,Y) offset, relative to (0, 0).
 | 
			
		||||
 * Nozzle-to-Probe offsets { X, Y, Z }
 | 
			
		||||
 *
 | 
			
		||||
 * In the following example the X and Y offsets are both positive:
 | 
			
		||||
 * - Use a caliper or ruler to measure the distance from the tip of
 | 
			
		||||
 *   the Nozzle to the center-point of the Probe in the X and Y axes.
 | 
			
		||||
 * - For the Z offset use your best known value and adjust at runtime.
 | 
			
		||||
 * - Probe Offsets can be tuned at runtime with 'M851', LCD menus, babystepping, etc.
 | 
			
		||||
 *
 | 
			
		||||
 *   #define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
 | 
			
		||||
 * Assuming the typical work area orientation:
 | 
			
		||||
 *  - Probe to RIGHT of the Nozzle has a Positive X offset
 | 
			
		||||
 *  - Probe to LEFT  of the Nozzle has a Negative X offset
 | 
			
		||||
 *  - Probe in BACK  of the Nozzle has a Positive Y offset
 | 
			
		||||
 *  - Probe in FRONT of the Nozzle has a Negative Y offset
 | 
			
		||||
 *
 | 
			
		||||
 * Some examples:
 | 
			
		||||
 *   #define NOZZLE_TO_PROBE_OFFSET { 10, 10, -1 }   // Example "1"
 | 
			
		||||
 *   #define NOZZLE_TO_PROBE_OFFSET {-10,  5, -1 }   // Example "2"
 | 
			
		||||
 *   #define NOZZLE_TO_PROBE_OFFSET {  5, -5, -1 }   // Example "3"
 | 
			
		||||
 *   #define NOZZLE_TO_PROBE_OFFSET {-15,-10, -1 }   // Example "4"
 | 
			
		||||
 *
 | 
			
		||||
 *     +-- BACK ---+
 | 
			
		||||
 *     |           |
 | 
			
		||||
 *   L |    (+) P  | R <-- probe (20,20)
 | 
			
		||||
 *   E |           | I
 | 
			
		||||
 *   F | (-) N (+) | G <-- nozzle (10,10)
 | 
			
		||||
 *   T |           | H
 | 
			
		||||
 *     |    (-)    | T
 | 
			
		||||
 *     |           |
 | 
			
		||||
 *     |    [+]    |
 | 
			
		||||
 *   L |        1  | R <-- Example "1" (right+,  back+)
 | 
			
		||||
 *   E |  2        | I <-- Example "2" ( left-,  back+)
 | 
			
		||||
 *   F |[-]  N  [+]| G <-- Nozzle
 | 
			
		||||
 *   T |       3   | H <-- Example "3" (right+, front-)
 | 
			
		||||
 *     | 4         | T <-- Example "4" ( left-, front-)
 | 
			
		||||
 *     |    [-]    |
 | 
			
		||||
 *     O-- FRONT --+
 | 
			
		||||
 *   (0,0)
 | 
			
		||||
 *
 | 
			
		||||
 * Specify a Probe position as { X, Y, Z }
 | 
			
		||||
 */
 | 
			
		||||
#define NOZZLE_TO_PROBE_OFFSET { -33, -37, -1 }
 | 
			
		||||
 | 
			
		||||
// Most probes should stay away from the edges of the bed, but
 | 
			
		||||
// with NOZZLE_AS_PROBE this can be negative for a wider probing area.
 | 
			
		||||
#define MIN_PROBE_EDGE 10
 | 
			
		||||
#define PROBING_MARGIN 10
 | 
			
		||||
 | 
			
		||||
// X and Y axis travel speed (mm/m) between probes
 | 
			
		||||
#define XY_PROBE_SPEED 8000
 | 
			
		||||
// X and Y axis travel speed (mm/min) between probes
 | 
			
		||||
#define XY_PROBE_SPEED (133*60)
 | 
			
		||||
 | 
			
		||||
// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
 | 
			
		||||
// Feedrate (mm/min) for the first approach when double-probing (MULTIPLE_PROBING == 2)
 | 
			
		||||
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
 | 
			
		||||
 | 
			
		||||
// Feedrate (mm/m) for the "accurate" probe of each point
 | 
			
		||||
// Feedrate (mm/min) for the "accurate" probe of each point
 | 
			
		||||
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@@ -1074,18 +1075,18 @@
 | 
			
		||||
#define Z_ENABLE_ON 0
 | 
			
		||||
#define E_ENABLE_ON 0 // For all extruders
 | 
			
		||||
 | 
			
		||||
// Disables axis stepper immediately when it's not being used.
 | 
			
		||||
// Disable axis steppers immediately when they're not being stepped.
 | 
			
		||||
// WARNING: When motors turn off there is a chance of losing position accuracy!
 | 
			
		||||
#define DISABLE_X false
 | 
			
		||||
#define DISABLE_Y false
 | 
			
		||||
#define DISABLE_Z false
 | 
			
		||||
 | 
			
		||||
// Warn on display about possibly reduced accuracy
 | 
			
		||||
// Turn off the display blinking that warns about possible accuracy reduction
 | 
			
		||||
//#define DISABLE_REDUCED_ACCURACY_WARNING
 | 
			
		||||
 | 
			
		||||
// @section extruder
 | 
			
		||||
 | 
			
		||||
#define DISABLE_E false             // For all extruders
 | 
			
		||||
#define DISABLE_E false             // Disable the extruder when not stepping
 | 
			
		||||
#define DISABLE_INACTIVE_EXTRUDER   // Keep only the active extruder enabled
 | 
			
		||||
 | 
			
		||||
// @section machine
 | 
			
		||||
@@ -1173,12 +1174,12 @@
 | 
			
		||||
 *
 | 
			
		||||
 * RAMPS-based boards use SERVO3_PIN for the first runout sensor.
 | 
			
		||||
 * For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc.
 | 
			
		||||
 * By default the firmware assumes HIGH=FILAMENT PRESENT.
 | 
			
		||||
 */
 | 
			
		||||
//#define FILAMENT_RUNOUT_SENSOR
 | 
			
		||||
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
 | 
			
		||||
  #define FIL_RUNOUT_ENABLED_DEFAULT true // Enable the sensor on startup. Override with M412 followed by M500.
 | 
			
		||||
  #define NUM_RUNOUT_SENSORS   1          // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each.
 | 
			
		||||
  #define FIL_RUNOUT_INVERTING false // Set to true to invert the logic of the sensor.
 | 
			
		||||
  #define FIL_RUNOUT_STATE     LOW        // Pin state indicating that filament is NOT present.
 | 
			
		||||
  #define FIL_RUNOUT_PULLUP               // Use internal pullup for filament runout pins.
 | 
			
		||||
  //#define FIL_RUNOUT_PULLDOWN           // Use internal pulldown for filament runout pins.
 | 
			
		||||
 | 
			
		||||
@@ -1370,7 +1371,6 @@
 | 
			
		||||
 */
 | 
			
		||||
//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
// @section homing
 | 
			
		||||
 | 
			
		||||
// The center of the bed is at (X=0, Y=0)
 | 
			
		||||
@@ -1388,17 +1388,17 @@
 | 
			
		||||
//
 | 
			
		||||
// - Allow Z homing only after X and Y homing AND stepper drivers still enabled.
 | 
			
		||||
// - If stepper drivers time out, it will need X and Y homing again before Z homing.
 | 
			
		||||
// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28).
 | 
			
		||||
// - Move the Z probe (or nozzle) to a defined XY point before Z Homing.
 | 
			
		||||
// - Prevent Z homing when the Z probe is outside bed area.
 | 
			
		||||
//
 | 
			
		||||
#define Z_SAFE_HOMING
 | 
			
		||||
 | 
			
		||||
#if ENABLED(Z_SAFE_HOMING)
 | 
			
		||||
  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axes (G28).
 | 
			
		||||
  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axes (G28).
 | 
			
		||||
  #define Z_SAFE_HOMING_X_POINT X_CENTER  // X point for Z homing
 | 
			
		||||
  #define Z_SAFE_HOMING_Y_POINT Y_CENTER  // Y point for Z homing
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
// Homing speeds (mm/m)
 | 
			
		||||
// Homing speeds (mm/min)
 | 
			
		||||
#define HOMING_FEEDRATE_XY (50*60)
 | 
			
		||||
#define HOMING_FEEDRATE_Z  (4*60)
 | 
			
		||||
 | 
			
		||||
@@ -1533,6 +1533,9 @@
 | 
			
		||||
#if ENABLED(NOZZLE_PARK_FEATURE)
 | 
			
		||||
  // Specify a park position as { X, Y, Z_raise }
 | 
			
		||||
  #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 }
 | 
			
		||||
  //#define NOZZLE_PARK_X_ONLY          // X move only is required to park
 | 
			
		||||
  //#define NOZZLE_PARK_Y_ONLY          // Y move only is required to park
 | 
			
		||||
  #define NOZZLE_PARK_Z_RAISE_MIN   2   // (mm) Always raise Z by at least this distance
 | 
			
		||||
  #define NOZZLE_PARK_XY_FEEDRATE 80    // (mm/s) X and Y axes feedrate (also used for delta Z axis)
 | 
			
		||||
  #define NOZZLE_PARK_Z_FEEDRATE    5   // (mm/s) Z axis feedrate (not used for delta printers)
 | 
			
		||||
#endif
 | 
			
		||||
@@ -1573,7 +1576,6 @@
 | 
			
		||||
 *
 | 
			
		||||
 *   Caveats: The ending Z should be the same as starting Z.
 | 
			
		||||
 * Attention: EXPERIMENTAL. G-code arguments may change.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
//#define NOZZLE_CLEAN_FEATURE
 | 
			
		||||
 | 
			
		||||
@@ -1599,8 +1601,15 @@
 | 
			
		||||
  // Move the nozzle to the initial position after cleaning
 | 
			
		||||
  #define NOZZLE_CLEAN_GOBACK
 | 
			
		||||
 | 
			
		||||
  // Enable for a purge/clean station that's always at the gantry height (thus no Z move)
 | 
			
		||||
  // For a purge/clean station that's always at the gantry height (thus no Z move)
 | 
			
		||||
  //#define NOZZLE_CLEAN_NO_Z
 | 
			
		||||
 | 
			
		||||
  // For a purge/clean station mounted on the X axis
 | 
			
		||||
  //#define NOZZLE_CLEAN_NO_Y
 | 
			
		||||
 | 
			
		||||
  // Explicit wipe G-code script applies to a G12 with no arguments.
 | 
			
		||||
  //#define WIPE_SEQUENCE_COMMANDS "G1 X-17 Y25 Z10 F4000\nG1 Z1\nM114\nG1 X-17 Y25\nG1 X-17 Y95\nG1 X-17 Y25\nG1 X-17 Y95\nG1 X-17 Y25\nG1 X-17 Y95\nG1 X-17 Y25\nG1 X-17 Y95\nG1 X-17 Y25\nG1 X-17 Y95\nG1 X-17 Y25\nG1 X-17 Y95\nG1 Z15\nM400\nG0 X-10.0 Y-9.0"
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@@ -1634,6 +1643,37 @@
 | 
			
		||||
 */
 | 
			
		||||
#define PRINTCOUNTER
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Password
 | 
			
		||||
 *
 | 
			
		||||
 * Set a numerical password for the printer which can be requested:
 | 
			
		||||
 *
 | 
			
		||||
 *  - When the printer boots up
 | 
			
		||||
 *  - Upon opening the 'Print from Media' Menu
 | 
			
		||||
 *  - When SD printing is completed or aborted
 | 
			
		||||
 *
 | 
			
		||||
 * The following G-codes can be used:
 | 
			
		||||
 *
 | 
			
		||||
 *  M510 - Lock Printer. Blocks all commands except M511.
 | 
			
		||||
 *  M511 - Unlock Printer.
 | 
			
		||||
 *  M512 - Set, Change and Remove Password.
 | 
			
		||||
 *
 | 
			
		||||
 * If you forget the password and get locked out you'll need to re-flash
 | 
			
		||||
 * the firmware with the feature disabled, reset EEPROM, and (optionally)
 | 
			
		||||
 * re-flash the firmware again with this feature enabled.
 | 
			
		||||
 */
 | 
			
		||||
//#define PASSWORD_FEATURE
 | 
			
		||||
#if ENABLED(PASSWORD_FEATURE)
 | 
			
		||||
  #define PASSWORD_LENGTH 4                 // (#) Number of digits (1-9). 3 or 4 is recommended
 | 
			
		||||
  #define PASSWORD_ON_STARTUP
 | 
			
		||||
  #define PASSWORD_UNLOCK_GCODE             // Unlock with the M511 P<password> command. Disable to prevent brute-force attack.
 | 
			
		||||
  #define PASSWORD_CHANGE_GCODE             // Change the password with M512 P<old> S<new>.
 | 
			
		||||
  //#define PASSWORD_ON_SD_PRINT_MENU       // This does not prevent gcodes from running
 | 
			
		||||
  //#define PASSWORD_AFTER_SD_PRINT_END
 | 
			
		||||
  //#define PASSWORD_AFTER_SD_PRINT_ABORT
 | 
			
		||||
  //#include "Configuration_Secure.h"       // External file with PASSWORD_DEFAULT_VALUE
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
//=============================================================================
 | 
			
		||||
//============================= LCD and SD support ============================
 | 
			
		||||
//=============================================================================
 | 
			
		||||
@@ -1645,10 +1685,10 @@
 | 
			
		||||
 *
 | 
			
		||||
 * Select the language to display on the LCD. These languages are available:
 | 
			
		||||
 *
 | 
			
		||||
 *   en, an, bg, ca, cz, da, de, el, el_gr, es, eu, fi, fr, gl, hr, it, jp_kana,
 | 
			
		||||
 *   ko_KR, nl, pl, pt, pt_br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test
 | 
			
		||||
 *   en, an, bg, ca, cz, da, de, el, el_gr, es, eu, fi, fr, gl, hr, hu, it,
 | 
			
		||||
 *   jp_kana, ko_KR, nl, pl, pt, pt_br, ro, ru, sk, tr, uk, vi, zh_CN, zh_TW, test
 | 
			
		||||
 *
 | 
			
		||||
 * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el_gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp_kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt_br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
 | 
			
		||||
 * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el_gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'hu':'Hungarian', 'it':'Italian', 'jp_kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt_br':'Portuguese (Brazilian)', 'ro':'Romanian', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
 | 
			
		||||
 */
 | 
			
		||||
#define LCD_LANGUAGE en
 | 
			
		||||
 | 
			
		||||
@@ -1670,16 +1710,16 @@
 | 
			
		||||
 *  - Click the controller to view the LCD menu
 | 
			
		||||
 *  - The LCD will display Japanese, Western, or Cyrillic text
 | 
			
		||||
 *
 | 
			
		||||
 * See http://marlinfw.org/docs/development/lcd_language.html
 | 
			
		||||
 * See https://marlinfw.org/docs/development/lcd_language.html
 | 
			
		||||
 *
 | 
			
		||||
 * :['JAPANESE', 'WESTERN', 'CYRILLIC']
 | 
			
		||||
 */
 | 
			
		||||
#define DISPLAY_CHARSET_HD44780 JAPANESE
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Info Screen Style (0:Classic, 1:Prusa)
 | 
			
		||||
 * Info Screen Style (0:Classic, 1:Průša)
 | 
			
		||||
 *
 | 
			
		||||
 * :[0:'Classic', 1:'Prusa']
 | 
			
		||||
 * :[0:'Classic', 1:'Průša']
 | 
			
		||||
 */
 | 
			
		||||
#define LCD_INFO_SCREEN_STYLE 0
 | 
			
		||||
 | 
			
		||||
@@ -1688,7 +1728,6 @@
 | 
			
		||||
 *
 | 
			
		||||
 * SD Card support is disabled by default. If your controller has an SD slot,
 | 
			
		||||
 * you must uncomment the following option or it won't work.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
#define SDSUPPORT
 | 
			
		||||
 | 
			
		||||
@@ -1797,7 +1836,7 @@
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// RepRapDiscount Smart Controller.
 | 
			
		||||
// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
 | 
			
		||||
// https://reprap.org/wiki/RepRapDiscount_Smart_Controller
 | 
			
		||||
//
 | 
			
		||||
// Note: Usually sold with a white PCB.
 | 
			
		||||
//
 | 
			
		||||
@@ -1821,13 +1860,13 @@
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
 | 
			
		||||
// http://reprap.org/wiki/PanelOne
 | 
			
		||||
// https://reprap.org/wiki/PanelOne
 | 
			
		||||
//
 | 
			
		||||
//#define PANEL_ONE
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// GADGETS3D G3D LCD/SD Controller
 | 
			
		||||
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
 | 
			
		||||
// https://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
 | 
			
		||||
//
 | 
			
		||||
// Note: Usually sold with a blue PCB.
 | 
			
		||||
//
 | 
			
		||||
@@ -1914,7 +1953,7 @@
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// 2-wire Non-latching LCD SR from https://goo.gl/aJJ4sH
 | 
			
		||||
// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
 | 
			
		||||
// LCD configuration: https://reprap.org/wiki/SAV_3D_LCD
 | 
			
		||||
//
 | 
			
		||||
//#define SAV_3DLCD
 | 
			
		||||
 | 
			
		||||
@@ -1925,6 +1964,14 @@
 | 
			
		||||
//
 | 
			
		||||
//#define FF_INTERFACEBOARD
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// TFT GLCD Panel with Marlin UI
 | 
			
		||||
// Panel connected to main board by SPI or I2C interface.
 | 
			
		||||
// See https://github.com/Serhiy-K/TFTGLCDAdapter
 | 
			
		||||
//
 | 
			
		||||
//#define TFTGLCD_PANEL_SPI
 | 
			
		||||
//#define TFTGLCD_PANEL_I2C
 | 
			
		||||
 | 
			
		||||
//=============================================================================
 | 
			
		||||
//=======================   LCD / Controller Selection  =======================
 | 
			
		||||
//=========================      (Graphical LCDs)      ========================
 | 
			
		||||
@@ -1936,10 +1983,12 @@
 | 
			
		||||
// IMPORTANT: The U8glib library is required for Graphical Display!
 | 
			
		||||
//            https://github.com/olikraus/U8glib_Arduino
 | 
			
		||||
//
 | 
			
		||||
// NOTE: If the LCD is unresponsive you may need to reverse the plugs.
 | 
			
		||||
//
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// RepRapDiscount FULL GRAPHIC Smart Controller
 | 
			
		||||
// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
 | 
			
		||||
// https://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
 | 
			
		||||
//
 | 
			
		||||
#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
 | 
			
		||||
 | 
			
		||||
@@ -1952,20 +2001,20 @@
 | 
			
		||||
//
 | 
			
		||||
// Activate one of these if you have a Panucatt Devices
 | 
			
		||||
// Viki 2.0 or mini Viki with Graphic LCD
 | 
			
		||||
// http://panucatt.com
 | 
			
		||||
// https://www.panucatt.com
 | 
			
		||||
//
 | 
			
		||||
//#define VIKI2
 | 
			
		||||
//#define miniVIKI
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// MakerLab Mini Panel with graphic
 | 
			
		||||
// controller and SD support - http://reprap.org/wiki/Mini_panel
 | 
			
		||||
// controller and SD support - https://reprap.org/wiki/Mini_panel
 | 
			
		||||
//
 | 
			
		||||
//#define MINIPANEL
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// MaKr3d Makr-Panel with graphic controller and SD support.
 | 
			
		||||
// http://reprap.org/wiki/MaKr3d_MaKrPanel
 | 
			
		||||
// https://reprap.org/wiki/MaKr3d_MaKrPanel
 | 
			
		||||
//
 | 
			
		||||
//#define MAKRPANEL
 | 
			
		||||
 | 
			
		||||
@@ -2008,6 +2057,12 @@
 | 
			
		||||
//
 | 
			
		||||
//#define MKS_MINI_12864
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// MKS LCD12864A/B with graphic controller and SD support. Follows MKS_MINI_12864 pinout.
 | 
			
		||||
// https://www.aliexpress.com/item/33018110072.html
 | 
			
		||||
//
 | 
			
		||||
//#define MKS_LCD12864
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// FYSETC variant of the MINI12864 graphic controller with SD support
 | 
			
		||||
// https://wiki.fysetc.com/Mini12864_Panel/
 | 
			
		||||
@@ -2015,7 +2070,7 @@
 | 
			
		||||
//#define FYSETC_MINI_12864_X_X    // Type C/D/E/F. No tunable RGB Backlight by default
 | 
			
		||||
//#define FYSETC_MINI_12864_1_2    // Type C/D/E/F. Simple RGB Backlight (always on)
 | 
			
		||||
//#define FYSETC_MINI_12864_2_0    // Type A/B. Discreet RGB Backlight
 | 
			
		||||
//#define FYSETC_MINI_12864_2_1    // Type A/B. Neopixel RGB Backlight
 | 
			
		||||
//#define FYSETC_MINI_12864_2_1    // Type A/B. NeoPixel RGB Backlight
 | 
			
		||||
//#define FYSETC_GENERIC_12864_1_1 // Larger display with basic ON/OFF backlight.
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
@@ -2049,7 +2104,7 @@
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Silvergate GLCD controller
 | 
			
		||||
// http://github.com/android444/Silvergate
 | 
			
		||||
// https://github.com/android444/Silvergate
 | 
			
		||||
//
 | 
			
		||||
//#define SILVER_GATE_GLCD_CONTROLLER
 | 
			
		||||
 | 
			
		||||
@@ -2077,14 +2132,21 @@
 | 
			
		||||
//#define OLED_PANEL_TINYBOY2
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
 | 
			
		||||
// http://reprap.org/wiki/MKS_12864OLED
 | 
			
		||||
// MKS OLED 1.3" 128×64 FULL GRAPHICS CONTROLLER
 | 
			
		||||
// https://reprap.org/wiki/MKS_12864OLED
 | 
			
		||||
//
 | 
			
		||||
// Tiny, but very sharp OLED display
 | 
			
		||||
//
 | 
			
		||||
//#define MKS_12864OLED          // Uses the SH1106 controller (default)
 | 
			
		||||
//#define MKS_12864OLED_SSD1306  // Uses the SSD1306 controller
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Zonestar OLED 128×64 FULL GRAPHICS CONTROLLER
 | 
			
		||||
//
 | 
			
		||||
//#define ZONESTAR_12864LCD           // Graphical (DOGM) with ST7920 controller
 | 
			
		||||
//#define ZONESTAR_12864OLED          // 1.3" OLED with SH1106 controller (default)
 | 
			
		||||
//#define ZONESTAR_12864OLED_SSD1306  // 0.96" OLED with SSD1306 controller
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Einstart S OLED SSD1306
 | 
			
		||||
//
 | 
			
		||||
@@ -2095,21 +2157,31 @@
 | 
			
		||||
//
 | 
			
		||||
//#define OVERLORD_OLED
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// FYSETC OLED 2.42" 128×64 FULL GRAPHICS CONTROLLER with WS2812 RGB
 | 
			
		||||
// Where to find : https://www.aliexpress.com/item/4000345255731.html
 | 
			
		||||
//#define FYSETC_242_OLED_12864   // Uses the SSD1309 controller
 | 
			
		||||
 | 
			
		||||
//=============================================================================
 | 
			
		||||
//========================== Extensible UI Displays ===========================
 | 
			
		||||
//=============================================================================
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// DGUS Touch Display with DWIN OS. (Choose one.)
 | 
			
		||||
// ORIGIN : https://www.aliexpress.com/item/32993409517.html
 | 
			
		||||
// FYSETC : https://www.aliexpress.com/item/32961471929.html
 | 
			
		||||
//
 | 
			
		||||
//#define DGUS_LCD_UI_ORIGIN
 | 
			
		||||
//#define DGUS_LCD_UI_FYSETC
 | 
			
		||||
//#define DGUS_LCD_UI_HIPRECY
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Touch-screen LCD for Malyan M200 printers
 | 
			
		||||
// Touch-screen LCD for Malyan M200/M300 printers
 | 
			
		||||
//
 | 
			
		||||
//#define MALYAN_LCD
 | 
			
		||||
#if ENABLED(MALYAN_LCD)
 | 
			
		||||
  #define LCD_SERIAL_PORT 1  // Default is 1 for Malyan M200
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Touch UI for FTDI EVE (FT800/FT810) displays
 | 
			
		||||
@@ -2117,42 +2189,100 @@
 | 
			
		||||
//
 | 
			
		||||
//#define TOUCH_UI_FTDI_EVE
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Touch-screen LCD for Anycubic printers
 | 
			
		||||
//
 | 
			
		||||
//#define ANYCUBIC_LCD_I3MEGA
 | 
			
		||||
//#define ANYCUBIC_LCD_CHIRON
 | 
			
		||||
#if EITHER(ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON)
 | 
			
		||||
  #define LCD_SERIAL_PORT 3  // Default is 3 for Anycubic
 | 
			
		||||
  //#define ANYCUBIC_LCD_DEBUG
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Third-party or vendor-customized controller interfaces.
 | 
			
		||||
// Sources should be installed in 'src/lcd/extensible_ui'.
 | 
			
		||||
//
 | 
			
		||||
//#define EXTENSIBLE_UI
 | 
			
		||||
 | 
			
		||||
#if ENABLED(EXTENSIBLE_UI)
 | 
			
		||||
  //#define EXTUI_LOCAL_BEEPER // Enables use of local Beeper pin with external display
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
//=============================================================================
 | 
			
		||||
//=============================== Graphical TFTs ==============================
 | 
			
		||||
//=============================================================================
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.)
 | 
			
		||||
//
 | 
			
		||||
//#define FSMC_GRAPHICAL_TFT
 | 
			
		||||
/**
 | 
			
		||||
 * TFT Type - Select your Display type
 | 
			
		||||
 *
 | 
			
		||||
 * Available options are:
 | 
			
		||||
 *   MKS_TS35_V2_0,
 | 
			
		||||
 *   MKS_ROBIN_TFT24, MKS_ROBIN_TFT28, MKS_ROBIN_TFT32, MKS_ROBIN_TFT35,
 | 
			
		||||
 *   MKS_ROBIN_TFT43, MKS_ROBIN_TFT_V1_1R
 | 
			
		||||
 *   TFT_TRONXY_X5SA, ANYCUBIC_TFT35, LONGER_LK_TFT28
 | 
			
		||||
 *   TFT_GENERIC
 | 
			
		||||
 *
 | 
			
		||||
 * For TFT_GENERIC, you need to configure these 3 options:
 | 
			
		||||
 *   Driver:     TFT_DRIVER
 | 
			
		||||
 *               Current Drivers are: AUTO, ST7735, ST7789, ST7796, R61505, ILI9328, ILI9341, ILI9488
 | 
			
		||||
 *   Resolution: TFT_WIDTH and TFT_HEIGHT
 | 
			
		||||
 *   Interface:  TFT_INTERFACE_FSMC or TFT_INTERFACE_SPI
 | 
			
		||||
 */
 | 
			
		||||
//#define TFT_GENERIC
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * TFT UI - User Interface Selection. Enable one of the following options:
 | 
			
		||||
 *
 | 
			
		||||
 *   TFT_CLASSIC_UI - Emulated DOGM - 128x64 Upscaled
 | 
			
		||||
 *   TFT_COLOR_UI   - Marlin Default Menus, Touch Friendly, using full TFT capabilities
 | 
			
		||||
 *   TFT_LVGL_UI    - A Modern UI using LVGL
 | 
			
		||||
 *
 | 
			
		||||
 *   For LVGL_UI also copy the 'assets' folder from the build directory to the
 | 
			
		||||
 *   root of your SD card, together with the compiled firmware.
 | 
			
		||||
 */
 | 
			
		||||
//#define TFT_CLASSIC_UI
 | 
			
		||||
//#define TFT_COLOR_UI
 | 
			
		||||
//#define TFT_LVGL_UI
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * TFT Rotation. Set to one of the following values:
 | 
			
		||||
 *
 | 
			
		||||
 *   TFT_ROTATE_90,  TFT_ROTATE_90_MIRROR_X,  TFT_ROTATE_90_MIRROR_Y,
 | 
			
		||||
 *   TFT_ROTATE_180, TFT_ROTATE_180_MIRROR_X, TFT_ROTATE_180_MIRROR_Y,
 | 
			
		||||
 *   TFT_ROTATE_270, TFT_ROTATE_270_MIRROR_X, TFT_ROTATE_270_MIRROR_Y,
 | 
			
		||||
 *   TFT_MIRROR_X, TFT_MIRROR_Y, TFT_NO_ROTATION
 | 
			
		||||
 */
 | 
			
		||||
//#define TFT_ROTATION TFT_NO_ROTATION
 | 
			
		||||
 | 
			
		||||
//=============================================================================
 | 
			
		||||
//============================  Other Controllers  ============================
 | 
			
		||||
//=============================================================================
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Ender-3 v2 OEM display. A DWIN display with Rotary Encoder.
 | 
			
		||||
//
 | 
			
		||||
//#define DWIN_CREALITY_LCD
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// ADS7843/XPT2046 ADC Touchscreen such as ILI9341 2.8
 | 
			
		||||
//
 | 
			
		||||
//#define TOUCH_BUTTONS
 | 
			
		||||
#if ENABLED(TOUCH_BUTTONS)
 | 
			
		||||
//#define TOUCH_SCREEN
 | 
			
		||||
#if ENABLED(TOUCH_SCREEN)
 | 
			
		||||
  #define BUTTON_DELAY_EDIT  50 // (ms) Button repeat delay for edit screens
 | 
			
		||||
  #define BUTTON_DELAY_MENU 250 // (ms) Button repeat delay for menus
 | 
			
		||||
 | 
			
		||||
  #define XPT2046_X_CALIBRATION   12316
 | 
			
		||||
  #define XPT2046_Y_CALIBRATION  -8981
 | 
			
		||||
  #define XPT2046_X_OFFSET       -43
 | 
			
		||||
  #define XPT2046_Y_OFFSET        257
 | 
			
		||||
  #define TOUCH_SCREEN_CALIBRATION
 | 
			
		||||
 | 
			
		||||
  //#define XPT2046_X_CALIBRATION 12316
 | 
			
		||||
  //#define XPT2046_Y_CALIBRATION -8981
 | 
			
		||||
  //#define XPT2046_X_OFFSET        -43
 | 
			
		||||
  //#define XPT2046_Y_OFFSET        257
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// RepRapWorld REPRAPWORLD_KEYPAD v1.1
 | 
			
		||||
// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
 | 
			
		||||
// https://reprapworld.com/products/electronics/ramps/keypad_v1_0_fully_assembled/
 | 
			
		||||
//
 | 
			
		||||
//#define REPRAPWORLD_KEYPAD
 | 
			
		||||
//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 // (mm) Distance to move per key-press
 | 
			
		||||
@@ -2163,6 +2293,10 @@
 | 
			
		||||
 | 
			
		||||
// @section extras
 | 
			
		||||
 | 
			
		||||
// Set number of user-controlled fans. Disable to use all board-defined fans.
 | 
			
		||||
// :[1,2,3,4,5,6,7,8]
 | 
			
		||||
//#define NUM_M106_FANS 1
 | 
			
		||||
 | 
			
		||||
// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino
 | 
			
		||||
//#define FAST_PWM_FAN
 | 
			
		||||
 | 
			
		||||
@@ -2189,9 +2323,6 @@
 | 
			
		||||
// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
 | 
			
		||||
//#define TEMP_STAT_LEDS
 | 
			
		||||
 | 
			
		||||
// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
 | 
			
		||||
//#define SF_ARC_FIX
 | 
			
		||||
 | 
			
		||||
// Support for the BariCUDA Paste Extruder
 | 
			
		||||
//#define BARICUDA
 | 
			
		||||
 | 
			
		||||
@@ -2202,7 +2333,6 @@
 | 
			
		||||
//#define PCA9632
 | 
			
		||||
 | 
			
		||||
// Support for PCA9533 PWM LED driver
 | 
			
		||||
// https://github.com/mikeshub/SailfishRGB_LED
 | 
			
		||||
//#define PCA9533
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@@ -2214,18 +2344,17 @@
 | 
			
		||||
 * Adds the M150 command to set the LED (or LED strip) color.
 | 
			
		||||
 * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
 | 
			
		||||
 * luminance values can be set from 0 to 255.
 | 
			
		||||
 * For Neopixel LED an overall brightness parameter is also available.
 | 
			
		||||
 * For NeoPixel LED an overall brightness parameter is also available.
 | 
			
		||||
 *
 | 
			
		||||
 * *** CAUTION ***
 | 
			
		||||
 *  LED Strips require a MOSFET Chip between PWM lines and LEDs,
 | 
			
		||||
 *  as the Arduino cannot handle the current the LEDs will require.
 | 
			
		||||
 *  Failure to follow this precaution can destroy your Arduino!
 | 
			
		||||
 *  NOTE: A separate 5V power supply is required! The Neopixel LED needs
 | 
			
		||||
 *  NOTE: A separate 5V power supply is required! The NeoPixel LED needs
 | 
			
		||||
 *  more current than the Arduino 5V linear regulator can produce.
 | 
			
		||||
 * *** CAUTION ***
 | 
			
		||||
 *
 | 
			
		||||
 * LED Type. Enable only one of the following two options.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
//#define RGB_LED
 | 
			
		||||
//#define RGBW_LED
 | 
			
		||||
@@ -2237,19 +2366,29 @@
 | 
			
		||||
  //#define RGB_LED_W_PIN -1
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
// Support for Adafruit Neopixel LED driver
 | 
			
		||||
// Support for Adafruit NeoPixel LED driver
 | 
			
		||||
//#define NEOPIXEL_LED
 | 
			
		||||
#if ENABLED(NEOPIXEL_LED)
 | 
			
		||||
  #define NEOPIXEL_TYPE   NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
 | 
			
		||||
  #define NEOPIXEL_PIN     4       // LED driving pin
 | 
			
		||||
  //#define NEOPIXEL2_TYPE NEOPIXEL_TYPE
 | 
			
		||||
  //#define NEOPIXEL2_PIN    5
 | 
			
		||||
  #define NEOPIXEL_PIXELS 30       // Number of LEDs in the strip, larger of 2 strips if 2 neopixel strips are used
 | 
			
		||||
  #define NEOPIXEL_PIXELS 30       // Number of LEDs in the strip. (Longest strip when NEOPIXEL2_SEPARATE is disabled.)
 | 
			
		||||
  #define NEOPIXEL_IS_SEQUENTIAL   // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
 | 
			
		||||
  #define NEOPIXEL_BRIGHTNESS 127  // Initial brightness (0-255)
 | 
			
		||||
  //#define NEOPIXEL_STARTUP_TEST  // Cycle through colors at startup
 | 
			
		||||
 | 
			
		||||
  // Use a single Neopixel LED for static (background) lighting
 | 
			
		||||
  // Support for second Adafruit NeoPixel LED driver controlled with M150 S1 ...
 | 
			
		||||
  //#define NEOPIXEL2_SEPARATE
 | 
			
		||||
  #if ENABLED(NEOPIXEL2_SEPARATE)
 | 
			
		||||
    #define NEOPIXEL2_PIXELS      15  // Number of LEDs in the second strip
 | 
			
		||||
    #define NEOPIXEL2_BRIGHTNESS 127  // Initial brightness (0-255)
 | 
			
		||||
    #define NEOPIXEL2_STARTUP_TEST    // Cycle through colors at startup
 | 
			
		||||
  #else
 | 
			
		||||
    //#define NEOPIXEL2_INSERIES      // Default behavior is NeoPixel 2 in parallel
 | 
			
		||||
  #endif
 | 
			
		||||
 | 
			
		||||
  // Use a single NeoPixel LED for static (background) lighting
 | 
			
		||||
  //#define NEOPIXEL_BKGD_LED_INDEX  0               // Index of the LED to use
 | 
			
		||||
  //#define NEOPIXEL_BKGD_COLOR { 255, 255, 255, 0 } // R, G, B, W
 | 
			
		||||
#endif
 | 
			
		||||
@@ -2269,17 +2408,12 @@
 | 
			
		||||
  #define PRINTER_EVENT_LEDS
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * R/C SERVO support
 | 
			
		||||
 * Sponsored by TrinityLabs, Reworked by codexmas
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Number of servos
 | 
			
		||||
 *
 | 
			
		||||
 * For some servo-related options NUM_SERVOS will be set automatically.
 | 
			
		||||
 * Set this manually if there are extra servos needing manual control.
 | 
			
		||||
 * Leave undefined or set to 0 to entirely disable the servo subsystem.
 | 
			
		||||
 * Set to 0 to turn off servo support.
 | 
			
		||||
 */
 | 
			
		||||
//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
 | 
			
		||||
 | 
			
		||||
@@ -2291,5 +2425,5 @@
 | 
			
		||||
// Only power servos during movement, otherwise leave off to prevent jitter
 | 
			
		||||
//#define DEACTIVATE_SERVOS_AFTER_MOVE
 | 
			
		||||
 | 
			
		||||
// Allow servo angle to be edited and saved to EEPROM
 | 
			
		||||
// Edit servo angles with M281 and save to EEPROM with M500
 | 
			
		||||
//#define EDITABLE_SERVO_ANGLES
 | 
			
		||||
 
 | 
			
		||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										290
									
								
								Marlin/Makefile
									
									
									
									
									
								
							
							
						
						
									
										290
									
								
								Marlin/Makefile
									
									
									
									
									
								
							@@ -14,7 +14,7 @@
 | 
			
		||||
# Detailed instructions for using the makefile:
 | 
			
		||||
#
 | 
			
		||||
#  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).
 | 
			
		||||
#
 | 
			
		||||
#  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
 | 
			
		||||
#     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.
 | 
			
		||||
#     Older one's are atmega8 based, newer ones like Arduino Mini, Bluetooth
 | 
			
		||||
#  3. Set the line containing "MCU" to match your board's processor. Set
 | 
			
		||||
#     "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,
 | 
			
		||||
#     change F_CPU to 8000000. If you are using Gen7 electronics, you
 | 
			
		||||
#     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
 | 
			
		||||
#     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"
 | 
			
		||||
#
 | 
			
		||||
# 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/ \
 | 
			
		||||
#   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...
 | 
			
		||||
#
 | 
			
		||||
#   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
 | 
			
		||||
# 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)
 | 
			
		||||
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
 | 
			
		||||
# On most linuxes this will be /usr/share/arduino
 | 
			
		||||
@@ -67,38 +88,44 @@ ARDUINO_VERSION      ?= 106
 | 
			
		||||
# The installed Libraries are in the User folder
 | 
			
		||||
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 ?=
 | 
			
		||||
 | 
			
		||||
#Programmer configuration
 | 
			
		||||
# Programmer configuration
 | 
			
		||||
UPLOAD_RATE        ?= 57600
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
#Directory used to build files in, contains all the build files, from object files to the final hex file
 | 
			
		||||
#on linux it is best to put an absolute path like /home/username/tmp .
 | 
			
		||||
# Directory used to build files in, contains all the build files, from object
 | 
			
		||||
# files to the final hex file on linux it is best to put an absolute path
 | 
			
		||||
# like /home/username/tmp .
 | 
			
		||||
BUILD_DIR          ?= applet
 | 
			
		||||
 | 
			
		||||
# This defines whether Liquid_TWI2 support will be built
 | 
			
		||||
LIQUID_TWI2        ?= 0
 | 
			
		||||
 | 
			
		||||
# this defines if Wire is needed
 | 
			
		||||
# This defines if Wire is needed
 | 
			
		||||
WIRE               ?= 0
 | 
			
		||||
 | 
			
		||||
# this defines if U8GLIB is needed (may require RELOC_WORKAROUND)
 | 
			
		||||
U8GLIB             ?= 1
 | 
			
		||||
# This defines if Tone is needed (i.e SPEAKER is defined in Configuration.h)
 | 
			
		||||
# Disabling this (and SPEAKER) saves approximatively 350 bytes of memory.
 | 
			
		||||
TONE               ?= 1
 | 
			
		||||
 | 
			
		||||
# this defines whether to include the Trinamic TMCStepper library
 | 
			
		||||
TMC                ?= 1
 | 
			
		||||
# This defines if U8GLIB is needed (may require RELOC_WORKAROUND)
 | 
			
		||||
U8GLIB             ?= 0
 | 
			
		||||
 | 
			
		||||
# this defines whether to include the AdaFruit NeoPixel library
 | 
			
		||||
# 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
 | 
			
		||||
# 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_MIN:=$(shell $(CC) -dM -E - < /dev/null | grep __GNUC_MINOR__ | cut -f3 -d\ )
 | 
			
		||||
@@ -170,105 +197,115 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1100)
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1101)
 | 
			
		||||
# Velleman K8400 Controller (derived from 3Drag Controller)
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1102)
 | 
			
		||||
# 2PrintBeta BAM&DICE with STK drivers
 | 
			
		||||
# Velleman K8600 Controller (Vertex Nano)
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1103)
 | 
			
		||||
# 2PrintBeta BAM&DICE Due with STK drivers
 | 
			
		||||
# Velleman K8800 Controller (Vertex Delta)
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1104)
 | 
			
		||||
# MKS BASE v1.0
 | 
			
		||||
# 2PrintBeta BAM&DICE with STK drivers
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1105)
 | 
			
		||||
# MKS v1.4 with A4982 stepper drivers
 | 
			
		||||
# 2PrintBeta BAM&DICE Due with STK drivers
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1106)
 | 
			
		||||
# MKS v1.5 with Allegro A4982 stepper drivers
 | 
			
		||||
# MKS BASE v1.0
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1107)
 | 
			
		||||
# MKS v1.6 with Allegro A4982 stepper drivers
 | 
			
		||||
# MKS v1.4 with A4982 stepper drivers
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1108)
 | 
			
		||||
 | 
			
		||||
# MKS BASE 1.0 with Heroic HR4982 stepper drivers
 | 
			
		||||
# MKS v1.5 with Allegro A4982 stepper drivers
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1109)
 | 
			
		||||
# MKS GEN v1.3 or 1.4
 | 
			
		||||
# MKS v1.6 with Allegro A4982 stepper drivers
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1110)
 | 
			
		||||
# MKS GEN L
 | 
			
		||||
# MKS BASE 1.0 with Heroic HR4982 stepper drivers
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1111)
 | 
			
		||||
# zrib V2.0 control board (Chinese knock off RAMPS replica)
 | 
			
		||||
# MKS GEN v1.3 or 1.4
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1112)
 | 
			
		||||
# BigTreeTech or BIQU KFB2.0
 | 
			
		||||
# MKS GEN L
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1113)
 | 
			
		||||
# Felix 2.0+ Electronics Board (RAMPS like)
 | 
			
		||||
# zrib V2.0 control board (Chinese knock off RAMPS replica)
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1114)
 | 
			
		||||
# Invent-A-Part RigidBoard
 | 
			
		||||
# BigTreeTech or BIQU KFB2.0
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1115)
 | 
			
		||||
# Invent-A-Part RigidBoard V2
 | 
			
		||||
# Felix 2.0+ Electronics Board (RAMPS like)
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1116)
 | 
			
		||||
# Sainsmart 2-in-1 board
 | 
			
		||||
# Invent-A-Part RigidBoard
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1117)
 | 
			
		||||
# Ultimaker
 | 
			
		||||
# Invent-A-Part RigidBoard V2
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1118)
 | 
			
		||||
# Ultimaker (Older electronics. Pre 1.5.4. This is rare)
 | 
			
		||||
# Sainsmart 2-in-1 board
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1119)
 | 
			
		||||
# Ultimaker
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1120)
 | 
			
		||||
# Ultimaker (Older electronics. Pre 1.5.4. This is rare)
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1121)
 | 
			
		||||
  MCU              ?= atmega1280
 | 
			
		||||
  PROG_MCU         ?= m1280
 | 
			
		||||
 | 
			
		||||
# Azteeg X3
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1120)
 | 
			
		||||
# Azteeg X3 Pro
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1121)
 | 
			
		||||
# Ultimainboard 2.x (Uses TEMP_SENSOR 20)
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1122)
 | 
			
		||||
# Rumba
 | 
			
		||||
# Azteeg X3 Pro
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1123)
 | 
			
		||||
# Raise3D Rumba
 | 
			
		||||
# Ultimainboard 2.x (Uses TEMP_SENSOR 20)
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1124)
 | 
			
		||||
# Rapide Lite RL200 Rumba
 | 
			
		||||
# Rumba
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1125)
 | 
			
		||||
# Formbot T-Rex 2 Plus
 | 
			
		||||
# Raise3D Rumba
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1126)
 | 
			
		||||
# Formbot T-Rex 3
 | 
			
		||||
# Rapide Lite RL200 Rumba
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1127)
 | 
			
		||||
# Formbot Raptor
 | 
			
		||||
# Formbot T-Rex 2 Plus
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1128)
 | 
			
		||||
# Formbot Raptor 2
 | 
			
		||||
# Formbot T-Rex 3
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1129)
 | 
			
		||||
# bq ZUM Mega 3D
 | 
			
		||||
# Formbot Raptor
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1130)
 | 
			
		||||
# MakeBoard Mini v2.1.2 is a control board sold by MicroMake
 | 
			
		||||
# Formbot Raptor 2
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1131)
 | 
			
		||||
# TriGorilla Anycubic version 1.3 based on RAMPS EFB
 | 
			
		||||
# bq ZUM Mega 3D
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1132)
 | 
			
		||||
# TriGorilla Anycubic version 1.4 based on RAMPS EFB
 | 
			
		||||
# MakeBoard Mini v2.1.2 is a control board sold by MicroMake
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1133)
 | 
			
		||||
# TriGorilla Anycubic version 1.4 Rev 1.1
 | 
			
		||||
# TriGorilla Anycubic version 1.3 based on RAMPS EFB
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1134)
 | 
			
		||||
# Creality: Ender-4, CR-8
 | 
			
		||||
# TriGorilla Anycubic version 1.4 based on RAMPS EFB
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1135)
 | 
			
		||||
# Creality: CR10S, CR20, CR-X
 | 
			
		||||
# TriGorilla Anycubic version 1.4 Rev 1.1
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1136)
 | 
			
		||||
# Dagoma F5
 | 
			
		||||
# Creality: Ender-4, CR-8
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1137)
 | 
			
		||||
# FYSETC F6 1.3
 | 
			
		||||
# Creality: CR10S, CR20, CR-X
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1138)
 | 
			
		||||
# FYSETC F6 1.5
 | 
			
		||||
# Dagoma F5
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1139)
 | 
			
		||||
# Duplicator i3 Plus
 | 
			
		||||
# FYSETC F6 1.3
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1140)
 | 
			
		||||
# VORON
 | 
			
		||||
# FYSETC F6 1.5
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1141)
 | 
			
		||||
# TRONXY V3 1.0
 | 
			
		||||
# Duplicator i3 Plus
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1142)
 | 
			
		||||
# Z-Bolt X Series
 | 
			
		||||
# VORON
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1143)
 | 
			
		||||
# TT OSCAR
 | 
			
		||||
# TRONXY V3 1.0
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1144)
 | 
			
		||||
# Overlord/Overlord Pro
 | 
			
		||||
# Z-Bolt X Series
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1145)
 | 
			
		||||
# ADIMLab Gantry v1
 | 
			
		||||
# TT OSCAR
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1146)
 | 
			
		||||
# ADIMLab Gantry v2
 | 
			
		||||
# Overlord/Overlord Pro
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1147)
 | 
			
		||||
# BIQU Tango V1
 | 
			
		||||
# ADIMLab Gantry v1
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1148)
 | 
			
		||||
# MKS GEN L V2
 | 
			
		||||
# ADIMLab Gantry v2
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1149)
 | 
			
		||||
# Copymaster 3D
 | 
			
		||||
# 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
 | 
			
		||||
@@ -341,9 +378,11 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1320)
 | 
			
		||||
# Minitronics v1.0/1.1
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1400)
 | 
			
		||||
  MCU              ?= atmega1281
 | 
			
		||||
  PROG_MCU         ?= m1281
 | 
			
		||||
# Silvergate v1.0
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1401)
 | 
			
		||||
  MCU              ?= atmega1281
 | 
			
		||||
  PROG_MCU         ?= m1281
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# Sanguinololu and Derivatives - ATmega644P, ATmega1284P
 | 
			
		||||
@@ -353,42 +392,57 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1401)
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1500)
 | 
			
		||||
  HARDWARE_VARIANT ?= Sanguino
 | 
			
		||||
  MCU              ?= atmega644p
 | 
			
		||||
  PROG_MCU         ?= m644p
 | 
			
		||||
# Sanguinololu 1.2 and above
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1501)
 | 
			
		||||
  HARDWARE_VARIANT ?= Sanguino
 | 
			
		||||
  MCU              ?= atmega644p
 | 
			
		||||
  PROG_MCU         ?= m644p
 | 
			
		||||
# Melzi
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1502)
 | 
			
		||||
  HARDWARE_VARIANT ?= Sanguino
 | 
			
		||||
  MCU              ?= atmega644p
 | 
			
		||||
# Melzi with ATmega1284 (MaKr3d version)
 | 
			
		||||
  PROG_MCU         ?= m644p
 | 
			
		||||
# Melzi V2.0
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1503)
 | 
			
		||||
  HARDWARE_VARIANT ?= Sanguino
 | 
			
		||||
  MCU              ?= atmega1284p
 | 
			
		||||
# Melzi Creality3D board (for CR-10 etc)
 | 
			
		||||
  PROG_MCU         ?= m1284p
 | 
			
		||||
# Melzi with ATmega1284 (MaKr3d version)
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1504)
 | 
			
		||||
  HARDWARE_VARIANT ?= Sanguino
 | 
			
		||||
  MCU              ?= atmega1284p
 | 
			
		||||
# Melzi Malyan M150 board
 | 
			
		||||
  PROG_MCU         ?= m1284p
 | 
			
		||||
# Melzi Creality3D board (for CR-10 etc)
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1505)
 | 
			
		||||
  HARDWARE_VARIANT ?= Sanguino
 | 
			
		||||
  MCU              ?= atmega1284p
 | 
			
		||||
# Tronxy X5S
 | 
			
		||||
  PROG_MCU         ?= m1284p
 | 
			
		||||
# Melzi Malyan M150 board
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1506)
 | 
			
		||||
  HARDWARE_VARIANT ?= Sanguino
 | 
			
		||||
  MCU              ?= atmega1284p
 | 
			
		||||
# STB V1.1
 | 
			
		||||
  PROG_MCU         ?= m1284p
 | 
			
		||||
# Tronxy X5S
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1507)
 | 
			
		||||
  HARDWARE_VARIANT ?= Sanguino
 | 
			
		||||
  MCU              ?= atmega1284p
 | 
			
		||||
# Azteeg X1
 | 
			
		||||
  PROG_MCU         ?= m1284p
 | 
			
		||||
# STB V1.1
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1508)
 | 
			
		||||
  HARDWARE_VARIANT ?= Sanguino
 | 
			
		||||
  MCU              ?= atmega1284p
 | 
			
		||||
# Anet 1.0 (Melzi clone)
 | 
			
		||||
  PROG_MCU         ?= m1284p
 | 
			
		||||
# Azteeg X1
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1509)
 | 
			
		||||
  HARDWARE_VARIANT ?= Sanguino
 | 
			
		||||
  MCU              ?= atmega1284p
 | 
			
		||||
  PROG_MCU         ?= m1284p
 | 
			
		||||
# Anet 1.0 (Melzi clone)
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1510)
 | 
			
		||||
  HARDWARE_VARIANT ?= Sanguino
 | 
			
		||||
  MCU              ?= atmega1284p
 | 
			
		||||
  PROG_MCU         ?= m1284p
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# Other ATmega644P, ATmega644, ATmega1284P
 | 
			
		||||
@@ -398,50 +452,61 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1509)
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1600)
 | 
			
		||||
  HARDWARE_VARIANT ?= Sanguino
 | 
			
		||||
  MCU              ?= atmega644p
 | 
			
		||||
  PROG_MCU         ?= m644p
 | 
			
		||||
# Gen3+
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1601)
 | 
			
		||||
  HARDWARE_VARIANT ?= Sanguino
 | 
			
		||||
  MCU              ?= atmega644p
 | 
			
		||||
  PROG_MCU         ?= m644p
 | 
			
		||||
# Gen6
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1602)
 | 
			
		||||
  HARDWARE_VARIANT ?= Gen6
 | 
			
		||||
  MCU              ?= atmega644p
 | 
			
		||||
  PROG_MCU         ?= m644p
 | 
			
		||||
# Gen6 deluxe
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1603)
 | 
			
		||||
  HARDWARE_VARIANT ?= Gen6
 | 
			
		||||
  MCU              ?= atmega644p
 | 
			
		||||
  PROG_MCU         ?= m644p
 | 
			
		||||
# Gen7 custom (Alfons3 Version)
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1604)
 | 
			
		||||
  HARDWARE_VARIANT ?= Gen7
 | 
			
		||||
  MCU              ?= atmega644
 | 
			
		||||
  PROG_MCU         ?= m644
 | 
			
		||||
  F_CPU            ?= 20000000
 | 
			
		||||
# Gen7 v1.1, v1.2
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1605)
 | 
			
		||||
  HARDWARE_VARIANT ?= Gen7
 | 
			
		||||
  MCU              ?= atmega644p
 | 
			
		||||
  PROG_MCU         ?= m644p
 | 
			
		||||
  F_CPU            ?= 20000000
 | 
			
		||||
# Gen7 v1.3
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1606)
 | 
			
		||||
  HARDWARE_VARIANT ?= Gen7
 | 
			
		||||
  MCU              ?= atmega644p
 | 
			
		||||
  PROG_MCU         ?= m644p
 | 
			
		||||
  F_CPU            ?= 20000000
 | 
			
		||||
# Gen7 v1.4
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1607)
 | 
			
		||||
  HARDWARE_VARIANT ?= Gen7
 | 
			
		||||
  MCU              ?= atmega1284p
 | 
			
		||||
  PROG_MCU         ?= m1284p
 | 
			
		||||
  F_CPU            ?= 20000000
 | 
			
		||||
# Alpha OMCA board
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1608)
 | 
			
		||||
  HARDWARE_VARIANT ?= SanguinoA
 | 
			
		||||
  MCU              ?= atmega644
 | 
			
		||||
  PROG_MCU         ?= m644
 | 
			
		||||
# Final OMCA board
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1609)
 | 
			
		||||
  HARDWARE_VARIANT ?= Sanguino
 | 
			
		||||
  MCU              ?= atmega644p
 | 
			
		||||
  PROG_MCU         ?= m644p
 | 
			
		||||
# Sethi 3D_1
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1610)
 | 
			
		||||
  HARDWARE_VARIANT ?= Sanguino
 | 
			
		||||
  MCU              ?= atmega644p
 | 
			
		||||
  PROG_MCU         ?= m644p
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# Teensyduino - AT90USB1286, AT90USB1286P
 | 
			
		||||
@@ -451,51 +516,60 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1610)
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1700)
 | 
			
		||||
  HARDWARE_VARIANT ?= Teensy
 | 
			
		||||
  MCU              ?= at90usb1286
 | 
			
		||||
  PROG_MCU         ?= usb1286
 | 
			
		||||
# Printrboard (AT90USB1286)
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1701)
 | 
			
		||||
  HARDWARE_VARIANT ?= Teensy
 | 
			
		||||
  MCU              ?= at90usb1286
 | 
			
		||||
  PROG_MCU         ?= usb1286
 | 
			
		||||
# Printrboard Revision F (AT90USB1286)
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1702)
 | 
			
		||||
  HARDWARE_VARIANT ?= Teensy
 | 
			
		||||
  MCU              ?= at90usb1286
 | 
			
		||||
  PROG_MCU         ?= usb1286
 | 
			
		||||
# Brainwave (AT90USB646)
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1703)
 | 
			
		||||
  HARDWARE_VARIANT ?= Teensy
 | 
			
		||||
  MCU              ?= at90usb646
 | 
			
		||||
  PROG_MCU         ?= usb646
 | 
			
		||||
# Brainwave Pro (AT90USB1286)
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1704)
 | 
			
		||||
  HARDWARE_VARIANT ?= Teensy
 | 
			
		||||
  MCU              ?= at90usb1286
 | 
			
		||||
  PROG_MCU         ?= usb1286
 | 
			
		||||
# SAV Mk-I (AT90USB1286)
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1705)
 | 
			
		||||
  HARDWARE_VARIANT ?= Teensy
 | 
			
		||||
  MCU              ?= at90usb1286
 | 
			
		||||
  PROG_MCU         ?= usb1286
 | 
			
		||||
# Teensy++2.0 (AT90USB1286)
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1706)
 | 
			
		||||
  HARDWARE_VARIANT ?= Teensy
 | 
			
		||||
  MCU              ?= at90usb1286
 | 
			
		||||
  PROG_MCU         ?= usb1286
 | 
			
		||||
# 5DPrint D8 Driver Board
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),1707)
 | 
			
		||||
  HARDWARE_VARIANT ?= Teensy
 | 
			
		||||
  MCU              ?= at90usb1286
 | 
			
		||||
  PROG_MCU         ?= usb1286
 | 
			
		||||
 | 
			
		||||
# UltiMachine Archim1 (with DRV8825 drivers)
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),3023)
 | 
			
		||||
  HARDWARE_VARIANT ?= archim
 | 
			
		||||
  MCPU              = cortex-m3
 | 
			
		||||
  F_CPU             = 84000000L
 | 
			
		||||
  F_CPU             = 84000000
 | 
			
		||||
  IS_MCU            = 0
 | 
			
		||||
# UltiMachine Archim2 (with TMC2130 drivers)
 | 
			
		||||
else ifeq ($(HARDWARE_MOTHERBOARD),3024)
 | 
			
		||||
  HARDWARE_VARIANT ?= archim
 | 
			
		||||
  MCPU              = cortex-m3
 | 
			
		||||
  F_CPU             = 84000000L
 | 
			
		||||
  F_CPU             = 84000000
 | 
			
		||||
  IS_MCU            = 0
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
# Be sure to regenerate speed_lookuptable.h with create_speed_lookuptable.py
 | 
			
		||||
# 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.
 | 
			
		||||
F_CPU ?= 16000000
 | 
			
		||||
 | 
			
		||||
@@ -506,6 +580,7 @@ ifeq ($(IS_MCU),1)
 | 
			
		||||
  # Set to arduino, ATmega2560 if not yet set.
 | 
			
		||||
  HARDWARE_VARIANT ?= arduino
 | 
			
		||||
  MCU              ?= atmega2560
 | 
			
		||||
  PROG_MCU         ?= m2560
 | 
			
		||||
 | 
			
		||||
  TOOL_PREFIX = avr
 | 
			
		||||
  MCU_FLAGS   = -mmcu=$(MCU)
 | 
			
		||||
@@ -536,27 +611,36 @@ VPATH += $(BUILD_DIR)
 | 
			
		||||
VPATH += $(HARDWARE_SRC)
 | 
			
		||||
 | 
			
		||||
ifeq ($(HARDWARE_VARIANT), $(filter $(HARDWARE_VARIANT),arduino Teensy Sanguino))
 | 
			
		||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/marlin/avr/libraries/LiquidCrystal/src
 | 
			
		||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/marlin/avr/libraries/SPI
 | 
			
		||||
  # Old libraries (avr-core 1.6.21 < / Arduino < 1.6.8)
 | 
			
		||||
  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
 | 
			
		||||
 | 
			
		||||
ifeq ($(IS_MCU),1)
 | 
			
		||||
  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/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/SoftwareSerial/src
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/LiquidCrystal/src
 | 
			
		||||
 | 
			
		||||
ifeq ($(LIQUID_TWI2), 1)
 | 
			
		||||
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire
 | 
			
		||||
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire/utility
 | 
			
		||||
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/LiquidTWI2
 | 
			
		||||
  WIRE   = 1
 | 
			
		||||
  VPATH += $(ARDUINO_INSTALL_DIR)/libraries/LiquidTWI2
 | 
			
		||||
endif
 | 
			
		||||
ifeq ($(WIRE), 1)
 | 
			
		||||
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire
 | 
			
		||||
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire/utility
 | 
			
		||||
  # Old libraries (avr-core 1.6.21 / Arduino < 1.6.8)
 | 
			
		||||
  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
 | 
			
		||||
ifeq ($(NEOPIXEL), 1)
 | 
			
		||||
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Adafruit_NeoPixel
 | 
			
		||||
@@ -628,13 +712,23 @@ ifeq ($(WIRE), 1)
 | 
			
		||||
  LIB_CXXSRC += Wire.cpp
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifeq ($(TONE), 1)
 | 
			
		||||
  LIB_CXXSRC += Tone.cpp
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifeq ($(U8GLIB), 1)
 | 
			
		||||
  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
 | 
			
		||||
  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
 | 
			
		||||
  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
 | 
			
		||||
 | 
			
		||||
ifeq ($(RELOC_WORKAROUND), 1)
 | 
			
		||||
@@ -676,7 +770,7 @@ REMOVE = rm -f
 | 
			
		||||
MV = mv -f
 | 
			
		||||
 | 
			
		||||
# Place -D or -U options here
 | 
			
		||||
CDEFS    = -DF_CPU=$(F_CPU) ${addprefix -D , $(DEFINES)} -DARDUINO=$(ARDUINO_VERSION)
 | 
			
		||||
CDEFS    = -DF_CPU=$(F_CPU)UL ${addprefix -D , $(DEFINES)} -DARDUINO=$(ARDUINO_VERSION)
 | 
			
		||||
CXXDEFS  = $(CDEFS)
 | 
			
		||||
 | 
			
		||||
ifeq ($(HARDWARE_VARIANT), Teensy)
 | 
			
		||||
@@ -685,8 +779,14 @@ ifeq ($(HARDWARE_VARIANT), Teensy)
 | 
			
		||||
  LIB_CXXSRC += usb_api.cpp
 | 
			
		||||
 | 
			
		||||
else ifeq ($(HARDWARE_VARIANT), archim)
 | 
			
		||||
  CDEFS      += -DARDUINO_SAM_ARCHIM -DARDUINO_ARCH_SAM -D__SAM3X8E__ -DUSB_VID=0x27b1 -DUSB_PID=0x0001 -DUSBCON '-DUSB_MANUFACTURER="UltiMachine"' '-DUSB_PRODUCT="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
 | 
			
		||||
  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)
 | 
			
		||||
@@ -712,16 +812,20 @@ CTUNING = -fsigned-char -funsigned-bitfields -fno-exceptions \
 | 
			
		||||
ifneq ($(HARDWARE_MOTHERBOARD),)
 | 
			
		||||
  CTUNING += -DMOTHERBOARD=${HARDWARE_MOTHERBOARD}
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
#CEXTRA = -Wa,-adhlns=$(<:.c=.lst)
 | 
			
		||||
CXXEXTRA = -fno-use-cxa-atexit -fno-threadsafe-statics -fno-rtti
 | 
			
		||||
CFLAGS := $(CDEBUG) $(CDEFS) $(CINCS) -O$(OPT) $(CEXTRA)   $(CTUNING) $(CSTANDARD)
 | 
			
		||||
CXXFLAGS :=         $(CDEFS) $(CINCS) -O$(OPT) $(CXXEXTRA) $(CTUNING) $(CXXSTANDARD)
 | 
			
		||||
ASFLAGS :=          $(CDEFS)
 | 
			
		||||
#ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs
 | 
			
		||||
 | 
			
		||||
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 -u _lseek -u _read -u _write -u _exit -u kill -u _getpid
 | 
			
		||||
 | 
			
		||||
  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
 | 
			
		||||
@@ -737,7 +841,7 @@ else
 | 
			
		||||
  AVRDUDE_CONF = $(ARDUINO_INSTALL_DIR)/hardware/tools/avr/etc/avrdude.conf
 | 
			
		||||
endif
 | 
			
		||||
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)
 | 
			
		||||
 | 
			
		||||
# Since Marlin 2.0, the source files may be distributed into several
 | 
			
		||||
@@ -852,7 +956,7 @@ extcoff: $(TARGET).elf
 | 
			
		||||
 | 
			
		||||
$(BUILD_DIR)/$(TARGET).elf: $(OBJ) Configuration.h
 | 
			
		||||
	$(Pecho) "  CXX   $@"
 | 
			
		||||
	$P $(CC) $(LD_PREFIX) $(ALL_CXXFLAGS) -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)
 | 
			
		||||
# in directories that mirror the structure of "src"
 | 
			
		||||
 
 | 
			
		||||
@@ -1,9 +1,8 @@
 | 
			
		||||
/*
 | 
			
		||||
================================================================================
 | 
			
		||||
/*==============================================================================
 | 
			
		||||
 | 
			
		||||
  Marlin Firmware
 | 
			
		||||
 | 
			
		||||
  (c) 2011-2019 MarlinFirmware
 | 
			
		||||
  (c) 2011-2020 MarlinFirmware
 | 
			
		||||
  Portions of Marlin are (c) by their respective authors.
 | 
			
		||||
  All code complies with GPLv2 and/or GPLv3
 | 
			
		||||
 | 
			
		||||
@@ -12,30 +11,33 @@
 | 
			
		||||
Greetings! Thank you for choosing Marlin 2 as your 3D printer firmware.
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
there's a more suitable starting-point for your specific hardware.
 | 
			
		||||
located in the root 'Marlin' folder. Check our Configurations repository to
 | 
			
		||||
see if there's a more suitable starting-point for your specific hardware.
 | 
			
		||||
 | 
			
		||||
Before diving in, we recommend the following essential links:
 | 
			
		||||
 | 
			
		||||
Marlin Firmware Official Website
 | 
			
		||||
 | 
			
		||||
  - http://marlinfw.org/
 | 
			
		||||
  - https://marlinfw.org/
 | 
			
		||||
    The official Marlin Firmware website contains the most up-to-date
 | 
			
		||||
    documentation. Contributions are always welcome!
 | 
			
		||||
 | 
			
		||||
Configuration
 | 
			
		||||
 | 
			
		||||
  - https://github.com/MarlinFirmware/Configurations
 | 
			
		||||
    Example configurations for several printer models.
 | 
			
		||||
 | 
			
		||||
  - https://www.youtube.com/watch?v=3gwWVFtdg-4
 | 
			
		||||
    A good 20-minute overview of Marlin configuration by Tom Sanladerer.
 | 
			
		||||
    (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
 | 
			
		||||
 | 
			
		||||
  - http://marlinfw.org/docs/configuration/configuration.html
 | 
			
		||||
  - https://marlinfw.org/docs/configuration/configuration.html
 | 
			
		||||
    Marlin's configuration options are explained in more detail here.
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
    users who may have experienced similar issues to your own.
 | 
			
		||||
 | 
			
		||||
@@ -45,9 +47,11 @@ Getting Help
 | 
			
		||||
 | 
			
		||||
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!
 | 
			
		||||
 | 
			
		||||
  - 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.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
------------------------------------------------------------------------------*/
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
#pragma once
 | 
			
		||||
@@ -28,20 +28,20 @@
 | 
			
		||||
/**
 | 
			
		||||
 * Marlin release version identifier
 | 
			
		||||
 */
 | 
			
		||||
//#define SHORT_BUILD_VERSION "2.0.5.3"
 | 
			
		||||
//#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 " (Github)"
 | 
			
		||||
//#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-01-31"
 | 
			
		||||
//#define STRING_DISTRIBUTION_DATE "2020-07-09"
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Defines a generic printer name to be output to the LCD after booting Marlin.
 | 
			
		||||
@@ -65,7 +65,7 @@
 | 
			
		||||
 * The WEBSITE_URL is the location where users can get more information such as
 | 
			
		||||
 * documentation about a specific Marlin release.
 | 
			
		||||
 */
 | 
			
		||||
//#define WEBSITE_URL "http://marlinfw.org"
 | 
			
		||||
//#define WEBSITE_URL "https://marlinfw.org"
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Set the vendor info the serial USB interface, if changable
 | 
			
		||||
 
 | 
			
		||||
@@ -33,4 +33,4 @@ PlatformIO will find your libraries automatically, configure preprocessor's
 | 
			
		||||
include paths and build them.
 | 
			
		||||
 | 
			
		||||
More information about PlatformIO Library Dependency Finder
 | 
			
		||||
- http://docs.platformio.org/page/librarymanager/ldf.html
 | 
			
		||||
- https://docs.platformio.org/page/librarymanager/ldf.html
 | 
			
		||||
 
 | 
			
		||||
@@ -16,10 +16,9 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifdef __AVR__
 | 
			
		||||
 | 
			
		||||
#include "../../inc/MarlinConfig.h"
 | 
			
		||||
 
 | 
			
		||||
@@ -14,7 +14,8 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
@@ -24,7 +25,7 @@
 | 
			
		||||
#include "watchdog.h"
 | 
			
		||||
#include "math.h"
 | 
			
		||||
 | 
			
		||||
#ifdef USBCON
 | 
			
		||||
#ifdef IS_AT90USB
 | 
			
		||||
  #include <HardwareSerial.h>
 | 
			
		||||
#else
 | 
			
		||||
  #define HardwareSerial_h // Hack to prevent HardwareSerial.h header inclusion
 | 
			
		||||
@@ -50,7 +51,11 @@
 | 
			
		||||
// Defines
 | 
			
		||||
// ------------------------
 | 
			
		||||
 | 
			
		||||
//#define analogInputToDigitalPin(IO) IO
 | 
			
		||||
// 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()
 | 
			
		||||
@@ -60,16 +65,10 @@
 | 
			
		||||
#define ENABLE_ISRS()  sei()
 | 
			
		||||
#define DISABLE_ISRS() cli()
 | 
			
		||||
 | 
			
		||||
// On AVR this is in math.h?
 | 
			
		||||
//#define square(x) ((x)*(x))
 | 
			
		||||
 | 
			
		||||
// ------------------------
 | 
			
		||||
// Types
 | 
			
		||||
// ------------------------
 | 
			
		||||
 | 
			
		||||
typedef uint16_t hal_timer_t;
 | 
			
		||||
#define HAL_TIMER_TYPE_MAX 0xFFFF
 | 
			
		||||
 | 
			
		||||
typedef int8_t pin_t;
 | 
			
		||||
 | 
			
		||||
#define SHARED_SERVOS HAS_SERVOS
 | 
			
		||||
@@ -82,44 +81,30 @@ typedef int8_t pin_t;
 | 
			
		||||
//extern uint8_t MCUSR;
 | 
			
		||||
 | 
			
		||||
// Serial ports
 | 
			
		||||
#ifdef USBCON
 | 
			
		||||
  #if ENABLED(BLUETOOTH)
 | 
			
		||||
    #define MYSERIAL0 bluetoothSerial
 | 
			
		||||
  #else
 | 
			
		||||
    #define MYSERIAL0 Serial
 | 
			
		||||
  #endif
 | 
			
		||||
  #define NUM_SERIAL 1
 | 
			
		||||
#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."
 | 
			
		||||
    #elif SERIAL_PORT_2 == SERIAL_PORT
 | 
			
		||||
      #error "SERIAL_PORT_2 must be different than SERIAL_PORT. Please update your configuration."
 | 
			
		||||
    #endif
 | 
			
		||||
    #define MYSERIAL1 customizedSerial2
 | 
			
		||||
    #define NUM_SERIAL 2
 | 
			
		||||
  #else
 | 
			
		||||
    #define NUM_SERIAL 1
 | 
			
		||||
  #endif
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef DGUS_SERIAL_PORT
 | 
			
		||||
  #if !WITHIN(DGUS_SERIAL_PORT, -1, 3)
 | 
			
		||||
    #error "DGUS_SERIAL_PORT must be from -1 to 3. Please update your configuration."
 | 
			
		||||
  #elif DGUS_SERIAL_PORT == SERIAL_PORT
 | 
			
		||||
    #error "DGUS_SERIAL_PORT must be different than SERIAL_PORT. Please update your configuration."
 | 
			
		||||
  #elif defined(SERIAL_PORT_2) && DGUS_SERIAL_PORT == SERIAL_PORT_2
 | 
			
		||||
    #error "DGUS_SERIAL_PORT must be different than SERIAL_PORT_2. Please update your configuration."
 | 
			
		||||
#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
 | 
			
		||||
  #define DGUS_SERIAL internalDgusSerial
 | 
			
		||||
 | 
			
		||||
  #define DGUS_SERIAL_GET_TX_BUFFER_FREE DGUS_SERIAL.get_tx_buffer_free
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
// ------------------------
 | 
			
		||||
@@ -135,6 +120,8 @@ void HAL_init();
 | 
			
		||||
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" {
 | 
			
		||||
@@ -142,220 +129,6 @@ extern "C" {
 | 
			
		||||
}
 | 
			
		||||
#pragma GCC diagnostic pop
 | 
			
		||||
 | 
			
		||||
// timers
 | 
			
		||||
#define HAL_TIMER_RATE          ((F_CPU) / 8)    // i.e., 2MHz or 2.5MHz
 | 
			
		||||
 | 
			
		||||
#define STEP_TIMER_NUM          1
 | 
			
		||||
#define TEMP_TIMER_NUM          0
 | 
			
		||||
#define PULSE_TIMER_NUM         STEP_TIMER_NUM
 | 
			
		||||
 | 
			
		||||
#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 */
 | 
			
		||||
#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()
 | 
			
		||||
 | 
			
		||||
/* 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()
 | 
			
		||||
 | 
			
		||||
// ADC
 | 
			
		||||
#ifdef DIDR2
 | 
			
		||||
  #define HAL_ANALOG_SELECT(ind) do{ if (ind < 8) SBI(DIDR0, ind); else SBI(DIDR2, ind & 0x07); }while(0)
 | 
			
		||||
@@ -378,6 +151,7 @@ inline void HAL_adc_init() {
 | 
			
		||||
  #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)
 | 
			
		||||
@@ -395,6 +169,8 @@ inline void HAL_adc_init() {
 | 
			
		||||
// 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
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
@@ -38,30 +38,34 @@
 | 
			
		||||
 | 
			
		||||
#include "../../inc/MarlinConfig.h"
 | 
			
		||||
 | 
			
		||||
#if !defined(USBCON) && (defined(UBRRH) || defined(UBRR0H) || defined(UBRR1H) || defined(UBRR2H) || defined(UBRR3H))
 | 
			
		||||
#if !IS_AT90USB && (defined(UBRRH) || defined(UBRR0H) || defined(UBRR1H) || defined(UBRR2H) || defined(UBRR3H))
 | 
			
		||||
 | 
			
		||||
  #include "MarlinSerial.h"
 | 
			
		||||
  #include "../../MarlinCore.h"
 | 
			
		||||
#include "MarlinSerial.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;
 | 
			
		||||
#if ENABLED(DIRECT_STEPPING)
 | 
			
		||||
  #include "../../feature/direct_stepping.h"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
  // A SW memory barrier, to ensure GCC does not overoptimize loops
 | 
			
		||||
  #define sw_barrier() asm volatile("": : :"memory");
 | 
			
		||||
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;
 | 
			
		||||
 | 
			
		||||
  #include "../../feature/e_parser.h"
 | 
			
		||||
// A SW memory barrier, to ensure GCC does not overoptimize loops
 | 
			
		||||
#define sw_barrier() asm volatile("": : :"memory");
 | 
			
		||||
 | 
			
		||||
  // "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() {
 | 
			
		||||
#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.
 | 
			
		||||
@@ -81,19 +85,19 @@
 | 
			
		||||
    // 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;
 | 
			
		||||
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) {
 | 
			
		||||
// 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;
 | 
			
		||||
@@ -110,27 +114,39 @@
 | 
			
		||||
  }
 | 
			
		||||
  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() {
 | 
			
		||||
// 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() {
 | 
			
		||||
// (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.
 | 
			
		||||
@@ -142,14 +158,6 @@
 | 
			
		||||
  // Get the next element
 | 
			
		||||
  ring_buffer_pos_t i = (ring_buffer_pos_t)(h + 1) & (ring_buffer_pos_t)(Cfg::RX_SIZE - 1);
 | 
			
		||||
 | 
			
		||||
    // 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 (Cfg::EMERGENCYPARSER) emergency_parser.update(emergency_state, c);
 | 
			
		||||
 | 
			
		||||
  // If the character is to be stored at the index just before the tail
 | 
			
		||||
@@ -267,11 +275,11 @@
 | 
			
		||||
 | 
			
		||||
  // 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() {
 | 
			
		||||
// (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;
 | 
			
		||||
@@ -320,11 +328,11 @@
 | 
			
		||||
    // 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) {
 | 
			
		||||
// Public Methods
 | 
			
		||||
template<typename Cfg>
 | 
			
		||||
void MarlinSerial<Cfg>::begin(const long baud) {
 | 
			
		||||
  uint16_t baud_setting;
 | 
			
		||||
  bool useU2X = true;
 | 
			
		||||
 | 
			
		||||
@@ -352,24 +360,24 @@
 | 
			
		||||
  B_RXCIE = 1;
 | 
			
		||||
  if (Cfg::TX_SIZE > 0) B_UDRIE = 0;
 | 
			
		||||
  _written = false;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
  template<typename Cfg>
 | 
			
		||||
  void MarlinSerial<Cfg>::end() {
 | 
			
		||||
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() {
 | 
			
		||||
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() {
 | 
			
		||||
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
 | 
			
		||||
@@ -409,16 +417,16 @@
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  return v;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
  template<typename Cfg>
 | 
			
		||||
  typename MarlinSerial<Cfg>::ring_buffer_pos_t MarlinSerial<Cfg>::available() {
 | 
			
		||||
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() {
 | 
			
		||||
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.)
 | 
			
		||||
@@ -443,10 +451,10 @@
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
  template<typename Cfg>
 | 
			
		||||
  void MarlinSerial<Cfg>::write(const uint8_t c) {
 | 
			
		||||
template<typename Cfg>
 | 
			
		||||
void MarlinSerial<Cfg>::write(const uint8_t c) {
 | 
			
		||||
  if (Cfg::TX_SIZE == 0) {
 | 
			
		||||
 | 
			
		||||
    _written = true;
 | 
			
		||||
@@ -502,10 +510,10 @@
 | 
			
		||||
    // Enable TX ISR - Non atomic, but it will eventually enable TX ISR
 | 
			
		||||
    B_UDRIE = 1;
 | 
			
		||||
  }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
  template<typename Cfg>
 | 
			
		||||
  void MarlinSerial<Cfg>::flushTX() {
 | 
			
		||||
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
 | 
			
		||||
@@ -546,34 +554,34 @@
 | 
			
		||||
    // 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) {
 | 
			
		||||
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) {
 | 
			
		||||
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) {
 | 
			
		||||
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) {
 | 
			
		||||
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) {
 | 
			
		||||
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; }
 | 
			
		||||
@@ -581,83 +589,83 @@
 | 
			
		||||
  }
 | 
			
		||||
  else
 | 
			
		||||
    printNumber(n, base);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
  template<typename Cfg>
 | 
			
		||||
  void MarlinSerial<Cfg>::print(unsigned long n, int 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) {
 | 
			
		||||
template<typename Cfg>
 | 
			
		||||
void MarlinSerial<Cfg>::print(double n, int digits) {
 | 
			
		||||
  printFloat(n, digits);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
  template<typename Cfg>
 | 
			
		||||
  void MarlinSerial<Cfg>::println() {
 | 
			
		||||
template<typename Cfg>
 | 
			
		||||
void MarlinSerial<Cfg>::println() {
 | 
			
		||||
  print('\r');
 | 
			
		||||
  print('\n');
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
  template<typename Cfg>
 | 
			
		||||
  void MarlinSerial<Cfg>::println(const String& s) {
 | 
			
		||||
template<typename Cfg>
 | 
			
		||||
void MarlinSerial<Cfg>::println(const String& s) {
 | 
			
		||||
  print(s);
 | 
			
		||||
  println();
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
  template<typename Cfg>
 | 
			
		||||
  void MarlinSerial<Cfg>::println(const char c[]) {
 | 
			
		||||
template<typename Cfg>
 | 
			
		||||
void MarlinSerial<Cfg>::println(const char c[]) {
 | 
			
		||||
  print(c);
 | 
			
		||||
  println();
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
  template<typename Cfg>
 | 
			
		||||
  void MarlinSerial<Cfg>::println(char c, int base) {
 | 
			
		||||
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) {
 | 
			
		||||
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) {
 | 
			
		||||
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) {
 | 
			
		||||
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) {
 | 
			
		||||
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) {
 | 
			
		||||
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) {
 | 
			
		||||
template<typename Cfg>
 | 
			
		||||
void MarlinSerial<Cfg>::println(double n, int digits) {
 | 
			
		||||
  print(n, digits);
 | 
			
		||||
  println();
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
  // Private Methods
 | 
			
		||||
// Private Methods
 | 
			
		||||
 | 
			
		||||
  template<typename Cfg>
 | 
			
		||||
  void MarlinSerial<Cfg>::printNumber(unsigned long n, uint8_t base) {
 | 
			
		||||
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;
 | 
			
		||||
@@ -670,10 +678,10 @@
 | 
			
		||||
  }
 | 
			
		||||
  else
 | 
			
		||||
    print('0');
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
  template<typename Cfg>
 | 
			
		||||
  void MarlinSerial<Cfg>::printFloat(double number, uint8_t digits) {
 | 
			
		||||
template<typename Cfg>
 | 
			
		||||
void MarlinSerial<Cfg>::printFloat(double number, uint8_t digits) {
 | 
			
		||||
  // Handle negative numbers
 | 
			
		||||
  if (number < 0.0) {
 | 
			
		||||
    print('-');
 | 
			
		||||
@@ -701,31 +709,31 @@
 | 
			
		||||
      remainder -= toPrint;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
  // Hookup ISR handlers
 | 
			
		||||
  ISR(SERIAL_REGNAME(USART,SERIAL_PORT,_RX_vect)) {
 | 
			
		||||
// 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)) {
 | 
			
		||||
ISR(SERIAL_REGNAME(USART, SERIAL_PORT, _UDRE_vect)) {
 | 
			
		||||
  MarlinSerial<MarlinSerialCfg<SERIAL_PORT>>::_tx_udr_empty_irq();
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
  // Preinstantiate
 | 
			
		||||
  template class MarlinSerial<MarlinSerialCfg<SERIAL_PORT>>;
 | 
			
		||||
// Preinstantiate
 | 
			
		||||
template class MarlinSerial<MarlinSerialCfg<SERIAL_PORT>>;
 | 
			
		||||
 | 
			
		||||
  // Instantiate
 | 
			
		||||
  MarlinSerial<MarlinSerialCfg<SERIAL_PORT>> customizedSerial1;
 | 
			
		||||
// Instantiate
 | 
			
		||||
MarlinSerial<MarlinSerialCfg<SERIAL_PORT>> customizedSerial1;
 | 
			
		||||
 | 
			
		||||
  #ifdef SERIAL_PORT_2
 | 
			
		||||
#ifdef SERIAL_PORT_2
 | 
			
		||||
 | 
			
		||||
  // Hookup ISR handlers
 | 
			
		||||
    ISR(SERIAL_REGNAME(USART,SERIAL_PORT_2,_RX_vect)) {
 | 
			
		||||
  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)) {
 | 
			
		||||
  ISR(SERIAL_REGNAME(USART, SERIAL_PORT_2, _UDRE_vect)) {
 | 
			
		||||
    MarlinSerial<MarlinSerialCfg<SERIAL_PORT_2>>::_tx_udr_empty_irq();
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@@ -735,30 +743,43 @@
 | 
			
		||||
  // Instantiate
 | 
			
		||||
  MarlinSerial<MarlinSerialCfg<SERIAL_PORT_2>> customizedSerial2;
 | 
			
		||||
 | 
			
		||||
  #endif
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#endif // !USBCON && (UBRRH || UBRR0H || UBRR1H || UBRR2H || UBRR3H)
 | 
			
		||||
#ifdef MMU2_SERIAL_PORT
 | 
			
		||||
 | 
			
		||||
#ifdef INTERNAL_SERIAL_PORT
 | 
			
		||||
 | 
			
		||||
  ISR(SERIAL_REGNAME(USART,INTERNAL_SERIAL_PORT,_RX_vect)) {
 | 
			
		||||
    MarlinSerial<MarlinInternalSerialCfg<INTERNAL_SERIAL_PORT>>::store_rxd_char();
 | 
			
		||||
  ISR(SERIAL_REGNAME(USART, MMU2_SERIAL_PORT, _RX_vect)) {
 | 
			
		||||
    MarlinSerial<MMU2SerialCfg<MMU2_SERIAL_PORT>>::store_rxd_char();
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  ISR(SERIAL_REGNAME(USART,INTERNAL_SERIAL_PORT,_UDRE_vect)) {
 | 
			
		||||
    MarlinSerial<MarlinInternalSerialCfg<INTERNAL_SERIAL_PORT>>::_tx_udr_empty_irq();
 | 
			
		||||
  ISR(SERIAL_REGNAME(USART, MMU2_SERIAL_PORT, _UDRE_vect)) {
 | 
			
		||||
    MarlinSerial<MMU2SerialCfg<MMU2_SERIAL_PORT>>::_tx_udr_empty_irq();
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  // Preinstantiate
 | 
			
		||||
  template class MarlinSerial<MarlinInternalSerialCfg<INTERNAL_SERIAL_PORT>>;
 | 
			
		||||
  template class MarlinSerial<MMU2SerialCfg<MMU2_SERIAL_PORT>>;
 | 
			
		||||
 | 
			
		||||
  // Instantiate
 | 
			
		||||
  MarlinSerial<MarlinInternalSerialCfg<INTERNAL_SERIAL_PORT>> internalSerial;
 | 
			
		||||
  MarlinSerial<MMU2SerialCfg<MMU2_SERIAL_PORT>> mmuSerial;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef DGUS_SERIAL_PORT
 | 
			
		||||
#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.
 | 
			
		||||
@@ -767,25 +788,14 @@
 | 
			
		||||
      if (ret < 0) ret += Cfg::TX_SIZE + 1;
 | 
			
		||||
      return ret;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  ISR(SERIAL_REGNAME(USART,DGUS_SERIAL_PORT,_RX_vect)) {
 | 
			
		||||
    MarlinSerial<MarlinInternalSerialCfg<DGUS_SERIAL_PORT>>::store_rxd_char();
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  ISR(SERIAL_REGNAME(USART,DGUS_SERIAL_PORT,_UDRE_vect)) {
 | 
			
		||||
    MarlinSerial<MarlinInternalSerialCfg<DGUS_SERIAL_PORT>>::_tx_udr_empty_irq();
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  // Preinstantiate
 | 
			
		||||
  template class MarlinSerial<MarlinInternalSerialCfg<DGUS_SERIAL_PORT>>;
 | 
			
		||||
 | 
			
		||||
  // Instantiate
 | 
			
		||||
  MarlinSerial<MarlinInternalSerialCfg<DGUS_SERIAL_PORT>> internalDgusSerial;
 | 
			
		||||
  #endif
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#endif // !IS_AT90USB && (UBRRH || UBRR0H || UBRR1H || UBRR2H || UBRR3H)
 | 
			
		||||
 | 
			
		||||
// For AT90USB targets use the UART for BT interfacing
 | 
			
		||||
#if defined(USBCON) && ENABLED(BLUETOOTH)
 | 
			
		||||
#if BOTH(IS_AT90USB, BLUETOOTH)
 | 
			
		||||
  HardwareSerial bluetoothSerial;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
#pragma once
 | 
			
		||||
@@ -48,11 +48,11 @@
 | 
			
		||||
 | 
			
		||||
  // 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_INTERNAL(registerbase,number,suffix)
 | 
			
		||||
  #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_INTERNAL(registerbase,number,suffix) registerbase##suffix
 | 
			
		||||
    #define _SERIAL_REGNAME(registerbase,number,suffix) registerbase##suffix
 | 
			
		||||
  #else
 | 
			
		||||
    #define SERIAL_REGNAME_INTERNAL(registerbase,number,suffix) registerbase##number##suffix
 | 
			
		||||
    #define _SERIAL_REGNAME(registerbase,number,suffix) registerbase##number##suffix
 | 
			
		||||
  #endif
 | 
			
		||||
 | 
			
		||||
  // Registers used by MarlinSerial class (expanded depending on selected serial port)
 | 
			
		||||
@@ -217,10 +217,12 @@
 | 
			
		||||
      static ring_buffer_pos_t available();
 | 
			
		||||
      static void write(const uint8_t c);
 | 
			
		||||
      static void flushTX();
 | 
			
		||||
      #ifdef DGUS_SERIAL_PORT
 | 
			
		||||
      #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; }
 | 
			
		||||
@@ -278,41 +280,53 @@
 | 
			
		||||
 | 
			
		||||
#endif // !USBCON
 | 
			
		||||
 | 
			
		||||
#ifdef INTERNAL_SERIAL_PORT
 | 
			
		||||
#ifdef MMU2_SERIAL_PORT
 | 
			
		||||
  template <uint8_t serial>
 | 
			
		||||
  struct MarlinInternalSerialCfg {
 | 
			
		||||
  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 XONOFF            = false;
 | 
			
		||||
    static constexpr bool EMERGENCYPARSER   = false;
 | 
			
		||||
    static constexpr bool DROPPED_RX        = false;
 | 
			
		||||
    static constexpr bool RX_OVERRUNS       = false;
 | 
			
		||||
    static constexpr bool RX_FRAMING_ERRORS = false;
 | 
			
		||||
    static constexpr bool MAX_RX_QUEUED     = false;
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  extern MarlinSerial<MarlinInternalSerialCfg<INTERNAL_SERIAL_PORT>> internalSerial;
 | 
			
		||||
  extern MarlinSerial<MMU2SerialCfg<MMU2_SERIAL_PORT>> mmuSerial;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef DGUS_SERIAL_PORT
 | 
			
		||||
#ifdef LCD_SERIAL_PORT
 | 
			
		||||
 | 
			
		||||
  template <uint8_t serial>
 | 
			
		||||
  struct MarlinInternalSerialCfg {
 | 
			
		||||
  struct LCDSerialCfg {
 | 
			
		||||
    static constexpr int PORT                 = serial;
 | 
			
		||||
    static constexpr unsigned int RX_SIZE   = 128;
 | 
			
		||||
    static constexpr unsigned int TX_SIZE   = 48;
 | 
			
		||||
    static constexpr bool XONOFF              = false;
 | 
			
		||||
    static constexpr bool EMERGENCYPARSER   = false;
 | 
			
		||||
    static constexpr bool EMERGENCYPARSER     = ENABLED(EMERGENCY_PARSER);
 | 
			
		||||
    static constexpr bool DROPPED_RX          = false;
 | 
			
		||||
    static constexpr bool RX_OVERRUNS       = HAS_DGUS_LCD && ENABLED(DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS);
 | 
			
		||||
    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<MarlinInternalSerialCfg<DGUS_SERIAL_PORT>> internalDgusSerial;
 | 
			
		||||
  extern MarlinSerial<LCDSerialCfg<LCD_SERIAL_PORT>> lcdSerial;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
// Use the UART for Bluetooth in AT90USB configurations
 | 
			
		||||
#if defined(USBCON) && ENABLED(BLUETOOTH)
 | 
			
		||||
#if BOTH(IS_AT90USB, BLUETOOTH)
 | 
			
		||||
  extern HardwareSerial bluetoothSerial;
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
@@ -48,7 +48,6 @@
 | 
			
		||||
 * 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__
 | 
			
		||||
@@ -59,7 +58,6 @@
 | 
			
		||||
 | 
			
		||||
#include <avr/interrupt.h>
 | 
			
		||||
 | 
			
		||||
#include "../shared/Marduino.h"
 | 
			
		||||
#include "../shared/servo.h"
 | 
			
		||||
#include "../shared/servo_private.h"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
#pragma once
 | 
			
		||||
@@ -59,11 +59,13 @@
 | 
			
		||||
// Say which 16 bit timers can be used and in what order
 | 
			
		||||
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
 | 
			
		||||
  //#define _useTimer1
 | 
			
		||||
  #define _useTimer3
 | 
			
		||||
  #define _useTimer4
 | 
			
		||||
  #if !HAS_MOTOR_CURRENT_PWM
 | 
			
		||||
  #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__)
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
#ifdef __AVR__
 | 
			
		||||
@@ -25,8 +25,17 @@
 | 
			
		||||
 | 
			
		||||
#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; }
 | 
			
		||||
 | 
			
		||||
@@ -46,7 +55,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
 | 
			
		||||
    crc16(crc, &v, 1);
 | 
			
		||||
    pos++;
 | 
			
		||||
    value++;
 | 
			
		||||
  };
 | 
			
		||||
  }
 | 
			
		||||
  return false;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -61,7 +70,5 @@ bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t
 | 
			
		||||
  return false;  // always assume success for AVR's
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
size_t PersistentStore::capacity() { return E2END + 1; }
 | 
			
		||||
 | 
			
		||||
#endif // EEPROM_SETTINGS || SD_FIRMWARE_UPDATE
 | 
			
		||||
#endif // __AVR__
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
#pragma once
 | 
			
		||||
 
 | 
			
		||||
@@ -16,14 +16,14 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
#ifdef __AVR__
 | 
			
		||||
 | 
			
		||||
#include "../../inc/MarlinConfigPre.h"
 | 
			
		||||
 | 
			
		||||
#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_PWM
 | 
			
		||||
#if NEEDS_HARDWARE_PWM // Specific meta-flag for features that mandate PWM
 | 
			
		||||
 | 
			
		||||
#include "HAL.h"
 | 
			
		||||
 | 
			
		||||
@@ -185,8 +185,8 @@ void set_pwm_frequency(const pin_t pin, int f_desired) {
 | 
			
		||||
        res_temp_phase_correct = rtf / 2;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      LIMIT(res_temp_fast, 1u, size);
 | 
			
		||||
      LIMIT(res_temp_phase_correct, 1u, size);
 | 
			
		||||
      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),
 | 
			
		||||
@@ -274,9 +274,9 @@ void set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v_size/*=255
 | 
			
		||||
    else
 | 
			
		||||
      top = *timer.ICRn; // top = ICRn
 | 
			
		||||
 | 
			
		||||
    _SET_OCRnQ(timer.OCRnQ, timer.q, v * float(top / v_size)); // Scale 8/16-bit v to top value
 | 
			
		||||
    _SET_OCRnQ(timer.OCRnQ, timer.q, v * float(top) / float(v_size)); // Scale 8/16-bit v to top value
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#endif // FAST_PWM_FAN || SPINDLE_LASER_PWM
 | 
			
		||||
#endif // NEEDS_HARDWARE_PWM
 | 
			
		||||
#endif // __AVR__
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
@@ -234,5 +234,55 @@ uint8_t extDigitalRead(const int8_t pin) {
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#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__
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
#pragma once
 | 
			
		||||
@@ -29,11 +29,17 @@
 | 
			
		||||
 | 
			
		||||
#include <avr/io.h>
 | 
			
		||||
 | 
			
		||||
#define AVR_AT90USB1286_FAMILY (defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1286P__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB646P__) || defined(__AVR_AT90USB647__))
 | 
			
		||||
#define AVR_ATmega1284_FAMILY (defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644PA__) || defined(__AVR_ATmega1284P__))
 | 
			
		||||
#define AVR_ATmega2560_FAMILY (defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__))
 | 
			
		||||
#define AVR_ATmega2561_FAMILY (defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__))
 | 
			
		||||
#define AVR_ATmega328_FAMILY (defined(__AVR_ATmega168__) || defined(__AVR_ATmega328__) || defined(__AVR_ATmega328P__))
 | 
			
		||||
#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
 | 
			
		||||
@@ -57,7 +63,7 @@
 | 
			
		||||
 *
 | 
			
		||||
 * Now you can simply SET_OUTPUT(PIN); WRITE(PIN, HIGH); WRITE(PIN, LOW);
 | 
			
		||||
 *
 | 
			
		||||
 * Why double up on these macros? see http://gcc.gnu.org/onlinedocs/cpp/Stringification.html
 | 
			
		||||
 * 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)
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
#pragma once
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
#pragma once
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
#pragma once
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
#pragma once
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
#pragma once
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,11 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * 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
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
#pragma once
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
#pragma once
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
#pragma once
 | 
			
		||||
@@ -25,16 +25,6 @@
 | 
			
		||||
 * Test AVR-specific configuration values for errors at compile-time.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Digipot requirement
 | 
			
		||||
 */
 | 
			
		||||
 #if ENABLED(DIGIPOT_MCP4018)
 | 
			
		||||
  #if !defined(DIGIPOTS_I2C_SDA_X) || !defined(DIGIPOTS_I2C_SDA_Y) || !defined(DIGIPOTS_I2C_SDA_Z) \
 | 
			
		||||
    || !defined(DIGIPOTS_I2C_SDA_E0) || !defined(DIGIPOTS_I2C_SDA_E1)
 | 
			
		||||
      #error "DIGIPOT_MCP4018 requires DIGIPOTS_I2C_SDA_* pins to be defined."
 | 
			
		||||
  #endif
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Checks for FAST PWM
 | 
			
		||||
 */
 | 
			
		||||
@@ -46,20 +36,23 @@
 | 
			
		||||
 * 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 && (WITHIN(SPINDLE_LASER_PWM_PIN, 2, 3) || SPINDLE_LASER_PWM_PIN == 5)
 | 
			
		||||
  #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 HAS_TRINAMIC_CONFIG && ENABLED(ENDSTOP_INTERRUPTS_FEATURE)
 | 
			
		||||
#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 HAS_TMC_SW_SERIAL && ENABLED(MONITOR_DRIVER_STATUS)
 | 
			
		||||
#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
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
#pragma once
 | 
			
		||||
 
 | 
			
		||||
@@ -13,7 +13,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
#pragma once
 | 
			
		||||
@@ -26,7 +26,9 @@
 | 
			
		||||
 | 
			
		||||
#define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS
 | 
			
		||||
 | 
			
		||||
#define AVR_ATmega2560_FAMILY_PLUS_70 MB(BQ_ZUM_MEGA_3D, MIGHTYBOARD_REVE, MINIRAMBO, SCOOVO_X9H)
 | 
			
		||||
#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
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -13,7 +13,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
#pragma once
 | 
			
		||||
 
 | 
			
		||||
@@ -13,7 +13,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
#pragma once
 | 
			
		||||
@@ -22,15 +22,12 @@
 | 
			
		||||
 * Structures for 2560 family boards that use more than 70 pins
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#undef NUM_DIGITAL_PINS
 | 
			
		||||
#if MB(BQ_ZUM_MEGA_3D)
 | 
			
		||||
#if MB(BQ_ZUM_MEGA_3D, MINIRAMBO, SCOOVO_X9H, TRIGORILLA_14)
 | 
			
		||||
  #undef NUM_DIGITAL_PINS
 | 
			
		||||
  #define NUM_DIGITAL_PINS            85
 | 
			
		||||
#elif MB(MIGHTYBOARD_REVE)
 | 
			
		||||
  #undef NUM_DIGITAL_PINS
 | 
			
		||||
  #define NUM_DIGITAL_PINS            80
 | 
			
		||||
#elif MB(MINIRAMBO)
 | 
			
		||||
  #define NUM_DIGITAL_PINS            85
 | 
			
		||||
#elif MB(SCOOVO_X9H)
 | 
			
		||||
  #define NUM_DIGITAL_PINS            85
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#define PA 1
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
#pragma once
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										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
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
@@ -57,7 +57,7 @@
 | 
			
		||||
 | 
			
		||||
#include "../../inc/MarlinConfigPre.h"
 | 
			
		||||
 | 
			
		||||
#if HAS_GRAPHICAL_LCD
 | 
			
		||||
#if HAS_MARLINUI_U8GLIB
 | 
			
		||||
 | 
			
		||||
#include "../shared/Marduino.h"
 | 
			
		||||
#include "../shared/Delay.h"
 | 
			
		||||
@@ -189,5 +189,5 @@ uint8_t u8g_com_HAL_AVR_sw_sp_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void
 | 
			
		||||
  return 1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#endif // HAS_GRAPHICAL_LCD
 | 
			
		||||
#endif // HAS_MARLINUI_U8GLIB
 | 
			
		||||
#endif // ARDUINO_ARCH_SAM
 | 
			
		||||
 
 | 
			
		||||
@@ -16,10 +16,9 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifdef __AVR__
 | 
			
		||||
 | 
			
		||||
#include "../../inc/MarlinConfig.h"
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
#pragma once
 | 
			
		||||
 
 | 
			
		||||
@@ -16,10 +16,9 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifdef ARDUINO_ARCH_SAM
 | 
			
		||||
 | 
			
		||||
#include "../../core/macros.h"
 | 
			
		||||
 
 | 
			
		||||
@@ -14,13 +14,12 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Description: HAL for Arduino Due and compatible (SAM3X8E)
 | 
			
		||||
 *
 | 
			
		||||
 * For ARDUINO_ARCH_SAM
 | 
			
		||||
 * HAL for Arduino Due and compatible (SAM3X8E)
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifdef ARDUINO_ARCH_SAM
 | 
			
		||||
 
 | 
			
		||||
@@ -16,81 +16,56 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Description: HAL for Arduino Due and compatible (SAM3X8E)
 | 
			
		||||
 *
 | 
			
		||||
 * For ARDUINO_ARCH_SAM
 | 
			
		||||
 * 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 "timers.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 SERIAL_PORT == 0
 | 
			
		||||
  #define MYSERIAL0 Serial
 | 
			
		||||
#elif SERIAL_PORT == 1
 | 
			
		||||
  #define MYSERIAL0 Serial1
 | 
			
		||||
#elif SERIAL_PORT == 2
 | 
			
		||||
  #define MYSERIAL0 Serial2
 | 
			
		||||
#elif SERIAL_PORT == 3
 | 
			
		||||
  #define MYSERIAL0 Serial3
 | 
			
		||||
#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 == SERIAL_PORT
 | 
			
		||||
    #error "SERIAL_PORT_2 must be different from SERIAL_PORT. Please update your configuration."
 | 
			
		||||
  #elif SERIAL_PORT_2 == -1 || ENABLED(EMERGENCY_PARSER)
 | 
			
		||||
  #if SERIAL_PORT_2 == -1 || ENABLED(EMERGENCY_PARSER)
 | 
			
		||||
    #define MYSERIAL1 customizedSerial2
 | 
			
		||||
  #elif SERIAL_PORT_2 == 0
 | 
			
		||||
    #define MYSERIAL1 Serial
 | 
			
		||||
  #elif SERIAL_PORT_2 == 1
 | 
			
		||||
    #define MYSERIAL1 Serial1
 | 
			
		||||
  #elif SERIAL_PORT_2 == 2
 | 
			
		||||
    #define MYSERIAL1 Serial2
 | 
			
		||||
  #elif SERIAL_PORT_2 == 3
 | 
			
		||||
    #define MYSERIAL1 Serial3
 | 
			
		||||
  #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
 | 
			
		||||
  #define NUM_SERIAL 2
 | 
			
		||||
#else
 | 
			
		||||
  #define NUM_SERIAL 1
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef DGUS_SERIAL_PORT
 | 
			
		||||
  #if DGUS_SERIAL_PORT == SERIAL_PORT
 | 
			
		||||
    #error "DGUS_SERIAL_PORT must be different from SERIAL_PORT. Please update your configuration."
 | 
			
		||||
  #elif defined(SERIAL_PORT_2) && DGUS_SERIAL_PORT == SERIAL_PORT_2
 | 
			
		||||
    #error "DGUS_SERIAL_PORT must be different than SERIAL_PORT_2. Please update your configuration."
 | 
			
		||||
  #elif DGUS_SERIAL_PORT == -1
 | 
			
		||||
    #define DGUS_SERIAL internalDgusSerial
 | 
			
		||||
  #elif DGUS_SERIAL_PORT == 0
 | 
			
		||||
    #define DGUS_SERIAL Serial
 | 
			
		||||
  #elif DGUS_SERIAL_PORT == 1
 | 
			
		||||
    #define DGUS_SERIAL Serial1
 | 
			
		||||
  #elif DGUS_SERIAL_PORT == 2
 | 
			
		||||
    #define DGUS_SERIAL Serial2
 | 
			
		||||
  #elif DGUS_SERIAL_PORT == 3
 | 
			
		||||
    #define DGUS_SERIAL Serial3
 | 
			
		||||
#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 "DGUS_SERIAL_PORT must be from -1 to 3. Please update your configuration."
 | 
			
		||||
    #error "LCD_SERIAL_PORT must be from -1 to 3. Please update your configuration."
 | 
			
		||||
  #endif
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@@ -130,13 +105,7 @@ void sei();                     // Enable interrupts
 | 
			
		||||
void HAL_clear_reset_source();  // clear reset reason
 | 
			
		||||
uint8_t HAL_get_reset_source(); // get reset reason
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// EEPROM
 | 
			
		||||
//
 | 
			
		||||
void eeprom_write_byte(uint8_t *pos, unsigned char value);
 | 
			
		||||
uint8_t eeprom_read_byte(uint8_t *pos);
 | 
			
		||||
void eeprom_read_block (void *__dst, const void *__src, size_t __n);
 | 
			
		||||
void eeprom_update_block (const void *__src, void *__dst, size_t __n);
 | 
			
		||||
inline void HAL_reboot() {}  // reboot the board or restart the bootloader
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// ADC
 | 
			
		||||
@@ -144,15 +113,16 @@ void eeprom_update_block (const void *__src, void *__dst, size_t __n);
 | 
			
		||||
extern uint16_t HAL_adc_result;     // result of last ADC conversion
 | 
			
		||||
 | 
			
		||||
#ifndef analogInputToDigitalPin
 | 
			
		||||
  #define analogInputToDigitalPin(p) ((p < 12u) ? (p) + 54u : -1)
 | 
			
		||||
  #define analogInputToDigitalPin(p) ((p < 12U) ? (p) + 54U : -1)
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#define HAL_ANALOG_SELECT(ch)
 | 
			
		||||
 | 
			
		||||
inline void HAL_adc_init() {}//todo
 | 
			
		||||
 | 
			
		||||
#define HAL_START_ADC(ch)   HAL_adc_start_conversion(ch)
 | 
			
		||||
#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
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
@@ -30,7 +30,7 @@
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Description: HAL for Arduino Due and compatible (SAM3X8E)
 | 
			
		||||
 * HAL for Arduino Due and compatible (SAM3X8E)
 | 
			
		||||
 *
 | 
			
		||||
 * For ARDUINO_ARCH_SAM
 | 
			
		||||
 */
 | 
			
		||||
@@ -595,7 +595,7 @@
 | 
			
		||||
      SPI_Enable(SPI0);
 | 
			
		||||
 | 
			
		||||
      SET_OUTPUT(DAC0_SYNC);
 | 
			
		||||
      #if EXTRUDERS > 1
 | 
			
		||||
      #if HAS_MULTI_EXTRUDER
 | 
			
		||||
        SET_OUTPUT(DAC1_SYNC);
 | 
			
		||||
        WRITE(DAC1_SYNC, HIGH);
 | 
			
		||||
      #endif
 | 
			
		||||
@@ -759,7 +759,6 @@
 | 
			
		||||
     *
 | 
			
		||||
     *  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)
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
#pragma once
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
#pragma once
 | 
			
		||||
@@ -122,6 +122,8 @@ public:
 | 
			
		||||
  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; }
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
@@ -73,9 +73,7 @@ int MarlinSerialUSB::peek() {
 | 
			
		||||
 | 
			
		||||
  pending_char = udi_cdc_getc();
 | 
			
		||||
 | 
			
		||||
  #if ENABLED(EMERGENCY_PARSER)
 | 
			
		||||
    emergency_parser.update(emergency_state, (char)pending_char);
 | 
			
		||||
  #endif
 | 
			
		||||
  TERN_(EMERGENCY_PARSER, emergency_parser.update(emergency_state, (char)pending_char));
 | 
			
		||||
 | 
			
		||||
  return pending_char;
 | 
			
		||||
}
 | 
			
		||||
@@ -97,9 +95,7 @@ int MarlinSerialUSB::read() {
 | 
			
		||||
 | 
			
		||||
  int c = udi_cdc_getc();
 | 
			
		||||
 | 
			
		||||
  #if ENABLED(EMERGENCY_PARSER)
 | 
			
		||||
    emergency_parser.update(emergency_state, (char)c);
 | 
			
		||||
  #endif
 | 
			
		||||
  TERN_(EMERGENCY_PARSER, emergency_parser.update(emergency_state, (char)c));
 | 
			
		||||
 | 
			
		||||
  return c;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
#pragma once
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
@@ -44,7 +44,6 @@
 | 
			
		||||
 | 
			
		||||
#if HAS_SERVOS
 | 
			
		||||
 | 
			
		||||
#include "../shared/Marduino.h"
 | 
			
		||||
#include "../shared/servo.h"
 | 
			
		||||
#include "../shared/servo_private.h"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -18,20 +18,19 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Description: Tone function for Arduino Due and compatible (SAM3X8E)
 | 
			
		||||
 * Derived from http://forum.arduino.cc/index.php?topic=136500.msg2903012#msg2903012
 | 
			
		||||
 * Derived from https://forum.arduino.cc/index.php?topic=136500.msg2903012#msg2903012
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifdef ARDUINO_ARCH_SAM
 | 
			
		||||
 | 
			
		||||
#include "../../inc/MarlinConfig.h"
 | 
			
		||||
#include "HAL.h"
 | 
			
		||||
#include "timers.h"
 | 
			
		||||
 | 
			
		||||
static pin_t tone_pin;
 | 
			
		||||
volatile static int32_t toggles;
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
@@ -52,14 +52,13 @@
 | 
			
		||||
 * 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_GRAPHICAL_LCD
 | 
			
		||||
#if HAS_MARLINUI_U8GLIB
 | 
			
		||||
 | 
			
		||||
#include <U8glib.h>
 | 
			
		||||
 | 
			
		||||
@@ -145,6 +144,6 @@ uint8_t u8g_com_HAL_DUE_shared_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_va
 | 
			
		||||
  return 1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#endif // HAS_GRAPHICAL_LCD
 | 
			
		||||
#endif // HAS_MARLINUI_U8GLIB
 | 
			
		||||
 | 
			
		||||
#endif //__SAM3X8E__
 | 
			
		||||
#endif // __SAM3X8E__
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
@@ -57,7 +57,7 @@
 | 
			
		||||
 | 
			
		||||
#include "../../../inc/MarlinConfigPre.h"
 | 
			
		||||
 | 
			
		||||
#if HAS_GRAPHICAL_LCD && DISABLED(U8GLIB_ST7920)
 | 
			
		||||
#if HAS_MARLINUI_U8GLIB && DISABLED(U8GLIB_ST7920)
 | 
			
		||||
 | 
			
		||||
#undef SPI_SPEED
 | 
			
		||||
#define SPI_SPEED 2  // About 2 MHz
 | 
			
		||||
@@ -144,5 +144,5 @@ uint8_t u8g_com_HAL_DUE_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void
 | 
			
		||||
  return 1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#endif // HAS_GRAPHICAL_LCD && !U8GLIB_ST7920
 | 
			
		||||
#endif // HAS_MARLINUI_U8GLIB && !U8GLIB_ST7920
 | 
			
		||||
#endif // ARDUINO_ARCH_SAM
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
@@ -57,7 +57,7 @@
 | 
			
		||||
 | 
			
		||||
#include "../../../inc/MarlinConfigPre.h"
 | 
			
		||||
 | 
			
		||||
#if HAS_GRAPHICAL_LCD
 | 
			
		||||
#if HAS_MARLINUI_U8GLIB
 | 
			
		||||
 | 
			
		||||
#include "../../shared/Delay.h"
 | 
			
		||||
 | 
			
		||||
@@ -108,5 +108,5 @@ void u8g_spiSend_sw_DUE_mode_3(uint8_t val) { // 3.5MHz
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#endif // HAS_GRAPHICAL_LCD
 | 
			
		||||
#endif // HAS_MARLINUI_U8GLIB
 | 
			
		||||
#endif // ARDUINO_ARCH_SAM
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
#pragma once
 | 
			
		||||
 
 | 
			
		||||
@@ -1,9 +1,10 @@
 | 
			
		||||
/**
 | 
			
		||||
 * 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
 | 
			
		||||
 * 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
 | 
			
		||||
@@ -16,9 +17,14 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
#ifdef ARDUINO_ARCH_SAM
 | 
			
		||||
 | 
			
		||||
#include "../../inc/MarlinConfig.h"
 | 
			
		||||
 | 
			
		||||
#if ENABLED(FLASH_EEPROM_EMULATION)
 | 
			
		||||
 | 
			
		||||
/* EEPROM emulation over flash with reduced wear
 | 
			
		||||
 *
 | 
			
		||||
@@ -47,22 +53,14 @@
 | 
			
		||||
 * per page. We can't emulate EE endurance with FLASH for all
 | 
			
		||||
 * bytes, but we can emulate endurance for a given percent of
 | 
			
		||||
 * bytes.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifdef ARDUINO_ARCH_SAM
 | 
			
		||||
 | 
			
		||||
#include "../../inc/MarlinConfig.h"
 | 
			
		||||
 | 
			
		||||
#if ENABLED(FLASH_EEPROM_EMULATION)
 | 
			
		||||
 | 
			
		||||
#include "../shared/Marduino.h"
 | 
			
		||||
#include "../shared/eeprom_api.h"
 | 
			
		||||
//#define EE_EMU_DEBUG
 | 
			
		||||
 | 
			
		||||
#define EEPROMSize     4096
 | 
			
		||||
#define PagesPerGroup   128
 | 
			
		||||
#define GroupCount        2
 | 
			
		||||
#define PageSize        256u
 | 
			
		||||
#define PageSize        256U
 | 
			
		||||
 | 
			
		||||
 /* Flash storage */
 | 
			
		||||
typedef struct FLASH_SECTOR {
 | 
			
		||||
@@ -134,15 +132,18 @@ static uint8_t buffer[256] = {0},   // The RAM buffer to accumulate writes
 | 
			
		||||
               curPage = 0,         // Current FLASH page inside the group
 | 
			
		||||
               curGroup = 0xFF;     // Current FLASH group
 | 
			
		||||
 | 
			
		||||
//#define EE_EMU_DEBUG
 | 
			
		||||
#ifdef EE_EMU_DEBUG
 | 
			
		||||
  static void ee_Dump(int page,const void* data) {
 | 
			
		||||
#define DEBUG_OUT ENABLED(EE_EMU_DEBUG)
 | 
			
		||||
#include "../../core/debug_out.h"
 | 
			
		||||
 | 
			
		||||
static void ee_Dump(const int page, const void* data) {
 | 
			
		||||
 | 
			
		||||
  #ifdef EE_EMU_DEBUG
 | 
			
		||||
 | 
			
		||||
    const uint8_t* c = (const uint8_t*) data;
 | 
			
		||||
    char buffer[80];
 | 
			
		||||
 | 
			
		||||
    sprintf_P(buffer, PSTR("Page: %d (0x%04x)\n"), page, page);
 | 
			
		||||
    SERIAL_ECHO(buffer);
 | 
			
		||||
    DEBUG_ECHO(buffer);
 | 
			
		||||
 | 
			
		||||
    char* p = &buffer[0];
 | 
			
		||||
    for (int i = 0; i< PageSize; ++i) {
 | 
			
		||||
@@ -152,12 +153,16 @@ static uint8_t buffer[256] = {0},   // The RAM buffer to accumulate writes
 | 
			
		||||
      if ((i & 0xF) == 0xF) {
 | 
			
		||||
        *p++ = '\n';
 | 
			
		||||
        *p = 0;
 | 
			
		||||
        SERIAL_ECHO(buffer);
 | 
			
		||||
        DEBUG_ECHO(buffer);
 | 
			
		||||
        p = &buffer[0];
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
  #else
 | 
			
		||||
    UNUSED(page);
 | 
			
		||||
    UNUSED(data);
 | 
			
		||||
  #endif
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Flash Writing Protection Key */
 | 
			
		||||
#define FWP_KEY    0x5Au
 | 
			
		||||
@@ -170,17 +175,16 @@ static uint8_t buffer[256] = {0},   // The RAM buffer to accumulate writes
 | 
			
		||||
  #define EEFC_ERROR_FLAGS  (EEFC_FSR_FLOCKE | EEFC_FSR_FCMDE)
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Writes the contents of the specified page (no previous erase)
 | 
			
		||||
 * @param page    (page #)
 | 
			
		||||
 * @param data    (pointer to the data buffer)
 | 
			
		||||
 */
 | 
			
		||||
__attribute__ ((long_call, section (".ramfunc")))
 | 
			
		||||
static bool ee_PageWrite(uint16_t page,const void* data) {
 | 
			
		||||
static bool ee_PageWrite(uint16_t page, const void* data) {
 | 
			
		||||
 | 
			
		||||
  uint16_t i;
 | 
			
		||||
  uint32_t addrflash = ((uint32_t)getFlashStorage(page));
 | 
			
		||||
  uint32_t addrflash = uint32_t(getFlashStorage(page));
 | 
			
		||||
 | 
			
		||||
  // Read the flash contents
 | 
			
		||||
  uint32_t pageContents[PageSize>>2];
 | 
			
		||||
@@ -195,13 +199,11 @@ static bool ee_PageWrite(uint16_t page,const void* data) {
 | 
			
		||||
  for (i = 0; i <PageSize >> 2; i++)
 | 
			
		||||
    pageContents[i] = (((uint32_t*)data)[i]) | (~(pageContents[i] ^ ((uint32_t*)data)[i]));
 | 
			
		||||
 | 
			
		||||
  #ifdef EE_EMU_DEBUG
 | 
			
		||||
    SERIAL_ECHO_START();
 | 
			
		||||
    SERIAL_ECHOLNPAIR("EEPROM PageWrite   ", page);
 | 
			
		||||
    SERIAL_ECHOLNPAIR(" in FLASH address ", (uint32_t)addrflash);
 | 
			
		||||
    SERIAL_ECHOLNPAIR(" base address     ", (uint32_t)getFlashStorage(0));
 | 
			
		||||
    SERIAL_FLUSH();
 | 
			
		||||
  #endif
 | 
			
		||||
  DEBUG_ECHO_START();
 | 
			
		||||
  DEBUG_ECHOLNPAIR("EEPROM PageWrite   ", page);
 | 
			
		||||
  DEBUG_ECHOLNPAIR(" in FLASH address ", (uint32_t)addrflash);
 | 
			
		||||
  DEBUG_ECHOLNPAIR(" base address     ", (uint32_t)getFlashStorage(0));
 | 
			
		||||
  DEBUG_FLUSH();
 | 
			
		||||
 | 
			
		||||
  // Get the page relative to the start of the EFC controller, and the EFC controller to use
 | 
			
		||||
  Efc *efc;
 | 
			
		||||
@@ -243,10 +245,8 @@ static bool ee_PageWrite(uint16_t page,const void* data) {
 | 
			
		||||
    // Reenable interrupts
 | 
			
		||||
    __enable_irq();
 | 
			
		||||
 | 
			
		||||
    #ifdef EE_EMU_DEBUG
 | 
			
		||||
      SERIAL_ECHO_START();
 | 
			
		||||
      SERIAL_ECHOLNPAIR("EEPROM Unlock failure for page ", page);
 | 
			
		||||
    #endif
 | 
			
		||||
    DEBUG_ECHO_START();
 | 
			
		||||
    DEBUG_ECHOLNPAIR("EEPROM Unlock failure for page ", page);
 | 
			
		||||
    return false;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@@ -270,10 +270,9 @@ static bool ee_PageWrite(uint16_t page,const void* data) {
 | 
			
		||||
    // Reenable interrupts
 | 
			
		||||
    __enable_irq();
 | 
			
		||||
 | 
			
		||||
    #ifdef EE_EMU_DEBUG
 | 
			
		||||
      SERIAL_ECHO_START();
 | 
			
		||||
      SERIAL_ECHOLNPAIR("EEPROM Write failure for page ", page);
 | 
			
		||||
    #endif
 | 
			
		||||
    DEBUG_ECHO_START();
 | 
			
		||||
    DEBUG_ECHOLNPAIR("EEPROM Write failure for page ", page);
 | 
			
		||||
 | 
			
		||||
    return false;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@@ -287,11 +286,11 @@ static bool ee_PageWrite(uint16_t page,const void* data) {
 | 
			
		||||
  if (memcmp(getFlashStorage(page),data,PageSize)) {
 | 
			
		||||
 | 
			
		||||
    #ifdef EE_EMU_DEBUG
 | 
			
		||||
      SERIAL_ECHO_START();
 | 
			
		||||
      SERIAL_ECHOLNPAIR("EEPROM Verify Write failure for page ", page);
 | 
			
		||||
      DEBUG_ECHO_START();
 | 
			
		||||
      DEBUG_ECHOLNPAIR("EEPROM Verify Write failure for page ", page);
 | 
			
		||||
 | 
			
		||||
      ee_Dump( page,(uint32_t *) addrflash);
 | 
			
		||||
      ee_Dump(-page,data);
 | 
			
		||||
      ee_Dump( page, (uint32_t *)addrflash);
 | 
			
		||||
      ee_Dump(-page, data);
 | 
			
		||||
 | 
			
		||||
      // Calculate count of changed bits
 | 
			
		||||
      uint32_t* p1 = (uint32_t*)addrflash;
 | 
			
		||||
@@ -307,7 +306,7 @@ static bool ee_PageWrite(uint16_t page,const void* data) {
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
      SERIAL_ECHOLNPAIR("--> Differing bits: ", count);
 | 
			
		||||
      DEBUG_ECHOLNPAIR("--> Differing bits: ", count);
 | 
			
		||||
    #endif
 | 
			
		||||
 | 
			
		||||
    return false;
 | 
			
		||||
@@ -324,15 +323,13 @@ __attribute__ ((long_call, section (".ramfunc")))
 | 
			
		||||
static bool ee_PageErase(uint16_t page) {
 | 
			
		||||
 | 
			
		||||
  uint16_t i;
 | 
			
		||||
  uint32_t addrflash = ((uint32_t)getFlashStorage(page));
 | 
			
		||||
  uint32_t addrflash = uint32_t(getFlashStorage(page));
 | 
			
		||||
 | 
			
		||||
  #ifdef EE_EMU_DEBUG
 | 
			
		||||
    SERIAL_ECHO_START();
 | 
			
		||||
    SERIAL_ECHOLNPAIR("EEPROM PageErase  ", page);
 | 
			
		||||
    SERIAL_ECHOLNPAIR(" in FLASH address ", (uint32_t)addrflash);
 | 
			
		||||
    SERIAL_ECHOLNPAIR(" base address     ", (uint32_t)getFlashStorage(0));
 | 
			
		||||
    SERIAL_FLUSH();
 | 
			
		||||
  #endif
 | 
			
		||||
  DEBUG_ECHO_START();
 | 
			
		||||
  DEBUG_ECHOLNPAIR("EEPROM PageErase  ", page);
 | 
			
		||||
  DEBUG_ECHOLNPAIR(" in FLASH address ", (uint32_t)addrflash);
 | 
			
		||||
  DEBUG_ECHOLNPAIR(" base address     ", (uint32_t)getFlashStorage(0));
 | 
			
		||||
  DEBUG_FLUSH();
 | 
			
		||||
 | 
			
		||||
  // Get the page relative to the start of the EFC controller, and the EFC controller to use
 | 
			
		||||
  Efc *efc;
 | 
			
		||||
@@ -373,10 +370,9 @@ static bool ee_PageErase(uint16_t page) {
 | 
			
		||||
    // Reenable interrupts
 | 
			
		||||
    __enable_irq();
 | 
			
		||||
 | 
			
		||||
    #ifdef EE_EMU_DEBUG
 | 
			
		||||
      SERIAL_ECHO_START();
 | 
			
		||||
      SERIAL_ECHOLNPAIR("EEPROM Unlock failure for page ",page);
 | 
			
		||||
    #endif
 | 
			
		||||
    DEBUG_ECHO_START();
 | 
			
		||||
    DEBUG_ECHOLNPAIR("EEPROM Unlock failure for page ",page);
 | 
			
		||||
 | 
			
		||||
    return false;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@@ -398,10 +394,9 @@ static bool ee_PageErase(uint16_t page) {
 | 
			
		||||
    // Reenable interrupts
 | 
			
		||||
    __enable_irq();
 | 
			
		||||
 | 
			
		||||
    #ifdef EE_EMU_DEBUG
 | 
			
		||||
      SERIAL_ECHO_START();
 | 
			
		||||
      SERIAL_ECHOLNPAIR("EEPROM Erase failure for page ",page);
 | 
			
		||||
    #endif
 | 
			
		||||
    DEBUG_ECHO_START();
 | 
			
		||||
    DEBUG_ECHOLNPAIR("EEPROM Erase failure for page ",page);
 | 
			
		||||
 | 
			
		||||
    return false;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@@ -415,20 +410,17 @@ static bool ee_PageErase(uint16_t page) {
 | 
			
		||||
  uint32_t * aligned_src = (uint32_t *) addrflash;
 | 
			
		||||
  for (i = 0; i < PageSize >> 2; i++) {
 | 
			
		||||
    if (*aligned_src++ != 0xFFFFFFFF) {
 | 
			
		||||
 | 
			
		||||
      #ifdef EE_EMU_DEBUG
 | 
			
		||||
        SERIAL_ECHO_START();
 | 
			
		||||
        SERIAL_ECHOLNPAIR("EEPROM Verify Erase failure for page ",page);
 | 
			
		||||
 | 
			
		||||
        ee_Dump( page,(uint32_t *) addrflash);
 | 
			
		||||
      #endif
 | 
			
		||||
      DEBUG_ECHO_START();
 | 
			
		||||
      DEBUG_ECHOLNPAIR("EEPROM Verify Erase failure for page ",page);
 | 
			
		||||
      ee_Dump(page, (uint32_t *)addrflash);
 | 
			
		||||
      return false;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  return true;
 | 
			
		||||
}
 | 
			
		||||
static uint8_t ee_Read(uint32_t address, bool excludeRAMBuffer = false) {
 | 
			
		||||
 | 
			
		||||
static uint8_t ee_Read(uint32_t address, bool excludeRAMBuffer=false) {
 | 
			
		||||
 | 
			
		||||
  uint32_t baddr;
 | 
			
		||||
  uint32_t blen;
 | 
			
		||||
@@ -511,7 +503,7 @@ static uint8_t ee_Read(uint32_t address, bool excludeRAMBuffer = false) {
 | 
			
		||||
  return 0xFF;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static uint32_t ee_GetAddrRange(uint32_t address, bool excludeRAMBuffer = false) {
 | 
			
		||||
static uint32_t ee_GetAddrRange(uint32_t address, bool excludeRAMBuffer=false) {
 | 
			
		||||
  uint32_t baddr,
 | 
			
		||||
           blen,
 | 
			
		||||
           nextAddr = 0xFFFF,
 | 
			
		||||
@@ -603,7 +595,7 @@ static bool ee_IsPageClean(int page) {
 | 
			
		||||
  return true;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static bool ee_Flush(uint32_t overrideAddress = 0xFFFFFFFF, uint8_t overrideData = 0xFF) {
 | 
			
		||||
static bool ee_Flush(uint32_t overrideAddress = 0xFFFFFFFF, uint8_t overrideData=0xFF) {
 | 
			
		||||
 | 
			
		||||
  // Check if RAM buffer has something to be written
 | 
			
		||||
  bool isEmpty = true;
 | 
			
		||||
@@ -929,11 +921,9 @@ static void ee_Init() {
 | 
			
		||||
  // If all groups seem to be used, default to first group
 | 
			
		||||
  if (curGroup >= GroupCount) curGroup = 0;
 | 
			
		||||
 | 
			
		||||
  #ifdef EE_EMU_DEBUG
 | 
			
		||||
    SERIAL_ECHO_START();
 | 
			
		||||
    SERIAL_ECHOLNPAIR("EEPROM Current Group: ",curGroup);
 | 
			
		||||
    SERIAL_FLUSH();
 | 
			
		||||
  #endif
 | 
			
		||||
  DEBUG_ECHO_START();
 | 
			
		||||
  DEBUG_ECHOLNPAIR("EEPROM Current Group: ",curGroup);
 | 
			
		||||
  DEBUG_FLUSH();
 | 
			
		||||
 | 
			
		||||
  // Now, validate that all the other group pages are empty
 | 
			
		||||
  for (int grp = 0; grp < GroupCount; grp++) {
 | 
			
		||||
@@ -941,11 +931,9 @@ static void ee_Init() {
 | 
			
		||||
 | 
			
		||||
    for (int page = 0; page < PagesPerGroup; page++) {
 | 
			
		||||
      if (!ee_IsPageClean(grp * PagesPerGroup + page)) {
 | 
			
		||||
        #ifdef EE_EMU_DEBUG
 | 
			
		||||
          SERIAL_ECHO_START();
 | 
			
		||||
          SERIAL_ECHOLNPAIR("EEPROM Page ", page, " not clean on group ", grp);
 | 
			
		||||
          SERIAL_FLUSH();
 | 
			
		||||
        #endif
 | 
			
		||||
        DEBUG_ECHO_START();
 | 
			
		||||
        DEBUG_ECHOLNPAIR("EEPROM Page ", page, " not clean on group ", grp);
 | 
			
		||||
        DEBUG_FLUSH();
 | 
			
		||||
        ee_PageErase(grp * PagesPerGroup + page);
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
@@ -955,66 +943,69 @@ static void ee_Init() {
 | 
			
		||||
  // and also validate that all the other ones are clean
 | 
			
		||||
  for (curPage = 0; curPage < PagesPerGroup; curPage++) {
 | 
			
		||||
    if (ee_IsPageClean(curGroup * PagesPerGroup + curPage)) {
 | 
			
		||||
      #ifdef EE_EMU_DEBUG
 | 
			
		||||
      ee_Dump(curGroup * PagesPerGroup + curPage, getFlashStorage(curGroup * PagesPerGroup + curPage));
 | 
			
		||||
      #endif
 | 
			
		||||
      break;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  #ifdef EE_EMU_DEBUG
 | 
			
		||||
    SERIAL_ECHO_START();
 | 
			
		||||
    SERIAL_ECHOLNPAIR("EEPROM Active page: ", curPage);
 | 
			
		||||
    SERIAL_FLUSH();
 | 
			
		||||
  #endif
 | 
			
		||||
  DEBUG_ECHO_START();
 | 
			
		||||
  DEBUG_ECHOLNPAIR("EEPROM Active page: ", curPage);
 | 
			
		||||
  DEBUG_FLUSH();
 | 
			
		||||
 | 
			
		||||
  // Make sure the pages following the first clean one are also clean
 | 
			
		||||
  for (int page = curPage + 1; page < PagesPerGroup; page++) {
 | 
			
		||||
    if (!ee_IsPageClean(curGroup * PagesPerGroup + page)) {
 | 
			
		||||
      #ifdef EE_EMU_DEBUG
 | 
			
		||||
        SERIAL_ECHO_START();
 | 
			
		||||
        SERIAL_ECHOLNPAIR("EEPROM Page ", page, " not clean on active group ", curGroup);
 | 
			
		||||
        SERIAL_FLUSH();
 | 
			
		||||
      DEBUG_ECHO_START();
 | 
			
		||||
      DEBUG_ECHOLNPAIR("EEPROM Page ", page, " not clean on active group ", curGroup);
 | 
			
		||||
      DEBUG_FLUSH();
 | 
			
		||||
      ee_Dump(curGroup * PagesPerGroup + page, getFlashStorage(curGroup * PagesPerGroup + page));
 | 
			
		||||
      #endif
 | 
			
		||||
      ee_PageErase(curGroup * PagesPerGroup + page);
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
uint8_t eeprom_read_byte(uint8_t* addr) {
 | 
			
		||||
  ee_Init();
 | 
			
		||||
  return ee_Read((uint32_t)addr);
 | 
			
		||||
}
 | 
			
		||||
/* PersistentStore -----------------------------------------------------------*/
 | 
			
		||||
 | 
			
		||||
void eeprom_write_byte(uint8_t* addr, uint8_t value) {
 | 
			
		||||
  ee_Init();
 | 
			
		||||
  ee_Write((uint32_t)addr, value);
 | 
			
		||||
}
 | 
			
		||||
#include "../shared/eeprom_api.h"
 | 
			
		||||
 | 
			
		||||
void eeprom_update_block(const void* __src, void* __dst, size_t __n) {
 | 
			
		||||
  uint8_t* dst = (uint8_t*)__dst;
 | 
			
		||||
  const uint8_t* src = (const uint8_t*)__src;
 | 
			
		||||
  while (__n--) {
 | 
			
		||||
    eeprom_write_byte(dst, *src);
 | 
			
		||||
    ++dst;
 | 
			
		||||
    ++src;
 | 
			
		||||
#ifndef MARLIN_EEPROM_SIZE
 | 
			
		||||
  #define MARLIN_EEPROM_SIZE 0x1000 // 4KB
 | 
			
		||||
#endif
 | 
			
		||||
size_t PersistentStore::capacity()    { return MARLIN_EEPROM_SIZE; }
 | 
			
		||||
bool PersistentStore::access_start()  { ee_Init();  return true; }
 | 
			
		||||
bool PersistentStore::access_finish() { ee_Flush(); 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 != ee_Read(uint32_t(p))) {
 | 
			
		||||
      ee_Write(uint32_t(p), v);
 | 
			
		||||
      delay(2);
 | 
			
		||||
      if (ee_Read(uint32_t(p)) != v) {
 | 
			
		||||
        SERIAL_ECHO_MSG(STR_ERR_EEPROM_WRITE);
 | 
			
		||||
        return true;
 | 
			
		||||
      }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void eeprom_read_block(void* __dst, const void* __src, size_t __n) {
 | 
			
		||||
  uint8_t* dst = (uint8_t*)__dst;
 | 
			
		||||
  uint8_t* src = (uint8_t*)__src;
 | 
			
		||||
  while (__n--) {
 | 
			
		||||
    *dst = eeprom_read_byte(src);
 | 
			
		||||
    ++dst;
 | 
			
		||||
    ++src;
 | 
			
		||||
    }
 | 
			
		||||
    crc16(crc, &v, 1);
 | 
			
		||||
    pos++;
 | 
			
		||||
    value++;
 | 
			
		||||
  }
 | 
			
		||||
  return false;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void eeprom_flush() {
 | 
			
		||||
  ee_Flush();
 | 
			
		||||
bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
 | 
			
		||||
  do {
 | 
			
		||||
    uint8_t c = ee_Read(uint32_t(pos));
 | 
			
		||||
    if (writing) *value = c;
 | 
			
		||||
    crc16(crc, &c, 1);
 | 
			
		||||
    pos++;
 | 
			
		||||
    value++;
 | 
			
		||||
  } while (--size);
 | 
			
		||||
  return false;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#endif // FLASH_EEPROM_EMULATION
 | 
			
		||||
#endif // ARDUINO_ARCH_AVR
 | 
			
		||||
#endif // ARDUINO_ARCH_SAM
 | 
			
		||||
@@ -17,32 +17,29 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
#ifdef ARDUINO_ARCH_SAM
 | 
			
		||||
 | 
			
		||||
#include "../../inc/MarlinConfigPre.h"
 | 
			
		||||
 | 
			
		||||
#if ENABLED(EEPROM_SETTINGS)
 | 
			
		||||
 | 
			
		||||
#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"
 | 
			
		||||
 | 
			
		||||
#if !defined(E2END) && ENABLED(FLASH_EEPROM_EMULATION)
 | 
			
		||||
  #define E2END 0xFFF // Default to Flash emulated EEPROM size (EepromEmulation_Due.cpp)
 | 
			
		||||
#ifndef MARLIN_EEPROM_SIZE
 | 
			
		||||
  #error "MARLIN_EEPROM_SIZE is required for I2C / SPI EEPROM."
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
extern void eeprom_flush();
 | 
			
		||||
 | 
			
		||||
bool PersistentStore::access_start() { return true; }
 | 
			
		||||
 | 
			
		||||
bool PersistentStore::access_finish() {
 | 
			
		||||
  #if ENABLED(FLASH_EEPROM_EMULATION)
 | 
			
		||||
    eeprom_flush();
 | 
			
		||||
  #endif
 | 
			
		||||
  return true;
 | 
			
		||||
}
 | 
			
		||||
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--) {
 | 
			
		||||
@@ -61,7 +58,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
 | 
			
		||||
    crc16(crc, &v, 1);
 | 
			
		||||
    pos++;
 | 
			
		||||
    value++;
 | 
			
		||||
  };
 | 
			
		||||
  }
 | 
			
		||||
  return false;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -76,7 +73,5 @@ bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t
 | 
			
		||||
  return false;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
size_t PersistentStore::capacity() { return E2END + 1; }
 | 
			
		||||
 | 
			
		||||
#endif // EEPROM_SETTINGS
 | 
			
		||||
#endif // USE_WIRED_EEPROM
 | 
			
		||||
#endif // ARDUINO_ARCH_SAM
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
#pragma once
 | 
			
		||||
@@ -47,43 +47,21 @@ void endstop_ISR() { endstops.update(); }
 | 
			
		||||
 | 
			
		||||
void setup_endstop_interrupts() {
 | 
			
		||||
  #define _ATTACH(P) attachInterrupt(digitalPinToInterrupt(P), endstop_ISR, CHANGE)
 | 
			
		||||
  #if HAS_X_MAX
 | 
			
		||||
    _ATTACH(X_MAX_PIN);
 | 
			
		||||
  #endif
 | 
			
		||||
  #if HAS_X_MIN
 | 
			
		||||
    _ATTACH(X_MIN_PIN);
 | 
			
		||||
  #endif
 | 
			
		||||
  #if HAS_Y_MAX
 | 
			
		||||
    _ATTACH(Y_MAX_PIN);
 | 
			
		||||
  #endif
 | 
			
		||||
  #if HAS_Y_MIN
 | 
			
		||||
    _ATTACH(Y_MIN_PIN);
 | 
			
		||||
  #endif
 | 
			
		||||
  #if HAS_Z_MAX
 | 
			
		||||
    _ATTACH(Z_MAX_PIN);
 | 
			
		||||
  #endif
 | 
			
		||||
  #if HAS_Z_MIN
 | 
			
		||||
     _ATTACH(Z_MIN_PIN);
 | 
			
		||||
  #endif
 | 
			
		||||
  #if HAS_Z2_MAX
 | 
			
		||||
    _ATTACH(Z2_MAX_PIN);
 | 
			
		||||
  #endif
 | 
			
		||||
  #if HAS_Z2_MIN
 | 
			
		||||
    _ATTACH(Z2_MIN_PIN);
 | 
			
		||||
  #endif
 | 
			
		||||
  #if HAS_Z3_MAX
 | 
			
		||||
    _ATTACH(Z3_MAX_PIN);
 | 
			
		||||
  #endif
 | 
			
		||||
  #if HAS_Z3_MIN
 | 
			
		||||
    _ATTACH(Z3_MIN_PIN);
 | 
			
		||||
  #endif
 | 
			
		||||
  #if HAS_Z4_MAX
 | 
			
		||||
    _ATTACH(Z4_MAX_PIN);
 | 
			
		||||
  #endif
 | 
			
		||||
  #if HAS_Z4_MIN
 | 
			
		||||
    _ATTACH(Z4_MIN_PIN);
 | 
			
		||||
  #endif
 | 
			
		||||
  #if HAS_Z_MIN_PROBE_PIN
 | 
			
		||||
    _ATTACH(Z_MIN_PROBE_PIN);
 | 
			
		||||
  #endif
 | 
			
		||||
  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));
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
#pragma once
 | 
			
		||||
@@ -58,7 +58,7 @@
 | 
			
		||||
 *
 | 
			
		||||
 * Now you can simply SET_OUTPUT(STEP); WRITE(STEP, HIGH); WRITE(STEP, LOW);
 | 
			
		||||
 *
 | 
			
		||||
 * Why double up on these macros? see http://gcc.gnu.org/onlinedocs/cpp/Stringification.html
 | 
			
		||||
 * Why double up on these macros? see https://gcc.gnu.org/onlinedocs/cpp/Stringification.html
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
// Read a pin
 | 
			
		||||
@@ -174,7 +174,7 @@
 | 
			
		||||
#define IS_OUTPUT(IO)        ((digitalPinToPort(IO)->PIO_OSR & digitalPinToBitMask(IO)) != 0)
 | 
			
		||||
 | 
			
		||||
// Shorthand
 | 
			
		||||
#define OUT_WRITE(IO,V)       { SET_OUTPUT(IO); WRITE(IO,V); }
 | 
			
		||||
#define OUT_WRITE(IO,V)      do{ SET_OUTPUT(IO); WRITE(IO,V); }while(0)
 | 
			
		||||
 | 
			
		||||
// digitalRead/Write wrappers
 | 
			
		||||
#define extDigitalRead(IO)    digitalRead(IO)
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
@@ -154,7 +154,7 @@ void Stepper::digipot_init() {
 | 
			
		||||
  NVIC_SetPriority(PWM_IRQn, NVIC_EncodePriority(0, 10, 0));  // normal priority for PWM module (can stand some jitter on the Vref signals)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void Stepper::digipot_current(const uint8_t driver, const int16_t current) {
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
#pragma once
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
#pragma once
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,11 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * 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
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
#pragma once
 | 
			
		||||
 
 | 
			
		||||
@@ -16,13 +16,13 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#if USE_FALLBACK_EEPROM
 | 
			
		||||
  #undef SRAM_EEPROM_EMULATION
 | 
			
		||||
  #undef SDCARD_EEPROM_EMULATION
 | 
			
		||||
  #define FLASH_EEPROM_EMULATION
 | 
			
		||||
#elif EITHER(I2C_EEPROM, SPI_EEPROM)
 | 
			
		||||
  #define USE_SHARED_EEPROM 1
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
#pragma once
 | 
			
		||||
@@ -52,8 +52,8 @@
 | 
			
		||||
  #endif
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if ENABLED(FAST_PWM_FAN)
 | 
			
		||||
  #error "FAST_PWM_FAN is not yet implemented for this platform."
 | 
			
		||||
#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
 | 
			
		||||
 
 | 
			
		||||
@@ -13,7 +13,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
@@ -179,5 +179,4 @@ void pwm_details(int32_t pin) {
 | 
			
		||||
 * ----------------+--------
 | 
			
		||||
 *  ID             |  PB11
 | 
			
		||||
 *  VBOF           |  PB10
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
#pragma once
 | 
			
		||||
 
 | 
			
		||||
@@ -16,14 +16,12 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Description: HAL for Arduino Due and compatible (SAM3X8E)
 | 
			
		||||
 *
 | 
			
		||||
 * For ARDUINO_ARCH_SAM
 | 
			
		||||
 * HAL Timers for Arduino Due and compatible (SAM3X8E)
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifdef ARDUINO_ARCH_SAM
 | 
			
		||||
@@ -34,8 +32,6 @@
 | 
			
		||||
#include "../../inc/MarlinConfig.h"
 | 
			
		||||
#include "HAL.h"
 | 
			
		||||
 | 
			
		||||
#include "timers.h"
 | 
			
		||||
 | 
			
		||||
// ------------------------
 | 
			
		||||
// Local defines
 | 
			
		||||
// ------------------------
 | 
			
		||||
 
 | 
			
		||||
@@ -15,15 +15,13 @@
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License
 | 
			
		||||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * HAL for Arduino Due and compatible (SAM3X8E)
 | 
			
		||||
 *
 | 
			
		||||
 * For ARDUINO_ARCH_SAM
 | 
			
		||||
 * HAL Timers for Arduino Due and compatible (SAM3X8E)
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include <stdint.h>
 | 
			
		||||
@@ -40,11 +38,17 @@ typedef uint32_t hal_timer_t;
 | 
			
		||||
#define HAL_TIMER_RATE         ((F_CPU) / 2)    // frequency of timers peripherals
 | 
			
		||||
 | 
			
		||||
#ifndef STEP_TIMER_NUM
 | 
			
		||||
#define STEP_TIMER_NUM 2  // index of timer to use for stepper
 | 
			
		||||
  #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_NUM 4  // index of timer to use for temperature
 | 
			
		||||
#define PULSE_TIMER_NUM STEP_TIMER_NUM
 | 
			
		||||
#define TONE_TIMER_NUM 6  // index of timer to use for beeper tones
 | 
			
		||||
 | 
			
		||||
#define TEMP_TIMER_FREQUENCY   1000 // temperature interrupt frequency
 | 
			
		||||
 | 
			
		||||
@@ -66,8 +70,12 @@ typedef uint32_t hal_timer_t;
 | 
			
		||||
#ifndef HAL_STEP_TIMER_ISR
 | 
			
		||||
  #define HAL_STEP_TIMER_ISR() void TC2_Handler()
 | 
			
		||||
#endif
 | 
			
		||||
#define HAL_TEMP_TIMER_ISR()  void TC4_Handler()
 | 
			
		||||
#define HAL_TONE_TIMER_ISR()  void TC6_Handler()
 | 
			
		||||
#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
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										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"
 | 
			
		||||
	)
 | 
			
		||||
@@ -43,7 +43,7 @@
 | 
			
		||||
#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>
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@@ -93,5 +93,5 @@
 | 
			
		||||
#define USB_VBOF_GPIO               (PIO_PB10_IDX)
 | 
			
		||||
#define USB_VBOF_FLAGS              (PIO_PERIPH_A | PIO_DEFAULT)
 | 
			
		||||
/*! Active level of the USB_VBOF output pin. */
 | 
			
		||||
#define USB_VBOF_ACTIVE_LEVEL       LOW
 | 
			
		||||
#define USB_VBOF_ACTIVE_STATE       LOW
 | 
			
		||||
/* ------------------------------------------------------------------------ */
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
@@ -609,37 +609,37 @@ typedef struct
 | 
			
		||||
#   define clz(u)              ((u) ? __CLZ(u) : 32)
 | 
			
		||||
#else
 | 
			
		||||
#   define clz(u)              (((u) == 0)          ? 32 : \
 | 
			
		||||
                                ((u) & (1ul << 31)) ?  0 : \
 | 
			
		||||
                                ((u) & (1ul << 30)) ?  1 : \
 | 
			
		||||
                                ((u) & (1ul << 29)) ?  2 : \
 | 
			
		||||
                                ((u) & (1ul << 28)) ?  3 : \
 | 
			
		||||
                                ((u) & (1ul << 27)) ?  4 : \
 | 
			
		||||
                                ((u) & (1ul << 26)) ?  5 : \
 | 
			
		||||
                                ((u) & (1ul << 25)) ?  6 : \
 | 
			
		||||
                                ((u) & (1ul << 24)) ?  7 : \
 | 
			
		||||
                                ((u) & (1ul << 23)) ?  8 : \
 | 
			
		||||
                                ((u) & (1ul << 22)) ?  9 : \
 | 
			
		||||
                                ((u) & (1ul << 21)) ? 10 : \
 | 
			
		||||
                                ((u) & (1ul << 20)) ? 11 : \
 | 
			
		||||
                                ((u) & (1ul << 19)) ? 12 : \
 | 
			
		||||
                                ((u) & (1ul << 18)) ? 13 : \
 | 
			
		||||
                                ((u) & (1ul << 17)) ? 14 : \
 | 
			
		||||
                                ((u) & (1ul << 16)) ? 15 : \
 | 
			
		||||
                                ((u) & (1ul << 15)) ? 16 : \
 | 
			
		||||
                                ((u) & (1ul << 14)) ? 17 : \
 | 
			
		||||
                                ((u) & (1ul << 13)) ? 18 : \
 | 
			
		||||
                                ((u) & (1ul << 12)) ? 19 : \
 | 
			
		||||
                                ((u) & (1ul << 11)) ? 20 : \
 | 
			
		||||
                                ((u) & (1ul << 10)) ? 21 : \
 | 
			
		||||
                                ((u) & (1ul <<  9)) ? 22 : \
 | 
			
		||||
                                ((u) & (1ul <<  8)) ? 23 : \
 | 
			
		||||
                                ((u) & (1ul <<  7)) ? 24 : \
 | 
			
		||||
                                ((u) & (1ul <<  6)) ? 25 : \
 | 
			
		||||
                                ((u) & (1ul <<  5)) ? 26 : \
 | 
			
		||||
                                ((u) & (1ul <<  4)) ? 27 : \
 | 
			
		||||
                                ((u) & (1ul <<  3)) ? 28 : \
 | 
			
		||||
                                ((u) & (1ul <<  2)) ? 29 : \
 | 
			
		||||
                                ((u) & (1ul <<  1)) ? 30 : \
 | 
			
		||||
                                ((u) & (1UL << 31)) ?  0 : \
 | 
			
		||||
                                ((u) & (1UL << 30)) ?  1 : \
 | 
			
		||||
                                ((u) & (1UL << 29)) ?  2 : \
 | 
			
		||||
                                ((u) & (1UL << 28)) ?  3 : \
 | 
			
		||||
                                ((u) & (1UL << 27)) ?  4 : \
 | 
			
		||||
                                ((u) & (1UL << 26)) ?  5 : \
 | 
			
		||||
                                ((u) & (1UL << 25)) ?  6 : \
 | 
			
		||||
                                ((u) & (1UL << 24)) ?  7 : \
 | 
			
		||||
                                ((u) & (1UL << 23)) ?  8 : \
 | 
			
		||||
                                ((u) & (1UL << 22)) ?  9 : \
 | 
			
		||||
                                ((u) & (1UL << 21)) ? 10 : \
 | 
			
		||||
                                ((u) & (1UL << 20)) ? 11 : \
 | 
			
		||||
                                ((u) & (1UL << 19)) ? 12 : \
 | 
			
		||||
                                ((u) & (1UL << 18)) ? 13 : \
 | 
			
		||||
                                ((u) & (1UL << 17)) ? 14 : \
 | 
			
		||||
                                ((u) & (1UL << 16)) ? 15 : \
 | 
			
		||||
                                ((u) & (1UL << 15)) ? 16 : \
 | 
			
		||||
                                ((u) & (1UL << 14)) ? 17 : \
 | 
			
		||||
                                ((u) & (1UL << 13)) ? 18 : \
 | 
			
		||||
                                ((u) & (1UL << 12)) ? 19 : \
 | 
			
		||||
                                ((u) & (1UL << 11)) ? 20 : \
 | 
			
		||||
                                ((u) & (1UL << 10)) ? 21 : \
 | 
			
		||||
                                ((u) & (1UL <<  9)) ? 22 : \
 | 
			
		||||
                                ((u) & (1UL <<  8)) ? 23 : \
 | 
			
		||||
                                ((u) & (1UL <<  7)) ? 24 : \
 | 
			
		||||
                                ((u) & (1UL <<  6)) ? 25 : \
 | 
			
		||||
                                ((u) & (1UL <<  5)) ? 26 : \
 | 
			
		||||
                                ((u) & (1UL <<  4)) ? 27 : \
 | 
			
		||||
                                ((u) & (1UL <<  3)) ? 28 : \
 | 
			
		||||
                                ((u) & (1UL <<  2)) ? 29 : \
 | 
			
		||||
                                ((u) & (1UL <<  1)) ? 30 : \
 | 
			
		||||
                                31)
 | 
			
		||||
#endif
 | 
			
		||||
#endif
 | 
			
		||||
@@ -654,38 +654,38 @@ typedef struct
 | 
			
		||||
#if (defined __GNUC__) || (defined __CC_ARM)
 | 
			
		||||
#   define ctz(u)              ((u) ? __builtin_ctz(u) : 32)
 | 
			
		||||
#else
 | 
			
		||||
#   define ctz(u)              ((u) & (1ul <<  0) ?  0 : \
 | 
			
		||||
                                (u) & (1ul <<  1) ?  1 : \
 | 
			
		||||
                                (u) & (1ul <<  2) ?  2 : \
 | 
			
		||||
                                (u) & (1ul <<  3) ?  3 : \
 | 
			
		||||
                                (u) & (1ul <<  4) ?  4 : \
 | 
			
		||||
                                (u) & (1ul <<  5) ?  5 : \
 | 
			
		||||
                                (u) & (1ul <<  6) ?  6 : \
 | 
			
		||||
                                (u) & (1ul <<  7) ?  7 : \
 | 
			
		||||
                                (u) & (1ul <<  8) ?  8 : \
 | 
			
		||||
                                (u) & (1ul <<  9) ?  9 : \
 | 
			
		||||
                                (u) & (1ul << 10) ? 10 : \
 | 
			
		||||
                                (u) & (1ul << 11) ? 11 : \
 | 
			
		||||
                                (u) & (1ul << 12) ? 12 : \
 | 
			
		||||
                                (u) & (1ul << 13) ? 13 : \
 | 
			
		||||
                                (u) & (1ul << 14) ? 14 : \
 | 
			
		||||
                                (u) & (1ul << 15) ? 15 : \
 | 
			
		||||
                                (u) & (1ul << 16) ? 16 : \
 | 
			
		||||
                                (u) & (1ul << 17) ? 17 : \
 | 
			
		||||
                                (u) & (1ul << 18) ? 18 : \
 | 
			
		||||
                                (u) & (1ul << 19) ? 19 : \
 | 
			
		||||
                                (u) & (1ul << 20) ? 20 : \
 | 
			
		||||
                                (u) & (1ul << 21) ? 21 : \
 | 
			
		||||
                                (u) & (1ul << 22) ? 22 : \
 | 
			
		||||
                                (u) & (1ul << 23) ? 23 : \
 | 
			
		||||
                                (u) & (1ul << 24) ? 24 : \
 | 
			
		||||
                                (u) & (1ul << 25) ? 25 : \
 | 
			
		||||
                                (u) & (1ul << 26) ? 26 : \
 | 
			
		||||
                                (u) & (1ul << 27) ? 27 : \
 | 
			
		||||
                                (u) & (1ul << 28) ? 28 : \
 | 
			
		||||
                                (u) & (1ul << 29) ? 29 : \
 | 
			
		||||
                                (u) & (1ul << 30) ? 30 : \
 | 
			
		||||
                                (u) & (1ul << 31) ? 31 : \
 | 
			
		||||
#   define ctz(u)              ((u) & (1UL <<  0) ?  0 : \
 | 
			
		||||
                                (u) & (1UL <<  1) ?  1 : \
 | 
			
		||||
                                (u) & (1UL <<  2) ?  2 : \
 | 
			
		||||
                                (u) & (1UL <<  3) ?  3 : \
 | 
			
		||||
                                (u) & (1UL <<  4) ?  4 : \
 | 
			
		||||
                                (u) & (1UL <<  5) ?  5 : \
 | 
			
		||||
                                (u) & (1UL <<  6) ?  6 : \
 | 
			
		||||
                                (u) & (1UL <<  7) ?  7 : \
 | 
			
		||||
                                (u) & (1UL <<  8) ?  8 : \
 | 
			
		||||
                                (u) & (1UL <<  9) ?  9 : \
 | 
			
		||||
                                (u) & (1UL << 10) ? 10 : \
 | 
			
		||||
                                (u) & (1UL << 11) ? 11 : \
 | 
			
		||||
                                (u) & (1UL << 12) ? 12 : \
 | 
			
		||||
                                (u) & (1UL << 13) ? 13 : \
 | 
			
		||||
                                (u) & (1UL << 14) ? 14 : \
 | 
			
		||||
                                (u) & (1UL << 15) ? 15 : \
 | 
			
		||||
                                (u) & (1UL << 16) ? 16 : \
 | 
			
		||||
                                (u) & (1UL << 17) ? 17 : \
 | 
			
		||||
                                (u) & (1UL << 18) ? 18 : \
 | 
			
		||||
                                (u) & (1UL << 19) ? 19 : \
 | 
			
		||||
                                (u) & (1UL << 20) ? 20 : \
 | 
			
		||||
                                (u) & (1UL << 21) ? 21 : \
 | 
			
		||||
                                (u) & (1UL << 22) ? 22 : \
 | 
			
		||||
                                (u) & (1UL << 23) ? 23 : \
 | 
			
		||||
                                (u) & (1UL << 24) ? 24 : \
 | 
			
		||||
                                (u) & (1UL << 25) ? 25 : \
 | 
			
		||||
                                (u) & (1UL << 26) ? 26 : \
 | 
			
		||||
                                (u) & (1UL << 27) ? 27 : \
 | 
			
		||||
                                (u) & (1UL << 28) ? 28 : \
 | 
			
		||||
                                (u) & (1UL << 29) ? 29 : \
 | 
			
		||||
                                (u) & (1UL << 30) ? 30 : \
 | 
			
		||||
                                (u) & (1UL << 31) ? 31 : \
 | 
			
		||||
                                32)
 | 
			
		||||
#endif
 | 
			
		||||
#endif
 | 
			
		||||
@@ -1112,8 +1112,7 @@ static inline uint32_t convert_byte_array_to_32_bit(uint8_t *data)
 | 
			
		||||
    uint8_t u8[8];
 | 
			
		||||
  }long_addr;
 | 
			
		||||
  uint8_t index;
 | 
			
		||||
	for (index = 0; index < 4; index++)
 | 
			
		||||
	{
 | 
			
		||||
  for (index = 0; index < 4; index++) {
 | 
			
		||||
    long_addr.u8[index] = *data++;
 | 
			
		||||
  }
 | 
			
		||||
  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_
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
 
 | 
			
		||||
@@ -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_USB_H_
 | 
			
		||||
@@ -78,10 +78,6 @@
 | 
			
		||||
//! To define a Full speed device
 | 
			
		||||
//#define USB_DEVICE_FULL_SPEED
 | 
			
		||||
 | 
			
		||||
#if MB(ARCHIM1)
 | 
			
		||||
  #define USB_DEVICE_FULL_SPEED
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
//! To authorize the High speed
 | 
			
		||||
#ifndef USB_DEVICE_FULL_SPEED
 | 
			
		||||
  #if (UC3A3||UC3A4)
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
 
 | 
			
		||||
@@ -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_
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
 
 | 
			
		||||
@@ -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 _PREPROCESSOR_H_
 | 
			
		||||
 
 | 
			
		||||
@@ -52,7 +52,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 _SBC_PROTOCOL_H_
 | 
			
		||||
#define _SBC_PROTOCOL_H_
 | 
			
		||||
 
 | 
			
		||||
@@ -42,7 +42,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>
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -45,7 +45,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 _SPC_PROTOCOL_H_
 | 
			
		||||
#define _SPC_PROTOCOL_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 _STRINGZ_H_
 | 
			
		||||
 
 | 
			
		||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user