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

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