Compare commits
1505 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 941acc64dc | |||
| aa10268ea7 | |||
| 39a3dc998a | |||
| 90c67db50f | |||
| b894a6b83a | |||
| 283101dba1 | |||
| 77897aea67 | |||
| 1f1421a5a4 | |||
| 0296e32c5c | |||
| 192cc1d9d7 | |||
| 6b8b1892f9 | |||
| 04ab489264 | |||
| 05e3a3412c | |||
| c81b50633d | |||
| 3aa536a76a | |||
| 45d566a50d | |||
| 66c5139fb7 | |||
| b65000589c | |||
| c3b6095bd7 | |||
| 9f256b038c | |||
| 4cec58a24f | |||
| 8077ec2052 | |||
| ab574eb649 | |||
| 9df4fc2265 | |||
| ef4c302898 | |||
| b9cc802ff6 | |||
| baba7b6109 | |||
| b07dd87b7f | |||
| be50832dc7 | |||
| 560679a1b9 | |||
| ee31e8e968 | |||
| daeee858c6 | |||
| 0acd1d0ce9 | |||
| bb274563fc | |||
| c39be1d594 | |||
| 80f47bb7c1 | |||
| e55a2b82d3 | |||
| 9cb597193d | |||
| db9148441d | |||
| 1c23fb21cd | |||
| 1ab0d240b9 | |||
| 5a4a107711 | |||
| afa6a0c993 | |||
| 7429a39278 | |||
| 156ed96649 | |||
| b018fb59d7 | |||
| 4d9190598b | |||
| 5dfec58d7b | |||
| 6d84ca7671 | |||
| afd0b532ad | |||
| 1cb2de37de | |||
| fd94570a0d | |||
| b120adf8df | |||
| 1cfe6d7478 | |||
| a9b30acbe6 | |||
| b9e4ce3715 | |||
| 78410b210b | |||
| de0b872a24 | |||
| ae24f4f930 | |||
| f093ce35a0 | |||
| 7ee1ab4fd3 | |||
| bb352f9836 | |||
| 5c120222a4 | |||
| b3af5a1ac0 | |||
| 124cff0dbe | |||
| 9076a9314f | |||
| 40ce9d0299 | |||
| 20f1688376 | |||
| 59e8707a4f | |||
| 5735c8af5b | |||
| c97bf04166 | |||
| 156bd28160 | |||
| 1f991f07be | |||
| 675be8db7c | |||
| fcb19823db | |||
| e8779e7fe2 | |||
| ac5ff1d802 | |||
| 08e20dbbc6 | |||
| 1682036533 | |||
| 42180e25a3 | |||
| c6e4fbe162 | |||
| 65adea6240 | |||
| 888da29b61 | |||
| 50ff4cf157 | |||
| 12b9bbaa50 | |||
| b50afa9897 | |||
| a556a8c506 | |||
| ee7b6a5e68 | |||
| da9f3868d5 | |||
| 04183da302 | |||
| 0b9f99f940 | |||
| 5aff43e65e | |||
| 32b6a3ad12 | |||
| 94857b59c9 | |||
| 3c5f0ce858 | |||
| 0d7c559139 | |||
| 542baea2e1 | |||
| 33ddd4e929 | |||
| 96c1721eeb | |||
| 80c51ea572 | |||
| f71e65aa9c | |||
| 1025066ab1 | |||
| f4a7531ccb | |||
| 3e53754ccf | |||
| 99cbeb3806 | |||
| 751de314a4 | |||
| 689ae467f2 | |||
| b06fc3b539 | |||
| 3ca3268241 | |||
| 382aa96870 | |||
| 522ea178a4 | |||
| 2756a1d411 | |||
| 94b8eac6d0 | |||
| b4ddee8beb | |||
| f0494b4021 | |||
| ba8d03d241 | |||
| 37927f9274 | |||
| 81b9914704 | |||
| d86efae37c | |||
| 3550494db1 | |||
| 95d19cfcbf | |||
| e5e5c1513d | |||
| 083bfa3fe9 | |||
| 8f5d99a2ab | |||
| f748b1a1ce | |||
| e931bc7e72 | |||
| b95a1b94cb | |||
| 3bdca8730e | |||
| cb02b6ec60 | |||
| d70a4646f4 | |||
| 11bbcfd69e | |||
| d429d5a4ae | |||
| d66afdc244 | |||
| 242cda28f6 | |||
| 0dc4a5d928 | |||
| c6d99c772b | |||
| 612ca52676 | |||
| d1be569466 | |||
| 8898eb20a6 | |||
| 95e0ab52d6 | |||
| e9214cf1fb | |||
| 53b6c74f0f | |||
| d46ba9e969 | |||
| 5c90a5bbf5 | |||
| baae6ddfef | |||
| b2d32227aa | |||
| c1e14d6db7 | |||
| 7ef484be7e | |||
| c941fe470b | |||
| 21f5ca6ad4 | |||
| ad3b95c8ea | |||
| 50cc55d172 | |||
| 3eb55016e4 | |||
| 51004e003d | |||
| 0764981aa1 | |||
| b19d8182c1 | |||
| 6b50a50676 | |||
| 29c9c723f8 | |||
| b49da0c4ba | |||
| 58bd2a5e81 | |||
| 6f176d1d64 | |||
| 38c97dc975 | |||
| d7ec13ce69 | |||
| 7e585cab83 | |||
| e76545c450 | |||
| 1894b981af | |||
| 61f9e28c23 | |||
| c6ecfc1429 | |||
| 4cc2bc1343 | |||
| dcb8af0518 | |||
| 4108382c2c | |||
| 0c1be965b6 | |||
| 6f87e4b4dc | |||
| c91b3142aa | |||
| df6becfb07 | |||
| 51aa9743a6 | |||
| e561ecb5a7 | |||
| 38ed5f5ee9 | |||
| 23618d9cd0 | |||
| 8cf6ef8411 | |||
| fa3c14fccf | |||
| 773d773baa | |||
| 5c186f7dd3 | |||
| 77b75ce86c | |||
| 6f156d01d9 | |||
| c0f6eebded | |||
| 6786101c64 | |||
| ee21f44969 | |||
| 090e08ef3d | |||
| 410b25d4e9 | |||
| 8c22e7710c | |||
| b4d2c19723 | |||
| b1990d3e39 | |||
| 20c027464e | |||
| d7c8491a07 | |||
| 2a18869b50 | |||
| 444b6d6d83 | |||
| f1dfc80332 | |||
| 6137b671fe | |||
| 0858670828 | |||
| 0ab3f7e985 | |||
| 022eb85937 | |||
| 31261d0c17 | |||
| 85d57f7a9e | |||
| 8a159dfec2 | |||
| d59ed4dce0 | |||
| 110e631656 | |||
| 9769d799df | |||
| a783caabac | |||
| b978153ca4 | |||
| 090d72f591 | |||
| e3c2d43b2b | |||
| 5274ab0ad5 | |||
| 59d9886473 | |||
| 6e30d1bef1 | |||
| db81a1d4a2 | |||
| 2edc13a0e2 | |||
| 8db9b800e7 | |||
| 21971f2f7a | |||
| b2265869b2 | |||
| f408863043 | |||
| 336131fb37 | |||
| 808d6f367b | |||
| 00d03c6dc5 | |||
| 4f660a18bc | |||
| e87ae5b643 | |||
| 73fe8ef4df | |||
| 157d28c418 | |||
| e143b1252f | |||
| 816fa9e2b4 | |||
| 661a38586b | |||
| 4d297dd562 | |||
| 56b5fb5e15 | |||
| 2205c7775b | |||
| b637b80a9a | |||
| 19440df4d0 | |||
| 6f8717ce12 | |||
| 6ec2cbce18 | |||
| f6bf247302 | |||
| 4b36a0a3dc | |||
| be0afd71df | |||
| 8e35029f10 | |||
| 0aa833fe6c | |||
| 08b09f7a4c | |||
| 151962baf2 | |||
| aca2bbbc50 | |||
| 211544b543 | |||
| 8e36d00ad0 | |||
| e596931aac | |||
| ed949cc5c1 | |||
| 53757444c5 | |||
| c46d47f45f | |||
| bc2fc86993 | |||
| 01e100360f | |||
| dba26a6d1f | |||
| 05fc3d7891 | |||
| 7ff70d7adb | |||
| a7e142460c | |||
| 9d2ef95f1d | |||
| de5f69b285 | |||
| 829281d016 | |||
| be098cd42f | |||
| 2dafc10da3 | |||
| 6444ef02e4 | |||
| ab5232c37b | |||
| 6b150bfc40 | |||
| 885ad70c8b | |||
| d37cfa327e | |||
| 040ebd1675 | |||
| 48fa0e6de0 | |||
| c9aa7486ce | |||
| 80b3f8c395 | |||
| 712b213b40 | |||
| 52750bf362 | |||
| 0afdec882c | |||
| 29b048810c | |||
| 0eb1830d85 | |||
| f5c980f9cf | |||
| d36e950547 | |||
| df75e9d692 | |||
| 86c3be7089 | |||
| 575b099e40 | |||
| 360166f626 | |||
| b5f1a4141c | |||
| 0401f4ce14 | |||
| 9f3b4d537d | |||
| deefd2defa | |||
| 1e31b56b0f | |||
| 86e58df324 | |||
| 3edf9904f4 | |||
| 8f461568e0 | |||
| e848bebb10 | |||
| f84f7e5a38 | |||
| 677bd19dbf | |||
| dc05d7fc2b | |||
| 2894d8b18e | |||
| bfdd14be4f | |||
| 941e9bd329 | |||
| e1f8c97b21 | |||
| 71c05f1b57 | |||
| 2c79faede9 | |||
| 94badcbace | |||
| 2746eb589e | |||
| f264228074 | |||
| 994fdb5179 | |||
| 1e41d157a3 | |||
| c57545ee08 | |||
| 647c04def8 | |||
| 9e987e4971 | |||
| ba55602462 | |||
| ec46336df7 | |||
| d57adbb88b | |||
| b24099c9d0 | |||
| 203d3f8f56 | |||
| d9e1cbebea | |||
| e5fbbbc068 | |||
| 4eddcf9142 | |||
| bc01200495 | |||
| c95e3e3bcb | |||
| 105c81217c | |||
| 3911c38d5e | |||
| 80adb124f7 | |||
| 8e783e24e8 | |||
| 8a19bc0c0e | |||
| 312bebff9a | |||
| 4995e0ebfa | |||
| 84bbd018ab | |||
| a03502080e | |||
| 72776f647b | |||
| 4eb4476ce6 | |||
| a66ae52234 | |||
| 68b9503b96 | |||
| cf4e2e507f | |||
| af3500044a | |||
| 5793ca42b5 | |||
| 07b1ac06a9 | |||
| bba2a3b906 | |||
| 80c70f33eb | |||
| d16f443d33 | |||
| f7de05e50c | |||
| c8b2fbd91e | |||
| aef23c9637 | |||
| 7cf2788cc3 | |||
| c294613b53 | |||
| 4dc4d348d4 | |||
| 6146126b2a | |||
| 5492f15633 | |||
| 4d1df2e357 | |||
| 954f03b6a8 | |||
| a560c0f7cd | |||
| ec30e8c9ef | |||
| bc0e977229 | |||
| 1993365967 | |||
| c2ba9a03ee | |||
| 7b2ea8febe | |||
| e38307355e | |||
| 5c81ce2bb8 | |||
| 7f8984b500 | |||
| 062b955f1d | |||
| ccb2a95456 | |||
| 00165699e9 | |||
| cc4148e246 | |||
| dc98ee553f | |||
| 738a8495ad | |||
| 17b4ba7c9c | |||
| 96c54c188a | |||
| e63cb5fe8f | |||
| 4dad8628ff | |||
| 009fd186f8 | |||
| 8c7e98627f | |||
| 656c3c3b2a | |||
| 9ec8762497 | |||
| 39d63b800c | |||
| 33b18dc801 | |||
| 0aa100a31e | |||
| 879b54a8bc | |||
| d1256be7ec | |||
| eb6f44372e | |||
| b0abce5a7e | |||
| 72df10c669 | |||
| b8f1b74abd | |||
| e8fc0e9a57 | |||
| 4b5a42f86a | |||
| 83c83e3127 | |||
| 5ce64f6d16 | |||
| c05c5d96d9 | |||
| cce80fd41c | |||
| 1b79217fbc | |||
| 192507b524 | |||
| 0d13c5d077 | |||
| fd3e243989 | |||
| 12b697c5cd | |||
| 03676d8e2f | |||
| ea6f5e20a6 | |||
| 3c6d2d7711 | |||
| a9392c6b27 | |||
| fa12866de3 | |||
| 9508f9ec75 | |||
| beb7e2ed93 | |||
| f24cdf1081 | |||
| 61be06ef70 | |||
| ba1c2a9819 | |||
| e5e3c3ff35 | |||
| 9c667b5436 | |||
| de8fbdea6d | |||
| 282170a259 | |||
| 31980f01ba | |||
| dcd2fa9291 | |||
| 967d1034d9 | |||
| 179de4423d | |||
| d11ed30584 | |||
| 1381b5d57d | |||
| 63d6dddae1 | |||
| e5d69d313c | |||
| f177da45bb | |||
| 5a1ba9c32f | |||
| dc40b3ec00 | |||
| e7d519c898 | |||
| 2bf1bbf399 | |||
| 2d0d5eccd8 | |||
| 1f77930e01 | |||
| 1ed1882766 | |||
| 4dd612a68d | |||
| dc733192be | |||
| fb9de6e787 | |||
| b935bc948a | |||
| ecddd2a655 | |||
| fa998178e9 | |||
| ed605e77fa | |||
| 73aa7ffff9 | |||
| 50ad30259f | |||
| 8139154243 | |||
| fa3492fc6e | |||
| 536fa07ed5 | |||
| 828dea2ee0 | |||
| 3bae28a5e1 | |||
| 70e9c07b2d | |||
| 55ec7d43ef | |||
| 0b016c08c9 | |||
| 890a396a2a | |||
| b01f10dfac | |||
| f0d8d76f68 | |||
| bc08ce86be | |||
| 081ab35e82 | |||
| eacb8346af | |||
| d77be210c1 | |||
| e98288ecab | |||
| cfc41e5587 | |||
| 36a94ac586 | |||
| 5ad60d89a8 | |||
| bdfeb54a9d | |||
| 1f488292cd | |||
| b6fa55aa37 | |||
| 7450b7c36e | |||
| 3cdd2591ed | |||
| 699b5f5b30 | |||
| 4a30fe1a44 | |||
| 63b13588a8 | |||
| cd4c35c543 | |||
| b86125c6d6 | |||
| 432b72e7a8 | |||
| a6326d25fb | |||
| de26374746 | |||
| d25f0a5a21 | |||
| 951b65c2de | |||
| f7b44ac2a6 | |||
| 803c3169ad | |||
| f151bf8bb7 | |||
| 198b059b44 | |||
| a18d6171a6 | |||
| 8af3c04e7d | |||
| c5fd486e91 | |||
| 03da376104 | |||
| 897170294c | |||
| 2bde53bd46 | |||
| 1eb3364ac9 | |||
| ce5c848284 | |||
| 114e9b0f56 | |||
| 3f56bd91d2 | |||
| ddfddae4f4 | |||
| c776cda9fa | |||
| 9d7a1ae9f5 | |||
| 97a35dd534 | |||
| e3e51a9a8d | |||
| d0720a565f | |||
| 72d5029f42 | |||
| aa380aeb4b | |||
| 1617798287 | |||
| 8f6a5d538f | |||
| c1a1f80fff | |||
| 8488d64062 | |||
| 0977226a4b | |||
| 7dab8ca5dc | |||
| d0c8aabd28 | |||
| 8c22f9fd4f | |||
| 2e3d74f60f | |||
| 2a1162b42c | |||
| 9e3025e07b | |||
| 5299b577d1 | |||
| 47619e4476 | |||
| 6845f17fb2 | |||
| 2aaa1a5815 | |||
| f36da47b85 | |||
| 03da273ea6 | |||
| 1c1d444b0c | |||
| 742733d714 | |||
| 235d024505 | |||
| 921001f004 | |||
| 0d9d11a2d5 | |||
| 113a5fa80e | |||
| 4ea058260b | |||
| 9c65890644 | |||
| e41b2274b0 | |||
| 85162da0df | |||
| d55aaf95e8 | |||
| d6c416bb22 | |||
| 5f6a8588c5 | |||
| 1c95c13224 | |||
| 967076b080 | |||
| 855b188102 | |||
| a1d4835404 | |||
| 6759be43ea | |||
| 6e0001b4f8 | |||
| 84f0ce4751 | |||
| d9e2acd1b2 | |||
| e8f9473be2 | |||
| 126a80ea83 | |||
| aa635fe9f1 | |||
| d473456a08 | |||
| 7761812532 | |||
| 18881e6725 | |||
| 1d78bdac82 | |||
| e1fc89c83f | |||
| 35800eec02 | |||
| 83e093f5cc | |||
| 2b7e5c8e6c | |||
| 3c2f735fb8 | |||
| e3370d097a | |||
| f39b28b6a9 | |||
| b1ec140f0b | |||
| 6e932f979d | |||
| d3dea2e091 | |||
| cc8711419e | |||
| c04f8e8c9d | |||
| 4813938a87 | |||
| 971732b9f6 | |||
| 1997640e41 | |||
| b45a277c52 | |||
| 016bd86c28 | |||
| fc709c28b5 | |||
| 65d69e9507 | |||
| 28e7562e7a | |||
| 2e5a6243df | |||
| d413781b98 | |||
| 50d38e7d03 | |||
| 80784c4d11 | |||
| 8761cb0464 | |||
| aceadabe89 | |||
| 3a1fedaee6 | |||
| a1f0d9d349 | |||
| c67cefd913 | |||
| c71f542d61 | |||
| fe5ba25a00 | |||
| 4ae9afcc56 | |||
| c3ff130127 | |||
| fbf8819253 | |||
| a7ebbe6dcd | |||
| 49909d3cd1 | |||
| ada40af5d6 | |||
| ec045f39aa | |||
| ba4a17f251 | |||
| 12628d43ce | |||
| 023d21a1cf | |||
| a8a64f19f4 | |||
| 529e6ed1ea | |||
| acb4dba7cd | |||
| f508bdded4 | |||
| 20f8c9b950 | |||
| d7e2e655ca | |||
| 15204bd5e9 | |||
| 2ec90d2162 | |||
| b56c6b9e13 | |||
| e4b27c2401 | |||
| 1647db8fad | |||
| c8d3069580 | |||
| b7e245036b | |||
| 66370006bb | |||
| 3fcd131f46 | |||
| 0e7999915d | |||
| e301e28e45 | |||
| 6e4a7e2dcb | |||
| 8fbba6abd9 | |||
| e2fef4df6f | |||
| c93dab2307 | |||
| d89a61bd51 | |||
| 2683b2636b | |||
| 7cb3640ea4 | |||
| dc85b604bb | |||
| aa3292cc57 | |||
| 7e17a2cfd0 | |||
| 0acaaf536d | |||
| 30b08e218d | |||
| 7babfbbcb2 | |||
| 2e7a754ac1 | |||
| 61f3051982 | |||
| 69a5e0c136 | |||
| 73419681dc | |||
| bb155ed38e | |||
| 7aad82cccd | |||
| 18aa682954 | |||
| 5e72729c67 | |||
| 6f1afb411a | |||
| 016171d682 | |||
| f6a73bbd84 | |||
| baaf79b755 | |||
| 2aafc5b7b0 | |||
| 7145731844 | |||
| 1e00ba5433 | |||
| abda89437d | |||
| d6d01f1f8e | |||
| 5a39afb81b | |||
| 8f4c564b04 | |||
| 017e0e6951 | |||
| 7ee87dc2db | |||
| 3a3228ef1b | |||
| 5a53e4d921 | |||
| 8979990805 | |||
| 4e276c6e00 | |||
| 96bcf08477 | |||
| 68cc5c72fd | |||
| 06dff0b7ec | |||
| c4dbedd5b6 | |||
| 9727e5e3d6 | |||
| ad323d852e | |||
| 4300547c66 | |||
| f61ff9c813 | |||
| 55071749b7 | |||
| 9dd8a49f82 | |||
| 36ba754842 | |||
| 169515404d | |||
| 3e838bf6b6 | |||
| b81980a439 | |||
| 98e7b821b4 | |||
| 03f27a5e41 | |||
| cffbb146ea | |||
| 1ddbdd0321 | |||
| 4f04f4e6b8 | |||
| c1a3ec1228 | |||
| bdbd15e6d9 | |||
| 5c2cb60f03 | |||
| f8a8711075 | |||
| b509567567 | |||
| 2c6c9e90df | |||
| 8438a57910 | |||
| a471cd26e1 | |||
| f089bbbc93 | |||
| f3a09768e8 | |||
| 9509568b7e | |||
| 252ae1b52d | |||
| 3137df9ad4 | |||
| 42866db251 | |||
| 50582e3b47 | |||
| 0c6c96bb60 | |||
| 3621f21fb2 | |||
| 3d346f8398 | |||
| 41785a10dd | |||
| ca76c3df7a | |||
| c4f1a191c3 | |||
| 967bf41080 | |||
| 1e4482df54 | |||
| 254417e8b0 | |||
| 80946a17ee | |||
| 1dc6d50dca | |||
| b86dfd35ae | |||
| 6dbeca94b3 | |||
| 527d260581 | |||
| ae2476dfdb | |||
| 91eaa54ea9 | |||
| 1352acdf75 | |||
| 123c6c5d34 | |||
| df320209c3 | |||
| 8da92b6823 | |||
| b708bcf8b1 | |||
| 7b3e28fc77 | |||
| 873fb84d27 | |||
| 7d8f49f82c | |||
| 587e6b7c8d | |||
| f1958ac060 | |||
| 4d2355cc9e | |||
| 0f6f05441b | |||
| ca58084020 | |||
| 89a9aa931f | |||
| e9d374dd54 | |||
| 21bfbb9d44 | |||
| 5054c53901 | |||
| 56d5c5b97a | |||
| ad70d76faa | |||
| 8f787cc474 | |||
| 499248c5ef | |||
| 6e86c9d22b | |||
| 9c3a562208 | |||
| d00eb4da5c | |||
| 5b4e39a429 | |||
| b11e78f5f7 | |||
| 3bdd7b1ed3 | |||
| 14b7c8cf51 | |||
| 68cff5f245 | |||
| 652162777b | |||
| 923f17328f | |||
| f4076fe99d | |||
| 6445859270 | |||
| 4661451d32 | |||
| 22e688460f | |||
| 8bccd0ef5b | |||
| f4639fa964 | |||
| 0a10d010b7 | |||
| 7a056a4e09 | |||
| 33c459c1d6 | |||
| 65c2f3bb65 | |||
| ec9a5b7157 | |||
| 31920a5285 | |||
| b78cccad0f | |||
| 36a1d12238 | |||
| 79183f7620 | |||
| b0f148f7db | |||
| bc4fa3984b | |||
| d60e5c89d8 | |||
| 57d68e0d01 | |||
| 908d487212 | |||
| a855d01336 | |||
| d5ad51821c | |||
| 59b5800e58 | |||
| 1b84807eb0 | |||
| 3ab4736ac9 | |||
| d8aa40eedf | |||
| 2177c246d5 | |||
| e5c6448063 | |||
| f447668387 | |||
| d4ab383a1b | |||
| 87c254b238 | |||
| cc9165cb99 | |||
| df5c06ab7b | |||
| b2dcb75c6c | |||
| 074f191bc3 | |||
| 2bda584fc6 | |||
| b818543045 | |||
| 3175266681 | |||
| 1ae40abb09 | |||
| 1cea0b6f70 | |||
| 5c6061ea5a | |||
| 6799aa9806 | |||
| 049898fa30 | |||
| a29ca4947e | |||
| feb6014e92 | |||
| c7ae531e35 | |||
| c373afbddd | |||
| c970869d74 | |||
| 74873f377d | |||
| e8687e5b9e | |||
| 198498b1aa | |||
| 0527090a31 | |||
| dff96a8952 | |||
| 3d9f360b5a | |||
| b0bfa65be7 | |||
| c8ac3a2a72 | |||
| 957bb3124a | |||
| 1f37781bf1 | |||
| 7b62670987 | |||
| 7b5a4f71be | |||
| 94a9cd6477 | |||
| 0cfcc7cbf5 | |||
| 292755258a | |||
| 02e2ace199 | |||
| 4a40cf268d | |||
| 428fbe8228 | |||
| 81a12b2fac | |||
| fb636db61a | |||
| 369f1a64d8 | |||
| 6ed2840615 | |||
| eb3a05c437 | |||
| d29a0d64d5 | |||
| 09ad00b2d1 | |||
| f8192f6e46 | |||
| f360b3b849 | |||
| 6253560ffa | |||
| 74c23bf80d | |||
| 8d14ff1446 | |||
| 2814103458 | |||
| 21a631dd4e | |||
| d0e61d82c0 | |||
| 0edf5a2ab5 | |||
| 597d94bd3a | |||
| 73565728c7 | |||
| 3b53c5ada1 | |||
| cbdbeb3e69 | |||
| 80c1afde0f | |||
| c11665e92f | |||
| 333bd8f394 | |||
| e668e053c2 | |||
| ba9aa47260 | |||
| deda3d3a3c | |||
| ec028faa1b | |||
| 06adef7343 | |||
| 69c993092b | |||
| d25487dfb9 | |||
| f3f26f7cb3 | |||
| 90125ab639 | |||
| a16ae30a61 | |||
| 175207659a | |||
| 5129eb1d43 | |||
| 8f08e029d8 | |||
| 5c6c12dc3a | |||
| 734fa91e63 | |||
| 1d5eba4470 | |||
| 758d9db964 | |||
| 1d8b03964f | |||
| 4fa0937a55 | |||
| 82dc89bfd2 | |||
| a0bd811093 | |||
| c1d6d24b9d | |||
| e2871f0dcd | |||
| 4393c3ef7f | |||
| 59d48b9b1f | |||
| e8b1bbac83 | |||
| 885200f833 | |||
| 044938bfd0 | |||
| ab7fb5b2e3 | |||
| 3df0d62725 | |||
| d1ce0bc071 | |||
| 9714c9aebe | |||
| 2fcef3e8e2 | |||
| d7651ea0d0 | |||
| dd55c98139 | |||
| bb5ba482bc | |||
| 5903b002ac | |||
| 97b6eabe0c | |||
| 1326eb4ef7 | |||
| 0eee55c0dd | |||
| f8dee4e726 | |||
| 2c3bdfe2ea | |||
| ffeb4495fe | |||
| be555e3578 | |||
| eec97a5cf1 | |||
| fa3709451b | |||
| eaa6257baf | |||
| f2fd9ab1b0 | |||
| b5e98ac1b7 | |||
| b83c49befb | |||
| 4cb35a285b | |||
| 0b5b2a424c | |||
| 0868907359 | |||
| 670df2ea6d | |||
| 0970dbcdf3 | |||
| fbda8a2e2b | |||
| 3d34dddbc0 | |||
| 3b3b7e09ec | |||
| 5d26f88bd5 | |||
| 51977c64ee | |||
| 42216f52ab | |||
| 760c4e94d5 | |||
| a4e0fd7883 | |||
| 2287fa126c | |||
| fd4f49512d | |||
| 7d8acb8def | |||
| e7bf7e6031 | |||
| 518d9beb83 | |||
| 2ed4d4a30a | |||
| d2dc7a53c2 | |||
| 80cc860810 | |||
| 39289a6952 | |||
| 1761cacaa1 | |||
| f33b405152 | |||
| aec65112b5 | |||
| cce91eef61 | |||
| 46a839cbca | |||
| c5e31b1723 | |||
| 20d55e5fed | |||
| 01e3ccfd69 | |||
| 36541d61ab | |||
| a436e89b83 | |||
| faf7dda9d3 | |||
| d3139e47f8 | |||
| c893a90d64 | |||
| 586d50ff99 | |||
| ba9879f8fa | |||
| 3cd48db9a9 | |||
| 454a8ae26a | |||
| 9de9e37539 | |||
| 949191215b | |||
| decf844788 | |||
| 642dec3625 | |||
| 8e82dd0b5b | |||
| 5f13e2e336 | |||
| 4153d76810 | |||
| a66811a597 | |||
| 839dd66c3b | |||
| 7a8c132ee9 | |||
| 1e18d716c2 | |||
| 81193e9338 | |||
| d1cad5afa4 | |||
| 2a535bdce8 | |||
| 52244f690e | |||
| eaf681675a | |||
| 2385c06696 | |||
| 81e0f5bc7d | |||
| 18e277d9d3 | |||
| 025a4558fb | |||
| 85ca7fed93 | |||
| 7637eb863a | |||
| f9b7659b56 | |||
| 6195f7810a | |||
| ecba9b6738 | |||
| 93e3b3d5ba | |||
| 417bdb0488 | |||
| 8ea3b29c17 | |||
| 81f1001b2c | |||
| 99f98890c2 | |||
| 5f0026893f | |||
| 4f943a73bc | |||
| e31923be8d | |||
| 395235a529 | |||
| 55848a4bd8 | |||
| 19e768d43d | |||
| 3c7cdcdc22 | |||
| e0d487e339 | |||
| defff1e4a8 | |||
| 05a6d48753 | |||
| b12eb33feb | |||
| 00749d8ef0 | |||
| 59d047c1d7 | |||
| fb6b62a01b | |||
| 1bb5791e64 | |||
| e47316c9d3 | |||
| 88c0688961 | |||
| aa9cad0cc6 | |||
| 0950527437 | |||
| b7306ef07f | |||
| 0fc3fea8df | |||
| b5677907d0 | |||
| 6f40d57e14 | |||
| 2aaf66b789 | |||
| fdd85a529a | |||
| 477e36afab | |||
| 1068798465 | |||
| 4f375cd17d | |||
| 98159c0507 | |||
| ea345b1db7 | |||
| 51a0f7aaba | |||
| ab7f1a0608 | |||
| 201bbaacfc | |||
| 3929deed10 | |||
| 435981056e | |||
| e6f46f3832 | |||
| 1aea024589 | |||
| ce6a691999 | |||
| 10d73155b0 | |||
| 4b1b02a17d | |||
| f0bca012a5 | |||
| 56d355f8de | |||
| f5fc851925 | |||
| 7378905053 | |||
| 76b0df6ba1 | |||
| df8420aa62 | |||
| 72a047d549 | |||
| 3a511e4583 | |||
| e8d3ea803d | |||
| c5a4230a6a | |||
| 5249765508 | |||
| fdf83f1416 | |||
| e1b998e40a | |||
| 4277fcb32c | |||
| 9a4af6bd7c | |||
| 59265034ae | |||
| 0ac0324af2 | |||
| f38f2ace5a | |||
| b10831d58e | |||
| 817eb5a5ba | |||
| f36f91dfb5 | |||
| 172ea8c71c | |||
| da9748fb21 | |||
| be58e137c5 | |||
| 8519451161 | |||
| 7c1adff8ad | |||
| eca1509cb2 | |||
| 17b05c150c | |||
| bdf69db0a8 | |||
| ba48ce8586 | |||
| 5cce532a29 | |||
| a20eacaa48 | |||
| 4f042533a5 | |||
| 6e8da93c42 | |||
| bb33a26e62 | |||
| da2eaa6b09 | |||
| 8244284116 | |||
| db204c13f2 | |||
| 08d9aeff41 | |||
| aa1b4eded6 | |||
| 684692091e | |||
| ccca1ade2d | |||
| dc9e469c4c | |||
| ec028bf747 | |||
| 009920f393 | |||
| 666d95285b | |||
| b692d91ca3 | |||
| f4c31565bc | |||
| cf0604da07 | |||
| 55acb65e27 | |||
| 4f465c2d07 | |||
| 77519e9f14 | |||
| 22baf3356a | |||
| 360c553228 | |||
| b4d69527e6 | |||
| 4aba382b01 | |||
| 2c445743e9 | |||
| 6f38814541 | |||
| 7251850028 | |||
| 6eb268f63f | |||
| ae547c3044 | |||
| 23dd2cb6e7 | |||
| 8385cddd8d | |||
| ab5133514c | |||
| 75eb93140f | |||
| 8be7a0b131 | |||
| cd6468d6de | |||
| 822254291f | |||
| e29bf84f06 | |||
| 44800e9899 | |||
| 6e85c060a9 | |||
| 7c6d33b0d2 | |||
| 86b65e52c4 | |||
| 6310a00d7e | |||
| 6b93d20e4e | |||
| 909fac6d90 | |||
| 6c328ec096 | |||
| 1951d3a37a | |||
| aa7236e03c | |||
| 574153a810 | |||
| 3b30cc90f1 | |||
| f30b774f26 | |||
| 1063b3b2b8 | |||
| 93560836de | |||
| ff26b7446c | |||
| 7b6ad28a5d | |||
| 5d01a2f467 | |||
| 6e197d4a42 | |||
| a5b20fec2f | |||
| 348e989a50 | |||
| b19846aca1 | |||
| d951ba83e6 | |||
| 203a445bc1 | |||
| 9edefa645d | |||
| 4608e1f590 | |||
| 794f8f1329 | |||
| b1f3dfab28 | |||
| 2d6c84a817 | |||
| 23291a0466 | |||
| 83a1a70103 | |||
| 47f6fc1e07 | |||
| 88b34d2bb6 | |||
| f36fdc74ac | |||
| ff258d43e7 | |||
| d8ef6faa80 | |||
| 59eb77fd28 | |||
| dde0e9ee0a | |||
| 860d98a897 | |||
| 3abd307691 | |||
| 000818f5e4 | |||
| 1bbf55a7f7 | |||
| 298a357a43 | |||
| 44d2c5ef88 | |||
| 1600f7d4ee | |||
| 71a4c04dd5 | |||
| 0eef0ff0de | |||
| 1d0ee83e18 | |||
| db8631e49a | |||
| 2e295759f2 | |||
| d8582b7506 | |||
| 7f656b867f | |||
| 077fed1d88 | |||
| 152c5d2616 | |||
| 26c5bbc5a7 | |||
| 344e6b857a | |||
| 81e52138cc | |||
| a27a9b63e4 | |||
| 8b7c274db5 | |||
| 7bed539fdb | |||
| e990fd23f1 | |||
| 172ce67344 | |||
| a8d83aec89 | |||
| 38e5883d44 | |||
| e7c6abd767 | |||
| 9f7405b3f0 | |||
| d3f8111fe7 | |||
| ab43113f73 | |||
| d1a807fdf8 | |||
| 8df42a84a4 | |||
| 8f462b5717 | |||
| ace3e50898 | |||
| 68c1f05aeb | |||
| 1f770bb103 | |||
| e25567a5dd | |||
| 9951f28892 | |||
| 83ab68b36f | |||
| 80929c2637 | |||
| d786fb99e2 | |||
| a0fc5f7b52 | |||
| a6d39b7192 | |||
| ea87cd975d | |||
| 417a82fd95 | |||
| b781f76711 | |||
| 228d6050a4 | |||
| fd50f452ff | |||
| 6eedb64777 | |||
| 46776de90b | |||
| dfcef11bca | |||
| f1757f30cb | |||
| ddab1533c5 | |||
| 44c7f86f49 | |||
| 915c4b9ce2 | |||
| d7cc26cc17 | |||
| 5bc5ba7ee3 | |||
| 82df656cc7 | |||
| 51d09bb9c9 | |||
| 5a1f1305f0 | |||
| 3cf31205bc | |||
| 26a40373fc | |||
| 6b9e7defac | |||
| a63d9cc550 | |||
| 1e84cded98 | |||
| bb0cc1bbbc | |||
| 941ffea81c | |||
| 737cee4b8c | |||
| d3165cca4f | |||
| 2060ba3556 | |||
| e56ead5e1c | |||
| 4c93153194 | |||
| 8b9e68c32d | |||
| b2d3fffe74 | |||
| b5c5b175f1 | |||
| ecf19344f6 | |||
| b2473e57dd | |||
| d38aaa0c7e | |||
| 8696f98c3b | |||
| adee17847c | |||
| a7d82bd73b | |||
| de67c3f235 | |||
| 59a699063a | |||
| ff800e08fd | |||
| c0190eff00 | |||
| 4e445f2c55 | |||
| 9da817eae0 | |||
| a77e513443 | |||
| 664d386623 | |||
| 7cf4009838 | |||
| f8e30f49d7 | |||
| 5c087727a9 | |||
| 3b431f2f72 | |||
| e5b43d48ee | |||
| 8282d732c1 | |||
| 82f41d6e46 | |||
| b8c65078fc | |||
| 04419af419 | |||
| ed6a5ff7e5 | |||
| 956680104b | |||
| 3958ff8627 | |||
| 99b71c1dde | |||
| 73ddc762c8 | |||
| 7a5b3a1e6a | |||
| e2568d7589 | |||
| 0b1d754e7d | |||
| bbc2ee6da1 | |||
| 6ebf8ea230 | |||
| b96ceb4256 | |||
| b6dbc4c5c1 | |||
| 12b018e619 | |||
| 9b80e1e04a | |||
| bf6a1816b4 | |||
| 4f05a66ee1 | |||
| dcc9b0d437 | |||
| 622d100c30 | |||
| 74997a5251 | |||
| 50148f7185 | |||
| 8f57a3e28a | |||
| 2511e869e2 | |||
| aa612124f2 | |||
| 3e050fb35a | |||
| 3dee10636c | |||
| eb3bdb7550 | |||
| 33fdb9ab8b | |||
| 97c19de8b9 | |||
| 4e19c59ab3 | |||
| 9cf5b96971 | |||
| 0eed5e0667 | |||
| 69a710fef1 | |||
| d2613ce077 | |||
| f2e222b9e8 | |||
| a6ee4a0468 | |||
| d3b8f30818 | |||
| 2390f6d3ab | |||
| d8b1343279 | |||
| eacb6b6e8b | |||
| 7efffc1548 | |||
| 10e366ebd7 | |||
| 95590adf07 | |||
| be67acbd48 | |||
| 8d06cf7b84 | |||
| 216f9b45cc | |||
| 645b586041 | |||
| 1962c13455 | |||
| 069ec3f9a9 | |||
| 56035e9965 | |||
| 4e3b566f72 | |||
| d65c99f38b | |||
| 90c7d28055 | |||
| 8b684637bc | |||
| d2df00bfca | |||
| 25ec0fecfa | |||
| 227b96b28b | |||
| a2fc7da587 | |||
| a2c013c8c7 | |||
| f27196214b | |||
| aa616cd410 | |||
| 5926159890 | |||
| c9f88297b8 | |||
| 5cc87abb3a | |||
| 355dfed437 | |||
| 802ae73b13 | |||
| 549c814e8d | |||
| 564fbc8dec | |||
| 972248c333 | |||
| df44bcc5ae | |||
| 3293823642 | |||
| 24b302c001 | |||
| 4714fb8fcb | |||
| 2a54fd1444 | |||
| b0ff3a4c6d | |||
| 7aadfe32e7 | |||
| 8ce9306b27 | |||
| 438e894899 | |||
| 80682ec61e | |||
| deaa70c2cc | |||
| 7535c21894 | |||
| 8327667988 | |||
| b6b4bf0959 | |||
| d60619f8e5 | |||
| 658e1ebe5a | |||
| 54963cc898 | |||
| ad879a1f90 | |||
| 513f25d42c | |||
| 2559745f54 | |||
| 7326fe1136 | |||
| 97a43f0c2f | |||
| 279b73fecd | |||
| 87b655e59e | |||
| 677d490b5c | |||
| 6ee4ba6932 | |||
| 77cef3bef2 | |||
| 4a857f1af6 | |||
| 50a1352f7f | |||
| 1d0739d6d1 | |||
| 69a7d4e0a5 | |||
| 2fb35f7991 | |||
| 5fe15c7f10 | |||
| 094bebcc2d | |||
| abb15bc30a | |||
| 8e18e05d1d | |||
| aa80882bdf | |||
| e4466b55b5 | |||
| 60ea0f1222 | |||
| b60efb4230 | |||
| 2f4a42b313 | |||
| fff4d71ba5 | |||
| e1ab285435 | |||
| 26ebeadfaa | |||
| 30e4b85587 | |||
| 44edffa0a9 | |||
| 20b57f9d38 | |||
| ddf5d68815 | |||
| 298863c2d0 | |||
| 8e8787ad63 | |||
| 12151e62ee | |||
| efc1029226 | |||
| 1b09733e7c | |||
| d8ef9bda18 | |||
| 1b870377b1 | |||
| 267c247da7 | |||
| 95296191a2 | |||
| 8ab368559a | |||
| bb111b928b | |||
| 91abf07087 | |||
| e642a64b68 | |||
| 64f077fd2a | |||
| 5fefa200ba | |||
| 4388719c5d | |||
| 46c2841904 | |||
| 03904697ac | |||
| 9bd230cf64 | |||
| 309890cb8c | |||
| f9f0ee0f21 | |||
| 640526f0c8 | |||
| 9af9596f69 | |||
| 6e9093c288 | |||
| 0c4e9980fb | |||
| 13a3fb1acc | |||
| 343dd1c0b8 | |||
| 64029ef8a6 | |||
| 524f4ee0cf | |||
| 34aeaec553 | |||
| 0e4b6b373d | |||
| 193a0e9273 | |||
| 39cc36d3f1 | |||
| 87d3a1ae4d | |||
| 5289c4135a | |||
| dcd7949544 | |||
| 277eb16d67 | |||
| 41ba4e507e | |||
| c9980c0a5c | |||
| 3e9504d306 | |||
| 1b68ee82ce | |||
| 4bf0e15653 | |||
| b63a55666d | |||
| f02ca2a9a3 | |||
| 4fb3ce4739 | |||
| 704640bf98 | |||
| b48a77c88a | |||
| db6de76acb | |||
| 15be1cb9a9 | |||
| 4817c0d055 | |||
| 893092ff7f | |||
| 8b7c1e9cec | |||
| 393ceb28fc | |||
| d9cb7be444 | |||
| 5837f067cf | |||
| 5e5a177934 | |||
| 0b5b03d9dc | |||
| 9288d80613 | |||
| 6698db29de | |||
| 25e86a520d | |||
| a6f7cda23e | |||
| b0e282a74b | |||
| 46ed54cd8e | |||
| 9c870baf84 | |||
| 21249f7c3d | |||
| 471c2b5d5c | |||
| e792c2b234 | |||
| daa85f71e1 | |||
| 9850ba0cbd | |||
| c0a8275cb0 | |||
| 318c419f77 | |||
| 7e1232269a | |||
| 62d52d62dc | |||
| 77cf42588f | |||
| 50f6c645de | |||
| 7ade65d44b | |||
| a979c428ee | |||
| 6920769a9a | |||
| 410aa0716d | |||
| 445a7f65cd | |||
| e64cfb13b8 | |||
| e374d87ac4 | |||
| 2296d98845 | |||
| 9aac3d8773 | |||
| 6569b9ba56 | |||
| 7ab9abe4ef | |||
| 3357170b18 | |||
| 2e746f2b8b | |||
| 594c075377 | |||
| 8bb1e91afd | |||
| a12d1b21b5 | |||
| 5bed2f351a | |||
| 209560fcd2 | |||
| ec9d7b639d | |||
| 1c97c1582c | |||
| f06f4b40b8 | |||
| 3235beef6d | |||
| e5ab783b08 | |||
| 355ebec92d | |||
| fa157f08ff | |||
| 39a545b3f8 | |||
| 226fe192a1 | |||
| e9bc9a2ab4 | |||
| b22c87183f | |||
| fa44130734 | |||
| 9b3f27f02a | |||
| 1d5fb360cc | |||
| a7398a0459 | |||
| 91c5c2538a | |||
| 259cf1b0b2 | |||
| 2338632270 | |||
| 2a88a3fd33 | |||
| 84470f6b2a | |||
| 10d72f31c2 | |||
| e04902f589 | |||
| 31d0b77df7 | |||
| 9e82533eb9 | |||
| 4410aac60b | |||
| d63d08ef8b | |||
| 5911dc597a | |||
| 5c2ff6ed19 | |||
| 6efad5e495 | |||
| 5f708d47ce | |||
| 23dbaaf03b | |||
| 3b4b9c6d68 | |||
| 8df47d76c7 | |||
| be55a49946 | |||
| e05af35678 | |||
| 060d16d26b | |||
| 0976d22225 | |||
| e17869ca20 | |||
| 1c3d06876e | |||
| 662105c1b6 | |||
| b8ddae61e2 | |||
| ece14af556 | |||
| b07a2aa23c | |||
| 88857e8028 | |||
| 8e808fcadc | |||
| da93a272a0 | |||
| fcd3b326e9 | |||
| 3d5b10735f | |||
| 94228d4522 | |||
| f054f566b4 | |||
| 167058b61f | |||
| f835245ee1 | |||
| 98c7bde514 | |||
| 38110e220d | |||
| 75e4867d22 | |||
| 9239fcf0da | |||
| 73c5675485 | |||
| 381ebc043f | |||
| c7e0a49c94 | |||
| 067622fcc6 | |||
| ae256576e1 | |||
| cbfcce09fa | |||
| a21201a713 | |||
| 53f2f188f2 | |||
| a6e95c7d25 | |||
| 97e6663bb3 | |||
| e2ceb1b800 | |||
| 8c93295d62 | |||
| c26242a553 | |||
| b825bc87ae | |||
| dac5f20a01 | |||
| b211fa4e1f | |||
| a4954a68e0 | |||
| 355cba4aa7 | |||
| 2f0164b995 | |||
| e287e14354 | |||
| 5e63ba970d | |||
| 2a46ab288e | |||
| 7999249a5c | |||
| 0ec9a7f090 | |||
| a47c5c093d | |||
| 5a674a8e10 | |||
| bcb8722513 | |||
| 4c34b3ad9c | |||
| 1b8b5c4b06 | |||
| 451c1fb5f9 | |||
| 4e19ff75b6 | |||
| 94caabf89a | |||
| f365448338 | |||
| 3d1536a1b2 | |||
| 8ab426c3a4 | |||
| 33d28c24bf | |||
| ac70048945 | |||
| 40a4a716e1 | |||
| 802f147686 | |||
| 80a0f935a1 | |||
| de3c9bade6 | |||
| 7f8ff0a724 | |||
| 3a8923be74 | |||
| 723a34d9c7 | |||
| 2efd5b119d | |||
| b105e47cb5 | |||
| 0c2cefed8f | |||
| 41dcbe89dd | |||
| 70a64355f6 | |||
| aefd2a5c4b | |||
| e37a1ded0d | |||
| 3e28243076 | |||
| bbb94b8f68 | |||
| a277b43e30 | |||
| 8a994fb1b1 | |||
| 9ee92f1246 | |||
| ac2ac99e15 | |||
| 72e9534d11 | |||
| c1cc79176c | |||
| f25dccd6d1 | |||
| cd09a83cfa | |||
| 9bbc2df217 | |||
| 74d430cb97 | |||
| ca13f4c3dd | |||
| 9d4d53e2fd | |||
| 00896f1713 | |||
| c3a9e95a5f | |||
| 0afd25a010 | |||
| 5b87843fae | |||
| 386b74f8c2 | |||
| 2a963fb5d1 | |||
| d69c5317df | |||
| 2864ef8c7f | |||
| 534bbb81ff | |||
| 3e5485de92 | |||
| 9e147e9ac4 | |||
| 8ab2e420f6 | |||
| b4c53af07d |
@@ -17,5 +17,3 @@
|
|||||||
*.png binary
|
*.png binary
|
||||||
*.jpg binary
|
*.jpg binary
|
||||||
*.fon binary
|
*.fon binary
|
||||||
*.bin binary
|
|
||||||
*.woff binary
|
|
||||||
|
|||||||
+1
-3
@@ -1,3 +1 @@
|
|||||||
github: [thinkyhead]
|
custom: http://www.thinkyhead.com/donate-to-marlin
|
||||||
patreon: thinkyhead
|
|
||||||
custom: ["https://www.thinkyhead.com/donate-to-marlin"]
|
|
||||||
|
|||||||
+11
-10
@@ -34,15 +34,16 @@ This project and everyone participating in it is governed by the [Marlin Code of
|
|||||||
|
|
||||||
We have a Message Board and a Facebook group where our knowledgable user community can provide helpful advice if you have questions.
|
We have a Message Board and a Facebook group where our knowledgable user community can provide helpful advice if you have questions.
|
||||||
|
|
||||||
* [Marlin RepRap forum](https://reprap.org/forum/list.php?415)
|
* [Marlin RepRap forum](http://forums.reprap.org/list.php?415)
|
||||||
* [MarlinFirmware on Facebook](https://www.facebook.com/groups/1049718498464482/)
|
* [MarlinFirmware on Facebook](https://www.facebook.com/groups/1049718498464482/)
|
||||||
|
|
||||||
If chat is more your speed, you can join the MarlinFirmware Discord server:
|
If chat is more your speed, you can join the MarlinFirmware Slack team:
|
||||||
|
|
||||||
* Use the link https://discord.gg/n5NJ59y to join up as a General User.
|
* Join the Marlin Slack Team
|
||||||
* Even though our Discord is pretty active, it may take a while for community members to respond — please be patient!
|
* To obtain group access, please [send a request](http://www.thinkyhead.com/contact/9) to @thinkyhead.
|
||||||
* Use the `#general` channel for general questions or discussion about Marlin.
|
* Even though Slack is a chat service, sometimes it takes several hours for community members to respond — please be patient!
|
||||||
* Other channels exist for certain topics or are limited to Patrons. Check the channel list.
|
* Use the `#general` channel for general questions or discussion about Marlin.
|
||||||
|
* Other channels exist for certain topics. Check the channel list.
|
||||||
|
|
||||||
## How Can I Contribute?
|
## How Can I Contribute?
|
||||||
|
|
||||||
@@ -92,7 +93,7 @@ Before creating a suggestion, please check [this list](#before-submitting-a-sugg
|
|||||||
|
|
||||||
#### Before Submitting a Feature Request
|
#### Before Submitting a Feature Request
|
||||||
|
|
||||||
* **Check the [Marlin website](https://marlinfw.org/)** for tips — you might discover that the feature is already included. Most importantly, check if you're using [the latest version of Marlin](https://github.com/MarlinFirmware/Marlin/releases) and if you can get the desired behavior by changing [Marlin's config settings](https://marlinfw.org/docs/configuration/configuration.html).
|
* **Check the [Marlin website](http://marlinfw.org/)** for tips — you might discover that the feature is already included. Most importantly, check if you're using [the latest version of Marlin](https://github.com/MarlinFirmware/Marlin/releases) and if you can get the desired behavior by changing [Marlin's config settings](http://marlinfw.org/docs/configuration/configuration.html).
|
||||||
* **Perform a [cursory search](https://github.com/MarlinFirmware/Marlin/issues?q=is%3Aissue)** to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
|
* **Perform a [cursory search](https://github.com/MarlinFirmware/Marlin/issues?q=is%3Aissue)** to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
|
||||||
|
|
||||||
#### How Do I Submit A (Good) Feature Request?
|
#### How Do I Submit A (Good) Feature Request?
|
||||||
@@ -116,12 +117,12 @@ Unsure where to begin contributing to Marlin? You can start by looking through t
|
|||||||
|
|
||||||
### Pull Requests
|
### Pull Requests
|
||||||
|
|
||||||
Pull Requests should always be targeted to working branches (e.g., `bugfix-1.1.x` and/or `bugfix-2.0.x`) and never to release branches (e.g., `1.1.x`). If this is your first Pull Request, please read our [Guide to Pull Requests](https://marlinfw.org/docs/development/getting_started_pull_requests.html) and Github's [Pull Request](https://help.github.com/articles/creating-a-pull-request/) documentation.
|
Pull Requests should always be targeted to working branches (e.g., `bugfix-1.1.x` and/or `bugfix-2.0.x`) and never to release branches (e.g., `1.1.x`). If this is your first Pull Request, please read our [Guide to Pull Requests](http://marlinfw.org/docs/development/getting_started_pull_requests.html) and Github's [Pull Request](https://help.github.com/articles/creating-a-pull-request/) documentation.
|
||||||
|
|
||||||
* Fill in [the required template](pull_request_template.md).
|
* Fill in [the required template](pull_request_template.md).
|
||||||
* Don't include issue numbers in the PR title.
|
* Don't include issue numbers in the PR title.
|
||||||
* Include pictures, diagrams, and links to videos in your Pull Request to demonstrate your changes, if needed.
|
* Include pictures, diagrams, and links to videos in your Pull Request to demonstrate your changes, if needed.
|
||||||
* Follow the [Coding Standards](https://marlinfw.org/docs/development/coding_standards.html) posted on our website.
|
* Follow the [Coding Standards](http://marlinfw.org/docs/development/coding_standards.html) posted on our website.
|
||||||
* Document new code with clear and concise comments.
|
* Document new code with clear and concise comments.
|
||||||
* End all files with a newline.
|
* End all files with a newline.
|
||||||
|
|
||||||
@@ -136,7 +137,7 @@ Pull Requests should always be targeted to working branches (e.g., `bugfix-1.1.x
|
|||||||
|
|
||||||
### C++ Coding Standards
|
### C++ Coding Standards
|
||||||
|
|
||||||
* Please read and follow the [Coding Standards](https://marlinfw.org/docs/development/coding_standards.html) posted on our website. Failure to follow these guidelines will delay evaluation and acceptance of Pull Requests.
|
* Please read and follow the [Coding Standards](http://marlinfw.org/docs/development/coding_standards.html) posted on our website. Failure to follow these guidelines will delay evaluation and acceptance of Pull Requests.
|
||||||
|
|
||||||
### Documentation
|
### Documentation
|
||||||
|
|
||||||
|
|||||||
@@ -2,13 +2,9 @@
|
|||||||
|
|
||||||
Have you read Marlin's Code of Conduct? By filing an Issue, you are expected to comply with it, including treating everyone with respect: https://github.com/MarlinFirmware/Marlin/blob/bugfix-2.0.x/.github/code_of_conduct.md
|
Have you read Marlin's Code of Conduct? By filing an Issue, you are expected to comply with it, including treating everyone with respect: https://github.com/MarlinFirmware/Marlin/blob/bugfix-2.0.x/.github/code_of_conduct.md
|
||||||
|
|
||||||
Do you want to ask a question? Are you looking for support? Please don't post here. Instead use one of the following options:
|
Do you want to ask a question? Are you looking for support? Please don't post here. Instead please use the Marlin Firmware forum at http://forums.reprap.org/list.php?415 or the Marlin Facebook Group https://www.facebook.com/groups/1049718498464482/ or the Marlin Discord Server https://discord.gg/n5NJ59y.
|
||||||
|
|
||||||
- The Marlin Firmware forum at https://reprap.org/forum/list.php?415
|
Before filing an issue be sure to test the 1.1 and/or 2.0 "bugfix" branches to see whether the issue is already addressed.
|
||||||
- The MarlinFirmware Facebook Group at https://www.facebook.com/groups/1049718498464482/
|
|
||||||
- The MarlinFirmware Discord Server at https://discord.gg/n5NJ59y.
|
|
||||||
|
|
||||||
Before filing an issue be sure to test the latest "bugfix" branch to see whether the issue is already addressed.
|
|
||||||
|
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
|||||||
@@ -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,10 +14,6 @@ We must be able to understand your proposed change from this description. If we
|
|||||||
|
|
||||||
<!-- What does this fix or improve? -->
|
<!-- What does this fix or improve? -->
|
||||||
|
|
||||||
### Configurations
|
|
||||||
|
|
||||||
<!-- Attach any Configuration.h, Configuration_adv.h, or platformio.ini files needed to compile/test your Pull Request. -->
|
|
||||||
|
|
||||||
### Related Issues
|
### Related Issues
|
||||||
|
|
||||||
<!-- Whether this fixes a bug or fulfills a feature request, please list any related Issues here. -->
|
<!-- Whether this fixes a bug or fulfills a feature request, please list any related Issues here. -->
|
||||||
|
|||||||
@@ -1,121 +0,0 @@
|
|||||||
#
|
|
||||||
# test-builds.yml
|
|
||||||
# Do test builds to catch compile errors
|
|
||||||
#
|
|
||||||
|
|
||||||
name: CI
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- bugfix-2.0.x
|
|
||||||
paths-ignore:
|
|
||||||
- config/**
|
|
||||||
- data/**
|
|
||||||
- docs/**
|
|
||||||
- '**/*.md'
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- bugfix-2.0.x
|
|
||||||
paths-ignore:
|
|
||||||
- config/**
|
|
||||||
- data/**
|
|
||||||
- docs/**
|
|
||||||
- '**/*.md'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test_builds:
|
|
||||||
name: Run All Tests
|
|
||||||
if: github.repository == 'MarlinFirmware/Marlin'
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
test-platform:
|
|
||||||
# Base Environments
|
|
||||||
|
|
||||||
- DUE
|
|
||||||
- DUE_archim
|
|
||||||
- esp32
|
|
||||||
- linux_native
|
|
||||||
- mega2560
|
|
||||||
- at90usb1286_dfu
|
|
||||||
- teensy31
|
|
||||||
- teensy35
|
|
||||||
- teensy41
|
|
||||||
- SAMD51_grandcentral_m4
|
|
||||||
|
|
||||||
# Extended AVR Environments
|
|
||||||
|
|
||||||
- FYSETC_F6
|
|
||||||
- mega1280
|
|
||||||
- rambo
|
|
||||||
- sanguino1284p
|
|
||||||
- sanguino644p
|
|
||||||
|
|
||||||
# STM32F1 (Maple) Environments
|
|
||||||
|
|
||||||
- STM32F103RC_btt
|
|
||||||
- STM32F103RC_btt_USB
|
|
||||||
- STM32F103RE_btt
|
|
||||||
- STM32F103RE_btt_USB
|
|
||||||
- STM32F103RC_fysetc
|
|
||||||
- STM32F103RC_meeb
|
|
||||||
- jgaurora_a5s_a1
|
|
||||||
- STM32F103VE_longer
|
|
||||||
- mks_robin
|
|
||||||
- mks_robin_lite
|
|
||||||
- mks_robin_pro
|
|
||||||
- STM32F103RET6_creality
|
|
||||||
- mks_robin_nano35
|
|
||||||
|
|
||||||
# STM32 (ST) Environments
|
|
||||||
|
|
||||||
- STM32F407VE_black
|
|
||||||
- STM32F401VE_STEVAL
|
|
||||||
- BIGTREE_BTT002
|
|
||||||
- BIGTREE_SKR_PRO
|
|
||||||
- BIGTREE_GTR_V1_0
|
|
||||||
- mks_robin_stm32
|
|
||||||
- ARMED
|
|
||||||
- FYSETC_S6
|
|
||||||
- STM32F070CB_malyan
|
|
||||||
- STM32F070RB_malyan
|
|
||||||
- malyan_M300
|
|
||||||
- FLYF407ZG
|
|
||||||
- rumba32
|
|
||||||
- LERDGEX
|
|
||||||
- mks_robin_nano35_stm32
|
|
||||||
- NUCLEO_F767ZI
|
|
||||||
- REMRAM_V1
|
|
||||||
|
|
||||||
# Put lengthy tests last
|
|
||||||
|
|
||||||
- LPC1768
|
|
||||||
- LPC1769
|
|
||||||
|
|
||||||
# Non-working environment tests
|
|
||||||
#- at90usb1286_cdc
|
|
||||||
#- STM32F103CB_malyan
|
|
||||||
#- mks_robin_mini
|
|
||||||
|
|
||||||
steps:
|
|
||||||
|
|
||||||
- name: Select Python 3.7
|
|
||||||
uses: actions/setup-python@v1
|
|
||||||
with:
|
|
||||||
python-version: '3.7' # Version range or exact version of a Python version to use, using semvers version range syntax.
|
|
||||||
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
|
|
||||||
|
|
||||||
- name: Install PlatformIO
|
|
||||||
run: |
|
|
||||||
pip install -U https://github.com/platformio/platformio-core/archive/develop.zip
|
|
||||||
platformio update
|
|
||||||
|
|
||||||
- name: Check out the PR
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Run ${{ matrix.test-platform }} Tests
|
|
||||||
run: |
|
|
||||||
make tests-single-ci TEST_TARGET=${{ matrix.test-platform }}
|
|
||||||
+10
-16
@@ -16,12 +16,12 @@
|
|||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
|
|
||||||
# Generated files
|
# Our automatic versioning scheme generates the following file
|
||||||
|
# NEVER put it in the repository
|
||||||
_Version.h
|
_Version.h
|
||||||
bdf2u8g
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# OS
|
# OS
|
||||||
@@ -77,6 +77,7 @@ tags
|
|||||||
*.out
|
*.out
|
||||||
*.app
|
*.app
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# C
|
# C
|
||||||
#
|
#
|
||||||
@@ -148,7 +149,7 @@ Marlin/*/*/*/*/readme.txt
|
|||||||
# Secure Credentials
|
# Secure Credentials
|
||||||
Configuration_Secure.h
|
Configuration_Secure.h
|
||||||
|
|
||||||
# Visual Studio
|
#Visual Studio
|
||||||
*.sln
|
*.sln
|
||||||
*.vcxproj
|
*.vcxproj
|
||||||
*.vcxproj.user
|
*.vcxproj.user
|
||||||
@@ -159,34 +160,27 @@ __vm/
|
|||||||
.vs/
|
.vs/
|
||||||
vc-fileutils.settings
|
vc-fileutils.settings
|
||||||
|
|
||||||
# Visual Studio Code
|
#Visual Studio Code
|
||||||
.vscode
|
.vscode
|
||||||
.vscode/.browse.c_cpp.db*
|
.vscode/.browse.c_cpp.db*
|
||||||
.vscode/c_cpp_properties.json
|
.vscode/c_cpp_properties.json
|
||||||
.vscode/launch.json
|
.vscode/launch.json
|
||||||
.vscode/*.db
|
.vscode/*.db
|
||||||
|
|
||||||
# cmake
|
#cmake
|
||||||
CMakeLists.txt
|
CMakeLists.txt
|
||||||
src/CMakeLists.txt
|
src/CMakeLists.txt
|
||||||
CMakeListsPrivate.txt
|
CMakeListsPrivate.txt
|
||||||
|
|
||||||
# CLion
|
#CLion
|
||||||
cmake-build-*
|
cmake-build-*
|
||||||
|
|
||||||
# Eclipse
|
#Eclipse
|
||||||
.project
|
.project
|
||||||
.cproject
|
.cproject
|
||||||
.pydevproject
|
.pydevproject
|
||||||
.settings
|
.settings
|
||||||
.classpath
|
.classpath
|
||||||
|
|
||||||
# Python
|
#Python
|
||||||
__pycache__
|
__pycache__
|
||||||
|
|
||||||
# IOLogger logs
|
|
||||||
*_log.csv
|
|
||||||
|
|
||||||
# Simulation / Native
|
|
||||||
eeprom.dat
|
|
||||||
imgui.ini
|
|
||||||
|
|||||||
+84
@@ -0,0 +1,84 @@
|
|||||||
|
dist: bionic
|
||||||
|
sudo: false
|
||||||
|
|
||||||
|
language: python
|
||||||
|
python:
|
||||||
|
- "3.7"
|
||||||
|
|
||||||
|
notifications:
|
||||||
|
email: false
|
||||||
|
|
||||||
|
env:
|
||||||
|
# Base Environments
|
||||||
|
- TEST_PLATFORM="DUE"
|
||||||
|
- TEST_PLATFORM="esp32"
|
||||||
|
- TEST_PLATFORM="linux_native"
|
||||||
|
- TEST_PLATFORM="megaatmega2560"
|
||||||
|
- TEST_PLATFORM="teensy31"
|
||||||
|
- TEST_PLATFORM="teensy35"
|
||||||
|
|
||||||
|
# Extended AVR Environments
|
||||||
|
- TEST_PLATFORM="FYSETC_F6_13"
|
||||||
|
- TEST_PLATFORM="megaatmega1280"
|
||||||
|
- TEST_PLATFORM="rambo"
|
||||||
|
- TEST_PLATFORM="sanguino_atmega1284p"
|
||||||
|
- TEST_PLATFORM="sanguino_atmega644p"
|
||||||
|
|
||||||
|
# Extended STM32 Environments
|
||||||
|
- TEST_PLATFORM="STM32F103RC_bigtree"
|
||||||
|
- TEST_PLATFORM="STM32F103RC_bigtree_USB"
|
||||||
|
- TEST_PLATFORM="STM32F103RE_bigtree"
|
||||||
|
- TEST_PLATFORM="STM32F103RE_bigtree_USB"
|
||||||
|
- TEST_PLATFORM="STM32F103RC_fysetc"
|
||||||
|
- TEST_PLATFORM="jgaurora_a5s_a1"
|
||||||
|
- TEST_PLATFORM="STM32F103VE_longer"
|
||||||
|
- TEST_PLATFORM="STM32F407VE_black"
|
||||||
|
- TEST_PLATFORM="BIGTREE_SKR_PRO"
|
||||||
|
- TEST_PLATFORM="mks_robin"
|
||||||
|
- TEST_PLATFORM="ARMED"
|
||||||
|
|
||||||
|
# STM32 with non-STM framework. both broken for now. they should use HAL_STM32 which is working.
|
||||||
|
#- TEST_PLATFORM="STM32F4"
|
||||||
|
#- TEST_PLATFORM="STM32F7"
|
||||||
|
|
||||||
|
# Put lengthy tests last
|
||||||
|
- TEST_PLATFORM="LPC1768"
|
||||||
|
- TEST_PLATFORM="LPC1769"
|
||||||
|
|
||||||
|
# Non-working environment tests
|
||||||
|
#- TEST_PLATFORM="BIGTREE_BTT002" this board isn't released yet. we need pinout to be sure about what we do
|
||||||
|
#- TEST_PLATFORM="at90usb1286_cdc"
|
||||||
|
#- TEST_PLATFORM="at90usb1286_dfu"
|
||||||
|
#- TEST_PLATFORM="STM32F103CB_malyan"
|
||||||
|
#- TEST_PLATFORM="mks_robin_lite"
|
||||||
|
#- TEST_PLATFORM="mks_robin_mini"
|
||||||
|
#- TEST_PLATFORM="mks_robin_nano"
|
||||||
|
#- TEST_PLATFORM="SAMD51_grandcentral_m4"
|
||||||
|
|
||||||
|
before_install:
|
||||||
|
#
|
||||||
|
# Fetch the tag information for the current branch
|
||||||
|
- git fetch origin --tags
|
||||||
|
#
|
||||||
|
# Publish the buildroot script folder
|
||||||
|
- chmod +x ${TRAVIS_BUILD_DIR}/buildroot/bin/*
|
||||||
|
- chmod +x ${TRAVIS_BUILD_DIR}/buildroot/share/tests/*
|
||||||
|
- export PATH=${TRAVIS_BUILD_DIR}/buildroot/bin/:${TRAVIS_BUILD_DIR}/buildroot/share/tests/:${PATH}
|
||||||
|
|
||||||
|
install:
|
||||||
|
#- pip install -U platformio
|
||||||
|
- pip install -U https://github.com/platformio/platformio-core/archive/master.zip
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
# Update PlatformIO packages
|
||||||
|
- platformio update
|
||||||
|
#
|
||||||
|
# Change current working directory to the build dir
|
||||||
|
- cd ${TRAVIS_BUILD_DIR}
|
||||||
|
#
|
||||||
|
# Generate custom version include
|
||||||
|
- generate_version ${TRAVIS_BUILD_DIR}/Marlin/
|
||||||
|
- cat ${TRAVIS_BUILD_DIR}/Marlin/Version.h
|
||||||
|
#
|
||||||
|
script:
|
||||||
|
- run_tests ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
|
||||||
+2244
File diff suppressed because it is too large
Load Diff
+3094
File diff suppressed because it is too large
Load Diff
@@ -3,7 +3,7 @@
|
|||||||
GNU GENERAL PUBLIC LICENSE
|
GNU GENERAL PUBLIC LICENSE
|
||||||
Version 3, 29 June 2007
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
Copyright (c) 2007 Free Software Foundation, Inc. <https://www.fsf.org/>
|
Copyright (c) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
of this license document, but changing it is not allowed.
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
@@ -647,7 +647,7 @@ the "copyright" line and a pointer to where the full notice is found.
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
@@ -666,11 +666,12 @@ might be different; for a GUI interface, you would use an "about box".
|
|||||||
You should also get your employer (if you work as a programmer) or school,
|
You should also get your employer (if you work as a programmer) or school,
|
||||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||||
For more information on this, and how to apply and follow the GNU GPL, see
|
For more information on this, and how to apply and follow the GNU GPL, see
|
||||||
<https://www.gnu.org/licenses/>.
|
<http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
The GNU General Public License does not permit incorporating your program
|
The GNU General Public License does not permit incorporating your program
|
||||||
into proprietary programs. If your program is a subroutine library, you
|
into proprietary programs. If your program is a subroutine library, you
|
||||||
may consider it more useful to permit linking proprietary applications with
|
may consider it more useful to permit linking proprietary applications with
|
||||||
the library. If this is what you want to do, use the GNU Lesser General
|
the library. If this is what you want to do, use the GNU Lesser General
|
||||||
Public License instead of this License. But first, please read
|
Public License instead of this License. But first, please read
|
||||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||||
|
|
||||||
|
|||||||
@@ -1,52 +0,0 @@
|
|||||||
help:
|
|
||||||
@echo "Tasks for local development:"
|
|
||||||
@echo "* tests-single-ci: Run a single test from inside the CI"
|
|
||||||
@echo "* tests-single-local: Run a single test locally"
|
|
||||||
@echo "* tests-single-local-docker: Run a single test locally, using docker-compose"
|
|
||||||
@echo "* tests-all-local: Run all tests locally"
|
|
||||||
@echo "* tests-all-local-docker: Run all tests locally, using docker-compose"
|
|
||||||
@echo "* setup-local-docker: Setup local docker-compose"
|
|
||||||
@echo ""
|
|
||||||
@echo "Options for testing:"
|
|
||||||
@echo " TEST_TARGET Set when running tests-single-*, to select the"
|
|
||||||
@echo " test. If you set it to ALL it will run all "
|
|
||||||
@echo " tests, but some of them are broken: use "
|
|
||||||
@echo " tests-all-* instead to run only the ones that "
|
|
||||||
@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 " 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!"
|
|
||||||
.PHONY: help
|
|
||||||
|
|
||||||
tests-single-ci:
|
|
||||||
export GIT_RESET_HARD=true
|
|
||||||
$(MAKE) tests-single-local TEST_TARGET=$(TEST_TARGET)
|
|
||||||
.PHONY: tests-single-ci
|
|
||||||
|
|
||||||
tests-single-local:
|
|
||||||
@if ! test -n "$(TEST_TARGET)" ; then echo "***ERROR*** Set TEST_TARGET=<your-module> or use make tests-all-local" ; return 1; fi
|
|
||||||
export PATH=./buildroot/bin/:./buildroot/tests/:${PATH} \
|
|
||||||
&& export VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) \
|
|
||||||
&& run_tests . $(TEST_TARGET) "$(ONLY_TEST)"
|
|
||||||
.PHONY: 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
|
|
||||||
docker-compose run --rm marlin $(MAKE) tests-single-local TEST_TARGET=$(TEST_TARGET) VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) GIT_RESET_HARD=$(GIT_RESET_HARD) ONLY_TEST="$(ONLY_TEST)"
|
|
||||||
.PHONY: tests-single-local-docker
|
|
||||||
|
|
||||||
tests-all-local:
|
|
||||||
export PATH=./buildroot/bin/:./buildroot/tests/:${PATH} \
|
|
||||||
&& export VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) \
|
|
||||||
&& for TEST_TARGET in $$(./get_test_targets.py) ; do echo "Running tests for $$TEST_TARGET" ; run_tests . $$TEST_TARGET ; done
|
|
||||||
.PHONY: tests-all-local
|
|
||||||
|
|
||||||
tests-all-local-docker:
|
|
||||||
docker-compose run --rm marlin $(MAKE) tests-all-local VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) GIT_RESET_HARD=$(GIT_RESET_HARD)
|
|
||||||
.PHONY: tests-all-local-docker
|
|
||||||
|
|
||||||
setup-local-docker:
|
|
||||||
docker-compose build
|
|
||||||
.PHONY: setup-local-docker
|
|
||||||
+570
-750
File diff suppressed because it is too large
Load Diff
+551
-1195
File diff suppressed because it is too large
Load Diff
+143
-282
@@ -14,7 +14,7 @@
|
|||||||
# Detailed instructions for using the makefile:
|
# Detailed instructions for using the makefile:
|
||||||
#
|
#
|
||||||
# 1. Modify the line containing "ARDUINO_INSTALL_DIR" to point to the directory that
|
# 1. Modify the line containing "ARDUINO_INSTALL_DIR" to point to the directory that
|
||||||
# contains the Arduino installation (for example, under macOS, this
|
# contains the Arduino installation (for example, under Mac OS X, this
|
||||||
# might be /Applications/Arduino.app/Contents/Resources/Java).
|
# might be /Applications/Arduino.app/Contents/Resources/Java).
|
||||||
#
|
#
|
||||||
# 2. Modify the line containing "UPLOAD_PORT" to refer to the filename
|
# 2. Modify the line containing "UPLOAD_PORT" to refer to the filename
|
||||||
@@ -22,10 +22,8 @@
|
|||||||
# (e.g. UPLOAD_PORT = /dev/tty.USB0). If the exact name of this file
|
# (e.g. UPLOAD_PORT = /dev/tty.USB0). If the exact name of this file
|
||||||
# changes, you can use * as a wild card (e.g. UPLOAD_PORT = /dev/tty.usb*).
|
# changes, you can use * as a wild card (e.g. UPLOAD_PORT = /dev/tty.usb*).
|
||||||
#
|
#
|
||||||
# 3. Set the line containing "MCU" to match your board's processor. Set
|
# 3. Set the line containing "MCU" to match your board's processor.
|
||||||
# "PROG_MCU" as the AVR part name corresponding to "MCU". You can use the
|
# Older one's are atmega8 based, newer ones like Arduino Mini, Bluetooth
|
||||||
# following command to get a list of correspondences: `avrdude -c alf -p x`
|
|
||||||
# Older boards are atmega8 based, newer ones like Arduino Mini, Bluetooth
|
|
||||||
# or Diecimila have the atmega168. If you're using a LilyPad Arduino,
|
# or Diecimila have the atmega168. If you're using a LilyPad Arduino,
|
||||||
# change F_CPU to 8000000. If you are using Gen7 electronics, you
|
# change F_CPU to 8000000. If you are using Gen7 electronics, you
|
||||||
# probably need to use 20000000. Either way, you must regenerate
|
# probably need to use 20000000. Either way, you must regenerate
|
||||||
@@ -36,18 +34,18 @@
|
|||||||
# 5. Type "make upload", reset your Arduino board, and press enter to
|
# 5. Type "make upload", reset your Arduino board, and press enter to
|
||||||
# upload your program to the Arduino board.
|
# upload your program to the Arduino board.
|
||||||
#
|
#
|
||||||
# Note that all settings at the top of this file can be overridden from
|
# Note that all settings at the top of this file can be overriden from
|
||||||
# the command line with, for example, "make HARDWARE_MOTHERBOARD=71"
|
# the command line with, for example, "make HARDWARE_MOTHERBOARD=71"
|
||||||
#
|
#
|
||||||
# To compile for RAMPS (atmega2560) with Arduino 1.6.9 at root/arduino you would use...
|
# To compile for RAMPS (atmega2560) with Arduino 1.6.9 at root/arduino you would use...
|
||||||
#
|
#
|
||||||
# make ARDUINO_VERSION=10609 AVR_TOOLS_PATH=/root/arduino/hardware/tools/avr/bin/ \
|
# make ARDUINO_VERSION=10609 AVR_TOOLS_PATH=/root/arduino/hardware/tools/avr/bin/ \
|
||||||
# HARDWARE_MOTHERBOARD=1200 ARDUINO_INSTALL_DIR=/root/arduino
|
# HARDWARE_MOTHERBOARD=33 ARDUINO_INSTALL_DIR=/root/arduino
|
||||||
#
|
#
|
||||||
# To compile and upload simply add "upload" to the end of the line...
|
# To compile and upload simply add "upload" to the end of the line...
|
||||||
#
|
#
|
||||||
# make ARDUINO_VERSION=10609 AVR_TOOLS_PATH=/root/arduino/hardware/tools/avr/bin/ \
|
# make ARDUINO_VERSION=10609 AVR_TOOLS_PATH=/root/arduino/hardware/tools/avr/bin/ \
|
||||||
# HARDWARE_MOTHERBOARD=1200 ARDUINO_INSTALL_DIR=/root/arduino upload
|
# HARDWARE_MOTHERBOARD=33 ARDUINO_INSTALL_DIR=/root/arduino upload
|
||||||
#
|
#
|
||||||
# If uploading doesn't work try adding the parameter "AVRDUDE_PROGRAMMER=wiring" or
|
# If uploading doesn't work try adding the parameter "AVRDUDE_PROGRAMMER=wiring" or
|
||||||
# start upload manually (using stk500) like so:
|
# start upload manually (using stk500) like so:
|
||||||
@@ -59,26 +57,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
# This defines the board to compile for (see boards.h for your board's ID)
|
# This defines the board to compile for (see boards.h for your board's ID)
|
||||||
HARDWARE_MOTHERBOARD ?= 1020
|
HARDWARE_MOTHERBOARD ?= 11
|
||||||
|
|
||||||
ifeq ($(OS),Windows_NT)
|
|
||||||
# Windows
|
|
||||||
ARDUINO_INSTALL_DIR ?= ${HOME}/Arduino
|
|
||||||
ARDUINO_USER_DIR ?= ${HOME}/Arduino
|
|
||||||
else
|
|
||||||
UNAME_S := $(shell uname -s)
|
|
||||||
ifeq ($(UNAME_S),Linux)
|
|
||||||
# Linux
|
|
||||||
ARDUINO_INSTALL_DIR ?= /usr/share/arduino
|
|
||||||
ARDUINO_USER_DIR ?= ${HOME}/Arduino
|
|
||||||
endif
|
|
||||||
ifeq ($(UNAME_S),Darwin)
|
|
||||||
# Darwin (macOS)
|
|
||||||
ARDUINO_INSTALL_DIR ?= /Applications/Arduino.app/Contents/Java
|
|
||||||
ARDUINO_USER_DIR ?= ${HOME}/Documents/Arduino
|
|
||||||
AVR_TOOLS_PATH ?= /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Arduino source install directory, and version number
|
# Arduino source install directory, and version number
|
||||||
# On most linuxes this will be /usr/share/arduino
|
# On most linuxes this will be /usr/share/arduino
|
||||||
@@ -88,44 +67,35 @@ ARDUINO_VERSION ?= 106
|
|||||||
# The installed Libraries are in the User folder
|
# The installed Libraries are in the User folder
|
||||||
ARDUINO_USER_DIR ?= ${HOME}/Arduino
|
ARDUINO_USER_DIR ?= ${HOME}/Arduino
|
||||||
|
|
||||||
# You can optionally set a path to the avr-gcc tools.
|
# You can optionally set a path to the avr-gcc tools. Requires a trailing slash. (ex: /usr/local/avr-gcc/bin)
|
||||||
# Requires a trailing slash. For example, /usr/local/avr-gcc/bin/
|
|
||||||
AVR_TOOLS_PATH ?=
|
AVR_TOOLS_PATH ?=
|
||||||
|
|
||||||
# Programmer configuration
|
#Programmer configuration
|
||||||
UPLOAD_RATE ?= 57600
|
UPLOAD_RATE ?= 57600
|
||||||
AVRDUDE_PROGRAMMER ?= arduino
|
AVRDUDE_PROGRAMMER ?= arduino
|
||||||
# On most linuxes this will be /dev/ttyACM0 or /dev/ttyACM1
|
# on most linuxes this will be /dev/ttyACM0 or /dev/ttyACM1
|
||||||
UPLOAD_PORT ?= /dev/ttyUSB0
|
UPLOAD_PORT ?= /dev/ttyUSB0
|
||||||
|
|
||||||
# Directory used to build files in, contains all the build files, from object
|
#Directory used to build files in, contains all the build files, from object files to the final hex file
|
||||||
# files to the final hex file on linux it is best to put an absolute path
|
#on linux it is best to put an absolute path like /home/username/tmp .
|
||||||
# like /home/username/tmp .
|
|
||||||
BUILD_DIR ?= applet
|
BUILD_DIR ?= applet
|
||||||
|
|
||||||
# This defines whether Liquid_TWI2 support will be built
|
# This defines whether Liquid_TWI2 support will be built
|
||||||
LIQUID_TWI2 ?= 0
|
LIQUID_TWI2 ?= 0
|
||||||
|
|
||||||
# This defines if Wire is needed
|
# this defines if Wire is needed
|
||||||
WIRE ?= 0
|
WIRE ?= 0
|
||||||
|
|
||||||
# This defines if Tone is needed (i.e SPEAKER is defined in Configuration.h)
|
# this defines if U8GLIB is needed (may require RELOC_WORKAROUND)
|
||||||
# Disabling this (and SPEAKER) saves approximatively 350 bytes of memory.
|
U8GLIB ?= 1
|
||||||
TONE ?= 1
|
|
||||||
|
|
||||||
# This defines if U8GLIB is needed (may require RELOC_WORKAROUND)
|
# this defines whether to include the Trinamic TMCStepper library
|
||||||
U8GLIB ?= 0
|
TMC ?= 1
|
||||||
|
|
||||||
# This defines whether to include the Trinamic TMCStepper library
|
|
||||||
TMC ?= 0
|
|
||||||
|
|
||||||
# This defines whether to include the AdaFruit NeoPixel library
|
|
||||||
NEOPIXEL ?= 0
|
|
||||||
|
|
||||||
############
|
############
|
||||||
# Try to automatically determine whether RELOC_WORKAROUND is needed based
|
# Try to automatically determine whether RELOC_WORKAROUND is needed based
|
||||||
# on GCC versions:
|
# on GCC versions:
|
||||||
# https://www.avrfreaks.net/comment/1789106#comment-1789106
|
# http://www.avrfreaks.net/comment/1789106#comment-1789106
|
||||||
|
|
||||||
CC_MAJ:=$(shell $(CC) -dM -E - < /dev/null | grep __GNUC__ | cut -f3 -d\ )
|
CC_MAJ:=$(shell $(CC) -dM -E - < /dev/null | grep __GNUC__ | cut -f3 -d\ )
|
||||||
CC_MIN:=$(shell $(CC) -dM -E - < /dev/null | grep __GNUC_MINOR__ | cut -f3 -d\ )
|
CC_MIN:=$(shell $(CC) -dM -E - < /dev/null | grep __GNUC_MINOR__ | cut -f3 -d\ )
|
||||||
@@ -197,381 +167,302 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1100)
|
|||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1101)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1101)
|
||||||
# Velleman K8400 Controller (derived from 3Drag Controller)
|
# Velleman K8400 Controller (derived from 3Drag Controller)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1102)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1102)
|
||||||
# Velleman K8600 Controller (Vertex Nano)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1103)
|
|
||||||
# Velleman K8800 Controller (Vertex Delta)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1104)
|
|
||||||
# 2PrintBeta BAM&DICE with STK drivers
|
# 2PrintBeta BAM&DICE with STK drivers
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1105)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1103)
|
||||||
# 2PrintBeta BAM&DICE Due with STK drivers
|
# 2PrintBeta BAM&DICE Due with STK drivers
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1106)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1104)
|
||||||
# MKS BASE v1.0
|
# MKS BASE v1.0
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1107)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1105)
|
||||||
# MKS v1.4 with A4982 stepper drivers
|
# MKS v1.4 with A4982 stepper drivers
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1108)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1106)
|
||||||
# MKS v1.5 with Allegro A4982 stepper drivers
|
# MKS v1.5 with Allegro A4982 stepper drivers
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1109)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1107)
|
||||||
# MKS v1.6 with Allegro A4982 stepper drivers
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1110)
|
|
||||||
# MKS BASE 1.0 with Heroic HR4982 stepper drivers
|
# MKS BASE 1.0 with Heroic HR4982 stepper drivers
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1111)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1108)
|
||||||
# MKS GEN v1.3 or 1.4
|
# MKS GEN v1.3 or 1.4
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1112)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1109)
|
||||||
# MKS GEN L
|
# MKS GEN L
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1113)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1110)
|
||||||
# zrib V2.0 control board (Chinese knock off RAMPS replica)
|
# zrib V2.0 control board (Chinese knock off RAMPS replica)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1114)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1111)
|
||||||
# BigTreeTech or BIQU KFB2.0
|
# Bigtreetech or BIQU KFB2.0
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1115)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1112)
|
||||||
# Felix 2.0+ Electronics Board (RAMPS like)
|
# Felix 2.0+ Electronics Board (RAMPS like)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1116)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1113)
|
||||||
# Invent-A-Part RigidBoard
|
# Invent-A-Part RigidBoard
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1117)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1114)
|
||||||
# Invent-A-Part RigidBoard V2
|
# Invent-A-Part RigidBoard V2
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1118)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1115)
|
||||||
# Sainsmart 2-in-1 board
|
# Sainsmart 2-in-1 board
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1119)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1116)
|
||||||
# Ultimaker
|
# Ultimaker
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1120)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1117)
|
||||||
# Ultimaker (Older electronics. Pre 1.5.4. This is rare)
|
# Ultimaker (Older electronics. Pre 1.5.4. This is rare)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1121)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1118)
|
||||||
MCU ?= atmega1280
|
MCU ?= atmega1280
|
||||||
PROG_MCU ?= m1280
|
|
||||||
|
|
||||||
# Azteeg X3
|
# Azteeg X3
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1122)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1119)
|
||||||
# Azteeg X3 Pro
|
# Azteeg X3 Pro
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1123)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1120)
|
||||||
# Ultimainboard 2.x (Uses TEMP_SENSOR 20)
|
# Ultimainboard 2.x (Uses TEMP_SENSOR 20)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1124)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1121)
|
||||||
# Rumba
|
# Rumba
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1125)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1122)
|
||||||
# Raise3D Rumba
|
# Raise3D Rumba
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1126)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1123)
|
||||||
# Rapide Lite RL200 Rumba
|
# Rapide Lite RL200 Rumba
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1127)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1124)
|
||||||
# Formbot T-Rex 2 Plus
|
# Formbot T-Rex 2 Plus
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1128)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1125)
|
||||||
# Formbot T-Rex 3
|
# Formbot T-Rex 3
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1129)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1126)
|
||||||
# Formbot Raptor
|
# Formbot Raptor
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1130)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1127)
|
||||||
# Formbot Raptor 2
|
# Formbot Raptor 2
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1131)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1128)
|
||||||
# bq ZUM Mega 3D
|
# bq ZUM Mega 3D
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1132)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1129)
|
||||||
# MakeBoard Mini v2.1.2 is a control board sold by MicroMake
|
# MakeBoard Mini v2.1.2 is a control board sold by MicroMake
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1133)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1130)
|
||||||
# TriGorilla Anycubic version 1.3 based on RAMPS EFB
|
# TriGorilla Anycubic version 1.3 based on RAMPS EFB
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1134)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1131)
|
||||||
# TriGorilla Anycubic version 1.4 based on RAMPS EFB
|
# TriGorilla Anycubic version 1.4 based on RAMPS EFB
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1135)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1132)
|
||||||
# TriGorilla Anycubic version 1.4 Rev 1.1
|
# TriGorilla Anycubic version 1.4 Rev 1.1
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1136)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1133)
|
||||||
# Creality: Ender-4, CR-8
|
# Creality: Ender-4, CR-8
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1137)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1134)
|
||||||
# Creality: CR10S, CR20, CR-X
|
# Creality: CR10S, CR20, CR-X
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1138)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1135)
|
||||||
# Dagoma F5
|
# Dagoma F5
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1139)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1136)
|
||||||
# FYSETC F6 1.3
|
# Fysetc F6
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1140)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1137)
|
||||||
# FYSETC F6 1.5
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1141)
|
|
||||||
# Duplicator i3 Plus
|
# Duplicator i3 Plus
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1142)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1138)
|
||||||
# VORON
|
# VORON
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1143)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1139)
|
||||||
# TRONXY V3 1.0
|
# TRONXY V3 1.0
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1144)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1140)
|
||||||
# Z-Bolt X Series
|
# Z-Bolt X Series
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1145)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1141)
|
||||||
# TT OSCAR
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1146)
|
|
||||||
# Overlord/Overlord Pro
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1147)
|
|
||||||
# ADIMLab Gantry v1
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1148)
|
|
||||||
# ADIMLab Gantry v2
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1149)
|
|
||||||
# BIQU Tango V1
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1150)
|
|
||||||
# MKS GEN L V2
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1151)
|
|
||||||
# MKS GEN L V2.1
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1152)
|
|
||||||
# Copymaster 3D
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1153)
|
|
||||||
# Ortur 4
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1154)
|
|
||||||
# Tenlog D3 Hero
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1155)
|
|
||||||
|
|
||||||
#
|
|
||||||
# RAMBo and derivatives
|
|
||||||
#
|
|
||||||
|
|
||||||
# Rambo
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1200)
|
|
||||||
# Mini-Rambo
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1201)
|
|
||||||
# Mini-Rambo 1.0a
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1202)
|
|
||||||
# Einsy Rambo
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1203)
|
|
||||||
# Einsy Retro
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1204)
|
|
||||||
# abee Scoovo X9H
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1205)
|
|
||||||
# Rambo ThinkerV2
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1206)
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Other ATmega1280, ATmega2560
|
# Other ATmega1280, ATmega2560
|
||||||
#
|
#
|
||||||
|
|
||||||
# Cartesio CN Controls V11
|
# Cartesio CN Controls V11
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1300)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1200)
|
||||||
# Cartesio CN Controls V12
|
# Cartesio CN Controls V12
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1301)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1201)
|
||||||
# Cartesio CN Controls V15
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1302)
|
|
||||||
# Cheaptronic v1.0
|
# Cheaptronic v1.0
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1303)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1202)
|
||||||
# Cheaptronic v2.0
|
# Cheaptronic v2.0
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1304)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1203)
|
||||||
# Makerbot Mightyboard Revision E
|
# Makerbot Mightyboard Revision E
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1305)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1204)
|
||||||
# Megatronics
|
# Megatronics
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1306)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1205)
|
||||||
# Megatronics v2.0
|
# Megatronics v2.0
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1307)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1206)
|
||||||
# Megatronics v3.0
|
# Megatronics v3.0
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1308)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1207)
|
||||||
# Megatronics v3.1
|
# Megatronics v3.1
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1309)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1208)
|
||||||
# Megatronics v3.2
|
# Megatronics v3.2
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1310)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1209)
|
||||||
|
# Rambo
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1210)
|
||||||
|
# Mini-Rambo
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1211)
|
||||||
|
# Mini-Rambo 1.0a
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1212)
|
||||||
|
# Einsy Rambo
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1213)
|
||||||
|
# Einsy Retro
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1214)
|
||||||
# Elefu Ra Board (v3)
|
# Elefu Ra Board (v3)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1311)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1215)
|
||||||
# Leapfrog
|
# Leapfrog
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1312)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1216)
|
||||||
# Mega controller
|
# Mega controller
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1313)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1217)
|
||||||
|
# abee Scoovo X9H
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1218)
|
||||||
# Geeetech GT2560 Rev B for Mecreator2
|
# Geeetech GT2560 Rev B for Mecreator2
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1314)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1219)
|
||||||
# Geeetech GT2560 Rev. A
|
# Geeetech GT2560 Rev. A
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1315)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1220)
|
||||||
# Geeetech GT2560 Rev. A+ (with auto level probe)
|
# Geeetech GT2560 Rev. A+ (with auto level probe)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1316)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1221)
|
||||||
# Geeetech GT2560 Rev B for A10(M/D)
|
# Geeetech GT2560 Rev B for A10(M/D)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1317)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1222)
|
||||||
# Geeetech GT2560 Rev B for A20(M/D)
|
# Geeetech GT2560 Rev B for A20(M/D)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1318)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1223)
|
||||||
# Einstart retrofit
|
# Einstart retrofit
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1319)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1224)
|
||||||
# Wanhao 0ne+ i3 Mini
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1320)
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# ATmega1281, ATmega2561
|
# ATmega1281, ATmega2561
|
||||||
#
|
#
|
||||||
|
|
||||||
# Minitronics v1.0/1.1
|
else ifeq ($(HARDWARE_MOTHERBOARD),1300)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1400)
|
|
||||||
MCU ?= atmega1281
|
MCU ?= atmega1281
|
||||||
PROG_MCU ?= m1281
|
else ifeq ($(HARDWARE_MOTHERBOARD),1310)
|
||||||
# Silvergate v1.0
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1401)
|
|
||||||
MCU ?= atmega1281
|
MCU ?= atmega1281
|
||||||
PROG_MCU ?= m1281
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Sanguinololu and Derivatives - ATmega644P, ATmega1284P
|
# Sanguinololu and Derivatives - ATmega644P, ATmega1284P
|
||||||
#
|
#
|
||||||
|
|
||||||
# Sanguinololu < 1.2
|
# Sanguinololu < 1.2
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1500)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1400)
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
HARDWARE_VARIANT ?= Sanguino
|
||||||
MCU ?= atmega644p
|
MCU ?= atmega644p
|
||||||
PROG_MCU ?= m644p
|
|
||||||
# Sanguinololu 1.2 and above
|
# Sanguinololu 1.2 and above
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1501)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1401)
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
HARDWARE_VARIANT ?= Sanguino
|
||||||
MCU ?= atmega644p
|
MCU ?= atmega644p
|
||||||
PROG_MCU ?= m644p
|
|
||||||
# Melzi
|
# Melzi
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1502)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1402)
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
HARDWARE_VARIANT ?= Sanguino
|
||||||
MCU ?= atmega644p
|
MCU ?= atmega644p
|
||||||
PROG_MCU ?= m644p
|
|
||||||
# Melzi V2.0
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1503)
|
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
|
||||||
MCU ?= atmega1284p
|
|
||||||
PROG_MCU ?= m1284p
|
|
||||||
# Melzi with ATmega1284 (MaKr3d version)
|
# Melzi with ATmega1284 (MaKr3d version)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1504)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1403)
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
HARDWARE_VARIANT ?= Sanguino
|
||||||
MCU ?= atmega1284p
|
MCU ?= atmega1284p
|
||||||
PROG_MCU ?= m1284p
|
|
||||||
# Melzi Creality3D board (for CR-10 etc)
|
# Melzi Creality3D board (for CR-10 etc)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1505)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1404)
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
HARDWARE_VARIANT ?= Sanguino
|
||||||
MCU ?= atmega1284p
|
MCU ?= atmega1284p
|
||||||
PROG_MCU ?= m1284p
|
|
||||||
# Melzi Malyan M150 board
|
# Melzi Malyan M150 board
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1506)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1405)
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
HARDWARE_VARIANT ?= Sanguino
|
||||||
MCU ?= atmega1284p
|
MCU ?= atmega1284p
|
||||||
PROG_MCU ?= m1284p
|
|
||||||
# Tronxy X5S
|
# Tronxy X5S
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1507)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1406)
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
HARDWARE_VARIANT ?= Sanguino
|
||||||
MCU ?= atmega1284p
|
MCU ?= atmega1284p
|
||||||
PROG_MCU ?= m1284p
|
|
||||||
# STB V1.1
|
# STB V1.1
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1508)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1407)
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
HARDWARE_VARIANT ?= Sanguino
|
||||||
MCU ?= atmega1284p
|
MCU ?= atmega1284p
|
||||||
PROG_MCU ?= m1284p
|
|
||||||
# Azteeg X1
|
# Azteeg X1
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1509)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1408)
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
HARDWARE_VARIANT ?= Sanguino
|
||||||
MCU ?= atmega1284p
|
MCU ?= atmega1284p
|
||||||
PROG_MCU ?= m1284p
|
|
||||||
# Anet 1.0 (Melzi clone)
|
# Anet 1.0 (Melzi clone)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1510)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1409)
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
HARDWARE_VARIANT ?= Sanguino
|
||||||
MCU ?= atmega1284p
|
MCU ?= atmega1284p
|
||||||
PROG_MCU ?= m1284p
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Other ATmega644P, ATmega644, ATmega1284P
|
# Other ATmega644P, ATmega644, ATmega1284P
|
||||||
#
|
#
|
||||||
|
|
||||||
# Gen3 Monolithic Electronics
|
# Gen3 Monolithic Electronics
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1600)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1500)
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
HARDWARE_VARIANT ?= Sanguino
|
||||||
MCU ?= atmega644p
|
MCU ?= atmega644p
|
||||||
PROG_MCU ?= m644p
|
|
||||||
# Gen3+
|
# Gen3+
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1601)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1501)
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
HARDWARE_VARIANT ?= Sanguino
|
||||||
MCU ?= atmega644p
|
MCU ?= atmega644p
|
||||||
PROG_MCU ?= m644p
|
|
||||||
# Gen6
|
# Gen6
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1602)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1502)
|
||||||
HARDWARE_VARIANT ?= Gen6
|
HARDWARE_VARIANT ?= Gen6
|
||||||
MCU ?= atmega644p
|
MCU ?= atmega644p
|
||||||
PROG_MCU ?= m644p
|
|
||||||
# Gen6 deluxe
|
# Gen6 deluxe
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1603)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1503)
|
||||||
HARDWARE_VARIANT ?= Gen6
|
HARDWARE_VARIANT ?= Gen6
|
||||||
MCU ?= atmega644p
|
MCU ?= atmega644p
|
||||||
PROG_MCU ?= m644p
|
|
||||||
# Gen7 custom (Alfons3 Version)
|
# Gen7 custom (Alfons3 Version)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1604)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1504)
|
||||||
HARDWARE_VARIANT ?= Gen7
|
HARDWARE_VARIANT ?= Gen7
|
||||||
MCU ?= atmega644
|
MCU ?= atmega644
|
||||||
PROG_MCU ?= m644
|
|
||||||
F_CPU ?= 20000000
|
F_CPU ?= 20000000
|
||||||
# Gen7 v1.1, v1.2
|
# Gen7 v1.1, v1.2
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1605)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1505)
|
||||||
HARDWARE_VARIANT ?= Gen7
|
HARDWARE_VARIANT ?= Gen7
|
||||||
MCU ?= atmega644p
|
MCU ?= atmega644p
|
||||||
PROG_MCU ?= m644p
|
|
||||||
F_CPU ?= 20000000
|
F_CPU ?= 20000000
|
||||||
# Gen7 v1.3
|
# Gen7 v1.3
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1606)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1506)
|
||||||
HARDWARE_VARIANT ?= Gen7
|
HARDWARE_VARIANT ?= Gen7
|
||||||
MCU ?= atmega644p
|
MCU ?= atmega644p
|
||||||
PROG_MCU ?= m644p
|
|
||||||
F_CPU ?= 20000000
|
F_CPU ?= 20000000
|
||||||
# Gen7 v1.4
|
# Gen7 v1.4
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1607)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1507)
|
||||||
HARDWARE_VARIANT ?= Gen7
|
HARDWARE_VARIANT ?= Gen7
|
||||||
MCU ?= atmega1284p
|
MCU ?= atmega1284p
|
||||||
PROG_MCU ?= m1284p
|
|
||||||
F_CPU ?= 20000000
|
F_CPU ?= 20000000
|
||||||
# Alpha OMCA board
|
# Alpha OMCA board
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1608)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1508)
|
||||||
HARDWARE_VARIANT ?= SanguinoA
|
HARDWARE_VARIANT ?= SanguinoA
|
||||||
MCU ?= atmega644
|
MCU ?= atmega644
|
||||||
PROG_MCU ?= m644
|
|
||||||
# Final OMCA board
|
# Final OMCA board
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1609)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1509)
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
HARDWARE_VARIANT ?= Sanguino
|
||||||
MCU ?= atmega644p
|
MCU ?= atmega644p
|
||||||
PROG_MCU ?= m644p
|
|
||||||
# Sethi 3D_1
|
# Sethi 3D_1
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1610)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1510)
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
HARDWARE_VARIANT ?= Sanguino
|
||||||
MCU ?= atmega644p
|
MCU ?= atmega644p
|
||||||
PROG_MCU ?= m644p
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Teensyduino - AT90USB1286, AT90USB1286P
|
# Teensyduino - AT90USB1286, AT90USB1286P
|
||||||
#
|
#
|
||||||
|
|
||||||
# Teensylu
|
# Teensylu
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1700)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1600)
|
||||||
HARDWARE_VARIANT ?= Teensy
|
HARDWARE_VARIANT ?= Teensy
|
||||||
MCU ?= at90usb1286
|
MCU ?= at90usb1286
|
||||||
PROG_MCU ?= usb1286
|
|
||||||
# Printrboard (AT90USB1286)
|
# Printrboard (AT90USB1286)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1701)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1601)
|
||||||
HARDWARE_VARIANT ?= Teensy
|
HARDWARE_VARIANT ?= Teensy
|
||||||
MCU ?= at90usb1286
|
MCU ?= at90usb1286
|
||||||
PROG_MCU ?= usb1286
|
|
||||||
# Printrboard Revision F (AT90USB1286)
|
# Printrboard Revision F (AT90USB1286)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1702)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1602)
|
||||||
HARDWARE_VARIANT ?= Teensy
|
HARDWARE_VARIANT ?= Teensy
|
||||||
MCU ?= at90usb1286
|
MCU ?= at90usb1286
|
||||||
PROG_MCU ?= usb1286
|
|
||||||
# Brainwave (AT90USB646)
|
# Brainwave (AT90USB646)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1703)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1603)
|
||||||
HARDWARE_VARIANT ?= Teensy
|
HARDWARE_VARIANT ?= Teensy
|
||||||
MCU ?= at90usb646
|
MCU ?= at90usb646
|
||||||
PROG_MCU ?= usb646
|
|
||||||
# Brainwave Pro (AT90USB1286)
|
# Brainwave Pro (AT90USB1286)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1704)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1604)
|
||||||
HARDWARE_VARIANT ?= Teensy
|
HARDWARE_VARIANT ?= Teensy
|
||||||
MCU ?= at90usb1286
|
MCU ?= at90usb1286
|
||||||
PROG_MCU ?= usb1286
|
|
||||||
# SAV Mk-I (AT90USB1286)
|
# SAV Mk-I (AT90USB1286)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1705)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1605)
|
||||||
HARDWARE_VARIANT ?= Teensy
|
HARDWARE_VARIANT ?= Teensy
|
||||||
MCU ?= at90usb1286
|
MCU ?= at90usb1286
|
||||||
PROG_MCU ?= usb1286
|
|
||||||
# Teensy++2.0 (AT90USB1286)
|
# Teensy++2.0 (AT90USB1286)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1706)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1606)
|
||||||
HARDWARE_VARIANT ?= Teensy
|
HARDWARE_VARIANT ?= Teensy
|
||||||
MCU ?= at90usb1286
|
MCU ?= at90usb1286
|
||||||
PROG_MCU ?= usb1286
|
|
||||||
# 5DPrint D8 Driver Board
|
# 5DPrint D8 Driver Board
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1707)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1607)
|
||||||
HARDWARE_VARIANT ?= Teensy
|
HARDWARE_VARIANT ?= Teensy
|
||||||
MCU ?= at90usb1286
|
MCU ?= at90usb1286
|
||||||
PROG_MCU ?= usb1286
|
|
||||||
|
|
||||||
# UltiMachine Archim1 (with DRV8825 drivers)
|
# UltiMachine Archim1 (with DRV8825 drivers)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),3023)
|
else ifeq ($(HARDWARE_MOTHERBOARD),3023)
|
||||||
HARDWARE_VARIANT ?= archim
|
HARDWARE_VARIANT ?= archim
|
||||||
MCPU = cortex-m3
|
MCPU = cortex-m3
|
||||||
F_CPU = 84000000
|
F_CPU = 84000000L
|
||||||
IS_MCU = 0
|
IS_MCU = 0
|
||||||
# UltiMachine Archim2 (with TMC2130 drivers)
|
# UltiMachine Archim2 (with TMC2130 drivers)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),3024)
|
else ifeq ($(HARDWARE_MOTHERBOARD),3024)
|
||||||
HARDWARE_VARIANT ?= archim
|
HARDWARE_VARIANT ?= archim
|
||||||
MCPU = cortex-m3
|
MCPU = cortex-m3
|
||||||
F_CPU = 84000000
|
F_CPU = 84000000L
|
||||||
IS_MCU = 0
|
IS_MCU = 0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Be sure to regenerate speed_lookuptable.h with create_speed_lookuptable.py
|
# Be sure to regenerate speed_lookuptable.h with create_speed_lookuptable.py
|
||||||
# if you are setting this to something other than 16MHz
|
# if you are setting this to something other than 16MHz
|
||||||
# Do not put the UL suffix, it's done later on.
|
|
||||||
# Set to 16Mhz if not yet set.
|
# Set to 16Mhz if not yet set.
|
||||||
F_CPU ?= 16000000
|
F_CPU ?= 16000000
|
||||||
|
|
||||||
@@ -581,8 +472,7 @@ IS_MCU ?= 1
|
|||||||
ifeq ($(IS_MCU),1)
|
ifeq ($(IS_MCU),1)
|
||||||
# Set to arduino, ATmega2560 if not yet set.
|
# Set to arduino, ATmega2560 if not yet set.
|
||||||
HARDWARE_VARIANT ?= arduino
|
HARDWARE_VARIANT ?= arduino
|
||||||
MCU ?= atmega2560
|
MCU ?= atmega2560
|
||||||
PROG_MCU ?= m2560
|
|
||||||
|
|
||||||
TOOL_PREFIX = avr
|
TOOL_PREFIX = avr
|
||||||
MCU_FLAGS = -mmcu=$(MCU)
|
MCU_FLAGS = -mmcu=$(MCU)
|
||||||
@@ -613,36 +503,27 @@ VPATH += $(BUILD_DIR)
|
|||||||
VPATH += $(HARDWARE_SRC)
|
VPATH += $(HARDWARE_SRC)
|
||||||
|
|
||||||
ifeq ($(HARDWARE_VARIANT), $(filter $(HARDWARE_VARIANT),arduino Teensy Sanguino))
|
ifeq ($(HARDWARE_VARIANT), $(filter $(HARDWARE_VARIANT),arduino Teensy Sanguino))
|
||||||
# Old libraries (avr-core 1.6.21 < / Arduino < 1.6.8)
|
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/marlin/avr/libraries/LiquidCrystal/src
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/SPI
|
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/marlin/avr/libraries/SPI
|
||||||
# New libraries (avr-core >= 1.6.21 / Arduino >= 1.6.8)
|
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/SPI/src
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(IS_MCU),1)
|
ifeq ($(IS_MCU),1)
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/cores/arduino
|
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/cores/arduino
|
||||||
|
|
||||||
# Old libraries (avr-core 1.6.21 < / Arduino < 1.6.8)
|
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/SPI
|
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/SPI
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/SoftwareSerial
|
|
||||||
# New libraries (avr-core >= 1.6.21 / Arduino >= 1.6.8)
|
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/SPI/src
|
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/SPI/src
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/SoftwareSerial/src
|
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/SoftwareSerial/src
|
||||||
endif
|
endif
|
||||||
|
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/LiquidCrystal/src
|
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/LiquidCrystal/src
|
||||||
|
|
||||||
ifeq ($(LIQUID_TWI2), 1)
|
ifeq ($(LIQUID_TWI2), 1)
|
||||||
WIRE = 1
|
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/LiquidTWI2
|
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire/utility
|
||||||
|
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/LiquidTWI2
|
||||||
endif
|
endif
|
||||||
ifeq ($(WIRE), 1)
|
ifeq ($(WIRE), 1)
|
||||||
# Old libraries (avr-core 1.6.21 / Arduino < 1.6.8)
|
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/Wire
|
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire/utility
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/Wire/utility
|
|
||||||
# New libraries (avr-core >= 1.6.21 / Arduino >= 1.6.8)
|
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/Wire/src
|
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/Wire/src/utility
|
|
||||||
endif
|
endif
|
||||||
ifeq ($(NEOPIXEL), 1)
|
ifeq ($(NEOPIXEL), 1)
|
||||||
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Adafruit_NeoPixel
|
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Adafruit_NeoPixel
|
||||||
@@ -714,23 +595,13 @@ ifeq ($(WIRE), 1)
|
|||||||
LIB_CXXSRC += Wire.cpp
|
LIB_CXXSRC += Wire.cpp
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(TONE), 1)
|
|
||||||
LIB_CXXSRC += Tone.cpp
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(U8GLIB), 1)
|
ifeq ($(U8GLIB), 1)
|
||||||
LIB_CXXSRC += U8glib.cpp
|
LIB_CXXSRC += U8glib.cpp
|
||||||
LIB_SRC += u8g_ll_api.c u8g_bitmap.c u8g_clip.c u8g_com_null.c u8g_delay.c \
|
LIB_SRC += u8g_ll_api.c u8g_bitmap.c u8g_clip.c u8g_com_null.c u8g_delay.c u8g_page.c u8g_pb.c u8g_pb16h1.c u8g_rect.c u8g_state.c u8g_font.c u8g_font_6x13.c u8g_font_04b_03.c u8g_font_5x8.c
|
||||||
u8g_page.c u8g_pb.c u8g_pb16h1.c u8g_rect.c u8g_state.c u8g_font.c \
|
|
||||||
u8g_font_6x13.c u8g_font_04b_03.c u8g_font_5x8.c
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(TMC), 1)
|
ifeq ($(TMC), 1)
|
||||||
LIB_CXXSRC += TMCStepper.cpp COOLCONF.cpp DRV_STATUS.cpp IHOLD_IRUN.cpp \
|
LIB_CXXSRC += TMCStepper.cpp COOLCONF.cpp DRV_STATUS.cpp IHOLD_IRUN.cpp CHOPCONF.cpp GCONF.cpp PWMCONF.cpp DRV_CONF.cpp DRVCONF.cpp DRVCTRL.cpp DRVSTATUS.cpp ENCMODE.cpp RAMP_STAT.cpp SGCSCONF.cpp SHORT_CONF.cpp SMARTEN.cpp SW_MODE.cpp SW_SPI.cpp TMC2130Stepper.cpp TMC2208Stepper.cpp TMC2209Stepper.cpp TMC2660Stepper.cpp TMC5130Stepper.cpp TMC5160Stepper.cpp
|
||||||
CHOPCONF.cpp GCONF.cpp PWMCONF.cpp DRV_CONF.cpp DRVCONF.cpp DRVCTRL.cpp \
|
|
||||||
DRVSTATUS.cpp ENCMODE.cpp RAMP_STAT.cpp SGCSCONF.cpp SHORT_CONF.cpp \
|
|
||||||
SMARTEN.cpp SW_MODE.cpp SW_SPI.cpp TMC2130Stepper.cpp TMC2208Stepper.cpp \
|
|
||||||
TMC2209Stepper.cpp TMC2660Stepper.cpp TMC5130Stepper.cpp TMC5160Stepper.cpp
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(RELOC_WORKAROUND), 1)
|
ifeq ($(RELOC_WORKAROUND), 1)
|
||||||
@@ -772,23 +643,17 @@ REMOVE = rm -f
|
|||||||
MV = mv -f
|
MV = mv -f
|
||||||
|
|
||||||
# Place -D or -U options here
|
# Place -D or -U options here
|
||||||
CDEFS = -DF_CPU=$(F_CPU)UL ${addprefix -D , $(DEFINES)} -DARDUINO=$(ARDUINO_VERSION)
|
CDEFS = -DF_CPU=$(F_CPU) ${addprefix -D , $(DEFINES)} -DARDUINO=$(ARDUINO_VERSION)
|
||||||
CXXDEFS = $(CDEFS)
|
CXXDEFS = $(CDEFS)
|
||||||
|
|
||||||
ifeq ($(HARDWARE_VARIANT), Teensy)
|
ifeq ($(HARDWARE_VARIANT), Teensy)
|
||||||
CDEFS += -DUSB_SERIAL
|
CDEFS += -DUSB_SERIAL
|
||||||
LIB_SRC += usb.c pins_teensy.c
|
LIB_SRC += usb.c pins_teensy.c
|
||||||
LIB_CXXSRC += usb_api.cpp
|
LIB_CXXSRC += usb_api.cpp
|
||||||
|
|
||||||
else ifeq ($(HARDWARE_VARIANT), archim)
|
else ifeq ($(HARDWARE_VARIANT), archim)
|
||||||
CDEFS += -DARDUINO_SAM_ARCHIM -DARDUINO_ARCH_SAM -D__SAM3X8E__
|
CDEFS += -DARDUINO_SAM_ARCHIM -DARDUINO_ARCH_SAM -D__SAM3X8E__ -DUSB_VID=0x27b1 -DUSB_PID=0x0001 -DUSBCON '-DUSB_MANUFACTURER="UltiMachine"' '-DUSB_PRODUCT="Archim"'
|
||||||
CDEFS += -DUSB_VID=0x27B1 -DUSB_PID=0x0001 -DUSBCON
|
LIB_CXXSRC += variant.cpp IPAddress.cpp Reset.cpp RingBuffer.cpp Stream.cpp UARTClass.cpp USARTClass.cpp abi.cpp new.cpp watchdog.cpp CDC.cpp PluggableUSB.cpp USBCore.cpp
|
||||||
CDEFS += '-DUSB_MANUFACTURER="UltiMachine"' '-DUSB_PRODUCT_STRING="Archim"'
|
|
||||||
|
|
||||||
LIB_CXXSRC += variant.cpp IPAddress.cpp Reset.cpp RingBuffer.cpp Stream.cpp \
|
|
||||||
UARTClass.cpp USARTClass.cpp abi.cpp new.cpp watchdog.cpp CDC.cpp \
|
|
||||||
PluggableUSB.cpp USBCore.cpp
|
|
||||||
|
|
||||||
LIB_SRC += cortex_handlers.c iar_calls_sam3.c syscalls_sam3.c dtostrf.c itoa.c
|
LIB_SRC += cortex_handlers.c iar_calls_sam3.c syscalls_sam3.c dtostrf.c itoa.c
|
||||||
|
|
||||||
ifeq ($(U8GLIB), 1)
|
ifeq ($(U8GLIB), 1)
|
||||||
@@ -809,25 +674,21 @@ CXXSTANDARD = -std=gnu++11
|
|||||||
CDEBUG = -g$(DEBUG)
|
CDEBUG = -g$(DEBUG)
|
||||||
CWARN = -Wall -Wstrict-prototypes -Wno-packed-bitfield-compat -Wno-pragmas -Wunused-parameter
|
CWARN = -Wall -Wstrict-prototypes -Wno-packed-bitfield-compat -Wno-pragmas -Wunused-parameter
|
||||||
CXXWARN = -Wall -Wno-packed-bitfield-compat -Wno-pragmas -Wunused-parameter
|
CXXWARN = -Wall -Wno-packed-bitfield-compat -Wno-pragmas -Wunused-parameter
|
||||||
CTUNING = -fsigned-char -funsigned-bitfields -fno-exceptions \
|
CTUNING = -fsigned-char -funsigned-bitfields -fpack-struct -fno-exceptions \
|
||||||
-fshort-enums -ffunction-sections -fdata-sections
|
-fshort-enums -ffunction-sections -fdata-sections
|
||||||
ifneq ($(HARDWARE_MOTHERBOARD),)
|
ifneq ($(HARDWARE_MOTHERBOARD),)
|
||||||
CTUNING += -DMOTHERBOARD=${HARDWARE_MOTHERBOARD}
|
CTUNING += -DMOTHERBOARD=${HARDWARE_MOTHERBOARD}
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#CEXTRA = -Wa,-adhlns=$(<:.c=.lst)
|
#CEXTRA = -Wa,-adhlns=$(<:.c=.lst)
|
||||||
CXXEXTRA = -fno-use-cxa-atexit -fno-threadsafe-statics -fno-rtti
|
CXXEXTRA = -fno-use-cxa-atexit -fno-threadsafe-statics -fno-rtti
|
||||||
CFLAGS := $(CDEBUG) $(CDEFS) $(CINCS) -O$(OPT) $(CEXTRA) $(CTUNING) $(CSTANDARD)
|
CFLAGS := $(CDEBUG) $(CDEFS) $(CINCS) -O$(OPT) $(CEXTRA) $(CTUNING) $(CSTANDARD)
|
||||||
CXXFLAGS := $(CDEFS) $(CINCS) -O$(OPT) $(CXXEXTRA) $(CTUNING) $(CXXSTANDARD)
|
CXXFLAGS := $(CDEFS) $(CINCS) -O$(OPT) $(CXXEXTRA) $(CTUNING) $(CXXSTANDARD)
|
||||||
ASFLAGS := $(CDEFS)
|
ASFLAGS := $(CDEFS)
|
||||||
#ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs
|
#ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs
|
||||||
|
|
||||||
ifeq ($(HARDWARE_VARIANT), archim)
|
ifeq ($(HARDWARE_VARIANT), archim)
|
||||||
LD_PREFIX = -Wl,--gc-sections,-Map,Marlin.ino.map,--cref,--check-sections,--entry=Reset_Handler,--unresolved-symbols=report-all,--warn-common,--warn-section-align
|
LD_PREFIX = -Wl,--gc-sections,-Map,Marlin.ino.map,--cref,--check-sections,--entry=Reset_Handler,--unresolved-symbols=report-all,--warn-common,--warn-section-align
|
||||||
LD_SUFFIX = $(LDLIBS)
|
LD_SUFFIX = $(LDLIBS)
|
||||||
|
LDFLAGS = -lm -T$(LDSCRIPT) -u _sbrk -u link -u _close -u _fstat -u _isatty -u _lseek -u _read -u _write -u _exit -u kill -u _getpid
|
||||||
LDFLAGS = -lm -T$(LDSCRIPT) -u _sbrk -u link -u _close -u _fstat -u _isatty
|
|
||||||
LDFLAGS += -u _lseek -u _read -u _write -u _exit -u kill -u _getpid
|
|
||||||
else
|
else
|
||||||
LD_PREFIX = -Wl,--gc-sections,--relax
|
LD_PREFIX = -Wl,--gc-sections,--relax
|
||||||
LDFLAGS = -lm
|
LDFLAGS = -lm
|
||||||
@@ -843,7 +704,7 @@ else
|
|||||||
AVRDUDE_CONF = $(ARDUINO_INSTALL_DIR)/hardware/tools/avr/etc/avrdude.conf
|
AVRDUDE_CONF = $(ARDUINO_INSTALL_DIR)/hardware/tools/avr/etc/avrdude.conf
|
||||||
endif
|
endif
|
||||||
AVRDUDE_FLAGS = -D -C$(AVRDUDE_CONF) \
|
AVRDUDE_FLAGS = -D -C$(AVRDUDE_CONF) \
|
||||||
-p$(PROG_MCU) -P$(AVRDUDE_PORT) -c$(AVRDUDE_PROGRAMMER) \
|
-p$(MCU) -P$(AVRDUDE_PORT) -c$(AVRDUDE_PROGRAMMER) \
|
||||||
-b$(UPLOAD_RATE)
|
-b$(UPLOAD_RATE)
|
||||||
|
|
||||||
# Since Marlin 2.0, the source files may be distributed into several
|
# Since Marlin 2.0, the source files may be distributed into several
|
||||||
@@ -944,7 +805,7 @@ extcoff: $(TARGET).elf
|
|||||||
|
|
||||||
.elf.eep:
|
.elf.eep:
|
||||||
-$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \
|
-$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \
|
||||||
--change-section-lma .eeprom=0 -O $(FORMAT) $< $@
|
--change-section-lma .eeprom=0 -O $(FORMAT) $< $@
|
||||||
|
|
||||||
# Create extended listing file from ELF output file.
|
# Create extended listing file from ELF output file.
|
||||||
.elf.lss:
|
.elf.lss:
|
||||||
@@ -958,7 +819,7 @@ extcoff: $(TARGET).elf
|
|||||||
|
|
||||||
$(BUILD_DIR)/$(TARGET).elf: $(OBJ) Configuration.h
|
$(BUILD_DIR)/$(TARGET).elf: $(OBJ) Configuration.h
|
||||||
$(Pecho) " CXX $@"
|
$(Pecho) " CXX $@"
|
||||||
$P $(CXX) $(LD_PREFIX) $(ALL_CXXFLAGS) -o $@ -L. $(OBJ) $(LDFLAGS) $(LD_SUFFIX)
|
$P $(CC) $(LD_PREFIX) $(ALL_CXXFLAGS) -o $@ -L. $(OBJ) $(LDFLAGS) $(LD_SUFFIX)
|
||||||
|
|
||||||
# Object files that were found in "src" will be stored in $(BUILD_DIR)
|
# Object files that were found in "src" will be stored in $(BUILD_DIR)
|
||||||
# in directories that mirror the structure of "src"
|
# in directories that mirror the structure of "src"
|
||||||
|
|||||||
+11
-15
@@ -1,8 +1,9 @@
|
|||||||
/*==============================================================================
|
/*
|
||||||
|
================================================================================
|
||||||
|
|
||||||
Marlin Firmware
|
Marlin Firmware
|
||||||
|
|
||||||
(c) 2011-2020 MarlinFirmware
|
(c) 2011-2018 MarlinFirmware
|
||||||
Portions of Marlin are (c) by their respective authors.
|
Portions of Marlin are (c) by their respective authors.
|
||||||
All code complies with GPLv2 and/or GPLv3
|
All code complies with GPLv2 and/or GPLv3
|
||||||
|
|
||||||
@@ -11,33 +12,30 @@
|
|||||||
Greetings! Thank you for choosing Marlin 2 as your 3D printer firmware.
|
Greetings! Thank you for choosing Marlin 2 as your 3D printer firmware.
|
||||||
|
|
||||||
To configure Marlin you must edit Configuration.h and Configuration_adv.h
|
To configure Marlin you must edit Configuration.h and Configuration_adv.h
|
||||||
located in the root 'Marlin' folder. Check our Configurations repository to
|
located in the root 'Marlin' folder. Check the config/examples folder to see if
|
||||||
see if there's a more suitable starting-point for your specific hardware.
|
there's a more suitable starting-point for your specific hardware.
|
||||||
|
|
||||||
Before diving in, we recommend the following essential links:
|
Before diving in, we recommend the following essential links:
|
||||||
|
|
||||||
Marlin Firmware Official Website
|
Marlin Firmware Official Website
|
||||||
|
|
||||||
- https://marlinfw.org/
|
- http://marlinfw.org/
|
||||||
The official Marlin Firmware website contains the most up-to-date
|
The official Marlin Firmware website contains the most up-to-date
|
||||||
documentation. Contributions are always welcome!
|
documentation. Contributions are always welcome!
|
||||||
|
|
||||||
Configuration
|
Configuration
|
||||||
|
|
||||||
- https://github.com/MarlinFirmware/Configurations
|
|
||||||
Example configurations for several printer models.
|
|
||||||
|
|
||||||
- https://www.youtube.com/watch?v=3gwWVFtdg-4
|
- https://www.youtube.com/watch?v=3gwWVFtdg-4
|
||||||
A good 20-minute overview of Marlin configuration by Tom Sanladerer.
|
A good 20-minute overview of Marlin configuration by Tom Sanladerer.
|
||||||
(Applies to Marlin 1.0.x, so Jerk and Acceleration should be halved.)
|
(Applies to Marlin 1.0.x, so Jerk and Acceleration should be halved.)
|
||||||
Also... https://www.google.com/search?tbs=vid%3A1&q=configure+marlin
|
Also... https://www.google.com/search?tbs=vid%3A1&q=configure+marlin
|
||||||
|
|
||||||
- https://marlinfw.org/docs/configuration/configuration.html
|
- http://marlinfw.org/docs/configuration/configuration.html
|
||||||
Marlin's configuration options are explained in more detail here.
|
Marlin's configuration options are explained in more detail here.
|
||||||
|
|
||||||
Getting Help
|
Getting Help
|
||||||
|
|
||||||
- https://reprap.org/forum/list.php?415
|
- http://forums.reprap.org/list.php?415
|
||||||
The Marlin Discussion Forum is a great place to get help from other Marlin
|
The Marlin Discussion Forum is a great place to get help from other Marlin
|
||||||
users who may have experienced similar issues to your own.
|
users who may have experienced similar issues to your own.
|
||||||
|
|
||||||
@@ -47,11 +45,9 @@ Getting Help
|
|||||||
|
|
||||||
Contributing
|
Contributing
|
||||||
|
|
||||||
- https://marlinfw.org/docs/development/contributing.html
|
- http://marlinfw.org/docs/development/contributing.html
|
||||||
If you'd like to contribute to Marlin, read this first!
|
If you'd like to contribute to Marlin, read this first!
|
||||||
|
|
||||||
- https://marlinfw.org/docs/development/coding_standards.html
|
- http://marlinfw.org/docs/development/coding_standards.html
|
||||||
Before submitting code get to know the Coding Standards.
|
Before submitting code get to know the Coding Standards.
|
||||||
|
*/
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
|
||||||
|
|||||||
+11
-11
@@ -1,6 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
* Marlin 3D Printer Firmware
|
* Marlin 3D Printer Firmware
|
||||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
*
|
*
|
||||||
* Based on Sprinter and grbl.
|
* Based on Sprinter and grbl.
|
||||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
@@ -28,25 +28,25 @@
|
|||||||
/**
|
/**
|
||||||
* Marlin release version identifier
|
* Marlin release version identifier
|
||||||
*/
|
*/
|
||||||
//#define SHORT_BUILD_VERSION "bugfix-2.0.x"
|
#define SHORT_BUILD_VERSION "2.0.5_R10"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Verbose version identifier which should contain a reference to the location
|
* Verbose version identifier which should contain a reference to the location
|
||||||
* from where the binary was downloaded or the source code was compiled.
|
* from where the binary was downloaded or the source code was compiled.
|
||||||
*/
|
*/
|
||||||
//#define DETAILED_BUILD_VERSION SHORT_BUILD_VERSION
|
#define DETAILED_BUILD_VERSION SHORT_BUILD_VERSION " TM3D"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The STRING_DISTRIBUTION_DATE represents when the binary file was built,
|
* The STRING_DISTRIBUTION_DATE represents when the binary file was built,
|
||||||
* here we define this default string as the date where the latest release
|
* here we define this default string as the date where the latest release
|
||||||
* version was tagged.
|
* version was tagged.
|
||||||
*/
|
*/
|
||||||
//#define STRING_DISTRIBUTION_DATE "2019-07-10"
|
#define STRING_DISTRIBUTION_DATE "2020-03-25"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines a generic printer name to be output to the LCD after booting Marlin.
|
* Defines a generic printer name to be output to the LCD after booting Marlin.
|
||||||
*/
|
*/
|
||||||
//#define MACHINE_NAME "3D Printer"
|
#define MACHINE_NAME "TM3D Raptor"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The SOURCE_CODE_URL is the location where users will find the Marlin Source
|
* The SOURCE_CODE_URL is the location where users will find the Marlin Source
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
* has a distinct Github fork— the Source Code URL should just be the main
|
* has a distinct Github fork— the Source Code URL should just be the main
|
||||||
* Marlin repository.
|
* Marlin repository.
|
||||||
*/
|
*/
|
||||||
//#define SOURCE_CODE_URL "github.com/MarlinFirmware/Marlin"
|
#define SOURCE_CODE_URL "https://github.com/InsanityAutomation/Marlin/tree/Raptor_2.0.X"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default generic printer UUID.
|
* Default generic printer UUID.
|
||||||
@@ -65,12 +65,12 @@
|
|||||||
* The WEBSITE_URL is the location where users can get more information such as
|
* The WEBSITE_URL is the location where users can get more information such as
|
||||||
* documentation about a specific Marlin release.
|
* documentation about a specific Marlin release.
|
||||||
*/
|
*/
|
||||||
//#define WEBSITE_URL "marlinfw.org"
|
#define WEBSITE_URL "tinymachines3d.com"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the vendor info the serial USB interface, if changable
|
* Set the vendor info the serial USB interface, if changable
|
||||||
* Currently only supported by DUE platform
|
* Currently only supported by DUE platform
|
||||||
*/
|
*/
|
||||||
//#define USB_DEVICE_VENDOR_ID 0x0000
|
//#define USB_DEVICE_VENDOR_ID 0x0000
|
||||||
//#define USB_DEVICE_PRODUCT_ID 0x0000
|
//#define USB_DEVICE_PRODUCT_ID 0x0000
|
||||||
//#define USB_DEVICE_MANUFACTURE_NAME WEBSITE_URL
|
//#define USB_DEVICE_MANUFACTURE_NAME WEBSITE_URL
|
||||||
|
|||||||
+69
-67
@@ -29,75 +29,77 @@
|
|||||||
* - http://www.marlinfw.org/tools/u8glib/converter.html
|
* - http://www.marlinfw.org/tools/u8glib/converter.html
|
||||||
* - http://www.digole.com/tools/PicturetoC_Hex_converter.php
|
* - http://www.digole.com/tools/PicturetoC_Hex_converter.php
|
||||||
*/
|
*/
|
||||||
#include <avr/pgmspace.h>
|
|
||||||
|
|
||||||
#define CUSTOM_BOOTSCREEN_TIMEOUT 2500
|
#define CUSTOM_BOOTSCREEN_TIMEOUT 2500
|
||||||
#define CUSTOM_BOOTSCREEN_BMPWIDTH 125
|
#define CUSTOM_BOOTSCREEN_BMPWIDTH 128
|
||||||
//#define CUSTOM_BOOTSCREEN_INVERTED
|
#define CUSTOM_BOOTSCREEN_BMPHEIGHT 64
|
||||||
|
|
||||||
const unsigned char custom_start_bmp[] PROGMEM = {
|
const unsigned char custom_start_bmp[] PROGMEM = {
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // ..............................................................##................................................................
|
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // ..............................................................##.##.............................................................
|
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // ................................................................#...#...........................................................
|
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE7,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // ................................................................###..###........................................................
|
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x71,0x80,0x00,0x00,0x00,0x00,0x00,0x00, // .................................................................###...##.......................................................
|
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x40,0x00,0x00,0x00,0x00,0x00,0x00, // ..................................................................##.....#......................................................
|
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3C,0x20,0x00,0x00,0x00,0x00,0x00,0x00, // ..................................................................####....#.....................................................
|
0xFD, 0x55, 0x55, 0x55, 0x55, 0x55, 0x5F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x20,0x00,0x00,0x00,0x00,0x00,0x00, // ................................................................########..#.....................................................
|
0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||||
0x00,0x00,0x00,0x00,0x00,0x01,0xF8,0x00,0x87,0xF8,0x00,0x00,0x00,0x00,0x00,0x00, // ...............................................######...........#....########...................................................
|
0xFD, 0x00, 0x00, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||||
0x00,0x00,0x00,0x00,0x00,0x03,0x0C,0x00,0x83,0xE0,0x00,0x00,0x00,0x00,0x00,0x00, // ..............................................##....##..........#.....#####.....................................................
|
0xFE, 0x07, 0xC0, 0x05, 0x55, 0x55, 0x55, 0x55, 0x55, 0x5F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||||
0x00,0x00,0x00,0x00,0x00,0x06,0x0C,0x00,0x81,0xC0,0x00,0x00,0x00,0x00,0x00,0x00, // .............................................##.....##..........#......###......................................................
|
0xFC, 0x0A, 0x20, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||||
0x00,0x00,0x00,0x00,0x00,0x0C,0x06,0x00,0x80,0xE3,0x00,0x00,0x00,0x00,0x00,0x00, // ............................................##.......##.........#.......###...##................................................
|
0xFE, 0x14, 0x10, 0x05, 0x00, 0x00, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||||
0x00,0x00,0x00,0x00,0x00,0x18,0x06,0x00,0x80,0x6F,0x80,0x00,0x00,0x00,0x00,0x00, // ...........................................##........##.........#........##.#####...............................................
|
0xFC, 0x28, 0x08, 0x06, 0x07, 0xC0, 0x05, 0x55, 0x55, 0x55, 0x55, 0x55, 0x5F, 0xFF, 0xFF, 0xFF,
|
||||||
0x00,0x00,0x00,0x00,0x1C,0x38,0x02,0x00,0x80,0x3C,0xC0,0x00,0x00,0x00,0x00,0x00, // ...................................###....###.........#.........#.........####..##..............................................
|
0xFE, 0x54, 0x04, 0x04, 0x0A, 0x20, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0xFF, 0xFF,
|
||||||
0x00,0x00,0x00,0x00,0x1F,0x30,0x03,0x00,0xC0,0x3C,0x60,0x00,0x00,0x00,0x00,0x00, // ...................................#####..##..........##........##........####...##.............................................
|
0xFC, 0x60, 0x04, 0x06, 0x14, 0x10, 0x05, 0x00, 0x00, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||||
0x00,0x00,0x00,0x00,0x77,0xB0,0x02,0xFF,0x60,0x3C,0x30,0x00,0x00,0x00,0x00,0x00, // .................................###.####.##..........#.########.##.......####....##............................................
|
0xFE, 0x50, 0x04, 0x04, 0x28, 0x08, 0x06, 0x07, 0xC0, 0x05, 0x55, 0x55, 0x55, 0x55, 0x55, 0x5F,
|
||||||
0x00,0x00,0x00,0x00,0xE0,0xF8,0x06,0xFF,0xB0,0x3C,0x18,0x00,0x00,0x00,0x00,0x00, // ................................###.....#####........##.#########.##......####.....##...........................................
|
0xFC, 0x60, 0x04, 0x06, 0x54, 0x04, 0x04, 0x0A, 0x20, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F,
|
||||||
0x00,0x00,0x00,0x00,0xC0,0xD8,0x0D,0x81,0x98,0x1C,0x08,0x00,0x00,0x00,0x00,0x00, // ................................##......##.##.......##.##......##..##......###......#...........................................
|
0xFE, 0x54, 0x04, 0x1C, 0x60, 0x04, 0x06, 0x14, 0x10, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F,
|
||||||
0x00,0x00,0x00,0x03,0x80,0xD8,0x09,0x80,0xDC,0xFC,0x08,0x00,0x00,0x00,0x00,0x00, // ..............................###.......##.##.......#..##.......##.###..######......#...........................................
|
0xFC, 0x28, 0x08, 0x2E, 0x50, 0x04, 0x04, 0x28, 0x08, 0x06, 0x07, 0xC0, 0x00, 0x01, 0xF0, 0x3F,
|
||||||
0x00,0x00,0x00,0x02,0x00,0xD8,0x1B,0x00,0x6F,0xE4,0x0C,0x00,0x00,0x00,0x00,0x00, // ..............................#.........##.##......##.##.........##.#######..#......##..........................................
|
0xFE, 0x14, 0x10, 0x54, 0x60, 0x04, 0x06, 0x54, 0x04, 0x04, 0x0A, 0x20, 0x00, 0x02, 0x08, 0x1F,
|
||||||
0x00,0x00,0x00,0x02,0x00,0xDF,0xFB,0x00,0x37,0x06,0x0C,0x00,0x00,0x00,0x00,0x00, // ..............................#.........##.##########.##..........##.###.....##.....##..........................................
|
0xFC, 0x0A, 0x20, 0x66, 0x54, 0x04, 0x1C, 0x60, 0x04, 0x06, 0x14, 0x10, 0x00, 0x05, 0x04, 0x3F,
|
||||||
0x00,0x00,0x00,0x06,0x00,0xE7,0xF6,0x00,0x18,0x03,0x04,0x00,0x00,0x00,0x00,0x00, // .............................##.........###..#######.##............##.........##.....#..........................................
|
0xFE, 0x07, 0xC0, 0x54, 0x28, 0x08, 0x2E, 0x50, 0x04, 0x04, 0x28, 0x08, 0x00, 0x0A, 0x02, 0x1F,
|
||||||
0x00,0x00,0x00,0x06,0x00,0xE0,0x0E,0x00,0x18,0x0F,0x04,0x00,0x00,0x00,0x00,0x00, // .............................##.........###.........###............##.......####.....#..........................................
|
0xFC, 0x00, 0x00, 0x2E, 0x14, 0x10, 0x54, 0x60, 0x04, 0x06, 0x54, 0x04, 0x00, 0x15, 0x01, 0x3F,
|
||||||
0x00,0x00,0x00,0x06,0x00,0xC0,0x2E,0x00,0x1B,0xFF,0xC6,0x00,0x00,0x00,0x00,0x00, // .............................##.........##........#.###............##.############...##.........................................
|
0xFE, 0x00, 0x00, 0x1C, 0x0A, 0x20, 0x66, 0x54, 0x04, 0x1C, 0x60, 0x04, 0x00, 0x18, 0x01, 0x1F,
|
||||||
0x3F,0xFC,0x1F,0xF6,0x7D,0x81,0xE6,0x00,0x1B,0xC7,0xC6,0x00,0x00,0x00,0x00,0x00, // ..############.....#########.##..#####.##......####..##............##.####...#####...##.........................................
|
0xFC, 0x00, 0x00, 0x06, 0x07, 0xC0, 0x54, 0x28, 0x08, 0x2E, 0x50, 0x04, 0x00, 0x14, 0x01, 0x3F,
|
||||||
0x7F,0xFE,0x3F,0xFF,0x1F,0x8F,0xC3,0xFF,0xFF,0xFF,0xFC,0x1F,0xFF,0x38,0x03,0xC0, // .##############...##############...######...######....################################.....#############..###.........####......
|
0xFE, 0x00, 0x00, 0x04, 0x00, 0x00, 0x2E, 0x14, 0x10, 0x54, 0x60, 0x04, 0x00, 0x18, 0x01, 0x1F,
|
||||||
0xFF,0xFF,0xFF,0xFF,0x8F,0x1F,0xC7,0xFF,0xFF,0xFF,0xF8,0xFF,0xFF,0x3C,0x03,0xE0, // #################################...####...#######...################################...################..####........#####.....
|
0xFC, 0xFF, 0xFF, 0xFE, 0x00, 0x00, 0x1C, 0x0A, 0x20, 0x66, 0x54, 0x04, 0x1C, 0x15, 0x01, 0x3F,
|
||||||
0x10,0x0F,0xF0,0x0F,0x8F,0xFF,0x83,0xFF,0xF7,0xFF,0xF8,0xFF,0xFC,0x3C,0x03,0xE0, // ...#........########........#####...#############.....##############.################...##############....####........#####.....
|
0xFE, 0xD5, 0x55, 0x54, 0x00, 0x00, 0x06, 0x07, 0xC0, 0x54, 0x28, 0x08, 0x2A, 0x0A, 0x02, 0x1F,
|
||||||
0x00,0x0F,0xF0,0x07,0xFF,0xFF,0x01,0x9E,0x27,0xFC,0xC2,0xF8,0x00,0x3E,0x03,0xE0, // ............########.........###################.......##..####...#..#########..##....#.#####.............#####.......#####.....
|
0xFC, 0x84, 0x10, 0x46, 0x00, 0x00, 0x04, 0x00, 0x00, 0x2E, 0x14, 0x10, 0x51, 0x05, 0x04, 0x3F,
|
||||||
0x0F,0xFF,0xF0,0x03,0xDF,0xFE,0x01,0xCE,0x6C,0xFC,0x47,0xF8,0x00,0x3F,0xFF,0xE0, // ....################..........####.############........###..###..##.##..######...#...########.............#################.....
|
0xFE, 0xC4, 0x10, 0x44, 0xFF, 0xFF, 0xFE, 0x00, 0x00, 0x1C, 0x0A, 0x20, 0x61, 0x02, 0x88, 0x1F,
|
||||||
0x1F,0xFF,0xF0,0x03,0xC3,0xFC,0x00,0xFF,0xCC,0xFF,0xFF,0xF0,0x00,0x3F,0xFF,0xE0, // ...#################..........####....########..........##########..##..####################..............#################.....
|
0xFC, 0x84, 0x10, 0x46, 0xD5, 0x55, 0x54, 0x00, 0x00, 0x06, 0x07, 0xC0, 0x51, 0x01, 0xF0, 0x3F,
|
||||||
0x1F,0xFF,0xF0,0x03,0xC3,0xFC,0x00,0x0E,0x1C,0xFF,0xF9,0xE0,0x00,0x3F,0xFF,0xE0, // ...#################..........####....########..............###....###..#############..####...............#################.....
|
0xFE, 0x84, 0x10, 0x44, 0x84, 0x10, 0x46, 0x00, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x1F,
|
||||||
0x00,0x0F,0xF0,0x0F,0xC7,0xFC,0x00,0x0E,0x1C,0xFF,0xF1,0xE0,0x00,0x3F,0xFF,0xE0, // ............########........######...#########..............###....###..############...####...............#################.....
|
0xFC, 0xC4, 0x10, 0x46, 0xC4, 0x10, 0x44, 0xFF, 0xFF, 0xFE, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x3F,
|
||||||
0x00,0x0F,0xF8,0x0F,0x87,0xFE,0x00,0x0E,0x0C,0xF8,0xF0,0xF0,0x00,0x3C,0x03,0xE0, // ............#########.......#####....##########.............###.....##..#####...####....####..............####........#####.....
|
0xFE, 0x84, 0x10, 0x44, 0x84, 0x10, 0x46, 0xD5, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F,
|
||||||
0x7F,0xFF,0xFF,0xFF,0xBF,0x8F,0x00,0x3F,0xE6,0xF8,0xE0,0xFC,0x00,0x3C,0x03,0xE0, // .################################.#######...####..........#########..##.#####...###.....######............####........#####.....
|
0xFC, 0xD5, 0x55, 0x56, 0x84, 0x10, 0x44, 0x84, 0x10, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F,
|
||||||
0x7F,0xFF,0xFF,0xFF,0xFF,0x07,0xC0,0xFF,0xE7,0xFF,0xFC,0xFF,0xFF,0x3C,0x03,0xE0, // .#######################################.....#####......###########..#################..################..####........#####.....
|
0xFC, 0xFF, 0xFF, 0xFC, 0xC4, 0x10, 0x46, 0xC4, 0x10, 0x44, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F,
|
||||||
0xFF,0xFF,0xFF,0xFF,0xFE,0x03,0xE0,0x8E,0x33,0xFF,0xFC,0x1F,0xFF,0x3C,0x03,0xE0, // #######################################.......#####.....#...###...##..################.....#############..####........#####.....
|
0xFE, 0x00, 0x00, 0x06, 0x84, 0x10, 0x44, 0x84, 0x10, 0x46, 0xD5, 0x55, 0x55, 0x55, 0x55, 0xBF,
|
||||||
0x7F,0xFC,0x3F,0xF0,0x3C,0x01,0xF1,0x9E,0x31,0xFF,0xF9,0x0F,0xFE,0x3C,0x03,0xC0, // .#############....##########......####.........#####...##..####...##...##############..#....###########...####........####......
|
0xFD, 0x55, 0x55, 0x54, 0xD5, 0x55, 0x56, 0x84, 0x10, 0x44, 0x84, 0x10, 0x41, 0x04, 0x10, 0x9F,
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x19,0xFF,0xC1,0x00,0x00,0x00,0x00,0x00, // ......................................................##...........##..###########.....#........................................
|
0xFF, 0xFF, 0xFF, 0xFC, 0xFF, 0xFF, 0xFC, 0xC4, 0x10, 0x46, 0xC4, 0x10, 0x41, 0x04, 0x11, 0xBF,
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x0C,0xE0,0xC1,0x00,0x00,0x00,0x00,0x00, // ......................................................##............##..###.....##.....#........................................
|
0xFF, 0xFF, 0xFF, 0xFE, 0x00, 0x00, 0x06, 0x84, 0x10, 0x44, 0x84, 0x10, 0x41, 0x04, 0x10, 0x9F,
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x0C,0x00,0x42,0x00,0x00,0x00,0x00,0x00, // .....................................................##.............##...........#....#.........................................
|
0xFF, 0xFF, 0xFF, 0xFD, 0x55, 0x55, 0x54, 0xD5, 0x55, 0x56, 0x84, 0x10, 0x41, 0x04, 0x10, 0x9F,
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x06,0x01,0x62,0x00,0x00,0x00,0x00,0x00, // .....................................................##..............##........#.##...#.........................................
|
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xFF, 0xFF, 0xFC, 0xC4, 0x10, 0x41, 0x04, 0x11, 0xBF,
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,0x06,0x3F,0x62,0x00,0x00,0x00,0x00,0x00, // ....................................................##...............##...######.##...#.........................................
|
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0x00, 0x00, 0x06, 0x84, 0x10, 0x41, 0x04, 0x10, 0x9F,
|
||||||
0x00,0x00,0x00,0x00,0x00,0x38,0x0E,0x00,0x0D,0xFD,0xEE,0x00,0x00,0x00,0x00,0x00, // ..........................................###.......###.............##.#######.####.###.........................................
|
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0x55, 0x55, 0x54, 0xD5, 0x55, 0x55, 0x55, 0x55, 0xBF,
|
||||||
0x00,0x00,0x00,0x00,0x00,0x7F,0xE6,0x00,0x19,0x81,0xFC,0x00,0x00,0x00,0x00,0x00, // .........................................##########..##............##..##......#######..........................................
|
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F,
|
||||||
0x00,0x00,0x00,0x00,0x00,0xEF,0xF7,0x00,0x1B,0x01,0xF0,0x00,0x00,0x00,0x00,0x00, // ........................................###.########.###...........##.##.......#####............................................
|
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F,
|
||||||
0x00,0x00,0x00,0x00,0x00,0xC0,0x33,0x00,0x33,0x01,0xC8,0x00,0x00,0x00,0x00,0x00, // ........................................##........##..##..........##..##.......###..#...........................................
|
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0x55, 0x55, 0x55, 0x55, 0x55, 0x5F,
|
||||||
0x00,0x00,0x00,0x00,0x00,0x80,0x1B,0x00,0x36,0x01,0x98,0x00,0x00,0x00,0x00,0x00, // ........................................#..........##.##..........##.##........##..##...........................................
|
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||||
0x00,0x00,0x00,0x00,0x01,0x80,0x0D,0xFF,0xEC,0x01,0xF0,0x00,0x00,0x00,0x00,0x00, // .......................................##...........##.############.##.........#####............................................
|
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||||
0x00,0x00,0x00,0x00,0x01,0x00,0x0E,0xFF,0xD8,0x01,0xE0,0x00,0x00,0x00,0x00,0x00, // .......................................#............###.##########.##..........####.............................................
|
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||||
0x00,0x00,0x00,0x01,0xF1,0x80,0x06,0x60,0x38,0x07,0xA0,0x00,0x00,0x00,0x00,0x00, // ...............................#####...##............##..##.......###........####.#.............................................
|
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||||
0x00,0x00,0x00,0x01,0xFD,0x80,0x03,0x00,0x18,0x05,0x40,0x00,0x00,0x00,0x00,0x00, // ...............................#######.##.............##...........##........#.#.#..............................................
|
0xE0, 0x2E, 0xFB, 0x7D, 0xFB, 0xFB, 0xCF, 0xC1, 0xDF, 0xBB, 0x3E, 0xC0, 0xE1, 0xFE, 0x3C, 0x1F,
|
||||||
0x00,0x00,0x00,0x01,0x8F,0xC0,0x06,0xFF,0xDC,0x0A,0x80,0x00,0x00,0x00,0x00,0x00, // ...............................##...######...........##.##########.###......#.#.#...............................................
|
0xFD, 0xEE, 0x7B, 0x39, 0xF9, 0xF3, 0xCF, 0x9E, 0xDF, 0xBB, 0x3E, 0xDF, 0xDE, 0xFC, 0xDD, 0xE7,
|
||||||
0x00,0x00,0x00,0x00,0x81,0xE0,0x0C,0xFF,0xCC,0x1F,0x00,0x00,0x00,0x00,0x00,0x00, // ................................#......####.........##..##########..##.....#####................................................
|
0xFD, 0xEE, 0x3B, 0xBB, 0xF9, 0xEB, 0xD7, 0xBF, 0x5F, 0xBB, 0x5E, 0xDF, 0xDE, 0xFD, 0xED, 0xF7,
|
||||||
0x00,0x00,0x00,0x00,0x81,0xF0,0x0D,0x80,0x6C,0xFE,0x00,0x00,0x00,0x00,0x00,0x00, // ................................#......#####........##.##........##.##..#######.................................................
|
0xFD, 0xEE, 0xBB, 0xD3, 0xFA, 0xEB, 0xB7, 0x3F, 0xDF, 0xBB, 0x4E, 0xDF, 0xDF, 0xFF, 0xCD, 0xF3,
|
||||||
0x00,0x00,0x00,0x00,0x40,0xFE,0x1B,0x00,0x67,0x8C,0x00,0x00,0x00,0x00,0x00,0x00, // .................................#......#######....##.##.........##..####...##..................................................
|
0xFD, 0xEE, 0xDB, 0xC7, 0xFA, 0xEB, 0xBB, 0x7F, 0xC0, 0x3B, 0x6E, 0xC0, 0xE3, 0xFF, 0x1D, 0xF3,
|
||||||
0x00,0x00,0x00,0x00,0x20,0x7F,0xF6,0x00,0x20,0x18,0x00,0x00,0x00,0x00,0x00,0x00, // ..................................#......###########.##...........#........##...................................................
|
0xFD, 0xEE, 0xCB, 0xEF, 0xFA, 0xDB, 0xBB, 0x7F, 0xDF, 0xBB, 0x66, 0xDF, 0xF8, 0xFF, 0xCD, 0xF3,
|
||||||
0x00,0x00,0x00,0x00,0x10,0x30,0x6E,0x00,0x3F,0xF0,0x00,0x00,0x00,0x00,0x00,0x00, // ...................................#......##.....##.###...........##########....................................................
|
0xFD, 0xEE, 0xEB, 0xEF, 0xFB, 0x5B, 0x03, 0x3F, 0x5F, 0xBB, 0x76, 0xDF, 0xFE, 0x7F, 0xED, 0xF3,
|
||||||
0x00,0x00,0x00,0x00,0x04,0x30,0x0E,0x00,0xFF,0xA0,0x00,0x00,0x00,0x00,0x00,0x00, // .....................................#....##........###.........#########.#.....................................................
|
0xFD, 0xEE, 0xF3, 0xEF, 0xFB, 0x5B, 0x79, 0xBE, 0xDF, 0xBB, 0x7A, 0xDF, 0xDE, 0x7D, 0xED, 0xF7,
|
||||||
0x00,0x00,0x00,0x00,0x03,0x30,0x06,0x00,0xE1,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // ......................................##..##.........##.........###....#........................................................
|
0xFD, 0xEE, 0xF3, 0xEF, 0xFB, 0xBA, 0xFD, 0x9E, 0xDF, 0xBB, 0x7C, 0xDF, 0xDE, 0xFD, 0xCD, 0xE7,
|
||||||
0x00,0x00,0x00,0x00,0x01,0xF0,0x03,0x03,0xE2,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // .......................................#####..........##......#####...#.........................................................
|
0xFD, 0xEE, 0xFB, 0xEF, 0xFB, 0xBA, 0xFD, 0xC1, 0xDF, 0xBB, 0x7E, 0xC0, 0xE0, 0xFE, 0x1C, 0x1F,
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xFF,0x88,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // .......................................................##########...#...........................................................
|
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // ..............................................................#...##............................................................
|
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 // .............................................................###................................................................
|
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+36
-34
@@ -33,40 +33,42 @@
|
|||||||
//
|
//
|
||||||
// Status Screen Logo bitmap
|
// Status Screen Logo bitmap
|
||||||
//
|
//
|
||||||
#define STATUS_LOGO_Y 1
|
#define STATUS_LOGO_Y 3
|
||||||
#define STATUS_LOGO_WIDTH 32
|
#define STATUS_LOGO_WIDTH 24
|
||||||
|
|
||||||
const unsigned char status_logo_bmp[] PROGMEM = {
|
const unsigned char status_logo_bmp[] PROGMEM = {
|
||||||
0x00,0x00,0x00,0x00, // ................................
|
B11111111,B11111111,B11111111,
|
||||||
0x00,0x00,0x00,0x00, // ................................
|
B10000000,B00000000,B00000001,
|
||||||
0x00,0x00,0x00,0x00, // ................................
|
B10001110,B00000000,B11100001,
|
||||||
0x00,0x00,0x10,0x00, // ...................#............
|
B10011111,B00000001,B11110001,
|
||||||
0x00,0x00,0x06,0x00, // .....................##.........
|
B10010011,B10000001,B00111001,
|
||||||
0x00,0x00,0x00,0x00, // ................................
|
B10011111,B10000001,B11111001,
|
||||||
0x01,0x00,0x00,0x00, // .......#........................
|
B10011111,B10000001,B11111001,
|
||||||
0x08,0x00,0x01,0x00, // ....#..................#........
|
B10011111,B10111001,B11111001,
|
||||||
0x01,0x00,0x41,0x00, // .......#.........#.....#........
|
B10001111,B00101000,B11110001,
|
||||||
0x01,0x00,0x02,0x00, // .......#..............#.........
|
B10000000,B00111000,B00000001,
|
||||||
0x00,0xE0,0x00,0x00, // ........###.....................
|
B10000000,B00000000,B00000001,
|
||||||
0x80,0x08,0x10,0x80, // #...........#......#....#.......
|
B10011111,B11111111,B11111001,
|
||||||
0x04,0x00,0x00,0x40, // .....#...................#......
|
B10010001,B01110100,B10011001,
|
||||||
0x08,0x00,0x08,0x00, // ....#...............#...........
|
B10011011,B00000110,B10101001,
|
||||||
0x10,0x04,0x00,0x00, // ...#.........#..................
|
B10011011,B01010100,B10101001,
|
||||||
0x00,0x00,0x00,0x30, // ..........................##....
|
B10011011,B01010110,B10101001,
|
||||||
0x00,0x00,0x00,0x20, // ..........................#.....
|
B10011011,B01010100,B10011001,
|
||||||
0x00,0x01,0xE8,0x20, // ...............####.#.....#.....
|
B10011111,B11111111,B11111001,
|
||||||
0x00,0x00,0x00,0x60, // .........................##.....
|
B11111111,B11111111,B11111111
|
||||||
0x00,0x00,0x02,0x00, // ......................#.........
|
|
||||||
0x00,0x08,0x00,0x00, // ............#...................
|
|
||||||
0x00,0x00,0x01,0x20, // .......................#..#.....
|
|
||||||
0x02,0xE8,0x10,0x60, // ......#.###.#......#.....##.....
|
|
||||||
0x00,0x00,0x00,0x40, // .........................#......
|
|
||||||
0x00,0x03,0xC0,0x60, // ..............####.......##.....
|
|
||||||
0x64,0x00,0x10,0x00, // .##..#.............#............
|
|
||||||
0x04,0x03,0xC0,0x00, // .....#........####..............
|
|
||||||
0x02,0x00,0x20,0x00, // ......#...........#.............
|
|
||||||
0x00,0x28,0x00,0x00, // ..........#.#...................
|
|
||||||
0x00,0x08,0x20,0x00, // ............#.....#.............
|
|
||||||
0x00,0x00,0x40,0x00, // .................#..............
|
|
||||||
0x00,0x00,0x00,0x00 // ................................
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//
|
||||||
|
// Use default bitmaps
|
||||||
|
//
|
||||||
|
#define STATUS_HOTEND_ANIM
|
||||||
|
#define STATUS_BED_ANIM
|
||||||
|
#if HOTENDS < 2
|
||||||
|
#define STATUS_LOGO_X 8
|
||||||
|
#define STATUS_HEATERS_X 40
|
||||||
|
#define STATUS_BED_X 72
|
||||||
|
#else
|
||||||
|
#define STATUS_LOGO_X 0
|
||||||
|
#define STATUS_HEATERS_X 32
|
||||||
|
#define STATUS_BED_X 80
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -1,36 +0,0 @@
|
|||||||
|
|
||||||
This directory is intended for the project specific (private) libraries.
|
|
||||||
PlatformIO will compile them to static libraries and link to executable file.
|
|
||||||
|
|
||||||
The source code of each library should be placed in separate directory, like
|
|
||||||
"lib/private_lib/[here are source files]".
|
|
||||||
|
|
||||||
For example, see how can be organized `Foo` and `Bar` libraries:
|
|
||||||
|
|
||||||
|--lib
|
|
||||||
| |--Bar
|
|
||||||
| | |--docs
|
|
||||||
| | |--examples
|
|
||||||
| | |--src
|
|
||||||
| | |- Bar.c
|
|
||||||
| | |- Bar.h
|
|
||||||
| |--Foo
|
|
||||||
| | |- Foo.c
|
|
||||||
| | |- Foo.h
|
|
||||||
| |- readme.txt --> THIS FILE
|
|
||||||
|- platformio.ini
|
|
||||||
|--src
|
|
||||||
|- main.c
|
|
||||||
|
|
||||||
Then in `src/main.c` you should use:
|
|
||||||
|
|
||||||
#include <Foo.h>
|
|
||||||
#include <Bar.h>
|
|
||||||
|
|
||||||
// rest H/C/CPP code
|
|
||||||
|
|
||||||
PlatformIO will find your libraries automatically, configure preprocessor's
|
|
||||||
include paths and build them.
|
|
||||||
|
|
||||||
More information about PlatformIO Library Dependency Finder
|
|
||||||
- https://docs.platformio.org/page/librarymanager/ldf.html
|
|
||||||
@@ -16,21 +16,15 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef __AVR__
|
#ifdef __AVR__
|
||||||
|
|
||||||
#include "../../inc/MarlinConfig.h"
|
#include "../../inc/MarlinConfig.h"
|
||||||
#include "HAL.h"
|
#include "HAL.h"
|
||||||
|
|
||||||
#ifdef USBCON
|
|
||||||
DefaultSerial1 MSerial0(false, Serial);
|
|
||||||
#ifdef BLUETOOTH
|
|
||||||
BTSerial btSerial(false, bluetoothSerial);
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ------------------------
|
// ------------------------
|
||||||
// Public Variables
|
// Public Variables
|
||||||
// ------------------------
|
// ------------------------
|
||||||
|
|||||||
+247
-42
@@ -14,8 +14,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
@@ -51,11 +50,7 @@
|
|||||||
// Defines
|
// Defines
|
||||||
// ------------------------
|
// ------------------------
|
||||||
|
|
||||||
// AVR PROGMEM extension for sprintf_P
|
//#define analogInputToDigitalPin(IO) IO
|
||||||
#define S_FMT "%S"
|
|
||||||
|
|
||||||
// AVR PROGMEM extension for string define
|
|
||||||
#define PGMSTR(NAM,STR) const char NAM[] PROGMEM = STR
|
|
||||||
|
|
||||||
#ifndef CRITICAL_SECTION_START
|
#ifndef CRITICAL_SECTION_START
|
||||||
#define CRITICAL_SECTION_START() unsigned char _sreg = SREG; cli()
|
#define CRITICAL_SECTION_START() unsigned char _sreg = SREG; cli()
|
||||||
@@ -65,10 +60,16 @@
|
|||||||
#define ENABLE_ISRS() sei()
|
#define ENABLE_ISRS() sei()
|
||||||
#define DISABLE_ISRS() cli()
|
#define DISABLE_ISRS() cli()
|
||||||
|
|
||||||
|
// On AVR this is in math.h?
|
||||||
|
//#define square(x) ((x)*(x))
|
||||||
|
|
||||||
// ------------------------
|
// ------------------------
|
||||||
// Types
|
// Types
|
||||||
// ------------------------
|
// ------------------------
|
||||||
|
|
||||||
|
typedef uint16_t hal_timer_t;
|
||||||
|
#define HAL_TIMER_TYPE_MAX 0xFFFF
|
||||||
|
|
||||||
typedef int8_t pin_t;
|
typedef int8_t pin_t;
|
||||||
|
|
||||||
#define SHARED_SERVOS HAS_SERVOS
|
#define SHARED_SERVOS HAS_SERVOS
|
||||||
@@ -82,44 +83,43 @@ typedef int8_t pin_t;
|
|||||||
|
|
||||||
// Serial ports
|
// Serial ports
|
||||||
#ifdef USBCON
|
#ifdef USBCON
|
||||||
#include "../../core/serial_hook.h"
|
#if ENABLED(BLUETOOTH)
|
||||||
typedef ForwardSerial1Class< decltype(Serial) > DefaultSerial1;
|
#define MYSERIAL0 bluetoothSerial
|
||||||
extern DefaultSerial1 MSerial0;
|
#else
|
||||||
#ifdef BLUETOOTH
|
#define MYSERIAL0 Serial
|
||||||
typedef ForwardSerial1Class< decltype(bluetoothSerial) > BTSerial;
|
|
||||||
extern BTSerial btSerial;
|
|
||||||
#endif
|
#endif
|
||||||
|
#define NUM_SERIAL 1
|
||||||
#define MYSERIAL1 TERN(BLUETOOTH, btSerial, MSerial0)
|
|
||||||
#else
|
#else
|
||||||
#if !WITHIN(SERIAL_PORT, -1, 3)
|
#if !WITHIN(SERIAL_PORT, -1, 3)
|
||||||
#error "SERIAL_PORT must be from -1 to 3. Please update your configuration."
|
#error "SERIAL_PORT must be from -1 to 3. Please update your configuration."
|
||||||
#endif
|
#endif
|
||||||
#define MYSERIAL1 customizedSerial1
|
|
||||||
|
#define MYSERIAL0 customizedSerial1
|
||||||
|
|
||||||
#ifdef SERIAL_PORT_2
|
#ifdef SERIAL_PORT_2
|
||||||
#if !WITHIN(SERIAL_PORT_2, -1, 3)
|
#if !WITHIN(SERIAL_PORT_2, -1, 3)
|
||||||
#error "SERIAL_PORT_2 must be from -1 to 3. Please update your configuration."
|
#error "SERIAL_PORT_2 must be from -1 to 3. Please update your configuration."
|
||||||
|
#elif SERIAL_PORT_2 == SERIAL_PORT
|
||||||
|
#error "SERIAL_PORT_2 must be different than SERIAL_PORT. Please update your configuration."
|
||||||
#endif
|
#endif
|
||||||
#define MYSERIAL2 customizedSerial2
|
#define MYSERIAL1 customizedSerial2
|
||||||
|
#define NUM_SERIAL 2
|
||||||
|
#else
|
||||||
|
#define NUM_SERIAL 1
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MMU2_SERIAL_PORT
|
#ifdef DGUS_SERIAL_PORT
|
||||||
#if !WITHIN(MMU2_SERIAL_PORT, -1, 3)
|
#if !WITHIN(DGUS_SERIAL_PORT, -1, 3)
|
||||||
#error "MMU2_SERIAL_PORT must be from -1 to 3. Please update your configuration."
|
#error "DGUS_SERIAL_PORT must be from -1 to 3. Please update your configuration."
|
||||||
|
#elif DGUS_SERIAL_PORT == SERIAL_PORT
|
||||||
|
#error "DGUS_SERIAL_PORT must be different than SERIAL_PORT. Please update your configuration."
|
||||||
|
#elif defined(SERIAL_PORT_2) && DGUS_SERIAL_PORT == SERIAL_PORT_2
|
||||||
|
#error "DGUS_SERIAL_PORT must be different than SERIAL_PORT_2. Please update your configuration."
|
||||||
#endif
|
#endif
|
||||||
#define MMU2_SERIAL mmuSerial
|
#define DGUS_SERIAL internalDgusSerial
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef LCD_SERIAL_PORT
|
#define DGUS_SERIAL_GET_TX_BUFFER_FREE DGUS_SERIAL.get_tx_buffer_free
|
||||||
#if !WITHIN(LCD_SERIAL_PORT, -1, 3)
|
|
||||||
#error "LCD_SERIAL_PORT must be from -1 to 3. Please update your configuration."
|
|
||||||
#endif
|
|
||||||
#define LCD_SERIAL lcdSerial
|
|
||||||
#if HAS_DGUS_LCD
|
|
||||||
#define SERIAL_GET_TX_BUFFER_FREE() LCD_SERIAL.get_tx_buffer_free()
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ------------------------
|
// ------------------------
|
||||||
@@ -135,18 +135,226 @@ void HAL_init();
|
|||||||
inline void HAL_clear_reset_source() { MCUSR = 0; }
|
inline void HAL_clear_reset_source() { MCUSR = 0; }
|
||||||
inline uint8_t HAL_get_reset_source() { return MCUSR; }
|
inline uint8_t HAL_get_reset_source() { return MCUSR; }
|
||||||
|
|
||||||
inline void HAL_reboot() {} // reboot the board or restart the bootloader
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wunused-function"
|
||||||
|
extern "C" {
|
||||||
|
int freeMemory();
|
||||||
|
}
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
|
||||||
#if GCC_VERSION <= 50000
|
// timers
|
||||||
#pragma GCC diagnostic push
|
#define HAL_TIMER_RATE ((F_CPU) / 8) // i.e., 2MHz or 2.5MHz
|
||||||
#pragma GCC diagnostic ignored "-Wunused-function"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern "C" int freeMemory();
|
#define STEP_TIMER_NUM 1
|
||||||
|
#define TEMP_TIMER_NUM 0
|
||||||
|
#define PULSE_TIMER_NUM STEP_TIMER_NUM
|
||||||
|
|
||||||
#if GCC_VERSION <= 50000
|
#define TEMP_TIMER_FREQUENCY ((F_CPU) / 64.0 / 256.0)
|
||||||
#pragma GCC diagnostic pop
|
|
||||||
#endif
|
#define STEPPER_TIMER_RATE HAL_TIMER_RATE
|
||||||
|
#define STEPPER_TIMER_PRESCALE 8
|
||||||
|
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) // Cannot be of type double
|
||||||
|
|
||||||
|
#define PULSE_TIMER_RATE STEPPER_TIMER_RATE // frequency of pulse timer
|
||||||
|
#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
|
||||||
|
#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
|
||||||
|
|
||||||
|
#define ENABLE_STEPPER_DRIVER_INTERRUPT() SBI(TIMSK1, OCIE1A)
|
||||||
|
#define DISABLE_STEPPER_DRIVER_INTERRUPT() CBI(TIMSK1, OCIE1A)
|
||||||
|
#define STEPPER_ISR_ENABLED() TEST(TIMSK1, OCIE1A)
|
||||||
|
|
||||||
|
#define ENABLE_TEMPERATURE_INTERRUPT() SBI(TIMSK0, OCIE0B)
|
||||||
|
#define DISABLE_TEMPERATURE_INTERRUPT() CBI(TIMSK0, OCIE0B)
|
||||||
|
#define TEMPERATURE_ISR_ENABLED() TEST(TIMSK0, OCIE0B)
|
||||||
|
|
||||||
|
FORCE_INLINE void HAL_timer_start(const uint8_t timer_num, const uint32_t) {
|
||||||
|
switch (timer_num) {
|
||||||
|
case STEP_TIMER_NUM:
|
||||||
|
// waveform generation = 0100 = CTC
|
||||||
|
SET_WGM(1, CTC_OCRnA);
|
||||||
|
|
||||||
|
// output mode = 00 (disconnected)
|
||||||
|
SET_COMA(1, NORMAL);
|
||||||
|
|
||||||
|
// Set the timer pre-scaler
|
||||||
|
// Generally we use a divider of 8, resulting in a 2MHz timer
|
||||||
|
// frequency on a 16MHz MCU. If you are going to change this, be
|
||||||
|
// sure to regenerate speed_lookuptable.h with
|
||||||
|
// create_speed_lookuptable.py
|
||||||
|
SET_CS(1, PRESCALER_8); // CS 2 = 1/8 prescaler
|
||||||
|
|
||||||
|
// Init Stepper ISR to 122 Hz for quick starting
|
||||||
|
// (F_CPU) / (STEPPER_TIMER_PRESCALE) / frequency
|
||||||
|
OCR1A = 0x4000;
|
||||||
|
TCNT1 = 0;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TEMP_TIMER_NUM:
|
||||||
|
// Use timer0 for temperature measurement
|
||||||
|
// Interleave temperature interrupt with millies interrupt
|
||||||
|
OCR0B = 128;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#define TIMER_OCR_1 OCR1A
|
||||||
|
#define TIMER_COUNTER_1 TCNT1
|
||||||
|
|
||||||
|
#define TIMER_OCR_0 OCR0A
|
||||||
|
#define TIMER_COUNTER_0 TCNT0
|
||||||
|
|
||||||
|
#define _CAT(a,V...) a##V
|
||||||
|
#define HAL_timer_set_compare(timer, compare) (_CAT(TIMER_OCR_, timer) = compare)
|
||||||
|
#define HAL_timer_get_compare(timer) _CAT(TIMER_OCR_, timer)
|
||||||
|
#define HAL_timer_get_count(timer) _CAT(TIMER_COUNTER_, timer)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* On AVR there is no hardware prioritization and preemption of
|
||||||
|
* interrupts, so this emulates it. The UART has first priority
|
||||||
|
* (otherwise, characters will be lost due to UART overflow).
|
||||||
|
* Then: Stepper, Endstops, Temperature, and -finally- all others.
|
||||||
|
*/
|
||||||
|
#define HAL_timer_isr_prologue(TIMER_NUM)
|
||||||
|
#define HAL_timer_isr_epilogue(TIMER_NUM)
|
||||||
|
|
||||||
|
/* 18 cycles maximum latency */
|
||||||
|
#define HAL_STEP_TIMER_ISR() \
|
||||||
|
extern "C" void TIMER1_COMPA_vect() __attribute__ ((signal, naked, used, externally_visible)); \
|
||||||
|
extern "C" void TIMER1_COMPA_vect_bottom() asm ("TIMER1_COMPA_vect_bottom") __attribute__ ((used, externally_visible, noinline)); \
|
||||||
|
void TIMER1_COMPA_vect() { \
|
||||||
|
__asm__ __volatile__ ( \
|
||||||
|
A("push r16") /* 2 Save R16 */ \
|
||||||
|
A("in r16, __SREG__") /* 1 Get SREG */ \
|
||||||
|
A("push r16") /* 2 Save SREG into stack */ \
|
||||||
|
A("lds r16, %[timsk0]") /* 2 Load into R0 the Temperature timer Interrupt mask register */ \
|
||||||
|
A("push r16") /* 2 Save TIMSK0 into the stack */ \
|
||||||
|
A("andi r16,~%[msk0]") /* 1 Disable the temperature ISR */ \
|
||||||
|
A("sts %[timsk0], r16") /* 2 And set the new value */ \
|
||||||
|
A("lds r16, %[timsk1]") /* 2 Load into R0 the stepper timer Interrupt mask register [TIMSK1] */ \
|
||||||
|
A("andi r16,~%[msk1]") /* 1 Disable the stepper ISR */ \
|
||||||
|
A("sts %[timsk1], r16") /* 2 And set the new value */ \
|
||||||
|
A("push r16") /* 2 Save TIMSK1 into stack */ \
|
||||||
|
A("in r16, 0x3B") /* 1 Get RAMPZ register */ \
|
||||||
|
A("push r16") /* 2 Save RAMPZ into stack */ \
|
||||||
|
A("in r16, 0x3C") /* 1 Get EIND register */ \
|
||||||
|
A("push r0") /* C runtime can modify all the following registers without restoring them */ \
|
||||||
|
A("push r1") \
|
||||||
|
A("push r18") \
|
||||||
|
A("push r19") \
|
||||||
|
A("push r20") \
|
||||||
|
A("push r21") \
|
||||||
|
A("push r22") \
|
||||||
|
A("push r23") \
|
||||||
|
A("push r24") \
|
||||||
|
A("push r25") \
|
||||||
|
A("push r26") \
|
||||||
|
A("push r27") \
|
||||||
|
A("push r30") \
|
||||||
|
A("push r31") \
|
||||||
|
A("clr r1") /* C runtime expects this register to be 0 */ \
|
||||||
|
A("call TIMER1_COMPA_vect_bottom") /* Call the bottom handler - No inlining allowed, otherwise registers used are not saved */ \
|
||||||
|
A("pop r31") \
|
||||||
|
A("pop r30") \
|
||||||
|
A("pop r27") \
|
||||||
|
A("pop r26") \
|
||||||
|
A("pop r25") \
|
||||||
|
A("pop r24") \
|
||||||
|
A("pop r23") \
|
||||||
|
A("pop r22") \
|
||||||
|
A("pop r21") \
|
||||||
|
A("pop r20") \
|
||||||
|
A("pop r19") \
|
||||||
|
A("pop r18") \
|
||||||
|
A("pop r1") \
|
||||||
|
A("pop r0") \
|
||||||
|
A("out 0x3C, r16") /* 1 Restore EIND register */ \
|
||||||
|
A("pop r16") /* 2 Get the original RAMPZ register value */ \
|
||||||
|
A("out 0x3B, r16") /* 1 Restore RAMPZ register to its original value */ \
|
||||||
|
A("pop r16") /* 2 Get the original TIMSK1 value but with stepper ISR disabled */ \
|
||||||
|
A("ori r16,%[msk1]") /* 1 Reenable the stepper ISR */ \
|
||||||
|
A("cli") /* 1 Disable global interrupts - Reenabling Stepper ISR can reenter amd temperature can reenter, and we want that, if it happens, after this ISR has ended */ \
|
||||||
|
A("sts %[timsk1], r16") /* 2 And restore the old value - This reenables the stepper ISR */ \
|
||||||
|
A("pop r16") /* 2 Get the temperature timer Interrupt mask register [TIMSK0] */ \
|
||||||
|
A("sts %[timsk0], r16") /* 2 And restore the old value - This reenables the temperature ISR */ \
|
||||||
|
A("pop r16") /* 2 Get the old SREG value */ \
|
||||||
|
A("out __SREG__, r16") /* 1 And restore the SREG value */ \
|
||||||
|
A("pop r16") /* 2 Restore R16 value */ \
|
||||||
|
A("reti") /* 4 Return from interrupt */ \
|
||||||
|
: \
|
||||||
|
: [timsk0] "i" ((uint16_t)&TIMSK0), \
|
||||||
|
[timsk1] "i" ((uint16_t)&TIMSK1), \
|
||||||
|
[msk0] "M" ((uint8_t)(1<<OCIE0B)),\
|
||||||
|
[msk1] "M" ((uint8_t)(1<<OCIE1A)) \
|
||||||
|
: \
|
||||||
|
); \
|
||||||
|
} \
|
||||||
|
void TIMER1_COMPA_vect_bottom()
|
||||||
|
|
||||||
|
/* 14 cycles maximum latency */
|
||||||
|
#define HAL_TEMP_TIMER_ISR() \
|
||||||
|
extern "C" void TIMER0_COMPB_vect() __attribute__ ((signal, naked, used, externally_visible)); \
|
||||||
|
extern "C" void TIMER0_COMPB_vect_bottom() asm ("TIMER0_COMPB_vect_bottom") __attribute__ ((used, externally_visible, noinline)); \
|
||||||
|
void TIMER0_COMPB_vect() { \
|
||||||
|
__asm__ __volatile__ ( \
|
||||||
|
A("push r16") /* 2 Save R16 */ \
|
||||||
|
A("in r16, __SREG__") /* 1 Get SREG */ \
|
||||||
|
A("push r16") /* 2 Save SREG into stack */ \
|
||||||
|
A("lds r16, %[timsk0]") /* 2 Load into R0 the Temperature timer Interrupt mask register */ \
|
||||||
|
A("andi r16,~%[msk0]") /* 1 Disable the temperature ISR */ \
|
||||||
|
A("sts %[timsk0], r16") /* 2 And set the new value */ \
|
||||||
|
A("sei") /* 1 Enable global interrupts - It is safe, as the temperature ISR is disabled, so we cannot reenter it */ \
|
||||||
|
A("push r16") /* 2 Save TIMSK0 into stack */ \
|
||||||
|
A("in r16, 0x3B") /* 1 Get RAMPZ register */ \
|
||||||
|
A("push r16") /* 2 Save RAMPZ into stack */ \
|
||||||
|
A("in r16, 0x3C") /* 1 Get EIND register */ \
|
||||||
|
A("push r0") /* C runtime can modify all the following registers without restoring them */ \
|
||||||
|
A("push r1") \
|
||||||
|
A("push r18") \
|
||||||
|
A("push r19") \
|
||||||
|
A("push r20") \
|
||||||
|
A("push r21") \
|
||||||
|
A("push r22") \
|
||||||
|
A("push r23") \
|
||||||
|
A("push r24") \
|
||||||
|
A("push r25") \
|
||||||
|
A("push r26") \
|
||||||
|
A("push r27") \
|
||||||
|
A("push r30") \
|
||||||
|
A("push r31") \
|
||||||
|
A("clr r1") /* C runtime expects this register to be 0 */ \
|
||||||
|
A("call TIMER0_COMPB_vect_bottom") /* Call the bottom handler - No inlining allowed, otherwise registers used are not saved */ \
|
||||||
|
A("pop r31") \
|
||||||
|
A("pop r30") \
|
||||||
|
A("pop r27") \
|
||||||
|
A("pop r26") \
|
||||||
|
A("pop r25") \
|
||||||
|
A("pop r24") \
|
||||||
|
A("pop r23") \
|
||||||
|
A("pop r22") \
|
||||||
|
A("pop r21") \
|
||||||
|
A("pop r20") \
|
||||||
|
A("pop r19") \
|
||||||
|
A("pop r18") \
|
||||||
|
A("pop r1") \
|
||||||
|
A("pop r0") \
|
||||||
|
A("out 0x3C, r16") /* 1 Restore EIND register */ \
|
||||||
|
A("pop r16") /* 2 Get the original RAMPZ register value */ \
|
||||||
|
A("out 0x3B, r16") /* 1 Restore RAMPZ register to its original value */ \
|
||||||
|
A("pop r16") /* 2 Get the original TIMSK0 value but with temperature ISR disabled */ \
|
||||||
|
A("ori r16,%[msk0]") /* 1 Enable temperature ISR */ \
|
||||||
|
A("cli") /* 1 Disable global interrupts - We must do this, as we will reenable the temperature ISR, and we don't want to reenter this handler until the current one is done */ \
|
||||||
|
A("sts %[timsk0], r16") /* 2 And restore the old value */ \
|
||||||
|
A("pop r16") /* 2 Get the old SREG */ \
|
||||||
|
A("out __SREG__, r16") /* 1 And restore the SREG value */ \
|
||||||
|
A("pop r16") /* 2 Restore R16 */ \
|
||||||
|
A("reti") /* 4 Return from interrupt */ \
|
||||||
|
: \
|
||||||
|
: [timsk0] "i"((uint16_t)&TIMSK0), \
|
||||||
|
[msk0] "M" ((uint8_t)(1<<OCIE0B)) \
|
||||||
|
: \
|
||||||
|
); \
|
||||||
|
} \
|
||||||
|
void TIMER0_COMPB_vect_bottom()
|
||||||
|
|
||||||
// ADC
|
// ADC
|
||||||
#ifdef DIDR2
|
#ifdef DIDR2
|
||||||
@@ -170,7 +378,6 @@ inline void HAL_adc_init() {
|
|||||||
#define HAL_START_ADC(ch) ADCSRB = 0; SET_ADMUX_ADCSRA(ch)
|
#define HAL_START_ADC(ch) ADCSRB = 0; SET_ADMUX_ADCSRA(ch)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define HAL_ADC_VREF 5.0
|
|
||||||
#define HAL_ADC_RESOLUTION 10
|
#define HAL_ADC_RESOLUTION 10
|
||||||
#define HAL_READ_ADC() ADC
|
#define HAL_READ_ADC() ADC
|
||||||
#define HAL_ADC_READY() !TEST(ADCSRA, ADSC)
|
#define HAL_ADC_READY() !TEST(ADCSRA, ADSC)
|
||||||
@@ -188,8 +395,6 @@ inline void HAL_adc_init() {
|
|||||||
// AVR compatibility
|
// AVR compatibility
|
||||||
#define strtof strtod
|
#define strtof strtod
|
||||||
|
|
||||||
#define HAL_CAN_SET_PWM_FREQ // This HAL supports PWM Frequency adjustment
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set_pwm_frequency
|
* set_pwm_frequency
|
||||||
* Sets the frequency of the timer corresponding to the provided pin
|
* Sets the frequency of the timer corresponding to the provided pin
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -34,17 +34,17 @@
|
|||||||
#include "../../inc/MarlinConfig.h"
|
#include "../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
void spiBegin() {
|
void spiBegin() {
|
||||||
OUT_WRITE(SD_SS_PIN, HIGH);
|
OUT_WRITE(SS_PIN, HIGH);
|
||||||
SET_OUTPUT(SD_SCK_PIN);
|
SET_OUTPUT(SCK_PIN);
|
||||||
SET_INPUT(SD_MISO_PIN);
|
SET_INPUT(MISO_PIN);
|
||||||
SET_OUTPUT(SD_MOSI_PIN);
|
SET_OUTPUT(MOSI_PIN);
|
||||||
|
|
||||||
#if DISABLED(SOFTWARE_SPI)
|
#if DISABLED(SOFTWARE_SPI)
|
||||||
// SS must be in output mode even it is not chip select
|
// SS must be in output mode even it is not chip select
|
||||||
//SET_OUTPUT(SD_SS_PIN);
|
//SET_OUTPUT(SS_PIN);
|
||||||
// set SS high - may be chip select for another SPI device
|
// set SS high - may be chip select for another SPI device
|
||||||
//#if SET_SPI_SS_HIGH
|
//#if SET_SPI_SS_HIGH
|
||||||
//WRITE(SD_SS_PIN, HIGH);
|
//WRITE(SS_PIN, HIGH);
|
||||||
//#endif
|
//#endif
|
||||||
// set a default rate
|
// set a default rate
|
||||||
spiInit(1);
|
spiInit(1);
|
||||||
@@ -195,19 +195,19 @@ void spiBegin() {
|
|||||||
// no interrupts during byte receive - about 8µs
|
// no interrupts during byte receive - about 8µs
|
||||||
cli();
|
cli();
|
||||||
// output pin high - like sending 0xFF
|
// output pin high - like sending 0xFF
|
||||||
WRITE(SD_MOSI_PIN, HIGH);
|
WRITE(MOSI_PIN, HIGH);
|
||||||
|
|
||||||
LOOP_L_N(i, 8) {
|
LOOP_L_N(i, 8) {
|
||||||
WRITE(SD_SCK_PIN, HIGH);
|
WRITE(SCK_PIN, HIGH);
|
||||||
|
|
||||||
nop; // adjust so SCK is nice
|
nop; // adjust so SCK is nice
|
||||||
nop;
|
nop;
|
||||||
|
|
||||||
data <<= 1;
|
data <<= 1;
|
||||||
|
|
||||||
if (READ(SD_MISO_PIN)) data |= 1;
|
if (READ(MISO_PIN)) data |= 1;
|
||||||
|
|
||||||
WRITE(SD_SCK_PIN, LOW);
|
WRITE(SCK_PIN, LOW);
|
||||||
}
|
}
|
||||||
|
|
||||||
sei();
|
sei();
|
||||||
@@ -225,10 +225,10 @@ void spiBegin() {
|
|||||||
// no interrupts during byte send - about 8µs
|
// no interrupts during byte send - about 8µs
|
||||||
cli();
|
cli();
|
||||||
LOOP_L_N(i, 8) {
|
LOOP_L_N(i, 8) {
|
||||||
WRITE(SD_SCK_PIN, LOW);
|
WRITE(SCK_PIN, LOW);
|
||||||
WRITE(SD_MOSI_PIN, data & 0x80);
|
WRITE(MOSI_PIN, data & 0x80);
|
||||||
data <<= 1;
|
data <<= 1;
|
||||||
WRITE(SD_SCK_PIN, HIGH);
|
WRITE(SCK_PIN, HIGH);
|
||||||
}
|
}
|
||||||
|
|
||||||
nop; // hold SCK high for a few ns
|
nop; // hold SCK high for a few ns
|
||||||
@@ -236,7 +236,7 @@ void spiBegin() {
|
|||||||
nop;
|
nop;
|
||||||
nop;
|
nop;
|
||||||
|
|
||||||
WRITE(SD_SCK_PIN, LOW);
|
WRITE(SCK_PIN, LOW);
|
||||||
|
|
||||||
sei();
|
sei();
|
||||||
}
|
}
|
||||||
|
|||||||
+675
-518
File diff suppressed because it is too large
Load Diff
@@ -16,7 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
@@ -34,7 +34,6 @@
|
|||||||
#include <WString.h>
|
#include <WString.h>
|
||||||
|
|
||||||
#include "../../inc/MarlinConfigPre.h"
|
#include "../../inc/MarlinConfigPre.h"
|
||||||
#include "../../core/serial_hook.h"
|
|
||||||
|
|
||||||
#ifndef SERIAL_PORT
|
#ifndef SERIAL_PORT
|
||||||
#define SERIAL_PORT 0
|
#define SERIAL_PORT 0
|
||||||
@@ -49,11 +48,11 @@
|
|||||||
|
|
||||||
// These are macros to build serial port register names for the selected SERIAL_PORT (C preprocessor
|
// These are macros to build serial port register names for the selected SERIAL_PORT (C preprocessor
|
||||||
// requires two levels of indirection to expand macro values properly)
|
// requires two levels of indirection to expand macro values properly)
|
||||||
#define SERIAL_REGNAME(registerbase,number,suffix) _SERIAL_REGNAME(registerbase,number,suffix)
|
#define SERIAL_REGNAME(registerbase,number,suffix) SERIAL_REGNAME_INTERNAL(registerbase,number,suffix)
|
||||||
#if SERIAL_PORT == 0 && (!defined(UBRR0H) || !defined(UDR0)) // use un-numbered registers if necessary
|
#if SERIAL_PORT == 0 && (!defined(UBRR0H) || !defined(UDR0)) // use un-numbered registers if necessary
|
||||||
#define _SERIAL_REGNAME(registerbase,number,suffix) registerbase##suffix
|
#define SERIAL_REGNAME_INTERNAL(registerbase,number,suffix) registerbase##suffix
|
||||||
#else
|
#else
|
||||||
#define _SERIAL_REGNAME(registerbase,number,suffix) registerbase##number##suffix
|
#define SERIAL_REGNAME_INTERNAL(registerbase,number,suffix) registerbase##number##suffix
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Registers used by MarlinSerial class (expanded depending on selected serial port)
|
// Registers used by MarlinSerial class (expanded depending on selected serial port)
|
||||||
@@ -136,6 +135,10 @@
|
|||||||
UART_DECL(3);
|
UART_DECL(3);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define DEC 10
|
||||||
|
#define HEX 16
|
||||||
|
#define OCT 8
|
||||||
|
#define BIN 2
|
||||||
#define BYTE 0
|
#define BYTE 0
|
||||||
|
|
||||||
// Templated type selector
|
// Templated type selector
|
||||||
@@ -199,30 +202,58 @@
|
|||||||
static FORCE_INLINE void atomic_set_rx_tail(ring_buffer_pos_t value);
|
static FORCE_INLINE void atomic_set_rx_tail(ring_buffer_pos_t value);
|
||||||
static FORCE_INLINE ring_buffer_pos_t atomic_read_rx_tail();
|
static FORCE_INLINE ring_buffer_pos_t atomic_read_rx_tail();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
FORCE_INLINE static void store_rxd_char();
|
FORCE_INLINE static void store_rxd_char();
|
||||||
FORCE_INLINE static void _tx_udr_empty_irq();
|
FORCE_INLINE static void _tx_udr_empty_irq();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static void begin(const long);
|
MarlinSerial() {};
|
||||||
static void end();
|
static void begin(const long);
|
||||||
static int peek();
|
static void end();
|
||||||
static int read();
|
static int peek();
|
||||||
static void flush();
|
static int read();
|
||||||
static ring_buffer_pos_t available();
|
static void flush();
|
||||||
static size_t write(const uint8_t c);
|
static ring_buffer_pos_t available();
|
||||||
static void flushTX();
|
static void write(const uint8_t c);
|
||||||
#if HAS_DGUS_LCD
|
static void flushTX();
|
||||||
static ring_buffer_pos_t get_tx_buffer_free();
|
#ifdef DGUS_SERIAL_PORT
|
||||||
#endif
|
static ring_buffer_pos_t get_tx_buffer_free();
|
||||||
|
#endif
|
||||||
|
|
||||||
enum { HasEmergencyParser = Cfg::EMERGENCYPARSER };
|
FORCE_INLINE static uint8_t dropped() { return Cfg::DROPPED_RX ? rx_dropped_bytes : 0; }
|
||||||
static inline bool emergency_parser_enabled() { return Cfg::EMERGENCYPARSER; }
|
FORCE_INLINE static uint8_t buffer_overruns() { return Cfg::RX_OVERRUNS ? rx_buffer_overruns : 0; }
|
||||||
|
FORCE_INLINE static uint8_t framing_errors() { return Cfg::RX_FRAMING_ERRORS ? rx_framing_errors : 0; }
|
||||||
|
FORCE_INLINE static ring_buffer_pos_t rxMaxEnqueued() { return Cfg::MAX_RX_QUEUED ? rx_max_enqueued : 0; }
|
||||||
|
|
||||||
FORCE_INLINE static uint8_t dropped() { return Cfg::DROPPED_RX ? rx_dropped_bytes : 0; }
|
FORCE_INLINE static void write(const char* str) { while (*str) write(*str++); }
|
||||||
FORCE_INLINE static uint8_t buffer_overruns() { return Cfg::RX_OVERRUNS ? rx_buffer_overruns : 0; }
|
FORCE_INLINE static void write(const uint8_t* buffer, size_t size) { while (size--) write(*buffer++); }
|
||||||
FORCE_INLINE static uint8_t framing_errors() { return Cfg::RX_FRAMING_ERRORS ? rx_framing_errors : 0; }
|
FORCE_INLINE static void print(const String& s) { for (int i = 0; i < (int)s.length(); i++) write(s[i]); }
|
||||||
FORCE_INLINE static ring_buffer_pos_t rxMaxEnqueued() { return Cfg::MAX_RX_QUEUED ? rx_max_enqueued : 0; }
|
FORCE_INLINE static void print(const char* str) { write(str); }
|
||||||
|
|
||||||
|
static void print(char, int = BYTE);
|
||||||
|
static void print(unsigned char, int = BYTE);
|
||||||
|
static void print(int, int = DEC);
|
||||||
|
static void print(unsigned int, int = DEC);
|
||||||
|
static void print(long, int = DEC);
|
||||||
|
static void print(unsigned long, int = DEC);
|
||||||
|
static void print(double, int = 2);
|
||||||
|
|
||||||
|
static void println(const String& s);
|
||||||
|
static void println(const char[]);
|
||||||
|
static void println(char, int = BYTE);
|
||||||
|
static void println(unsigned char, int = BYTE);
|
||||||
|
static void println(int, int = DEC);
|
||||||
|
static void println(unsigned int, int = DEC);
|
||||||
|
static void println(long, int = DEC);
|
||||||
|
static void println(unsigned long, int = DEC);
|
||||||
|
static void println(double, int = 2);
|
||||||
|
static void println();
|
||||||
|
operator bool() { return true; }
|
||||||
|
|
||||||
|
private:
|
||||||
|
static void printNumber(unsigned long, const uint8_t);
|
||||||
|
static void printFloat(double, uint8_t);
|
||||||
};
|
};
|
||||||
|
|
||||||
template <uint8_t serial>
|
template <uint8_t serial>
|
||||||
@@ -237,56 +268,51 @@
|
|||||||
static constexpr bool RX_FRAMING_ERRORS = ENABLED(SERIAL_STATS_RX_FRAMING_ERRORS);
|
static constexpr bool RX_FRAMING_ERRORS = ENABLED(SERIAL_STATS_RX_FRAMING_ERRORS);
|
||||||
static constexpr bool MAX_RX_QUEUED = ENABLED(SERIAL_STATS_MAX_RX_QUEUED);
|
static constexpr bool MAX_RX_QUEUED = ENABLED(SERIAL_STATS_MAX_RX_QUEUED);
|
||||||
};
|
};
|
||||||
|
extern MarlinSerial<MarlinSerialCfg<SERIAL_PORT>> customizedSerial1;
|
||||||
typedef Serial1Class< MarlinSerial< MarlinSerialCfg<SERIAL_PORT> > > MSerialT;
|
|
||||||
extern MSerialT customizedSerial1;
|
|
||||||
|
|
||||||
#ifdef SERIAL_PORT_2
|
#ifdef SERIAL_PORT_2
|
||||||
typedef Serial1Class< MarlinSerial< MarlinSerialCfg<SERIAL_PORT_2> > > MSerialT2;
|
|
||||||
extern MSerialT2 customizedSerial2;
|
extern MarlinSerial<MarlinSerialCfg<SERIAL_PORT_2>> customizedSerial2;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // !USBCON
|
#endif // !USBCON
|
||||||
|
|
||||||
#ifdef MMU2_SERIAL_PORT
|
#ifdef INTERNAL_SERIAL_PORT
|
||||||
template <uint8_t serial>
|
template <uint8_t serial>
|
||||||
struct MMU2SerialCfg {
|
struct MarlinInternalSerialCfg {
|
||||||
static constexpr int PORT = serial;
|
static constexpr int PORT = serial;
|
||||||
static constexpr unsigned int RX_SIZE = 32;
|
static constexpr unsigned int RX_SIZE = 32;
|
||||||
static constexpr unsigned int TX_SIZE = 32;
|
static constexpr unsigned int TX_SIZE = 32;
|
||||||
static constexpr bool XONOFF = false;
|
static constexpr bool XONOFF = false;
|
||||||
static constexpr bool EMERGENCYPARSER = false;
|
static constexpr bool EMERGENCYPARSER = false;
|
||||||
static constexpr bool DROPPED_RX = false;
|
static constexpr bool DROPPED_RX = false;
|
||||||
|
static constexpr bool RX_OVERRUNS = false;
|
||||||
static constexpr bool RX_FRAMING_ERRORS = false;
|
static constexpr bool RX_FRAMING_ERRORS = false;
|
||||||
static constexpr bool MAX_RX_QUEUED = false;
|
static constexpr bool MAX_RX_QUEUED = false;
|
||||||
static constexpr bool RX_OVERRUNS = false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef Serial1Class< MarlinSerial< MMU2SerialCfg<MMU2_SERIAL_PORT> > > MSerialT3;
|
extern MarlinSerial<MarlinInternalSerialCfg<INTERNAL_SERIAL_PORT>> internalSerial;
|
||||||
extern MSerialT3 mmuSerial;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef LCD_SERIAL_PORT
|
#ifdef DGUS_SERIAL_PORT
|
||||||
|
|
||||||
template <uint8_t serial>
|
template <uint8_t serial>
|
||||||
struct LCDSerialCfg {
|
struct MarlinInternalSerialCfg {
|
||||||
static constexpr int PORT = serial;
|
static constexpr int PORT = serial;
|
||||||
static constexpr unsigned int RX_SIZE = TERN(HAS_DGUS_LCD, DGUS_RX_BUFFER_SIZE, 64);
|
static constexpr unsigned int RX_SIZE = 128;
|
||||||
static constexpr unsigned int TX_SIZE = TERN(HAS_DGUS_LCD, DGUS_TX_BUFFER_SIZE, 128);
|
static constexpr unsigned int TX_SIZE = 48;
|
||||||
static constexpr bool XONOFF = false;
|
static constexpr bool XONOFF = false;
|
||||||
static constexpr bool EMERGENCYPARSER = ENABLED(EMERGENCY_PARSER);
|
static constexpr bool EMERGENCYPARSER = false;
|
||||||
static constexpr bool DROPPED_RX = false;
|
static constexpr bool DROPPED_RX = false;
|
||||||
|
static constexpr bool RX_OVERRUNS = HAS_DGUS_LCD && ENABLED(DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS);
|
||||||
static constexpr bool RX_FRAMING_ERRORS = false;
|
static constexpr bool RX_FRAMING_ERRORS = false;
|
||||||
static constexpr bool MAX_RX_QUEUED = false;
|
static constexpr bool MAX_RX_QUEUED = false;
|
||||||
static constexpr bool RX_OVERRUNS = BOTH(HAS_DGUS_LCD, SERIAL_STATS_RX_BUFFER_OVERRUNS);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef Serial1Class< MarlinSerial< LCDSerialCfg<LCD_SERIAL_PORT> > > MSerialT4;
|
extern MarlinSerial<MarlinInternalSerialCfg<DGUS_SERIAL_PORT>> internalDgusSerial;
|
||||||
extern MSerialT4 lcdSerial;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Use the UART for Bluetooth in AT90USB configurations
|
// Use the UART for Bluetooth in AT90USB configurations
|
||||||
#if defined(USBCON) && ENABLED(BLUETOOTH)
|
#if defined(USBCON) && ENABLED(BLUETOOTH)
|
||||||
typedef Serial1Class<HardwareSerial> MSerialT5;
|
extern HardwareSerial bluetoothSerial;
|
||||||
extern MSerialT5 bluetoothSerial;
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -48,6 +48,7 @@
|
|||||||
* readMicroseconds() - Get the last-written servo pulse width in microseconds.
|
* readMicroseconds() - Get the last-written servo pulse width in microseconds.
|
||||||
* attached() - Return true if a servo is attached.
|
* attached() - Return true if a servo is attached.
|
||||||
* detach() - Stop an attached servo from pulsing its i/o pin.
|
* detach() - Stop an attached servo from pulsing its i/o pin.
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef __AVR__
|
#ifdef __AVR__
|
||||||
@@ -58,6 +59,7 @@
|
|||||||
|
|
||||||
#include <avr/interrupt.h>
|
#include <avr/interrupt.h>
|
||||||
|
|
||||||
|
#include "../shared/Marduino.h"
|
||||||
#include "../shared/servo.h"
|
#include "../shared/servo.h"
|
||||||
#include "../shared/servo_private.h"
|
#include "../shared/servo_private.h"
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
@@ -59,12 +59,10 @@
|
|||||||
// Say which 16 bit timers can be used and in what order
|
// Say which 16 bit timers can be used and in what order
|
||||||
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
|
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
|
||||||
//#define _useTimer1
|
//#define _useTimer1
|
||||||
|
#define _useTimer3
|
||||||
#define _useTimer4
|
#define _useTimer4
|
||||||
#if NUM_SERVOS > SERVOS_PER_TIMER
|
#if !HAS_MOTOR_CURRENT_PWM
|
||||||
#define _useTimer3
|
#define _useTimer5 // Timer 5 is used for motor current PWM and can't be used for servos.
|
||||||
#if !HAS_MOTOR_CURRENT_PWM && SERVOS > 2 * SERVOS_PER_TIMER
|
|
||||||
#define _useTimer5 // Timer 5 is used for motor current PWM and can't be used for servos.
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
#elif defined(__AVR_ATmega32U4__)
|
#elif defined(__AVR_ATmega32U4__)
|
||||||
#define _useTimer3
|
#define _useTimer3
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
@@ -124,7 +124,7 @@ void setup_endstop_interrupts() {
|
|||||||
#if (digitalPinToInterrupt(X_MAX_PIN) != NOT_AN_INTERRUPT)
|
#if (digitalPinToInterrupt(X_MAX_PIN) != NOT_AN_INTERRUPT)
|
||||||
_ATTACH(X_MAX_PIN);
|
_ATTACH(X_MAX_PIN);
|
||||||
#else
|
#else
|
||||||
static_assert(digitalPinHasPCICR(X_MAX_PIN), "X_MAX_PIN is not interrupt-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue.");
|
static_assert(digitalPinHasPCICR(X_MAX_PIN), "X_MAX_PIN is not interrupt-capable");
|
||||||
pciSetup(X_MAX_PIN);
|
pciSetup(X_MAX_PIN);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -132,7 +132,7 @@ void setup_endstop_interrupts() {
|
|||||||
#if (digitalPinToInterrupt(X_MIN_PIN) != NOT_AN_INTERRUPT)
|
#if (digitalPinToInterrupt(X_MIN_PIN) != NOT_AN_INTERRUPT)
|
||||||
_ATTACH(X_MIN_PIN);
|
_ATTACH(X_MIN_PIN);
|
||||||
#else
|
#else
|
||||||
static_assert(digitalPinHasPCICR(X_MIN_PIN), "X_MIN_PIN is not interrupt-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue.");
|
static_assert(digitalPinHasPCICR(X_MIN_PIN), "X_MIN_PIN is not interrupt-capable");
|
||||||
pciSetup(X_MIN_PIN);
|
pciSetup(X_MIN_PIN);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -140,7 +140,7 @@ void setup_endstop_interrupts() {
|
|||||||
#if (digitalPinToInterrupt(Y_MAX_PIN) != NOT_AN_INTERRUPT)
|
#if (digitalPinToInterrupt(Y_MAX_PIN) != NOT_AN_INTERRUPT)
|
||||||
_ATTACH(Y_MAX_PIN);
|
_ATTACH(Y_MAX_PIN);
|
||||||
#else
|
#else
|
||||||
static_assert(digitalPinHasPCICR(Y_MAX_PIN), "Y_MAX_PIN is not interrupt-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue.");
|
static_assert(digitalPinHasPCICR(Y_MAX_PIN), "Y_MAX_PIN is not interrupt-capable");
|
||||||
pciSetup(Y_MAX_PIN);
|
pciSetup(Y_MAX_PIN);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -148,7 +148,7 @@ void setup_endstop_interrupts() {
|
|||||||
#if (digitalPinToInterrupt(Y_MIN_PIN) != NOT_AN_INTERRUPT)
|
#if (digitalPinToInterrupt(Y_MIN_PIN) != NOT_AN_INTERRUPT)
|
||||||
_ATTACH(Y_MIN_PIN);
|
_ATTACH(Y_MIN_PIN);
|
||||||
#else
|
#else
|
||||||
static_assert(digitalPinHasPCICR(Y_MIN_PIN), "Y_MIN_PIN is not interrupt-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue.");
|
static_assert(digitalPinHasPCICR(Y_MIN_PIN), "Y_MIN_PIN is not interrupt-capable");
|
||||||
pciSetup(Y_MIN_PIN);
|
pciSetup(Y_MIN_PIN);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -156,7 +156,7 @@ void setup_endstop_interrupts() {
|
|||||||
#if (digitalPinToInterrupt(Z_MAX_PIN) != NOT_AN_INTERRUPT)
|
#if (digitalPinToInterrupt(Z_MAX_PIN) != NOT_AN_INTERRUPT)
|
||||||
_ATTACH(Z_MAX_PIN);
|
_ATTACH(Z_MAX_PIN);
|
||||||
#else
|
#else
|
||||||
static_assert(digitalPinHasPCICR(Z_MAX_PIN), "Z_MAX_PIN is not interrupt-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue.");
|
static_assert(digitalPinHasPCICR(Z_MAX_PIN), "Z_MAX_PIN is not interrupt-capable");
|
||||||
pciSetup(Z_MAX_PIN);
|
pciSetup(Z_MAX_PIN);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -164,7 +164,7 @@ void setup_endstop_interrupts() {
|
|||||||
#if (digitalPinToInterrupt(Z_MIN_PIN) != NOT_AN_INTERRUPT)
|
#if (digitalPinToInterrupt(Z_MIN_PIN) != NOT_AN_INTERRUPT)
|
||||||
_ATTACH(Z_MIN_PIN);
|
_ATTACH(Z_MIN_PIN);
|
||||||
#else
|
#else
|
||||||
static_assert(digitalPinHasPCICR(Z_MIN_PIN), "Z_MIN_PIN is not interrupt-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue.");
|
static_assert(digitalPinHasPCICR(Z_MIN_PIN), "Z_MIN_PIN is not interrupt-capable");
|
||||||
pciSetup(Z_MIN_PIN);
|
pciSetup(Z_MIN_PIN);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -172,7 +172,7 @@ void setup_endstop_interrupts() {
|
|||||||
#if (digitalPinToInterrupt(X2_MAX_PIN) != NOT_AN_INTERRUPT)
|
#if (digitalPinToInterrupt(X2_MAX_PIN) != NOT_AN_INTERRUPT)
|
||||||
_ATTACH(X2_MAX_PIN);
|
_ATTACH(X2_MAX_PIN);
|
||||||
#else
|
#else
|
||||||
static_assert(digitalPinHasPCICR(X2_MAX_PIN), "X2_MAX_PIN is not interrupt-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue.");
|
static_assert(digitalPinHasPCICR(X2_MAX_PIN), "X2_MAX_PIN is not interrupt-capable");
|
||||||
pciSetup(X2_MAX_PIN);
|
pciSetup(X2_MAX_PIN);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -180,7 +180,7 @@ void setup_endstop_interrupts() {
|
|||||||
#if (digitalPinToInterrupt(X2_MIN_PIN) != NOT_AN_INTERRUPT)
|
#if (digitalPinToInterrupt(X2_MIN_PIN) != NOT_AN_INTERRUPT)
|
||||||
_ATTACH(X2_MIN_PIN);
|
_ATTACH(X2_MIN_PIN);
|
||||||
#else
|
#else
|
||||||
static_assert(digitalPinHasPCICR(X2_MIN_PIN), "X2_MIN_PIN is not interrupt-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue.");
|
static_assert(digitalPinHasPCICR(X2_MIN_PIN), "X2_MIN_PIN is not interrupt-capable");
|
||||||
pciSetup(X2_MIN_PIN);
|
pciSetup(X2_MIN_PIN);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -188,7 +188,7 @@ void setup_endstop_interrupts() {
|
|||||||
#if (digitalPinToInterrupt(Y2_MAX_PIN) != NOT_AN_INTERRUPT)
|
#if (digitalPinToInterrupt(Y2_MAX_PIN) != NOT_AN_INTERRUPT)
|
||||||
_ATTACH(Y2_MAX_PIN);
|
_ATTACH(Y2_MAX_PIN);
|
||||||
#else
|
#else
|
||||||
static_assert(digitalPinHasPCICR(Y2_MAX_PIN), "Y2_MAX_PIN is not interrupt-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue.");
|
static_assert(digitalPinHasPCICR(Y2_MAX_PIN), "Y2_MAX_PIN is not interrupt-capable");
|
||||||
pciSetup(Y2_MAX_PIN);
|
pciSetup(Y2_MAX_PIN);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -196,7 +196,7 @@ void setup_endstop_interrupts() {
|
|||||||
#if (digitalPinToInterrupt(Y2_MIN_PIN) != NOT_AN_INTERRUPT)
|
#if (digitalPinToInterrupt(Y2_MIN_PIN) != NOT_AN_INTERRUPT)
|
||||||
_ATTACH(Y2_MIN_PIN);
|
_ATTACH(Y2_MIN_PIN);
|
||||||
#else
|
#else
|
||||||
static_assert(digitalPinHasPCICR(Y2_MIN_PIN), "Y2_MIN_PIN is not interrupt-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue.");
|
static_assert(digitalPinHasPCICR(Y2_MIN_PIN), "Y2_MIN_PIN is not interrupt-capable");
|
||||||
pciSetup(Y2_MIN_PIN);
|
pciSetup(Y2_MIN_PIN);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -204,7 +204,7 @@ void setup_endstop_interrupts() {
|
|||||||
#if (digitalPinToInterrupt(Z2_MAX_PIN) != NOT_AN_INTERRUPT)
|
#if (digitalPinToInterrupt(Z2_MAX_PIN) != NOT_AN_INTERRUPT)
|
||||||
_ATTACH(Z2_MAX_PIN);
|
_ATTACH(Z2_MAX_PIN);
|
||||||
#else
|
#else
|
||||||
static_assert(digitalPinHasPCICR(Z2_MAX_PIN), "Z2_MAX_PIN is not interrupt-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue.");
|
static_assert(digitalPinHasPCICR(Z2_MAX_PIN), "Z2_MAX_PIN is not interrupt-capable");
|
||||||
pciSetup(Z2_MAX_PIN);
|
pciSetup(Z2_MAX_PIN);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -212,7 +212,7 @@ void setup_endstop_interrupts() {
|
|||||||
#if (digitalPinToInterrupt(Z2_MIN_PIN) != NOT_AN_INTERRUPT)
|
#if (digitalPinToInterrupt(Z2_MIN_PIN) != NOT_AN_INTERRUPT)
|
||||||
_ATTACH(Z2_MIN_PIN);
|
_ATTACH(Z2_MIN_PIN);
|
||||||
#else
|
#else
|
||||||
static_assert(digitalPinHasPCICR(Z2_MIN_PIN), "Z2_MIN_PIN is not interrupt-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue.");
|
static_assert(digitalPinHasPCICR(Z2_MIN_PIN), "Z2_MIN_PIN is not interrupt-capable");
|
||||||
pciSetup(Z2_MIN_PIN);
|
pciSetup(Z2_MIN_PIN);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -220,7 +220,7 @@ void setup_endstop_interrupts() {
|
|||||||
#if (digitalPinToInterrupt(Z3_MAX_PIN) != NOT_AN_INTERRUPT)
|
#if (digitalPinToInterrupt(Z3_MAX_PIN) != NOT_AN_INTERRUPT)
|
||||||
_ATTACH(Z3_MAX_PIN);
|
_ATTACH(Z3_MAX_PIN);
|
||||||
#else
|
#else
|
||||||
static_assert(digitalPinHasPCICR(Z3_MAX_PIN), "Z3_MAX_PIN is not interrupt-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue.");
|
static_assert(digitalPinHasPCICR(Z3_MAX_PIN), "Z3_MAX_PIN is not interrupt-capable");
|
||||||
pciSetup(Z3_MAX_PIN);
|
pciSetup(Z3_MAX_PIN);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -228,7 +228,7 @@ void setup_endstop_interrupts() {
|
|||||||
#if (digitalPinToInterrupt(Z3_MIN_PIN) != NOT_AN_INTERRUPT)
|
#if (digitalPinToInterrupt(Z3_MIN_PIN) != NOT_AN_INTERRUPT)
|
||||||
_ATTACH(Z3_MIN_PIN);
|
_ATTACH(Z3_MIN_PIN);
|
||||||
#else
|
#else
|
||||||
static_assert(digitalPinHasPCICR(Z3_MIN_PIN), "Z3_MIN_PIN is not interrupt-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue.");
|
static_assert(digitalPinHasPCICR(Z3_MIN_PIN), "Z3_MIN_PIN is not interrupt-capable");
|
||||||
pciSetup(Z3_MIN_PIN);
|
pciSetup(Z3_MIN_PIN);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -236,7 +236,7 @@ void setup_endstop_interrupts() {
|
|||||||
#if (digitalPinToInterrupt(Z4_MAX_PIN) != NOT_AN_INTERRUPT)
|
#if (digitalPinToInterrupt(Z4_MAX_PIN) != NOT_AN_INTERRUPT)
|
||||||
_ATTACH(Z4_MAX_PIN);
|
_ATTACH(Z4_MAX_PIN);
|
||||||
#else
|
#else
|
||||||
static_assert(digitalPinHasPCICR(Z4_MAX_PIN), "Z4_MAX_PIN is not interrupt-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue.");
|
static_assert(digitalPinHasPCICR(Z4_MAX_PIN), "Z4_MAX_PIN is not interrupt-capable");
|
||||||
pciSetup(Z4_MAX_PIN);
|
pciSetup(Z4_MAX_PIN);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -244,7 +244,7 @@ void setup_endstop_interrupts() {
|
|||||||
#if (digitalPinToInterrupt(Z4_MIN_PIN) != NOT_AN_INTERRUPT)
|
#if (digitalPinToInterrupt(Z4_MIN_PIN) != NOT_AN_INTERRUPT)
|
||||||
_ATTACH(Z4_MIN_PIN);
|
_ATTACH(Z4_MIN_PIN);
|
||||||
#else
|
#else
|
||||||
static_assert(digitalPinHasPCICR(Z4_MIN_PIN), "Z4_MIN_PIN is not interrupt-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue.");
|
static_assert(digitalPinHasPCICR(Z4_MIN_PIN), "Z4_MIN_PIN is not interrupt-capable");
|
||||||
pciSetup(Z4_MIN_PIN);
|
pciSetup(Z4_MIN_PIN);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -252,7 +252,7 @@ void setup_endstop_interrupts() {
|
|||||||
#if (digitalPinToInterrupt(Z_MIN_PROBE_PIN) != NOT_AN_INTERRUPT)
|
#if (digitalPinToInterrupt(Z_MIN_PROBE_PIN) != NOT_AN_INTERRUPT)
|
||||||
_ATTACH(Z_MIN_PROBE_PIN);
|
_ATTACH(Z_MIN_PROBE_PIN);
|
||||||
#else
|
#else
|
||||||
static_assert(digitalPinHasPCICR(Z_MIN_PROBE_PIN), "Z_MIN_PROBE_PIN is not interrupt-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue.");
|
static_assert(digitalPinHasPCICR(Z_MIN_PROBE_PIN), "Z_MIN_PROBE_PIN is not interrupt-capable");
|
||||||
pciSetup(Z_MIN_PROBE_PIN);
|
pciSetup(Z_MIN_PROBE_PIN);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -16,14 +16,14 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#ifdef __AVR__
|
#ifdef __AVR__
|
||||||
|
|
||||||
#include "../../inc/MarlinConfigPre.h"
|
#include "../../inc/MarlinConfigPre.h"
|
||||||
|
|
||||||
#if NEEDS_HARDWARE_PWM // Specific meta-flag for features that mandate PWM
|
#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_PWM
|
||||||
|
|
||||||
#include "HAL.h"
|
#include "HAL.h"
|
||||||
|
|
||||||
@@ -185,8 +185,8 @@ void set_pwm_frequency(const pin_t pin, int f_desired) {
|
|||||||
res_temp_phase_correct = rtf / 2;
|
res_temp_phase_correct = rtf / 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
LIMIT(res_temp_fast, 1U, size);
|
LIMIT(res_temp_fast, 1u, size);
|
||||||
LIMIT(res_temp_phase_correct, 1U, size);
|
LIMIT(res_temp_phase_correct, 1u, size);
|
||||||
// Calculate frequencies of test prescaler and resolution values
|
// Calculate frequencies of test prescaler and resolution values
|
||||||
const int f_temp_fast = (F_CPU) / (prescaler[i] * (1 + res_temp_fast)),
|
const int f_temp_fast = (F_CPU) / (prescaler[i] * (1 + res_temp_fast)),
|
||||||
f_temp_phase_correct = (F_CPU) / (2 * prescaler[i] * res_temp_phase_correct),
|
f_temp_phase_correct = (F_CPU) / (2 * prescaler[i] * res_temp_phase_correct),
|
||||||
@@ -274,9 +274,9 @@ void set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v_size/*=255
|
|||||||
else
|
else
|
||||||
top = *timer.ICRn; // top = ICRn
|
top = *timer.ICRn; // top = ICRn
|
||||||
|
|
||||||
_SET_OCRnQ(timer.OCRnQ, timer.q, v * float(top) / float(v_size)); // Scale 8/16-bit v to top value
|
_SET_OCRnQ(timer.OCRnQ, timer.q, v * float(top / v_size)); // Scale 8/16-bit v to top value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // NEEDS_HARDWARE_PWM
|
#endif // FAST_PWM_FAN || SPINDLE_LASER_PWM
|
||||||
#endif // __AVR__
|
#endif // __AVR__
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -234,55 +234,5 @@ uint8_t extDigitalRead(const int8_t pin) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
/**
|
|
||||||
* Set Timer 5 PWM frequency in Hz, from 3.8Hz up to ~16MHz
|
|
||||||
* with a minimum resolution of 100 steps.
|
|
||||||
*
|
|
||||||
* DC values -1.0 to 1.0. Negative duty cycle inverts the pulse.
|
|
||||||
*/
|
|
||||||
uint16_t set_pwm_frequency_hz(const float &hz, const float dca, const float dcb, const float dcc) {
|
|
||||||
float count = 0;
|
|
||||||
if (hz > 0 && (dca || dcb || dcc)) {
|
|
||||||
count = float(F_CPU) / hz; // 1x prescaler, TOP for 16MHz base freq.
|
|
||||||
uint16_t prescaler; // Range of 30.5Hz (65535) 64.5KHz (>31)
|
|
||||||
|
|
||||||
if (count >= 255. * 256.) { prescaler = 1024; SET_CS(5, PRESCALER_1024); }
|
|
||||||
else if (count >= 255. * 64.) { prescaler = 256; SET_CS(5, PRESCALER_256); }
|
|
||||||
else if (count >= 255. * 8.) { prescaler = 64; SET_CS(5, PRESCALER_64); }
|
|
||||||
else if (count >= 255.) { prescaler = 8; SET_CS(5, PRESCALER_8); }
|
|
||||||
else { prescaler = 1; SET_CS(5, PRESCALER_1); }
|
|
||||||
|
|
||||||
count /= float(prescaler);
|
|
||||||
const float pwm_top = round(count); // Get the rounded count
|
|
||||||
|
|
||||||
ICR5 = (uint16_t)pwm_top - 1; // Subtract 1 for TOP
|
|
||||||
OCR5A = pwm_top * ABS(dca); // Update and scale DCs
|
|
||||||
OCR5B = pwm_top * ABS(dcb);
|
|
||||||
OCR5C = pwm_top * ABS(dcc);
|
|
||||||
_SET_COM(5, A, dca ? (dca < 0 ? COM_SET_CLEAR : COM_CLEAR_SET) : COM_NORMAL); // Set compare modes
|
|
||||||
_SET_COM(5, B, dcb ? (dcb < 0 ? COM_SET_CLEAR : COM_CLEAR_SET) : COM_NORMAL);
|
|
||||||
_SET_COM(5, C, dcc ? (dcc < 0 ? COM_SET_CLEAR : COM_CLEAR_SET) : COM_NORMAL);
|
|
||||||
|
|
||||||
SET_WGM(5, FAST_PWM_ICRn); // Fast PWM with ICR5 as TOP
|
|
||||||
|
|
||||||
//SERIAL_ECHOLNPGM("Timer 5 Settings:");
|
|
||||||
//SERIAL_ECHOLNPAIR(" Prescaler=", prescaler);
|
|
||||||
//SERIAL_ECHOLNPAIR(" TOP=", ICR5);
|
|
||||||
//SERIAL_ECHOLNPAIR(" OCR5A=", OCR5A);
|
|
||||||
//SERIAL_ECHOLNPAIR(" OCR5B=", OCR5B);
|
|
||||||
//SERIAL_ECHOLNPAIR(" OCR5C=", OCR5C);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// Restore the default for Timer 5
|
|
||||||
SET_WGM(5, PWM_PC_8); // PWM 8-bit (Phase Correct)
|
|
||||||
SET_COMS(5, NORMAL, NORMAL, NORMAL); // Do nothing
|
|
||||||
SET_CS(5, PRESCALER_64); // 16MHz / 64 = 250KHz
|
|
||||||
OCR5A = OCR5B = OCR5C = 0;
|
|
||||||
}
|
|
||||||
return round(count);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // FASTIO_EXT_START
|
#endif // FASTIO_EXT_START
|
||||||
#endif // __AVR__
|
#endif // __AVR__
|
||||||
|
|||||||
+10
-16
@@ -16,7 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
@@ -29,17 +29,11 @@
|
|||||||
|
|
||||||
#include <avr/io.h>
|
#include <avr/io.h>
|
||||||
|
|
||||||
#if defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1286P__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB646P__) || defined(__AVR_AT90USB647__)
|
#define AVR_AT90USB1286_FAMILY (defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1286P__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB646P__) || defined(__AVR_AT90USB647__))
|
||||||
#define AVR_AT90USB1286_FAMILY 1
|
#define AVR_ATmega1284_FAMILY (defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644PA__) || defined(__AVR_ATmega1284P__))
|
||||||
#elif defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644PA__) || defined(__AVR_ATmega1284P__)
|
#define AVR_ATmega2560_FAMILY (defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__))
|
||||||
#define AVR_ATmega1284_FAMILY 1
|
#define AVR_ATmega2561_FAMILY (defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__))
|
||||||
#elif defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
|
#define AVR_ATmega328_FAMILY (defined(__AVR_ATmega168__) || defined(__AVR_ATmega328__) || defined(__AVR_ATmega328P__))
|
||||||
#define AVR_ATmega2560_FAMILY 1
|
|
||||||
#elif defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__)
|
|
||||||
#define AVR_ATmega2561_FAMILY 1
|
|
||||||
#elif defined(__AVR_ATmega168__) || defined(__AVR_ATmega328__) || defined(__AVR_ATmega328P__)
|
|
||||||
#define AVR_ATmega328_FAMILY 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Include Ports and Functions
|
* Include Ports and Functions
|
||||||
@@ -63,7 +57,7 @@
|
|||||||
*
|
*
|
||||||
* Now you can simply SET_OUTPUT(PIN); WRITE(PIN, HIGH); WRITE(PIN, LOW);
|
* Now you can simply SET_OUTPUT(PIN); WRITE(PIN, HIGH); WRITE(PIN, LOW);
|
||||||
*
|
*
|
||||||
* Why double up on these macros? see https://gcc.gnu.org/onlinedocs/cpp/Stringification.html
|
* Why double up on these macros? see http://gcc.gnu.org/onlinedocs/cpp/Stringification.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define _READ(IO) TEST(DIO ## IO ## _RPORT, DIO ## IO ## _PIN)
|
#define _READ(IO) TEST(DIO ## IO ## _RPORT, DIO ## IO ## _PIN)
|
||||||
@@ -104,9 +98,9 @@
|
|||||||
|
|
||||||
#define SET_INPUT(IO) _SET_INPUT(IO)
|
#define SET_INPUT(IO) _SET_INPUT(IO)
|
||||||
#define SET_INPUT_PULLUP(IO) do{ _SET_INPUT(IO); _WRITE(IO, HIGH); }while(0)
|
#define SET_INPUT_PULLUP(IO) do{ _SET_INPUT(IO); _WRITE(IO, HIGH); }while(0)
|
||||||
#define SET_INPUT_PULLDOWN SET_INPUT
|
|
||||||
#define SET_OUTPUT(IO) _SET_OUTPUT(IO)
|
#define SET_OUTPUT(IO) _SET_OUTPUT(IO)
|
||||||
#define SET_PWM SET_OUTPUT
|
|
||||||
|
#define SET_PWM(IO) SET_OUTPUT(IO)
|
||||||
|
|
||||||
#define IS_INPUT(IO) _IS_INPUT(IO)
|
#define IS_INPUT(IO) _IS_INPUT(IO)
|
||||||
#define IS_OUTPUT(IO) _IS_OUTPUT(IO)
|
#define IS_OUTPUT(IO) _IS_OUTPUT(IO)
|
||||||
@@ -285,7 +279,7 @@ enum ClockSource2 : char {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Determine which harware PWMs are already in use
|
// Determine which harware PWMs are already in use
|
||||||
#define _PWM_CHK_FAN_B(P) (P == E0_AUTO_FAN_PIN || P == E1_AUTO_FAN_PIN || P == E2_AUTO_FAN_PIN || P == E3_AUTO_FAN_PIN || P == E4_AUTO_FAN_PIN || P == E5_AUTO_FAN_PIN || P == E6_AUTO_FAN_PIN || P == E7_AUTO_FAN_PIN || P == CHAMBER_AUTO_FAN_PIN || P == COOLER_AUTO_FAN_PIN)
|
#define _PWM_CHK_FAN_B(P) (P == E0_AUTO_FAN_PIN || P == E1_AUTO_FAN_PIN || P == E2_AUTO_FAN_PIN || P == E3_AUTO_FAN_PIN || P == E4_AUTO_FAN_PIN || P == E5_AUTO_FAN_PIN || P == E6_AUTO_FAN_PIN || P == E7_AUTO_FAN_PIN || P == CHAMBER_AUTO_FAN_PIN)
|
||||||
#if PIN_EXISTS(CONTROLLER_FAN)
|
#if PIN_EXISTS(CONTROLLER_FAN)
|
||||||
#define PWM_CHK_FAN_B(P) (_PWM_CHK_FAN_B(P) || P == CONTROLLER_FAN_PIN)
|
#define PWM_CHK_FAN_B(P) (_PWM_CHK_FAN_B(P) || P == CONTROLLER_FAN_PIN)
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|||||||
@@ -16,11 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#if HAS_SPI_TFT || HAS_FSMC_TFT
|
|
||||||
#error "Sorry! TFT displays are not available for HAL/AVR."
|
|
||||||
#endif
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
@@ -25,6 +25,16 @@
|
|||||||
* Test AVR-specific configuration values for errors at compile-time.
|
* Test AVR-specific configuration values for errors at compile-time.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Digipot requirement
|
||||||
|
*/
|
||||||
|
#if ENABLED(DIGIPOT_MCP4018)
|
||||||
|
#if !defined(DIGIPOTS_I2C_SDA_X) || !defined(DIGIPOTS_I2C_SDA_Y) || !defined(DIGIPOTS_I2C_SDA_Z) \
|
||||||
|
|| !defined(DIGIPOTS_I2C_SDA_E0) || !defined(DIGIPOTS_I2C_SDA_E1)
|
||||||
|
#error "DIGIPOT_MCP4018 requires DIGIPOTS_I2C_SDA_* pins to be defined."
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks for FAST PWM
|
* Checks for FAST PWM
|
||||||
*/
|
*/
|
||||||
@@ -36,30 +46,20 @@
|
|||||||
* Sanity checks for Spindle / Laser PWM
|
* Sanity checks for Spindle / Laser PWM
|
||||||
*/
|
*/
|
||||||
#if ENABLED(SPINDLE_LASER_PWM)
|
#if ENABLED(SPINDLE_LASER_PWM)
|
||||||
#include "../ServoTimers.h" // Needed to check timer availability (_useTimer3)
|
|
||||||
#if SPINDLE_LASER_PWM_PIN == 4 || WITHIN(SPINDLE_LASER_PWM_PIN, 11, 13)
|
#if SPINDLE_LASER_PWM_PIN == 4 || WITHIN(SPINDLE_LASER_PWM_PIN, 11, 13)
|
||||||
#error "Counter/Timer for SPINDLE_LASER_PWM_PIN is used by a system interrupt."
|
#error "Counter/Timer for SPINDLE_LASER_PWM_PIN is used by a system interrupt."
|
||||||
#elif NUM_SERVOS > 0 && defined(_useTimer3) && (WITHIN(SPINDLE_LASER_PWM_PIN, 2, 3) || SPINDLE_LASER_PWM_PIN == 5)
|
#elif NUM_SERVOS > 0 && (WITHIN(SPINDLE_LASER_PWM_PIN, 2, 3) || SPINDLE_LASER_PWM_PIN == 5)
|
||||||
#error "Counter/Timer for SPINDLE_LASER_PWM_PIN is used by the servo system."
|
#error "Counter/Timer for SPINDLE_LASER_PWM_PIN is used by the servo system."
|
||||||
#endif
|
#endif
|
||||||
#elif defined(SPINDLE_LASER_FREQUENCY)
|
|
||||||
#error "SPINDLE_LASER_FREQUENCY requires SPINDLE_LASER_PWM."
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Trinamic library includes SoftwareSerial.h, leading to a compile error.
|
* The Trinamic library includes SoftwareSerial.h, leading to a compile error.
|
||||||
*/
|
*/
|
||||||
#if BOTH(HAS_TRINAMIC_CONFIG, ENDSTOP_INTERRUPTS_FEATURE)
|
#if HAS_TRINAMIC_CONFIG && ENABLED(ENDSTOP_INTERRUPTS_FEATURE)
|
||||||
#error "TMCStepper includes SoftwareSerial.h which is incompatible with ENDSTOP_INTERRUPTS_FEATURE. Disable ENDSTOP_INTERRUPTS_FEATURE to continue."
|
#error "TMCStepper includes SoftwareSerial.h which is incompatible with ENDSTOP_INTERRUPTS_FEATURE. Disable ENDSTOP_INTERRUPTS_FEATURE to continue."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if BOTH(HAS_TMC_SW_SERIAL, MONITOR_DRIVER_STATUS)
|
#if HAS_TMC_SW_SERIAL && ENABLED(MONITOR_DRIVER_STATUS)
|
||||||
#error "MONITOR_DRIVER_STATUS causes performance issues when used with SoftwareSerial-connected drivers. Disable MONITOR_DRIVER_STATUS or use hardware serial to continue."
|
#error "MONITOR_DRIVER_STATUS causes performance issues when used with SoftwareSerial-connected drivers. Disable MONITOR_DRIVER_STATUS or use hardware serial to continue."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
|
||||||
* Postmortem debugging
|
|
||||||
*/
|
|
||||||
#if ENABLED(POSTMORTEM_DEBUGGING)
|
|
||||||
#error "POSTMORTEM_DEBUGGING is not supported on AVR boards."
|
|
||||||
#endif
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#ifdef __AVR__
|
#ifdef __AVR__
|
||||||
@@ -25,18 +25,9 @@
|
|||||||
|
|
||||||
#if EITHER(EEPROM_SETTINGS, SD_FIRMWARE_UPDATE)
|
#if EITHER(EEPROM_SETTINGS, SD_FIRMWARE_UPDATE)
|
||||||
|
|
||||||
/**
|
#include "../shared/persistent_store_api.h"
|
||||||
* PersistentStore for Arduino-style EEPROM interface
|
|
||||||
* with implementations supplied by the framework.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "../shared/eeprom_api.h"
|
bool PersistentStore::access_start() { return true; }
|
||||||
|
|
||||||
#ifndef MARLIN_EEPROM_SIZE
|
|
||||||
#define MARLIN_EEPROM_SIZE size_t(E2END + 1)
|
|
||||||
#endif
|
|
||||||
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; }
|
|
||||||
bool PersistentStore::access_start() { return true; }
|
|
||||||
bool PersistentStore::access_finish() { return true; }
|
bool PersistentStore::access_finish() { return true; }
|
||||||
|
|
||||||
bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
|
bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
|
||||||
@@ -55,11 +46,11 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
|
|||||||
crc16(crc, &v, 1);
|
crc16(crc, &v, 1);
|
||||||
pos++;
|
pos++;
|
||||||
value++;
|
value++;
|
||||||
}
|
};
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
|
bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
|
||||||
do {
|
do {
|
||||||
uint8_t c = eeprom_read_byte((uint8_t*)pos);
|
uint8_t c = eeprom_read_byte((uint8_t*)pos);
|
||||||
if (writing) *value = c;
|
if (writing) *value = c;
|
||||||
@@ -70,5 +61,7 @@ bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t
|
|||||||
return false; // always assume success for AVR's
|
return false; // always assume success for AVR's
|
||||||
}
|
}
|
||||||
|
|
||||||
|
size_t PersistentStore::capacity() { return E2END + 1; }
|
||||||
|
|
||||||
#endif // EEPROM_SETTINGS || SD_FIRMWARE_UPDATE
|
#endif // EEPROM_SETTINGS || SD_FIRMWARE_UPDATE
|
||||||
#endif // __AVR__
|
#endif // __AVR__
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
@@ -26,9 +26,7 @@
|
|||||||
|
|
||||||
#define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS
|
#define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS
|
||||||
|
|
||||||
#if MB(BQ_ZUM_MEGA_3D, MIGHTYBOARD_REVE, MINIRAMBO, SCOOVO_X9H, TRIGORILLA_14)
|
#define AVR_ATmega2560_FAMILY_PLUS_70 MB(BQ_ZUM_MEGA_3D, MIGHTYBOARD_REVE, MINIRAMBO, SCOOVO_X9H)
|
||||||
#define AVR_ATmega2560_FAMILY_PLUS_70 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if AVR_AT90USB1286_FAMILY
|
#if AVR_AT90USB1286_FAMILY
|
||||||
|
|
||||||
@@ -235,8 +233,8 @@ static void print_is_also_tied() { SERIAL_ECHOPGM(" is also tied to this pin");
|
|||||||
|
|
||||||
inline void com_print(const uint8_t N, const uint8_t Z) {
|
inline void com_print(const uint8_t N, const uint8_t Z) {
|
||||||
const uint8_t *TCCRA = (uint8_t*)TCCR_A(N);
|
const uint8_t *TCCRA = (uint8_t*)TCCR_A(N);
|
||||||
SERIAL_ECHOPAIR(" COM", AS_CHAR('0' + N));
|
SERIAL_ECHOPGM(" COM");
|
||||||
SERIAL_CHAR(Z);
|
SERIAL_CHAR('0' + N, Z);
|
||||||
SERIAL_ECHOPAIR(": ", int((*TCCRA >> (6 - Z * 2)) & 0x03));
|
SERIAL_ECHOPAIR(": ", int((*TCCRA >> (6 - Z * 2)) & 0x03));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -247,8 +245,8 @@ void timer_prefix(uint8_t T, char L, uint8_t N) { // T - timer L - pwm N -
|
|||||||
uint8_t WGM = (((*TCCRB & _BV(WGM_2)) >> 1) | (*TCCRA & (_BV(WGM_0) | _BV(WGM_1))));
|
uint8_t WGM = (((*TCCRB & _BV(WGM_2)) >> 1) | (*TCCRA & (_BV(WGM_0) | _BV(WGM_1))));
|
||||||
if (N == 4) WGM |= ((*TCCRB & _BV(WGM_3)) >> 1);
|
if (N == 4) WGM |= ((*TCCRB & _BV(WGM_3)) >> 1);
|
||||||
|
|
||||||
SERIAL_ECHOPAIR(" TIMER", AS_CHAR(T + '0'));
|
SERIAL_ECHOPGM(" TIMER");
|
||||||
SERIAL_CHAR(L);
|
SERIAL_CHAR(T + '0', L);
|
||||||
SERIAL_ECHO_SP(3);
|
SERIAL_ECHO_SP(3);
|
||||||
|
|
||||||
if (N == 3) {
|
if (N == 3) {
|
||||||
@@ -262,11 +260,19 @@ void timer_prefix(uint8_t T, char L, uint8_t N) { // T - timer L - pwm N -
|
|||||||
SERIAL_ECHOPAIR(" WGM: ", WGM);
|
SERIAL_ECHOPAIR(" WGM: ", WGM);
|
||||||
com_print(T,L);
|
com_print(T,L);
|
||||||
SERIAL_ECHOPAIR(" CS: ", (*TCCRB & (_BV(CS_0) | _BV(CS_1) | _BV(CS_2)) ));
|
SERIAL_ECHOPAIR(" CS: ", (*TCCRB & (_BV(CS_0) | _BV(CS_1) | _BV(CS_2)) ));
|
||||||
SERIAL_ECHOPAIR(" TCCR", AS_CHAR(T + '0'), "A: ", *TCCRA);
|
|
||||||
SERIAL_ECHOPAIR(" TCCR", AS_CHAR(T + '0'), "B: ", *TCCRB);
|
SERIAL_ECHOPGM(" TCCR");
|
||||||
|
SERIAL_CHAR(T + '0');
|
||||||
|
SERIAL_ECHOPAIR("A: ", *TCCRA);
|
||||||
|
|
||||||
|
SERIAL_ECHOPGM(" TCCR");
|
||||||
|
SERIAL_CHAR(T + '0');
|
||||||
|
SERIAL_ECHOPAIR("B: ", *TCCRB);
|
||||||
|
|
||||||
const uint8_t *TMSK = (uint8_t*)TIMSK(T);
|
const uint8_t *TMSK = (uint8_t*)TIMSK(T);
|
||||||
SERIAL_ECHOPAIR(" TIMSK", AS_CHAR(T + '0'), ": ", *TMSK);
|
SERIAL_ECHOPGM(" TIMSK");
|
||||||
|
SERIAL_CHAR(T + '0');
|
||||||
|
SERIAL_ECHOPAIR(": ", *TMSK);
|
||||||
|
|
||||||
const uint8_t OCIE = L - 'A' + 1;
|
const uint8_t OCIE = L - 'A' + 1;
|
||||||
if (N == 3) { if (WGM == 0 || WGM == 2 || WGM == 4 || WGM == 6) err_is_counter(); }
|
if (N == 3) { if (WGM == 0 || WGM == 2 || WGM == 4 || WGM == 6) err_is_counter(); }
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
@@ -22,12 +22,15 @@
|
|||||||
* Structures for 2560 family boards that use more than 70 pins
|
* Structures for 2560 family boards that use more than 70 pins
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if MB(BQ_ZUM_MEGA_3D, MINIRAMBO, SCOOVO_X9H, TRIGORILLA_14)
|
#undef NUM_DIGITAL_PINS
|
||||||
#undef NUM_DIGITAL_PINS
|
#if MB(BQ_ZUM_MEGA_3D)
|
||||||
#define NUM_DIGITAL_PINS 85
|
#define NUM_DIGITAL_PINS 85
|
||||||
#elif MB(MIGHTYBOARD_REVE)
|
#elif MB(MIGHTYBOARD_REVE)
|
||||||
#undef NUM_DIGITAL_PINS
|
|
||||||
#define NUM_DIGITAL_PINS 80
|
#define NUM_DIGITAL_PINS 80
|
||||||
|
#elif MB(MINIRAMBO)
|
||||||
|
#define NUM_DIGITAL_PINS 85
|
||||||
|
#elif MB(SCOOVO_X9H)
|
||||||
|
#define NUM_DIGITAL_PINS 85
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define PA 1
|
#define PA 1
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
@@ -51,15 +51,15 @@
|
|||||||
#define AVR_SS_PIN 16
|
#define AVR_SS_PIN 16
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef SD_SCK_PIN
|
#ifndef SCK_PIN
|
||||||
#define SD_SCK_PIN AVR_SCK_PIN
|
#define SCK_PIN AVR_SCK_PIN
|
||||||
#endif
|
#endif
|
||||||
#ifndef SD_MISO_PIN
|
#ifndef MISO_PIN
|
||||||
#define SD_MISO_PIN AVR_MISO_PIN
|
#define MISO_PIN AVR_MISO_PIN
|
||||||
#endif
|
#endif
|
||||||
#ifndef SD_MOSI_PIN
|
#ifndef MOSI_PIN
|
||||||
#define SD_MOSI_PIN AVR_MOSI_PIN
|
#define MOSI_PIN AVR_MOSI_PIN
|
||||||
#endif
|
#endif
|
||||||
#ifndef SD_SS_PIN
|
#ifndef SS_PIN
|
||||||
#define SD_SS_PIN AVR_SS_PIN
|
#define SS_PIN AVR_SS_PIN
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1,260 +0,0 @@
|
|||||||
/**
|
|
||||||
* Marlin 3D Printer Firmware
|
|
||||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
|
||||||
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
// ------------------------
|
|
||||||
// Types
|
|
||||||
// ------------------------
|
|
||||||
|
|
||||||
typedef uint16_t hal_timer_t;
|
|
||||||
#define HAL_TIMER_TYPE_MAX 0xFFFF
|
|
||||||
|
|
||||||
// ------------------------
|
|
||||||
// Defines
|
|
||||||
// ------------------------
|
|
||||||
|
|
||||||
#define HAL_TIMER_RATE ((F_CPU) / 8) // i.e., 2MHz or 2.5MHz
|
|
||||||
|
|
||||||
#ifndef STEP_TIMER_NUM
|
|
||||||
#define STEP_TIMER_NUM 1
|
|
||||||
#endif
|
|
||||||
#ifndef PULSE_TIMER_NUM
|
|
||||||
#define PULSE_TIMER_NUM STEP_TIMER_NUM
|
|
||||||
#endif
|
|
||||||
#ifndef TEMP_TIMER_NUM
|
|
||||||
#define TEMP_TIMER_NUM 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define TEMP_TIMER_FREQUENCY ((F_CPU) / 64.0 / 256.0)
|
|
||||||
|
|
||||||
#define STEPPER_TIMER_RATE HAL_TIMER_RATE
|
|
||||||
#define STEPPER_TIMER_PRESCALE 8
|
|
||||||
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) // Cannot be of type double
|
|
||||||
|
|
||||||
#define PULSE_TIMER_RATE STEPPER_TIMER_RATE // frequency of pulse timer
|
|
||||||
#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
|
|
||||||
#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
|
|
||||||
|
|
||||||
#define ENABLE_STEPPER_DRIVER_INTERRUPT() SBI(TIMSK1, OCIE1A)
|
|
||||||
#define DISABLE_STEPPER_DRIVER_INTERRUPT() CBI(TIMSK1, OCIE1A)
|
|
||||||
#define STEPPER_ISR_ENABLED() TEST(TIMSK1, OCIE1A)
|
|
||||||
|
|
||||||
#define ENABLE_TEMPERATURE_INTERRUPT() SBI(TIMSK0, OCIE0B)
|
|
||||||
#define DISABLE_TEMPERATURE_INTERRUPT() CBI(TIMSK0, OCIE0B)
|
|
||||||
#define TEMPERATURE_ISR_ENABLED() TEST(TIMSK0, OCIE0B)
|
|
||||||
|
|
||||||
FORCE_INLINE void HAL_timer_start(const uint8_t timer_num, const uint32_t) {
|
|
||||||
switch (timer_num) {
|
|
||||||
case STEP_TIMER_NUM:
|
|
||||||
// waveform generation = 0100 = CTC
|
|
||||||
SET_WGM(1, CTC_OCRnA);
|
|
||||||
|
|
||||||
// output mode = 00 (disconnected)
|
|
||||||
SET_COMA(1, NORMAL);
|
|
||||||
|
|
||||||
// Set the timer pre-scaler
|
|
||||||
// Generally we use a divider of 8, resulting in a 2MHz timer
|
|
||||||
// frequency on a 16MHz MCU. If you are going to change this, be
|
|
||||||
// sure to regenerate speed_lookuptable.h with
|
|
||||||
// create_speed_lookuptable.py
|
|
||||||
SET_CS(1, PRESCALER_8); // CS 2 = 1/8 prescaler
|
|
||||||
|
|
||||||
// Init Stepper ISR to 122 Hz for quick starting
|
|
||||||
// (F_CPU) / (STEPPER_TIMER_PRESCALE) / frequency
|
|
||||||
OCR1A = 0x4000;
|
|
||||||
TCNT1 = 0;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case TEMP_TIMER_NUM:
|
|
||||||
// Use timer0 for temperature measurement
|
|
||||||
// Interleave temperature interrupt with millies interrupt
|
|
||||||
OCR0B = 128;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#define TIMER_OCR_1 OCR1A
|
|
||||||
#define TIMER_COUNTER_1 TCNT1
|
|
||||||
|
|
||||||
#define TIMER_OCR_0 OCR0A
|
|
||||||
#define TIMER_COUNTER_0 TCNT0
|
|
||||||
|
|
||||||
#define _CAT(a,V...) a##V
|
|
||||||
#define HAL_timer_set_compare(timer, compare) (_CAT(TIMER_OCR_, timer) = compare)
|
|
||||||
#define HAL_timer_get_compare(timer) _CAT(TIMER_OCR_, timer)
|
|
||||||
#define HAL_timer_get_count(timer) _CAT(TIMER_COUNTER_, timer)
|
|
||||||
|
|
||||||
/**
|
|
||||||
* On AVR there is no hardware prioritization and preemption of
|
|
||||||
* interrupts, so this emulates it. The UART has first priority
|
|
||||||
* (otherwise, characters will be lost due to UART overflow).
|
|
||||||
* Then: Stepper, Endstops, Temperature, and -finally- all others.
|
|
||||||
*/
|
|
||||||
#define HAL_timer_isr_prologue(TIMER_NUM)
|
|
||||||
#define HAL_timer_isr_epilogue(TIMER_NUM)
|
|
||||||
|
|
||||||
/* 18 cycles maximum latency */
|
|
||||||
#ifndef HAL_STEP_TIMER_ISR
|
|
||||||
|
|
||||||
#define HAL_STEP_TIMER_ISR() \
|
|
||||||
extern "C" void TIMER1_COMPA_vect() __attribute__ ((signal, naked, used, externally_visible)); \
|
|
||||||
extern "C" void TIMER1_COMPA_vect_bottom() asm ("TIMER1_COMPA_vect_bottom") __attribute__ ((used, externally_visible, noinline)); \
|
|
||||||
void TIMER1_COMPA_vect() { \
|
|
||||||
__asm__ __volatile__ ( \
|
|
||||||
A("push r16") /* 2 Save R16 */ \
|
|
||||||
A("in r16, __SREG__") /* 1 Get SREG */ \
|
|
||||||
A("push r16") /* 2 Save SREG into stack */ \
|
|
||||||
A("lds r16, %[timsk0]") /* 2 Load into R0 the Temperature timer Interrupt mask register */ \
|
|
||||||
A("push r16") /* 2 Save TIMSK0 into the stack */ \
|
|
||||||
A("andi r16,~%[msk0]") /* 1 Disable the temperature ISR */ \
|
|
||||||
A("sts %[timsk0], r16") /* 2 And set the new value */ \
|
|
||||||
A("lds r16, %[timsk1]") /* 2 Load into R0 the stepper timer Interrupt mask register [TIMSK1] */ \
|
|
||||||
A("andi r16,~%[msk1]") /* 1 Disable the stepper ISR */ \
|
|
||||||
A("sts %[timsk1], r16") /* 2 And set the new value */ \
|
|
||||||
A("push r16") /* 2 Save TIMSK1 into stack */ \
|
|
||||||
A("in r16, 0x3B") /* 1 Get RAMPZ register */ \
|
|
||||||
A("push r16") /* 2 Save RAMPZ into stack */ \
|
|
||||||
A("in r16, 0x3C") /* 1 Get EIND register */ \
|
|
||||||
A("push r0") /* C runtime can modify all the following registers without restoring them */ \
|
|
||||||
A("push r1") \
|
|
||||||
A("push r18") \
|
|
||||||
A("push r19") \
|
|
||||||
A("push r20") \
|
|
||||||
A("push r21") \
|
|
||||||
A("push r22") \
|
|
||||||
A("push r23") \
|
|
||||||
A("push r24") \
|
|
||||||
A("push r25") \
|
|
||||||
A("push r26") \
|
|
||||||
A("push r27") \
|
|
||||||
A("push r30") \
|
|
||||||
A("push r31") \
|
|
||||||
A("clr r1") /* C runtime expects this register to be 0 */ \
|
|
||||||
A("call TIMER1_COMPA_vect_bottom") /* Call the bottom handler - No inlining allowed, otherwise registers used are not saved */ \
|
|
||||||
A("pop r31") \
|
|
||||||
A("pop r30") \
|
|
||||||
A("pop r27") \
|
|
||||||
A("pop r26") \
|
|
||||||
A("pop r25") \
|
|
||||||
A("pop r24") \
|
|
||||||
A("pop r23") \
|
|
||||||
A("pop r22") \
|
|
||||||
A("pop r21") \
|
|
||||||
A("pop r20") \
|
|
||||||
A("pop r19") \
|
|
||||||
A("pop r18") \
|
|
||||||
A("pop r1") \
|
|
||||||
A("pop r0") \
|
|
||||||
A("out 0x3C, r16") /* 1 Restore EIND register */ \
|
|
||||||
A("pop r16") /* 2 Get the original RAMPZ register value */ \
|
|
||||||
A("out 0x3B, r16") /* 1 Restore RAMPZ register to its original value */ \
|
|
||||||
A("pop r16") /* 2 Get the original TIMSK1 value but with stepper ISR disabled */ \
|
|
||||||
A("ori r16,%[msk1]") /* 1 Reenable the stepper ISR */ \
|
|
||||||
A("cli") /* 1 Disable global interrupts - Reenabling Stepper ISR can reenter amd temperature can reenter, and we want that, if it happens, after this ISR has ended */ \
|
|
||||||
A("sts %[timsk1], r16") /* 2 And restore the old value - This reenables the stepper ISR */ \
|
|
||||||
A("pop r16") /* 2 Get the temperature timer Interrupt mask register [TIMSK0] */ \
|
|
||||||
A("sts %[timsk0], r16") /* 2 And restore the old value - This reenables the temperature ISR */ \
|
|
||||||
A("pop r16") /* 2 Get the old SREG value */ \
|
|
||||||
A("out __SREG__, r16") /* 1 And restore the SREG value */ \
|
|
||||||
A("pop r16") /* 2 Restore R16 value */ \
|
|
||||||
A("reti") /* 4 Return from interrupt */ \
|
|
||||||
: \
|
|
||||||
: [timsk0] "i" ((uint16_t)&TIMSK0), \
|
|
||||||
[timsk1] "i" ((uint16_t)&TIMSK1), \
|
|
||||||
[msk0] "M" ((uint8_t)(1<<OCIE0B)),\
|
|
||||||
[msk1] "M" ((uint8_t)(1<<OCIE1A)) \
|
|
||||||
: \
|
|
||||||
); \
|
|
||||||
} \
|
|
||||||
void TIMER1_COMPA_vect_bottom()
|
|
||||||
|
|
||||||
#endif // HAL_STEP_TIMER_ISR
|
|
||||||
|
|
||||||
#ifndef HAL_TEMP_TIMER_ISR
|
|
||||||
|
|
||||||
/* 14 cycles maximum latency */
|
|
||||||
#define HAL_TEMP_TIMER_ISR() \
|
|
||||||
extern "C" void TIMER0_COMPB_vect() __attribute__ ((signal, naked, used, externally_visible)); \
|
|
||||||
extern "C" void TIMER0_COMPB_vect_bottom() asm ("TIMER0_COMPB_vect_bottom") __attribute__ ((used, externally_visible, noinline)); \
|
|
||||||
void TIMER0_COMPB_vect() { \
|
|
||||||
__asm__ __volatile__ ( \
|
|
||||||
A("push r16") /* 2 Save R16 */ \
|
|
||||||
A("in r16, __SREG__") /* 1 Get SREG */ \
|
|
||||||
A("push r16") /* 2 Save SREG into stack */ \
|
|
||||||
A("lds r16, %[timsk0]") /* 2 Load into R0 the Temperature timer Interrupt mask register */ \
|
|
||||||
A("andi r16,~%[msk0]") /* 1 Disable the temperature ISR */ \
|
|
||||||
A("sts %[timsk0], r16") /* 2 And set the new value */ \
|
|
||||||
A("sei") /* 1 Enable global interrupts - It is safe, as the temperature ISR is disabled, so we cannot reenter it */ \
|
|
||||||
A("push r16") /* 2 Save TIMSK0 into stack */ \
|
|
||||||
A("in r16, 0x3B") /* 1 Get RAMPZ register */ \
|
|
||||||
A("push r16") /* 2 Save RAMPZ into stack */ \
|
|
||||||
A("in r16, 0x3C") /* 1 Get EIND register */ \
|
|
||||||
A("push r0") /* C runtime can modify all the following registers without restoring them */ \
|
|
||||||
A("push r1") \
|
|
||||||
A("push r18") \
|
|
||||||
A("push r19") \
|
|
||||||
A("push r20") \
|
|
||||||
A("push r21") \
|
|
||||||
A("push r22") \
|
|
||||||
A("push r23") \
|
|
||||||
A("push r24") \
|
|
||||||
A("push r25") \
|
|
||||||
A("push r26") \
|
|
||||||
A("push r27") \
|
|
||||||
A("push r30") \
|
|
||||||
A("push r31") \
|
|
||||||
A("clr r1") /* C runtime expects this register to be 0 */ \
|
|
||||||
A("call TIMER0_COMPB_vect_bottom") /* Call the bottom handler - No inlining allowed, otherwise registers used are not saved */ \
|
|
||||||
A("pop r31") \
|
|
||||||
A("pop r30") \
|
|
||||||
A("pop r27") \
|
|
||||||
A("pop r26") \
|
|
||||||
A("pop r25") \
|
|
||||||
A("pop r24") \
|
|
||||||
A("pop r23") \
|
|
||||||
A("pop r22") \
|
|
||||||
A("pop r21") \
|
|
||||||
A("pop r20") \
|
|
||||||
A("pop r19") \
|
|
||||||
A("pop r18") \
|
|
||||||
A("pop r1") \
|
|
||||||
A("pop r0") \
|
|
||||||
A("out 0x3C, r16") /* 1 Restore EIND register */ \
|
|
||||||
A("pop r16") /* 2 Get the original RAMPZ register value */ \
|
|
||||||
A("out 0x3B, r16") /* 1 Restore RAMPZ register to its original value */ \
|
|
||||||
A("pop r16") /* 2 Get the original TIMSK0 value but with temperature ISR disabled */ \
|
|
||||||
A("ori r16,%[msk0]") /* 1 Enable temperature ISR */ \
|
|
||||||
A("cli") /* 1 Disable global interrupts - We must do this, as we will reenable the temperature ISR, and we don't want to reenter this handler until the current one is done */ \
|
|
||||||
A("sts %[timsk0], r16") /* 2 And restore the old value */ \
|
|
||||||
A("pop r16") /* 2 Get the old SREG */ \
|
|
||||||
A("out __SREG__, r16") /* 1 And restore the SREG value */ \
|
|
||||||
A("pop r16") /* 2 Restore R16 */ \
|
|
||||||
A("reti") /* 4 Return from interrupt */ \
|
|
||||||
: \
|
|
||||||
: [timsk0] "i"((uint16_t)&TIMSK0), \
|
|
||||||
[msk0] "M" ((uint8_t)(1<<OCIE0B)) \
|
|
||||||
: \
|
|
||||||
); \
|
|
||||||
} \
|
|
||||||
void TIMER0_COMPB_vect_bottom()
|
|
||||||
|
|
||||||
#endif // HAL_TEMP_TIMER_ISR
|
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
|
|
||||||
#include "../../inc/MarlinConfigPre.h"
|
#include "../../inc/MarlinConfigPre.h"
|
||||||
|
|
||||||
#if HAS_MARLINUI_U8GLIB
|
#if HAS_GRAPHICAL_LCD
|
||||||
|
|
||||||
#include "../shared/Marduino.h"
|
#include "../shared/Marduino.h"
|
||||||
#include "../shared/Delay.h"
|
#include "../shared/Delay.h"
|
||||||
@@ -189,5 +189,5 @@ uint8_t u8g_com_HAL_AVR_sw_sp_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // HAS_MARLINUI_U8GLIB
|
#endif // HAS_GRAPHICAL_LCD
|
||||||
#endif // ARDUINO_ARCH_SAM
|
#endif // ARDUINO_ARCH_SAM
|
||||||
|
|||||||
@@ -16,9 +16,10 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef __AVR__
|
#ifdef __AVR__
|
||||||
|
|
||||||
#include "../../inc/MarlinConfig.h"
|
#include "../../inc/MarlinConfig.h"
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|||||||
@@ -0,0 +1,343 @@
|
|||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef ARDUINO_ARCH_SAM
|
||||||
|
|
||||||
|
#include "../../core/macros.h"
|
||||||
|
#include "../../core/serial.h"
|
||||||
|
|
||||||
|
#include "../shared/backtrace/unwinder.h"
|
||||||
|
#include "../shared/backtrace/unwmemaccess.h"
|
||||||
|
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
// Debug monitor that dumps to the Programming port all status when
|
||||||
|
// an exception or WDT timeout happens - And then resets the board
|
||||||
|
|
||||||
|
// All the Monitor routines must run with interrupts disabled and
|
||||||
|
// under an ISR execution context. That is why we cannot reuse the
|
||||||
|
// Serial interrupt routines or any C runtime, as we don't know the
|
||||||
|
// state we are when running them
|
||||||
|
|
||||||
|
// A SW memory barrier, to ensure GCC does not overoptimize loops
|
||||||
|
#define sw_barrier() __asm__ volatile("": : :"memory");
|
||||||
|
|
||||||
|
// (re)initialize UART0 as a monitor output to 250000,n,8,1
|
||||||
|
static void TXBegin() {
|
||||||
|
|
||||||
|
// Disable UART interrupt in NVIC
|
||||||
|
NVIC_DisableIRQ( UART_IRQn );
|
||||||
|
|
||||||
|
// We NEED memory barriers to ensure Interrupts are actually disabled!
|
||||||
|
// ( https://dzone.com/articles/nvic-disabling-interrupts-on-arm-cortex-m-and-the )
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
|
|
||||||
|
// Disable clock
|
||||||
|
pmc_disable_periph_clk( ID_UART );
|
||||||
|
|
||||||
|
// Configure PMC
|
||||||
|
pmc_enable_periph_clk( ID_UART );
|
||||||
|
|
||||||
|
// Disable PDC channel
|
||||||
|
UART->UART_PTCR = UART_PTCR_RXTDIS | UART_PTCR_TXTDIS;
|
||||||
|
|
||||||
|
// Reset and disable receiver and transmitter
|
||||||
|
UART->UART_CR = UART_CR_RSTRX | UART_CR_RSTTX | UART_CR_RXDIS | UART_CR_TXDIS;
|
||||||
|
|
||||||
|
// Configure mode: 8bit, No parity, 1 bit stop
|
||||||
|
UART->UART_MR = UART_MR_CHMODE_NORMAL | US_MR_CHRL_8_BIT | US_MR_NBSTOP_1_BIT | UART_MR_PAR_NO;
|
||||||
|
|
||||||
|
// Configure baudrate (asynchronous, no oversampling) to BAUDRATE bauds
|
||||||
|
UART->UART_BRGR = (SystemCoreClock / (BAUDRATE << 4));
|
||||||
|
|
||||||
|
// Enable receiver and transmitter
|
||||||
|
UART->UART_CR = UART_CR_RXEN | UART_CR_TXEN;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Send character through UART with no interrupts
|
||||||
|
static void TX(char c) {
|
||||||
|
while (!(UART->UART_SR & UART_SR_TXRDY)) { WDT_Restart(WDT); sw_barrier(); };
|
||||||
|
UART->UART_THR = c;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Send String through UART
|
||||||
|
static void TX(const char* s) {
|
||||||
|
while (*s) TX(*s++);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void TXDigit(uint32_t d) {
|
||||||
|
if (d < 10) TX((char)(d+'0'));
|
||||||
|
else if (d < 16) TX((char)(d+'A'-10));
|
||||||
|
else TX('?');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Send Hex number thru UART
|
||||||
|
static void TXHex(uint32_t v) {
|
||||||
|
TX("0x");
|
||||||
|
for (uint8_t i = 0; i < 8; i++, v <<= 4)
|
||||||
|
TXDigit((v >> 28) & 0xF);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Send Decimal number thru UART
|
||||||
|
static void TXDec(uint32_t v) {
|
||||||
|
if (!v) {
|
||||||
|
TX('0');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
char nbrs[14];
|
||||||
|
char *p = &nbrs[0];
|
||||||
|
while (v != 0) {
|
||||||
|
*p++ = '0' + (v % 10);
|
||||||
|
v /= 10;
|
||||||
|
}
|
||||||
|
do {
|
||||||
|
p--;
|
||||||
|
TX(*p);
|
||||||
|
} while (p != &nbrs[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Dump a backtrace entry
|
||||||
|
static bool UnwReportOut(void* ctx, const UnwReport* bte) {
|
||||||
|
int* p = (int*)ctx;
|
||||||
|
|
||||||
|
(*p)++;
|
||||||
|
TX('#'); TXDec(*p); TX(" : ");
|
||||||
|
TX(bte->name?bte->name:"unknown"); TX('@'); TXHex(bte->function);
|
||||||
|
TX('+'); TXDec(bte->address - bte->function);
|
||||||
|
TX(" PC:");TXHex(bte->address); TX('\n');
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef UNW_DEBUG
|
||||||
|
void UnwPrintf(const char* format, ...) {
|
||||||
|
char dest[256];
|
||||||
|
va_list argptr;
|
||||||
|
va_start(argptr, format);
|
||||||
|
vsprintf(dest, format, argptr);
|
||||||
|
va_end(argptr);
|
||||||
|
TX(&dest[0]);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Table of function pointers for passing to the unwinder */
|
||||||
|
static const UnwindCallbacks UnwCallbacks = {
|
||||||
|
UnwReportOut,
|
||||||
|
UnwReadW,
|
||||||
|
UnwReadH,
|
||||||
|
UnwReadB
|
||||||
|
#ifdef UNW_DEBUG
|
||||||
|
, UnwPrintf
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* HardFaultHandler_C:
|
||||||
|
* This is called from the HardFault_HandlerAsm with a pointer the Fault stack
|
||||||
|
* as the parameter. We can then read the values from the stack and place them
|
||||||
|
* into local variables for ease of reading.
|
||||||
|
* We then read the various Fault Status and Address Registers to help decode
|
||||||
|
* cause of the fault.
|
||||||
|
* The function ends with a BKPT instruction to force control back into the debugger
|
||||||
|
*/
|
||||||
|
extern "C"
|
||||||
|
void HardFault_HandlerC(unsigned long *sp, unsigned long lr, unsigned long cause) {
|
||||||
|
|
||||||
|
static const char* causestr[] = {
|
||||||
|
"NMI","Hard","Mem","Bus","Usage","Debug","WDT","RSTC"
|
||||||
|
};
|
||||||
|
|
||||||
|
UnwindFrame btf;
|
||||||
|
|
||||||
|
// Dump report to the Programming port (interrupts are DISABLED)
|
||||||
|
TXBegin();
|
||||||
|
TX("\n\n## Software Fault detected ##\n");
|
||||||
|
TX("Cause: "); TX(causestr[cause]); TX('\n');
|
||||||
|
|
||||||
|
TX("R0 : "); TXHex(((unsigned long)sp[0])); TX('\n');
|
||||||
|
TX("R1 : "); TXHex(((unsigned long)sp[1])); TX('\n');
|
||||||
|
TX("R2 : "); TXHex(((unsigned long)sp[2])); TX('\n');
|
||||||
|
TX("R3 : "); TXHex(((unsigned long)sp[3])); TX('\n');
|
||||||
|
TX("R12 : "); TXHex(((unsigned long)sp[4])); TX('\n');
|
||||||
|
TX("LR : "); TXHex(((unsigned long)sp[5])); TX('\n');
|
||||||
|
TX("PC : "); TXHex(((unsigned long)sp[6])); TX('\n');
|
||||||
|
TX("PSR : "); TXHex(((unsigned long)sp[7])); TX('\n');
|
||||||
|
|
||||||
|
// Configurable Fault Status Register
|
||||||
|
// Consists of MMSR, BFSR and UFSR
|
||||||
|
TX("CFSR : "); TXHex((*((volatile unsigned long *)(0xE000ED28)))); TX('\n');
|
||||||
|
|
||||||
|
// Hard Fault Status Register
|
||||||
|
TX("HFSR : "); TXHex((*((volatile unsigned long *)(0xE000ED2C)))); TX('\n');
|
||||||
|
|
||||||
|
// Debug Fault Status Register
|
||||||
|
TX("DFSR : "); TXHex((*((volatile unsigned long *)(0xE000ED30)))); TX('\n');
|
||||||
|
|
||||||
|
// Auxiliary Fault Status Register
|
||||||
|
TX("AFSR : "); TXHex((*((volatile unsigned long *)(0xE000ED3C)))); TX('\n');
|
||||||
|
|
||||||
|
// Read the Fault Address Registers. These may not contain valid values.
|
||||||
|
// Check BFARVALID/MMARVALID to see if they are valid values
|
||||||
|
// MemManage Fault Address Register
|
||||||
|
TX("MMAR : "); TXHex((*((volatile unsigned long *)(0xE000ED34)))); TX('\n');
|
||||||
|
|
||||||
|
// Bus Fault Address Register
|
||||||
|
TX("BFAR : "); TXHex((*((volatile unsigned long *)(0xE000ED38)))); TX('\n');
|
||||||
|
|
||||||
|
TX("ExcLR: "); TXHex(lr); TX('\n');
|
||||||
|
TX("ExcSP: "); TXHex((unsigned long)sp); TX('\n');
|
||||||
|
|
||||||
|
btf.sp = ((unsigned long)sp) + 8*4; // The original stack pointer
|
||||||
|
btf.fp = btf.sp;
|
||||||
|
btf.lr = ((unsigned long)sp[5]);
|
||||||
|
btf.pc = ((unsigned long)sp[6]) | 1; // Force Thumb, as CORTEX only support it
|
||||||
|
|
||||||
|
// Perform a backtrace
|
||||||
|
TX("\nBacktrace:\n\n");
|
||||||
|
int ctr = 0;
|
||||||
|
UnwindStart(&btf, &UnwCallbacks, &ctr);
|
||||||
|
|
||||||
|
// Disable all NVIC interrupts
|
||||||
|
NVIC->ICER[0] = 0xFFFFFFFF;
|
||||||
|
NVIC->ICER[1] = 0xFFFFFFFF;
|
||||||
|
|
||||||
|
// Relocate VTOR table to default position
|
||||||
|
SCB->VTOR = 0;
|
||||||
|
|
||||||
|
// Disable USB
|
||||||
|
otg_disable();
|
||||||
|
|
||||||
|
// Restart watchdog
|
||||||
|
WDT_Restart(WDT);
|
||||||
|
|
||||||
|
// Reset controller
|
||||||
|
NVIC_SystemReset();
|
||||||
|
for (;;) WDT_Restart(WDT);
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__((naked)) void NMI_Handler() {
|
||||||
|
__asm__ __volatile__ (
|
||||||
|
".syntax unified" "\n\t"
|
||||||
|
A("tst lr, #4")
|
||||||
|
A("ite eq")
|
||||||
|
A("mrseq r0, msp")
|
||||||
|
A("mrsne r0, psp")
|
||||||
|
A("mov r1,lr")
|
||||||
|
A("mov r2,#0")
|
||||||
|
A("b HardFault_HandlerC")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__((naked)) void HardFault_Handler() {
|
||||||
|
__asm__ __volatile__ (
|
||||||
|
".syntax unified" "\n\t"
|
||||||
|
A("tst lr, #4")
|
||||||
|
A("ite eq")
|
||||||
|
A("mrseq r0, msp")
|
||||||
|
A("mrsne r0, psp")
|
||||||
|
A("mov r1,lr")
|
||||||
|
A("mov r2,#1")
|
||||||
|
A("b HardFault_HandlerC")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__((naked)) void MemManage_Handler() {
|
||||||
|
__asm__ __volatile__ (
|
||||||
|
".syntax unified" "\n\t"
|
||||||
|
A("tst lr, #4")
|
||||||
|
A("ite eq")
|
||||||
|
A("mrseq r0, msp")
|
||||||
|
A("mrsne r0, psp")
|
||||||
|
A("mov r1,lr")
|
||||||
|
A("mov r2,#2")
|
||||||
|
A("b HardFault_HandlerC")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__((naked)) void BusFault_Handler() {
|
||||||
|
__asm__ __volatile__ (
|
||||||
|
".syntax unified" "\n\t"
|
||||||
|
A("tst lr, #4")
|
||||||
|
A("ite eq")
|
||||||
|
A("mrseq r0, msp")
|
||||||
|
A("mrsne r0, psp")
|
||||||
|
A("mov r1,lr")
|
||||||
|
A("mov r2,#3")
|
||||||
|
A("b HardFault_HandlerC")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__((naked)) void UsageFault_Handler() {
|
||||||
|
__asm__ __volatile__ (
|
||||||
|
".syntax unified" "\n\t"
|
||||||
|
A("tst lr, #4")
|
||||||
|
A("ite eq")
|
||||||
|
A("mrseq r0, msp")
|
||||||
|
A("mrsne r0, psp")
|
||||||
|
A("mov r1,lr")
|
||||||
|
A("mov r2,#4")
|
||||||
|
A("b HardFault_HandlerC")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__((naked)) void DebugMon_Handler() {
|
||||||
|
__asm__ __volatile__ (
|
||||||
|
".syntax unified" "\n\t"
|
||||||
|
A("tst lr, #4")
|
||||||
|
A("ite eq")
|
||||||
|
A("mrseq r0, msp")
|
||||||
|
A("mrsne r0, psp")
|
||||||
|
A("mov r1,lr")
|
||||||
|
A("mov r2,#5")
|
||||||
|
A("b HardFault_HandlerC")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* This is NOT an exception, it is an interrupt handler - Nevertheless, the framing is the same */
|
||||||
|
__attribute__((naked)) void WDT_Handler() {
|
||||||
|
__asm__ __volatile__ (
|
||||||
|
".syntax unified" "\n\t"
|
||||||
|
A("tst lr, #4")
|
||||||
|
A("ite eq")
|
||||||
|
A("mrseq r0, msp")
|
||||||
|
A("mrsne r0, psp")
|
||||||
|
A("mov r1,lr")
|
||||||
|
A("mov r2,#6")
|
||||||
|
A("b HardFault_HandlerC")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__((naked)) void RSTC_Handler() {
|
||||||
|
__asm__ __volatile__ (
|
||||||
|
".syntax unified" "\n\t"
|
||||||
|
A("tst lr, #4")
|
||||||
|
A("ite eq")
|
||||||
|
A("mrseq r0, msp")
|
||||||
|
A("mrsne r0, psp")
|
||||||
|
A("mov r1,lr")
|
||||||
|
A("mov r2,#7")
|
||||||
|
A("b HardFault_HandlerC")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // ARDUINO_ARCH_SAM
|
||||||
@@ -1,10 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Marlin 3D Printer Firmware
|
* Marlin 3D Printer Firmware
|
||||||
*
|
|
||||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
|
*
|
||||||
* Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
|
* Based on Sprinter and grbl.
|
||||||
* Copyright (c) 2016 Victor Perez victor_pv@hotmail.com
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -17,14 +16,9 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#ifdef ARDUINO_ARCH_SAM
|
|
||||||
|
|
||||||
#include "../../inc/MarlinConfig.h"
|
|
||||||
|
|
||||||
#if ENABLED(FLASH_EEPROM_EMULATION)
|
|
||||||
|
|
||||||
/* EEPROM emulation over flash with reduced wear
|
/* EEPROM emulation over flash with reduced wear
|
||||||
*
|
*
|
||||||
@@ -53,14 +47,22 @@
|
|||||||
* per page. We can't emulate EE endurance with FLASH for all
|
* per page. We can't emulate EE endurance with FLASH for all
|
||||||
* bytes, but we can emulate endurance for a given percent of
|
* bytes, but we can emulate endurance for a given percent of
|
||||||
* bytes.
|
* bytes.
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//#define EE_EMU_DEBUG
|
#ifdef ARDUINO_ARCH_SAM
|
||||||
|
|
||||||
|
#include "../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
|
#if ENABLED(FLASH_EEPROM_EMULATION)
|
||||||
|
|
||||||
|
#include "../shared/Marduino.h"
|
||||||
|
#include "../shared/persistent_store_api.h"
|
||||||
|
|
||||||
#define EEPROMSize 4096
|
#define EEPROMSize 4096
|
||||||
#define PagesPerGroup 128
|
#define PagesPerGroup 128
|
||||||
#define GroupCount 2
|
#define GroupCount 2
|
||||||
#define PageSize 256U
|
#define PageSize 256u
|
||||||
|
|
||||||
/* Flash storage */
|
/* Flash storage */
|
||||||
typedef struct FLASH_SECTOR {
|
typedef struct FLASH_SECTOR {
|
||||||
@@ -132,18 +134,15 @@ static uint8_t buffer[256] = {0}, // The RAM buffer to accumulate writes
|
|||||||
curPage = 0, // Current FLASH page inside the group
|
curPage = 0, // Current FLASH page inside the group
|
||||||
curGroup = 0xFF; // Current FLASH group
|
curGroup = 0xFF; // Current FLASH group
|
||||||
|
|
||||||
#define DEBUG_OUT ENABLED(EE_EMU_DEBUG)
|
//#define EE_EMU_DEBUG
|
||||||
#include "../../core/debug_out.h"
|
#ifdef EE_EMU_DEBUG
|
||||||
|
static void ee_Dump(int page,const void* data) {
|
||||||
static void ee_Dump(const int page, const void* data) {
|
|
||||||
|
|
||||||
#ifdef EE_EMU_DEBUG
|
|
||||||
|
|
||||||
const uint8_t* c = (const uint8_t*) data;
|
const uint8_t* c = (const uint8_t*) data;
|
||||||
char buffer[80];
|
char buffer[80];
|
||||||
|
|
||||||
sprintf_P(buffer, PSTR("Page: %d (0x%04x)\n"), page, page);
|
sprintf_P(buffer, PSTR("Page: %d (0x%04x)\n"), page, page);
|
||||||
DEBUG_ECHO(buffer);
|
SERIAL_ECHO(buffer);
|
||||||
|
|
||||||
char* p = &buffer[0];
|
char* p = &buffer[0];
|
||||||
for (int i = 0; i< PageSize; ++i) {
|
for (int i = 0; i< PageSize; ++i) {
|
||||||
@@ -153,16 +152,12 @@ static void ee_Dump(const int page, const void* data) {
|
|||||||
if ((i & 0xF) == 0xF) {
|
if ((i & 0xF) == 0xF) {
|
||||||
*p++ = '\n';
|
*p++ = '\n';
|
||||||
*p = 0;
|
*p = 0;
|
||||||
DEBUG_ECHO(buffer);
|
SERIAL_ECHO(buffer);
|
||||||
p = &buffer[0];
|
p = &buffer[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#else
|
#endif
|
||||||
UNUSED(page);
|
|
||||||
UNUSED(data);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Flash Writing Protection Key */
|
/* Flash Writing Protection Key */
|
||||||
#define FWP_KEY 0x5Au
|
#define FWP_KEY 0x5Au
|
||||||
@@ -175,16 +170,17 @@ static void ee_Dump(const int page, const void* data) {
|
|||||||
#define EEFC_ERROR_FLAGS (EEFC_FSR_FLOCKE | EEFC_FSR_FCMDE)
|
#define EEFC_ERROR_FLAGS (EEFC_FSR_FLOCKE | EEFC_FSR_FCMDE)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Writes the contents of the specified page (no previous erase)
|
* Writes the contents of the specified page (no previous erase)
|
||||||
* @param page (page #)
|
* @param page (page #)
|
||||||
* @param data (pointer to the data buffer)
|
* @param data (pointer to the data buffer)
|
||||||
*/
|
*/
|
||||||
__attribute__ ((long_call, section (".ramfunc")))
|
__attribute__ ((long_call, section (".ramfunc")))
|
||||||
static bool ee_PageWrite(uint16_t page, const void* data) {
|
static bool ee_PageWrite(uint16_t page,const void* data) {
|
||||||
|
|
||||||
uint16_t i;
|
uint16_t i;
|
||||||
uint32_t addrflash = uint32_t(getFlashStorage(page));
|
uint32_t addrflash = ((uint32_t)getFlashStorage(page));
|
||||||
|
|
||||||
// Read the flash contents
|
// Read the flash contents
|
||||||
uint32_t pageContents[PageSize>>2];
|
uint32_t pageContents[PageSize>>2];
|
||||||
@@ -199,11 +195,13 @@ static bool ee_PageWrite(uint16_t page, const void* data) {
|
|||||||
for (i = 0; i <PageSize >> 2; i++)
|
for (i = 0; i <PageSize >> 2; i++)
|
||||||
pageContents[i] = (((uint32_t*)data)[i]) | (~(pageContents[i] ^ ((uint32_t*)data)[i]));
|
pageContents[i] = (((uint32_t*)data)[i]) | (~(pageContents[i] ^ ((uint32_t*)data)[i]));
|
||||||
|
|
||||||
DEBUG_ECHO_START();
|
#ifdef EE_EMU_DEBUG
|
||||||
DEBUG_ECHOLNPAIR("EEPROM PageWrite ", page);
|
SERIAL_ECHO_START();
|
||||||
DEBUG_ECHOLNPAIR(" in FLASH address ", (uint32_t)addrflash);
|
SERIAL_ECHOLNPAIR("EEPROM PageWrite ", page);
|
||||||
DEBUG_ECHOLNPAIR(" base address ", (uint32_t)getFlashStorage(0));
|
SERIAL_ECHOLNPAIR(" in FLASH address ", (uint32_t)addrflash);
|
||||||
DEBUG_FLUSH();
|
SERIAL_ECHOLNPAIR(" base address ", (uint32_t)getFlashStorage(0));
|
||||||
|
SERIAL_FLUSH();
|
||||||
|
#endif
|
||||||
|
|
||||||
// Get the page relative to the start of the EFC controller, and the EFC controller to use
|
// Get the page relative to the start of the EFC controller, and the EFC controller to use
|
||||||
Efc *efc;
|
Efc *efc;
|
||||||
@@ -245,8 +243,10 @@ static bool ee_PageWrite(uint16_t page, const void* data) {
|
|||||||
// Reenable interrupts
|
// Reenable interrupts
|
||||||
__enable_irq();
|
__enable_irq();
|
||||||
|
|
||||||
DEBUG_ECHO_START();
|
#ifdef EE_EMU_DEBUG
|
||||||
DEBUG_ECHOLNPAIR("EEPROM Unlock failure for page ", page);
|
SERIAL_ECHO_START();
|
||||||
|
SERIAL_ECHOLNPAIR("EEPROM Unlock failure for page ", page);
|
||||||
|
#endif
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -270,9 +270,10 @@ static bool ee_PageWrite(uint16_t page, const void* data) {
|
|||||||
// Reenable interrupts
|
// Reenable interrupts
|
||||||
__enable_irq();
|
__enable_irq();
|
||||||
|
|
||||||
DEBUG_ECHO_START();
|
#ifdef EE_EMU_DEBUG
|
||||||
DEBUG_ECHOLNPAIR("EEPROM Write failure for page ", page);
|
SERIAL_ECHO_START();
|
||||||
|
SERIAL_ECHOLNPAIR("EEPROM Write failure for page ", page);
|
||||||
|
#endif
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -286,11 +287,11 @@ static bool ee_PageWrite(uint16_t page, const void* data) {
|
|||||||
if (memcmp(getFlashStorage(page),data,PageSize)) {
|
if (memcmp(getFlashStorage(page),data,PageSize)) {
|
||||||
|
|
||||||
#ifdef EE_EMU_DEBUG
|
#ifdef EE_EMU_DEBUG
|
||||||
DEBUG_ECHO_START();
|
SERIAL_ECHO_START();
|
||||||
DEBUG_ECHOLNPAIR("EEPROM Verify Write failure for page ", page);
|
SERIAL_ECHOLNPAIR("EEPROM Verify Write failure for page ", page);
|
||||||
|
|
||||||
ee_Dump( page, (uint32_t *)addrflash);
|
ee_Dump( page,(uint32_t *) addrflash);
|
||||||
ee_Dump(-page, data);
|
ee_Dump(-page,data);
|
||||||
|
|
||||||
// Calculate count of changed bits
|
// Calculate count of changed bits
|
||||||
uint32_t* p1 = (uint32_t*)addrflash;
|
uint32_t* p1 = (uint32_t*)addrflash;
|
||||||
@@ -306,7 +307,7 @@ static bool ee_PageWrite(uint16_t page, const void* data) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DEBUG_ECHOLNPAIR("--> Differing bits: ", count);
|
SERIAL_ECHOLNPAIR("--> Differing bits: ", count);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@@ -323,13 +324,15 @@ __attribute__ ((long_call, section (".ramfunc")))
|
|||||||
static bool ee_PageErase(uint16_t page) {
|
static bool ee_PageErase(uint16_t page) {
|
||||||
|
|
||||||
uint16_t i;
|
uint16_t i;
|
||||||
uint32_t addrflash = uint32_t(getFlashStorage(page));
|
uint32_t addrflash = ((uint32_t)getFlashStorage(page));
|
||||||
|
|
||||||
DEBUG_ECHO_START();
|
#ifdef EE_EMU_DEBUG
|
||||||
DEBUG_ECHOLNPAIR("EEPROM PageErase ", page);
|
SERIAL_ECHO_START();
|
||||||
DEBUG_ECHOLNPAIR(" in FLASH address ", (uint32_t)addrflash);
|
SERIAL_ECHOLNPAIR("EEPROM PageErase ", page);
|
||||||
DEBUG_ECHOLNPAIR(" base address ", (uint32_t)getFlashStorage(0));
|
SERIAL_ECHOLNPAIR(" in FLASH address ", (uint32_t)addrflash);
|
||||||
DEBUG_FLUSH();
|
SERIAL_ECHOLNPAIR(" base address ", (uint32_t)getFlashStorage(0));
|
||||||
|
SERIAL_FLUSH();
|
||||||
|
#endif
|
||||||
|
|
||||||
// Get the page relative to the start of the EFC controller, and the EFC controller to use
|
// Get the page relative to the start of the EFC controller, and the EFC controller to use
|
||||||
Efc *efc;
|
Efc *efc;
|
||||||
@@ -370,9 +373,10 @@ static bool ee_PageErase(uint16_t page) {
|
|||||||
// Reenable interrupts
|
// Reenable interrupts
|
||||||
__enable_irq();
|
__enable_irq();
|
||||||
|
|
||||||
DEBUG_ECHO_START();
|
#ifdef EE_EMU_DEBUG
|
||||||
DEBUG_ECHOLNPAIR("EEPROM Unlock failure for page ",page);
|
SERIAL_ECHO_START();
|
||||||
|
SERIAL_ECHOLNPAIR("EEPROM Unlock failure for page ",page);
|
||||||
|
#endif
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -394,9 +398,10 @@ static bool ee_PageErase(uint16_t page) {
|
|||||||
// Reenable interrupts
|
// Reenable interrupts
|
||||||
__enable_irq();
|
__enable_irq();
|
||||||
|
|
||||||
DEBUG_ECHO_START();
|
#ifdef EE_EMU_DEBUG
|
||||||
DEBUG_ECHOLNPAIR("EEPROM Erase failure for page ",page);
|
SERIAL_ECHO_START();
|
||||||
|
SERIAL_ECHOLNPAIR("EEPROM Erase failure for page ",page);
|
||||||
|
#endif
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -410,17 +415,20 @@ static bool ee_PageErase(uint16_t page) {
|
|||||||
uint32_t * aligned_src = (uint32_t *) addrflash;
|
uint32_t * aligned_src = (uint32_t *) addrflash;
|
||||||
for (i = 0; i < PageSize >> 2; i++) {
|
for (i = 0; i < PageSize >> 2; i++) {
|
||||||
if (*aligned_src++ != 0xFFFFFFFF) {
|
if (*aligned_src++ != 0xFFFFFFFF) {
|
||||||
DEBUG_ECHO_START();
|
|
||||||
DEBUG_ECHOLNPAIR("EEPROM Verify Erase failure for page ",page);
|
#ifdef EE_EMU_DEBUG
|
||||||
ee_Dump(page, (uint32_t *)addrflash);
|
SERIAL_ECHO_START();
|
||||||
|
SERIAL_ECHOLNPAIR("EEPROM Verify Erase failure for page ",page);
|
||||||
|
|
||||||
|
ee_Dump( page,(uint32_t *) addrflash);
|
||||||
|
#endif
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
static uint8_t ee_Read(uint32_t address, bool excludeRAMBuffer = false) {
|
||||||
static uint8_t ee_Read(uint32_t address, bool excludeRAMBuffer=false) {
|
|
||||||
|
|
||||||
uint32_t baddr;
|
uint32_t baddr;
|
||||||
uint32_t blen;
|
uint32_t blen;
|
||||||
@@ -503,7 +511,7 @@ static uint8_t ee_Read(uint32_t address, bool excludeRAMBuffer=false) {
|
|||||||
return 0xFF;
|
return 0xFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint32_t ee_GetAddrRange(uint32_t address, bool excludeRAMBuffer=false) {
|
static uint32_t ee_GetAddrRange(uint32_t address, bool excludeRAMBuffer = false) {
|
||||||
uint32_t baddr,
|
uint32_t baddr,
|
||||||
blen,
|
blen,
|
||||||
nextAddr = 0xFFFF,
|
nextAddr = 0xFFFF,
|
||||||
@@ -595,7 +603,7 @@ static bool ee_IsPageClean(int page) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool ee_Flush(uint32_t overrideAddress = 0xFFFFFFFF, uint8_t overrideData=0xFF) {
|
static bool ee_Flush(uint32_t overrideAddress = 0xFFFFFFFF, uint8_t overrideData = 0xFF) {
|
||||||
|
|
||||||
// Check if RAM buffer has something to be written
|
// Check if RAM buffer has something to be written
|
||||||
bool isEmpty = true;
|
bool isEmpty = true;
|
||||||
@@ -921,9 +929,11 @@ static void ee_Init() {
|
|||||||
// If all groups seem to be used, default to first group
|
// If all groups seem to be used, default to first group
|
||||||
if (curGroup >= GroupCount) curGroup = 0;
|
if (curGroup >= GroupCount) curGroup = 0;
|
||||||
|
|
||||||
DEBUG_ECHO_START();
|
#ifdef EE_EMU_DEBUG
|
||||||
DEBUG_ECHOLNPAIR("EEPROM Current Group: ",curGroup);
|
SERIAL_ECHO_START();
|
||||||
DEBUG_FLUSH();
|
SERIAL_ECHOLNPAIR("EEPROM Current Group: ",curGroup);
|
||||||
|
SERIAL_FLUSH();
|
||||||
|
#endif
|
||||||
|
|
||||||
// Now, validate that all the other group pages are empty
|
// Now, validate that all the other group pages are empty
|
||||||
for (int grp = 0; grp < GroupCount; grp++) {
|
for (int grp = 0; grp < GroupCount; grp++) {
|
||||||
@@ -931,9 +941,11 @@ static void ee_Init() {
|
|||||||
|
|
||||||
for (int page = 0; page < PagesPerGroup; page++) {
|
for (int page = 0; page < PagesPerGroup; page++) {
|
||||||
if (!ee_IsPageClean(grp * PagesPerGroup + page)) {
|
if (!ee_IsPageClean(grp * PagesPerGroup + page)) {
|
||||||
DEBUG_ECHO_START();
|
#ifdef EE_EMU_DEBUG
|
||||||
DEBUG_ECHOLNPAIR("EEPROM Page ", page, " not clean on group ", grp);
|
SERIAL_ECHO_START();
|
||||||
DEBUG_FLUSH();
|
SERIAL_ECHOLNPAIR("EEPROM Page ", page, " not clean on group ", grp);
|
||||||
|
SERIAL_FLUSH();
|
||||||
|
#endif
|
||||||
ee_PageErase(grp * PagesPerGroup + page);
|
ee_PageErase(grp * PagesPerGroup + page);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -943,69 +955,66 @@ static void ee_Init() {
|
|||||||
// and also validate that all the other ones are clean
|
// and also validate that all the other ones are clean
|
||||||
for (curPage = 0; curPage < PagesPerGroup; curPage++) {
|
for (curPage = 0; curPage < PagesPerGroup; curPage++) {
|
||||||
if (ee_IsPageClean(curGroup * PagesPerGroup + curPage)) {
|
if (ee_IsPageClean(curGroup * PagesPerGroup + curPage)) {
|
||||||
ee_Dump(curGroup * PagesPerGroup + curPage, getFlashStorage(curGroup * PagesPerGroup + curPage));
|
#ifdef EE_EMU_DEBUG
|
||||||
|
ee_Dump(curGroup * PagesPerGroup + curPage, getFlashStorage(curGroup * PagesPerGroup + curPage));
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG_ECHO_START();
|
#ifdef EE_EMU_DEBUG
|
||||||
DEBUG_ECHOLNPAIR("EEPROM Active page: ", curPage);
|
SERIAL_ECHO_START();
|
||||||
DEBUG_FLUSH();
|
SERIAL_ECHOLNPAIR("EEPROM Active page: ", curPage);
|
||||||
|
SERIAL_FLUSH();
|
||||||
|
#endif
|
||||||
|
|
||||||
// Make sure the pages following the first clean one are also clean
|
// Make sure the pages following the first clean one are also clean
|
||||||
for (int page = curPage + 1; page < PagesPerGroup; page++) {
|
for (int page = curPage + 1; page < PagesPerGroup; page++) {
|
||||||
if (!ee_IsPageClean(curGroup * PagesPerGroup + page)) {
|
if (!ee_IsPageClean(curGroup * PagesPerGroup + page)) {
|
||||||
DEBUG_ECHO_START();
|
#ifdef EE_EMU_DEBUG
|
||||||
DEBUG_ECHOLNPAIR("EEPROM Page ", page, " not clean on active group ", curGroup);
|
SERIAL_ECHO_START();
|
||||||
DEBUG_FLUSH();
|
SERIAL_ECHOLNPAIR("EEPROM Page ", page, " not clean on active group ", curGroup);
|
||||||
ee_Dump(curGroup * PagesPerGroup + page, getFlashStorage(curGroup * PagesPerGroup + page));
|
SERIAL_FLUSH();
|
||||||
|
ee_Dump(curGroup * PagesPerGroup + page, getFlashStorage(curGroup * PagesPerGroup + page));
|
||||||
|
#endif
|
||||||
ee_PageErase(curGroup * PagesPerGroup + page);
|
ee_PageErase(curGroup * PagesPerGroup + page);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* PersistentStore -----------------------------------------------------------*/
|
uint8_t eeprom_read_byte(uint8_t* addr) {
|
||||||
|
ee_Init();
|
||||||
#include "../shared/eeprom_api.h"
|
return ee_Read((uint32_t)addr);
|
||||||
|
|
||||||
#ifndef MARLIN_EEPROM_SIZE
|
|
||||||
#define MARLIN_EEPROM_SIZE 0x1000 // 4KB
|
|
||||||
#endif
|
|
||||||
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; }
|
|
||||||
bool PersistentStore::access_start() { ee_Init(); return true; }
|
|
||||||
bool PersistentStore::access_finish() { ee_Flush(); return true; }
|
|
||||||
|
|
||||||
bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
|
|
||||||
while (size--) {
|
|
||||||
uint8_t * const p = (uint8_t * const)pos;
|
|
||||||
uint8_t v = *value;
|
|
||||||
// EEPROM has only ~100,000 write cycles,
|
|
||||||
// so only write bytes that have changed!
|
|
||||||
if (v != ee_Read(uint32_t(p))) {
|
|
||||||
ee_Write(uint32_t(p), v);
|
|
||||||
delay(2);
|
|
||||||
if (ee_Read(uint32_t(p)) != v) {
|
|
||||||
SERIAL_ECHO_MSG(STR_ERR_EEPROM_WRITE);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
crc16(crc, &v, 1);
|
|
||||||
pos++;
|
|
||||||
value++;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
|
void eeprom_write_byte(uint8_t* addr, uint8_t value) {
|
||||||
do {
|
ee_Init();
|
||||||
uint8_t c = ee_Read(uint32_t(pos));
|
ee_Write((uint32_t)addr, value);
|
||||||
if (writing) *value = c;
|
}
|
||||||
crc16(crc, &c, 1);
|
|
||||||
pos++;
|
void eeprom_update_block(const void* __src, void* __dst, size_t __n) {
|
||||||
value++;
|
uint8_t* dst = (uint8_t*)__dst;
|
||||||
} while (--size);
|
const uint8_t* src = (const uint8_t*)__src;
|
||||||
return false;
|
while (__n--) {
|
||||||
|
eeprom_write_byte(dst, *src);
|
||||||
|
++dst;
|
||||||
|
++src;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void eeprom_read_block(void* __dst, const void* __src, size_t __n) {
|
||||||
|
uint8_t* dst = (uint8_t*)__dst;
|
||||||
|
uint8_t* src = (uint8_t*)__src;
|
||||||
|
while (__n--) {
|
||||||
|
*dst = eeprom_read_byte(src);
|
||||||
|
++dst;
|
||||||
|
++src;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void eeprom_flush() {
|
||||||
|
ee_Flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // FLASH_EEPROM_EMULATION
|
#endif // FLASH_EEPROM_EMULATION
|
||||||
#endif // ARDUINO_ARCH_SAM
|
#endif // ARDUINO_ARCH_AVR
|
||||||
@@ -14,12 +14,13 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* HAL for Arduino Due and compatible (SAM3X8E)
|
* Description: HAL for Arduino Due and compatible (SAM3X8E)
|
||||||
|
*
|
||||||
|
* For ARDUINO_ARCH_SAM
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef ARDUINO_ARCH_SAM
|
#ifdef ARDUINO_ARCH_SAM
|
||||||
@@ -40,8 +41,6 @@ uint16_t HAL_adc_result;
|
|||||||
// Public functions
|
// Public functions
|
||||||
// ------------------------
|
// ------------------------
|
||||||
|
|
||||||
TERN_(POSTMORTEM_DEBUGGING, extern void install_min_serial());
|
|
||||||
|
|
||||||
// HAL initialization task
|
// HAL initialization task
|
||||||
void HAL_init() {
|
void HAL_init() {
|
||||||
// Initialize the USB stack
|
// Initialize the USB stack
|
||||||
@@ -49,7 +48,6 @@ void HAL_init() {
|
|||||||
OUT_WRITE(SDSS, HIGH); // Try to set SDSS inactive before any other SPI users start up
|
OUT_WRITE(SDSS, HIGH); // Try to set SDSS inactive before any other SPI users start up
|
||||||
#endif
|
#endif
|
||||||
usb_task_init();
|
usb_task_init();
|
||||||
TERN_(POSTMORTEM_DEBUGGING, install_min_serial()); // Install the min serial handler
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// HAL idle task
|
// HAL idle task
|
||||||
@@ -105,18 +103,4 @@ uint16_t HAL_adc_get_result() {
|
|||||||
return HAL_adc_result;
|
return HAL_adc_result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Forward the default serial ports
|
|
||||||
#if ANY_SERIAL_IS(0)
|
|
||||||
DefaultSerial1 MSerial0(false, Serial);
|
|
||||||
#endif
|
|
||||||
#if ANY_SERIAL_IS(1)
|
|
||||||
DefaultSerial2 MSerial1(false, Serial1);
|
|
||||||
#endif
|
|
||||||
#if ANY_SERIAL_IS(2)
|
|
||||||
DefaultSerial3 MSerial2(false, Serial2);
|
|
||||||
#endif
|
|
||||||
#if ANY_SERIAL_IS(3)
|
|
||||||
DefaultSerial4 MSerial3(false, Serial3);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // ARDUINO_ARCH_SAM
|
#endif // ARDUINO_ARCH_SAM
|
||||||
|
|||||||
+68
-52
@@ -16,74 +16,81 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* HAL for Arduino Due and compatible (SAM3X8E)
|
* Description: HAL for Arduino Due and compatible (SAM3X8E)
|
||||||
|
*
|
||||||
|
* For ARDUINO_ARCH_SAM
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define CPU_32_BIT
|
#define CPU_32_BIT
|
||||||
|
|
||||||
#include "../shared/Marduino.h"
|
#include "../shared/Marduino.h"
|
||||||
#include "../shared/eeprom_if.h"
|
|
||||||
#include "../shared/math_32bit.h"
|
#include "../shared/math_32bit.h"
|
||||||
#include "../shared/HAL_SPI.h"
|
#include "../shared/HAL_SPI.h"
|
||||||
#include "fastio.h"
|
#include "fastio.h"
|
||||||
#include "watchdog.h"
|
#include "watchdog.h"
|
||||||
|
#include "timers.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include "../../core/serial_hook.h"
|
// Define MYSERIAL0/1 before MarlinSerial includes!
|
||||||
|
|
||||||
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)
|
|
||||||
|
|
||||||
// Define MYSERIAL1/2 before MarlinSerial includes!
|
|
||||||
#if SERIAL_PORT == -1 || ENABLED(EMERGENCY_PARSER)
|
#if SERIAL_PORT == -1 || ENABLED(EMERGENCY_PARSER)
|
||||||
#define MYSERIAL1 customizedSerial1
|
#define MYSERIAL0 customizedSerial1
|
||||||
#elif WITHIN(SERIAL_PORT, 0, 3)
|
#elif SERIAL_PORT == 0
|
||||||
#define MYSERIAL1 MSERIAL(SERIAL_PORT)
|
#define MYSERIAL0 Serial
|
||||||
|
#elif SERIAL_PORT == 1
|
||||||
|
#define MYSERIAL0 Serial1
|
||||||
|
#elif SERIAL_PORT == 2
|
||||||
|
#define MYSERIAL0 Serial2
|
||||||
|
#elif SERIAL_PORT == 3
|
||||||
|
#define MYSERIAL0 Serial3
|
||||||
#else
|
#else
|
||||||
#error "The required SERIAL_PORT must be from -1 to 3. Please update your configuration."
|
#error "The required SERIAL_PORT must be from -1 to 3. Please update your configuration."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SERIAL_PORT_2
|
#ifdef SERIAL_PORT_2
|
||||||
#if SERIAL_PORT_2 == -1 || ENABLED(EMERGENCY_PARSER)
|
#if SERIAL_PORT_2 == SERIAL_PORT
|
||||||
#define MYSERIAL2 customizedSerial2
|
#error "SERIAL_PORT_2 must be different from SERIAL_PORT. Please update your configuration."
|
||||||
#elif WITHIN(SERIAL_PORT_2, 0, 3)
|
#elif SERIAL_PORT_2 == -1 || ENABLED(EMERGENCY_PARSER)
|
||||||
#define MYSERIAL2 MSERIAL(SERIAL_PORT_2)
|
#define MYSERIAL1 customizedSerial2
|
||||||
|
#elif SERIAL_PORT_2 == 0
|
||||||
|
#define MYSERIAL1 Serial
|
||||||
|
#elif SERIAL_PORT_2 == 1
|
||||||
|
#define MYSERIAL1 Serial1
|
||||||
|
#elif SERIAL_PORT_2 == 2
|
||||||
|
#define MYSERIAL1 Serial2
|
||||||
|
#elif SERIAL_PORT_2 == 3
|
||||||
|
#define MYSERIAL1 Serial3
|
||||||
#else
|
#else
|
||||||
#error "SERIAL_PORT_2 must be from -1 to 3. Please update your configuration."
|
#error "SERIAL_PORT_2 must be from -1 to 3. Please update your configuration."
|
||||||
#endif
|
#endif
|
||||||
|
#define NUM_SERIAL 2
|
||||||
|
#else
|
||||||
|
#define NUM_SERIAL 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MMU2_SERIAL_PORT
|
#ifdef DGUS_SERIAL_PORT
|
||||||
#if WITHIN(MMU2_SERIAL_PORT, 0, 3)
|
#if DGUS_SERIAL_PORT == SERIAL_PORT
|
||||||
#define MMU2_SERIAL MSERIAL(MMU2_SERIAL_PORT)
|
#error "DGUS_SERIAL_PORT must be different from SERIAL_PORT. Please update your configuration."
|
||||||
|
#elif defined(SERIAL_PORT_2) && DGUS_SERIAL_PORT == SERIAL_PORT_2
|
||||||
|
#error "DGUS_SERIAL_PORT must be different than SERIAL_PORT_2. Please update your configuration."
|
||||||
|
#elif DGUS_SERIAL_PORT == -1
|
||||||
|
#define DGUS_SERIAL internalDgusSerial
|
||||||
|
#elif DGUS_SERIAL_PORT == 0
|
||||||
|
#define DGUS_SERIAL Serial
|
||||||
|
#elif DGUS_SERIAL_PORT == 1
|
||||||
|
#define DGUS_SERIAL Serial1
|
||||||
|
#elif DGUS_SERIAL_PORT == 2
|
||||||
|
#define DGUS_SERIAL Serial2
|
||||||
|
#elif DGUS_SERIAL_PORT == 3
|
||||||
|
#define DGUS_SERIAL Serial3
|
||||||
#else
|
#else
|
||||||
#error "MMU2_SERIAL_PORT must be from 0 to 3. Please update your configuration."
|
#error "DGUS_SERIAL_PORT must be from -1 to 3. Please update your configuration."
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef LCD_SERIAL_PORT
|
|
||||||
#if LCD_SERIAL_PORT == -1
|
|
||||||
#define LCD_SERIAL lcdSerial
|
|
||||||
#elif WITHIN(LCD_SERIAL_PORT, 0, 3)
|
|
||||||
#define LCD_SERIAL MSERIAL(LCD_SERIAL_PORT)
|
|
||||||
#else
|
|
||||||
#error "LCD_SERIAL_PORT must be from -1 to 3. Please update your configuration."
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -93,6 +100,16 @@ extern DefaultSerial4 MSerial3;
|
|||||||
// On AVR this is in math.h?
|
// On AVR this is in math.h?
|
||||||
#define square(x) ((x)*(x))
|
#define square(x) ((x)*(x))
|
||||||
|
|
||||||
|
#ifndef strncpy_P
|
||||||
|
#define strncpy_P(dest, src, num) strncpy((dest), (src), (num))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Fix bug in pgm_read_ptr
|
||||||
|
#undef pgm_read_ptr
|
||||||
|
#define pgm_read_ptr(addr) (*((void**)(addr)))
|
||||||
|
#undef pgm_read_word
|
||||||
|
#define pgm_read_word(addr) (*((uint16_t*)(addr)))
|
||||||
|
|
||||||
typedef int8_t pin_t;
|
typedef int8_t pin_t;
|
||||||
|
|
||||||
#define SHARED_SERVOS HAS_SERVOS
|
#define SHARED_SERVOS HAS_SERVOS
|
||||||
@@ -113,7 +130,13 @@ void sei(); // Enable interrupts
|
|||||||
void HAL_clear_reset_source(); // clear reset reason
|
void HAL_clear_reset_source(); // clear reset reason
|
||||||
uint8_t HAL_get_reset_source(); // get reset reason
|
uint8_t HAL_get_reset_source(); // get reset reason
|
||||||
|
|
||||||
inline void HAL_reboot() {} // reboot the board or restart the bootloader
|
//
|
||||||
|
// EEPROM
|
||||||
|
//
|
||||||
|
void eeprom_write_byte(uint8_t *pos, unsigned char value);
|
||||||
|
uint8_t eeprom_read_byte(uint8_t *pos);
|
||||||
|
void eeprom_read_block (void *__dst, const void *__src, size_t __n);
|
||||||
|
void eeprom_update_block (const void *__src, void *__dst, size_t __n);
|
||||||
|
|
||||||
//
|
//
|
||||||
// ADC
|
// ADC
|
||||||
@@ -121,16 +144,15 @@ inline void HAL_reboot() {} // reboot the board or restart the bootloader
|
|||||||
extern uint16_t HAL_adc_result; // result of last ADC conversion
|
extern uint16_t HAL_adc_result; // result of last ADC conversion
|
||||||
|
|
||||||
#ifndef analogInputToDigitalPin
|
#ifndef analogInputToDigitalPin
|
||||||
#define analogInputToDigitalPin(p) ((p < 12U) ? (p) + 54U : -1)
|
#define analogInputToDigitalPin(p) ((p < 12u) ? (p) + 54u : -1)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define HAL_ANALOG_SELECT(ch)
|
#define HAL_ANALOG_SELECT(ch)
|
||||||
|
|
||||||
inline void HAL_adc_init() {}//todo
|
inline void HAL_adc_init() {}//todo
|
||||||
|
|
||||||
#define HAL_ADC_VREF 3.3
|
|
||||||
#define HAL_ADC_RESOLUTION 10
|
|
||||||
#define HAL_START_ADC(ch) HAL_adc_start_conversion(ch)
|
#define HAL_START_ADC(ch) HAL_adc_start_conversion(ch)
|
||||||
|
#define HAL_ADC_RESOLUTION 10
|
||||||
#define HAL_READ_ADC() HAL_adc_result
|
#define HAL_READ_ADC() HAL_adc_result
|
||||||
#define HAL_ADC_READY() true
|
#define HAL_ADC_READY() true
|
||||||
|
|
||||||
@@ -161,16 +183,10 @@ void HAL_init();
|
|||||||
//
|
//
|
||||||
void _delay_ms(const int delay);
|
void _delay_ms(const int delay);
|
||||||
|
|
||||||
#if GCC_VERSION <= 50000
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic ignored "-Wunused-function"
|
||||||
#pragma GCC diagnostic ignored "-Wunused-function"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int freeMemory();
|
int freeMemory();
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
#if GCC_VERSION <= 50000
|
|
||||||
#pragma GCC diagnostic pop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|||||||
@@ -1,91 +0,0 @@
|
|||||||
/**
|
|
||||||
* Marlin 3D Printer Firmware
|
|
||||||
* Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
|
||||||
*
|
|
||||||
* Based on Sprinter and grbl.
|
|
||||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
#ifdef ARDUINO_ARCH_SAM
|
|
||||||
|
|
||||||
#include "../../inc/MarlinConfigPre.h"
|
|
||||||
|
|
||||||
#if ENABLED(POSTMORTEM_DEBUGGING)
|
|
||||||
|
|
||||||
#include "../shared/HAL_MinSerial.h"
|
|
||||||
|
|
||||||
#include <stdarg.h>
|
|
||||||
|
|
||||||
static void TXBegin() {
|
|
||||||
// Disable UART interrupt in NVIC
|
|
||||||
NVIC_DisableIRQ( UART_IRQn );
|
|
||||||
|
|
||||||
// We NEED memory barriers to ensure Interrupts are actually disabled!
|
|
||||||
// ( https://dzone.com/articles/nvic-disabling-interrupts-on-arm-cortex-m-and-the )
|
|
||||||
__DSB();
|
|
||||||
__ISB();
|
|
||||||
|
|
||||||
// Disable clock
|
|
||||||
pmc_disable_periph_clk( ID_UART );
|
|
||||||
|
|
||||||
// Configure PMC
|
|
||||||
pmc_enable_periph_clk( ID_UART );
|
|
||||||
|
|
||||||
// Disable PDC channel
|
|
||||||
UART->UART_PTCR = UART_PTCR_RXTDIS | UART_PTCR_TXTDIS;
|
|
||||||
|
|
||||||
// Reset and disable receiver and transmitter
|
|
||||||
UART->UART_CR = UART_CR_RSTRX | UART_CR_RSTTX | UART_CR_RXDIS | UART_CR_TXDIS;
|
|
||||||
|
|
||||||
// Configure mode: 8bit, No parity, 1 bit stop
|
|
||||||
UART->UART_MR = UART_MR_CHMODE_NORMAL | US_MR_CHRL_8_BIT | US_MR_NBSTOP_1_BIT | UART_MR_PAR_NO;
|
|
||||||
|
|
||||||
// Configure baudrate (asynchronous, no oversampling) to BAUDRATE bauds
|
|
||||||
UART->UART_BRGR = (SystemCoreClock / (BAUDRATE << 4));
|
|
||||||
|
|
||||||
// Enable receiver and transmitter
|
|
||||||
UART->UART_CR = UART_CR_RXEN | UART_CR_TXEN;
|
|
||||||
}
|
|
||||||
|
|
||||||
// A SW memory barrier, to ensure GCC does not overoptimize loops
|
|
||||||
#define sw_barrier() __asm__ volatile("": : :"memory");
|
|
||||||
static void TX(char c) {
|
|
||||||
while (!(UART->UART_SR & UART_SR_TXRDY)) { WDT_Restart(WDT); sw_barrier(); };
|
|
||||||
UART->UART_THR = c;
|
|
||||||
}
|
|
||||||
|
|
||||||
void install_min_serial() {
|
|
||||||
HAL_min_serial_init = &TXBegin;
|
|
||||||
HAL_min_serial_out = &TX;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if DISABLED(DYNAMIC_VECTORTABLE)
|
|
||||||
extern "C" {
|
|
||||||
__attribute__((naked)) void JumpHandler_ASM() {
|
|
||||||
__asm__ __volatile__ (
|
|
||||||
"b CommonHandler_ASM\n"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
void __attribute__((naked, alias("JumpHandler_ASM"))) HardFault_Handler();
|
|
||||||
void __attribute__((naked, alias("JumpHandler_ASM"))) BusFault_Handler();
|
|
||||||
void __attribute__((naked, alias("JumpHandler_ASM"))) UsageFault_Handler();
|
|
||||||
void __attribute__((naked, alias("JumpHandler_ASM"))) MemManage_Handler();
|
|
||||||
void __attribute__((naked, alias("JumpHandler_ASM"))) NMI_Handler();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // POSTMORTEM_DEBUGGING
|
|
||||||
#endif // ARDUINO_ARCH_SAM
|
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* HAL for Arduino Due and compatible (SAM3X8E)
|
* Description: HAL for Arduino Due and compatible (SAM3X8E)
|
||||||
*
|
*
|
||||||
* For ARDUINO_ARCH_SAM
|
* For ARDUINO_ARCH_SAM
|
||||||
*/
|
*/
|
||||||
@@ -69,10 +69,10 @@
|
|||||||
|
|
||||||
// run at ~8 .. ~10Mhz - Tx version (Rx data discarded)
|
// run at ~8 .. ~10Mhz - Tx version (Rx data discarded)
|
||||||
static uint8_t spiTransferTx0(uint8_t bout) { // using Mode 0
|
static uint8_t spiTransferTx0(uint8_t bout) { // using Mode 0
|
||||||
uint32_t MOSI_PORT_PLUS30 = ((uint32_t) PORT(SD_MOSI_PIN)) + 0x30; /* SODR of port */
|
uint32_t MOSI_PORT_PLUS30 = ((uint32_t) PORT(MOSI_PIN)) + 0x30; /* SODR of port */
|
||||||
uint32_t MOSI_MASK = PIN_MASK(SD_MOSI_PIN);
|
uint32_t MOSI_MASK = PIN_MASK(MOSI_PIN);
|
||||||
uint32_t SCK_PORT_PLUS30 = ((uint32_t) PORT(SD_SCK_PIN)) + 0x30; /* SODR of port */
|
uint32_t SCK_PORT_PLUS30 = ((uint32_t) PORT(SCK_PIN)) + 0x30; /* SODR of port */
|
||||||
uint32_t SCK_MASK = PIN_MASK(SD_SCK_PIN);
|
uint32_t SCK_MASK = PIN_MASK(SCK_PIN);
|
||||||
uint32_t idx = 0;
|
uint32_t idx = 0;
|
||||||
|
|
||||||
/* Negate bout, as the assembler requires a negated value */
|
/* Negate bout, as the assembler requires a negated value */
|
||||||
@@ -154,9 +154,9 @@
|
|||||||
static uint8_t spiTransferRx0(uint8_t) { // using Mode 0
|
static uint8_t spiTransferRx0(uint8_t) { // using Mode 0
|
||||||
uint32_t bin = 0;
|
uint32_t bin = 0;
|
||||||
uint32_t work = 0;
|
uint32_t work = 0;
|
||||||
uint32_t BITBAND_MISO_PORT = BITBAND_ADDRESS( ((uint32_t)PORT(SD_MISO_PIN))+0x3C, PIN_SHIFT(SD_MISO_PIN)); /* PDSR of port in bitband area */
|
uint32_t BITBAND_MISO_PORT = BITBAND_ADDRESS( ((uint32_t)PORT(MISO_PIN))+0x3C, PIN_SHIFT(MISO_PIN)); /* PDSR of port in bitband area */
|
||||||
uint32_t SCK_PORT_PLUS30 = ((uint32_t) PORT(SD_SCK_PIN)) + 0x30; /* SODR of port */
|
uint32_t SCK_PORT_PLUS30 = ((uint32_t) PORT(SCK_PIN)) + 0x30; /* SODR of port */
|
||||||
uint32_t SCK_MASK = PIN_MASK(SD_SCK_PIN);
|
uint32_t SCK_MASK = PIN_MASK(SCK_PIN);
|
||||||
|
|
||||||
/* The software SPI routine */
|
/* The software SPI routine */
|
||||||
__asm__ __volatile__(
|
__asm__ __volatile__(
|
||||||
@@ -225,36 +225,36 @@
|
|||||||
static uint8_t spiTransfer1(uint8_t b) { // using Mode 0
|
static uint8_t spiTransfer1(uint8_t b) { // using Mode 0
|
||||||
int bits = 8;
|
int bits = 8;
|
||||||
do {
|
do {
|
||||||
WRITE(SD_MOSI_PIN, b & 0x80);
|
WRITE(MOSI_PIN, b & 0x80);
|
||||||
b <<= 1; // little setup time
|
b <<= 1; // little setup time
|
||||||
|
|
||||||
WRITE(SD_SCK_PIN, HIGH);
|
WRITE(SCK_PIN, HIGH);
|
||||||
DELAY_NS(125); // 10 cycles @ 84mhz
|
DELAY_NS(125); // 10 cycles @ 84mhz
|
||||||
|
|
||||||
b |= (READ(SD_MISO_PIN) != 0);
|
b |= (READ(MISO_PIN) != 0);
|
||||||
|
|
||||||
WRITE(SD_SCK_PIN, LOW);
|
WRITE(SCK_PIN, LOW);
|
||||||
DELAY_NS(125); // 10 cycles @ 84mhz
|
DELAY_NS(125); // 10 cycles @ 84mhz
|
||||||
} while (--bits);
|
} while (--bits);
|
||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
|
|
||||||
// all the others
|
// all the others
|
||||||
static uint32_t spiDelayCyclesX4 = 4 * (F_CPU) / 1000000; // 4µs => 125khz
|
static uint32_t spiDelayCyclesX4 = (F_CPU) / 1000000; // 4µs => 125khz
|
||||||
|
|
||||||
static uint8_t spiTransferX(uint8_t b) { // using Mode 0
|
static uint8_t spiTransferX(uint8_t b) { // using Mode 0
|
||||||
int bits = 8;
|
int bits = 8;
|
||||||
do {
|
do {
|
||||||
WRITE(SD_MOSI_PIN, b & 0x80);
|
WRITE(MOSI_PIN, b & 0x80);
|
||||||
b <<= 1; // little setup time
|
b <<= 1; // little setup time
|
||||||
|
|
||||||
WRITE(SD_SCK_PIN, HIGH);
|
WRITE(SCK_PIN, HIGH);
|
||||||
DELAY_CYCLES(spiDelayCyclesX4);
|
__delay_4cycles(spiDelayCyclesX4);
|
||||||
|
|
||||||
b |= (READ(SD_MISO_PIN) != 0);
|
b |= (READ(MISO_PIN) != 0);
|
||||||
|
|
||||||
WRITE(SD_SCK_PIN, LOW);
|
WRITE(SCK_PIN, LOW);
|
||||||
DELAY_CYCLES(spiDelayCyclesX4);
|
__delay_4cycles(spiDelayCyclesX4);
|
||||||
} while (--bits);
|
} while (--bits);
|
||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
@@ -271,10 +271,10 @@
|
|||||||
|
|
||||||
// Block transfers run at ~8 .. ~10Mhz - Tx version (Rx data discarded)
|
// Block transfers run at ~8 .. ~10Mhz - Tx version (Rx data discarded)
|
||||||
static void spiTxBlock0(const uint8_t* ptr, uint32_t todo) {
|
static void spiTxBlock0(const uint8_t* ptr, uint32_t todo) {
|
||||||
uint32_t MOSI_PORT_PLUS30 = ((uint32_t) PORT(SD_MOSI_PIN)) + 0x30; /* SODR of port */
|
uint32_t MOSI_PORT_PLUS30 = ((uint32_t) PORT(MOSI_PIN)) + 0x30; /* SODR of port */
|
||||||
uint32_t MOSI_MASK = PIN_MASK(SD_MOSI_PIN);
|
uint32_t MOSI_MASK = PIN_MASK(MOSI_PIN);
|
||||||
uint32_t SCK_PORT_PLUS30 = ((uint32_t) PORT(SD_SCK_PIN)) + 0x30; /* SODR of port */
|
uint32_t SCK_PORT_PLUS30 = ((uint32_t) PORT(SCK_PIN)) + 0x30; /* SODR of port */
|
||||||
uint32_t SCK_MASK = PIN_MASK(SD_SCK_PIN);
|
uint32_t SCK_MASK = PIN_MASK(SCK_PIN);
|
||||||
uint32_t work = 0;
|
uint32_t work = 0;
|
||||||
uint32_t txval = 0;
|
uint32_t txval = 0;
|
||||||
|
|
||||||
@@ -352,9 +352,9 @@
|
|||||||
static void spiRxBlock0(uint8_t* ptr, uint32_t todo) {
|
static void spiRxBlock0(uint8_t* ptr, uint32_t todo) {
|
||||||
uint32_t bin = 0;
|
uint32_t bin = 0;
|
||||||
uint32_t work = 0;
|
uint32_t work = 0;
|
||||||
uint32_t BITBAND_MISO_PORT = BITBAND_ADDRESS( ((uint32_t)PORT(SD_MISO_PIN))+0x3C, PIN_SHIFT(SD_MISO_PIN)); /* PDSR of port in bitband area */
|
uint32_t BITBAND_MISO_PORT = BITBAND_ADDRESS( ((uint32_t)PORT(MISO_PIN))+0x3C, PIN_SHIFT(MISO_PIN)); /* PDSR of port in bitband area */
|
||||||
uint32_t SCK_PORT_PLUS30 = ((uint32_t) PORT(SD_SCK_PIN)) + 0x30; /* SODR of port */
|
uint32_t SCK_PORT_PLUS30 = ((uint32_t) PORT(SCK_PIN)) + 0x30; /* SODR of port */
|
||||||
uint32_t SCK_MASK = PIN_MASK(SD_SCK_PIN);
|
uint32_t SCK_MASK = PIN_MASK(SCK_PIN);
|
||||||
|
|
||||||
/* The software SPI routine */
|
/* The software SPI routine */
|
||||||
__asm__ __volatile__(
|
__asm__ __volatile__(
|
||||||
@@ -442,22 +442,22 @@
|
|||||||
static pfnSpiRxBlock spiRxBlock = (pfnSpiRxBlock)spiRxBlockX;
|
static pfnSpiRxBlock spiRxBlock = (pfnSpiRxBlock)spiRxBlockX;
|
||||||
|
|
||||||
#if MB(ALLIGATOR)
|
#if MB(ALLIGATOR)
|
||||||
#define _SS_WRITE(S) WRITE(SD_SS_PIN, S)
|
#define _SS_WRITE(S) WRITE(SS_PIN, S)
|
||||||
#else
|
#else
|
||||||
#define _SS_WRITE(S) NOOP
|
#define _SS_WRITE(S) NOOP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void spiBegin() {
|
void spiBegin() {
|
||||||
SET_OUTPUT(SD_SS_PIN);
|
SET_OUTPUT(SS_PIN);
|
||||||
_SS_WRITE(HIGH);
|
_SS_WRITE(HIGH);
|
||||||
SET_OUTPUT(SD_SCK_PIN);
|
SET_OUTPUT(SCK_PIN);
|
||||||
SET_INPUT(SD_MISO_PIN);
|
SET_INPUT(MISO_PIN);
|
||||||
SET_OUTPUT(SD_MOSI_PIN);
|
SET_OUTPUT(MOSI_PIN);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t spiRec() {
|
uint8_t spiRec() {
|
||||||
_SS_WRITE(LOW);
|
_SS_WRITE(LOW);
|
||||||
WRITE(SD_MOSI_PIN, HIGH); // Output 1s 1
|
WRITE(MOSI_PIN, HIGH); // Output 1s 1
|
||||||
uint8_t b = spiTransferRx(0xFF);
|
uint8_t b = spiTransferRx(0xFF);
|
||||||
_SS_WRITE(HIGH);
|
_SS_WRITE(HIGH);
|
||||||
return b;
|
return b;
|
||||||
@@ -466,7 +466,7 @@
|
|||||||
void spiRead(uint8_t* buf, uint16_t nbyte) {
|
void spiRead(uint8_t* buf, uint16_t nbyte) {
|
||||||
if (nbyte) {
|
if (nbyte) {
|
||||||
_SS_WRITE(LOW);
|
_SS_WRITE(LOW);
|
||||||
WRITE(SD_MOSI_PIN, HIGH); // Output 1s 1
|
WRITE(MOSI_PIN, HIGH); // Output 1s 1
|
||||||
spiRxBlock(buf, nbyte);
|
spiRxBlock(buf, nbyte);
|
||||||
_SS_WRITE(HIGH);
|
_SS_WRITE(HIGH);
|
||||||
}
|
}
|
||||||
@@ -510,7 +510,7 @@
|
|||||||
spiRxBlock = (pfnSpiRxBlock)spiRxBlockX;
|
spiRxBlock = (pfnSpiRxBlock)spiRxBlockX;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
spiDelayCyclesX4 = ((F_CPU) / 1000000) >> (6 - spiRate) << 2; // spiRate of 2 gives the maximum error with current CPU
|
spiDelayCyclesX4 = ((F_CPU) / 1000000) >> (6 - spiRate);
|
||||||
spiTransferTx = (pfnSpiTransfer)spiTransferX;
|
spiTransferTx = (pfnSpiTransfer)spiTransferX;
|
||||||
spiTransferRx = (pfnSpiTransfer)spiTransferX;
|
spiTransferRx = (pfnSpiTransfer)spiTransferX;
|
||||||
spiTxBlock = (pfnSpiTxBlock)spiTxBlockX;
|
spiTxBlock = (pfnSpiTxBlock)spiTxBlockX;
|
||||||
@@ -519,8 +519,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
_SS_WRITE(HIGH);
|
_SS_WRITE(HIGH);
|
||||||
WRITE(SD_MOSI_PIN, HIGH);
|
WRITE(MOSI_PIN, HIGH);
|
||||||
WRITE(SD_SCK_PIN, LOW);
|
WRITE(SCK_PIN, LOW);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Begin SPI transaction, set clock, bit order, data mode */
|
/** Begin SPI transaction, set clock, bit order, data mode */
|
||||||
@@ -575,27 +575,27 @@
|
|||||||
|
|
||||||
// Configure SPI pins
|
// Configure SPI pins
|
||||||
PIO_Configure(
|
PIO_Configure(
|
||||||
g_APinDescription[SD_SCK_PIN].pPort,
|
g_APinDescription[SCK_PIN].pPort,
|
||||||
g_APinDescription[SD_SCK_PIN].ulPinType,
|
g_APinDescription[SCK_PIN].ulPinType,
|
||||||
g_APinDescription[SD_SCK_PIN].ulPin,
|
g_APinDescription[SCK_PIN].ulPin,
|
||||||
g_APinDescription[SD_SCK_PIN].ulPinConfiguration);
|
g_APinDescription[SCK_PIN].ulPinConfiguration);
|
||||||
PIO_Configure(
|
PIO_Configure(
|
||||||
g_APinDescription[SD_MOSI_PIN].pPort,
|
g_APinDescription[MOSI_PIN].pPort,
|
||||||
g_APinDescription[SD_MOSI_PIN].ulPinType,
|
g_APinDescription[MOSI_PIN].ulPinType,
|
||||||
g_APinDescription[SD_MOSI_PIN].ulPin,
|
g_APinDescription[MOSI_PIN].ulPin,
|
||||||
g_APinDescription[SD_MOSI_PIN].ulPinConfiguration);
|
g_APinDescription[MOSI_PIN].ulPinConfiguration);
|
||||||
PIO_Configure(
|
PIO_Configure(
|
||||||
g_APinDescription[SD_MISO_PIN].pPort,
|
g_APinDescription[MISO_PIN].pPort,
|
||||||
g_APinDescription[SD_MISO_PIN].ulPinType,
|
g_APinDescription[MISO_PIN].ulPinType,
|
||||||
g_APinDescription[SD_MISO_PIN].ulPin,
|
g_APinDescription[MISO_PIN].ulPin,
|
||||||
g_APinDescription[SD_MISO_PIN].ulPinConfiguration);
|
g_APinDescription[MISO_PIN].ulPinConfiguration);
|
||||||
|
|
||||||
// set master mode, peripheral select, fault detection
|
// set master mode, peripheral select, fault detection
|
||||||
SPI_Configure(SPI0, ID_SPI0, SPI_MR_MSTR | SPI_MR_MODFDIS | SPI_MR_PS);
|
SPI_Configure(SPI0, ID_SPI0, SPI_MR_MSTR | SPI_MR_MODFDIS | SPI_MR_PS);
|
||||||
SPI_Enable(SPI0);
|
SPI_Enable(SPI0);
|
||||||
|
|
||||||
SET_OUTPUT(DAC0_SYNC);
|
SET_OUTPUT(DAC0_SYNC);
|
||||||
#if HAS_MULTI_EXTRUDER
|
#if EXTRUDERS > 1
|
||||||
SET_OUTPUT(DAC1_SYNC);
|
SET_OUTPUT(DAC1_SYNC);
|
||||||
WRITE(DAC1_SYNC, HIGH);
|
WRITE(DAC1_SYNC, HIGH);
|
||||||
#endif
|
#endif
|
||||||
@@ -606,7 +606,7 @@
|
|||||||
WRITE(SPI_EEPROM1_CS, HIGH);
|
WRITE(SPI_EEPROM1_CS, HIGH);
|
||||||
WRITE(SPI_EEPROM2_CS, HIGH);
|
WRITE(SPI_EEPROM2_CS, HIGH);
|
||||||
WRITE(SPI_FLASH_CS, HIGH);
|
WRITE(SPI_FLASH_CS, HIGH);
|
||||||
WRITE(SD_SS_PIN, HIGH);
|
WRITE(SS_PIN, HIGH);
|
||||||
|
|
||||||
OUT_WRITE(SDSS, LOW);
|
OUT_WRITE(SDSS, LOW);
|
||||||
|
|
||||||
@@ -759,6 +759,7 @@
|
|||||||
*
|
*
|
||||||
* All of the above can be avoided by defining FORCE_SOFT_SPI to force the
|
* All of the above can be avoided by defining FORCE_SOFT_SPI to force the
|
||||||
* display to use software SPI.
|
* display to use software SPI.
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void spiInit(uint8_t spiRate=6) { // Default to slowest rate if not specified)
|
void spiInit(uint8_t spiRate=6) { // Default to slowest rate if not specified)
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -382,7 +382,7 @@ void MarlinSerial<Cfg>::flush() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename Cfg>
|
template<typename Cfg>
|
||||||
size_t MarlinSerial<Cfg>::write(const uint8_t c) {
|
void MarlinSerial<Cfg>::write(const uint8_t c) {
|
||||||
_written = true;
|
_written = true;
|
||||||
|
|
||||||
if (Cfg::TX_SIZE == 0) {
|
if (Cfg::TX_SIZE == 0) {
|
||||||
@@ -400,7 +400,7 @@ size_t MarlinSerial<Cfg>::write(const uint8_t c) {
|
|||||||
// XOFF char at the RX isr, but it is properly handled there
|
// XOFF char at the RX isr, but it is properly handled there
|
||||||
if (!(HWUART->UART_IMR & UART_IMR_TXRDY) && (HWUART->UART_SR & UART_SR_TXRDY)) {
|
if (!(HWUART->UART_IMR & UART_IMR_TXRDY) && (HWUART->UART_SR & UART_SR_TXRDY)) {
|
||||||
HWUART->UART_THR = c;
|
HWUART->UART_THR = c;
|
||||||
return 1;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const uint8_t i = (tx_buffer.head + 1) & (Cfg::TX_SIZE - 1);
|
const uint8_t i = (tx_buffer.head + 1) & (Cfg::TX_SIZE - 1);
|
||||||
@@ -428,7 +428,6 @@ size_t MarlinSerial<Cfg>::write(const uint8_t c) {
|
|||||||
// Enable TX isr - Non atomic, but it will eventually enable TX isr
|
// Enable TX isr - Non atomic, but it will eventually enable TX isr
|
||||||
HWUART->UART_IER = UART_IER_TXRDY;
|
HWUART->UART_IER = UART_IER_TXRDY;
|
||||||
}
|
}
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename Cfg>
|
template<typename Cfg>
|
||||||
@@ -474,16 +473,169 @@ void MarlinSerial<Cfg>::flushTX() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Imports from print.h
|
||||||
|
*/
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::print(char c, int base) {
|
||||||
|
print((long)c, base);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::print(unsigned char b, int base) {
|
||||||
|
print((unsigned long)b, base);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::print(int n, int base) {
|
||||||
|
print((long)n, base);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::print(unsigned int n, int base) {
|
||||||
|
print((unsigned long)n, base);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::print(long n, int base) {
|
||||||
|
if (base == 0) write(n);
|
||||||
|
else if (base == 10) {
|
||||||
|
if (n < 0) { print('-'); n = -n; }
|
||||||
|
printNumber(n, 10);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
printNumber(n, base);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::print(unsigned long n, int base) {
|
||||||
|
if (base == 0) write(n);
|
||||||
|
else printNumber(n, base);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::print(double n, int digits) {
|
||||||
|
printFloat(n, digits);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::println() {
|
||||||
|
print('\r');
|
||||||
|
print('\n');
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::println(const String& s) {
|
||||||
|
print(s);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::println(const char c[]) {
|
||||||
|
print(c);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::println(char c, int base) {
|
||||||
|
print(c, base);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::println(unsigned char b, int base) {
|
||||||
|
print(b, base);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::println(int n, int base) {
|
||||||
|
print(n, base);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::println(unsigned int n, int base) {
|
||||||
|
print(n, base);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::println(long n, int base) {
|
||||||
|
print(n, base);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::println(unsigned long n, int base) {
|
||||||
|
print(n, base);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::println(double n, int digits) {
|
||||||
|
print(n, digits);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Private Methods
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::printNumber(unsigned long n, uint8_t base) {
|
||||||
|
if (n) {
|
||||||
|
unsigned char buf[8 * sizeof(long)]; // Enough space for base 2
|
||||||
|
int8_t i = 0;
|
||||||
|
while (n) {
|
||||||
|
buf[i++] = n % base;
|
||||||
|
n /= base;
|
||||||
|
}
|
||||||
|
while (i--)
|
||||||
|
print((char)(buf[i] + (buf[i] < 10 ? '0' : 'A' - 10)));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
print('0');
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Cfg>
|
||||||
|
void MarlinSerial<Cfg>::printFloat(double number, uint8_t digits) {
|
||||||
|
// Handle negative numbers
|
||||||
|
if (number < 0.0) {
|
||||||
|
print('-');
|
||||||
|
number = -number;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Round correctly so that print(1.999, 2) prints as "2.00"
|
||||||
|
double rounding = 0.5;
|
||||||
|
LOOP_L_N(i, digits) rounding *= 0.1;
|
||||||
|
number += rounding;
|
||||||
|
|
||||||
|
// Extract the integer part of the number and print it
|
||||||
|
unsigned long int_part = (unsigned long)number;
|
||||||
|
double remainder = number - (double)int_part;
|
||||||
|
print(int_part);
|
||||||
|
|
||||||
|
// Print the decimal point, but only if there are digits beyond
|
||||||
|
if (digits) {
|
||||||
|
print('.');
|
||||||
|
// Extract digits from the remainder one at a time
|
||||||
|
while (digits--) {
|
||||||
|
remainder *= 10.0;
|
||||||
|
int toPrint = int(remainder);
|
||||||
|
print(toPrint);
|
||||||
|
remainder -= toPrint;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// If not using the USB port as serial port
|
// If not using the USB port as serial port
|
||||||
#if SERIAL_PORT >= 0
|
#if SERIAL_PORT >= 0
|
||||||
template class MarlinSerial< MarlinSerialCfg<SERIAL_PORT> >;
|
template class MarlinSerial<MarlinSerialCfg<SERIAL_PORT>>; // Define
|
||||||
MSerialT customizedSerial1(MarlinSerialCfg<SERIAL_PORT>::EMERGENCYPARSER);
|
MarlinSerial<MarlinSerialCfg<SERIAL_PORT>> customizedSerial1; // Instantiate
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(SERIAL_PORT_2) && SERIAL_PORT_2 >= 0
|
#if defined(SERIAL_PORT_2) && SERIAL_PORT_2 >= 0
|
||||||
template class MarlinSerial< MarlinSerialCfg<SERIAL_PORT_2> >;
|
template class MarlinSerial<MarlinSerialCfg<SERIAL_PORT_2>>; // Define
|
||||||
MSerialT2 customizedSerial2(MarlinSerialCfg<SERIAL_PORT_2>::EMERGENCYPARSER);
|
MarlinSerial<MarlinSerialCfg<SERIAL_PORT_2>> customizedSerial2; // Instantiate
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // ARDUINO_ARCH_SAM
|
#endif // ARDUINO_ARCH_SAM
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
@@ -30,7 +30,11 @@
|
|||||||
#include <WString.h>
|
#include <WString.h>
|
||||||
|
|
||||||
#include "../../inc/MarlinConfigPre.h"
|
#include "../../inc/MarlinConfigPre.h"
|
||||||
#include "../../core/serial_hook.h"
|
|
||||||
|
#define DEC 10
|
||||||
|
#define HEX 16
|
||||||
|
#define OCT 8
|
||||||
|
#define BIN 2
|
||||||
|
|
||||||
// Define constants and variables for buffering incoming serial data. We're
|
// 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
|
// using a ring buffer (I think), in which rx_buffer_head is the index of the
|
||||||
@@ -115,15 +119,42 @@ public:
|
|||||||
static int read();
|
static int read();
|
||||||
static void flush();
|
static void flush();
|
||||||
static ring_buffer_pos_t available();
|
static ring_buffer_pos_t available();
|
||||||
static size_t write(const uint8_t c);
|
static void write(const uint8_t c);
|
||||||
static void flushTX();
|
static void flushTX();
|
||||||
|
|
||||||
static inline bool emergency_parser_enabled() { return Cfg::EMERGENCYPARSER; }
|
|
||||||
|
|
||||||
FORCE_INLINE static uint8_t dropped() { return Cfg::DROPPED_RX ? rx_dropped_bytes : 0; }
|
FORCE_INLINE static uint8_t dropped() { return Cfg::DROPPED_RX ? rx_dropped_bytes : 0; }
|
||||||
FORCE_INLINE static uint8_t buffer_overruns() { return Cfg::RX_OVERRUNS ? rx_buffer_overruns : 0; }
|
FORCE_INLINE static uint8_t buffer_overruns() { return Cfg::RX_OVERRUNS ? rx_buffer_overruns : 0; }
|
||||||
FORCE_INLINE static uint8_t framing_errors() { return Cfg::RX_FRAMING_ERRORS ? rx_framing_errors : 0; }
|
FORCE_INLINE static uint8_t framing_errors() { return Cfg::RX_FRAMING_ERRORS ? rx_framing_errors : 0; }
|
||||||
FORCE_INLINE static ring_buffer_pos_t rxMaxEnqueued() { return Cfg::MAX_RX_QUEUED ? rx_max_enqueued : 0; }
|
FORCE_INLINE static ring_buffer_pos_t rxMaxEnqueued() { return Cfg::MAX_RX_QUEUED ? rx_max_enqueued : 0; }
|
||||||
|
|
||||||
|
FORCE_INLINE static void write(const char* str) { while (*str) write(*str++); }
|
||||||
|
FORCE_INLINE static void write(const uint8_t* buffer, size_t size) { while (size--) write(*buffer++); }
|
||||||
|
FORCE_INLINE static void print(const String& s) { for (int i = 0; i < (int)s.length(); i++) write(s[i]); }
|
||||||
|
FORCE_INLINE static void print(const char* str) { write(str); }
|
||||||
|
|
||||||
|
static void print(char, int = 0);
|
||||||
|
static void print(unsigned char, int = 0);
|
||||||
|
static void print(int, int = DEC);
|
||||||
|
static void print(unsigned int, int = DEC);
|
||||||
|
static void print(long, int = DEC);
|
||||||
|
static void print(unsigned long, int = DEC);
|
||||||
|
static void print(double, int = 2);
|
||||||
|
|
||||||
|
static void println(const String& s);
|
||||||
|
static void println(const char[]);
|
||||||
|
static void println(char, int = 0);
|
||||||
|
static void println(unsigned char, int = 0);
|
||||||
|
static void println(int, int = DEC);
|
||||||
|
static void println(unsigned int, int = DEC);
|
||||||
|
static void println(long, int = DEC);
|
||||||
|
static void println(unsigned long, int = DEC);
|
||||||
|
static void println(double, int = 2);
|
||||||
|
static void println();
|
||||||
|
operator bool() { return true; }
|
||||||
|
|
||||||
|
private:
|
||||||
|
static void printNumber(unsigned long, const uint8_t);
|
||||||
|
static void printFloat(double, uint8_t);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Serial port configuration
|
// Serial port configuration
|
||||||
@@ -141,11 +172,9 @@ struct MarlinSerialCfg {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#if SERIAL_PORT >= 0
|
#if SERIAL_PORT >= 0
|
||||||
typedef Serial1Class< MarlinSerial< MarlinSerialCfg<SERIAL_PORT> > > MSerialT;
|
extern MarlinSerial<MarlinSerialCfg<SERIAL_PORT>> customizedSerial1;
|
||||||
extern MSerialT customizedSerial1;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(SERIAL_PORT_2) && SERIAL_PORT_2 >= 0
|
#if defined(SERIAL_PORT_2) && SERIAL_PORT_2 >= 0
|
||||||
typedef Serial1Class< MarlinSerial< MarlinSerialCfg<SERIAL_PORT_2> > > MSerialT2;
|
extern MarlinSerial<MarlinSerialCfg<SERIAL_PORT_2>> customizedSerial2;
|
||||||
extern MSerialT2 customizedSerial2;
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -33,6 +33,10 @@
|
|||||||
|
|
||||||
#include "MarlinSerialUSB.h"
|
#include "MarlinSerialUSB.h"
|
||||||
|
|
||||||
|
#if ENABLED(EMERGENCY_PARSER)
|
||||||
|
#include "../../feature/e_parser.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
// Imports from Atmel USB Stack/CDC implementation
|
// Imports from Atmel USB Stack/CDC implementation
|
||||||
extern "C" {
|
extern "C" {
|
||||||
bool usb_task_cdc_isenabled();
|
bool usb_task_cdc_isenabled();
|
||||||
@@ -46,6 +50,10 @@ extern "C" {
|
|||||||
// Pending character
|
// Pending character
|
||||||
static int pending_char = -1;
|
static int pending_char = -1;
|
||||||
|
|
||||||
|
#if ENABLED(EMERGENCY_PARSER)
|
||||||
|
static EmergencyParser::State emergency_state; // = EP_RESET
|
||||||
|
#endif
|
||||||
|
|
||||||
// Public Methods
|
// Public Methods
|
||||||
void MarlinSerialUSB::begin(const long) {}
|
void MarlinSerialUSB::begin(const long) {}
|
||||||
|
|
||||||
@@ -65,7 +73,9 @@ int MarlinSerialUSB::peek() {
|
|||||||
|
|
||||||
pending_char = udi_cdc_getc();
|
pending_char = udi_cdc_getc();
|
||||||
|
|
||||||
TERN_(EMERGENCY_PARSER, emergency_parser.update(static_cast<MSerialT*>(this)->emergency_state, (char)pending_char));
|
#if ENABLED(EMERGENCY_PARSER)
|
||||||
|
emergency_parser.update(emergency_state, (char)pending_char);
|
||||||
|
#endif
|
||||||
|
|
||||||
return pending_char;
|
return pending_char;
|
||||||
}
|
}
|
||||||
@@ -87,27 +97,31 @@ int MarlinSerialUSB::read() {
|
|||||||
|
|
||||||
int c = udi_cdc_getc();
|
int c = udi_cdc_getc();
|
||||||
|
|
||||||
TERN_(EMERGENCY_PARSER, emergency_parser.update(static_cast<MSerialT*>(this)->emergency_state, (char)c));
|
#if ENABLED(EMERGENCY_PARSER)
|
||||||
|
emergency_parser.update(emergency_state, (char)c);
|
||||||
|
#endif
|
||||||
|
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
int MarlinSerialUSB::available() {
|
bool MarlinSerialUSB::available() {
|
||||||
if (pending_char > 0) return pending_char;
|
/* If Pending chars */
|
||||||
return pending_char == 0 ||
|
return pending_char >= 0 ||
|
||||||
// or USB CDC enumerated and configured on the PC side and some bytes where sent to us */
|
/* or USB CDC enumerated and configured on the PC side and some
|
||||||
(usb_task_cdc_isenabled() && udi_cdc_is_rx_ready());
|
bytes where sent to us */
|
||||||
|
(usb_task_cdc_isenabled() && udi_cdc_is_rx_ready());
|
||||||
}
|
}
|
||||||
|
|
||||||
void MarlinSerialUSB::flush() { }
|
void MarlinSerialUSB::flush() { }
|
||||||
|
void MarlinSerialUSB::flushTX() { }
|
||||||
|
|
||||||
size_t MarlinSerialUSB::write(const uint8_t c) {
|
void MarlinSerialUSB::write(const uint8_t c) {
|
||||||
|
|
||||||
/* Do not even bother sending anything if USB CDC is not enumerated
|
/* Do not even bother sending anything if USB CDC is not enumerated
|
||||||
or not configured on the PC side or there is no program on the PC
|
or not configured on the PC side or there is no program on the PC
|
||||||
listening to our messages */
|
listening to our messages */
|
||||||
if (!usb_task_cdc_isenabled() || !usb_task_cdc_dtr_active())
|
if (!usb_task_cdc_isenabled() || !usb_task_cdc_dtr_active())
|
||||||
return 0;
|
return;
|
||||||
|
|
||||||
/* Wait until the PC has read the pending to be sent data */
|
/* Wait until the PC has read the pending to be sent data */
|
||||||
while (usb_task_cdc_isenabled() &&
|
while (usb_task_cdc_isenabled() &&
|
||||||
@@ -119,20 +133,161 @@ size_t MarlinSerialUSB::write(const uint8_t c) {
|
|||||||
or not configured on the PC side or there is no program on the PC
|
or not configured on the PC side or there is no program on the PC
|
||||||
listening to our messages at this point */
|
listening to our messages at this point */
|
||||||
if (!usb_task_cdc_isenabled() || !usb_task_cdc_dtr_active())
|
if (!usb_task_cdc_isenabled() || !usb_task_cdc_dtr_active())
|
||||||
return 0;
|
return;
|
||||||
|
|
||||||
// Fifo full
|
// Fifo full
|
||||||
// udi_cdc_signal_overrun();
|
// udi_cdc_signal_overrun();
|
||||||
udi_cdc_putc(c);
|
udi_cdc_putc(c);
|
||||||
return 1;
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Imports from print.h
|
||||||
|
*/
|
||||||
|
|
||||||
|
void MarlinSerialUSB::print(char c, int base) {
|
||||||
|
print((long)c, base);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MarlinSerialUSB::print(unsigned char b, int base) {
|
||||||
|
print((unsigned long)b, base);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MarlinSerialUSB::print(int n, int base) {
|
||||||
|
print((long)n, base);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MarlinSerialUSB::print(unsigned int n, int base) {
|
||||||
|
print((unsigned long)n, base);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MarlinSerialUSB::print(long n, int base) {
|
||||||
|
if (base == 0)
|
||||||
|
write(n);
|
||||||
|
else if (base == 10) {
|
||||||
|
if (n < 0) {
|
||||||
|
print('-');
|
||||||
|
n = -n;
|
||||||
|
}
|
||||||
|
printNumber(n, 10);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
printNumber(n, base);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MarlinSerialUSB::print(unsigned long n, int base) {
|
||||||
|
if (base == 0) write(n);
|
||||||
|
else printNumber(n, base);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MarlinSerialUSB::print(double n, int digits) {
|
||||||
|
printFloat(n, digits);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MarlinSerialUSB::println() {
|
||||||
|
print('\r');
|
||||||
|
print('\n');
|
||||||
|
}
|
||||||
|
|
||||||
|
void MarlinSerialUSB::println(const String& s) {
|
||||||
|
print(s);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MarlinSerialUSB::println(const char c[]) {
|
||||||
|
print(c);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MarlinSerialUSB::println(char c, int base) {
|
||||||
|
print(c, base);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MarlinSerialUSB::println(unsigned char b, int base) {
|
||||||
|
print(b, base);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MarlinSerialUSB::println(int n, int base) {
|
||||||
|
print(n, base);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MarlinSerialUSB::println(unsigned int n, int base) {
|
||||||
|
print(n, base);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MarlinSerialUSB::println(long n, int base) {
|
||||||
|
print(n, base);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MarlinSerialUSB::println(unsigned long n, int base) {
|
||||||
|
print(n, base);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MarlinSerialUSB::println(double n, int digits) {
|
||||||
|
print(n, digits);
|
||||||
|
println();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Private Methods
|
||||||
|
|
||||||
|
void MarlinSerialUSB::printNumber(unsigned long n, uint8_t base) {
|
||||||
|
if (n) {
|
||||||
|
unsigned char buf[8 * sizeof(long)]; // Enough space for base 2
|
||||||
|
int8_t i = 0;
|
||||||
|
while (n) {
|
||||||
|
buf[i++] = n % base;
|
||||||
|
n /= base;
|
||||||
|
}
|
||||||
|
while (i--)
|
||||||
|
print((char)(buf[i] + (buf[i] < 10 ? '0' : 'A' - 10)));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
print('0');
|
||||||
|
}
|
||||||
|
|
||||||
|
void MarlinSerialUSB::printFloat(double number, uint8_t digits) {
|
||||||
|
// Handle negative numbers
|
||||||
|
if (number < 0.0) {
|
||||||
|
print('-');
|
||||||
|
number = -number;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Round correctly so that print(1.999, 2) prints as "2.00"
|
||||||
|
double rounding = 0.5;
|
||||||
|
LOOP_L_N(i, digits)
|
||||||
|
rounding *= 0.1;
|
||||||
|
|
||||||
|
number += rounding;
|
||||||
|
|
||||||
|
// Extract the integer part of the number and print it
|
||||||
|
unsigned long int_part = (unsigned long)number;
|
||||||
|
double remainder = number - (double)int_part;
|
||||||
|
print(int_part);
|
||||||
|
|
||||||
|
// Print the decimal point, but only if there are digits beyond
|
||||||
|
if (digits) {
|
||||||
|
print('.');
|
||||||
|
// Extract digits from the remainder one at a time
|
||||||
|
while (digits--) {
|
||||||
|
remainder *= 10.0;
|
||||||
|
int toPrint = int(remainder);
|
||||||
|
print(toPrint);
|
||||||
|
remainder -= toPrint;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Preinstantiate
|
// Preinstantiate
|
||||||
#if SERIAL_PORT == -1
|
#if SERIAL_PORT == -1
|
||||||
MSerialT customizedSerial1(TERN0(EMERGENCY_PARSER, true));
|
MarlinSerialUSB customizedSerial1;
|
||||||
#endif
|
#endif
|
||||||
#if SERIAL_PORT_2 == -1
|
#if SERIAL_PORT_2 == -1
|
||||||
MSerialT customizedSerial2(TERN0(EMERGENCY_PARSER, true));
|
MarlinSerialUSB customizedSerial2;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // HAS_USB_SERIAL
|
#endif // HAS_USB_SERIAL
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
@@ -27,37 +27,73 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../../inc/MarlinConfig.h"
|
#include "../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
#if HAS_USB_SERIAL
|
#if HAS_USB_SERIAL
|
||||||
|
|
||||||
#include <WString.h>
|
#include <WString.h>
|
||||||
#include "../../core/serial_hook.h"
|
|
||||||
|
|
||||||
|
#define DEC 10
|
||||||
|
#define HEX 16
|
||||||
|
#define OCT 8
|
||||||
|
#define BIN 2
|
||||||
|
|
||||||
struct MarlinSerialUSB {
|
class MarlinSerialUSB {
|
||||||
void begin(const long);
|
|
||||||
void end();
|
public:
|
||||||
int peek();
|
MarlinSerialUSB() {};
|
||||||
int read();
|
static void begin(const long);
|
||||||
void flush();
|
static void end();
|
||||||
int available();
|
static int peek();
|
||||||
size_t write(const uint8_t c);
|
static int read();
|
||||||
|
static void flush();
|
||||||
|
static void flushTX();
|
||||||
|
static bool available();
|
||||||
|
static void write(const uint8_t c);
|
||||||
|
|
||||||
#if ENABLED(SERIAL_STATS_DROPPED_RX)
|
#if ENABLED(SERIAL_STATS_DROPPED_RX)
|
||||||
FORCE_INLINE uint32_t dropped() { return 0; }
|
FORCE_INLINE static uint32_t dropped() { return 0; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
|
#if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
|
||||||
FORCE_INLINE int rxMaxEnqueued() { return 0; }
|
FORCE_INLINE static int rxMaxEnqueued() { return 0; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
FORCE_INLINE static void write(const char* str) { while (*str) write(*str++); }
|
||||||
|
FORCE_INLINE static void write(const uint8_t* buffer, size_t size) { while (size--) write(*buffer++); }
|
||||||
|
FORCE_INLINE static void print(const String& s) { for (int i = 0; i < (int)s.length(); i++) write(s[i]); }
|
||||||
|
FORCE_INLINE static void print(const char* str) { write(str); }
|
||||||
|
|
||||||
|
static void print(char, int = 0);
|
||||||
|
static void print(unsigned char, int = 0);
|
||||||
|
static void print(int, int = DEC);
|
||||||
|
static void print(unsigned int, int = DEC);
|
||||||
|
static void print(long, int = DEC);
|
||||||
|
static void print(unsigned long, int = DEC);
|
||||||
|
static void print(double, int = 2);
|
||||||
|
|
||||||
|
static void println(const String& s);
|
||||||
|
static void println(const char[]);
|
||||||
|
static void println(char, int = 0);
|
||||||
|
static void println(unsigned char, int = 0);
|
||||||
|
static void println(int, int = DEC);
|
||||||
|
static void println(unsigned int, int = DEC);
|
||||||
|
static void println(long, int = DEC);
|
||||||
|
static void println(unsigned long, int = DEC);
|
||||||
|
static void println(double, int = 2);
|
||||||
|
static void println();
|
||||||
|
operator bool() { return true; }
|
||||||
|
|
||||||
|
private:
|
||||||
|
static void printNumber(unsigned long, const uint8_t);
|
||||||
|
static void printFloat(double, uint8_t);
|
||||||
};
|
};
|
||||||
typedef Serial1Class<MarlinSerialUSB> MSerialT;
|
|
||||||
|
|
||||||
#if SERIAL_PORT == -1
|
#if SERIAL_PORT == -1
|
||||||
extern MSerialT customizedSerial1;
|
extern MarlinSerialUSB customizedSerial1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if SERIAL_PORT_2 == -1
|
#if SERIAL_PORT_2 == -1
|
||||||
extern MSerialT customizedSerial2;
|
extern MarlinSerialUSB customizedSerial2;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // HAS_USB_SERIAL
|
#endif // HAS_USB_SERIAL
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -44,6 +44,7 @@
|
|||||||
|
|
||||||
#if HAS_SERVOS
|
#if HAS_SERVOS
|
||||||
|
|
||||||
|
#include "../shared/Marduino.h"
|
||||||
#include "../shared/servo.h"
|
#include "../shared/servo.h"
|
||||||
#include "../shared/servo_private.h"
|
#include "../shared/servo_private.h"
|
||||||
|
|
||||||
|
|||||||
@@ -18,19 +18,20 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description: Tone function for Arduino Due and compatible (SAM3X8E)
|
* Description: Tone function for Arduino Due and compatible (SAM3X8E)
|
||||||
* Derived from https://forum.arduino.cc/index.php?topic=136500.msg2903012#msg2903012
|
* Derived from http://forum.arduino.cc/index.php?topic=136500.msg2903012#msg2903012
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef ARDUINO_ARCH_SAM
|
#ifdef ARDUINO_ARCH_SAM
|
||||||
|
|
||||||
#include "../../inc/MarlinConfig.h"
|
#include "../../inc/MarlinConfig.h"
|
||||||
#include "HAL.h"
|
#include "HAL.h"
|
||||||
|
#include "timers.h"
|
||||||
|
|
||||||
static pin_t tone_pin;
|
static pin_t tone_pin;
|
||||||
volatile static int32_t toggles;
|
volatile static int32_t toggles;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -52,23 +52,25 @@
|
|||||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef __SAM3X8E__
|
#ifdef __SAM3X8E__
|
||||||
|
|
||||||
#include "../../../inc/MarlinConfigPre.h"
|
#include "../../../inc/MarlinConfigPre.h"
|
||||||
|
|
||||||
#if HAS_MARLINUI_U8GLIB
|
#if HAS_GRAPHICAL_LCD
|
||||||
|
|
||||||
#include <U8glib.h>
|
#include <U8glib.h>
|
||||||
|
|
||||||
#include "../../../MarlinCore.h"
|
#include "../../../MarlinCore.h"
|
||||||
|
|
||||||
#ifndef LCD_SPI_SPEED
|
void spiBegin();
|
||||||
#define LCD_SPI_SPEED SPI_QUARTER_SPEED
|
void spiInit(uint8_t spiRate);
|
||||||
#endif
|
void spiSend(uint8_t b);
|
||||||
|
void spiSend(const uint8_t* buf, size_t n);
|
||||||
|
|
||||||
#include "../../shared/HAL_SPI.h"
|
#include "../../shared/Marduino.h"
|
||||||
#include "../fastio.h"
|
#include "../fastio.h"
|
||||||
|
|
||||||
void u8g_SetPIOutput_DUE_hw_spi(u8g_t *u8g, uint8_t pin_index) {
|
void u8g_SetPIOutput_DUE_hw_spi(u8g_t *u8g, uint8_t pin_index) {
|
||||||
@@ -99,7 +101,11 @@ uint8_t u8g_com_HAL_DUE_shared_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_va
|
|||||||
|
|
||||||
spiBegin();
|
spiBegin();
|
||||||
|
|
||||||
spiInit(LCD_SPI_SPEED);
|
#ifndef SPI_SPEED
|
||||||
|
#define SPI_SPEED SPI_FULL_SPEED // use same SPI speed as SD card
|
||||||
|
#endif
|
||||||
|
spiInit(2);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case U8G_COM_MSG_ADDRESS: /* define cmd (arg_val = 0) or data mode (arg_val = 1) */
|
case U8G_COM_MSG_ADDRESS: /* define cmd (arg_val = 0) or data mode (arg_val = 1) */
|
||||||
@@ -139,6 +145,6 @@ uint8_t u8g_com_HAL_DUE_shared_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_va
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // HAS_MARLINUI_U8GLIB
|
#endif // HAS_GRAPHICAL_LCD
|
||||||
|
|
||||||
#endif // __SAM3X8E__
|
#endif //__SAM3X8E__
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -59,7 +59,6 @@
|
|||||||
|
|
||||||
#if ENABLED(U8GLIB_ST7920)
|
#if ENABLED(U8GLIB_ST7920)
|
||||||
|
|
||||||
#include "../../../inc/MarlinConfig.h"
|
|
||||||
#include "../../shared/Delay.h"
|
#include "../../shared/Delay.h"
|
||||||
|
|
||||||
#include <U8glib.h>
|
#include <U8glib.h>
|
||||||
@@ -146,7 +145,7 @@ uint8_t u8g_com_HAL_DUE_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_va
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if ENABLED(LIGHTWEIGHT_UI)
|
#if ENABLED(LIGHTWEIGHT_UI)
|
||||||
#include "../../../lcd/marlinui.h"
|
#include "../../../lcd/ultralcd.h"
|
||||||
#include "../../shared/HAL_ST7920.h"
|
#include "../../shared/HAL_ST7920.h"
|
||||||
|
|
||||||
#define ST7920_CS_PIN LCD_PINS_RS
|
#define ST7920_CS_PIN LCD_PINS_RS
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -57,7 +57,10 @@
|
|||||||
|
|
||||||
#include "../../../inc/MarlinConfigPre.h"
|
#include "../../../inc/MarlinConfigPre.h"
|
||||||
|
|
||||||
#if HAS_MARLINUI_U8GLIB && DISABLED(U8GLIB_ST7920)
|
#if HAS_GRAPHICAL_LCD && DISABLED(U8GLIB_ST7920)
|
||||||
|
|
||||||
|
#undef SPI_SPEED
|
||||||
|
#define SPI_SPEED 2 // About 2 MHz
|
||||||
|
|
||||||
#include "u8g_com_HAL_DUE_sw_spi_shared.h"
|
#include "u8g_com_HAL_DUE_sw_spi_shared.h"
|
||||||
|
|
||||||
@@ -141,5 +144,5 @@ uint8_t u8g_com_HAL_DUE_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // HAS_MARLINUI_U8GLIB && !U8GLIB_ST7920
|
#endif // HAS_GRAPHICAL_LCD && !U8GLIB_ST7920
|
||||||
#endif // ARDUINO_ARCH_SAM
|
#endif // ARDUINO_ARCH_SAM
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -57,9 +57,8 @@
|
|||||||
|
|
||||||
#include "../../../inc/MarlinConfigPre.h"
|
#include "../../../inc/MarlinConfigPre.h"
|
||||||
|
|
||||||
#if HAS_MARLINUI_U8GLIB
|
#if HAS_GRAPHICAL_LCD
|
||||||
|
|
||||||
#include "../../../inc/MarlinConfig.h"
|
|
||||||
#include "../../shared/Delay.h"
|
#include "../../shared/Delay.h"
|
||||||
|
|
||||||
#include <U8glib.h>
|
#include <U8glib.h>
|
||||||
@@ -109,5 +108,5 @@ void u8g_spiSend_sw_DUE_mode_3(uint8_t val) { // 3.5MHz
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // HAS_MARLINUI_U8GLIB
|
#endif // HAS_GRAPHICAL_LCD
|
||||||
#endif // ARDUINO_ARCH_SAM
|
#endif // ARDUINO_ARCH_SAM
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
@@ -47,21 +47,43 @@ void endstop_ISR() { endstops.update(); }
|
|||||||
|
|
||||||
void setup_endstop_interrupts() {
|
void setup_endstop_interrupts() {
|
||||||
#define _ATTACH(P) attachInterrupt(digitalPinToInterrupt(P), endstop_ISR, CHANGE)
|
#define _ATTACH(P) attachInterrupt(digitalPinToInterrupt(P), endstop_ISR, CHANGE)
|
||||||
TERN_(HAS_X_MAX, _ATTACH(X_MAX_PIN));
|
#if HAS_X_MAX
|
||||||
TERN_(HAS_X_MIN, _ATTACH(X_MIN_PIN));
|
_ATTACH(X_MAX_PIN);
|
||||||
TERN_(HAS_Y_MAX, _ATTACH(Y_MAX_PIN));
|
#endif
|
||||||
TERN_(HAS_Y_MIN, _ATTACH(Y_MIN_PIN));
|
#if HAS_X_MIN
|
||||||
TERN_(HAS_Z_MAX, _ATTACH(Z_MAX_PIN));
|
_ATTACH(X_MIN_PIN);
|
||||||
TERN_(HAS_Z_MIN, _ATTACH(Z_MIN_PIN));
|
#endif
|
||||||
TERN_(HAS_X2_MAX, _ATTACH(X2_MAX_PIN));
|
#if HAS_Y_MAX
|
||||||
TERN_(HAS_X2_MIN, _ATTACH(X2_MIN_PIN));
|
_ATTACH(Y_MAX_PIN);
|
||||||
TERN_(HAS_Y2_MAX, _ATTACH(Y2_MAX_PIN));
|
#endif
|
||||||
TERN_(HAS_Y2_MIN, _ATTACH(Y2_MIN_PIN));
|
#if HAS_Y_MIN
|
||||||
TERN_(HAS_Z2_MAX, _ATTACH(Z2_MAX_PIN));
|
_ATTACH(Y_MIN_PIN);
|
||||||
TERN_(HAS_Z2_MIN, _ATTACH(Z2_MIN_PIN));
|
#endif
|
||||||
TERN_(HAS_Z3_MAX, _ATTACH(Z3_MAX_PIN));
|
#if HAS_Z_MAX
|
||||||
TERN_(HAS_Z3_MIN, _ATTACH(Z3_MIN_PIN));
|
_ATTACH(Z_MAX_PIN);
|
||||||
TERN_(HAS_Z4_MAX, _ATTACH(Z4_MAX_PIN));
|
#endif
|
||||||
TERN_(HAS_Z4_MIN, _ATTACH(Z4_MIN_PIN));
|
#if HAS_Z_MIN
|
||||||
TERN_(HAS_Z_MIN_PROBE_PIN, _ATTACH(Z_MIN_PROBE_PIN));
|
_ATTACH(Z_MIN_PIN);
|
||||||
|
#endif
|
||||||
|
#if HAS_Z2_MAX
|
||||||
|
_ATTACH(Z2_MAX_PIN);
|
||||||
|
#endif
|
||||||
|
#if HAS_Z2_MIN
|
||||||
|
_ATTACH(Z2_MIN_PIN);
|
||||||
|
#endif
|
||||||
|
#if HAS_Z3_MAX
|
||||||
|
_ATTACH(Z3_MAX_PIN);
|
||||||
|
#endif
|
||||||
|
#if HAS_Z3_MIN
|
||||||
|
_ATTACH(Z3_MIN_PIN);
|
||||||
|
#endif
|
||||||
|
#if HAS_Z4_MAX
|
||||||
|
_ATTACH(Z4_MAX_PIN);
|
||||||
|
#endif
|
||||||
|
#if HAS_Z4_MIN
|
||||||
|
_ATTACH(Z4_MIN_PIN);
|
||||||
|
#endif
|
||||||
|
#if HAS_Z_MIN_PROBE_PIN
|
||||||
|
_ATTACH(Z_MIN_PROBE_PIN);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
#define PWM_PIN(P) WITHIN(P, 2, 13)
|
#define PWM_PIN(P) WITHIN(P, 2, 13)
|
||||||
|
|
||||||
#ifndef MASK
|
#ifndef MASK
|
||||||
#define MASK(PIN) _BV(PIN)
|
#define MASK(PIN) (1 << PIN)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
*
|
*
|
||||||
* Now you can simply SET_OUTPUT(STEP); WRITE(STEP, HIGH); WRITE(STEP, LOW);
|
* Now you can simply SET_OUTPUT(STEP); WRITE(STEP, HIGH); WRITE(STEP, LOW);
|
||||||
*
|
*
|
||||||
* Why double up on these macros? see https://gcc.gnu.org/onlinedocs/cpp/Stringification.html
|
* Why double up on these macros? see http://gcc.gnu.org/onlinedocs/cpp/Stringification.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Read a pin
|
// Read a pin
|
||||||
@@ -163,13 +163,10 @@
|
|||||||
#define SET_INPUT(IO) _SET_INPUT(IO)
|
#define SET_INPUT(IO) _SET_INPUT(IO)
|
||||||
// Set pin as input with pullup (wrapper)
|
// Set pin as input with pullup (wrapper)
|
||||||
#define SET_INPUT_PULLUP(IO) do{ _SET_INPUT(IO); _PULLUP(IO, HIGH); }while(0)
|
#define SET_INPUT_PULLUP(IO) do{ _SET_INPUT(IO); _PULLUP(IO, HIGH); }while(0)
|
||||||
// Set pin as input with pulldown (substitution)
|
|
||||||
#define SET_INPUT_PULLDOWN SET_INPUT
|
|
||||||
|
|
||||||
// Set pin as output (wrapper) - reads the pin and sets the output to that value
|
// Set pin as output (wrapper) - reads the pin and sets the output to that value
|
||||||
#define SET_OUTPUT(IO) _SET_OUTPUT(IO)
|
#define SET_OUTPUT(IO) _SET_OUTPUT(IO)
|
||||||
// Set pin as PWM
|
// Set pin as PWM
|
||||||
#define SET_PWM SET_OUTPUT
|
#define SET_PWM(IO) SET_OUTPUT(IO)
|
||||||
|
|
||||||
// Check if pin is an input
|
// Check if pin is an input
|
||||||
#define IS_INPUT(IO) ((digitalPinToPort(IO)->PIO_OSR & digitalPinToBitMask(IO)) == 0)
|
#define IS_INPUT(IO) ((digitalPinToPort(IO)->PIO_OSR & digitalPinToBitMask(IO)) == 0)
|
||||||
@@ -177,7 +174,7 @@
|
|||||||
#define IS_OUTPUT(IO) ((digitalPinToPort(IO)->PIO_OSR & digitalPinToBitMask(IO)) != 0)
|
#define IS_OUTPUT(IO) ((digitalPinToPort(IO)->PIO_OSR & digitalPinToBitMask(IO)) != 0)
|
||||||
|
|
||||||
// Shorthand
|
// Shorthand
|
||||||
#define OUT_WRITE(IO,V) do{ SET_OUTPUT(IO); WRITE(IO,V); }while(0)
|
#define OUT_WRITE(IO,V) { SET_OUTPUT(IO); WRITE(IO,V); }
|
||||||
|
|
||||||
// digitalRead/Write wrappers
|
// digitalRead/Write wrappers
|
||||||
#define extDigitalRead(IO) digitalRead(IO)
|
#define extDigitalRead(IO) digitalRead(IO)
|
||||||
@@ -480,7 +477,7 @@
|
|||||||
#define DIO91_PIN 15
|
#define DIO91_PIN 15
|
||||||
#define DIO91_WPORT PIOB
|
#define DIO91_WPORT PIOB
|
||||||
|
|
||||||
#ifdef ARDUINO_SAM_ARCHIM
|
#if ARDUINO_SAM_ARCHIM
|
||||||
|
|
||||||
#define DIO92_PIN 11
|
#define DIO92_PIN 11
|
||||||
#define DIO92_WPORT PIOC
|
#define DIO92_WPORT PIOC
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -46,31 +46,6 @@
|
|||||||
|
|
||||||
#include "G2_PWM.h"
|
#include "G2_PWM.h"
|
||||||
|
|
||||||
#if PIN_EXISTS(MOTOR_CURRENT_PWM_X)
|
|
||||||
#define G2_PWM_X 1
|
|
||||||
#else
|
|
||||||
#define G2_PWM_X 0
|
|
||||||
#endif
|
|
||||||
#if PIN_EXISTS(MOTOR_CURRENT_PWM_Y)
|
|
||||||
#define G2_PWM_Y 1
|
|
||||||
#else
|
|
||||||
#define G2_PWM_Y 0
|
|
||||||
#endif
|
|
||||||
#if PIN_EXISTS(MOTOR_CURRENT_PWM_Z)
|
|
||||||
#define G2_PWM_Z 1
|
|
||||||
#else
|
|
||||||
#define G2_PWM_Z 0
|
|
||||||
#endif
|
|
||||||
#if PIN_EXISTS(MOTOR_CURRENT_PWM_E)
|
|
||||||
#define G2_PWM_E 1
|
|
||||||
#else
|
|
||||||
#define G2_PWM_E 0
|
|
||||||
#endif
|
|
||||||
#define G2_MASK_X(V) (G2_PWM_X * (V))
|
|
||||||
#define G2_MASK_Y(V) (G2_PWM_Y * (V))
|
|
||||||
#define G2_MASK_Z(V) (G2_PWM_Z * (V))
|
|
||||||
#define G2_MASK_E(V) (G2_PWM_E * (V))
|
|
||||||
|
|
||||||
volatile uint32_t *SODR_A = &PIOA->PIO_SODR,
|
volatile uint32_t *SODR_A = &PIOA->PIO_SODR,
|
||||||
*SODR_B = &PIOB->PIO_SODR,
|
*SODR_B = &PIOB->PIO_SODR,
|
||||||
*CODR_A = &PIOA->PIO_CODR,
|
*CODR_A = &PIOA->PIO_CODR,
|
||||||
@@ -80,18 +55,10 @@ PWM_map ISR_table[NUM_PWMS] = PWM_MAP_INIT;
|
|||||||
|
|
||||||
void Stepper::digipot_init() {
|
void Stepper::digipot_init() {
|
||||||
|
|
||||||
#if PIN_EXISTS(MOTOR_CURRENT_PWM_X)
|
OUT_WRITE(MOTOR_CURRENT_PWM_X_PIN, 0); // init pins
|
||||||
OUT_WRITE(MOTOR_CURRENT_PWM_X_PIN, 0); // init pins
|
OUT_WRITE(MOTOR_CURRENT_PWM_Y_PIN, 0);
|
||||||
#endif
|
OUT_WRITE(MOTOR_CURRENT_PWM_Z_PIN, 0);
|
||||||
#if PIN_EXISTS(MOTOR_CURRENT_PWM_Y)
|
OUT_WRITE(MOTOR_CURRENT_PWM_E_PIN, 0);
|
||||||
OUT_WRITE(MOTOR_CURRENT_PWM_Y_PIN, 0);
|
|
||||||
#endif
|
|
||||||
#if G2_PWM_Z
|
|
||||||
OUT_WRITE(MOTOR_CURRENT_PWM_Z_PIN, 0);
|
|
||||||
#endif
|
|
||||||
#if G2_PWM_E
|
|
||||||
OUT_WRITE(MOTOR_CURRENT_PWM_E_PIN, 0);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define WPKEY (0x50574D << 8) // “PWM” in ASCII
|
#define WPKEY (0x50574D << 8) // “PWM” in ASCII
|
||||||
#define WPCMD_DIS_SW 0 // command to disable Write Protect SW
|
#define WPCMD_DIS_SW 0 // command to disable Write Protect SW
|
||||||
@@ -104,82 +71,54 @@ void Stepper::digipot_init() {
|
|||||||
PWM->PWM_WPCR = WPKEY | WPRG_ALL | WPCMD_DIS_SW; // enable setting of all PWM registers
|
PWM->PWM_WPCR = WPKEY | WPRG_ALL | WPCMD_DIS_SW; // enable setting of all PWM registers
|
||||||
PWM->PWM_CLK = PWM_CLOCK_F; // enable CLK_A and set it to 1MHz, leave CLK_B disabled
|
PWM->PWM_CLK = PWM_CLOCK_F; // enable CLK_A and set it to 1MHz, leave CLK_B disabled
|
||||||
PWM->PWM_CH_NUM[0].PWM_CMR = 0b1011; // set channel 0 to Clock A input & to left aligned
|
PWM->PWM_CH_NUM[0].PWM_CMR = 0b1011; // set channel 0 to Clock A input & to left aligned
|
||||||
if (G2_PWM_X) PWM->PWM_CH_NUM[1].PWM_CMR = 0b1011; // set channel 1 to Clock A input & to left aligned
|
PWM->PWM_CH_NUM[1].PWM_CMR = 0b1011; // set channel 1 to Clock A input & to left aligned
|
||||||
if (G2_PWM_Y) PWM->PWM_CH_NUM[2].PWM_CMR = 0b1011; // set channel 2 to Clock A input & to left aligned
|
PWM->PWM_CH_NUM[2].PWM_CMR = 0b1011; // set channel 2 to Clock A input & to left aligned
|
||||||
if (G2_PWM_Z) PWM->PWM_CH_NUM[3].PWM_CMR = 0b1011; // set channel 3 to Clock A input & to left aligned
|
PWM->PWM_CH_NUM[3].PWM_CMR = 0b1011; // set channel 3 to Clock A input & to left aligned
|
||||||
if (G2_PWM_E) PWM->PWM_CH_NUM[4].PWM_CMR = 0b1011; // set channel 4 to Clock A input & to left aligned
|
PWM->PWM_CH_NUM[4].PWM_CMR = 0b1011; // set channel 4 to Clock A input & to left aligned
|
||||||
|
|
||||||
PWM->PWM_CH_NUM[0].PWM_CPRD = PWM_PERIOD_US; // set channel 0 Period
|
PWM->PWM_CH_NUM[0].PWM_CPRD = PWM_PERIOD_US; // set channel 0 Period
|
||||||
|
|
||||||
PWM->PWM_IER2 = PWM_IER1_CHID0; // generate interrupt when counter0 overflows
|
PWM->PWM_IER2 = PWM_IER1_CHID0; // generate interrupt when counter0 overflows
|
||||||
PWM->PWM_IER2 = PWM_IER2_CMPM0
|
PWM->PWM_IER2 = PWM_IER2_CMPM0 | PWM_IER2_CMPM1 | PWM_IER2_CMPM2 | PWM_IER2_CMPM3 | PWM_IER2_CMPM4; // generate interrupt on compare event
|
||||||
| G2_MASK_X(PWM_IER2_CMPM1)
|
|
||||||
| G2_MASK_Y(PWM_IER2_CMPM2)
|
|
||||||
| G2_MASK_Z(PWM_IER2_CMPM3)
|
|
||||||
| G2_MASK_E(PWM_IER2_CMPM4)
|
|
||||||
; // generate interrupt on compare event
|
|
||||||
|
|
||||||
if (G2_PWM_X) PWM->PWM_CMP[1].PWM_CMPV = 0x010000000LL | G2_VREF_COUNT(G2_VREF(motor_current_setting[0])); // interrupt when counter0 == CMPV - used to set Motor 1 PWM inactive
|
PWM->PWM_CMP[1].PWM_CMPV = 0x010000000LL | G2_VREF_COUNT(G2_VREF(motor_current_setting[0])); // interrupt when counter0 == CMPV - used to set Motor 1 PWM inactive
|
||||||
if (G2_PWM_Y) PWM->PWM_CMP[2].PWM_CMPV = 0x010000000LL | G2_VREF_COUNT(G2_VREF(motor_current_setting[0])); // interrupt when counter0 == CMPV - used to set Motor 2 PWM inactive
|
PWM->PWM_CMP[2].PWM_CMPV = 0x010000000LL | G2_VREF_COUNT(G2_VREF(motor_current_setting[0])); // interrupt when counter0 == CMPV - used to set Motor 2 PWM inactive
|
||||||
if (G2_PWM_Z) PWM->PWM_CMP[3].PWM_CMPV = 0x010000000LL | G2_VREF_COUNT(G2_VREF(motor_current_setting[1])); // interrupt when counter0 == CMPV - used to set Motor 3 PWM inactive
|
PWM->PWM_CMP[3].PWM_CMPV = 0x010000000LL | G2_VREF_COUNT(G2_VREF(motor_current_setting[1])); // interrupt when counter0 == CMPV - used to set Motor 3 PWM inactive
|
||||||
if (G2_PWM_E) PWM->PWM_CMP[4].PWM_CMPV = 0x010000000LL | G2_VREF_COUNT(G2_VREF(motor_current_setting[2])); // interrupt when counter0 == CMPV - used to set Motor 4 PWM inactive
|
PWM->PWM_CMP[4].PWM_CMPV = 0x010000000LL | G2_VREF_COUNT(G2_VREF(motor_current_setting[2])); // interrupt when counter0 == CMPV - used to set Motor 4 PWM inactive
|
||||||
|
|
||||||
if (G2_PWM_X) PWM->PWM_CMP[1].PWM_CMPM = 0x0001; // enable compare event
|
PWM->PWM_CMP[1].PWM_CMPM = 0x0001; // enable compare event
|
||||||
if (G2_PWM_Y) PWM->PWM_CMP[2].PWM_CMPM = 0x0001; // enable compare event
|
PWM->PWM_CMP[2].PWM_CMPM = 0x0001; // enable compare event
|
||||||
if (G2_PWM_Z) PWM->PWM_CMP[3].PWM_CMPM = 0x0001; // enable compare event
|
PWM->PWM_CMP[3].PWM_CMPM = 0x0001; // enable compare event
|
||||||
if (G2_PWM_E) PWM->PWM_CMP[4].PWM_CMPM = 0x0001; // enable compare event
|
PWM->PWM_CMP[4].PWM_CMPM = 0x0001; // enable compare event
|
||||||
|
|
||||||
PWM->PWM_SCM = PWM_SCM_UPDM_MODE0 | PWM_SCM_SYNC0
|
PWM->PWM_SCM = PWM_SCM_UPDM_MODE0 | PWM_SCM_SYNC0 | PWM_SCM_SYNC1 | PWM_SCM_SYNC2 | PWM_SCM_SYNC3 | PWM_SCM_SYNC4; // sync 1-4 with 0, use mode 0 for updates
|
||||||
| G2_MASK_X(PWM_SCM_SYNC1)
|
|
||||||
| G2_MASK_Y(PWM_SCM_SYNC2)
|
|
||||||
| G2_MASK_Z(PWM_SCM_SYNC3)
|
|
||||||
| G2_MASK_E(PWM_SCM_SYNC4)
|
|
||||||
; // sync 1-4 with 0, use mode 0 for updates
|
|
||||||
|
|
||||||
PWM->PWM_ENA = PWM_ENA_CHID0
|
PWM->PWM_ENA = PWM_ENA_CHID0 | PWM_ENA_CHID1 | PWM_ENA_CHID2 | PWM_ENA_CHID3 | PWM_ENA_CHID4; // enable the channels used by G2
|
||||||
| G2_MASK_X(PWM_ENA_CHID1)
|
PWM->PWM_IER1 = PWM_IER1_CHID0 | PWM_IER1_CHID1 | PWM_IER1_CHID2 | PWM_IER1_CHID3 | PWM_IER1_CHID4; // enable interrupts for the channels used by G2
|
||||||
| G2_MASK_Y(PWM_ENA_CHID2)
|
|
||||||
| G2_MASK_Z(PWM_ENA_CHID3)
|
|
||||||
| G2_MASK_E(PWM_ENA_CHID4)
|
|
||||||
; // enable channels used by G2
|
|
||||||
|
|
||||||
PWM->PWM_IER1 = PWM_IER1_CHID0
|
|
||||||
| G2_MASK_X(PWM_IER1_CHID1)
|
|
||||||
| G2_MASK_Y(PWM_IER1_CHID2)
|
|
||||||
| G2_MASK_Z(PWM_IER1_CHID3)
|
|
||||||
| G2_MASK_E(PWM_IER1_CHID4)
|
|
||||||
; // enable interrupts for channels used by G2
|
|
||||||
|
|
||||||
NVIC_EnableIRQ(PWM_IRQn); // Enable interrupt handler
|
NVIC_EnableIRQ(PWM_IRQn); // Enable interrupt handler
|
||||||
NVIC_SetPriority(PWM_IRQn, NVIC_EncodePriority(0, 10, 0)); // normal priority for PWM module (can stand some jitter on the Vref signals)
|
NVIC_SetPriority(PWM_IRQn, NVIC_EncodePriority(0, 10, 0)); // normal priority for PWM module (can stand some jitter on the Vref signals)
|
||||||
}
|
}
|
||||||
|
|
||||||
void Stepper::set_digipot_current(const uint8_t driver, const int16_t current) {
|
void Stepper::digipot_current(const uint8_t driver, const int16_t current) {
|
||||||
|
|
||||||
if (!(PWM->PWM_CH_NUM[0].PWM_CPRD == PWM_PERIOD_US)) digipot_init(); // Init PWM system if needed
|
if (!(PWM->PWM_CH_NUM[0].PWM_CPRD == PWM_PERIOD_US)) digipot_init(); // Init PWM system if needed
|
||||||
|
|
||||||
switch (driver) {
|
switch (driver) {
|
||||||
case 0:
|
case 0: PWM->PWM_CMP[1].PWM_CMPVUPD = 0x010000000LL | G2_VREF_COUNT(G2_VREF(current)); // update X & Y
|
||||||
if (G2_PWM_X) PWM->PWM_CMP[1].PWM_CMPVUPD = 0x010000000LL | G2_VREF_COUNT(G2_VREF(current)); // update X & Y
|
PWM->PWM_CMP[2].PWM_CMPVUPD = 0x010000000LL | G2_VREF_COUNT(G2_VREF(current));
|
||||||
if (G2_PWM_Y) PWM->PWM_CMP[2].PWM_CMPVUPD = 0x010000000LL | G2_VREF_COUNT(G2_VREF(current));
|
PWM->PWM_CMP[1].PWM_CMPMUPD = 0x0001; // enable compare event
|
||||||
if (G2_PWM_X) PWM->PWM_CMP[1].PWM_CMPMUPD = 0x0001; // enable compare event
|
PWM->PWM_CMP[2].PWM_CMPMUPD = 0x0001; // enable compare event
|
||||||
if (G2_PWM_Y) PWM->PWM_CMP[2].PWM_CMPMUPD = 0x0001; // enable compare event
|
PWM->PWM_SCUC = PWM_SCUC_UPDULOCK; // tell the PWM controller to update the values on the next cycle
|
||||||
if (G2_PWM_X || G2_PWM_Y) PWM->PWM_SCUC = PWM_SCUC_UPDULOCK; // tell the PWM controller to update the values on the next cycle
|
break;
|
||||||
break;
|
case 1: PWM->PWM_CMP[3].PWM_CMPVUPD = 0x010000000LL | G2_VREF_COUNT(G2_VREF(current)); // update Z
|
||||||
case 1:
|
PWM->PWM_CMP[3].PWM_CMPMUPD = 0x0001; // enable compare event
|
||||||
if (G2_PWM_Z) {
|
PWM->PWM_SCUC = PWM_SCUC_UPDULOCK; // tell the PWM controller to update the values on the next cycle
|
||||||
PWM->PWM_CMP[3].PWM_CMPVUPD = 0x010000000LL | G2_VREF_COUNT(G2_VREF(current)); // update Z
|
break;
|
||||||
PWM->PWM_CMP[3].PWM_CMPMUPD = 0x0001; // enable compare event
|
default:PWM->PWM_CMP[4].PWM_CMPVUPD = 0x010000000LL | G2_VREF_COUNT(G2_VREF(current)); // update E
|
||||||
PWM->PWM_SCUC = PWM_SCUC_UPDULOCK; // tell the PWM controller to update the values on the next cycle
|
PWM->PWM_CMP[4].PWM_CMPMUPD = 0x0001; // enable compare event
|
||||||
}
|
PWM->PWM_SCUC = PWM_SCUC_UPDULOCK; // tell the PWM controller to update the values on the next cycle
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
if (G2_PWM_E) {
|
|
||||||
PWM->PWM_CMP[4].PWM_CMPVUPD = 0x010000000LL | G2_VREF_COUNT(G2_VREF(current)); // update E
|
|
||||||
PWM->PWM_CMP[4].PWM_CMPMUPD = 0x0001; // enable compare event
|
|
||||||
PWM->PWM_SCUC = PWM_SCUC_UPDULOCK; // tell the PWM controller to update the values on the next cycle
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -188,17 +127,17 @@ volatile uint32_t PWM_ISR1_STATUS, PWM_ISR2_STATUS;
|
|||||||
void PWM_Handler() {
|
void PWM_Handler() {
|
||||||
PWM_ISR1_STATUS = PWM->PWM_ISR1;
|
PWM_ISR1_STATUS = PWM->PWM_ISR1;
|
||||||
PWM_ISR2_STATUS = PWM->PWM_ISR2;
|
PWM_ISR2_STATUS = PWM->PWM_ISR2;
|
||||||
if (PWM_ISR1_STATUS & PWM_IER1_CHID0) { // CHAN_0 interrupt
|
if (PWM_ISR1_STATUS & PWM_IER1_CHID0) { // CHAN_0 interrupt
|
||||||
if (G2_PWM_X) *ISR_table[0].set_register = ISR_table[0].write_mask; // set X to active
|
*ISR_table[0].set_register = ISR_table[0].write_mask; // set X to active
|
||||||
if (G2_PWM_Y) *ISR_table[1].set_register = ISR_table[1].write_mask; // set Y to active
|
*ISR_table[1].set_register = ISR_table[1].write_mask; // set Y to active
|
||||||
if (G2_PWM_Z) *ISR_table[2].set_register = ISR_table[2].write_mask; // set Z to active
|
*ISR_table[2].set_register = ISR_table[2].write_mask; // set Z to active
|
||||||
if (G2_PWM_E) *ISR_table[3].set_register = ISR_table[3].write_mask; // set E to active
|
*ISR_table[3].set_register = ISR_table[3].write_mask; // set E to active
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (G2_PWM_X && (PWM_ISR2_STATUS & PWM_IER2_CMPM1)) *ISR_table[0].clr_register = ISR_table[0].write_mask; // set X to inactive
|
if (PWM_ISR2_STATUS & PWM_IER2_CMPM1) *ISR_table[0].clr_register = ISR_table[0].write_mask; // set X to inactive
|
||||||
if (G2_PWM_Y && (PWM_ISR2_STATUS & PWM_IER2_CMPM2)) *ISR_table[1].clr_register = ISR_table[1].write_mask; // set Y to inactive
|
if (PWM_ISR2_STATUS & PWM_IER2_CMPM2) *ISR_table[1].clr_register = ISR_table[1].write_mask; // set Y to inactive
|
||||||
if (G2_PWM_Z && (PWM_ISR2_STATUS & PWM_IER2_CMPM3)) *ISR_table[2].clr_register = ISR_table[2].write_mask; // set Z to inactive
|
if (PWM_ISR2_STATUS & PWM_IER2_CMPM3) *ISR_table[2].clr_register = ISR_table[2].write_mask; // set Z to inactive
|
||||||
if (G2_PWM_E && (PWM_ISR2_STATUS & PWM_IER2_CMPM4)) *ISR_table[3].clr_register = ISR_table[3].write_mask; // set E to inactive
|
if (PWM_ISR2_STATUS & PWM_IER2_CMPM4) *ISR_table[3].clr_register = ISR_table[3].write_mask; // set E to inactive
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|||||||
@@ -16,11 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#if HAS_SPI_TFT || HAS_FSMC_TFT
|
|
||||||
#error "Sorry! TFT displays are not available for HAL/DUE."
|
|
||||||
#endif
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|||||||
@@ -16,13 +16,13 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#if USE_FALLBACK_EEPROM
|
#if USE_EMULATED_EEPROM
|
||||||
|
#undef SRAM_EEPROM_EMULATION
|
||||||
|
#undef SDCARD_EEPROM_EMULATION
|
||||||
#define FLASH_EEPROM_EMULATION
|
#define FLASH_EEPROM_EMULATION
|
||||||
#elif EITHER(I2C_EEPROM, SPI_EEPROM)
|
|
||||||
#define USE_SHARED_EEPROM 1
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
* Usually the hardware SPI pins are only available to the LCD. This makes the DUE hard SPI used at the same time
|
* 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.
|
* as the TMC2130 soft SPI the most common setup.
|
||||||
*/
|
*/
|
||||||
#define _IS_HW_SPI(P) (defined(TMC_SW_##P) && (TMC_SW_##P == SD_MOSI_PIN || TMC_SW_##P == SD_MISO_PIN || TMC_SW_##P == SD_SCK_PIN))
|
#define _IS_HW_SPI(P) (defined(TMC_SW_##P) && (TMC_SW_##P == MOSI_PIN || TMC_SW_##P == MISO_PIN || TMC_SW_##P == SCK_PIN))
|
||||||
|
|
||||||
#if ENABLED(SDSUPPORT) && HAS_DRIVER(TMC2130)
|
#if ENABLED(SDSUPPORT) && HAS_DRIVER(TMC2130)
|
||||||
#if ENABLED(TMC_USE_SW_SPI)
|
#if ENABLED(TMC_USE_SW_SPI)
|
||||||
@@ -52,10 +52,10 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY
|
#if ENABLED(FAST_PWM_FAN)
|
||||||
#error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on DUE."
|
#error "FAST_PWM_FAN is not yet implemented for this platform."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAS_TMC_SW_SERIAL
|
#if HAS_TMC_SW_SERIAL
|
||||||
#error "TMC220x Software Serial is not supported on the DUE platform."
|
#error "TMC220x Software Serial is not supported on this platform."
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+24
-19
@@ -17,29 +17,32 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#ifdef ARDUINO_ARCH_SAM
|
#ifdef ARDUINO_ARCH_SAM
|
||||||
|
|
||||||
|
#include "../../inc/MarlinConfigPre.h"
|
||||||
|
|
||||||
|
#if ENABLED(EEPROM_SETTINGS)
|
||||||
|
|
||||||
#include "../../inc/MarlinConfig.h"
|
#include "../../inc/MarlinConfig.h"
|
||||||
|
#include "../shared/persistent_store_api.h"
|
||||||
|
|
||||||
#if USE_WIRED_EEPROM
|
#if !defined(E2END) && ENABLED(FLASH_EEPROM_EMULATION)
|
||||||
|
#define E2END 0xFFF // Default to Flash emulated EEPROM size (EepromEmulation_Due.cpp)
|
||||||
/**
|
|
||||||
* PersistentStore for Arduino-style EEPROM interface
|
|
||||||
* with simple implementations supplied by Marlin.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "../shared/eeprom_if.h"
|
|
||||||
#include "../shared/eeprom_api.h"
|
|
||||||
|
|
||||||
#ifndef MARLIN_EEPROM_SIZE
|
|
||||||
#error "MARLIN_EEPROM_SIZE is required for I2C / SPI EEPROM."
|
|
||||||
#endif
|
#endif
|
||||||
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; }
|
|
||||||
bool PersistentStore::access_start() { eeprom_init(); return true; }
|
extern void eeprom_flush();
|
||||||
bool PersistentStore::access_finish() { return true; }
|
|
||||||
|
bool PersistentStore::access_start() { return true; }
|
||||||
|
|
||||||
|
bool PersistentStore::access_finish() {
|
||||||
|
#if ENABLED(FLASH_EEPROM_EMULATION)
|
||||||
|
eeprom_flush();
|
||||||
|
#endif
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
|
bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
|
||||||
while (size--) {
|
while (size--) {
|
||||||
@@ -58,11 +61,11 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
|
|||||||
crc16(crc, &v, 1);
|
crc16(crc, &v, 1);
|
||||||
pos++;
|
pos++;
|
||||||
value++;
|
value++;
|
||||||
}
|
};
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
|
bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
|
||||||
do {
|
do {
|
||||||
uint8_t c = eeprom_read_byte((uint8_t*)pos);
|
uint8_t c = eeprom_read_byte((uint8_t*)pos);
|
||||||
if (writing) *value = c;
|
if (writing) *value = c;
|
||||||
@@ -73,5 +76,7 @@ bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // USE_WIRED_EEPROM
|
size_t PersistentStore::capacity() { return E2END + 1; }
|
||||||
|
|
||||||
|
#endif // EEPROM_SETTINGS
|
||||||
#endif // ARDUINO_ARCH_SAM
|
#endif // ARDUINO_ARCH_SAM
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -179,4 +179,5 @@ void pwm_details(int32_t pin) {
|
|||||||
* ----------------+--------
|
* ----------------+--------
|
||||||
* ID | PB11
|
* ID | PB11
|
||||||
* VBOF | PB10
|
* VBOF | PB10
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
@@ -43,22 +43,22 @@
|
|||||||
#define SPI_PIN 87
|
#define SPI_PIN 87
|
||||||
#define SPI_CHAN 1
|
#define SPI_CHAN 1
|
||||||
#endif
|
#endif
|
||||||
#define SD_SCK_PIN 76
|
#define SCK_PIN 76
|
||||||
#define SD_MISO_PIN 74
|
#define MISO_PIN 74
|
||||||
#define SD_MOSI_PIN 75
|
#define MOSI_PIN 75
|
||||||
#else
|
#else
|
||||||
// defaults
|
// defaults
|
||||||
#define DUE_SOFTWARE_SPI
|
#define DUE_SOFTWARE_SPI
|
||||||
#ifndef SD_SCK_PIN
|
#ifndef SCK_PIN
|
||||||
#define SD_SCK_PIN 52
|
#define SCK_PIN 52
|
||||||
#endif
|
#endif
|
||||||
#ifndef SD_MISO_PIN
|
#ifndef MISO_PIN
|
||||||
#define SD_MISO_PIN 50
|
#define MISO_PIN 50
|
||||||
#endif
|
#endif
|
||||||
#ifndef SD_MOSI_PIN
|
#ifndef MOSI_PIN
|
||||||
#define SD_MOSI_PIN 51
|
#define MOSI_PIN 51
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* A.28, A.29, B.21, C.26, C.29 */
|
/* A.28, A.29, B.21, C.26, C.29 */
|
||||||
#define SD_SS_PIN SDSS
|
#define SS_PIN SDSS
|
||||||
|
|||||||
@@ -16,12 +16,14 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* HAL Timers for Arduino Due and compatible (SAM3X8E)
|
* Description: HAL for Arduino Due and compatible (SAM3X8E)
|
||||||
|
*
|
||||||
|
* For ARDUINO_ARCH_SAM
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef ARDUINO_ARCH_SAM
|
#ifdef ARDUINO_ARCH_SAM
|
||||||
@@ -32,6 +34,8 @@
|
|||||||
#include "../../inc/MarlinConfig.h"
|
#include "../../inc/MarlinConfig.h"
|
||||||
#include "HAL.h"
|
#include "HAL.h"
|
||||||
|
|
||||||
|
#include "timers.h"
|
||||||
|
|
||||||
// ------------------------
|
// ------------------------
|
||||||
// Local defines
|
// Local defines
|
||||||
// ------------------------
|
// ------------------------
|
||||||
@@ -121,7 +125,7 @@ void HAL_timer_disable_interrupt(const uint8_t timer_num) {
|
|||||||
|
|
||||||
// missing from CMSIS: Check if interrupt is enabled or not
|
// missing from CMSIS: Check if interrupt is enabled or not
|
||||||
static bool NVIC_GetEnabledIRQ(IRQn_Type IRQn) {
|
static bool NVIC_GetEnabledIRQ(IRQn_Type IRQn) {
|
||||||
return TEST(NVIC->ISER[uint32_t(IRQn) >> 5], uint32_t(IRQn) & 0x1F);
|
return (NVIC->ISER[(uint32_t)(IRQn) >> 5] & (1 << ((uint32_t)(IRQn) & 0x1F))) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool HAL_timer_interrupt_enabled(const uint8_t timer_num) {
|
bool HAL_timer_interrupt_enabled(const uint8_t timer_num) {
|
||||||
|
|||||||
+10
-18
@@ -15,13 +15,15 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* HAL Timers for Arduino Due and compatible (SAM3X8E)
|
* HAL for Arduino Due and compatible (SAM3X8E)
|
||||||
|
*
|
||||||
|
* For ARDUINO_ARCH_SAM
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@@ -38,17 +40,11 @@ typedef uint32_t hal_timer_t;
|
|||||||
#define HAL_TIMER_RATE ((F_CPU) / 2) // frequency of timers peripherals
|
#define HAL_TIMER_RATE ((F_CPU) / 2) // frequency of timers peripherals
|
||||||
|
|
||||||
#ifndef STEP_TIMER_NUM
|
#ifndef STEP_TIMER_NUM
|
||||||
#define STEP_TIMER_NUM 2 // Timer Index for Stepper
|
#define STEP_TIMER_NUM 2 // index of timer to use for stepper
|
||||||
#endif
|
|
||||||
#ifndef PULSE_TIMER_NUM
|
|
||||||
#define PULSE_TIMER_NUM STEP_TIMER_NUM
|
|
||||||
#endif
|
|
||||||
#ifndef TEMP_TIMER_NUM
|
|
||||||
#define TEMP_TIMER_NUM 4 // Timer Index for Temperature
|
|
||||||
#endif
|
|
||||||
#ifndef TONE_TIMER_NUM
|
|
||||||
#define TONE_TIMER_NUM 6 // index of timer to use for beeper tones
|
|
||||||
#endif
|
#endif
|
||||||
|
#define TEMP_TIMER_NUM 4 // index of timer to use for temperature
|
||||||
|
#define PULSE_TIMER_NUM STEP_TIMER_NUM
|
||||||
|
#define TONE_TIMER_NUM 6 // index of timer to use for beeper tones
|
||||||
|
|
||||||
#define TEMP_TIMER_FREQUENCY 1000 // temperature interrupt frequency
|
#define TEMP_TIMER_FREQUENCY 1000 // temperature interrupt frequency
|
||||||
|
|
||||||
@@ -70,12 +66,8 @@ typedef uint32_t hal_timer_t;
|
|||||||
#ifndef HAL_STEP_TIMER_ISR
|
#ifndef HAL_STEP_TIMER_ISR
|
||||||
#define HAL_STEP_TIMER_ISR() void TC2_Handler()
|
#define HAL_STEP_TIMER_ISR() void TC2_Handler()
|
||||||
#endif
|
#endif
|
||||||
#ifndef HAL_TEMP_TIMER_ISR
|
#define HAL_TEMP_TIMER_ISR() void TC4_Handler()
|
||||||
#define HAL_TEMP_TIMER_ISR() void TC4_Handler()
|
#define HAL_TONE_TIMER_ISR() void TC6_Handler()
|
||||||
#endif
|
|
||||||
#ifndef HAL_TONE_TIMER_ISR
|
|
||||||
#define HAL_TONE_TIMER_ISR() void TC6_Handler()
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ------------------------
|
// ------------------------
|
||||||
// Types
|
// Types
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
#
|
|
||||||
# Set upload_command
|
|
||||||
#
|
|
||||||
# Windows: bossac.exe
|
|
||||||
# Other: leave unchanged
|
|
||||||
#
|
|
||||||
|
|
||||||
import platform
|
|
||||||
current_OS = platform.system()
|
|
||||||
|
|
||||||
if current_OS == 'Windows':
|
|
||||||
|
|
||||||
Import("env")
|
|
||||||
|
|
||||||
# Use bossac.exe on Windows
|
|
||||||
env.Replace(
|
|
||||||
UPLOADCMD="bossac --info --unlock --write --verify --reset --erase -U false --boot $SOURCE"
|
|
||||||
)
|
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Support and FAQ: visit <a href="https://www.atmel.com/design-support/">Atmel Support</a>
|
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -93,5 +93,5 @@
|
|||||||
#define USB_VBOF_GPIO (PIO_PB10_IDX)
|
#define USB_VBOF_GPIO (PIO_PB10_IDX)
|
||||||
#define USB_VBOF_FLAGS (PIO_PERIPH_A | PIO_DEFAULT)
|
#define USB_VBOF_FLAGS (PIO_PERIPH_A | PIO_DEFAULT)
|
||||||
/*! Active level of the USB_VBOF output pin. */
|
/*! Active level of the USB_VBOF output pin. */
|
||||||
#define USB_VBOF_ACTIVE_STATE LOW
|
#define USB_VBOF_ACTIVE_LEVEL LOW
|
||||||
/* ------------------------------------------------------------------------ */
|
/* ------------------------------------------------------------------------ */
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Support and FAQ: visit <a href="https://www.atmel.com/design-support/">Atmel Support</a>
|
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef UTILS_COMPILER_H
|
#ifndef UTILS_COMPILER_H
|
||||||
@@ -173,11 +173,11 @@
|
|||||||
# define __always_inline __forceinline
|
# define __always_inline __forceinline
|
||||||
#elif (defined __GNUC__)
|
#elif (defined __GNUC__)
|
||||||
#ifdef __always_inline
|
#ifdef __always_inline
|
||||||
# undef __always_inline
|
# undef __always_inline
|
||||||
#endif
|
#endif
|
||||||
# define __always_inline inline __attribute__((__always_inline__))
|
# define __always_inline inline __attribute__((__always_inline__))
|
||||||
#elif (defined __ICCARM__)
|
#elif (defined __ICCARM__)
|
||||||
# define __always_inline _Pragma("inline=forced")
|
# define __always_inline _Pragma("inline=forced")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -188,11 +188,11 @@
|
|||||||
* heuristics and not inline the function.
|
* heuristics and not inline the function.
|
||||||
*/
|
*/
|
||||||
#ifdef __CC_ARM
|
#ifdef __CC_ARM
|
||||||
# define __no_inline __attribute__((noinline))
|
# define __no_inline __attribute__((noinline))
|
||||||
#elif (defined __GNUC__)
|
#elif (defined __GNUC__)
|
||||||
# define __no_inline __attribute__((__noinline__))
|
# define __no_inline __attribute__((__noinline__))
|
||||||
#elif (defined __ICCARM__)
|
#elif (defined __ICCARM__)
|
||||||
# define __no_inline _Pragma("inline=never")
|
# define __no_inline _Pragma("inline=never")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*! \brief This macro is used to test fatal errors.
|
/*! \brief This macro is used to test fatal errors.
|
||||||
@@ -211,9 +211,9 @@
|
|||||||
# else
|
# else
|
||||||
#undef TEST_SUITE_DEFINE_ASSERT_MACRO
|
#undef TEST_SUITE_DEFINE_ASSERT_MACRO
|
||||||
# define Assert(expr) \
|
# define Assert(expr) \
|
||||||
{\
|
{\
|
||||||
if (!(expr)) while (true);\
|
if (!(expr)) while (true);\
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#else
|
#else
|
||||||
# define Assert(expr) ((void) 0)
|
# define Assert(expr) ((void) 0)
|
||||||
@@ -609,37 +609,37 @@ typedef struct
|
|||||||
# define clz(u) ((u) ? __CLZ(u) : 32)
|
# define clz(u) ((u) ? __CLZ(u) : 32)
|
||||||
#else
|
#else
|
||||||
# define clz(u) (((u) == 0) ? 32 : \
|
# define clz(u) (((u) == 0) ? 32 : \
|
||||||
((u) & (1UL << 31)) ? 0 : \
|
((u) & (1ul << 31)) ? 0 : \
|
||||||
((u) & (1UL << 30)) ? 1 : \
|
((u) & (1ul << 30)) ? 1 : \
|
||||||
((u) & (1UL << 29)) ? 2 : \
|
((u) & (1ul << 29)) ? 2 : \
|
||||||
((u) & (1UL << 28)) ? 3 : \
|
((u) & (1ul << 28)) ? 3 : \
|
||||||
((u) & (1UL << 27)) ? 4 : \
|
((u) & (1ul << 27)) ? 4 : \
|
||||||
((u) & (1UL << 26)) ? 5 : \
|
((u) & (1ul << 26)) ? 5 : \
|
||||||
((u) & (1UL << 25)) ? 6 : \
|
((u) & (1ul << 25)) ? 6 : \
|
||||||
((u) & (1UL << 24)) ? 7 : \
|
((u) & (1ul << 24)) ? 7 : \
|
||||||
((u) & (1UL << 23)) ? 8 : \
|
((u) & (1ul << 23)) ? 8 : \
|
||||||
((u) & (1UL << 22)) ? 9 : \
|
((u) & (1ul << 22)) ? 9 : \
|
||||||
((u) & (1UL << 21)) ? 10 : \
|
((u) & (1ul << 21)) ? 10 : \
|
||||||
((u) & (1UL << 20)) ? 11 : \
|
((u) & (1ul << 20)) ? 11 : \
|
||||||
((u) & (1UL << 19)) ? 12 : \
|
((u) & (1ul << 19)) ? 12 : \
|
||||||
((u) & (1UL << 18)) ? 13 : \
|
((u) & (1ul << 18)) ? 13 : \
|
||||||
((u) & (1UL << 17)) ? 14 : \
|
((u) & (1ul << 17)) ? 14 : \
|
||||||
((u) & (1UL << 16)) ? 15 : \
|
((u) & (1ul << 16)) ? 15 : \
|
||||||
((u) & (1UL << 15)) ? 16 : \
|
((u) & (1ul << 15)) ? 16 : \
|
||||||
((u) & (1UL << 14)) ? 17 : \
|
((u) & (1ul << 14)) ? 17 : \
|
||||||
((u) & (1UL << 13)) ? 18 : \
|
((u) & (1ul << 13)) ? 18 : \
|
||||||
((u) & (1UL << 12)) ? 19 : \
|
((u) & (1ul << 12)) ? 19 : \
|
||||||
((u) & (1UL << 11)) ? 20 : \
|
((u) & (1ul << 11)) ? 20 : \
|
||||||
((u) & (1UL << 10)) ? 21 : \
|
((u) & (1ul << 10)) ? 21 : \
|
||||||
((u) & (1UL << 9)) ? 22 : \
|
((u) & (1ul << 9)) ? 22 : \
|
||||||
((u) & (1UL << 8)) ? 23 : \
|
((u) & (1ul << 8)) ? 23 : \
|
||||||
((u) & (1UL << 7)) ? 24 : \
|
((u) & (1ul << 7)) ? 24 : \
|
||||||
((u) & (1UL << 6)) ? 25 : \
|
((u) & (1ul << 6)) ? 25 : \
|
||||||
((u) & (1UL << 5)) ? 26 : \
|
((u) & (1ul << 5)) ? 26 : \
|
||||||
((u) & (1UL << 4)) ? 27 : \
|
((u) & (1ul << 4)) ? 27 : \
|
||||||
((u) & (1UL << 3)) ? 28 : \
|
((u) & (1ul << 3)) ? 28 : \
|
||||||
((u) & (1UL << 2)) ? 29 : \
|
((u) & (1ul << 2)) ? 29 : \
|
||||||
((u) & (1UL << 1)) ? 30 : \
|
((u) & (1ul << 1)) ? 30 : \
|
||||||
31)
|
31)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -654,38 +654,38 @@ typedef struct
|
|||||||
#if (defined __GNUC__) || (defined __CC_ARM)
|
#if (defined __GNUC__) || (defined __CC_ARM)
|
||||||
# define ctz(u) ((u) ? __builtin_ctz(u) : 32)
|
# define ctz(u) ((u) ? __builtin_ctz(u) : 32)
|
||||||
#else
|
#else
|
||||||
# define ctz(u) ((u) & (1UL << 0) ? 0 : \
|
# define ctz(u) ((u) & (1ul << 0) ? 0 : \
|
||||||
(u) & (1UL << 1) ? 1 : \
|
(u) & (1ul << 1) ? 1 : \
|
||||||
(u) & (1UL << 2) ? 2 : \
|
(u) & (1ul << 2) ? 2 : \
|
||||||
(u) & (1UL << 3) ? 3 : \
|
(u) & (1ul << 3) ? 3 : \
|
||||||
(u) & (1UL << 4) ? 4 : \
|
(u) & (1ul << 4) ? 4 : \
|
||||||
(u) & (1UL << 5) ? 5 : \
|
(u) & (1ul << 5) ? 5 : \
|
||||||
(u) & (1UL << 6) ? 6 : \
|
(u) & (1ul << 6) ? 6 : \
|
||||||
(u) & (1UL << 7) ? 7 : \
|
(u) & (1ul << 7) ? 7 : \
|
||||||
(u) & (1UL << 8) ? 8 : \
|
(u) & (1ul << 8) ? 8 : \
|
||||||
(u) & (1UL << 9) ? 9 : \
|
(u) & (1ul << 9) ? 9 : \
|
||||||
(u) & (1UL << 10) ? 10 : \
|
(u) & (1ul << 10) ? 10 : \
|
||||||
(u) & (1UL << 11) ? 11 : \
|
(u) & (1ul << 11) ? 11 : \
|
||||||
(u) & (1UL << 12) ? 12 : \
|
(u) & (1ul << 12) ? 12 : \
|
||||||
(u) & (1UL << 13) ? 13 : \
|
(u) & (1ul << 13) ? 13 : \
|
||||||
(u) & (1UL << 14) ? 14 : \
|
(u) & (1ul << 14) ? 14 : \
|
||||||
(u) & (1UL << 15) ? 15 : \
|
(u) & (1ul << 15) ? 15 : \
|
||||||
(u) & (1UL << 16) ? 16 : \
|
(u) & (1ul << 16) ? 16 : \
|
||||||
(u) & (1UL << 17) ? 17 : \
|
(u) & (1ul << 17) ? 17 : \
|
||||||
(u) & (1UL << 18) ? 18 : \
|
(u) & (1ul << 18) ? 18 : \
|
||||||
(u) & (1UL << 19) ? 19 : \
|
(u) & (1ul << 19) ? 19 : \
|
||||||
(u) & (1UL << 20) ? 20 : \
|
(u) & (1ul << 20) ? 20 : \
|
||||||
(u) & (1UL << 21) ? 21 : \
|
(u) & (1ul << 21) ? 21 : \
|
||||||
(u) & (1UL << 22) ? 22 : \
|
(u) & (1ul << 22) ? 22 : \
|
||||||
(u) & (1UL << 23) ? 23 : \
|
(u) & (1ul << 23) ? 23 : \
|
||||||
(u) & (1UL << 24) ? 24 : \
|
(u) & (1ul << 24) ? 24 : \
|
||||||
(u) & (1UL << 25) ? 25 : \
|
(u) & (1ul << 25) ? 25 : \
|
||||||
(u) & (1UL << 26) ? 26 : \
|
(u) & (1ul << 26) ? 26 : \
|
||||||
(u) & (1UL << 27) ? 27 : \
|
(u) & (1ul << 27) ? 27 : \
|
||||||
(u) & (1UL << 28) ? 28 : \
|
(u) & (1ul << 28) ? 28 : \
|
||||||
(u) & (1UL << 29) ? 29 : \
|
(u) & (1ul << 29) ? 29 : \
|
||||||
(u) & (1UL << 30) ? 30 : \
|
(u) & (1ul << 30) ? 30 : \
|
||||||
(u) & (1UL << 31) ? 31 : \
|
(u) & (1ul << 31) ? 31 : \
|
||||||
32)
|
32)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -1106,16 +1106,17 @@ static inline uint16_t convert_byte_array_to_16_bit(uint8_t *data)
|
|||||||
/* Converts a 8 Byte array into a 32-Bit value */
|
/* Converts a 8 Byte array into a 32-Bit value */
|
||||||
static inline uint32_t convert_byte_array_to_32_bit(uint8_t *data)
|
static inline uint32_t convert_byte_array_to_32_bit(uint8_t *data)
|
||||||
{
|
{
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
uint32_t u32;
|
uint32_t u32;
|
||||||
uint8_t u8[8];
|
uint8_t u8[8];
|
||||||
}long_addr;
|
}long_addr;
|
||||||
uint8_t index;
|
uint8_t index;
|
||||||
for (index = 0; index < 4; index++) {
|
for (index = 0; index < 4; index++)
|
||||||
long_addr.u8[index] = *data++;
|
{
|
||||||
}
|
long_addr.u8[index] = *data++;
|
||||||
return long_addr.u32;
|
}
|
||||||
|
return long_addr.u32;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Support and FAQ: visit <a href="https://www.atmel.com/design-support/">Atmel Support</a>
|
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _CONF_ACCESS_H_
|
#ifndef _CONF_ACCESS_H_
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Support and FAQ: visit <a href="https://www.atmel.com/design-support/">Atmel Support</a>
|
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CONF_CLOCK_H_INCLUDED
|
#ifndef CONF_CLOCK_H_INCLUDED
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Support and FAQ: visit <a href="https://www.atmel.com/design-support/">Atmel Support</a>
|
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _CONF_USB_H_
|
#ifndef _CONF_USB_H_
|
||||||
@@ -78,6 +78,10 @@
|
|||||||
//! To define a Full speed device
|
//! To define a Full speed device
|
||||||
//#define USB_DEVICE_FULL_SPEED
|
//#define USB_DEVICE_FULL_SPEED
|
||||||
|
|
||||||
|
#if MB(ARCHIM1)
|
||||||
|
#define USB_DEVICE_FULL_SPEED
|
||||||
|
#endif
|
||||||
|
|
||||||
//! To authorize the High speed
|
//! To authorize the High speed
|
||||||
#ifndef USB_DEVICE_FULL_SPEED
|
#ifndef USB_DEVICE_FULL_SPEED
|
||||||
#if (UC3A3||UC3A4)
|
#if (UC3A3||UC3A4)
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
*
|
*
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
/*
|
/*
|
||||||
* Support and FAQ: visit <a href="https://www.atmel.com/design-support/">Atmel Support</a>
|
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef ARDUINO_ARCH_SAM
|
#ifdef ARDUINO_ARCH_SAM
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
*
|
*
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
/*
|
/*
|
||||||
* Support and FAQ: visit <a href="https://www.atmel.com/design-support/">Atmel Support</a>
|
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Support and FAQ: visit <a href="https://www.atmel.com/design-support/">Atmel Support</a>
|
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CHIP_GENCLK_H_INCLUDED
|
#ifndef CHIP_GENCLK_H_INCLUDED
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Support and FAQ: visit <a href="https://www.atmel.com/design-support/">Atmel Support</a>
|
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _MREPEAT_H_
|
#ifndef _MREPEAT_H_
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Support and FAQ: visit <a href="https://www.atmel.com/design-support/">Atmel Support</a>
|
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CHIP_OSC_H_INCLUDED
|
#ifndef CHIP_OSC_H_INCLUDED
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Support and FAQ: visit <a href="https://www.atmel.com/design-support/">Atmel Support</a>
|
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CHIP_PLL_H_INCLUDED
|
#ifndef CHIP_PLL_H_INCLUDED
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Support and FAQ: visit <a href="https://www.atmel.com/design-support/">Atmel Support</a>
|
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _PREPROCESSOR_H_
|
#ifndef _PREPROCESSOR_H_
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Support and FAQ: visit <a href="https://www.atmel.com/design-support/">Atmel Support</a>
|
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||||
*/
|
*/
|
||||||
#ifndef _SBC_PROTOCOL_H_
|
#ifndef _SBC_PROTOCOL_H_
|
||||||
#define _SBC_PROTOCOL_H_
|
#define _SBC_PROTOCOL_H_
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ Ctrl_status sd_mmc_spi_usb_read_10(uint32_t addr, uint16_t nb_sector) {
|
|||||||
{
|
{
|
||||||
char buffer[80];
|
char buffer[80];
|
||||||
sprintf_P(buffer, PSTR("SDRD: %d @ 0x%08x\n"), nb_sector, addr);
|
sprintf_P(buffer, PSTR("SDRD: %d @ 0x%08x\n"), nb_sector, addr);
|
||||||
PORT_REDIRECT(SERIAL_PORTMASK(0));
|
PORT_REDIRECT(0);
|
||||||
SERIAL_ECHO(buffer);
|
SERIAL_ECHO(buffer);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -84,7 +84,7 @@ Ctrl_status sd_mmc_spi_usb_read_10(uint32_t addr, uint16_t nb_sector) {
|
|||||||
card.getSd2Card().readData(sector_buf);
|
card.getSd2Card().readData(sector_buf);
|
||||||
|
|
||||||
// RAM -> USB
|
// RAM -> USB
|
||||||
if (!udi_msc_trans_block(true, sector_buf, SD_MMC_BLOCK_SIZE, nullptr)) {
|
if (!udi_msc_trans_block(true, sector_buf, SD_MMC_BLOCK_SIZE, NULL)) {
|
||||||
card.getSd2Card().readStop();
|
card.getSd2Card().readStop();
|
||||||
return CTRL_FAIL;
|
return CTRL_FAIL;
|
||||||
}
|
}
|
||||||
@@ -108,7 +108,7 @@ Ctrl_status sd_mmc_spi_usb_write_10(uint32_t addr, uint16_t nb_sector) {
|
|||||||
{
|
{
|
||||||
char buffer[80];
|
char buffer[80];
|
||||||
sprintf_P(buffer, PSTR("SDWR: %d @ 0x%08x\n"), nb_sector, addr);
|
sprintf_P(buffer, PSTR("SDWR: %d @ 0x%08x\n"), nb_sector, addr);
|
||||||
PORT_REDIRECT(SERIAL_PORTMASK(0));
|
PORT_REDIRECT(0);
|
||||||
SERIAL_ECHO(buffer);
|
SERIAL_ECHO(buffer);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -120,7 +120,7 @@ Ctrl_status sd_mmc_spi_usb_write_10(uint32_t addr, uint16_t nb_sector) {
|
|||||||
while (nb_sector--) {
|
while (nb_sector--) {
|
||||||
|
|
||||||
// USB -> RAM
|
// USB -> RAM
|
||||||
if (!udi_msc_trans_block(false, sector_buf, SD_MMC_BLOCK_SIZE, nullptr)) {
|
if (!udi_msc_trans_block(false, sector_buf, SD_MMC_BLOCK_SIZE, NULL)) {
|
||||||
card.getSd2Card().writeStop();
|
card.getSd2Card().writeStop();
|
||||||
return CTRL_FAIL;
|
return CTRL_FAIL;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
*
|
*
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
/*
|
/*
|
||||||
* Support and FAQ: visit <a href="https://www.atmel.com/design-support/">Atmel Support</a>
|
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user