My Marlin configs for Fabrikator Mini and CTC i3 Pro B
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

pins.h 56KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
  4. *
  5. * Based on Sprinter and grbl.
  6. * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
  7. *
  8. * This program is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  20. *
  21. */
  22. #pragma once
  23. #include "../core/boards.h"
  24. /**
  25. * Include pins definitions
  26. *
  27. * Pins numbering schemes:
  28. *
  29. * - Digital I/O pin number if used by READ/WRITE macros. (e.g., X_STEP_DIR)
  30. * The FastIO headers map digital pins to their ports and functions.
  31. *
  32. * - Analog Input number if used by analogRead or DAC. (e.g., TEMP_n_PIN)
  33. * These numbers are the same in any pin mapping.
  34. */
  35. #define MAX_EXTRUDERS 8
  36. #if MB(RAMPS_13_EFB, RAMPS_14_EFB, RAMPS_PLUS_EFB, RAMPS_14_RE_ARM_EFB, RAMPS_SMART_EFB, RAMPS_DUO_EFB, RAMPS4DUE_EFB)
  37. #define IS_RAMPS_EFB
  38. #elif MB(RAMPS_13_EEB, RAMPS_14_EEB, RAMPS_PLUS_EEB, RAMPS_14_RE_ARM_EEB, RAMPS_SMART_EEB, RAMPS_DUO_EEB, RAMPS4DUE_EEB)
  39. #define IS_RAMPS_EEB
  40. #elif MB(RAMPS_13_EFF, RAMPS_14_EFF, RAMPS_PLUS_EFF, RAMPS_14_RE_ARM_EFF, RAMPS_SMART_EFF, RAMPS_DUO_EFF, RAMPS4DUE_EFF)
  41. #define IS_RAMPS_EFF
  42. #elif MB(RAMPS_13_EEF, RAMPS_14_EEF, RAMPS_PLUS_EEF, RAMPS_14_RE_ARM_EEF, RAMPS_SMART_EEF, RAMPS_DUO_EEF, RAMPS4DUE_EEF)
  43. #define IS_RAMPS_EEF
  44. #elif MB(RAMPS_13_SF, RAMPS_14_SF, RAMPS_PLUS_SF, RAMPS_14_RE_ARM_SF, RAMPS_SMART_SF, RAMPS_DUO_SF, RAMPS4DUE_SF)
  45. #define IS_RAMPS_SF
  46. #endif
  47. #define HAS_FREE_AUX2_PINS !(BOTH(ULTRA_LCD, NEWPANEL) && ANY(PANEL_ONE, VIKI2, miniVIKI, MINIPANEL, REPRAPWORLD_KEYPAD))
  48. //
  49. // RAMPS 1.3 / 1.4 - ATmega1280, ATmega2560
  50. //
  51. #if MB(RAMPS_OLD)
  52. #include "ramps/pins_RAMPS_OLD.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  53. #elif MB(RAMPS_13_EFB)
  54. #include "ramps/pins_RAMPS_13.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  55. #elif MB(RAMPS_13_EEB)
  56. #include "ramps/pins_RAMPS_13.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  57. #elif MB(RAMPS_13_EFF)
  58. #include "ramps/pins_RAMPS_13.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  59. #elif MB(RAMPS_13_EEF)
  60. #include "ramps/pins_RAMPS_13.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  61. #elif MB(RAMPS_13_SF)
  62. #include "ramps/pins_RAMPS_13.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  63. #elif MB(RAMPS_14_EFB)
  64. #include "ramps/pins_RAMPS.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  65. #elif MB(RAMPS_14_EEB)
  66. #include "ramps/pins_RAMPS.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  67. #elif MB(RAMPS_14_EFF)
  68. #include "ramps/pins_RAMPS.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  69. #elif MB(RAMPS_14_EEF)
  70. #include "ramps/pins_RAMPS.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  71. #elif MB(RAMPS_14_SF)
  72. #include "ramps/pins_RAMPS.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  73. #elif MB(RAMPS_PLUS_EFB)
  74. #include "ramps/pins_RAMPS_PLUS.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  75. #elif MB(RAMPS_PLUS_EEB)
  76. #include "ramps/pins_RAMPS_PLUS.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  77. #elif MB(RAMPS_PLUS_EFF)
  78. #include "ramps/pins_RAMPS_PLUS.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  79. #elif MB(RAMPS_PLUS_EEF)
  80. #include "ramps/pins_RAMPS_PLUS.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  81. #elif MB(RAMPS_PLUS_SF)
  82. #include "ramps/pins_RAMPS_PLUS.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  83. //
  84. // RAMPS Derivatives - ATmega1280, ATmega2560
  85. //
  86. #elif MB(3DRAG)
  87. #include "ramps/pins_3DRAG.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  88. #elif MB(K8200)
  89. #include "ramps/pins_K8200.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 (3DRAG)
  90. #elif MB(K8400)
  91. #include "ramps/pins_K8400.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 (3DRAG)
  92. #elif MB(K8800)
  93. #include "ramps/pins_K8800.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 (3DRAG)
  94. #elif MB(BAM_DICE)
  95. #include "ramps/pins_RAMPS.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  96. #elif MB(BAM_DICE_DUE)
  97. #include "ramps/pins_BAM_DICE_DUE.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  98. #elif MB(MKS_BASE)
  99. #include "ramps/pins_MKS_BASE_10.h" // ATmega2560 env:mega2560
  100. #elif MB(MKS_BASE_14)
  101. #include "ramps/pins_MKS_BASE_14.h" // ATmega2560 env:mega2560
  102. #elif MB(MKS_BASE_15)
  103. #include "ramps/pins_MKS_BASE_15.h" // ATmega2560 env:mega2560
  104. #elif MB(MKS_BASE_16)
  105. #include "ramps/pins_MKS_BASE_16.h" // ATmega2560 env:mega2560
  106. #elif MB(MKS_BASE_HEROIC)
  107. #include "ramps/pins_MKS_BASE_HEROIC.h" // ATmega2560 env:mega2560
  108. #elif MB(MKS_GEN_13)
  109. #include "ramps/pins_MKS_GEN_13.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  110. #elif MB(MKS_GEN_L)
  111. #include "ramps/pins_MKS_GEN_L.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  112. #elif MB(KFB_2)
  113. #include "ramps/pins_BIQU_KFB_2.h" // ATmega2560 env:mega2560
  114. #elif MB(ZRIB_V20)
  115. #include "ramps/pins_ZRIB_V20.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 (MKS_GEN_13)
  116. #elif MB(FELIX2)
  117. #include "ramps/pins_FELIX2.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  118. #elif MB(RIGIDBOARD)
  119. #include "ramps/pins_RIGIDBOARD.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  120. #elif MB(RIGIDBOARD_V2)
  121. #include "ramps/pins_RIGIDBOARD_V2.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  122. #elif MB(SAINSMART_2IN1)
  123. #include "ramps/pins_SAINSMART_2IN1.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  124. #elif MB(ULTIMAKER)
  125. #include "ramps/pins_ULTIMAKER.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  126. #elif MB(ULTIMAKER_OLD)
  127. #include "ramps/pins_ULTIMAKER_OLD.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  128. #elif MB(AZTEEG_X3)
  129. #include "ramps/pins_AZTEEG_X3.h" // ATmega2560 env:mega2560
  130. #elif MB(AZTEEG_X3_PRO)
  131. #include "ramps/pins_AZTEEG_X3_PRO.h" // ATmega2560 env:mega2560
  132. #elif MB(ULTIMAIN_2)
  133. #include "ramps/pins_ULTIMAIN_2.h" // ATmega2560 env:mega2560
  134. #elif MB(FORMBOT_RAPTOR)
  135. #include "ramps/pins_FORMBOT_RAPTOR.h" // ATmega2560 env:mega2560
  136. #elif MB(FORMBOT_RAPTOR2)
  137. #include "ramps/pins_FORMBOT_RAPTOR2.h" // ATmega2560 env:mega2560
  138. #elif MB(FORMBOT_TREX2PLUS)
  139. #include "ramps/pins_FORMBOT_TREX2PLUS.h" // ATmega2560 env:mega2560
  140. #elif MB(FORMBOT_TREX3)
  141. #include "ramps/pins_FORMBOT_TREX3.h" // ATmega2560 env:mega2560
  142. #elif MB(RUMBA)
  143. #include "ramps/pins_RUMBA.h" // ATmega2560 env:mega2560
  144. #elif MB(RUMBA_RAISE3D)
  145. #include "ramps/pins_RUMBA_RAISE3D.h" // ATmega2560 env:mega2560
  146. #elif MB(RL200)
  147. #include "ramps/pins_RL200.h" // ATmega2560 env:mega2560
  148. #elif MB(BQ_ZUM_MEGA_3D)
  149. #include "ramps/pins_BQ_ZUM_MEGA_3D.h" // ATmega2560 env:mega2560
  150. #elif MB(MAKEBOARD_MINI)
  151. #include "ramps/pins_MAKEBOARD_MINI.h" // ATmega2560 env:mega2560
  152. #elif MB(TRIGORILLA_13)
  153. #include "ramps/pins_TRIGORILLA_13.h" // ATmega2560 env:mega2560
  154. #elif MB(TRIGORILLA_14)
  155. #include "ramps/pins_TRIGORILLA_14.h" // ATmega2560 env:mega2560
  156. #elif MB(TRIGORILLA_14_11)
  157. #include "ramps/pins_TRIGORILLA_14.h" // ATmega2560 env:mega2560
  158. #elif MB(RAMPS_ENDER_4)
  159. #include "ramps/pins_RAMPS_ENDER_4.h" // ATmega2560 env:mega2560
  160. #elif MB(RAMPS_CREALITY)
  161. #include "ramps/pins_RAMPS_CREALITY.h" // ATmega2560 env:mega2560
  162. #elif MB(RAMPS_DAGOMA)
  163. #include "ramps/pins_RAMPS_DAGOMA.h" // ATmega2560 env:mega2560
  164. #elif MB(FYSETC_F6_13)
  165. #include "ramps/pins_FYSETC_F6_13.h" // ATmega2560 env:FYSETC_F6_13
  166. #elif MB(FYSETC_F6_14)
  167. #include "ramps/pins_FYSETC_F6_14.h" // ATmega2560 env:FYSETC_F6_14
  168. #elif MB(DUPLICATOR_I3_PLUS)
  169. #include "ramps/pins_DUPLICATOR_I3_PLUS.h" // ATmega2560 env:mega2560
  170. #elif MB(VORON)
  171. #include "ramps/pins_VORON.h" // ATmega2560 env:mega2560
  172. #elif MB(TRONXY_V3_1_0)
  173. #include "ramps/pins_TRONXY_V3_1_0.h" // ATmega2560 env:mega2560
  174. #elif MB(Z_BOLT_X_SERIES)
  175. #include "ramps/pins_Z_BOLT_X_SERIES.h" // ATmega2560 env:mega2560
  176. #elif MB(TT_OSCAR)
  177. #include "ramps/pins_TT_OSCAR.h" // ATmega2560 env:mega2560
  178. #elif MB(TANGO)
  179. #include "ramps/pins_TANGO.h" // ATmega2560 env:mega2560
  180. #elif MB(MKS_GEN_L_V2)
  181. #include "ramps/pins_MKS_GEN_L_V2.h" // ATmega2560 env:mega2560
  182. #elif MB(COPYMASTER_3D)
  183. #include "ramps/pins_COPYMASTER_3D.h" // ATmega2560 env:mega2560
  184. #elif MB(ORTUR_4)
  185. #include "ramps/pins_ORTUR_4.h" // ATmega2560 env:mega2560
  186. //
  187. // RAMBo and derivatives
  188. //
  189. #elif MB(RAMBO)
  190. #include "rambo/pins_RAMBO.h" // ATmega2560 env:rambo
  191. #elif MB(MINIRAMBO, MINIRAMBO_10A)
  192. #include "rambo/pins_MINIRAMBO.h" // ATmega2560 env:rambo
  193. #elif MB(EINSY_RAMBO)
  194. #include "rambo/pins_EINSY_RAMBO.h" // ATmega2560 env:rambo
  195. #elif MB(EINSY_RETRO)
  196. #include "rambo/pins_EINSY_RETRO.h" // ATmega2560 env:rambo
  197. #elif MB(SCOOVO_X9H)
  198. #include "rambo/pins_SCOOVO_X9H.h" // ATmega2560 env:rambo
  199. //
  200. // Other ATmega1280, ATmega2560
  201. //
  202. #elif MB(CNCONTROLS_11)
  203. #include "mega/pins_CNCONTROLS_11.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  204. #elif MB(CNCONTROLS_12)
  205. #include "mega/pins_CNCONTROLS_12.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  206. #elif MB(CNCONTROLS_15)
  207. #include "mega/pins_CNCONTROLS_15.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  208. #elif MB(MIGHTYBOARD_REVE)
  209. #include "mega/pins_MIGHTYBOARD_REVE.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  210. #elif MB(CHEAPTRONIC)
  211. #include "mega/pins_CHEAPTRONIC.h" // ATmega2560 env:mega2560
  212. #elif MB(CHEAPTRONIC_V2)
  213. #include "mega/pins_CHEAPTRONICv2.h" // ATmega2560 env:mega2560
  214. #elif MB(MEGATRONICS)
  215. #include "mega/pins_MEGATRONICS.h" // ATmega2560 env:mega2560
  216. #elif MB(MEGATRONICS_2)
  217. #include "mega/pins_MEGATRONICS_2.h" // ATmega2560 env:mega2560
  218. #elif MB(MEGATRONICS_3, MEGATRONICS_31, MEGATRONICS_32)
  219. #include "mega/pins_MEGATRONICS_3.h" // ATmega2560 env:mega2560
  220. #elif MB(ELEFU_3)
  221. #include "mega/pins_ELEFU_3.h" // ATmega2560 env:mega2560
  222. #elif MB(LEAPFROG)
  223. #include "mega/pins_LEAPFROG.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  224. #elif MB(MEGACONTROLLER)
  225. #include "mega/pins_MEGACONTROLLER.h" // ATmega2560 env:mega2560
  226. #elif MB(GT2560_REV_A)
  227. #include "mega/pins_GT2560_REV_A.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  228. #elif MB(GT2560_REV_A_PLUS)
  229. #include "mega/pins_GT2560_REV_A_PLUS.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  230. #elif MB(GT2560_V3)
  231. #include "mega/pins_GT2560_V3.h" // ATmega2560 env:mega2560
  232. #elif MB(GT2560_V3_MC2)
  233. #include "mega/pins_GT2560_V3_MC2.h" // ATmega2560 env:mega2560
  234. #elif MB(GT2560_V3_A20)
  235. #include "mega/pins_GT2560_V3_A20.h" // ATmega2560 env:mega2560
  236. #elif MB(EINSTART_S)
  237. #include "mega/pins_EINSTART-S.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  238. #elif MB(WANHAO_ONEPLUS)
  239. #include "mega/pins_WANHAO_ONEPLUS.h" // ATmega2560 env:mega2560
  240. #elif MB(OVERLORD)
  241. #include "mega/pins_OVERLORD.h" // ATmega2560 env:mega2560
  242. #elif MB(HJC2560C_REV2)
  243. #include "mega/pins_HJC2560C_REV2.h" // ATmega2560 env:mega2560
  244. #elif MB(LEAPFROG_XEED2015)
  245. #include "mega/pins_LEAPFROG_XEED2015.h" // ATmega2560 env:mega2560
  246. #elif MB(PICA)
  247. #include "mega/pins_PICA.h" // ATmega2560 env:mega2560
  248. #elif MB(PICA_REVB)
  249. #include "mega/pins_PICAOLD.h" // ATmega2560 env:mega2560
  250. #elif MB(INTAMSYS40)
  251. #include "mega/pins_INTAMSYS40.h" // ATmega2560 env:mega2560
  252. //
  253. // ATmega1281, ATmega2561
  254. //
  255. #elif MB(MINITRONICS)
  256. #include "mega/pins_MINITRONICS.h" // ATmega1281 env:mega1280
  257. #elif MB(SILVER_GATE)
  258. #include "mega/pins_SILVER_GATE.h" // ATmega2561 env:mega2560
  259. //
  260. // Sanguinololu and Derivatives - ATmega644P, ATmega1284P
  261. //
  262. #elif MB(SANGUINOLOLU_11)
  263. #include "sanguino/pins_SANGUINOLOLU_11.h" // ATmega644P, ATmega1284P env:sanguino644p env:sanguino1284p
  264. #elif MB(SANGUINOLOLU_12)
  265. #include "sanguino/pins_SANGUINOLOLU_12.h" // ATmega644P, ATmega1284P env:sanguino644p env:sanguino1284p
  266. #elif MB(MELZI)
  267. #include "sanguino/pins_MELZI.h" // ATmega644P, ATmega1284P env:sanguino644p env:sanguino1284p
  268. #elif MB(MELZI_MAKR3D)
  269. #include "sanguino/pins_MELZI_MAKR3D.h" // ATmega644P, ATmega1284P env:sanguino644p env:sanguino1284p
  270. #elif MB(MELZI_CREALITY)
  271. #include "sanguino/pins_MELZI_CREALITY.h" // ATmega1284P env:melzi env:melzi_optiboot
  272. #elif MB(MELZI_MALYAN)
  273. #include "sanguino/pins_MELZI_MALYAN.h" // ATmega644P, ATmega1284P env:sanguino644p env:sanguino1284p
  274. #elif MB(MELZI_TRONXY)
  275. #include "sanguino/pins_MELZI_TRONXY.h" // ATmega644P, ATmega1284P env:sanguino644p env:sanguino1284p
  276. #elif MB(STB_11)
  277. #include "sanguino/pins_STB_11.h" // ATmega644P, ATmega1284P env:sanguino644p env:sanguino1284p
  278. #elif MB(AZTEEG_X1)
  279. #include "sanguino/pins_AZTEEG_X1.h" // ATmega644P, ATmega1284P env:sanguino644p env:sanguino1284p
  280. //
  281. // Other ATmega644P, ATmega644, ATmega1284P
  282. //
  283. #elif MB(GEN3_MONOLITHIC)
  284. #include "sanguino/pins_GEN3_MONOLITHIC.h" // ATmega644P env:sanguino644p
  285. #elif MB(GEN3_PLUS)
  286. #include "sanguino/pins_GEN3_PLUS.h" // ATmega644P, ATmega1284P env:sanguino644p env:sanguino1284p
  287. #elif MB(GEN6)
  288. #include "sanguino/pins_GEN6.h" // ATmega644P, ATmega1284P env:sanguino644p env:sanguino1284p
  289. #elif MB(GEN6_DELUXE)
  290. #include "sanguino/pins_GEN6_DELUXE.h" // ATmega644P, ATmega1284P env:sanguino644p env:sanguino1284p
  291. #elif MB(GEN7_CUSTOM)
  292. #include "sanguino/pins_GEN7_CUSTOM.h" // ATmega644P, ATmega644, ATmega1284P env:sanguino644p env:sanguino1284p
  293. #elif MB(GEN7_12)
  294. #include "sanguino/pins_GEN7_12.h" // ATmega644P, ATmega644, ATmega1284P env:sanguino644p env:sanguino1284p
  295. #elif MB(GEN7_13)
  296. #include "sanguino/pins_GEN7_13.h" // ATmega644P, ATmega644, ATmega1284P env:sanguino644p env:sanguino1284p
  297. #elif MB(GEN7_14)
  298. #include "sanguino/pins_GEN7_14.h" // ATmega644P, ATmega644, ATmega1284P env:sanguino644p env:sanguino1284p
  299. #elif MB(OMCA_A)
  300. #include "sanguino/pins_OMCA_A.h" // ATmega644 env:sanguino644p
  301. #elif MB(OMCA)
  302. #include "sanguino/pins_OMCA.h" // ATmega644P, ATmega644 env:sanguino644p
  303. #elif MB(ANET_10)
  304. #include "sanguino/pins_ANET_10.h" // ATmega1284P env:sanguino1284p
  305. #elif MB(SETHI)
  306. #include "sanguino/pins_SETHI.h" // ATmega644P, ATmega644, ATmega1284P env:sanguino644p env:sanguino1284p
  307. //
  308. // Teensyduino - AT90USB1286, AT90USB1286P
  309. //
  310. #elif MB(TEENSYLU)
  311. #include "teensy2/pins_TEENSYLU.h" // AT90USB1286, AT90USB1286P env:at90usb1286_cdc
  312. #elif MB(PRINTRBOARD)
  313. #include "teensy2/pins_PRINTRBOARD.h" // AT90USB1286 env:at90usb1286_dfu
  314. #elif MB(PRINTRBOARD_REVF)
  315. #include "teensy2/pins_PRINTRBOARD_REVF.h" // AT90USB1286 env:at90usb1286_dfu
  316. #elif MB(BRAINWAVE)
  317. #include "teensy2/pins_BRAINWAVE.h" // AT90USB646 env:at90usb1286_cdc
  318. #elif MB(BRAINWAVE_PRO)
  319. #include "teensy2/pins_BRAINWAVE_PRO.h" // AT90USB1286 env:at90usb1286_cdc
  320. #elif MB(SAV_MKI)
  321. #include "teensy2/pins_SAV_MKI.h" // AT90USB1286 env:at90usb1286_cdc
  322. #elif MB(TEENSY2)
  323. #include "teensy2/pins_TEENSY2.h" // AT90USB1286 env:teensy20
  324. #elif MB(5DPRINT)
  325. #include "teensy2/pins_5DPRINT.h" // AT90USB1286 env:at90usb1286_dfu
  326. //
  327. // LPC1768 ARM Cortex M3
  328. //
  329. #elif MB(RAMPS_14_RE_ARM_EFB)
  330. #include "lpc1768/pins_RAMPS_RE_ARM.h" // LPC1768 env:LPC1768
  331. #elif MB(RAMPS_14_RE_ARM_EEB)
  332. #include "lpc1768/pins_RAMPS_RE_ARM.h" // LPC1768 env:LPC1768
  333. #elif MB(RAMPS_14_RE_ARM_EFF)
  334. #include "lpc1768/pins_RAMPS_RE_ARM.h" // LPC1768 env:LPC1768
  335. #elif MB(RAMPS_14_RE_ARM_EEF)
  336. #include "lpc1768/pins_RAMPS_RE_ARM.h" // LPC1768 env:LPC1768
  337. #elif MB(RAMPS_14_RE_ARM_SF)
  338. #include "lpc1768/pins_RAMPS_RE_ARM.h" // LPC1768 env:LPC1768
  339. #elif MB(MKS_SBASE)
  340. #include "lpc1768/pins_MKS_SBASE.h" // LPC1768 env:LPC1768
  341. #elif MB(MKS_SGEN_L)
  342. #include "lpc1768/pins_MKS_SGEN_L.h" // LPC1768 env:LPC1768
  343. #elif MB(AZSMZ_MINI)
  344. #include "lpc1768/pins_AZSMZ_MINI.h" // LPC1768 env:LPC1768
  345. #elif MB(BIQU_BQ111_A4)
  346. #include "lpc1768/pins_BIQU_BQ111_A4.h" // LPC1768 env:LPC1768
  347. #elif MB(SELENA_COMPACT)
  348. #include "lpc1768/pins_SELENA_COMPACT.h" // LPC1768 env:LPC1768
  349. #elif MB(BIQU_B300_V1_0)
  350. #include "lpc1768/pins_BIQU_B300_V1.0.h" // LPC1768 env:LPC1768
  351. #elif MB(GMARSH_X6_REV1)
  352. #include "lpc1768/pins_GMARSH_X6_REV1.h" // LPC1768 env:LPC1768
  353. #elif MB(BTT_SKR_V1_1)
  354. #include "lpc1768/pins_BTT_SKR_V1_1.h" // LPC1768 env:LPC1768
  355. #elif MB(BTT_SKR_V1_3)
  356. #include "lpc1768/pins_BTT_SKR_V1_3.h" // LPC1768 env:LPC1768
  357. #elif MB(BTT_SKR_V1_4)
  358. #include "lpc1768/pins_BTT_SKR_V1_4.h" // LPC1768 env:LPC1768
  359. //
  360. // LPC1769 ARM Cortex M3
  361. //
  362. #elif MB(MKS_SGEN)
  363. #include "lpc1769/pins_MKS_SGEN.h" // LPC1769 env:LPC1769
  364. #elif MB(AZTEEG_X5_GT)
  365. #include "lpc1769/pins_AZTEEG_X5_GT.h" // LPC1769 env:LPC1769
  366. #elif MB(AZTEEG_X5_MINI)
  367. #include "lpc1769/pins_AZTEEG_X5_MINI.h" // LPC1769 env:LPC1769
  368. #elif MB(AZTEEG_X5_MINI_WIFI)
  369. #include "lpc1769/pins_AZTEEG_X5_MINI_WIFI.h" // LPC1769 env:LPC1769
  370. #elif MB(COHESION3D_REMIX)
  371. #include "lpc1769/pins_COHESION3D_REMIX.h" // LPC1769 env:LPC1769
  372. #elif MB(COHESION3D_MINI)
  373. #include "lpc1769/pins_COHESION3D_MINI.h" // LPC1769 env:LPC1769
  374. #elif MB(SMOOTHIEBOARD)
  375. #include "lpc1769/pins_SMOOTHIEBOARD.h" // LPC1769 env:LPC1769
  376. #elif MB(TH3D_EZBOARD)
  377. #include "lpc1769/pins_TH3D_EZBOARD.h" // LPC1769 env:LPC1769
  378. #elif MB(BTT_SKR_V1_4_TURBO)
  379. #include "lpc1769/pins_BTT_SKR_V1_4_TURBO.h" // LPC1769 env:LPC1769
  380. //
  381. // Due (ATSAM) boards
  382. //
  383. #elif MB(DUE3DOM)
  384. #include "sam/pins_DUE3DOM.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  385. #elif MB(DUE3DOM_MINI)
  386. #include "sam/pins_DUE3DOM_MINI.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  387. #elif MB(RADDS)
  388. #include "sam/pins_RADDS.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  389. #elif MB(RURAMPS4D_11)
  390. #include "sam/pins_RURAMPS4D_11.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  391. #elif MB(RURAMPS4D_13)
  392. #include "sam/pins_RURAMPS4D_13.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  393. #elif MB(RAMPS_FD_V1)
  394. #include "sam/pins_RAMPS_FD_V1.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  395. #elif MB(RAMPS_FD_V2)
  396. #include "sam/pins_RAMPS_FD_V2.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  397. #elif MB(RAMPS_SMART_EFB)
  398. #include "sam/pins_RAMPS_SMART.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  399. #elif MB(RAMPS_SMART_EEB)
  400. #include "sam/pins_RAMPS_SMART.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  401. #elif MB(RAMPS_SMART_EFF)
  402. #include "sam/pins_RAMPS_SMART.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  403. #elif MB(RAMPS_SMART_EEF)
  404. #include "sam/pins_RAMPS_SMART.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  405. #elif MB(RAMPS_SMART_SF)
  406. #include "sam/pins_RAMPS_SMART.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  407. #elif MB(RAMPS_DUO_EFB)
  408. #include "sam/pins_RAMPS_DUO.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  409. #elif MB(RAMPS_DUO_EEB)
  410. #include "sam/pins_RAMPS_DUO.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  411. #elif MB(RAMPS_DUO_EFF)
  412. #include "sam/pins_RAMPS_DUO.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  413. #elif MB(RAMPS_DUO_EEF)
  414. #include "sam/pins_RAMPS_DUO.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  415. #elif MB(RAMPS_DUO_SF)
  416. #include "sam/pins_RAMPS_DUO.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  417. #elif MB(RAMPS4DUE_EFB)
  418. #include "sam/pins_RAMPS4DUE.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  419. #elif MB(RAMPS4DUE_EEB)
  420. #include "sam/pins_RAMPS4DUE.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  421. #elif MB(RAMPS4DUE_EFF)
  422. #include "sam/pins_RAMPS4DUE.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  423. #elif MB(RAMPS4DUE_EEF)
  424. #include "sam/pins_RAMPS4DUE.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  425. #elif MB(RAMPS4DUE_SF)
  426. #include "sam/pins_RAMPS4DUE.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  427. #elif MB(ULTRATRONICS_PRO)
  428. #include "sam/pins_ULTRATRONICS_PRO.h" // SAM3X8E env:DUE env:DUE_debug
  429. #elif MB(ARCHIM1)
  430. #include "sam/pins_ARCHIM1.h" // SAM3X8E env:DUE env:DUE_debug
  431. #elif MB(ARCHIM2)
  432. #include "sam/pins_ARCHIM2.h" // SAM3X8E env:DUE_archim env:DUE_archim_debug
  433. #elif MB(ALLIGATOR)
  434. #include "sam/pins_ALLIGATOR_R2.h" // SAM3X8E env:DUE env:DUE_debug
  435. #elif MB(ADSK)
  436. #include "sam/pins_ADSK.h" // SAM3X8E env:DUE env:DUE_debug
  437. #elif MB(PRINTRBOARD_G2)
  438. #include "sam/pins_PRINTRBOARD_G2.h" // SAM3X8C env:DUE_USB
  439. #elif MB(CNCONTROLS_15D)
  440. #include "sam/pins_CNCONTROLS_15D.h" // SAM3X8E env:DUE env:DUE_USB
  441. //
  442. // STM32 ARM Cortex-M0
  443. //
  444. #elif MB(MALYAN_M300)
  445. #include "stm32f0/pins_MALYAN_M300.h" // STM32F070 env:malyan_M300
  446. //
  447. // STM32 ARM Cortex-M3
  448. //
  449. #elif MB(STM32F103RE)
  450. #include "stm32f1/pins_STM32F1R.h" // STM32F1 env:STM32F103RE
  451. #elif MB(MALYAN_M200)
  452. #include "stm32f1/pins_MALYAN_M200.h" // STM32F1 env:STM32F103CB_malyan
  453. #elif MB(STM3R_MINI)
  454. #include "stm32f1/pins_STM3R_MINI.h" // STM32F1 env:STM32F103RE
  455. #elif MB(GTM32_PRO_VB)
  456. #include "stm32f1/pins_GTM32_PRO_VB.h" // STM32F1 env:STM32F103RE
  457. #elif MB(GTM32_MINI_A30)
  458. #include "stm32f1/pins_GTM32_MINI_A30.h" // STM32F1 env:STM32F103RE
  459. #elif MB(GTM32_MINI)
  460. #include "stm32f1/pins_GTM32_MINI.h" // STM32F1 env:STM32F103RE
  461. #elif MB(GTM32_REV_B)
  462. #include "stm32f1/pins_GTM32_REV_B.h" // STM32F1 env:STM32F103RE
  463. #elif MB(MORPHEUS)
  464. #include "stm32f1/pins_MORPHEUS.h" // STM32F1 env:STM32F103RE
  465. #elif MB(CHITU3D)
  466. #include "stm32f1/pins_CHITU3D.h" // STM32F1 env:STM32F103RE
  467. #elif MB(MKS_ROBIN)
  468. #include "stm32f1/pins_MKS_ROBIN.h" // STM32F1 env:mks_robin
  469. #elif MB(MKS_ROBIN_MINI)
  470. #include "stm32f1/pins_MKS_ROBIN_MINI.h" // STM32F1 env:mks_robin_mini
  471. #elif MB(MKS_ROBIN_NANO)
  472. #include "stm32f1/pins_MKS_ROBIN_NANO.h" // STM32F1 env:mks_robin_nano
  473. #elif MB(MKS_ROBIN_LITE)
  474. #include "stm32f1/pins_MKS_ROBIN_LITE.h" // STM32F1 env:mks_robin_lite
  475. #elif MB(BTT_SKR_MINI_V1_1)
  476. #include "stm32f1/pins_BTT_SKR_MINI_V1_1.h" // STM32F1 env:STM32F103RC_btt env:STM32F103RC_btt_512K env:STM32F103RC_btt_USB env:STM32F103RC_btt_512K_USB
  477. #elif MB(BTT_SKR_MINI_E3_V1_0)
  478. #include "stm32f1/pins_BTT_SKR_MINI_E3_V1_0.h" // STM32F1 env:STM32F103RC_btt env:STM32F103RC_btt_512K env:STM32F103RC_btt_USB env:STM32F103RC_btt_512K_USB
  479. #elif MB(BTT_SKR_MINI_E3_V1_2)
  480. #include "stm32f1/pins_BTT_SKR_MINI_E3_V1_2.h" // STM32F1 env:STM32F103RC_btt env:STM32F103RC_btt_512K env:STM32F103RC_btt_USB env:STM32F103RC_btt_512K_USB
  481. #elif MB(BTT_SKR_E3_DIP)
  482. #include "stm32f1/pins_BTT_SKR_E3_DIP.h" // STM32F1 env:STM32F103RE_btt env:STM32F103RE_btt_USB env:STM32F103RC_btt env:STM32F103RC_btt_512K env:STM32F103RC_btt_USB env:STM32F103RC_btt_512K_USB
  483. #elif MB(JGAURORA_A5S_A1)
  484. #include "stm32f1/pins_JGAURORA_A5S_A1.h" // STM32F1 env:jgaurora_a5s_a1
  485. #elif MB(FYSETC_AIO_II)
  486. #include "stm32f1/pins_FYSETC_AIO_II.h" // STM32F1 env:STM32F103RC_fysetc
  487. #elif MB(FYSETC_CHEETAH)
  488. #include "stm32f1/pins_FYSETC_CHEETAH.h" // STM32F1 env:STM32F103RC_fysetc
  489. #elif MB(FYSETC_CHEETAH_V12)
  490. #include "stm32f1/pins_FYSETC_CHEETAH_V12.h" // STM32F1 env:STM32F103RC_fysetc
  491. #elif MB(LONGER3D_LK)
  492. #include "stm32f1/pins_LONGER3D_LK.h" // STM32F1 env:STM32F103VE_longer
  493. #elif MB(MKS_ROBIN_LITE3)
  494. #include "stm32f1/pins_MKS_ROBIN_LITE3.h" // STM32F1 env:mks_robin_lite3
  495. #elif MB(MKS_ROBIN_PRO)
  496. #include "stm32f1/pins_MKS_ROBIN_PRO.h" // STM32F1 env:mks_robin_pro
  497. #elif MB(MKS_ROBIN_E3D)
  498. #include "stm32f1/pins_MKS_ROBIN_E3D.h" // STM32F1 env:mks_robin_e3
  499. #elif MB(MKS_ROBIN_E3)
  500. #include "stm32f1/pins_MKS_ROBIN_E3.h" // STM32F1 env:mks_robin_e3
  501. //
  502. // ARM Cortex-M4F
  503. //
  504. #elif MB(TEENSY31_32)
  505. #include "teensy3/pins_TEENSY31_32.h" // TEENSY31_32 env:teensy31
  506. #elif MB(TEENSY35_36)
  507. #include "teensy3/pins_TEENSY35_36.h" // TEENSY35_36 env:teensy35
  508. //
  509. // STM32 ARM Cortex-M4F
  510. //
  511. #elif MB(BEAST)
  512. #include "stm32f4/pins_BEAST.h" // STM32F4 env:STM32F4
  513. #elif MB(GENERIC_STM32F4)
  514. #include "stm32f4/pins_GENERIC_STM32F4.h" // STM32F4 env:STM32F4
  515. #elif MB(ARMED)
  516. #include "stm32f4/pins_ARMED.h" // STM32F4 env:ARMED
  517. #elif MB(RUMBA32_AUS3D)
  518. #include "stm32f4/pins_RUMBA32_AUS3D.h" // STM32F4 env:rumba32_f446ve
  519. #elif MB(RUMBA32_MKS)
  520. #include "stm32f4/pins_RUMBA32_MKS.h" // STM32F4 env:rumba32_mks
  521. #elif MB(BLACK_STM32F407VE)
  522. #include "stm32f4/pins_BLACK_STM32F407VE.h" // STM32F4 env:STM32F407VE_black
  523. #elif MB(STEVAL_3DP001V1)
  524. #include "stm32f4/pins_STEVAL_3DP001V1.h" // STM32F4 env:STM32F401VE_STEVAL
  525. #elif MB(BTT_SKR_PRO_V1_1)
  526. #include "stm32f4/pins_BTT_SKR_PRO_V1_1.h" // STM32F4 env:BIGTREE_SKR_PRO
  527. #elif MB(BTT_GTR_V1_0)
  528. #include "stm32f4/pins_BTT_GTR_V1_0.h" // STM32F4 env:BIGTREE_GTR_V1_0
  529. #elif MB(BTT_BTT002_V1_0)
  530. #include "stm32f4/pins_BTT_BTT002_V1_0.h" // STM32F4 env:BIGTREE_BTT002
  531. #elif MB(LERDGE_K)
  532. #include "stm32f4/pins_LERDGE_K.h" // STM32F4 env:STM32F4
  533. #elif MB(LERDGE_X)
  534. #include "stm32f4/pins_LERDGE_X.h" // STM32F4 env:STM32F4
  535. #elif MB(VAKE403D)
  536. #include "stm32f4/pins_VAKE403D.h" // STM32F4 env:STM32F4
  537. #elif MB(FYSETC_S6)
  538. #include "stm32f4/pins_FYSETC_S6.h" // STM32F4 env:FYSETC_S6
  539. #elif MB(FLYF407ZG)
  540. #include "stm32f4/pins_FLYF407ZG.h" // STM32F4 env:FLYF407ZG
  541. #elif MB(MKS_ROBIN2)
  542. #include "stm32f4/pins_MKS_ROBIN2.h" // STM32F4 env:MKS_ROBIN2
  543. //
  544. // ARM Cortex M7
  545. //
  546. #elif MB(THE_BORG)
  547. #include "stm32f7/pins_THE_BORG.h" // STM32F7 env:STM32F7
  548. #elif MB(REMRAM_V1)
  549. #include "stm32f7/pins_REMRAM_V1.h" // STM32F7 env:STM32F7
  550. //
  551. // Espressif ESP32
  552. //
  553. #elif MB(ESPRESSIF_ESP32)
  554. #include "esp32/pins_ESP32.h" // ESP32 env:esp32
  555. #elif MB(MRR_ESPA)
  556. #include "esp32/pins_MRR_ESPA.h" // ESP32 env:esp32
  557. #elif MB(MRR_ESPE)
  558. #include "esp32/pins_MRR_ESPE.h" // ESP32 env:esp32
  559. #elif MB(E4D_BOX)
  560. #include "esp32/pins_E4D.h" // ESP32 env:esp32
  561. //
  562. // Adafruit Grand Central M4 (SAMD51 ARM Cortex-M4)
  563. //
  564. #elif MB(AGCM4_RAMPS_144)
  565. #include "samd/pins_RAMPS_144.h" // SAMD51 env:SAMD51_grandcentral_m4
  566. //
  567. // Linux Native Debug board
  568. //
  569. #elif MB(LINUX_RAMPS)
  570. #include "linux/pins_RAMPS_LINUX.h" // Linux env:linux_native
  571. #else
  572. //
  573. // Obsolete or unknown board
  574. //
  575. #define BOARD_MKS_13 -1000
  576. #define BOARD_TRIGORILLA -1001
  577. #define BOARD_RURAMPS4D -1002
  578. #define BOARD_FORMBOT_TREX2 -1003
  579. #define BOARD_BIQU_SKR_V1_1 -1004
  580. #define BOARD_STM32F1R -1005
  581. #define BOARD_STM32F103R -1006
  582. #define BOARD_ESP32 -1007
  583. #define BOARD_STEVAL -1008
  584. #define BOARD_BIGTREE_SKR_V1_1 -1009
  585. #define BOARD_BIGTREE_SKR_V1_3 -1010
  586. #define BOARD_BIGTREE_SKR_V1_4 -1011
  587. #define BOARD_BIGTREE_SKR_V1_4_TURBO -1012
  588. #define BOARD_BIGTREE_BTT002_V1_0 -1013
  589. #define BOARD_BIGTREE_SKR_PRO_V1_1 -1014
  590. #define BOARD_BIGTREE_SKR_MINI_V1_1 -1015
  591. #define BOARD_BIGTREE_SKR_MINI_E3 -1016
  592. #define BOARD_BIGTREE_SKR_E3_DIP -1017
  593. #define BOARD_RUMBA32 -1018
  594. #if MB(MKS_13)
  595. #error "BOARD_MKS_13 has been renamed BOARD_MKS_GEN_13. Please update your configuration."
  596. #elif MB(TRIGORILLA)
  597. #error "BOARD_TRIGORILLA has been renamed BOARD_TRIGORILLA_13. Please update your configuration."
  598. #elif MB(RURAMPS4D)
  599. #error "BOARD_RURAMPS4D has been renamed BOARD_RURAMPS4D_11. Please update your configuration."
  600. #elif MB(FORMBOT_TREX2)
  601. #error "FORMBOT_TREX2 has been renamed BOARD_FORMBOT_TREX2PLUS. Please update your configuration."
  602. #elif MB(BIQU_SKR_V1_1)
  603. #error "BOARD_BIQU_SKR_V1_1 has been renamed BOARD_BTT_SKR_V1_1. Please update your configuration."
  604. #elif MB(BIGTREE_SKR_V1_1)
  605. #error "BOARD_BIGTREE_SKR_V1_1 has been renamed BOARD_BTT_SKR_V1_1. Please update your configuration."
  606. #elif MB(BIGTREE_SKR_V2_2)
  607. #error "BOARD_BIGTREE_SKR_V1_2 has been renamed BOARD_BTT_SKR_V1_2. Please update your configuration."
  608. #elif MB(BIGTREE_SKR_V1_3)
  609. #error "BOARD_BIGTREE_SKR_V1_3 has been renamed BOARD_BTT_SKR_V1_3. Please update your configuration."
  610. #elif MB(BIGTREE_SKR_V1_4)
  611. #error "BOARD_BIGTREE_SKR_V1_4 has been renamed BOARD_BTT_SKR_V1_4. Please update your configuration."
  612. #elif MB(BIGTREE_SKR_V1_4_TURBO)
  613. #error "BOARD_BIGTREE_SKR_V1_4_TURBO has been renamed BOARD_BTT_SKR_V1_4_TURBO. Please update your configuration."
  614. #elif MB(BIGTREE_BTT002_V1_0)
  615. #error "BOARD_BIGTREE_BTT002_V1_0 has been renamed BOARD_BTT_BTT002_V1_0. Please update your configuration."
  616. #elif MB(BIGTREE_SKR_PRO_V1_1)
  617. #error "BOARD_BIGTREE_SKR_PRO_V1_1 has been renamed BOARD_BTT_SKR_PRO_V1_1. Please update your configuration."
  618. #elif MB(BIGTREE_SKR_MINI_V1_1)
  619. #error "BOARD_BIGTREE_SKR_MINI_V1_1 has been renamed BOARD_BTT_SKR_MINI_V1_1. Please update your configuration."
  620. #elif MB(BIGTREE_SKR_MINI_E3)
  621. #error "BOARD_BIGTREE_SKR_MINI_E3 has been renamed BOARD_BTT_SKR_MINI_E3_V1_0. Please update your configuration."
  622. #elif MB(BIGTREE_SKR_E3_DIP)
  623. #error "BOARD_BIGTREE_SKR_E3_DIP has been renamed BOARD_BTT_SKR_E3_DIP. Please update your configuration."
  624. #elif MB(STM32F1R)
  625. #error "BOARD_STM32F1R has been renamed BOARD_STM32F103RE. Please update your configuration."
  626. #elif MB(STM32F103R)
  627. #error "BOARD_STM32F103R has been renamed BOARD_STM32F103RE. Please update your configuration."
  628. #elif MOTHERBOARD == BOARD_ESP32
  629. #error "BOARD_ESP32 has been renamed BOARD_ESPRESSIF_ESP32. Please update your configuration."
  630. #elif MB(STEVAL)
  631. #error "BOARD_STEVAL has been renamed BOARD_STEVAL_3DP001V1. Please update your configuration."
  632. #elif MB(RUMBA32)
  633. #error "BOARD_RUMBA32 is now BOARD_RUMBA32_MKS or BOARD_RUMBA32_AUS3D. Please update your configuration."
  634. #else
  635. #error "Unknown MOTHERBOARD value set in Configuration.h"
  636. #endif
  637. #undef BOARD_MKS_13
  638. #undef BOARD_TRIGORILLA
  639. #undef BOARD_RURAMPS4D
  640. #undef BOARD_FORMBOT_TREX2
  641. #undef BOARD_BIQU_SKR_V1_1
  642. #undef BOARD_STM32F1R
  643. #undef BOARD_STM32F103R
  644. #undef BOARD_ESP32
  645. #undef BOARD_STEVAL
  646. #undef BOARD_BIGTREE_SKR_MINI_E3
  647. #undef BOARD_BIGTREE_SKR_V1_1
  648. #undef BOARD_BIGTREE_SKR_V1_3
  649. #undef BOARD_BIGTREE_SKR_V1_4
  650. #undef BOARD_BIGTREE_SKR_V1_4_TURBO
  651. #undef BOARD_BIGTREE_BTT002_V1_0
  652. #undef BOARD_BIGTREE_SKR_PRO_V1_1
  653. #undef BOARD_BIGTREE_SKR_MINI_V1_1
  654. #undef BOARD_BIGTREE_SKR_E3_DIP
  655. #undef BOARD_RUMBA32
  656. #endif
  657. // Define certain undefined pins
  658. #ifndef X_MS1_PIN
  659. #define X_MS1_PIN -1
  660. #endif
  661. #ifndef X_MS2_PIN
  662. #define X_MS2_PIN -1
  663. #endif
  664. #ifndef X_MS3_PIN
  665. #define X_MS3_PIN -1
  666. #endif
  667. #ifndef Y_MS1_PIN
  668. #define Y_MS1_PIN -1
  669. #endif
  670. #ifndef Y_MS2_PIN
  671. #define Y_MS2_PIN -1
  672. #endif
  673. #ifndef Y_MS3_PIN
  674. #define Y_MS3_PIN -1
  675. #endif
  676. #ifndef Z_MS1_PIN
  677. #define Z_MS1_PIN -1
  678. #endif
  679. #ifndef Z_MS2_PIN
  680. #define Z_MS2_PIN -1
  681. #endif
  682. #ifndef Z_MS3_PIN
  683. #define Z_MS3_PIN -1
  684. #endif
  685. #ifndef E0_MS1_PIN
  686. #define E0_MS1_PIN -1
  687. #endif
  688. #ifndef E0_MS2_PIN
  689. #define E0_MS2_PIN -1
  690. #endif
  691. #ifndef E0_MS3_PIN
  692. #define E0_MS3_PIN -1
  693. #endif
  694. #ifndef E1_MS1_PIN
  695. #define E1_MS1_PIN -1
  696. #endif
  697. #ifndef E1_MS2_PIN
  698. #define E1_MS2_PIN -1
  699. #endif
  700. #ifndef E1_MS3_PIN
  701. #define E1_MS3_PIN -1
  702. #endif
  703. #ifndef E2_MS1_PIN
  704. #define E2_MS1_PIN -1
  705. #endif
  706. #ifndef E2_MS2_PIN
  707. #define E2_MS2_PIN -1
  708. #endif
  709. #ifndef E2_MS3_PIN
  710. #define E2_MS3_PIN -1
  711. #endif
  712. #ifndef E3_MS1_PIN
  713. #define E3_MS1_PIN -1
  714. #endif
  715. #ifndef E3_MS2_PIN
  716. #define E3_MS2_PIN -1
  717. #endif
  718. #ifndef E3_MS3_PIN
  719. #define E3_MS3_PIN -1
  720. #endif
  721. #ifndef E4_MS1_PIN
  722. #define E4_MS1_PIN -1
  723. #endif
  724. #ifndef E4_MS2_PIN
  725. #define E4_MS2_PIN -1
  726. #endif
  727. #ifndef E4_MS3_PIN
  728. #define E4_MS3_PIN -1
  729. #endif
  730. #ifndef E5_MS1_PIN
  731. #define E5_MS1_PIN -1
  732. #endif
  733. #ifndef E5_MS2_PIN
  734. #define E5_MS2_PIN -1
  735. #endif
  736. #ifndef E5_MS3_PIN
  737. #define E5_MS3_PIN -1
  738. #endif
  739. #ifndef E6_MS1_PIN
  740. #define E6_MS1_PIN -1
  741. #endif
  742. #ifndef E6_MS2_PIN
  743. #define E6_MS2_PIN -1
  744. #endif
  745. #ifndef E6_MS3_PIN
  746. #define E6_MS3_PIN -1
  747. #endif
  748. #ifndef E7_MS1_PIN
  749. #define E7_MS1_PIN -1
  750. #endif
  751. #ifndef E7_MS2_PIN
  752. #define E7_MS2_PIN -1
  753. #endif
  754. #ifndef E7_MS3_PIN
  755. #define E7_MS3_PIN -1
  756. #endif
  757. #ifndef E0_STEP_PIN
  758. #define E0_STEP_PIN -1
  759. #endif
  760. #ifndef E0_DIR_PIN
  761. #define E0_DIR_PIN -1
  762. #endif
  763. #ifndef E0_ENABLE_PIN
  764. #define E0_ENABLE_PIN -1
  765. #endif
  766. #ifndef E1_STEP_PIN
  767. #define E1_STEP_PIN -1
  768. #endif
  769. #ifndef E1_DIR_PIN
  770. #define E1_DIR_PIN -1
  771. #endif
  772. #ifndef E1_ENABLE_PIN
  773. #define E1_ENABLE_PIN -1
  774. #endif
  775. #ifndef E2_STEP_PIN
  776. #define E2_STEP_PIN -1
  777. #endif
  778. #ifndef E2_DIR_PIN
  779. #define E2_DIR_PIN -1
  780. #endif
  781. #ifndef E2_ENABLE_PIN
  782. #define E2_ENABLE_PIN -1
  783. #endif
  784. #ifndef E3_STEP_PIN
  785. #define E3_STEP_PIN -1
  786. #endif
  787. #ifndef E3_DIR_PIN
  788. #define E3_DIR_PIN -1
  789. #endif
  790. #ifndef E3_ENABLE_PIN
  791. #define E3_ENABLE_PIN -1
  792. #endif
  793. #ifndef E4_STEP_PIN
  794. #define E4_STEP_PIN -1
  795. #endif
  796. #ifndef E4_DIR_PIN
  797. #define E4_DIR_PIN -1
  798. #endif
  799. #ifndef E4_ENABLE_PIN
  800. #define E4_ENABLE_PIN -1
  801. #endif
  802. #ifndef E5_STEP_PIN
  803. #define E5_STEP_PIN -1
  804. #endif
  805. #ifndef E5_DIR_PIN
  806. #define E5_DIR_PIN -1
  807. #endif
  808. #ifndef E5_ENABLE_PIN
  809. #define E5_ENABLE_PIN -1
  810. #endif
  811. #ifndef E6_STEP_PIN
  812. #define E6_STEP_PIN -1
  813. #endif
  814. #ifndef E6_DIR_PIN
  815. #define E6_DIR_PIN -1
  816. #endif
  817. #ifndef E6_ENABLE_PIN
  818. #define E6_ENABLE_PIN -1
  819. #endif
  820. #ifndef E7_STEP_PIN
  821. #define E7_STEP_PIN -1
  822. #endif
  823. #ifndef E7_DIR_PIN
  824. #define E7_DIR_PIN -1
  825. #endif
  826. #ifndef E7_ENABLE_PIN
  827. #define E7_ENABLE_PIN -1
  828. #endif
  829. //
  830. // Destroy unused CS pins
  831. //
  832. #if !AXIS_HAS_SPI(X)
  833. #undef X_CS_PIN
  834. #endif
  835. #if !AXIS_HAS_SPI(Y)
  836. #undef Y_CS_PIN
  837. #endif
  838. #if !AXIS_HAS_SPI(Z)
  839. #undef Z_CS_PIN
  840. #endif
  841. #if E_STEPPERS && !AXIS_HAS_SPI(E0)
  842. #undef E0_CS_PIN
  843. #endif
  844. #if E_STEPPERS > 1 && !AXIS_HAS_SPI(E1)
  845. #undef E1_CS_PIN
  846. #endif
  847. #if E_STEPPERS > 2 && !AXIS_HAS_SPI(E2)
  848. #undef E2_CS_PIN
  849. #endif
  850. #if E_STEPPERS > 3 && !AXIS_HAS_SPI(E3)
  851. #undef E3_CS_PIN
  852. #endif
  853. #if E_STEPPERS > 4 && !AXIS_HAS_SPI(E4)
  854. #undef E4_CS_PIN
  855. #endif
  856. #if E_STEPPERS > 5 && !AXIS_HAS_SPI(E5)
  857. #undef E5_CS_PIN
  858. #endif
  859. #if E_STEPPERS > 6 && !AXIS_HAS_SPI(E6)
  860. #undef E6_CS_PIN
  861. #endif
  862. #if E_STEPPERS > 7 && !AXIS_HAS_SPI(E7)
  863. #undef E7_CS_PIN
  864. #endif
  865. #ifndef X_CS_PIN
  866. #define X_CS_PIN -1
  867. #endif
  868. #ifndef Y_CS_PIN
  869. #define Y_CS_PIN -1
  870. #endif
  871. #ifndef Z_CS_PIN
  872. #define Z_CS_PIN -1
  873. #endif
  874. #ifndef E0_CS_PIN
  875. #define E0_CS_PIN -1
  876. #endif
  877. #ifndef E1_CS_PIN
  878. #define E1_CS_PIN -1
  879. #endif
  880. #ifndef E2_CS_PIN
  881. #define E2_CS_PIN -1
  882. #endif
  883. #ifndef E3_CS_PIN
  884. #define E3_CS_PIN -1
  885. #endif
  886. #ifndef E4_CS_PIN
  887. #define E4_CS_PIN -1
  888. #endif
  889. #ifndef E5_CS_PIN
  890. #define E5_CS_PIN -1
  891. #endif
  892. #ifndef E6_CS_PIN
  893. #define E6_CS_PIN -1
  894. #endif
  895. #ifndef E7_CS_PIN
  896. #define E7_CS_PIN -1
  897. #endif
  898. #ifndef FAN_PIN
  899. #define FAN_PIN -1
  900. #endif
  901. #define FAN0_PIN FAN_PIN
  902. #ifndef FAN1_PIN
  903. #define FAN1_PIN -1
  904. #endif
  905. #ifndef FAN2_PIN
  906. #define FAN2_PIN -1
  907. #endif
  908. #ifndef CONTROLLER_FAN_PIN
  909. #define CONTROLLER_FAN_PIN -1
  910. #endif
  911. #ifndef FANMUX0_PIN
  912. #define FANMUX0_PIN -1
  913. #endif
  914. #ifndef FANMUX1_PIN
  915. #define FANMUX1_PIN -1
  916. #endif
  917. #ifndef FANMUX2_PIN
  918. #define FANMUX2_PIN -1
  919. #endif
  920. #ifndef HEATER_0_PIN
  921. #define HEATER_0_PIN -1
  922. #endif
  923. #ifndef HEATER_1_PIN
  924. #define HEATER_1_PIN -1
  925. #endif
  926. #ifndef HEATER_2_PIN
  927. #define HEATER_2_PIN -1
  928. #endif
  929. #ifndef HEATER_3_PIN
  930. #define HEATER_3_PIN -1
  931. #endif
  932. #ifndef HEATER_4_PIN
  933. #define HEATER_4_PIN -1
  934. #endif
  935. #ifndef HEATER_5_PIN
  936. #define HEATER_5_PIN -1
  937. #endif
  938. #ifndef HEATER_6_PIN
  939. #define HEATER_6_PIN -1
  940. #endif
  941. #ifndef HEATER_7_PIN
  942. #define HEATER_7_PIN -1
  943. #endif
  944. #ifndef HEATER_BED_PIN
  945. #define HEATER_BED_PIN -1
  946. #endif
  947. #ifndef TEMP_0_PIN
  948. #define TEMP_0_PIN -1
  949. #endif
  950. #ifndef TEMP_1_PIN
  951. #define TEMP_1_PIN -1
  952. #endif
  953. #ifndef TEMP_2_PIN
  954. #define TEMP_2_PIN -1
  955. #endif
  956. #ifndef TEMP_3_PIN
  957. #define TEMP_3_PIN -1
  958. #endif
  959. #ifndef TEMP_4_PIN
  960. #define TEMP_4_PIN -1
  961. #endif
  962. #ifndef TEMP_5_PIN
  963. #define TEMP_5_PIN -1
  964. #endif
  965. #ifndef TEMP_6_PIN
  966. #define TEMP_6_PIN -1
  967. #endif
  968. #ifndef TEMP_7_PIN
  969. #define TEMP_7_PIN -1
  970. #endif
  971. #ifndef TEMP_BED_PIN
  972. #define TEMP_BED_PIN -1
  973. #endif
  974. #ifndef SD_DETECT_PIN
  975. #define SD_DETECT_PIN -1
  976. #endif
  977. #ifndef SDPOWER_PIN
  978. #define SDPOWER_PIN -1
  979. #endif
  980. #ifndef SDSS
  981. #define SDSS -1
  982. #endif
  983. #ifndef LED_PIN
  984. #define LED_PIN -1
  985. #endif
  986. #if DISABLED(PSU_CONTROL) || !defined(PS_ON_PIN)
  987. #undef PS_ON_PIN
  988. #define PS_ON_PIN -1
  989. #endif
  990. #ifndef KILL_PIN
  991. #define KILL_PIN -1
  992. #endif
  993. #ifndef SUICIDE_PIN
  994. #define SUICIDE_PIN -1
  995. #endif
  996. #ifndef SUICIDE_PIN_INVERTING
  997. #define SUICIDE_PIN_INVERTING false
  998. #endif
  999. #ifndef NUM_SERVO_PLUGS
  1000. #define NUM_SERVO_PLUGS 4
  1001. #endif
  1002. //
  1003. // Assign endstop pins for boards with only 3 connectors
  1004. //
  1005. #ifdef X_STOP_PIN
  1006. #if X_HOME_DIR < 0
  1007. #define X_MIN_PIN X_STOP_PIN
  1008. #ifndef X_MAX_PIN
  1009. #define X_MAX_PIN -1
  1010. #endif
  1011. #else
  1012. #define X_MAX_PIN X_STOP_PIN
  1013. #ifndef X_MIN_PIN
  1014. #define X_MIN_PIN -1
  1015. #endif
  1016. #endif
  1017. #elif X_HOME_DIR < 0
  1018. #define X_STOP_PIN X_MIN_PIN
  1019. #else
  1020. #define X_STOP_PIN X_MAX_PIN
  1021. #endif
  1022. #ifdef Y_STOP_PIN
  1023. #if Y_HOME_DIR < 0
  1024. #define Y_MIN_PIN Y_STOP_PIN
  1025. #ifndef Y_MAX_PIN
  1026. #define Y_MAX_PIN -1
  1027. #endif
  1028. #else
  1029. #define Y_MAX_PIN Y_STOP_PIN
  1030. #ifndef Y_MIN_PIN
  1031. #define Y_MIN_PIN -1
  1032. #endif
  1033. #endif
  1034. #elif Y_HOME_DIR < 0
  1035. #define Y_STOP_PIN Y_MIN_PIN
  1036. #else
  1037. #define Y_STOP_PIN Y_MAX_PIN
  1038. #endif
  1039. #ifdef Z_STOP_PIN
  1040. #if Z_HOME_DIR < 0
  1041. #define Z_MIN_PIN Z_STOP_PIN
  1042. #ifndef Z_MAX_PIN
  1043. #define Z_MAX_PIN -1
  1044. #endif
  1045. #else
  1046. #define Z_MAX_PIN Z_STOP_PIN
  1047. #ifndef Z_MIN_PIN
  1048. #define Z_MIN_PIN -1
  1049. #endif
  1050. #endif
  1051. #elif Z_HOME_DIR < 0
  1052. #define Z_STOP_PIN Z_MIN_PIN
  1053. #else
  1054. #define Z_STOP_PIN Z_MAX_PIN
  1055. #endif
  1056. //
  1057. // Disable unused endstop / probe pins
  1058. //
  1059. #if !HAS_CUSTOM_PROBE_PIN
  1060. #undef Z_MIN_PROBE_PIN
  1061. #define Z_MIN_PROBE_PIN -1
  1062. #endif
  1063. #if DISABLED(USE_XMAX_PLUG)
  1064. #undef X_MAX_PIN
  1065. #define X_MAX_PIN -1
  1066. #endif
  1067. #if DISABLED(USE_YMAX_PLUG)
  1068. #undef Y_MAX_PIN
  1069. #define Y_MAX_PIN -1
  1070. #endif
  1071. #if DISABLED(USE_ZMAX_PLUG)
  1072. #undef Z_MAX_PIN
  1073. #define Z_MAX_PIN -1
  1074. #endif
  1075. #if DISABLED(USE_XMIN_PLUG)
  1076. #undef X_MIN_PIN
  1077. #define X_MIN_PIN -1
  1078. #endif
  1079. #if DISABLED(USE_YMIN_PLUG)
  1080. #undef Y_MIN_PIN
  1081. #define Y_MIN_PIN -1
  1082. #endif
  1083. #if DISABLED(USE_ZMIN_PLUG)
  1084. #undef Z_MIN_PIN
  1085. #define Z_MIN_PIN -1
  1086. #endif
  1087. #if HAS_FILAMENT_SENSOR
  1088. #define FIL_RUNOUT1_PIN FIL_RUNOUT_PIN
  1089. #else
  1090. #undef FIL_RUNOUT_PIN
  1091. #undef FIL_RUNOUT1_PIN
  1092. #endif
  1093. #ifndef LCD_PINS_D4
  1094. #define LCD_PINS_D4 -1
  1095. #endif
  1096. #if HAS_CHARACTER_LCD || TOUCH_UI_ULTIPANEL
  1097. #ifndef LCD_PINS_D5
  1098. #define LCD_PINS_D5 -1
  1099. #endif
  1100. #ifndef LCD_PINS_D6
  1101. #define LCD_PINS_D6 -1
  1102. #endif
  1103. #ifndef LCD_PINS_D7
  1104. #define LCD_PINS_D7 -1
  1105. #endif
  1106. #endif
  1107. /**
  1108. * Auto-Assignment for Dual X, Dual Y, Multi-Z Steppers
  1109. *
  1110. * By default X2 is assigned to the next open E plug
  1111. * on the board, then in order, Y2, Z2, Z3. These can be
  1112. * overridden in Configuration.h or Configuration_adv.h.
  1113. */
  1114. #define __PEXI(p,q) PIN_EXISTS(E##p##_##q)
  1115. #define _PEXI(p,q) __PEXI(p,q)
  1116. #define __EPIN(p,q) E##p##_##q##_PIN
  1117. #define _EPIN(p,q) __EPIN(p,q)
  1118. #define DIAG_REMAPPED(p,q) (PIN_EXISTS(q) && _EPIN(p##_E_INDEX, DIAG) == q##_PIN)
  1119. // The X2 axis, if any, should be the next open extruder port
  1120. #define X2_E_INDEX E_STEPPERS
  1121. #if EITHER(DUAL_X_CARRIAGE, X_DUAL_STEPPER_DRIVERS)
  1122. #ifndef X2_STEP_PIN
  1123. #define X2_STEP_PIN _EPIN(X2_E_INDEX, STEP)
  1124. #define X2_DIR_PIN _EPIN(X2_E_INDEX, DIR)
  1125. #define X2_ENABLE_PIN _EPIN(X2_E_INDEX, ENABLE)
  1126. #if X2_E_INDEX >= MAX_EXTRUDERS || !PIN_EXISTS(X2_STEP)
  1127. #error "No E stepper plug left for X2!"
  1128. #endif
  1129. #endif
  1130. #ifndef X2_MS1_PIN
  1131. #define X2_MS1_PIN _EPIN(X2_E_INDEX, MS1)
  1132. #endif
  1133. #ifndef X2_MS2_PIN
  1134. #define X2_MS2_PIN _EPIN(X2_E_INDEX, MS2)
  1135. #endif
  1136. #ifndef X2_MS3_PIN
  1137. #define X2_MS3_PIN _EPIN(X2_E_INDEX, MS3)
  1138. #endif
  1139. #if AXIS_HAS_SPI(X2) && !defined(X2_CS_PIN)
  1140. #define X2_CS_PIN _EPIN(X2_E_INDEX, CS)
  1141. #endif
  1142. #if AXIS_HAS_UART(X2)
  1143. #ifndef X2_SERIAL_TX_PIN
  1144. #define X2_SERIAL_TX_PIN _EPIN(X2_E_INDEX, SERIAL_TX)
  1145. #endif
  1146. #ifndef X2_SERIAL_RX_PIN
  1147. #define X2_SERIAL_RX_PIN _EPIN(X2_E_INDEX, SERIAL_RX)
  1148. #endif
  1149. #endif
  1150. //
  1151. // Auto-assign pins for stallGuard sensorless homing
  1152. //
  1153. #if defined(X2_STALL_SENSITIVITY) && ENABLED(X_DUAL_ENDSTOPS) && _PEXI(X2_E_INDEX, DIAG)
  1154. #define X2_DIAG_PIN _EPIN(X2_E_INDEX, DIAG)
  1155. #if DIAG_REMAPPED(X2, X_MIN) // If already remapped in the pins file...
  1156. #define X2_USE_ENDSTOP _XMIN_
  1157. #elif DIAG_REMAPPED(X2, Y_MIN)
  1158. #define X2_USE_ENDSTOP _YMIN_
  1159. #elif DIAG_REMAPPED(X2, Z_MIN)
  1160. #define X2_USE_ENDSTOP _ZMIN_
  1161. #elif DIAG_REMAPPED(X2, X_MAX)
  1162. #define X2_USE_ENDSTOP _XMAX_
  1163. #elif DIAG_REMAPPED(X2, Y_MAX)
  1164. #define X2_USE_ENDSTOP _YMAX_
  1165. #elif DIAG_REMAPPED(X2, Z_MAX)
  1166. #define X2_USE_ENDSTOP _ZMAX_
  1167. #else // Otherwise use the driver DIAG_PIN directly
  1168. #define _X2_USE_ENDSTOP(P) _E##P##_DIAG_
  1169. #define X2_USE_ENDSTOP _X2_USE_ENDSTOP(X2_E_INDEX)
  1170. #endif
  1171. #undef X2_DIAG_PIN
  1172. #endif
  1173. #define Y2_E_INDEX INCREMENT(X2_E_INDEX)
  1174. #else
  1175. #define Y2_E_INDEX X2_E_INDEX
  1176. #endif
  1177. #ifndef X2_CS_PIN
  1178. #define X2_CS_PIN -1
  1179. #endif
  1180. #ifndef X2_MS1_PIN
  1181. #define X2_MS1_PIN -1
  1182. #endif
  1183. #ifndef X2_MS2_PIN
  1184. #define X2_MS2_PIN -1
  1185. #endif
  1186. #ifndef X2_MS3_PIN
  1187. #define X2_MS3_PIN -1
  1188. #endif
  1189. // The Y2 axis, if any, should be the next open extruder port
  1190. #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
  1191. #ifndef Y2_STEP_PIN
  1192. #define Y2_STEP_PIN _EPIN(Y2_E_INDEX, STEP)
  1193. #define Y2_DIR_PIN _EPIN(Y2_E_INDEX, DIR)
  1194. #define Y2_ENABLE_PIN _EPIN(Y2_E_INDEX, ENABLE)
  1195. #if Y2_E_INDEX >= MAX_EXTRUDERS || !PIN_EXISTS(Y2_STEP)
  1196. #error "No E stepper plug left for Y2!"
  1197. #endif
  1198. #endif
  1199. #ifndef Y2_MS1_PIN
  1200. #define Y2_MS1_PIN _EPIN(Y2_E_INDEX, MS1)
  1201. #endif
  1202. #ifndef Y2_MS2_PIN
  1203. #define Y2_MS2_PIN _EPIN(Y2_E_INDEX, MS2)
  1204. #endif
  1205. #ifndef Y2_MS3_PIN
  1206. #define Y2_MS3_PIN _EPIN(Y2_E_INDEX, MS3)
  1207. #endif
  1208. #if AXIS_HAS_SPI(Y2) && !defined(Y2_CS_PIN)
  1209. #define Y2_CS_PIN _EPIN(Y2_E_INDEX, CS)
  1210. #endif
  1211. #if AXIS_HAS_UART(Y2)
  1212. #ifndef Y2_SERIAL_TX_PIN
  1213. #define Y2_SERIAL_TX_PIN _EPIN(Y2_E_INDEX, SERIAL_TX)
  1214. #endif
  1215. #ifndef Y2_SERIAL_RX_PIN
  1216. #define Y2_SERIAL_RX_PIN _EPIN(Y2_E_INDEX, SERIAL_RX)
  1217. #endif
  1218. #endif
  1219. #if defined(Y2_STALL_SENSITIVITY) && ENABLED(Y_DUAL_ENDSTOPS) && _PEXI(Y2_E_INDEX, DIAG)
  1220. #define Y2_DIAG_PIN _EPIN(Y2_E_INDEX, DIAG)
  1221. #if DIAG_REMAPPED(Y2, X_MIN)
  1222. #define Y2_USE_ENDSTOP _XMIN_
  1223. #elif DIAG_REMAPPED(Y2, Y_MIN)
  1224. #define Y2_USE_ENDSTOP _YMIN_
  1225. #elif DIAG_REMAPPED(Y2, Z_MIN)
  1226. #define Y2_USE_ENDSTOP _ZMIN_
  1227. #elif DIAG_REMAPPED(Y2, X_MAX)
  1228. #define Y2_USE_ENDSTOP _XMAX_
  1229. #elif DIAG_REMAPPED(Y2, Y_MAX)
  1230. #define Y2_USE_ENDSTOP _YMAX_
  1231. #elif DIAG_REMAPPED(Y2, Z_MAX)
  1232. #define Y2_USE_ENDSTOP _ZMAX_
  1233. #else
  1234. #define _Y2_USE_ENDSTOP(P) _E##P##_DIAG_
  1235. #define Y2_USE_ENDSTOP _Y2_USE_ENDSTOP(Y2_E_INDEX)
  1236. #endif
  1237. #undef Y2_DIAG_PIN
  1238. #endif
  1239. #define Z2_E_INDEX INCREMENT(Y2_E_INDEX)
  1240. #else
  1241. #define Z2_E_INDEX Y2_E_INDEX
  1242. #endif
  1243. #ifndef Y2_CS_PIN
  1244. #define Y2_CS_PIN -1
  1245. #endif
  1246. #ifndef Y2_MS1_PIN
  1247. #define Y2_MS1_PIN -1
  1248. #endif
  1249. #ifndef Y2_MS2_PIN
  1250. #define Y2_MS2_PIN -1
  1251. #endif
  1252. #ifndef Y2_MS3_PIN
  1253. #define Y2_MS3_PIN -1
  1254. #endif
  1255. // The Z2 axis, if any, should be the next open extruder port
  1256. #if NUM_Z_STEPPER_DRIVERS >= 2
  1257. #ifndef Z2_STEP_PIN
  1258. #define Z2_STEP_PIN _EPIN(Z2_E_INDEX, STEP)
  1259. #define Z2_DIR_PIN _EPIN(Z2_E_INDEX, DIR)
  1260. #define Z2_ENABLE_PIN _EPIN(Z2_E_INDEX, ENABLE)
  1261. #if Z2_E_INDEX >= MAX_EXTRUDERS || !PIN_EXISTS(Z2_STEP)
  1262. #error "No E stepper plug left for Z2!"
  1263. #endif
  1264. #endif
  1265. #ifndef Z2_MS1_PIN
  1266. #define Z2_MS1_PIN _EPIN(Z2_E_INDEX, MS1)
  1267. #endif
  1268. #ifndef Z2_MS2_PIN
  1269. #define Z2_MS2_PIN _EPIN(Z2_E_INDEX, MS2)
  1270. #endif
  1271. #ifndef Z2_MS3_PIN
  1272. #define Z2_MS3_PIN _EPIN(Z2_E_INDEX, MS3)
  1273. #endif
  1274. #if AXIS_HAS_SPI(Z2) && !defined(Z2_CS_PIN)
  1275. #define Z2_CS_PIN _EPIN(Z2_E_INDEX, CS)
  1276. #endif
  1277. #if AXIS_HAS_UART(Z2)
  1278. #ifndef Z2_SERIAL_TX_PIN
  1279. #define Z2_SERIAL_TX_PIN _EPIN(Z2_E_INDEX, SERIAL_TX)
  1280. #endif
  1281. #ifndef Z2_SERIAL_RX_PIN
  1282. #define Z2_SERIAL_RX_PIN _EPIN(Z2_E_INDEX, SERIAL_RX)
  1283. #endif
  1284. #endif
  1285. #if defined(Z2_STALL_SENSITIVITY) && ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 2 && _PEXI(Z2_E_INDEX, DIAG)
  1286. #define Z2_DIAG_PIN _EPIN(Z2_E_INDEX, DIAG)
  1287. #if DIAG_REMAPPED(Z2, X_MIN)
  1288. #define Z2_USE_ENDSTOP _XMIN_
  1289. #elif DIAG_REMAPPED(Z2, Y_MIN)
  1290. #define Z2_USE_ENDSTOP _YMIN_
  1291. #elif DIAG_REMAPPED(Z2, Z_MIN)
  1292. #define Z2_USE_ENDSTOP _ZMIN_
  1293. #elif DIAG_REMAPPED(Z2, X_MAX)
  1294. #define Z2_USE_ENDSTOP _XMAX_
  1295. #elif DIAG_REMAPPED(Z2, Y_MAX)
  1296. #define Z2_USE_ENDSTOP _YMAX_
  1297. #elif DIAG_REMAPPED(Z2, Z_MAX)
  1298. #define Z2_USE_ENDSTOP _ZMAX_
  1299. #else
  1300. #define _Z2_USE_ENDSTOP(P) _E##P##_DIAG_
  1301. #define Z2_USE_ENDSTOP _Z2_USE_ENDSTOP(Z2_E_INDEX)
  1302. #endif
  1303. #undef Z2_DIAG_PIN
  1304. #endif
  1305. #define Z3_E_INDEX INCREMENT(Z2_E_INDEX)
  1306. #else
  1307. #define Z3_E_INDEX Z2_E_INDEX
  1308. #endif
  1309. #ifndef Z2_CS_PIN
  1310. #define Z2_CS_PIN -1
  1311. #endif
  1312. #ifndef Z2_MS1_PIN
  1313. #define Z2_MS1_PIN -1
  1314. #endif
  1315. #ifndef Z2_MS2_PIN
  1316. #define Z2_MS2_PIN -1
  1317. #endif
  1318. #ifndef Z2_MS3_PIN
  1319. #define Z2_MS3_PIN -1
  1320. #endif
  1321. #if NUM_Z_STEPPER_DRIVERS >= 3
  1322. #ifndef Z3_STEP_PIN
  1323. #define Z3_STEP_PIN _EPIN(Z3_E_INDEX, STEP)
  1324. #define Z3_DIR_PIN _EPIN(Z3_E_INDEX, DIR)
  1325. #define Z3_ENABLE_PIN _EPIN(Z3_E_INDEX, ENABLE)
  1326. #if Z3_E_INDEX >= MAX_EXTRUDERS || !PIN_EXISTS(Z3_STEP)
  1327. #error "No E stepper plug left for Z3!"
  1328. #endif
  1329. #endif
  1330. #if AXIS_HAS_SPI(Z3)
  1331. #ifndef Z3_CS_PIN
  1332. #define Z3_CS_PIN _EPIN(Z3_E_INDEX, CS)
  1333. #endif
  1334. #endif
  1335. #ifndef Z3_MS1_PIN
  1336. #define Z3_MS1_PIN _EPIN(Z3_E_INDEX, MS1)
  1337. #endif
  1338. #ifndef Z3_MS2_PIN
  1339. #define Z3_MS2_PIN _EPIN(Z3_E_INDEX, MS2)
  1340. #endif
  1341. #ifndef Z3_MS3_PIN
  1342. #define Z3_MS3_PIN _EPIN(Z3_E_INDEX, MS3)
  1343. #endif
  1344. #if AXIS_HAS_UART(Z3)
  1345. #ifndef Z3_SERIAL_TX_PIN
  1346. #define Z3_SERIAL_TX_PIN _EPIN(Z3_E_INDEX, SERIAL_TX)
  1347. #endif
  1348. #ifndef Z3_SERIAL_RX_PIN
  1349. #define Z3_SERIAL_RX_PIN _EPIN(Z3_E_INDEX, SERIAL_RX)
  1350. #endif
  1351. #endif
  1352. #if defined(Z3_STALL_SENSITIVITY) && ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 3 && _PEXI(Z3_E_INDEX, DIAG)
  1353. #define Z3_DIAG_PIN _EPIN(Z3_E_INDEX, DIAG)
  1354. #if DIAG_REMAPPED(Z3, X_MIN)
  1355. #define Z3_USE_ENDSTOP _XMIN_
  1356. #elif DIAG_REMAPPED(Z3, Y_MIN)
  1357. #define Z3_USE_ENDSTOP _YMIN_
  1358. #elif DIAG_REMAPPED(Z3, Z_MIN)
  1359. #define Z3_USE_ENDSTOP _ZMIN_
  1360. #elif DIAG_REMAPPED(Z3, X_MAX)
  1361. #define Z3_USE_ENDSTOP _XMAX_
  1362. #elif DIAG_REMAPPED(Z3, Y_MAX)
  1363. #define Z3_USE_ENDSTOP _YMAX_
  1364. #elif DIAG_REMAPPED(Z3, Z_MAX)
  1365. #define Z3_USE_ENDSTOP _ZMAX_
  1366. #else
  1367. #define _Z3_USE_ENDSTOP(P) _E##P##_DIAG_
  1368. #define Z3_USE_ENDSTOP _Z3_USE_ENDSTOP(Z3_E_INDEX)
  1369. #endif
  1370. #undef Z3_DIAG_PIN
  1371. #endif
  1372. #define Z4_E_INDEX INCREMENT(Z3_E_INDEX)
  1373. #endif
  1374. #ifndef Z3_CS_PIN
  1375. #define Z3_CS_PIN -1
  1376. #endif
  1377. #ifndef Z3_MS1_PIN
  1378. #define Z3_MS1_PIN -1
  1379. #endif
  1380. #ifndef Z3_MS2_PIN
  1381. #define Z3_MS2_PIN -1
  1382. #endif
  1383. #ifndef Z3_MS3_PIN
  1384. #define Z3_MS3_PIN -1
  1385. #endif
  1386. #if NUM_Z_STEPPER_DRIVERS >= 4
  1387. #ifndef Z4_STEP_PIN
  1388. #define Z4_STEP_PIN _EPIN(Z4_E_INDEX, STEP)
  1389. #define Z4_DIR_PIN _EPIN(Z4_E_INDEX, DIR)
  1390. #define Z4_ENABLE_PIN _EPIN(Z4_E_INDEX, ENABLE)
  1391. #if Z4_E_INDEX >= MAX_EXTRUDERS || !PIN_EXISTS(Z4_STEP)
  1392. #error "No E stepper plug left for Z4!"
  1393. #endif
  1394. #endif
  1395. #if AXIS_HAS_SPI(Z4)
  1396. #ifndef Z4_CS_PIN
  1397. #define Z4_CS_PIN _EPIN(Z4_E_INDEX, CS)
  1398. #endif
  1399. #endif
  1400. #ifndef Z4_MS1_PIN
  1401. #define Z4_MS1_PIN _EPIN(Z4_E_INDEX, MS1)
  1402. #endif
  1403. #ifndef Z4_MS2_PIN
  1404. #define Z4_MS2_PIN _EPIN(Z4_E_INDEX, MS2)
  1405. #endif
  1406. #ifndef Z4_MS3_PIN
  1407. #define Z4_MS3_PIN _EPIN(Z4_E_INDEX, MS3)
  1408. #endif
  1409. #if AXIS_HAS_UART(Z4)
  1410. #ifndef Z4_SERIAL_TX_PIN
  1411. #define Z4_SERIAL_TX_PIN _EPIN(Z4_E_INDEX, SERIAL_TX)
  1412. #endif
  1413. #ifndef Z4_SERIAL_RX_PIN
  1414. #define Z4_SERIAL_RX_PIN _EPIN(Z4_E_INDEX, SERIAL_RX)
  1415. #endif
  1416. #endif
  1417. #if defined(Z4_STALL_SENSITIVITY) && ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 4 && _PEXI(Z4_E_INDEX, DIAG)
  1418. #define Z4_DIAG_PIN _EPIN(Z4_E_INDEX, DIAG)
  1419. #if DIAG_REMAPPED(Z4, X_MIN)
  1420. #define Z4_USE_ENDSTOP _XMIN_
  1421. #elif DIAG_REMAPPED(Z4, Y_MIN)
  1422. #define Z4_USE_ENDSTOP _YMIN_
  1423. #elif DIAG_REMAPPED(Z4, Z_MIN)
  1424. #define Z4_USE_ENDSTOP _ZMIN_
  1425. #elif DIAG_REMAPPED(Z4, X_MAX)
  1426. #define Z4_USE_ENDSTOP _XMAX_
  1427. #elif DIAG_REMAPPED(Z4, Y_MAX)
  1428. #define Z4_USE_ENDSTOP _YMAX_
  1429. #elif DIAG_REMAPPED(Z4, Z_MAX)
  1430. #define Z4_USE_ENDSTOP _ZMAX_
  1431. #else
  1432. #define _Z4_USE_ENDSTOP(P) _E##P##_DIAG_
  1433. #define Z4_USE_ENDSTOP _Z4_USE_ENDSTOP(Z4_E_INDEX)
  1434. #endif
  1435. #undef Z4_DIAG_PIN
  1436. #endif
  1437. #endif
  1438. #ifndef Z4_CS_PIN
  1439. #define Z4_CS_PIN -1
  1440. #endif
  1441. #ifndef Z4_MS1_PIN
  1442. #define Z4_MS1_PIN -1
  1443. #endif
  1444. #ifndef Z4_MS2_PIN
  1445. #define Z4_MS2_PIN -1
  1446. #endif
  1447. #ifndef Z4_MS3_PIN
  1448. #define Z4_MS3_PIN -1
  1449. #endif
  1450. #if HAS_GRAPHICAL_LCD
  1451. #if !defined(ST7920_DELAY_1) && defined(BOARD_ST7920_DELAY_1)
  1452. #define ST7920_DELAY_1 BOARD_ST7920_DELAY_1
  1453. #endif
  1454. #if !defined(ST7920_DELAY_2) && defined(BOARD_ST7920_DELAY_2)
  1455. #define ST7920_DELAY_2 BOARD_ST7920_DELAY_2
  1456. #endif
  1457. #if !defined(ST7920_DELAY_3) && defined(BOARD_ST7920_DELAY_3)
  1458. #define ST7920_DELAY_3 BOARD_ST7920_DELAY_3
  1459. #endif
  1460. #else
  1461. #undef ST7920_DELAY_1
  1462. #undef ST7920_DELAY_2
  1463. #undef ST7920_DELAY_3
  1464. #endif
  1465. #undef HAS_FREE_AUX2_PINS
  1466. #undef DIAG_REMAPPED