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 58KB

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