Compare commits
1493 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| dc6d166567 | |||
| 333608a692 | |||
| e99d801e6b | |||
| 0ac1435a8c | |||
| 584abc5835 | |||
| 73fa80f128 | |||
| 7fcc605595 | |||
| 35319049fe | |||
| 544cde20fb | |||
| 084b065f46 | |||
| ec8a6fc7e2 | |||
| 3d7f84dbb6 | |||
| 7b70e39ff6 | |||
| 58bce3781e | |||
| 578ee04243 | |||
| d061e6dbd6 | |||
| 12ac094992 | |||
| ac0fc603ae | |||
| e3ef8d2089 | |||
| b9f0c68e3c | |||
| 64182d60aa | |||
| 3e4344ad7a | |||
| efb58a9a0d | |||
| 2700af52c8 | |||
| c420a0b96a | |||
| 1832500eca | |||
| 5bbf953711 | |||
| 1f38b509e1 | |||
| 38d9b97bbd | |||
| c1908c865e | |||
| ba34902610 | |||
| e35bedab48 | |||
| 50297c65d4 | |||
| fe1d6f93e2 | |||
| 46ee5b0a08 | |||
| 9da6b580d9 | |||
| ccc69582ef | |||
| 8dee0c1281 | |||
| 06c6c479dd | |||
| 402aab968c | |||
| bf7433c937 | |||
| 81a9eb27ad | |||
| 6ed3ea9a6b | |||
| 371ab1eea2 | |||
| e38075710d | |||
| ea2e832dc8 | |||
| 85b82e3ab6 | |||
| 543af426ef | |||
| 646f4c7d69 | |||
| 9788a35107 | |||
| 2774ee8290 | |||
| 4f39b9c09d | |||
| e6a615d882 | |||
| 9d55440d38 | |||
| c7e6b7924a | |||
| c6f4bc1aa1 | |||
| 98c72a3b65 | |||
| ef8873d6ef | |||
| eb2b8a1ddb | |||
| a1a9904d32 | |||
| 1f3309ac06 | |||
| b9e89a5378 | |||
| e2250ce037 | |||
| f872750b70 | |||
| c9488b4f63 | |||
| 8cd9c06084 | |||
| 1c6b723ee6 | |||
| 0f044f76ec | |||
| 8342a5a83e | |||
| e3fa27ac9f | |||
| 3293b2780e | |||
| ebf9aa5c82 | |||
| 54fe84ea32 | |||
| b0f6155d99 | |||
| ba8b685ede | |||
| 579545177d | |||
| 10009b018d | |||
| 689c7b83e1 | |||
| 9393c1ed1b | |||
| cda684b6fd | |||
| a420e3c155 | |||
| 88a4e55945 | |||
| 27dcfe0ea8 | |||
| cf609152c2 | |||
| 6e01ba3ce8 | |||
| cf9f205030 | |||
| 59cee1cb87 | |||
| e53f2a3d82 | |||
| 412513be43 | |||
| f946b60670 | |||
| 90363cefd0 | |||
| 07630e6559 | |||
| 5b34686dda | |||
| 667aa15b87 | |||
| f48aa53d7c | |||
| dd3c3d09f2 | |||
| d1f2b2d27b | |||
| 2073b67e45 | |||
| e176df1e6d | |||
| f6dbb59748 | |||
| 39697628e7 | |||
| e9c5b99722 | |||
| 8e9e039672 | |||
| ce7edc6223 | |||
| 924c2ca0fe | |||
| e0f0a9491d | |||
| 8547f4f5b9 | |||
| ac5836a2a2 | |||
| 6b14b948a9 | |||
| 1774dbd539 | |||
| e9810691ec | |||
| 29ad078fda | |||
| 0c4beea9be | |||
| 79bd65be35 | |||
| 150425e480 | |||
| 61cc3cdf09 | |||
| 252085f462 | |||
| 1ead60ec46 | |||
| 5a0923ed28 | |||
| 40beddeaa3 | |||
| 05a64e2013 | |||
| 3fc45df62f | |||
| 9c3d74f6d1 | |||
| bdfb0cc63f | |||
| 8bf127afe6 | |||
| 33ad711ee8 | |||
| 20e99497dd | |||
| baa20d9ea2 | |||
| 367bcedea7 | |||
| 5d59779a80 | |||
| 1c19cfcbc7 | |||
| 14a83342e1 | |||
| f11f42a23e | |||
| 4bfbe70d66 | |||
| 93394f1ff5 | |||
| fa4b73ee04 | |||
| 5249d10369 | |||
| 89a43a8b1a | |||
| db279967da | |||
| 41c860dce1 | |||
| bfb5430217 | |||
| e1e13ad72c | |||
| c941ce1a5b | |||
| 7c760bd232 | |||
| 42dc89ad32 | |||
| 3a9394c308 | |||
| 97b5c2d3ea | |||
| f635a9d0c3 | |||
| d7550018e3 | |||
| 6918959c07 | |||
| 908d30d4ce | |||
| 49b11f9490 | |||
| d09bf9d088 | |||
| 47727cf0ae | |||
| 51ce1a147d | |||
| 0f6f125724 | |||
| 52a4954b8a | |||
| 4cab99e1d1 | |||
| 2c57b184da | |||
| 14b5d5ba84 | |||
| 5bd28cd840 | |||
| fbc2c76870 | |||
| 4349f4ab0c | |||
| 9eea88bbfc | |||
| 3a77a7eefd | |||
| 788e86ccc6 | |||
| 27da1995f3 | |||
| e3a5319e3c | |||
| e4bc675fbf | |||
| 898dd19175 | |||
| 1b307f7c99 | |||
| d5977e7e2d | |||
| 7aaaaec355 | |||
| 8acd39c494 | |||
| cfac549240 | |||
| 0279f9cf09 | |||
| 37b5b49cce | |||
| 1a5550f643 | |||
| a3929b435b | |||
| 7e6e25929b | |||
| f2b2389b8f | |||
| 9012b9a993 | |||
| fde861ab8c | |||
| 9f0fa5a040 | |||
| fb95e66652 | |||
| c44b9c1c28 | |||
| 3753cb9a94 | |||
| 81d8663f1f | |||
| 2860d048e6 | |||
| cc20b30775 | |||
| 21f0333b43 | |||
| 70d910ac8e | |||
| 23e7905b20 | |||
| 5e1a1fffcf | |||
| e48dd40b53 | |||
| 4ddf626d46 | |||
| 991fc9cf63 | |||
| ef3e9134dc | |||
| 35da223f0a | |||
| 0937fe55a4 | |||
| de98df1651 | |||
| d7156decdc | |||
| e43c2752c7 | |||
| bdf8b0703a | |||
| a506701a8b | |||
| b60838508b | |||
| 0f76f17f16 | |||
| c00415b017 | |||
| 3b149c3505 | |||
| d20d1f8712 | |||
| c626e3efb2 | |||
| 1cea29598c | |||
| cb0706f9cc | |||
| dadbedc4fd | |||
| 3165beeba0 | |||
| 1c9b1240ec | |||
| 122dfa13a2 | |||
| b32a818f37 | |||
| d8b83160ab | |||
| 98d79fb8bb | |||
| eaefa299fb | |||
| ba840750a0 | |||
| cdc960fd1d | |||
| c0a544d385 | |||
| 84b22fcc1d | |||
| c6cd10a92d | |||
| d08a7d4fd2 | |||
| 0ee1c1e4e1 | |||
| dc9e57464f | |||
| 657929740f | |||
| 6e74409c14 | |||
| 5af8425776 | |||
| 0ca860b292 | |||
| 4dd5b713eb | |||
| 0628573fc3 | |||
| 52cc705e60 | |||
| 2f987accaa | |||
| 66aa848b2f | |||
| 6f3de26a4d | |||
| b723e3fd02 | |||
| 7e4c6db12d | |||
| e228a222a3 | |||
| fdac56da15 | |||
| 7e62b60c94 | |||
| b6b0fccd5f | |||
| f2f6b6bd85 | |||
| 6ff18a942c | |||
| 25a2a89517 | |||
| 5917aa73b5 | |||
| d0dc3b619f | |||
| d628d7de44 | |||
| 8fe6bc6745 | |||
| dcbcbb54f9 | |||
| 41f9eec4df | |||
| 33e942514b | |||
| 2aa9f70f5e | |||
| 8aac26275e | |||
| 294903439a | |||
| daa68d560e | |||
| 4ce809380b | |||
| a614352fcf | |||
| a54daeeb39 | |||
| fc4abd1335 | |||
| 881ee69f34 | |||
| 5a8b9d649a | |||
| e80d8e9dcf | |||
| 950d141958 | |||
| 52ea53a3dd | |||
| 7526309ccf | |||
| 4342a0f512 | |||
| 4bca73dc5a | |||
| 67dc3e432f | |||
| 349c3a7243 | |||
| 1bee2dab60 | |||
| 1e51ff1306 | |||
| aa0558eb3a | |||
| 0878147f31 | |||
| 7086ca632f | |||
| 93783e993b | |||
| ab69f87989 | |||
| b0c0074092 | |||
| 2110215a16 | |||
| 50d847a2fe | |||
| 61c57825d7 | |||
| f81ca65a16 | |||
| a020a09903 | |||
| 6361146f0f | |||
| 4fb984e960 | |||
| 081458a3c8 | |||
| 02fe1ff95e | |||
| beb3a0fc4b | |||
| 71834e204b | |||
| 9417af14e9 | |||
| 84448a78be | |||
| 1244a21a21 | |||
| eff0de499f | |||
| de1b97a0ce | |||
| 624f429086 | |||
| 0303a1bfb0 | |||
| 573c21e690 | |||
| 80b8e66189 | |||
| 8ec9c37940 | |||
| 2e8833e315 | |||
| c403381172 | |||
| 02e5225e10 | |||
| 28839c60da | |||
| e7ac0d14cd | |||
| 9a23bcec0b | |||
| 6b9ec417b6 | |||
| 66474f6a13 | |||
| 4f0329bb43 | |||
| dc6f23e435 | |||
| c7fc6eeb1e | |||
| 72c0437b48 | |||
| a6377e5215 | |||
| 0459407a8e | |||
| 685ccf3fdf | |||
| de219dcd63 | |||
| cdc996dd68 | |||
| fe6eb1745f | |||
| 533d752707 | |||
| 037b0096e2 | |||
| eefd63e408 | |||
| 5e410e35ab | |||
| 62bb61b3d9 | |||
| a7f12169b9 | |||
| 29ceba972c | |||
| 7965e066c7 | |||
| f499735280 | |||
| 1e03f696f5 | |||
| 7ac308fe4d | |||
| 54a7ce999f | |||
| 89416a583c | |||
| 9ad9323aac | |||
| cf7f5bcdee | |||
| 950f492ce7 | |||
| 1bb1603886 | |||
| 68dc89cf75 | |||
| c2d586cf5f | |||
| fbce327402 | |||
| c09638f821 | |||
| 348099dabb | |||
| fbee2a2ff7 | |||
| 781d9c470e | |||
| 5a5354107b | |||
| 127bc94891 | |||
| fca60335e1 | |||
| 27621290b8 | |||
| 951b8be3a1 | |||
| f1bb46f5b8 | |||
| 3bb9364c44 | |||
| 7df503de93 | |||
| 098e0961dc | |||
| 6ea4a16212 | |||
| 9f6cafbae3 | |||
| 8c6e9526b0 | |||
| cc05123a80 | |||
| 823014868c | |||
| 7c30124f80 | |||
| 3ddf728333 | |||
| 9dbce712fc | |||
| b59251c388 | |||
| c377237fd8 | |||
| a2452a577b | |||
| a6bfdf351f | |||
| e8f2430dac | |||
| 8f19e2d7d4 | |||
| a270cc36e6 | |||
| fa25737a9f | |||
| 38eee76839 | |||
| 5b59424447 | |||
| c20c6b61f1 | |||
| d0e8edad3c | |||
| 88d368ad9d | |||
| 843f79589c | |||
| 3494482cb0 | |||
| 09e336f78c | |||
| 3572fd75b5 | |||
| ebecd76492 | |||
| 3f3c8257f7 | |||
| e9ae5208cb | |||
| fde0eaf1e7 | |||
| 122c4116f2 | |||
| 21559b0c59 | |||
| 0916d32589 | |||
| af7b126edc | |||
| bc990ccca6 | |||
| c7bcbf944e | |||
| 7f9eb688ad | |||
| dbd60fb38e | |||
| 6a871b2879 | |||
| bd9d7a3c4d | |||
| 2976bb48ed | |||
| 4f93f31af0 | |||
| d76c8c1fbd | |||
| 86c564121e | |||
| db137df6df | |||
| 202ec4b58f | |||
| 1258657b8d | |||
| f49e730b23 | |||
| aa02bb05d3 | |||
| e7662920a6 | |||
| 9c9ed690f7 | |||
| a4382b4dcd | |||
| d5723fcafd | |||
| af553d5fbd | |||
| 3cd945ab5d | |||
| ade6dbf01e | |||
| 88a8e2127d | |||
| fe747ae4bf | |||
| bd4900d6cd | |||
| 8643fa0afb | |||
| 487542083b | |||
| b79f7f203a | |||
| 0927e49756 | |||
| fbea4c6048 | |||
| 4a0b3d1c9b | |||
| 8e0f271f55 | |||
| 8f13c1ecb2 | |||
| 10ecea62c1 | |||
| 7a841cd8cf | |||
| c8265d61d5 | |||
| eaa836b6fc | |||
| 5a88a80690 | |||
| 12fdde24d8 | |||
| 471228018a | |||
| 4de6d655ac | |||
| b12028f4dd | |||
| 54c1a1df4e | |||
| fad7bc66e9 | |||
| 6cda10de0f | |||
| b22df8b189 | |||
| 94e2558e6c | |||
| fd117480d2 | |||
| 72f3a4ac31 | |||
| aa7af2e2ea | |||
| a4d254ee62 | |||
| 222efe1382 | |||
| d806175a80 | |||
| 5266ffb922 | |||
| b7a1681d38 | |||
| 3a3c3b8a22 | |||
| 67948ad6c6 | |||
| e2583b4f85 | |||
| c9e7d6f55c | |||
| 735cd9a092 | |||
| 555b080d85 | |||
| 44ef6e2b70 | |||
| 9bbbcd439b | |||
| cbe8a6867c | |||
| 1f31027fd2 | |||
| 4e1e7fa1b0 | |||
| 414951e42c | |||
| a8d18a0554 | |||
| b9ffe93d1f | |||
| 0c72dc376c | |||
| 019915b097 | |||
| b74c81d3e4 | |||
| e16885c558 | |||
| 4096beaf52 | |||
| 48cc310c58 | |||
| 1c719fd10d | |||
| e3433ea599 | |||
| 585cbbb203 | |||
| fea70777df | |||
| 827c03b056 | |||
| 85f6090f20 | |||
| 99c29cd924 | |||
| f78aaf9562 | |||
| 38d6d61912 | |||
| 4d8f82df32 | |||
| 75d60b77ba | |||
| f60bc278fa | |||
| e0d8ea57a8 | |||
| ad71b81b0c | |||
| 1383a4e413 | |||
| 06ef78dd19 | |||
| 5c0e8d594d | |||
| d16667838f | |||
| 62f2b8fc17 | |||
| 1e6326e85f | |||
| e3a28afd51 | |||
| ef9cec9e40 | |||
| 3df75188f3 | |||
| 7ee745b2da | |||
| 3696cc3513 | |||
| efd875766a | |||
| 21dadce958 | |||
| 4b419eefd2 | |||
| 28a1355f29 | |||
| 9a901941aa | |||
| db3c5dd877 | |||
| 24928f93ba | |||
| 1e009c2aa5 | |||
| d434729da6 | |||
| b23f86f83f | |||
| d3687d933c | |||
| 4b32be9df0 | |||
| f6c8915545 | |||
| b97b09413f | |||
| 87f26e77ff | |||
| 26b3f0b00f | |||
| 067c830e84 | |||
| d40bf0d6b2 | |||
| d009c48b11 | |||
| 3c32770faf | |||
| a653c3aca0 | |||
| 766210b8f1 | |||
| b5c05e32ea | |||
| 1d702b3601 | |||
| 2e7b7c8b72 | |||
| 7b083be5c5 | |||
| 65b8ced80c | |||
| 4ea75ad284 | |||
| 58f03953b8 | |||
| 62c1c116f7 | |||
| bd382fb8a1 | |||
| f3be22c4ff | |||
| 8867c45831 | |||
| c0e108b21d | |||
| f149e14d1a | |||
| 1242e875aa | |||
| 1d4c002c2a | |||
| 7cd1b7708f | |||
| 5e8a5230a3 | |||
| b5d7b4aee6 | |||
| 7d82f95df8 | |||
| 69464790e2 | |||
| db42741537 | |||
| 9a6bf16938 | |||
| c173ecd89a | |||
| aee25d75ea | |||
| a55355d088 | |||
| 6d2dfcaa1c | |||
| d1947fac07 | |||
| 893dddcbd1 | |||
| 8cb6e57789 | |||
| 47820cac8a | |||
| 6f5e6fd25b | |||
| db4990f2c4 | |||
| cbd79a5e87 | |||
| bdc0bd0eef | |||
| ed4afab004 | |||
| 6984c7f308 | |||
| 7bfecf659b | |||
| d7b73542a1 | |||
| 9f0879785e | |||
| bc85f5bebf | |||
| 493c5eec21 | |||
| 489727330b | |||
| c5de0c69e5 | |||
| 7a257ef3e1 | |||
| c080518b12 | |||
| c6dad4d1aa | |||
| a4c35b1555 | |||
| 9758f5e0ce | |||
| 2f7d88d5c3 | |||
| 13db322f0e | |||
| 30a10077cf | |||
| 26551c17c2 | |||
| a80e790cf6 | |||
| 546a014a59 | |||
| 2004198b07 | |||
| 59423da42f | |||
| 99b790cc92 | |||
| 766dfda80e | |||
| d638ee02c6 | |||
| 15ce5d0612 | |||
| d2b47c354c | |||
| 43177af21c | |||
| 73ed54308a | |||
| fd17cc962b | |||
| aad10ea1c7 | |||
| 849e432d62 | |||
| 78d6fec652 | |||
| f6eaca6fcd | |||
| efa175820f | |||
| 448ff71899 | |||
| c1e8d46d21 | |||
| b5068bbc17 | |||
| 9a8ad9d101 | |||
| 5c59abaf6f | |||
| 460bf112d8 | |||
| 7bd74fecbb | |||
| add72fd045 | |||
| ac5fa61de5 | |||
| dda42fb599 | |||
| a8fea3d674 | |||
| 1701fd8f64 | |||
| 14fa705771 | |||
| 91a87f45d9 | |||
| 363f324179 | |||
| a68b70de15 | |||
| c29b44fcca | |||
| 2cf4d02a32 | |||
| 9a8b1eab93 | |||
| 57fe45a2a6 | |||
| 5d755676a9 | |||
| d9f2c6444f | |||
| 4895388909 | |||
| c7e64371c9 | |||
| 58749a9a0e | |||
| 26aac7aaab | |||
| a7684ecd67 | |||
| fc49efcaef | |||
| 4f3279fa31 | |||
| 719bb9c03b | |||
| 15ee0d0e08 | |||
| 23fa94178e | |||
| 4ad6fa59df | |||
| 367cea0d0d | |||
| a4fbbf9075 | |||
| 0a07bba213 | |||
| 25e6852022 | |||
| 5edec5b3a3 | |||
| 2f4f2bce15 | |||
| 0d87dd9d51 | |||
| e11a5ee717 | |||
| e8c0363051 | |||
| 2d6454b352 | |||
| 28548efa75 | |||
| da0bef50e1 | |||
| b954959f55 | |||
| 434bf81f8e | |||
| 82d3d78e31 | |||
| fb4d465360 | |||
| 3827ceaf66 | |||
| 6ba08130f0 | |||
| 78f871567f | |||
| 9e30173b13 | |||
| f0bd400002 | |||
| 0fa3d2642a | |||
| 4cf4647c9a | |||
| 5766dc0ece | |||
| 01990f2bf4 | |||
| d74ee8ccc4 | |||
| 953b6844ca | |||
| e6ccf3b72b | |||
| d9229ff355 | |||
| ee35929b61 | |||
| 07b979012a | |||
| 126e78dcce | |||
| e02de3a256 | |||
| 97a7c2160e | |||
| caf5d5b134 | |||
| 05a46084b6 | |||
| e676d833a3 | |||
| 73a0f33767 | |||
| e787c8f26b | |||
| 147dcaf600 | |||
| dd3bf2995b | |||
| 142177426b | |||
| 072b90d105 | |||
| efba06c4ce | |||
| 2cc35a9ad1 | |||
| b748506230 | |||
| c3a4ef77af | |||
| 86c1fde309 | |||
| 89def456e8 | |||
| 0518737119 | |||
| 12b3f18bb2 | |||
| 4d0c6841f8 | |||
| 99c3a7136d | |||
| cd3997f045 | |||
| 479074ccba | |||
| a21fc27056 | |||
| 485fbf2040 | |||
| 09a519bfb5 | |||
| 81ef02e41f | |||
| 0226692e6b | |||
| 0cd1d9c3c9 | |||
| ab7137ab8e | |||
| 84113367fc | |||
| c24ecfb6f0 | |||
| 442f0baf14 | |||
| 40aab1e298 | |||
| 09fbe372da | |||
| 279a393e81 | |||
| 1e2e0c3a36 | |||
| 86f03cf57a | |||
| 7f598ae66d | |||
| 0a598071af | |||
| 861dd33fa1 | |||
| ac14c65643 | |||
| 0f7fb5d88d | |||
| 428f721cbf | |||
| 31bc23b6e3 | |||
| a1ba166740 | |||
| 88829bd92d | |||
| 7e0208940b | |||
| 12d491c5f7 | |||
| 29635232d3 | |||
| 4e72b17a88 | |||
| 8b8c862615 | |||
| 45ca25a4ab | |||
| 8f35e9a797 | |||
| b4688346ab | |||
| e0c60a83a2 | |||
| b7358449e0 | |||
| 85ebd170a9 | |||
| 70cdfbe8fc | |||
| 5dc55150bd | |||
| ef34fd1a3f | |||
| 854cfc016d | |||
| b7f628ce2f | |||
| f54ec92ba8 | |||
| 2e142725a6 | |||
| 6eca4bbab1 | |||
| de7ac7f594 | |||
| 28c591309f | |||
| 55add905cb | |||
| 8d7ecad531 | |||
| a7d79618b9 | |||
| acd825972c | |||
| 7eee772f60 | |||
| 63bc413da8 | |||
| 22977c885b | |||
| de76f2f21a | |||
| d57feeadaf | |||
| 36623a2382 | |||
| 83278bdc17 | |||
| 30697cb53f | |||
| 4eb8a87193 | |||
| d2814c7aa7 | |||
| 6f71a14150 | |||
| 1067950697 | |||
| 7b7add3843 | |||
| 05e67a9262 | |||
| c4ef2d63e1 | |||
| 2a137d6744 | |||
| c0becd6ce1 | |||
| d5dfd18c24 | |||
| dcc10565f8 | |||
| 4c388d7118 | |||
| 94ca5487ab | |||
| a23212bd95 | |||
| a748eaade7 | |||
| ba88365364 | |||
| 8d9db0f899 | |||
| 23bc810e6e | |||
| 7ad4de2c08 | |||
| d21e1d4dc8 | |||
| 8b7cfa0429 | |||
| 906dcc7536 | |||
| 061e026384 | |||
| 5d591fd91d | |||
| 854da5fd9e | |||
| 7e45d56e66 | |||
| 71ce7803e7 | |||
| c5bf705717 | |||
| e82b4e98a4 | |||
| c271a89a4f | |||
| ea993a657f | |||
| 5813488412 | |||
| a365163ff0 | |||
| 4668b27158 | |||
| e733e50207 | |||
| 5549d07da3 | |||
| 257ffe98b1 | |||
| 2ed5937daf | |||
| 00c28eb9e3 | |||
| 63a7d42f30 | |||
| 94bd6d52e9 | |||
| 9cbab467b4 | |||
| db7828504e | |||
| 4797f25428 | |||
| 6bd541d730 | |||
| 3591eb5d5d | |||
| 22182d9a98 | |||
| 1f61b743a6 | |||
| f071274493 | |||
| 2a4a89d8cb | |||
| a9f44e37a9 | |||
| af05b6e482 | |||
| 2b39e51a40 | |||
| 37f490fdd0 | |||
| c57f715d00 | |||
| 580c99ece2 | |||
| eaab2dea92 | |||
| a7bd35b993 | |||
| 8d864d797a | |||
| 61649aa3c0 | |||
| 220cd5a640 | |||
| 72f2657a0e | |||
| fb61a50e21 | |||
| 21257f7e21 | |||
| 8df61893c3 | |||
| 095f060c24 | |||
| f5a5d7a620 | |||
| fabc2002ed | |||
| 3f264942cb | |||
| 3810986dba | |||
| 5951e646d0 | |||
| d4c34205b5 | |||
| c6bbed7cdb | |||
| a531c01889 | |||
| 0f0e239264 | |||
| fa55caed1f | |||
| bf98c16a00 | |||
| 72603b627a | |||
| 284d07d4d8 | |||
| 09a290cc61 | |||
| 25b9bb35ab | |||
| 9e96b89856 | |||
| 92efc33ace | |||
| 81bad7b124 | |||
| 1df97254cb | |||
| aa80cb0620 | |||
| 4b6109f4e7 | |||
| 70c3060769 | |||
| 472f1ece2a | |||
| f6c58c59c3 | |||
| e6099fd83f | |||
| 13af4e1ef1 | |||
| 4869a3ffd9 | |||
| c2d0008d2a | |||
| 68ae15e2df | |||
| 91e4811534 | |||
| d2fab914cd | |||
| 846ec6c66b | |||
| d876b5ee3c | |||
| 98ae2ad60a | |||
| a261a5b9a6 | |||
| a7fcb495e4 | |||
| ea554a0609 | |||
| 08717d3f60 | |||
| 7b104a108f | |||
| 9133a2f0f5 | |||
| dff2104c96 | |||
| 163ca2783f | |||
| 16f28e747b | |||
| 3b7aadb359 | |||
| 9e8d561549 | |||
| b4a3e29fb6 | |||
| d2bda128ab | |||
| f8bbabfa31 | |||
| fc769ef023 | |||
| 9192ae5213 | |||
| 4c0e612376 | |||
| b9f7d721ed | |||
| b43d6ed5d3 | |||
| e824e16a41 | |||
| 0b72b8d819 | |||
| 37eb8bb1d5 | |||
| d2ff2adabd | |||
| f31cc84c2b | |||
| 8beec5eaa5 | |||
| 4e41ff32e1 | |||
| cf137cb73a | |||
| d5cc11d996 | |||
| d62a631467 | |||
| d6c3f45bda | |||
| 81760d6818 | |||
| 282f90c1b3 | |||
| 5de9fc556f | |||
| 3482e9632c | |||
| a6493e0cc8 | |||
| a08a7b3459 | |||
| bd4936330b | |||
| 4bb33a0cb9 | |||
| 83e38b3625 | |||
| 5b7bb3ea64 | |||
| f0b115a999 | |||
| cebed347f5 | |||
| a66b22c4f1 | |||
| fadaa2db09 | |||
| f8954ca79b | |||
| 4a3f69ad6d | |||
| 4bf13bea42 | |||
| 3a6bd6920e | |||
| 70ef7978b4 | |||
| 37bc552f3b | |||
| e310f20279 | |||
| 4708635f4f | |||
| f5d5b0a881 | |||
| 30f5dd339d | |||
| 556d716919 | |||
| 76afd5afc1 | |||
| 5c3bc2194a | |||
| 763cd7c5f2 | |||
| 11046b23a9 | |||
| 36b72926f3 | |||
| b35e16b1d8 | |||
| 767c87810b | |||
| 52b6c45451 | |||
| df5d08aec0 | |||
| 8c61606691 | |||
| e70bd3c785 | |||
| 83cc983276 | |||
| bbb8275d66 | |||
| 2afc2f268a | |||
| aa44542f76 | |||
| 248648708f | |||
| e2c0150fa8 | |||
| 4ef5372151 | |||
| a923771611 | |||
| 74ffa0cc3e | |||
| f2d585ac7f | |||
| 80cfdb182c | |||
| 39463268fb | |||
| a7b3989bca | |||
| 829212d76a | |||
| 0de4a70203 | |||
| febfb3218e | |||
| 4da46c5dd2 | |||
| 353ede8208 | |||
| 09de5e76a7 | |||
| 73b6ba8fe3 | |||
| 72b09fe4cb | |||
| e5ad13a8e2 | |||
| b122e46adb | |||
| 1a5866f5c6 | |||
| c7e62b33d1 | |||
| 1916d4e27f | |||
| ce55a7bd9b | |||
| 540120f863 | |||
| b99a26d6ab | |||
| 6528109176 | |||
| b94a0d036c | |||
| 7634ffe8e5 | |||
| 8bae8bbf7a | |||
| 5ce013f414 | |||
| da4a374b49 | |||
| 81b13456b1 | |||
| ee35fb07b0 | |||
| 99c991755a | |||
| a96ae85d88 | |||
| 45b9680c57 | |||
| 83cbed8527 | |||
| d36d9cb506 | |||
| 9e6981ea60 | |||
| 2c6f8a30f3 | |||
| 17a5a1f97d | |||
| a0815deb9a | |||
| 76a7ab6893 | |||
| 7cd56a57f9 | |||
| 56e2b60e6d | |||
| 8c15a093fd | |||
| 7901eb97ad | |||
| 7aaba66d4d | |||
| 5f0b9d429f | |||
| d34b62eafa | |||
| 3743980192 | |||
| 41d53a15f2 | |||
| f234fbf87f | |||
| 5c728d1fb1 | |||
| 162ea81894 | |||
| 97b9fe83ee | |||
| 9953230550 | |||
| 80bd10025b | |||
| 0876bcd027 | |||
| 3d7ac162fb | |||
| 68a2459808 | |||
| 21fddc1cc8 | |||
| 528a1ad3e0 | |||
| dabe374983 | |||
| 8ac0f14796 | |||
| 934fc52d06 | |||
| cf46d1880c | |||
| 4f159a94cd | |||
| b53e14c7f8 | |||
| 94e9f26544 | |||
| 9e87af70b7 | |||
| fe56f5d3a6 | |||
| 90e5826256 | |||
| bb73c335a5 | |||
| 4c1f76567c | |||
| d193c814d3 | |||
| 2cb252da4a | |||
| 9a04c32f7f | |||
| 3b8e9fdd25 | |||
| e0b045da49 | |||
| 4220491a23 | |||
| 3abe1fcf20 | |||
| 02ed020f3f | |||
| 934ac24ad8 | |||
| e2d8b2fc26 | |||
| 3e8483d389 | |||
| a9c529f004 | |||
| a664587219 | |||
| 1619838592 | |||
| 98a33d37c7 | |||
| 12a2e5ae1b | |||
| 9b472a02e9 | |||
| c84bea7110 | |||
| 20f71fafa7 | |||
| 056e5a430e | |||
| 21a604407d | |||
| deb076b9cd | |||
| b8e2ad9d8f | |||
| 0cd9643957 | |||
| 8c78315f71 | |||
| 35dad3fdfe | |||
| bebf5dc6ab | |||
| 2fd1c48e1a | |||
| 301727defc | |||
| 1afd53a933 | |||
| 381aeb94c6 | |||
| 4a36520820 | |||
| 430eedf5c0 | |||
| 793a851d10 | |||
| 2d609487ac | |||
| 295f50379f | |||
| ecfff5099a | |||
| 986344640f | |||
| 69f69606e6 | |||
| 2aa2e5487a | |||
| 23d9020a65 | |||
| 43d9d1ce1b | |||
| ed7f3b21c0 | |||
| b062a3b226 | |||
| 89b0143b09 | |||
| 0790a9d5df | |||
| e05ac66561 | |||
| 3b33f7ec03 | |||
| b94c75bcda | |||
| 8dc8906d78 | |||
| ab684dc484 | |||
| 37fb26b557 | |||
| 7397e5a41d | |||
| 4a9d380117 | |||
| 0ec1a54309 | |||
| ab6e68c312 | |||
| c509603530 | |||
| e5ce65c32b | |||
| 851257c44b | |||
| 1662e953fc | |||
| dde89795c9 | |||
| 6e69ff93ef | |||
| 01b7d6c413 | |||
| 58398832a1 | |||
| 29469a0615 | |||
| b4dd20c0eb | |||
| eab13752dd | |||
| ad60cdd030 | |||
| 78e111a4d0 | |||
| 5558729562 | |||
| 2d32f7c377 | |||
| bcbdac6f6c | |||
| acc8bf1c79 | |||
| 4f107e9fee | |||
| 7844f3fa4f | |||
| 2f3af438ee | |||
| 4483aa5b45 | |||
| 20e6b6315e | |||
| ca4248bdd5 | |||
| 4a5d8ba87e | |||
| 7a5d849857 | |||
| 95c23e55a4 | |||
| 94ce0d24d6 | |||
| cdea1b8460 | |||
| cc122bec82 | |||
| 6afaf0034c | |||
| 7f0d7e760b | |||
| 69004322f6 | |||
| 7441094a41 | |||
| 29a5006df9 | |||
| 1aca038daf | |||
| ce92eb46ec | |||
| c852e9c6a1 | |||
| 2b8db0c2e2 | |||
| 74f297c871 | |||
| 76411392b7 | |||
| 74c81117c3 | |||
| 6f04d8dc77 | |||
| ade05c045e | |||
| 5140726c70 | |||
| 5334a8f0ed | |||
| ee99eed3bf | |||
| 9a5f1d2f51 | |||
| 170df9040b | |||
| f0bc4274f8 | |||
| 20a704b154 | |||
| 30a70c480c | |||
| 1d5e9c7dee | |||
| b8ab2d4987 | |||
| ce796cec97 | |||
| ad4de747ad | |||
| 95c1b7fb31 | |||
| 29b742cfc4 | |||
| 57bda2ff3b | |||
| 228179e09b | |||
| c961f3ab2b | |||
| 3469cb9d24 | |||
| 6c09b83f30 | |||
| 17a1363f4d | |||
| 115350317c | |||
| 44c2682168 | |||
| 8b81aae870 | |||
| 72a2699b10 | |||
| b7c07f1329 | |||
| 2b9a62093a | |||
| 3385b4c280 | |||
| 7c1f82cd96 | |||
| 9ebfdc4a86 | |||
| 586313c2fb | |||
| 571783fc04 | |||
| 4af5229cee | |||
| e0dcc610da | |||
| 4aff10785e | |||
| d0e110d666 | |||
| 10ffb9cb68 | |||
| b303bb1e56 | |||
| e6a61b182f | |||
| 785b1da021 | |||
| a4d20031ec | |||
| 3c60145792 | |||
| f2940adcf1 | |||
| b5b9cc0b79 | |||
| 1d1eb97567 | |||
| 0103cffcd0 | |||
| 6fed66dd42 | |||
| c81416438d | |||
| c95825a0ff | |||
| b6284c9f01 | |||
| f84a97f51c | |||
| 563296fc8b | |||
| 13290e798b | |||
| 96e3dfed46 | |||
| cb6fd130ba | |||
| 11f90de873 | |||
| 9240ec89d0 | |||
| 8cf2a41f81 | |||
| 1f9fc665ec | |||
| bf1995140a | |||
| 7b21cd5d72 | |||
| 37fc32d972 | |||
| 9a6d4b5e56 | |||
| 1e0719dac5 | |||
| f2248f79d3 | |||
| 60d843b540 | |||
| 6d7d281559 | |||
| b3d462b890 | |||
| a7444021c6 | |||
| a93acbd35c | |||
| d978123289 | |||
| ee8dada752 | |||
| 7bc6261d2a | |||
| 013c3bcd82 | |||
| 2fc86ad836 | |||
| 082dc24865 | |||
| d7b6acc03d | |||
| a1dc2856de | |||
| 959be66cc2 | |||
| ae2843940f | |||
| 611ceedc1d | |||
| 38298076d6 | |||
| 1f0b8d6cd8 | |||
| e0d683baed | |||
| f4f75b6b12 | |||
| fb6dc90a85 | |||
| b99391c810 | |||
| d9fc4f3a99 | |||
| daeffbc944 | |||
| 87dde46fb0 | |||
| d96c6f867d | |||
| 1f2e6d5434 | |||
| 232b989d50 | |||
| d38261c908 | |||
| 3075bc3b7b | |||
| 842d0b1c9f | |||
| 042b238dd8 | |||
| c30904b631 | |||
| 225a71f4cd | |||
| 1d29a56344 | |||
| 320e00267d | |||
| 9869629b67 | |||
| 3da78e85bf | |||
| 11a4314261 | |||
| 65c19f82b9 | |||
| 0169cde8a4 | |||
| ab0173b7e6 | |||
| 95f81d2565 | |||
| 9c922f0eab | |||
| 35a03d66e5 | |||
| a4a0887fa7 | |||
| e7c9cf3e1d | |||
| 6710616a09 | |||
| 2064c83c66 | |||
| 2e97ad1f4b | |||
| 4f85f88ae3 | |||
| 181a57ae9b | |||
| 3ee1248cf2 | |||
| 68c3916d46 | |||
| e3bbacd8b9 | |||
| f915371248 | |||
| ea848aa891 | |||
| 5157849c60 | |||
| ca31f9789e | |||
| 78d3cf1de1 | |||
| 521e7eafce | |||
| 2d78a80cf6 | |||
| 5f32698da5 | |||
| 1845056014 | |||
| 0b8ec2aa74 | |||
| 578bdd4b20 | |||
| 6b6865d068 | |||
| 6c018eb770 | |||
| 5561bafbe6 | |||
| 75eee04972 | |||
| ee1d1faa52 | |||
| dbd3e10959 | |||
| fde330af5a | |||
| e8d953257e | |||
| cc86e9ecce | |||
| 5a6db519d6 | |||
| 98d09e5304 | |||
| d87a0ea7f7 | |||
| 0e2bd069d4 | |||
| feca9a33d5 | |||
| eec1aec071 | |||
| a97d1088f0 | |||
| a7317de3b4 | |||
| 06762db050 | |||
| 4f3ebea3a6 | |||
| fa88e0f054 | |||
| 2fd7c2b865 | |||
| ef0bd975cf | |||
| bdc14ddbd7 | |||
| 383e6f4646 | |||
| e37415c95b | |||
| a33112a4c0 | |||
| 7e8007f024 | |||
| f320c2a455 | |||
| 6eedeaedaf | |||
| 6b5e19cfc4 | |||
| 3dc437add4 | |||
| 5f96dffb9b | |||
| 6423b8031d | |||
| bbdad79ce5 | |||
| a2daee8f7a | |||
| 909e3ad116 | |||
| 556616c4f0 | |||
| 46e426ce96 | |||
| f5f6c37c17 | |||
| 08fe8a3076 | |||
| dabcea991f | |||
| 4a5bd47b6a | |||
| e5742a98df | |||
| 774cecc3b4 | |||
| 83b7e32ec4 | |||
| a22155bd96 | |||
| 1da947f548 | |||
| a3960dfa53 | |||
| bab1917311 | |||
| 49348716f5 | |||
| eb781afe7b | |||
| 39f53c3f8c | |||
| b5307aaaad | |||
| f5cf667c95 | |||
| 737095f852 | |||
| f56952c9e6 | |||
| ca5a7be5e8 | |||
| 582c5a36d7 | |||
| a8058729cc | |||
| a2f024ffe3 | |||
| e1d65cc5e0 | |||
| 75cda8d191 | |||
| af8dcc6ee8 | |||
| 2270bf41d7 | |||
| 489ef6e5e1 | |||
| cecc745844 | |||
| 5366362e47 | |||
| a1ecea60fd | |||
| 882421a03e | |||
| a36f72e886 | |||
| 247e989377 | |||
| 91ae676b9b | |||
| a955e06259 | |||
| 31683ce35b | |||
| d773570cd6 | |||
| 556da2b3fc | |||
| 9e19a6efe1 | |||
| f433b2c433 | |||
| bc0d7d7140 | |||
| 24f8831021 | |||
| 9a8fb80eed | |||
| ca12459b9c | |||
| e1ab911c35 | |||
| 58d4494365 | |||
| d502e5beaa | |||
| b4a95db7da | |||
| 02ba6f9f3a | |||
| dba0010607 | |||
| 90667f6114 | |||
| d6961b2626 | |||
| 07ebb8171f | |||
| 245db73929 | |||
| 9342dae8f0 | |||
| 1f84f50fd8 | |||
| 3326c749f8 | |||
| 0269106066 | |||
| 95d38a8e54 | |||
| dca6afc26e | |||
| 19684f23bc | |||
| 52a561399e | |||
| 0683e8a9a3 | |||
| 1bb4a042e2 | |||
| d10861e478 | |||
| cf7c86d581 | |||
| d99e150097 | |||
| 9e88eb6100 | |||
| 71d9a3e1df | |||
| 6575dcc803 | |||
| 2715e5ba1b | |||
| 9a570b23a3 | |||
| 1b091ecb87 | |||
| 0bfa253b73 | |||
| a75a5f8b2a | |||
| 80dd02fbdb | |||
| e6755450df | |||
| 9215bf791b | |||
| 311bfc99f3 | |||
| 1117aff777 | |||
| a3434de2e6 | |||
| 2bf56b00d4 | |||
| b616b0a67a | |||
| bca0f55a5e | |||
| c31d9e717b | |||
| d9d7820b0d | |||
| 9343247e07 | |||
| 351a1a1332 | |||
| 7e9868d762 | |||
| d1cf817660 | |||
| c91771a51e | |||
| a337a43bfd | |||
| 77f93e0b8c | |||
| 7dc7195696 | |||
| 56773bd80e | |||
| 1dec9831d3 | |||
| 390f1f7c69 | |||
| d30fcb8fff | |||
| 17dfe8edc9 | |||
| 7b6b6e1c3e | |||
| 60f2837a98 | |||
| ef5fb390ec | |||
| 87e94f4563 | |||
| 017a9032f1 | |||
| 466282f322 | |||
| 17594298e1 | |||
| 0b9f487ab9 | |||
| d3e1a92b84 | |||
| cd357b0278 | |||
| d0d229e380 | |||
| eb897e65a1 | |||
| 825ebfd5fe | |||
| 3ee3964bec | |||
| aecfb257e9 | |||
| 896a6a93af | |||
| 075f96d2bf | |||
| 05896551f1 | |||
| ea6a891038 | |||
| 983aee5718 | |||
| c913020dc2 | |||
| a50490b11f | |||
| 4b01c901bc | |||
| c1be36bc66 | |||
| e0222d3e01 | |||
| c0264ae787 | |||
| 3a2c50c199 | |||
| 3b4adac579 | |||
| d36b3fbf9d | |||
| bca40e07e3 | |||
| 9a1c993719 | |||
| 504219817c | |||
| 4f2b7271bd | |||
| ec6f9dd5c8 | |||
| e6cda9932b | |||
| b9cfbaa8d4 | |||
| 3fd175af8e | |||
| a9e72b2a2c | |||
| ecde3a3158 | |||
| c8d51c2723 | |||
| d609bb4671 | |||
| 982b425792 | |||
| 9e879a5b1f | |||
| 9974327d33 | |||
| 4eba643ae1 | |||
| 8d7be79108 | |||
| 76b5688304 | |||
| 1e8fbb7bbb | |||
| 20c6a6233b | |||
| 1d295f7983 | |||
| 669814d0d4 | |||
| 4aa48beb37 | |||
| 371fb5a256 | |||
| 0829a511f0 | |||
| a3c78c4510 | |||
| a3211253a0 | |||
| 2c8e7bd5a5 | |||
| 005d6879d9 | |||
| 3dd22349a9 | |||
| e61a84a717 | |||
| d8e73d3036 | |||
| b12340b1d5 | |||
| ec46a59539 | |||
| 5003681414 | |||
| d9396929aa | |||
| 1dee4d92c6 | |||
| 9364cbb4b5 | |||
| 755b661c2d | |||
| 7f4792e47c | |||
| e6837b2b8d | |||
| 9e21330d7a | |||
| c476e62a6f | |||
| 4c5d7831c1 | |||
| 9a5cfb3f26 | |||
| 5a87bea762 | |||
| d62f45bdc1 | |||
| f9d5ee04b4 | |||
| ef04680cc5 | |||
| 1c6cfc3ffe | |||
| 0266e7fe53 | |||
| 610ea0a9d3 | |||
| 70d942a184 | |||
| 5639237e2b | |||
| 541bd26cd7 | |||
| 7a4d601f4d | |||
| bf8675b44a | |||
| ebea672240 | |||
| ce8535f01c | |||
| 0ba4cd2b3b | |||
| afc2dd6cab | |||
| 5768b42c39 | |||
| ee8630c282 | |||
| 01094ea6aa | |||
| 6c1fd1f69c | |||
| 4f65466161 | |||
| 9b3119393f | |||
| 8594e9462c | |||
| 16acb57b22 | |||
| 04c8a3138e | |||
| 38560378fc | |||
| ffbf4a6a90 | |||
| a215bc2ca3 | |||
| cbc674ff99 | |||
| 97546bf55b | |||
| ed1391ee5d | |||
| 7fbd9ec5f4 | |||
| 63989023b8 | |||
| e668d5afd7 | |||
| a2228276bb | |||
| 3ef192e7c7 | |||
| 5fea79fd07 | |||
| 18e65f5eb4 | |||
| 5ed6bf65ba | |||
| d79bcef802 | |||
| f1a53407e7 | |||
| 4309e6ab76 | |||
| 0c3d1cf566 | |||
| aa7d571486 | |||
| 604d3e8fad | |||
| 22fc07d72b | |||
| dd3b5a10a0 | |||
| 416f94f03a | |||
| 204de723f1 | |||
| 80cd89d8f7 | |||
| 624226c91d | |||
| 3adf73a2cd | |||
| eb7b207e4c | |||
| d7e45367af | |||
| 388c7018c4 | |||
| da96607b65 | |||
| fb49645b32 | |||
| 7d751a20b1 | |||
| 9f7d5bbc86 | |||
| 0df25b1008 | |||
| cef623b7d2 | |||
| 12434e78e4 | |||
| 2200607989 | |||
| c31381183b | |||
| 76dce41580 | |||
| 1f1ca34ea6 | |||
| 8d4ab15748 | |||
| 745577693d | |||
| 3019af1c93 | |||
| 8916e6f826 | |||
| b2fd631d82 | |||
| cadef64418 | |||
| ab3497161a | |||
| 46f370ae3c | |||
| 0f43ac79f6 | |||
| ef92b6c369 | |||
| f44f9eb9f8 | |||
| 854f3315af | |||
| 1d46e67de2 | |||
| 85ded0b9bd | |||
| cb291e8d00 | |||
| 25caae1e8c | |||
| 12d7995a18 | |||
| 320b7a9ac3 | |||
| a533e9e637 | |||
| f6ecdae972 |
@@ -0,0 +1,21 @@
|
|||||||
|
# Build artifacts
|
||||||
|
buildroot/
|
||||||
|
*.o
|
||||||
|
*.a
|
||||||
|
*.so
|
||||||
|
*.dylib
|
||||||
|
*.dll
|
||||||
|
*.exe
|
||||||
|
|
||||||
|
# Web assets
|
||||||
|
*.min.js
|
||||||
|
*.min.css
|
||||||
|
|
||||||
|
# Generated files
|
||||||
|
__pycache__/
|
||||||
|
*.pyc
|
||||||
|
.DS_Store
|
||||||
|
|
||||||
|
# IDE files
|
||||||
|
.vscode/
|
||||||
|
.idea/
|
||||||
@@ -38,14 +38,14 @@
|
|||||||
"platformio.platformio-ide",
|
"platformio.platformio-ide",
|
||||||
"marlinfirmware.auto-build",
|
"marlinfirmware.auto-build",
|
||||||
"editorconfig.editorconfig"
|
"editorconfig.editorconfig"
|
||||||
],
|
]
|
||||||
|
|
||||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||||
// "forwardPorts": [],
|
// , "forwardPorts": []
|
||||||
|
|
||||||
// Use 'postCreateCommand' to run commands after the container is created.
|
// Use 'postCreateCommand' to run commands after the container is created.
|
||||||
// "postCreateCommand": "pip3 install --user -r requirements.txt",
|
// , "postCreateCommand": "pip3 install --user -r requirements.txt"
|
||||||
|
|
||||||
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
|
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
|
||||||
// "remoteUser": "vscode"
|
// , "remoteUser": "vscode"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ contact_links:
|
|||||||
url: https://www.facebook.com/groups/1049718498464482
|
url: https://www.facebook.com/groups/1049718498464482
|
||||||
about: Please ask and answer questions here.
|
about: Please ask and answer questions here.
|
||||||
- name: 🕹 Marlin on Discord
|
- name: 🕹 Marlin on Discord
|
||||||
url: https://discord.gg/n5NJ59y
|
url: https://discord.com/servers/marlin-firmware-461605380783472640
|
||||||
about: Join the Discord server for support and discussion.
|
about: Join the Discord server for support and discussion.
|
||||||
- name: 🔗 Marlin Discussion Forum
|
- name: 🔗 Marlin Discussion Forum
|
||||||
url: https://reprap.org/forum/list.php?415
|
url: https://reprap.org/forum/list.php?415
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ We have a Message Board and a Facebook group where our knowledgable user communi
|
|||||||
|
|
||||||
If chat is more your speed, you can join the MarlinFirmware Discord server:
|
If chat is more your speed, you can join the MarlinFirmware Discord server:
|
||||||
|
|
||||||
* Use the link https://discord.gg/n5NJ59y to join up as a General User.
|
* Use the link https://discord.com/servers/marlin-firmware-461605380783472640 to join up as a General User.
|
||||||
* Even though our Discord is pretty active, it may take a while for community members to respond — please be patient!
|
* Even though our Discord is pretty active, it may take a while for community members to respond — please be patient!
|
||||||
* Use the `#general` channel for general questions or discussion about Marlin.
|
* Use the `#general` channel for general questions or discussion about Marlin.
|
||||||
* Other channels exist for certain topics or are limited to Patrons. Check the channel list.
|
* Other channels exist for certain topics or are limited to Patrons. Check the channel list.
|
||||||
|
|||||||
@@ -1,40 +0,0 @@
|
|||||||
#
|
|
||||||
# Configuration for Lock Threads - https://github.com/dessant/lock-threads-app
|
|
||||||
#
|
|
||||||
|
|
||||||
# Number of days of inactivity before a closed issue or pull request is locked
|
|
||||||
daysUntilLock: 60
|
|
||||||
|
|
||||||
# Skip issues and pull requests created before a given timestamp. Timestamp must
|
|
||||||
# follow ISO 8601 (`YYYY-MM-DD`). Set to `false` to disable
|
|
||||||
skipCreatedBefore: false
|
|
||||||
|
|
||||||
# Issues and pull requests with these labels will be ignored. Set to `[]` to disable
|
|
||||||
exemptLabels: [ 'no-locking' ]
|
|
||||||
|
|
||||||
# Label to add before locking, such as `outdated`. Set to `false` to disable
|
|
||||||
lockLabel: false
|
|
||||||
|
|
||||||
# Comment to post before locking. Set to `false` to disable
|
|
||||||
lockComment: >
|
|
||||||
This thread has been automatically locked since there has not been
|
|
||||||
any recent activity after it was closed. Please open a new issue for
|
|
||||||
related bugs.
|
|
||||||
|
|
||||||
# Assign `resolved` as the reason for locking. Set to `false` to disable
|
|
||||||
setLockReason: true
|
|
||||||
|
|
||||||
# Limit to only `issues` or `pulls`
|
|
||||||
# only: issues
|
|
||||||
|
|
||||||
# Optionally, specify configuration settings just for `issues` or `pulls`
|
|
||||||
# issues:
|
|
||||||
# exemptLabels:
|
|
||||||
# - help-wanted
|
|
||||||
# lockLabel: outdated
|
|
||||||
|
|
||||||
# pulls:
|
|
||||||
# daysUntilLock: 30
|
|
||||||
|
|
||||||
# Repository to extend settings from
|
|
||||||
# _extends: repo
|
|
||||||
@@ -14,7 +14,7 @@ jobs:
|
|||||||
autolabel:
|
autolabel:
|
||||||
name: Auto Label
|
name: Auto Label
|
||||||
if: github.repository == 'MarlinFirmware/Marlin'
|
if: github.repository == 'MarlinFirmware/Marlin'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Auto Label for [BUG]
|
- name: Auto Label for [BUG]
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@v7
|
||||||
|
|||||||
@@ -14,12 +14,12 @@ jobs:
|
|||||||
name: Bump Distribution Date
|
name: Bump Distribution Date
|
||||||
if: github.repository == 'MarlinFirmware/Marlin'
|
if: github.repository == 'MarlinFirmware/Marlin'
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Check out bugfix-2.0.x
|
- name: Check out bugfix-2.0.x
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: bugfix-2.0.x
|
ref: bugfix-2.0.x
|
||||||
|
|
||||||
@@ -39,7 +39,7 @@ jobs:
|
|||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
- name: Check out bugfix-2.1.x
|
- name: Check out bugfix-2.1.x
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: bugfix-2.1.x
|
ref: bugfix-2.1.x
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ jobs:
|
|||||||
name: PR Bad Target
|
name: PR Bad Target
|
||||||
if: github.repository == 'MarlinFirmware/Marlin'
|
if: github.repository == 'MarlinFirmware/Marlin'
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: superbrothers/close-pull-request@v3
|
- uses: superbrothers/close-pull-request@v3
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
#
|
#
|
||||||
# test-builds.yml
|
# ci-build-tests.yml
|
||||||
# Do test builds to catch compile errors
|
# Do test builds to catch compile errors
|
||||||
#
|
#
|
||||||
|
|
||||||
name: CI
|
name: CI - Build Tests
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
@@ -14,30 +14,43 @@ on:
|
|||||||
- config/**
|
- config/**
|
||||||
- data/**
|
- data/**
|
||||||
- docs/**
|
- docs/**
|
||||||
|
- test/**
|
||||||
|
- Marlin/tests/**
|
||||||
- '**/*.md'
|
- '**/*.md'
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- bugfix-2.1.x
|
- bugfix-2.1.x
|
||||||
- 2.1.x
|
- 2.1.x
|
||||||
|
- release-*
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- config/**
|
- config/**
|
||||||
- data/**
|
- data/**
|
||||||
- docs/**
|
- docs/**
|
||||||
|
- test/**
|
||||||
|
- Marlin/tests/**
|
||||||
- '**/*.md'
|
- '**/*.md'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test_builds:
|
test_builds:
|
||||||
name: Run All Tests
|
name: Build Test
|
||||||
if: github.repository == 'MarlinFirmware/Marlin'
|
if: github.repository == 'MarlinFirmware/Marlin'
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
|
env:
|
||||||
|
CONFIG_BRANCH: ${{ github.base_ref || github.ref_name }}
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: true
|
||||||
matrix:
|
matrix:
|
||||||
test-platform:
|
test-platform:
|
||||||
|
|
||||||
|
# RP2040
|
||||||
|
- SKR_Pico
|
||||||
|
|
||||||
# Native
|
# Native
|
||||||
- linux_native
|
- linux_native
|
||||||
|
- simulator_linux_release
|
||||||
|
|
||||||
# AVR
|
# AVR
|
||||||
- mega2560
|
- mega2560
|
||||||
@@ -45,7 +58,7 @@ jobs:
|
|||||||
- at90usb1286_dfu
|
- at90usb1286_dfu
|
||||||
|
|
||||||
# AVR Extended
|
# AVR Extended
|
||||||
- FYSETC_F6
|
- mega2560ext
|
||||||
- melzi_optiboot
|
- melzi_optiboot
|
||||||
- rambo
|
- rambo
|
||||||
- sanguino1284p
|
- sanguino1284p
|
||||||
@@ -100,11 +113,11 @@ jobs:
|
|||||||
|
|
||||||
# STM32F4
|
# STM32F4
|
||||||
- ARMED
|
- ARMED
|
||||||
- BIGTREE_BTT002
|
- BTT_BTT002
|
||||||
- BIGTREE_GTR_V1_0
|
- BTT_GTR_V1_0
|
||||||
- BIGTREE_SKR_PRO
|
- BTT_SKR_PRO
|
||||||
- FLYF407ZG
|
- FLYF407ZG
|
||||||
- FYSETC_S6
|
- STM32F446VE_fysetc
|
||||||
- LERDGEK
|
- LERDGEK
|
||||||
- LERDGEX
|
- LERDGEX
|
||||||
- mks_robin_pro2
|
- mks_robin_pro2
|
||||||
@@ -142,6 +155,12 @@ jobs:
|
|||||||
# HC32
|
# HC32
|
||||||
- HC32F460C_aquila_101
|
- HC32F460C_aquila_101
|
||||||
|
|
||||||
|
# GD32F3
|
||||||
|
- GD32F303RE_creality_mfl
|
||||||
|
|
||||||
|
# GD32F1
|
||||||
|
- GD32F103RC_aquila_mfl
|
||||||
|
|
||||||
# LPC176x - Lengthy tests
|
# LPC176x - Lengthy tests
|
||||||
- LPC1768
|
- LPC1768
|
||||||
- LPC1769
|
- LPC1769
|
||||||
@@ -152,21 +171,26 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Cache pip
|
- name: Cache pip
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ~/.cache/pip
|
path: ~/.cache/pip
|
||||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
key: ${{ runner.os }}-pip-build-v1
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-pip-
|
${{ runner.os }}-pip-build-
|
||||||
|
|
||||||
- name: Cache PlatformIO
|
- name: Cache PlatformIO
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ~/.platformio
|
path: |
|
||||||
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
|
~/.platformio
|
||||||
|
.pio/build
|
||||||
|
.pio/libdeps
|
||||||
|
key: ${{ runner.os }}-pio-build-v1
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-pio-build-
|
||||||
|
|
||||||
- name: Select Python 3.9
|
- name: Select Python 3.9
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.9'
|
python-version: '3.9'
|
||||||
architecture: 'x64'
|
architecture: 'x64'
|
||||||
@@ -177,6 +201,14 @@ jobs:
|
|||||||
pio upgrade --dev
|
pio upgrade --dev
|
||||||
pio pkg update --global
|
pio pkg update --global
|
||||||
|
|
||||||
|
- name: Install Simulator dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install build-essential
|
||||||
|
sudo apt-get install libsdl2-dev
|
||||||
|
sudo apt-get install libsdl2-net-dev
|
||||||
|
sudo apt-get install libglm-dev
|
||||||
|
|
||||||
- name: Run ${{ matrix.test-platform }} Tests
|
- name: Run ${{ matrix.test-platform }} Tests
|
||||||
run: |
|
run: |
|
||||||
make tests-single-ci TEST_TARGET=${{ matrix.test-platform }}
|
make tests-single-ci TEST_TARGET=${{ matrix.test-platform }}
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
#
|
||||||
|
# ci-unit-tests.yml
|
||||||
|
# Build and execute unit tests to catch functional issues in code
|
||||||
|
#
|
||||||
|
|
||||||
|
name: CI - Unit Tests
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- bugfix-2.1.x
|
||||||
|
# Cannot be enabled on 2.1.x until it contains the unit test framework
|
||||||
|
#- 2.1.x
|
||||||
|
paths-ignore:
|
||||||
|
- config/**
|
||||||
|
- data/**
|
||||||
|
- docs/**
|
||||||
|
- '**/*.md'
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- bugfix-2.1.x
|
||||||
|
# Cannot be enabled on 2.1.x until it contains the unit test framework
|
||||||
|
#- 2.1.x
|
||||||
|
paths-ignore:
|
||||||
|
- config/**
|
||||||
|
- data/**
|
||||||
|
- docs/**
|
||||||
|
- '**/*.md'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
# This runs all unit tests as a single job. While it should be possible to break this up into
|
||||||
|
# multiple jobs, they currently run quickly and finish long before the compilation tests.
|
||||||
|
run_unit_tests:
|
||||||
|
name: Unit Test
|
||||||
|
# These tests will only be able to run on the bugfix-2.1.x branch, until the next release
|
||||||
|
# pulls them into additional branches.
|
||||||
|
if: github.repository == 'MarlinFirmware/Marlin'
|
||||||
|
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Check out the PR
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Cache pip
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ~/.cache/pip
|
||||||
|
key: ${{ runner.os }}-pip-unit-v1
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-pip-unit-
|
||||||
|
|
||||||
|
- name: Cache PlatformIO
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.platformio
|
||||||
|
.pio/build
|
||||||
|
.pio/libdeps
|
||||||
|
key: ${{ runner.os }}-pio-tests-v1
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-pio-tests-
|
||||||
|
|
||||||
|
- name: Select Python 3.9
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: '3.9'
|
||||||
|
architecture: 'x64'
|
||||||
|
|
||||||
|
- name: Install PlatformIO
|
||||||
|
run: |
|
||||||
|
pip install -U platformio
|
||||||
|
pio upgrade --dev
|
||||||
|
pio pkg update --global
|
||||||
|
|
||||||
|
- name: Run All Unit Tests
|
||||||
|
run: |
|
||||||
|
make unit-test-all-local
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
#
|
||||||
|
# ci-validate-boards.yml
|
||||||
|
# Validate boards.h to make sure it's all set up correctly
|
||||||
|
#
|
||||||
|
|
||||||
|
name: CI - Validate boards.h
|
||||||
|
|
||||||
|
# We can do the on: section as two items, one for pull requests and one for pushes...
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- bugfix-2.1.x
|
||||||
|
paths:
|
||||||
|
- "Marlin/src/core/boards.h"
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- bugfix-2.1.x
|
||||||
|
paths:
|
||||||
|
- "Marlin/src/core/boards.h"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
validate_pins_files:
|
||||||
|
name: Validate boards.h
|
||||||
|
if: github.repository == 'MarlinFirmware/Marlin'
|
||||||
|
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Check out the PR
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Cache pip
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ~/.cache/pip
|
||||||
|
key: ${{ runner.os }}-pip-validation-v1
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-pip-validation-
|
||||||
|
|
||||||
|
- name: Select Python 3.9
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: "3.9"
|
||||||
|
architecture: "x64"
|
||||||
|
|
||||||
|
- name: Validate core/boards.h
|
||||||
|
run: |
|
||||||
|
make validate-boards -j
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
#
|
||||||
|
# ci-validate-lines.yml
|
||||||
|
# Validate that all text files are unchanged by linesformat.py
|
||||||
|
#
|
||||||
|
|
||||||
|
name: CI - Validate Source Files
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- bugfix-2.1.x
|
||||||
|
- 2.1.x
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- bugfix-2.1.x
|
||||||
|
- 2.1.x
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
validate_source_files:
|
||||||
|
name: Validate Source Files
|
||||||
|
if: github.repository == 'MarlinFirmware/Marlin'
|
||||||
|
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Check out the PR
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Cache node_modules
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: node_modules
|
||||||
|
key: ${{ runner.os }}-npm-lines-v1
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-npm-lines-
|
||||||
|
|
||||||
|
- name: Validate text file formatting
|
||||||
|
run: |
|
||||||
|
npm install --save-dev prettier
|
||||||
|
make validate-lines -j
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
#
|
||||||
|
# ci-validate-pins.yml
|
||||||
|
# Validate that all of the pins files are unchanged by pinsformat.py
|
||||||
|
#
|
||||||
|
|
||||||
|
name: CI - Validate Pins Files
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- bugfix-2.1.x
|
||||||
|
# Cannot be enabled on 2.1.x until it contains the unit test framework
|
||||||
|
#- 2.1.x
|
||||||
|
paths:
|
||||||
|
- "Marlin/src/pins/*/**"
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- bugfix-2.1.x
|
||||||
|
# Cannot be enabled on 2.1.x until it contains the unit test framework
|
||||||
|
#- 2.1.x
|
||||||
|
paths:
|
||||||
|
- "Marlin/src/pins/*/**"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
validate_pins_files:
|
||||||
|
name: Validate Pins Files
|
||||||
|
if: github.repository == 'MarlinFirmware/Marlin'
|
||||||
|
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Check out the PR
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Cache pip
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ~/.cache/pip
|
||||||
|
key: ${{ runner.os }}-pip-validation-v1
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-pip-validation-
|
||||||
|
|
||||||
|
- name: Select Python 3.9
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: "3.9"
|
||||||
|
architecture: "x64"
|
||||||
|
|
||||||
|
- name: Validate all pins files
|
||||||
|
run: |
|
||||||
|
make validate-pins -j
|
||||||
@@ -13,7 +13,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
remove_label:
|
remove_label:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@@ -32,7 +32,7 @@ jobs:
|
|||||||
- "Needs: Work"
|
- "Needs: Work"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Remove Labels
|
- name: Remove Labels
|
||||||
uses: actions-ecosystem/action-remove-labels@v1
|
uses: actions-ecosystem/action-remove-labels@v1
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -14,10 +14,10 @@ jobs:
|
|||||||
name: Close Stale Issues
|
name: Close Stale Issues
|
||||||
if: github.repository == 'MarlinFirmware/Marlin'
|
if: github.repository == 'MarlinFirmware/Marlin'
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/stale@v8
|
- uses: actions/stale@v9
|
||||||
with:
|
with:
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
stale-issue-message: |
|
stale-issue-message: |
|
||||||
|
|||||||
@@ -14,18 +14,18 @@ jobs:
|
|||||||
name: Lock Closed Issues
|
name: Lock Closed Issues
|
||||||
if: github.repository == 'MarlinFirmware/Marlin'
|
if: github.repository == 'MarlinFirmware/Marlin'
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: dessant/lock-threads@v2
|
- uses: dessant/lock-threads@v5
|
||||||
with:
|
with:
|
||||||
github-token: ${{ github.token }}
|
github-token: ${{ github.token }}
|
||||||
process-only: 'issues'
|
process-only: 'issues'
|
||||||
issue-lock-inactive-days: '60'
|
issue-inactive-days: '60'
|
||||||
issue-exclude-created-before: ''
|
exclude-issue-created-before: ''
|
||||||
issue-exclude-labels: 'no-locking'
|
exclude-any-issue-labels: 'no-locking'
|
||||||
issue-lock-labels: ''
|
add-issue-labels: ''
|
||||||
issue-lock-comment: >
|
issue-comment: >
|
||||||
This issue has been automatically locked since there
|
This issue has been automatically locked since there
|
||||||
has not been any recent activity after it was closed.
|
has not been any recent activity after it was closed.
|
||||||
Please open a new issue for related bugs.
|
Please open a new issue for related bugs.
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ jobs:
|
|||||||
name: Unlock Reopened
|
name: Unlock Reopened
|
||||||
if: github.repository == 'MarlinFirmware/Marlin'
|
if: github.repository == 'MarlinFirmware/Marlin'
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: OSDKDev/unlock-issues@v1.1
|
- uses: OSDKDev/unlock-issues@v1.1
|
||||||
|
|||||||
Executable → Regular
+9
@@ -31,6 +31,11 @@ out-language/
|
|||||||
*.gen
|
*.gen
|
||||||
*.sublime-workspace
|
*.sublime-workspace
|
||||||
|
|
||||||
|
# npm
|
||||||
|
node_modules/
|
||||||
|
package.json
|
||||||
|
package-lock.json
|
||||||
|
|
||||||
# OS
|
# OS
|
||||||
applet/
|
applet/
|
||||||
.DS_Store
|
.DS_Store
|
||||||
@@ -125,6 +130,7 @@ vc-fileutils.settings
|
|||||||
# Visual Studio Code
|
# Visual Studio Code
|
||||||
.vscode/*
|
.vscode/*
|
||||||
!.vscode/extensions.json
|
!.vscode/extensions.json
|
||||||
|
*.code-workspace
|
||||||
|
|
||||||
# Simulation files
|
# Simulation files
|
||||||
imgui.ini
|
imgui.ini
|
||||||
@@ -168,3 +174,6 @@ __pycache__
|
|||||||
tags
|
tags
|
||||||
*.logs
|
*.logs
|
||||||
*.bak
|
*.bak
|
||||||
|
.aider*
|
||||||
|
!.aiderignore
|
||||||
|
.env
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# Prettier Ignore file
|
||||||
|
*.min.js
|
||||||
|
web-ui/
|
||||||
|
buildroot/share/PlatformIO/boards
|
||||||
|
buildroot/share/PlatformIO/variants
|
||||||
|
*.sublime-project
|
||||||
|
*.sublime-syntax
|
||||||
|
.github
|
||||||
|
.vscode
|
||||||
|
launch.json
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
/**
|
||||||
|
* Marlin-specific settings for Zed
|
||||||
|
*
|
||||||
|
* For a full list of overridable settings, and general information on folder-specific settings,
|
||||||
|
* see the documentation: https://zed.dev/docs/configuring-zed#settings-files
|
||||||
|
*/
|
||||||
|
{
|
||||||
|
"languages": {
|
||||||
|
"C": {
|
||||||
|
"enable_language_server": false
|
||||||
|
},
|
||||||
|
"C++": {
|
||||||
|
"enable_language_server": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,16 +2,50 @@ SCRIPTS_DIR := buildroot/share/scripts
|
|||||||
CONTAINER_RT_BIN := docker
|
CONTAINER_RT_BIN := docker
|
||||||
CONTAINER_RT_OPTS := --rm -v $(PWD):/code -v platformio-cache:/root/.platformio
|
CONTAINER_RT_OPTS := --rm -v $(PWD):/code -v platformio-cache:/root/.platformio
|
||||||
CONTAINER_IMAGE := marlin-dev
|
CONTAINER_IMAGE := marlin-dev
|
||||||
|
UNIT_TEST_CONFIG ?= default
|
||||||
|
|
||||||
|
# Find a Python 3 interpreter
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
# Windows: use `where` – fall back through the three common names
|
||||||
|
PYTHON := $(shell which python 2>nul || which python3 2>nul || which py 2>nul)
|
||||||
|
# Windows: Use cmd tools to find pins files
|
||||||
|
PINS_RAW := $(shell cmd //c "dir /s /b Marlin\src\pins\*.h 2>nul | findstr /r ".*Marlin\\\\src\\\\pins\\\\.*\\\\pins_.*\.h"")
|
||||||
|
PINS := $(subst \,/,$(PINS_RAW))
|
||||||
|
else
|
||||||
|
# POSIX: use `command -v` – prefer python3 over python
|
||||||
|
PYTHON := $(shell command -v python3 2>/dev/null || command -v python 2>/dev/null)
|
||||||
|
# Unix/Linux: Use find command
|
||||||
|
PINS := $(shell find Marlin/src/pins -mindepth 2 -name 'pins_*.h')
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Check that the found interpreter is Python 3
|
||||||
|
# Error if there's no Python 3 available
|
||||||
|
ifneq ($(strip $(PYTHON)),)
|
||||||
|
PYTHON_VERSION := $(shell $(PYTHON) -c "import sys; print(sys.version_info[0])" 2>/dev/null)
|
||||||
|
ifneq ($(PYTHON_VERSION),3)
|
||||||
|
$(error $(PYTHON) is not Python 3 – install a Python‑3.x interpreter or adjust your PATH)
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
$(error No Python executable found – install Python 3.x and make sure it is in your PATH)
|
||||||
|
endif
|
||||||
|
|
||||||
help:
|
help:
|
||||||
@echo "Tasks for local development:"
|
@echo "Tasks for local development:"
|
||||||
@echo "* format-pins: Reformat all pins files"
|
@echo "make marlin : Build Marlin for the configured board"
|
||||||
@echo "* tests-single-ci: Run a single test from inside the CI"
|
@echo "make format-pins -j : Reformat all pins files (-j for parallel execution)"
|
||||||
@echo "* tests-single-local: Run a single test locally"
|
@echo "make validate-lines -j : Validate line endings, fails on trailing whitespace, etc."
|
||||||
@echo "* tests-single-local-docker: Run a single test locally, using docker"
|
@echo "make validate-pins -j : Validate all pins files, fails if any require reformatting"
|
||||||
@echo "* tests-all-local: Run all tests locally"
|
@echo "make validate-boards -j : Validate boards.h and pins.h for standards compliance"
|
||||||
@echo "* tests-all-local-docker: Run all tests locally, using docker"
|
@echo "make tests-single-ci : Run a single test from inside the CI"
|
||||||
@echo "* setup-local-docker: Build the local docker image"
|
@echo "make tests-single-local : Run a single test locally"
|
||||||
|
@echo "make tests-single-local-docker : Run a single test locally, using docker"
|
||||||
|
@echo "make tests-all-local : Run all tests locally"
|
||||||
|
@echo "make tests-all-local-docker : Run all tests locally, using docker"
|
||||||
|
@echo "make unit-test-single-local : Run unit tests for a single config locally"
|
||||||
|
@echo "make unit-test-single-local-docker : Run unit tests for a single config locally, using docker"
|
||||||
|
@echo "make unit-test-all-local : Run all code tests locally"
|
||||||
|
@echo "make unit-test-all-local-docker : Run all code tests locally, using docker"
|
||||||
|
@echo "make setup-local-docker : Setup local docker"
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo "Options for testing:"
|
@echo "Options for testing:"
|
||||||
@echo " TEST_TARGET Set when running tests-single-*, to select the"
|
@echo " TEST_TARGET Set when running tests-single-*, to select the"
|
||||||
@@ -21,49 +55,117 @@ help:
|
|||||||
@echo " run on GitHub CI"
|
@echo " run on GitHub CI"
|
||||||
@echo " ONLY_TEST Limit tests to only those that contain this, or"
|
@echo " ONLY_TEST Limit tests to only those that contain this, or"
|
||||||
@echo " the index of the test (1-based)"
|
@echo " the index of the test (1-based)"
|
||||||
|
@echo " UNIT_TEST_CONFIG Set the name of the config from the test folder, without"
|
||||||
|
@echo " the leading number. Default is 'default'". Used with the
|
||||||
|
@echo " unit-test-single-* tasks"
|
||||||
@echo " VERBOSE_PLATFORMIO If you want the full PIO output, set any value"
|
@echo " 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 " GIT_RESET_HARD Used by CI: reset all local changes. WARNING:"
|
||||||
@echo " THIS WILL UNDO ANY CHANGES YOU'VE MADE!"
|
@echo " THIS WILL UNDO ANY CHANGES YOU'VE MADE!"
|
||||||
.PHONY: help
|
|
||||||
|
marlin:
|
||||||
|
./buildroot/bin/mftest -a
|
||||||
|
.PHONY: marlin
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf .pio/build*
|
||||||
|
|
||||||
tests-single-ci:
|
tests-single-ci:
|
||||||
export GIT_RESET_HARD=true
|
export GIT_RESET_HARD=true
|
||||||
$(MAKE) tests-single-local TEST_TARGET=$(TEST_TARGET) PLATFORMIO_BUILD_FLAGS=-DGITHUB_ACTION
|
$(MAKE) tests-single-local TEST_TARGET=$(TEST_TARGET) PLATFORMIO_BUILD_FLAGS=-DGITHUB_ACTION
|
||||||
.PHONY: tests-single-ci
|
|
||||||
|
|
||||||
tests-single-local:
|
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
|
@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 PATH="./buildroot/bin/:./buildroot/tests/:${PATH}" \
|
||||||
&& export VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) \
|
&& export VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) \
|
||||||
&& run_tests . $(TEST_TARGET) "$(ONLY_TEST)"
|
&& run_tests . $(TEST_TARGET) "$(ONLY_TEST)"
|
||||||
.PHONY: tests-single-local
|
|
||||||
|
|
||||||
tests-single-local-docker:
|
tests-single-local-docker:
|
||||||
@if ! test -n "$(TEST_TARGET)" ; then echo "***ERROR*** Set TEST_TARGET=<your-module> or use make tests-all-local-docker" ; return 1; fi
|
@if ! test -n "$(TEST_TARGET)" ; then echo "***ERROR*** Set TEST_TARGET=<your-module> or use make tests-all-local-docker" ; return 1; fi
|
||||||
@if ! $(CONTAINER_RT_BIN) images -q $(CONTAINER_IMAGE) > /dev/null ; then $(MAKE) setup-local-docker ; fi
|
@if ! $(CONTAINER_RT_BIN) images -q $(CONTAINER_IMAGE) > /dev/null ; then $(MAKE) setup-local-docker ; fi
|
||||||
$(CONTAINER_RT_BIN) run $(CONTAINER_RT_OPTS) $(CONTAINER_IMAGE) $(MAKE) tests-single-local TEST_TARGET=$(TEST_TARGET) VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) GIT_RESET_HARD=$(GIT_RESET_HARD) ONLY_TEST="$(ONLY_TEST)"
|
$(CONTAINER_RT_BIN) run $(CONTAINER_RT_OPTS) $(CONTAINER_IMAGE) make tests-single-local TEST_TARGET=$(TEST_TARGET) VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) GIT_RESET_HARD=$(GIT_RESET_HARD) ONLY_TEST="$(ONLY_TEST)"
|
||||||
.PHONY: tests-single-local-docker
|
|
||||||
|
|
||||||
tests-all-local:
|
tests-all-local:
|
||||||
|
@$(PYTHON) -c "import yaml" 2>/dev/null || (echo 'pyyaml module is not installed. Install it with "$(PYTHON) -m pip install pyyaml"' && exit 1)
|
||||||
export PATH="./buildroot/bin/:./buildroot/tests/:${PATH}" \
|
export PATH="./buildroot/bin/:./buildroot/tests/:${PATH}" \
|
||||||
&& export VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) \
|
&& export VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) \
|
||||||
&& for TEST_TARGET in $$($(SCRIPTS_DIR)/get_test_targets.py) ; do echo "Running tests for $$TEST_TARGET" ; run_tests . $$TEST_TARGET ; done
|
&& for TEST_TARGET in $$($(PYTHON) $(SCRIPTS_DIR)/get_test_targets.py) ; do \
|
||||||
.PHONY: tests-all-local
|
if [ "$$TEST_TARGET" = "linux_native" ] && [ "$$(uname)" = "Darwin" ]; then \
|
||||||
|
echo "Skipping tests for $$TEST_TARGET on macOS" ; \
|
||||||
|
continue ; \
|
||||||
|
fi ; \
|
||||||
|
echo "Running tests for $$TEST_TARGET" ; \
|
||||||
|
run_tests . $$TEST_TARGET || exit 1 ; \
|
||||||
|
sleep 5; \
|
||||||
|
done
|
||||||
|
|
||||||
tests-all-local-docker:
|
tests-all-local-docker:
|
||||||
@if ! $(CONTAINER_RT_BIN) images -q $(CONTAINER_IMAGE) > /dev/null ; then $(MAKE) setup-local-docker ; fi
|
@if ! $(CONTAINER_RT_BIN) images -q $(CONTAINER_IMAGE) > /dev/null ; then $(MAKE) setup-local-docker ; fi
|
||||||
$(CONTAINER_RT_BIN) run $(CONTAINER_RT_OPTS) $(CONTAINER_IMAGE) $(MAKE) tests-all-local VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) GIT_RESET_HARD=$(GIT_RESET_HARD)
|
$(CONTAINER_RT_BIN) run $(CONTAINER_RT_OPTS) $(CONTAINER_IMAGE) make tests-all-local VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) GIT_RESET_HARD=$(GIT_RESET_HARD)
|
||||||
.PHONY: tests-all-local-docker
|
|
||||||
|
unit-test-single-local:
|
||||||
|
platformio run -t marlin_$(UNIT_TEST_CONFIG) -e linux_native_test
|
||||||
|
|
||||||
|
unit-test-single-local-docker:
|
||||||
|
@if ! $(CONTAINER_RT_BIN) images -q $(CONTAINER_IMAGE) > /dev/null ; then $(MAKE) setup-local-docker ; fi
|
||||||
|
$(CONTAINER_RT_BIN) run $(CONTAINER_RT_OPTS) $(CONTAINER_IMAGE) make unit-test-single-local UNIT_TEST_CONFIG=$(UNIT_TEST_CONFIG)
|
||||||
|
|
||||||
|
unit-test-all-local:
|
||||||
|
platformio run -t test-marlin -e linux_native_test
|
||||||
|
|
||||||
|
unit-test-all-local-docker:
|
||||||
|
@if ! $(CONTAINER_RT_BIN) images -q $(CONTAINER_IMAGE) > /dev/null ; then $(MAKE) setup-local-docker ; fi
|
||||||
|
$(CONTAINER_RT_BIN) run $(CONTAINER_RT_OPTS) $(CONTAINER_IMAGE) make unit-test-all-local
|
||||||
|
|
||||||
|
USERNAME := $(shell whoami)
|
||||||
|
USER_ID := $(shell id -u)
|
||||||
|
GROUP_ID := $(shell id -g)
|
||||||
|
|
||||||
|
.PHONY: setup-local-docker setup-local-docker-old
|
||||||
|
|
||||||
setup-local-docker:
|
setup-local-docker:
|
||||||
$(CONTAINER_RT_BIN) build -t $(CONTAINER_IMAGE) -f docker/Dockerfile .
|
@echo "Building marlin-dev Docker image..."
|
||||||
.PHONY: setup-local-docker
|
$(CONTAINER_RT_BIN) build -t $(CONTAINER_IMAGE) \
|
||||||
|
--build-arg USERNAME=$(USERNAME) \
|
||||||
|
--build-arg USER_ID=$(USER_ID) \
|
||||||
|
--build-arg GROUP_ID=$(GROUP_ID) \
|
||||||
|
-f docker/Dockerfile .
|
||||||
|
@echo
|
||||||
|
@echo "To run all tests in Docker:"
|
||||||
|
@echo " make tests-all-local-docker"
|
||||||
|
@echo "To run a single test in Docker:"
|
||||||
|
@echo " make tests-single-local-docker TEST_TARGET=mega2560"
|
||||||
|
|
||||||
PINS := $(shell find Marlin/src/pins -mindepth 2 -name '*.h')
|
setup-local-docker-old:
|
||||||
|
$(CONTAINER_RT_BIN) buildx build -t $(CONTAINER_IMAGE) -f docker/Dockerfile .
|
||||||
|
|
||||||
.PHONY: $(PINS)
|
.PHONY: $(PINS) format-pins validate-pins
|
||||||
|
|
||||||
$(PINS): %:
|
$(PINS): %:
|
||||||
@echo "Formatting $@" && node buildroot/share/scripts/pinsformat.js $@
|
@echo "Formatting pins $@"
|
||||||
|
@$(PYTHON) $(SCRIPTS_DIR)/pinsformat.py $< $@
|
||||||
|
|
||||||
format-pins: $(PINS)
|
format-pins: $(PINS)
|
||||||
|
@echo "Processed $(words $(PINS)) pins files"
|
||||||
|
|
||||||
|
validate-pins: format-pins
|
||||||
|
@echo "Validating pins files"
|
||||||
|
@git diff --exit-code || (git status && echo "\nError: Pins files are not formatted correctly. Run \"make format-pins\" to fix.\n" && exit 1)
|
||||||
|
|
||||||
|
.PHONY: format-lines validate-lines
|
||||||
|
|
||||||
|
format-lines:
|
||||||
|
@echo "Formatting all sources"
|
||||||
|
@$(PYTHON) $(SCRIPTS_DIR)/linesformat.py buildroot
|
||||||
|
@$(PYTHON) $(SCRIPTS_DIR)/linesformat.py Marlin
|
||||||
|
|
||||||
|
validate-lines:
|
||||||
|
@echo "Validating text formatting"
|
||||||
|
@npx prettier --check . --editorconfig --object-wrap preserve
|
||||||
|
|
||||||
|
BOARDS_FILE := Marlin/src/core/boards.h
|
||||||
|
|
||||||
|
.PHONY: validate-boards
|
||||||
|
|
||||||
|
validate-boards:
|
||||||
|
@echo "Validating boards.h file"
|
||||||
|
@$(PYTHON) $(SCRIPTS_DIR)/validate_boards.py $(BOARDS_FILE) || (echo "\nError: boards.h file is not valid. Please check and correct it.\n" && exit 1)
|
||||||
|
|||||||
+332
-152
@@ -50,7 +50,7 @@
|
|||||||
*
|
*
|
||||||
* Calibration Guides: https://reprap.org/wiki/Calibration
|
* Calibration Guides: https://reprap.org/wiki/Calibration
|
||||||
* https://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide
|
* https://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide
|
||||||
* https://web.archive.org/web/20220907014303/https://sites.google.com/site/repraplogphase/calibration-of-your-reprap
|
* https://web.archive.org/web/20220907014303/sites.google.com/site/repraplogphase/calibration-of-your-reprap
|
||||||
* https://youtu.be/wAL9d7FgInk
|
* https://youtu.be/wAL9d7FgInk
|
||||||
* https://teachingtechyt.github.io/calibration.html
|
* https://teachingtechyt.github.io/calibration.html
|
||||||
*
|
*
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
// @section info
|
// @section info
|
||||||
|
|
||||||
// Author info of this build printed to the host during boot and M115
|
// Author info of this build printed to the host during boot and M115
|
||||||
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
|
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Original author or contributor.
|
||||||
//#define CUSTOM_VERSION_FILE Version.h // Path from the root directory (no quotes)
|
//#define CUSTOM_VERSION_FILE Version.h // Path from the root directory (no quotes)
|
||||||
|
|
||||||
// @section machine
|
// @section machine
|
||||||
@@ -71,13 +71,15 @@
|
|||||||
#define MOTHERBOARD BOARD_RAMPS_14_EFB
|
#define MOTHERBOARD BOARD_RAMPS_14_EFB
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// @section serial
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Select the serial port on the board to use for communication with the host.
|
* Select the serial port on the board to use for communication with the host.
|
||||||
* This allows the connection of wireless adapters (for instance) to non-default port pins.
|
* This allows the connection of wireless adapters (for instance) to non-default port pins.
|
||||||
* Serial port -1 is the USB emulated serial port, if available.
|
* Serial port -1 is the USB emulated serial port, if available.
|
||||||
* Note: The first serial port (-1 or 0) will always be used by the Arduino bootloader.
|
* Note: The first serial port (-1 or 0) will always be used by the Arduino bootloader.
|
||||||
*
|
*
|
||||||
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
|
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
|
||||||
*/
|
*/
|
||||||
#define SERIAL_PORT 0
|
#define SERIAL_PORT 0
|
||||||
|
|
||||||
@@ -99,24 +101,35 @@
|
|||||||
/**
|
/**
|
||||||
* Select a secondary serial port on the board to use for communication with the host.
|
* Select a secondary serial port on the board to use for communication with the host.
|
||||||
* Currently Ethernet (-2) is only supported on Teensy 4.1 boards.
|
* Currently Ethernet (-2) is only supported on Teensy 4.1 boards.
|
||||||
* :[-2, -1, 0, 1, 2, 3, 4, 5, 6, 7]
|
* :[-2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
|
||||||
*/
|
*/
|
||||||
//#define SERIAL_PORT_2 -1
|
//#define SERIAL_PORT_2 -1
|
||||||
//#define BAUDRATE_2 250000 // :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000] Enable to override BAUDRATE
|
//#define BAUDRATE_2 250000 // :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000] Enable to override BAUDRATE
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Select a third serial port on the board to use for communication with the host.
|
* Select a third serial port on the board to use for communication with the host.
|
||||||
* Currently only supported for AVR, DUE, LPC1768/9 and STM32/STM32F1
|
* Currently supported for AVR, DUE, SAMD51, LPC1768/9, STM32/STM32F1/HC32, and Teensy 4.x
|
||||||
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
|
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
|
||||||
*/
|
*/
|
||||||
//#define SERIAL_PORT_3 1
|
//#define SERIAL_PORT_3 1
|
||||||
//#define BAUDRATE_3 250000 // :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000] Enable to override BAUDRATE
|
//#define BAUDRATE_3 250000 // :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000] Enable to override BAUDRATE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Select a serial port to communicate with RS485 protocol
|
||||||
|
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
|
||||||
|
*/
|
||||||
|
//#define RS485_SERIAL_PORT 1
|
||||||
|
#ifdef RS485_SERIAL_PORT
|
||||||
|
//#define M485_PROTOCOL 1 // Check your host for protocol compatibility
|
||||||
|
//#define RS485_BUS_BUFFER_SIZE 128
|
||||||
|
#endif
|
||||||
|
|
||||||
// Enable the Bluetooth serial interface on AT90USB devices
|
// Enable the Bluetooth serial interface on AT90USB devices
|
||||||
//#define BLUETOOTH
|
//#define BLUETOOTH
|
||||||
|
|
||||||
// Name displayed in the LCD "Ready" message and Info menu
|
// Name displayed in the LCD "Ready" message and Info menu
|
||||||
//#define CUSTOM_MACHINE_NAME "3D Printer"
|
//#define CUSTOM_MACHINE_NAME "3D Printer"
|
||||||
|
//#define CONFIGURABLE_MACHINE_NAME // Add G-code M550 to set/report the machine name
|
||||||
|
|
||||||
// Printer's unique ID, used by some programs to differentiate between machines.
|
// Printer's unique ID, used by some programs to differentiate between machines.
|
||||||
// Choose your own or use a service like https://www.uuidgenerator.net/version4
|
// Choose your own or use a service like https://www.uuidgenerator.net/version4
|
||||||
@@ -135,9 +148,9 @@
|
|||||||
* Options: A4988, A5984, DRV8825, LV8729, TB6560, TB6600, TMC2100,
|
* Options: A4988, A5984, DRV8825, LV8729, TB6560, TB6600, TMC2100,
|
||||||
* TMC2130, TMC2130_STANDALONE, TMC2160, TMC2160_STANDALONE,
|
* TMC2130, TMC2130_STANDALONE, TMC2160, TMC2160_STANDALONE,
|
||||||
* TMC2208, TMC2208_STANDALONE, TMC2209, TMC2209_STANDALONE,
|
* TMC2208, TMC2208_STANDALONE, TMC2209, TMC2209_STANDALONE,
|
||||||
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
|
* TMC2240, TMC2660, TMC2660_STANDALONE,
|
||||||
* TMC5130, TMC5130_STANDALONE, TMC5160, TMC5160_STANDALONE
|
* TMC5130, TMC5130_STANDALONE, TMC5160, TMC5160_STANDALONE
|
||||||
* :['A4988', 'A5984', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC2209', 'TMC2209_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
|
* :['A4988', 'A5984', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC2209', 'TMC2209_STANDALONE', 'TMC2240', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
|
||||||
*/
|
*/
|
||||||
#define X_DRIVER_TYPE A4988
|
#define X_DRIVER_TYPE A4988
|
||||||
#define Y_DRIVER_TYPE A4988
|
#define Y_DRIVER_TYPE A4988
|
||||||
@@ -247,6 +260,7 @@
|
|||||||
#define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // A pair of angles for { E0, E1 }.
|
#define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // A pair of angles for { E0, E1 }.
|
||||||
// For Dual Servo use two pairs: { { lower, raise }, { lower, raise } }
|
// For Dual Servo use two pairs: { { lower, raise }, { lower, raise } }
|
||||||
#define SWITCHING_NOZZLE_SERVO_DWELL 2500 // Dwell time to wait for servo to make physical move
|
#define SWITCHING_NOZZLE_SERVO_DWELL 2500 // Dwell time to wait for servo to make physical move
|
||||||
|
#define SWITCHING_NOZZLE_LIFT_TO_PROBE // Lift toolheads out of the way while probing
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Switch nozzles by bumping the toolhead. Requires EVENT_GCODE_TOOLCHANGE_#.
|
// Switch nozzles by bumping the toolhead. Requires EVENT_GCODE_TOOLCHANGE_#.
|
||||||
@@ -291,6 +305,18 @@
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Differential Extruder
|
||||||
|
*
|
||||||
|
* The X and E steppers work together to create a differential drive system.
|
||||||
|
* Simple : E steps = X + E ; X steps = X (E drives a loop, X stays the same)
|
||||||
|
* Balanced: E steps = X + E/2 ; X steps = X - E/2 (Dual loop system)
|
||||||
|
*/
|
||||||
|
//#define DIFFERENTIAL_EXTRUDER
|
||||||
|
#if ENABLED(DIFFERENTIAL_EXTRUDER)
|
||||||
|
//#define BALANCED_DIFFERENTIAL_EXTRUDER
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Switching Toolhead
|
* Switching Toolhead
|
||||||
*
|
*
|
||||||
@@ -375,14 +401,15 @@
|
|||||||
* PRUSA_MMU1 : Průša MMU1 (The "multiplexer" version)
|
* PRUSA_MMU1 : Průša MMU1 (The "multiplexer" version)
|
||||||
* PRUSA_MMU2 : Průša MMU2
|
* PRUSA_MMU2 : Průša MMU2
|
||||||
* PRUSA_MMU2S : Průša MMU2S (Requires MK3S extruder with motion sensor, EXTRUDERS = 5)
|
* PRUSA_MMU2S : Průša MMU2S (Requires MK3S extruder with motion sensor, EXTRUDERS = 5)
|
||||||
|
* PRUSA_MMU3 : Průša MMU3 (Requires MK3S extruder with motion sensor and MMU firmware version 3.x.x, EXTRUDERS = 5)
|
||||||
* EXTENDABLE_EMU_MMU2 : MMU with configurable number of filaments (ERCF, SMuFF or similar with Průša MMU2 compatible firmware)
|
* EXTENDABLE_EMU_MMU2 : MMU with configurable number of filaments (ERCF, SMuFF or similar with Průša MMU2 compatible firmware)
|
||||||
* EXTENDABLE_EMU_MMU2S : MMUS with configurable number of filaments (ERCF, SMuFF or similar with Průša MMU2 compatible firmware)
|
* EXTENDABLE_EMU_MMU2S : MMUS with configurable number of filaments (ERCF, SMuFF or similar with Průša MMU2 compatible firmware)
|
||||||
*
|
*
|
||||||
* Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
|
* Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
|
||||||
* See additional options in Configuration_adv.h.
|
* See additional options in Configuration_adv.h.
|
||||||
* :["PRUSA_MMU1", "PRUSA_MMU2", "PRUSA_MMU2S", "EXTENDABLE_EMU_MMU2", "EXTENDABLE_EMU_MMU2S"]
|
* :["PRUSA_MMU1", "PRUSA_MMU2", "PRUSA_MMU2S", "PRUSA_MMU3", "EXTENDABLE_EMU_MMU2", "EXTENDABLE_EMU_MMU2S"]
|
||||||
*/
|
*/
|
||||||
//#define MMU_MODEL PRUSA_MMU2
|
//#define MMU_MODEL PRUSA_MMU3
|
||||||
|
|
||||||
// @section psu control
|
// @section psu control
|
||||||
|
|
||||||
@@ -401,9 +428,18 @@
|
|||||||
//#define PS_OFF_SOUND // Beep 1s when power off
|
//#define PS_OFF_SOUND // Beep 1s when power off
|
||||||
#define PSU_ACTIVE_STATE LOW // Set 'LOW' for ATX, 'HIGH' for X-Box
|
#define PSU_ACTIVE_STATE LOW // Set 'LOW' for ATX, 'HIGH' for X-Box
|
||||||
|
|
||||||
//#define PSU_DEFAULT_OFF // Keep power off until enabled directly with M80
|
//#define PSU_DEFAULT_OFF // Keep power off until enabled directly with M80
|
||||||
//#define PSU_POWERUP_DELAY 250 // (ms) Delay for the PSU to warm up to full power
|
//#define PSU_POWERUP_DELAY 250 // (ms) Delay for the PSU to warm up to full power
|
||||||
//#define LED_POWEROFF_TIMEOUT 10000 // (ms) Turn off LEDs after power-off, with this amount of delay
|
//#define LED_POWEROFF_TIMEOUT 10000 // (ms) Turn off LEDs after power-off, with this amount of delay
|
||||||
|
|
||||||
|
//#define PSU_OFF_REDUNDANT // Second pin for redundant power control
|
||||||
|
//#define PSU_OFF_REDUNDANT_INVERTED // Redundant pin state is the inverse of PSU_ACTIVE_STATE
|
||||||
|
|
||||||
|
//#define PS_ON1_PIN 6 // Redundant pin required to enable power in combination with PS_ON_PIN
|
||||||
|
|
||||||
|
//#define PS_ON_EDM_PIN 8 // External Device Monitoring pins for external power control relay feedback. Fault on mismatch.
|
||||||
|
//#define PS_ON1_EDM_PIN 9
|
||||||
|
#define PS_EDM_RESPONSE 250 // (ms) Time to allow for relay action
|
||||||
|
|
||||||
//#define POWER_OFF_TIMER // Enable M81 D<seconds> to power off after a delay
|
//#define POWER_OFF_TIMER // Enable M81 D<seconds> to power off after a delay
|
||||||
//#define POWER_OFF_WAIT_FOR_COOLDOWN // Enable M81 S to power off only after cooldown
|
//#define POWER_OFF_WAIT_FOR_COOLDOWN // Enable M81 S to power off only after cooldown
|
||||||
@@ -564,7 +600,7 @@
|
|||||||
#define DUMMY_THERMISTOR_998_VALUE 25
|
#define DUMMY_THERMISTOR_998_VALUE 25
|
||||||
#define DUMMY_THERMISTOR_999_VALUE 100
|
#define DUMMY_THERMISTOR_999_VALUE 100
|
||||||
|
|
||||||
// Resistor values when using MAX31865 sensors (-5) on TEMP_SENSOR_0 / 1
|
// Resistor values when using MAX31865 sensors (-5) on TEMP_SENSOR_0 / 1 / 2 / BED
|
||||||
#if TEMP_SENSOR_IS_MAX_TC(0)
|
#if TEMP_SENSOR_IS_MAX_TC(0)
|
||||||
#define MAX31865_SENSOR_OHMS_0 100 // (Ω) Typically 100 or 1000 (PT100 or PT1000)
|
#define MAX31865_SENSOR_OHMS_0 100 // (Ω) Typically 100 or 1000 (PT100 or PT1000)
|
||||||
#define MAX31865_CALIBRATION_OHMS_0 430 // (Ω) Typically 430 for Adafruit PT100; 4300 for Adafruit PT1000
|
#define MAX31865_CALIBRATION_OHMS_0 430 // (Ω) Typically 430 for Adafruit PT100; 4300 for Adafruit PT1000
|
||||||
@@ -577,6 +613,10 @@
|
|||||||
#define MAX31865_SENSOR_OHMS_2 100
|
#define MAX31865_SENSOR_OHMS_2 100
|
||||||
#define MAX31865_CALIBRATION_OHMS_2 430
|
#define MAX31865_CALIBRATION_OHMS_2 430
|
||||||
#endif
|
#endif
|
||||||
|
#if TEMP_SENSOR_IS_MAX_TC(BED)
|
||||||
|
#define MAX31865_SENSOR_OHMS_BED 100
|
||||||
|
#define MAX31865_CALIBRATION_OHMS_BED 430
|
||||||
|
#endif
|
||||||
|
|
||||||
#if HAS_E_TEMP_SENSOR
|
#if HAS_E_TEMP_SENSOR
|
||||||
#define TEMP_RESIDENCY_TIME 10 // (seconds) Time to wait for hotend to "settle" in M109
|
#define TEMP_RESIDENCY_TIME 10 // (seconds) Time to wait for hotend to "settle" in M109
|
||||||
@@ -663,26 +703,28 @@
|
|||||||
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
|
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
|
||||||
*/
|
*/
|
||||||
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
|
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
|
||||||
//#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
|
//#define MPCTEMP // See https://marlinfw.org/docs/features/model_predictive_control.html
|
||||||
|
|
||||||
#define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
|
#define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
|
||||||
#define PID_K1 0.95 // Smoothing factor within any PID loop
|
#define PID_K1 0.95 // Smoothing factor within any PID loop
|
||||||
|
|
||||||
#if ENABLED(PIDTEMP)
|
#if ENABLED(PIDTEMP)
|
||||||
//#define PID_DEBUG // Print PID debug data to the serial port. Use 'M303 D' to toggle activation.
|
//#define MIN_POWER 0 // Min power to improve PID stability (0..PID_MAX).
|
||||||
|
// Get the power from the temperature report ('M105' => @:nnn) and try P*2-20 to P*2-10.
|
||||||
|
//#define PID_DEBUG // Print PID debug data to the serial port. Use 'M303 D' to enable/disable.
|
||||||
//#define PID_PARAMS_PER_HOTEND // Use separate PID parameters for each extruder (useful for mismatched extruders)
|
//#define PID_PARAMS_PER_HOTEND // Use separate PID parameters for each extruder (useful for mismatched extruders)
|
||||||
// Set/get with G-code: M301 E[extruder number, 0-2]
|
// Set/get with G-code: M301 E[extruder number, 0-2]
|
||||||
|
|
||||||
#if ENABLED(PID_PARAMS_PER_HOTEND)
|
#if ENABLED(PID_PARAMS_PER_HOTEND)
|
||||||
// Specify up to one value per hotend here, according to your setup.
|
// Specify up to one value per hotend here, according to your setup.
|
||||||
// If there are fewer values, the last one applies to the remaining hotends.
|
// If there are fewer values, the last one applies to the remaining hotends.
|
||||||
#define DEFAULT_Kp_LIST { 22.20, 22.20 }
|
#define DEFAULT_KP_LIST { 22.20, 22.20 }
|
||||||
#define DEFAULT_Ki_LIST { 1.08, 1.08 }
|
#define DEFAULT_KI_LIST { 1.08, 1.08 }
|
||||||
#define DEFAULT_Kd_LIST { 114.00, 114.00 }
|
#define DEFAULT_KD_LIST { 114.00, 114.00 }
|
||||||
#else
|
#else
|
||||||
#define DEFAULT_Kp 22.20
|
#define DEFAULT_KP 22.20
|
||||||
#define DEFAULT_Ki 1.08
|
#define DEFAULT_KI 1.08
|
||||||
#define DEFAULT_Kd 114.00
|
#define DEFAULT_KD 114.00
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
|
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
|
||||||
@@ -694,15 +736,23 @@
|
|||||||
* Use a physical model of the hotend to control temperature. When configured correctly this gives
|
* Use a physical model of the hotend to control temperature. When configured correctly this gives
|
||||||
* better responsiveness and stability than PID and removes the need for PID_EXTRUSION_SCALING
|
* better responsiveness and stability than PID and removes the need for PID_EXTRUSION_SCALING
|
||||||
* and PID_FAN_SCALING. Enable MPC_AUTOTUNE and use M306 T to autotune the model.
|
* and PID_FAN_SCALING. Enable MPC_AUTOTUNE and use M306 T to autotune the model.
|
||||||
* @section mpctemp
|
* @section mpc temp
|
||||||
*/
|
*/
|
||||||
#if ENABLED(MPCTEMP)
|
#if ENABLED(MPCTEMP)
|
||||||
#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
|
#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~6.3K bytes of flash)
|
||||||
|
#if ENABLED(MPC_AUTOTUNE)
|
||||||
|
//#define MPC_AUTOTUNE_DEBUG // Enable MPC debug logging (~870 bytes of flash)
|
||||||
|
#endif
|
||||||
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
|
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1.3K bytes of flash)
|
||||||
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
|
//#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)
|
||||||
|
|
||||||
#define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
|
#define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
|
||||||
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
|
#define MPC_HEATER_POWER { 40.0f } // (W) Nominal heat cartridge powers.
|
||||||
|
//#define MPC_PTC // Hotend power changes with temperature (e.g., PTC heat cartridges).
|
||||||
|
#if ENABLED(MPC_PTC)
|
||||||
|
#define MPC_HEATER_ALPHA { 0.0028f } // Temperature coefficient of resistance of the heat cartridges.
|
||||||
|
#define MPC_HEATER_REFTEMP { 20 } // (°C) Reference temperature for MPC_HEATER_POWER and MPC_HEATER_ALPHA.
|
||||||
|
#endif
|
||||||
|
|
||||||
#define MPC_INCLUDE_FAN // Model the fan speed?
|
#define MPC_INCLUDE_FAN // Model the fan speed?
|
||||||
|
|
||||||
@@ -734,6 +784,7 @@
|
|||||||
|
|
||||||
#define MPC_TUNING_POS { X_CENTER, Y_CENTER, 1.0f } // (mm) M306 Autotuning position, ideally bed center at first layer height.
|
#define MPC_TUNING_POS { X_CENTER, Y_CENTER, 1.0f } // (mm) M306 Autotuning position, ideally bed center at first layer height.
|
||||||
#define MPC_TUNING_END_Z 10.0f // (mm) M306 Autotuning final Z position.
|
#define MPC_TUNING_END_Z 10.0f // (mm) M306 Autotuning final Z position.
|
||||||
|
//#define EVENT_GCODE_AFTER_MPC_TUNE "M84" // G-code to execute after MPC tune finished and Z raised.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
@@ -765,20 +816,55 @@
|
|||||||
//#define PIDTEMPBED
|
//#define PIDTEMPBED
|
||||||
|
|
||||||
#if ENABLED(PIDTEMPBED)
|
#if ENABLED(PIDTEMPBED)
|
||||||
//#define MIN_BED_POWER 0
|
//#define MIN_BED_POWER 0 // Min power to improve PID stability (0..MAX_BED_POWER).
|
||||||
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
|
// Get the power from the temperature report ('M105' => B@:nnn) and try P*2-20 to P*2-10.
|
||||||
|
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port. Use 'M303 D' to enable/disable.
|
||||||
|
|
||||||
// 120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
|
// 120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
|
||||||
// from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
|
// from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
|
||||||
#define DEFAULT_bedKp 10.00
|
#define DEFAULT_BED_KP 10.00
|
||||||
#define DEFAULT_bedKi .023
|
#define DEFAULT_BED_KI 0.023
|
||||||
#define DEFAULT_bedKd 305.4
|
#define DEFAULT_BED_KD 305.4
|
||||||
|
|
||||||
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
|
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
|
||||||
#else
|
#else
|
||||||
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
|
//#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Peltier Bed - Heating and Cooling
|
||||||
|
*
|
||||||
|
* A Peltier device transfers heat from one side to the other in proportion to the amount of
|
||||||
|
* current flowing through the device and the direction of current flow. So the same device
|
||||||
|
* can both heat and cool.
|
||||||
|
*
|
||||||
|
* When "cooling" in addition to rejecting the heat transferred from the hot side to the cold
|
||||||
|
* side, the dissipated power (voltage * current) must also be rejected. Be sure to set up a
|
||||||
|
* fan that can be powered in sync with the Peltier unit.
|
||||||
|
*
|
||||||
|
* This feature is only set up to run in bang-bang mode because Peltiers don't handle PWM
|
||||||
|
* well without filter circuitry.
|
||||||
|
*
|
||||||
|
* Since existing 3D printers are made to handle relatively high current for the heated bed,
|
||||||
|
* we can use the heated bed power pins to control the Peltier power using the same G-codes
|
||||||
|
* as the heated bed (M140, M190, etc.).
|
||||||
|
*
|
||||||
|
* A second GPIO pin is required to control current direction.
|
||||||
|
* Two configurations are possible: Relay and H-Bridge
|
||||||
|
*
|
||||||
|
* (At this time only relay is supported. H-bridge requires 4 MOS switches configured in H-Bridge.)
|
||||||
|
*
|
||||||
|
* Power is handled by the bang-bang control loop: 0 or 255.
|
||||||
|
* Cooling applications are more common than heating, so the pin states are commonly:
|
||||||
|
* LOW = Heating = Relay Energized
|
||||||
|
* HIGH = Cooling = Relay in "Normal" state
|
||||||
|
*/
|
||||||
|
//#define PELTIER_BED
|
||||||
|
#if ENABLED(PELTIER_BED)
|
||||||
|
#define PELTIER_DIR_PIN -1 // Relay control pin for Peltier
|
||||||
|
#define PELTIER_DIR_HEAT_STATE LOW // The relay pin state that causes the Peltier to heat
|
||||||
|
#endif
|
||||||
|
|
||||||
// Add 'M190 R T' for more gradual M190 R bed cooling.
|
// Add 'M190 R T' for more gradual M190 R bed cooling.
|
||||||
//#define BED_ANNEALING_GCODE
|
//#define BED_ANNEALING_GCODE
|
||||||
|
|
||||||
@@ -813,24 +899,26 @@
|
|||||||
#define MAX_CHAMBER_POWER 255 // limits duty cycle to chamber heater; 255=full current
|
#define MAX_CHAMBER_POWER 255 // limits duty cycle to chamber heater; 255=full current
|
||||||
|
|
||||||
#if ENABLED(PIDTEMPCHAMBER)
|
#if ENABLED(PIDTEMPCHAMBER)
|
||||||
#define MIN_CHAMBER_POWER 0
|
//#define MIN_CHAMBER_POWER 0 // Min power to improve PID stability. (0..MAX_CHAMBER_POWER)
|
||||||
//#define PID_CHAMBER_DEBUG // Print Chamber PID debug data to the serial port.
|
// Get the power from the temperature report ('M105' => C@:nnn) and try P*2-20 to P*2-10.
|
||||||
|
//#define PID_CHAMBER_DEBUG // Print Chamber PID debug data to the serial port. Use 'M303 D' to enable/disable.
|
||||||
|
|
||||||
// Lasko "MyHeat Personal Heater" (200w) modified with a Fotek SSR-10DA to control only the heating element
|
// Lasko "MyHeat Personal Heater" (200w) modified with a Fotek SSR-10DA to control only the heating element
|
||||||
// and placed inside the small Creality printer enclosure tent.
|
// and placed inside the small Creality printer enclosure tent.
|
||||||
//
|
#define DEFAULT_CHAMBER_KP 37.04
|
||||||
#define DEFAULT_chamberKp 37.04
|
#define DEFAULT_CHAMBER_KI 1.40
|
||||||
#define DEFAULT_chamberKi 1.40
|
#define DEFAULT_CHAMBER_KD 655.17
|
||||||
#define DEFAULT_chamberKd 655.17
|
|
||||||
// M309 P37.04 I1.04 D655.17
|
// M309 P37.04 I1.04 D655.17
|
||||||
|
|
||||||
// FIND YOUR OWN: "M303 E-2 C8 S50" to run autotune on the chamber at 50 degreesC for 8 cycles.
|
// FIND YOUR OWN: "M303 E-2 C8 S50" to run autotune on the chamber at 50 degreesC for 8 cycles.
|
||||||
#endif // PIDTEMPCHAMBER
|
#endif // PIDTEMPCHAMBER
|
||||||
|
|
||||||
|
// @section pid temp
|
||||||
|
|
||||||
#if ANY(PIDTEMP, PIDTEMPBED, PIDTEMPCHAMBER)
|
#if ANY(PIDTEMP, PIDTEMPBED, PIDTEMPCHAMBER)
|
||||||
//#define PID_OPENLOOP // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
|
//#define PID_OPENLOOP // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
|
||||||
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
|
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
|
||||||
#define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
|
#define PID_FUNCTIONAL_RANGE 20 // If the temperature difference between the target temperature and the actual temperature
|
||||||
// is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
|
// is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
|
||||||
|
|
||||||
//#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of flash)
|
//#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of flash)
|
||||||
@@ -866,7 +954,7 @@
|
|||||||
* protect against a broken or disconnected thermistor wire.
|
* protect against a broken or disconnected thermistor wire.
|
||||||
*
|
*
|
||||||
* The issue: If a thermistor falls out, it will report the much lower
|
* The issue: If a thermistor falls out, it will report the much lower
|
||||||
* temperature of the air in the room, and the the firmware will keep
|
* temperature of the air in the room, and the firmware will keep
|
||||||
* the heater on.
|
* the heater on.
|
||||||
*
|
*
|
||||||
* If you get "Thermal Runaway" or "Heating failed" errors the
|
* If you get "Thermal Runaway" or "Heating failed" errors the
|
||||||
@@ -882,7 +970,7 @@
|
|||||||
//============================= Mechanical Settings =========================
|
//============================= Mechanical Settings =========================
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
||||||
// @section machine
|
// @section kinematics
|
||||||
|
|
||||||
// Enable one of the options below for CoreXY, CoreXZ, or CoreYZ kinematics,
|
// Enable one of the options below for CoreXY, CoreXZ, or CoreYZ kinematics,
|
||||||
// either in the usual order or reversed
|
// either in the usual order or reversed
|
||||||
@@ -906,6 +994,15 @@
|
|||||||
// Enable for a belt style printer with endless "Z" motion
|
// Enable for a belt style printer with endless "Z" motion
|
||||||
//#define BELTPRINTER
|
//#define BELTPRINTER
|
||||||
|
|
||||||
|
// Articulated robot (arm). Joints are directly mapped to axes with no kinematics.
|
||||||
|
//#define ARTICULATED_ROBOT_ARM
|
||||||
|
|
||||||
|
// For a hot wire cutter with parallel horizontal axes (X, I) where the heights of the two wire
|
||||||
|
// ends are controlled by parallel axes (Y, J). Joints are directly mapped to axes (no kinematics).
|
||||||
|
//#define FOAMCUTTER_XYUV
|
||||||
|
|
||||||
|
// @section polargraph
|
||||||
|
|
||||||
// Enable for Polargraph Kinematics
|
// Enable for Polargraph Kinematics
|
||||||
//#define POLARGRAPH
|
//#define POLARGRAPH
|
||||||
#if ENABLED(POLARGRAPH)
|
#if ENABLED(POLARGRAPH)
|
||||||
@@ -949,9 +1046,6 @@
|
|||||||
// Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers).
|
// Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers).
|
||||||
#define PRINTABLE_RADIUS 140.0 // (mm)
|
#define PRINTABLE_RADIUS 140.0 // (mm)
|
||||||
|
|
||||||
// Maximum reachable area
|
|
||||||
#define DELTA_MAX_RADIUS 140.0 // (mm)
|
|
||||||
|
|
||||||
// Center-to-center distance of the holes in the diagonal push rods.
|
// Center-to-center distance of the holes in the diagonal push rods.
|
||||||
#define DELTA_DIAGONAL_ROD 250.0 // (mm)
|
#define DELTA_DIAGONAL_ROD 250.0 // (mm)
|
||||||
|
|
||||||
@@ -971,7 +1065,8 @@
|
|||||||
// Delta radius and diagonal rod adjustments
|
// Delta radius and diagonal rod adjustments
|
||||||
//#define DELTA_RADIUS_TRIM_TOWER { 0.0, 0.0, 0.0 } // (mm)
|
//#define DELTA_RADIUS_TRIM_TOWER { 0.0, 0.0, 0.0 } // (mm)
|
||||||
//#define DELTA_DIAGONAL_ROD_TRIM_TOWER { 0.0, 0.0, 0.0 } // (mm)
|
//#define DELTA_DIAGONAL_ROD_TRIM_TOWER { 0.0, 0.0, 0.0 } // (mm)
|
||||||
#endif
|
|
||||||
|
#endif // DELTA
|
||||||
|
|
||||||
// @section scara
|
// @section scara
|
||||||
|
|
||||||
@@ -1006,9 +1101,6 @@
|
|||||||
// Radius around the center where the arm cannot reach
|
// Radius around the center where the arm cannot reach
|
||||||
#define MIDDLE_DEAD_ZONE_R 0 // (mm)
|
#define MIDDLE_DEAD_ZONE_R 0 // (mm)
|
||||||
|
|
||||||
#define THETA_HOMING_OFFSET 0 // Calculated from Calibration Guide and M360 / M114. See https://www.morgan3dp.com/morgan-calibration-guide/
|
|
||||||
#define PSI_HOMING_OFFSET 0 // Calculated from Calibration Guide and M364 / M114. See https://www.morgan3dp.com/morgan-calibration-guide/
|
|
||||||
|
|
||||||
#elif ENABLED(MP_SCARA)
|
#elif ENABLED(MP_SCARA)
|
||||||
|
|
||||||
#define SCARA_OFFSET_THETA1 12 // degrees
|
#define SCARA_OFFSET_THETA1 12 // degrees
|
||||||
@@ -1027,24 +1119,40 @@
|
|||||||
#define DEFAULT_SEGMENTS_PER_SECOND 200
|
#define DEFAULT_SEGMENTS_PER_SECOND 200
|
||||||
|
|
||||||
// Length of inner and outer support arms. Measure arm lengths precisely.
|
// Length of inner and outer support arms. Measure arm lengths precisely.
|
||||||
#define TPARA_LINKAGE_1 120 // (mm)
|
#define TPARA_LINKAGE_1 120 // (mm)
|
||||||
#define TPARA_LINKAGE_2 120 // (mm)
|
#define TPARA_LINKAGE_2 120 // (mm)
|
||||||
|
|
||||||
// SCARA tower offset (position of Tower relative to bed zero position)
|
// Height of the Shoulder axis (pivot) relative to the tower floor
|
||||||
// This needs to be reasonably accurate as it defines the printbed position in the SCARA space.
|
#define TPARA_SHOULDER_AXIS_HEIGHT 135.0 // (mm)
|
||||||
#define TPARA_OFFSET_X 0 // (mm)
|
|
||||||
#define TPARA_OFFSET_Y 0 // (mm)
|
// The position of the last linkage relative to the robot arm origin
|
||||||
#define TPARA_OFFSET_Z 0 // (mm)
|
// (intersection of the base axis and floor) when at the home position
|
||||||
|
#define TPARA_ARM_X_HOME_POS 28.75 // (mm) Measured from shoulder axis to tool holder axis in home position
|
||||||
|
#define TPARA_ARM_Y_HOME_POS 0 // (mm)
|
||||||
|
#define TPARA_ARM_Z_HOME_POS 250.00 // (mm) Measured from tool holder axis to the floor
|
||||||
|
|
||||||
|
// TPARA Workspace offset relative to the tower (position of workspace origin relative to robot Tower origin )
|
||||||
|
// This needs to be reasonably accurate as it defines the printbed position in the TPARA space.
|
||||||
|
#define TPARA_OFFSET_X 127.0 // (mm) to coincide with minimum radius MIDDLE_DEAD_ZONE_R, and W(0,0,0) is reachable
|
||||||
|
#define TPARA_OFFSET_Y 0.0 // (mm)
|
||||||
|
#define TPARA_OFFSET_Z 0.0 // (mm)
|
||||||
|
|
||||||
|
// TPARA tool connection point offset, relative to the tool moving frame origin which is in the last linkage axis,
|
||||||
|
// (TCP: tool center/connection point) of the robot,
|
||||||
|
// the plane of measured offset must be alligned with home position plane
|
||||||
|
#define TPARA_TCP_OFFSET_X 27.0 // (mm) Tool flange: 27 (distance from pivot to bolt holes), extruder tool: 50.0,
|
||||||
|
#define TPARA_TCP_OFFSET_Y 0.0 // (mm)
|
||||||
|
#define TPARA_TCP_OFFSET_Z -65.0 // (mm) Tool flange (bottom): -6 (caution as Z 0 posiion will crash second linkage to the floor, -35 is safe for testing with no tool), extruder tool (depends on extruder): -65.0
|
||||||
|
|
||||||
#define FEEDRATE_SCALING // Convert XY feedrate from mm/s to degrees/s on the fly
|
#define FEEDRATE_SCALING // Convert XY feedrate from mm/s to degrees/s on the fly
|
||||||
|
|
||||||
// Radius around the center where the arm cannot reach
|
// Radius around the center where the arm cannot reach
|
||||||
#define MIDDLE_DEAD_ZONE_R 0 // (mm)
|
// For now use a hardcoded uniform limit, although it should be calculated, or fix a limit for each axis angle
|
||||||
|
#define MIDDLE_DEAD_ZONE_R 100 // (mm)
|
||||||
|
|
||||||
// Calculated from Calibration Guide and M360 / M114. See https://www.morgan3dp.com/morgan-calibration-guide/
|
// Max angle between L1 and L2
|
||||||
#define THETA_HOMING_OFFSET 0
|
#define TPARA_MAX_L1L2_ANGLE 140.0f // (degrees)
|
||||||
#define PSI_HOMING_OFFSET 0
|
#endif // AXEL_TPARA
|
||||||
#endif
|
|
||||||
|
|
||||||
// @section polar
|
// @section polar
|
||||||
|
|
||||||
@@ -1099,15 +1207,6 @@
|
|||||||
#define FEEDRATE_SCALING // Convert XY feedrate from mm/s to degrees/s on the fly
|
#define FEEDRATE_SCALING // Convert XY feedrate from mm/s to degrees/s on the fly
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// @section machine
|
|
||||||
|
|
||||||
// Articulated robot (arm). Joints are directly mapped to axes with no kinematics.
|
|
||||||
//#define ARTICULATED_ROBOT_ARM
|
|
||||||
|
|
||||||
// For a hot wire cutter with parallel horizontal axes (X, I) where the heights of the two wire
|
|
||||||
// ends are controlled by parallel axes (Y, J). Joints are directly mapped to axes (no kinematics).
|
|
||||||
//#define FOAMCUTTER_XYUV
|
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
//============================== Endstop Settings ===========================
|
//============================== Endstop Settings ===========================
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
@@ -1231,11 +1330,16 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Default Axis Steps Per Unit (linear=steps/mm, rotational=steps/°)
|
* Default Axis Steps Per Unit (linear=steps/mm, rotational=steps/°)
|
||||||
* Override with M92
|
* Override with M92 (when enabled below)
|
||||||
* X, Y, Z [, I [, J [, K...]]], E0 [, E1[, E2...]]
|
* X, Y, Z [, I [, J [, K...]]], E0 [, E1[, E2...]]
|
||||||
*/
|
*/
|
||||||
#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 400, 500 }
|
#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 400, 500 }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enable support for M92. Disable to save at least ~530 bytes of flash.
|
||||||
|
*/
|
||||||
|
#define EDITABLE_STEPS_PER_UNIT
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default Max Feed Rate (linear=mm/s, rotational=°/s)
|
* Default Max Feed Rate (linear=mm/s, rotational=°/s)
|
||||||
* Override with M203
|
* Override with M203
|
||||||
@@ -1286,6 +1390,7 @@
|
|||||||
#define DEFAULT_XJERK 10.0
|
#define DEFAULT_XJERK 10.0
|
||||||
#define DEFAULT_YJERK 10.0
|
#define DEFAULT_YJERK 10.0
|
||||||
#define DEFAULT_ZJERK 0.3
|
#define DEFAULT_ZJERK 0.3
|
||||||
|
#define DEFAULT_EJERK 5.0
|
||||||
//#define DEFAULT_IJERK 0.3
|
//#define DEFAULT_IJERK 0.3
|
||||||
//#define DEFAULT_JJERK 0.3
|
//#define DEFAULT_JJERK 0.3
|
||||||
//#define DEFAULT_KJERK 0.3
|
//#define DEFAULT_KJERK 0.3
|
||||||
@@ -1301,8 +1406,6 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define DEFAULT_EJERK 5.0 // May be used by Linear Advance
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Junction Deviation Factor
|
* Junction Deviation Factor
|
||||||
*
|
*
|
||||||
@@ -1325,6 +1428,11 @@
|
|||||||
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
|
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
|
||||||
*/
|
*/
|
||||||
//#define S_CURVE_ACCELERATION
|
//#define S_CURVE_ACCELERATION
|
||||||
|
#if ENABLED(S_CURVE_ACCELERATION)
|
||||||
|
// Define to use 4th instead of 6th order motion curve
|
||||||
|
//#define S_CURVE_FACTOR 0.25 // Initial and final acceleration factor, ideally 0.1 to 0.4.
|
||||||
|
// Shouldn't generally require tuning.
|
||||||
|
#endif
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
//============================= Z Probe Options =============================
|
//============================= Z Probe Options =============================
|
||||||
@@ -1442,6 +1550,17 @@
|
|||||||
//#define BD_SENSOR_PROBE_NO_STOP // Probe bed without stopping at each probe point
|
//#define BD_SENSOR_PROBE_NO_STOP // Probe bed without stopping at each probe point
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* BIQU MicroProbe
|
||||||
|
*
|
||||||
|
* A lightweight, solenoid-driven probe.
|
||||||
|
* For information about this sensor https://github.com/bigtreetech/MicroProbe
|
||||||
|
*
|
||||||
|
* Also requires PROBE_ENABLE_DISABLE
|
||||||
|
*/
|
||||||
|
//#define BIQU_MICROPROBE_V1 // Triggers HIGH
|
||||||
|
//#define BIQU_MICROPROBE_V2 // Triggers LOW
|
||||||
|
|
||||||
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
|
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
|
||||||
//#define SOLENOID_PROBE
|
//#define SOLENOID_PROBE
|
||||||
|
|
||||||
@@ -1465,6 +1584,20 @@
|
|||||||
#define PROBE_DEPLOY_FEEDRATE (133*60) // (mm/min) Probe deploy speed
|
#define PROBE_DEPLOY_FEEDRATE (133*60) // (mm/min) Probe deploy speed
|
||||||
#define PROBE_STOW_FEEDRATE (133*60) // (mm/min) Probe stow speed
|
#define PROBE_STOW_FEEDRATE (133*60) // (mm/min) Probe stow speed
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Magnetically Mounted Probe with a Servo mechanism
|
||||||
|
* Probe Deploy and Stow both follow the same basic sequence:
|
||||||
|
* - Rotate the SERVO to its Deployed angle
|
||||||
|
* - Perform XYZ moves to deploy or stow the PROBE
|
||||||
|
* - Rotate the SERVO to its Stowed angle
|
||||||
|
*/
|
||||||
|
//#define MAG_MOUNTED_PROBE_SERVO_NR 0 // Servo Number for this probe
|
||||||
|
#ifdef MAG_MOUNTED_PROBE_SERVO_NR
|
||||||
|
#define MAG_MOUNTED_PROBE_SERVO_ANGLES { 90, 0 } // Servo Angles for Deployed, Stowed
|
||||||
|
#define MAG_MOUNTED_PRE_DEPLOY { PROBE_DEPLOY_FEEDRATE, { 15, 160, 30 } } // Safe position for servo activation
|
||||||
|
#define MAG_MOUNTED_PRE_STOW { PROBE_DEPLOY_FEEDRATE, { 15, 160, 30 } } // Safe position for servo deactivation
|
||||||
|
#endif
|
||||||
|
|
||||||
#define MAG_MOUNTED_DEPLOY_1 { PROBE_DEPLOY_FEEDRATE, { 245, 114, 30 } } // Move to side Dock & Attach probe
|
#define MAG_MOUNTED_DEPLOY_1 { PROBE_DEPLOY_FEEDRATE, { 245, 114, 30 } } // Move to side Dock & Attach probe
|
||||||
#define MAG_MOUNTED_DEPLOY_2 { PROBE_DEPLOY_FEEDRATE, { 210, 114, 30 } } // Move probe off dock
|
#define MAG_MOUNTED_DEPLOY_2 { PROBE_DEPLOY_FEEDRATE, { 210, 114, 30 } } // Move probe off dock
|
||||||
#define MAG_MOUNTED_DEPLOY_3 { PROBE_DEPLOY_FEEDRATE, { 0, 0, 0 } } // Extra move if needed
|
#define MAG_MOUNTED_DEPLOY_3 { PROBE_DEPLOY_FEEDRATE, { 0, 0, 0 } } // Extra move if needed
|
||||||
@@ -1572,18 +1705,21 @@
|
|||||||
//#define PROBE_TOOLCHANGE_NO_MOVE // Suppress motion on probe tool-change
|
//#define PROBE_TOOLCHANGE_NO_MOVE // Suppress motion on probe tool-change
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//#define PROBE_WAKEUP_TIME_MS 30 // (ms) Time for the probe to wake up
|
||||||
|
|
||||||
// Most probes should stay away from the edges of the bed, but
|
// Most probes should stay away from the edges of the bed, but
|
||||||
// with NOZZLE_AS_PROBE this can be negative for a wider probing area.
|
// with NOZZLE_AS_PROBE this can be negative for a wider probing area.
|
||||||
#define PROBING_MARGIN 10
|
#define PROBING_MARGIN 10
|
||||||
|
|
||||||
// X and Y axis travel speed (mm/min) between probes
|
// X and Y axis travel speed between probes.
|
||||||
#define XY_PROBE_FEEDRATE (133*60)
|
// Leave undefined to use the average of the current XY homing feedrate.
|
||||||
|
#define XY_PROBE_FEEDRATE (133*60) // (mm/min)
|
||||||
|
|
||||||
// Feedrate (mm/min) for the first approach when double-probing (MULTIPLE_PROBING == 2)
|
// Feedrate for the first approach when double-probing (MULTIPLE_PROBING == 2)
|
||||||
#define Z_PROBE_FEEDRATE_FAST (4*60)
|
#define Z_PROBE_FEEDRATE_FAST (4*60) // (mm/min)
|
||||||
|
|
||||||
// Feedrate (mm/min) for the "accurate" probe of each point
|
// Feedrate for the "accurate" probe of each point
|
||||||
#define Z_PROBE_FEEDRATE_SLOW (Z_PROBE_FEEDRATE_FAST / 2)
|
#define Z_PROBE_FEEDRATE_SLOW (Z_PROBE_FEEDRATE_FAST / 2) // (mm/min)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Probe Activation Switch
|
* Probe Activation Switch
|
||||||
@@ -1607,6 +1743,7 @@
|
|||||||
#define PROBE_TARE_DELAY 200 // (ms) Delay after tare before
|
#define PROBE_TARE_DELAY 200 // (ms) Delay after tare before
|
||||||
#define PROBE_TARE_STATE HIGH // State to write pin for tare
|
#define PROBE_TARE_STATE HIGH // State to write pin for tare
|
||||||
//#define PROBE_TARE_PIN PA5 // Override default pin
|
//#define PROBE_TARE_PIN PA5 // Override default pin
|
||||||
|
//#define PROBE_TARE_MENU // Display a menu item to tare the probe
|
||||||
#if ENABLED(PROBE_ACTIVATION_SWITCH)
|
#if ENABLED(PROBE_ACTIVATION_SWITCH)
|
||||||
//#define PROBE_TARE_ONLY_WHILE_INACTIVE // Fail to tare/probe if PROBE_ACTIVATION_SWITCH is active
|
//#define PROBE_TARE_ONLY_WHILE_INACTIVE // Fail to tare/probe if PROBE_ACTIVATION_SWITCH is active
|
||||||
#endif
|
#endif
|
||||||
@@ -1644,8 +1781,8 @@
|
|||||||
* probe Z Offset set with NOZZLE_TO_PROBE_OFFSET, M851, or the LCD.
|
* probe Z Offset set with NOZZLE_TO_PROBE_OFFSET, M851, or the LCD.
|
||||||
* Only integer values >= 1 are valid here.
|
* Only integer values >= 1 are valid here.
|
||||||
*
|
*
|
||||||
* Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle.
|
* Example: 'M851 Z-5' with a CLEARANCE of 4 => 9mm from bed to nozzle.
|
||||||
* But: `M851 Z+1` with a CLEARANCE of 2 => 2mm from bed to nozzle.
|
* But: 'M851 Z+1' with a CLEARANCE of 2 => 2mm from bed to nozzle.
|
||||||
*/
|
*/
|
||||||
#define Z_CLEARANCE_DEPLOY_PROBE 10 // (mm) Z Clearance for Deploy/Stow
|
#define Z_CLEARANCE_DEPLOY_PROBE 10 // (mm) Z Clearance for Deploy/Stow
|
||||||
#define Z_CLEARANCE_BETWEEN_PROBES 5 // (mm) Z Clearance between probe points
|
#define Z_CLEARANCE_BETWEEN_PROBES 5 // (mm) Z Clearance between probe points
|
||||||
@@ -1696,18 +1833,20 @@
|
|||||||
#define PROBING_BED_TEMP 50
|
#define PROBING_BED_TEMP 50
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// @section stepper drivers
|
||||||
|
|
||||||
// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
|
// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
|
||||||
// :{ 0:'Low', 1:'High' }
|
// :['LOW', 'HIGH']
|
||||||
#define X_ENABLE_ON 0
|
#define X_ENABLE_ON LOW
|
||||||
#define Y_ENABLE_ON 0
|
#define Y_ENABLE_ON LOW
|
||||||
#define Z_ENABLE_ON 0
|
#define Z_ENABLE_ON LOW
|
||||||
#define E_ENABLE_ON 0 // For all extruders
|
#define E_ENABLE_ON LOW // For all extruders
|
||||||
//#define I_ENABLE_ON 0
|
//#define I_ENABLE_ON LOW
|
||||||
//#define J_ENABLE_ON 0
|
//#define J_ENABLE_ON LOW
|
||||||
//#define K_ENABLE_ON 0
|
//#define K_ENABLE_ON LOW
|
||||||
//#define U_ENABLE_ON 0
|
//#define U_ENABLE_ON LOW
|
||||||
//#define V_ENABLE_ON 0
|
//#define V_ENABLE_ON LOW
|
||||||
//#define W_ENABLE_ON 0
|
//#define W_ENABLE_ON LOW
|
||||||
|
|
||||||
// Disable axis steppers immediately when they're not being stepped.
|
// Disable axis steppers immediately when they're not being stepped.
|
||||||
// WARNING: When motors turn off there is a chance of losing position accuracy!
|
// WARNING: When motors turn off there is a chance of losing position accuracy!
|
||||||
@@ -1869,6 +2008,8 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @section filament runout sensors
|
||||||
|
*
|
||||||
* Filament Runout Sensors
|
* Filament Runout Sensors
|
||||||
* Mechanical or opto endstops are used to check for the presence of filament.
|
* Mechanical or opto endstops are used to check for the presence of filament.
|
||||||
*
|
*
|
||||||
@@ -1942,8 +2083,11 @@
|
|||||||
//#define FILAMENT_MOTION_SENSOR
|
//#define FILAMENT_MOTION_SENSOR
|
||||||
|
|
||||||
#if ENABLED(FILAMENT_MOTION_SENSOR)
|
#if ENABLED(FILAMENT_MOTION_SENSOR)
|
||||||
//#define FILAMENT_SWITCH_AND_MOTION
|
//#define FILAMENT_SWITCH_AND_MOTION // Define separate pins below to sense motion
|
||||||
#if ENABLED(FILAMENT_SWITCH_AND_MOTION)
|
#if ENABLED(FILAMENT_SWITCH_AND_MOTION)
|
||||||
|
|
||||||
|
#define FILAMENT_MOTION_DISTANCE_MM 3.0 // (mm) Missing distance required to trigger runout
|
||||||
|
|
||||||
#define NUM_MOTION_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_MOTION#_PIN for each.
|
#define NUM_MOTION_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_MOTION#_PIN for each.
|
||||||
//#define FIL_MOTION1_PIN -1
|
//#define FIL_MOTION1_PIN -1
|
||||||
|
|
||||||
@@ -1979,10 +2123,10 @@
|
|||||||
//#define FIL_MOTION8_STATE LOW
|
//#define FIL_MOTION8_STATE LOW
|
||||||
//#define FIL_MOTION8_PULLUP
|
//#define FIL_MOTION8_PULLUP
|
||||||
//#define FIL_MOTION8_PULLDOWN
|
//#define FIL_MOTION8_PULLDOWN
|
||||||
#endif
|
#endif // FILAMENT_SWITCH_AND_MOTION
|
||||||
#endif
|
#endif // FILAMENT_MOTION_SENSOR
|
||||||
#endif
|
#endif // FILAMENT_RUNOUT_DISTANCE_MM
|
||||||
#endif
|
#endif // FILAMENT_RUNOUT_SENSOR
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
//=============================== Bed Leveling ==============================
|
//=============================== Bed Leveling ==============================
|
||||||
@@ -2028,6 +2172,12 @@
|
|||||||
//#define AUTO_BED_LEVELING_UBL
|
//#define AUTO_BED_LEVELING_UBL
|
||||||
//#define MESH_BED_LEVELING
|
//#define MESH_BED_LEVELING
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Commands to execute at the start of G29 probing,
|
||||||
|
* after switching to the PROBING_TOOL.
|
||||||
|
*/
|
||||||
|
//#define EVENT_GCODE_BEFORE_G29 "M300 P440 S200"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Commands to execute at the end of G29 probing.
|
* Commands to execute at the end of G29 probing.
|
||||||
* Useful to retract or move the Z probe out of the way.
|
* Useful to retract or move the Z probe out of the way.
|
||||||
@@ -2176,7 +2326,7 @@
|
|||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
||||||
#define MESH_INSET 10 // Set Mesh bounds as an inset region of the bed
|
#define MESH_INSET 10 // Set Mesh bounds as an inset region of the bed
|
||||||
#define GRID_MAX_POINTS_X 3 // Don't use more than 7 points per axis, implementation limited.
|
#define GRID_MAX_POINTS_X 3
|
||||||
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
|
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
|
||||||
|
|
||||||
//#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
|
//#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
|
||||||
@@ -2201,7 +2351,7 @@
|
|||||||
#if ENABLED(LCD_BED_TRAMMING)
|
#if ENABLED(LCD_BED_TRAMMING)
|
||||||
#define BED_TRAMMING_INSET_LFRB { 30, 30, 30, 30 } // (mm) Left, Front, Right, Back insets
|
#define BED_TRAMMING_INSET_LFRB { 30, 30, 30, 30 } // (mm) Left, Front, Right, Back insets
|
||||||
#define BED_TRAMMING_HEIGHT 0.0 // (mm) Z height of nozzle at tramming points
|
#define BED_TRAMMING_HEIGHT 0.0 // (mm) Z height of nozzle at tramming points
|
||||||
#define BED_TRAMMING_Z_HOP 4.0 // (mm) Z height of nozzle between tramming points
|
#define BED_TRAMMING_Z_HOP 4.0 // (mm) Z raise between tramming points
|
||||||
//#define BED_TRAMMING_INCLUDE_CENTER // Move to the center after the last corner
|
//#define BED_TRAMMING_INCLUDE_CENTER // Move to the center after the last corner
|
||||||
//#define BED_TRAMMING_USE_PROBE
|
//#define BED_TRAMMING_USE_PROBE
|
||||||
#if ENABLED(BED_TRAMMING_USE_PROBE)
|
#if ENABLED(BED_TRAMMING_USE_PROBE)
|
||||||
@@ -2265,6 +2415,9 @@
|
|||||||
// Homing speeds (linear=mm/min, rotational=°/min)
|
// Homing speeds (linear=mm/min, rotational=°/min)
|
||||||
#define HOMING_FEEDRATE_MM_M { (50*60), (50*60), (4*60) }
|
#define HOMING_FEEDRATE_MM_M { (50*60), (50*60), (4*60) }
|
||||||
|
|
||||||
|
// Edit homing feedrates with M210 and MarlinUI menu items
|
||||||
|
//#define EDITABLE_HOMING_FEEDRATE
|
||||||
|
|
||||||
// Validate that endstops are triggered on homing moves
|
// Validate that endstops are triggered on homing moves
|
||||||
#define VALIDATE_HOMING_ENDSTOPS
|
#define VALIDATE_HOMING_ENDSTOPS
|
||||||
|
|
||||||
@@ -2391,9 +2544,9 @@
|
|||||||
#define PREHEAT_2_TEMP_CHAMBER 35
|
#define PREHEAT_2_TEMP_CHAMBER 35
|
||||||
#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255
|
#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255
|
||||||
|
|
||||||
// @section motion
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @section nozzle park
|
||||||
|
*
|
||||||
* Nozzle Park
|
* Nozzle Park
|
||||||
*
|
*
|
||||||
* Park the nozzle at the given XYZ position on idle or G27.
|
* Park the nozzle at the given XYZ position on idle or G27.
|
||||||
@@ -2416,6 +2569,8 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @section nozzle clean
|
||||||
|
*
|
||||||
* Clean Nozzle Feature
|
* Clean Nozzle Feature
|
||||||
*
|
*
|
||||||
* Adds the G12 command to perform a nozzle cleaning process.
|
* Adds the G12 command to perform a nozzle cleaning process.
|
||||||
@@ -2576,9 +2731,24 @@
|
|||||||
//#include "Configuration_Secure.h" // External file with PASSWORD_DEFAULT_VALUE
|
//#include "Configuration_Secure.h" // External file with PASSWORD_DEFAULT_VALUE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//=============================================================================
|
// @section media
|
||||||
//============================= LCD and SD support ============================
|
|
||||||
//=============================================================================
|
/**
|
||||||
|
* SD CARD
|
||||||
|
*
|
||||||
|
* SD Card support is disabled by default. If your controller has an SD slot,
|
||||||
|
* you must uncomment the following option or it won't work.
|
||||||
|
*/
|
||||||
|
//#define SDSUPPORT
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SD CARD: ENABLE CRC
|
||||||
|
*
|
||||||
|
* Use CRC checks and retries on the SD communication.
|
||||||
|
*/
|
||||||
|
#if ENABLED(SDSUPPORT)
|
||||||
|
//#define SD_CHECK_AND_RETRY
|
||||||
|
#endif
|
||||||
|
|
||||||
// @section interface
|
// @section interface
|
||||||
|
|
||||||
@@ -2619,27 +2789,12 @@
|
|||||||
#define DISPLAY_CHARSET_HD44780 JAPANESE
|
#define DISPLAY_CHARSET_HD44780 JAPANESE
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Info Screen Style (0:Classic, 1:Průša)
|
* Info Screen Style (0:Classic, 1:Průša, 2:CNC)
|
||||||
*
|
*
|
||||||
* :[0:'Classic', 1:'Průša']
|
* :[0:'Classic', 1:'Průša', 2:'CNC']
|
||||||
*/
|
*/
|
||||||
#define LCD_INFO_SCREEN_STYLE 0
|
#define LCD_INFO_SCREEN_STYLE 0
|
||||||
|
|
||||||
/**
|
|
||||||
* SD CARD
|
|
||||||
*
|
|
||||||
* SD Card support is disabled by default. If your controller has an SD slot,
|
|
||||||
* you must uncomment the following option or it won't work.
|
|
||||||
*/
|
|
||||||
//#define SDSUPPORT
|
|
||||||
|
|
||||||
/**
|
|
||||||
* SD CARD: ENABLE CRC
|
|
||||||
*
|
|
||||||
* Use CRC checks and retries on the SD communication.
|
|
||||||
*/
|
|
||||||
//#define SD_CHECK_AND_RETRY
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* LCD Menu Items
|
* LCD Menu Items
|
||||||
*
|
*
|
||||||
@@ -2768,7 +2923,7 @@
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Original RADDS LCD Display+Encoder+SDCardReader
|
// Original RADDS LCD Display+Encoder+SDCardReader
|
||||||
// https://web.archive.org/web/20200719145306/http://doku.radds.org/dokumentation/lcd-display/
|
// https://web.archive.org/web/20200719145306/doku.radds.org/dokumentation/lcd-display/
|
||||||
//
|
//
|
||||||
//#define RADDS_DISPLAY
|
//#define RADDS_DISPLAY
|
||||||
|
|
||||||
@@ -2807,13 +2962,15 @@
|
|||||||
//
|
//
|
||||||
//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
|
//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
|
||||||
|
|
||||||
//
|
/**
|
||||||
// ANET and Tronxy 20x4 Controller
|
* ANET and Tronxy 20x4 Controller
|
||||||
//
|
* LCD2004 display with 5 analog buttons.
|
||||||
//#define ZONESTAR_LCD // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
|
*
|
||||||
// This LCD is known to be susceptible to electrical interference
|
* NOTE: Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
|
||||||
// which scrambles the display. Pressing any button clears it up.
|
* This LCD is known to be susceptible to electrical interference which
|
||||||
// This is a LCD2004 display with 5 analog buttons.
|
* scrambles the display. Press any button to clear it up.
|
||||||
|
*/
|
||||||
|
//#define ZONESTAR_LCD
|
||||||
|
|
||||||
//
|
//
|
||||||
// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
|
// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
|
||||||
@@ -2834,7 +2991,7 @@
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Elefu RA Board Control Panel
|
// Elefu RA Board Control Panel
|
||||||
// https://web.archive.org/web/20140823033947/http://www.elefu.com/index.php?route=product/product&product_id=53
|
// https://web.archive.org/web/20140823033947/www.elefu.com/index.php?route=product/product&product_id=53
|
||||||
//
|
//
|
||||||
//#define RA_CONTROL_PANEL
|
//#define RA_CONTROL_PANEL
|
||||||
|
|
||||||
@@ -2966,7 +3123,7 @@
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Cartesio UI
|
// Cartesio UI
|
||||||
// https://web.archive.org/web/20180605050442/http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
|
// https://web.archive.org/web/20180605050442/mauk.cc/webshop/cartesio-shop/electronics/user-interface
|
||||||
//
|
//
|
||||||
//#define CARTESIO_UI
|
//#define CARTESIO_UI
|
||||||
|
|
||||||
@@ -3001,7 +3158,7 @@
|
|||||||
|
|
||||||
//
|
//
|
||||||
// FYSETC variant of the MINI12864 graphic controller with SD support
|
// FYSETC variant of the MINI12864 graphic controller with SD support
|
||||||
// https://wiki.fysetc.com/Mini12864_Panel/
|
// https://wiki.fysetc.com/docs/Mini12864Panel
|
||||||
//
|
//
|
||||||
//#define FYSETC_MINI_12864_X_X // Type C/D/E/F. No tunable RGB Backlight by default
|
//#define FYSETC_MINI_12864_X_X // Type C/D/E/F. No tunable RGB Backlight by default
|
||||||
//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on)
|
//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on)
|
||||||
@@ -3022,7 +3179,7 @@
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Factory display for Creality CR-10 / CR-7 / Ender-3
|
// Factory display for Creality CR-10 / CR-7 / Ender-3
|
||||||
// https://www.aliexpress.com/item/32833148327.html
|
// https://marlinfw.org/docs/hardware/controllers.html#cr10_stockdisplay
|
||||||
//
|
//
|
||||||
// Connect to EXP1 on RAMPS and compatible boards.
|
// Connect to EXP1 on RAMPS and compatible boards.
|
||||||
//
|
//
|
||||||
@@ -3090,14 +3247,14 @@
|
|||||||
//
|
//
|
||||||
// Tiny, but very sharp OLED display
|
// Tiny, but very sharp OLED display
|
||||||
//
|
//
|
||||||
//#define MKS_12864OLED // Uses the SH1106 controller (default)
|
//#define MKS_12864OLED // Uses the SH1106 controller
|
||||||
//#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller
|
//#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller
|
||||||
|
|
||||||
//
|
//
|
||||||
// Zonestar OLED 128×64 Full Graphics Controller
|
// Zonestar OLED 128×64 Full Graphics Controller
|
||||||
//
|
//
|
||||||
//#define ZONESTAR_12864LCD // Graphical (DOGM) with ST7920 controller
|
//#define ZONESTAR_12864LCD // Graphical (DOGM) with ST7920 controller
|
||||||
//#define ZONESTAR_12864OLED // 1.3" OLED with SH1106 controller (default)
|
//#define ZONESTAR_12864OLED // 1.3" OLED with SH1106 controller
|
||||||
//#define ZONESTAR_12864OLED_SSD1306 // 0.96" OLED with SSD1306 controller
|
//#define ZONESTAR_12864OLED_SSD1306 // 0.96" OLED with SSD1306 controller
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -3175,7 +3332,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// Touch-screen LCD for Malyan M200/M300 printers
|
// LCD for Malyan M200/M300 printers
|
||||||
//
|
//
|
||||||
//#define MALYAN_LCD
|
//#define MALYAN_LCD
|
||||||
|
|
||||||
@@ -3203,6 +3360,11 @@
|
|||||||
//
|
//
|
||||||
//#define ANYCUBIC_LCD_VYPER
|
//#define ANYCUBIC_LCD_VYPER
|
||||||
|
|
||||||
|
//
|
||||||
|
// Sovol SV-06 Resistive Touch Screen
|
||||||
|
//
|
||||||
|
//#define SOVOL_SV06_RTS
|
||||||
|
|
||||||
//
|
//
|
||||||
// 320x240 Nextion 2.8" serial TFT Resistive Touch Screen NX3224T028
|
// 320x240 Nextion 2.8" serial TFT Resistive Touch Screen NX3224T028
|
||||||
//
|
//
|
||||||
@@ -3341,20 +3503,22 @@
|
|||||||
|
|
||||||
#if ENABLED(TFT_COLOR_UI)
|
#if ENABLED(TFT_COLOR_UI)
|
||||||
/**
|
/**
|
||||||
* TFT Font for Color_UI. Choose one of the following:
|
* TFT Font for Color UI. Choose one of the following:
|
||||||
*
|
*
|
||||||
* NOTOSANS - Default font with anti-aliasing. Supports Latin Extended and non-Latin characters.
|
* NOTOSANS - Default font with anti-aliasing. Supports Latin Extended and non-Latin characters.
|
||||||
* UNIFONT - Lightweight font, no anti-aliasing. Supports Latin Extended and non-Latin characters.
|
* UNIFONT - Lightweight font, no anti-aliasing. Supports Latin Extended and non-Latin characters.
|
||||||
* HELVETICA - Lightweight font, no anti-aliasing. Supports Basic Latin (0x0020-0x007F) and Latin-1 Supplement (0x0080-0x00FF) characters only.
|
* HELVETICA - Lightweight font, no anti-aliasing. Supports Basic Latin (0x0020-0x007F) and Latin-1 Supplement (0x0080-0x00FF) characters only.
|
||||||
|
* :['NOTOSANS', 'UNIFONT', 'HELVETICA']
|
||||||
*/
|
*/
|
||||||
#define TFT_FONT NOTOSANS
|
#define TFT_FONT NOTOSANS
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TFT Theme for Color_UI. Choose one of the following or add a new one to 'Marlin/src/lcd/tft/themes' directory
|
* TFT Theme for Color UI. Choose one of the following or add a new one to 'Marlin/src/lcd/tft/themes' directory
|
||||||
*
|
*
|
||||||
* BLUE_MARLIN - Default theme with 'midnight blue' background
|
* BLUE_MARLIN - Default theme with 'midnight blue' background
|
||||||
* BLACK_MARLIN - Theme with 'black' background
|
* BLACK_MARLIN - Theme with 'black' background
|
||||||
* ANET_BLACK - Theme used for Anet ET4/5
|
* ANET_BLACK - Theme used for Anet ET4/5
|
||||||
|
* :['BLUE_MARLIN', 'BLACK_MARLIN', 'ANET_BLACK']
|
||||||
*/
|
*/
|
||||||
#define TFT_THEME BLACK_MARLIN
|
#define TFT_THEME BLACK_MARLIN
|
||||||
|
|
||||||
@@ -3374,6 +3538,8 @@
|
|||||||
* TFT_ROTATE_180, TFT_ROTATE_180_MIRROR_X, TFT_ROTATE_180_MIRROR_Y,
|
* TFT_ROTATE_180, TFT_ROTATE_180_MIRROR_X, TFT_ROTATE_180_MIRROR_Y,
|
||||||
* TFT_ROTATE_270, TFT_ROTATE_270_MIRROR_X, TFT_ROTATE_270_MIRROR_Y,
|
* TFT_ROTATE_270, TFT_ROTATE_270_MIRROR_X, TFT_ROTATE_270_MIRROR_Y,
|
||||||
* TFT_MIRROR_X, TFT_MIRROR_Y, TFT_NO_ROTATION
|
* TFT_MIRROR_X, TFT_MIRROR_Y, TFT_NO_ROTATION
|
||||||
|
*
|
||||||
|
* :{ 'TFT_NO_ROTATION':'None', 'TFT_ROTATE_90':'90°', 'TFT_ROTATE_90_MIRROR_X':'90° (Mirror X)', 'TFT_ROTATE_90_MIRROR_Y':'90° (Mirror Y)', 'TFT_ROTATE_180':'180°', 'TFT_ROTATE_180_MIRROR_X':'180° (Mirror X)', 'TFT_ROTATE_180_MIRROR_Y':'180° (Mirror Y)', 'TFT_ROTATE_270':'270°', 'TFT_ROTATE_270_MIRROR_X':'270° (Mirror X)', 'TFT_ROTATE_270_MIRROR_Y':'270° (Mirror Y)', 'TFT_MIRROR_X':'Mirror X', 'TFT_MIRROR_Y':'Mirror Y' }
|
||||||
*/
|
*/
|
||||||
//#define TFT_ROTATION TFT_NO_ROTATION
|
//#define TFT_ROTATION TFT_NO_ROTATION
|
||||||
|
|
||||||
@@ -3390,6 +3556,11 @@
|
|||||||
//#define DWIN_MARLINUI_PORTRAIT // MarlinUI (portrait orientation)
|
//#define DWIN_MARLINUI_PORTRAIT // MarlinUI (portrait orientation)
|
||||||
//#define DWIN_MARLINUI_LANDSCAPE // MarlinUI (landscape orientation)
|
//#define DWIN_MARLINUI_LANDSCAPE // MarlinUI (landscape orientation)
|
||||||
|
|
||||||
|
#if ENABLED(DWIN_CREALITY_LCD)
|
||||||
|
//#define USE_STRING_HEADINGS // Use string headings for Creality UI instead of images
|
||||||
|
//#define USE_STRING_TITLES // Use string titles for Creality UI instead of images
|
||||||
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// Touch Screen Settings
|
// Touch Screen Settings
|
||||||
//
|
//
|
||||||
@@ -3398,8 +3569,9 @@
|
|||||||
#define BUTTON_DELAY_EDIT 50 // (ms) Button repeat delay for edit screens
|
#define BUTTON_DELAY_EDIT 50 // (ms) Button repeat delay for edit screens
|
||||||
#define BUTTON_DELAY_MENU 250 // (ms) Button repeat delay for menus
|
#define BUTTON_DELAY_MENU 250 // (ms) Button repeat delay for menus
|
||||||
|
|
||||||
//#define DISABLE_ENCODER // Disable the click encoder, if any
|
#if ANY(TFT_CLASSIC_UI, TFT_COLOR_UI)
|
||||||
//#define TOUCH_IDLE_SLEEP_MINS 5 // (minutes) Display Sleep after a period of inactivity. Set with M255 S.
|
//#define NO_BACK_MENU_ITEM // Don't display a top menu item to go back to the parent menu
|
||||||
|
#endif
|
||||||
|
|
||||||
#define TOUCH_SCREEN_CALIBRATION
|
#define TOUCH_SCREEN_CALIBRATION
|
||||||
|
|
||||||
@@ -3423,7 +3595,9 @@
|
|||||||
// https://reprapworld.com/products/electronics/ramps/keypad_v1_0_fully_assembled/
|
// https://reprapworld.com/products/electronics/ramps/keypad_v1_0_fully_assembled/
|
||||||
//
|
//
|
||||||
//#define REPRAPWORLD_KEYPAD
|
//#define REPRAPWORLD_KEYPAD
|
||||||
//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 // (mm) Distance to move per key-press
|
#if ENABLED(REPRAPWORLD_KEYPAD)
|
||||||
|
//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 // (mm) Distance to move per key-press
|
||||||
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// EasyThreeD ET-4000+ with button input and status LED
|
// EasyThreeD ET-4000+ with button input and status LED
|
||||||
@@ -3440,22 +3614,26 @@
|
|||||||
// :[1,2,3,4,5,6,7,8]
|
// :[1,2,3,4,5,6,7,8]
|
||||||
//#define NUM_M106_FANS 1
|
//#define NUM_M106_FANS 1
|
||||||
|
|
||||||
// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
|
/**
|
||||||
// which is not as annoying as with the hardware PWM. On the other hand, if this frequency
|
* Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
|
||||||
// is too low, you should also increment SOFT_PWM_SCALE.
|
* which is not as annoying as with the hardware PWM. On the other hand, if this frequency
|
||||||
|
* is too low, you should also increment SOFT_PWM_SCALE.
|
||||||
|
*/
|
||||||
//#define FAN_SOFT_PWM
|
//#define FAN_SOFT_PWM
|
||||||
|
|
||||||
// Incrementing this by 1 will double the software PWM frequency,
|
/**
|
||||||
// affecting heaters, and the fan if FAN_SOFT_PWM is enabled.
|
* Incrementing this by 1 will double the software PWM frequency, affecting heaters, and
|
||||||
// However, control resolution will be halved for each increment;
|
* the fan if FAN_SOFT_PWM is enabled. However, control resolution will be halved for each
|
||||||
// at zero value, there are 128 effective control positions.
|
* increment; at zero value, there are 128 effective control positions.
|
||||||
// :[0,1,2,3,4,5,6,7]
|
* :[0,1,2,3,4,5,6,7]
|
||||||
|
*/
|
||||||
#define SOFT_PWM_SCALE 0
|
#define SOFT_PWM_SCALE 0
|
||||||
|
|
||||||
// If SOFT_PWM_SCALE is set to a value higher than 0, dithering can
|
/**
|
||||||
// be used to mitigate the associated resolution loss. If enabled,
|
* If SOFT_PWM_SCALE is set to a value higher than 0, dithering can be used to mitigate the
|
||||||
// some of the PWM cycles are stretched so on average the desired
|
* associated resolution loss. If enabled, some of the PWM cycles are stretched so on average
|
||||||
// duty cycle is attained.
|
* the desired duty cycle is attained.
|
||||||
|
*/
|
||||||
//#define SOFT_PWM_DITHER
|
//#define SOFT_PWM_DITHER
|
||||||
|
|
||||||
// @section extras
|
// @section extras
|
||||||
@@ -3465,9 +3643,11 @@
|
|||||||
|
|
||||||
// @section lights
|
// @section lights
|
||||||
|
|
||||||
// Temperature status LEDs that display the hotend and bed temperature.
|
/**
|
||||||
// If all hotends, bed temperature, and target temperature are under 54C
|
* Temperature status LEDs that display the hotend and bed temperature.
|
||||||
// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
|
* If all hotends, bed temperature, and target temperature are under 54C
|
||||||
|
* the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
|
||||||
|
*/
|
||||||
//#define TEMP_STAT_LEDS
|
//#define TEMP_STAT_LEDS
|
||||||
|
|
||||||
// Support for BlinkM/CyzRgb
|
// Support for BlinkM/CyzRgb
|
||||||
|
|||||||
+539
-291
File diff suppressed because it is too large
Load Diff
+116
-76
@@ -127,9 +127,9 @@ NEOPIXEL ?= 0
|
|||||||
# on GCC versions:
|
# on GCC versions:
|
||||||
# https://www.avrfreaks.net/comment/1789106#comment-1789106
|
# https://www.avrfreaks.net/comment/1789106#comment-1789106
|
||||||
|
|
||||||
CC_MAJ:=$(shell $(CC) -dM -E - < /dev/null | grep __GNUC__ | cut -f3 -d\ )
|
CC_MAJ:=$(shell $(CC) -dM -E - < /dev/null | grep __GNUC__ | cut -f3 -d' ' )
|
||||||
CC_MIN:=$(shell $(CC) -dM -E - < /dev/null | grep __GNUC_MINOR__ | cut -f3 -d\ )
|
CC_MIN:=$(shell $(CC) -dM -E - < /dev/null | grep __GNUC_MINOR__ | cut -f3 -d' ' )
|
||||||
CC_PATCHLEVEL:=$(shell $(CC) -dM -E - < /dev/null | grep __GNUC_PATCHLEVEL__ | cut -f3 -d\ )
|
CC_PATCHLEVEL:=$(shell $(CC) -dM -E - < /dev/null | grep __GNUC_PATCHLEVEL__ | cut -f3 -d' ' )
|
||||||
CC_VER:=$(shell echo $$(( $(CC_MAJ) * 10000 + $(CC_MIN) * 100 + $(CC_PATCHLEVEL) )))
|
CC_VER:=$(shell echo $$(( $(CC_MAJ) * 10000 + $(CC_MIN) * 100 + $(CC_PATCHLEVEL) )))
|
||||||
ifeq ($(shell test $(CC_VER) -lt 40901 && echo 1),1)
|
ifeq ($(shell test $(CC_VER) -lt 40901 && echo 1),1)
|
||||||
$(warning This GCC version $(CC_VER) is likely broken. Enabling relocation workaround.)
|
$(warning This GCC version $(CC_VER) is likely broken. Enabling relocation workaround.)
|
||||||
@@ -187,6 +187,17 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1033)
|
|||||||
# RAMPS Plus 3DYMY (Power outputs: Spindle, Controller Fan)
|
# RAMPS Plus 3DYMY (Power outputs: Spindle, Controller Fan)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1034)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1034)
|
||||||
|
|
||||||
|
# RAMPS 1.6+ (Power outputs: Hotend, Fan, Bed)
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1040)
|
||||||
|
# RAMPS 1.6+ (Power outputs: Hotend0, Hotend1, Bed)
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1041)
|
||||||
|
# RAMPS 1.6+ (Power outputs: Hotend, Fan0, Fan1)
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1042)
|
||||||
|
# RAMPS 1.6+ (Power outputs: Hotend0, Hotend1, Fan)
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1043)
|
||||||
|
# RAMPS 1.6+ (Power outputs: Spindle, Controller Fan)
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1044)
|
||||||
|
|
||||||
#
|
#
|
||||||
# RAMPS Derivatives - ATmega1280, ATmega2560
|
# RAMPS Derivatives - ATmega1280, ATmega2560
|
||||||
#
|
#
|
||||||
@@ -221,79 +232,79 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1112)
|
|||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1113)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1113)
|
||||||
# BigTreeTech or BIQU KFB2.0
|
# BigTreeTech or BIQU KFB2.0
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1114)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1114)
|
||||||
# zrib V2.0 (Chinese RAMPS replica)
|
# Zonestar zrib V2.0 (Chinese RAMPS replica)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1115)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1115)
|
||||||
# zrib V5.2 (Chinese RAMPS replica)
|
# Zonestar zrib V5.2 (Chinese RAMPS replica)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1116)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1116)
|
||||||
# Felix 2.0+ Electronics Board (RAMPS like)
|
# Zonestar zrib V5.3 (Chinese RAMPS replica)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1117)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1117)
|
||||||
# Invent-A-Part RigidBoard
|
# Felix 2.0+ Electronics Board (RAMPS like)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1118)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1118)
|
||||||
# Invent-A-Part RigidBoard V2
|
# Invent-A-Part RigidBoard
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1119)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1119)
|
||||||
# Sainsmart 2-in-1 board
|
# Invent-A-Part RigidBoard V2
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1120)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1120)
|
||||||
# Ultimaker
|
# Sainsmart 2-in-1 board
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1121)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1121)
|
||||||
# Ultimaker (Older electronics. Pre 1.5.4. This is rare)
|
# Ultimaker
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1122)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1122)
|
||||||
|
# Ultimaker (Older electronics. Pre 1.5.4. This is rare)
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1123)
|
||||||
MCU ?= atmega1280
|
MCU ?= atmega1280
|
||||||
PROG_MCU ?= m1280
|
PROG_MCU ?= m1280
|
||||||
# Azteeg X3
|
# Azteeg X3
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1123)
|
|
||||||
# Azteeg X3 Pro
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1124)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1124)
|
||||||
# Ultimainboard 2.x (Uses TEMP_SENSOR 20)
|
# Azteeg X3 Pro
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1125)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1125)
|
||||||
# Rumba
|
# Ultimainboard 2.x (Uses TEMP_SENSOR 20)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1126)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1126)
|
||||||
# Raise3D N series Rumba derivative
|
# Rumba
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1127)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1127)
|
||||||
# Rapide Lite 200 (v1, low-cost RUMBA clone with drv)
|
# Raise3D N series Rumba derivative
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1128)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1128)
|
||||||
# Formbot T-Rex 2 Plus
|
# Rapide Lite 200 (v1, low-cost RUMBA clone with drv)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1129)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1129)
|
||||||
# Formbot T-Rex 3
|
# Formbot T-Rex 2 Plus
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1130)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1130)
|
||||||
# Formbot Raptor
|
# Formbot T-Rex 3
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1131)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1131)
|
||||||
# Formbot Raptor 2
|
# Formbot Raptor
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1132)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1132)
|
||||||
# bq ZUM Mega 3D
|
# Formbot Raptor 2
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1133)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1133)
|
||||||
# MakeBoard Mini v2.1.2 by MicroMake
|
# bq ZUM Mega 3D
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1134)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1134)
|
||||||
# TriGorilla Anycubic version 1.3-based on RAMPS EFB
|
# MakeBoard Mini v2.1.2 by MicroMake
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1135)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1135)
|
||||||
# ... Ver 1.4
|
# TriGorilla Anycubic version 1.3-based on RAMPS EFB
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1136)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1136)
|
||||||
# ... Rev 1.1 (new servo pin order)
|
# ... Ver 1.4
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1137)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1137)
|
||||||
# Creality: Ender-4, CR-8
|
# ... Rev 1.1 (new servo pin order)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1138)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1138)
|
||||||
# Creality: CR10S, CR20, CR-X
|
# Creality: Ender-4, CR-8
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1139)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1139)
|
||||||
# Dagoma F5
|
# Creality: CR10S, CR20, CR-X
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1140)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1140)
|
||||||
# FYSETC F6 1.3
|
# Creality CR-10 V2, CR-10 V3
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1141)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1141)
|
||||||
# FYSETC F6 1.4
|
# Dagoma F5
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1142)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1142)
|
||||||
# Wanhao Duplicator i3 Plus
|
# Dagoma D6 (as found in the Dagoma DiscoUltimate V2 TMC)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1143)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1143)
|
||||||
# VORON Design
|
# FYSETC F6 1.3
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1144)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1144)
|
||||||
# Tronxy TRONXY-V3-1.0
|
# FYSETC F6 1.4
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1145)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1145)
|
||||||
# Z-Bolt X Series
|
# Wanhao Duplicator i3 Plus
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1146)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1146)
|
||||||
# TT OSCAR
|
# VORON Design
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1147)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1147)
|
||||||
# Overlord/Overlord Pro
|
# Tronxy TRONXY-V3-1.0
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1148)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1148)
|
||||||
# ADIMLab Gantry v1
|
# Z-Bolt X Series
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1149)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1149)
|
||||||
# ADIMLab Gantry v2
|
# TT OSCAR
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1150)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1150)
|
||||||
# BIQU Tango V1
|
# BIQU Tango V1
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1151)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1151)
|
||||||
@@ -307,7 +318,7 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1154)
|
|||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1155)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1155)
|
||||||
# Tenlog D3 Hero IDEX printer
|
# Tenlog D3 Hero IDEX printer
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1156)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1156)
|
||||||
# Tenlog D3,5,6 Pro IDEX printers
|
# Tenlog D3, D5, D6 IDEX Printer
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1157)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1157)
|
||||||
# Ramps S 1.2 by Sakul.cz (Power outputs: Hotend0, Hotend1, Fan, Bed)
|
# Ramps S 1.2 by Sakul.cz (Power outputs: Hotend0, Hotend1, Fan, Bed)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1158)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1158)
|
||||||
@@ -319,10 +330,18 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1160)
|
|||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1161)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1161)
|
||||||
# Longer LKx PRO / Alfawise Uxx Pro (PRO version)
|
# Longer LKx PRO / Alfawise Uxx Pro (PRO version)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1162)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1162)
|
||||||
# Zonestar zrib V5.3 (Chinese RAMPS replica)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1163)
|
|
||||||
# Pxmalion Core I3
|
# Pxmalion Core I3
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1163)
|
||||||
|
# Panowin Cutlass (as found in the Panowin F1)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1164)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1164)
|
||||||
|
# Kodama Bardo V1.x (as found in the Kodama Trinus)
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1165)
|
||||||
|
# XTLW MFF V1.0
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1166)
|
||||||
|
# XTLW MFF V2.0
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1167)
|
||||||
|
# E3D Rumba BigBox
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1168)
|
||||||
|
|
||||||
#
|
#
|
||||||
# RAMBo and derivatives
|
# RAMBo and derivatives
|
||||||
@@ -340,7 +359,7 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1203)
|
|||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1204)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1204)
|
||||||
# abee Scoovo X9H
|
# abee Scoovo X9H
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1205)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1205)
|
||||||
# Rambo ThinkerV2
|
# ThinkerV2
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1206)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1206)
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -383,30 +402,42 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1315)
|
|||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1316)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1316)
|
||||||
# Geeetech GT2560 Rev B for A10(M/T/D)
|
# Geeetech GT2560 Rev B for A10(M/T/D)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1317)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1317)
|
||||||
# Geeetech GT2560 Rev B for A10(M/T/D)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1318)
|
|
||||||
# Geeetech GT2560 Rev B for Mecreator2
|
# Geeetech GT2560 Rev B for Mecreator2
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1318)
|
||||||
|
# Geeetech GT2560 Rev B for A20(M/T/D)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1319)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1319)
|
||||||
# Geeetech GT2560 Rev B for A20(M/T/D)
|
# Geeetech GT2560 Rev B for A10(M/T/D)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1320)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1320)
|
||||||
# Einstart retrofit
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1321)
|
|
||||||
# Wanhao 0ne+ i3 Mini
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1322)
|
|
||||||
# Leapfrog Xeed 2015
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1323)
|
|
||||||
# PICA Shield (original version)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1324)
|
|
||||||
# PICA Shield (rev C or later)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1325)
|
|
||||||
# Intamsys 4.0 (Funmat HT)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1326)
|
|
||||||
# Malyan M180 Mainboard Version 2 (no display function, direct G-code only)
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1327)
|
|
||||||
# Geeetech GT2560 Rev B for A20(M/T/D)
|
# Geeetech GT2560 Rev B for A20(M/T/D)
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1321)
|
||||||
|
# Geeetech GT2560 V4.1B for A10(M/T/D)
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1322)
|
||||||
|
# Einstart retrofit
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1323)
|
||||||
|
# Wanhao 0ne+ i3 Mini
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1324)
|
||||||
|
# Wanhao D9 MK2
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1325)
|
||||||
|
# Overlord/Overlord Pro
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1326)
|
||||||
|
# ADIMLab Gantry v1
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1327)
|
||||||
|
# ADIMLab Gantry v2
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1328)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1328)
|
||||||
# Mega controller & Protoneer CNC Shield V3.00
|
# Leapfrog Xeed 2015
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1329)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1329)
|
||||||
|
# PICA Shield (original version)
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1330)
|
||||||
|
# PICA Shield (rev C or later)
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1331)
|
||||||
|
# Intamsys 4.0 (Funmat HT)
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1332)
|
||||||
|
# Malyan M180 Mainboard Version 2
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1333)
|
||||||
|
# Mega controller & Protoneer CNC Shield V3.00
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1334)
|
||||||
|
# WEEDO 62A board (TINA2, Monoprice Cadet, etc.)
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1335)
|
||||||
|
|
||||||
#
|
#
|
||||||
# ATmega1281, ATmega2561
|
# ATmega1281, ATmega2561
|
||||||
@@ -440,7 +471,7 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1502)
|
|||||||
HARDWARE_VARIANT ?= Sanguino
|
HARDWARE_VARIANT ?= Sanguino
|
||||||
MCU ?= atmega644p
|
MCU ?= atmega644p
|
||||||
PROG_MCU ?= m644p
|
PROG_MCU ?= m644p
|
||||||
# Melzi V2.0
|
# Melzi V2
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1503)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1503)
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
HARDWARE_VARIANT ?= Sanguino
|
||||||
MCU ?= atmega1284p
|
MCU ?= atmega1284p
|
||||||
@@ -450,41 +481,46 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1504)
|
|||||||
HARDWARE_VARIANT ?= Sanguino
|
HARDWARE_VARIANT ?= Sanguino
|
||||||
MCU ?= atmega1284p
|
MCU ?= atmega1284p
|
||||||
PROG_MCU ?= m1284p
|
PROG_MCU ?= m1284p
|
||||||
# Melzi Creality3D board (for CR-10 etc)
|
# Melzi Creality3D (for CR-10 etc)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1505)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1505)
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
HARDWARE_VARIANT ?= Sanguino
|
||||||
MCU ?= atmega1284p
|
MCU ?= atmega1284p
|
||||||
PROG_MCU ?= m1284p
|
PROG_MCU ?= m1284p
|
||||||
# Melzi Malyan M150 board
|
# Melzi Creality3D (for Ender-2)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1506)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1506)
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
HARDWARE_VARIANT ?= Sanguino
|
||||||
MCU ?= atmega1284p
|
MCU ?= atmega1284p
|
||||||
PROG_MCU ?= m1284p
|
PROG_MCU ?= m1284p
|
||||||
# Tronxy X5S
|
# Melzi Malyan M150
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1507)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1507)
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
HARDWARE_VARIANT ?= Sanguino
|
||||||
MCU ?= atmega1284p
|
MCU ?= atmega1284p
|
||||||
PROG_MCU ?= m1284p
|
PROG_MCU ?= m1284p
|
||||||
# STB V1.1
|
# Tronxy X5S
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1508)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1508)
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
HARDWARE_VARIANT ?= Sanguino
|
||||||
MCU ?= atmega1284p
|
MCU ?= atmega1284p
|
||||||
PROG_MCU ?= m1284p
|
PROG_MCU ?= m1284p
|
||||||
# Azteeg X1
|
# STB V1.1
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1509)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1509)
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
HARDWARE_VARIANT ?= Sanguino
|
||||||
MCU ?= atmega1284p
|
MCU ?= atmega1284p
|
||||||
PROG_MCU ?= m1284p
|
PROG_MCU ?= m1284p
|
||||||
# Anet 1.0 (Melzi clone)
|
# Azteeg X1
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1510)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1510)
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
HARDWARE_VARIANT ?= Sanguino
|
||||||
MCU ?= atmega1284p
|
MCU ?= atmega1284p
|
||||||
PROG_MCU ?= m1284p
|
PROG_MCU ?= m1284p
|
||||||
# ZoneStar ZMIB V2
|
# Anet 1.0 (Melzi clone)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1511)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1511)
|
||||||
HARDWARE_VARIANT ?= Sanguino
|
HARDWARE_VARIANT ?= Sanguino
|
||||||
MCU ?= atmega1284p
|
MCU ?= atmega1284p
|
||||||
PROG_MCU ?= m1284p
|
PROG_MCU ?= m1284p
|
||||||
|
# ZoneStar ZMIB V2
|
||||||
|
else ifeq ($(HARDWARE_MOTHERBOARD),1512)
|
||||||
|
HARDWARE_VARIANT ?= Sanguino
|
||||||
|
MCU ?= atmega1284p
|
||||||
|
PROG_MCU ?= m1284p
|
||||||
|
|
||||||
#
|
#
|
||||||
# Other ATmega644P, ATmega644, ATmega1284P
|
# Other ATmega644P, ATmega644, ATmega1284P
|
||||||
@@ -595,6 +631,10 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1707)
|
|||||||
MCU ?= at90usb1286
|
MCU ?= at90usb1286
|
||||||
PROG_MCU ?= usb1286
|
PROG_MCU ?= usb1286
|
||||||
|
|
||||||
|
#
|
||||||
|
# SAM3X8E ARM Cortex-M3
|
||||||
|
#
|
||||||
|
|
||||||
# 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
|
||||||
@@ -767,10 +807,10 @@ 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 \
|
CHOPCONF.cpp GCONF.cpp PWMCONF.cpp DRV_CONF.cpp DRVCONF.cpp DRVCTRL.cpp DRVSTATUS.cpp \
|
||||||
DRVSTATUS.cpp ENCMODE.cpp RAMP_STAT.cpp SGCSCONF.cpp SHORT_CONF.cpp \
|
GLOBAL_SCALER.cpp SLAVECONF.cpp IOIN.cpp ENCMODE.cpp RAMP_STAT.cpp SGCSCONF.cpp \
|
||||||
SMARTEN.cpp SW_MODE.cpp SW_SPI.cpp TMC2130Stepper.cpp TMC2208Stepper.cpp \
|
SHORT_CONF.cpp SMARTEN.cpp SW_MODE.cpp SW_SPI.cpp TMC2130Stepper.cpp TMC2208Stepper.cpp \
|
||||||
TMC2209Stepper.cpp TMC2660Stepper.cpp TMC5130Stepper.cpp TMC5160Stepper.cpp
|
TMC2209Stepper.cpp TMC2240Stepper.cpp TMC2660Stepper.cpp TMC5130Stepper.cpp TMC5160Stepper.cpp
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(RELOC_WORKAROUND), 1)
|
ifeq ($(RELOC_WORKAROUND), 1)
|
||||||
@@ -837,8 +877,8 @@ else ifeq ($(HARDWARE_VARIANT), archim)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
# Add all the source directories as include directories too
|
# Add all the source directories as include directories too
|
||||||
CINCS = ${addprefix -I ,${VPATH}}
|
CINCS = ${addprefix -I, ${VPATH}}
|
||||||
CXXINCS = ${addprefix -I ,${VPATH}}
|
CXXINCS = ${addprefix -I, ${VPATH}}
|
||||||
|
|
||||||
# Silence warnings for library code (won't work for .h files, unfortunately)
|
# Silence warnings for library code (won't work for .h files, unfortunately)
|
||||||
LIBWARN = -w -Wno-packed-bitfield-compat
|
LIBWARN = -w -Wno-packed-bitfield-compat
|
||||||
@@ -995,7 +1035,7 @@ extcoff: $(TARGET).elf
|
|||||||
$(NM) -n $< > $@
|
$(NM) -n $< > $@
|
||||||
|
|
||||||
# Link: create ELF output file from library.
|
# Link: create ELF output file from library.
|
||||||
|
LDFLAGS+= -Wl,-V
|
||||||
$(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 $(CXX) $(LD_PREFIX) $(ALL_CXXFLAGS) -o $@ -L. $(OBJ) $(LDFLAGS) $(LD_SUFFIX)
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Marlin Firmware
|
Marlin Firmware
|
||||||
|
|
||||||
(c) 2011-2023 MarlinFirmware
|
(c) 2011-2024 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
|
||||||
|
|
||||||
|
|||||||
+10
-3
@@ -41,7 +41,14 @@
|
|||||||
* 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 "2024-01-09"
|
//#define STRING_DISTRIBUTION_DATE "2025-12-02"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The protocol for communication to the host. Protocol indicates communication
|
||||||
|
* standards such as the use of ASCII, "echo:" and "error:" line prefixes, etc.
|
||||||
|
* (Other behaviors are given by the firmware version and capabilities report.)
|
||||||
|
*/
|
||||||
|
//#define PROTOCOL_VERSION "1.0"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines a generic printer name to be output to the LCD after booting Marlin.
|
* Defines a generic printer name to be output to the LCD after booting Marlin.
|
||||||
@@ -68,8 +75,8 @@
|
|||||||
//#define WEBSITE_URL "marlinfw.org"
|
//#define WEBSITE_URL "marlinfw.org"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the vendor info the serial USB interface, if changable
|
* Set the vendor info the serial USB interface, if changeable.
|
||||||
* 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
|
||||||
|
|||||||
+66
-59
@@ -62,6 +62,11 @@ motherboard = BOARD_RAMPS_14_EFB
|
|||||||
serial_port = 0
|
serial_port = 0
|
||||||
baudrate = 250000
|
baudrate = 250000
|
||||||
|
|
||||||
|
string_config_h_author = "(default from config.ini)"
|
||||||
|
|
||||||
|
capabilities_report = on
|
||||||
|
extended_capabilities_report = on
|
||||||
|
|
||||||
use_watchdog = on
|
use_watchdog = on
|
||||||
thermal_protection_hotends = on
|
thermal_protection_hotends = on
|
||||||
thermal_protection_hysteresis = 4
|
thermal_protection_hysteresis = 4
|
||||||
@@ -77,18 +82,25 @@ temp_sensor_0 = 1
|
|||||||
temp_hysteresis = 3
|
temp_hysteresis = 3
|
||||||
heater_0_mintemp = 5
|
heater_0_mintemp = 5
|
||||||
heater_0_maxtemp = 275
|
heater_0_maxtemp = 275
|
||||||
preheat_1_temp_hotend = 180
|
|
||||||
|
|
||||||
bang_max = 255
|
|
||||||
pidtemp = on
|
pidtemp = on
|
||||||
pid_k1 = 0.95
|
pid_k1 = 0.95
|
||||||
pid_max = 255
|
pid_max = 255
|
||||||
pid_functional_range = 10
|
pid_functional_range = 20
|
||||||
|
|
||||||
default_kp = 22.20
|
default_kp = 22.20
|
||||||
default_ki = 1.08
|
default_ki = 1.08
|
||||||
default_kd = 114.00
|
default_kd = 114.00
|
||||||
|
|
||||||
|
temp_sensor_bed = 1
|
||||||
|
bed_check_interval = 5000
|
||||||
|
bed_mintemp = 5
|
||||||
|
bed_maxtemp = 150
|
||||||
|
|
||||||
|
thermal_protection_bed = on
|
||||||
|
thermal_protection_bed_hysteresis = 2
|
||||||
|
thermal_protection_bed_period = 20
|
||||||
|
|
||||||
x_driver_type = A4988
|
x_driver_type = A4988
|
||||||
y_driver_type = A4988
|
y_driver_type = A4988
|
||||||
z_driver_type = A4988
|
z_driver_type = A4988
|
||||||
@@ -121,10 +133,10 @@ default_max_acceleration = { 3000, 3000, 100, 10000 }
|
|||||||
homing_feedrate_mm_m = { (50*60), (50*60), (4*60) }
|
homing_feedrate_mm_m = { (50*60), (50*60), (4*60) }
|
||||||
homing_bump_divisor = { 2, 2, 4 }
|
homing_bump_divisor = { 2, 2, 4 }
|
||||||
|
|
||||||
x_enable_on = 0
|
x_enable_on = LOW
|
||||||
y_enable_on = 0
|
y_enable_on = LOW
|
||||||
z_enable_on = 0
|
z_enable_on = LOW
|
||||||
e_enable_on = 0
|
e_enable_on = LOW
|
||||||
|
|
||||||
invert_x_dir = false
|
invert_x_dir = false
|
||||||
invert_y_dir = true
|
invert_y_dir = true
|
||||||
@@ -136,11 +148,6 @@ step_state_x = HIGH
|
|||||||
step_state_y = HIGH
|
step_state_y = HIGH
|
||||||
step_state_z = HIGH
|
step_state_z = HIGH
|
||||||
|
|
||||||
disable_x = off
|
|
||||||
disable_y = off
|
|
||||||
disable_z = off
|
|
||||||
disable_e = off
|
|
||||||
|
|
||||||
proportional_font_ratio = 1.0
|
proportional_font_ratio = 1.0
|
||||||
default_nominal_filament_dia = 1.75
|
default_nominal_filament_dia = 1.75
|
||||||
|
|
||||||
@@ -153,30 +160,33 @@ default_retract_acceleration = 3000
|
|||||||
default_minimumfeedrate = 0.0
|
default_minimumfeedrate = 0.0
|
||||||
default_mintravelfeedrate = 0.0
|
default_mintravelfeedrate = 0.0
|
||||||
|
|
||||||
minimum_planner_speed = 0.05
|
|
||||||
min_steps_per_segment = 6
|
min_steps_per_segment = 6
|
||||||
default_minsegmenttime = 20000
|
default_minsegmenttime = 20000
|
||||||
|
|
||||||
[config:basic]
|
[config:basic]
|
||||||
|
hotend_overshoot = 15
|
||||||
bed_overshoot = 10
|
bed_overshoot = 10
|
||||||
|
max_bed_power = 255
|
||||||
|
|
||||||
busy_while_heating = on
|
busy_while_heating = on
|
||||||
default_ejerk = 5.0
|
host_keepalive_feature = on
|
||||||
default_keepalive_interval = 2
|
default_keepalive_interval = 2
|
||||||
default_leveling_fade_height = 0.0
|
printjob_timer_autostart = on
|
||||||
disable_other_extruders = on
|
|
||||||
display_charset_hd44780 = JAPANESE
|
jd_handle_small_segments = on
|
||||||
|
validate_homing_endstops = on
|
||||||
|
editable_steps_per_unit = on
|
||||||
|
|
||||||
eeprom_boot_silent = on
|
eeprom_boot_silent = on
|
||||||
eeprom_chitchat = on
|
eeprom_chitchat = on
|
||||||
|
|
||||||
endstoppullups = on
|
endstoppullups = on
|
||||||
extrude_maxlength = 200
|
|
||||||
|
prevent_cold_extrusion = on
|
||||||
extrude_mintemp = 170
|
extrude_mintemp = 170
|
||||||
host_keepalive_feature = on
|
prevent_lengthy_extrude = on
|
||||||
hotend_overshoot = 15
|
extrude_maxlength = 200
|
||||||
jd_handle_small_segments = on
|
|
||||||
lcd_info_screen_style = 0
|
|
||||||
lcd_language = en
|
|
||||||
max_bed_power = 255
|
|
||||||
mesh_inset = 0
|
|
||||||
min_software_endstops = on
|
min_software_endstops = on
|
||||||
max_software_endstops = on
|
max_software_endstops = on
|
||||||
min_software_endstop_x = on
|
min_software_endstop_x = on
|
||||||
@@ -185,63 +195,60 @@ min_software_endstop_z = on
|
|||||||
max_software_endstop_x = on
|
max_software_endstop_x = on
|
||||||
max_software_endstop_y = on
|
max_software_endstop_y = on
|
||||||
max_software_endstop_z = on
|
max_software_endstop_z = on
|
||||||
preheat_1_fan_speed = 0
|
|
||||||
preheat_1_label = "PLA"
|
preheat_1_label = "PLA"
|
||||||
|
preheat_1_temp_hotend = 180
|
||||||
preheat_1_temp_bed = 70
|
preheat_1_temp_bed = 70
|
||||||
prevent_cold_extrusion = on
|
preheat_1_fan_speed = 0
|
||||||
prevent_lengthy_extrude = on
|
|
||||||
printjob_timer_autostart = on
|
preheat_2_label = "ABS"
|
||||||
probing_margin = 10
|
preheat_2_temp_hotend = 240
|
||||||
show_bootscreen = on
|
preheat_2_temp_bed = 110
|
||||||
soft_pwm_scale = 0
|
preheat_2_fan_speed = 0
|
||||||
string_config_h_author = "(none, default config)"
|
|
||||||
temp_bed_hysteresis = 3
|
temp_bed_hysteresis = 3
|
||||||
temp_bed_residency_time = 10
|
temp_bed_residency_time = 10
|
||||||
temp_bed_window = 1
|
temp_bed_window = 1
|
||||||
temp_residency_time = 10
|
temp_residency_time = 10
|
||||||
temp_window = 1
|
temp_window = 1
|
||||||
validate_homing_endstops = on
|
|
||||||
xy_probe_feedrate = (133*60)
|
|
||||||
z_clearance_between_probes = 5
|
|
||||||
z_clearance_deploy_probe = 10
|
|
||||||
z_clearance_multi_probe = 5
|
|
||||||
|
|
||||||
[config:advanced]
|
[config:advanced]
|
||||||
arc_support = on
|
arc_support = on
|
||||||
|
min_arc_segment_mm = 0.1
|
||||||
|
max_arc_segment_mm = 1.0
|
||||||
|
min_circle_segments = 72
|
||||||
|
n_arc_correction = 25
|
||||||
|
|
||||||
auto_report_temperatures = on
|
auto_report_temperatures = on
|
||||||
|
|
||||||
autotemp = on
|
autotemp = on
|
||||||
|
autotemp_min = 210
|
||||||
|
autotemp_max = 250
|
||||||
|
autotemp_factor = 0.1f
|
||||||
autotemp_oldweight = 0.98
|
autotemp_oldweight = 0.98
|
||||||
bed_check_interval = 5000
|
|
||||||
default_stepper_timeout_sec = 120
|
default_stepper_timeout_sec = 120
|
||||||
default_volumetric_extruder_limit = 0.00
|
|
||||||
disable_idle_x = on
|
disable_idle_x = on
|
||||||
disable_idle_y = on
|
disable_idle_y = on
|
||||||
disable_idle_z = on
|
disable_idle_z = on
|
||||||
disable_idle_e = on
|
disable_idle_e = on
|
||||||
|
|
||||||
e0_auto_fan_pin = -1
|
e0_auto_fan_pin = -1
|
||||||
encoder_100x_steps_per_sec = 80
|
|
||||||
encoder_10x_steps_per_sec = 30
|
|
||||||
encoder_rate_multiplier = on
|
|
||||||
extended_capabilities_report = on
|
|
||||||
extruder_auto_fan_speed = 255
|
|
||||||
extruder_auto_fan_temperature = 50
|
|
||||||
fanmux0_pin = -1
|
|
||||||
fanmux1_pin = -1
|
|
||||||
fanmux2_pin = -1
|
|
||||||
faster_gcode_parser = on
|
faster_gcode_parser = on
|
||||||
|
debug_flags_gcode = on
|
||||||
|
|
||||||
homing_bump_mm = { 5, 5, 2 }
|
homing_bump_mm = { 5, 5, 2 }
|
||||||
max_arc_segment_mm = 1.0
|
|
||||||
min_arc_segment_mm = 0.1
|
|
||||||
min_circle_segments = 72
|
|
||||||
n_arc_correction = 25
|
|
||||||
serial_overrun_protection = on
|
|
||||||
slowdown = on
|
slowdown = on
|
||||||
slowdown_divisor = 2
|
slowdown_divisor = 2
|
||||||
temp_sensor_bed = 0
|
multistepping_limit = 16
|
||||||
thermal_protection_bed_hysteresis = 2
|
|
||||||
thermocouple_max_errors = 15
|
serial_overrun_protection = on
|
||||||
tx_buffer_size = 0
|
tx_buffer_size = 0
|
||||||
|
|
||||||
|
watch_temp_increase = 2
|
||||||
|
watch_temp_period = 40
|
||||||
|
|
||||||
watch_bed_temp_increase = 2
|
watch_bed_temp_increase = 2
|
||||||
watch_bed_temp_period = 60
|
watch_bed_temp_period = 60
|
||||||
watch_temp_increase = 2
|
|
||||||
watch_temp_period = 20
|
|
||||||
|
|||||||
@@ -81,6 +81,12 @@ void MarlinHAL::init() {
|
|||||||
#if HAS_SERVO_3
|
#if HAS_SERVO_3
|
||||||
OUT_WRITE(SERVO3_PIN, LOW);
|
OUT_WRITE(SERVO3_PIN, LOW);
|
||||||
#endif
|
#endif
|
||||||
|
#if HAS_SERVO_4
|
||||||
|
OUT_WRITE(SERVO4_PIN, LOW);
|
||||||
|
#endif
|
||||||
|
#if HAS_SERVO_5
|
||||||
|
OUT_WRITE(SERVO5_PIN, LOW);
|
||||||
|
#endif
|
||||||
|
|
||||||
init_pwm_timers(); // Init user timers to default frequency - 1000HZ
|
init_pwm_timers(); // Init user timers to default frequency - 1000HZ
|
||||||
|
|
||||||
@@ -113,7 +119,6 @@ void MarlinHAL::reboot() {
|
|||||||
#if ENABLED(USE_WATCHDOG)
|
#if ENABLED(USE_WATCHDOG)
|
||||||
|
|
||||||
#include <avr/wdt.h>
|
#include <avr/wdt.h>
|
||||||
#include "../../MarlinCore.h"
|
|
||||||
|
|
||||||
// Initialize watchdog with 8s timeout, if possible. Otherwise, make it 4s.
|
// Initialize watchdog with 8s timeout, if possible. Otherwise, make it 4s.
|
||||||
void MarlinHAL::watchdog_init() {
|
void MarlinHAL::watchdog_init() {
|
||||||
@@ -148,7 +153,7 @@ void MarlinHAL::reboot() {
|
|||||||
ISR(WDT_vect) {
|
ISR(WDT_vect) {
|
||||||
sei(); // With the interrupt driven serial we need to allow interrupts.
|
sei(); // With the interrupt driven serial we need to allow interrupts.
|
||||||
SERIAL_ERROR_MSG(STR_WATCHDOG_FIRED);
|
SERIAL_ERROR_MSG(STR_WATCHDOG_FIRED);
|
||||||
minkill(); // interrupt-safe final kill and infinite loop
|
marlin.minkill(); // interrupt-safe final kill and infinite loop
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -129,11 +129,11 @@ typedef Servo hal_servo_t;
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MMU2_SERIAL_PORT
|
#ifdef MMU_SERIAL_PORT
|
||||||
#if !WITHIN(MMU2_SERIAL_PORT, 0, 3)
|
#if !WITHIN(MMU_SERIAL_PORT, 0, 3)
|
||||||
#error "MMU2_SERIAL_PORT must be from 0 to 3"
|
#error "MMU_SERIAL_PORT must be from 0 to 3"
|
||||||
#endif
|
#endif
|
||||||
#define MMU2_SERIAL mmuSerial
|
#define MMU_SERIAL mmuSerial
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef LCD_SERIAL_PORT
|
#ifdef LCD_SERIAL_PORT
|
||||||
@@ -141,7 +141,7 @@ typedef Servo hal_servo_t;
|
|||||||
#error "LCD_SERIAL_PORT must be from 0 to 3."
|
#error "LCD_SERIAL_PORT must be from 0 to 3."
|
||||||
#endif
|
#endif
|
||||||
#define LCD_SERIAL lcdSerial
|
#define LCD_SERIAL lcdSerial
|
||||||
#if HAS_DGUS_LCD
|
#if ANY(HAS_DGUS_LCD, EXTENSIBLE_UI)
|
||||||
#define LCD_SERIAL_TX_BUFFER_FREE() LCD_SERIAL.get_tx_buffer_free()
|
#define LCD_SERIAL_TX_BUFFER_FREE() LCD_SERIAL.get_tx_buffer_free()
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -159,7 +159,7 @@ typedef Servo hal_servo_t;
|
|||||||
#define GET_PIN_MAP_INDEX(pin) pin
|
#define GET_PIN_MAP_INDEX(pin) pin
|
||||||
#define PARSED_PIN_INDEX(code, dval) parser.intval(code, dval)
|
#define PARSED_PIN_INDEX(code, dval) parser.intval(code, dval)
|
||||||
|
|
||||||
#define HAL_SENSITIVE_PINS 0, 1,
|
#define HAL_SENSITIVE_PINS 0, 1
|
||||||
|
|
||||||
#ifdef __AVR_AT90USB1286__
|
#ifdef __AVR_AT90USB1286__
|
||||||
#define JTAG_DISABLE() do{ MCUCR = 0x80; MCUCR = 0x80; }while(0)
|
#define JTAG_DISABLE() do{ MCUCR = 0x80; MCUCR = 0x80; }while(0)
|
||||||
@@ -204,9 +204,9 @@ public:
|
|||||||
static void isr_on() { sei(); }
|
static void isr_on() { sei(); }
|
||||||
static void isr_off() { cli(); }
|
static void isr_off() { cli(); }
|
||||||
|
|
||||||
static void delay_ms(const int ms) { _delay_ms(ms); }
|
static void delay_ms(const int ms) { delay(ms); }
|
||||||
|
|
||||||
// Tasks, called from idle()
|
// Tasks, called from marlin.idle()
|
||||||
static void idletask() {}
|
static void idletask() {}
|
||||||
|
|
||||||
// Reset
|
// Reset
|
||||||
|
|||||||
@@ -119,7 +119,6 @@ void spiBegin() {
|
|||||||
while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
|
while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** begin spi transaction */
|
/** begin spi transaction */
|
||||||
void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode) {
|
void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode) {
|
||||||
// Based on Arduino SPI library
|
// Based on Arduino SPI library
|
||||||
@@ -175,7 +174,6 @@ void spiBegin() {
|
|||||||
SPSR = clockDiv | 0x01;
|
SPSR = clockDiv | 0x01;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#else // SOFTWARE_SPI || FORCE_SOFT_SPI
|
#else // SOFTWARE_SPI || FORCE_SOFT_SPI
|
||||||
|
|
||||||
// ------------------------
|
// ------------------------
|
||||||
|
|||||||
@@ -41,7 +41,6 @@
|
|||||||
#if !defined(USBCON) && (defined(UBRRH) || defined(UBRR0H) || defined(UBRR1H) || defined(UBRR2H) || defined(UBRR3H))
|
#if !defined(USBCON) && (defined(UBRRH) || defined(UBRR0H) || defined(UBRR1H) || defined(UBRR2H) || defined(UBRR3H))
|
||||||
|
|
||||||
#include "MarlinSerial.h"
|
#include "MarlinSerial.h"
|
||||||
#include "../../MarlinCore.h"
|
|
||||||
|
|
||||||
#if ENABLED(DIRECT_STEPPING)
|
#if ENABLED(DIRECT_STEPPING)
|
||||||
#include "../../feature/direct_stepping.h"
|
#include "../../feature/direct_stepping.h"
|
||||||
@@ -601,20 +600,20 @@ MSerialT1 customizedSerial1(MSerialT1::HasEmergencyParser);
|
|||||||
|
|
||||||
#endif // SERIAL_PORT_3
|
#endif // SERIAL_PORT_3
|
||||||
|
|
||||||
#ifdef MMU2_SERIAL_PORT
|
#ifdef MMU_SERIAL_PORT
|
||||||
|
|
||||||
ISR(SERIAL_REGNAME(USART, MMU2_SERIAL_PORT, _RX_vect)) {
|
ISR(SERIAL_REGNAME(USART, MMU_SERIAL_PORT, _RX_vect)) {
|
||||||
MarlinSerial<MMU2SerialCfg<MMU2_SERIAL_PORT>>::store_rxd_char();
|
MarlinSerial<MMU2SerialCfg<MMU_SERIAL_PORT>>::store_rxd_char();
|
||||||
}
|
}
|
||||||
|
|
||||||
ISR(SERIAL_REGNAME(USART, MMU2_SERIAL_PORT, _UDRE_vect)) {
|
ISR(SERIAL_REGNAME(USART, MMU_SERIAL_PORT, _UDRE_vect)) {
|
||||||
MarlinSerial<MMU2SerialCfg<MMU2_SERIAL_PORT>>::_tx_udr_empty_irq();
|
MarlinSerial<MMU2SerialCfg<MMU_SERIAL_PORT>>::_tx_udr_empty_irq();
|
||||||
}
|
}
|
||||||
|
|
||||||
template class MarlinSerial< MMU2SerialCfg<MMU2_SERIAL_PORT> >;
|
template class MarlinSerial< MMU2SerialCfg<MMU_SERIAL_PORT> >;
|
||||||
MSerialMMU2 mmuSerial(MSerialMMU2::HasEmergencyParser);
|
MSerialMMU2 mmuSerial(MSerialMMU2::HasEmergencyParser);
|
||||||
|
|
||||||
#endif // MMU2_SERIAL_PORT
|
#endif // MMU_SERIAL_PORT
|
||||||
|
|
||||||
#ifdef LCD_SERIAL_PORT
|
#ifdef LCD_SERIAL_PORT
|
||||||
|
|
||||||
@@ -629,7 +628,7 @@ MSerialT1 customizedSerial1(MSerialT1::HasEmergencyParser);
|
|||||||
template class MarlinSerial< LCDSerialCfg<LCD_SERIAL_PORT> >;
|
template class MarlinSerial< LCDSerialCfg<LCD_SERIAL_PORT> >;
|
||||||
MSerialLCD lcdSerial(MSerialLCD::HasEmergencyParser);
|
MSerialLCD lcdSerial(MSerialLCD::HasEmergencyParser);
|
||||||
|
|
||||||
#if HAS_DGUS_LCD
|
#if ANY(HAS_DGUS_LCD, EXTENSIBLE_UI)
|
||||||
template<typename Cfg>
|
template<typename Cfg>
|
||||||
typename MarlinSerial<Cfg>::ring_buffer_pos_t MarlinSerial<Cfg>::get_tx_buffer_free() {
|
typename MarlinSerial<Cfg>::ring_buffer_pos_t MarlinSerial<Cfg>::get_tx_buffer_free() {
|
||||||
const ring_buffer_pos_t t = tx_buffer.tail, // next byte to send.
|
const ring_buffer_pos_t t = tx_buffer.tail, // next byte to send.
|
||||||
|
|||||||
@@ -205,7 +205,7 @@
|
|||||||
static ring_buffer_pos_t available();
|
static ring_buffer_pos_t available();
|
||||||
static void write(const uint8_t c);
|
static void write(const uint8_t c);
|
||||||
static void flushTX();
|
static void flushTX();
|
||||||
#if HAS_DGUS_LCD
|
#if ANY(HAS_DGUS_LCD, EXTENSIBLE_UI)
|
||||||
static ring_buffer_pos_t get_tx_buffer_free();
|
static ring_buffer_pos_t get_tx_buffer_free();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -246,7 +246,7 @@
|
|||||||
|
|
||||||
#endif // !USBCON
|
#endif // !USBCON
|
||||||
|
|
||||||
#ifdef MMU2_SERIAL_PORT
|
#ifdef MMU_SERIAL_PORT
|
||||||
template <uint8_t serial>
|
template <uint8_t serial>
|
||||||
struct MMU2SerialCfg {
|
struct MMU2SerialCfg {
|
||||||
static constexpr int PORT = serial;
|
static constexpr int PORT = serial;
|
||||||
@@ -260,7 +260,7 @@
|
|||||||
static constexpr bool RX_OVERRUNS = false;
|
static constexpr bool RX_OVERRUNS = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef Serial1Class< MarlinSerial< MMU2SerialCfg<MMU2_SERIAL_PORT> > > MSerialMMU2;
|
typedef Serial1Class< MarlinSerial< MMU2SerialCfg<MMU_SERIAL_PORT> > > MSerialMMU2;
|
||||||
extern MSerialMMU2 mmuSerial;
|
extern MSerialMMU2 mmuSerial;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -63,7 +63,6 @@
|
|||||||
|
|
||||||
static volatile int8_t Channel[_Nbr_16timers]; // counter for the servo being pulsed for each timer (or -1 if refresh interval)
|
static volatile int8_t Channel[_Nbr_16timers]; // counter for the servo being pulsed for each timer (or -1 if refresh interval)
|
||||||
|
|
||||||
|
|
||||||
/************ static functions common to all instances ***********************/
|
/************ static functions common to all instances ***********************/
|
||||||
|
|
||||||
static inline void handle_interrupts(const timer16_Sequence_t timer, volatile uint16_t* TCNTn, volatile uint16_t* OCRnA) {
|
static inline void handle_interrupts(const timer16_Sequence_t timer, volatile uint16_t* TCNTn, volatile uint16_t* OCRnA) {
|
||||||
|
|||||||
@@ -35,14 +35,14 @@
|
|||||||
#ifndef MARLIN_EEPROM_SIZE
|
#ifndef MARLIN_EEPROM_SIZE
|
||||||
#define MARLIN_EEPROM_SIZE size_t(E2END + 1)
|
#define MARLIN_EEPROM_SIZE size_t(E2END + 1)
|
||||||
#endif
|
#endif
|
||||||
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; }
|
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; }
|
||||||
bool PersistentStore::access_start() { return true; }
|
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) {
|
||||||
uint16_t written = 0;
|
uint16_t written = 0;
|
||||||
while (size--) {
|
while (size--) {
|
||||||
uint8_t * const p = (uint8_t * const)pos;
|
uint8_t * const p = (uint8_t * const)REAL_EEPROM_ADDR(pos);
|
||||||
uint8_t v = *value;
|
uint8_t v = *value;
|
||||||
if (v != eeprom_read_byte(p)) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed!
|
if (v != eeprom_read_byte(p)) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed!
|
||||||
eeprom_write_byte(p, v);
|
eeprom_write_byte(p, v);
|
||||||
@@ -61,7 +61,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
|
|||||||
|
|
||||||
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);
|
const uint8_t c = eeprom_read_byte((uint8_t*)REAL_EEPROM_ADDR(pos));
|
||||||
if (writing) *value = c;
|
if (writing) *value = c;
|
||||||
crc16(crc, &c, 1);
|
crc16(crc, &c, 1);
|
||||||
pos++;
|
pos++;
|
||||||
|
|||||||
@@ -91,7 +91,6 @@ void endstop_ISR() { endstops.update(); }
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// Install Pin change interrupt for a pin. Can be called multiple times.
|
// Install Pin change interrupt for a pin. Can be called multiple times.
|
||||||
void pciSetup(const int8_t pin) {
|
void pciSetup(const int8_t pin) {
|
||||||
if (digitalPinHasPCICR(pin)) {
|
if (digitalPinHasPCICR(pin)) {
|
||||||
@@ -346,6 +345,14 @@ void setup_endstop_interrupts() {
|
|||||||
pciSetup(Z_MIN_PROBE_PIN);
|
pciSetup(Z_MIN_PROBE_PIN);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
#if USE_CALIBRATION
|
||||||
|
#if (digitalPinToInterrupt(CALIBRATION_PIN) != NOT_AN_INTERRUPT)
|
||||||
|
_ATTACH(CALIBRATION_PIN);
|
||||||
|
#else
|
||||||
|
static_assert(digitalPinHasPCICR(CALIBRATION_PIN), "CALIBRATION_PIN is not interrupt-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue.");
|
||||||
|
pciSetup(CALIBRATION_PIN);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
// If we arrive here without raising an assertion, each pin has either an EXT-interrupt or a PCI.
|
// If we arrive here without raising an assertion, each pin has either an EXT-interrupt or a PCI.
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ void MarlinHAL::set_pwm_frequency(const pin_t pin, const uint16_t f_desired) {
|
|||||||
else {
|
else {
|
||||||
if (p == 32 || p == 128) continue; // Skip TIMER2 specific prescalers when not TIMER2
|
if (p == 32 || p == 128) continue; // Skip TIMER2 specific prescalers when not TIMER2
|
||||||
const uint16_t rft = (F_CPU) / (p * f_desired);
|
const uint16_t rft = (F_CPU) / (p * f_desired);
|
||||||
DEBUG_ECHOLNPGM("(Not Timer 2) F_CPU=" STRINGIFY(F_CPU), " prescaler=", p, " f_desired=", f_desired);
|
DEBUG_ECHOLNPGM("(Not Timer 2) F_CPU=", STRINGIFY(F_CPU), " prescaler=", p, " f_desired=", f_desired);
|
||||||
res_fast_temp = rft - 1;
|
res_fast_temp = rft - 1;
|
||||||
res_pc_temp = rft / 2;
|
res_pc_temp = rft / 2;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -241,7 +241,7 @@ uint8_t extDigitalRead(const int8_t pin) {
|
|||||||
*
|
*
|
||||||
* DC values -1.0 to 1.0. Negative duty cycle inverts the pulse.
|
* DC values -1.0 to 1.0. Negative duty cycle inverts the pulse.
|
||||||
*/
|
*/
|
||||||
uint16_t set_pwm_frequency_hz(const_float_t hz, const float dca, const float dcb, const float dcc) {
|
uint16_t set_pwm_frequency_hz(const float hz, const float dca, const float dcb, const float dcc) {
|
||||||
float count = 0;
|
float count = 0;
|
||||||
if (hz > 0 && (dca || dcb || dcc)) {
|
if (hz > 0 && (dca || dcb || dcc)) {
|
||||||
count = float(F_CPU) / hz; // 1x prescaler, TOP for 16MHz base freq.
|
count = float(F_CPU) / hz; // 1x prescaler, TOP for 16MHz base freq.
|
||||||
@@ -254,7 +254,7 @@ uint16_t set_pwm_frequency_hz(const_float_t hz, const float dca, const float dcb
|
|||||||
else { prescaler = 1; SET_CS(5, PRESCALER_1); }
|
else { prescaler = 1; SET_CS(5, PRESCALER_1); }
|
||||||
|
|
||||||
count /= float(prescaler);
|
count /= float(prescaler);
|
||||||
const float pwm_top = round(count); // Get the rounded count
|
const float pwm_top = roundf(count); // Get the rounded count
|
||||||
|
|
||||||
ICR5 = (uint16_t)pwm_top - 1; // Subtract 1 for TOP
|
ICR5 = (uint16_t)pwm_top - 1; // Subtract 1 for TOP
|
||||||
OCR5A = pwm_top * ABS(dca); // Update and scale DCs
|
OCR5A = pwm_top * ABS(dca); // Update and scale DCs
|
||||||
@@ -280,7 +280,7 @@ uint16_t set_pwm_frequency_hz(const_float_t hz, const float dca, const float dcb
|
|||||||
SET_CS(5, PRESCALER_64); // 16MHz / 64 = 250kHz
|
SET_CS(5, PRESCALER_64); // 16MHz / 64 = 250kHz
|
||||||
OCR5A = OCR5B = OCR5C = 0;
|
OCR5A = OCR5B = OCR5C = 0;
|
||||||
}
|
}
|
||||||
return round(count);
|
return roundf(count);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -28,9 +28,6 @@
|
|||||||
* Port : E0 E1 E4 E5 G5 E3 H3 H4 H5 H6 B4 B5 B6 B7 J1 J0 H1 H0 D3 D2 D1 D0 A0 A1 A2 A3 A4 A5 A6 A7 C7 C6 C5 C4 C3 C2 C1 C0 D7 G2 G1 G0 L7 L6 L5 L4 L3 L2 L1 L0 B3 B2 B1 B0 F0 F1 F2 F3 F4 F5 F6 F7 K0 K1 K2 K3 K4 K5 K6 K7 | E2 E6 E7 xx xx H2 H7 G3 G4 xx xx xx xx xx D4 D5 D6 xx xx J2 J3 J4 J5 J6 J7 xx xx xx xx xx
|
* Port : E0 E1 E4 E5 G5 E3 H3 H4 H5 H6 B4 B5 B6 B7 J1 J0 H1 H0 D3 D2 D1 D0 A0 A1 A2 A3 A4 A5 A6 A7 C7 C6 C5 C4 C3 C2 C1 C0 D7 G2 G1 G0 L7 L6 L5 L4 L3 L2 L1 L0 B3 B2 B1 B0 F0 F1 F2 F3 F4 F5 F6 F7 K0 K1 K2 K3 K4 K5 K6 K7 | E2 E6 E7 xx xx H2 H7 G3 G4 xx xx xx xx xx D4 D5 D6 xx xx J2 J3 J4 J5 J6 J7 xx xx xx xx xx
|
||||||
* Logical Pin : 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | 78 79 80 xx xx 84 85 71 70 xx xx xx xx xx 81 82 83 xx xx 72 73 75 76 77 74 xx xx xx xx xx
|
* Logical Pin : 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | 78 79 80 xx xx 84 85 71 70 xx xx xx xx xx 81 82 83 xx xx 72 73 75 76 77 74 xx xx xx xx xx
|
||||||
* Analog Input : 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
* Analog Input : 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
||||||
*
|
|
||||||
* Arduino Pin Layout video: https://youtu.be/rIqeVCX09FA
|
|
||||||
* AVR alternate pin function overview video: https://youtu.be/1yd8wuI5Plg
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../fastio.h"
|
#include "../fastio.h"
|
||||||
|
|||||||
@@ -26,9 +26,6 @@
|
|||||||
*
|
*
|
||||||
* Logical Pin: 38 39 40 41 42 43 44 45 16 10 11 12 06 07 08 09 30 31 32 33 34 35 36 37 17 18 19 20 21 22 23 24 00 01 13 05 02 03 14 15 46 47 48 49 50 51 52 53 25 26 27 28 29 04
|
* Logical Pin: 38 39 40 41 42 43 44 45 16 10 11 12 06 07 08 09 30 31 32 33 34 35 36 37 17 18 19 20 21 22 23 24 00 01 13 05 02 03 14 15 46 47 48 49 50 51 52 53 25 26 27 28 29 04
|
||||||
* Port: A0 A1 A2 A3 A4 A5 A6 A7 B0 B1 B2 B3 B4 B5 B6 B7 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7 E0 E1 E2 E3 E4 E5 E6 E7 F0 F1 F2 F3 F4 F5 F6 F7 G0 G1 G2 G3 G4 G5
|
* Port: A0 A1 A2 A3 A4 A5 A6 A7 B0 B1 B2 B3 B4 B5 B6 B7 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7 E0 E1 E2 E3 E4 E5 E6 E7 F0 F1 F2 F3 F4 F5 F6 F7 G0 G1 G2 G3 G4 G5
|
||||||
*
|
|
||||||
* Arduino Pin Layout video: https://youtu.be/rIqeVCX09FA
|
|
||||||
* AVR alternate pin function overview video: https://youtu.be/1yd8wuI5Plg
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../fastio.h"
|
#include "../fastio.h"
|
||||||
|
|||||||
@@ -26,9 +26,6 @@
|
|||||||
*
|
*
|
||||||
* Logical Pin: 08 09 10 11 12 13 14 15 16 17 18 19 20 21 00 01 02 03 04 05 06 07
|
* Logical Pin: 08 09 10 11 12 13 14 15 16 17 18 19 20 21 00 01 02 03 04 05 06 07
|
||||||
* Port: B0 B1 B2 B3 B4 B5 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7
|
* Port: B0 B1 B2 B3 B4 B5 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7
|
||||||
*
|
|
||||||
* Arduino Pin Layout video: https://youtu.be/rIqeVCX09FA
|
|
||||||
* AVR alternate pin function overview video: https://youtu.be/1yd8wuI5Plg
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../fastio.h"
|
#include "../fastio.h"
|
||||||
|
|||||||
@@ -26,9 +26,6 @@
|
|||||||
*
|
*
|
||||||
* Logical Pin: 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
* Logical Pin: 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
||||||
* Port: B0 B1 B2 B3 B4 B5 B6 B7 D0 D1 D2 D3 D4 D5 D6 D7 C0 C1 C2 C3 C4 C5 C6 C7 A7 A6 A5 A4 A3 A2 A1 A0
|
* Port: B0 B1 B2 B3 B4 B5 B6 B7 D0 D1 D2 D3 D4 D5 D6 D7 C0 C1 C2 C3 C4 C5 C6 C7 A7 A6 A5 A4 A3 A2 A1 A0
|
||||||
*
|
|
||||||
* Arduino Pin Layout video: https://youtu.be/rIqeVCX09FA
|
|
||||||
* AVR alternate pin function overview video: https://youtu.be/1yd8wuI5Plg
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** ATMega644
|
/** ATMega644
|
||||||
|
|||||||
@@ -26,10 +26,7 @@
|
|||||||
*
|
*
|
||||||
* Logical Pin: 28 29 30 31 32 33 34 35 20 21 22 23 24 25 26 27 10 11 12 13 14 15 16 17 00 01 02 03 04 05 06 07 08 09(46*47)36 37 18 19 38 39 40 41 42 43 44 45
|
* Logical Pin: 28 29 30 31 32 33 34 35 20 21 22 23 24 25 26 27 10 11 12 13 14 15 16 17 00 01 02 03 04 05 06 07 08 09(46*47)36 37 18 19 38 39 40 41 42 43 44 45
|
||||||
* Port: A0 A1 A2 A3 A4 A5 A6 A7 B0 B1 B2 B3 B4 B5 B6 B7 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7 E0 E1 E2 E3 E4 E5 E6 E7 F0 F1 F2 F3 F4 F5 F6 F7
|
* Port: A0 A1 A2 A3 A4 A5 A6 A7 B0 B1 B2 B3 B4 B5 B6 B7 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7 E0 E1 E2 E3 E4 E5 E6 E7 F0 F1 F2 F3 F4 F5 F6 F7
|
||||||
* The logical pins 46 and 47 are not supported by Teensyduino, but are supported below as E2 and E3
|
* Logical pins 46-47 aren't supported by Teensyduino, but are supported below as E2 and E3
|
||||||
*
|
|
||||||
* Arduino Pin Layout video: https://youtu.be/rIqeVCX09FA
|
|
||||||
* AVR alternate pin function overview video: https://youtu.be/1yd8wuI5Plg
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../fastio.h"
|
#include "../fastio.h"
|
||||||
@@ -366,8 +363,11 @@
|
|||||||
#define AIO7_PWM 0
|
#define AIO7_PWM 0
|
||||||
#define AIO7_DDR DDRF
|
#define AIO7_DDR DDRF
|
||||||
|
|
||||||
//-- Begin not supported by Teensyduino
|
//-- 46-47 are not supported by Teensyduino
|
||||||
//-- don't use Arduino functions on these pins pinMode/digitalWrite/etc
|
//-- Don't use Arduino functions (pinMode, digitalWrite, etc.) on these pins
|
||||||
|
#define PIN_E2 46
|
||||||
|
#define PIN_E3 47
|
||||||
|
|
||||||
#define DIO46_PIN PINE2
|
#define DIO46_PIN PINE2
|
||||||
#define DIO46_RPORT PINE
|
#define DIO46_RPORT PINE
|
||||||
#define DIO46_WPORT PORTE
|
#define DIO46_WPORT PORTE
|
||||||
@@ -380,10 +380,7 @@
|
|||||||
#define DIO47_PWM 0
|
#define DIO47_PWM 0
|
||||||
#define DIO47_DDR DDRE
|
#define DIO47_DDR DDRE
|
||||||
|
|
||||||
#define TEENSY_E2 46
|
//--
|
||||||
#define TEENSY_E3 47
|
|
||||||
|
|
||||||
//-- end not supported by Teensyduino
|
|
||||||
|
|
||||||
#undef PA0
|
#undef PA0
|
||||||
#define PA0_PIN PINA0
|
#define PA0_PIN PINA0
|
||||||
@@ -679,7 +676,6 @@
|
|||||||
#define PF7_PWM 0
|
#define PF7_PWM 0
|
||||||
#define PF7_DDR DDRF
|
#define PF7_DDR DDRF
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Some of the pin mapping functions of the Teensduino extension to the Arduino IDE
|
* Some of the pin mapping functions of the Teensduino extension to the Arduino IDE
|
||||||
* do not function the same as the other Arduino extensions.
|
* do not function the same as the other Arduino extensions.
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2024 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
@@ -95,7 +95,7 @@
|
|||||||
/**
|
/**
|
||||||
* The Trinamic library includes SoftwareSerial.h, leading to a compile error.
|
* The Trinamic library includes SoftwareSerial.h, leading to a compile error.
|
||||||
*/
|
*/
|
||||||
#if ALL(HAS_TRINAMIC_CONFIG, ENDSTOP_INTERRUPTS_FEATURE)
|
#if ALL(HAS_TMC_SW_SERIAL, 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
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,23 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PWM print routines for Atmel 8 bit AVR CPUs
|
* Pins Debugging for Atmel 8 bit AVR CPUs
|
||||||
|
*
|
||||||
|
* - NUMBER_PINS_TOTAL
|
||||||
|
* - MULTI_NAME_PAD
|
||||||
|
* - getPinByIndex(index)
|
||||||
|
* - printPinNameByIndex(index)
|
||||||
|
* - getPinIsDigitalByIndex(index)
|
||||||
|
* - digitalPinToAnalogIndex(pin)
|
||||||
|
* - getValidPinMode(pin)
|
||||||
|
* - isValidPin(pin)
|
||||||
|
* - isAnalogPin(pin)
|
||||||
|
* - digitalRead_mod(pin)
|
||||||
|
* - pwm_status(pin)
|
||||||
|
* - printPinPWM(pin)
|
||||||
|
* - printPinPort(pin)
|
||||||
|
* - printPinNumber(pin)
|
||||||
|
* - printPinAnalog(pin)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../../inc/MarlinConfig.h"
|
#include "../../inc/MarlinConfig.h"
|
||||||
@@ -39,44 +55,44 @@
|
|||||||
#include "pinsDebug_Teensyduino.h"
|
#include "pinsDebug_Teensyduino.h"
|
||||||
// Can't use the "digitalPinToPort" function from the Teensyduino type IDEs
|
// Can't use the "digitalPinToPort" function from the Teensyduino type IDEs
|
||||||
// portModeRegister takes a different argument
|
// portModeRegister takes a different argument
|
||||||
#define digitalPinToTimer_DEBUG(p) digitalPinToTimer(p)
|
#define digitalPinToTimer_DEBUG(P) digitalPinToTimer(P)
|
||||||
#define digitalPinToBitMask_DEBUG(p) digitalPinToBitMask(p)
|
#define digitalPinToBitMask_DEBUG(P) digitalPinToBitMask(P)
|
||||||
#define digitalPinToPort_DEBUG(p) digitalPinToPort(p)
|
#define digitalPinToPort_DEBUG(P) digitalPinToPort(P)
|
||||||
#define GET_PINMODE(pin) (*portModeRegister(pin) & digitalPinToBitMask_DEBUG(pin))
|
#define getValidPinMode(P) (*portModeRegister(P) & digitalPinToBitMask_DEBUG(P))
|
||||||
|
|
||||||
#elif AVR_ATmega2560_FAMILY_PLUS_70 // So we can access/display all the pins on boards using more than 70
|
#elif AVR_ATmega2560_FAMILY_PLUS_70 // So we can access/display all the pins on boards using more than 70
|
||||||
|
|
||||||
#include "pinsDebug_plus_70.h"
|
#include "pinsDebug_plus_70.h"
|
||||||
#define digitalPinToTimer_DEBUG(p) digitalPinToTimer_plus_70(p)
|
#define digitalPinToTimer_DEBUG(P) digitalPinToTimer_plus_70(P)
|
||||||
#define digitalPinToBitMask_DEBUG(p) digitalPinToBitMask_plus_70(p)
|
#define digitalPinToBitMask_DEBUG(P) digitalPinToBitMask_plus_70(P)
|
||||||
#define digitalPinToPort_DEBUG(p) digitalPinToPort_plus_70(p)
|
#define digitalPinToPort_DEBUG(P) digitalPinToPort_plus_70(P)
|
||||||
bool GET_PINMODE(int8_t pin) {return *portModeRegister(digitalPinToPort_DEBUG(pin)) & digitalPinToBitMask_DEBUG(pin); }
|
bool getValidPinMode(pin_t pin) {return *portModeRegister(digitalPinToPort_DEBUG(pin)) & digitalPinToBitMask_DEBUG(pin); }
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#define digitalPinToTimer_DEBUG(p) digitalPinToTimer(p)
|
#define digitalPinToTimer_DEBUG(P) digitalPinToTimer(P)
|
||||||
#define digitalPinToBitMask_DEBUG(p) digitalPinToBitMask(p)
|
#define digitalPinToBitMask_DEBUG(P) digitalPinToBitMask(P)
|
||||||
#define digitalPinToPort_DEBUG(p) digitalPinToPort(p)
|
#define digitalPinToPort_DEBUG(P) digitalPinToPort(P)
|
||||||
bool GET_PINMODE(int8_t pin) {return *portModeRegister(digitalPinToPort_DEBUG(pin)) & digitalPinToBitMask_DEBUG(pin); }
|
bool getValidPinMode(pin_t pin) {return *portModeRegister(digitalPinToPort_DEBUG(pin)) & digitalPinToBitMask_DEBUG(pin); }
|
||||||
#define GET_ARRAY_PIN(p) pgm_read_byte(&pin_array[p].pin)
|
#define getPinByIndex(x) pgm_read_byte(&pin_array[x].pin)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define VALID_PIN(pin) (pin >= 0 && pin < NUM_DIGITAL_PINS ? 1 : 0)
|
#define isValidPin(P) (P >= 0 && P < NUMBER_PINS_TOTAL)
|
||||||
#if AVR_ATmega1284_FAMILY
|
#if AVR_ATmega1284_FAMILY
|
||||||
#define IS_ANALOG(P) WITHIN(P, analogInputToDigitalPin(7), analogInputToDigitalPin(0))
|
#define isAnalogPin(P) WITHIN(P, analogInputToDigitalPin(7), analogInputToDigitalPin(0))
|
||||||
#define DIGITAL_PIN_TO_ANALOG_PIN(P) int(IS_ANALOG(P) ? (P) - analogInputToDigitalPin(7) : -1)
|
#define digitalPinToAnalogIndex(P) int(isAnalogPin(P) ? (P) - analogInputToDigitalPin(7) : -1)
|
||||||
#else
|
#else
|
||||||
#define _ANALOG1(P) WITHIN(P, analogInputToDigitalPin(0), analogInputToDigitalPin(7))
|
#define _ANALOG1(P) WITHIN(P, analogInputToDigitalPin(0), analogInputToDigitalPin(7))
|
||||||
#define _ANALOG2(P) WITHIN(P, analogInputToDigitalPin(8), analogInputToDigitalPin(15))
|
#define _ANALOG2(P) WITHIN(P, analogInputToDigitalPin(8), analogInputToDigitalPin(15))
|
||||||
#define IS_ANALOG(P) (_ANALOG1(P) || _ANALOG2(P))
|
#define isAnalogPin(P) (_ANALOG1(P) || _ANALOG2(P))
|
||||||
#define DIGITAL_PIN_TO_ANALOG_PIN(P) int(_ANALOG1(P) ? (P) - analogInputToDigitalPin(0) : _ANALOG2(P) ? (P) - analogInputToDigitalPin(8) + 8 : -1)
|
#define digitalPinToAnalogIndex(P) int(_ANALOG1(P) ? (P) - analogInputToDigitalPin(0) : _ANALOG2(P) ? (P) - analogInputToDigitalPin(8) + 8 : -1)
|
||||||
#endif
|
#endif
|
||||||
#define GET_ARRAY_PIN(p) pgm_read_byte(&pin_array[p].pin)
|
#define getPinByIndex(x) pgm_read_byte(&pin_array[x].pin)
|
||||||
#define MULTI_NAME_PAD 26 // space needed to be pretty if not first name assigned to a pin
|
#define MULTI_NAME_PAD 26 // space needed to be pretty if not first name assigned to a pin
|
||||||
|
|
||||||
void PRINT_ARRAY_NAME(uint8_t x) {
|
void printPinNameByIndex(const uint8_t index) {
|
||||||
PGM_P const name_mem_pointer = (PGM_P)pgm_read_ptr(&pin_array[x].name);
|
PGM_P const name_mem_pointer = (PGM_P)pgm_read_ptr(&pin_array[index].name);
|
||||||
for (uint8_t y = 0; y < MAX_NAME_LENGTH; ++y) {
|
for (uint8_t y = 0; y < MAX_NAME_LENGTH; ++y) {
|
||||||
char temp_char = pgm_read_byte(name_mem_pointer + y);
|
char temp_char = pgm_read_byte(name_mem_pointer + y);
|
||||||
if (temp_char != 0)
|
if (temp_char != 0)
|
||||||
@@ -88,7 +104,7 @@ void PRINT_ARRAY_NAME(uint8_t x) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define GET_ARRAY_IS_DIGITAL(x) pgm_read_byte(&pin_array[x].is_digital)
|
#define getPinIsDigitalByIndex(x) pgm_read_byte(&pin_array[x].is_digital)
|
||||||
|
|
||||||
#if defined(__AVR_ATmega1284P__) // 1284 IDE extensions set this to the number of
|
#if defined(__AVR_ATmega1284P__) // 1284 IDE extensions set this to the number of
|
||||||
#undef NUM_DIGITAL_PINS // digital only pins while all other CPUs have it
|
#undef NUM_DIGITAL_PINS // digital only pins while all other CPUs have it
|
||||||
@@ -109,7 +125,7 @@ void PRINT_ARRAY_NAME(uint8_t x) {
|
|||||||
* Print a pin's PWM status.
|
* Print a pin's PWM status.
|
||||||
* Return true if it's currently a PWM pin.
|
* Return true if it's currently a PWM pin.
|
||||||
*/
|
*/
|
||||||
bool pwm_status(uint8_t pin) {
|
bool pwm_status(const uint8_t pin) {
|
||||||
char buffer[20]; // for the sprintf statements
|
char buffer[20]; // for the sprintf statements
|
||||||
|
|
||||||
switch (digitalPinToTimer_DEBUG(pin)) {
|
switch (digitalPinToTimer_DEBUG(pin)) {
|
||||||
@@ -163,7 +179,6 @@ bool pwm_status(uint8_t pin) {
|
|||||||
SERIAL_ECHO_SP(2);
|
SERIAL_ECHO_SP(2);
|
||||||
} // pwm_status
|
} // pwm_status
|
||||||
|
|
||||||
|
|
||||||
const volatile uint8_t* const PWM_other[][3] PROGMEM = {
|
const volatile uint8_t* const PWM_other[][3] PROGMEM = {
|
||||||
{ &TCCR0A, &TCCR0B, &TIMSK0 },
|
{ &TCCR0A, &TCCR0B, &TIMSK0 },
|
||||||
{ &TCCR1A, &TCCR1B, &TIMSK1 },
|
{ &TCCR1A, &TCCR1B, &TIMSK1 },
|
||||||
@@ -181,7 +196,6 @@ const volatile uint8_t* const PWM_other[][3] PROGMEM = {
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const volatile uint8_t* const PWM_OCR[][3] PROGMEM = {
|
const volatile uint8_t* const PWM_OCR[][3] PROGMEM = {
|
||||||
|
|
||||||
#ifdef TIMER0A
|
#ifdef TIMER0A
|
||||||
@@ -217,7 +231,6 @@ const volatile uint8_t* const PWM_OCR[][3] PROGMEM = {
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#define TCCR_A(T) pgm_read_word(&PWM_other[T][0])
|
#define TCCR_A(T) pgm_read_word(&PWM_other[T][0])
|
||||||
#define TCCR_B(T) pgm_read_word(&PWM_other[T][1])
|
#define TCCR_B(T) pgm_read_word(&PWM_other[T][1])
|
||||||
#define TIMSK(T) pgm_read_word(&PWM_other[T][2])
|
#define TIMSK(T) pgm_read_word(&PWM_other[T][2])
|
||||||
@@ -279,7 +292,7 @@ void timer_prefix(uint8_t T, char L, uint8_t N) { // T - timer L - pwm N -
|
|||||||
if (TEST(*TMSK, TOIE)) err_prob_interrupt();
|
if (TEST(*TMSK, TOIE)) err_prob_interrupt();
|
||||||
}
|
}
|
||||||
|
|
||||||
void pwm_details(uint8_t pin) {
|
void printPinPWM(const uint8_t pin) {
|
||||||
switch (digitalPinToTimer_DEBUG(pin)) {
|
switch (digitalPinToTimer_DEBUG(pin)) {
|
||||||
|
|
||||||
#if ABTEST(0)
|
#if ABTEST(0)
|
||||||
@@ -350,7 +363,7 @@ void pwm_details(uint8_t pin) {
|
|||||||
#else
|
#else
|
||||||
UNUSED(print_is_also_tied);
|
UNUSED(print_is_also_tied);
|
||||||
#endif
|
#endif
|
||||||
} // pwm_details
|
} // printPinPWM
|
||||||
|
|
||||||
#ifndef digitalRead_mod // Use Teensyduino's version of digitalRead - it doesn't disable the PWMs
|
#ifndef digitalRead_mod // Use Teensyduino's version of digitalRead - it doesn't disable the PWMs
|
||||||
int digitalRead_mod(const pin_t pin) { // same as digitalRead except the PWM stop section has been removed
|
int digitalRead_mod(const pin_t pin) { // same as digitalRead except the PWM stop section has been removed
|
||||||
@@ -359,21 +372,21 @@ void pwm_details(uint8_t pin) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void print_port(const pin_t pin) { // print port number
|
void printPinPort(const pin_t pin) { // print port number
|
||||||
#ifdef digitalPinToPort_DEBUG
|
#ifdef digitalPinToPort_DEBUG
|
||||||
uint8_t x;
|
uint8_t x;
|
||||||
SERIAL_ECHOPGM(" Port: ");
|
SERIAL_ECHOPGM(" Port: ");
|
||||||
#if AVR_AT90USB1286_FAMILY
|
#if AVR_AT90USB1286_FAMILY
|
||||||
x = (pin == 46 || pin == 47) ? 'E' : digitalPinToPort_DEBUG(pin) + 64;
|
x = (pin == PIN_E2 || pin == PIN_E3) ? 'E' : 'A' + digitalPinToPort_DEBUG(pin) - 1;
|
||||||
#else
|
#else
|
||||||
x = digitalPinToPort_DEBUG(pin) + 64;
|
x = 'A' + digitalPinToPort_DEBUG(pin) - 1;
|
||||||
#endif
|
#endif
|
||||||
SERIAL_CHAR(x);
|
SERIAL_CHAR(x);
|
||||||
|
|
||||||
#if AVR_AT90USB1286_FAMILY
|
#if AVR_AT90USB1286_FAMILY
|
||||||
if (pin == 46)
|
if (pin == PIN_E2)
|
||||||
x = '2';
|
x = '2';
|
||||||
else if (pin == 47)
|
else if (pin == PIN_E3)
|
||||||
x = '3';
|
x = '3';
|
||||||
else {
|
else {
|
||||||
uint8_t temp = digitalPinToBitMask_DEBUG(pin);
|
uint8_t temp = digitalPinToBitMask_DEBUG(pin);
|
||||||
@@ -389,7 +402,7 @@ void print_port(const pin_t pin) { // print port number
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0)
|
#define printPinNumber(P) do{ sprintf_P(buffer, PSTR("%3d "), P); SERIAL_ECHO(buffer); }while(0)
|
||||||
#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0)
|
#define printPinAnalog(P) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(P)); SERIAL_ECHO(buffer); }while(0)
|
||||||
|
|
||||||
#undef ABTEST
|
#undef ABTEST
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
|
|||||||
|
|
||||||
// digitalPinToBitMask(pin) is OK
|
// digitalPinToBitMask(pin) is OK
|
||||||
|
|
||||||
#define digitalRead_mod(p) extDigitalRead(p) // Teensyduino's version of digitalRead doesn't
|
#define digitalRead_mod(P) extDigitalRead(P) // Teensyduino's version of digitalRead doesn't
|
||||||
// disable the PWMs so we can use it as is
|
// disable the PWMs so we can use it as is
|
||||||
|
|
||||||
// portModeRegister(pin) is OK
|
// portModeRegister(pin) is OK
|
||||||
|
|||||||
@@ -48,92 +48,92 @@
|
|||||||
const uint8_t PROGMEM digital_pin_to_port_PGM_plus_70[] = {
|
const uint8_t PROGMEM digital_pin_to_port_PGM_plus_70[] = {
|
||||||
// PORTLIST
|
// PORTLIST
|
||||||
// ------------------------
|
// ------------------------
|
||||||
PE , // PE 0 ** 0 ** USART0_RX
|
PE, // PE 0 ** 0 ** USART0_RX
|
||||||
PE , // PE 1 ** 1 ** USART0_TX
|
PE, // PE 1 ** 1 ** USART0_TX
|
||||||
PE , // PE 4 ** 2 ** PWM2
|
PE, // PE 4 ** 2 ** PWM2
|
||||||
PE , // PE 5 ** 3 ** PWM3
|
PE, // PE 5 ** 3 ** PWM3
|
||||||
PG , // PG 5 ** 4 ** PWM4
|
PG, // PG 5 ** 4 ** PWM4
|
||||||
PE , // PE 3 ** 5 ** PWM5
|
PE, // PE 3 ** 5 ** PWM5
|
||||||
PH , // PH 3 ** 6 ** PWM6
|
PH, // PH 3 ** 6 ** PWM6
|
||||||
PH , // PH 4 ** 7 ** PWM7
|
PH, // PH 4 ** 7 ** PWM7
|
||||||
PH , // PH 5 ** 8 ** PWM8
|
PH, // PH 5 ** 8 ** PWM8
|
||||||
PH , // PH 6 ** 9 ** PWM9
|
PH, // PH 6 ** 9 ** PWM9
|
||||||
PB , // PB 4 ** 10 ** PWM10
|
PB, // PB 4 ** 10 ** PWM10
|
||||||
PB , // PB 5 ** 11 ** PWM11
|
PB, // PB 5 ** 11 ** PWM11
|
||||||
PB , // PB 6 ** 12 ** PWM12
|
PB, // PB 6 ** 12 ** PWM12
|
||||||
PB , // PB 7 ** 13 ** PWM13
|
PB, // PB 7 ** 13 ** PWM13
|
||||||
PJ , // PJ 1 ** 14 ** USART3_TX
|
PJ, // PJ 1 ** 14 ** USART3_TX
|
||||||
PJ , // PJ 0 ** 15 ** USART3_RX
|
PJ, // PJ 0 ** 15 ** USART3_RX
|
||||||
PH , // PH 1 ** 16 ** USART2_TX
|
PH, // PH 1 ** 16 ** USART2_TX
|
||||||
PH , // PH 0 ** 17 ** USART2_RX
|
PH, // PH 0 ** 17 ** USART2_RX
|
||||||
PD , // PD 3 ** 18 ** USART1_TX
|
PD, // PD 3 ** 18 ** USART1_TX
|
||||||
PD , // PD 2 ** 19 ** USART1_RX
|
PD, // PD 2 ** 19 ** USART1_RX
|
||||||
PD , // PD 1 ** 20 ** I2C_SDA
|
PD, // PD 1 ** 20 ** I2C_SDA
|
||||||
PD , // PD 0 ** 21 ** I2C_SCL
|
PD, // PD 0 ** 21 ** I2C_SCL
|
||||||
PA , // PA 0 ** 22 ** D22
|
PA, // PA 0 ** 22 ** D22
|
||||||
PA , // PA 1 ** 23 ** D23
|
PA, // PA 1 ** 23 ** D23
|
||||||
PA , // PA 2 ** 24 ** D24
|
PA, // PA 2 ** 24 ** D24
|
||||||
PA , // PA 3 ** 25 ** D25
|
PA, // PA 3 ** 25 ** D25
|
||||||
PA , // PA 4 ** 26 ** D26
|
PA, // PA 4 ** 26 ** D26
|
||||||
PA , // PA 5 ** 27 ** D27
|
PA, // PA 5 ** 27 ** D27
|
||||||
PA , // PA 6 ** 28 ** D28
|
PA, // PA 6 ** 28 ** D28
|
||||||
PA , // PA 7 ** 29 ** D29
|
PA, // PA 7 ** 29 ** D29
|
||||||
PC , // PC 7 ** 30 ** D30
|
PC, // PC 7 ** 30 ** D30
|
||||||
PC , // PC 6 ** 31 ** D31
|
PC, // PC 6 ** 31 ** D31
|
||||||
PC , // PC 5 ** 32 ** D32
|
PC, // PC 5 ** 32 ** D32
|
||||||
PC , // PC 4 ** 33 ** D33
|
PC, // PC 4 ** 33 ** D33
|
||||||
PC , // PC 3 ** 34 ** D34
|
PC, // PC 3 ** 34 ** D34
|
||||||
PC , // PC 2 ** 35 ** D35
|
PC, // PC 2 ** 35 ** D35
|
||||||
PC , // PC 1 ** 36 ** D36
|
PC, // PC 1 ** 36 ** D36
|
||||||
PC , // PC 0 ** 37 ** D37
|
PC, // PC 0 ** 37 ** D37
|
||||||
PD , // PD 7 ** 38 ** D38
|
PD, // PD 7 ** 38 ** D38
|
||||||
PG , // PG 2 ** 39 ** D39
|
PG, // PG 2 ** 39 ** D39
|
||||||
PG , // PG 1 ** 40 ** D40
|
PG, // PG 1 ** 40 ** D40
|
||||||
PG , // PG 0 ** 41 ** D41
|
PG, // PG 0 ** 41 ** D41
|
||||||
PL , // PL 7 ** 42 ** D42
|
PL, // PL 7 ** 42 ** D42
|
||||||
PL , // PL 6 ** 43 ** D43
|
PL, // PL 6 ** 43 ** D43
|
||||||
PL , // PL 5 ** 44 ** D44
|
PL, // PL 5 ** 44 ** D44
|
||||||
PL , // PL 4 ** 45 ** D45
|
PL, // PL 4 ** 45 ** D45
|
||||||
PL , // PL 3 ** 46 ** D46
|
PL, // PL 3 ** 46 ** D46
|
||||||
PL , // PL 2 ** 47 ** D47
|
PL, // PL 2 ** 47 ** D47
|
||||||
PL , // PL 1 ** 48 ** D48
|
PL, // PL 1 ** 48 ** D48
|
||||||
PL , // PL 0 ** 49 ** D49
|
PL, // PL 0 ** 49 ** D49
|
||||||
PB , // PB 3 ** 50 ** SPI_MISO
|
PB, // PB 3 ** 50 ** SPI_MISO
|
||||||
PB , // PB 2 ** 51 ** SPI_MOSI
|
PB, // PB 2 ** 51 ** SPI_MOSI
|
||||||
PB , // PB 1 ** 52 ** SPI_SCK
|
PB, // PB 1 ** 52 ** SPI_SCK
|
||||||
PB , // PB 0 ** 53 ** SPI_SS
|
PB, // PB 0 ** 53 ** SPI_SS
|
||||||
PF , // PF 0 ** 54 ** A0
|
PF, // PF 0 ** 54 ** A0
|
||||||
PF , // PF 1 ** 55 ** A1
|
PF, // PF 1 ** 55 ** A1
|
||||||
PF , // PF 2 ** 56 ** A2
|
PF, // PF 2 ** 56 ** A2
|
||||||
PF , // PF 3 ** 57 ** A3
|
PF, // PF 3 ** 57 ** A3
|
||||||
PF , // PF 4 ** 58 ** A4
|
PF, // PF 4 ** 58 ** A4
|
||||||
PF , // PF 5 ** 59 ** A5
|
PF, // PF 5 ** 59 ** A5
|
||||||
PF , // PF 6 ** 60 ** A6
|
PF, // PF 6 ** 60 ** A6
|
||||||
PF , // PF 7 ** 61 ** A7
|
PF, // PF 7 ** 61 ** A7
|
||||||
PK , // PK 0 ** 62 ** A8
|
PK, // PK 0 ** 62 ** A8
|
||||||
PK , // PK 1 ** 63 ** A9
|
PK, // PK 1 ** 63 ** A9
|
||||||
PK , // PK 2 ** 64 ** A10
|
PK, // PK 2 ** 64 ** A10
|
||||||
PK , // PK 3 ** 65 ** A11
|
PK, // PK 3 ** 65 ** A11
|
||||||
PK , // PK 4 ** 66 ** A12
|
PK, // PK 4 ** 66 ** A12
|
||||||
PK , // PK 5 ** 67 ** A13
|
PK, // PK 5 ** 67 ** A13
|
||||||
PK , // PK 6 ** 68 ** A14
|
PK, // PK 6 ** 68 ** A14
|
||||||
PK , // PK 7 ** 69 ** A15
|
PK, // PK 7 ** 69 ** A15
|
||||||
PG , // PG 4 ** 70 **
|
PG, // PG 4 ** 70 **
|
||||||
PG , // PG 3 ** 71 **
|
PG, // PG 3 ** 71 **
|
||||||
PJ , // PJ 2 ** 72 **
|
PJ, // PJ 2 ** 72 **
|
||||||
PJ , // PJ 3 ** 73 **
|
PJ, // PJ 3 ** 73 **
|
||||||
PJ , // PJ 7 ** 74 **
|
PJ, // PJ 7 ** 74 **
|
||||||
PJ , // PJ 4 ** 75 **
|
PJ, // PJ 4 ** 75 **
|
||||||
PJ , // PJ 5 ** 76 **
|
PJ, // PJ 5 ** 76 **
|
||||||
PJ , // PJ 6 ** 77 **
|
PJ, // PJ 6 ** 77 **
|
||||||
PE , // PE 2 ** 78 **
|
PE, // PE 2 ** 78 **
|
||||||
PE , // PE 6 ** 79 **
|
PE, // PE 6 ** 79 **
|
||||||
PE , // PE 7 ** 80 **
|
PE, // PE 7 ** 80 **
|
||||||
PD , // PD 4 ** 81 **
|
PD, // PD 4 ** 81 **
|
||||||
PD , // PD 5 ** 82 **
|
PD, // PD 5 ** 82 **
|
||||||
PD , // PD 6 ** 83 **
|
PD, // PD 6 ** 83 **
|
||||||
PH , // PH 2 ** 84 **
|
PH, // PH 2 ** 84 **
|
||||||
PH , // PH 7 ** 85 **
|
PH, // PH 7 ** 85 **
|
||||||
};
|
};
|
||||||
|
|
||||||
#define digitalPinToPort_plus_70(P) ( pgm_read_byte( digital_pin_to_port_PGM_plus_70 + (P) ) )
|
#define digitalPinToPort_plus_70(P) ( pgm_read_byte( digital_pin_to_port_PGM_plus_70 + (P) ) )
|
||||||
@@ -141,92 +141,92 @@ const uint8_t PROGMEM digital_pin_to_port_PGM_plus_70[] = {
|
|||||||
const uint8_t PROGMEM digital_pin_to_bit_mask_PGM_plus_70[] = {
|
const uint8_t PROGMEM digital_pin_to_bit_mask_PGM_plus_70[] = {
|
||||||
// PIN IN PORT
|
// PIN IN PORT
|
||||||
// ------------------------
|
// ------------------------
|
||||||
_BV( 0 ) , // PE 0 ** 0 ** USART0_RX
|
_BV( 0 ), // PE 0 ** 0 ** USART0_RX
|
||||||
_BV( 1 ) , // PE 1 ** 1 ** USART0_TX
|
_BV( 1 ), // PE 1 ** 1 ** USART0_TX
|
||||||
_BV( 4 ) , // PE 4 ** 2 ** PWM2
|
_BV( 4 ), // PE 4 ** 2 ** PWM2
|
||||||
_BV( 5 ) , // PE 5 ** 3 ** PWM3
|
_BV( 5 ), // PE 5 ** 3 ** PWM3
|
||||||
_BV( 5 ) , // PG 5 ** 4 ** PWM4
|
_BV( 5 ), // PG 5 ** 4 ** PWM4
|
||||||
_BV( 3 ) , // PE 3 ** 5 ** PWM5
|
_BV( 3 ), // PE 3 ** 5 ** PWM5
|
||||||
_BV( 3 ) , // PH 3 ** 6 ** PWM6
|
_BV( 3 ), // PH 3 ** 6 ** PWM6
|
||||||
_BV( 4 ) , // PH 4 ** 7 ** PWM7
|
_BV( 4 ), // PH 4 ** 7 ** PWM7
|
||||||
_BV( 5 ) , // PH 5 ** 8 ** PWM8
|
_BV( 5 ), // PH 5 ** 8 ** PWM8
|
||||||
_BV( 6 ) , // PH 6 ** 9 ** PWM9
|
_BV( 6 ), // PH 6 ** 9 ** PWM9
|
||||||
_BV( 4 ) , // PB 4 ** 10 ** PWM10
|
_BV( 4 ), // PB 4 ** 10 ** PWM10
|
||||||
_BV( 5 ) , // PB 5 ** 11 ** PWM11
|
_BV( 5 ), // PB 5 ** 11 ** PWM11
|
||||||
_BV( 6 ) , // PB 6 ** 12 ** PWM12
|
_BV( 6 ), // PB 6 ** 12 ** PWM12
|
||||||
_BV( 7 ) , // PB 7 ** 13 ** PWM13
|
_BV( 7 ), // PB 7 ** 13 ** PWM13
|
||||||
_BV( 1 ) , // PJ 1 ** 14 ** USART3_TX
|
_BV( 1 ), // PJ 1 ** 14 ** USART3_TX
|
||||||
_BV( 0 ) , // PJ 0 ** 15 ** USART3_RX
|
_BV( 0 ), // PJ 0 ** 15 ** USART3_RX
|
||||||
_BV( 1 ) , // PH 1 ** 16 ** USART2_TX
|
_BV( 1 ), // PH 1 ** 16 ** USART2_TX
|
||||||
_BV( 0 ) , // PH 0 ** 17 ** USART2_RX
|
_BV( 0 ), // PH 0 ** 17 ** USART2_RX
|
||||||
_BV( 3 ) , // PD 3 ** 18 ** USART1_TX
|
_BV( 3 ), // PD 3 ** 18 ** USART1_TX
|
||||||
_BV( 2 ) , // PD 2 ** 19 ** USART1_RX
|
_BV( 2 ), // PD 2 ** 19 ** USART1_RX
|
||||||
_BV( 1 ) , // PD 1 ** 20 ** I2C_SDA
|
_BV( 1 ), // PD 1 ** 20 ** I2C_SDA
|
||||||
_BV( 0 ) , // PD 0 ** 21 ** I2C_SCL
|
_BV( 0 ), // PD 0 ** 21 ** I2C_SCL
|
||||||
_BV( 0 ) , // PA 0 ** 22 ** D22
|
_BV( 0 ), // PA 0 ** 22 ** D22
|
||||||
_BV( 1 ) , // PA 1 ** 23 ** D23
|
_BV( 1 ), // PA 1 ** 23 ** D23
|
||||||
_BV( 2 ) , // PA 2 ** 24 ** D24
|
_BV( 2 ), // PA 2 ** 24 ** D24
|
||||||
_BV( 3 ) , // PA 3 ** 25 ** D25
|
_BV( 3 ), // PA 3 ** 25 ** D25
|
||||||
_BV( 4 ) , // PA 4 ** 26 ** D26
|
_BV( 4 ), // PA 4 ** 26 ** D26
|
||||||
_BV( 5 ) , // PA 5 ** 27 ** D27
|
_BV( 5 ), // PA 5 ** 27 ** D27
|
||||||
_BV( 6 ) , // PA 6 ** 28 ** D28
|
_BV( 6 ), // PA 6 ** 28 ** D28
|
||||||
_BV( 7 ) , // PA 7 ** 29 ** D29
|
_BV( 7 ), // PA 7 ** 29 ** D29
|
||||||
_BV( 7 ) , // PC 7 ** 30 ** D30
|
_BV( 7 ), // PC 7 ** 30 ** D30
|
||||||
_BV( 6 ) , // PC 6 ** 31 ** D31
|
_BV( 6 ), // PC 6 ** 31 ** D31
|
||||||
_BV( 5 ) , // PC 5 ** 32 ** D32
|
_BV( 5 ), // PC 5 ** 32 ** D32
|
||||||
_BV( 4 ) , // PC 4 ** 33 ** D33
|
_BV( 4 ), // PC 4 ** 33 ** D33
|
||||||
_BV( 3 ) , // PC 3 ** 34 ** D34
|
_BV( 3 ), // PC 3 ** 34 ** D34
|
||||||
_BV( 2 ) , // PC 2 ** 35 ** D35
|
_BV( 2 ), // PC 2 ** 35 ** D35
|
||||||
_BV( 1 ) , // PC 1 ** 36 ** D36
|
_BV( 1 ), // PC 1 ** 36 ** D36
|
||||||
_BV( 0 ) , // PC 0 ** 37 ** D37
|
_BV( 0 ), // PC 0 ** 37 ** D37
|
||||||
_BV( 7 ) , // PD 7 ** 38 ** D38
|
_BV( 7 ), // PD 7 ** 38 ** D38
|
||||||
_BV( 2 ) , // PG 2 ** 39 ** D39
|
_BV( 2 ), // PG 2 ** 39 ** D39
|
||||||
_BV( 1 ) , // PG 1 ** 40 ** D40
|
_BV( 1 ), // PG 1 ** 40 ** D40
|
||||||
_BV( 0 ) , // PG 0 ** 41 ** D41
|
_BV( 0 ), // PG 0 ** 41 ** D41
|
||||||
_BV( 7 ) , // PL 7 ** 42 ** D42
|
_BV( 7 ), // PL 7 ** 42 ** D42
|
||||||
_BV( 6 ) , // PL 6 ** 43 ** D43
|
_BV( 6 ), // PL 6 ** 43 ** D43
|
||||||
_BV( 5 ) , // PL 5 ** 44 ** D44
|
_BV( 5 ), // PL 5 ** 44 ** D44
|
||||||
_BV( 4 ) , // PL 4 ** 45 ** D45
|
_BV( 4 ), // PL 4 ** 45 ** D45
|
||||||
_BV( 3 ) , // PL 3 ** 46 ** D46
|
_BV( 3 ), // PL 3 ** 46 ** D46
|
||||||
_BV( 2 ) , // PL 2 ** 47 ** D47
|
_BV( 2 ), // PL 2 ** 47 ** D47
|
||||||
_BV( 1 ) , // PL 1 ** 48 ** D48
|
_BV( 1 ), // PL 1 ** 48 ** D48
|
||||||
_BV( 0 ) , // PL 0 ** 49 ** D49
|
_BV( 0 ), // PL 0 ** 49 ** D49
|
||||||
_BV( 3 ) , // PB 3 ** 50 ** SPI_MISO
|
_BV( 3 ), // PB 3 ** 50 ** SPI_MISO
|
||||||
_BV( 2 ) , // PB 2 ** 51 ** SPI_MOSI
|
_BV( 2 ), // PB 2 ** 51 ** SPI_MOSI
|
||||||
_BV( 1 ) , // PB 1 ** 52 ** SPI_SCK
|
_BV( 1 ), // PB 1 ** 52 ** SPI_SCK
|
||||||
_BV( 0 ) , // PB 0 ** 53 ** SPI_SS
|
_BV( 0 ), // PB 0 ** 53 ** SPI_SS
|
||||||
_BV( 0 ) , // PF 0 ** 54 ** A0
|
_BV( 0 ), // PF 0 ** 54 ** A0
|
||||||
_BV( 1 ) , // PF 1 ** 55 ** A1
|
_BV( 1 ), // PF 1 ** 55 ** A1
|
||||||
_BV( 2 ) , // PF 2 ** 56 ** A2
|
_BV( 2 ), // PF 2 ** 56 ** A2
|
||||||
_BV( 3 ) , // PF 3 ** 57 ** A3
|
_BV( 3 ), // PF 3 ** 57 ** A3
|
||||||
_BV( 4 ) , // PF 4 ** 58 ** A4
|
_BV( 4 ), // PF 4 ** 58 ** A4
|
||||||
_BV( 5 ) , // PF 5 ** 59 ** A5
|
_BV( 5 ), // PF 5 ** 59 ** A5
|
||||||
_BV( 6 ) , // PF 6 ** 60 ** A6
|
_BV( 6 ), // PF 6 ** 60 ** A6
|
||||||
_BV( 7 ) , // PF 7 ** 61 ** A7
|
_BV( 7 ), // PF 7 ** 61 ** A7
|
||||||
_BV( 0 ) , // PK 0 ** 62 ** A8
|
_BV( 0 ), // PK 0 ** 62 ** A8
|
||||||
_BV( 1 ) , // PK 1 ** 63 ** A9
|
_BV( 1 ), // PK 1 ** 63 ** A9
|
||||||
_BV( 2 ) , // PK 2 ** 64 ** A10
|
_BV( 2 ), // PK 2 ** 64 ** A10
|
||||||
_BV( 3 ) , // PK 3 ** 65 ** A11
|
_BV( 3 ), // PK 3 ** 65 ** A11
|
||||||
_BV( 4 ) , // PK 4 ** 66 ** A12
|
_BV( 4 ), // PK 4 ** 66 ** A12
|
||||||
_BV( 5 ) , // PK 5 ** 67 ** A13
|
_BV( 5 ), // PK 5 ** 67 ** A13
|
||||||
_BV( 6 ) , // PK 6 ** 68 ** A14
|
_BV( 6 ), // PK 6 ** 68 ** A14
|
||||||
_BV( 7 ) , // PK 7 ** 69 ** A15
|
_BV( 7 ), // PK 7 ** 69 ** A15
|
||||||
_BV( 4 ) , // PG 4 ** 70 **
|
_BV( 4 ), // PG 4 ** 70 **
|
||||||
_BV( 3 ) , // PG 3 ** 71 **
|
_BV( 3 ), // PG 3 ** 71 **
|
||||||
_BV( 2 ) , // PJ 2 ** 72 **
|
_BV( 2 ), // PJ 2 ** 72 **
|
||||||
_BV( 3 ) , // PJ 3 ** 73 **
|
_BV( 3 ), // PJ 3 ** 73 **
|
||||||
_BV( 7 ) , // PJ 7 ** 74 **
|
_BV( 7 ), // PJ 7 ** 74 **
|
||||||
_BV( 4 ) , // PJ 4 ** 75 **
|
_BV( 4 ), // PJ 4 ** 75 **
|
||||||
_BV( 5 ) , // PJ 5 ** 76 **
|
_BV( 5 ), // PJ 5 ** 76 **
|
||||||
_BV( 6 ) , // PJ 6 ** 77 **
|
_BV( 6 ), // PJ 6 ** 77 **
|
||||||
_BV( 2 ) , // PE 2 ** 78 **
|
_BV( 2 ), // PE 2 ** 78 **
|
||||||
_BV( 6 ) , // PE 6 ** 79 **
|
_BV( 6 ), // PE 6 ** 79 **
|
||||||
_BV( 7 ) , // PE 7 ** 80 **
|
_BV( 7 ), // PE 7 ** 80 **
|
||||||
_BV( 4 ) , // PD 4 ** 81 **
|
_BV( 4 ), // PD 4 ** 81 **
|
||||||
_BV( 5 ) , // PD 5 ** 82 **
|
_BV( 5 ), // PD 5 ** 82 **
|
||||||
_BV( 6 ) , // PD 6 ** 83 **
|
_BV( 6 ), // PD 6 ** 83 **
|
||||||
_BV( 2 ) , // PH 2 ** 84 **
|
_BV( 2 ), // PH 2 ** 84 **
|
||||||
_BV( 7 ) , // PH 7 ** 85 **
|
_BV( 7 ), // PH 7 ** 85 **
|
||||||
};
|
};
|
||||||
|
|
||||||
#define digitalPinToBitMask_plus_70(P) ( pgm_read_byte( digital_pin_to_bit_mask_PGM_plus_70 + (P) ) )
|
#define digitalPinToBitMask_plus_70(P) ( pgm_read_byte( digital_pin_to_bit_mask_PGM_plus_70 + (P) ) )
|
||||||
@@ -234,86 +234,86 @@ const uint8_t PROGMEM digital_pin_to_bit_mask_PGM_plus_70[] = {
|
|||||||
const uint8_t PROGMEM digital_pin_to_timer_PGM_plus_70[] = {
|
const uint8_t PROGMEM digital_pin_to_timer_PGM_plus_70[] = {
|
||||||
// TIMERS
|
// TIMERS
|
||||||
// ------------------------
|
// ------------------------
|
||||||
NOT_ON_TIMER , // PE 0 ** 0 ** USART0_RX
|
NOT_ON_TIMER, // PE 0 ** 0 ** USART0_RX
|
||||||
NOT_ON_TIMER , // PE 1 ** 1 ** USART0_TX
|
NOT_ON_TIMER, // PE 1 ** 1 ** USART0_TX
|
||||||
TIMER3B , // PE 4 ** 2 ** PWM2
|
TIMER3B, // PE 4 ** 2 ** PWM2
|
||||||
TIMER3C , // PE 5 ** 3 ** PWM3
|
TIMER3C, // PE 5 ** 3 ** PWM3
|
||||||
TIMER0B , // PG 5 ** 4 ** PWM4
|
TIMER0B, // PG 5 ** 4 ** PWM4
|
||||||
TIMER3A , // PE 3 ** 5 ** PWM5
|
TIMER3A, // PE 3 ** 5 ** PWM5
|
||||||
TIMER4A , // PH 3 ** 6 ** PWM6
|
TIMER4A, // PH 3 ** 6 ** PWM6
|
||||||
TIMER4B , // PH 4 ** 7 ** PWM7
|
TIMER4B, // PH 4 ** 7 ** PWM7
|
||||||
TIMER4C , // PH 5 ** 8 ** PWM8
|
TIMER4C, // PH 5 ** 8 ** PWM8
|
||||||
TIMER2B , // PH 6 ** 9 ** PWM9
|
TIMER2B, // PH 6 ** 9 ** PWM9
|
||||||
TIMER2A , // PB 4 ** 10 ** PWM10
|
TIMER2A, // PB 4 ** 10 ** PWM10
|
||||||
TIMER1A , // PB 5 ** 11 ** PWM11
|
TIMER1A, // PB 5 ** 11 ** PWM11
|
||||||
TIMER1B , // PB 6 ** 12 ** PWM12
|
TIMER1B, // PB 6 ** 12 ** PWM12
|
||||||
TIMER0A , // PB 7 ** 13 ** PWM13
|
TIMER0A, // PB 7 ** 13 ** PWM13
|
||||||
NOT_ON_TIMER , // PJ 1 ** 14 ** USART3_TX
|
NOT_ON_TIMER, // PJ 1 ** 14 ** USART3_TX
|
||||||
NOT_ON_TIMER , // PJ 0 ** 15 ** USART3_RX
|
NOT_ON_TIMER, // PJ 0 ** 15 ** USART3_RX
|
||||||
NOT_ON_TIMER , // PH 1 ** 16 ** USART2_TX
|
NOT_ON_TIMER, // PH 1 ** 16 ** USART2_TX
|
||||||
NOT_ON_TIMER , // PH 0 ** 17 ** USART2_RX
|
NOT_ON_TIMER, // PH 0 ** 17 ** USART2_RX
|
||||||
NOT_ON_TIMER , // PD 3 ** 18 ** USART1_TX
|
NOT_ON_TIMER, // PD 3 ** 18 ** USART1_TX
|
||||||
NOT_ON_TIMER , // PD 2 ** 19 ** USART1_RX
|
NOT_ON_TIMER, // PD 2 ** 19 ** USART1_RX
|
||||||
NOT_ON_TIMER , // PD 1 ** 20 ** I2C_SDA
|
NOT_ON_TIMER, // PD 1 ** 20 ** I2C_SDA
|
||||||
NOT_ON_TIMER , // PD 0 ** 21 ** I2C_SCL
|
NOT_ON_TIMER, // PD 0 ** 21 ** I2C_SCL
|
||||||
NOT_ON_TIMER , // PA 0 ** 22 ** D22
|
NOT_ON_TIMER, // PA 0 ** 22 ** D22
|
||||||
NOT_ON_TIMER , // PA 1 ** 23 ** D23
|
NOT_ON_TIMER, // PA 1 ** 23 ** D23
|
||||||
NOT_ON_TIMER , // PA 2 ** 24 ** D24
|
NOT_ON_TIMER, // PA 2 ** 24 ** D24
|
||||||
NOT_ON_TIMER , // PA 3 ** 25 ** D25
|
NOT_ON_TIMER, // PA 3 ** 25 ** D25
|
||||||
NOT_ON_TIMER , // PA 4 ** 26 ** D26
|
NOT_ON_TIMER, // PA 4 ** 26 ** D26
|
||||||
NOT_ON_TIMER , // PA 5 ** 27 ** D27
|
NOT_ON_TIMER, // PA 5 ** 27 ** D27
|
||||||
NOT_ON_TIMER , // PA 6 ** 28 ** D28
|
NOT_ON_TIMER, // PA 6 ** 28 ** D28
|
||||||
NOT_ON_TIMER , // PA 7 ** 29 ** D29
|
NOT_ON_TIMER, // PA 7 ** 29 ** D29
|
||||||
NOT_ON_TIMER , // PC 7 ** 30 ** D30
|
NOT_ON_TIMER, // PC 7 ** 30 ** D30
|
||||||
NOT_ON_TIMER , // PC 6 ** 31 ** D31
|
NOT_ON_TIMER, // PC 6 ** 31 ** D31
|
||||||
NOT_ON_TIMER , // PC 5 ** 32 ** D32
|
NOT_ON_TIMER, // PC 5 ** 32 ** D32
|
||||||
NOT_ON_TIMER , // PC 4 ** 33 ** D33
|
NOT_ON_TIMER, // PC 4 ** 33 ** D33
|
||||||
NOT_ON_TIMER , // PC 3 ** 34 ** D34
|
NOT_ON_TIMER, // PC 3 ** 34 ** D34
|
||||||
NOT_ON_TIMER , // PC 2 ** 35 ** D35
|
NOT_ON_TIMER, // PC 2 ** 35 ** D35
|
||||||
NOT_ON_TIMER , // PC 1 ** 36 ** D36
|
NOT_ON_TIMER, // PC 1 ** 36 ** D36
|
||||||
NOT_ON_TIMER , // PC 0 ** 37 ** D37
|
NOT_ON_TIMER, // PC 0 ** 37 ** D37
|
||||||
NOT_ON_TIMER , // PD 7 ** 38 ** D38
|
NOT_ON_TIMER, // PD 7 ** 38 ** D38
|
||||||
NOT_ON_TIMER , // PG 2 ** 39 ** D39
|
NOT_ON_TIMER, // PG 2 ** 39 ** D39
|
||||||
NOT_ON_TIMER , // PG 1 ** 40 ** D40
|
NOT_ON_TIMER, // PG 1 ** 40 ** D40
|
||||||
NOT_ON_TIMER , // PG 0 ** 41 ** D41
|
NOT_ON_TIMER, // PG 0 ** 41 ** D41
|
||||||
NOT_ON_TIMER , // PL 7 ** 42 ** D42
|
NOT_ON_TIMER, // PL 7 ** 42 ** D42
|
||||||
NOT_ON_TIMER , // PL 6 ** 43 ** D43
|
NOT_ON_TIMER, // PL 6 ** 43 ** D43
|
||||||
TIMER5C , // PL 5 ** 44 ** D44
|
TIMER5C, // PL 5 ** 44 ** D44
|
||||||
TIMER5B , // PL 4 ** 45 ** D45
|
TIMER5B, // PL 4 ** 45 ** D45
|
||||||
TIMER5A , // PL 3 ** 46 ** D46
|
TIMER5A, // PL 3 ** 46 ** D46
|
||||||
NOT_ON_TIMER , // PL 2 ** 47 ** D47
|
NOT_ON_TIMER, // PL 2 ** 47 ** D47
|
||||||
NOT_ON_TIMER , // PL 1 ** 48 ** D48
|
NOT_ON_TIMER, // PL 1 ** 48 ** D48
|
||||||
NOT_ON_TIMER , // PL 0 ** 49 ** D49
|
NOT_ON_TIMER, // PL 0 ** 49 ** D49
|
||||||
NOT_ON_TIMER , // PB 3 ** 50 ** SPI_MISO
|
NOT_ON_TIMER, // PB 3 ** 50 ** SPI_MISO
|
||||||
NOT_ON_TIMER , // PB 2 ** 51 ** SPI_MOSI
|
NOT_ON_TIMER, // PB 2 ** 51 ** SPI_MOSI
|
||||||
NOT_ON_TIMER , // PB 1 ** 52 ** SPI_SCK
|
NOT_ON_TIMER, // PB 1 ** 52 ** SPI_SCK
|
||||||
NOT_ON_TIMER , // PB 0 ** 53 ** SPI_SS
|
NOT_ON_TIMER, // PB 0 ** 53 ** SPI_SS
|
||||||
NOT_ON_TIMER , // PF 0 ** 54 ** A0
|
NOT_ON_TIMER, // PF 0 ** 54 ** A0
|
||||||
NOT_ON_TIMER , // PF 1 ** 55 ** A1
|
NOT_ON_TIMER, // PF 1 ** 55 ** A1
|
||||||
NOT_ON_TIMER , // PF 2 ** 56 ** A2
|
NOT_ON_TIMER, // PF 2 ** 56 ** A2
|
||||||
NOT_ON_TIMER , // PF 3 ** 57 ** A3
|
NOT_ON_TIMER, // PF 3 ** 57 ** A3
|
||||||
NOT_ON_TIMER , // PF 4 ** 58 ** A4
|
NOT_ON_TIMER, // PF 4 ** 58 ** A4
|
||||||
NOT_ON_TIMER , // PF 5 ** 59 ** A5
|
NOT_ON_TIMER, // PF 5 ** 59 ** A5
|
||||||
NOT_ON_TIMER , // PF 6 ** 60 ** A6
|
NOT_ON_TIMER, // PF 6 ** 60 ** A6
|
||||||
NOT_ON_TIMER , // PF 7 ** 61 ** A7
|
NOT_ON_TIMER, // PF 7 ** 61 ** A7
|
||||||
NOT_ON_TIMER , // PK 0 ** 62 ** A8
|
NOT_ON_TIMER, // PK 0 ** 62 ** A8
|
||||||
NOT_ON_TIMER , // PK 1 ** 63 ** A9
|
NOT_ON_TIMER, // PK 1 ** 63 ** A9
|
||||||
NOT_ON_TIMER , // PK 2 ** 64 ** A10
|
NOT_ON_TIMER, // PK 2 ** 64 ** A10
|
||||||
NOT_ON_TIMER , // PK 3 ** 65 ** A11
|
NOT_ON_TIMER, // PK 3 ** 65 ** A11
|
||||||
NOT_ON_TIMER , // PK 4 ** 66 ** A12
|
NOT_ON_TIMER, // PK 4 ** 66 ** A12
|
||||||
NOT_ON_TIMER , // PK 5 ** 67 ** A13
|
NOT_ON_TIMER, // PK 5 ** 67 ** A13
|
||||||
NOT_ON_TIMER , // PK 6 ** 68 ** A14
|
NOT_ON_TIMER, // PK 6 ** 68 ** A14
|
||||||
NOT_ON_TIMER , // PK 7 ** 69 ** A15
|
NOT_ON_TIMER, // PK 7 ** 69 ** A15
|
||||||
NOT_ON_TIMER , // PG 4 ** 70 **
|
NOT_ON_TIMER, // PG 4 ** 70 **
|
||||||
NOT_ON_TIMER , // PG 3 ** 71 **
|
NOT_ON_TIMER, // PG 3 ** 71 **
|
||||||
NOT_ON_TIMER , // PJ 2 ** 72 **
|
NOT_ON_TIMER, // PJ 2 ** 72 **
|
||||||
NOT_ON_TIMER , // PJ 3 ** 73 **
|
NOT_ON_TIMER, // PJ 3 ** 73 **
|
||||||
NOT_ON_TIMER , // PJ 7 ** 74 **
|
NOT_ON_TIMER, // PJ 7 ** 74 **
|
||||||
NOT_ON_TIMER , // PJ 4 ** 75 **
|
NOT_ON_TIMER, // PJ 4 ** 75 **
|
||||||
NOT_ON_TIMER , // PJ 5 ** 76 **
|
NOT_ON_TIMER, // PJ 5 ** 76 **
|
||||||
NOT_ON_TIMER , // PJ 6 ** 77 **
|
NOT_ON_TIMER, // PJ 6 ** 77 **
|
||||||
NOT_ON_TIMER , // PE 2 ** 78 **
|
NOT_ON_TIMER, // PE 2 ** 78 **
|
||||||
NOT_ON_TIMER , // PE 6 ** 79 **
|
NOT_ON_TIMER, // PE 6 ** 79 **
|
||||||
};
|
};
|
||||||
|
|
||||||
#define digitalPinToTimer_plus_70(P) ( pgm_read_byte( digital_pin_to_timer_PGM_plus_70 + (P) ) )
|
#define digitalPinToTimer_plus_70(P) ( pgm_read_byte( digital_pin_to_timer_PGM_plus_70 + (P) ) )
|
||||||
|
|||||||
@@ -93,15 +93,15 @@ namespace AVRHelpers {
|
|||||||
typedef T type;
|
typedef T type;
|
||||||
};
|
};
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct voltype <T, 1u> {
|
struct voltype <T, 1U> {
|
||||||
typedef uint8_t type;
|
typedef uint8_t type;
|
||||||
};
|
};
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct voltype <T, 2u> {
|
struct voltype <T, 2U> {
|
||||||
typedef uint16_t type;
|
typedef uint16_t type;
|
||||||
};
|
};
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct voltype <T, 4u> {
|
struct voltype <T, 4U> {
|
||||||
typedef uint32_t type;
|
typedef uint32_t type;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -2007,7 +2007,7 @@ inline void _ATmega_resetperipherals() {
|
|||||||
|
|
||||||
#if defined(__AVR_TRM01__) || defined(__AVR_TRM02__) || defined(__AVR_TRM03__) || defined(__AVR_TRM05__)
|
#if defined(__AVR_TRM01__) || defined(__AVR_TRM02__) || defined(__AVR_TRM03__) || defined(__AVR_TRM05__)
|
||||||
_EEAR._EEAR = 0;
|
_EEAR._EEAR = 0;
|
||||||
dwrite(_EEDR, (uint8_t)0u);
|
dwrite(_EEDR, (uint8_t)0U);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__AVR_TRM01__) || defined(__AVR_TRM02__) || defined(__AVR_TRM03__) || defined(__AVR_TRM04__) || defined(__AVR_TRM05__)
|
#if defined(__AVR_TRM01__) || defined(__AVR_TRM02__) || defined(__AVR_TRM03__) || defined(__AVR_TRM04__) || defined(__AVR_TRM05__)
|
||||||
|
|||||||
@@ -23,43 +23,41 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Define SPI Pins: SCK, MISO, MOSI, SS
|
* Define SPI Pins: SCK, MISO, MOSI, SS
|
||||||
|
* Platform pins have parentheses, e.g., "(53)", so we cannot use them.
|
||||||
*/
|
*/
|
||||||
#if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328__) || defined(__AVR_ATmega328P__)
|
#if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328__) || defined(__AVR_ATmega328P__)
|
||||||
#define AVR_SCK_PIN 13
|
#define _PIN_SPI_SCK 13
|
||||||
#define AVR_MISO_PIN 12
|
#define _PIN_SPI_MISO 12
|
||||||
#define AVR_MOSI_PIN 11
|
#define _PIN_SPI_MOSI 11
|
||||||
#define AVR_SS_PIN 10
|
#define _PIN_SPI_SS 10
|
||||||
#elif 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_SCK_PIN 7
|
#define _PIN_SPI_SCK 7
|
||||||
#define AVR_MISO_PIN 6
|
#define _PIN_SPI_MISO 6
|
||||||
#define AVR_MOSI_PIN 5
|
#define _PIN_SPI_MOSI 5
|
||||||
#define AVR_SS_PIN 4
|
#define _PIN_SPI_SS 4
|
||||||
#elif defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
|
#elif defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
|
||||||
#define AVR_SCK_PIN 52
|
#define _PIN_SPI_SCK 52
|
||||||
#define AVR_MISO_PIN 50
|
#define _PIN_SPI_MISO 50
|
||||||
#define AVR_MOSI_PIN 51
|
#define _PIN_SPI_MOSI 51
|
||||||
#define AVR_SS_PIN 53
|
#define _PIN_SPI_SS 53
|
||||||
#elif defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__)
|
#elif defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__)
|
||||||
#define AVR_SCK_PIN 21
|
#define _PIN_SPI_SCK 21
|
||||||
#define AVR_MISO_PIN 23
|
#define _PIN_SPI_MISO 23
|
||||||
#define AVR_MOSI_PIN 22
|
#define _PIN_SPI_MOSI 22
|
||||||
#define AVR_SS_PIN 20
|
#define _PIN_SPI_SS 20
|
||||||
#elif defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__)
|
#elif defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__)
|
||||||
#define AVR_SCK_PIN 10
|
#define _PIN_SPI_SCK 10
|
||||||
#define AVR_MISO_PIN 12
|
#define _PIN_SPI_MISO 12
|
||||||
#define AVR_MOSI_PIN 11
|
#define _PIN_SPI_MOSI 11
|
||||||
#define AVR_SS_PIN 16
|
#define _PIN_SPI_SS 16
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef SD_SCK_PIN
|
#ifndef SD_SCK_PIN
|
||||||
#define SD_SCK_PIN AVR_SCK_PIN
|
#define SD_SCK_PIN _PIN_SPI_SCK
|
||||||
#endif
|
#endif
|
||||||
#ifndef SD_MISO_PIN
|
#ifndef SD_MISO_PIN
|
||||||
#define SD_MISO_PIN AVR_MISO_PIN
|
#define SD_MISO_PIN _PIN_SPI_MISO
|
||||||
#endif
|
#endif
|
||||||
#ifndef SD_MOSI_PIN
|
#ifndef SD_MOSI_PIN
|
||||||
#define SD_MOSI_PIN AVR_MOSI_PIN
|
#define SD_MOSI_PIN _PIN_SPI_MOSI
|
||||||
#endif
|
|
||||||
#ifndef SD_SS_PIN
|
|
||||||
#define SD_SS_PIN AVR_SS_PIN
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+10
-10
@@ -28,7 +28,7 @@
|
|||||||
// ------------------------
|
// ------------------------
|
||||||
|
|
||||||
typedef uint16_t hal_timer_t;
|
typedef uint16_t hal_timer_t;
|
||||||
#define HAL_TIMER_TYPE_MAX 0xFFFF
|
#define HAL_TIMER_TYPE_MAX 0xFFFFU
|
||||||
|
|
||||||
// ------------------------
|
// ------------------------
|
||||||
// Defines
|
// Defines
|
||||||
@@ -46,15 +46,15 @@ typedef uint16_t hal_timer_t;
|
|||||||
#define MF_TIMER_TEMP 0
|
#define MF_TIMER_TEMP 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define TEMP_TIMER_FREQUENCY (((F_CPU) + 0x2000) / 0x4000)
|
#define TEMP_TIMER_FREQUENCY (((F_CPU) + 0x2000) / 0x4000)
|
||||||
|
|
||||||
#define STEPPER_TIMER_RATE HAL_TIMER_RATE
|
#define STEPPER_TIMER_RATE HAL_TIMER_RATE
|
||||||
#define STEPPER_TIMER_PRESCALE 8
|
#define STEPPER_TIMER_PRESCALE 8
|
||||||
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000)
|
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000UL)
|
||||||
|
|
||||||
#define PULSE_TIMER_RATE STEPPER_TIMER_RATE
|
#define PULSE_TIMER_RATE STEPPER_TIMER_RATE // (Hz) Frequency of Pulse Timer
|
||||||
#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
|
#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
|
||||||
#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
|
#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
|
||||||
|
|
||||||
#define ENABLE_STEPPER_DRIVER_INTERRUPT() SBI(TIMSK1, OCIE1A)
|
#define ENABLE_STEPPER_DRIVER_INTERRUPT() SBI(TIMSK1, OCIE1A)
|
||||||
#define DISABLE_STEPPER_DRIVER_INTERRUPT() CBI(TIMSK1, OCIE1A)
|
#define DISABLE_STEPPER_DRIVER_INTERRUPT() CBI(TIMSK1, OCIE1A)
|
||||||
@@ -111,8 +111,8 @@ FORCE_INLINE void HAL_timer_start(const uint8_t timer_num, const uint32_t) {
|
|||||||
* (otherwise, characters will be lost due to UART overflow).
|
* (otherwise, characters will be lost due to UART overflow).
|
||||||
* Then: Stepper, Endstops, Temperature, and -finally- all others.
|
* Then: Stepper, Endstops, Temperature, and -finally- all others.
|
||||||
*/
|
*/
|
||||||
#define HAL_timer_isr_prologue(T) NOOP
|
inline void HAL_timer_isr_prologue(const uint8_t) {}
|
||||||
#define HAL_timer_isr_epilogue(T) NOOP
|
inline void HAL_timer_isr_epilogue(const uint8_t) {}
|
||||||
|
|
||||||
#ifndef HAL_STEP_TIMER_ISR
|
#ifndef HAL_STEP_TIMER_ISR
|
||||||
|
|
||||||
|
|||||||
+7
-8
@@ -55,12 +55,12 @@
|
|||||||
|
|
||||||
#if defined(ARDUINO) && !defined(ARDUINO_ARCH_STM32) && !defined(ARDUINO_ARCH_SAM)
|
#if defined(ARDUINO) && !defined(ARDUINO_ARCH_STM32) && !defined(ARDUINO_ARCH_SAM)
|
||||||
|
|
||||||
#include "../../inc/MarlinConfigPre.h"
|
#include "../../../inc/MarlinConfigPre.h"
|
||||||
|
|
||||||
#if HAS_MARLINUI_U8GLIB
|
#if HAS_MARLINUI_U8GLIB
|
||||||
|
|
||||||
#include "../shared/Marduino.h"
|
#include "../../shared/Marduino.h"
|
||||||
#include "../shared/Delay.h"
|
#include "../../shared/Delay.h"
|
||||||
|
|
||||||
#include <U8glib-HAL.h>
|
#include <U8glib-HAL.h>
|
||||||
|
|
||||||
@@ -120,8 +120,7 @@ void u8g_spiSend_sw_AVR_mode_3(uint8_t val) {
|
|||||||
U8G_ATOMIC_END();
|
U8G_ATOMIC_END();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if U8G_SPI_USE_MODE_3
|
||||||
#if ENABLED(FYSETC_MINI_12864)
|
|
||||||
#define SPISEND_SW_AVR u8g_spiSend_sw_AVR_mode_3
|
#define SPISEND_SW_AVR u8g_spiSend_sw_AVR_mode_3
|
||||||
#else
|
#else
|
||||||
#define SPISEND_SW_AVR u8g_spiSend_sw_AVR_mode_0
|
#define SPISEND_SW_AVR u8g_spiSend_sw_AVR_mode_0
|
||||||
@@ -144,9 +143,9 @@ uint8_t u8g_com_HAL_AVR_sw_sp_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case U8G_COM_MSG_CHIP_SELECT:
|
case U8G_COM_MSG_CHIP_SELECT:
|
||||||
#if ENABLED(FYSETC_MINI_12864) // LCD SPI is running mode 3 while SD card is running mode 0
|
#if U8G_SPI_USE_MODE_3 // LCD SPI is running mode 3 while SD card is running mode 0
|
||||||
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
|
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
|
||||||
// the next chip select goes active
|
// the next chip select goes active
|
||||||
u8g_com_arduino_digital_write(u8g, U8G_PI_SCK, 1); // Set SCK to mode 3 idle state before CS goes active
|
u8g_com_arduino_digital_write(u8g, U8G_PI_SCK, 1); // Set SCK to mode 3 idle state before CS goes active
|
||||||
u8g_com_arduino_digital_write(u8g, U8G_PI_CS, LOW);
|
u8g_com_arduino_digital_write(u8g, U8G_PI_CS, LOW);
|
||||||
}
|
}
|
||||||
+15
-11
@@ -27,7 +27,6 @@
|
|||||||
#ifdef ARDUINO_ARCH_SAM
|
#ifdef ARDUINO_ARCH_SAM
|
||||||
|
|
||||||
#include "../../inc/MarlinConfig.h"
|
#include "../../inc/MarlinConfig.h"
|
||||||
#include "../../MarlinCore.h"
|
|
||||||
|
|
||||||
#include <Wire.h>
|
#include <Wire.h>
|
||||||
#include "usb/usb_task.h"
|
#include "usb/usb_task.h"
|
||||||
@@ -48,7 +47,7 @@ uint16_t MarlinHAL::adc_result;
|
|||||||
|
|
||||||
void MarlinHAL::init() {
|
void MarlinHAL::init() {
|
||||||
#if HAS_MEDIA
|
#if HAS_MEDIA
|
||||||
OUT_WRITE(SDSS, HIGH); // Try to set SDSS inactive before any other SPI users start up
|
OUT_WRITE(SD_SS_PIN, HIGH); // Try to set SDSS inactive before any other SPI users start up
|
||||||
#endif
|
#endif
|
||||||
usb_task_init(); // Initialize the USB stack
|
usb_task_init(); // Initialize the USB stack
|
||||||
TERN_(POSTMORTEM_DEBUGGING, install_min_serial()); // Install the min serial handler
|
TERN_(POSTMORTEM_DEBUGGING, install_min_serial()); // Install the min serial handler
|
||||||
@@ -102,6 +101,10 @@ void watchdogSetup() {
|
|||||||
|
|
||||||
#if ENABLED(USE_WATCHDOG)
|
#if ENABLED(USE_WATCHDOG)
|
||||||
|
|
||||||
|
#ifndef WATCHDOG_PIO_RESET
|
||||||
|
#define WATCHDOG_PIO_RESET
|
||||||
|
#endif
|
||||||
|
|
||||||
// 4 seconds timeout
|
// 4 seconds timeout
|
||||||
uint32_t timeout = TERN(WATCHDOG_DURATION_8S, 8000, 4000);
|
uint32_t timeout = TERN(WATCHDOG_DURATION_8S, 8000, 4000);
|
||||||
|
|
||||||
@@ -115,15 +118,16 @@ void watchdogSetup() {
|
|||||||
timeout = 0xFFF;
|
timeout = 0xFFF;
|
||||||
|
|
||||||
// We want to enable the watchdog with the specified timeout
|
// We want to enable the watchdog with the specified timeout
|
||||||
uint32_t value =
|
uint32_t value = (0
|
||||||
WDT_MR_WDV(timeout) | // With the specified timeout
|
| WDT_MR_WDV(timeout) // With the specified timeout
|
||||||
WDT_MR_WDD(timeout) | // and no invalid write window
|
| WDT_MR_WDD(timeout) // and no invalid write window
|
||||||
#if !(SAMV70 || SAMV71 || SAME70 || SAMS70)
|
#if NONE(WATCHDOG_PIO_RESET, SAMV70, SAMV71, SAME70, SAMS70)
|
||||||
WDT_MR_WDRPROC | // WDT fault resets processor only - We want
|
| WDT_MR_WDRPROC // WDT fault resets processor only with this flag.
|
||||||
// to keep PIO controller state
|
// Omit to also reset the PIO controller.
|
||||||
#endif
|
#endif
|
||||||
WDT_MR_WDDBGHLT | // WDT stops in debug state.
|
| WDT_MR_WDDBGHLT // WDT stops in debug state.
|
||||||
WDT_MR_WDIDLEHLT; // WDT stops in idle state.
|
| WDT_MR_WDIDLEHLT // WDT stops in idle state.
|
||||||
|
);
|
||||||
|
|
||||||
#if ENABLED(WATCHDOG_RESET_MANUAL)
|
#if ENABLED(WATCHDOG_RESET_MANUAL)
|
||||||
// We enable the watchdog timer, but only for the interrupt.
|
// We enable the watchdog timer, but only for the interrupt.
|
||||||
|
|||||||
@@ -35,67 +35,9 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include "../../core/serial_hook.h"
|
//
|
||||||
|
// Serial Ports
|
||||||
// ------------------------
|
//
|
||||||
// Serial ports
|
|
||||||
// ------------------------
|
|
||||||
|
|
||||||
typedef ForwardSerial1Class< decltype(Serial) > DefaultSerial1;
|
|
||||||
typedef ForwardSerial1Class< decltype(Serial1) > DefaultSerial2;
|
|
||||||
typedef ForwardSerial1Class< decltype(Serial2) > DefaultSerial3;
|
|
||||||
typedef ForwardSerial1Class< decltype(Serial3) > DefaultSerial4;
|
|
||||||
extern DefaultSerial1 MSerial0;
|
|
||||||
extern DefaultSerial2 MSerial1;
|
|
||||||
extern DefaultSerial3 MSerial2;
|
|
||||||
extern DefaultSerial4 MSerial3;
|
|
||||||
|
|
||||||
#define _MSERIAL(X) MSerial##X
|
|
||||||
#define MSERIAL(X) _MSERIAL(X)
|
|
||||||
|
|
||||||
#if SERIAL_PORT == -1 || ENABLED(EMERGENCY_PARSER)
|
|
||||||
#define MYSERIAL1 customizedSerial1
|
|
||||||
#elif WITHIN(SERIAL_PORT, 0, 3)
|
|
||||||
#define MYSERIAL1 MSERIAL(SERIAL_PORT)
|
|
||||||
#else
|
|
||||||
#error "The required SERIAL_PORT must be from 0 to 3, or -1 for USB Serial."
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef SERIAL_PORT_2
|
|
||||||
#if SERIAL_PORT_2 == -1 || ENABLED(EMERGENCY_PARSER)
|
|
||||||
#define MYSERIAL2 customizedSerial2
|
|
||||||
#elif WITHIN(SERIAL_PORT_2, 0, 3)
|
|
||||||
#define MYSERIAL2 MSERIAL(SERIAL_PORT_2)
|
|
||||||
#else
|
|
||||||
#error "SERIAL_PORT_2 must be from 0 to 3, or -1 for USB Serial."
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef SERIAL_PORT_3
|
|
||||||
#if SERIAL_PORT_3 == -1 || ENABLED(EMERGENCY_PARSER)
|
|
||||||
#define MYSERIAL3 customizedSerial3
|
|
||||||
#elif WITHIN(SERIAL_PORT_3, 0, 3)
|
|
||||||
#define MYSERIAL3 MSERIAL(SERIAL_PORT_3)
|
|
||||||
#else
|
|
||||||
#error "SERIAL_PORT_3 must be from 0 to 3, or -1 for USB Serial."
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef MMU2_SERIAL_PORT
|
|
||||||
#if WITHIN(MMU2_SERIAL_PORT, 0, 3)
|
|
||||||
#define MMU2_SERIAL MSERIAL(MMU2_SERIAL_PORT)
|
|
||||||
#else
|
|
||||||
#error "MMU2_SERIAL_PORT must be from 0 to 3."
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef LCD_SERIAL_PORT
|
|
||||||
#if WITHIN(LCD_SERIAL_PORT, 0, 3)
|
|
||||||
#define LCD_SERIAL MSERIAL(LCD_SERIAL_PORT)
|
|
||||||
#else
|
|
||||||
#error "LCD_SERIAL_PORT must be from 0 to 3."
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "MarlinSerial.h"
|
#include "MarlinSerial.h"
|
||||||
#include "MarlinSerialUSB.h"
|
#include "MarlinSerialUSB.h"
|
||||||
@@ -127,7 +69,7 @@ typedef Servo hal_servo_t;
|
|||||||
#define HAL_ADC_RESOLUTION 10
|
#define HAL_ADC_RESOLUTION 10
|
||||||
|
|
||||||
#ifndef analogInputToDigitalPin
|
#ifndef analogInputToDigitalPin
|
||||||
#define analogInputToDigitalPin(p) ((p < 12U) ? (p) + 54U : -1)
|
#define analogInputToDigitalPin(p) pin_t((p < 12U) ? (p) + 54U : -1)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -190,7 +132,7 @@ public:
|
|||||||
|
|
||||||
static void delay_ms(const int ms) { delay(ms); }
|
static void delay_ms(const int ms) { delay(ms); }
|
||||||
|
|
||||||
// Tasks, called from idle()
|
// Tasks, called from marlin.idle()
|
||||||
static void idletask();
|
static void idletask();
|
||||||
|
|
||||||
// Reset
|
// Reset
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
// Public functions
|
// Public functions
|
||||||
// ------------------------
|
// ------------------------
|
||||||
|
|
||||||
#if ANY(DUE_SOFTWARE_SPI, FORCE_SOFT_SPI)
|
#if ANY(SOFTWARE_SPI, FORCE_SOFT_SPI)
|
||||||
|
|
||||||
// ------------------------
|
// ------------------------
|
||||||
// Software SPI
|
// Software SPI
|
||||||
@@ -208,8 +208,8 @@
|
|||||||
A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
|
A("str %[sck_mask],[%[sck_port],#0x4]") /* CODR */
|
||||||
A("bfi %[bin],%[work],#0,#1") /* Store read bit as the bit 0 */
|
A("bfi %[bin],%[work],#0,#1") /* Store read bit as the bit 0 */
|
||||||
|
|
||||||
: [bin]"+r"(bin),
|
: [bin]"+r"( bin ),
|
||||||
[work]"+r"(work)
|
[work]"+r"( work )
|
||||||
: [bitband_miso_port]"r"( BITBAND_MISO_PORT ),
|
: [bitband_miso_port]"r"( BITBAND_MISO_PORT ),
|
||||||
[sck_mask]"r"( SCK_MASK ),
|
[sck_mask]"r"( SCK_MASK ),
|
||||||
[sck_port]"r"( SCK_PORT_PLUS30 )
|
[sck_port]"r"( SCK_PORT_PLUS30 )
|
||||||
@@ -350,7 +350,7 @@
|
|||||||
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(SD_MISO_PIN))+0x3C, PIN_SHIFT(SD_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(SD_SCK_PIN)) + 0x30; /* SODR of port */
|
||||||
uint32_t SCK_MASK = PIN_MASK(SD_SCK_PIN);
|
uint32_t SCK_MASK = PIN_MASK(SD_SCK_PIN);
|
||||||
|
|
||||||
@@ -412,10 +412,10 @@
|
|||||||
A("strb.w %[bin], [%[ptr]], #1") /* Store read value into buffer, increment buffer pointer */
|
A("strb.w %[bin], [%[ptr]], #1") /* Store read value into buffer, increment buffer pointer */
|
||||||
A("bne.n loop%=") /* Repeat until done */
|
A("bne.n loop%=") /* Repeat until done */
|
||||||
|
|
||||||
: [ptr]"+r"(ptr),
|
: [ptr]"+r"( ptr ),
|
||||||
[todo]"+r"(todo),
|
[todo]"+r"( todo ),
|
||||||
[bin]"+r"(bin),
|
[bin]"+r"( bin ),
|
||||||
[work]"+r"(work)
|
[work]"+r"( work )
|
||||||
: [bitband_miso_port]"r"( BITBAND_MISO_PORT ),
|
: [bitband_miso_port]"r"( BITBAND_MISO_PORT ),
|
||||||
[sck_mask]"r"( SCK_MASK ),
|
[sck_mask]"r"( SCK_MASK ),
|
||||||
[sck_port]"r"( SCK_PORT_PLUS30 )
|
[sck_port]"r"( SCK_PORT_PLUS30 )
|
||||||
@@ -600,9 +600,8 @@
|
|||||||
OUT_WRITE(SPI_EEPROM1_CS_PIN, HIGH);
|
OUT_WRITE(SPI_EEPROM1_CS_PIN, HIGH);
|
||||||
OUT_WRITE(SPI_EEPROM2_CS_PIN, HIGH);
|
OUT_WRITE(SPI_EEPROM2_CS_PIN, HIGH);
|
||||||
OUT_WRITE(SPI_FLASH_CS_PIN, HIGH);
|
OUT_WRITE(SPI_FLASH_CS_PIN, HIGH);
|
||||||
WRITE(SD_SS_PIN, HIGH);
|
OUT_WRITE(SD_SS_PIN, HIGH);
|
||||||
|
WRITE(SD_SS_PIN, LOW);
|
||||||
OUT_WRITE(SDSS, LOW);
|
|
||||||
|
|
||||||
PIO_Configure(
|
PIO_Configure(
|
||||||
g_APinDescription[SPI_PIN].pPort,
|
g_APinDescription[SPI_PIN].pPort,
|
||||||
@@ -767,7 +766,7 @@
|
|||||||
|
|
||||||
// Disable PIO on A26 and A27
|
// Disable PIO on A26 and A27
|
||||||
REG_PIOA_PDR = 0x0C000000;
|
REG_PIOA_PDR = 0x0C000000;
|
||||||
OUT_WRITE(SDSS, HIGH);
|
OUT_WRITE(SD_SS_PIN, HIGH);
|
||||||
|
|
||||||
// Reset SPI0 (from sam lib)
|
// Reset SPI0 (from sam lib)
|
||||||
SPI0->SPI_CR = SPI_CR_SPIDIS;
|
SPI0->SPI_CR = SPI_CR_SPIDIS;
|
||||||
|
|||||||
@@ -31,7 +31,6 @@
|
|||||||
|
|
||||||
#include "MarlinSerial.h"
|
#include "MarlinSerial.h"
|
||||||
#include "InterruptVectors.h"
|
#include "InterruptVectors.h"
|
||||||
#include "../../MarlinCore.h"
|
|
||||||
|
|
||||||
template<typename Cfg> typename MarlinSerial<Cfg>::ring_buffer_r MarlinSerial<Cfg>::rx_buffer = { 0, 0, { 0 } };
|
template<typename Cfg> typename MarlinSerial<Cfg>::ring_buffer_r MarlinSerial<Cfg>::rx_buffer = { 0, 0, { 0 } };
|
||||||
template<typename Cfg> typename MarlinSerial<Cfg>::ring_buffer_t MarlinSerial<Cfg>::tx_buffer = { 0 };
|
template<typename Cfg> typename MarlinSerial<Cfg>::ring_buffer_t MarlinSerial<Cfg>::tx_buffer = { 0 };
|
||||||
@@ -474,7 +473,6 @@ void MarlinSerial<Cfg>::flushTX() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// If not using the USB port as serial port
|
// If not using the USB port as serial port
|
||||||
#if defined(SERIAL_PORT) && SERIAL_PORT >= 0
|
#if defined(SERIAL_PORT) && SERIAL_PORT >= 0
|
||||||
template class MarlinSerial< MarlinSerialCfg<SERIAL_PORT> >;
|
template class MarlinSerial< MarlinSerialCfg<SERIAL_PORT> >;
|
||||||
|
|||||||
@@ -33,6 +33,21 @@
|
|||||||
#include "../../core/types.h"
|
#include "../../core/types.h"
|
||||||
#include "../../core/serial_hook.h"
|
#include "../../core/serial_hook.h"
|
||||||
|
|
||||||
|
typedef ForwardSerial1Class< decltype(Serial) > DefaultSerial1;
|
||||||
|
typedef ForwardSerial1Class< decltype(Serial1) > DefaultSerial2;
|
||||||
|
typedef ForwardSerial1Class< decltype(Serial2) > DefaultSerial3;
|
||||||
|
typedef ForwardSerial1Class< decltype(Serial3) > DefaultSerial4;
|
||||||
|
extern DefaultSerial1 MSerial0;
|
||||||
|
extern DefaultSerial2 MSerial1;
|
||||||
|
extern DefaultSerial3 MSerial2;
|
||||||
|
extern DefaultSerial4 MSerial3;
|
||||||
|
|
||||||
|
#define SERIAL_INDEX_MIN 0
|
||||||
|
#define SERIAL_INDEX_MAX 3
|
||||||
|
#define EP_SERIAL_PORT(N) customizedSerial##N
|
||||||
|
#define USB_SERIAL_PORT(N) customizedSerial##N
|
||||||
|
#include "../shared/serial_ports.h"
|
||||||
|
|
||||||
// Define constants and variables for buffering incoming serial data. We're
|
// 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
|
||||||
// location to which to write the next incoming character and rx_buffer_tail
|
// location to which to write the next incoming character and rx_buffer_tail
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
static Flags<_Nbr_16timers> DisablePending; // ISR should disable the timer at the next timer reset
|
static Flags<_Nbr_16timers> DisablePending; // ISR should disable the timer at the next timer reset
|
||||||
|
|
||||||
// ------------------------
|
// ------------------------
|
||||||
/// Interrupt handler for the TC0 channel 1.
|
// Interrupt handler for the TC0 channel 1.
|
||||||
// ------------------------
|
// ------------------------
|
||||||
void Servo_Handler(const timer16_Sequence_t, Tc*, const uint8_t);
|
void Servo_Handler(const timer16_Sequence_t, Tc*, const uint8_t);
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
*/
|
*/
|
||||||
#ifdef ARDUINO_ARCH_SAM
|
#ifdef ARDUINO_ARCH_SAM
|
||||||
|
|
||||||
#include "../../inc/MarlinConfig.h"
|
#include "../../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
#if ENABLED(FLASH_EEPROM_EMULATION)
|
#if ENABLED(FLASH_EEPROM_EMULATION)
|
||||||
|
|
||||||
@@ -132,7 +132,7 @@ static uint8_t buffer[256] = {0}, // The RAM buffer to accumulate writes
|
|||||||
curGroup = 0xFF; // Current FLASH group
|
curGroup = 0xFF; // Current FLASH group
|
||||||
|
|
||||||
#define DEBUG_OUT ENABLED(EE_EMU_DEBUG)
|
#define DEBUG_OUT ENABLED(EE_EMU_DEBUG)
|
||||||
#include "../../core/debug_out.h"
|
#include "../../../core/debug_out.h"
|
||||||
|
|
||||||
static void ee_Dump(const int page, const void *data) {
|
static void ee_Dump(const int page, const void *data) {
|
||||||
|
|
||||||
@@ -291,7 +291,7 @@ static bool ee_PageWrite(uint16_t page, const void *data) {
|
|||||||
uint32_t *p1 = (uint32_t*)addrflash;
|
uint32_t *p1 = (uint32_t*)addrflash;
|
||||||
uint32_t *p2 = (uint32_t*)data;
|
uint32_t *p2 = (uint32_t*)data;
|
||||||
int count = 0;
|
int count = 0;
|
||||||
for (i =0; i<PageSize >> 2; i++) {
|
for (i = 0; i < PageSize >> 2; i++) {
|
||||||
if (p1[i] != p2[i]) {
|
if (p1[i] != p2[i]) {
|
||||||
uint32_t delta = p1[i] ^ p2[i];
|
uint32_t delta = p1[i] ^ p2[i];
|
||||||
while (delta) {
|
while (delta) {
|
||||||
@@ -953,19 +953,19 @@ static void ee_Init() {
|
|||||||
|
|
||||||
/* PersistentStore -----------------------------------------------------------*/
|
/* PersistentStore -----------------------------------------------------------*/
|
||||||
|
|
||||||
#include "../shared/eeprom_api.h"
|
#include "../../shared/eeprom_api.h"
|
||||||
|
|
||||||
#ifndef MARLIN_EEPROM_SIZE
|
#ifndef MARLIN_EEPROM_SIZE
|
||||||
#define MARLIN_EEPROM_SIZE 0x1000 // 4KB
|
#define MARLIN_EEPROM_SIZE 0x1000 // 4KB
|
||||||
#endif
|
#endif
|
||||||
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; }
|
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; }
|
||||||
bool PersistentStore::access_start() { ee_Init(); return true; }
|
bool PersistentStore::access_start() { ee_Init(); return true; }
|
||||||
bool PersistentStore::access_finish() { ee_Flush(); 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) {
|
bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
|
||||||
uint16_t written = 0;
|
uint16_t written = 0;
|
||||||
while (size--) {
|
while (size--) {
|
||||||
uint8_t * const p = (uint8_t * const)pos;
|
uint8_t * const p = (uint8_t * const)REAL_EEPROM_ADDR(pos);
|
||||||
uint8_t v = *value;
|
uint8_t v = *value;
|
||||||
if (v != ee_Read(uint32_t(p))) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed!
|
if (v != ee_Read(uint32_t(p))) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed!
|
||||||
ee_Write(uint32_t(p), v);
|
ee_Write(uint32_t(p), v);
|
||||||
@@ -984,7 +984,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
|
|||||||
|
|
||||||
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 = ee_Read(uint32_t(pos));
|
uint8_t c = ee_Read(uint32_t(REAL_EEPROM_ADDR(pos)));
|
||||||
if (writing) *value = c;
|
if (writing) *value = c;
|
||||||
crc16(crc, &c, 1);
|
crc16(crc, &c, 1);
|
||||||
pos++;
|
pos++;
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
*/
|
*/
|
||||||
#ifdef ARDUINO_ARCH_SAM
|
#ifdef ARDUINO_ARCH_SAM
|
||||||
|
|
||||||
#include "../../inc/MarlinConfig.h"
|
#include "../../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
#if USE_WIRED_EEPROM
|
#if USE_WIRED_EEPROM
|
||||||
|
|
||||||
@@ -30,20 +30,20 @@
|
|||||||
* with simple implementations supplied by Marlin.
|
* with simple implementations supplied by Marlin.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../shared/eeprom_if.h"
|
#include "../../shared/eeprom_if.h"
|
||||||
#include "../shared/eeprom_api.h"
|
#include "../../shared/eeprom_api.h"
|
||||||
|
|
||||||
#ifndef MARLIN_EEPROM_SIZE
|
#ifndef MARLIN_EEPROM_SIZE
|
||||||
#error "MARLIN_EEPROM_SIZE is required for I2C / SPI EEPROM."
|
#error "MARLIN_EEPROM_SIZE is required for I2C / SPI EEPROM."
|
||||||
#endif
|
#endif
|
||||||
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; }
|
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; }
|
||||||
bool PersistentStore::access_start() { eeprom_init(); return true; }
|
bool PersistentStore::access_start() { eeprom_init(); 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) {
|
||||||
uint16_t written = 0;
|
uint16_t written = 0;
|
||||||
while (size--) {
|
while (size--) {
|
||||||
uint8_t * const p = (uint8_t * const)pos;
|
uint8_t * const p = (uint8_t * const)REAL_EEPROM_ADDR(pos);
|
||||||
uint8_t v = *value;
|
uint8_t v = *value;
|
||||||
if (v != eeprom_read_byte(p)) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed!
|
if (v != eeprom_read_byte(p)) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed!
|
||||||
eeprom_write_byte(p, v);
|
eeprom_write_byte(p, v);
|
||||||
@@ -62,7 +62,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
|
|||||||
|
|
||||||
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);
|
const uint8_t c = eeprom_read_byte((uint8_t*)REAL_EEPROM_ADDR(pos));
|
||||||
if (writing) *value = c;
|
if (writing) *value = c;
|
||||||
crc16(crc, &c, 1);
|
crc16(crc, &c, 1);
|
||||||
pos++;
|
pos++;
|
||||||
@@ -64,6 +64,7 @@ void setup_endstop_interrupts() {
|
|||||||
TERN_(USE_Z4_MAX, _ATTACH(Z4_MAX_PIN));
|
TERN_(USE_Z4_MAX, _ATTACH(Z4_MAX_PIN));
|
||||||
TERN_(USE_Z4_MIN, _ATTACH(Z4_MIN_PIN));
|
TERN_(USE_Z4_MIN, _ATTACH(Z4_MIN_PIN));
|
||||||
TERN_(USE_Z_MIN_PROBE, _ATTACH(Z_MIN_PROBE_PIN));
|
TERN_(USE_Z_MIN_PROBE, _ATTACH(Z_MIN_PROBE_PIN));
|
||||||
|
TERN_(USE_CALIBRATION, _ATTACH(CALIBRATION_PIN));
|
||||||
TERN_(USE_I_MAX, _ATTACH(I_MAX_PIN));
|
TERN_(USE_I_MAX, _ATTACH(I_MAX_PIN));
|
||||||
TERN_(USE_I_MIN, _ATTACH(I_MIN_PIN));
|
TERN_(USE_I_MIN, _ATTACH(I_MIN_PIN));
|
||||||
TERN_(USE_J_MAX, _ATTACH(J_MAX_PIN));
|
TERN_(USE_J_MAX, _ATTACH(J_MAX_PIN));
|
||||||
|
|||||||
@@ -40,11 +40,12 @@
|
|||||||
* Some jitter in the Vref signal is OK so the interrupt priority is left at its default value.
|
* Some jitter in the Vref signal is OK so the interrupt priority is left at its default value.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../../../inc/MarlinConfig.h"
|
#include "../../../inc/MarlinConfigPre.h"
|
||||||
|
|
||||||
#if MB(PRINTRBOARD_G2)
|
#if MB(PRINTRBOARD_G2)
|
||||||
|
|
||||||
#include "G2_PWM.h"
|
#include "G2_PWM.h"
|
||||||
|
#include "../../../module/stepper.h"
|
||||||
|
|
||||||
#if PIN_EXISTS(MOTOR_CURRENT_PWM_X)
|
#if PIN_EXISTS(MOTOR_CURRENT_PWM_X)
|
||||||
#define G2_PWM_X 1
|
#define G2_PWM_X 1
|
||||||
@@ -56,16 +57,12 @@
|
|||||||
#else
|
#else
|
||||||
#define G2_PWM_Y 0
|
#define G2_PWM_Y 0
|
||||||
#endif
|
#endif
|
||||||
#if PIN_EXISTS(MOTOR_CURRENT_PWM_Z)
|
#if HAS_MOTOR_CURRENT_PWM_Z
|
||||||
#define G2_PWM_Z 1
|
#define G2_PWM_Z 1
|
||||||
#else
|
#else
|
||||||
#define G2_PWM_Z 0
|
#define G2_PWM_Z 0
|
||||||
#endif
|
#endif
|
||||||
#if PIN_EXISTS(MOTOR_CURRENT_PWM_E)
|
#define G2_PWM_E HAS_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_X(V) (G2_PWM_X * (V))
|
||||||
#define G2_MASK_Y(V) (G2_PWM_Y * (V))
|
#define G2_MASK_Y(V) (G2_PWM_Y * (V))
|
||||||
#define G2_MASK_Z(V) (G2_PWM_Z * (V))
|
#define G2_MASK_Z(V) (G2_PWM_Z * (V))
|
||||||
@@ -80,17 +77,22 @@ PWM_map ISR_table[NUM_PWMS] = PWM_MAP_INIT;
|
|||||||
|
|
||||||
void Stepper::digipot_init() {
|
void Stepper::digipot_init() {
|
||||||
|
|
||||||
#if PIN_EXISTS(MOTOR_CURRENT_PWM_X)
|
#if G2_PWM_X
|
||||||
OUT_WRITE(MOTOR_CURRENT_PWM_X_PIN, 0); // init pins
|
OUT_WRITE(MOTOR_CURRENT_PWM_X_PIN, LOW); // init pins
|
||||||
#endif
|
#endif
|
||||||
#if PIN_EXISTS(MOTOR_CURRENT_PWM_Y)
|
#if G2_PWM_Y
|
||||||
OUT_WRITE(MOTOR_CURRENT_PWM_Y_PIN, 0);
|
OUT_WRITE(MOTOR_CURRENT_PWM_Y_PIN, LOW);
|
||||||
#endif
|
#endif
|
||||||
#if G2_PWM_Z
|
#if G2_PWM_Z
|
||||||
OUT_WRITE(MOTOR_CURRENT_PWM_Z_PIN, 0);
|
OUT_WRITE(MOTOR_CURRENT_PWM_Z_PIN, LOW);
|
||||||
#endif
|
#endif
|
||||||
#if G2_PWM_E
|
#if G2_PWM_E
|
||||||
OUT_WRITE(MOTOR_CURRENT_PWM_E_PIN, 0);
|
#if PIN_EXISTS(MOTOR_CURRENT_PWM_E)
|
||||||
|
OUT_WRITE(MOTOR_CURRENT_PWM_E_PIN, LOW);
|
||||||
|
#endif
|
||||||
|
#if PIN_EXISTS(MOTOR_CURRENT_PWM_E0)
|
||||||
|
OUT_WRITE(MOTOR_CURRENT_PWM_E0_PIN, LOW);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define WPKEY (0x50574D << 8) // “PWM” in ASCII
|
#define WPKEY (0x50574D << 8) // “PWM” in ASCII
|
||||||
|
|||||||
@@ -26,10 +26,7 @@
|
|||||||
* PR #7500. It is hardwired for the PRINTRBOARD_G2 Motor Current needs.
|
* PR #7500. It is hardwired for the PRINTRBOARD_G2 Motor Current needs.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../../../inc/MarlinConfigPre.h"
|
#include <stdint.h>
|
||||||
#include "../../../module/stepper.h"
|
|
||||||
//C:\Users\bobku\Documents\GitHub\Marlin-Bob-2\Marlin\src\module\stepper.h
|
|
||||||
//C:\Users\bobku\Documents\GitHub\Marlin-Bob-2\Marlin\src\HAL\HAL_DUE\G2_PWM.h
|
|
||||||
|
|
||||||
#define PWM_PERIOD_US 100 // base repetition rate in micro seconds
|
#define PWM_PERIOD_US 100 // base repetition rate in micro seconds
|
||||||
|
|
||||||
@@ -49,7 +46,6 @@ extern volatile uint32_t *SODR_A, *SODR_B, *CODR_A, *CODR_B;
|
|||||||
|
|
||||||
#define PWM_MAP_INIT_ROW(IO,ZZ) { ZZ == 'A' ? SODR_A : SODR_B, ZZ == 'A' ? CODR_A : CODR_B, 1 << _PIN(IO) }
|
#define PWM_MAP_INIT_ROW(IO,ZZ) { ZZ == 'A' ? SODR_A : SODR_B, ZZ == 'A' ? CODR_A : CODR_B, 1 << _PIN(IO) }
|
||||||
|
|
||||||
|
|
||||||
#define PWM_MAP_INIT { PWM_MAP_INIT_ROW(MOTOR_CURRENT_PWM_X_PIN, 'B'), \
|
#define PWM_MAP_INIT { PWM_MAP_INIT_ROW(MOTOR_CURRENT_PWM_X_PIN, 'B'), \
|
||||||
PWM_MAP_INIT_ROW(MOTOR_CURRENT_PWM_Y_PIN, 'B'), \
|
PWM_MAP_INIT_ROW(MOTOR_CURRENT_PWM_Y_PIN, 'B'), \
|
||||||
PWM_MAP_INIT_ROW(MOTOR_CURRENT_PWM_Z_PIN, 'B'), \
|
PWM_MAP_INIT_ROW(MOTOR_CURRENT_PWM_Z_PIN, 'B'), \
|
||||||
|
|||||||
@@ -168,7 +168,6 @@ const G2_PinDescription G2_g_APinDescription[] = {
|
|||||||
{ PIOB, PIO_PB21, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 52
|
{ PIOB, PIO_PB21, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 52
|
||||||
{ PIOB, PIO_PB14, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 53
|
{ PIOB, PIO_PB14, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 53
|
||||||
|
|
||||||
|
|
||||||
// 54 .. 65 - Analog pins
|
// 54 .. 65 - Analog pins
|
||||||
// ----------------------
|
// ----------------------
|
||||||
{ PIOA, PIO_PA16X1_AD7, ID_PIOA, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC0, ADC7, NOT_ON_PWM, NOT_ON_TIMER }, // AD0
|
{ PIOA, PIO_PA16X1_AD7, ID_PIOA, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC0, ADC7, NOT_ON_PWM, NOT_ON_TIMER }, // AD0
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2024 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
@@ -68,16 +68,15 @@
|
|||||||
* Usually the hardware SPI pins are only available to the LCD. This makes the DUE hard SPI used at the same time
|
* 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_SPI_##P) && (TMC_SPI_##P == SD_MOSI_PIN || TMC_SPI_##P == SD_MISO_PIN || TMC_SPI_##P == SD_SCK_PIN))
|
|
||||||
|
|
||||||
#if HAS_MEDIA && HAS_DRIVER(TMC2130)
|
#if HAS_MEDIA && HAS_DRIVER(TMC2130)
|
||||||
#if ENABLED(TMC_USE_SW_SPI)
|
#define _IS_HW_SPI(P) (defined(TMC_SPI_##P) && (TMC_SPI_##P == SD_MOSI_PIN || TMC_SPI_##P == SD_MISO_PIN || TMC_SPI_##P == SD_SCK_PIN))
|
||||||
#if DISABLED(DUE_SOFTWARE_SPI) && (_IS_HW_SPI(MOSI) || _IS_HW_SPI(MISO) || _IS_HW_SPI(SCK))
|
#if DISABLED(SOFTWARE_SPI) && ENABLED(TMC_USE_SW_SPI) && (_IS_HW_SPI(MOSI) || _IS_HW_SPI(MISO) || _IS_HW_SPI(SCK))
|
||||||
#error "DUE hardware SPI is required but is incompatible with TMC2130 software SPI. Either disable TMC_USE_SW_SPI or use separate pins for the two SPIs."
|
#error "DUE hardware SPI is required but is incompatible with TMC2130 software SPI. Either disable TMC_USE_SW_SPI or use separate pins for the two SPIs."
|
||||||
#endif
|
#endif
|
||||||
#elif ENABLED(DUE_SOFTWARE_SPI)
|
#if ENABLED(SOFTWARE_SPI) && DISABLED(TMC_USE_SW_SPI)
|
||||||
#error "DUE software SPI is required but is incompatible with TMC2130 hardware SPI. Enable TMC_USE_SW_SPI to fix."
|
#error "DUE software SPI is required but is incompatible with TMC2130 hardware SPI. Enable TMC_USE_SW_SPI to fix."
|
||||||
#endif
|
#endif
|
||||||
|
#undef _IS_HW_SPI
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY
|
#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY
|
||||||
|
|||||||
@@ -19,13 +19,26 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Support routines for Due
|
* Pins Debugging for DUE
|
||||||
*/
|
*
|
||||||
|
* - NUMBER_PINS_TOTAL
|
||||||
/**
|
* - MULTI_NAME_PAD
|
||||||
* Translation of routines & variables used by pinsDebug.h
|
* - getPinByIndex(index)
|
||||||
|
* - printPinNameByIndex(index)
|
||||||
|
* - getPinIsDigitalByIndex(index)
|
||||||
|
* - digitalPinToAnalogIndex(pin)
|
||||||
|
* - getValidPinMode(pin)
|
||||||
|
* - isValidPin(pin)
|
||||||
|
* - isAnalogPin(pin)
|
||||||
|
* - digitalRead_mod(pin)
|
||||||
|
* - pwm_status(pin)
|
||||||
|
* - printPinPWM(pin)
|
||||||
|
* - printPinPort(pin)
|
||||||
|
* - printPinNumber(pin)
|
||||||
|
* - printPinAnalog(pin)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../shared/Marduino.h"
|
#include "../shared/Marduino.h"
|
||||||
@@ -63,20 +76,20 @@
|
|||||||
|
|
||||||
#define NUMBER_PINS_TOTAL PINS_COUNT
|
#define NUMBER_PINS_TOTAL PINS_COUNT
|
||||||
|
|
||||||
#define digitalRead_mod(p) extDigitalRead(p) // AVR digitalRead disabled PWM before it read the pin
|
#define digitalRead_mod(P) extDigitalRead(P) // AVR digitalRead disabled PWM before it read the pin
|
||||||
#define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
|
#define printPinNameByIndex(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
|
||||||
#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%02d"), p); SERIAL_ECHO(buffer); }while(0)
|
#define printPinNumber(P) do{ sprintf_P(buffer, PSTR("%02d"), P); SERIAL_ECHO(buffer); }while(0)
|
||||||
#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0)
|
#define printPinAnalog(P) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(P)); SERIAL_ECHO(buffer); }while(0)
|
||||||
#define GET_ARRAY_PIN(p) pin_array[p].pin
|
#define getPinByIndex(x) pin_array[x].pin
|
||||||
#define GET_ARRAY_IS_DIGITAL(p) pin_array[p].is_digital
|
#define getPinIsDigitalByIndex(x) pin_array[x].is_digital
|
||||||
#define VALID_PIN(pin) (pin >= 0 && pin < int8_t(NUMBER_PINS_TOTAL))
|
#define isValidPin(P) (P >= 0 && P < pin_t(NUMBER_PINS_TOTAL))
|
||||||
#define DIGITAL_PIN_TO_ANALOG_PIN(p) int(p - analogInputToDigitalPin(0))
|
#define digitalPinToAnalogIndex(P) int(P - analogInputToDigitalPin(0))
|
||||||
#define IS_ANALOG(P) WITHIN(P, char(analogInputToDigitalPin(0)), char(analogInputToDigitalPin(NUM_ANALOG_INPUTS - 1)))
|
#define isAnalogPin(P) WITHIN(P, pin_t(analogInputToDigitalPin(0)), pin_t(analogInputToDigitalPin(NUM_ANALOG_INPUTS - 1)))
|
||||||
#define pwm_status(pin) (((g_pinStatus[pin] & 0xF) == PIN_STATUS_PWM) && \
|
#define pwm_status(P) (((g_pinStatus[P] & 0xF) == PIN_STATUS_PWM) && \
|
||||||
((g_APinDescription[pin].ulPinAttribute & PIN_ATTR_PWM) == PIN_ATTR_PWM))
|
((g_APinDescription[P].ulPinAttribute & PIN_ATTR_PWM) == PIN_ATTR_PWM))
|
||||||
#define MULTI_NAME_PAD 14 // space needed to be pretty if not first name assigned to a pin
|
#define MULTI_NAME_PAD 14 // space needed to be pretty if not first name assigned to a pin
|
||||||
|
|
||||||
bool GET_PINMODE(int8_t pin) { // 1: output, 0: input
|
bool getValidPinMode(const pin_t pin) { // 1: output, 0: input
|
||||||
volatile Pio* port = g_APinDescription[pin].pPort;
|
volatile Pio* port = g_APinDescription[pin].pPort;
|
||||||
uint32_t mask = g_APinDescription[pin].ulPin;
|
uint32_t mask = g_APinDescription[pin].ulPin;
|
||||||
uint8_t pin_status = g_pinStatus[pin] & 0xF;
|
uint8_t pin_status = g_pinStatus[pin] & 0xF;
|
||||||
@@ -85,14 +98,14 @@ bool GET_PINMODE(int8_t pin) { // 1: output, 0: input
|
|||||||
|| pwm_status(pin));
|
|| pwm_status(pin));
|
||||||
}
|
}
|
||||||
|
|
||||||
void pwm_details(int32_t pin) {
|
void printPinPWM(const int32_t pin) {
|
||||||
if (pwm_status(pin)) {
|
if (pwm_status(pin)) {
|
||||||
uint32_t chan = g_APinDescription[pin].ulPWMChannel;
|
uint32_t chan = g_APinDescription[pin].ulPWMChannel;
|
||||||
SERIAL_ECHOPGM("PWM = ", PWM_INTERFACE->PWM_CH_NUM[chan].PWM_CDTY);
|
SERIAL_ECHOPGM("PWM = ", PWM_INTERFACE->PWM_CH_NUM[chan].PWM_CDTY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void print_port(const pin_t) {}
|
void printPinPort(const pin_t) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DUE Board pin | PORT | Label
|
* DUE Board pin | PORT | Label
|
||||||
|
|||||||
@@ -24,41 +24,38 @@
|
|||||||
/**
|
/**
|
||||||
* Define SPI Pins: SCK, MISO, MOSI, SS
|
* Define SPI Pins: SCK, MISO, MOSI, SS
|
||||||
*
|
*
|
||||||
* Available chip select pins for HW SPI are 4 10 52 77
|
* Available chip select pins for HW SPI are 4 10 52 77 87
|
||||||
*/
|
*/
|
||||||
#if SDSS == 4 || SDSS == 10 || SDSS == 52 || SDSS == 77 || SDSS == 87
|
#if SD_SS_PIN == 4 || SD_SS_PIN == 10 || SD_SS_PIN == 52 || SD_SS_PIN == 77 || SD_SS_PIN == 87
|
||||||
#if SDSS == 4
|
#define SD_SCK_PIN 76
|
||||||
#define SPI_PIN 87
|
#define SD_MISO_PIN 74
|
||||||
#define SPI_CHAN 1
|
#define SD_MOSI_PIN 75
|
||||||
#elif SDSS == 10
|
|
||||||
#define SPI_PIN 77
|
|
||||||
#define SPI_CHAN 0
|
|
||||||
#elif SDSS == 52
|
|
||||||
#define SPI_PIN 86
|
|
||||||
#define SPI_CHAN 2
|
|
||||||
#elif SDSS == 77
|
|
||||||
#define SPI_PIN 77
|
|
||||||
#define SPI_CHAN 0
|
|
||||||
#else
|
|
||||||
#define SPI_PIN 87
|
|
||||||
#define SPI_CHAN 1
|
|
||||||
#endif
|
|
||||||
#define SD_SCK_PIN 76
|
|
||||||
#define SD_MISO_PIN 74
|
|
||||||
#define SD_MOSI_PIN 75
|
|
||||||
#else
|
|
||||||
// defaults
|
|
||||||
#define DUE_SOFTWARE_SPI
|
|
||||||
#ifndef SD_SCK_PIN
|
|
||||||
#define SD_SCK_PIN 52
|
|
||||||
#endif
|
|
||||||
#ifndef SD_MISO_PIN
|
|
||||||
#define SD_MISO_PIN 50
|
|
||||||
#endif
|
|
||||||
#ifndef SD_MOSI_PIN
|
|
||||||
#define SD_MOSI_PIN 51
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* A.28, A.29, B.21, C.26, C.29 */
|
#if SD_SS_PIN == 4
|
||||||
#define SD_SS_PIN SDSS
|
#define SPI_PIN 87
|
||||||
|
#define SPI_CHAN 1
|
||||||
|
#elif SD_SS_PIN == 10
|
||||||
|
#define SPI_PIN 77
|
||||||
|
#define SPI_CHAN 0
|
||||||
|
#elif SD_SS_PIN == 52
|
||||||
|
#define SPI_PIN 86
|
||||||
|
#define SPI_CHAN 2
|
||||||
|
#elif SD_SS_PIN == 77
|
||||||
|
#define SPI_PIN 77
|
||||||
|
#define SPI_CHAN 0
|
||||||
|
#elif SD_SS_PIN == 87
|
||||||
|
#define SPI_PIN 87
|
||||||
|
#define SPI_CHAN 1
|
||||||
|
#else
|
||||||
|
#define SOFTWARE_SPI
|
||||||
|
#ifndef SD_SCK_PIN
|
||||||
|
#define SD_SCK_PIN 52
|
||||||
|
#endif
|
||||||
|
#ifndef SD_MISO_PIN
|
||||||
|
#define SD_MISO_PIN 50
|
||||||
|
#endif
|
||||||
|
#ifndef SD_MOSI_PIN
|
||||||
|
#define SD_MOSI_PIN 51
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
#define FORCE_INLINE __attribute__((always_inline)) inline
|
#define FORCE_INLINE __attribute__((always_inline)) inline
|
||||||
|
|
||||||
typedef uint32_t hal_timer_t;
|
typedef uint32_t hal_timer_t;
|
||||||
#define HAL_TIMER_TYPE_MAX 0xFFFFFFFF
|
#define HAL_TIMER_TYPE_MAX 0xFFFFFFFFUL
|
||||||
|
|
||||||
#define HAL_TIMER_PRESCALER 2
|
#define HAL_TIMER_PRESCALER 2
|
||||||
#define HAL_TIMER_RATE ((F_CPU) / (HAL_TIMER_PRESCALER)) // frequency of timers peripherals
|
#define HAL_TIMER_RATE ((F_CPU) / (HAL_TIMER_PRESCALER)) // frequency of timers peripherals
|
||||||
@@ -52,19 +52,19 @@ typedef uint32_t hal_timer_t;
|
|||||||
#define MF_TIMER_TONE 6 // index of timer to use for beeper tones
|
#define MF_TIMER_TONE 6 // index of timer to use for beeper tones
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define TEMP_TIMER_FREQUENCY 1000 // temperature interrupt frequency
|
#define TEMP_TIMER_FREQUENCY 1000 // (Hz) Temperature ISR frequency
|
||||||
|
|
||||||
#define STEPPER_TIMER_RATE HAL_TIMER_RATE // frequency of stepper timer (HAL_TIMER_RATE / STEPPER_TIMER_PRESCALE)
|
#define STEPPER_TIMER_RATE HAL_TIMER_RATE // (Hz) Frequency of Stepper Timer ISR (HAL_TIMER_RATE / STEPPER_TIMER_PRESCALE)
|
||||||
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) // stepper timer ticks per µs
|
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000UL) // (MHz) Stepper Timer ticks per µs
|
||||||
#define STEPPER_TIMER_PRESCALE (CYCLES_PER_MICROSECOND / STEPPER_TIMER_TICKS_PER_US)
|
#define STEPPER_TIMER_PRESCALE (CYCLES_PER_MICROSECOND / STEPPER_TIMER_TICKS_PER_US)
|
||||||
|
|
||||||
#define PULSE_TIMER_RATE STEPPER_TIMER_RATE // frequency of pulse timer
|
#define PULSE_TIMER_RATE STEPPER_TIMER_RATE // (Hz) Frequency of Pulse Timer
|
||||||
#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
|
|
||||||
#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
|
#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
|
||||||
|
#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
|
||||||
|
|
||||||
#define ENABLE_STEPPER_DRIVER_INTERRUPT() HAL_timer_enable_interrupt(MF_TIMER_STEP)
|
#define ENABLE_STEPPER_DRIVER_INTERRUPT() HAL_timer_enable_interrupt(MF_TIMER_STEP)
|
||||||
#define DISABLE_STEPPER_DRIVER_INTERRUPT() HAL_timer_disable_interrupt(MF_TIMER_STEP)
|
#define DISABLE_STEPPER_DRIVER_INTERRUPT() HAL_timer_disable_interrupt(MF_TIMER_STEP)
|
||||||
#define STEPPER_ISR_ENABLED() HAL_timer_interrupt_enabled(MF_TIMER_STEP)
|
#define STEPPER_ISR_ENABLED() HAL_timer_interrupt_enabled(MF_TIMER_STEP)
|
||||||
|
|
||||||
#define ENABLE_TEMPERATURE_INTERRUPT() HAL_timer_enable_interrupt(MF_TIMER_TEMP)
|
#define ENABLE_TEMPERATURE_INTERRUPT() HAL_timer_enable_interrupt(MF_TIMER_TEMP)
|
||||||
#define DISABLE_TEMPERATURE_INTERRUPT() HAL_timer_disable_interrupt(MF_TIMER_TEMP)
|
#define DISABLE_TEMPERATURE_INTERRUPT() HAL_timer_disable_interrupt(MF_TIMER_TEMP)
|
||||||
@@ -127,4 +127,4 @@ FORCE_INLINE static void HAL_timer_isr_prologue(const uint8_t timer_num) {
|
|||||||
pConfig->pTimerRegs->TC_CHANNEL[pConfig->channel].TC_SR;
|
pConfig->pTimerRegs->TC_CHANNEL[pConfig->channel].TC_SR;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define HAL_timer_isr_epilogue(T) NOOP
|
inline void HAL_timer_isr_epilogue(const uint8_t) {}
|
||||||
|
|||||||
@@ -66,7 +66,7 @@
|
|||||||
|
|
||||||
#include <U8glib-HAL.h>
|
#include <U8glib-HAL.h>
|
||||||
|
|
||||||
#if ENABLED(FYSETC_MINI_12864)
|
#if U8G_SPI_USE_MODE_3
|
||||||
#define SPISEND_SW_DUE u8g_spiSend_sw_DUE_mode_3
|
#define SPISEND_SW_DUE u8g_spiSend_sw_DUE_mode_3
|
||||||
#else
|
#else
|
||||||
#define SPISEND_SW_DUE u8g_spiSend_sw_DUE_mode_0
|
#define SPISEND_SW_DUE u8g_spiSend_sw_DUE_mode_0
|
||||||
@@ -96,15 +96,15 @@ uint8_t u8g_com_HAL_DUE_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case U8G_COM_MSG_CHIP_SELECT:
|
case U8G_COM_MSG_CHIP_SELECT:
|
||||||
#if ENABLED(FYSETC_MINI_12864) // LCD SPI is running mode 3 while SD card is running mode 0
|
#if U8G_SPI_USE_MODE_3 // LCD SPI is running mode 3 while SD card is running mode 0
|
||||||
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
|
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
|
||||||
// the next chip select goes active
|
// the next chip select goes active
|
||||||
u8g_SetPILevel_DUE(u8g, U8G_PI_SCK, 1); //set SCK to mode 3 idle state before CS goes active
|
u8g_SetPILevel_DUE(u8g, U8G_PI_SCK, 1); // Set SCK to mode 3 idle state before CS goes active
|
||||||
u8g_SetPILevel_DUE(u8g, U8G_PI_CS, LOW);
|
u8g_SetPILevel_DUE(u8g, U8G_PI_CS, LOW);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
u8g_SetPILevel_DUE(u8g, U8G_PI_CS, HIGH);
|
u8g_SetPILevel_DUE(u8g, U8G_PI_CS, HIGH);
|
||||||
u8g_SetPILevel_DUE(u8g, U8G_PI_SCK, 0); //set SCK to mode 0 idle state after CS goes inactive
|
u8g_SetPILevel_DUE(u8g, U8G_PI_SCK, 0); // Set SCK to mode 0 idle state after CS goes inactive
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
u8g_SetPILevel_DUE(u8g, U8G_PI_CS, !arg_val);
|
u8g_SetPILevel_DUE(u8g, U8G_PI_CS, !arg_val);
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ if pioutil.is_pio_build():
|
|||||||
|
|
||||||
if current_OS == 'Windows':
|
if current_OS == 'Windows':
|
||||||
|
|
||||||
Import("env")
|
env = pioutil.env
|
||||||
|
|
||||||
# Use bossac.exe on Windows
|
# Use bossac.exe on Windows
|
||||||
env.Replace(
|
env.Replace(
|
||||||
|
|||||||
@@ -142,7 +142,6 @@
|
|||||||
*/
|
*/
|
||||||
#define COMPILER_PACK_RESET() COMPILER_PRAGMA(pack())
|
#define COMPILER_PACK_RESET() COMPILER_PRAGMA(pack())
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Set aligned boundary.
|
* \brief Set aligned boundary.
|
||||||
*/
|
*/
|
||||||
@@ -283,7 +282,6 @@ typedef double F64; //!< 64-bit floating-point number.
|
|||||||
typedef uint32_t iram_size_t;
|
typedef uint32_t iram_size_t;
|
||||||
//! @}
|
//! @}
|
||||||
|
|
||||||
|
|
||||||
/*! \name Status Types
|
/*! \name Status Types
|
||||||
*/
|
*/
|
||||||
//! @{
|
//! @{
|
||||||
@@ -291,7 +289,6 @@ typedef bool Status_bool_t; //!< Boolean status.
|
|||||||
typedef U8 Status_t; //!< 8-bit-coded status.
|
typedef U8 Status_t; //!< 8-bit-coded status.
|
||||||
//! @}
|
//! @}
|
||||||
|
|
||||||
|
|
||||||
/*! \name Aliasing Aggregate Types
|
/*! \name Aliasing Aggregate Types
|
||||||
*/
|
*/
|
||||||
//! @{
|
//! @{
|
||||||
@@ -462,7 +459,6 @@ typedef struct
|
|||||||
#endif
|
#endif
|
||||||
//! @}
|
//! @}
|
||||||
|
|
||||||
|
|
||||||
#ifndef __ASSEMBLY__ // not for assembling.
|
#ifndef __ASSEMBLY__ // not for assembling.
|
||||||
|
|
||||||
//! \name Optimization Control
|
//! \name Optimization Control
|
||||||
@@ -581,7 +577,6 @@ typedef struct
|
|||||||
|
|
||||||
//! @}
|
//! @}
|
||||||
|
|
||||||
|
|
||||||
/*! \name Zero-Bit Counting
|
/*! \name Zero-Bit Counting
|
||||||
*
|
*
|
||||||
* Under GCC, __builtin_clz and __builtin_ctz behave like macros when
|
* Under GCC, __builtin_clz and __builtin_ctz behave like macros when
|
||||||
@@ -692,7 +687,6 @@ typedef struct
|
|||||||
|
|
||||||
//! @}
|
//! @}
|
||||||
|
|
||||||
|
|
||||||
/*! \name Bit Reversing
|
/*! \name Bit Reversing
|
||||||
*/
|
*/
|
||||||
//! @{
|
//! @{
|
||||||
@@ -732,7 +726,6 @@ typedef struct
|
|||||||
|
|
||||||
//! @}
|
//! @}
|
||||||
|
|
||||||
|
|
||||||
/*! \name Alignment
|
/*! \name Alignment
|
||||||
*/
|
*/
|
||||||
//! @{
|
//! @{
|
||||||
@@ -798,7 +791,6 @@ typedef struct
|
|||||||
*/
|
*/
|
||||||
#define Long_call(addr) ((*(void (*)(void))(addr))())
|
#define Long_call(addr) ((*(void (*)(void))(addr))())
|
||||||
|
|
||||||
|
|
||||||
/*! \name MCU Endianism Handling
|
/*! \name MCU Endianism Handling
|
||||||
* ARM is MCU little endianism.
|
* ARM is MCU little endianism.
|
||||||
*/
|
*/
|
||||||
@@ -868,7 +860,6 @@ typedef struct
|
|||||||
#define CPU_TO_BE32(x) swap32(x)
|
#define CPU_TO_BE32(x) swap32(x)
|
||||||
//! @}
|
//! @}
|
||||||
|
|
||||||
|
|
||||||
/*! \name Endianism Conversion
|
/*! \name Endianism Conversion
|
||||||
*
|
*
|
||||||
* The same considerations as for clz and ctz apply here but GCC's
|
* The same considerations as for clz and ctz apply here but GCC's
|
||||||
@@ -955,7 +946,6 @@ typedef struct
|
|||||||
|
|
||||||
//! @}
|
//! @}
|
||||||
|
|
||||||
|
|
||||||
/*! \name Target Abstraction
|
/*! \name Target Abstraction
|
||||||
*/
|
*/
|
||||||
//! @{
|
//! @{
|
||||||
@@ -997,7 +987,6 @@ typedef U8 Byte; //!< 8-bit unsigned integer.
|
|||||||
|
|
||||||
#endif // #ifndef __ASSEMBLY__
|
#endif // #ifndef __ASSEMBLY__
|
||||||
|
|
||||||
|
|
||||||
#ifdef __ICCARM__
|
#ifdef __ICCARM__
|
||||||
#define SHORTENUM __packed
|
#define SHORTENUM __packed
|
||||||
#elif defined(__GNUC__)
|
#elif defined(__GNUC__)
|
||||||
|
|||||||
@@ -81,7 +81,6 @@
|
|||||||
#define LUN_0_NAME "\"SD/MMC Card\""
|
#define LUN_0_NAME "\"SD/MMC Card\""
|
||||||
//! @}
|
//! @}
|
||||||
|
|
||||||
|
|
||||||
/*! \name Actions Associated with Memory Accesses
|
/*! \name Actions Associated with Memory Accesses
|
||||||
*
|
*
|
||||||
* Write here the action to associate with each memory access.
|
* Write here the action to associate with each memory access.
|
||||||
@@ -112,5 +111,4 @@
|
|||||||
#define GLOBAL_WR_PROTECT false //!< Management of a global write protection.
|
#define GLOBAL_WR_PROTECT false //!< Management of a global write protection.
|
||||||
//! @}
|
//! @}
|
||||||
|
|
||||||
|
|
||||||
#endif // _CONF_ACCESS_H_
|
#endif // _CONF_ACCESS_H_
|
||||||
|
|||||||
@@ -96,5 +96,4 @@
|
|||||||
// - UPLL frequency: 480MHz
|
// - UPLL frequency: 480MHz
|
||||||
// - USB clock: 480 / 1 = 480MHz
|
// - USB clock: 480 / 1 = 480MHz
|
||||||
|
|
||||||
|
|
||||||
#endif /* CONF_CLOCK_H_INCLUDED */
|
#endif /* CONF_CLOCK_H_INCLUDED */
|
||||||
|
|||||||
@@ -88,7 +88,6 @@
|
|||||||
#endif
|
#endif
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* USB Device Callbacks definitions (Optional)
|
* USB Device Callbacks definitions (Optional)
|
||||||
* @{
|
* @{
|
||||||
@@ -150,7 +149,6 @@
|
|||||||
|
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* USB Interface Configuration
|
* USB Interface Configuration
|
||||||
* @{
|
* @{
|
||||||
@@ -210,7 +208,6 @@
|
|||||||
//@}
|
//@}
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configuration of MSC interface
|
* Configuration of MSC interface
|
||||||
* @{
|
* @{
|
||||||
@@ -245,7 +242,6 @@
|
|||||||
|
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description of Composite Device
|
* Description of Composite Device
|
||||||
* @{
|
* @{
|
||||||
|
|||||||
@@ -63,12 +63,11 @@
|
|||||||
#include "compiler.h"
|
#include "compiler.h"
|
||||||
#include "preprocessor.h"
|
#include "preprocessor.h"
|
||||||
#ifdef FREERTOS_USED
|
#ifdef FREERTOS_USED
|
||||||
#include "FreeRTOS.h"
|
#include <FreeRTOS.h>
|
||||||
#include "semphr.h"
|
#include <semphr.h>
|
||||||
#endif
|
#endif
|
||||||
#include "ctrl_access.h"
|
#include "ctrl_access.h"
|
||||||
|
|
||||||
|
|
||||||
//_____ D E F I N I T I O N S ______________________________________________
|
//_____ D E F I N I T I O N S ______________________________________________
|
||||||
|
|
||||||
#ifdef FREERTOS_USED
|
#ifdef FREERTOS_USED
|
||||||
@@ -112,7 +111,6 @@ static xSemaphoreHandle ctrl_access_semphr = NULL;
|
|||||||
|
|
||||||
#endif // FREERTOS_USED
|
#endif // FREERTOS_USED
|
||||||
|
|
||||||
|
|
||||||
#if MAX_LUN
|
#if MAX_LUN
|
||||||
|
|
||||||
/*! \brief Initializes an entry of the LUN descriptor table.
|
/*! \brief Initializes an entry of the LUN descriptor table.
|
||||||
@@ -242,17 +240,14 @@ static const struct
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if GLOBAL_WR_PROTECT == true
|
#if GLOBAL_WR_PROTECT == true
|
||||||
bool g_wr_protect;
|
bool g_wr_protect;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*! \name Control Interface
|
/*! \name Control Interface
|
||||||
*/
|
*/
|
||||||
//! @{
|
//! @{
|
||||||
|
|
||||||
|
|
||||||
#ifdef FREERTOS_USED
|
#ifdef FREERTOS_USED
|
||||||
|
|
||||||
bool ctrl_access_init(void)
|
bool ctrl_access_init(void)
|
||||||
@@ -270,7 +265,6 @@ bool ctrl_access_init(void)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*! \brief Locks accesses to LUNs.
|
/*! \brief Locks accesses to LUNs.
|
||||||
*
|
*
|
||||||
* \return \c true if the access was successfully locked, else \c false.
|
* \return \c true if the access was successfully locked, else \c false.
|
||||||
@@ -288,7 +282,6 @@ static bool ctrl_access_lock(void)
|
|||||||
|
|
||||||
#endif // FREERTOS_USED
|
#endif // FREERTOS_USED
|
||||||
|
|
||||||
|
|
||||||
U8 get_nb_lun(void)
|
U8 get_nb_lun(void)
|
||||||
{
|
{
|
||||||
#if MEM_USB == ENABLE
|
#if MEM_USB == ENABLE
|
||||||
@@ -309,13 +302,11 @@ U8 get_nb_lun(void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
U8 get_cur_lun(void)
|
U8 get_cur_lun(void)
|
||||||
{
|
{
|
||||||
return LUN_ID_0;
|
return LUN_ID_0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Ctrl_status mem_test_unit_ready(U8 lun)
|
Ctrl_status mem_test_unit_ready(U8 lun)
|
||||||
{
|
{
|
||||||
Ctrl_status status;
|
Ctrl_status status;
|
||||||
@@ -337,7 +328,6 @@ Ctrl_status mem_test_unit_ready(U8 lun)
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Ctrl_status mem_read_capacity(U8 lun, U32 *u32_nb_sector)
|
Ctrl_status mem_read_capacity(U8 lun, U32 *u32_nb_sector)
|
||||||
{
|
{
|
||||||
Ctrl_status status;
|
Ctrl_status status;
|
||||||
@@ -359,7 +349,6 @@ Ctrl_status mem_read_capacity(U8 lun, U32 *u32_nb_sector)
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
U8 mem_sector_size(U8 lun)
|
U8 mem_sector_size(U8 lun)
|
||||||
{
|
{
|
||||||
U8 sector_size;
|
U8 sector_size;
|
||||||
@@ -381,7 +370,6 @@ U8 mem_sector_size(U8 lun)
|
|||||||
return sector_size;
|
return sector_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool mem_unload(U8 lun, bool unload)
|
bool mem_unload(U8 lun, bool unload)
|
||||||
{
|
{
|
||||||
bool unloaded;
|
bool unloaded;
|
||||||
@@ -433,7 +421,6 @@ bool mem_wr_protect(U8 lun)
|
|||||||
return wr_protect;
|
return wr_protect;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool mem_removal(U8 lun)
|
bool mem_removal(U8 lun)
|
||||||
{
|
{
|
||||||
bool removal;
|
bool removal;
|
||||||
@@ -458,7 +445,6 @@ bool mem_removal(U8 lun)
|
|||||||
return removal;
|
return removal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const char *mem_name(U8 lun)
|
const char *mem_name(U8 lun)
|
||||||
{
|
{
|
||||||
#if MAX_LUN==0
|
#if MAX_LUN==0
|
||||||
@@ -475,17 +461,14 @@ const char *mem_name(U8 lun)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//! @}
|
//! @}
|
||||||
|
|
||||||
|
|
||||||
#if ACCESS_USB == true
|
#if ACCESS_USB == true
|
||||||
|
|
||||||
/*! \name MEM <-> USB Interface
|
/*! \name MEM <-> USB Interface
|
||||||
*/
|
*/
|
||||||
//! @{
|
//! @{
|
||||||
|
|
||||||
|
|
||||||
Ctrl_status memory_2_usb(U8 lun, U32 addr, U16 nb_sector)
|
Ctrl_status memory_2_usb(U8 lun, U32 addr, U16 nb_sector)
|
||||||
{
|
{
|
||||||
Ctrl_status status;
|
Ctrl_status status;
|
||||||
@@ -505,7 +488,6 @@ Ctrl_status memory_2_usb(U8 lun, U32 addr, U16 nb_sector)
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Ctrl_status usb_2_memory(U8 lun, U32 addr, U16 nb_sector)
|
Ctrl_status usb_2_memory(U8 lun, U32 addr, U16 nb_sector)
|
||||||
{
|
{
|
||||||
Ctrl_status status;
|
Ctrl_status status;
|
||||||
@@ -525,19 +507,16 @@ Ctrl_status usb_2_memory(U8 lun, U32 addr, U16 nb_sector)
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//! @}
|
//! @}
|
||||||
|
|
||||||
#endif // ACCESS_USB == true
|
#endif // ACCESS_USB == true
|
||||||
|
|
||||||
|
|
||||||
#if ACCESS_MEM_TO_RAM == true
|
#if ACCESS_MEM_TO_RAM == true
|
||||||
|
|
||||||
/*! \name MEM <-> RAM Interface
|
/*! \name MEM <-> RAM Interface
|
||||||
*/
|
*/
|
||||||
//! @{
|
//! @{
|
||||||
|
|
||||||
|
|
||||||
Ctrl_status memory_2_ram(U8 lun, U32 addr, void *ram)
|
Ctrl_status memory_2_ram(U8 lun, U32 addr, void *ram)
|
||||||
{
|
{
|
||||||
Ctrl_status status;
|
Ctrl_status status;
|
||||||
@@ -564,7 +543,6 @@ Ctrl_status memory_2_ram(U8 lun, U32 addr, void *ram)
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Ctrl_status ram_2_memory(U8 lun, U32 addr, const void *ram)
|
Ctrl_status ram_2_memory(U8 lun, U32 addr, const void *ram)
|
||||||
{
|
{
|
||||||
Ctrl_status status;
|
Ctrl_status status;
|
||||||
@@ -591,19 +569,16 @@ Ctrl_status ram_2_memory(U8 lun, U32 addr, const void *ram)
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//! @}
|
//! @}
|
||||||
|
|
||||||
#endif // ACCESS_MEM_TO_RAM == true
|
#endif // ACCESS_MEM_TO_RAM == true
|
||||||
|
|
||||||
|
|
||||||
#if ACCESS_STREAM == true
|
#if ACCESS_STREAM == true
|
||||||
|
|
||||||
/*! \name Streaming MEM <-> MEM Interface
|
/*! \name Streaming MEM <-> MEM Interface
|
||||||
*/
|
*/
|
||||||
//! @{
|
//! @{
|
||||||
|
|
||||||
|
|
||||||
#if ACCESS_MEM_TO_MEM == true
|
#if ACCESS_MEM_TO_MEM == true
|
||||||
|
|
||||||
#include "fat.h"
|
#include "fat.h"
|
||||||
@@ -625,21 +600,18 @@ Ctrl_status stream_mem_to_mem(U8 src_lun, U32 src_addr, U8 dest_lun, U32 dest_ad
|
|||||||
|
|
||||||
#endif // ACCESS_MEM_TO_MEM == true
|
#endif // ACCESS_MEM_TO_MEM == true
|
||||||
|
|
||||||
|
|
||||||
Ctrl_status stream_state(U8 id)
|
Ctrl_status stream_state(U8 id)
|
||||||
{
|
{
|
||||||
UNUSED(id);
|
UNUSED(id);
|
||||||
return CTRL_GOOD;
|
return CTRL_GOOD;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
U16 stream_stop(U8 id)
|
U16 stream_stop(U8 id)
|
||||||
{
|
{
|
||||||
UNUSED(id);
|
UNUSED(id);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//! @}
|
//! @}
|
||||||
|
|
||||||
#endif // ACCESS_STREAM
|
#endif // ACCESS_STREAM
|
||||||
|
|||||||
@@ -56,7 +56,6 @@
|
|||||||
* Support and FAQ: visit <a href="https://www.atmel.com/design-support/">Atmel Support</a>
|
* Support and FAQ: visit <a href="https://www.atmel.com/design-support/">Atmel Support</a>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef _CTRL_ACCESS_H_
|
#ifndef _CTRL_ACCESS_H_
|
||||||
#define _CTRL_ACCESS_H_
|
#define _CTRL_ACCESS_H_
|
||||||
|
|
||||||
@@ -89,7 +88,6 @@ typedef enum
|
|||||||
CTRL_BUSY = FAIL + 2 //!< Memory not initialized or changed.
|
CTRL_BUSY = FAIL + 2 //!< Memory not initialized or changed.
|
||||||
} Ctrl_status;
|
} Ctrl_status;
|
||||||
|
|
||||||
|
|
||||||
// FYI: Each Logical Unit Number (LUN) corresponds to a memory.
|
// FYI: Each Logical Unit Number (LUN) corresponds to a memory.
|
||||||
|
|
||||||
// Check LUN defines.
|
// Check LUN defines.
|
||||||
@@ -136,7 +134,6 @@ typedef enum
|
|||||||
#define LUN_ID_USB (MAX_LUN) //!< First dynamic LUN (USB host mass storage).
|
#define LUN_ID_USB (MAX_LUN) //!< First dynamic LUN (USB host mass storage).
|
||||||
//! @}
|
//! @}
|
||||||
|
|
||||||
|
|
||||||
// Include LUN header files.
|
// Include LUN header files.
|
||||||
#if LUN_0 == ENABLE
|
#if LUN_0 == ENABLE
|
||||||
#include LUN_0_INCLUDE
|
#include LUN_0_INCLUDE
|
||||||
@@ -166,13 +163,11 @@ typedef enum
|
|||||||
#include LUN_USB_INCLUDE
|
#include LUN_USB_INCLUDE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// Check the configuration of write protection in conf_access.h.
|
// Check the configuration of write protection in conf_access.h.
|
||||||
#ifndef GLOBAL_WR_PROTECT
|
#ifndef GLOBAL_WR_PROTECT
|
||||||
#error GLOBAL_WR_PROTECT must be defined as true or false in conf_access.h
|
#error GLOBAL_WR_PROTECT must be defined as true or false in conf_access.h
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if GLOBAL_WR_PROTECT == true
|
#if GLOBAL_WR_PROTECT == true
|
||||||
|
|
||||||
//! Write protect.
|
//! Write protect.
|
||||||
@@ -180,7 +175,6 @@ extern bool g_wr_protect;
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*! \name Control Interface
|
/*! \name Control Interface
|
||||||
*/
|
*/
|
||||||
//! @{
|
//! @{
|
||||||
@@ -279,7 +273,6 @@ extern const char *mem_name(U8 lun);
|
|||||||
|
|
||||||
//! @}
|
//! @}
|
||||||
|
|
||||||
|
|
||||||
#if ACCESS_USB == true
|
#if ACCESS_USB == true
|
||||||
|
|
||||||
/*! \name MEM <-> USB Interface
|
/*! \name MEM <-> USB Interface
|
||||||
@@ -310,7 +303,6 @@ extern Ctrl_status usb_2_memory(U8 lun, U32 addr, U16 nb_sector);
|
|||||||
|
|
||||||
#endif // ACCESS_USB == true
|
#endif // ACCESS_USB == true
|
||||||
|
|
||||||
|
|
||||||
#if ACCESS_MEM_TO_RAM == true
|
#if ACCESS_MEM_TO_RAM == true
|
||||||
|
|
||||||
/*! \name MEM <-> RAM Interface
|
/*! \name MEM <-> RAM Interface
|
||||||
@@ -341,7 +333,6 @@ extern Ctrl_status ram_2_memory(U8 lun, U32 addr, const void *ram);
|
|||||||
|
|
||||||
#endif // ACCESS_MEM_TO_RAM == true
|
#endif // ACCESS_MEM_TO_RAM == true
|
||||||
|
|
||||||
|
|
||||||
#if ACCESS_STREAM == true
|
#if ACCESS_STREAM == true
|
||||||
|
|
||||||
/*! \name Streaming MEM <-> MEM Interface
|
/*! \name Streaming MEM <-> MEM Interface
|
||||||
|
|||||||
@@ -57,7 +57,6 @@
|
|||||||
|
|
||||||
#include "preprocessor.h"
|
#include "preprocessor.h"
|
||||||
|
|
||||||
|
|
||||||
//! Maximal number of repetitions supported by MREPEAT.
|
//! Maximal number of repetitions supported by MREPEAT.
|
||||||
#define MREPEAT_LIMIT 256
|
#define MREPEAT_LIMIT 256
|
||||||
|
|
||||||
|
|||||||
@@ -128,7 +128,6 @@ static inline void osc_enable(uint32_t ul_id) {
|
|||||||
pmc_switch_sclk_to_32kxtal(PMC_OSC_BYPASS);
|
pmc_switch_sclk_to_32kxtal(PMC_OSC_BYPASS);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case OSC_MAINCK_4M_RC:
|
case OSC_MAINCK_4M_RC:
|
||||||
pmc_switch_mainck_to_fastrc(CKGR_MOR_MOSCRCF_4_MHz);
|
pmc_switch_mainck_to_fastrc(CKGR_MOR_MOSCRCF_4_MHz);
|
||||||
break;
|
break;
|
||||||
@@ -141,7 +140,6 @@ static inline void osc_enable(uint32_t ul_id) {
|
|||||||
pmc_switch_mainck_to_fastrc(CKGR_MOR_MOSCRCF_12_MHz);
|
pmc_switch_mainck_to_fastrc(CKGR_MOR_MOSCRCF_12_MHz);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case OSC_MAINCK_XTAL:
|
case OSC_MAINCK_XTAL:
|
||||||
pmc_switch_mainck_to_xtal(PMC_OSC_XTAL/*,
|
pmc_switch_mainck_to_xtal(PMC_OSC_XTAL/*,
|
||||||
pmc_us_to_moscxtst(BOARD_OSC_STARTUP_US,
|
pmc_us_to_moscxtst(BOARD_OSC_STARTUP_US,
|
||||||
|
|||||||
@@ -51,5 +51,4 @@
|
|||||||
#include "stringz.h"
|
#include "stringz.h"
|
||||||
#include "mrepeat.h"
|
#include "mrepeat.h"
|
||||||
|
|
||||||
|
|
||||||
#endif // _PREPROCESSOR_H_
|
#endif // _PREPROCESSOR_H_
|
||||||
|
|||||||
@@ -86,7 +86,6 @@ enum scsi_sbc_mode {
|
|||||||
SCSI_MS_MODE_CACHING = 0x08, //!< Caching mode page
|
SCSI_MS_MODE_CACHING = 0x08, //!< Caching mode page
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//! \name SBC-2 Device-Specific Parameter
|
//! \name SBC-2 Device-Specific Parameter
|
||||||
//@{
|
//@{
|
||||||
#define SCSI_MS_SBC_WP 0x80 //!< Write Protected
|
#define SCSI_MS_SBC_WP 0x80 //!< Write Protected
|
||||||
|
|||||||
@@ -18,30 +18,29 @@ extern "C" {
|
|||||||
void sd_mmc_spi_mem_init() {
|
void sd_mmc_spi_mem_init() {
|
||||||
}
|
}
|
||||||
|
|
||||||
Ctrl_status sd_mmc_spi_test_unit_ready() {
|
inline bool media_ready() {
|
||||||
#ifdef DISABLE_DUE_SD_MMC
|
return card.isMounted() && card.isInserted() && !card.isFileOpen() && !card.isStillPrinting();
|
||||||
return CTRL_NO_PRESENT;
|
|
||||||
#endif
|
|
||||||
if (!IS_SD_INSERTED() || IS_SD_PRINTING() || IS_SD_FILE_OPEN() || !card.isMounted())
|
|
||||||
return CTRL_NO_PRESENT;
|
|
||||||
return CTRL_GOOD;
|
|
||||||
}
|
|
||||||
|
|
||||||
// NOTE: This function is defined as returning the address of the last block
|
|
||||||
// in the card, which is cardSize() - 1
|
|
||||||
Ctrl_status sd_mmc_spi_read_capacity(uint32_t *nb_sector) {
|
|
||||||
if (!IS_SD_INSERTED() || IS_SD_PRINTING() || IS_SD_FILE_OPEN() || !card.isMounted())
|
|
||||||
return CTRL_NO_PRESENT;
|
|
||||||
*nb_sector = card.diskIODriver()->cardSize() - 1;
|
|
||||||
return CTRL_GOOD;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool sd_mmc_spi_unload(bool) { return true; }
|
bool sd_mmc_spi_unload(bool) { return true; }
|
||||||
|
|
||||||
bool sd_mmc_spi_wr_protect() { return false; }
|
bool sd_mmc_spi_wr_protect() { return false; }
|
||||||
|
|
||||||
bool sd_mmc_spi_removal() {
|
bool sd_mmc_spi_removal() { return !media_ready(); }
|
||||||
return (!IS_SD_INSERTED() || IS_SD_PRINTING() || IS_SD_FILE_OPEN() || !card.isMounted());
|
|
||||||
|
Ctrl_status sd_mmc_spi_test_unit_ready() {
|
||||||
|
#if ENABLED(DISABLE_DUE_SD_MMC)
|
||||||
|
return CTRL_NO_PRESENT;
|
||||||
|
#endif
|
||||||
|
return sd_mmc_spi_removal() ? CTRL_NO_PRESENT : CTRL_GOOD;
|
||||||
|
}
|
||||||
|
|
||||||
|
// NOTE: This function is defined as returning the address of the last block
|
||||||
|
// in the card, which is cardSize() - 1
|
||||||
|
Ctrl_status sd_mmc_spi_read_capacity(uint32_t *nb_sector) {
|
||||||
|
if (sd_mmc_spi_removal()) return CTRL_NO_PRESENT;
|
||||||
|
*nb_sector = card.diskIODriver()->cardSize() - 1;
|
||||||
|
return CTRL_GOOD;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ACCESS_USB == true
|
#if ACCESS_USB == true
|
||||||
@@ -58,11 +57,11 @@ uint8_t sector_buf[SD_MMC_BLOCK_SIZE];
|
|||||||
// #define DEBUG_MMC
|
// #define DEBUG_MMC
|
||||||
|
|
||||||
Ctrl_status sd_mmc_spi_usb_read_10(uint32_t addr, uint16_t nb_sector) {
|
Ctrl_status sd_mmc_spi_usb_read_10(uint32_t addr, uint16_t nb_sector) {
|
||||||
#ifdef DISABLE_DUE_SD_MMC
|
#if ENABLED(DISABLE_DUE_SD_MMC)
|
||||||
return CTRL_NO_PRESENT;
|
return CTRL_NO_PRESENT;
|
||||||
#endif
|
#endif
|
||||||
if (!IS_SD_INSERTED() || IS_SD_PRINTING() || IS_SD_FILE_OPEN() || !card.isMounted())
|
|
||||||
return CTRL_NO_PRESENT;
|
if (sd_mmc_spi_removal()) return CTRL_NO_PRESENT;
|
||||||
|
|
||||||
#ifdef DEBUG_MMC
|
#ifdef DEBUG_MMC
|
||||||
{
|
{
|
||||||
@@ -98,11 +97,11 @@ Ctrl_status sd_mmc_spi_usb_read_10(uint32_t addr, uint16_t nb_sector) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Ctrl_status sd_mmc_spi_usb_write_10(uint32_t addr, uint16_t nb_sector) {
|
Ctrl_status sd_mmc_spi_usb_write_10(uint32_t addr, uint16_t nb_sector) {
|
||||||
#ifdef DISABLE_DUE_SD_MMC
|
#if ENABLED(DISABLE_DUE_SD_MMC)
|
||||||
return CTRL_NO_PRESENT;
|
return CTRL_NO_PRESENT;
|
||||||
#endif
|
#endif
|
||||||
if (!IS_SD_INSERTED() || IS_SD_PRINTING() || IS_SD_FILE_OPEN() || !card.isMounted())
|
|
||||||
return CTRL_NO_PRESENT;
|
if (sd_mmc_spi_removal()) return CTRL_NO_PRESENT;
|
||||||
|
|
||||||
#ifdef DEBUG_MMC
|
#ifdef DEBUG_MMC
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -45,7 +45,6 @@
|
|||||||
* Support and FAQ: visit <a href="https://www.atmel.com/design-support/">Atmel Support</a>
|
* Support and FAQ: visit <a href="https://www.atmel.com/design-support/">Atmel Support</a>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef _SD_MMC_SPI_MEM_H_
|
#ifndef _SD_MMC_SPI_MEM_H_
|
||||||
#define _SD_MMC_SPI_MEM_H_
|
#define _SD_MMC_SPI_MEM_H_
|
||||||
|
|
||||||
@@ -63,22 +62,19 @@
|
|||||||
#error sd_mmc_spi_mem.h is #included although SD_MMC_SPI_MEM is disabled
|
#error sd_mmc_spi_mem.h is #included although SD_MMC_SPI_MEM is disabled
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#include "ctrl_access.h"
|
#include "ctrl_access.h"
|
||||||
|
|
||||||
|
|
||||||
//_____ D E F I N I T I O N S ______________________________________________
|
//_____ D E F I N I T I O N S ______________________________________________
|
||||||
|
|
||||||
#define SD_MMC_REMOVED 0
|
#define SD_MMC_REMOVED 0
|
||||||
#define SD_MMC_INSERTED 1
|
#define SD_MMC_INSERTED 1
|
||||||
#define SD_MMC_REMOVING 2
|
#define SD_MMC_REMOVING 2
|
||||||
|
|
||||||
|
|
||||||
//---- CONTROL FUNCTIONS ----
|
//---- CONTROL FUNCTIONS ----
|
||||||
//!
|
//!
|
||||||
//! @brief This function initializes the hw/sw resources required to drive the SD_MMC_SPI.
|
//! @brief This function initializes the hw/sw resources required to drive the SD_MMC_SPI.
|
||||||
//!/
|
//!/
|
||||||
extern void sd_mmc_spi_mem_init(void);
|
void sd_mmc_spi_mem_init();
|
||||||
|
|
||||||
//!
|
//!
|
||||||
//! @brief This function tests the state of the SD_MMC memory and sends it to the Host.
|
//! @brief This function tests the state of the SD_MMC memory and sends it to the Host.
|
||||||
@@ -91,7 +87,7 @@ extern void sd_mmc_spi_mem_init(void);
|
|||||||
//! Media not present -> CTRL_NO_PRESENT
|
//! Media not present -> CTRL_NO_PRESENT
|
||||||
//! Media has changed -> CTRL_BUSY
|
//! Media has changed -> CTRL_BUSY
|
||||||
//!/
|
//!/
|
||||||
extern Ctrl_status sd_mmc_spi_test_unit_ready(void);
|
Ctrl_status sd_mmc_spi_test_unit_ready();
|
||||||
|
|
||||||
//!
|
//!
|
||||||
//! @brief This function gives the address of the last valid sector.
|
//! @brief This function gives the address of the last valid sector.
|
||||||
@@ -102,7 +98,7 @@ extern Ctrl_status sd_mmc_spi_test_unit_ready(void);
|
|||||||
//! Media ready -> CTRL_GOOD
|
//! Media ready -> CTRL_GOOD
|
||||||
//! Media not present -> CTRL_NO_PRESENT
|
//! Media not present -> CTRL_NO_PRESENT
|
||||||
//!/
|
//!/
|
||||||
extern Ctrl_status sd_mmc_spi_read_capacity(uint32_t *nb_sector);
|
Ctrl_status sd_mmc_spi_read_capacity(uint32_t *nb_sector);
|
||||||
|
|
||||||
/*! \brief Unload/Load the SD/MMC card selected
|
/*! \brief Unload/Load the SD/MMC card selected
|
||||||
*
|
*
|
||||||
@@ -113,7 +109,7 @@ extern Ctrl_status sd_mmc_spi_read_capacity(uint32_t *nb_sector);
|
|||||||
*
|
*
|
||||||
* \return \c true if unload/load done success.
|
* \return \c true if unload/load done success.
|
||||||
*/
|
*/
|
||||||
extern bool sd_mmc_spi_unload(bool unload);
|
bool sd_mmc_spi_unload(bool unload);
|
||||||
|
|
||||||
//!
|
//!
|
||||||
//! @brief This function returns the write protected status of the memory.
|
//! @brief This function returns the write protected status of the memory.
|
||||||
@@ -124,15 +120,14 @@ extern bool sd_mmc_spi_unload(bool unload);
|
|||||||
//!
|
//!
|
||||||
//! @return false -> the memory is not write-protected (always)
|
//! @return false -> the memory is not write-protected (always)
|
||||||
//!/
|
//!/
|
||||||
extern bool sd_mmc_spi_wr_protect(void);
|
bool sd_mmc_spi_wr_protect();
|
||||||
|
|
||||||
//!
|
//!
|
||||||
//! @brief This function tells if the memory has been removed or not.
|
//! @brief This function tells if the memory has been removed or not.
|
||||||
//!
|
//!
|
||||||
//! @return false -> The memory isn't removed
|
//! @return false -> The memory isn't removed
|
||||||
//!
|
//!
|
||||||
extern bool sd_mmc_spi_removal(void);
|
bool sd_mmc_spi_removal();
|
||||||
|
|
||||||
|
|
||||||
//---- ACCESS DATA FUNCTIONS ----
|
//---- ACCESS DATA FUNCTIONS ----
|
||||||
|
|
||||||
@@ -152,7 +147,7 @@ extern bool sd_mmc_spi_removal(void);
|
|||||||
//! It is ready -> CTRL_GOOD
|
//! It is ready -> CTRL_GOOD
|
||||||
//! A error occur -> CTRL_FAIL
|
//! A error occur -> CTRL_FAIL
|
||||||
//!
|
//!
|
||||||
extern Ctrl_status sd_mmc_spi_usb_read_10(uint32_t addr, uint16_t nb_sector);
|
Ctrl_status sd_mmc_spi_usb_read_10(uint32_t addr, uint16_t nb_sector);
|
||||||
|
|
||||||
//! This function initializes the SD/MMC memory for a write operation
|
//! This function initializes the SD/MMC memory for a write operation
|
||||||
//!
|
//!
|
||||||
@@ -166,7 +161,7 @@ extern Ctrl_status sd_mmc_spi_usb_read_10(uint32_t addr, uint16_t nb_sector);
|
|||||||
//! It is ready -> CTRL_GOOD
|
//! It is ready -> CTRL_GOOD
|
||||||
//! An error occurs -> CTRL_FAIL
|
//! An error occurs -> CTRL_FAIL
|
||||||
//!
|
//!
|
||||||
extern Ctrl_status sd_mmc_spi_usb_write_10(uint32_t addr, uint16_t nb_sector);
|
Ctrl_status sd_mmc_spi_usb_write_10(uint32_t addr, uint16_t nb_sector);
|
||||||
|
|
||||||
#endif // #if ACCESS_USB == true
|
#endif // #if ACCESS_USB == true
|
||||||
|
|
||||||
|
|||||||
@@ -212,7 +212,6 @@ extern "C" {
|
|||||||
#define CONFIG_USBCLK_DIV
|
#define CONFIG_USBCLK_DIV
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
extern void sysclk_enable_usb(void);
|
extern void sysclk_enable_usb(void);
|
||||||
extern void sysclk_disable_usb(void);
|
extern void sysclk_disable_usb(void);
|
||||||
|
|
||||||
|
|||||||
@@ -83,7 +83,6 @@ static usb_iface_desc_t UDC_DESC_STORAGE *udc_ptr_iface;
|
|||||||
|
|
||||||
//! @}
|
//! @}
|
||||||
|
|
||||||
|
|
||||||
//! \name Internal structure to store the USB device main strings
|
//! \name Internal structure to store the USB device main strings
|
||||||
//! @{
|
//! @{
|
||||||
|
|
||||||
|
|||||||
@@ -229,7 +229,7 @@ usb_iface_desc_t UDC_DESC_STORAGE *udc_get_interface_desc(void);
|
|||||||
* - USB Device Controller (UDC) provides USB chapter 9 compliance
|
* - USB Device Controller (UDC) provides USB chapter 9 compliance
|
||||||
* - USB Device Interface (UDI) provides USB Class compliance
|
* - USB Device Interface (UDI) provides USB Class compliance
|
||||||
* - USB Device Driver (UDD) provides USB Driver for each Atmel MCU
|
* - USB Device Driver (UDD) provides USB Driver for each Atmel MCU
|
||||||
|
*
|
||||||
* Many USB Device applications can be implemented on Atmel MCU.
|
* Many USB Device applications can be implemented on Atmel MCU.
|
||||||
* Atmel provides many application notes for different applications:
|
* Atmel provides many application notes for different applications:
|
||||||
* - AVR4900, provides general information about Device Stack
|
* - AVR4900, provides general information about Device Stack
|
||||||
@@ -685,6 +685,4 @@ usb_iface_desc_t UDC_DESC_STORAGE *udc_get_interface_desc(void);
|
|||||||
} \endcode
|
} \endcode
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif // _UDC_H_
|
#endif // _UDC_H_
|
||||||
|
|||||||
@@ -213,7 +213,6 @@ void udd_send_remotewakeup(void);
|
|||||||
*/
|
*/
|
||||||
void udd_set_setup_payload( uint8_t *payload, uint16_t payload_size );
|
void udd_set_setup_payload( uint8_t *payload, uint16_t payload_size );
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \name Endpoint Management
|
* \name Endpoint Management
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -457,7 +457,6 @@ void udi_cdc_data_sof_notify(void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ------------------------
|
// ------------------------
|
||||||
//------- Internal routines to control serial line
|
//------- Internal routines to control serial line
|
||||||
|
|
||||||
@@ -520,7 +519,6 @@ static void udi_cdc_ctrl_state_change(uint8_t port, bool b_set, le16_t bit_mask)
|
|||||||
udi_cdc_ctrl_state_notify(port, ep_comm);
|
udi_cdc_ctrl_state_notify(port, ep_comm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void udi_cdc_ctrl_state_notify(uint8_t port, udd_ep_id_t ep)
|
static void udi_cdc_ctrl_state_notify(uint8_t port, udd_ep_id_t ep)
|
||||||
{
|
{
|
||||||
#if UDI_CDC_PORT_NB == 1 // To optimize code
|
#if UDI_CDC_PORT_NB == 1 // To optimize code
|
||||||
@@ -542,7 +540,6 @@ static void udi_cdc_ctrl_state_notify(uint8_t port, udd_ep_id_t ep)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void udi_cdc_serial_state_msg_sent(udd_ep_status_t status, iram_size_t n, udd_ep_id_t ep)
|
static void udi_cdc_serial_state_msg_sent(udd_ep_status_t status, iram_size_t n, udd_ep_id_t ep)
|
||||||
{
|
{
|
||||||
uint8_t port;
|
uint8_t port;
|
||||||
@@ -578,11 +575,9 @@ static void udi_cdc_serial_state_msg_sent(udd_ep_status_t status, iram_size_t n,
|
|||||||
udi_cdc_ctrl_state_notify(port, ep);
|
udi_cdc_ctrl_state_notify(port, ep);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ------------------------
|
// ------------------------
|
||||||
//------- Internal routines to process data transfer
|
//------- Internal routines to process data transfer
|
||||||
|
|
||||||
|
|
||||||
static bool udi_cdc_rx_start(uint8_t port)
|
static bool udi_cdc_rx_start(uint8_t port)
|
||||||
{
|
{
|
||||||
irqflags_t flags;
|
irqflags_t flags;
|
||||||
@@ -632,7 +627,6 @@ static bool udi_cdc_rx_start(uint8_t port)
|
|||||||
udi_cdc_data_received);
|
udi_cdc_data_received);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void udi_cdc_data_received(udd_ep_status_t status, iram_size_t n, udd_ep_id_t ep)
|
static void udi_cdc_data_received(udd_ep_status_t status, iram_size_t n, udd_ep_id_t ep)
|
||||||
{
|
{
|
||||||
uint8_t buf_sel_trans;
|
uint8_t buf_sel_trans;
|
||||||
@@ -668,7 +662,6 @@ static void udi_cdc_data_received(udd_ep_status_t status, iram_size_t n, udd_ep_
|
|||||||
udi_cdc_rx_start(port);
|
udi_cdc_rx_start(port);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void udi_cdc_data_sent(udd_ep_status_t status, iram_size_t n, udd_ep_id_t ep)
|
static void udi_cdc_data_sent(udd_ep_status_t status, iram_size_t n, udd_ep_id_t ep)
|
||||||
{
|
{
|
||||||
uint8_t port;
|
uint8_t port;
|
||||||
@@ -700,7 +693,6 @@ static void udi_cdc_data_sent(udd_ep_status_t status, iram_size_t n, udd_ep_id_t
|
|||||||
udi_cdc_tx_send(port);
|
udi_cdc_tx_send(port);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void udi_cdc_tx_send(uint8_t port)
|
static void udi_cdc_tx_send(uint8_t port)
|
||||||
{
|
{
|
||||||
irqflags_t flags;
|
irqflags_t flags;
|
||||||
@@ -780,11 +772,9 @@ static void udi_cdc_tx_send(uint8_t port)
|
|||||||
udi_cdc_data_sent);
|
udi_cdc_data_sent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ------------------------
|
// ------------------------
|
||||||
//------- Application interface
|
//------- Application interface
|
||||||
|
|
||||||
|
|
||||||
//------- Application interface
|
//------- Application interface
|
||||||
|
|
||||||
void udi_cdc_ctrl_signal_dcd(bool b_set)
|
void udi_cdc_ctrl_signal_dcd(bool b_set)
|
||||||
|
|||||||
@@ -106,7 +106,6 @@ typedef struct {
|
|||||||
usb_ep_desc_t ep_notify;
|
usb_ep_desc_t ep_notify;
|
||||||
} udi_cdc_comm_desc_t;
|
} udi_cdc_comm_desc_t;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Data Class interface descriptor
|
* \brief Data Class interface descriptor
|
||||||
*
|
*
|
||||||
@@ -121,7 +120,6 @@ typedef struct {
|
|||||||
usb_ep_desc_t ep_out;
|
usb_ep_desc_t ep_out;
|
||||||
} udi_cdc_data_desc_t;
|
} udi_cdc_data_desc_t;
|
||||||
|
|
||||||
|
|
||||||
//! CDC communication endpoints size for all speeds
|
//! CDC communication endpoints size for all speeds
|
||||||
#define UDI_CDC_COMM_EP_SIZE 64
|
#define UDI_CDC_COMM_EP_SIZE 64
|
||||||
//! CDC data endpoints size for FS speed (8B, 16B, 32B, 64B)
|
//! CDC data endpoints size for FS speed (8B, 16B, 32B, 64B)
|
||||||
|
|||||||
@@ -109,7 +109,6 @@ UDC_DESC_STORAGE usb_dev_desc_t udc_device_desc = {
|
|||||||
.bNumConfigurations = 1
|
.bNumConfigurations = 1
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#ifdef USB_DEVICE_HS_SUPPORT
|
#ifdef USB_DEVICE_HS_SUPPORT
|
||||||
//! USB Device Qualifier Descriptor for HS
|
//! USB Device Qualifier Descriptor for HS
|
||||||
COMPILER_WORD_ALIGNED
|
COMPILER_WORD_ALIGNED
|
||||||
|
|||||||
@@ -93,7 +93,6 @@ UDC_DESC_STORAGE usb_dev_desc_t udc_device_desc = {
|
|||||||
.bNumConfigurations = 1
|
.bNumConfigurations = 1
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#ifdef USB_DEVICE_HS_SUPPORT
|
#ifdef USB_DEVICE_HS_SUPPORT
|
||||||
//! USB Device Qualifier Descriptor for HS
|
//! USB Device Qualifier Descriptor for HS
|
||||||
COMPILER_WORD_ALIGNED
|
COMPILER_WORD_ALIGNED
|
||||||
@@ -147,7 +146,6 @@ UDC_DESC_STORAGE udc_desc_t udc_desc_hs = {
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \name UDC structures which contains all USB Device definitions
|
* \name UDC structures which contains all USB Device definitions
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -86,7 +86,6 @@ UDC_DESC_STORAGE udi_api_t udi_api_msc = {
|
|||||||
};
|
};
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \ingroup udi_msc_group
|
* \ingroup udi_msc_group
|
||||||
* \defgroup udi_msc_group_internal Implementation of UDI MSC
|
* \defgroup udi_msc_group_internal Implementation of UDI MSC
|
||||||
@@ -137,7 +136,6 @@ volatile bool udi_msc_b_reset_trans = true;
|
|||||||
|
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \name Internal routines
|
* \name Internal routines
|
||||||
*/
|
*/
|
||||||
@@ -190,7 +188,6 @@ static void udi_msc_cbw_received(udd_ep_status_t status,
|
|||||||
static bool udi_msc_cbw_validate(uint32_t alloc_len, uint8_t dir_flag);
|
static bool udi_msc_cbw_validate(uint32_t alloc_len, uint8_t dir_flag);
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \name Routines to process small data packet
|
* \name Routines to process small data packet
|
||||||
*/
|
*/
|
||||||
@@ -217,7 +214,6 @@ static void udi_msc_data_sent(udd_ep_status_t status, iram_size_t nb_sent,
|
|||||||
udd_ep_id_t ep);
|
udd_ep_id_t ep);
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \name Routines to process CSW packet
|
* \name Routines to process CSW packet
|
||||||
*/
|
*/
|
||||||
@@ -250,7 +246,6 @@ static void udi_msc_csw_sent(udd_ep_status_t status, iram_size_t nb_sent,
|
|||||||
udd_ep_id_t ep);
|
udd_ep_id_t ep);
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \name Routines manage sense data
|
* \name Routines manage sense data
|
||||||
*/
|
*/
|
||||||
@@ -307,7 +302,6 @@ static void udi_msc_sense_fail_cdb_invalid(void);
|
|||||||
static void udi_msc_sense_command_invalid(void);
|
static void udi_msc_sense_command_invalid(void);
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \name Routines manage SCSI Commands
|
* \name Routines manage SCSI Commands
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -293,7 +293,6 @@ do { \
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \name Power management routine.
|
* \name Power management routine.
|
||||||
*/
|
*/
|
||||||
@@ -310,7 +309,6 @@ static bool udd_b_idle;
|
|||||||
//! State of sleep manager
|
//! State of sleep manager
|
||||||
static bool udd_b_sleep_initialized = false;
|
static bool udd_b_sleep_initialized = false;
|
||||||
|
|
||||||
|
|
||||||
/*! \brief Authorize or not the CPU powerdown mode
|
/*! \brief Authorize or not the CPU powerdown mode
|
||||||
*
|
*
|
||||||
* \param b_enable true to authorize idle mode
|
* \param b_enable true to authorize idle mode
|
||||||
@@ -338,7 +336,6 @@ static void udd_sleep_mode(bool b_idle)
|
|||||||
|
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \name Control endpoint low level management routine.
|
* \name Control endpoint low level management routine.
|
||||||
*
|
*
|
||||||
@@ -410,7 +407,6 @@ static void udd_ctrl_send_zlp_out(void);
|
|||||||
//! \brief Call callback associated to setup request
|
//! \brief Call callback associated to setup request
|
||||||
static void udd_ctrl_endofrequest(void);
|
static void udd_ctrl_endofrequest(void);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Main interrupt routine for control endpoint
|
* \brief Main interrupt routine for control endpoint
|
||||||
*
|
*
|
||||||
@@ -422,7 +418,6 @@ static bool udd_ctrl_interrupt(void);
|
|||||||
|
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \name Management of bulk/interrupt/isochronous endpoints
|
* \name Management of bulk/interrupt/isochronous endpoints
|
||||||
*
|
*
|
||||||
@@ -460,7 +455,6 @@ typedef struct {
|
|||||||
uint8_t stall_requested:1;
|
uint8_t stall_requested:1;
|
||||||
} udd_ep_job_t;
|
} udd_ep_job_t;
|
||||||
|
|
||||||
|
|
||||||
//! Array to register a job on bulk/interrupt/isochronous endpoint
|
//! Array to register a job on bulk/interrupt/isochronous endpoint
|
||||||
static udd_ep_job_t udd_ep_job[USB_DEVICE_MAX_EP];
|
static udd_ep_job_t udd_ep_job[USB_DEVICE_MAX_EP];
|
||||||
|
|
||||||
@@ -522,7 +516,6 @@ static bool udd_ep_interrupt(void);
|
|||||||
#endif // (0!=USB_DEVICE_MAX_EP)
|
#endif // (0!=USB_DEVICE_MAX_EP)
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
|
|
||||||
// ------------------------
|
// ------------------------
|
||||||
//--- INTERNAL ROUTINES TO MANAGED GLOBAL EVENTS
|
//--- INTERNAL ROUTINES TO MANAGED GLOBAL EVENTS
|
||||||
|
|
||||||
@@ -530,7 +523,7 @@ static bool udd_ep_interrupt(void);
|
|||||||
* \internal
|
* \internal
|
||||||
* \brief Function called by UOTGHS interrupt to manage USB Device interrupts
|
* \brief Function called by UOTGHS interrupt to manage USB Device interrupts
|
||||||
*
|
*
|
||||||
* USB Device interrupt events are splited in three parts:
|
* USB Device interrupt events are split in three parts:
|
||||||
* - USB line events (SOF, reset, suspend, resume, wakeup)
|
* - USB line events (SOF, reset, suspend, resume, wakeup)
|
||||||
* - control endpoint events (setup reception, end of data transfer, underflow, overflow, stall)
|
* - control endpoint events (setup reception, end of data transfer, underflow, overflow, stall)
|
||||||
* - bulk/interrupt/isochronous endpoints events (end of data transfer)
|
* - bulk/interrupt/isochronous endpoints events (end of data transfer)
|
||||||
@@ -671,13 +664,11 @@ udd_interrupt_sof_end:
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool udd_include_vbus_monitoring(void)
|
bool udd_include_vbus_monitoring(void)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void udd_enable(void)
|
void udd_enable(void)
|
||||||
{
|
{
|
||||||
irqflags_t flags;
|
irqflags_t flags;
|
||||||
@@ -764,7 +755,6 @@ void udd_enable(void)
|
|||||||
cpu_irq_restore(flags);
|
cpu_irq_restore(flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void udd_disable(void)
|
void udd_disable(void)
|
||||||
{
|
{
|
||||||
irqflags_t flags;
|
irqflags_t flags;
|
||||||
@@ -866,7 +856,6 @@ void udd_attach(void)
|
|||||||
cpu_irq_restore(flags);
|
cpu_irq_restore(flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void udd_detach(void)
|
void udd_detach(void)
|
||||||
{
|
{
|
||||||
otg_unfreeze_clock();
|
otg_unfreeze_clock();
|
||||||
@@ -883,7 +872,6 @@ void udd_detach(void)
|
|||||||
udd_sleep_mode(false);
|
udd_sleep_mode(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool udd_is_high_speed(void)
|
bool udd_is_high_speed(void)
|
||||||
{
|
{
|
||||||
#ifdef USB_DEVICE_HS_SUPPORT
|
#ifdef USB_DEVICE_HS_SUPPORT
|
||||||
@@ -893,7 +881,6 @@ bool udd_is_high_speed(void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void udd_set_address(uint8_t address)
|
void udd_set_address(uint8_t address)
|
||||||
{
|
{
|
||||||
udd_disable_address();
|
udd_disable_address();
|
||||||
@@ -901,13 +888,11 @@ void udd_set_address(uint8_t address)
|
|||||||
udd_enable_address();
|
udd_enable_address();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
uint8_t udd_getaddress(void)
|
uint8_t udd_getaddress(void)
|
||||||
{
|
{
|
||||||
return udd_get_configured_address();
|
return udd_get_configured_address();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
uint16_t udd_get_frame_number(void)
|
uint16_t udd_get_frame_number(void)
|
||||||
{
|
{
|
||||||
return udd_frame_number();
|
return udd_frame_number();
|
||||||
@@ -930,14 +915,12 @@ void udd_send_remotewakeup(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void udd_set_setup_payload(uint8_t *payload, uint16_t payload_size)
|
void udd_set_setup_payload(uint8_t *payload, uint16_t payload_size)
|
||||||
{
|
{
|
||||||
udd_g_ctrlreq.payload = payload;
|
udd_g_ctrlreq.payload = payload;
|
||||||
udd_g_ctrlreq.payload_size = payload_size;
|
udd_g_ctrlreq.payload_size = payload_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if (0 != USB_DEVICE_MAX_EP)
|
#if (0 != USB_DEVICE_MAX_EP)
|
||||||
bool udd_ep_alloc(udd_ep_id_t ep, uint8_t bmAttributes,
|
bool udd_ep_alloc(udd_ep_id_t ep, uint8_t bmAttributes,
|
||||||
uint16_t MaxEndpointSize)
|
uint16_t MaxEndpointSize)
|
||||||
@@ -1061,7 +1044,6 @@ bool udd_ep_alloc(udd_ep_id_t ep, uint8_t bmAttributes,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void udd_ep_free(udd_ep_id_t ep)
|
void udd_ep_free(udd_ep_id_t ep)
|
||||||
{
|
{
|
||||||
uint8_t ep_index = ep & USB_EP_ADDR_MASK;
|
uint8_t ep_index = ep & USB_EP_ADDR_MASK;
|
||||||
@@ -1074,14 +1056,12 @@ void udd_ep_free(udd_ep_id_t ep)
|
|||||||
udd_ep_job[ep_index - 1].stall_requested = false;
|
udd_ep_job[ep_index - 1].stall_requested = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool udd_ep_is_halted(udd_ep_id_t ep)
|
bool udd_ep_is_halted(udd_ep_id_t ep)
|
||||||
{
|
{
|
||||||
uint8_t ep_index = ep & USB_EP_ADDR_MASK;
|
uint8_t ep_index = ep & USB_EP_ADDR_MASK;
|
||||||
return Is_udd_endpoint_stall_requested(ep_index);
|
return Is_udd_endpoint_stall_requested(ep_index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool udd_ep_set_halt(udd_ep_id_t ep)
|
bool udd_ep_set_halt(udd_ep_id_t ep)
|
||||||
{
|
{
|
||||||
uint8_t ep_index = ep & USB_EP_ADDR_MASK;
|
uint8_t ep_index = ep & USB_EP_ADDR_MASK;
|
||||||
@@ -1122,7 +1102,6 @@ bool udd_ep_set_halt(udd_ep_id_t ep)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool udd_ep_clear_halt(udd_ep_id_t ep)
|
bool udd_ep_clear_halt(udd_ep_id_t ep)
|
||||||
{
|
{
|
||||||
uint8_t ep_index = ep & USB_EP_ADDR_MASK;
|
uint8_t ep_index = ep & USB_EP_ADDR_MASK;
|
||||||
@@ -1163,7 +1142,6 @@ bool udd_ep_clear_halt(udd_ep_id_t ep)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool udd_ep_run(udd_ep_id_t ep, bool b_shortpacket,
|
bool udd_ep_run(udd_ep_id_t ep, bool b_shortpacket,
|
||||||
uint8_t * buf, iram_size_t buf_size,
|
uint8_t * buf, iram_size_t buf_size,
|
||||||
udd_callback_trans_t callback)
|
udd_callback_trans_t callback)
|
||||||
@@ -1230,7 +1208,6 @@ bool udd_ep_run(udd_ep_id_t ep, bool b_shortpacket,
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void udd_ep_abort(udd_ep_id_t ep)
|
void udd_ep_abort(udd_ep_id_t ep)
|
||||||
{
|
{
|
||||||
uint8_t ep_index = ep & USB_EP_ADDR_MASK;
|
uint8_t ep_index = ep & USB_EP_ADDR_MASK;
|
||||||
@@ -1259,7 +1236,6 @@ void udd_ep_abort(udd_ep_id_t ep)
|
|||||||
udd_ep_abort_job(ep);
|
udd_ep_abort_job(ep);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool udd_ep_wait_stall_clear(udd_ep_id_t ep,
|
bool udd_ep_wait_stall_clear(udd_ep_id_t ep,
|
||||||
udd_callback_halt_cleared_t callback)
|
udd_callback_halt_cleared_t callback)
|
||||||
{
|
{
|
||||||
@@ -1294,7 +1270,6 @@ bool udd_ep_wait_stall_clear(udd_ep_id_t ep,
|
|||||||
}
|
}
|
||||||
#endif // (0 != USB_DEVICE_MAX_EP)
|
#endif // (0 != USB_DEVICE_MAX_EP)
|
||||||
|
|
||||||
|
|
||||||
#ifdef USB_DEVICE_HS_SUPPORT
|
#ifdef USB_DEVICE_HS_SUPPORT
|
||||||
|
|
||||||
void udd_test_mode_j(void)
|
void udd_test_mode_j(void)
|
||||||
@@ -1303,20 +1278,17 @@ void udd_test_mode_j(void)
|
|||||||
udd_enable_hs_test_mode_j();
|
udd_enable_hs_test_mode_j();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void udd_test_mode_k(void)
|
void udd_test_mode_k(void)
|
||||||
{
|
{
|
||||||
udd_enable_hs_test_mode();
|
udd_enable_hs_test_mode();
|
||||||
udd_enable_hs_test_mode_k();
|
udd_enable_hs_test_mode_k();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void udd_test_mode_se0_nak(void)
|
void udd_test_mode_se0_nak(void)
|
||||||
{
|
{
|
||||||
udd_enable_hs_test_mode();
|
udd_enable_hs_test_mode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void udd_test_mode_packet(void)
|
void udd_test_mode_packet(void)
|
||||||
{
|
{
|
||||||
uint8_t i;
|
uint8_t i;
|
||||||
@@ -1360,8 +1332,6 @@ void udd_test_mode_packet(void)
|
|||||||
}
|
}
|
||||||
#endif // USB_DEVICE_HS_SUPPORT
|
#endif // USB_DEVICE_HS_SUPPORT
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// ------------------------
|
// ------------------------
|
||||||
//--- INTERNAL ROUTINES TO MANAGED THE CONTROL ENDPOINT
|
//--- INTERNAL ROUTINES TO MANAGED THE CONTROL ENDPOINT
|
||||||
|
|
||||||
@@ -1411,7 +1381,6 @@ static void udd_ctrl_init(void)
|
|||||||
udd_ep_control_state = UDD_EPCTRL_SETUP;
|
udd_ep_control_state = UDD_EPCTRL_SETUP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void udd_ctrl_setup_received(void)
|
static void udd_ctrl_setup_received(void)
|
||||||
{
|
{
|
||||||
irqflags_t flags;
|
irqflags_t flags;
|
||||||
@@ -1473,7 +1442,6 @@ static void udd_ctrl_setup_received(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void udd_ctrl_in_sent(void)
|
static void udd_ctrl_in_sent(void)
|
||||||
{
|
{
|
||||||
static bool b_shortpacket = false;
|
static bool b_shortpacket = false;
|
||||||
@@ -1557,7 +1525,6 @@ static void udd_ctrl_in_sent(void)
|
|||||||
cpu_irq_restore(flags);
|
cpu_irq_restore(flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void udd_ctrl_out_received(void)
|
static void udd_ctrl_out_received(void)
|
||||||
{
|
{
|
||||||
irqflags_t flags;
|
irqflags_t flags;
|
||||||
@@ -1600,7 +1567,7 @@ static void udd_ctrl_out_received(void)
|
|||||||
udd_ctrl_payload_buf_cnt))) {
|
udd_ctrl_payload_buf_cnt))) {
|
||||||
// End of reception because it is a short packet
|
// End of reception because it is a short packet
|
||||||
// Before send ZLP, call intermediate callback
|
// Before send ZLP, call intermediate callback
|
||||||
// in case of data receiv generate a stall
|
// in case of data receive generate a stall
|
||||||
udd_g_ctrlreq.payload_size = udd_ctrl_payload_buf_cnt;
|
udd_g_ctrlreq.payload_size = udd_ctrl_payload_buf_cnt;
|
||||||
if (NULL != udd_g_ctrlreq.over_under_run) {
|
if (NULL != udd_g_ctrlreq.over_under_run) {
|
||||||
if (!udd_g_ctrlreq.over_under_run()) {
|
if (!udd_g_ctrlreq.over_under_run()) {
|
||||||
@@ -1648,7 +1615,6 @@ static void udd_ctrl_out_received(void)
|
|||||||
cpu_irq_restore(flags);
|
cpu_irq_restore(flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void udd_ctrl_underflow(void)
|
static void udd_ctrl_underflow(void)
|
||||||
{
|
{
|
||||||
if (Is_udd_out_received(0))
|
if (Is_udd_out_received(0))
|
||||||
@@ -1665,7 +1631,6 @@ static void udd_ctrl_underflow(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void udd_ctrl_overflow(void)
|
static void udd_ctrl_overflow(void)
|
||||||
{
|
{
|
||||||
if (Is_udd_in_send(0))
|
if (Is_udd_in_send(0))
|
||||||
@@ -1681,7 +1646,6 @@ static void udd_ctrl_overflow(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void udd_ctrl_stall_data(void)
|
static void udd_ctrl_stall_data(void)
|
||||||
{
|
{
|
||||||
// Stall all packets on IN & OUT control endpoint
|
// Stall all packets on IN & OUT control endpoint
|
||||||
@@ -1689,7 +1653,6 @@ static void udd_ctrl_stall_data(void)
|
|||||||
udd_enable_stall_handshake(0);
|
udd_enable_stall_handshake(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void udd_ctrl_send_zlp_in(void)
|
static void udd_ctrl_send_zlp_in(void)
|
||||||
{
|
{
|
||||||
irqflags_t flags;
|
irqflags_t flags;
|
||||||
@@ -1707,7 +1670,6 @@ static void udd_ctrl_send_zlp_in(void)
|
|||||||
cpu_irq_restore(flags);
|
cpu_irq_restore(flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void udd_ctrl_send_zlp_out(void)
|
static void udd_ctrl_send_zlp_out(void)
|
||||||
{
|
{
|
||||||
irqflags_t flags;
|
irqflags_t flags;
|
||||||
@@ -1723,7 +1685,6 @@ static void udd_ctrl_send_zlp_out(void)
|
|||||||
cpu_irq_restore(flags);
|
cpu_irq_restore(flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void udd_ctrl_endofrequest(void)
|
static void udd_ctrl_endofrequest(void)
|
||||||
{
|
{
|
||||||
// If a callback is registered then call it
|
// If a callback is registered then call it
|
||||||
@@ -1732,7 +1693,6 @@ static void udd_ctrl_endofrequest(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static bool udd_ctrl_interrupt(void)
|
static bool udd_ctrl_interrupt(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -1783,7 +1743,6 @@ static bool udd_ctrl_interrupt(void)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ------------------------
|
// ------------------------
|
||||||
//--- INTERNAL ROUTINES TO MANAGED THE BULK/INTERRUPT/ISOCHRONOUS ENDPOINTS
|
//--- INTERNAL ROUTINES TO MANAGED THE BULK/INTERRUPT/ISOCHRONOUS ENDPOINTS
|
||||||
|
|
||||||
@@ -1798,7 +1757,6 @@ static void udd_ep_job_table_reset(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void udd_ep_job_table_kill(void)
|
static void udd_ep_job_table_kill(void)
|
||||||
{
|
{
|
||||||
uint8_t i;
|
uint8_t i;
|
||||||
@@ -1809,7 +1767,6 @@ static void udd_ep_job_table_kill(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void udd_ep_abort_job(udd_ep_id_t ep)
|
static void udd_ep_abort_job(udd_ep_id_t ep)
|
||||||
{
|
{
|
||||||
ep &= USB_EP_ADDR_MASK;
|
ep &= USB_EP_ADDR_MASK;
|
||||||
@@ -1818,7 +1775,6 @@ static void udd_ep_abort_job(udd_ep_id_t ep)
|
|||||||
udd_ep_finish_job(&udd_ep_job[ep - 1], true, ep);
|
udd_ep_finish_job(&udd_ep_job[ep - 1], true, ep);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void udd_ep_finish_job(udd_ep_job_t * ptr_job, bool b_abort, uint8_t ep_num)
|
static void udd_ep_finish_job(udd_ep_job_t * ptr_job, bool b_abort, uint8_t ep_num)
|
||||||
{
|
{
|
||||||
if (ptr_job->busy == false) {
|
if (ptr_job->busy == false) {
|
||||||
@@ -1852,7 +1808,7 @@ static void udd_ep_trans_done(udd_ep_id_t ep)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ptr_job->buf_cnt != ptr_job->buf_size) {
|
if (ptr_job->buf_cnt != ptr_job->buf_size) {
|
||||||
// Need to send or receiv other data
|
// Need to send or receive other data
|
||||||
next_trans = ptr_job->buf_size - ptr_job->buf_cnt;
|
next_trans = ptr_job->buf_size - ptr_job->buf_cnt;
|
||||||
|
|
||||||
if (UDD_ENDPOINT_MAX_TRANS < next_trans) {
|
if (UDD_ENDPOINT_MAX_TRANS < next_trans) {
|
||||||
@@ -1889,7 +1845,6 @@ static void udd_ep_trans_done(udd_ep_id_t ep)
|
|||||||
udd_dma_ctrl |= UOTGHS_DEVDMACONTROL_END_BUFFIT |
|
udd_dma_ctrl |= UOTGHS_DEVDMACONTROL_END_BUFFIT |
|
||||||
UOTGHS_DEVDMACONTROL_CHANN_ENB;
|
UOTGHS_DEVDMACONTROL_CHANN_ENB;
|
||||||
|
|
||||||
|
|
||||||
// Disable IRQs to have a short sequence
|
// Disable IRQs to have a short sequence
|
||||||
// between read of EOT_STA and DMA enable
|
// between read of EOT_STA and DMA enable
|
||||||
flags = cpu_irq_save();
|
flags = cpu_irq_save();
|
||||||
|
|||||||
@@ -129,7 +129,6 @@ extern "C" {
|
|||||||
#define Is_udd_vbus_transition() (Tst_bits(UOTGHS->UOTGHS_SR, UOTGHS_SR_VBUSTI))
|
#define Is_udd_vbus_transition() (Tst_bits(UOTGHS->UOTGHS_SR, UOTGHS_SR_VBUSTI))
|
||||||
//! @}
|
//! @}
|
||||||
|
|
||||||
|
|
||||||
//! @name UOTGHS device attach control
|
//! @name UOTGHS device attach control
|
||||||
//! These macros manage the UOTGHS Device attach.
|
//! These macros manage the UOTGHS Device attach.
|
||||||
//! @{
|
//! @{
|
||||||
@@ -141,7 +140,6 @@ extern "C" {
|
|||||||
#define Is_udd_detached() (Tst_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_DETACH))
|
#define Is_udd_detached() (Tst_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_DETACH))
|
||||||
//! @}
|
//! @}
|
||||||
|
|
||||||
|
|
||||||
//! @name UOTGHS device bus events control
|
//! @name UOTGHS device bus events control
|
||||||
//! These macros manage the UOTGHS Device bus events.
|
//! These macros manage the UOTGHS Device bus events.
|
||||||
//! @{
|
//! @{
|
||||||
@@ -246,7 +244,6 @@ extern "C" {
|
|||||||
#define udd_get_configured_address() (Rd_bitfield(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_UADD_Msk))
|
#define udd_get_configured_address() (Rd_bitfield(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_UADD_Msk))
|
||||||
//! @}
|
//! @}
|
||||||
|
|
||||||
|
|
||||||
//! @name UOTGHS Device endpoint drivers
|
//! @name UOTGHS Device endpoint drivers
|
||||||
//! These macros manage the common features of the endpoints.
|
//! These macros manage the common features of the endpoints.
|
||||||
//! @{
|
//! @{
|
||||||
@@ -330,7 +327,6 @@ extern "C" {
|
|||||||
#define udd_data_toggle(ep) (Rd_bitfield(UOTGHS_ARRAY(UOTGHS_DEVEPTISR[0], ep), UOTGHS_DEVEPTISR_DTSEQ_Msk))
|
#define udd_data_toggle(ep) (Rd_bitfield(UOTGHS_ARRAY(UOTGHS_DEVEPTISR[0], ep), UOTGHS_DEVEPTISR_DTSEQ_Msk))
|
||||||
//! @}
|
//! @}
|
||||||
|
|
||||||
|
|
||||||
//! @name UOTGHS Device control endpoint
|
//! @name UOTGHS Device control endpoint
|
||||||
//! These macros control the endpoints.
|
//! These macros control the endpoints.
|
||||||
//! @{
|
//! @{
|
||||||
@@ -530,7 +526,6 @@ extern "C" {
|
|||||||
//! Tests if IN sending interrupt is enabled
|
//! Tests if IN sending interrupt is enabled
|
||||||
#define Is_udd_in_send_interrupt_enabled(ep) (Tst_bits(UOTGHS_ARRAY(UOTGHS_DEVEPTIMR[0], ep), UOTGHS_DEVEPTIMR_TXINE))
|
#define Is_udd_in_send_interrupt_enabled(ep) (Tst_bits(UOTGHS_ARRAY(UOTGHS_DEVEPTIMR[0], ep), UOTGHS_DEVEPTIMR_TXINE))
|
||||||
|
|
||||||
|
|
||||||
//! Get 64-, 32-, 16- or 8-bit access to FIFO data register of selected endpoint.
|
//! Get 64-, 32-, 16- or 8-bit access to FIFO data register of selected endpoint.
|
||||||
//! @param ep Endpoint of which to access FIFO data register
|
//! @param ep Endpoint of which to access FIFO data register
|
||||||
//! @param scale Data scale in bits: 64, 32, 16 or 8
|
//! @param scale Data scale in bits: 64, 32, 16 or 8
|
||||||
@@ -652,7 +647,6 @@ typedef struct {
|
|||||||
//! @}
|
//! @}
|
||||||
//! @}
|
//! @}
|
||||||
|
|
||||||
|
|
||||||
/// @cond 0
|
/// @cond 0
|
||||||
/**INDENT-OFF**/
|
/**INDENT-OFF**/
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
@@ -53,7 +53,6 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
//! \ingroup usb_group
|
//! \ingroup usb_group
|
||||||
//! \defgroup otg_group UOTGHS OTG Driver
|
//! \defgroup otg_group UOTGHS OTG Driver
|
||||||
//! UOTGHS low-level driver for OTG features
|
//! UOTGHS low-level driver for OTG features
|
||||||
@@ -74,7 +73,6 @@ bool otg_dual_enable(void);
|
|||||||
*/
|
*/
|
||||||
void otg_dual_disable(void);
|
void otg_dual_disable(void);
|
||||||
|
|
||||||
|
|
||||||
//! @name UOTGHS OTG ID pin management
|
//! @name UOTGHS OTG ID pin management
|
||||||
//! The ID pin come from the USB OTG connector (A and B receptable) and
|
//! The ID pin come from the USB OTG connector (A and B receptable) and
|
||||||
//! allows to select the USB mode host or device.
|
//! allows to select the USB mode host or device.
|
||||||
|
|||||||
@@ -374,7 +374,6 @@ typedef struct {
|
|||||||
uint8_t bNumDeviceCaps;
|
uint8_t bNumDeviceCaps;
|
||||||
} usb_dev_bos_desc_t;
|
} usb_dev_bos_desc_t;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief USB Device Capabilities - USB 2.0 Extension Descriptor structure
|
* \brief USB Device Capabilities - USB 2.0 Extension Descriptor structure
|
||||||
*
|
*
|
||||||
@@ -411,7 +410,6 @@ typedef struct {
|
|||||||
uint8_t iFunction; //!< Index of string descriptor
|
uint8_t iFunction; //!< Index of string descriptor
|
||||||
} usb_association_desc_t;
|
} usb_association_desc_t;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Standard USB configuration descriptor structure
|
* \brief Standard USB configuration descriptor structure
|
||||||
*/
|
*/
|
||||||
@@ -426,7 +424,6 @@ typedef struct {
|
|||||||
uint8_t bMaxPower;
|
uint8_t bMaxPower;
|
||||||
} usb_conf_desc_t;
|
} usb_conf_desc_t;
|
||||||
|
|
||||||
|
|
||||||
#define USB_CONFIG_ATTR_MUST_SET (1 << 7) //!< Must always be set
|
#define USB_CONFIG_ATTR_MUST_SET (1 << 7) //!< Must always be set
|
||||||
#define USB_CONFIG_ATTR_BUS_POWERED (0 << 6) //!< Bus-powered
|
#define USB_CONFIG_ATTR_BUS_POWERED (0 << 6) //!< Bus-powered
|
||||||
#define USB_CONFIG_ATTR_SELF_POWERED (1 << 6) //!< Self-powered
|
#define USB_CONFIG_ATTR_SELF_POWERED (1 << 6) //!< Self-powered
|
||||||
@@ -475,7 +472,6 @@ typedef struct {
|
|||||||
uint8_t bInterval;
|
uint8_t bInterval;
|
||||||
} usb_ep_desc_t;
|
} usb_ep_desc_t;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief A standard USB string descriptor structure
|
* \brief A standard USB string descriptor structure
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -168,7 +168,6 @@ COMPILER_PACK_SET(1)
|
|||||||
//! \name USB CDC Descriptors
|
//! \name USB CDC Descriptors
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
|
|
||||||
//! CDC Header Functional Descriptor
|
//! CDC Header Functional Descriptor
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint8_t bFunctionLength;
|
uint8_t bFunctionLength;
|
||||||
@@ -203,7 +202,6 @@ typedef struct {
|
|||||||
uint8_t bSlaveInterface0;
|
uint8_t bSlaveInterface0;
|
||||||
} usb_cdc_union_desc_t;
|
} usb_cdc_union_desc_t;
|
||||||
|
|
||||||
|
|
||||||
//! \name USB CDC Call Management Capabilities
|
//! \name USB CDC Call Management Capabilities
|
||||||
//@{
|
//@{
|
||||||
//! Device handles call management itself
|
//! Device handles call management itself
|
||||||
@@ -278,7 +276,6 @@ typedef struct {
|
|||||||
//@}
|
//@}
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
|
|
||||||
//! \name USB CDC notification message
|
//! \name USB CDC notification message
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,6 @@
|
|||||||
#ifndef _USB_PROTOCOL_MSC_H_
|
#ifndef _USB_PROTOCOL_MSC_H_
|
||||||
#define _USB_PROTOCOL_MSC_H_
|
#define _USB_PROTOCOL_MSC_H_
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \ingroup usb_protocol_group
|
* \ingroup usb_protocol_group
|
||||||
* \defgroup usb_msc_protocol USB Mass Storage Class (MSC) protocol definitions
|
* \defgroup usb_msc_protocol USB Mass Storage Class (MSC) protocol definitions
|
||||||
@@ -89,7 +88,6 @@
|
|||||||
#define MSC_PROTOCOL_BULK 0x50 //!< Bulk-only
|
#define MSC_PROTOCOL_BULK 0x50 //!< Bulk-only
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief MSC USB requests (bRequest)
|
* \brief MSC USB requests (bRequest)
|
||||||
*/
|
*/
|
||||||
@@ -98,7 +96,6 @@ enum usb_reqid_msc {
|
|||||||
USB_REQ_MSC_GET_MAX_LUN = 0xFE //!< Get Max LUN
|
USB_REQ_MSC_GET_MAX_LUN = 0xFE //!< Get Max LUN
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
COMPILER_PACK_SET(1)
|
COMPILER_PACK_SET(1)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -122,7 +119,6 @@ struct usb_msc_cbw {
|
|||||||
#define USB_CBW_LEN_MASK 0x1F //!< Valid bits in bCBWCBLength
|
#define USB_CBW_LEN_MASK 0x1F //!< Valid bits in bCBWCBLength
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \name A Command Status Wrapper (CSW).
|
* \name A Command Status Wrapper (CSW).
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -34,13 +34,13 @@
|
|||||||
|
|
||||||
#if ENABLED(WIFISUPPORT)
|
#if ENABLED(WIFISUPPORT)
|
||||||
#include <ESPAsyncWebServer.h>
|
#include <ESPAsyncWebServer.h>
|
||||||
#include "wifi.h"
|
#include "wifi/wifi.h"
|
||||||
#if ENABLED(OTASUPPORT)
|
#if ENABLED(OTASUPPORT)
|
||||||
#include "ota.h"
|
#include "wifi/ota.h"
|
||||||
#endif
|
#endif
|
||||||
#if ENABLED(WEBSUPPORT)
|
#if ENABLED(WEBSUPPORT)
|
||||||
#include "spiffs.h"
|
#include "wifi/spiffs.h"
|
||||||
#include "web.h"
|
#include "wifi/web.h"
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -175,8 +175,6 @@ uint8_t MarlinHAL::get_reset_source() { return rtc_get_reset_reason(1); }
|
|||||||
|
|
||||||
void MarlinHAL::reboot() { ESP.restart(); }
|
void MarlinHAL::reboot() { ESP.restart(); }
|
||||||
|
|
||||||
void _delay_ms(const int ms) { delay(ms); }
|
|
||||||
|
|
||||||
// return free memory between end of heap (or end bss) and whatever is current
|
// return free memory between end of heap (or end bss) and whatever is current
|
||||||
int MarlinHAL::freeMemory() { return ESP.getFreeHeap(); }
|
int MarlinHAL::freeMemory() { return ESP.getFreeHeap(); }
|
||||||
|
|
||||||
@@ -209,16 +207,17 @@ int MarlinHAL::freeMemory() { return ESP.getFreeHeap(); }
|
|||||||
// ADC
|
// ADC
|
||||||
// ------------------------
|
// ------------------------
|
||||||
|
|
||||||
#define ADC1_CHANNEL(pin) ADC1_GPIO ## pin ## _CHANNEL
|
// https://docs.espressif.com/projects/esp-idf/en/release-v4.4/esp32/api-reference/peripherals/adc.html
|
||||||
|
|
||||||
adc1_channel_t get_channel(int pin) {
|
adc1_channel_t get_channel(int pin) {
|
||||||
switch (pin) {
|
switch (pin) {
|
||||||
case 39: return ADC1_CHANNEL(39);
|
case 39: return ADC1_CHANNEL_3;
|
||||||
case 36: return ADC1_CHANNEL(36);
|
case 36: return ADC1_CHANNEL_0;
|
||||||
case 35: return ADC1_CHANNEL(35);
|
case 35: return ADC1_CHANNEL_7;
|
||||||
case 34: return ADC1_CHANNEL(34);
|
case 34: return ADC1_CHANNEL_6;
|
||||||
case 33: return ADC1_CHANNEL(33);
|
case 33: return ADC1_CHANNEL_5;
|
||||||
case 32: return ADC1_CHANNEL(32);
|
case 32: return ADC1_CHANNEL_4;
|
||||||
|
case 37: return ADC1_CHANNEL_1;
|
||||||
|
case 38: return ADC1_CHANNEL_2;
|
||||||
}
|
}
|
||||||
return ADC1_CHANNEL_MAX;
|
return ADC1_CHANNEL_MAX;
|
||||||
}
|
}
|
||||||
@@ -243,12 +242,13 @@ void MarlinHAL::adc_init() {
|
|||||||
TERN_(HAS_TEMP_ADC_5, adc1_set_attenuation(get_channel(TEMP_5_PIN), ADC_ATTEN_11db));
|
TERN_(HAS_TEMP_ADC_5, adc1_set_attenuation(get_channel(TEMP_5_PIN), ADC_ATTEN_11db));
|
||||||
TERN_(HAS_TEMP_ADC_6, adc2_set_attenuation(get_channel(TEMP_6_PIN), ADC_ATTEN_11db));
|
TERN_(HAS_TEMP_ADC_6, adc2_set_attenuation(get_channel(TEMP_6_PIN), ADC_ATTEN_11db));
|
||||||
TERN_(HAS_TEMP_ADC_7, adc3_set_attenuation(get_channel(TEMP_7_PIN), ADC_ATTEN_11db));
|
TERN_(HAS_TEMP_ADC_7, adc3_set_attenuation(get_channel(TEMP_7_PIN), ADC_ATTEN_11db));
|
||||||
TERN_(HAS_HEATED_BED, adc1_set_attenuation(get_channel(TEMP_BED_PIN), ADC_ATTEN_11db));
|
TERN_(HAS_TEMP_ADC_BED, adc1_set_attenuation(get_channel(TEMP_BED_PIN), ADC_ATTEN_11db));
|
||||||
TERN_(HAS_TEMP_CHAMBER, adc1_set_attenuation(get_channel(TEMP_CHAMBER_PIN), ADC_ATTEN_11db));
|
TERN_(HAS_TEMP_ADC_CHAMBER, adc1_set_attenuation(get_channel(TEMP_CHAMBER_PIN), ADC_ATTEN_11db));
|
||||||
TERN_(HAS_TEMP_PROBE, adc1_set_attenuation(get_channel(TEMP_PROBE_PIN), ADC_ATTEN_11db));
|
TERN_(HAS_TEMP_ADC_PROBE, adc1_set_attenuation(get_channel(TEMP_PROBE_PIN), ADC_ATTEN_11db));
|
||||||
TERN_(HAS_TEMP_COOLER, adc1_set_attenuation(get_channel(TEMP_COOLER_PIN), ADC_ATTEN_11db));
|
TERN_(HAS_TEMP_ADC_COOLER, adc1_set_attenuation(get_channel(TEMP_COOLER_PIN), ADC_ATTEN_11db));
|
||||||
TERN_(HAS_TEMP_BOARD, adc1_set_attenuation(get_channel(TEMP_BOARD_PIN), ADC_ATTEN_11db));
|
TERN_(HAS_TEMP_ADC_BOARD, adc1_set_attenuation(get_channel(TEMP_BOARD_PIN), ADC_ATTEN_11db));
|
||||||
TERN_(FILAMENT_WIDTH_SENSOR, adc1_set_attenuation(get_channel(FILWIDTH_PIN), ADC_ATTEN_11db));
|
TERN_(HAS_FILWIDTH_ADC, adc1_set_attenuation(get_channel(FILWIDTH_PIN), ADC_ATTEN_11db));
|
||||||
|
TERN_(HAS_FILWIDTH2_ADC, adc1_set_attenuation(get_channel(FILWIDTH2_PIN), ADC_ATTEN_11db));
|
||||||
|
|
||||||
// Note that adc2 is shared with the WiFi module, which has higher priority, so the conversion may fail.
|
// Note that adc2 is shared with the WiFi module, which has higher priority, so the conversion may fail.
|
||||||
// That's why we're not setting it up here.
|
// That's why we're not setting it up here.
|
||||||
|
|||||||
@@ -37,11 +37,11 @@
|
|||||||
#include "i2s.h"
|
#include "i2s.h"
|
||||||
|
|
||||||
#if ENABLED(WIFISUPPORT)
|
#if ENABLED(WIFISUPPORT)
|
||||||
#include "WebSocketSerial.h"
|
#include "wifi/WebSocketSerial.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(ESP3D_WIFISUPPORT)
|
#if ENABLED(ESP3D_WIFISUPPORT)
|
||||||
#include "esp3dlib.h"
|
#include <esp3dlib.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "FlushableHardwareSerial.h"
|
#include "FlushableHardwareSerial.h"
|
||||||
@@ -64,10 +64,10 @@
|
|||||||
#define CRITICAL_SECTION_END() portEXIT_CRITICAL(&hal.spinlock)
|
#define CRITICAL_SECTION_END() portEXIT_CRITICAL(&hal.spinlock)
|
||||||
|
|
||||||
#define HAL_CAN_SET_PWM_FREQ // This HAL supports PWM Frequency adjustment
|
#define HAL_CAN_SET_PWM_FREQ // This HAL supports PWM Frequency adjustment
|
||||||
#define PWM_FREQUENCY 1000u // Default PWM frequency when set_pwm_duty() is called without set_pwm_frequency()
|
#define PWM_FREQUENCY 1000U // Default PWM frequency when set_pwm_duty() is called without set_pwm_frequency()
|
||||||
#define PWM_RESOLUTION 10u // Default PWM bit resolution
|
#define PWM_RESOLUTION 10U // Default PWM bit resolution
|
||||||
#define CHANNEL_MAX_NUM 15u // max PWM channel # to allocate (7 to only use low speed, 15 to use low & high)
|
#define CHANNEL_MAX_NUM 15U // max PWM channel # to allocate (7 to only use low speed, 15 to use low & high)
|
||||||
#define MAX_PWM_IOPIN 33u // hardware pwm pins < 34
|
#define MAX_PWM_IOPIN 33U // hardware pwm pins < 34
|
||||||
#ifndef MAX_EXPANDER_BITS
|
#ifndef MAX_EXPANDER_BITS
|
||||||
#define MAX_EXPANDER_BITS 32 // I2S expander bit width (max 32)
|
#define MAX_EXPANDER_BITS 32 // I2S expander bit width (max 32)
|
||||||
#endif
|
#endif
|
||||||
@@ -165,8 +165,6 @@ int freeMemory();
|
|||||||
|
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
|
||||||
void _delay_ms(const int ms);
|
|
||||||
|
|
||||||
// ------------------------
|
// ------------------------
|
||||||
// MarlinHAL Class
|
// MarlinHAL Class
|
||||||
// ------------------------
|
// ------------------------
|
||||||
@@ -194,9 +192,9 @@ public:
|
|||||||
static void isr_on() { if (spinlock.owner != portMUX_FREE_VAL) portEXIT_CRITICAL(&spinlock); }
|
static void isr_on() { if (spinlock.owner != portMUX_FREE_VAL) portEXIT_CRITICAL(&spinlock); }
|
||||||
static void isr_off() { portENTER_CRITICAL(&spinlock); }
|
static void isr_off() { portENTER_CRITICAL(&spinlock); }
|
||||||
|
|
||||||
static void delay_ms(const int ms) { _delay_ms(ms); }
|
static void delay_ms(const int ms) { delay(ms); }
|
||||||
|
|
||||||
// Tasks, called from idle()
|
// Tasks, called from marlin.idle()
|
||||||
static void idletask();
|
static void idletask();
|
||||||
|
|
||||||
// Reset
|
// Reset
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ Servo::Servo() {}
|
|||||||
|
|
||||||
int8_t Servo::attach(const int inPin) {
|
int8_t Servo::attach(const int inPin) {
|
||||||
if (inPin > 0) pin = inPin;
|
if (inPin > 0) pin = inPin;
|
||||||
channel = get_pwm_channel(pin, 50u, 16u);
|
channel = get_pwm_channel(pin, 50U, 16U);
|
||||||
return channel; // -1 if no PWM avail.
|
return channel; // -1 if no PWM avail.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user