Compare commits
803 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 04acb12148 | |||
| cfe5bf2929 | |||
| a131edd6ff | |||
| ed60c3c68b | |||
| 4051eae885 | |||
| 0a07bba213 | |||
| 2f4f2bce15 | |||
| 0d87dd9d51 | |||
| e11a5ee717 | |||
| e8c0363051 | |||
| 2d6454b352 | |||
| 28548efa75 | |||
| da0bef50e1 | |||
| b954959f55 | |||
| 434bf81f8e | |||
| 82d3d78e31 | |||
| fb4d465360 | |||
| 3827ceaf66 | |||
| 6ba08130f0 | |||
| 78f871567f | |||
| 9e30173b13 | |||
| f0bd400002 | |||
| 0fa3d2642a | |||
| 4cf4647c9a | |||
| 5766dc0ece | |||
| 01990f2bf4 | |||
| d74ee8ccc4 | |||
| 953b6844ca | |||
| e6ccf3b72b | |||
| d9229ff355 | |||
| ee35929b61 | |||
| 07b979012a | |||
| 126e78dcce | |||
| e02de3a256 | |||
| 97a7c2160e | |||
| caf5d5b134 | |||
| 05a46084b6 | |||
| e676d833a3 | |||
| 73a0f33767 | |||
| e787c8f26b | |||
| 147dcaf600 | |||
| dd3bf2995b | |||
| 142177426b | |||
| 072b90d105 | |||
| efba06c4ce | |||
| 2cc35a9ad1 | |||
| b748506230 | |||
| c3a4ef77af | |||
| 86c1fde309 | |||
| 89def456e8 | |||
| 0518737119 | |||
| 12b3f18bb2 | |||
| 4d0c6841f8 | |||
| 99c3a7136d | |||
| cd3997f045 | |||
| 479074ccba | |||
| a21fc27056 | |||
| 485fbf2040 | |||
| 09a519bfb5 | |||
| 81ef02e41f | |||
| 0226692e6b | |||
| 0cd1d9c3c9 | |||
| ab7137ab8e | |||
| 84113367fc | |||
| c24ecfb6f0 | |||
| 442f0baf14 | |||
| 40aab1e298 | |||
| 09fbe372da | |||
| 279a393e81 | |||
| 1e2e0c3a36 | |||
| 86f03cf57a | |||
| 7f598ae66d | |||
| 0a598071af | |||
| 861dd33fa1 | |||
| ac14c65643 | |||
| 0f7fb5d88d | |||
| 428f721cbf | |||
| 31bc23b6e3 | |||
| a1ba166740 | |||
| 88829bd92d | |||
| 7e0208940b | |||
| 12d491c5f7 | |||
| 29635232d3 | |||
| 4e72b17a88 | |||
| 8b8c862615 | |||
| 45ca25a4ab | |||
| 8f35e9a797 | |||
| b4688346ab | |||
| e0c60a83a2 | |||
| b7358449e0 | |||
| 85ebd170a9 | |||
| 70cdfbe8fc | |||
| 5dc55150bd | |||
| ef34fd1a3f | |||
| 854cfc016d | |||
| b7f628ce2f | |||
| f54ec92ba8 | |||
| 2e142725a6 | |||
| 6eca4bbab1 | |||
| de7ac7f594 | |||
| 28c591309f | |||
| 55add905cb | |||
| 8d7ecad531 | |||
| a7d79618b9 | |||
| acd825972c | |||
| 7eee772f60 | |||
| 63bc413da8 | |||
| 22977c885b | |||
| de76f2f21a | |||
| d57feeadaf | |||
| 36623a2382 | |||
| 83278bdc17 | |||
| 30697cb53f | |||
| 4eb8a87193 | |||
| d2814c7aa7 | |||
| 6f71a14150 | |||
| 1067950697 | |||
| 7b7add3843 | |||
| 05e67a9262 | |||
| c4ef2d63e1 | |||
| 2a137d6744 | |||
| c0becd6ce1 | |||
| d5dfd18c24 | |||
| dcc10565f8 | |||
| 4c388d7118 | |||
| 94ca5487ab | |||
| a23212bd95 | |||
| a748eaade7 | |||
| ba88365364 | |||
| 8d9db0f899 | |||
| 23bc810e6e | |||
| 7ad4de2c08 | |||
| d21e1d4dc8 | |||
| 8b7cfa0429 | |||
| 906dcc7536 | |||
| 061e026384 | |||
| 5d591fd91d | |||
| 854da5fd9e | |||
| 7e45d56e66 | |||
| 71ce7803e7 | |||
| c5bf705717 | |||
| e82b4e98a4 | |||
| c271a89a4f | |||
| ea993a657f | |||
| 5813488412 | |||
| a365163ff0 | |||
| 4668b27158 | |||
| e733e50207 | |||
| 5549d07da3 | |||
| 257ffe98b1 | |||
| 2ed5937daf | |||
| 00c28eb9e3 | |||
| 63a7d42f30 | |||
| 94bd6d52e9 | |||
| 9cbab467b4 | |||
| db7828504e | |||
| 4797f25428 | |||
| 6bd541d730 | |||
| 3591eb5d5d | |||
| 22182d9a98 | |||
| 1f61b743a6 | |||
| f071274493 | |||
| 2a4a89d8cb | |||
| a9f44e37a9 | |||
| af05b6e482 | |||
| 2b39e51a40 | |||
| 37f490fdd0 | |||
| c57f715d00 | |||
| 580c99ece2 | |||
| eaab2dea92 | |||
| a7bd35b993 | |||
| 8d864d797a | |||
| 61649aa3c0 | |||
| 220cd5a640 | |||
| 72f2657a0e | |||
| fb61a50e21 | |||
| 21257f7e21 | |||
| 8df61893c3 | |||
| 095f060c24 | |||
| f5a5d7a620 | |||
| fabc2002ed | |||
| 3f264942cb | |||
| 3810986dba | |||
| 5951e646d0 | |||
| d4c34205b5 | |||
| c6bbed7cdb | |||
| a531c01889 | |||
| 0f0e239264 | |||
| fa55caed1f | |||
| bf98c16a00 | |||
| 72603b627a | |||
| 284d07d4d8 | |||
| 09a290cc61 | |||
| 25b9bb35ab | |||
| 9e96b89856 | |||
| 92efc33ace | |||
| 81bad7b124 | |||
| 1df97254cb | |||
| aa80cb0620 | |||
| 4b6109f4e7 | |||
| 70c3060769 | |||
| 472f1ece2a | |||
| f6c58c59c3 | |||
| e6099fd83f | |||
| 13af4e1ef1 | |||
| 4869a3ffd9 | |||
| c2d0008d2a | |||
| 68ae15e2df | |||
| 91e4811534 | |||
| d2fab914cd | |||
| 846ec6c66b | |||
| d876b5ee3c | |||
| 98ae2ad60a | |||
| a261a5b9a6 | |||
| a7fcb495e4 | |||
| ea554a0609 | |||
| 08717d3f60 | |||
| 7b104a108f | |||
| 9133a2f0f5 | |||
| dff2104c96 | |||
| 163ca2783f | |||
| 16f28e747b | |||
| 3b7aadb359 | |||
| 9e8d561549 | |||
| b4a3e29fb6 | |||
| d2bda128ab | |||
| f8bbabfa31 | |||
| fc769ef023 | |||
| 9192ae5213 | |||
| 4c0e612376 | |||
| b9f7d721ed | |||
| b43d6ed5d3 | |||
| e824e16a41 | |||
| 0b72b8d819 | |||
| 37eb8bb1d5 | |||
| d2ff2adabd | |||
| f31cc84c2b | |||
| 8beec5eaa5 | |||
| 4e41ff32e1 | |||
| cf137cb73a | |||
| d5cc11d996 | |||
| d62a631467 | |||
| d6c3f45bda | |||
| 81760d6818 | |||
| 282f90c1b3 | |||
| 5de9fc556f | |||
| 3482e9632c | |||
| a6493e0cc8 | |||
| a08a7b3459 | |||
| bd4936330b | |||
| 4bb33a0cb9 | |||
| 83e38b3625 | |||
| 5b7bb3ea64 | |||
| f0b115a999 | |||
| cebed347f5 | |||
| a66b22c4f1 | |||
| fadaa2db09 | |||
| f8954ca79b | |||
| 4a3f69ad6d | |||
| 4bf13bea42 | |||
| 3a6bd6920e | |||
| 70ef7978b4 | |||
| 37bc552f3b | |||
| e310f20279 | |||
| 4708635f4f | |||
| f5d5b0a881 | |||
| 30f5dd339d | |||
| 556d716919 | |||
| 76afd5afc1 | |||
| 5c3bc2194a | |||
| 763cd7c5f2 | |||
| 11046b23a9 | |||
| 36b72926f3 | |||
| b35e16b1d8 | |||
| 767c87810b | |||
| 52b6c45451 | |||
| df5d08aec0 | |||
| 8c61606691 | |||
| e70bd3c785 | |||
| 83cc983276 | |||
| bbb8275d66 | |||
| 2afc2f268a | |||
| aa44542f76 | |||
| 248648708f | |||
| e2c0150fa8 | |||
| 4ef5372151 | |||
| a923771611 | |||
| 74ffa0cc3e | |||
| f2d585ac7f | |||
| 80cfdb182c | |||
| 39463268fb | |||
| a7b3989bca | |||
| 829212d76a | |||
| 0de4a70203 | |||
| febfb3218e | |||
| 4da46c5dd2 | |||
| 353ede8208 | |||
| 09de5e76a7 | |||
| 73b6ba8fe3 | |||
| 72b09fe4cb | |||
| e5ad13a8e2 | |||
| b122e46adb | |||
| 1a5866f5c6 | |||
| c7e62b33d1 | |||
| 1916d4e27f | |||
| ce55a7bd9b | |||
| 540120f863 | |||
| b99a26d6ab | |||
| 6528109176 | |||
| b94a0d036c | |||
| 7634ffe8e5 | |||
| 8bae8bbf7a | |||
| 5ce013f414 | |||
| da4a374b49 | |||
| 81b13456b1 | |||
| ee35fb07b0 | |||
| 99c991755a | |||
| a96ae85d88 | |||
| 45b9680c57 | |||
| 83cbed8527 | |||
| d36d9cb506 | |||
| 9e6981ea60 | |||
| 2c6f8a30f3 | |||
| 17a5a1f97d | |||
| a0815deb9a | |||
| 76a7ab6893 | |||
| 7cd56a57f9 | |||
| 56e2b60e6d | |||
| 8c15a093fd | |||
| 7901eb97ad | |||
| 7aaba66d4d | |||
| 5f0b9d429f | |||
| d34b62eafa | |||
| 3743980192 | |||
| 41d53a15f2 | |||
| f234fbf87f | |||
| 5c728d1fb1 | |||
| 162ea81894 | |||
| 97b9fe83ee | |||
| 9953230550 | |||
| 80bd10025b | |||
| 0876bcd027 | |||
| 3d7ac162fb | |||
| 68a2459808 | |||
| 21fddc1cc8 | |||
| 528a1ad3e0 | |||
| dabe374983 | |||
| 8ac0f14796 | |||
| 934fc52d06 | |||
| cf46d1880c | |||
| 4f159a94cd | |||
| b53e14c7f8 | |||
| 94e9f26544 | |||
| 9e87af70b7 | |||
| fe56f5d3a6 | |||
| 90e5826256 | |||
| bb73c335a5 | |||
| 4c1f76567c | |||
| d193c814d3 | |||
| 2cb252da4a | |||
| 9a04c32f7f | |||
| 3b8e9fdd25 | |||
| e0b045da49 | |||
| 4220491a23 | |||
| 3abe1fcf20 | |||
| 02ed020f3f | |||
| 934ac24ad8 | |||
| e2d8b2fc26 | |||
| 3e8483d389 | |||
| a9c529f004 | |||
| a664587219 | |||
| 1619838592 | |||
| 98a33d37c7 | |||
| 12a2e5ae1b | |||
| 9b472a02e9 | |||
| c84bea7110 | |||
| 20f71fafa7 | |||
| 056e5a430e | |||
| 21a604407d | |||
| deb076b9cd | |||
| b8e2ad9d8f | |||
| 0cd9643957 | |||
| 8c78315f71 | |||
| 35dad3fdfe | |||
| bebf5dc6ab | |||
| 2fd1c48e1a | |||
| 301727defc | |||
| 1afd53a933 | |||
| 381aeb94c6 | |||
| 4a36520820 | |||
| 430eedf5c0 | |||
| 793a851d10 | |||
| 2d609487ac | |||
| 295f50379f | |||
| ecfff5099a | |||
| 986344640f | |||
| 69f69606e6 | |||
| 2aa2e5487a | |||
| 23d9020a65 | |||
| 43d9d1ce1b | |||
| ed7f3b21c0 | |||
| b062a3b226 | |||
| 89b0143b09 | |||
| 0790a9d5df | |||
| e05ac66561 | |||
| 3b33f7ec03 | |||
| b94c75bcda | |||
| 8dc8906d78 | |||
| ab684dc484 | |||
| 37fb26b557 | |||
| 7397e5a41d | |||
| 4a9d380117 | |||
| 0ec1a54309 | |||
| ab6e68c312 | |||
| c509603530 | |||
| e5ce65c32b | |||
| 851257c44b | |||
| 1662e953fc | |||
| dde89795c9 | |||
| 6e69ff93ef | |||
| 01b7d6c413 | |||
| 58398832a1 | |||
| 29469a0615 | |||
| b4dd20c0eb | |||
| eab13752dd | |||
| ad60cdd030 | |||
| 78e111a4d0 | |||
| 5558729562 | |||
| 2d32f7c377 | |||
| bcbdac6f6c | |||
| acc8bf1c79 | |||
| 4f107e9fee | |||
| 7844f3fa4f | |||
| 2f3af438ee | |||
| 4483aa5b45 | |||
| 20e6b6315e | |||
| ca4248bdd5 | |||
| 4a5d8ba87e | |||
| 7a5d849857 | |||
| 95c23e55a4 | |||
| 94ce0d24d6 | |||
| cdea1b8460 | |||
| cc122bec82 | |||
| 6afaf0034c | |||
| 7f0d7e760b | |||
| 69004322f6 | |||
| 7441094a41 | |||
| 29a5006df9 | |||
| 1aca038daf | |||
| ce92eb46ec | |||
| c852e9c6a1 | |||
| 2b8db0c2e2 | |||
| 74f297c871 | |||
| 76411392b7 | |||
| 74c81117c3 | |||
| 6f04d8dc77 | |||
| ade05c045e | |||
| 5140726c70 | |||
| 5334a8f0ed | |||
| ee99eed3bf | |||
| 9a5f1d2f51 | |||
| 170df9040b | |||
| f0bc4274f8 | |||
| 20a704b154 | |||
| 30a70c480c | |||
| 1d5e9c7dee | |||
| b8ab2d4987 | |||
| ce796cec97 | |||
| ad4de747ad | |||
| 95c1b7fb31 | |||
| 29b742cfc4 | |||
| 57bda2ff3b | |||
| 228179e09b | |||
| c961f3ab2b | |||
| 3469cb9d24 | |||
| 6c09b83f30 | |||
| 17a1363f4d | |||
| 115350317c | |||
| 44c2682168 | |||
| 8b81aae870 | |||
| 72a2699b10 | |||
| b7c07f1329 | |||
| 2b9a62093a | |||
| 3385b4c280 | |||
| 7c1f82cd96 | |||
| 9ebfdc4a86 | |||
| 586313c2fb | |||
| 571783fc04 | |||
| 4af5229cee | |||
| e0dcc610da | |||
| 4aff10785e | |||
| d0e110d666 | |||
| 10ffb9cb68 | |||
| b303bb1e56 | |||
| e6a61b182f | |||
| 785b1da021 | |||
| a4d20031ec | |||
| 3c60145792 | |||
| f2940adcf1 | |||
| b5b9cc0b79 | |||
| 1d1eb97567 | |||
| 0103cffcd0 | |||
| 6fed66dd42 | |||
| c81416438d | |||
| c95825a0ff | |||
| b6284c9f01 | |||
| f84a97f51c | |||
| 563296fc8b | |||
| 13290e798b | |||
| 96e3dfed46 | |||
| cb6fd130ba | |||
| 11f90de873 | |||
| 9240ec89d0 | |||
| 8cf2a41f81 | |||
| 1f9fc665ec | |||
| bf1995140a | |||
| 7b21cd5d72 | |||
| 37fc32d972 | |||
| 9a6d4b5e56 | |||
| 1e0719dac5 | |||
| f2248f79d3 | |||
| 60d843b540 | |||
| 6d7d281559 | |||
| b3d462b890 | |||
| a7444021c6 | |||
| a93acbd35c | |||
| d978123289 | |||
| ee8dada752 | |||
| 7bc6261d2a | |||
| 013c3bcd82 | |||
| 2fc86ad836 | |||
| 082dc24865 | |||
| d7b6acc03d | |||
| a1dc2856de | |||
| 959be66cc2 | |||
| ae2843940f | |||
| 611ceedc1d | |||
| 38298076d6 | |||
| 1f0b8d6cd8 | |||
| e0d683baed | |||
| f4f75b6b12 | |||
| fb6dc90a85 | |||
| b99391c810 | |||
| d9fc4f3a99 | |||
| daeffbc944 | |||
| 87dde46fb0 | |||
| d96c6f867d | |||
| 1f2e6d5434 | |||
| 232b989d50 | |||
| d38261c908 | |||
| 3075bc3b7b | |||
| 842d0b1c9f | |||
| 042b238dd8 | |||
| c30904b631 | |||
| 225a71f4cd | |||
| 1d29a56344 | |||
| 320e00267d | |||
| 9869629b67 | |||
| 3da78e85bf | |||
| 11a4314261 | |||
| 65c19f82b9 | |||
| 0169cde8a4 | |||
| ab0173b7e6 | |||
| 95f81d2565 | |||
| 9c922f0eab | |||
| 35a03d66e5 | |||
| a4a0887fa7 | |||
| e7c9cf3e1d | |||
| 6710616a09 | |||
| 2064c83c66 | |||
| 2e97ad1f4b | |||
| 4f85f88ae3 | |||
| 181a57ae9b | |||
| 3ee1248cf2 | |||
| 68c3916d46 | |||
| e3bbacd8b9 | |||
| f915371248 | |||
| ea848aa891 | |||
| 5157849c60 | |||
| ca31f9789e | |||
| 78d3cf1de1 | |||
| 521e7eafce | |||
| 2d78a80cf6 | |||
| 5f32698da5 | |||
| 1845056014 | |||
| 0b8ec2aa74 | |||
| 578bdd4b20 | |||
| 6b6865d068 | |||
| 6c018eb770 | |||
| 5561bafbe6 | |||
| 75eee04972 | |||
| ee1d1faa52 | |||
| dbd3e10959 | |||
| fde330af5a | |||
| e8d953257e | |||
| cc86e9ecce | |||
| 5a6db519d6 | |||
| 98d09e5304 | |||
| d87a0ea7f7 | |||
| 0e2bd069d4 | |||
| feca9a33d5 | |||
| eec1aec071 | |||
| a97d1088f0 | |||
| a7317de3b4 | |||
| 06762db050 | |||
| 4f3ebea3a6 | |||
| fa88e0f054 | |||
| 2fd7c2b865 | |||
| ef0bd975cf | |||
| bdc14ddbd7 | |||
| 383e6f4646 | |||
| e37415c95b | |||
| a33112a4c0 | |||
| 7e8007f024 | |||
| f320c2a455 | |||
| 6eedeaedaf | |||
| 6b5e19cfc4 | |||
| 3dc437add4 | |||
| 5f96dffb9b | |||
| 6423b8031d | |||
| bbdad79ce5 | |||
| a2daee8f7a | |||
| 909e3ad116 | |||
| 556616c4f0 | |||
| 46e426ce96 | |||
| f5f6c37c17 | |||
| 08fe8a3076 | |||
| dabcea991f | |||
| 4a5bd47b6a | |||
| e5742a98df | |||
| 774cecc3b4 | |||
| 83b7e32ec4 | |||
| a22155bd96 | |||
| 1da947f548 | |||
| a3960dfa53 | |||
| bab1917311 | |||
| 49348716f5 | |||
| eb781afe7b | |||
| 39f53c3f8c | |||
| b5307aaaad | |||
| f5cf667c95 | |||
| 737095f852 | |||
| f56952c9e6 | |||
| ca5a7be5e8 | |||
| 582c5a36d7 | |||
| a8058729cc | |||
| a2f024ffe3 | |||
| e1d65cc5e0 | |||
| 75cda8d191 | |||
| af8dcc6ee8 | |||
| 2270bf41d7 | |||
| 489ef6e5e1 | |||
| cecc745844 | |||
| 5366362e47 | |||
| a1ecea60fd | |||
| 882421a03e | |||
| a36f72e886 | |||
| 247e989377 | |||
| 91ae676b9b | |||
| a955e06259 | |||
| 31683ce35b | |||
| d773570cd6 | |||
| 556da2b3fc | |||
| 9e19a6efe1 | |||
| f433b2c433 | |||
| bc0d7d7140 | |||
| 24f8831021 | |||
| 9a8fb80eed | |||
| ca12459b9c | |||
| e1ab911c35 | |||
| 58d4494365 | |||
| d502e5beaa | |||
| b4a95db7da | |||
| 02ba6f9f3a | |||
| dba0010607 | |||
| 90667f6114 | |||
| d6961b2626 | |||
| 07ebb8171f | |||
| 245db73929 | |||
| 9342dae8f0 | |||
| 1f84f50fd8 | |||
| 3326c749f8 | |||
| 0269106066 | |||
| 95d38a8e54 | |||
| dca6afc26e | |||
| 19684f23bc | |||
| 52a561399e | |||
| 0683e8a9a3 | |||
| 1bb4a042e2 | |||
| d10861e478 | |||
| cf7c86d581 | |||
| d99e150097 | |||
| 9e88eb6100 | |||
| 71d9a3e1df | |||
| 6575dcc803 | |||
| 2715e5ba1b | |||
| 9a570b23a3 | |||
| 1b091ecb87 | |||
| a75a5f8b2a | |||
| 80dd02fbdb | |||
| e6755450df | |||
| 9215bf791b | |||
| 311bfc99f3 | |||
| a3434de2e6 | |||
| 2bf56b00d4 | |||
| c31d9e717b | |||
| d9d7820b0d | |||
| 9343247e07 | |||
| 351a1a1332 | |||
| 7e9868d762 | |||
| d1cf817660 | |||
| c91771a51e | |||
| a337a43bfd | |||
| 77f93e0b8c | |||
| 7dc7195696 | |||
| 56773bd80e | |||
| 1dec9831d3 | |||
| 390f1f7c69 | |||
| d30fcb8fff | |||
| 17dfe8edc9 | |||
| 7b6b6e1c3e | |||
| 60f2837a98 | |||
| ef5fb390ec | |||
| 87e94f4563 | |||
| 017a9032f1 | |||
| 466282f322 | |||
| 17594298e1 | |||
| 0b9f487ab9 | |||
| d3e1a92b84 | |||
| cd357b0278 | |||
| d0d229e380 | |||
| eb897e65a1 | |||
| 825ebfd5fe | |||
| 3ee3964bec | |||
| aecfb257e9 | |||
| 896a6a93af | |||
| 075f96d2bf | |||
| 05896551f1 | |||
| ea6a891038 | |||
| 983aee5718 | |||
| c913020dc2 | |||
| a50490b11f | |||
| 4b01c901bc | |||
| c1be36bc66 | |||
| e0222d3e01 | |||
| c0264ae787 | |||
| 3a2c50c199 | |||
| 3b4adac579 | |||
| d36b3fbf9d | |||
| bca40e07e3 | |||
| fd622e9b01 | |||
| d2373b847a | |||
| b10f7181e0 | |||
| 5455499945 | |||
| 17feb1640e | |||
| fed71986c8 | |||
| 9a1c993719 | |||
| 504219817c | |||
| 4f2b7271bd | |||
| ec6f9dd5c8 | |||
| e6cda9932b | |||
| b9cfbaa8d4 | |||
| 3fd175af8e | |||
| a9e72b2a2c | |||
| ecde3a3158 | |||
| c8d51c2723 | |||
| d609bb4671 | |||
| 982b425792 | |||
| 9e879a5b1f | |||
| 9974327d33 | |||
| 4eba643ae1 | |||
| 8d7be79108 | |||
| 76b5688304 | |||
| 1e8fbb7bbb | |||
| 20c6a6233b | |||
| 1d295f7983 | |||
| 669814d0d4 | |||
| 4aa48beb37 | |||
| 371fb5a256 | |||
| 0829a511f0 | |||
| a3c78c4510 | |||
| a3211253a0 | |||
| 2c8e7bd5a5 | |||
| 005d6879d9 | |||
| 3dd22349a9 | |||
| e61a84a717 | |||
| d8e73d3036 | |||
| b12340b1d5 | |||
| ec46a59539 | |||
| 5003681414 | |||
| d9396929aa | |||
| 1dee4d92c6 | |||
| 9364cbb4b5 | |||
| 755b661c2d | |||
| 7f4792e47c | |||
| e6837b2b8d | |||
| 9e21330d7a | |||
| c476e62a6f | |||
| 4c5d7831c1 | |||
| 9a5cfb3f26 | |||
| 5a87bea762 | |||
| d62f45bdc1 | |||
| f9d5ee04b4 |
@@ -0,0 +1,21 @@
|
||||
# Build artifacts
|
||||
buildroot/
|
||||
*.o
|
||||
*.a
|
||||
*.so
|
||||
*.dylib
|
||||
*.dll
|
||||
*.exe
|
||||
|
||||
# Web assets
|
||||
*.min.js
|
||||
*.min.css
|
||||
|
||||
# Generated files
|
||||
__pycache__/
|
||||
*.pyc
|
||||
.DS_Store
|
||||
|
||||
# IDE files
|
||||
.vscode/
|
||||
.idea/
|
||||
@@ -7,7 +7,7 @@ contact_links:
|
||||
url: https://www.facebook.com/groups/1049718498464482
|
||||
about: Please ask and answer questions here.
|
||||
- name: 🕹 Marlin on Discord
|
||||
url: https://discord.gg/n5NJ59y
|
||||
url: https://discord.com/servers/marlin-firmware-461605380783472640
|
||||
about: Join the Discord server for support and discussion.
|
||||
- name: 🔗 Marlin Discussion Forum
|
||||
url: https://reprap.org/forum/list.php?415
|
||||
|
||||
@@ -43,7 +43,7 @@ We have a Message Board and a Facebook group where our knowledgable user communi
|
||||
|
||||
If chat is more your speed, you can join the MarlinFirmware Discord server:
|
||||
|
||||
* Use the link https://discord.gg/n5NJ59y to join up as a General User.
|
||||
* Use the link https://discord.com/servers/marlin-firmware-461605380783472640 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.
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
#
|
||||
# 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
|
||||
@@ -14,7 +14,7 @@ jobs:
|
||||
autolabel:
|
||||
name: Auto Label
|
||||
if: github.repository == 'MarlinFirmware/Marlin'
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Auto Label for [BUG]
|
||||
uses: actions/github-script@v7
|
||||
|
||||
@@ -14,12 +14,12 @@ jobs:
|
||||
name: Bump Distribution Date
|
||||
if: github.repository == 'MarlinFirmware/Marlin'
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
|
||||
- name: Check out bugfix-2.0.x
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: bugfix-2.0.x
|
||||
|
||||
@@ -39,7 +39,7 @@ jobs:
|
||||
exit 0
|
||||
|
||||
- name: Check out bugfix-2.1.x
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: bugfix-2.1.x
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ jobs:
|
||||
name: PR Bad Target
|
||||
if: github.repository == 'MarlinFirmware/Marlin'
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- uses: superbrothers/close-pull-request@v3
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#
|
||||
# test-builds.yml
|
||||
# ci-build-tests.yml
|
||||
# Do test builds to catch compile errors
|
||||
#
|
||||
|
||||
name: CI
|
||||
name: CI - Build Tests
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
@@ -14,6 +14,8 @@ on:
|
||||
- config/**
|
||||
- data/**
|
||||
- docs/**
|
||||
- test/**
|
||||
- Marlin/tests/**
|
||||
- '**/*.md'
|
||||
push:
|
||||
branches:
|
||||
@@ -23,21 +25,28 @@ on:
|
||||
- config/**
|
||||
- data/**
|
||||
- docs/**
|
||||
- test/**
|
||||
- Marlin/tests/**
|
||||
- '**/*.md'
|
||||
|
||||
jobs:
|
||||
test_builds:
|
||||
name: Run All Tests
|
||||
name: Build Test
|
||||
if: github.repository == 'MarlinFirmware/Marlin'
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
test-platform:
|
||||
|
||||
# RP2040
|
||||
- SKR_Pico
|
||||
|
||||
# Native
|
||||
- linux_native
|
||||
- simulator_linux_release
|
||||
|
||||
# AVR
|
||||
- mega2560
|
||||
@@ -100,11 +109,11 @@ jobs:
|
||||
|
||||
# STM32F4
|
||||
- ARMED
|
||||
- BIGTREE_BTT002
|
||||
- BIGTREE_GTR_V1_0
|
||||
- BIGTREE_SKR_PRO
|
||||
- BTT_BTT002
|
||||
- BTT_GTR_V1_0
|
||||
- BTT_SKR_PRO
|
||||
- FLYF407ZG
|
||||
- FYSETC_S6
|
||||
- STM32F446VE_fysetc
|
||||
- LERDGEK
|
||||
- LERDGEX
|
||||
- mks_robin_pro2
|
||||
@@ -152,7 +161,7 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Cache pip
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||
@@ -160,13 +169,13 @@ jobs:
|
||||
${{ runner.os }}-pip-
|
||||
|
||||
- name: Cache PlatformIO
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.platformio
|
||||
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
|
||||
|
||||
- name: Select Python 3.9
|
||||
uses: actions/setup-python@v4
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.9'
|
||||
architecture: 'x64'
|
||||
@@ -177,6 +186,14 @@ jobs:
|
||||
pio upgrade --dev
|
||||
pio pkg update --global
|
||||
|
||||
- name: Install Simulator dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install build-essential
|
||||
sudo apt-get install libsdl2-dev
|
||||
sudo apt-get install libsdl2-net-dev
|
||||
sudo apt-get install libglm-dev
|
||||
|
||||
- name: Run ${{ matrix.test-platform }} Tests
|
||||
run: |
|
||||
make tests-single-ci TEST_TARGET=${{ matrix.test-platform }}
|
||||
@@ -0,0 +1,73 @@
|
||||
#
|
||||
# ci-unit-tests.yml
|
||||
# Build and execute unit tests to catch functional issues in code
|
||||
#
|
||||
|
||||
name: CI - Unit Tests
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- bugfix-2.1.x
|
||||
# Cannot be enabled on 2.1.x until it contains the unit test framework
|
||||
#- 2.1.x
|
||||
paths-ignore:
|
||||
- config/**
|
||||
- data/**
|
||||
- docs/**
|
||||
- '**/*.md'
|
||||
push:
|
||||
branches:
|
||||
- bugfix-2.1.x
|
||||
# Cannot be enabled on 2.1.x until it contains the unit test framework
|
||||
#- 2.1.x
|
||||
paths-ignore:
|
||||
- config/**
|
||||
- data/**
|
||||
- docs/**
|
||||
- '**/*.md'
|
||||
|
||||
jobs:
|
||||
# This runs all unit tests as a single job. While it should be possible to break this up into
|
||||
# multiple jobs, they currently run quickly and finish long before the compilation tests.
|
||||
run_unit_tests:
|
||||
name: Unit Test
|
||||
# These tests will only be able to run on the bugfix-2.1.x branch, until the next release
|
||||
# pulls them into additional branches.
|
||||
if: github.repository == 'MarlinFirmware/Marlin'
|
||||
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- name: Check out the PR
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Cache pip
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
|
||||
- name: Cache PlatformIO
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.platformio
|
||||
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
|
||||
|
||||
- name: Select Python 3.9
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.9'
|
||||
architecture: 'x64'
|
||||
|
||||
- name: Install PlatformIO
|
||||
run: |
|
||||
pip install -U platformio
|
||||
pio upgrade --dev
|
||||
pio pkg update --global
|
||||
|
||||
- name: Run All Unit Tests
|
||||
run: |
|
||||
make unit-test-all-local
|
||||
@@ -0,0 +1,48 @@
|
||||
#
|
||||
# ci-validate-boards.yml
|
||||
# Validate boards.h to make sure it's all set up correctly
|
||||
#
|
||||
|
||||
name: CI - Validate boards.h
|
||||
|
||||
# We can do the on: section as two items, one for pull requests and one for pushes...
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- bugfix-2.1.x
|
||||
paths:
|
||||
- 'Marlin/src/core/boards.h'
|
||||
push:
|
||||
branches:
|
||||
- bugfix-2.1.x
|
||||
paths:
|
||||
- 'Marlin/src/core/boards.h'
|
||||
|
||||
jobs:
|
||||
validate_pins_files:
|
||||
name: Validate boards.h
|
||||
if: github.repository == 'MarlinFirmware/Marlin'
|
||||
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- name: Check out the PR
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Cache pip
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
|
||||
- name: Select Python 3.9
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.9'
|
||||
architecture: 'x64'
|
||||
|
||||
- name: Validate core/boards.h
|
||||
run: |
|
||||
make validate-boards -j
|
||||
@@ -0,0 +1,51 @@
|
||||
#
|
||||
# ci-validate-pins.yml
|
||||
# Validate that all of the pins files are unchanged by pinsformat.py
|
||||
#
|
||||
|
||||
name: CI - Validate Pins Files
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- bugfix-2.1.x
|
||||
# Cannot be enabled on 2.1.x until it contains the unit test framework
|
||||
#- 2.1.x
|
||||
paths:
|
||||
- 'Marlin/src/pins/*/**'
|
||||
push:
|
||||
branches:
|
||||
- bugfix-2.1.x
|
||||
# Cannot be enabled on 2.1.x until it contains the unit test framework
|
||||
#- 2.1.x
|
||||
paths:
|
||||
- 'Marlin/src/pins/*/**'
|
||||
|
||||
jobs:
|
||||
validate_pins_files:
|
||||
name: Validate Pins Files
|
||||
if: github.repository == 'MarlinFirmware/Marlin'
|
||||
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- name: Check out the PR
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Cache pip
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
|
||||
- name: Select Python 3.9
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.9'
|
||||
architecture: 'x64'
|
||||
|
||||
- name: Validate all pins files
|
||||
run: |
|
||||
make validate-pins -j
|
||||
@@ -13,7 +13,7 @@ on:
|
||||
|
||||
jobs:
|
||||
remove_label:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
@@ -32,7 +32,7 @@ jobs:
|
||||
- "Needs: Work"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Remove Labels
|
||||
uses: actions-ecosystem/action-remove-labels@v1
|
||||
with:
|
||||
|
||||
@@ -14,10 +14,10 @@ jobs:
|
||||
name: Close Stale Issues
|
||||
if: github.repository == 'MarlinFirmware/Marlin'
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- uses: actions/stale@v8
|
||||
- uses: actions/stale@v9
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
stale-issue-message: |
|
||||
|
||||
@@ -14,18 +14,18 @@ jobs:
|
||||
name: Lock Closed Issues
|
||||
if: github.repository == 'MarlinFirmware/Marlin'
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- uses: dessant/lock-threads@v2
|
||||
- uses: dessant/lock-threads@v5
|
||||
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: >
|
||||
issue-inactive-days: '60'
|
||||
exclude-issue-created-before: ''
|
||||
exclude-any-issue-labels: 'no-locking'
|
||||
add-issue-labels: ''
|
||||
issue-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.
|
||||
|
||||
@@ -14,7 +14,7 @@ jobs:
|
||||
name: Unlock Reopened
|
||||
if: github.repository == 'MarlinFirmware/Marlin'
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- uses: OSDKDev/unlock-issues@v1.1
|
||||
|
||||
@@ -125,6 +125,7 @@ vc-fileutils.settings
|
||||
# Visual Studio Code
|
||||
.vscode/*
|
||||
!.vscode/extensions.json
|
||||
*.code-workspace
|
||||
|
||||
# Simulation files
|
||||
imgui.ini
|
||||
@@ -168,3 +169,6 @@ __pycache__
|
||||
tags
|
||||
*.logs
|
||||
*.bak
|
||||
.aider*
|
||||
!.aiderignore
|
||||
.env
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Marlin-specific settings for Zed
|
||||
*
|
||||
* For a full list of overridable settings, and general information on folder-specific settings,
|
||||
* see the documentation: https://zed.dev/docs/configuring-zed#settings-files
|
||||
*/
|
||||
{
|
||||
"languages": {
|
||||
"C": {
|
||||
"enable_language_server": false
|
||||
},
|
||||
"C++": {
|
||||
"enable_language_server": false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,17 +2,24 @@ SCRIPTS_DIR := buildroot/share/scripts
|
||||
CONTAINER_RT_BIN := docker
|
||||
CONTAINER_RT_OPTS := --rm -v $(PWD):/code -v platformio-cache:/root/.platformio
|
||||
CONTAINER_IMAGE := marlin-dev
|
||||
UNIT_TEST_CONFIG ?= default
|
||||
|
||||
help:
|
||||
@echo "Tasks for local development:"
|
||||
@echo "make marlin : Build marlin for the configured board"
|
||||
@echo "make format-pins : Reformat all pins files"
|
||||
@echo "make marlin : Build Marlin for the configured board"
|
||||
@echo "make format-pins -j : Reformat all pins files (-j for parallel execution)"
|
||||
@echo "make validate-pins -j : Validate all pins files, fails if any require reformatting"
|
||||
@echo "make validate-boards -j : Validate boards.h and pins.h for standards compliance"
|
||||
@echo "make tests-single-ci : Run a single test from inside the CI"
|
||||
@echo "make tests-single-local : Run a single test locally"
|
||||
@echo "make tests-single-local-docker : Run a single test locally, using docker"
|
||||
@echo "make tests-all-local : Run all tests locally"
|
||||
@echo "make tests-all-local-docker : Run all tests locally, using docker"
|
||||
@echo "make setup-local-docker : Build the local docker image"
|
||||
@echo "make unit-test-single-local : Run unit tests for a single config locally"
|
||||
@echo "make unit-test-single-local-docker : Run unit tests for a single config locally, using docker"
|
||||
@echo "make unit-test-all-local : Run all code tests locally"
|
||||
@echo "make unit-test-all-local-docker : Run all code tests locally, using docker"
|
||||
@echo "make setup-local-docker : Setup local docker using buildx"
|
||||
@echo ""
|
||||
@echo "Options for testing:"
|
||||
@echo " TEST_TARGET Set when running tests-single-*, to select the"
|
||||
@@ -22,6 +29,9 @@ help:
|
||||
@echo " run on GitHub CI"
|
||||
@echo " ONLY_TEST Limit tests to only those that contain this, or"
|
||||
@echo " the index of the test (1-based)"
|
||||
@echo " UNIT_TEST_CONFIG Set the name of the config from the test folder, without"
|
||||
@echo " the leading number. Default is 'default'". Used with the
|
||||
@echo " unit-test-single-* tasks"
|
||||
@echo " VERBOSE_PLATFORMIO If you want the full PIO output, set any value"
|
||||
@echo " GIT_RESET_HARD Used by CI: reset all local changes. WARNING:"
|
||||
@echo " THIS WILL UNDO ANY CHANGES YOU'VE MADE!"
|
||||
@@ -43,23 +53,61 @@ tests-single-local:
|
||||
tests-single-local-docker:
|
||||
@if ! test -n "$(TEST_TARGET)" ; then echo "***ERROR*** Set TEST_TARGET=<your-module> or use make tests-all-local-docker" ; return 1; fi
|
||||
@if ! $(CONTAINER_RT_BIN) images -q $(CONTAINER_IMAGE) > /dev/null ; then $(MAKE) setup-local-docker ; fi
|
||||
$(CONTAINER_RT_BIN) run $(CONTAINER_RT_OPTS) $(CONTAINER_IMAGE) $(MAKE) tests-single-local TEST_TARGET=$(TEST_TARGET) VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) GIT_RESET_HARD=$(GIT_RESET_HARD) ONLY_TEST="$(ONLY_TEST)"
|
||||
$(CONTAINER_RT_BIN) run $(CONTAINER_RT_OPTS) $(CONTAINER_IMAGE) make tests-single-local TEST_TARGET=$(TEST_TARGET) VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) GIT_RESET_HARD=$(GIT_RESET_HARD) ONLY_TEST="$(ONLY_TEST)"
|
||||
|
||||
tests-all-local:
|
||||
@python -c "import yaml" 2>/dev/null || (echo 'pyyaml module is not installed. Install it with "python -m pip install pyyaml"' && exit 1)
|
||||
export PATH="./buildroot/bin/:./buildroot/tests/:${PATH}" \
|
||||
&& export VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) \
|
||||
&& for TEST_TARGET in $$($(SCRIPTS_DIR)/get_test_targets.py) ; do echo "Running tests for $$TEST_TARGET" ; run_tests . $$TEST_TARGET ; done
|
||||
&& for TEST_TARGET in $$(python $(SCRIPTS_DIR)/get_test_targets.py) ; do \
|
||||
if [ "$$TEST_TARGET" = "linux_native" ] && [ "$$(uname)" = "Darwin" ]; then \
|
||||
echo "Skipping tests for $$TEST_TARGET on macOS" ; \
|
||||
continue ; \
|
||||
fi ; \
|
||||
echo "Running tests for $$TEST_TARGET" ; \
|
||||
run_tests . $$TEST_TARGET || exit 1 ; \
|
||||
sleep 5; \
|
||||
done
|
||||
|
||||
tests-all-local-docker:
|
||||
@if ! $(CONTAINER_RT_BIN) images -q $(CONTAINER_IMAGE) > /dev/null ; then $(MAKE) setup-local-docker ; fi
|
||||
$(CONTAINER_RT_BIN) run $(CONTAINER_RT_OPTS) $(CONTAINER_IMAGE) $(MAKE) tests-all-local VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) GIT_RESET_HARD=$(GIT_RESET_HARD)
|
||||
$(CONTAINER_RT_BIN) run $(CONTAINER_RT_OPTS) $(CONTAINER_IMAGE) make tests-all-local VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) GIT_RESET_HARD=$(GIT_RESET_HARD)
|
||||
|
||||
unit-test-single-local:
|
||||
platformio run -t marlin_$(UNIT_TEST_CONFIG) -e linux_native_test
|
||||
|
||||
unit-test-single-local-docker:
|
||||
@if ! $(CONTAINER_RT_BIN) images -q $(CONTAINER_IMAGE) > /dev/null ; then $(MAKE) setup-local-docker ; fi
|
||||
$(CONTAINER_RT_BIN) run $(CONTAINER_RT_OPTS) $(CONTAINER_IMAGE) make unit-test-single-local UNIT_TEST_CONFIG=$(UNIT_TEST_CONFIG)
|
||||
|
||||
unit-test-all-local:
|
||||
platformio run -t test-marlin -e linux_native_test
|
||||
|
||||
unit-test-all-local-docker:
|
||||
@if ! $(CONTAINER_RT_BIN) images -q $(CONTAINER_IMAGE) > /dev/null ; then $(MAKE) setup-local-docker ; fi
|
||||
$(CONTAINER_RT_BIN) run $(CONTAINER_RT_OPTS) $(CONTAINER_IMAGE) make unit-test-all-local
|
||||
|
||||
setup-local-docker:
|
||||
$(CONTAINER_RT_BIN) build -t $(CONTAINER_IMAGE) -f docker/Dockerfile .
|
||||
$(CONTAINER_RT_BIN) buildx build -t $(CONTAINER_IMAGE) -f docker/Dockerfile .
|
||||
|
||||
PINS := $(shell find Marlin/src/pins -mindepth 2 -name '*.h')
|
||||
|
||||
.PHONY: $(PINS) format-pins validate-pins
|
||||
|
||||
$(PINS): %:
|
||||
@echo "Formatting $@" && node $(SCRIPTS_DIR)/pinsformat.js $@
|
||||
@echo "Formatting $@"
|
||||
@python $(SCRIPTS_DIR)/pinsformat.py $< $@
|
||||
|
||||
format-pins: $(PINS)
|
||||
|
||||
validate-pins: format-pins
|
||||
@echo "Validating pins files"
|
||||
@git diff --exit-code || (git status && echo "\nError: Pins files are not formatted correctly. Run \"make format-pins\" to fix.\n" && exit 1)
|
||||
|
||||
BOARDS_FILE := Marlin/src/core/boards.h
|
||||
|
||||
.PHONY: validate-boards
|
||||
|
||||
validate-boards:
|
||||
@echo "Validating boards.h file"
|
||||
@python $(SCRIPTS_DIR)/validate_boards.py $(BOARDS_FILE) || (echo "\nError: boards.h file is not valid. Please check and correct it.\n" && exit 1)
|
||||
|
||||
+216
-121
@@ -50,7 +50,7 @@
|
||||
*
|
||||
* Calibration Guides: https://reprap.org/wiki/Calibration
|
||||
* https://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide
|
||||
* https://web.archive.org/web/20220907014303/https://sites.google.com/site/repraplogphase/calibration-of-your-reprap
|
||||
* https://web.archive.org/web/20220907014303/sites.google.com/site/repraplogphase/calibration-of-your-reprap
|
||||
* https://youtu.be/wAL9d7FgInk
|
||||
* https://teachingtechyt.github.io/calibration.html
|
||||
*
|
||||
@@ -61,7 +61,7 @@
|
||||
// @section info
|
||||
|
||||
// Author info of this build printed to the host during boot and M115
|
||||
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
|
||||
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Original author or contributor.
|
||||
//#define CUSTOM_VERSION_FILE Version.h // Path from the root directory (no quotes)
|
||||
|
||||
// @section machine
|
||||
@@ -71,13 +71,15 @@
|
||||
#define MOTHERBOARD BOARD_RAMPS_14_EFB
|
||||
#endif
|
||||
|
||||
// @section serial
|
||||
|
||||
/**
|
||||
* Select the serial port on the board to use for communication with the host.
|
||||
* This allows the connection of wireless adapters (for instance) to non-default port pins.
|
||||
* Serial port -1 is the USB emulated serial port, if available.
|
||||
* Note: The first serial port (-1 or 0) will always be used by the Arduino bootloader.
|
||||
*
|
||||
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
|
||||
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
|
||||
*/
|
||||
#define SERIAL_PORT 0
|
||||
|
||||
@@ -99,24 +101,35 @@
|
||||
/**
|
||||
* Select a secondary serial port on the board to use for communication with the host.
|
||||
* Currently Ethernet (-2) is only supported on Teensy 4.1 boards.
|
||||
* :[-2, -1, 0, 1, 2, 3, 4, 5, 6, 7]
|
||||
* :[-2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
|
||||
*/
|
||||
//#define SERIAL_PORT_2 -1
|
||||
//#define BAUDRATE_2 250000 // :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000] Enable to override BAUDRATE
|
||||
|
||||
/**
|
||||
* Select a third serial port on the board to use for communication with the host.
|
||||
* Currently only supported for AVR, DUE, LPC1768/9 and STM32/STM32F1
|
||||
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
|
||||
* Currently supported for AVR, DUE, SAMD51, LPC1768/9, STM32/STM32F1/HC32, and Teensy 4.x
|
||||
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
|
||||
*/
|
||||
//#define SERIAL_PORT_3 1
|
||||
//#define BAUDRATE_3 250000 // :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000] Enable to override BAUDRATE
|
||||
|
||||
/**
|
||||
* Select a serial port to communicate with RS485 protocol
|
||||
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
|
||||
*/
|
||||
//#define RS485_SERIAL_PORT 1
|
||||
#ifdef RS485_SERIAL_PORT
|
||||
//#define M485_PROTOCOL 1 // Check your host for protocol compatibility
|
||||
//#define RS485_BUS_BUFFER_SIZE 128
|
||||
#endif
|
||||
|
||||
// Enable the Bluetooth serial interface on AT90USB devices
|
||||
//#define BLUETOOTH
|
||||
|
||||
// Name displayed in the LCD "Ready" message and Info menu
|
||||
//#define CUSTOM_MACHINE_NAME "3D Printer"
|
||||
//#define CONFIGURABLE_MACHINE_NAME // Add G-code M550 to set/report the machine name
|
||||
|
||||
// Printer's unique ID, used by some programs to differentiate between machines.
|
||||
// Choose your own or use a service like https://www.uuidgenerator.net/version4
|
||||
@@ -135,9 +148,9 @@
|
||||
* Options: A4988, A5984, DRV8825, LV8729, TB6560, TB6600, TMC2100,
|
||||
* TMC2130, TMC2130_STANDALONE, TMC2160, TMC2160_STANDALONE,
|
||||
* TMC2208, TMC2208_STANDALONE, TMC2209, TMC2209_STANDALONE,
|
||||
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
|
||||
* TMC5130, TMC5130_STANDALONE, TMC5160, TMC5160_STANDALONE
|
||||
* :['A4988', 'A5984', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC2209', 'TMC2209_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
|
||||
* TMC2660, TMC2660_STANDALONE, TMC5130, TMC5130_STANDALONE,
|
||||
* TMC5160, TMC5160_STANDALONE
|
||||
* :['A4988', 'A5984', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC2209', 'TMC2209_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
|
||||
*/
|
||||
#define X_DRIVER_TYPE A4988
|
||||
#define Y_DRIVER_TYPE A4988
|
||||
@@ -375,14 +388,15 @@
|
||||
* PRUSA_MMU1 : Průša MMU1 (The "multiplexer" version)
|
||||
* PRUSA_MMU2 : Průša MMU2
|
||||
* PRUSA_MMU2S : Průša MMU2S (Requires MK3S extruder with motion sensor, EXTRUDERS = 5)
|
||||
* PRUSA_MMU3 : Průša MMU3 (Requires MK3S extruder with motion sensor and MMU firmware version 3.x.x, EXTRUDERS = 5)
|
||||
* EXTENDABLE_EMU_MMU2 : MMU with configurable number of filaments (ERCF, SMuFF or similar with Průša MMU2 compatible firmware)
|
||||
* EXTENDABLE_EMU_MMU2S : MMUS with configurable number of filaments (ERCF, SMuFF or similar with Průša MMU2 compatible firmware)
|
||||
*
|
||||
* Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
|
||||
* See additional options in Configuration_adv.h.
|
||||
* :["PRUSA_MMU1", "PRUSA_MMU2", "PRUSA_MMU2S", "EXTENDABLE_EMU_MMU2", "EXTENDABLE_EMU_MMU2S"]
|
||||
* :["PRUSA_MMU1", "PRUSA_MMU2", "PRUSA_MMU2S", "PRUSA_MMU3", "EXTENDABLE_EMU_MMU2", "EXTENDABLE_EMU_MMU2S"]
|
||||
*/
|
||||
//#define MMU_MODEL PRUSA_MMU2
|
||||
//#define MMU_MODEL PRUSA_MMU3
|
||||
|
||||
// @section psu control
|
||||
|
||||
@@ -401,9 +415,18 @@
|
||||
//#define PS_OFF_SOUND // Beep 1s when power off
|
||||
#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 250 // (ms) Delay for the PSU to warm up to full power
|
||||
//#define LED_POWEROFF_TIMEOUT 10000 // (ms) Turn off LEDs after power-off, with this amount of delay
|
||||
//#define PSU_DEFAULT_OFF // Keep power off until enabled directly with M80
|
||||
//#define PSU_POWERUP_DELAY 250 // (ms) Delay for the PSU to warm up to full power
|
||||
//#define LED_POWEROFF_TIMEOUT 10000 // (ms) Turn off LEDs after power-off, with this amount of delay
|
||||
|
||||
//#define PSU_OFF_REDUNDANT // Second pin for redundant power control
|
||||
//#define PSU_OFF_REDUNDANT_INVERTED // Redundant pin state is the inverse of PSU_ACTIVE_STATE
|
||||
|
||||
//#define PS_ON1_PIN 6 // Redundant pin required to enable power in combination with PS_ON_PIN
|
||||
|
||||
//#define PS_ON_EDM_PIN 8 // External Device Monitoring pins for external power control relay feedback. Fault on mismatch.
|
||||
//#define PS_ON1_EDM_PIN 9
|
||||
#define PS_EDM_RESPONSE 250 // (ms) Time to allow for relay action
|
||||
|
||||
//#define POWER_OFF_TIMER // Enable M81 D<seconds> to power off after a delay
|
||||
//#define POWER_OFF_WAIT_FOR_COOLDOWN // Enable M81 S to power off only after cooldown
|
||||
@@ -564,7 +587,7 @@
|
||||
#define DUMMY_THERMISTOR_998_VALUE 25
|
||||
#define DUMMY_THERMISTOR_999_VALUE 100
|
||||
|
||||
// Resistor values when using MAX31865 sensors (-5) on TEMP_SENSOR_0 / 1
|
||||
// Resistor values when using MAX31865 sensors (-5) on TEMP_SENSOR_0 / 1 / 2 / BED
|
||||
#if TEMP_SENSOR_IS_MAX_TC(0)
|
||||
#define MAX31865_SENSOR_OHMS_0 100 // (Ω) Typically 100 or 1000 (PT100 or PT1000)
|
||||
#define MAX31865_CALIBRATION_OHMS_0 430 // (Ω) Typically 430 for Adafruit PT100; 4300 for Adafruit PT1000
|
||||
@@ -577,6 +600,10 @@
|
||||
#define MAX31865_SENSOR_OHMS_2 100
|
||||
#define MAX31865_CALIBRATION_OHMS_2 430
|
||||
#endif
|
||||
#if TEMP_SENSOR_IS_MAX_TC(BED)
|
||||
#define MAX31865_SENSOR_OHMS_BED 100
|
||||
#define MAX31865_CALIBRATION_OHMS_BED 430
|
||||
#endif
|
||||
|
||||
#if HAS_E_TEMP_SENSOR
|
||||
#define TEMP_RESIDENCY_TIME 10 // (seconds) Time to wait for hotend to "settle" in M109
|
||||
@@ -663,12 +690,13 @@
|
||||
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
|
||||
*/
|
||||
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
|
||||
//#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
|
||||
//#define MPCTEMP // See https://marlinfw.org/docs/features/model_predictive_control.html
|
||||
|
||||
#define PID_MAX 255 // Limit hotend current 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 MIN_POWER 0
|
||||
//#define PID_DEBUG // Print PID debug data to the serial port. Use 'M303 D' to toggle activation.
|
||||
//#define PID_PARAMS_PER_HOTEND // Use separate PID parameters for each extruder (useful for mismatched extruders)
|
||||
// Set/get with G-code: M301 E[extruder number, 0-2]
|
||||
@@ -694,10 +722,13 @@
|
||||
* Use a physical model of the hotend to control temperature. When configured correctly this gives
|
||||
* better responsiveness and stability than PID and removes the need for PID_EXTRUSION_SCALING
|
||||
* and PID_FAN_SCALING. Enable MPC_AUTOTUNE and use M306 T to autotune the model.
|
||||
* @section mpctemp
|
||||
* @section mpc temp
|
||||
*/
|
||||
#if ENABLED(MPCTEMP)
|
||||
#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
|
||||
#if ENABLED(MPC_AUTOTUNE)
|
||||
//#define MPC_AUTOTUNE_DEBUG // Enable MPC debug logging (~870 bytes of flash)
|
||||
#endif
|
||||
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
|
||||
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
|
||||
|
||||
@@ -779,6 +810,40 @@
|
||||
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Peltier Bed - Heating and Cooling
|
||||
*
|
||||
* A Peltier device transfers heat from one side to the other in proportion to the amount of
|
||||
* current flowing through the device and the direction of current flow. So the same device
|
||||
* can both heat and cool.
|
||||
*
|
||||
* When "cooling" in addition to rejecting the heat transferred from the hot side to the cold
|
||||
* side, the dissipated power (voltage * current) must also be rejected. Be sure to set up a
|
||||
* fan that can be powered in sync with the Peltier unit.
|
||||
*
|
||||
* This feature is only set up to run in bang-bang mode because Peltiers don't handle PWM
|
||||
* well without filter circuitry.
|
||||
*
|
||||
* Since existing 3D printers are made to handle relatively high current for the heated bed,
|
||||
* we can use the heated bed power pins to control the Peltier power using the same G-codes
|
||||
* as the heated bed (M140, M190, etc.).
|
||||
*
|
||||
* A second GPIO pin is required to control current direction.
|
||||
* Two configurations are possible: Relay and H-Bridge
|
||||
*
|
||||
* (At this time only relay is supported. H-bridge requires 4 MOS switches configured in H-Bridge.)
|
||||
*
|
||||
* Power is handled by the bang-bang control loop: 0 or 255.
|
||||
* Cooling applications are more common than heating, so the pin states are commonly:
|
||||
* LOW = Heating = Relay Energized
|
||||
* HIGH = Cooling = Relay in "Normal" state
|
||||
*/
|
||||
//#define PELTIER_BED
|
||||
#if ENABLED(PELTIER_BED)
|
||||
#define PELTIER_DIR_PIN -1 // Relay control pin for Peltier
|
||||
#define PELTIER_DIR_HEAT_STATE LOW // The relay pin state that causes the Peltier to heat
|
||||
#endif
|
||||
|
||||
// Add 'M190 R T' for more gradual M190 R bed cooling.
|
||||
//#define BED_ANNEALING_GCODE
|
||||
|
||||
@@ -819,14 +884,16 @@
|
||||
// Lasko "MyHeat Personal Heater" (200w) modified with a Fotek SSR-10DA to control only the heating element
|
||||
// and placed inside the small Creality printer enclosure tent.
|
||||
//
|
||||
#define DEFAULT_chamberKp 37.04
|
||||
#define DEFAULT_chamberKi 1.40
|
||||
#define DEFAULT_chamberKp 37.04
|
||||
#define DEFAULT_chamberKi 1.40
|
||||
#define DEFAULT_chamberKd 655.17
|
||||
// M309 P37.04 I1.04 D655.17
|
||||
|
||||
// FIND YOUR OWN: "M303 E-2 C8 S50" to run autotune on the chamber at 50 degreesC for 8 cycles.
|
||||
#endif // PIDTEMPCHAMBER
|
||||
|
||||
// @section pid temp
|
||||
|
||||
#if ANY(PIDTEMP, PIDTEMPBED, PIDTEMPCHAMBER)
|
||||
//#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
|
||||
@@ -882,7 +949,7 @@
|
||||
//============================= Mechanical Settings =========================
|
||||
//===========================================================================
|
||||
|
||||
// @section machine
|
||||
// @section kinematics
|
||||
|
||||
// Enable one of the options below for CoreXY, CoreXZ, or CoreYZ kinematics,
|
||||
// either in the usual order or reversed
|
||||
@@ -906,6 +973,15 @@
|
||||
// Enable for a belt style printer with endless "Z" motion
|
||||
//#define BELTPRINTER
|
||||
|
||||
// Articulated robot (arm). Joints are directly mapped to axes with no kinematics.
|
||||
//#define ARTICULATED_ROBOT_ARM
|
||||
|
||||
// For a hot wire cutter with parallel horizontal axes (X, I) where the heights of the two wire
|
||||
// ends are controlled by parallel axes (Y, J). Joints are directly mapped to axes (no kinematics).
|
||||
//#define FOAMCUTTER_XYUV
|
||||
|
||||
// @section polargraph
|
||||
|
||||
// Enable for Polargraph Kinematics
|
||||
//#define POLARGRAPH
|
||||
#if ENABLED(POLARGRAPH)
|
||||
@@ -1006,9 +1082,6 @@
|
||||
// Radius around the center where the arm cannot reach
|
||||
#define MIDDLE_DEAD_ZONE_R 0 // (mm)
|
||||
|
||||
#define THETA_HOMING_OFFSET 0 // Calculated from Calibration Guide and M360 / M114. See https://www.morgan3dp.com/morgan-calibration-guide/
|
||||
#define PSI_HOMING_OFFSET 0 // Calculated from Calibration Guide and M364 / M114. See https://www.morgan3dp.com/morgan-calibration-guide/
|
||||
|
||||
#elif ENABLED(MP_SCARA)
|
||||
|
||||
#define SCARA_OFFSET_THETA1 12 // degrees
|
||||
@@ -1027,23 +1100,19 @@
|
||||
#define DEFAULT_SEGMENTS_PER_SECOND 200
|
||||
|
||||
// Length of inner and outer support arms. Measure arm lengths precisely.
|
||||
#define TPARA_LINKAGE_1 120 // (mm)
|
||||
#define TPARA_LINKAGE_2 120 // (mm)
|
||||
#define TPARA_LINKAGE_1 120 // (mm)
|
||||
#define TPARA_LINKAGE_2 120 // (mm)
|
||||
|
||||
// SCARA tower offset (position of Tower relative to bed zero position)
|
||||
// This needs to be reasonably accurate as it defines the printbed position in the SCARA space.
|
||||
#define TPARA_OFFSET_X 0 // (mm)
|
||||
#define TPARA_OFFSET_Y 0 // (mm)
|
||||
#define TPARA_OFFSET_Z 0 // (mm)
|
||||
// TPARA tower offset (position of Tower relative to bed zero position)
|
||||
// This needs to be reasonably accurate as it defines the printbed position in the TPARA space.
|
||||
#define TPARA_OFFSET_X 0 // (mm)
|
||||
#define TPARA_OFFSET_Y 0 // (mm)
|
||||
#define TPARA_OFFSET_Z 0 // (mm)
|
||||
|
||||
#define FEEDRATE_SCALING // Convert XY feedrate from mm/s to degrees/s on the fly
|
||||
|
||||
// Radius around the center where the arm cannot reach
|
||||
#define MIDDLE_DEAD_ZONE_R 0 // (mm)
|
||||
|
||||
// Calculated from Calibration Guide and M360 / M114. See https://www.morgan3dp.com/morgan-calibration-guide/
|
||||
#define THETA_HOMING_OFFSET 0
|
||||
#define PSI_HOMING_OFFSET 0
|
||||
#endif
|
||||
|
||||
// @section polar
|
||||
@@ -1099,15 +1168,6 @@
|
||||
#define FEEDRATE_SCALING // Convert XY feedrate from mm/s to degrees/s on the fly
|
||||
#endif
|
||||
|
||||
// @section machine
|
||||
|
||||
// Articulated robot (arm). Joints are directly mapped to axes with no kinematics.
|
||||
//#define ARTICULATED_ROBOT_ARM
|
||||
|
||||
// For a hot wire cutter with parallel horizontal axes (X, I) where the heights of the two wire
|
||||
// ends are controlled by parallel axes (Y, J). Joints are directly mapped to axes (no kinematics).
|
||||
//#define FOAMCUTTER_XYUV
|
||||
|
||||
//===========================================================================
|
||||
//============================== Endstop Settings ===========================
|
||||
//===========================================================================
|
||||
@@ -1452,7 +1512,7 @@
|
||||
* A lightweight, solenoid-driven probe.
|
||||
* For information about this sensor https://github.com/bigtreetech/MicroProbe
|
||||
*
|
||||
* Also requires: PROBE_ENABLE_DISABLE
|
||||
* Also requires PROBE_ENABLE_DISABLE
|
||||
*/
|
||||
//#define BIQU_MICROPROBE_V1 // Triggers HIGH
|
||||
//#define BIQU_MICROPROBE_V2 // Triggers LOW
|
||||
@@ -1591,14 +1651,15 @@
|
||||
// with NOZZLE_AS_PROBE this can be negative for a wider probing area.
|
||||
#define PROBING_MARGIN 10
|
||||
|
||||
// X and Y axis travel speed (mm/min) between probes
|
||||
#define XY_PROBE_FEEDRATE (133*60)
|
||||
// X and Y axis travel speed between probes.
|
||||
// Leave undefined to use the average of the current XY homing feedrate.
|
||||
#define XY_PROBE_FEEDRATE (133*60) // (mm/min)
|
||||
|
||||
// Feedrate (mm/min) for the first approach when double-probing (MULTIPLE_PROBING == 2)
|
||||
#define Z_PROBE_FEEDRATE_FAST (4*60)
|
||||
// Feedrate for the first approach when double-probing (MULTIPLE_PROBING == 2)
|
||||
#define Z_PROBE_FEEDRATE_FAST (4*60) // (mm/min)
|
||||
|
||||
// Feedrate (mm/min) for the "accurate" probe of each point
|
||||
#define Z_PROBE_FEEDRATE_SLOW (Z_PROBE_FEEDRATE_FAST / 2)
|
||||
// Feedrate for the "accurate" probe of each point
|
||||
#define Z_PROBE_FEEDRATE_SLOW (Z_PROBE_FEEDRATE_FAST / 2) // (mm/min)
|
||||
|
||||
/**
|
||||
* Probe Activation Switch
|
||||
@@ -1622,6 +1683,7 @@
|
||||
#define PROBE_TARE_DELAY 200 // (ms) Delay after tare before
|
||||
#define PROBE_TARE_STATE HIGH // State to write pin for tare
|
||||
//#define PROBE_TARE_PIN PA5 // Override default pin
|
||||
//#define PROBE_TARE_MENU // Display a menu item to tare the probe
|
||||
#if ENABLED(PROBE_ACTIVATION_SWITCH)
|
||||
//#define PROBE_TARE_ONLY_WHILE_INACTIVE // Fail to tare/probe if PROBE_ACTIVATION_SWITCH is active
|
||||
#endif
|
||||
@@ -1659,8 +1721,8 @@
|
||||
* probe Z Offset set with NOZZLE_TO_PROBE_OFFSET, M851, or the LCD.
|
||||
* Only integer values >= 1 are valid here.
|
||||
*
|
||||
* Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle.
|
||||
* But: `M851 Z+1` with a CLEARANCE of 2 => 2mm from bed to nozzle.
|
||||
* Example: 'M851 Z-5' with a CLEARANCE of 4 => 9mm from bed to nozzle.
|
||||
* But: 'M851 Z+1' with a CLEARANCE of 2 => 2mm from bed to nozzle.
|
||||
*/
|
||||
#define Z_CLEARANCE_DEPLOY_PROBE 10 // (mm) Z Clearance for Deploy/Stow
|
||||
#define Z_CLEARANCE_BETWEEN_PROBES 5 // (mm) Z Clearance between probe points
|
||||
@@ -1711,18 +1773,20 @@
|
||||
#define PROBING_BED_TEMP 50
|
||||
#endif
|
||||
|
||||
// @section stepper drivers
|
||||
|
||||
// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
|
||||
// :{ 0:'Low', 1:'High' }
|
||||
#define X_ENABLE_ON 0
|
||||
#define Y_ENABLE_ON 0
|
||||
#define Z_ENABLE_ON 0
|
||||
#define E_ENABLE_ON 0 // For all extruders
|
||||
//#define I_ENABLE_ON 0
|
||||
//#define J_ENABLE_ON 0
|
||||
//#define K_ENABLE_ON 0
|
||||
//#define U_ENABLE_ON 0
|
||||
//#define V_ENABLE_ON 0
|
||||
//#define W_ENABLE_ON 0
|
||||
// :['LOW', 'HIGH']
|
||||
#define X_ENABLE_ON LOW
|
||||
#define Y_ENABLE_ON LOW
|
||||
#define Z_ENABLE_ON LOW
|
||||
#define E_ENABLE_ON LOW // For all extruders
|
||||
//#define I_ENABLE_ON LOW
|
||||
//#define J_ENABLE_ON LOW
|
||||
//#define K_ENABLE_ON LOW
|
||||
//#define U_ENABLE_ON LOW
|
||||
//#define V_ENABLE_ON LOW
|
||||
//#define W_ENABLE_ON LOW
|
||||
|
||||
// Disable axis steppers immediately when they're not being stepped.
|
||||
// WARNING: When motors turn off there is a chance of losing position accuracy!
|
||||
@@ -1884,6 +1948,8 @@
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @section filament runout sensors
|
||||
*
|
||||
* Filament Runout Sensors
|
||||
* Mechanical or opto endstops are used to check for the presence of filament.
|
||||
*
|
||||
@@ -1995,9 +2061,9 @@
|
||||
//#define FIL_MOTION8_PULLUP
|
||||
//#define FIL_MOTION8_PULLDOWN
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif // FILAMENT_MOTION_SENSOR
|
||||
#endif // FILAMENT_RUNOUT_DISTANCE_MM
|
||||
#endif // FILAMENT_RUNOUT_SENSOR
|
||||
|
||||
//===========================================================================
|
||||
//=============================== Bed Leveling ==============================
|
||||
@@ -2043,6 +2109,12 @@
|
||||
//#define AUTO_BED_LEVELING_UBL
|
||||
//#define MESH_BED_LEVELING
|
||||
|
||||
/**
|
||||
* Commands to execute at the start of G29 probing,
|
||||
* after switching to the PROBING_TOOL.
|
||||
*/
|
||||
//#define EVENT_GCODE_BEFORE_G29 "M300 P440 S200"
|
||||
|
||||
/**
|
||||
* Commands to execute at the end of G29 probing.
|
||||
* Useful to retract or move the Z probe out of the way.
|
||||
@@ -2216,7 +2288,7 @@
|
||||
#if ENABLED(LCD_BED_TRAMMING)
|
||||
#define BED_TRAMMING_INSET_LFRB { 30, 30, 30, 30 } // (mm) Left, Front, Right, Back insets
|
||||
#define BED_TRAMMING_HEIGHT 0.0 // (mm) Z height of nozzle at tramming points
|
||||
#define BED_TRAMMING_Z_HOP 4.0 // (mm) Z height of nozzle between tramming points
|
||||
#define BED_TRAMMING_Z_HOP 4.0 // (mm) Z raise between tramming points
|
||||
//#define BED_TRAMMING_INCLUDE_CENTER // Move to the center after the last corner
|
||||
//#define BED_TRAMMING_USE_PROBE
|
||||
#if ENABLED(BED_TRAMMING_USE_PROBE)
|
||||
@@ -2280,6 +2352,9 @@
|
||||
// Homing speeds (linear=mm/min, rotational=°/min)
|
||||
#define HOMING_FEEDRATE_MM_M { (50*60), (50*60), (4*60) }
|
||||
|
||||
// Edit homing feedrates with M210 and MarlinUI menu items
|
||||
//#define EDITABLE_HOMING_FEEDRATE
|
||||
|
||||
// Validate that endstops are triggered on homing moves
|
||||
#define VALIDATE_HOMING_ENDSTOPS
|
||||
|
||||
@@ -2406,9 +2481,9 @@
|
||||
#define PREHEAT_2_TEMP_CHAMBER 35
|
||||
#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255
|
||||
|
||||
// @section motion
|
||||
|
||||
/**
|
||||
* @section nozzle park
|
||||
*
|
||||
* Nozzle Park
|
||||
*
|
||||
* Park the nozzle at the given XYZ position on idle or G27.
|
||||
@@ -2431,6 +2506,8 @@
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @section nozzle clean
|
||||
*
|
||||
* Clean Nozzle Feature
|
||||
*
|
||||
* Adds the G12 command to perform a nozzle cleaning process.
|
||||
@@ -2591,9 +2668,24 @@
|
||||
//#include "Configuration_Secure.h" // External file with PASSWORD_DEFAULT_VALUE
|
||||
#endif
|
||||
|
||||
//=============================================================================
|
||||
//============================= LCD and SD support ============================
|
||||
//=============================================================================
|
||||
// @section media
|
||||
|
||||
/**
|
||||
* SD CARD
|
||||
*
|
||||
* 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
|
||||
|
||||
/**
|
||||
* SD CARD: ENABLE CRC
|
||||
*
|
||||
* Use CRC checks and retries on the SD communication.
|
||||
*/
|
||||
#if ENABLED(SDSUPPORT)
|
||||
//#define SD_CHECK_AND_RETRY
|
||||
#endif
|
||||
|
||||
// @section interface
|
||||
|
||||
@@ -2634,27 +2726,12 @@
|
||||
#define DISPLAY_CHARSET_HD44780 JAPANESE
|
||||
|
||||
/**
|
||||
* Info Screen Style (0:Classic, 1:Průša)
|
||||
* Info Screen Style (0:Classic, 1:Průša, 2:CNC)
|
||||
*
|
||||
* :[0:'Classic', 1:'Průša']
|
||||
* :[0:'Classic', 1:'Průša', 2:'CNC']
|
||||
*/
|
||||
#define LCD_INFO_SCREEN_STYLE 0
|
||||
|
||||
/**
|
||||
* SD CARD
|
||||
*
|
||||
* 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
|
||||
|
||||
/**
|
||||
* SD CARD: ENABLE CRC
|
||||
*
|
||||
* Use CRC checks and retries on the SD communication.
|
||||
*/
|
||||
//#define SD_CHECK_AND_RETRY
|
||||
|
||||
/**
|
||||
* LCD Menu Items
|
||||
*
|
||||
@@ -2783,7 +2860,7 @@
|
||||
|
||||
//
|
||||
// Original RADDS LCD Display+Encoder+SDCardReader
|
||||
// https://web.archive.org/web/20200719145306/http://doku.radds.org/dokumentation/lcd-display/
|
||||
// https://web.archive.org/web/20200719145306/doku.radds.org/dokumentation/lcd-display/
|
||||
//
|
||||
//#define RADDS_DISPLAY
|
||||
|
||||
@@ -2822,13 +2899,15 @@
|
||||
//
|
||||
//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
|
||||
|
||||
//
|
||||
// ANET and Tronxy 20x4 Controller
|
||||
//
|
||||
//#define ZONESTAR_LCD // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
|
||||
// This LCD is known to be susceptible to electrical interference
|
||||
// which scrambles the display. Pressing any button clears it up.
|
||||
// This is a LCD2004 display with 5 analog buttons.
|
||||
/**
|
||||
* ANET and Tronxy 20x4 Controller
|
||||
* LCD2004 display with 5 analog buttons.
|
||||
*
|
||||
* NOTE: Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
|
||||
* This LCD is known to be susceptible to electrical interference which
|
||||
* scrambles the display. Press any button to clear it up.
|
||||
*/
|
||||
//#define ZONESTAR_LCD
|
||||
|
||||
//
|
||||
// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
|
||||
@@ -2849,7 +2928,7 @@
|
||||
|
||||
//
|
||||
// Elefu RA Board Control Panel
|
||||
// https://web.archive.org/web/20140823033947/http://www.elefu.com/index.php?route=product/product&product_id=53
|
||||
// https://web.archive.org/web/20140823033947/www.elefu.com/index.php?route=product/product&product_id=53
|
||||
//
|
||||
//#define RA_CONTROL_PANEL
|
||||
|
||||
@@ -2981,7 +3060,7 @@
|
||||
|
||||
//
|
||||
// Cartesio UI
|
||||
// https://web.archive.org/web/20180605050442/http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
|
||||
// https://web.archive.org/web/20180605050442/mauk.cc/webshop/cartesio-shop/electronics/user-interface
|
||||
//
|
||||
//#define CARTESIO_UI
|
||||
|
||||
@@ -3105,14 +3184,14 @@
|
||||
//
|
||||
// Tiny, but very sharp OLED display
|
||||
//
|
||||
//#define MKS_12864OLED // Uses the SH1106 controller (default)
|
||||
//#define MKS_12864OLED // Uses the SH1106 controller
|
||||
//#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 // 1.3" OLED with SH1106 controller
|
||||
//#define ZONESTAR_12864OLED_SSD1306 // 0.96" OLED with SSD1306 controller
|
||||
|
||||
//
|
||||
@@ -3218,6 +3297,11 @@
|
||||
//
|
||||
//#define ANYCUBIC_LCD_VYPER
|
||||
|
||||
//
|
||||
// Sovol SV-06 Resistive Touch Screen
|
||||
//
|
||||
//#define SOVOL_SV06_RTS
|
||||
|
||||
//
|
||||
// 320x240 Nextion 2.8" serial TFT Resistive Touch Screen NX3224T028
|
||||
//
|
||||
@@ -3356,7 +3440,7 @@
|
||||
|
||||
#if ENABLED(TFT_COLOR_UI)
|
||||
/**
|
||||
* TFT Font for Color_UI. Choose one of the following:
|
||||
* TFT Font for Color UI. Choose one of the following:
|
||||
*
|
||||
* NOTOSANS - Default font with anti-aliasing. Supports Latin Extended and non-Latin characters.
|
||||
* UNIFONT - Lightweight font, no anti-aliasing. Supports Latin Extended and non-Latin characters.
|
||||
@@ -3365,7 +3449,7 @@
|
||||
#define TFT_FONT NOTOSANS
|
||||
|
||||
/**
|
||||
* TFT Theme for Color_UI. Choose one of the following or add a new one to 'Marlin/src/lcd/tft/themes' directory
|
||||
* TFT Theme for Color UI. Choose one of the following or add a new one to 'Marlin/src/lcd/tft/themes' directory
|
||||
*
|
||||
* BLUE_MARLIN - Default theme with 'midnight blue' background
|
||||
* BLACK_MARLIN - Theme with 'black' background
|
||||
@@ -3389,6 +3473,8 @@
|
||||
* 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
|
||||
*
|
||||
* :{ 'TFT_NO_ROTATION':'None', 'TFT_ROTATE_90':'90°', 'TFT_ROTATE_90_MIRROR_X':'90° (Mirror X)', 'TFT_ROTATE_90_MIRROR_Y':'90° (Mirror Y)', 'TFT_ROTATE_180':'180°', 'TFT_ROTATE_180_MIRROR_X':'180° (Mirror X)', 'TFT_ROTATE_180_MIRROR_Y':'180° (Mirror Y)', 'TFT_ROTATE_270':'270°', 'TFT_ROTATE_270_MIRROR_X':'270° (Mirror X)', 'TFT_ROTATE_270_MIRROR_Y':'270° (Mirror Y)', 'TFT_MIRROR_X':'Mirror X', 'TFT_MIRROR_Y':'Mirror Y' }
|
||||
*/
|
||||
//#define TFT_ROTATION TFT_NO_ROTATION
|
||||
|
||||
@@ -3413,8 +3499,9 @@
|
||||
#define BUTTON_DELAY_EDIT 50 // (ms) Button repeat delay for edit screens
|
||||
#define BUTTON_DELAY_MENU 250 // (ms) Button repeat delay for menus
|
||||
|
||||
//#define DISABLE_ENCODER // Disable the click encoder, if any
|
||||
//#define TOUCH_IDLE_SLEEP_MINS 5 // (minutes) Display Sleep after a period of inactivity. Set with M255 S.
|
||||
#if ANY(TFT_CLASSIC_UI, TFT_COLOR_UI)
|
||||
//#define NO_BACK_MENU_ITEM // Don't display a top menu item to go back to the parent menu
|
||||
#endif
|
||||
|
||||
#define TOUCH_SCREEN_CALIBRATION
|
||||
|
||||
@@ -3438,7 +3525,9 @@
|
||||
// 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
|
||||
#if ENABLED(REPRAPWORLD_KEYPAD)
|
||||
//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 // (mm) Distance to move per key-press
|
||||
#endif
|
||||
|
||||
//
|
||||
// EasyThreeD ET-4000+ with button input and status LED
|
||||
@@ -3455,22 +3544,26 @@
|
||||
// :[1,2,3,4,5,6,7,8]
|
||||
//#define NUM_M106_FANS 1
|
||||
|
||||
// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
|
||||
// which is not as annoying as with the hardware PWM. On the other hand, if this frequency
|
||||
// is too low, you should also increment SOFT_PWM_SCALE.
|
||||
/**
|
||||
* Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
|
||||
* which is not as annoying as with the hardware PWM. On the other hand, if this frequency
|
||||
* is too low, you should also increment SOFT_PWM_SCALE.
|
||||
*/
|
||||
//#define FAN_SOFT_PWM
|
||||
|
||||
// Incrementing this by 1 will double the software PWM frequency,
|
||||
// affecting heaters, and the fan if FAN_SOFT_PWM is enabled.
|
||||
// However, control resolution will be halved for each increment;
|
||||
// at zero value, there are 128 effective control positions.
|
||||
// :[0,1,2,3,4,5,6,7]
|
||||
/**
|
||||
* Incrementing this by 1 will double the software PWM frequency, affecting heaters, and
|
||||
* the fan if FAN_SOFT_PWM is enabled. However, control resolution will be halved for each
|
||||
* increment; at zero value, there are 128 effective control positions.
|
||||
* :[0,1,2,3,4,5,6,7]
|
||||
*/
|
||||
#define SOFT_PWM_SCALE 0
|
||||
|
||||
// If SOFT_PWM_SCALE is set to a value higher than 0, dithering can
|
||||
// be used to mitigate the associated resolution loss. If enabled,
|
||||
// some of the PWM cycles are stretched so on average the desired
|
||||
// duty cycle is attained.
|
||||
/**
|
||||
* If SOFT_PWM_SCALE is set to a value higher than 0, dithering can be used to mitigate the
|
||||
* associated resolution loss. If enabled, some of the PWM cycles are stretched so on average
|
||||
* the desired duty cycle is attained.
|
||||
*/
|
||||
//#define SOFT_PWM_DITHER
|
||||
|
||||
// @section extras
|
||||
@@ -3480,9 +3573,11 @@
|
||||
|
||||
// @section lights
|
||||
|
||||
// Temperature status LEDs that display the hotend and bed temperature.
|
||||
// If all hotends, bed temperature, and target temperature are under 54C
|
||||
// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
|
||||
/**
|
||||
* Temperature status LEDs that display the hotend and bed temperature.
|
||||
* If all hotends, bed temperature, and target temperature are under 54C
|
||||
* the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
|
||||
*/
|
||||
//#define TEMP_STAT_LEDS
|
||||
|
||||
// Support for BlinkM/CyzRgb
|
||||
|
||||
+329
-191
@@ -47,8 +47,9 @@
|
||||
* 2 = config.ini - File format for PlatformIO preprocessing.
|
||||
* 3 = schema.json - The entire configuration schema. (13 = pattern groups)
|
||||
* 4 = schema.yml - The entire configuration schema.
|
||||
* 5 = Config.h - Minimal configuration by popular demand.
|
||||
*/
|
||||
//#define CONFIG_EXPORT 2 // :[1:'JSON', 2:'config.ini', 3:'schema.json', 4:'schema.yml']
|
||||
//#define CONFIG_EXPORT 105 // :[1:'JSON', 2:'config.ini', 3:'schema.json', 4:'schema.yml', 5:'Config.h']
|
||||
|
||||
//===========================================================================
|
||||
//============================= Thermal Settings ============================
|
||||
@@ -173,9 +174,10 @@
|
||||
* Thermocouple Options — for MAX6675 (-2), MAX31855 (-3), and MAX31865 (-5).
|
||||
*/
|
||||
//#define TEMP_SENSOR_FORCE_HW_SPI // Ignore SCK/MOSI/MISO pins; use CS and the default SPI bus.
|
||||
//#define MAX31865_SENSOR_WIRES_0 2 // (2-4) Number of wires for the probe connected to a MAX31865 board.
|
||||
//#define MAX31865_SENSOR_WIRES_1 2
|
||||
//#define MAX31865_SENSOR_WIRES_2 2
|
||||
//#define MAX31865_SENSOR_WIRES_0 2 // (2-4) Number of wires for the probe connected to a MAX31865 board.
|
||||
//#define MAX31865_SENSOR_WIRES_1 2
|
||||
//#define MAX31865_SENSOR_WIRES_2 2
|
||||
//#define MAX31865_SENSOR_WIRES_BED 2
|
||||
|
||||
//#define MAX31865_50HZ_FILTER // Use a 50Hz filter instead of the default 60Hz.
|
||||
//#define MAX31865_USE_READ_ERROR_DETECTION // Treat value spikes (20°C delta in under 1s) as read errors.
|
||||
@@ -187,6 +189,7 @@
|
||||
//#define MAX31865_WIRE_OHMS_0 0.95f // For 2-wire, set the wire resistances for more accurate readings.
|
||||
//#define MAX31865_WIRE_OHMS_1 0.0f
|
||||
//#define MAX31865_WIRE_OHMS_2 0.0f
|
||||
//#define MAX31865_WIRE_OHMS_BED 0.0f
|
||||
|
||||
/**
|
||||
* Hephestos 2 24V heated bed upgrade kit.
|
||||
@@ -202,7 +205,7 @@
|
||||
//
|
||||
#if DISABLED(PIDTEMPBED)
|
||||
#define BED_CHECK_INTERVAL 5000 // (ms) Interval between checks in bang-bang control
|
||||
#if ENABLED(BED_LIMIT_SWITCHING)
|
||||
#if ANY(BED_LIMIT_SWITCHING, PELTIER_BED)
|
||||
#define BED_HYSTERESIS 2 // (°C) Only set the relevant heater state when ABS(T-target) > BED_HYSTERESIS
|
||||
#endif
|
||||
#endif
|
||||
@@ -210,18 +213,19 @@
|
||||
//
|
||||
// Heated Chamber options
|
||||
//
|
||||
#if DISABLED(PIDTEMPCHAMBER)
|
||||
#define CHAMBER_CHECK_INTERVAL 5000 // (ms) Interval between checks in bang-bang control
|
||||
#if ENABLED(CHAMBER_LIMIT_SWITCHING)
|
||||
#define CHAMBER_HYSTERESIS 2 // (°C) Only set the relevant heater state when ABS(T-target) > CHAMBER_HYSTERESIS
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if TEMP_SENSOR_CHAMBER
|
||||
//#define HEATER_CHAMBER_PIN P2_04 // Required heater on/off pin (example: SKR 1.4 Turbo HE1 plug)
|
||||
//#define HEATER_CHAMBER_INVERTING false
|
||||
//#define FAN1_PIN -1 // Remove the fan signal on pin P2_04 (example: SKR 1.4 Turbo HE1 plug)
|
||||
|
||||
#if DISABLED(PIDTEMPCHAMBER)
|
||||
#define CHAMBER_CHECK_INTERVAL 5000 // (ms) Interval between checks in bang-bang control
|
||||
#if ENABLED(CHAMBER_LIMIT_SWITCHING)
|
||||
#define CHAMBER_HYSTERESIS 2 // (°C) Only set the relevant heater state when ABS(T-target) > CHAMBER_HYSTERESIS
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//#define CHAMBER_FAN // Enable a fan on the chamber
|
||||
#if ENABLED(CHAMBER_FAN)
|
||||
//#define CHAMBER_FAN_INDEX 2 // Index of a fan to repurpose as the chamber fan. (Default: first unused fan)
|
||||
@@ -303,9 +307,9 @@
|
||||
* If you get false positives for "Thermal Runaway", increase
|
||||
* THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
|
||||
*/
|
||||
#if ENABLED(THERMAL_PROTECTION_HOTENDS)
|
||||
#define THERMAL_PROTECTION_PERIOD 40 // (seconds)
|
||||
#define THERMAL_PROTECTION_HYSTERESIS 4 // (°C)
|
||||
#if ALL(HAS_HOTEND, THERMAL_PROTECTION_HOTENDS)
|
||||
#define THERMAL_PROTECTION_PERIOD 40 // (seconds)
|
||||
#define THERMAL_PROTECTION_HYSTERESIS 4 // (°C)
|
||||
|
||||
//#define ADAPTIVE_FAN_SLOWING // Slow down the part-cooling fan if the temperature drops
|
||||
#if ENABLED(ADAPTIVE_FAN_SLOWING)
|
||||
@@ -334,7 +338,7 @@
|
||||
/**
|
||||
* Thermal Protection parameters for the bed are just as above for hotends.
|
||||
*/
|
||||
#if ENABLED(THERMAL_PROTECTION_BED)
|
||||
#if TEMP_SENSOR_BED && ENABLED(THERMAL_PROTECTION_BED)
|
||||
#define THERMAL_PROTECTION_BED_PERIOD 20 // (seconds)
|
||||
#define THERMAL_PROTECTION_BED_HYSTERESIS 2 // (°C)
|
||||
|
||||
@@ -348,7 +352,7 @@
|
||||
/**
|
||||
* Thermal Protection parameters for the heated chamber.
|
||||
*/
|
||||
#if ENABLED(THERMAL_PROTECTION_CHAMBER)
|
||||
#if TEMP_SENSOR_CHAMBER && ENABLED(THERMAL_PROTECTION_CHAMBER)
|
||||
#define THERMAL_PROTECTION_CHAMBER_PERIOD 20 // (seconds)
|
||||
#define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // (°C)
|
||||
|
||||
@@ -362,7 +366,7 @@
|
||||
/**
|
||||
* Thermal Protection parameters for the laser cooler.
|
||||
*/
|
||||
#if ENABLED(THERMAL_PROTECTION_COOLER)
|
||||
#if TEMP_SENSOR_COOLER && ENABLED(THERMAL_PROTECTION_COOLER)
|
||||
#define THERMAL_PROTECTION_COOLER_PERIOD 10 // (seconds)
|
||||
#define THERMAL_PROTECTION_COOLER_HYSTERESIS 3 // (°C)
|
||||
|
||||
@@ -590,6 +594,8 @@
|
||||
// Use TEMP_SENSOR_SOC as a trigger for enabling the controller fan
|
||||
//#define CONTROLLER_FAN_MIN_SOC_TEMP 40 // (°C) Turn on the fan if the SoC reaches this temperature
|
||||
|
||||
#define CONTROLLER_FAN_BED_HEATING // Turn on the fan when heating the bed
|
||||
|
||||
//#define CONTROLLER_FAN_EDITABLE // Enable M710 configurable settings
|
||||
#if ENABLED(CONTROLLER_FAN_EDITABLE)
|
||||
#define CONTROLLER_FAN_MENU // Enable the Controller Fan submenu
|
||||
@@ -604,6 +610,8 @@
|
||||
*/
|
||||
//#define FAN_KICKSTART_TIME 100 // (ms)
|
||||
//#define FAN_KICKSTART_POWER 180 // 64-255
|
||||
//#define FAN_KICKSTART_LINEAR // Set kickstart time linearly based on the speed, e.g., for 20% (51) it will be FAN_KICKSTART_TIME * 0.2.
|
||||
// Useful for quick speed up to low speed. Kickstart power must be set to 255.
|
||||
|
||||
// Some coolers may require a non-zero "off" state.
|
||||
//#define FAN_OFF_PWM 1
|
||||
@@ -1014,7 +1022,7 @@
|
||||
|
||||
#endif // BLTOUCH
|
||||
|
||||
// @section calibration
|
||||
// @section calibrate
|
||||
|
||||
/**
|
||||
* Z Steppers Auto-Alignment
|
||||
@@ -1079,9 +1087,11 @@
|
||||
#define HOME_AFTER_G34
|
||||
#endif
|
||||
|
||||
//
|
||||
// Add the G35 command to read bed corners to help adjust screws. Requires a bed probe.
|
||||
//
|
||||
/**
|
||||
* Assisted Tramming
|
||||
*
|
||||
* Add the G35 command to measure bed corners and help adjust screws. Requires a bed probe.
|
||||
*/
|
||||
//#define ASSISTED_TRAMMING
|
||||
#if ENABLED(ASSISTED_TRAMMING)
|
||||
|
||||
@@ -1102,29 +1112,35 @@
|
||||
//#define ASSISTED_TRAMMING_WAIT_POSITION { X_CENTER, Y_CENTER, 30 } // Move the nozzle out of the way for adjustment
|
||||
|
||||
/**
|
||||
* Screw thread:
|
||||
* M3: 30 = Clockwise, 31 = Counter-Clockwise
|
||||
* M4: 40 = Clockwise, 41 = Counter-Clockwise
|
||||
* M5: 50 = Clockwise, 51 = Counter-Clockwise
|
||||
* Screw Thread. Use one of the following defines:
|
||||
*
|
||||
* M3_CW = M3 Clockwise, M3_CCW = M3 Counter-Clockwise
|
||||
* M4_CW = M4 Clockwise, M4_CCW = M4 Counter-Clockwise
|
||||
* M5_CW = M5 Clockwise, M5_CCW = M5 Counter-Clockwise
|
||||
*
|
||||
* :{'M3_CW':'M3 Clockwise','M3_CCW':'M3 Counter-Clockwise','M4_CW':'M4 Clockwise','M4_CCW':'M4 Counter-Clockwise','M5_CW':'M5 Clockwise','M5_CCW':'M5 Counter-Clockwise'}
|
||||
*/
|
||||
#define TRAMMING_SCREW_THREAD 30
|
||||
#define TRAMMING_SCREW_THREAD M3_CW
|
||||
|
||||
#endif
|
||||
|
||||
// @section motion control
|
||||
|
||||
/**
|
||||
* Fixed-time-based Motion Control -- EXPERIMENTAL
|
||||
* Fixed-time-based Motion Control -- BETA FEATURE
|
||||
* Enable/disable and set parameters with G-code M493.
|
||||
* See ft_types.h for named values used by FTM options.
|
||||
*/
|
||||
//#define FT_MOTION
|
||||
#if ENABLED(FT_MOTION)
|
||||
#define FTM_DEFAULT_MODE ftMotionMode_DISABLED // Default mode of fixed time control. (Enums in ft_types.h)
|
||||
#define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h)
|
||||
#define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers
|
||||
#define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers
|
||||
//#define FTM_IS_DEFAULT_MOTION // Use FT Motion as the factory default?
|
||||
#define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (DISABLED, Z_BASED, MASS_BASED)
|
||||
#define FTM_DEFAULT_SHAPER_X ftMotionShaper_NONE // Default shaper mode on X axis (NONE, ZV, ZVD, ZVDD, ZVDDD, EI, 2HEI, 3HEI, MZV)
|
||||
#define FTM_DEFAULT_SHAPER_Y ftMotionShaper_NONE // Default shaper mode on Y axis
|
||||
#define FTM_SHAPING_DEFAULT_FREQ_X 37.0f // (Hz) Default peak frequency used by input shapers
|
||||
#define FTM_SHAPING_DEFAULT_FREQ_Y 37.0f // (Hz) Default peak frequency used by input shapers
|
||||
#define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false)
|
||||
#define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain
|
||||
#define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. (Acceleration-based scaling factor.)
|
||||
#define FTM_SHAPING_ZETA_X 0.1f // Zeta used by input shapers for X axis
|
||||
#define FTM_SHAPING_ZETA_Y 0.1f // Zeta used by input shapers for Y axis
|
||||
|
||||
@@ -1147,18 +1163,13 @@
|
||||
#define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (Reciprocal of FTM_TS)
|
||||
#define FTM_TS 0.001f // (s) Time step for trajectory generation. (Reciprocal of FTM_FS)
|
||||
|
||||
// These values may be configured to adjust the duration of loop().
|
||||
#define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop()
|
||||
#define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop()
|
||||
|
||||
#if DISABLED(COREXY)
|
||||
#define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update
|
||||
|
||||
// Use this to adjust the time required to consume the command buffer.
|
||||
// Try increasing this value if stepper motion is choppy.
|
||||
#define FTM_STEPPERCMD_BUFF_SIZE 3000 // Size of the stepper command buffers
|
||||
// (FTM_STEPS_PER_LOOP * FTM_POINTS_PER_LOOP) is a good start
|
||||
// If you run out of memory, fall back to 3000 and increase progressively
|
||||
|
||||
#else
|
||||
// CoreXY motion needs a larger buffer size. These values are based on our testing.
|
||||
#define FTM_STEPPER_FS 30000
|
||||
@@ -1180,38 +1191,37 @@
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Input Shaping -- EXPERIMENTAL
|
||||
* Input Shaping
|
||||
*
|
||||
* Zero Vibration (ZV) Input Shaping for X and/or Y movements.
|
||||
*
|
||||
* This option uses a lot of SRAM for the step buffer. The buffer size is
|
||||
* calculated automatically from SHAPING_FREQ_[XY], DEFAULT_AXIS_STEPS_PER_UNIT,
|
||||
* calculated automatically from SHAPING_FREQ_[XYZ], DEFAULT_AXIS_STEPS_PER_UNIT,
|
||||
* DEFAULT_MAX_FEEDRATE and ADAPTIVE_STEP_SMOOTHING. The default calculation can
|
||||
* be overridden by setting SHAPING_MIN_FREQ and/or SHAPING_MAX_FEEDRATE.
|
||||
* The higher the frequency and the lower the feedrate, the smaller the buffer.
|
||||
* If the buffer is too small at runtime, input shaping will have reduced
|
||||
* effectiveness during high speed movements.
|
||||
*
|
||||
* Tune with M593 D<factor> F<frequency>:
|
||||
*
|
||||
* D<factor> Set the zeta/damping factor. If axes (X, Y, etc.) are not specified, set for all axes.
|
||||
* F<frequency> Set the frequency. If axes (X, Y, etc.) are not specified, set for all axes.
|
||||
* T[map] Input Shaping type, 0:ZV, 1:EI, 2:2H EI (not implemented yet)
|
||||
* X<1> Set the given parameters only for the X axis.
|
||||
* Y<1> Set the given parameters only for the Y axis.
|
||||
* Tune with M593 D<factor> F<frequency>
|
||||
*/
|
||||
//#define INPUT_SHAPING_X
|
||||
//#define INPUT_SHAPING_Y
|
||||
#if ANY(INPUT_SHAPING_X, INPUT_SHAPING_Y)
|
||||
//#define INPUT_SHAPING_Z
|
||||
#if ANY(INPUT_SHAPING_X, INPUT_SHAPING_Y, INPUT_SHAPING_Z)
|
||||
#if ENABLED(INPUT_SHAPING_X)
|
||||
#define SHAPING_FREQ_X 40 // (Hz) The default dominant resonant frequency on the X axis.
|
||||
#define SHAPING_ZETA_X 0.15f // Damping ratio of the X axis (range: 0.0 = no damping to 1.0 = critical damping).
|
||||
#define SHAPING_FREQ_X 40.0 // (Hz) The default dominant resonant frequency on the X axis.
|
||||
#define SHAPING_ZETA_X 0.15 // Damping ratio of the X axis (range: 0.0 = no damping to 1.0 = critical damping).
|
||||
#endif
|
||||
#if ENABLED(INPUT_SHAPING_Y)
|
||||
#define SHAPING_FREQ_Y 40 // (Hz) The default dominant resonant frequency on the Y axis.
|
||||
#define SHAPING_ZETA_Y 0.15f // Damping ratio of the Y axis (range: 0.0 = no damping to 1.0 = critical damping).
|
||||
#define SHAPING_FREQ_Y 40.0 // (Hz) The default dominant resonant frequency on the Y axis.
|
||||
#define SHAPING_ZETA_Y 0.15 // Damping ratio of the Y axis (range: 0.0 = no damping to 1.0 = critical damping).
|
||||
#endif
|
||||
//#define SHAPING_MIN_FREQ 20 // By default the minimum of the shaping frequencies. Override to affect SRAM usage.
|
||||
#if ENABLED(INPUT_SHAPING_Z)
|
||||
#define SHAPING_FREQ_Z 40.0 // (Hz) The default dominant resonant frequency on the Z axis.
|
||||
#define SHAPING_ZETA_Z 0.15 // Damping ratio of the Z axis (range: 0.0 = no damping to 1.0 = critical damping).
|
||||
#endif
|
||||
//#define SHAPING_MIN_FREQ 20.0 // (Hz) By default the minimum of the shaping frequencies. Override to affect SRAM usage.
|
||||
//#define SHAPING_MAX_STEPRATE 10000 // By default the maximum total step rate of the shaped axes. Override to affect SRAM usage.
|
||||
//#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters.
|
||||
#endif
|
||||
@@ -1253,8 +1263,8 @@
|
||||
#define DISABLE_IDLE_E // Shut down all idle extruders
|
||||
|
||||
// Default Minimum Feedrates for printing and travel moves
|
||||
#define DEFAULT_MINIMUMFEEDRATE 0.0 // (mm/s. °/s for rotational-only moves) Minimum feedrate. Set with M205 S.
|
||||
#define DEFAULT_MINTRAVELFEEDRATE 0.0 // (mm/s. °/s for rotational-only moves) Minimum travel feedrate. Set with M205 T.
|
||||
#define DEFAULT_MINIMUMFEEDRATE 0.0 // (mm/s) Minimum feedrate. Set with M205 S.
|
||||
#define DEFAULT_MINTRAVELFEEDRATE 0.0 // (mm/s) Minimum travel feedrate. Set with M205 T.
|
||||
|
||||
// Minimum time that a segment needs to take as the buffer gets emptied
|
||||
#define DEFAULT_MINSEGMENTTIME 20000 // (µs) Set with M205 B.
|
||||
@@ -1270,11 +1280,11 @@
|
||||
* XY Frequency limit
|
||||
* Reduce resonance by limiting the frequency of small zigzag infill moves.
|
||||
* See https://hydraraptor.blogspot.com/2010/12/frequency-limit.html
|
||||
* Use M201 F<freq> G<min%> to change limits at runtime.
|
||||
* Use M201 F<freq> S<min%> to change limits at runtime.
|
||||
*/
|
||||
//#define XY_FREQUENCY_LIMIT 10 // (Hz) Maximum frequency of small zigzag infill moves. Set with M201 F<hertz>.
|
||||
#ifdef XY_FREQUENCY_LIMIT
|
||||
#define XY_FREQUENCY_MIN_PERCENT 5 // (%) Minimum FR percentage to apply. Set with M201 G<min%>.
|
||||
#define XY_FREQUENCY_MIN_PERCENT 5 // (%) Minimum FR percentage to apply. Set with M201 S<min%>.
|
||||
#endif
|
||||
|
||||
//
|
||||
@@ -1332,8 +1342,6 @@
|
||||
//#define CALIBRATION_SCRIPT_PRE "M117 Starting Auto-Calibration\nT0\nG28\nG12\nM117 Calibrating..."
|
||||
//#define CALIBRATION_SCRIPT_POST "M500\nM117 Calibration data saved"
|
||||
|
||||
#define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
|
||||
|
||||
#define CALIBRATION_FEEDRATE_SLOW 60 // mm/min
|
||||
#define CALIBRATION_FEEDRATE_FAST 1200 // mm/min
|
||||
#define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/min
|
||||
@@ -1411,24 +1419,24 @@
|
||||
#define MICROSTEP_MODES { 16, 16, 16, 16, 16, 16 } // [1,2,4,8,16]
|
||||
|
||||
/**
|
||||
* @section stepper motor current
|
||||
* @section stepper motor current
|
||||
*
|
||||
* Some boards have a means of setting the stepper motor current via firmware.
|
||||
* Some boards have a means of setting the stepper motor current via firmware.
|
||||
*
|
||||
* The power on motor currents are set by:
|
||||
* PWM_MOTOR_CURRENT - used by MINIRAMBO & ULTIMAIN_2
|
||||
* known compatible chips: A4982
|
||||
* DIGIPOT_MOTOR_CURRENT - used by BQ_ZUM_MEGA_3D, RAMBO & SCOOVO_X9H
|
||||
* known compatible chips: AD5206
|
||||
* DAC_MOTOR_CURRENT_DEFAULT - used by PRINTRBOARD_REVF & RIGIDBOARD_V2
|
||||
* known compatible chips: MCP4728
|
||||
* DIGIPOT_I2C_MOTOR_CURRENTS - used by 5DPRINT, AZTEEG_X3_PRO, AZTEEG_X5_MINI_WIFI, MIGHTYBOARD_REVE
|
||||
* known compatible chips: MCP4451, MCP4018
|
||||
* The power on motor currents are set by:
|
||||
* PWM_MOTOR_CURRENT - used by MINIRAMBO & ULTIMAIN_2
|
||||
* known compatible chips: A4982
|
||||
* DIGIPOT_MOTOR_CURRENT - used by BQ_ZUM_MEGA_3D, RAMBO & SCOOVO_X9H
|
||||
* known compatible chips: AD5206
|
||||
* DAC_MOTOR_CURRENT_DEFAULT - used by PRINTRBOARD_REVF & RIGIDBOARD_V2
|
||||
* known compatible chips: MCP4728
|
||||
* DIGIPOT_I2C_MOTOR_CURRENTS - used by 5DPRINT, AZTEEG_X3_PRO, AZTEEG_X5_MINI_WIFI, MIGHTYBOARD_REVE
|
||||
* known compatible chips: MCP4451, MCP4018
|
||||
*
|
||||
* Motor currents can also be set by M907 - M910 and by the LCD.
|
||||
* M907 - applies to all.
|
||||
* M908 - BQ_ZUM_MEGA_3D, RAMBO, PRINTRBOARD_REVF, RIGIDBOARD_V2 & SCOOVO_X9H
|
||||
* M909, M910 & LCD - only PRINTRBOARD_REVF & RIGIDBOARD_V2
|
||||
* Motor currents can also be set by M907 - M910 and by the LCD.
|
||||
* M907 - applies to all.
|
||||
* M908 - BQ_ZUM_MEGA_3D, RAMBO, PRINTRBOARD_REVF, RIGIDBOARD_V2 & SCOOVO_X9H
|
||||
* M909, M910 & LCD - only PRINTRBOARD_REVF & RIGIDBOARD_V2
|
||||
*/
|
||||
//#define PWM_MOTOR_CURRENT { 1300, 1300, 1250 } // Values in milliamps
|
||||
//#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 } // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
|
||||
@@ -1492,8 +1500,17 @@
|
||||
#define FEEDRATE_CHANGE_BEEP_FREQUENCY 440
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Probe Offset Wizard
|
||||
* Add a Probe Z Offset calibration option to the LCD menu.
|
||||
* Use this helper to get a perfect 'M851 Z' probe offset.
|
||||
* When launched this powerful wizard:
|
||||
* - Measures the bed height at the configured position with the probe.
|
||||
* - Moves the nozzle to the same position for a "paper" measurement.
|
||||
* - The difference is used to set the probe Z offset.
|
||||
*/
|
||||
#if HAS_BED_PROBE && ANY(HAS_MARLINUI_MENU, HAS_TFT_LVGL_UI)
|
||||
//#define PROBE_OFFSET_WIZARD // Add a Probe Z Offset calibration option to the LCD menu
|
||||
//#define PROBE_OFFSET_WIZARD
|
||||
#if ENABLED(PROBE_OFFSET_WIZARD)
|
||||
/**
|
||||
* Enable to init the Probe Z-Offset when starting the Wizard.
|
||||
@@ -1510,6 +1527,10 @@
|
||||
#if HAS_MARLINUI_MENU
|
||||
|
||||
#if HAS_BED_PROBE
|
||||
|
||||
// Show Deploy / Stow Probe options in the Motion menu.
|
||||
#define PROBE_DEPLOY_STOW_MENU
|
||||
|
||||
// Add calibration in the Probe Offsets menu to compensate for X-axis twist.
|
||||
//#define X_AXIS_TWIST_COMPENSATION
|
||||
#if ENABLED(X_AXIS_TWIST_COMPENSATION)
|
||||
@@ -1524,14 +1545,13 @@
|
||||
#define XATC_Z_OFFSETS { 0, 0, 0 } // Z offsets for X axis sample points
|
||||
#endif
|
||||
|
||||
// Show Deploy / Stow Probe options in the Motion menu.
|
||||
#define PROBE_DEPLOY_STOW_MENU
|
||||
#endif
|
||||
|
||||
// Include a page of printer information in the LCD Main Menu
|
||||
//#define LCD_INFO_MENU
|
||||
#if ENABLED(LCD_INFO_MENU)
|
||||
//#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages
|
||||
//#define BUILD_INFO_MENU_ITEM // Add a menu item to display the build date and time
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -1556,6 +1576,9 @@
|
||||
// BACK menu items keep the highlight at the top
|
||||
//#define TURBO_BACK_MENU_ITEM
|
||||
|
||||
// BACK menu items show "Back" instead of the previous menu name
|
||||
//#define GENERIC_BACK_MENU_ITEM
|
||||
|
||||
// Insert a menu for preheating at the top level to allow for quick access
|
||||
//#define PREHEAT_SHORTCUT_MENU_ITEM
|
||||
|
||||
@@ -1584,7 +1607,7 @@
|
||||
#if HAS_MARLINUI_U8GLIB
|
||||
//#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~3260 (or ~940) bytes of flash.
|
||||
#endif
|
||||
#if ANY(HAS_MARLINUI_U8GLIB, TOUCH_UI_FTDI_EVE)
|
||||
#if ANY(HAS_MARLINUI_U8GLIB, TOUCH_UI_FTDI_EVE, HAS_MARLINUI_HD44780)
|
||||
//#define SHOW_CUSTOM_BOOTSCREEN // Show the bitmap in Marlin/_Bootscreen.h on startup.
|
||||
#endif
|
||||
#endif
|
||||
@@ -1596,6 +1619,10 @@
|
||||
//#define SOUND_MENU_ITEM // Add a mute option to the LCD menu
|
||||
#define SOUND_ON_DEFAULT // Buzzer/speaker default enabled state
|
||||
|
||||
#if ENABLED(U8GLIB_SSD1309)
|
||||
//#define LCD_DOUBLE_BUFFER // Optimize display updates. Costs ~1K of SRAM.
|
||||
#endif
|
||||
|
||||
#if HAS_WIRED_LCD
|
||||
//#define DOUBLE_LCD_FRAMERATE // Not recommended for slow boards.
|
||||
#endif
|
||||
@@ -1847,7 +1874,7 @@
|
||||
*
|
||||
* SCLK, MOSI, MISO --> SCLK, MOSI, MISO
|
||||
* INT --> SD_DETECT_PIN [1]
|
||||
* SS --> SDSS
|
||||
* SS --> SD_SS_PIN
|
||||
*
|
||||
* [1] On AVR an interrupt-capable pin is best for UHS3 compatibility.
|
||||
*/
|
||||
@@ -1874,7 +1901,7 @@
|
||||
//#define USE_OTG_USB_HOST
|
||||
|
||||
#if DISABLED(USE_OTG_USB_HOST)
|
||||
#define USB_CS_PIN SDSS
|
||||
#define USB_CS_PIN SD_SS_PIN
|
||||
#define USB_INTR_PIN SD_DETECT_PIN
|
||||
#endif
|
||||
#endif
|
||||
@@ -1970,17 +1997,6 @@
|
||||
// Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
|
||||
//#define USE_SMALL_INFOFONT
|
||||
|
||||
/**
|
||||
* Graphical Display Sleep
|
||||
*
|
||||
* The U8G library provides sleep / wake functions for SH1106, SSD1306,
|
||||
* SSD1309, and some other DOGM displays.
|
||||
* Enable this option to save energy and prevent OLED pixel burn-in.
|
||||
* Adds the menu item Configuration > LCD Timeout (m) to set a wait period
|
||||
* from 0 (disabled) to 99 minutes.
|
||||
*/
|
||||
//#define DISPLAY_SLEEP_MINUTES 2 // (minutes) Timeout before turning off the screen. Set with M255 S.
|
||||
|
||||
/**
|
||||
* ST7920-based LCDs can emulate a 16 x 4 character display using
|
||||
* the ST7920 character-generator for very fast screen updates.
|
||||
@@ -1996,7 +2012,7 @@
|
||||
#if IS_U8GLIB_ST7920
|
||||
// Enable this option and reduce the value to optimize screen updates.
|
||||
// The normal delay is 10µs. Use the lowest value that still gives a reliable display.
|
||||
//#define DOGM_SPI_DELAY_US 5
|
||||
//#define DOGM_SPI_DELAY_US 5 // (µs) Delay after each SPI transfer
|
||||
|
||||
//#define LIGHTWEIGHT_UI
|
||||
#if ENABLED(LIGHTWEIGHT_UI)
|
||||
@@ -2026,17 +2042,17 @@
|
||||
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
|
||||
//#define STATUS_HEAT_POWER // Show heater output power as a vertical bar
|
||||
|
||||
// Frivolous Game Options
|
||||
//#define MARLIN_BRICKOUT
|
||||
//#define MARLIN_INVADERS
|
||||
//#define MARLIN_SNAKE
|
||||
//#define GAMES_EASTER_EGG // Add extra blank lines above the "Games" sub-menu
|
||||
|
||||
#endif // HAS_MARLINUI_U8GLIB
|
||||
|
||||
#if HAS_MARLINUI_U8GLIB || IS_DWIN_MARLINUI
|
||||
#define MENU_HOLLOW_FRAME // Enable to save many cycles by drawing a hollow frame on Menu Screens
|
||||
//#define OVERLAY_GFX_REVERSE // Swap the CW/CCW indicators in the graphics overlay
|
||||
|
||||
// Frivolous Game Options
|
||||
//#define MARLIN_BRICKOUT
|
||||
//#define MARLIN_INVADERS
|
||||
//#define MARLIN_SNAKE
|
||||
//#define GAMES_EASTER_EGG // Add extra blank lines above the "Games" sub-menu
|
||||
#endif
|
||||
|
||||
//
|
||||
@@ -2215,7 +2231,7 @@
|
||||
|
||||
// Developer menu (accessed by touching "About Printer" copyright text)
|
||||
//#define TOUCH_UI_DEVELOPER_MENU
|
||||
#endif
|
||||
#endif // TOUCH_UI_FTDI_EVE
|
||||
|
||||
//
|
||||
// Classic UI Options
|
||||
@@ -2229,20 +2245,27 @@
|
||||
//#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan
|
||||
#endif
|
||||
|
||||
//
|
||||
// LCD Backlight Timeout
|
||||
// Requires a display with a controllable backlight
|
||||
//
|
||||
/**
|
||||
* Display Sleep
|
||||
* Enable this option to save energy and prevent OLED pixel burn-in.
|
||||
*/
|
||||
//#define DISPLAY_SLEEP_MINUTES 2 // (minutes) Timeout before turning off the screen
|
||||
|
||||
/**
|
||||
* LCD Backlight Timeout
|
||||
* Requires a display with a controllable backlight
|
||||
*/
|
||||
//#define LCD_BACKLIGHT_TIMEOUT_MINS 1 // (minutes) Timeout before turning off the backlight
|
||||
|
||||
#if defined(DISPLAY_SLEEP_MINUTES) || defined(LCD_BACKLIGHT_TIMEOUT_MINS)
|
||||
#define EDITABLE_DISPLAY_TIMEOUT // Edit timeout with M255 S<minutes> and a menu item
|
||||
#define EDITABLE_DISPLAY_TIMEOUT // Edit sleep / backlight timeout with M255 S<minutes> and a menu item
|
||||
#endif
|
||||
|
||||
//
|
||||
// ADC Button Debounce
|
||||
//
|
||||
#if HAS_ADC_BUTTONS
|
||||
#define ADC_BUTTON_DEBOUNCE_DELAY 16 // Increase if buttons bounce or repeat too fast
|
||||
#define ADC_BUTTON_DEBOUNCE_DELAY 16 // (count) Increase if buttons bounce or repeat too fast
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
@@ -2283,7 +2306,7 @@
|
||||
|
||||
//#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
|
||||
#if ENABLED(DOUBLECLICK_FOR_Z_BABYSTEPPING)
|
||||
#define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
|
||||
#define DOUBLECLICK_MAX_INTERVAL 1250 // (ms) Maximum interval between clicks.
|
||||
// Note: Extra time may be added to mitigate controller latency.
|
||||
//#define MOVE_Z_WHEN_IDLE // Jump to the move Z menu on double-click when printer is idle.
|
||||
#if ENABLED(MOVE_Z_WHEN_IDLE)
|
||||
@@ -2334,6 +2357,7 @@
|
||||
*
|
||||
* Control extrusion rate based on instantaneous extruder velocity. Can be used to correct for
|
||||
* underextrusion at high extruder speeds that are otherwise well-behaved (i.e., not skipping).
|
||||
* For better results also enable ADAPTIVE_STEP_SMOOTHING.
|
||||
*/
|
||||
//#define NONLINEAR_EXTRUSION
|
||||
|
||||
@@ -2561,27 +2585,28 @@
|
||||
//#define MINIMUM_STEPPER_PRE_DIR_DELAY 650
|
||||
|
||||
/**
|
||||
* Minimum stepper driver pulse width (in µs)
|
||||
* 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
|
||||
* 0 : Minimum 500ns for LV8729, adjusted in stepper.h
|
||||
* 1 : Minimum for A4988 and A5984 stepper drivers
|
||||
* 2 : Minimum for DRV8825 stepper drivers
|
||||
* 3 : Minimum for TB6600 stepper drivers
|
||||
* 30 : Minimum for TB6560 stepper drivers
|
||||
* Minimum stepper driver pulse width (in ns)
|
||||
* If undefined, these defaults (from Conditionals-4-adv.h) apply:
|
||||
* 100 : Minimum for TMC2xxx stepper drivers
|
||||
* 500 : Minimum for LV8729
|
||||
* 1000 : Minimum for A4988 and A5984 stepper drivers
|
||||
* 2000 : Minimum for DRV8825 stepper drivers
|
||||
* 3000 : Minimum for TB6600 stepper drivers
|
||||
* 30000 : Minimum for TB6560 stepper drivers
|
||||
*
|
||||
* Override the default value based on the driver type set in Configuration.h.
|
||||
*/
|
||||
//#define MINIMUM_STEPPER_PULSE 2
|
||||
//#define MINIMUM_STEPPER_PULSE_NS 2000
|
||||
|
||||
/**
|
||||
* Maximum stepping rate (in Hz) the stepper driver allows
|
||||
* If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
|
||||
* If undefined, these defaults (from Conditionals-4-adv.h) apply:
|
||||
* 5000000 : Maximum for TMC2xxx stepper drivers
|
||||
* 1000000 : Maximum for LV8729 stepper driver
|
||||
* 500000 : Maximum for A4988 stepper driver
|
||||
* 250000 : Maximum for DRV8825 stepper driver
|
||||
* 150000 : Maximum for TB6600 stepper driver
|
||||
* 15000 : Maximum for TB6560 stepper driver
|
||||
* 500000 : Maximum for A4988 stepper driver
|
||||
* 250000 : Maximum for DRV8825 stepper driver
|
||||
* 150000 : Maximum for TB6600 stepper driver
|
||||
* 15000 : Maximum for TB6560 stepper driver
|
||||
*
|
||||
* Override the default value based on the driver type set in Configuration.h.
|
||||
*/
|
||||
@@ -2613,19 +2638,23 @@
|
||||
#define MAX_CMD_SIZE 96
|
||||
#define BUFSIZE 4
|
||||
|
||||
// Transmission to Host Buffer Size
|
||||
// To save 386 bytes of flash (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0.
|
||||
// To buffer a simple "ok" you need 4 bytes.
|
||||
// For ADVANCED_OK (M105) you need 32 bytes.
|
||||
// For debug-echo: 128 bytes for the optimal speed.
|
||||
// Other output doesn't need to be that speedy.
|
||||
// :[0, 2, 4, 8, 16, 32, 64, 128, 256]
|
||||
/**
|
||||
* Host Transmit Buffer Size
|
||||
* - Costs 386 bytes of flash and TX_BUFFER_SIZE+3 bytes of SRAM (if not 0).
|
||||
* - 4 bytes required to buffer a simple "ok".
|
||||
* - 32 bytes for ADVANCED_OK (M105).
|
||||
* - 128 bytes for the optimal speed of 'debug-echo:'
|
||||
* - Other output doesn't need to be that speedy.
|
||||
* :[0, 2, 4, 8, 16, 32, 64, 128, 256]
|
||||
*/
|
||||
#define TX_BUFFER_SIZE 0
|
||||
|
||||
// Host Receive Buffer Size
|
||||
// Without XON/XOFF flow control (see SERIAL_XON_XOFF below) 32 bytes should be enough.
|
||||
// To use flow control, set this buffer size to at least 1024 bytes.
|
||||
// :[0, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048]
|
||||
/**
|
||||
* Host Receive Buffer Size
|
||||
* Without XON/XOFF flow control (see SERIAL_XON_XOFF below) 32 bytes should be enough.
|
||||
* To use flow control, set this buffer size to at least 1024 bytes.
|
||||
* :[0, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048]
|
||||
*/
|
||||
//#define RX_BUFFER_SIZE 1024
|
||||
|
||||
#if RX_BUFFER_SIZE >= 1024
|
||||
@@ -2702,14 +2731,14 @@
|
||||
* This feature is EXPERIMENTAL so use with caution and test thoroughly.
|
||||
* Enable this option to receive data on the serial ports via the onboard DMA
|
||||
* controller for more stable and reliable high-speed serial communication.
|
||||
* Only some STM32 MCUs are currently supported.
|
||||
* Support is currently limited to some STM32 MCUs and all HC32 MCUs.
|
||||
* Note: This has no effect on emulated USB serial ports.
|
||||
*/
|
||||
//#define SERIAL_DMA
|
||||
|
||||
/**
|
||||
* Set the number of proportional font spaces required to fill up a typical character space.
|
||||
* This can help to better align the output of commands like `G29 O` Mesh Output.
|
||||
* This can help to better align the output of commands like 'G29 O' Mesh Output.
|
||||
*
|
||||
* For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0.
|
||||
* Otherwise, adjust according to your client and font.
|
||||
@@ -2957,15 +2986,12 @@
|
||||
* Some boards have simple jumper connections! See your board's documentation.
|
||||
* - These drivers can also be used with Hardware Serial.
|
||||
*
|
||||
* The TMC26XStepper library is required for TMC26X stepper drivers.
|
||||
* https://github.com/MarlinFirmware/TMC26XStepper
|
||||
*
|
||||
* The TMCStepper library is required for other TMC stepper drivers.
|
||||
* https://github.com/teemuatlut/TMCStepper
|
||||
*
|
||||
* @section tmc/config
|
||||
*/
|
||||
#if HAS_TRINAMIC_CONFIG || HAS_TMC26X
|
||||
#if HAS_TRINAMIC_CONFIG
|
||||
|
||||
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
|
||||
|
||||
@@ -2977,9 +3003,9 @@
|
||||
|
||||
#if AXIS_IS_TMC_CONFIG(X)
|
||||
#define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
|
||||
#define X_CURRENT_HOME X_CURRENT // (mA) RMS current for sensorless homing
|
||||
#define X_CURRENT_HOME X_CURRENT // (mA) RMS current for homing. (Typically lower than *_CURRENT.)
|
||||
#define X_MICROSTEPS 16 // 0..256
|
||||
#define X_RSENSE 0.11 // Multiplied x1000 for TMC26X
|
||||
#define X_RSENSE 0.11
|
||||
#define X_CHAIN_POS -1 // -1..0: Not chained. 1: MCU MOSI connected. 2: Next in chain, ...
|
||||
//#define X_INTERPOLATE true // Enable to override 'INTERPOLATE' for the X axis
|
||||
//#define X_HOLD_MULTIPLIER 0.5 // Enable to override 'HOLD_MULTIPLIER' for the X axis
|
||||
@@ -3187,6 +3213,13 @@
|
||||
//#define E7_HOLD_MULTIPLIER 0.5
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Use the homing current for all probing. (e.g., Current may be reduced to the
|
||||
* point where a collision makes the motor skip instead of damaging the bed,
|
||||
* though this is unlikely to save delicate probes from being damaged.
|
||||
*/
|
||||
//#define PROBING_USE_CURRENT_HOME
|
||||
|
||||
// @section tmc/spi
|
||||
|
||||
/**
|
||||
@@ -3451,7 +3484,7 @@
|
||||
/**
|
||||
* Step on both rising and falling edge signals (as with a square wave).
|
||||
*/
|
||||
//#define EDGE_STEPPING
|
||||
#define EDGE_STEPPING
|
||||
|
||||
/**
|
||||
* Enable M122 debugging command for TMC stepper drivers.
|
||||
@@ -3472,7 +3505,7 @@
|
||||
*/
|
||||
#define TMC_ADV() { }
|
||||
|
||||
#endif // HAS_TRINAMIC_CONFIG || HAS_TMC26X
|
||||
#endif // HAS_TRINAMIC_CONFIG
|
||||
|
||||
// @section i2cbus
|
||||
|
||||
@@ -3533,7 +3566,7 @@
|
||||
//#define PHOTOGRAPH_PIN 23
|
||||
|
||||
// Canon Hack Development Kit
|
||||
// https://web.archive.org/web/20200920094805/https://captain-slow.dk/2014/03/09/3d-printing-timelapses/
|
||||
// https://web.archive.org/web/20200920094805/captain-slow.dk/2014/03/09/3d-printing-timelapses/
|
||||
//#define CHDK_PIN 4
|
||||
|
||||
// Optional second move with delay to trigger the camera shutter
|
||||
@@ -3565,7 +3598,7 @@
|
||||
* Add the M3, M4, and M5 commands to turn the spindle/laser on and off, and
|
||||
* to set spindle speed, spindle direction, and laser power.
|
||||
*
|
||||
* SuperPid is a router/spindle speed controller used in the CNC milling community.
|
||||
* SuperPID is a router/spindle speed controller used in the CNC milling community.
|
||||
* Marlin can be used to turn the spindle on and off. It can also be used to set
|
||||
* the spindle speed from 5,000 to 30,000 RPM.
|
||||
*
|
||||
@@ -3888,7 +3921,7 @@
|
||||
/**
|
||||
* Extra options for the M114 "Current Position" report
|
||||
*/
|
||||
//#define M114_DETAIL // Use 'M114` for details to check planner calculations
|
||||
//#define M114_DETAIL // Use 'M114 D' for details to check planner calculations
|
||||
//#define M114_REALTIME // Real current position based on forward kinematics
|
||||
//#define M114_LEGACY // M114 used to synchronize on every call. Enable if needed.
|
||||
|
||||
@@ -3935,7 +3968,6 @@
|
||||
* Spend 28 bytes of SRAM to optimize the G-code parser
|
||||
*/
|
||||
#define FASTER_GCODE_PARSER
|
||||
|
||||
#if ENABLED(FASTER_GCODE_PARSER)
|
||||
//#define GCODE_QUOTED_STRINGS // Support for quoted string parameters
|
||||
#endif
|
||||
@@ -4268,7 +4300,8 @@
|
||||
|
||||
/**
|
||||
* Instant freeze / unfreeze functionality
|
||||
* Potentially useful for emergency stop that allows being resumed.
|
||||
* Potentially useful for rapid stop that allows being resumed. Halts stepper movement.
|
||||
* Note this does NOT pause spindles, lasers, fans, heaters or any other auxiliary device.
|
||||
* @section interface
|
||||
*/
|
||||
//#define FREEZE_FEATURE
|
||||
@@ -4315,6 +4348,7 @@
|
||||
// See class CodeProfiler.
|
||||
//#define MAX7219_DEBUG_MULTISTEPPING 6 // Show multi-stepping 1 to 128 on this LED matrix row.
|
||||
//#define MAX7219_DEBUG_SLOWDOWN 6 // Count (mod 16) how many times SLOWDOWN has reduced print speed.
|
||||
//#define MAX7219_REINIT_ON_POWERUP // Re-initialize MAX7129 when power supply turns on
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -4348,7 +4382,7 @@
|
||||
* Extras for an ESP32-based motherboard with WIFISUPPORT
|
||||
* These options don't apply to add-on WiFi modules based on ESP32 WiFi101.
|
||||
*/
|
||||
#if ENABLED(WIFISUPPORT)
|
||||
#if ANY(WIFISUPPORT, ESP3D_WIFISUPPORT)
|
||||
//#define WEBSUPPORT // Start a webserver (which may include auto-discovery) using SPIFFS
|
||||
//#define OTASUPPORT // Support over-the-air firmware updates
|
||||
//#define WIFI_CUSTOM_COMMAND // Accept feature config commands (e.g., WiFi ESP3D) from the host
|
||||
@@ -4384,58 +4418,81 @@
|
||||
//#define E_MUX0_PIN 40 // Always Required
|
||||
//#define E_MUX1_PIN 42 // Needed for 3 to 8 inputs
|
||||
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
|
||||
#elif HAS_PRUSA_MMU2
|
||||
// Serial port used for communication with MMU2.
|
||||
#define MMU2_SERIAL_PORT 2
|
||||
|
||||
// Use hardware reset for MMU if a pin is defined for it
|
||||
//#define MMU2_RST_PIN 23
|
||||
#elif HAS_PRUSA_MMU2 || HAS_PRUSA_MMU3
|
||||
// Common settings for MMU2/MMU2S/MMU3
|
||||
// Serial port used for communication with MMU2/MMU2S/MMU3.
|
||||
#define MMU_SERIAL_PORT 2
|
||||
#define MMU_BAUD 115200
|
||||
|
||||
// Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
|
||||
//#define MMU2_MODE_12V
|
||||
//#define MMU_RST_PIN 23 // Define this pin to use Hardware Reset for MMU2/MMU2S/MMU3
|
||||
|
||||
// G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
|
||||
#define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
|
||||
//#define MMU_MENUS // Add an LCD menu for MMU2/MMU2S/MMU3
|
||||
|
||||
// Add an LCD menu for MMU2
|
||||
//#define MMU2_MENUS
|
||||
//#define MMU_DEBUG // Write debug info to serial output
|
||||
|
||||
// Settings for filament load / unload from the LCD menu.
|
||||
// This is for Průša MK3-style extruders. Customize for your hardware.
|
||||
#define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
|
||||
#define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
|
||||
{ 7.2, 1145 }, \
|
||||
{ 14.4, 871 }, \
|
||||
{ 36.0, 1393 }, \
|
||||
{ 14.4, 871 }, \
|
||||
{ 50.0, 198 }
|
||||
// Options pertaining to MMU2 and MMU2S
|
||||
#if HAS_PRUSA_MMU2
|
||||
// Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
|
||||
//#define MMU2_MODE_12V
|
||||
|
||||
#define MMU2_RAMMING_SEQUENCE \
|
||||
{ 1.0, 1000 }, \
|
||||
{ 1.0, 1500 }, \
|
||||
{ 2.0, 2000 }, \
|
||||
{ 1.5, 3000 }, \
|
||||
{ 2.5, 4000 }, \
|
||||
{ -15.0, 5000 }, \
|
||||
{ -14.0, 1200 }, \
|
||||
{ -6.0, 600 }, \
|
||||
{ 10.0, 700 }, \
|
||||
{ -10.0, 400 }, \
|
||||
{ -50.0, 2000 }
|
||||
// Settings for filament load / unload from the LCD menu.
|
||||
// This is for Průša MK3-style extruders. Customize for your hardware.
|
||||
#define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
|
||||
|
||||
// G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
|
||||
#define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
|
||||
|
||||
// MMU2 sequences use mm/min. Not compatible with MMU3, which use mm/sec.
|
||||
#define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
|
||||
{ 4.4, 871 }, \
|
||||
{ 10.0, 1393 }, \
|
||||
{ 4.4, 871 }, \
|
||||
{ 10.0, 198 }
|
||||
|
||||
#define MMU2_RAMMING_SEQUENCE \
|
||||
{ 1.0, 1000 }, \
|
||||
{ 1.0, 1500 }, \
|
||||
{ 2.0, 2000 }, \
|
||||
{ 1.5, 3000 }, \
|
||||
{ 2.5, 4000 }, \
|
||||
{ -15.0, 5000 }, \
|
||||
{ -14.0, 1200 }, \
|
||||
{ -6.0, 600 }, \
|
||||
{ 10.0, 700 }, \
|
||||
{ -10.0, 400 }, \
|
||||
{ -50.0, 2000 }
|
||||
|
||||
#endif // HAS_PRUSA_MMU2
|
||||
|
||||
/**
|
||||
* Using a sensor like the MMU2S
|
||||
* This mode requires a MK3S extruder with a sensor at the extruder idler, like the MMU2S.
|
||||
* Options pertaining to MMU2S devices
|
||||
* Requires the MK3S extruder with a sensor at the extruder idler, like the MMU2S.
|
||||
* See https://help.prusa3d.com/guide/3b-mk3s-mk2-5s-extruder-upgrade_41560#42048, step 11
|
||||
*/
|
||||
#if HAS_PRUSA_MMU2S
|
||||
#define MMU2_C0_RETRY 5 // Number of retries (total time = timeout*retries)
|
||||
|
||||
/**
|
||||
* This is called after the filament runout sensor is triggered to check if
|
||||
* the filament has been loaded properly by moving the filament back and
|
||||
* forth to see if the filament runout sensor is going to get triggered
|
||||
* again, which should not occur if the filament is properly loaded.
|
||||
*
|
||||
* Thus, the MMU2_CAN_LOAD_SEQUENCE should contain some forward and
|
||||
* backward moves. The forward moves should be greater than the backward
|
||||
* moves.
|
||||
*
|
||||
* This is useless if your filament runout sensor is way behind the gears.
|
||||
* In that case use {0, MMU2_CAN_LOAD_FEEDRATE}
|
||||
*
|
||||
* Adjust MMU2_CAN_LOAD_SEQUENCE according to your setup.
|
||||
*/
|
||||
#define MMU2_CAN_LOAD_FEEDRATE 800 // (mm/min)
|
||||
#define MMU2_CAN_LOAD_SEQUENCE \
|
||||
{ 0.1, MMU2_CAN_LOAD_FEEDRATE }, \
|
||||
{ 60.0, MMU2_CAN_LOAD_FEEDRATE }, \
|
||||
{ -52.0, MMU2_CAN_LOAD_FEEDRATE }
|
||||
{ 5.0, MMU2_CAN_LOAD_FEEDRATE }, \
|
||||
{ 15.0, MMU2_CAN_LOAD_FEEDRATE }, \
|
||||
{ -10.0, MMU2_CAN_LOAD_FEEDRATE }
|
||||
|
||||
#define MMU2_CAN_LOAD_RETRACT 6.0 // (mm) Keep under the distance between Load Sequence values
|
||||
#define MMU2_CAN_LOAD_DEVIATION 0.8 // (mm) Acceptable deviation
|
||||
@@ -4446,10 +4503,90 @@
|
||||
|
||||
// Continue unloading if sensor detects filament after the initial unload move
|
||||
//#define MMU_IR_UNLOAD_MOVE
|
||||
#else
|
||||
|
||||
#elif HAS_PRUSA_MMU3
|
||||
|
||||
// MMU3 settings
|
||||
|
||||
#define MMU3_HAS_CUTTER // Enable cutter related functionality
|
||||
|
||||
#define MMU3_MAX_RETRIES 3 // Number of retries (total time = timeout*retries)
|
||||
|
||||
// As discussed with our PrusaSlicer profile specialist
|
||||
// - ToolChange shall not try to push filament into the very tip of the nozzle
|
||||
// to have some space for additional G-code to tune the extruded filament length
|
||||
// in the profile
|
||||
// Beware - this value is used to initialize the MMU logic layer - it will be sent to the MMU upon line up (written into its 8bit register 0x0b)
|
||||
// However - in the G-code we can get a request to set the extra load distance at runtime to something else (M708 A0xb Xsomething).
|
||||
// The printer intercepts such a call and sets its extra load distance to match the new value as well.
|
||||
#define MMU3_FILAMENT_SENSOR_E_POSITION 0 // (mm)
|
||||
#define _MMU3_LOAD_DISTANCE_PAST_GEARS 5 // (mm)
|
||||
#define MMU3_TOOL_CHANGE_LOAD_LENGTH (MMU3_FILAMENT_SENSOR_E_POSITION + _MMU3_LOAD_DISTANCE_PAST_GEARS) // (mm)
|
||||
|
||||
#define MMU3_LOAD_TO_NOZZLE_FEED_RATE 20.0 // (mm/s)
|
||||
|
||||
#define MMU3_VERIFY_LOAD_TO_NOZZLE_FEED_RATE 50.0 // (mm/s)
|
||||
#define _MMU3_VERIFY_LOAD_TO_NOZZLE_TWEAK -5.0 // (mm) Amount to adjust the length for verifying load-to-nozzle
|
||||
|
||||
// The first thing the MMU does is initialize its axis.
|
||||
// Meanwhile the E-motor will unload 20mm of filament in about 1 second.
|
||||
#define MMU3_RETRY_UNLOAD_TO_FINDA_LENGTH 80.0 // (mm)
|
||||
#define MMU3_RETRY_UNLOAD_TO_FINDA_FEED_RATE 80.0 // (mm/s)
|
||||
|
||||
// After loading a new filament, the printer will extrude this length of filament
|
||||
// then retract to the original position. This is used to check if the filament sensor
|
||||
// reading flickers or filament is jammed.
|
||||
#define _MMU_EXTRUDER_PTFE_LENGTH 42.3 // (mm)
|
||||
#define _MMU_EXTRUDER_HEATBREAK_LENGTH 17.7 // (mm)
|
||||
#define MMU3_CHECK_FILAMENT_PRESENCE_EXTRUSION_LENGTH (MMU3_FILAMENT_SENSOR_E_POSITION + _MMU_EXTRUDER_PTFE_LENGTH + _MMU_EXTRUDER_HEATBREAK_LENGTH + _MMU3_VERIFY_LOAD_TO_NOZZLE_TWEAK) // (mm)
|
||||
|
||||
/**
|
||||
* MMU1 Extruder Sensor
|
||||
* SpoolJoin Consumes All Filament -- EXPERIMENTAL
|
||||
*
|
||||
* SpoolJoin normally triggers when FINDA sensor untriggers while printing.
|
||||
* This is the default behaviour and it doesn't consume all the filament
|
||||
* before triggering a filament change. This leaves some filament in the
|
||||
* current slot and before switching to the next slot it is unloaded.
|
||||
*
|
||||
* Enabling this option will trigger the filament change when both FINDA
|
||||
* and Filament Runout Sensor triggers during the print and it allows the
|
||||
* filament in the current slot to be completely consumed before doing the
|
||||
* filament change. But this can cause problems as a little bit of filament
|
||||
* will be left between the extruder gears (thinking that the filament
|
||||
* sensor is triggered through the gears) and the end of the PTFE tube and
|
||||
* can cause filament load issues.
|
||||
*/
|
||||
//#define MMU3_SPOOL_JOIN_CONSUMES_ALL_FILAMENT
|
||||
|
||||
// MMU3 sequences use mm/sec. Not compatible with MMU2 which use mm/min.
|
||||
#define MMU3_LOAD_TO_NOZZLE_SEQUENCE \
|
||||
{ _MMU_EXTRUDER_PTFE_LENGTH, MMM_TO_MMS(810) }, /* (13.5 mm/s) Fast load ahead of heatbreak */ \
|
||||
{ _MMU_EXTRUDER_HEATBREAK_LENGTH, MMM_TO_MMS(198) } /* ( 3.3 mm/s) Slow load after heatbreak */
|
||||
|
||||
#define MMU3_RAMMING_SEQUENCE \
|
||||
{ 0.2816, MMM_TO_MMS(1339.0) }, \
|
||||
{ 0.3051, MMM_TO_MMS(1451.0) }, \
|
||||
{ 0.3453, MMM_TO_MMS(1642.0) }, \
|
||||
{ 0.3990, MMM_TO_MMS(1897.0) }, \
|
||||
{ 0.4761, MMM_TO_MMS(2264.0) }, \
|
||||
{ 0.5767, MMM_TO_MMS(2742.0) }, \
|
||||
{ 0.5691, MMM_TO_MMS(3220.0) }, \
|
||||
{ 0.1081, MMM_TO_MMS(3220.0) }, \
|
||||
{ 0.7644, MMM_TO_MMS(3635.0) }, \
|
||||
{ 0.8248, MMM_TO_MMS(3921.0) }, \
|
||||
{ 0.8483, MMM_TO_MMS(4033.0) }, \
|
||||
{ -15.0, MMM_TO_MMS(6000.0) }, \
|
||||
{ -24.5, MMM_TO_MMS(1200.0) }, \
|
||||
{ -7.0, MMM_TO_MMS( 600.0) }, \
|
||||
{ -3.5, MMM_TO_MMS( 360.0) }, \
|
||||
{ 20.0, MMM_TO_MMS( 454.0) }, \
|
||||
{ -20.0, MMM_TO_MMS( 303.0) }, \
|
||||
{ -35.0, MMM_TO_MMS(2000.0) }
|
||||
|
||||
#else // MMU2 (not MMU2S)
|
||||
|
||||
/**
|
||||
* MMU2 Extruder Sensor
|
||||
*
|
||||
* Support for a Průša (or other) IR Sensor to detect filament near the extruder
|
||||
* and make loading more reliable. Suitable for an extruder equipped with a filament
|
||||
@@ -4459,16 +4596,14 @@
|
||||
* move up to the gears. If no filament is detected, the MMU2 can make some more attempts.
|
||||
* If all attempts fail, a filament runout will be triggered.
|
||||
*/
|
||||
//#define MMU_EXTRUDER_SENSOR
|
||||
#if ENABLED(MMU_EXTRUDER_SENSOR)
|
||||
#define MMU_LOADING_ATTEMPTS_NR 5 // max. number of attempts to load filament if first load fail
|
||||
//#define MMU2_EXTRUDER_SENSOR
|
||||
#if ENABLED(MMU2_EXTRUDER_SENSOR)
|
||||
#define MMU2_LOADING_ATTEMPTS_NR 5 // Number of times to try loading filament before failure
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
//#define MMU2_DEBUG // Write debug info to serial output
|
||||
|
||||
#endif // HAS_PRUSA_MMU2
|
||||
#endif // HAS_PRUSA_MMU2 || HAS_PRUSA_MMU3
|
||||
|
||||
/**
|
||||
* Advanced Print Counter settings
|
||||
@@ -4531,3 +4666,6 @@
|
||||
|
||||
// Report uncleaned reset reason from register r2 instead of MCUSR. Supported by Optiboot on AVR.
|
||||
//#define OPTIBOOT_RESET_REASON
|
||||
|
||||
// Shrink the build for smaller boards by sacrificing some serial feedback
|
||||
//#define MARLIN_SMALL_BUILD
|
||||
|
||||
+109
-78
@@ -187,6 +187,17 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1033)
|
||||
# RAMPS Plus 3DYMY (Power outputs: Spindle, Controller Fan)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1034)
|
||||
|
||||
# RAMPS 1.6+ (Power outputs: Hotend, Fan, Bed)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1035)
|
||||
# RAMPS 1.6+ (Power outputs: Hotend0, Hotend1, Bed)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1036)
|
||||
# RAMPS 1.6+ (Power outputs: Hotend, Fan0, Fan1)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1037)
|
||||
# RAMPS 1.6+ (Power outputs: Hotend0, Hotend1, Fan)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1038)
|
||||
# RAMPS 1.6+ (Power outputs: Spindle, Controller Fan)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1039)
|
||||
|
||||
#
|
||||
# RAMPS Derivatives - ATmega1280, ATmega2560
|
||||
#
|
||||
@@ -221,108 +232,113 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1112)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1113)
|
||||
# BigTreeTech or BIQU KFB2.0
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1114)
|
||||
# zrib V2.0 (Chinese RAMPS replica)
|
||||
# Zonestar zrib V2.0 (Chinese RAMPS replica)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1115)
|
||||
# zrib V5.2 (Chinese RAMPS replica)
|
||||
# Zonestar zrib V5.2 (Chinese RAMPS replica)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1116)
|
||||
# Felix 2.0+ Electronics Board (RAMPS like)
|
||||
# Zonestar zrib V5.3 (Chinese RAMPS replica)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1117)
|
||||
# Invent-A-Part RigidBoard
|
||||
# Felix 2.0+ Electronics Board (RAMPS like)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1118)
|
||||
# Invent-A-Part RigidBoard V2
|
||||
# Invent-A-Part RigidBoard
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1119)
|
||||
# Sainsmart 2-in-1 board
|
||||
# Invent-A-Part RigidBoard V2
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1120)
|
||||
# Ultimaker
|
||||
# Sainsmart 2-in-1 board
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1121)
|
||||
# Ultimaker (Older electronics. Pre 1.5.4. This is rare)
|
||||
# Ultimaker
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1122)
|
||||
# Ultimaker (Older electronics. Pre 1.5.4. This is rare)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1123)
|
||||
MCU ?= atmega1280
|
||||
PROG_MCU ?= m1280
|
||||
# Azteeg X3
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1123)
|
||||
# Azteeg X3 Pro
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1124)
|
||||
# Ultimainboard 2.x (Uses TEMP_SENSOR 20)
|
||||
# Azteeg X3 Pro
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1125)
|
||||
# Rumba
|
||||
# Ultimainboard 2.x (Uses TEMP_SENSOR 20)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1126)
|
||||
# Raise3D N series Rumba derivative
|
||||
# Rumba
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1127)
|
||||
# Rapide Lite 200 (v1, low-cost RUMBA clone with drv)
|
||||
# Raise3D N series Rumba derivative
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1128)
|
||||
# Formbot T-Rex 2 Plus
|
||||
# Rapide Lite 200 (v1, low-cost RUMBA clone with drv)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1129)
|
||||
# Formbot T-Rex 3
|
||||
# Formbot T-Rex 2 Plus
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1130)
|
||||
# Formbot Raptor
|
||||
# Formbot T-Rex 3
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1131)
|
||||
# Formbot Raptor 2
|
||||
# Formbot Raptor
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1132)
|
||||
# bq ZUM Mega 3D
|
||||
# Formbot Raptor 2
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1133)
|
||||
# MakeBoard Mini v2.1.2 by MicroMake
|
||||
# bq ZUM Mega 3D
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1134)
|
||||
# TriGorilla Anycubic version 1.3-based on RAMPS EFB
|
||||
# MakeBoard Mini v2.1.2 by MicroMake
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1135)
|
||||
# ... Ver 1.4
|
||||
# TriGorilla Anycubic version 1.3-based on RAMPS EFB
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1136)
|
||||
# ... Rev 1.1 (new servo pin order)
|
||||
# ... Ver 1.4
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1137)
|
||||
# Creality: Ender-4, CR-8
|
||||
# ... Rev 1.1 (new servo pin order)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1138)
|
||||
# Creality: CR10S, CR20, CR-X
|
||||
# Creality: Ender-4, CR-8
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1139)
|
||||
# Dagoma F5
|
||||
# Creality: CR10S, CR20, CR-X
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1140)
|
||||
# FYSETC F6 1.3
|
||||
# Dagoma F5
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1141)
|
||||
# FYSETC F6 1.4
|
||||
# Dagoma D6 (as found in the Dagoma DiscoUltimate V2 TMC)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1142)
|
||||
# Wanhao Duplicator i3 Plus
|
||||
# FYSETC F6 1.3
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1143)
|
||||
# VORON Design
|
||||
# FYSETC F6 1.4
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1144)
|
||||
# Tronxy TRONXY-V3-1.0
|
||||
# Wanhao Duplicator i3 Plus
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1145)
|
||||
# Z-Bolt X Series
|
||||
# VORON Design
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1146)
|
||||
# TT OSCAR
|
||||
# Tronxy TRONXY-V3-1.0
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1147)
|
||||
# Overlord/Overlord Pro
|
||||
# Z-Bolt X Series
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1148)
|
||||
# ADIMLab Gantry v1
|
||||
# TT OSCAR
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1149)
|
||||
# ADIMLab Gantry v2
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1150)
|
||||
# BIQU Tango V1
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1151)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1150)
|
||||
# MKS GEN L V2
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1152)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1151)
|
||||
# MKS GEN L V2.1
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1153)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1152)
|
||||
# Copymaster 3D
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1154)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1153)
|
||||
# Ortur 4
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1155)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1154)
|
||||
# Tenlog D3 Hero IDEX printer
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1155)
|
||||
# Tenlog D3, D5, D6 IDEX Printer
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1156)
|
||||
# Tenlog D3,5,6 Pro IDEX printers
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1157)
|
||||
# Ramps S 1.2 by Sakul.cz (Power outputs: Hotend0, Hotend1, Fan, Bed)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1158)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1157)
|
||||
# Ramps S 1.2 by Sakul.cz (Power outputs: Hotend0, Hotend1, Hotend2, Bed)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1159)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1158)
|
||||
# Ramps S 1.2 by Sakul.cz (Power outputs: Hotend, Fan0, Fan1, Bed)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1160)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1159)
|
||||
# Longer LK1 PRO / Alfawise U20 Pro (PRO version)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1161)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1160)
|
||||
# Longer LKx PRO / Alfawise Uxx Pro (PRO version)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1162)
|
||||
# Zonestar zrib V5.3 (Chinese RAMPS replica)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1163)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1161)
|
||||
# Pxmalion Core I3
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1162)
|
||||
# Panowin Cutlass (as found in the Panowin F1)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1163)
|
||||
# Kodama Bardo V1.x (as found in the Kodama Trinus)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1164)
|
||||
# XTLW MFF V1.0
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1165)
|
||||
# XTLW MFF V2.0
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1166)
|
||||
|
||||
|
||||
#
|
||||
# RAMBo and derivatives
|
||||
@@ -340,7 +356,7 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1203)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1204)
|
||||
# abee Scoovo X9H
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1205)
|
||||
# Rambo ThinkerV2
|
||||
# ThinkerV2
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1206)
|
||||
|
||||
#
|
||||
@@ -383,30 +399,40 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1315)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1316)
|
||||
# Geeetech GT2560 Rev B for A10(M/T/D)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1317)
|
||||
# Geeetech GT2560 Rev B for A10(M/T/D)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1318)
|
||||
# Geeetech GT2560 Rev B for Mecreator2
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1318)
|
||||
# Geeetech GT2560 Rev B for A20(M/T/D)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1319)
|
||||
# Geeetech GT2560 Rev B for A20(M/T/D)
|
||||
# Geeetech GT2560 Rev B for A10(M/T/D)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1320)
|
||||
# Einstart retrofit
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1321)
|
||||
# Wanhao 0ne+ i3 Mini
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1322)
|
||||
# Leapfrog Xeed 2015
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1323)
|
||||
# PICA Shield (original version)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1324)
|
||||
# PICA Shield (rev C or later)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1325)
|
||||
# Intamsys 4.0 (Funmat HT)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1326)
|
||||
# Malyan M180 Mainboard Version 2 (no display function, direct G-code only)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1327)
|
||||
# Geeetech GT2560 Rev B for A20(M/T/D)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1321)
|
||||
# Einstart retrofit
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1322)
|
||||
# Wanhao 0ne+ i3 Mini
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1323)
|
||||
# Overlord/Overlord Pro
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1324)
|
||||
# ADIMLab Gantry v1
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1325)
|
||||
# ADIMLab Gantry v2
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1326)
|
||||
# Leapfrog Xeed 2015
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1327)
|
||||
# PICA Shield (original version)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1328)
|
||||
# Mega controller & Protoneer CNC Shield V3.00
|
||||
# PICA Shield (rev C or later)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1329)
|
||||
# Intamsys 4.0 (Funmat HT)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1330)
|
||||
# Malyan M180 Mainboard Version 2 (no display function, direct G-code only)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1331)
|
||||
# Mega controller & Protoneer CNC Shield V3.00
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1332)
|
||||
# WEEDO 62A board (TINA2, Monoprice Cadet, etc.)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1333)
|
||||
# Geeetech GT2560 V4.1B for A10(M/T/D)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1334)
|
||||
|
||||
#
|
||||
# ATmega1281, ATmega2561
|
||||
@@ -440,7 +466,7 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1502)
|
||||
HARDWARE_VARIANT ?= Sanguino
|
||||
MCU ?= atmega644p
|
||||
PROG_MCU ?= m644p
|
||||
# Melzi V2.0
|
||||
# Melzi V2
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1503)
|
||||
HARDWARE_VARIANT ?= Sanguino
|
||||
MCU ?= atmega1284p
|
||||
@@ -450,36 +476,41 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1504)
|
||||
HARDWARE_VARIANT ?= Sanguino
|
||||
MCU ?= atmega1284p
|
||||
PROG_MCU ?= m1284p
|
||||
# Melzi Creality3D board (for CR-10 etc)
|
||||
# Melzi Creality3D (for CR-10 etc)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1505)
|
||||
HARDWARE_VARIANT ?= Sanguino
|
||||
MCU ?= atmega1284p
|
||||
PROG_MCU ?= m1284p
|
||||
# Melzi Malyan M150 board
|
||||
# Melzi Creality3D (for Ender-2)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1506)
|
||||
HARDWARE_VARIANT ?= Sanguino
|
||||
MCU ?= atmega1284p
|
||||
PROG_MCU ?= m1284p
|
||||
# Tronxy X5S
|
||||
# Melzi Malyan M150
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1507)
|
||||
HARDWARE_VARIANT ?= Sanguino
|
||||
MCU ?= atmega1284p
|
||||
PROG_MCU ?= m1284p
|
||||
# STB V1.1
|
||||
# Tronxy X5S
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1508)
|
||||
HARDWARE_VARIANT ?= Sanguino
|
||||
MCU ?= atmega1284p
|
||||
PROG_MCU ?= m1284p
|
||||
# Azteeg X1
|
||||
# STB V1.1
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1509)
|
||||
HARDWARE_VARIANT ?= Sanguino
|
||||
MCU ?= atmega1284p
|
||||
PROG_MCU ?= m1284p
|
||||
# Anet 1.0 (Melzi clone)
|
||||
# Azteeg X1
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1510)
|
||||
HARDWARE_VARIANT ?= Sanguino
|
||||
MCU ?= atmega1284p
|
||||
PROG_MCU ?= m1284p
|
||||
# Anet 1.0 (Melzi clone)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1511)
|
||||
HARDWARE_VARIANT ?= Sanguino
|
||||
MCU ?= atmega1284p
|
||||
PROG_MCU ?= m1284p
|
||||
# ZoneStar ZMIB V2
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1511)
|
||||
HARDWARE_VARIANT ?= Sanguino
|
||||
@@ -995,7 +1026,7 @@ extcoff: $(TARGET).elf
|
||||
$(NM) -n $< > $@
|
||||
|
||||
# Link: create ELF output file from library.
|
||||
|
||||
LDFLAGS+= -Wl,-V
|
||||
$(BUILD_DIR)/$(TARGET).elf: $(OBJ) Configuration.h
|
||||
$(Pecho) " CXX $@"
|
||||
$P $(CXX) $(LD_PREFIX) $(ALL_CXXFLAGS) -o $@ -L. $(OBJ) $(LDFLAGS) $(LD_SUFFIX)
|
||||
|
||||
+10
-3
@@ -41,7 +41,14 @@
|
||||
* here we define this default string as the date where the latest release
|
||||
* version was tagged.
|
||||
*/
|
||||
//#define STRING_DISTRIBUTION_DATE "2024-01-31"
|
||||
//#define STRING_DISTRIBUTION_DATE "2025-03-18"
|
||||
|
||||
/**
|
||||
* The protocol for communication to the host. Protocol indicates communication
|
||||
* standards such as the use of ASCII, "echo:" and "error:" line prefixes, etc.
|
||||
* (Other behaviors are given by the firmware version and capabilities report.)
|
||||
*/
|
||||
//#define PROTOCOL_VERSION "1.0"
|
||||
|
||||
/**
|
||||
* Defines a generic printer name to be output to the LCD after booting Marlin.
|
||||
@@ -68,8 +75,8 @@
|
||||
//#define WEBSITE_URL "marlinfw.org"
|
||||
|
||||
/**
|
||||
* Set the vendor info the serial USB interface, if changable
|
||||
* Currently only supported by DUE platform
|
||||
* Set the vendor info the serial USB interface, if changeable.
|
||||
* Currently only supported by DUE platform.
|
||||
*/
|
||||
//#define USB_DEVICE_VENDOR_ID 0x0000
|
||||
//#define USB_DEVICE_PRODUCT_ID 0x0000
|
||||
|
||||
+40
-43
@@ -62,6 +62,11 @@ motherboard = BOARD_RAMPS_14_EFB
|
||||
serial_port = 0
|
||||
baudrate = 250000
|
||||
|
||||
string_config_h_author = "(default from config.ini)"
|
||||
|
||||
capabilities_report = on
|
||||
extended_capabilities_report = on
|
||||
|
||||
use_watchdog = on
|
||||
thermal_protection_hotends = on
|
||||
thermal_protection_hysteresis = 4
|
||||
@@ -77,9 +82,7 @@ temp_sensor_0 = 1
|
||||
temp_hysteresis = 3
|
||||
heater_0_mintemp = 5
|
||||
heater_0_maxtemp = 275
|
||||
preheat_1_temp_hotend = 180
|
||||
|
||||
bang_max = 255
|
||||
pidtemp = on
|
||||
pid_k1 = 0.95
|
||||
pid_max = 255
|
||||
@@ -89,6 +92,14 @@ default_kp = 22.20
|
||||
default_ki = 1.08
|
||||
default_kd = 114.00
|
||||
|
||||
temp_sensor_bed = 1
|
||||
bed_mintemp = 5
|
||||
bed_maxtemp = 150
|
||||
|
||||
thermal_protection_bed = on
|
||||
thermal_protection_bed_hysteresis = 2
|
||||
thermal_protection_bed_period = 20
|
||||
|
||||
x_driver_type = A4988
|
||||
y_driver_type = A4988
|
||||
z_driver_type = A4988
|
||||
@@ -121,10 +132,10 @@ default_max_acceleration = { 3000, 3000, 100, 10000 }
|
||||
homing_feedrate_mm_m = { (50*60), (50*60), (4*60) }
|
||||
homing_bump_divisor = { 2, 2, 4 }
|
||||
|
||||
x_enable_on = 0
|
||||
y_enable_on = 0
|
||||
z_enable_on = 0
|
||||
e_enable_on = 0
|
||||
x_enable_on = LOW
|
||||
y_enable_on = LOW
|
||||
z_enable_on = LOW
|
||||
e_enable_on = LOW
|
||||
|
||||
invert_x_dir = false
|
||||
invert_y_dir = true
|
||||
@@ -136,11 +147,6 @@ step_state_x = HIGH
|
||||
step_state_y = HIGH
|
||||
step_state_z = HIGH
|
||||
|
||||
disable_x = off
|
||||
disable_y = off
|
||||
disable_z = off
|
||||
disable_e = off
|
||||
|
||||
proportional_font_ratio = 1.0
|
||||
default_nominal_filament_dia = 1.75
|
||||
|
||||
@@ -153,18 +159,13 @@ default_retract_acceleration = 3000
|
||||
default_minimumfeedrate = 0.0
|
||||
default_mintravelfeedrate = 0.0
|
||||
|
||||
minimum_planner_speed = 0.05
|
||||
min_steps_per_segment = 6
|
||||
default_minsegmenttime = 20000
|
||||
|
||||
[config:basic]
|
||||
bed_overshoot = 10
|
||||
busy_while_heating = on
|
||||
default_ejerk = 5.0
|
||||
default_keepalive_interval = 2
|
||||
default_leveling_fade_height = 0.0
|
||||
disable_other_extruders = on
|
||||
display_charset_hd44780 = JAPANESE
|
||||
eeprom_boot_silent = on
|
||||
eeprom_chitchat = on
|
||||
endstoppullups = on
|
||||
@@ -173,10 +174,8 @@ extrude_mintemp = 170
|
||||
host_keepalive_feature = on
|
||||
hotend_overshoot = 15
|
||||
jd_handle_small_segments = on
|
||||
lcd_info_screen_style = 0
|
||||
lcd_language = en
|
||||
max_bed_power = 255
|
||||
mesh_inset = 0
|
||||
|
||||
min_software_endstops = on
|
||||
max_software_endstops = on
|
||||
min_software_endstop_x = on
|
||||
@@ -185,50 +184,48 @@ min_software_endstop_z = on
|
||||
max_software_endstop_x = on
|
||||
max_software_endstop_y = on
|
||||
max_software_endstop_z = on
|
||||
preheat_1_fan_speed = 0
|
||||
|
||||
preheat_1_label = "PLA"
|
||||
preheat_1_temp_hotend = 180
|
||||
preheat_1_temp_bed = 70
|
||||
preheat_1_fan_speed = 0
|
||||
|
||||
preheat_2_label = "ABS"
|
||||
preheat_2_temp_hotend = 240
|
||||
preheat_2_temp_bed = 110
|
||||
preheat_2_fan_speed = 0
|
||||
|
||||
prevent_cold_extrusion = on
|
||||
prevent_lengthy_extrude = on
|
||||
printjob_timer_autostart = on
|
||||
probing_margin = 10
|
||||
show_bootscreen = on
|
||||
soft_pwm_scale = 0
|
||||
string_config_h_author = "(none, default config)"
|
||||
|
||||
temp_bed_hysteresis = 3
|
||||
temp_bed_residency_time = 10
|
||||
temp_bed_window = 1
|
||||
temp_residency_time = 10
|
||||
temp_window = 1
|
||||
validate_homing_endstops = on
|
||||
xy_probe_feedrate = (133*60)
|
||||
z_clearance_between_probes = 5
|
||||
z_clearance_deploy_probe = 10
|
||||
z_clearance_multi_probe = 5
|
||||
|
||||
editable_steps_per_unit = on
|
||||
|
||||
[config:advanced]
|
||||
arc_support = on
|
||||
auto_report_temperatures = on
|
||||
|
||||
autotemp = on
|
||||
autotemp_min = 210
|
||||
autotemp_max = 250
|
||||
autotemp_factor = 0.1f
|
||||
autotemp_oldweight = 0.98
|
||||
bed_check_interval = 5000
|
||||
|
||||
default_stepper_timeout_sec = 120
|
||||
default_volumetric_extruder_limit = 0.00
|
||||
disable_idle_x = on
|
||||
disable_idle_y = on
|
||||
disable_idle_z = on
|
||||
disable_idle_e = on
|
||||
e0_auto_fan_pin = -1
|
||||
encoder_100x_steps_per_sec = 80
|
||||
encoder_10x_steps_per_sec = 30
|
||||
encoder_rate_multiplier = on
|
||||
extended_capabilities_report = on
|
||||
extruder_auto_fan_speed = 255
|
||||
extruder_auto_fan_temperature = 50
|
||||
fanmux0_pin = -1
|
||||
fanmux1_pin = -1
|
||||
fanmux2_pin = -1
|
||||
faster_gcode_parser = on
|
||||
debug_flags_gcode = on
|
||||
homing_bump_mm = { 5, 5, 2 }
|
||||
max_arc_segment_mm = 1.0
|
||||
min_arc_segment_mm = 0.1
|
||||
@@ -237,11 +234,11 @@ n_arc_correction = 25
|
||||
serial_overrun_protection = on
|
||||
slowdown = on
|
||||
slowdown_divisor = 2
|
||||
temp_sensor_bed = 0
|
||||
thermal_protection_bed_hysteresis = 2
|
||||
thermocouple_max_errors = 15
|
||||
tx_buffer_size = 0
|
||||
|
||||
bed_check_interval = 5000
|
||||
watch_bed_temp_increase = 2
|
||||
watch_bed_temp_period = 60
|
||||
|
||||
watch_temp_increase = 2
|
||||
watch_temp_period = 20
|
||||
watch_temp_period = 40
|
||||
|
||||
@@ -129,11 +129,11 @@ typedef Servo hal_servo_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef MMU2_SERIAL_PORT
|
||||
#if !WITHIN(MMU2_SERIAL_PORT, 0, 3)
|
||||
#error "MMU2_SERIAL_PORT must be from 0 to 3"
|
||||
#ifdef MMU_SERIAL_PORT
|
||||
#if !WITHIN(MMU_SERIAL_PORT, 0, 3)
|
||||
#error "MMU_SERIAL_PORT must be from 0 to 3"
|
||||
#endif
|
||||
#define MMU2_SERIAL mmuSerial
|
||||
#define MMU_SERIAL mmuSerial
|
||||
#endif
|
||||
|
||||
#ifdef LCD_SERIAL_PORT
|
||||
@@ -141,7 +141,7 @@ typedef Servo hal_servo_t;
|
||||
#error "LCD_SERIAL_PORT must be from 0 to 3."
|
||||
#endif
|
||||
#define LCD_SERIAL lcdSerial
|
||||
#if HAS_DGUS_LCD
|
||||
#if ANY(HAS_DGUS_LCD, EXTENSIBLE_UI)
|
||||
#define LCD_SERIAL_TX_BUFFER_FREE() LCD_SERIAL.get_tx_buffer_free()
|
||||
#endif
|
||||
#endif
|
||||
@@ -159,7 +159,7 @@ typedef Servo hal_servo_t;
|
||||
#define GET_PIN_MAP_INDEX(pin) pin
|
||||
#define PARSED_PIN_INDEX(code, dval) parser.intval(code, dval)
|
||||
|
||||
#define HAL_SENSITIVE_PINS 0, 1,
|
||||
#define HAL_SENSITIVE_PINS 0, 1
|
||||
|
||||
#ifdef __AVR_AT90USB1286__
|
||||
#define JTAG_DISABLE() do{ MCUCR = 0x80; MCUCR = 0x80; }while(0)
|
||||
|
||||
@@ -601,20 +601,20 @@ MSerialT1 customizedSerial1(MSerialT1::HasEmergencyParser);
|
||||
|
||||
#endif // SERIAL_PORT_3
|
||||
|
||||
#ifdef MMU2_SERIAL_PORT
|
||||
#ifdef MMU_SERIAL_PORT
|
||||
|
||||
ISR(SERIAL_REGNAME(USART, MMU2_SERIAL_PORT, _RX_vect)) {
|
||||
MarlinSerial<MMU2SerialCfg<MMU2_SERIAL_PORT>>::store_rxd_char();
|
||||
ISR(SERIAL_REGNAME(USART, MMU_SERIAL_PORT, _RX_vect)) {
|
||||
MarlinSerial<MMU2SerialCfg<MMU_SERIAL_PORT>>::store_rxd_char();
|
||||
}
|
||||
|
||||
ISR(SERIAL_REGNAME(USART, MMU2_SERIAL_PORT, _UDRE_vect)) {
|
||||
MarlinSerial<MMU2SerialCfg<MMU2_SERIAL_PORT>>::_tx_udr_empty_irq();
|
||||
ISR(SERIAL_REGNAME(USART, MMU_SERIAL_PORT, _UDRE_vect)) {
|
||||
MarlinSerial<MMU2SerialCfg<MMU_SERIAL_PORT>>::_tx_udr_empty_irq();
|
||||
}
|
||||
|
||||
template class MarlinSerial< MMU2SerialCfg<MMU2_SERIAL_PORT> >;
|
||||
template class MarlinSerial< MMU2SerialCfg<MMU_SERIAL_PORT> >;
|
||||
MSerialMMU2 mmuSerial(MSerialMMU2::HasEmergencyParser);
|
||||
|
||||
#endif // MMU2_SERIAL_PORT
|
||||
#endif // MMU_SERIAL_PORT
|
||||
|
||||
#ifdef LCD_SERIAL_PORT
|
||||
|
||||
@@ -629,7 +629,7 @@ MSerialT1 customizedSerial1(MSerialT1::HasEmergencyParser);
|
||||
template class MarlinSerial< LCDSerialCfg<LCD_SERIAL_PORT> >;
|
||||
MSerialLCD lcdSerial(MSerialLCD::HasEmergencyParser);
|
||||
|
||||
#if HAS_DGUS_LCD
|
||||
#if ANY(HAS_DGUS_LCD, EXTENSIBLE_UI)
|
||||
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.
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
static ring_buffer_pos_t available();
|
||||
static void write(const uint8_t c);
|
||||
static void flushTX();
|
||||
#if HAS_DGUS_LCD
|
||||
#if ANY(HAS_DGUS_LCD, EXTENSIBLE_UI)
|
||||
static ring_buffer_pos_t get_tx_buffer_free();
|
||||
#endif
|
||||
|
||||
@@ -246,7 +246,7 @@
|
||||
|
||||
#endif // !USBCON
|
||||
|
||||
#ifdef MMU2_SERIAL_PORT
|
||||
#ifdef MMU_SERIAL_PORT
|
||||
template <uint8_t serial>
|
||||
struct MMU2SerialCfg {
|
||||
static constexpr int PORT = serial;
|
||||
@@ -260,7 +260,7 @@
|
||||
static constexpr bool RX_OVERRUNS = false;
|
||||
};
|
||||
|
||||
typedef Serial1Class< MarlinSerial< MMU2SerialCfg<MMU2_SERIAL_PORT> > > MSerialMMU2;
|
||||
typedef Serial1Class< MarlinSerial< MMU2SerialCfg<MMU_SERIAL_PORT> > > MSerialMMU2;
|
||||
extern MSerialMMU2 mmuSerial;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -345,6 +345,14 @@ void setup_endstop_interrupts() {
|
||||
pciSetup(Z_MIN_PROBE_PIN);
|
||||
#endif
|
||||
#endif
|
||||
#if USE_CALIBRATION
|
||||
#if (digitalPinToInterrupt(CALIBRATION_PIN) != NOT_AN_INTERRUPT)
|
||||
_ATTACH(CALIBRATION_PIN);
|
||||
#else
|
||||
static_assert(digitalPinHasPCICR(CALIBRATION_PIN), "CALIBRATION_PIN is not interrupt-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue.");
|
||||
pciSetup(CALIBRATION_PIN);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// If we arrive here without raising an assertion, each pin has either an EXT-interrupt or a PCI.
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ void MarlinHAL::set_pwm_frequency(const pin_t pin, const uint16_t f_desired) {
|
||||
else {
|
||||
if (p == 32 || p == 128) continue; // Skip TIMER2 specific prescalers when not TIMER2
|
||||
const uint16_t rft = (F_CPU) / (p * f_desired);
|
||||
DEBUG_ECHOLNPGM("(Not Timer 2) F_CPU=" STRINGIFY(F_CPU), " prescaler=", p, " f_desired=", f_desired);
|
||||
DEBUG_ECHOLNPGM("(Not Timer 2) F_CPU=", STRINGIFY(F_CPU), " prescaler=", p, " f_desired=", f_desired);
|
||||
res_fast_temp = rft - 1;
|
||||
res_pc_temp = rft / 2;
|
||||
}
|
||||
|
||||
@@ -28,9 +28,6 @@
|
||||
* Port : E0 E1 E4 E5 G5 E3 H3 H4 H5 H6 B4 B5 B6 B7 J1 J0 H1 H0 D3 D2 D1 D0 A0 A1 A2 A3 A4 A5 A6 A7 C7 C6 C5 C4 C3 C2 C1 C0 D7 G2 G1 G0 L7 L6 L5 L4 L3 L2 L1 L0 B3 B2 B1 B0 F0 F1 F2 F3 F4 F5 F6 F7 K0 K1 K2 K3 K4 K5 K6 K7 | E2 E6 E7 xx xx H2 H7 G3 G4 xx xx xx xx xx D4 D5 D6 xx xx J2 J3 J4 J5 J6 J7 xx xx xx xx xx
|
||||
* Logical Pin : 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | 78 79 80 xx xx 84 85 71 70 xx xx xx xx xx 81 82 83 xx xx 72 73 75 76 77 74 xx xx xx xx xx
|
||||
* Analog Input : 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
||||
*
|
||||
* Arduino Pin Layout video: https://youtu.be/rIqeVCX09FA
|
||||
* AVR alternate pin function overview video: https://youtu.be/1yd8wuI5Plg
|
||||
*/
|
||||
|
||||
#include "../fastio.h"
|
||||
|
||||
@@ -26,9 +26,6 @@
|
||||
*
|
||||
* Logical Pin: 38 39 40 41 42 43 44 45 16 10 11 12 06 07 08 09 30 31 32 33 34 35 36 37 17 18 19 20 21 22 23 24 00 01 13 05 02 03 14 15 46 47 48 49 50 51 52 53 25 26 27 28 29 04
|
||||
* Port: A0 A1 A2 A3 A4 A5 A6 A7 B0 B1 B2 B3 B4 B5 B6 B7 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7 E0 E1 E2 E3 E4 E5 E6 E7 F0 F1 F2 F3 F4 F5 F6 F7 G0 G1 G2 G3 G4 G5
|
||||
*
|
||||
* Arduino Pin Layout video: https://youtu.be/rIqeVCX09FA
|
||||
* AVR alternate pin function overview video: https://youtu.be/1yd8wuI5Plg
|
||||
*/
|
||||
|
||||
#include "../fastio.h"
|
||||
|
||||
@@ -26,9 +26,6 @@
|
||||
*
|
||||
* Logical Pin: 08 09 10 11 12 13 14 15 16 17 18 19 20 21 00 01 02 03 04 05 06 07
|
||||
* Port: B0 B1 B2 B3 B4 B5 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7
|
||||
*
|
||||
* Arduino Pin Layout video: https://youtu.be/rIqeVCX09FA
|
||||
* AVR alternate pin function overview video: https://youtu.be/1yd8wuI5Plg
|
||||
*/
|
||||
|
||||
#include "../fastio.h"
|
||||
|
||||
@@ -26,9 +26,6 @@
|
||||
*
|
||||
* Logical Pin: 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
||||
* Port: B0 B1 B2 B3 B4 B5 B6 B7 D0 D1 D2 D3 D4 D5 D6 D7 C0 C1 C2 C3 C4 C5 C6 C7 A7 A6 A5 A4 A3 A2 A1 A0
|
||||
*
|
||||
* Arduino Pin Layout video: https://youtu.be/rIqeVCX09FA
|
||||
* AVR alternate pin function overview video: https://youtu.be/1yd8wuI5Plg
|
||||
*/
|
||||
|
||||
/** ATMega644
|
||||
|
||||
@@ -26,10 +26,7 @@
|
||||
*
|
||||
* Logical Pin: 28 29 30 31 32 33 34 35 20 21 22 23 24 25 26 27 10 11 12 13 14 15 16 17 00 01 02 03 04 05 06 07 08 09(46*47)36 37 18 19 38 39 40 41 42 43 44 45
|
||||
* Port: A0 A1 A2 A3 A4 A5 A6 A7 B0 B1 B2 B3 B4 B5 B6 B7 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7 E0 E1 E2 E3 E4 E5 E6 E7 F0 F1 F2 F3 F4 F5 F6 F7
|
||||
* The logical pins 46 and 47 are not supported by Teensyduino, but are supported below as E2 and E3
|
||||
*
|
||||
* Arduino Pin Layout video: https://youtu.be/rIqeVCX09FA
|
||||
* AVR alternate pin function overview video: https://youtu.be/1yd8wuI5Plg
|
||||
* Logical pins 46-47 aren't supported by Teensyduino, but are supported below as E2 and E3
|
||||
*/
|
||||
|
||||
#include "../fastio.h"
|
||||
|
||||
@@ -22,7 +22,23 @@
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* PWM print routines for Atmel 8 bit AVR CPUs
|
||||
* Pins Debugging for Atmel 8 bit AVR CPUs
|
||||
*
|
||||
* - NUMBER_PINS_TOTAL
|
||||
* - MULTI_NAME_PAD
|
||||
* - getPinByIndex(index)
|
||||
* - printPinNameByIndex(index)
|
||||
* - getPinIsDigitalByIndex(index)
|
||||
* - digitalPinToAnalogIndex(pin)
|
||||
* - getValidPinMode(pin)
|
||||
* - isValidPin(pin)
|
||||
* - isAnalogPin(pin)
|
||||
* - digitalRead_mod(pin)
|
||||
* - pwm_status(pin)
|
||||
* - printPinPWM(pin)
|
||||
* - printPinPort(pin)
|
||||
* - printPinNumber(pin)
|
||||
* - printPinAnalog(pin)
|
||||
*/
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
@@ -39,44 +55,44 @@
|
||||
#include "pinsDebug_Teensyduino.h"
|
||||
// Can't use the "digitalPinToPort" function from the Teensyduino type IDEs
|
||||
// portModeRegister takes a different argument
|
||||
#define digitalPinToTimer_DEBUG(p) digitalPinToTimer(p)
|
||||
#define digitalPinToBitMask_DEBUG(p) digitalPinToBitMask(p)
|
||||
#define digitalPinToPort_DEBUG(p) digitalPinToPort(p)
|
||||
#define GET_PINMODE(pin) (*portModeRegister(pin) & digitalPinToBitMask_DEBUG(pin))
|
||||
#define digitalPinToTimer_DEBUG(P) digitalPinToTimer(P)
|
||||
#define digitalPinToBitMask_DEBUG(P) digitalPinToBitMask(P)
|
||||
#define digitalPinToPort_DEBUG(P) digitalPinToPort(P)
|
||||
#define getValidPinMode(P) (*portModeRegister(P) & digitalPinToBitMask_DEBUG(P))
|
||||
|
||||
#elif AVR_ATmega2560_FAMILY_PLUS_70 // So we can access/display all the pins on boards using more than 70
|
||||
|
||||
#include "pinsDebug_plus_70.h"
|
||||
#define digitalPinToTimer_DEBUG(p) digitalPinToTimer_plus_70(p)
|
||||
#define digitalPinToBitMask_DEBUG(p) digitalPinToBitMask_plus_70(p)
|
||||
#define digitalPinToPort_DEBUG(p) digitalPinToPort_plus_70(p)
|
||||
bool GET_PINMODE(int8_t pin) {return *portModeRegister(digitalPinToPort_DEBUG(pin)) & digitalPinToBitMask_DEBUG(pin); }
|
||||
#define digitalPinToTimer_DEBUG(P) digitalPinToTimer_plus_70(P)
|
||||
#define digitalPinToBitMask_DEBUG(P) digitalPinToBitMask_plus_70(P)
|
||||
#define digitalPinToPort_DEBUG(P) digitalPinToPort_plus_70(P)
|
||||
bool getValidPinMode(pin_t pin) {return *portModeRegister(digitalPinToPort_DEBUG(pin)) & digitalPinToBitMask_DEBUG(pin); }
|
||||
|
||||
#else
|
||||
|
||||
#define digitalPinToTimer_DEBUG(p) digitalPinToTimer(p)
|
||||
#define digitalPinToBitMask_DEBUG(p) digitalPinToBitMask(p)
|
||||
#define digitalPinToPort_DEBUG(p) digitalPinToPort(p)
|
||||
bool GET_PINMODE(int8_t pin) {return *portModeRegister(digitalPinToPort_DEBUG(pin)) & digitalPinToBitMask_DEBUG(pin); }
|
||||
#define GET_ARRAY_PIN(p) pgm_read_byte(&pin_array[p].pin)
|
||||
#define digitalPinToTimer_DEBUG(P) digitalPinToTimer(P)
|
||||
#define digitalPinToBitMask_DEBUG(P) digitalPinToBitMask(P)
|
||||
#define digitalPinToPort_DEBUG(P) digitalPinToPort(P)
|
||||
bool getValidPinMode(pin_t pin) {return *portModeRegister(digitalPinToPort_DEBUG(pin)) & digitalPinToBitMask_DEBUG(pin); }
|
||||
#define getPinByIndex(x) pgm_read_byte(&pin_array[x].pin)
|
||||
|
||||
#endif
|
||||
|
||||
#define VALID_PIN(pin) (pin >= 0 && pin < NUM_DIGITAL_PINS ? 1 : 0)
|
||||
#define isValidPin(P) (P >= 0 && P < NUMBER_PINS_TOTAL)
|
||||
#if AVR_ATmega1284_FAMILY
|
||||
#define IS_ANALOG(P) WITHIN(P, analogInputToDigitalPin(7), analogInputToDigitalPin(0))
|
||||
#define DIGITAL_PIN_TO_ANALOG_PIN(P) int(IS_ANALOG(P) ? (P) - analogInputToDigitalPin(7) : -1)
|
||||
#define isAnalogPin(P) WITHIN(P, analogInputToDigitalPin(7), analogInputToDigitalPin(0))
|
||||
#define digitalPinToAnalogIndex(P) int(isAnalogPin(P) ? (P) - analogInputToDigitalPin(7) : -1)
|
||||
#else
|
||||
#define _ANALOG1(P) WITHIN(P, analogInputToDigitalPin(0), analogInputToDigitalPin(7))
|
||||
#define _ANALOG2(P) WITHIN(P, analogInputToDigitalPin(8), analogInputToDigitalPin(15))
|
||||
#define IS_ANALOG(P) (_ANALOG1(P) || _ANALOG2(P))
|
||||
#define DIGITAL_PIN_TO_ANALOG_PIN(P) int(_ANALOG1(P) ? (P) - analogInputToDigitalPin(0) : _ANALOG2(P) ? (P) - analogInputToDigitalPin(8) + 8 : -1)
|
||||
#define isAnalogPin(P) (_ANALOG1(P) || _ANALOG2(P))
|
||||
#define digitalPinToAnalogIndex(P) int(_ANALOG1(P) ? (P) - analogInputToDigitalPin(0) : _ANALOG2(P) ? (P) - analogInputToDigitalPin(8) + 8 : -1)
|
||||
#endif
|
||||
#define GET_ARRAY_PIN(p) pgm_read_byte(&pin_array[p].pin)
|
||||
#define getPinByIndex(x) pgm_read_byte(&pin_array[x].pin)
|
||||
#define MULTI_NAME_PAD 26 // space needed to be pretty if not first name assigned to a pin
|
||||
|
||||
void PRINT_ARRAY_NAME(uint8_t x) {
|
||||
PGM_P const name_mem_pointer = (PGM_P)pgm_read_ptr(&pin_array[x].name);
|
||||
void printPinNameByIndex(const uint8_t index) {
|
||||
PGM_P const name_mem_pointer = (PGM_P)pgm_read_ptr(&pin_array[index].name);
|
||||
for (uint8_t y = 0; y < MAX_NAME_LENGTH; ++y) {
|
||||
char temp_char = pgm_read_byte(name_mem_pointer + y);
|
||||
if (temp_char != 0)
|
||||
@@ -88,7 +104,7 @@ void PRINT_ARRAY_NAME(uint8_t x) {
|
||||
}
|
||||
}
|
||||
|
||||
#define GET_ARRAY_IS_DIGITAL(x) pgm_read_byte(&pin_array[x].is_digital)
|
||||
#define getPinIsDigitalByIndex(x) pgm_read_byte(&pin_array[x].is_digital)
|
||||
|
||||
#if defined(__AVR_ATmega1284P__) // 1284 IDE extensions set this to the number of
|
||||
#undef NUM_DIGITAL_PINS // digital only pins while all other CPUs have it
|
||||
@@ -109,7 +125,7 @@ void PRINT_ARRAY_NAME(uint8_t x) {
|
||||
* Print a pin's PWM status.
|
||||
* Return true if it's currently a PWM pin.
|
||||
*/
|
||||
bool pwm_status(uint8_t pin) {
|
||||
bool pwm_status(const uint8_t pin) {
|
||||
char buffer[20]; // for the sprintf statements
|
||||
|
||||
switch (digitalPinToTimer_DEBUG(pin)) {
|
||||
@@ -276,7 +292,7 @@ void timer_prefix(uint8_t T, char L, uint8_t N) { // T - timer L - pwm N -
|
||||
if (TEST(*TMSK, TOIE)) err_prob_interrupt();
|
||||
}
|
||||
|
||||
void pwm_details(uint8_t pin) {
|
||||
void printPinPWM(const uint8_t pin) {
|
||||
switch (digitalPinToTimer_DEBUG(pin)) {
|
||||
|
||||
#if ABTEST(0)
|
||||
@@ -347,7 +363,7 @@ void pwm_details(uint8_t pin) {
|
||||
#else
|
||||
UNUSED(print_is_also_tied);
|
||||
#endif
|
||||
} // pwm_details
|
||||
} // printPinPWM
|
||||
|
||||
#ifndef digitalRead_mod // Use Teensyduino's version of digitalRead - it doesn't disable the PWMs
|
||||
int digitalRead_mod(const pin_t pin) { // same as digitalRead except the PWM stop section has been removed
|
||||
@@ -356,7 +372,7 @@ void pwm_details(uint8_t pin) {
|
||||
}
|
||||
#endif
|
||||
|
||||
void print_port(const pin_t pin) { // print port number
|
||||
void printPinPort(const pin_t pin) { // print port number
|
||||
#ifdef digitalPinToPort_DEBUG
|
||||
uint8_t x;
|
||||
SERIAL_ECHOPGM(" Port: ");
|
||||
@@ -386,7 +402,7 @@ void print_port(const pin_t pin) { // print port number
|
||||
#endif
|
||||
}
|
||||
|
||||
#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0)
|
||||
#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0)
|
||||
#define printPinNumber(P) do{ sprintf_P(buffer, PSTR("%3d "), P); SERIAL_ECHO(buffer); }while(0)
|
||||
#define printPinAnalog(P) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(P)); SERIAL_ECHO(buffer); }while(0)
|
||||
|
||||
#undef ABTEST
|
||||
|
||||
@@ -102,7 +102,7 @@ const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
|
||||
|
||||
// digitalPinToBitMask(pin) is OK
|
||||
|
||||
#define digitalRead_mod(p) extDigitalRead(p) // Teensyduino's version of digitalRead doesn't
|
||||
#define digitalRead_mod(P) extDigitalRead(P) // Teensyduino's version of digitalRead doesn't
|
||||
// disable the PWMs so we can use it as is
|
||||
|
||||
// portModeRegister(pin) is OK
|
||||
|
||||
@@ -23,43 +23,41 @@
|
||||
|
||||
/**
|
||||
* Define SPI Pins: SCK, MISO, MOSI, SS
|
||||
* Platform pins have parentheses, e.g., "(53)", so we cannot use them.
|
||||
*/
|
||||
#if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328__) || defined(__AVR_ATmega328P__)
|
||||
#define AVR_SCK_PIN 13
|
||||
#define AVR_MISO_PIN 12
|
||||
#define AVR_MOSI_PIN 11
|
||||
#define AVR_SS_PIN 10
|
||||
#define _PIN_SPI_SCK 13
|
||||
#define _PIN_SPI_MISO 12
|
||||
#define _PIN_SPI_MOSI 11
|
||||
#define _PIN_SPI_SS 10
|
||||
#elif defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644PA__) || defined(__AVR_ATmega1284P__)
|
||||
#define AVR_SCK_PIN 7
|
||||
#define AVR_MISO_PIN 6
|
||||
#define AVR_MOSI_PIN 5
|
||||
#define AVR_SS_PIN 4
|
||||
#define _PIN_SPI_SCK 7
|
||||
#define _PIN_SPI_MISO 6
|
||||
#define _PIN_SPI_MOSI 5
|
||||
#define _PIN_SPI_SS 4
|
||||
#elif defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
|
||||
#define AVR_SCK_PIN 52
|
||||
#define AVR_MISO_PIN 50
|
||||
#define AVR_MOSI_PIN 51
|
||||
#define AVR_SS_PIN 53
|
||||
#define _PIN_SPI_SCK 52
|
||||
#define _PIN_SPI_MISO 50
|
||||
#define _PIN_SPI_MOSI 51
|
||||
#define _PIN_SPI_SS 53
|
||||
#elif defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__)
|
||||
#define AVR_SCK_PIN 21
|
||||
#define AVR_MISO_PIN 23
|
||||
#define AVR_MOSI_PIN 22
|
||||
#define AVR_SS_PIN 20
|
||||
#define _PIN_SPI_SCK 21
|
||||
#define _PIN_SPI_MISO 23
|
||||
#define _PIN_SPI_MOSI 22
|
||||
#define _PIN_SPI_SS 20
|
||||
#elif defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__)
|
||||
#define AVR_SCK_PIN 10
|
||||
#define AVR_MISO_PIN 12
|
||||
#define AVR_MOSI_PIN 11
|
||||
#define AVR_SS_PIN 16
|
||||
#define _PIN_SPI_SCK 10
|
||||
#define _PIN_SPI_MISO 12
|
||||
#define _PIN_SPI_MOSI 11
|
||||
#define _PIN_SPI_SS 16
|
||||
#endif
|
||||
|
||||
#ifndef SD_SCK_PIN
|
||||
#define SD_SCK_PIN AVR_SCK_PIN
|
||||
#define SD_SCK_PIN _PIN_SPI_SCK
|
||||
#endif
|
||||
#ifndef SD_MISO_PIN
|
||||
#define SD_MISO_PIN AVR_MISO_PIN
|
||||
#define SD_MISO_PIN _PIN_SPI_MISO
|
||||
#endif
|
||||
#ifndef SD_MOSI_PIN
|
||||
#define SD_MOSI_PIN AVR_MOSI_PIN
|
||||
#endif
|
||||
#ifndef SD_SS_PIN
|
||||
#define SD_SS_PIN AVR_SS_PIN
|
||||
#define SD_MOSI_PIN _PIN_SPI_MOSI
|
||||
#endif
|
||||
|
||||
@@ -120,7 +120,7 @@ void u8g_spiSend_sw_AVR_mode_3(uint8_t val) {
|
||||
U8G_ATOMIC_END();
|
||||
}
|
||||
|
||||
#if ENABLED(FYSETC_MINI_12864)
|
||||
#if U8G_SPI_USE_MODE_3
|
||||
#define SPISEND_SW_AVR u8g_spiSend_sw_AVR_mode_3
|
||||
#else
|
||||
#define SPISEND_SW_AVR u8g_spiSend_sw_AVR_mode_0
|
||||
@@ -143,9 +143,9 @@ uint8_t u8g_com_HAL_AVR_sw_sp_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void
|
||||
break;
|
||||
|
||||
case U8G_COM_MSG_CHIP_SELECT:
|
||||
#if ENABLED(FYSETC_MINI_12864) // LCD SPI is running mode 3 while SD card is running mode 0
|
||||
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
|
||||
// the next chip select goes active
|
||||
#if U8G_SPI_USE_MODE_3 // LCD SPI is running mode 3 while SD card is running mode 0
|
||||
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
|
||||
// the next chip select goes active
|
||||
u8g_com_arduino_digital_write(u8g, U8G_PI_SCK, 1); // Set SCK to mode 3 idle state before CS goes active
|
||||
u8g_com_arduino_digital_write(u8g, U8G_PI_CS, LOW);
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ uint16_t MarlinHAL::adc_result;
|
||||
|
||||
void MarlinHAL::init() {
|
||||
#if HAS_MEDIA
|
||||
OUT_WRITE(SDSS, HIGH); // Try to set SDSS inactive before any other SPI users start up
|
||||
OUT_WRITE(SD_SS_PIN, HIGH); // Try to set SDSS inactive before any other SPI users start up
|
||||
#endif
|
||||
usb_task_init(); // Initialize the USB stack
|
||||
TERN_(POSTMORTEM_DEBUGGING, install_min_serial()); // Install the min serial handler
|
||||
|
||||
@@ -35,67 +35,9 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "../../core/serial_hook.h"
|
||||
|
||||
// ------------------------
|
||||
// Serial ports
|
||||
// ------------------------
|
||||
|
||||
typedef ForwardSerial1Class< decltype(Serial) > DefaultSerial1;
|
||||
typedef ForwardSerial1Class< decltype(Serial1) > DefaultSerial2;
|
||||
typedef ForwardSerial1Class< decltype(Serial2) > DefaultSerial3;
|
||||
typedef ForwardSerial1Class< decltype(Serial3) > DefaultSerial4;
|
||||
extern DefaultSerial1 MSerial0;
|
||||
extern DefaultSerial2 MSerial1;
|
||||
extern DefaultSerial3 MSerial2;
|
||||
extern DefaultSerial4 MSerial3;
|
||||
|
||||
#define _MSERIAL(X) MSerial##X
|
||||
#define MSERIAL(X) _MSERIAL(X)
|
||||
|
||||
#if SERIAL_PORT == -1 || ENABLED(EMERGENCY_PARSER)
|
||||
#define MYSERIAL1 customizedSerial1
|
||||
#elif WITHIN(SERIAL_PORT, 0, 3)
|
||||
#define MYSERIAL1 MSERIAL(SERIAL_PORT)
|
||||
#else
|
||||
#error "The required SERIAL_PORT must be from 0 to 3, or -1 for USB Serial."
|
||||
#endif
|
||||
|
||||
#ifdef SERIAL_PORT_2
|
||||
#if SERIAL_PORT_2 == -1 || ENABLED(EMERGENCY_PARSER)
|
||||
#define MYSERIAL2 customizedSerial2
|
||||
#elif WITHIN(SERIAL_PORT_2, 0, 3)
|
||||
#define MYSERIAL2 MSERIAL(SERIAL_PORT_2)
|
||||
#else
|
||||
#error "SERIAL_PORT_2 must be from 0 to 3, or -1 for USB Serial."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef SERIAL_PORT_3
|
||||
#if SERIAL_PORT_3 == -1 || ENABLED(EMERGENCY_PARSER)
|
||||
#define MYSERIAL3 customizedSerial3
|
||||
#elif WITHIN(SERIAL_PORT_3, 0, 3)
|
||||
#define MYSERIAL3 MSERIAL(SERIAL_PORT_3)
|
||||
#else
|
||||
#error "SERIAL_PORT_3 must be from 0 to 3, or -1 for USB Serial."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef MMU2_SERIAL_PORT
|
||||
#if WITHIN(MMU2_SERIAL_PORT, 0, 3)
|
||||
#define MMU2_SERIAL MSERIAL(MMU2_SERIAL_PORT)
|
||||
#else
|
||||
#error "MMU2_SERIAL_PORT must be from 0 to 3."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef LCD_SERIAL_PORT
|
||||
#if WITHIN(LCD_SERIAL_PORT, 0, 3)
|
||||
#define LCD_SERIAL MSERIAL(LCD_SERIAL_PORT)
|
||||
#else
|
||||
#error "LCD_SERIAL_PORT must be from 0 to 3."
|
||||
#endif
|
||||
#endif
|
||||
//
|
||||
// Serial Ports
|
||||
//
|
||||
|
||||
#include "MarlinSerial.h"
|
||||
#include "MarlinSerialUSB.h"
|
||||
@@ -127,7 +69,7 @@ typedef Servo hal_servo_t;
|
||||
#define HAL_ADC_RESOLUTION 10
|
||||
|
||||
#ifndef analogInputToDigitalPin
|
||||
#define analogInputToDigitalPin(p) ((p < 12U) ? (p) + 54U : -1)
|
||||
#define analogInputToDigitalPin(p) pin_t((p < 12U) ? (p) + 54U : -1)
|
||||
#endif
|
||||
|
||||
//
|
||||
|
||||
@@ -600,9 +600,8 @@
|
||||
OUT_WRITE(SPI_EEPROM1_CS_PIN, HIGH);
|
||||
OUT_WRITE(SPI_EEPROM2_CS_PIN, HIGH);
|
||||
OUT_WRITE(SPI_FLASH_CS_PIN, HIGH);
|
||||
WRITE(SD_SS_PIN, HIGH);
|
||||
|
||||
OUT_WRITE(SDSS, LOW);
|
||||
OUT_WRITE(SD_SS_PIN, HIGH);
|
||||
WRITE(SD_SS_PIN, LOW);
|
||||
|
||||
PIO_Configure(
|
||||
g_APinDescription[SPI_PIN].pPort,
|
||||
@@ -767,7 +766,7 @@
|
||||
|
||||
// Disable PIO on A26 and A27
|
||||
REG_PIOA_PDR = 0x0C000000;
|
||||
OUT_WRITE(SDSS, HIGH);
|
||||
OUT_WRITE(SD_SS_PIN, HIGH);
|
||||
|
||||
// Reset SPI0 (from sam lib)
|
||||
SPI0->SPI_CR = SPI_CR_SPIDIS;
|
||||
|
||||
@@ -33,6 +33,21 @@
|
||||
#include "../../core/types.h"
|
||||
#include "../../core/serial_hook.h"
|
||||
|
||||
typedef ForwardSerial1Class< decltype(Serial) > DefaultSerial1;
|
||||
typedef ForwardSerial1Class< decltype(Serial1) > DefaultSerial2;
|
||||
typedef ForwardSerial1Class< decltype(Serial2) > DefaultSerial3;
|
||||
typedef ForwardSerial1Class< decltype(Serial3) > DefaultSerial4;
|
||||
extern DefaultSerial1 MSerial0;
|
||||
extern DefaultSerial2 MSerial1;
|
||||
extern DefaultSerial3 MSerial2;
|
||||
extern DefaultSerial4 MSerial3;
|
||||
|
||||
#define SERIAL_INDEX_MIN 0
|
||||
#define SERIAL_INDEX_MAX 3
|
||||
#define EP_SERIAL_PORT(N) customizedSerial##N
|
||||
#define USB_SERIAL_PORT(N) customizedSerial##N
|
||||
#include "../shared/serial_ports.h"
|
||||
|
||||
// Define constants and variables for buffering incoming serial data. We're
|
||||
// using a ring buffer (I think), in which rx_buffer_head is the index of the
|
||||
// location to which to write the next incoming character and rx_buffer_tail
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
static Flags<_Nbr_16timers> DisablePending; // ISR should disable the timer at the next timer reset
|
||||
|
||||
// ------------------------
|
||||
/// Interrupt handler for the TC0 channel 1.
|
||||
// Interrupt handler for the TC0 channel 1.
|
||||
// ------------------------
|
||||
void Servo_Handler(const timer16_Sequence_t, Tc*, const uint8_t);
|
||||
|
||||
|
||||
@@ -291,7 +291,7 @@ static bool ee_PageWrite(uint16_t page, const void *data) {
|
||||
uint32_t *p1 = (uint32_t*)addrflash;
|
||||
uint32_t *p2 = (uint32_t*)data;
|
||||
int count = 0;
|
||||
for (i =0; i<PageSize >> 2; i++) {
|
||||
for (i = 0; i < PageSize >> 2; i++) {
|
||||
if (p1[i] != p2[i]) {
|
||||
uint32_t delta = p1[i] ^ p2[i];
|
||||
while (delta) {
|
||||
|
||||
@@ -64,6 +64,7 @@ void setup_endstop_interrupts() {
|
||||
TERN_(USE_Z4_MAX, _ATTACH(Z4_MAX_PIN));
|
||||
TERN_(USE_Z4_MIN, _ATTACH(Z4_MIN_PIN));
|
||||
TERN_(USE_Z_MIN_PROBE, _ATTACH(Z_MIN_PROBE_PIN));
|
||||
TERN_(USE_CALIBRATION, _ATTACH(CALIBRATION_PIN));
|
||||
TERN_(USE_I_MAX, _ATTACH(I_MAX_PIN));
|
||||
TERN_(USE_I_MIN, _ATTACH(I_MIN_PIN));
|
||||
TERN_(USE_J_MAX, _ATTACH(J_MAX_PIN));
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
#else
|
||||
#define G2_PWM_Z 0
|
||||
#endif
|
||||
#if PIN_EXISTS(MOTOR_CURRENT_PWM_E)
|
||||
#if HAS_MOTOR_CURRENT_PWM_E
|
||||
#define G2_PWM_E 1
|
||||
#else
|
||||
#define G2_PWM_E 0
|
||||
|
||||
@@ -68,16 +68,15 @@
|
||||
* Usually the hardware SPI pins are only available to the LCD. This makes the DUE hard SPI used at the same time
|
||||
* as the TMC2130 soft SPI the most common setup.
|
||||
*/
|
||||
#define _IS_HW_SPI(P) (defined(TMC_SPI_##P) && (TMC_SPI_##P == SD_MOSI_PIN || TMC_SPI_##P == SD_MISO_PIN || TMC_SPI_##P == SD_SCK_PIN))
|
||||
|
||||
#if HAS_MEDIA && HAS_DRIVER(TMC2130)
|
||||
#if ENABLED(TMC_USE_SW_SPI)
|
||||
#if DISABLED(SOFTWARE_SPI) && (_IS_HW_SPI(MOSI) || _IS_HW_SPI(MISO) || _IS_HW_SPI(SCK))
|
||||
#error "DUE hardware SPI is required but is incompatible with TMC2130 software SPI. Either disable TMC_USE_SW_SPI or use separate pins for the two SPIs."
|
||||
#endif
|
||||
#elif ENABLED(SOFTWARE_SPI)
|
||||
#define _IS_HW_SPI(P) (defined(TMC_SPI_##P) && (TMC_SPI_##P == SD_MOSI_PIN || TMC_SPI_##P == SD_MISO_PIN || TMC_SPI_##P == SD_SCK_PIN))
|
||||
#if DISABLED(SOFTWARE_SPI) && ENABLED(TMC_USE_SW_SPI) && (_IS_HW_SPI(MOSI) || _IS_HW_SPI(MISO) || _IS_HW_SPI(SCK))
|
||||
#error "DUE hardware SPI is required but is incompatible with TMC2130 software SPI. Either disable TMC_USE_SW_SPI or use separate pins for the two SPIs."
|
||||
#endif
|
||||
#if ENABLED(SOFTWARE_SPI) && DISABLED(TMC_USE_SW_SPI)
|
||||
#error "DUE software SPI is required but is incompatible with TMC2130 hardware SPI. Enable TMC_USE_SW_SPI to fix."
|
||||
#endif
|
||||
#undef _IS_HW_SPI
|
||||
#endif
|
||||
|
||||
#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY
|
||||
|
||||
@@ -19,13 +19,26 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Support routines for Due
|
||||
*/
|
||||
|
||||
/**
|
||||
* Translation of routines & variables used by pinsDebug.h
|
||||
* Pins Debugging for DUE
|
||||
*
|
||||
* - NUMBER_PINS_TOTAL
|
||||
* - MULTI_NAME_PAD
|
||||
* - getPinByIndex(index)
|
||||
* - printPinNameByIndex(index)
|
||||
* - getPinIsDigitalByIndex(index)
|
||||
* - digitalPinToAnalogIndex(pin)
|
||||
* - getValidPinMode(pin)
|
||||
* - isValidPin(pin)
|
||||
* - isAnalogPin(pin)
|
||||
* - digitalRead_mod(pin)
|
||||
* - pwm_status(pin)
|
||||
* - printPinPWM(pin)
|
||||
* - printPinPort(pin)
|
||||
* - printPinNumber(pin)
|
||||
* - printPinAnalog(pin)
|
||||
*/
|
||||
|
||||
#include "../shared/Marduino.h"
|
||||
@@ -63,20 +76,20 @@
|
||||
|
||||
#define NUMBER_PINS_TOTAL PINS_COUNT
|
||||
|
||||
#define digitalRead_mod(p) extDigitalRead(p) // AVR digitalRead disabled PWM before it read the pin
|
||||
#define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
|
||||
#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%02d"), p); SERIAL_ECHO(buffer); }while(0)
|
||||
#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0)
|
||||
#define GET_ARRAY_PIN(p) pin_array[p].pin
|
||||
#define GET_ARRAY_IS_DIGITAL(p) pin_array[p].is_digital
|
||||
#define VALID_PIN(pin) (pin >= 0 && pin < int8_t(NUMBER_PINS_TOTAL))
|
||||
#define DIGITAL_PIN_TO_ANALOG_PIN(p) int(p - analogInputToDigitalPin(0))
|
||||
#define IS_ANALOG(P) WITHIN(P, char(analogInputToDigitalPin(0)), char(analogInputToDigitalPin(NUM_ANALOG_INPUTS - 1)))
|
||||
#define pwm_status(pin) (((g_pinStatus[pin] & 0xF) == PIN_STATUS_PWM) && \
|
||||
((g_APinDescription[pin].ulPinAttribute & PIN_ATTR_PWM) == PIN_ATTR_PWM))
|
||||
#define digitalRead_mod(P) extDigitalRead(P) // AVR digitalRead disabled PWM before it read the pin
|
||||
#define printPinNameByIndex(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
|
||||
#define printPinNumber(P) do{ sprintf_P(buffer, PSTR("%02d"), P); SERIAL_ECHO(buffer); }while(0)
|
||||
#define printPinAnalog(P) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(P)); SERIAL_ECHO(buffer); }while(0)
|
||||
#define getPinByIndex(x) pin_array[x].pin
|
||||
#define getPinIsDigitalByIndex(x) pin_array[x].is_digital
|
||||
#define isValidPin(P) (P >= 0 && P < pin_t(NUMBER_PINS_TOTAL))
|
||||
#define digitalPinToAnalogIndex(P) int(P - analogInputToDigitalPin(0))
|
||||
#define isAnalogPin(P) WITHIN(P, pin_t(analogInputToDigitalPin(0)), pin_t(analogInputToDigitalPin(NUM_ANALOG_INPUTS - 1)))
|
||||
#define pwm_status(P) (((g_pinStatus[P] & 0xF) == PIN_STATUS_PWM) && \
|
||||
((g_APinDescription[P].ulPinAttribute & PIN_ATTR_PWM) == PIN_ATTR_PWM))
|
||||
#define MULTI_NAME_PAD 14 // space needed to be pretty if not first name assigned to a pin
|
||||
|
||||
bool GET_PINMODE(int8_t pin) { // 1: output, 0: input
|
||||
bool getValidPinMode(const pin_t pin) { // 1: output, 0: input
|
||||
volatile Pio* port = g_APinDescription[pin].pPort;
|
||||
uint32_t mask = g_APinDescription[pin].ulPin;
|
||||
uint8_t pin_status = g_pinStatus[pin] & 0xF;
|
||||
@@ -85,14 +98,14 @@ bool GET_PINMODE(int8_t pin) { // 1: output, 0: input
|
||||
|| pwm_status(pin));
|
||||
}
|
||||
|
||||
void pwm_details(int32_t pin) {
|
||||
void printPinPWM(const int32_t pin) {
|
||||
if (pwm_status(pin)) {
|
||||
uint32_t chan = g_APinDescription[pin].ulPWMChannel;
|
||||
SERIAL_ECHOPGM("PWM = ", PWM_INTERFACE->PWM_CH_NUM[chan].PWM_CDTY);
|
||||
}
|
||||
}
|
||||
|
||||
void print_port(const pin_t) {}
|
||||
void printPinPort(const pin_t) {}
|
||||
|
||||
/**
|
||||
* DUE Board pin | PORT | Label
|
||||
|
||||
@@ -24,41 +24,38 @@
|
||||
/**
|
||||
* Define SPI Pins: SCK, MISO, MOSI, SS
|
||||
*
|
||||
* Available chip select pins for HW SPI are 4 10 52 77
|
||||
* Available chip select pins for HW SPI are 4 10 52 77 87
|
||||
*/
|
||||
#if SDSS == 4 || SDSS == 10 || SDSS == 52 || SDSS == 77 || SDSS == 87
|
||||
#if SDSS == 4
|
||||
#define SPI_PIN 87
|
||||
#define SPI_CHAN 1
|
||||
#elif SDSS == 10
|
||||
#define SPI_PIN 77
|
||||
#define SPI_CHAN 0
|
||||
#elif SDSS == 52
|
||||
#define SPI_PIN 86
|
||||
#define SPI_CHAN 2
|
||||
#elif SDSS == 77
|
||||
#define SPI_PIN 77
|
||||
#define SPI_CHAN 0
|
||||
#else
|
||||
#define SPI_PIN 87
|
||||
#define SPI_CHAN 1
|
||||
#endif
|
||||
#define SD_SCK_PIN 76
|
||||
#define SD_MISO_PIN 74
|
||||
#define SD_MOSI_PIN 75
|
||||
#else
|
||||
// defaults
|
||||
#define SOFTWARE_SPI
|
||||
#ifndef SD_SCK_PIN
|
||||
#define SD_SCK_PIN 52
|
||||
#endif
|
||||
#ifndef SD_MISO_PIN
|
||||
#define SD_MISO_PIN 50
|
||||
#endif
|
||||
#ifndef SD_MOSI_PIN
|
||||
#define SD_MOSI_PIN 51
|
||||
#endif
|
||||
#if SD_SS_PIN == 4 || SD_SS_PIN == 10 || SD_SS_PIN == 52 || SD_SS_PIN == 77 || SD_SS_PIN == 87
|
||||
#define SD_SCK_PIN 76
|
||||
#define SD_MISO_PIN 74
|
||||
#define SD_MOSI_PIN 75
|
||||
#endif
|
||||
|
||||
/* A.28, A.29, B.21, C.26, C.29 */
|
||||
#define SD_SS_PIN SDSS
|
||||
#if SD_SS_PIN == 4
|
||||
#define SPI_PIN 87
|
||||
#define SPI_CHAN 1
|
||||
#elif SD_SS_PIN == 10
|
||||
#define SPI_PIN 77
|
||||
#define SPI_CHAN 0
|
||||
#elif SD_SS_PIN == 52
|
||||
#define SPI_PIN 86
|
||||
#define SPI_CHAN 2
|
||||
#elif SD_SS_PIN == 77
|
||||
#define SPI_PIN 77
|
||||
#define SPI_CHAN 0
|
||||
#elif SD_SS_PIN == 87
|
||||
#define SPI_PIN 87
|
||||
#define SPI_CHAN 1
|
||||
#else
|
||||
#define SOFTWARE_SPI
|
||||
#ifndef SD_SCK_PIN
|
||||
#define SD_SCK_PIN 52
|
||||
#endif
|
||||
#ifndef SD_MISO_PIN
|
||||
#define SD_MISO_PIN 50
|
||||
#endif
|
||||
#ifndef SD_MOSI_PIN
|
||||
#define SD_MOSI_PIN 51
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
#include <U8glib-HAL.h>
|
||||
|
||||
#if ENABLED(FYSETC_MINI_12864)
|
||||
#if U8G_SPI_USE_MODE_3
|
||||
#define SPISEND_SW_DUE u8g_spiSend_sw_DUE_mode_3
|
||||
#else
|
||||
#define SPISEND_SW_DUE u8g_spiSend_sw_DUE_mode_0
|
||||
@@ -96,15 +96,15 @@ uint8_t u8g_com_HAL_DUE_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void
|
||||
break;
|
||||
|
||||
case U8G_COM_MSG_CHIP_SELECT:
|
||||
#if ENABLED(FYSETC_MINI_12864) // LCD SPI is running mode 3 while SD card is running mode 0
|
||||
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
|
||||
// the next chip select goes active
|
||||
u8g_SetPILevel_DUE(u8g, U8G_PI_SCK, 1); //set SCK to mode 3 idle state before CS goes active
|
||||
#if U8G_SPI_USE_MODE_3 // LCD SPI is running mode 3 while SD card is running mode 0
|
||||
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
|
||||
// the next chip select goes active
|
||||
u8g_SetPILevel_DUE(u8g, U8G_PI_SCK, 1); // Set SCK to mode 3 idle state before CS goes active
|
||||
u8g_SetPILevel_DUE(u8g, U8G_PI_CS, LOW);
|
||||
}
|
||||
else {
|
||||
u8g_SetPILevel_DUE(u8g, U8G_PI_CS, HIGH);
|
||||
u8g_SetPILevel_DUE(u8g, U8G_PI_SCK, 0); //set SCK to mode 0 idle state after CS goes inactive
|
||||
u8g_SetPILevel_DUE(u8g, U8G_PI_SCK, 0); // Set SCK to mode 0 idle state after CS goes inactive
|
||||
}
|
||||
#else
|
||||
u8g_SetPILevel_DUE(u8g, U8G_PI_CS, !arg_val);
|
||||
|
||||
@@ -11,7 +11,7 @@ if pioutil.is_pio_build():
|
||||
|
||||
if current_OS == 'Windows':
|
||||
|
||||
Import("env")
|
||||
env = pioutil.env
|
||||
|
||||
# Use bossac.exe on Windows
|
||||
env.Replace(
|
||||
|
||||
@@ -18,30 +18,30 @@ extern "C" {
|
||||
void sd_mmc_spi_mem_init() {
|
||||
}
|
||||
|
||||
Ctrl_status sd_mmc_spi_test_unit_ready() {
|
||||
#ifdef DISABLE_DUE_SD_MMC
|
||||
return CTRL_NO_PRESENT;
|
||||
#endif
|
||||
if (!IS_SD_INSERTED() || IS_SD_PRINTING() || IS_SD_FILE_OPEN() || !card.isMounted())
|
||||
return CTRL_NO_PRESENT;
|
||||
return CTRL_GOOD;
|
||||
}
|
||||
|
||||
// NOTE: This function is defined as returning the address of the last block
|
||||
// in the card, which is cardSize() - 1
|
||||
Ctrl_status sd_mmc_spi_read_capacity(uint32_t *nb_sector) {
|
||||
if (!IS_SD_INSERTED() || IS_SD_PRINTING() || IS_SD_FILE_OPEN() || !card.isMounted())
|
||||
return CTRL_NO_PRESENT;
|
||||
*nb_sector = card.diskIODriver()->cardSize() - 1;
|
||||
return CTRL_GOOD;
|
||||
inline bool media_ready() {
|
||||
return IS_SD_MOUNTED() && IS_SD_INSERTED() && !IS_SD_FILE_OPEN() && !IS_SD_PRINTING();
|
||||
}
|
||||
|
||||
bool sd_mmc_spi_unload(bool) { return true; }
|
||||
|
||||
bool sd_mmc_spi_wr_protect() { return false; }
|
||||
|
||||
bool sd_mmc_spi_removal() {
|
||||
return (!IS_SD_INSERTED() || IS_SD_PRINTING() || IS_SD_FILE_OPEN() || !card.isMounted());
|
||||
bool sd_mmc_spi_removal() { return !media_ready(); }
|
||||
|
||||
Ctrl_status sd_mmc_spi_test_unit_ready() {
|
||||
#ifdef DISABLE_DUE_SD_MMC
|
||||
return CTRL_NO_PRESENT;
|
||||
#endif
|
||||
if (sd_mmc_spi_removal()) return CTRL_NO_PRESENT;
|
||||
return CTRL_GOOD;
|
||||
}
|
||||
|
||||
// NOTE: This function is defined as returning the address of the last block
|
||||
// in the card, which is cardSize() - 1
|
||||
Ctrl_status sd_mmc_spi_read_capacity(uint32_t *nb_sector) {
|
||||
if (sd_mmc_spi_removal()) return CTRL_NO_PRESENT;
|
||||
*nb_sector = card.diskIODriver()->cardSize() - 1;
|
||||
return CTRL_GOOD;
|
||||
}
|
||||
|
||||
#if ACCESS_USB == true
|
||||
@@ -61,8 +61,7 @@ Ctrl_status sd_mmc_spi_usb_read_10(uint32_t addr, uint16_t nb_sector) {
|
||||
#ifdef DISABLE_DUE_SD_MMC
|
||||
return CTRL_NO_PRESENT;
|
||||
#endif
|
||||
if (!IS_SD_INSERTED() || IS_SD_PRINTING() || IS_SD_FILE_OPEN() || !card.isMounted())
|
||||
return CTRL_NO_PRESENT;
|
||||
if (sd_mmc_spi_removal()) return CTRL_NO_PRESENT;
|
||||
|
||||
#ifdef DEBUG_MMC
|
||||
{
|
||||
@@ -101,8 +100,7 @@ Ctrl_status sd_mmc_spi_usb_write_10(uint32_t addr, uint16_t nb_sector) {
|
||||
#ifdef DISABLE_DUE_SD_MMC
|
||||
return CTRL_NO_PRESENT;
|
||||
#endif
|
||||
if (!IS_SD_INSERTED() || IS_SD_PRINTING() || IS_SD_FILE_OPEN() || !card.isMounted())
|
||||
return CTRL_NO_PRESENT;
|
||||
if (sd_mmc_spi_removal()) return CTRL_NO_PRESENT;
|
||||
|
||||
#ifdef DEBUG_MMC
|
||||
{
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
//!
|
||||
//! @brief This function initializes the hw/sw resources required to drive the SD_MMC_SPI.
|
||||
//!/
|
||||
extern void sd_mmc_spi_mem_init(void);
|
||||
void sd_mmc_spi_mem_init();
|
||||
|
||||
//!
|
||||
//! @brief This function tests the state of the SD_MMC memory and sends it to the Host.
|
||||
@@ -87,7 +87,7 @@ extern void sd_mmc_spi_mem_init(void);
|
||||
//! Media not present -> CTRL_NO_PRESENT
|
||||
//! Media has changed -> CTRL_BUSY
|
||||
//!/
|
||||
extern Ctrl_status sd_mmc_spi_test_unit_ready(void);
|
||||
Ctrl_status sd_mmc_spi_test_unit_ready();
|
||||
|
||||
//!
|
||||
//! @brief This function gives the address of the last valid sector.
|
||||
@@ -98,7 +98,7 @@ extern Ctrl_status sd_mmc_spi_test_unit_ready(void);
|
||||
//! Media ready -> CTRL_GOOD
|
||||
//! Media not present -> CTRL_NO_PRESENT
|
||||
//!/
|
||||
extern Ctrl_status sd_mmc_spi_read_capacity(uint32_t *nb_sector);
|
||||
Ctrl_status sd_mmc_spi_read_capacity(uint32_t *nb_sector);
|
||||
|
||||
/*! \brief Unload/Load the SD/MMC card selected
|
||||
*
|
||||
@@ -109,7 +109,7 @@ extern Ctrl_status sd_mmc_spi_read_capacity(uint32_t *nb_sector);
|
||||
*
|
||||
* \return \c true if unload/load done success.
|
||||
*/
|
||||
extern bool sd_mmc_spi_unload(bool unload);
|
||||
bool sd_mmc_spi_unload(bool unload);
|
||||
|
||||
//!
|
||||
//! @brief This function returns the write protected status of the memory.
|
||||
@@ -120,14 +120,14 @@ extern bool sd_mmc_spi_unload(bool unload);
|
||||
//!
|
||||
//! @return false -> the memory is not write-protected (always)
|
||||
//!/
|
||||
extern bool sd_mmc_spi_wr_protect(void);
|
||||
bool sd_mmc_spi_wr_protect();
|
||||
|
||||
//!
|
||||
//! @brief This function tells if the memory has been removed or not.
|
||||
//!
|
||||
//! @return false -> The memory isn't removed
|
||||
//!
|
||||
extern bool sd_mmc_spi_removal(void);
|
||||
bool sd_mmc_spi_removal();
|
||||
|
||||
//---- ACCESS DATA FUNCTIONS ----
|
||||
|
||||
@@ -147,7 +147,7 @@ extern bool sd_mmc_spi_removal(void);
|
||||
//! It is ready -> CTRL_GOOD
|
||||
//! A error occur -> CTRL_FAIL
|
||||
//!
|
||||
extern Ctrl_status sd_mmc_spi_usb_read_10(uint32_t addr, uint16_t nb_sector);
|
||||
Ctrl_status sd_mmc_spi_usb_read_10(uint32_t addr, uint16_t nb_sector);
|
||||
|
||||
//! This function initializes the SD/MMC memory for a write operation
|
||||
//!
|
||||
@@ -161,7 +161,7 @@ extern Ctrl_status sd_mmc_spi_usb_read_10(uint32_t addr, uint16_t nb_sector);
|
||||
//! It is ready -> CTRL_GOOD
|
||||
//! An error occurs -> CTRL_FAIL
|
||||
//!
|
||||
extern Ctrl_status sd_mmc_spi_usb_write_10(uint32_t addr, uint16_t nb_sector);
|
||||
Ctrl_status sd_mmc_spi_usb_write_10(uint32_t addr, uint16_t nb_sector);
|
||||
|
||||
#endif // #if ACCESS_USB == true
|
||||
|
||||
|
||||
@@ -209,16 +209,17 @@ int MarlinHAL::freeMemory() { return ESP.getFreeHeap(); }
|
||||
// ADC
|
||||
// ------------------------
|
||||
|
||||
#define ADC1_CHANNEL(pin) ADC1_GPIO ## pin ## _CHANNEL
|
||||
|
||||
// https://docs.espressif.com/projects/esp-idf/en/release-v4.4/esp32/api-reference/peripherals/adc.html
|
||||
adc1_channel_t get_channel(int pin) {
|
||||
switch (pin) {
|
||||
case 39: return ADC1_CHANNEL(39);
|
||||
case 36: return ADC1_CHANNEL(36);
|
||||
case 35: return ADC1_CHANNEL(35);
|
||||
case 34: return ADC1_CHANNEL(34);
|
||||
case 33: return ADC1_CHANNEL(33);
|
||||
case 32: return ADC1_CHANNEL(32);
|
||||
case 39: return ADC1_CHANNEL_3;
|
||||
case 36: return ADC1_CHANNEL_0;
|
||||
case 35: return ADC1_CHANNEL_7;
|
||||
case 34: return ADC1_CHANNEL_6;
|
||||
case 33: return ADC1_CHANNEL_5;
|
||||
case 32: return ADC1_CHANNEL_4;
|
||||
case 37: return ADC1_CHANNEL_1;
|
||||
case 38: return ADC1_CHANNEL_2;
|
||||
}
|
||||
return ADC1_CHANNEL_MAX;
|
||||
}
|
||||
|
||||
@@ -59,6 +59,7 @@ void setup_endstop_interrupts() {
|
||||
TERN_(USE_Z4_MAX, _ATTACH(Z4_MAX_PIN));
|
||||
TERN_(USE_Z4_MIN, _ATTACH(Z4_MIN_PIN));
|
||||
TERN_(USE_Z_MIN_PROBE, _ATTACH(Z_MIN_PROBE_PIN));
|
||||
TERN_(USE_CALIBRATION, _ATTACH(CALIBRATION_PIN));
|
||||
TERN_(USE_I_MAX, _ATTACH(I_MAX_PIN));
|
||||
TERN_(USE_I_MIN, _ATTACH(I_MIN_PIN));
|
||||
TERN_(USE_J_MAX, _ATTACH(J_MAX_PIN));
|
||||
|
||||
@@ -37,6 +37,10 @@
|
||||
// Set pin as output
|
||||
#define _SET_OUTPUT(IO) pinMode(IO, OUTPUT)
|
||||
|
||||
// TODO: Store set modes in an array and use those to get the mode
|
||||
#define _IS_OUTPUT(IO) true
|
||||
#define _IS_INPUT(IO) true
|
||||
|
||||
// Set pin as input with pullup mode
|
||||
#define _PULLUP(IO, v) pinMode(IO, v ? INPUT_PULLUP : INPUT)
|
||||
|
||||
@@ -70,6 +74,9 @@
|
||||
// Set pin as output and init
|
||||
#define OUT_WRITE(IO,V) do{ _SET_OUTPUT(IO); WRITE(IO,V); }while(0)
|
||||
|
||||
#define IS_OUTPUT(IO) _IS_OUTPUT(IO)
|
||||
#define IS_INPUT(IO) _IS_INPUT(IO)
|
||||
|
||||
// digitalRead/Write wrappers
|
||||
#define extDigitalRead(IO) digitalRead(IO)
|
||||
#define extDigitalWrite(IO,V) digitalWrite(IO,V)
|
||||
|
||||
@@ -152,7 +152,7 @@ void stepperTask(void *parameter) {
|
||||
xQueueReceive(dma.queue, &dma.current, portMAX_DELAY);
|
||||
dma.rw_pos = 0;
|
||||
|
||||
const bool using_ftMotion = TERN0(FT_MOTION, ftMotion.cfg.mode);
|
||||
const bool using_ftMotion = TERN0(FT_MOTION, ftMotion.cfg.active);
|
||||
|
||||
while (dma.rw_pos < DMA_SAMPLE_COUNT) {
|
||||
|
||||
|
||||
@@ -22,11 +22,15 @@
|
||||
|
||||
#ifdef ARDUINO_ARCH_ESP32
|
||||
|
||||
#include <WiFi.h>
|
||||
|
||||
#undef ENABLED
|
||||
#undef DISABLED
|
||||
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if ALL(WIFISUPPORT, OTASUPPORT)
|
||||
|
||||
#include <WiFi.h>
|
||||
#include <ESPmDNS.h>
|
||||
#include <WiFiUdp.h>
|
||||
#include <ArduinoOTA.h>
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2024 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#error "PINS_DEBUGGING is not yet supported for ESP32!"
|
||||
|
||||
/**
|
||||
* Pins Debugging for ESP32
|
||||
*
|
||||
* - NUMBER_PINS_TOTAL
|
||||
* - MULTI_NAME_PAD
|
||||
* - getPinByIndex(index)
|
||||
* - printPinNameByIndex(index)
|
||||
* - getPinIsDigitalByIndex(index)
|
||||
* - digitalPinToAnalogIndex(pin)
|
||||
* - getValidPinMode(pin)
|
||||
* - isValidPin(pin)
|
||||
* - isAnalogPin(pin)
|
||||
* - digitalRead_mod(pin)
|
||||
* - pwm_status(pin)
|
||||
* - printPinPWM(pin)
|
||||
* - printPinPort(pin)
|
||||
* - printPinNumber(pin)
|
||||
* - printPinAnalog(pin)
|
||||
*/
|
||||
|
||||
#define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS
|
||||
#define MULTI_NAME_PAD 16 // space needed to be pretty if not first name assigned to a pin
|
||||
|
||||
#define digitalRead_mod(P) extDigitalRead(P)
|
||||
#define printPinNameByIndex(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
|
||||
#define printPinNumber(P) do{ sprintf_P(buffer, PSTR("%02d"), P); SERIAL_ECHO(buffer); }while(0)
|
||||
#define printPinAnalog(P) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(P)); SERIAL_ECHO(buffer); }while(0)
|
||||
#define getPinByIndex(x) pin_array[x].pin
|
||||
#define getPinIsDigitalByIndex(x) pin_array[x].is_digital
|
||||
#define isValidPin(P) (P >= 0 && P < pin_t(NUMBER_PINS_TOTAL))
|
||||
#define digitalPinToAnalogIndex(P) int(P - analogInputToDigitalPin(0))
|
||||
#define isAnalogPin(P) WITHIN(P, pin_t(analogInputToDigitalPin(0)), pin_t(analogInputToDigitalPin(NUM_ANALOG_INPUTS - 1)))
|
||||
bool pwm_status(const pin_t) { return false; }
|
||||
|
||||
void printPinPort(const pin_t) {}
|
||||
|
||||
static bool getValidPinMode(const pin_t pin) {
|
||||
return isValidPin(pin) && !IS_INPUT(pin);
|
||||
}
|
||||
|
||||
void printPinPWM(const int32_t pin) {
|
||||
if (pwm_status(pin)) {
|
||||
//uint32_t chan = g_APinDescription[pin].ulPWMChannel TODO when fast pwm is operative;
|
||||
//SERIAL_ECHOPGM("PWM = ", duty);
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,16 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#define SD_SS_PIN SDSS
|
||||
#define SD_SCK_PIN 18
|
||||
#define SD_MISO_PIN 19
|
||||
#define SD_MOSI_PIN 23
|
||||
#define PIN_SPI_SCK 18
|
||||
#define PIN_SPI_MISO 19
|
||||
#define PIN_SPI_MOSI 23
|
||||
|
||||
#ifndef SD_SCK_PIN
|
||||
#define SD_SCK_PIN PIN_SPI_SCK
|
||||
#endif
|
||||
#ifndef SD_MISO_PIN
|
||||
#define SD_MISO_PIN PIN_SPI_MISO
|
||||
#endif
|
||||
#ifndef SD_MOSI_PIN
|
||||
#define SD_MOSI_PIN PIN_SPI_MOSI
|
||||
#endif
|
||||
|
||||
@@ -90,7 +90,7 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
|
||||
config.counter_en = TIMER_PAUSE;
|
||||
config.alarm_en = TIMER_ALARM_EN;
|
||||
config.intr_type = TIMER_INTR_LEVEL;
|
||||
config.auto_reload = true;
|
||||
config.auto_reload = TIMER_AUTORELOAD_EN;
|
||||
|
||||
// Select and initialize the timer
|
||||
timer_init(timer.group, timer.idx, &config);
|
||||
|
||||
@@ -53,12 +53,11 @@ typedef uint64_t hal_timer_t;
|
||||
#if ENABLED(I2S_STEPPER_STREAM)
|
||||
#define STEPPER_TIMER_PRESCALE 1
|
||||
#define STEPPER_TIMER_RATE 250000 // 250khz, 4µs pulses of i2s word clock
|
||||
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) // stepper timer ticks per µs // wrong would be 0.25
|
||||
#else
|
||||
#define STEPPER_TIMER_PRESCALE 40
|
||||
#define STEPPER_TIMER_RATE ((HAL_TIMER_RATE) / (STEPPER_TIMER_PRESCALE)) // frequency of stepper timer, 2MHz
|
||||
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) // stepper timer ticks per µs
|
||||
#endif
|
||||
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) // stepper timer ticks per µs
|
||||
|
||||
#define STEP_TIMER_MIN_INTERVAL 8 // minimum time in µs between stepper interrupts
|
||||
|
||||
|
||||
@@ -21,11 +21,12 @@
|
||||
*/
|
||||
#ifdef ARDUINO_ARCH_ESP32
|
||||
|
||||
#include "../../core/serial.h"
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if ENABLED(WIFISUPPORT)
|
||||
|
||||
#include "../../core/serial.h"
|
||||
|
||||
#include <WiFi.h>
|
||||
#include <ESPmDNS.h>
|
||||
#include <ESPAsyncWebServer.h>
|
||||
|
||||
+31
-66
@@ -30,69 +30,18 @@
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
|
||||
#include "../../core/macros.h"
|
||||
#include "../shared/Marduino.h"
|
||||
#include "../shared/math_32bit.h"
|
||||
#include "../shared/HAL_SPI.h"
|
||||
|
||||
#include "fastio.h"
|
||||
#include "timers.h"
|
||||
#include "MarlinSerial.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
//
|
||||
// Serial Ports
|
||||
//
|
||||
#define _MSERIAL(X) MSerial##X
|
||||
#define MSERIAL(X) _MSERIAL(X)
|
||||
#define NUM_UARTS 4
|
||||
|
||||
#if SERIAL_PORT == -1
|
||||
#error "USB Serial is not supported on HC32F460"
|
||||
#elif WITHIN(SERIAL_PORT, 1, NUM_UARTS)
|
||||
#define MYSERIAL1 MSERIAL(SERIAL_PORT)
|
||||
#else
|
||||
#define MYSERIAL1 MSERIAL(1) // Dummy port
|
||||
static_assert(false, "SERIAL_PORT must be from 1 to " STRINGIFY(NUM_UARTS) ".")
|
||||
#endif
|
||||
|
||||
#ifdef SERIAL_PORT_2
|
||||
#if SERIAL_PORT_2 == -1
|
||||
#error "USB Serial is not supported on HC32F460"
|
||||
#elif WITHIN(SERIAL_PORT_2, 1, NUM_UARTS)
|
||||
#define MYSERIAL2 MSERIAL(SERIAL_PORT_2)
|
||||
#else
|
||||
#define MYSERIAL2 MSERIAL(1) // Dummy port
|
||||
static_assert(false, "SERIAL_PORT_2 must be from 1 to " STRINGIFY(NUM_UARTS) ".")
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef SERIAL_PORT_3
|
||||
#if SERIAL_PORT_3 == -1
|
||||
#error "USB Serial is not supported on HC32F460"
|
||||
#elif WITHIN(SERIAL_PORT_3, 1, NUM_UARTS)
|
||||
#define MYSERIAL3 MSERIAL(SERIAL_PORT_3)
|
||||
#else
|
||||
#define MYSERIAL3 MSERIAL(1) // Dummy port
|
||||
static_assert(false, "SERIAL_PORT_3 must be from 1 to " STRINGIFY(NUM_UARTS) ".")
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef LCD_SERIAL_PORT
|
||||
#if LCD_SERIAL_PORT == -1
|
||||
#error "USB Serial is not supported on HC32F460"
|
||||
#elif WITHIN(LCD_SERIAL_PORT, 1, NUM_UARTS)
|
||||
#define LCD_SERIAL MSERIAL(LCD_SERIAL_PORT)
|
||||
#else
|
||||
#define LCD_SERIAL MSERIAL(1) // Dummy port
|
||||
static_assert(false, "LCD_SERIAL_PORT must be from 1 to " STRINGIFY(NUM_UARTS) ".")
|
||||
#endif
|
||||
|
||||
#if HAS_DGUS_LCD
|
||||
#define LCD_SERIAL_TX_BUFFER_FREE() LCD_SERIAL.availableForWrite()
|
||||
#endif
|
||||
#endif
|
||||
#include "MarlinSerial.h"
|
||||
|
||||
//
|
||||
// Emergency Parser
|
||||
@@ -114,22 +63,19 @@
|
||||
// Misc. Functions
|
||||
//
|
||||
#ifndef analogInputToDigitalPin
|
||||
#define analogInputToDigitalPin(p) (p)
|
||||
#define analogInputToDigitalPin(p) pin_t(p)
|
||||
#endif
|
||||
|
||||
#define CRITICAL_SECTION_START \
|
||||
uint32_t primask = __get_PRIMASK(); \
|
||||
(void)__iCliRetVal()
|
||||
#define CRITICAL_SECTION_START() \
|
||||
const bool irqon = !__get_PRIMASK(); \
|
||||
__disable_irq(); \
|
||||
__DSB();
|
||||
#define CRITICAL_SECTION_END() \
|
||||
__DSB(); \
|
||||
if (irqon) __enable_irq();
|
||||
|
||||
#define CRITICAL_SECTION_END \
|
||||
if (!primask) \
|
||||
(void)__iSeiRetVal()
|
||||
|
||||
// Disable interrupts
|
||||
#define cli() noInterrupts()
|
||||
|
||||
// Enable interrupts
|
||||
#define sei() interrupts()
|
||||
#define cli() __disable_irq()
|
||||
#define sei() __enable_irq()
|
||||
|
||||
// bss_end alias
|
||||
#define __bss_end __bss_end__
|
||||
@@ -142,12 +88,31 @@
|
||||
// ADC
|
||||
//
|
||||
#define HAL_ADC_VREF_MV 3300
|
||||
#define HAL_ADC_RESOLUTION 10
|
||||
#define HAL_ADC_RESOLUTION 12
|
||||
|
||||
#define GET_PIN_MAP_PIN(index) index
|
||||
#define GET_PIN_MAP_INDEX(pin) pin
|
||||
#define PARSED_PIN_INDEX(code, dval) parser.intval(code, dval)
|
||||
|
||||
//
|
||||
// Debug port disable
|
||||
// JTMS / SWDIO = PA13
|
||||
// JTCK / SWCLK = PA14
|
||||
// JTDI = PA15
|
||||
// JTDO = PB3
|
||||
// NJTRST = PB4
|
||||
//
|
||||
#define DBG_SWCLK _BV(0)
|
||||
#define DBG_SWDIO _BV(1)
|
||||
#define DBG_TDO _BV(2)
|
||||
#define DBG_TDI _BV(3)
|
||||
#define DBG_TRST _BV(4)
|
||||
#define DBG_ALL (DBG_SWCLK | DBG_SWDIO | DBG_TDO | DBG_TDI | DBG_TRST)
|
||||
|
||||
#define JTAGSWD_RESET() PORT_DebugPortSetting(DBG_ALL, Enable);
|
||||
#define JTAG_DISABLE() PORT_DebugPortSetting(DBG_TDO | DBG_TDI | DBG_TRST, Disable);
|
||||
#define JTAGSWD_DISABLE() PORT_DebugPortSetting(DBG_ALL, Disable);
|
||||
|
||||
//
|
||||
// MarlinHAL implementation
|
||||
//
|
||||
|
||||
@@ -123,6 +123,11 @@ void MarlinHAL::init() {
|
||||
|
||||
// Register min serial
|
||||
TERN_(POSTMORTEM_DEBUGGING, install_min_serial());
|
||||
|
||||
// warn if low memory after init
|
||||
if (freeMemory() < 1024) {
|
||||
SERIAL_WARN_MSG("HAL: low memory after init!\n");
|
||||
}
|
||||
}
|
||||
|
||||
void MarlinHAL::init_board() {}
|
||||
@@ -147,7 +152,31 @@ void MarlinHAL::delay_ms(const int ms) {
|
||||
delay(ms);
|
||||
}
|
||||
|
||||
void MarlinHAL::idletask() {}
|
||||
void MarlinHAL::idletask() {
|
||||
#if ENABLED(MARLIN_DEV_MODE)
|
||||
// check & print serial RX errors
|
||||
MSerialT *serials[] = { &MSerial1, &MSerial2 };
|
||||
for (int serial = 0; serial < 2; serial++) {
|
||||
usart_receive_error_t err = serials[serial]->getReceiveError();
|
||||
if (err != usart_receive_error_t::None) {
|
||||
// "Warning: MSerial[n] RX [Framing|Parity|Overrun] Error"
|
||||
SERIAL_WARN_START();
|
||||
SERIAL_ECHOPGM(" MSerial");
|
||||
SERIAL_ECHO(serial + 1);
|
||||
SERIAL_ECHOPGM(" RX ");
|
||||
switch(err) {
|
||||
case usart_receive_error_t::FramingError: SERIAL_ECHOPGM("Framing"); break;
|
||||
case usart_receive_error_t::ParityError: SERIAL_ECHOPGM("Parity"); break;
|
||||
case usart_receive_error_t::OverrunError: SERIAL_ECHOPGM("Overrun"); break;
|
||||
case usart_receive_error_t::RxDataDropped: SERIAL_ECHOPGM("DataDropped"); break;
|
||||
default: break;
|
||||
}
|
||||
SERIAL_ECHOPGM(" Error");
|
||||
SERIAL_EOL();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
uint8_t MarlinHAL::get_reset_source() {
|
||||
// Query reset cause from RMU
|
||||
@@ -203,7 +232,9 @@ int MarlinHAL::freeMemory() {
|
||||
return &top - _sbrk(0);
|
||||
}
|
||||
|
||||
void MarlinHAL::adc_init() {}
|
||||
void MarlinHAL::adc_init() {
|
||||
analogReadResolution(HAL_ADC_RESOLUTION);
|
||||
}
|
||||
|
||||
void MarlinHAL::adc_enable(const pin_t pin) {
|
||||
#if TEMP_SENSOR_SOC
|
||||
|
||||
@@ -46,14 +46,34 @@ constexpr bool serial_handles_emergency(int port) {
|
||||
//
|
||||
// Define serial ports
|
||||
//
|
||||
#define DEFINE_HWSERIAL_MARLIN(name, n) \
|
||||
|
||||
// serial port where RX and TX use IRQs
|
||||
#define DEFINE_IRQ_SERIAL_MARLIN(name, n) \
|
||||
MSerialT name(serial_handles_emergency(n), \
|
||||
&USART##n##_config, \
|
||||
BOARD_USART##n##_TX_PIN, \
|
||||
BOARD_USART##n##_RX_PIN);
|
||||
|
||||
DEFINE_HWSERIAL_MARLIN(MSerial1, 1);
|
||||
DEFINE_HWSERIAL_MARLIN(MSerial2, 2);
|
||||
// serial port where RX uses DMA and TX uses IRQs
|
||||
// all serial ports use DMA1
|
||||
// since there are 4 USARTs and 4 DMA channels, we can use the USART number as the DMA channel
|
||||
#define DEFINE_DMA_SERIAL_MARLIN(name, n) \
|
||||
MSerialT name(serial_handles_emergency(n), \
|
||||
&USART##n##_config, \
|
||||
BOARD_USART##n##_TX_PIN, \
|
||||
BOARD_USART##n##_RX_PIN, \
|
||||
M4_DMA1, \
|
||||
((en_dma_channel_t)(n - 1))); // map USART1 to DMA channel 0, USART2 to DMA channel 1, etc.
|
||||
|
||||
#define DEFINE_SERIAL_MARLIN(name, n) TERN(SERIAL_DMA, DEFINE_DMA_SERIAL_MARLIN(name, n), DEFINE_IRQ_SERIAL_MARLIN(name, n))
|
||||
|
||||
DEFINE_SERIAL_MARLIN(MSerial1, 1);
|
||||
DEFINE_SERIAL_MARLIN(MSerial2, 2);
|
||||
|
||||
// TODO: remove this warning when SERIAL_DMA has been tested some more
|
||||
#if ENABLED(SERIAL_DMA)
|
||||
#warning "SERIAL_DMA may be unstable on HC32F460."
|
||||
#endif
|
||||
|
||||
//
|
||||
// Serial port assertions
|
||||
|
||||
@@ -24,18 +24,51 @@
|
||||
#include "../../core/serial_hook.h"
|
||||
#include <drivers/usart/Usart.h>
|
||||
|
||||
#define SERIAL_INDEX_MIN 1
|
||||
#define SERIAL_INDEX_MAX 4
|
||||
#include "../shared/serial_ports.h"
|
||||
|
||||
#if defined(LCD_SERIAL_PORT) && ANY(HAS_DGUS_LCD, EXTENSIBLE_UI)
|
||||
#define LCD_SERIAL_TX_BUFFER_FREE() LCD_SERIAL.availableForWrite()
|
||||
#endif
|
||||
|
||||
// Optionally set uart IRQ priority to reduce overflow errors
|
||||
// #define UART_IRQ_PRIO 1
|
||||
//#define UART_RX_IRQ_PRIO 1
|
||||
//#define UART_TX_IRQ_PRIO 1
|
||||
//#define UART_RX_DMA_IRQ_PRIO 1
|
||||
|
||||
struct MarlinSerial : public Usart {
|
||||
MarlinSerial(struct usart_config_t *usart_device, gpio_pin_t tx_pin, gpio_pin_t rx_pin) : Usart(usart_device, tx_pin, rx_pin) {}
|
||||
MarlinSerial(
|
||||
struct usart_config_t *usart_device,
|
||||
gpio_pin_t tx_pin,
|
||||
gpio_pin_t rx_pin
|
||||
#if ENABLED(SERIAL_DMA)
|
||||
, M4_DMA_TypeDef *dma_unit = nullptr,
|
||||
en_dma_channel_t rx_dma_channel = DmaCh0
|
||||
#endif
|
||||
) : Usart(usart_device, tx_pin, rx_pin) {
|
||||
#if ENABLED(SERIAL_DMA)
|
||||
if (dma_unit != nullptr) {
|
||||
enableRxDma(dma_unit, rx_dma_channel);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef UART_IRQ_PRIO
|
||||
#if defined(UART_RX_IRQ_PRIO) || defined(UART_TX_IRQ_PRIO) || defined(UART_RX_DMA_IRQ_PRIO)
|
||||
void setPriority() {
|
||||
NVIC_SetPriority(c_dev()->interrupts.rx_data_available.interrupt_number, UART_IRQ_PRIO);
|
||||
NVIC_SetPriority(c_dev()->interrupts.rx_error.interrupt_number, UART_IRQ_PRIO);
|
||||
NVIC_SetPriority(c_dev()->interrupts.tx_buffer_empty.interrupt_number, UART_IRQ_PRIO);
|
||||
NVIC_SetPriority(c_dev()->interrupts.tx_complete.interrupt_number, UART_IRQ_PRIO);
|
||||
#if defined(UART_RX_IRQ_PRIO)
|
||||
NVIC_SetPriority(c_dev()->interrupts.rx_data_available.interrupt_number, UART_RX_IRQ_PRIO);
|
||||
NVIC_SetPriority(c_dev()->interrupts.rx_error.interrupt_number, UART_RX_IRQ_PRIO);
|
||||
#endif
|
||||
|
||||
#if defined(UART_TX_IRQ_PRIO)
|
||||
NVIC_SetPriority(c_dev()->interrupts.tx_buffer_empty.interrupt_number, UART_TX_IRQ_PRIO);
|
||||
NVIC_SetPriority(c_dev()->interrupts.tx_complete.interrupt_number, UART_TX_IRQ_PRIO);
|
||||
#endif
|
||||
|
||||
#if defined(UART_RX_DMA_IRQ_PRIO) && ENABLED(SERIAL_DMA)
|
||||
NVIC_SetPriority(c_dev()->dma.rx.rx_data_available_dma_btc.interrupt_number, UART_RX_DMA_IRQ_PRIO);
|
||||
#endif
|
||||
}
|
||||
|
||||
void begin(uint32_t baud) {
|
||||
@@ -47,7 +80,12 @@ struct MarlinSerial : public Usart {
|
||||
Usart::begin(baud, config);
|
||||
setPriority();
|
||||
}
|
||||
#endif
|
||||
|
||||
void begin(uint32_t baud, const stc_usart_uart_init_t *config, const bool rxNoiseFilter = true) {
|
||||
Usart::begin(baud, config, rxNoiseFilter);
|
||||
setPriority();
|
||||
}
|
||||
#endif // UART_RX_IRQ_PRIO || UART_TX_IRQ_PRIO || UART_RX_DMA_IRQ_PRIO
|
||||
};
|
||||
|
||||
typedef Serial1Class<MarlinSerial> MSerialT;
|
||||
|
||||
@@ -11,7 +11,7 @@ The HC32F460 HAL is designed to be generic enough for any HC32F460-based board.
|
||||
- Examine the board's main processor. (Refer the naming key in `hc32.ini`.)
|
||||
- Extend the `HC32F460C_common` base env for 256K, or `HC32F460E_common` for 512K.
|
||||
3. Determine your board's application start address (see [below](#finding-the-application-start-address))
|
||||
4. Set `board_build.ld_args.flash_start` to the app start address once you've found it. If your board doesn't use a bootloader, you may be able to use the "ICSP" header or DFU. This document will be updated once we have more information about flashing without a bootloader.
|
||||
4. Set `board_upload.offset_address` to the app start address once you've found it. If your board doesn't use a bootloader, you may be able to use the "ICSP" header or DFU. This document will be updated once we have more information about flashing without a bootloader.
|
||||
|
||||
### Finding the application start address
|
||||
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
/**
|
||||
* app_config.h is included by the hc32f460 arduino build script for every source file.
|
||||
* it is used to configure the arduino core (and ddl) automatically according
|
||||
* to the settings in Configuration.h and Configuration_adv.h.
|
||||
*/
|
||||
#pragma once
|
||||
#ifndef _HC32_APP_CONFIG_H_
|
||||
#define _HC32_APP_CONFIG_H_
|
||||
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
#include "sysclock.h"
|
||||
|
||||
//
|
||||
// dev mode
|
||||
//
|
||||
#if ENABLED(MARLIN_DEV_MODE)
|
||||
#define __DEBUG 1
|
||||
#define __CORE_DEBUG 1
|
||||
#endif
|
||||
|
||||
//
|
||||
// Fault Handlers and Panic
|
||||
//
|
||||
|
||||
#if ENABLED(POSTMORTEM_DEBUGGING)
|
||||
// disable arduino core fault handler, as we define our own
|
||||
#define CORE_DISABLE_FAULT_HANDLER 1
|
||||
#endif
|
||||
|
||||
// force-enable panic handler so that we can use our custom one (in MinSerial)
|
||||
#define PANIC_ENABLE 1
|
||||
|
||||
// use short filenames in ddl debug and core panic output
|
||||
#define __DEBUG_SHORT_FILENAMES 1
|
||||
#define __PANIC_SHORT_FILENAMES 1
|
||||
|
||||
// omit panic messages in core panic output
|
||||
#define __OMIT_PANIC_MESSAGE 1
|
||||
|
||||
//
|
||||
// Usart
|
||||
//
|
||||
|
||||
// disable serial globals (Serial1, Serial2, ...), as we define our own
|
||||
#define DISABLE_SERIAL_GLOBALS 1
|
||||
|
||||
// increase the size of the Usart buffers (both RX and TX)
|
||||
// NOTE:
|
||||
// the heap usage will increase by (SERIAL_BUFFER_SIZE - 64) * "number of serial ports used"
|
||||
// if running out of heap, the system may become unstable
|
||||
//#define SERIAL_BUFFER_SIZE 256
|
||||
|
||||
// enable support for Usart Clock Divider / Oversampling auto config
|
||||
#define USART_AUTO_CLKDIV_OS_CONFIG 1
|
||||
|
||||
// enable USART_RX_DMA_SUPPORT core option when SERIAL_DMA is enabled
|
||||
#if ENABLED(SERIAL_DMA)
|
||||
#define USART_RX_DMA_SUPPORT 1
|
||||
#endif
|
||||
|
||||
//
|
||||
// Misc.
|
||||
//
|
||||
|
||||
// redirect printf to host serial
|
||||
#define REDIRECT_PRINTF_TO_SERIAL 1
|
||||
|
||||
// F_CPU is F_HCLK, as that's the main CPU core's clock.
|
||||
// see 'sysclock.h' for more information.
|
||||
#define F_CPU F_HCLK
|
||||
|
||||
#endif // _HC32_APP_CONFIG_H_
|
||||
Binary file not shown.
@@ -40,9 +40,15 @@ void endstopIRQHandler() {
|
||||
CHECK(X_MAX);
|
||||
CHECK(X_MIN);
|
||||
|
||||
CHECK(X2_MAX);
|
||||
CHECK(X2_MIN);
|
||||
|
||||
CHECK(Y_MAX);
|
||||
CHECK(Y_MIN);
|
||||
|
||||
CHECK(Y2_MAX);
|
||||
CHECK(Y2_MIN);
|
||||
|
||||
CHECK(Z_MAX);
|
||||
CHECK(Z_MIN);
|
||||
|
||||
@@ -52,6 +58,9 @@ void endstopIRQHandler() {
|
||||
CHECK(Z3_MAX);
|
||||
CHECK(Z3_MIN);
|
||||
|
||||
CHECK(Z4_MAX);
|
||||
CHECK(Z4_MIN);
|
||||
|
||||
CHECK(Z_MIN_PROBE);
|
||||
|
||||
// Update endstops
|
||||
@@ -69,9 +78,15 @@ void setup_endstop_interrupts() {
|
||||
SETUP(X_MAX);
|
||||
SETUP(X_MIN);
|
||||
|
||||
SETUP(X2_MAX);
|
||||
SETUP(X2_MIN);
|
||||
|
||||
SETUP(Y_MAX);
|
||||
SETUP(Y_MIN);
|
||||
|
||||
SETUP(Y2_MAX);
|
||||
SETUP(Y2_MIN);
|
||||
|
||||
SETUP(Z_MAX);
|
||||
SETUP(Z_MIN);
|
||||
|
||||
@@ -81,14 +96,19 @@ void setup_endstop_interrupts() {
|
||||
SETUP(Z3_MAX);
|
||||
SETUP(Z3_MIN);
|
||||
|
||||
SETUP(Z4_MAX);
|
||||
SETUP(Z4_MIN);
|
||||
|
||||
SETUP(Z_MIN_PROBE);
|
||||
|
||||
SETUP(CALIBRATION);
|
||||
|
||||
#undef SETUP
|
||||
}
|
||||
|
||||
// Ensure 1 - 10 IRQs are registered
|
||||
// Disable some endstops if you encounter this error
|
||||
#define ENDSTOPS_INTERRUPTS_COUNT COUNT_ENABLED(USE_X_MAX, USE_X_MIN, USE_Y_MAX, USE_Y_MIN, USE_Z_MAX, USE_Z_MIN, USE_Z2_MAX, USE_Z2_MIN, USE_Z3_MAX, USE_Z3_MIN, USE_Z_MIN_PROBE)
|
||||
#define ENDSTOPS_INTERRUPTS_COUNT COUNT_ENABLED(USE_X_MAX, USE_X_MIN, USE_X2_MAX, USE_X2_MIN, USE_Y_MAX, USE_Y_MIN, USE_Y2_MAX, USE_Y2_MIN, USE_Z_MAX, USE_Z_MIN, USE_Z2_MAX, USE_Z2_MIN, USE_Z3_MAX, USE_Z3_MIN, USE_Z4_MAX, USE_Z4_MIN, USE_Z_MIN_PROBE, USE_CALIBRATION)
|
||||
#if ENDSTOPS_INTERRUPTS_COUNT > 10
|
||||
#error "Too many endstop interrupts! HC32F460 only supports 10 endstop interrupts."
|
||||
#elif ENDSTOPS_INTERRUPTS_COUNT == 0
|
||||
|
||||
@@ -20,6 +20,20 @@
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include <core_util.h>
|
||||
|
||||
#if !defined(ARDUINO_CORE_VERSION_INT) || !defined(GET_VERSION_INT)
|
||||
// version macros were introduced in arduino core version 1.1.0
|
||||
// below that version, we polyfill them
|
||||
#define GET_VERSION_INT(major, minor, patch) ((major * 100000) + (minor * 1000) + patch)
|
||||
#define ARDUINO_CORE_VERSION_INT GET_VERSION_INT(1, 0, 0)
|
||||
#endif
|
||||
|
||||
#if ARDUINO_CORE_VERSION_INT < GET_VERSION_INT(1, 1, 0)
|
||||
// because we use app_config.h introduced in arduino core version 1.1.0, the
|
||||
// HAL is not compatible with older versions
|
||||
#error "The HC32 HAL is not compatible with Arduino Core versions < 1.1.0. Consider updating the Arduino Core."
|
||||
#endif
|
||||
|
||||
#ifndef BOARD_XTAL_FREQUENCY
|
||||
#error "BOARD_XTAL_FREQUENCY is required for HC32F460."
|
||||
@@ -74,3 +88,20 @@
|
||||
#error "HC32 HAL uses a custom panic handler. Do not define PANIC_USARTx_TX_PIN."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ENABLED(SERIAL_DMA)
|
||||
#if !defined(USART_RX_DMA_SUPPORT)
|
||||
#error "SERIAL_DMA requires USART_RX_DMA_SUPPORT to be enabled in the arduino core."
|
||||
#endif
|
||||
|
||||
// Before arduino core version 1.2.0, USART_RX_DMA_SUPPORT did not implement
|
||||
// core_hook_usart_rx_irq, which is required for the emergency parser.
|
||||
// With 1.2.0, this was fixed (see https://github.com/shadow578/framework-arduino-hc32f46x/pull/25).
|
||||
#if ENABLED(EMERGENCY_PARSER) && ARDUINO_CORE_VERSION_INT < GET_VERSION_INT(1, 2, 0)
|
||||
#error "EMERGENCY_PARSER is not supported with SERIAL_DMA. Please disable either SERIAL_DMA or EMERGENCY_PARSER."
|
||||
#endif
|
||||
|
||||
#if ARDUINO_CORE_VERSION_INT < GET_VERSION_INT(1, 1, 0)
|
||||
#error "SERIAL_DMA is not supported with arduino core version < 1.1.0."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -18,41 +18,47 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Pins Debugging for HC32
|
||||
*
|
||||
* - NUMBER_PINS_TOTAL
|
||||
* - MULTI_NAME_PAD
|
||||
* - getPinByIndex(index)
|
||||
* - printPinNameByIndex(index)
|
||||
* - getPinIsDigitalByIndex(index)
|
||||
* - digitalPinToAnalogIndex(pin)
|
||||
* - getValidPinMode(pin)
|
||||
* - isValidPin(pin)
|
||||
* - isAnalogPin(pin)
|
||||
* - digitalRead_mod(pin)
|
||||
* - pwm_status(pin)
|
||||
* - printPinPWM(pin)
|
||||
* - printPinPort(pin)
|
||||
* - printPinNumber(pin)
|
||||
* - printPinAnalog(pin)
|
||||
*/
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
#include "fastio.h"
|
||||
#include <drivers/timera/timera_pwm.h>
|
||||
|
||||
//
|
||||
// Translation of routines & variables used by pinsDebug.h
|
||||
//
|
||||
#ifndef BOARD_NR_GPIO_PINS
|
||||
#error "Expected BOARD_NR_GPIO_PINS not found."
|
||||
#endif
|
||||
|
||||
#define NUM_DIGITAL_PINS BOARD_NR_GPIO_PINS
|
||||
#define NUMBER_PINS_TOTAL BOARD_NR_GPIO_PINS
|
||||
#define VALID_PIN(pin) IS_GPIO_PIN(pin)
|
||||
#define isValidPin(P) IS_GPIO_PIN(P)
|
||||
|
||||
// Note: pin_array is defined in `Marlin/src/pins/pinsDebug.h`, and since this file is included
|
||||
// after it, it is available in this file as well.
|
||||
#define GET_ARRAY_PIN(p) pin_t(pin_array[p].pin)
|
||||
#define digitalRead_mod(p) extDigitalRead(p)
|
||||
#define PRINT_PIN(p) \
|
||||
do { \
|
||||
sprintf_P(buffer, PSTR("%3hd "), int16_t(p)); \
|
||||
SERIAL_ECHO(buffer); \
|
||||
} while (0)
|
||||
#define PRINT_PIN_ANALOG(p) \
|
||||
do { \
|
||||
sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); \
|
||||
SERIAL_ECHO(buffer); \
|
||||
} while (0)
|
||||
#define PRINT_PORT(p) print_port(p)
|
||||
#define PRINT_ARRAY_NAME(x) \
|
||||
do { \
|
||||
sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); \
|
||||
SERIAL_ECHO(buffer); \
|
||||
} while (0)
|
||||
#define getPinByIndex(x) pin_t(pin_array[x].pin)
|
||||
#define digitalRead_mod(P) extDigitalRead(P)
|
||||
|
||||
#define printPinNumber(P) do{ sprintf_P(buffer, PSTR("%3hd "), int16_t(P)); SERIAL_ECHO(buffer); }while(0)
|
||||
#define printPinAnalog(P) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(P)); SERIAL_ECHO(buffer); }while(0)
|
||||
|
||||
#define printPinNameByIndex(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
|
||||
|
||||
#define MULTI_NAME_PAD 21 // Space needed to be pretty if not first name assigned to a pin
|
||||
|
||||
@@ -71,14 +77,14 @@
|
||||
#define M43_NEVER_TOUCH(Q) (IS_HOST_USART_PIN(Q) || IS_OSC_PIN(Q))
|
||||
#endif
|
||||
|
||||
static pin_t DIGITAL_PIN_TO_ANALOG_PIN(pin_t pin) {
|
||||
if (!VALID_PIN(pin)) return -1;
|
||||
int8_t digitalPinToAnalogIndex(const pin_t pin) {
|
||||
if (!isValidPin(pin)) return -1;
|
||||
const int8_t adc_channel = int8_t(PIN_MAP[pin].adc_info.channel);
|
||||
return pin_t(adc_channel);
|
||||
}
|
||||
|
||||
static bool IS_ANALOG(pin_t pin) {
|
||||
if (!VALID_PIN(pin)) return false;
|
||||
bool isAnalogPin(pin_t pin) {
|
||||
if (!isValidPin(pin)) return false;
|
||||
|
||||
if (PIN_MAP[pin].adc_info.channel != ADC_PIN_INVALID)
|
||||
return _GET_MODE(pin) == INPUT_ANALOG && !M43_NEVER_TOUCH(pin);
|
||||
@@ -86,13 +92,13 @@ static bool IS_ANALOG(pin_t pin) {
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool GET_PINMODE(const pin_t pin) {
|
||||
return VALID_PIN(pin) && !IS_INPUT(pin);
|
||||
bool getValidPinMode(const pin_t pin) {
|
||||
return isValidPin(pin) && !IS_INPUT(pin);
|
||||
}
|
||||
|
||||
static bool GET_ARRAY_IS_DIGITAL(const int16_t array_pin) {
|
||||
const pin_t pin = GET_ARRAY_PIN(array_pin);
|
||||
return (!IS_ANALOG(pin));
|
||||
bool getPinIsDigitalByIndex(const int16_t index) {
|
||||
const pin_t pin = getPinByIndex(index);
|
||||
return (!isAnalogPin(pin));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -117,7 +123,7 @@ bool pwm_status(const pin_t pin) {
|
||||
return timera_is_unit_initialized(unit) && timera_is_channel_active(unit, channel) && getPinMode(pin) == OUTPUT_PWM;
|
||||
}
|
||||
|
||||
void pwm_details(const pin_t pin) {
|
||||
void printPinPWM(const pin_t pin) {
|
||||
// Get timer assignment for pin
|
||||
timera_config_t *unit;
|
||||
en_timera_channel_t channel;
|
||||
@@ -161,7 +167,7 @@ void pwm_details(const pin_t pin) {
|
||||
}
|
||||
}
|
||||
|
||||
void print_port(pin_t pin) {
|
||||
void printPinPort(pin_t pin) {
|
||||
const char port = 'A' + char(pin >> 4); // Pin div 16
|
||||
const int16_t gbit = PIN_MAP[pin].bit_pos;
|
||||
char buffer[8];
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
fn \
|
||||
}
|
||||
|
||||
stc_sd_handle_t *handle;
|
||||
stc_sd_handle_t *handle = nullptr;
|
||||
|
||||
bool SDIO_Init() {
|
||||
// Configure SDIO pins
|
||||
@@ -66,36 +66,45 @@ bool SDIO_Init() {
|
||||
GPIO_SetFunc(BOARD_SDIO_CMD, Func_Sdio);
|
||||
GPIO_SetFunc(BOARD_SDIO_DET, Func_Sdio);
|
||||
|
||||
// If a handle is already initialized, free it before creating a new one
|
||||
// otherwise, we will leak memory, which will eventually crash the system
|
||||
if (handle != nullptr) {
|
||||
delete handle->pstcDmaInitCfg;
|
||||
delete handle->pstcCardInitCfg;
|
||||
delete handle;
|
||||
handle = nullptr;
|
||||
}
|
||||
|
||||
// Create DMA configuration
|
||||
stc_sdcard_dma_init_t *dmaConf = new stc_sdcard_dma_init_t;
|
||||
dmaConf->DMAx = SDIO_DMA_PERIPHERAL;
|
||||
dmaConf->enDmaCh = SDIO_DMA_CHANNEL;
|
||||
|
||||
// Create card configuration
|
||||
// This should be a fairly safe configuration for most cards
|
||||
stc_sdcard_init_t *cardConf = new stc_sdcard_init_t;
|
||||
cardConf->enBusWidth = SdiocBusWidth4Bit;
|
||||
cardConf->enClkFreq = SdiocClk400K;
|
||||
cardConf->enSpeedMode = SdiocNormalSpeedMode;
|
||||
cardConf->pstcInitCfg = nullptr;
|
||||
|
||||
// Create handle in DMA mode
|
||||
handle = new stc_sd_handle_t;
|
||||
handle->SDIOCx = SDIO_PERIPHERAL;
|
||||
handle->enDevMode = SdCardDmaMode;
|
||||
handle->pstcDmaInitCfg = dmaConf;
|
||||
|
||||
// Create card configuration
|
||||
// This should be a fairly safe configuration for most cards
|
||||
stc_sdcard_init_t cardConf = {
|
||||
.enBusWidth = SdiocBusWidth4Bit,
|
||||
.enClkFreq = SdiocClk400K,
|
||||
.enSpeedMode = SdiocNormalSpeedMode,
|
||||
//.pstcInitCfg = NULL,
|
||||
};
|
||||
//handle->pstcCardInitCfg = cardConf; // assigned in SDCARD_Init
|
||||
|
||||
// Initialize sd card
|
||||
en_result_t rc = SDCARD_Init(handle, &cardConf);
|
||||
en_result_t rc = SDCARD_Init(handle, cardConf);
|
||||
if (rc != Ok) printf("SDIO_Init() error (rc=%u)\n", rc);
|
||||
|
||||
return rc == Ok;
|
||||
}
|
||||
|
||||
bool SDIO_ReadBlock(uint32_t block, uint8_t *dst) {
|
||||
CORE_ASSERT(handle != NULL, "SDIO not initialized");
|
||||
CORE_ASSERT(dst != NULL, "SDIO_ReadBlock dst is NULL");
|
||||
CORE_ASSERT(handle != nullptr, "SDIO not initialized", return false);
|
||||
CORE_ASSERT(dst != nullptr, "SDIO_ReadBlock dst is NULL", return false);
|
||||
|
||||
WITH_RETRY(SDIO_READ_RETRIES, {
|
||||
en_result_t rc = SDCARD_ReadBlocks(handle, block, 1, dst, SDIO_READ_TIMEOUT);
|
||||
@@ -107,8 +116,8 @@ bool SDIO_ReadBlock(uint32_t block, uint8_t *dst) {
|
||||
}
|
||||
|
||||
bool SDIO_WriteBlock(uint32_t block, const uint8_t *src) {
|
||||
CORE_ASSERT(handle != NULL, "SDIO not initialized");
|
||||
CORE_ASSERT(src != NULL, "SDIO_WriteBlock src is NULL");
|
||||
CORE_ASSERT(handle != nullptr, "SDIO not initialized", return false);
|
||||
CORE_ASSERT(src != nullptr, "SDIO_WriteBlock src is NULL", return false);
|
||||
|
||||
WITH_RETRY(SDIO_WRITE_RETRIES, {
|
||||
en_result_t rc = SDCARD_WriteBlocks(handle, block, 1, (uint8_t *)src, SDIO_WRITE_TIMEOUT);
|
||||
@@ -120,12 +129,12 @@ bool SDIO_WriteBlock(uint32_t block, const uint8_t *src) {
|
||||
}
|
||||
|
||||
bool SDIO_IsReady() {
|
||||
CORE_ASSERT(handle != NULL, "SDIO not initialized");
|
||||
CORE_ASSERT(handle != nullptr, "SDIO not initialized", return false);
|
||||
return bool(handle->stcCardStatus.READY_FOR_DATA);
|
||||
}
|
||||
|
||||
uint32_t SDIO_GetCardSize() {
|
||||
CORE_ASSERT(handle != NULL, "SDIO not initialized");
|
||||
CORE_ASSERT(handle != nullptr, "SDIO not initialized", return 0);
|
||||
|
||||
// Multiply number of blocks with block size to get size in bytes
|
||||
const uint64_t cardSizeBytes = uint64_t(handle->stcSdCardInfo.u32LogBlockNbr) * uint64_t(handle->stcSdCardInfo.u32LogBlockSize);
|
||||
|
||||
@@ -26,64 +26,144 @@
|
||||
|
||||
#ifdef ARDUINO_ARCH_HC32
|
||||
|
||||
// Get BOARD_XTAL_FREQUENCY from configuration / pins
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
#include "sysclock.h"
|
||||
|
||||
#include <core_hooks.h>
|
||||
#include <drivers/sysclock/sysclock_util.h>
|
||||
|
||||
/***
|
||||
* @brief Automatically calculate M, N, P values for the MPLL to reach a target frequency.
|
||||
* @param input_frequency The input frequency.
|
||||
* @param target_frequency The target frequency.
|
||||
* @return The MPLL configuration structure. Q and R are not set.
|
||||
*
|
||||
* @note
|
||||
* Simplified MPLL block diagram, with intermediary clocks (1) = VCO_in, (2) = VCO_out:
|
||||
*
|
||||
* INPUT -> [/ M] -(1)-> [* N] -(2)-|-> [/ P] -> MPLL-P
|
||||
*/
|
||||
constexpr stc_clk_mpll_cfg_t get_mpll_config(double input_frequency, double target_frequency) {
|
||||
// PLL input clock divider: M in [1, 24]
|
||||
for (uint32_t M = 1; M <= 24; M++) {
|
||||
double f_vco_in = input_frequency / M;
|
||||
|
||||
// 1 <= VCO_in <= 25 MHz
|
||||
if (f_vco_in < 1e6 || f_vco_in > 25e6) continue;
|
||||
|
||||
// VCO multiplier: N in [20, 480]
|
||||
for (uint32_t N = 20; N <= 480; N++) {
|
||||
double f_vco_out = f_vco_in * N;
|
||||
|
||||
// 240 <= VCO_out <= 480 MHz
|
||||
if (f_vco_out < 240e6 || f_vco_out > 480e6) continue;
|
||||
|
||||
// Output "P" divider: P in [2, 16]
|
||||
for (uint32_t P = 2; P <= 16; P++) {
|
||||
double f_calculated_out = f_vco_out / P;
|
||||
if (f_calculated_out == target_frequency) {
|
||||
// Found a match, return it
|
||||
return {
|
||||
.PllpDiv = P,
|
||||
.PllqDiv = P, // Don't care for Q and R
|
||||
.PllrDiv = P, // "
|
||||
.plln = N,
|
||||
.pllmDiv = M
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If no valid M, N, P found, return invalid config
|
||||
return { 0, 0, 0, 0, 0 };
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the division factor required to get the target frequency from the input frequency.
|
||||
* @tparam input_freq The input frequency.
|
||||
* @tparam target_freq The target frequency.
|
||||
* @return The division factor.
|
||||
*/
|
||||
template <uint32_t input_freq, uint32_t target_freq>
|
||||
constexpr en_clk_sysclk_div_factor_t get_division_factor() {
|
||||
// Calculate the divider to get the target frequency
|
||||
constexpr float fdivider = static_cast<float>(input_freq) / static_cast<float>(target_freq);
|
||||
constexpr int divider = static_cast<int>(fdivider);
|
||||
|
||||
// divider must be an integer
|
||||
static_assert(fdivider == divider, "Target frequency not achievable, divider must be an integer");
|
||||
|
||||
// divider must be between 1 and 64 (enum range), and must be a power of 2
|
||||
static_assert(divider >= 1 && divider <= 64, "Invalid divider, out of range");
|
||||
static_assert((divider & (divider - 1)) == 0, "Invalid divider, not a power of 2");
|
||||
|
||||
// return the divider
|
||||
switch (divider) {
|
||||
case 1: return ClkSysclkDiv1;
|
||||
case 2: return ClkSysclkDiv2;
|
||||
case 4: return ClkSysclkDiv4;
|
||||
case 8: return ClkSysclkDiv8;
|
||||
case 16: return ClkSysclkDiv16;
|
||||
case 32: return ClkSysclkDiv32;
|
||||
case 64: return ClkSysclkDiv64;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Validate the runtime clocks match the expected values.
|
||||
*/
|
||||
void validate_system_clocks() {
|
||||
#define CLOCK_ASSERT(expected, actual) \
|
||||
if (expected != actual) { \
|
||||
SERIAL_ECHOPGM( \
|
||||
"Clock Mismatch for " #expected ": " \
|
||||
"expected ", expected, \
|
||||
", got ", actual \
|
||||
); \
|
||||
CORE_ASSERT_FAIL("Clock Mismatch: " #expected); \
|
||||
}
|
||||
|
||||
update_system_clock_frequencies();
|
||||
|
||||
CLOCK_ASSERT(F_SYSTEM_CLOCK, SYSTEM_CLOCK_FREQUENCIES.system);
|
||||
CLOCK_ASSERT(F_HCLK, SYSTEM_CLOCK_FREQUENCIES.hclk);
|
||||
CLOCK_ASSERT(F_EXCLK, SYSTEM_CLOCK_FREQUENCIES.exclk);
|
||||
CLOCK_ASSERT(F_PCLK0, SYSTEM_CLOCK_FREQUENCIES.pclk0);
|
||||
CLOCK_ASSERT(F_PCLK1, SYSTEM_CLOCK_FREQUENCIES.pclk1);
|
||||
CLOCK_ASSERT(F_PCLK2, SYSTEM_CLOCK_FREQUENCIES.pclk2);
|
||||
CLOCK_ASSERT(F_PCLK3, SYSTEM_CLOCK_FREQUENCIES.pclk3);
|
||||
CLOCK_ASSERT(F_PCLK4, SYSTEM_CLOCK_FREQUENCIES.pclk4);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Configure HC32 system clocks.
|
||||
*
|
||||
* This function is called by the Arduino core early in the startup process, before setup() is called.
|
||||
* It is used to configure the system clocks to the desired state.
|
||||
*
|
||||
* See https://github.com/MarlinFirmware/Marlin/pull/27099 for more information.
|
||||
*/
|
||||
void core_hook_sysclock_init() {
|
||||
// Set wait cycles, as we are about to switch to 200 MHz HCLK
|
||||
sysclock_configure_flash_wait_cycles();
|
||||
sysclock_configure_sram_wait_cycles();
|
||||
|
||||
// Configure MPLLp to 200 MHz output, with different settings depending on XTAL availability
|
||||
#if BOARD_XTAL_FREQUENCY == 8000000 // 8 MHz XTAL
|
||||
// - M = 1 => 8 MHz / 1 = 8 MHz
|
||||
// - N = 50 => 8 MHz * 50 = 400 MHz
|
||||
// - P = 2 => 400 MHz / 2 = 200 MHz (sysclk)
|
||||
// - Q,R = 4 => 400 MHz / 4 = 100 MHz (dont care)
|
||||
stc_clk_mpll_cfg_t pllConf = {
|
||||
.PllpDiv = 2u, // P
|
||||
.PllqDiv = 4u, // Q
|
||||
.PllrDiv = 4u, // R
|
||||
.plln = 50u, // N
|
||||
.pllmDiv = 1u, // M
|
||||
};
|
||||
sysclock_configure_xtal();
|
||||
sysclock_configure_mpll(ClkPllSrcXTAL, &pllConf);
|
||||
// Select MPLL input frequency based on clock availability
|
||||
#if BOARD_XTAL_FREQUENCY == 8000000 || BOARD_XTAL_FREQUENCY == 16000000 // 8 MHz or 16 MHz XTAL
|
||||
constexpr uint32_t mpll_input_clock = BOARD_XTAL_FREQUENCY;
|
||||
|
||||
#elif BOARD_XTAL_FREQUENCY == 16000000 // 16 MHz XTAL
|
||||
// - M = 1 => 16 MHz / 1 = 16 MHz
|
||||
// - N = 50 => 16 MHz * 25 = 400 MHz
|
||||
// - P = 2 => 400 MHz / 2 = 200 MHz (sysclk)
|
||||
// - Q,R = 4 => 400 MHz / 4 = 100 MHz (dont care)
|
||||
stc_clk_mpll_cfg_t pllConf = {
|
||||
.PllpDiv = 2u, // P
|
||||
.PllqDiv = 4u, // Q
|
||||
.PllrDiv = 4u, // R
|
||||
.plln = 50u, // N
|
||||
.pllmDiv = 1u, // M
|
||||
};
|
||||
sysclock_configure_xtal();
|
||||
sysclock_configure_mpll(ClkPllSrcXTAL, &pllConf);
|
||||
|
||||
#warning "HC32F460 with 16 MHz XTAL has not been tested."
|
||||
#if BOARD_XTAL_FREQUENCY == 16000000
|
||||
#warning "HC32F460 with 16 MHz XTAL has not been tested."
|
||||
#endif
|
||||
|
||||
#else // HRC (16 MHz)
|
||||
// - M = 1 => 16 MHz / 1 = 16 MHz
|
||||
// - N = 25 => 16 MHz * 25 = 400 MHz
|
||||
// - P = 2 => 400 MHz / 2 = 200 MHz (sysclk)
|
||||
// - Q,R = 4 => 400 MHz / 4 = 100 MHz (dont care)
|
||||
stc_clk_mpll_cfg_t pllConf = {
|
||||
.PllpDiv = 2u, // P
|
||||
.PllqDiv = 4u, // Q
|
||||
.PllrDiv = 4u, // R
|
||||
.plln = 25u, // N
|
||||
.pllmDiv = 1u, // M
|
||||
};
|
||||
|
||||
constexpr uint32_t mpll_input_clock = 16000000;
|
||||
|
||||
sysclock_configure_hrc();
|
||||
sysclock_configure_mpll(ClkPllSrcHRC, &pllConf);
|
||||
|
||||
// HRC could have been configured by ICG to 20 MHz
|
||||
// TODO: handle gracefully if HRC is not 16 MHz
|
||||
@@ -91,34 +171,72 @@ void core_hook_sysclock_init() {
|
||||
panic("HRC is not 16 MHz");
|
||||
}
|
||||
|
||||
#ifdef BOARD_XTAL_FREQUENCY
|
||||
#if defined(BOARD_XTAL_FREQUENCY)
|
||||
#warning "No valid XTAL frequency defined, falling back to HRC."
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
// Setup clock divisors for sysclk = 200 MHz:
|
||||
// Note: PCLK1 is used for step+temp timers, and need to be kept at 50 MHz (until there is a better solution)
|
||||
stc_clk_sysclk_cfg_t sysClkConf = {
|
||||
.enHclkDiv = ClkSysclkDiv1, // HCLK = 200 MHz (CPU)
|
||||
.enExclkDiv = ClkSysclkDiv2, // EXCLK = 100 MHz (SDIO)
|
||||
.enPclk0Div = ClkSysclkDiv1, // PCLK0 = 200 MHz (Timer6 (not used))
|
||||
.enPclk1Div = ClkSysclkDiv4, // PCLK1 = 50 MHz (USART, SPI, I2S, Timer0 (step+temp), TimerA (Servo))
|
||||
.enPclk2Div = ClkSysclkDiv4, // PCLK2 = 50 MHz (ADC)
|
||||
.enPclk3Div = ClkSysclkDiv4, // PCLK3 = 50 MHz (I2C, WDT)
|
||||
.enPclk4Div = ClkSysclkDiv2, // PCLK4 = 100 MHz (ADC ctl)
|
||||
// Automagically calculate MPLL configuration
|
||||
constexpr stc_clk_mpll_cfg_t pllConf = get_mpll_config(mpll_input_clock, F_SYSTEM_CLOCK);
|
||||
static_assert(pllConf.pllmDiv != 0 && pllConf.plln != 0 && pllConf.PllpDiv != 0, "MPLL auto-configuration failed");
|
||||
sysclock_configure_mpll(ClkPllSrcXTAL, &pllConf);
|
||||
|
||||
// Setup clock divisors
|
||||
constexpr stc_clk_sysclk_cfg_t sysClkConf = {
|
||||
.enHclkDiv = get_division_factor<F_SYSTEM_CLOCK, F_HCLK>(),
|
||||
.enExclkDiv = get_division_factor<F_SYSTEM_CLOCK, F_EXCLK>(),
|
||||
.enPclk0Div = get_division_factor<F_SYSTEM_CLOCK, F_PCLK0>(),
|
||||
.enPclk1Div = get_division_factor<F_SYSTEM_CLOCK, F_PCLK1>(),
|
||||
.enPclk2Div = get_division_factor<F_SYSTEM_CLOCK, F_PCLK2>(),
|
||||
.enPclk3Div = get_division_factor<F_SYSTEM_CLOCK, F_PCLK3>(),
|
||||
.enPclk4Div = get_division_factor<F_SYSTEM_CLOCK, F_PCLK4>(),
|
||||
};
|
||||
sysclock_set_clock_dividers(&sysClkConf);
|
||||
|
||||
// Set power mode
|
||||
#define POWER_MODE_SYSTEM_CLOCK 200000000 // 200 MHz
|
||||
power_mode_update_pre(POWER_MODE_SYSTEM_CLOCK);
|
||||
// Set power mode, before switch
|
||||
power_mode_update_pre(F_SYSTEM_CLOCK);
|
||||
|
||||
// Switch to MPLL as sysclk source
|
||||
// Switch to MPLL-P as system clock source
|
||||
CLK_SetSysClkSource(CLKSysSrcMPLL);
|
||||
|
||||
// Set power mode
|
||||
power_mode_update_post(POWER_MODE_SYSTEM_CLOCK);
|
||||
#undef POWER_MODE_SYSTEM_CLOCK
|
||||
// Set power mode, after switch
|
||||
power_mode_update_post(F_SYSTEM_CLOCK);
|
||||
|
||||
// Verify clocks match expected values (at runtime)
|
||||
#if ENABLED(MARLIN_DEV_MODE) || ENABLED(ALWAYS_VALIDATE_CLOCKS)
|
||||
validate_system_clocks();
|
||||
#endif
|
||||
|
||||
// Verify clock configuration (at compile time)
|
||||
#if ARDUINO_CORE_VERSION_INT >= GET_VERSION_INT(1, 2, 0)
|
||||
assert_mpll_config_valid<
|
||||
mpll_input_clock,
|
||||
pllConf.pllmDiv,
|
||||
pllConf.plln,
|
||||
pllConf.PllpDiv,
|
||||
pllConf.PllqDiv,
|
||||
pllConf.PllrDiv
|
||||
>();
|
||||
|
||||
assert_system_clocks_valid<
|
||||
F_SYSTEM_CLOCK,
|
||||
sysClkConf.enHclkDiv,
|
||||
sysClkConf.enPclk0Div,
|
||||
sysClkConf.enPclk1Div,
|
||||
sysClkConf.enPclk2Div,
|
||||
sysClkConf.enPclk3Div,
|
||||
sysClkConf.enPclk4Div,
|
||||
sysClkConf.enExclkDiv
|
||||
>();
|
||||
|
||||
static_assert(get_mpll_output_clock(
|
||||
mpll_input_clock,
|
||||
pllConf.pllmDiv,
|
||||
pllConf.plln,
|
||||
pllConf.PllpDiv
|
||||
) == F_SYSTEM_CLOCK, "actual MPLL output clock does not match F_SYSTEM_CLOCK");
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // ARDUINO_ARCH_HC32
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2024 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* HC32F460 system clock configuration.
|
||||
*
|
||||
* With the HC32 HAL, the various peripheral clocks (including the CPU clock) are derived
|
||||
* from the main PLL (MPLL-P) output (referred to at F_SYSTEM_CLOCK).
|
||||
*
|
||||
* F_SYSTEM_CLOCK is the target frequency of the main PLL, and the PLL is automatically configured
|
||||
* to achieve this frequency.
|
||||
*
|
||||
* The peripheral clocks are the result of integer division of F_SYSTEM_CLOCK.
|
||||
* Their target frequencies are defined here, and the required division factors are calculated automatically.
|
||||
* Note that the division factor must be a power of 2 between 1 and 64.
|
||||
* If the target frequency is not achievable, a compile-time error will be generated.
|
||||
*
|
||||
* Additionally, there are interdependencies between the peripheral clocks, which are described in
|
||||
* Section 4.4 "Working Clock Specifications" of the HC32F460 Reference Manual.
|
||||
* With Arduino core >= 1.2.0, these interdependencies are checked at compile time.
|
||||
* On earlier versions, you are on your own.
|
||||
*
|
||||
* For all clock frequencies, they can be checked at runtime by enabling the 'ALWAYS_VALIDATE_CLOCKS' define.
|
||||
* In MARLIN_DEV_MODE, they will also be printed to the serial console by 'MarlinHAL::HAL_clock_frequencies_dump'.
|
||||
*
|
||||
* See https://github.com/MarlinFirmware/Marlin/pull/27099 for more information.
|
||||
*/
|
||||
|
||||
// Target peripheral clock frequencies, must be integer divisors of F_SYSTEM_CLOCK.
|
||||
// Changing the frequency here will automagically update everything else.
|
||||
#define F_HCLK 200000000UL // 200 MHz; CPU
|
||||
#define F_EXCLK (F_HCLK / 2) // 100 MHz; SDIO
|
||||
#define F_PCLK0 (F_HCLK / 2) // 100 MHz; Timer6 (unused)
|
||||
#define F_PCLK1 (F_HCLK / 4) // 50 MHz; USART, SPI, Timer0 (step + temp), TimerA (Servo)
|
||||
#define F_PCLK2 (F_HCLK / 8) // 25 MHz; ADC Sampling
|
||||
#define F_PCLK3 (F_HCLK / 8) // 25 MHz; I2C, WDT
|
||||
#define F_PCLK4 (F_HCLK / 2) // 100 MHz; ADC Control
|
||||
|
||||
// MPLL-P clock target frequency. This must be >= the highest peripheral clock frequency.
|
||||
// PLL config is automatically calculated based on this value.
|
||||
#define F_SYSTEM_CLOCK F_HCLK
|
||||
|
||||
// The Peripheral clocks are only checked at runtime if this is enabled OR MARLIN_DEV_MODE is enabled.
|
||||
// Compile time checks are always performed with Arduino core version >= 1.2.0.
|
||||
#define ALWAYS_VALIDATE_CLOCKS 1
|
||||
@@ -20,6 +20,7 @@
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
#include <Timer0.h>
|
||||
#include "sysclock.h"
|
||||
|
||||
//
|
||||
// Timer Types
|
||||
@@ -38,44 +39,46 @@ extern Timer0 step_timer;
|
||||
// Timer Configurations
|
||||
//
|
||||
|
||||
// TODO: some calculations (step irq min_step_rate) require the timer rate to be known at compile time
|
||||
// this is not possible with the HC32F460, as the timer rate depends on PCLK1
|
||||
// as a workaround, PCLK1 = 50MHz is assumed (check with clock dump in MarlinHAL::init())
|
||||
#define HAL_TIMER_RATE 50000000 // 50MHz
|
||||
// #define HAL_TIMER_RATE TIMER0_BASE_FREQUENCY
|
||||
|
||||
// TODO: CYCLES_PER_MICROSECOND seems to be used by Marlin to calculate the number of cycles per microsecond in the timer ISRs
|
||||
// by default, it uses F_CPU, but since that is not known at compile time for HC32, we overwrite it here
|
||||
#undef CYCLES_PER_MICROSECOND
|
||||
#define CYCLES_PER_MICROSECOND (HAL_TIMER_RATE / 1000000UL)
|
||||
/**
|
||||
* HAL_TIMER_RATE must be known at compile time since it's used to calculate
|
||||
* STEPPER_TIMER_RATE, which is used in 'constexpr' calculations.
|
||||
* On the HC32F460 the timer rate depends on PCLK1, which is derived from the
|
||||
* system clock configured at runtime.
|
||||
* Thus we use the 'F_PCLK1' constant defined in 'sysclock.h'.
|
||||
*
|
||||
* See https://github.com/MarlinFirmware/Marlin/pull/27099 for more information.
|
||||
*
|
||||
* NOTE: If the 'constexpr' requirement is ever lifted, TIMER0_BASE_FREQUENCY could
|
||||
* be used instead. Tho this would probably not make any noticable difference.
|
||||
*/
|
||||
#define HAL_TIMER_RATE F_PCLK1
|
||||
|
||||
// Temperature timer
|
||||
#define TEMP_TIMER_NUM (&temp_timer)
|
||||
#define TEMP_TIMER_PRIORITY DDL_IRQ_PRIORITY_02
|
||||
#define TEMP_TIMER_PRESCALE 16ul
|
||||
#define TEMP_TIMER_RATE 1000 // 1kHz
|
||||
#define TEMP_TIMER_FREQUENCY TEMP_TIMER_RATE // Alias for Marlin
|
||||
#define TEMP_TIMER_NUM (&temp_timer)
|
||||
#define TEMP_TIMER_PRIORITY DDL_IRQ_PRIORITY_02
|
||||
#define TEMP_TIMER_PRESCALE 16UL // 12.5MHz
|
||||
#define TEMP_TIMER_RATE 1000 // 1kHz
|
||||
#define TEMP_TIMER_FREQUENCY TEMP_TIMER_RATE // 1kHz also
|
||||
|
||||
// Stepper timer
|
||||
#define STEP_TIMER_NUM (&step_timer)
|
||||
#define STEP_TIMER_PRIORITY DDL_IRQ_PRIORITY_01
|
||||
#define STEPPER_TIMER_PRESCALE 16ul
|
||||
#define STEP_TIMER_NUM (&step_timer)
|
||||
#define STEP_TIMER_PRIORITY DDL_IRQ_PRIORITY_00 // Top priority, nothing else uses it
|
||||
#define STEPPER_TIMER_PRESCALE 16UL // 12.5MHz
|
||||
|
||||
// TODO: STEPPER_TIMER_RATE seems to work fine like this, but requires further testing...
|
||||
#define STEPPER_TIMER_RATE (HAL_TIMER_RATE / STEPPER_TIMER_PRESCALE) // 50MHz / 16 = 3.125MHz
|
||||
#define STEPPER_TIMER_TICKS_PER_US (STEPPER_TIMER_RATE / 1000000)
|
||||
#define STEPPER_TIMER_RATE (HAL_TIMER_RATE / STEPPER_TIMER_PRESCALE) // 50MHz / 16 = 3.125MHz
|
||||
#define STEPPER_TIMER_TICKS_PER_US (STEPPER_TIMER_RATE / 1000000UL) // Integer 3
|
||||
|
||||
// Pulse timer (== stepper timer)
|
||||
#define PULSE_TIMER_NUM STEP_TIMER_NUM
|
||||
#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
|
||||
#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
|
||||
#define PULSE_TIMER_NUM STEP_TIMER_NUM
|
||||
#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
|
||||
#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
|
||||
|
||||
//
|
||||
// Channel aliases
|
||||
//
|
||||
#define MF_TIMER_TEMP TEMP_TIMER_NUM
|
||||
#define MF_TIMER_STEP STEP_TIMER_NUM
|
||||
#define MF_TIMER_PULSE PULSE_TIMER_NUM
|
||||
#define MF_TIMER_TEMP TEMP_TIMER_NUM
|
||||
#define MF_TIMER_STEP STEP_TIMER_NUM
|
||||
#define MF_TIMER_PULSE PULSE_TIMER_NUM
|
||||
|
||||
//
|
||||
// HAL functions
|
||||
|
||||
@@ -82,7 +82,7 @@ static inline uint8_t swSpiTransfer_mode_3(uint8_t b, const uint8_t spi_speed, c
|
||||
}
|
||||
|
||||
static void u8g_sw_spi_shift_out(uint8_t val) {
|
||||
#if ANY(FYSETC_MINI_12864, MKS_MINI_12864)
|
||||
#if U8G_SPI_USE_MODE_3
|
||||
swSpiTransfer_mode_3(val, SPI_speed);
|
||||
#else
|
||||
swSpiTransfer_mode_0(val, SPI_speed);
|
||||
@@ -116,15 +116,15 @@ uint8_t u8g_com_HAL_HC32_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, voi
|
||||
break;
|
||||
|
||||
case U8G_COM_MSG_CHIP_SELECT:
|
||||
#if ANY(FYSETC_MINI_12864, MKS_MINI_12864) // This LCD SPI is running mode 3 while SD card is running mode 0
|
||||
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
|
||||
// the next chip select goes active
|
||||
WRITE(DOGLCD_SCK, HIGH); // Set SCK to mode 3 idle state before CS goes active
|
||||
#if U8G_SPI_USE_MODE_3 // This LCD SPI is running mode 3 while SD card is running mode 0
|
||||
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
|
||||
// the next chip select goes active
|
||||
WRITE(DOGLCD_SCK, HIGH); // Set SCK to mode 3 idle state before CS goes active
|
||||
WRITE(DOGLCD_CS, LOW);
|
||||
}
|
||||
else {
|
||||
WRITE(DOGLCD_CS, HIGH);
|
||||
WRITE(DOGLCD_SCK, LOW); // Set SCK to mode 0 idle state after CS goes inactive
|
||||
WRITE(DOGLCD_SCK, LOW); // Set SCK to mode 0 idle state after CS goes inactive
|
||||
}
|
||||
#else
|
||||
WRITE(DOGLCD_CS, !arg_val);
|
||||
|
||||
@@ -52,7 +52,7 @@ uint8_t MarlinHAL::active_ch = 0;
|
||||
|
||||
uint16_t MarlinHAL::adc_value() {
|
||||
const pin_t pin = analogInputToDigitalPin(active_ch);
|
||||
if (!VALID_PIN(pin)) return 0;
|
||||
if (!isValidPin(pin)) return 0;
|
||||
return uint16_t((Gpio::get(pin) >> 2) & 0x3FF); // return 10bit value as Marlin expects
|
||||
}
|
||||
|
||||
|
||||
@@ -49,28 +49,28 @@ extern "C" void delay(const int msec) {
|
||||
// IO functions
|
||||
// As defined by Arduino INPUT(0x0), OUTPUT(0x1), INPUT_PULLUP(0x2)
|
||||
void pinMode(const pin_t pin, const uint8_t mode) {
|
||||
if (!VALID_PIN(pin)) return;
|
||||
if (!isValidPin(pin)) return;
|
||||
Gpio::setMode(pin, mode);
|
||||
}
|
||||
|
||||
void digitalWrite(pin_t pin, uint8_t pin_status) {
|
||||
if (!VALID_PIN(pin)) return;
|
||||
if (!isValidPin(pin)) return;
|
||||
Gpio::set(pin, pin_status);
|
||||
}
|
||||
|
||||
bool digitalRead(pin_t pin) {
|
||||
if (!VALID_PIN(pin)) return false;
|
||||
if (!isValidPin(pin)) return false;
|
||||
return Gpio::get(pin);
|
||||
}
|
||||
|
||||
void analogWrite(pin_t pin, int pwm_value) { // 1 - 254: pwm_value, 0: LOW, 255: HIGH
|
||||
if (!VALID_PIN(pin)) return;
|
||||
if (!isValidPin(pin)) return;
|
||||
Gpio::set(pin, pwm_value);
|
||||
}
|
||||
|
||||
uint16_t analogRead(pin_t adc_pin) {
|
||||
if (!VALID_PIN(DIGITAL_PIN_TO_ANALOG_PIN(adc_pin))) return 0;
|
||||
return Gpio::get(DIGITAL_PIN_TO_ANALOG_PIN(adc_pin));
|
||||
if (!isValidPin(digitalPinToAnalogIndex(adc_pin))) return 0;
|
||||
return Gpio::get(digitalPinToAnalogIndex(adc_pin));
|
||||
}
|
||||
|
||||
char *dtostrf(double __val, signed char __width, unsigned char __prec, char *__s) {
|
||||
|
||||
@@ -37,7 +37,10 @@ Timer::Timer() {
|
||||
}
|
||||
|
||||
Timer::~Timer() {
|
||||
timer_delete(timerid);
|
||||
if (timerid != 0) {
|
||||
timer_delete(timerid);
|
||||
timerid = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void Timer::init(uint32_t sig_id, uint32_t sim_freq, callback_fn* fn) {
|
||||
|
||||
@@ -37,29 +37,29 @@ constexpr uint8_t NUM_ANALOG_INPUTS = 16;
|
||||
constexpr uint8_t analog_offset = NUM_DIGITAL_PINS - NUM_ANALOG_INPUTS;
|
||||
|
||||
// Get the digital pin for an analog index
|
||||
constexpr pin_t analogInputToDigitalPin(const int8_t p) {
|
||||
return (WITHIN(p, 0, NUM_ANALOG_INPUTS) ? analog_offset + p : P_NC);
|
||||
constexpr pin_t analogInputToDigitalPin(const int8_t a) {
|
||||
return (WITHIN(a, 0, NUM_ANALOG_INPUTS - 1) ? analog_offset + a : P_NC);
|
||||
}
|
||||
|
||||
// Get the analog index for a digital pin
|
||||
constexpr int8_t DIGITAL_PIN_TO_ANALOG_PIN(const pin_t p) {
|
||||
return (WITHIN(p, analog_offset, NUM_DIGITAL_PINS) ? p - analog_offset : P_NC);
|
||||
constexpr int8_t digitalPinToAnalogIndex(const pin_t pin) {
|
||||
return (WITHIN(pin, analog_offset, NUM_DIGITAL_PINS - 1) ? pin - analog_offset : P_NC);
|
||||
}
|
||||
|
||||
// Return the index of a pin number
|
||||
constexpr int16_t GET_PIN_MAP_INDEX(const pin_t pin) { return pin; }
|
||||
|
||||
// Test whether the pin is valid
|
||||
constexpr bool VALID_PIN(const pin_t p) { return WITHIN(p, 0, NUM_DIGITAL_PINS); }
|
||||
constexpr bool isValidPin(const pin_t pin) { return WITHIN(pin, 0, NUM_DIGITAL_PINS - 1); }
|
||||
|
||||
// Test whether the pin is PWM
|
||||
constexpr bool PWM_PIN(const pin_t p) { return false; }
|
||||
constexpr bool PWM_PIN(const pin_t) { return false; }
|
||||
|
||||
// Test whether the pin is interruptible
|
||||
constexpr bool INTERRUPT_PIN(const pin_t p) { return false; }
|
||||
constexpr bool INTERRUPT_PIN(const pin_t) { return false; }
|
||||
|
||||
// Get the pin number at the given index
|
||||
constexpr pin_t GET_PIN_MAP_PIN(const int16_t ind) { return ind; }
|
||||
constexpr pin_t GET_PIN_MAP_PIN(const int16_t index) { return pin_t(index); }
|
||||
|
||||
// Parse a G-code word into a pin index
|
||||
int16_t PARSED_PIN_INDEX(const char code, const int16_t dval);
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
*/
|
||||
|
||||
#ifdef __PLAT_LINUX__
|
||||
#ifndef UNIT_TEST
|
||||
|
||||
//#define GPIO_LOGGING // Full GPIO and Positional Logging
|
||||
|
||||
@@ -135,4 +136,5 @@ int main() {
|
||||
read_serial.join();
|
||||
}
|
||||
|
||||
#endif // UNIT_TEST
|
||||
#endif // __PLAT_LINUX__
|
||||
|
||||
@@ -19,30 +19,50 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Support routines for X86_64
|
||||
*/
|
||||
|
||||
/**
|
||||
* Translation of routines & variables used by pinsDebug.h
|
||||
* Pins Debugging for Linux Native
|
||||
*
|
||||
* - NUMBER_PINS_TOTAL
|
||||
* - MULTI_NAME_PAD
|
||||
* - getPinByIndex(index)
|
||||
* - printPinNameByIndex(index)
|
||||
* - getPinIsDigitalByIndex(index)
|
||||
* - digitalPinToAnalogIndex(pin)
|
||||
* - getValidPinMode(pin)
|
||||
* - isValidPin(pin)
|
||||
* - isAnalogPin(pin)
|
||||
* - digitalRead_mod(pin)
|
||||
* - pwm_status(pin)
|
||||
* - printPinPWM(pin)
|
||||
* - printPinPort(pin)
|
||||
* - printPinNumber(pin)
|
||||
* - printPinAnalog(pin)
|
||||
*/
|
||||
|
||||
#define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS
|
||||
#define IS_ANALOG(P) (DIGITAL_PIN_TO_ANALOG_PIN(P) >= 0 ? 1 : 0)
|
||||
#define digitalRead_mod(p) digitalRead(p)
|
||||
#define GET_ARRAY_PIN(p) pin_array[p].pin
|
||||
#define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
|
||||
#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0)
|
||||
#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0)
|
||||
#define MULTI_NAME_PAD 16 // space needed to be pretty if not first name assigned to a pin
|
||||
|
||||
#define getPinByIndex(x) pin_array[x].pin
|
||||
|
||||
#define printPinNameByIndex(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
|
||||
|
||||
// active ADC function/mode/code values for PINSEL registers
|
||||
constexpr int8_t ADC_pin_mode(pin_t pin) { return -1; }
|
||||
constexpr int8_t ADC_pin_mode(const pin_t) { return -1; }
|
||||
|
||||
int8_t get_pin_mode(const pin_t pin) { return VALID_PIN(pin) ? 0 : -1; }
|
||||
// The pin and index are the same on this platform
|
||||
bool getPinIsDigitalByIndex(const pin_t pin) {
|
||||
return (!isAnalogPin(pin) || get_pin_mode(pin) != ADC_pin_mode(pin));
|
||||
}
|
||||
|
||||
bool GET_PINMODE(const pin_t pin) {
|
||||
#define isAnalogPin(P) (digitalPinToAnalogIndex(P) >= 0)
|
||||
|
||||
#define digitalRead_mod(P) digitalRead(P)
|
||||
|
||||
int8_t get_pin_mode(const pin_t pin) { return isValidPin(pin) ? 0 : -1; }
|
||||
|
||||
bool getValidPinMode(const pin_t pin) {
|
||||
const int8_t pin_mode = get_pin_mode(pin);
|
||||
if (pin_mode == -1 || pin_mode == ADC_pin_mode(pin)) // Invalid pin or active analog pin
|
||||
return false;
|
||||
@@ -50,11 +70,11 @@ bool GET_PINMODE(const pin_t pin) {
|
||||
return (Gpio::getMode(pin) != 0); // Input/output state
|
||||
}
|
||||
|
||||
bool GET_ARRAY_IS_DIGITAL(const pin_t pin) {
|
||||
return (!IS_ANALOG(pin) || get_pin_mode(pin) != ADC_pin_mode(pin));
|
||||
}
|
||||
|
||||
void pwm_details(const pin_t pin) {}
|
||||
void printPinPWM(const pin_t) {}
|
||||
bool pwm_status(const pin_t) { return false; }
|
||||
|
||||
void print_port(const pin_t) {}
|
||||
void printPinPort(const pin_t) {}
|
||||
|
||||
#define printPinNumber(P) do{ sprintf_P(buffer, PSTR("%3d "), P); SERIAL_ECHO(buffer); }while(0)
|
||||
|
||||
#define printPinAnalog(P) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(P)); SERIAL_ECHO(buffer); }while(0)
|
||||
|
||||
@@ -28,12 +28,6 @@
|
||||
// spiBeginTransaction.
|
||||
#endif
|
||||
|
||||
// Onboard SD
|
||||
//#define SD_SCK_PIN P0_07
|
||||
//#define SD_MISO_PIN P0_08
|
||||
//#define SD_MOSI_PIN P0_09
|
||||
//#define SD_SS_PIN P0_06
|
||||
|
||||
// External SD
|
||||
#ifndef SD_SCK_PIN
|
||||
#define SD_SCK_PIN 50
|
||||
@@ -44,9 +38,3 @@
|
||||
#ifndef SD_MOSI_PIN
|
||||
#define SD_MOSI_PIN 52
|
||||
#endif
|
||||
#ifndef SD_SS_PIN
|
||||
#define SD_SS_PIN 53
|
||||
#endif
|
||||
#ifndef SDSS
|
||||
#define SDSS SD_SS_PIN
|
||||
#endif
|
||||
|
||||
@@ -35,8 +35,6 @@
|
||||
#include <CDCSerial.h>
|
||||
#include <usb/mscuser.h>
|
||||
|
||||
DefaultSerial1 USBSerial(false, UsbSerial);
|
||||
|
||||
uint32_t MarlinHAL::adc_result = 0;
|
||||
pin_t MarlinHAL::adc_pin = 0;
|
||||
|
||||
|
||||
@@ -38,72 +38,15 @@ extern "C" volatile uint32_t _millis;
|
||||
#include "../shared/math_32bit.h"
|
||||
#include "../shared/HAL_SPI.h"
|
||||
#include "fastio.h"
|
||||
#include "MarlinSerial.h"
|
||||
|
||||
#include <adc.h>
|
||||
#include <pinmapping.h>
|
||||
#include <CDCSerial.h>
|
||||
|
||||
// ------------------------
|
||||
// Serial ports
|
||||
// ------------------------
|
||||
//
|
||||
// Serial Ports
|
||||
//
|
||||
|
||||
typedef ForwardSerial1Class< decltype(UsbSerial) > DefaultSerial1;
|
||||
extern DefaultSerial1 USBSerial;
|
||||
|
||||
#define _MSERIAL(X) MSerial##X
|
||||
#define MSERIAL(X) _MSERIAL(X)
|
||||
|
||||
#if SERIAL_PORT == -1
|
||||
#define MYSERIAL1 USBSerial
|
||||
#elif WITHIN(SERIAL_PORT, 0, 3)
|
||||
#define MYSERIAL1 MSERIAL(SERIAL_PORT)
|
||||
#else
|
||||
#error "SERIAL_PORT must be from 0 to 3. You can also use -1 if the board supports Native USB."
|
||||
#endif
|
||||
|
||||
#ifdef SERIAL_PORT_2
|
||||
#if SERIAL_PORT_2 == -1
|
||||
#define MYSERIAL2 USBSerial
|
||||
#elif WITHIN(SERIAL_PORT_2, 0, 3)
|
||||
#define MYSERIAL2 MSERIAL(SERIAL_PORT_2)
|
||||
#else
|
||||
#error "SERIAL_PORT_2 must be from 0 to 3. You can also use -1 if the board supports Native USB."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef SERIAL_PORT_3
|
||||
#if SERIAL_PORT_3 == -1
|
||||
#define MYSERIAL3 USBSerial
|
||||
#elif WITHIN(SERIAL_PORT_3, 0, 3)
|
||||
#define MYSERIAL3 MSERIAL(SERIAL_PORT_3)
|
||||
#else
|
||||
#error "SERIAL_PORT_3 must be from 0 to 3. You can also use -1 if the board supports Native USB."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef MMU2_SERIAL_PORT
|
||||
#if MMU2_SERIAL_PORT == -1
|
||||
#define MMU2_SERIAL USBSerial
|
||||
#elif WITHIN(MMU2_SERIAL_PORT, 0, 3)
|
||||
#define MMU2_SERIAL MSERIAL(MMU2_SERIAL_PORT)
|
||||
#else
|
||||
#error "MMU2_SERIAL_PORT must be from 0 to 3. You can also use -1 if the board supports Native USB."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef LCD_SERIAL_PORT
|
||||
#if LCD_SERIAL_PORT == -1
|
||||
#define LCD_SERIAL USBSerial
|
||||
#elif WITHIN(LCD_SERIAL_PORT, 0, 3)
|
||||
#define LCD_SERIAL MSERIAL(LCD_SERIAL_PORT)
|
||||
#else
|
||||
#error "LCD_SERIAL_PORT must be from 0 to 3. You can also use -1 if the board supports Native USB."
|
||||
#endif
|
||||
#if HAS_DGUS_LCD
|
||||
#define LCD_SERIAL_TX_BUFFER_FREE() LCD_SERIAL.available()
|
||||
#endif
|
||||
#endif
|
||||
#include "MarlinSerial.h"
|
||||
|
||||
//
|
||||
// Interrupts
|
||||
@@ -137,12 +80,12 @@ extern DefaultSerial1 USBSerial;
|
||||
//
|
||||
|
||||
// Test whether the pin is valid
|
||||
constexpr bool VALID_PIN(const pin_t pin) {
|
||||
constexpr bool isValidPin(const pin_t pin) {
|
||||
return LPC176x::pin_is_valid(pin);
|
||||
}
|
||||
|
||||
// Get the analog index for a digital pin
|
||||
constexpr int8_t DIGITAL_PIN_TO_ANALOG_PIN(const pin_t pin) {
|
||||
constexpr int8_t digitalPinToAnalogIndex(const pin_t pin) {
|
||||
return (LPC176x::pin_is_valid(pin) && LPC176x::pin_has_adc(pin)) ? pin : -1;
|
||||
}
|
||||
|
||||
@@ -159,7 +102,7 @@ constexpr pin_t GET_PIN_MAP_PIN(const int16_t index) {
|
||||
// Parse a G-code word into a pin index
|
||||
int16_t PARSED_PIN_INDEX(const char code, const int16_t dval);
|
||||
// P0.6 thru P0.9 are for the onboard SD card
|
||||
#define HAL_SENSITIVE_PINS P0_06, P0_07, P0_08, P0_09,
|
||||
#define HAL_SENSITIVE_PINS P0_06, P0_07, P0_08, P0_09
|
||||
|
||||
// ------------------------
|
||||
// Defines
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
|
||||
DefaultSerial1 USBSerial(false, UsbSerial);
|
||||
|
||||
#if USING_HW_SERIAL0
|
||||
MarlinSerial _MSerial0(LPC_UART0);
|
||||
MSerialT MSerial0(true, _MSerial0);
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <CDCSerial.h>
|
||||
#include <HardwareSerial.h>
|
||||
#include <WString.h>
|
||||
|
||||
@@ -30,6 +31,18 @@
|
||||
#endif
|
||||
#include "../../core/serial_hook.h"
|
||||
|
||||
typedef ForwardSerial1Class< decltype(UsbSerial) > DefaultSerial1;
|
||||
extern DefaultSerial1 USBSerial;
|
||||
|
||||
#define SERIAL_INDEX_MIN 0
|
||||
#define SERIAL_INDEX_MAX 3
|
||||
#define USB_SERIAL_PORT(...) USBSerial
|
||||
#include "../shared/serial_ports.h"
|
||||
|
||||
#if defined(LCD_SERIAL_PORT) && ANY(HAS_DGUS_LCD, EXTENSIBLE_UI)
|
||||
#define LCD_SERIAL_TX_BUFFER_FREE() LCD_SERIAL.available()
|
||||
#endif
|
||||
|
||||
class MarlinSerial : public HardwareSerial<RX_BUFFER_SIZE, TX_BUFFER_SIZE> {
|
||||
public:
|
||||
MarlinSerial(LPC_UART_TypeDef *UARTx) : HardwareSerial<RX_BUFFER_SIZE, TX_BUFFER_SIZE>(UARTx) { }
|
||||
|
||||
@@ -146,6 +146,12 @@ void setup_endstop_interrupts() {
|
||||
#endif
|
||||
_ATTACH(Z_MIN_PROBE_PIN);
|
||||
#endif
|
||||
#if USE_CALIBRATION
|
||||
#if !LPC1768_PIN_INTERRUPT_M(CALIBRATION_PIN)
|
||||
#error "CALIBRATION_PIN is not INTERRUPT-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue."
|
||||
#endif
|
||||
_ATTACH(CALIBRATION_PIN);
|
||||
#endif
|
||||
#if USE_I_MAX
|
||||
#if !LPC1768_PIN_INTERRUPT_M(I_MAX_PIN)
|
||||
#error "I_MAX_PIN is not INTERRUPT-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue."
|
||||
|
||||
@@ -26,8 +26,10 @@
|
||||
|
||||
void MarlinHAL::set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v_size/*=255*/, const bool invert/*=false*/) {
|
||||
if (!LPC176x::pin_is_valid(pin)) return;
|
||||
if (LPC176x::pwm_attach_pin(pin))
|
||||
LPC176x::pwm_write_ratio(pin, invert ? 1.0f - (float)v / v_size : (float)v / v_size); // map 1-254 onto PWM range
|
||||
if (LPC176x::pwm_attach_pin(pin)) {
|
||||
const uint32_t duty = map(invert ? v_size - v : v, 0, v_size, 0, LPC176x::pwm_get_period(pin));
|
||||
LPC176x::pwm_write(pin, duty);
|
||||
}
|
||||
}
|
||||
|
||||
void MarlinHAL::set_pwm_frequency(const pin_t pin, const uint16_t f_desired) {
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
#define _WRITE(IO,V) WRITE_PIN(IO,V)
|
||||
|
||||
/// toggle a pin
|
||||
#define _TOGGLE(IO) _WRITE(IO, !READ(IO))
|
||||
#define _TOGGLE(IO) LPC176x::gpio_toggle(IO)
|
||||
|
||||
/// set pin as input
|
||||
#define _SET_INPUT(IO) SET_DIR_INPUT(IO)
|
||||
|
||||
@@ -121,7 +121,7 @@ static_assert(DISABLED(BAUD_RATE_GCODE), "BAUD_RATE_GCODE is not yet supported o
|
||||
#if IS_TX1(BTN_EN2) || IS_RX1(BTN_EN1)
|
||||
#error "Serial port pins (1) conflict with Encoder Buttons!"
|
||||
#elif ANY_TX(1, SD_SCK_PIN, LCD_PINS_D4, DOGLCD_SCK, LCD_RESET_PIN, LCD_PINS_RS, SHIFT_CLK_PIN) \
|
||||
|| ANY_RX(1, LCD_SDSS, LCD_PINS_RS, SD_MISO_PIN, DOGLCD_A0, SD_SS_PIN, LCD_SDSS, DOGLCD_CS, LCD_RESET_PIN, LCD_BACKLIGHT_PIN)
|
||||
|| ANY_RX(1, LCD_SDSS_PIN, LCD_PINS_RS, SD_MISO_PIN, DOGLCD_A0, SD_SS_PIN, DOGLCD_CS, LCD_RESET_PIN, LCD_BACKLIGHT_PIN)
|
||||
#error "Serial port pins (1) conflict with LCD pins!"
|
||||
#endif
|
||||
#endif
|
||||
@@ -211,8 +211,8 @@ static_assert(DISABLED(BAUD_RATE_GCODE), "BAUD_RATE_GCODE is not yet supported o
|
||||
#error "SCL0 overlaps with Encoder Button!"
|
||||
#elif IS_SCL0(SD_SS_PIN)
|
||||
#error "SCL0 overlaps with SD_SS_PIN!"
|
||||
#elif IS_SCL0(LCD_SDSS)
|
||||
#error "SCL0 overlaps with LCD_SDSS!"
|
||||
#elif IS_SCL0(LCD_SDSS_PIN)
|
||||
#error "SCL0 overlaps with LCD_SDSS_PIN!"
|
||||
#endif
|
||||
#undef PIN_IS_SDA0
|
||||
#undef IS_SCL0
|
||||
|
||||
@@ -19,22 +19,35 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Support routines for LPC1768
|
||||
*/
|
||||
|
||||
/**
|
||||
* Translation of routines & variables used by pinsDebug.h
|
||||
* Pins Debugging for LPC1768/9
|
||||
*
|
||||
* - NUMBER_PINS_TOTAL
|
||||
* - MULTI_NAME_PAD
|
||||
* - getPinByIndex(index)
|
||||
* - printPinNameByIndex(index)
|
||||
* - getPinIsDigitalByIndex(index)
|
||||
* - digitalPinToAnalogIndex(pin)
|
||||
* - getValidPinMode(pin)
|
||||
* - isValidPin(pin)
|
||||
* - isAnalogPin(pin)
|
||||
* - digitalRead_mod(pin)
|
||||
* - pwm_status(pin)
|
||||
* - printPinPWM(pin)
|
||||
* - printPinPort(pin)
|
||||
* - printPinNumber(pin)
|
||||
* - printPinAnalog(pin)
|
||||
*/
|
||||
|
||||
#define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS
|
||||
#define IS_ANALOG(P) (DIGITAL_PIN_TO_ANALOG_PIN(P) >= 0 ? 1 : 0)
|
||||
#define digitalRead_mod(p) extDigitalRead(p)
|
||||
#define GET_ARRAY_PIN(p) pin_array[p].pin
|
||||
#define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
|
||||
#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("P%d_%02d"), LPC176x::pin_port(p), LPC176x::pin_bit(p)); SERIAL_ECHO(buffer); }while(0)
|
||||
#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR("_A%d "), LPC176x::pin_get_adc_channel(pin)); SERIAL_ECHO(buffer); }while(0)
|
||||
#define isAnalogPin(P) (digitalPinToAnalogIndex(P) >= 0)
|
||||
#define digitalRead_mod(P) extDigitalRead(P)
|
||||
#define getPinByIndex(x) pin_array[x].pin
|
||||
#define printPinNameByIndex(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
|
||||
#define printPinNumber(P) do{ sprintf_P(buffer, PSTR("P%d_%02d"), LPC176x::pin_port(P), LPC176x::pin_bit(P)); SERIAL_ECHO(buffer); }while(0)
|
||||
#define printPinAnalog(P) do{ sprintf_P(buffer, PSTR("_A%d "), LPC176x::pin_get_adc_channel(P)); SERIAL_ECHO(buffer); }while(0)
|
||||
#define MULTI_NAME_PAD 17 // space needed to be pretty if not first name assigned to a pin
|
||||
|
||||
// pins that will cause hang/reset/disconnect in M43 Toggle and Watch utilities
|
||||
@@ -42,15 +55,15 @@
|
||||
#define M43_NEVER_TOUCH(Q) ((Q) == P0_29 || (Q) == P0_30 || (Q) == P2_09) // USB pins
|
||||
#endif
|
||||
|
||||
bool GET_PINMODE(const pin_t pin) {
|
||||
bool getValidPinMode(const pin_t pin) {
|
||||
if (!LPC176x::pin_is_valid(pin) || LPC176x::pin_adc_enabled(pin)) // Invalid pin or active analog pin
|
||||
return false;
|
||||
|
||||
return LPC176x::gpio_direction(pin);
|
||||
}
|
||||
|
||||
#define GET_ARRAY_IS_DIGITAL(x) ((bool) pin_array[x].is_digital)
|
||||
#define getPinIsDigitalByIndex(x) ((bool) pin_array[x].is_digital)
|
||||
|
||||
void print_port(const pin_t) {}
|
||||
void pwm_details(const pin_t) {}
|
||||
void printPinPort(const pin_t) {}
|
||||
void printPinPWM(const pin_t) {}
|
||||
bool pwm_status(const pin_t) { return false; }
|
||||
|
||||
@@ -28,12 +28,12 @@
|
||||
// spiBeginTransaction.
|
||||
#endif
|
||||
|
||||
/** onboard SD card */
|
||||
//#define SD_SCK_PIN P0_07
|
||||
//#define SD_MISO_PIN P0_08
|
||||
//#define SD_MOSI_PIN P0_09
|
||||
//#define SD_SS_PIN P0_06
|
||||
/** external */
|
||||
// Onboard SD
|
||||
//#define SD_SCK_PIN P0_07
|
||||
//#define SD_MISO_PIN P0_08
|
||||
//#define SD_MOSI_PIN P0_09
|
||||
|
||||
// External SD
|
||||
#ifndef SD_SCK_PIN
|
||||
#define SD_SCK_PIN P0_15
|
||||
#endif
|
||||
@@ -43,10 +43,3 @@
|
||||
#ifndef SD_MOSI_PIN
|
||||
#define SD_MOSI_PIN P0_18
|
||||
#endif
|
||||
#ifndef SD_SS_PIN
|
||||
#define SD_SS_PIN P1_23
|
||||
#endif
|
||||
#if !defined(SDSS) || SDSS == P_NC // gets defaulted in pins.h
|
||||
#undef SDSS
|
||||
#define SDSS SD_SS_PIN
|
||||
#endif
|
||||
|
||||
@@ -132,7 +132,7 @@ uint8_t swSpiTransfer_mode_3(uint8_t b, const uint8_t spi_speed, const pin_t sck
|
||||
static uint8_t SPI_speed = 0;
|
||||
|
||||
static void u8g_sw_spi_shift_out(uint8_t dataPin, uint8_t clockPin, uint8_t val) {
|
||||
#if ANY(FYSETC_MINI_12864, MKS_MINI_12864)
|
||||
#if U8G_SPI_USE_MODE_3
|
||||
swSpiTransfer_mode_3(val, SPI_speed, clockPin, -1, dataPin);
|
||||
#else
|
||||
swSpiTransfer_mode_0(val, SPI_speed, clockPin, -1, dataPin);
|
||||
@@ -160,15 +160,15 @@ uint8_t u8g_com_HAL_LPC1768_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val,
|
||||
break;
|
||||
|
||||
case U8G_COM_MSG_CHIP_SELECT:
|
||||
#if ANY(FYSETC_MINI_12864, MKS_MINI_12864) // LCD SPI is running mode 3 while SD card is running mode 0
|
||||
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
|
||||
// the next chip select goes active
|
||||
u8g_SetPILevel(u8g, U8G_PI_SCK, 1); // Set SCK to mode 3 idle state before CS goes active
|
||||
#if U8G_SPI_USE_MODE_3 // LCD SPI is running mode 3 while SD card is running mode 0
|
||||
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
|
||||
// the next chip select goes active
|
||||
u8g_SetPILevel(u8g, U8G_PI_SCK, 1); // Set SCK to mode 3 idle state before CS goes active
|
||||
u8g_SetPILevel(u8g, U8G_PI_CS, LOW);
|
||||
}
|
||||
else {
|
||||
u8g_SetPILevel(u8g, U8G_PI_CS, HIGH);
|
||||
u8g_SetPILevel(u8g, U8G_PI_SCK, 0); // Set SCK to mode 0 idle state after CS goes inactive
|
||||
u8g_SetPILevel(u8g, U8G_PI_SCK, 0); // Set SCK to mode 0 idle state after CS goes inactive
|
||||
}
|
||||
#else
|
||||
u8g_SetPILevel(u8g, U8G_PI_CS, !arg_val);
|
||||
|
||||
@@ -13,9 +13,9 @@ if pioutil.is_pio_build():
|
||||
target_drive = "REARM"
|
||||
|
||||
import platform
|
||||
|
||||
current_OS = platform.system()
|
||||
Import("env")
|
||||
|
||||
env = pioutil.env
|
||||
|
||||
def print_error(e):
|
||||
print('\nUnable to find destination disk (%s)\n' \
|
||||
@@ -37,7 +37,7 @@ if pioutil.is_pio_build():
|
||||
#
|
||||
# platformio.ini will accept this for a Windows upload port designation: 'upload_port = L:'
|
||||
# Windows - doesn't care about the disk's name, only cares about the drive letter
|
||||
import subprocess,string
|
||||
import subprocess, string
|
||||
from ctypes import windll
|
||||
from pathlib import PureWindowsPath
|
||||
|
||||
|
||||
@@ -71,37 +71,10 @@ extern MSerialT serial_stream_2;
|
||||
extern MSerialT serial_stream_3;
|
||||
|
||||
#define _MSERIAL(X) serial_stream_##X
|
||||
#define MSERIAL(X) _MSERIAL(X)
|
||||
|
||||
#if WITHIN(SERIAL_PORT, 0, 3)
|
||||
#define MYSERIAL1 MSERIAL(SERIAL_PORT)
|
||||
#else
|
||||
#error "SERIAL_PORT must be from 0 to 3. Please update your configuration."
|
||||
#endif
|
||||
|
||||
#ifdef SERIAL_PORT_2
|
||||
#if WITHIN(SERIAL_PORT_2, 0, 3)
|
||||
#define MYSERIAL2 MSERIAL(SERIAL_PORT_2)
|
||||
#else
|
||||
#error "SERIAL_PORT_2 must be from 0 to 3. Please update your configuration."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef MMU2_SERIAL_PORT
|
||||
#if WITHIN(MMU2_SERIAL_PORT, 0, 3)
|
||||
#define MMU2_SERIAL MSERIAL(MMU2_SERIAL_PORT)
|
||||
#else
|
||||
#error "MMU2_SERIAL_PORT must be from 0 to 3. Please update your configuration."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef LCD_SERIAL_PORT
|
||||
#if WITHIN(LCD_SERIAL_PORT, 0, 3)
|
||||
#define LCD_SERIAL MSERIAL(LCD_SERIAL_PORT)
|
||||
#else
|
||||
#error "LCD_SERIAL_PORT must be from 0 to 3. Please update your configuration."
|
||||
#endif
|
||||
#endif
|
||||
#define SERIAL_INDEX_MIN 0
|
||||
#define SERIAL_INDEX_MAX 3
|
||||
#include "../shared/serial_ports.h"
|
||||
|
||||
// ------------------------
|
||||
// Interrupts
|
||||
|
||||
@@ -25,11 +25,11 @@
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
#include "pinsDebug.h"
|
||||
|
||||
int8_t ADC_pin_mode(pin_t pin) { return -1; }
|
||||
int8_t ADC_pin_mode(const pin_t) { return -1; }
|
||||
|
||||
int8_t get_pin_mode(const pin_t pin) { return VALID_PIN(pin) ? 0 : -1; }
|
||||
int8_t get_pin_mode(const pin_t pin) { return isValidPin(pin) ? 0 : -1; }
|
||||
|
||||
bool GET_PINMODE(const pin_t pin) {
|
||||
bool getValidPinMode(const pin_t pin) {
|
||||
const int8_t pin_mode = get_pin_mode(pin);
|
||||
if (pin_mode == -1 || pin_mode == ADC_pin_mode(pin)) // Invalid pin or active analog pin
|
||||
return false;
|
||||
@@ -37,12 +37,13 @@ bool GET_PINMODE(const pin_t pin) {
|
||||
return (Gpio::getMode(pin) != 0); // Input/output state
|
||||
}
|
||||
|
||||
bool GET_ARRAY_IS_DIGITAL(const pin_t pin) {
|
||||
return !IS_ANALOG(pin) || get_pin_mode(pin) != ADC_pin_mode(pin);
|
||||
// The pin and index are the same on this platform
|
||||
bool getPinIsDigitalByIndex(const pin_t pin) {
|
||||
return !isAnalogPin(pin) || get_pin_mode(pin) != ADC_pin_mode(pin);
|
||||
}
|
||||
|
||||
void print_port(const pin_t) {}
|
||||
void pwm_details(const pin_t) {}
|
||||
void printPinPort(const pin_t) {}
|
||||
void printPinPWM(const pin_t) {}
|
||||
bool pwm_status(const pin_t) { return false; }
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,30 +19,43 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Support routines for X86_64
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Translation of routines & variables used by pinsDebug.h
|
||||
* Pins Debugging for x86_64
|
||||
*
|
||||
* - NUMBER_PINS_TOTAL
|
||||
* - MULTI_NAME_PAD
|
||||
* - getPinByIndex(index)
|
||||
* - printPinNameByIndex(index)
|
||||
* - getPinIsDigitalByIndex(index)
|
||||
* - digitalPinToAnalogIndex(pin)
|
||||
* - getValidPinMode(pin)
|
||||
* - isValidPin(pin)
|
||||
* - isAnalogPin(pin)
|
||||
* - digitalRead_mod(pin)
|
||||
* - pwm_status(pin)
|
||||
* - printPinPWM(pin)
|
||||
* - printPinPort(pin)
|
||||
* - printPinNumber(pin)
|
||||
* - printPinAnalog(pin)
|
||||
*/
|
||||
|
||||
#define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS
|
||||
#define IS_ANALOG(P) (DIGITAL_PIN_TO_ANALOG_PIN(P) >= 0 ? 1 : 0)
|
||||
#define digitalRead_mod(p) digitalRead(p)
|
||||
#define GET_ARRAY_PIN(p) pin_array[p].pin
|
||||
#define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
|
||||
#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0)
|
||||
#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0)
|
||||
#define isValidPin(P) (P >= 0 && P < pin_t(NUMBER_PINS_TOTAL))
|
||||
#define isAnalogPin(P) (digitalPinToAnalogIndex(P) >= 0)
|
||||
#define digitalRead_mod(P) digitalRead(P)
|
||||
#define getPinByIndex(x) pin_array[x].pin
|
||||
#define printPinNameByIndex(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
|
||||
#define printPinNumber(P) do{ sprintf_P(buffer, PSTR("%3d "), P); SERIAL_ECHO(buffer); }while(0)
|
||||
#define printPinAnalog(P) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(P)); SERIAL_ECHO(buffer); }while(0)
|
||||
#define MULTI_NAME_PAD 16 // space needed to be pretty if not first name assigned to a pin
|
||||
|
||||
// Active ADC function/mode/code values for PINSEL registers
|
||||
int8_t ADC_pin_mode(pin_t pin);
|
||||
int8_t get_pin_mode(const pin_t pin);
|
||||
bool GET_PINMODE(const pin_t pin);
|
||||
bool GET_ARRAY_IS_DIGITAL(const pin_t pin);
|
||||
void print_port(const pin_t);
|
||||
void pwm_details(const pin_t);
|
||||
int8_t ADC_pin_mode(const pin_t);
|
||||
int8_t get_pin_mode(const pin_t);
|
||||
bool getValidPinMode(const pin_t);
|
||||
bool getPinIsDigitalByIndex(const pin_t);
|
||||
void printPinPort(const pin_t);
|
||||
void printPinPWM(const pin_t);
|
||||
bool pwm_status(const pin_t);
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
//#define SD_SCK_PIN P0_07
|
||||
//#define SD_MISO_PIN P0_08
|
||||
//#define SD_MOSI_PIN P0_09
|
||||
//#define SD_SS_PIN P0_06
|
||||
|
||||
// External SD
|
||||
#ifndef SD_SCK_PIN
|
||||
@@ -44,9 +43,3 @@
|
||||
#ifndef SD_MOSI_PIN
|
||||
#define SD_MOSI_PIN 52
|
||||
#endif
|
||||
#ifndef SD_SS_PIN
|
||||
#define SD_SS_PIN 53
|
||||
#endif
|
||||
#ifndef SDSS
|
||||
#define SDSS SD_SS_PIN
|
||||
#endif
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user