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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (C) 2016 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. /**
  24. * Include pins definitions
  25. *
  26. * Pins numbering schemes:
  27. *
  28. * - Digital I/O pin number if used by READ/WRITE macros. (e.g., X_STEP_DIR)
  29. * The FastIO headers map digital pins to their ports and functions.
  30. *
  31. * - Analog Input number if used by analogRead or DAC. (e.g., TEMP_n_PIN)
  32. * These numbers are the same in any pin mapping.
  33. */
  34. #define MAX_EXTRUDERS 6
  35. #if MB(RAMPS_13_EFB) || MB(RAMPS_14_EFB) || MB(RAMPS_PLUS_EFB) || MB(RAMPS_14_RE_ARM_EFB) || MB(RAMPS_SMART_EFB) || MB(RAMPS_DUO_EFB) || MB(RAMPS4DUE_EFB)
  36. #define IS_RAMPS_EFB
  37. #elif MB(RAMPS_13_EEB) || MB(RAMPS_14_EEB) || MB(RAMPS_PLUS_EEB) || MB(RAMPS_14_RE_ARM_EEB) || MB(RAMPS_SMART_EEB) || MB(RAMPS_DUO_EEB) || MB(RAMPS4DUE_EEB)
  38. #define IS_RAMPS_EEB
  39. #elif MB(RAMPS_13_EFF) || MB(RAMPS_14_EFF) || MB(RAMPS_PLUS_EFF) || MB(RAMPS_14_RE_ARM_EFF) || MB(RAMPS_SMART_EFF) || MB(RAMPS_DUO_EFF) || MB(RAMPS4DUE_EFF)
  40. #define IS_RAMPS_EFF
  41. #elif MB(RAMPS_13_EEF) || MB(RAMPS_14_EEF) || MB(RAMPS_PLUS_EEF) || MB(RAMPS_14_RE_ARM_EEF) || MB(RAMPS_SMART_EEF) || MB(RAMPS_DUO_EEF) || MB(RAMPS4DUE_EEF)
  42. #define IS_RAMPS_EEF
  43. #elif MB(RAMPS_13_SF) || MB(RAMPS_14_SF) || MB(RAMPS_PLUS_SF) || MB(RAMPS_14_RE_ARM_SF) || MB(RAMPS_SMART_SF) || MB(RAMPS_DUO_SF) || MB(RAMPS4DUE_SF)
  44. #define IS_RAMPS_SF
  45. #endif
  46. //
  47. // RAMPS 1.3 / 1.4 - ATmega1280, ATmega2560
  48. //
  49. #if MB(RAMPS_OLD)
  50. #include "pins_RAMPS_OLD.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  51. #elif MB(RAMPS_13_EFB)
  52. #include "pins_RAMPS_13.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  53. #elif MB(RAMPS_13_EEB)
  54. #include "pins_RAMPS_13.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  55. #elif MB(RAMPS_13_EFF)
  56. #include "pins_RAMPS_13.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  57. #elif MB(RAMPS_13_EEF)
  58. #include "pins_RAMPS_13.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  59. #elif MB(RAMPS_13_SF)
  60. #include "pins_RAMPS_13.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  61. #elif MB(RAMPS_14_EFB)
  62. #include "pins_RAMPS.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  63. #elif MB(RAMPS_14_EEB)
  64. #include "pins_RAMPS.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  65. #elif MB(RAMPS_14_EFF)
  66. #include "pins_RAMPS.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  67. #elif MB(RAMPS_14_EEF)
  68. #include "pins_RAMPS.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  69. #elif MB(RAMPS_14_SF)
  70. #include "pins_RAMPS.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  71. #elif MB(RAMPS_PLUS_EFB)
  72. #include "pins_RAMPS_PLUS.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  73. #elif MB(RAMPS_PLUS_EEB)
  74. #include "pins_RAMPS_PLUS.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  75. #elif MB(RAMPS_PLUS_EFF)
  76. #include "pins_RAMPS_PLUS.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  77. #elif MB(RAMPS_PLUS_EEF)
  78. #include "pins_RAMPS_PLUS.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  79. #elif MB(RAMPS_PLUS_SF)
  80. #include "pins_RAMPS_PLUS.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  81. //
  82. // RAMPS Derivatives - ATmega1280, ATmega2560
  83. //
  84. #elif MB(3DRAG)
  85. #include "pins_3DRAG.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  86. #elif MB(K8200)
  87. #include "pins_K8200.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560 (3DRAG)
  88. #elif MB(K8400)
  89. #include "pins_K8400.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560 (3DRAG)
  90. #elif MB(BAM_DICE)
  91. #include "pins_RAMPS.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  92. #elif MB(BAM_DICE_DUE)
  93. #include "pins_BAM_DICE_DUE.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  94. #elif MB(MKS_BASE)
  95. #include "pins_MKS_BASE.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  96. #elif MB(MKS_BASE_14)
  97. #include "pins_MKS_BASE_14.h" // ATmega2560 env:megaatmega2560
  98. #elif MB(MKS_BASE_15)
  99. #include "pins_MKS_BASE_15.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  100. #elif MB(MKS_BASE_HEROIC)
  101. #include "pins_MKS_BASE_HEROIC.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  102. #elif MB(MKS_GEN_13)
  103. #include "pins_MKS_GEN_13.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  104. #elif MB(MKS_GEN_L)
  105. #include "pins_MKS_GEN_L.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  106. #elif MB(KFB_2)
  107. #include "pins_BIQU_KFB_2.h" // ATmega2560 env:megaatmega2560
  108. #elif MB(ZRIB_V20)
  109. #include "pins_ZRIB_V20.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560 (MKS_GEN_13)
  110. #elif MB(FELIX2)
  111. #include "pins_FELIX2.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  112. #elif MB(RIGIDBOARD)
  113. #include "pins_RIGIDBOARD.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  114. #elif MB(RIGIDBOARD_V2)
  115. #include "pins_RIGIDBOARD_V2.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  116. #elif MB(SAINSMART_2IN1)
  117. #include "pins_SAINSMART_2IN1.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  118. #elif MB(ULTIMAKER)
  119. #include "pins_ULTIMAKER.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  120. #elif MB(ULTIMAKER_OLD)
  121. #include "pins_ULTIMAKER_OLD.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  122. #elif MB(AZTEEG_X3)
  123. #include "pins_AZTEEG_X3.h" // ATmega2560 env:megaatmega2560
  124. #elif MB(AZTEEG_X3_PRO)
  125. #include "pins_AZTEEG_X3_PRO.h" // ATmega2560 env:megaatmega2560
  126. #elif MB(ULTIMAIN_2)
  127. #include "pins_ULTIMAIN_2.h" // ATmega2560 env:megaatmega2560
  128. #elif MB(FORMBOT_RAPTOR)
  129. #include "pins_FORMBOT_RAPTOR.h" // ATmega2560 env:megaatmega2560
  130. #elif MB(FORMBOT_RAPTOR2)
  131. #include "pins_FORMBOT_RAPTOR2.h" // ATmega2560 env:megaatmega2560
  132. #elif MB(FORMBOT_TREX2PLUS)
  133. #include "pins_FORMBOT_TREX2PLUS.h" // ATmega2560 env:megaatmega2560
  134. #elif MB(FORMBOT_TREX3)
  135. #include "pins_FORMBOT_TREX3.h" // ATmega2560 env:megaatmega2560
  136. #elif MB(RUMBA)
  137. #include "pins_RUMBA.h" // ATmega2560 env:megaatmega2560
  138. #elif MB(RUMBA_RAISE3D)
  139. #include "pins_RUMBA_RAISE3D.h" // ATmega2560 env:megaatmega2560
  140. #elif MB(RL200)
  141. #include "pins_RL200.h" // ATmega2560 env:megaatmega2560
  142. #elif MB(BQ_ZUM_MEGA_3D)
  143. #include "pins_BQ_ZUM_MEGA_3D.h" // ATmega2560 env:megaatmega2560
  144. #elif MB(MAKEBOARD_MINI)
  145. #include "pins_MAKEBOARD_MINI.h" // ATmega2560 env:megaatmega2560
  146. #elif MB(TRIGORILLA_13)
  147. #include "pins_TRIGORILLA_13.h" // ATmega2560 env:megaatmega2560
  148. #elif MB(TRIGORILLA_14)
  149. #include "pins_TRIGORILLA_14.h" // ATmega2560 env:megaatmega2560
  150. #elif MB(RAMPS_ENDER_4)
  151. #include "pins_RAMPS_ENDER_4.h" // ATmega2560 env:megaatmega2560
  152. #elif MB(RAMPS_CREALITY)
  153. #include "pins_RAMPS_CREALITY.h" // ATmega2560 env:megaatmega2560
  154. #elif MB(FYSETC_F6_13)
  155. #include "pins_FYSETC_F6_13.h" // ATmega2560 env:megaatmega2560
  156. #elif MB(DUPLICATOR_I3_PLUS)
  157. #include "pins_DUPLICATOR_I3_PLUS.h" // ATmega2560 env:megaatmega2560
  158. #elif MB(VORON)
  159. #include "pins_VORON.h" // ATmega2560 env:megaatmega2560
  160. //
  161. // Other ATmega1280, ATmega2560
  162. //
  163. #elif MB(CNCONTROLS_11)
  164. #include "pins_CNCONTROLS_11.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  165. #elif MB(CNCONTROLS_12)
  166. #include "pins_CNCONTROLS_12.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  167. #elif MB(MIGHTYBOARD_REVE)
  168. #include "pins_MIGHTYBOARD_REVE.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  169. #elif MB(CHEAPTRONIC)
  170. #include "pins_CHEAPTRONIC.h" // ATmega2560 env:megaatmega2560
  171. #elif MB(CHEAPTRONIC_V2)
  172. #include "pins_CHEAPTRONICv2.h" // ATmega2560 env:megaatmega2560
  173. #elif MB(MEGATRONICS)
  174. #include "pins_MEGATRONICS.h" // ATmega2560 env:megaatmega2560
  175. #elif MB(MEGATRONICS_2)
  176. #include "pins_MEGATRONICS_2.h" // ATmega2560 env:megaatmega2560
  177. #elif MB(MEGATRONICS_3) || MB(MEGATRONICS_31) || MB(MEGATRONICS_32)
  178. #include "pins_MEGATRONICS_3.h" // ATmega2560 env:megaatmega2560
  179. #elif MB(RAMBO)
  180. #include "pins_RAMBO.h" // ATmega2560 env:rambo
  181. #elif MB(MINIRAMBO) || MB(MINIRAMBO_10A)
  182. #include "pins_MINIRAMBO.h" // ATmega2560 env:rambo
  183. #elif MB(EINSY_RAMBO)
  184. #include "pins_EINSY_RAMBO.h" // ATmega2560 env:rambo
  185. #elif MB(EINSY_RETRO)
  186. #include "pins_EINSY_RETRO.h" // ATmega2560 env:rambo
  187. #elif MB(ELEFU_3)
  188. #include "pins_ELEFU_3.h" // ATmega2560 env:megaatmega2560
  189. #elif MB(LEAPFROG)
  190. #include "pins_LEAPFROG.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  191. #elif MB(MEGACONTROLLER)
  192. #include "pins_MEGACONTROLLER.h" // ATmega2560 env:megaatmega2560
  193. #elif MB(SCOOVO_X9H)
  194. #include "pins_SCOOVO_X9H.h" // ATmega2560 env:rambo
  195. #elif MB(GT2560_REV_A)
  196. #include "pins_GT2560_REV_A.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  197. #elif MB(GT2560_REV_A_PLUS)
  198. #include "pins_GT2560_REV_A_PLUS.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  199. #elif MB(GT2560_V3)
  200. #include "pins_GT2560_V3.h" // ATmega2560 env:megaatmega2560
  201. #elif MB(GT2560_V3_MC2)
  202. #include "pins_GT2560_V3_MC2.h" // ATmega2560 env:megaatmega2560
  203. #elif MB(GT2560_V3_A20)
  204. #include "pins_GT2560_V3_A20.h" // ATmega2560 env:megaatmega2560
  205. #elif MB(EINSTART_S)
  206. #include "pins_EINSTART-S.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  207. //
  208. // ATmega1281, ATmega2561
  209. //
  210. #elif MB(MINITRONICS)
  211. #include "pins_MINITRONICS.h" // ATmega1281 env:megaatmega1280
  212. #elif MB(SILVER_GATE)
  213. #include "pins_SILVER_GATE.h" // ATmega2561 env:megaatmega2560
  214. //
  215. // Sanguinololu and Derivatives - ATmega644P, ATmega1284P
  216. //
  217. #elif MB(SANGUINOLOLU_11)
  218. #include "pins_SANGUINOLOLU_11.h" // ATmega644P, ATmega1284P env:sanguino_atmega644p env:sanguino_atmega1284p
  219. #elif MB(SANGUINOLOLU_12)
  220. #include "pins_SANGUINOLOLU_12.h" // ATmega644P, ATmega1284P env:sanguino_atmega644p env:sanguino_atmega1284p
  221. #elif MB(MELZI)
  222. #include "pins_MELZI.h" // ATmega644P, ATmega1284P env:sanguino_atmega644p env:sanguino_atmega1284p
  223. #elif MB(MELZI_MAKR3D)
  224. #include "pins_MELZI_MAKR3D.h" // ATmega644P, ATmega1284P env:sanguino_atmega644p env:sanguino_atmega1284p
  225. #elif MB(MELZI_CREALITY)
  226. #include "pins_MELZI_CREALITY.h" // ATmega644P, ATmega1284P env:sanguino_atmega644p env:sanguino_atmega1284p
  227. #elif MB(MELZI_MALYAN)
  228. #include "pins_MELZI_MALYAN.h" // ATmega644P, ATmega1284P env:sanguino_atmega644p env:sanguino_atmega1284p
  229. #elif MB(MELZI_TRONXY)
  230. #include "pins_MELZI_TRONXY.h" // ATmega644P, ATmega1284P env:sanguino_atmega644p env:sanguino_atmega1284p
  231. #elif MB(STB_11)
  232. #include "pins_STB_11.h" // ATmega644P, ATmega1284P env:sanguino_atmega644p env:sanguino_atmega1284p
  233. #elif MB(AZTEEG_X1)
  234. #include "pins_AZTEEG_X1.h" // ATmega644P, ATmega1284P env:sanguino_atmega644p env:sanguino_atmega1284p
  235. //
  236. // Other ATmega644P, ATmega644, ATmega1284P
  237. //
  238. #elif MB(GEN3_MONOLITHIC)
  239. #include "pins_GEN3_MONOLITHIC.h" // ATmega644P env:sanguino_atmega644p
  240. #elif MB(GEN3_PLUS)
  241. #include "pins_GEN3_PLUS.h" // ATmega644P, ATmega1284P env:sanguino_atmega644p env:sanguino_atmega1284p
  242. #elif MB(GEN6)
  243. #include "pins_GEN6.h" // ATmega644P, ATmega1284P env:sanguino_atmega644p env:sanguino_atmega1284p
  244. #elif MB(GEN6_DELUXE)
  245. #include "pins_GEN6_DELUXE.h" // ATmega644P, ATmega1284P env:sanguino_atmega644p env:sanguino_atmega1284p
  246. #elif MB(GEN7_CUSTOM)
  247. #include "pins_GEN7_CUSTOM.h" // ATmega644P, ATmega644, ATmega1284P env:sanguino_atmega644p env:sanguino_atmega1284p
  248. #elif MB(GEN7_12)
  249. #include "pins_GEN7_12.h" // ATmega644P, ATmega644, ATmega1284P env:sanguino_atmega644p env:sanguino_atmega1284p
  250. #elif MB(GEN7_13)
  251. #include "pins_GEN7_13.h" // ATmega644P, ATmega644, ATmega1284P env:sanguino_atmega644p env:sanguino_atmega1284p
  252. #elif MB(GEN7_14)
  253. #include "pins_GEN7_14.h" // ATmega644P, ATmega644, ATmega1284P env:sanguino_atmega644p env:sanguino_atmega1284p
  254. #elif MB(OMCA_A)
  255. #include "pins_OMCA_A.h" // ATmega644 env:sanguino_atmega644p
  256. #elif MB(OMCA)
  257. #include "pins_OMCA.h" // ATmega644P, ATmega644 env:sanguino_atmega644p
  258. #elif MB(ANET_10)
  259. #include "pins_ANET_10.h" // ATmega1284P env:sanguino_atmega1284p
  260. #elif MB(SETHI)
  261. #include "pins_SETHI.h" // ATmega644P, ATmega644, ATmega1284P env:sanguino_atmega644p env:sanguino_atmega1284p
  262. //
  263. // Teensyduino - AT90USB1286, AT90USB1286P
  264. //
  265. #elif MB(TEENSYLU)
  266. #include "pins_TEENSYLU.h" // AT90USB1286, AT90USB1286P env:at90usb1286_cdc
  267. #elif MB(PRINTRBOARD)
  268. #include "pins_PRINTRBOARD.h" // AT90USB1286 env:at90usb1286_dfu
  269. #elif MB(PRINTRBOARD_REVF)
  270. #include "pins_PRINTRBOARD_REVF.h" // AT90USB1286 env:at90usb1286_dfu
  271. #elif MB(BRAINWAVE)
  272. #include "pins_BRAINWAVE.h" // AT90USB646 env:at90usb1286_cdc
  273. #elif MB(BRAINWAVE_PRO)
  274. #include "pins_BRAINWAVE_PRO.h" // AT90USB1286 env:at90usb1286_cdc
  275. #elif MB(SAV_MKI)
  276. #include "pins_SAV_MKI.h" // AT90USB1286 env:at90usb1286_cdc
  277. #elif MB(TEENSY2)
  278. #include "pins_TEENSY2.h" // AT90USB1286 env:teensy20
  279. #elif MB(5DPRINT)
  280. #include "pins_5DPRINT.h" // AT90USB1286 env:at90usb1286_dfu
  281. //
  282. // LPC1768 ARM Cortex M3
  283. //
  284. #elif MB(RAMPS_14_RE_ARM_EFB)
  285. #include "pins_RAMPS_RE_ARM.h" // LPC1768 env:LPC1768
  286. #elif MB(RAMPS_14_RE_ARM_EEB)
  287. #include "pins_RAMPS_RE_ARM.h" // LPC1768 env:LPC1768
  288. #elif MB(RAMPS_14_RE_ARM_EFF)
  289. #include "pins_RAMPS_RE_ARM.h" // LPC1768 env:LPC1768
  290. #elif MB(RAMPS_14_RE_ARM_EEF)
  291. #include "pins_RAMPS_RE_ARM.h" // LPC1768 env:LPC1768
  292. #elif MB(RAMPS_14_RE_ARM_SF)
  293. #include "pins_RAMPS_RE_ARM.h" // LPC1768 env:LPC1768
  294. #elif MB(MKS_SBASE)
  295. #include "pins_MKS_SBASE.h" // LPC1768 env:LPC1768
  296. #elif MB(AZSMZ_MINI)
  297. #include "pins_AZSMZ_MINI.h" // LPC1768 env:LPC1768
  298. #elif MB(AZTEEG_X5_GT)
  299. #include "pins_AZTEEG_X5_GT.h" // LPC1769 env:LPC1769
  300. #elif MB(AZTEEG_X5_MINI_WIFI)
  301. #include "pins_AZTEEG_X5_MINI_WIFI.h" // LPC1769 env:LPC1769
  302. #elif MB(BIQU_BQ111_A4)
  303. #include "pins_BIQU_BQ111_A4.h" // LPC1768 env:LPC1768
  304. #elif MB(SELENA_COMPACT)
  305. #include "pins_SELENA_COMPACT.h" // LPC1768 env:LPC1768
  306. #elif MB(COHESION3D_REMIX)
  307. #include "pins_COHESION3D_REMIX.h" // LPC1769 env:LPC1769
  308. #elif MB(COHESION3D_MINI)
  309. #include "pins_COHESION3D_MINI.h" // LPC1769 env:LPC1769
  310. #elif MB(SMOOTHIEBOARD)
  311. #include "pins_SMOOTHIEBOARD.h" // LPC1769 env:LPC1769
  312. #elif MB(BIQU_SKR_V1_1)
  313. #include "pins_BIQU_SKR_V1.1.h" // LPC1768 env:LPC1768
  314. #elif MB(BIQU_B300_V1_0)
  315. #include "pins_BIQU_B300_V1.0.h" // LPC1768 env:LPC1768
  316. //
  317. // Other 32-bit Boards
  318. //
  319. #elif MB(DUE3DOM)
  320. #include "pins_DUE3DOM.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  321. #elif MB(DUE3DOM_MINI)
  322. #include "pins_DUE3DOM_MINI.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  323. #elif MB(RADDS)
  324. #include "pins_RADDS.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  325. #elif MB(RURAMPS4D_11)
  326. #include "pins_RURAMPS4D_11.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  327. #elif MB(RURAMPS4D_13)
  328. #include "pins_RURAMPS4D_13.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  329. #elif MB(RAMPS_FD_V1)
  330. #include "pins_RAMPS_FD_V1.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  331. #elif MB(RAMPS_FD_V2)
  332. #include "pins_RAMPS_FD_V2.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  333. #elif MB(RAMPS_SMART_EFB)
  334. #include "pins_RAMPS_SMART.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  335. #elif MB(RAMPS_SMART_EEB)
  336. #include "pins_RAMPS_SMART.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  337. #elif MB(RAMPS_SMART_EFF)
  338. #include "pins_RAMPS_SMART.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  339. #elif MB(RAMPS_SMART_EEF)
  340. #include "pins_RAMPS_SMART.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  341. #elif MB(RAMPS_SMART_SF)
  342. #include "pins_RAMPS_SMART.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  343. #elif MB(RAMPS_DUO_EFB)
  344. #include "pins_RAMPS_DUO.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  345. #elif MB(RAMPS_DUO_EEB)
  346. #include "pins_RAMPS_DUO.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  347. #elif MB(RAMPS_DUO_EFF)
  348. #include "pins_RAMPS_DUO.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  349. #elif MB(RAMPS_DUO_EEF)
  350. #include "pins_RAMPS_DUO.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  351. #elif MB(RAMPS_DUO_SF)
  352. #include "pins_RAMPS_DUO.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  353. #elif MB(RAMPS4DUE_EFB)
  354. #include "pins_RAMPS4DUE.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  355. #elif MB(RAMPS4DUE_EEB)
  356. #include "pins_RAMPS4DUE.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  357. #elif MB(RAMPS4DUE_EFF)
  358. #include "pins_RAMPS4DUE.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  359. #elif MB(RAMPS4DUE_EEF)
  360. #include "pins_RAMPS4DUE.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  361. #elif MB(RAMPS4DUE_SF)
  362. #include "pins_RAMPS4DUE.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  363. #elif MB(ULTRATRONICS_PRO)
  364. #include "pins_ULTRATRONICS_PRO.h" // SAM3X8E env:DUE env:DUE_debug
  365. #elif MB(ARCHIM1)
  366. #include "pins_ARCHIM1.h" // SAM3X8E env:DUE env:DUE_debug
  367. #elif MB(ARCHIM2)
  368. #include "pins_ARCHIM2.h" // SAM3X8E env:DUE env:DUE_debug
  369. #elif MB(ALLIGATOR)
  370. #include "pins_ALLIGATOR_R2.h" // SAM3X8E env:DUE env:DUE_debug
  371. #elif MB(ADSK)
  372. #include "pins_ADSK.h" // SAM3X8E env:DUE env:DUE_debug
  373. //
  374. // STM32 ARM Cortex-M3
  375. //
  376. #elif MB(STM32F1R)
  377. #include "pins_STM32F1R.h" // STM32F1 env:STM32F1
  378. #elif MB(STM3R_MINI)
  379. #include "pins_STM3R_MINI.h" // STM32F1 env:STM32F1
  380. #elif MB(MALYAN_M200)
  381. #include "pins_MALYAN_M200.h" // STM32F1 env:malyanm200
  382. #elif MB(CHITU3D)
  383. #include "pins_CHITU3D.h" // STM32F1 env:STM32F1
  384. #elif MB(GTM32_PRO_VB)
  385. #include "pins_GTM32_PRO_VB.h" // STM32F1 env:STM32F1
  386. #elif MB(MORPHEUS)
  387. #include "pins_MORPHEUS.h" // STM32F1 env:STM32F1
  388. #elif MB(MKS_ROBIN)
  389. #include "pins_MKS_ROBIN.h" // STM32F1 env:STM32F1
  390. //
  391. // STM32 ARM Cortex-M4F
  392. //
  393. #elif MB(TEENSY31_32)
  394. #include "pins_TEENSY31_32.h" // TEENSY31_32 env:teensy31
  395. #elif MB(TEENSY35_36)
  396. #include "pins_TEENSY35_36.h" // TEENSY35_36 env:teensy35
  397. #elif MB(BEAST)
  398. #include "pins_BEAST.h" // STM32F4 env:STM32F4
  399. #elif MB(STM32F4)
  400. #include "pins_STM32F4.h" // STM32F4 env:STM32F4
  401. #elif MB(ARMED)
  402. #include "pins_ARMED.h" // STM32F4 env:ARMED
  403. #elif MB(RUMBA32)
  404. #include "pins_RUMBA32.h" // STM32F4 env:RUMBA32
  405. #elif MB(STEVAL)
  406. #include "pins_STEVAL.h" // STM32F4 env:STM32F4
  407. //
  408. // ARM Cortex M7
  409. //
  410. #elif MB(THE_BORG)
  411. #include "pins_THE_BORG.h" // STM32F7 env:STM32F7
  412. #elif MB(REMRAM_V1)
  413. #include "pins_REMRAM_V1.h" // STM32F7 env:STM32F7xx
  414. //
  415. // Espressif ESP32
  416. //
  417. #elif MB(ESP32)
  418. #include "pins_ESP32.h"
  419. #else
  420. #error "Unknown MOTHERBOARD value set in Configuration.h"
  421. #endif
  422. // Define certain undefined pins
  423. #ifndef X_MS1_PIN
  424. #define X_MS1_PIN -1
  425. #endif
  426. #ifndef X_MS2_PIN
  427. #define X_MS2_PIN -1
  428. #endif
  429. #ifndef X_MS3_PIN
  430. #define X_MS3_PIN -1
  431. #endif
  432. #ifndef Y_MS1_PIN
  433. #define Y_MS1_PIN -1
  434. #endif
  435. #ifndef Y_MS2_PIN
  436. #define Y_MS2_PIN -1
  437. #endif
  438. #ifndef Y_MS3_PIN
  439. #define Y_MS3_PIN -1
  440. #endif
  441. #ifndef Z_MS1_PIN
  442. #define Z_MS1_PIN -1
  443. #endif
  444. #ifndef Z_MS2_PIN
  445. #define Z_MS2_PIN -1
  446. #endif
  447. #ifndef Z_MS3_PIN
  448. #define Z_MS3_PIN -1
  449. #endif
  450. #ifndef E0_MS1_PIN
  451. #define E0_MS1_PIN -1
  452. #endif
  453. #ifndef E0_MS2_PIN
  454. #define E0_MS2_PIN -1
  455. #endif
  456. #ifndef E0_MS3_PIN
  457. #define E0_MS3_PIN -1
  458. #endif
  459. #ifndef E1_MS1_PIN
  460. #define E1_MS1_PIN -1
  461. #endif
  462. #ifndef E1_MS2_PIN
  463. #define E1_MS2_PIN -1
  464. #endif
  465. #ifndef E1_MS3_PIN
  466. #define E1_MS3_PIN -1
  467. #endif
  468. #ifndef E2_MS1_PIN
  469. #define E2_MS1_PIN -1
  470. #endif
  471. #ifndef E2_MS2_PIN
  472. #define E2_MS2_PIN -1
  473. #endif
  474. #ifndef E2_MS3_PIN
  475. #define E2_MS3_PIN -1
  476. #endif
  477. #ifndef E3_MS1_PIN
  478. #define E3_MS1_PIN -1
  479. #endif
  480. #ifndef E3_MS2_PIN
  481. #define E3_MS2_PIN -1
  482. #endif
  483. #ifndef E3_MS3_PIN
  484. #define E3_MS3_PIN -1
  485. #endif
  486. #ifndef E4_MS1_PIN
  487. #define E4_MS1_PIN -1
  488. #endif
  489. #ifndef E4_MS2_PIN
  490. #define E4_MS2_PIN -1
  491. #endif
  492. #ifndef E4_MS3_PIN
  493. #define E4_MS3_PIN -1
  494. #endif
  495. #ifndef E5_MS1_PIN
  496. #define E5_MS1_PIN -1
  497. #endif
  498. #ifndef E5_MS2_PIN
  499. #define E5_MS2_PIN -1
  500. #endif
  501. #ifndef E5_MS3_PIN
  502. #define E5_MS3_PIN -1
  503. #endif
  504. #ifndef E0_STEP_PIN
  505. #define E0_STEP_PIN -1
  506. #endif
  507. #ifndef E0_DIR_PIN
  508. #define E0_DIR_PIN -1
  509. #endif
  510. #ifndef E0_ENABLE_PIN
  511. #define E0_ENABLE_PIN -1
  512. #endif
  513. #ifndef E1_STEP_PIN
  514. #define E1_STEP_PIN -1
  515. #endif
  516. #ifndef E1_DIR_PIN
  517. #define E1_DIR_PIN -1
  518. #endif
  519. #ifndef E1_ENABLE_PIN
  520. #define E1_ENABLE_PIN -1
  521. #endif
  522. #ifndef E2_STEP_PIN
  523. #define E2_STEP_PIN -1
  524. #endif
  525. #ifndef E2_DIR_PIN
  526. #define E2_DIR_PIN -1
  527. #endif
  528. #ifndef E2_ENABLE_PIN
  529. #define E2_ENABLE_PIN -1
  530. #endif
  531. #ifndef E3_STEP_PIN
  532. #define E3_STEP_PIN -1
  533. #endif
  534. #ifndef E3_DIR_PIN
  535. #define E3_DIR_PIN -1
  536. #endif
  537. #ifndef E3_ENABLE_PIN
  538. #define E3_ENABLE_PIN -1
  539. #endif
  540. #ifndef E4_STEP_PIN
  541. #define E4_STEP_PIN -1
  542. #endif
  543. #ifndef E4_DIR_PIN
  544. #define E4_DIR_PIN -1
  545. #endif
  546. #ifndef E4_ENABLE_PIN
  547. #define E4_ENABLE_PIN -1
  548. #endif
  549. #ifndef E5_STEP_PIN
  550. #define E5_STEP_PIN -1
  551. #endif
  552. #ifndef E5_DIR_PIN
  553. #define E5_DIR_PIN -1
  554. #endif
  555. #ifndef E5_ENABLE_PIN
  556. #define E5_ENABLE_PIN -1
  557. #endif
  558. #ifndef X_CS_PIN
  559. #define X_CS_PIN -1
  560. #endif
  561. #ifndef Y_CS_PIN
  562. #define Y_CS_PIN -1
  563. #endif
  564. #ifndef Z_CS_PIN
  565. #define Z_CS_PIN -1
  566. #endif
  567. #ifndef E0_CS_PIN
  568. #define E0_CS_PIN -1
  569. #endif
  570. #ifndef E1_CS_PIN
  571. #define E1_CS_PIN -1
  572. #endif
  573. #ifndef E2_CS_PIN
  574. #define E2_CS_PIN -1
  575. #endif
  576. #ifndef E3_CS_PIN
  577. #define E3_CS_PIN -1
  578. #endif
  579. #ifndef E4_CS_PIN
  580. #define E4_CS_PIN -1
  581. #endif
  582. #ifndef E5_CS_PIN
  583. #define E5_CS_PIN -1
  584. #endif
  585. #ifndef FAN_PIN
  586. #define FAN_PIN -1
  587. #endif
  588. #ifndef FAN1_PIN
  589. #define FAN1_PIN -1
  590. #endif
  591. #ifndef FAN2_PIN
  592. #define FAN2_PIN -1
  593. #endif
  594. #ifndef CONTROLLER_FAN_PIN
  595. #define CONTROLLER_FAN_PIN -1
  596. #endif
  597. #ifndef FANMUX0_PIN
  598. #define FANMUX0_PIN -1
  599. #endif
  600. #ifndef FANMUX1_PIN
  601. #define FANMUX1_PIN -1
  602. #endif
  603. #ifndef FANMUX2_PIN
  604. #define FANMUX2_PIN -1
  605. #endif
  606. #ifndef HEATER_0_PIN
  607. #define HEATER_0_PIN -1
  608. #endif
  609. #ifndef HEATER_1_PIN
  610. #define HEATER_1_PIN -1
  611. #endif
  612. #ifndef HEATER_2_PIN
  613. #define HEATER_2_PIN -1
  614. #endif
  615. #ifndef HEATER_3_PIN
  616. #define HEATER_3_PIN -1
  617. #endif
  618. #ifndef HEATER_4_PIN
  619. #define HEATER_4_PIN -1
  620. #endif
  621. #ifndef HEATER_5_PIN
  622. #define HEATER_5_PIN -1
  623. #endif
  624. #ifndef HEATER_BED_PIN
  625. #define HEATER_BED_PIN -1
  626. #endif
  627. #ifndef TEMP_0_PIN
  628. #define TEMP_0_PIN -1
  629. #endif
  630. #ifndef TEMP_1_PIN
  631. #define TEMP_1_PIN -1
  632. #endif
  633. #ifndef TEMP_2_PIN
  634. #define TEMP_2_PIN -1
  635. #endif
  636. #ifndef TEMP_3_PIN
  637. #define TEMP_3_PIN -1
  638. #endif
  639. #ifndef TEMP_4_PIN
  640. #define TEMP_4_PIN -1
  641. #endif
  642. #ifndef TEMP_5_PIN
  643. #define TEMP_5_PIN -1
  644. #endif
  645. #ifndef TEMP_BED_PIN
  646. #define TEMP_BED_PIN -1
  647. #endif
  648. #ifndef SD_DETECT_PIN
  649. #define SD_DETECT_PIN -1
  650. #endif
  651. #ifndef SDPOWER
  652. #define SDPOWER -1
  653. #endif
  654. #ifndef SDSS
  655. #define SDSS -1
  656. #endif
  657. #ifndef LED_PIN
  658. #define LED_PIN -1
  659. #endif
  660. #if POWER_SUPPLY == 0 || !defined(PS_ON_PIN)
  661. #undef PS_ON_PIN
  662. #define PS_ON_PIN -1
  663. #endif
  664. #ifndef KILL_PIN
  665. #define KILL_PIN -1
  666. #endif
  667. #ifndef SUICIDE_PIN
  668. #define SUICIDE_PIN -1
  669. #endif
  670. #ifndef NUM_SERVO_PLUGS
  671. #define NUM_SERVO_PLUGS 4
  672. #endif
  673. //
  674. // Assign auto fan pins if needed
  675. //
  676. #ifndef E0_AUTO_FAN_PIN
  677. #ifdef ORIG_E0_AUTO_FAN_PIN
  678. #define E0_AUTO_FAN_PIN ORIG_E0_AUTO_FAN_PIN
  679. #else
  680. #define E0_AUTO_FAN_PIN -1
  681. #endif
  682. #endif
  683. #ifndef E1_AUTO_FAN_PIN
  684. #ifdef ORIG_E1_AUTO_FAN_PIN
  685. #define E1_AUTO_FAN_PIN ORIG_E1_AUTO_FAN_PIN
  686. #else
  687. #define E1_AUTO_FAN_PIN -1
  688. #endif
  689. #endif
  690. #ifndef E2_AUTO_FAN_PIN
  691. #ifdef ORIG_E2_AUTO_FAN_PIN
  692. #define E2_AUTO_FAN_PIN ORIG_E2_AUTO_FAN_PIN
  693. #else
  694. #define E2_AUTO_FAN_PIN -1
  695. #endif
  696. #endif
  697. #ifndef E3_AUTO_FAN_PIN
  698. #ifdef ORIG_E3_AUTO_FAN_PIN
  699. #define E3_AUTO_FAN_PIN ORIG_E3_AUTO_FAN_PIN
  700. #else
  701. #define E3_AUTO_FAN_PIN -1
  702. #endif
  703. #endif
  704. #ifndef E4_AUTO_FAN_PIN
  705. #ifdef ORIG_E4_AUTO_FAN_PIN
  706. #define E4_AUTO_FAN_PIN ORIG_E4_AUTO_FAN_PIN
  707. #else
  708. #define E4_AUTO_FAN_PIN -1
  709. #endif
  710. #endif
  711. #ifndef E5_AUTO_FAN_PIN
  712. #ifdef ORIG_E5_AUTO_FAN_PIN
  713. #define E5_AUTO_FAN_PIN ORIG_E5_AUTO_FAN_PIN
  714. #else
  715. #define E5_AUTO_FAN_PIN -1
  716. #endif
  717. #endif
  718. #ifndef CHAMBER_AUTO_FAN_PIN
  719. #ifdef ORIG_CHAMBER_AUTO_FAN_PIN
  720. #define CHAMBER_AUTO_FAN_PIN ORIG_CHAMBER_AUTO_FAN_PIN
  721. #else
  722. #define CHAMBER_AUTO_FAN_PIN -1
  723. #endif
  724. #endif
  725. //
  726. // Assign endstop pins for boards with only 3 connectors
  727. //
  728. #ifdef X_STOP_PIN
  729. #if X_HOME_DIR < 0
  730. #define X_MIN_PIN X_STOP_PIN
  731. #define X_MAX_PIN -1
  732. #else
  733. #define X_MIN_PIN -1
  734. #define X_MAX_PIN X_STOP_PIN
  735. #endif
  736. #endif
  737. #ifdef Y_STOP_PIN
  738. #if Y_HOME_DIR < 0
  739. #define Y_MIN_PIN Y_STOP_PIN
  740. #define Y_MAX_PIN -1
  741. #else
  742. #define Y_MIN_PIN -1
  743. #define Y_MAX_PIN Y_STOP_PIN
  744. #endif
  745. #endif
  746. #ifdef Z_STOP_PIN
  747. #if Z_HOME_DIR < 0
  748. #define Z_MIN_PIN Z_STOP_PIN
  749. #define Z_MAX_PIN -1
  750. #else
  751. #define Z_MIN_PIN -1
  752. #define Z_MAX_PIN Z_STOP_PIN
  753. #endif
  754. #endif
  755. //
  756. // Disable unused endstop / probe pins
  757. //
  758. #if !HAS_BED_PROBE || DISABLED(Z_MIN_PROBE_ENDSTOP)
  759. #undef Z_MIN_PROBE_PIN
  760. #define Z_MIN_PROBE_PIN -1
  761. #endif
  762. #if DISABLED(USE_XMAX_PLUG)
  763. #undef X_MAX_PIN
  764. #define X_MAX_PIN -1
  765. #endif
  766. #if DISABLED(USE_YMAX_PLUG)
  767. #undef Y_MAX_PIN
  768. #define Y_MAX_PIN -1
  769. #endif
  770. #if DISABLED(USE_ZMAX_PLUG)
  771. #undef Z_MAX_PIN
  772. #define Z_MAX_PIN -1
  773. #endif
  774. #if DISABLED(USE_XMIN_PLUG)
  775. #undef X_MIN_PIN
  776. #define X_MIN_PIN -1
  777. #endif
  778. #if DISABLED(USE_YMIN_PLUG)
  779. #undef Y_MIN_PIN
  780. #define Y_MIN_PIN -1
  781. #endif
  782. #if DISABLED(USE_ZMIN_PLUG)
  783. #undef Z_MIN_PIN
  784. #define Z_MIN_PIN -1
  785. #endif
  786. #ifndef LCD_PINS_D4
  787. #define LCD_PINS_D4 -1
  788. #endif
  789. #ifndef LCD_PINS_D5
  790. #define LCD_PINS_D5 -1
  791. #endif
  792. #ifndef LCD_PINS_D6
  793. #define LCD_PINS_D6 -1
  794. #endif
  795. #ifndef LCD_PINS_D7
  796. #define LCD_PINS_D7 -1
  797. #endif
  798. /**
  799. * Auto-Assignment for Dual X, Dual Y, Multi-Z Steppers
  800. *
  801. * By default X2 is assigned to the next open E plug
  802. * on the board, then in order, Y2, Z2, Z3. These can be
  803. * overridden in Configuration.h or Configuration_adv.h.
  804. */
  805. #define __EPIN(p,q) E##p##_##q##_PIN
  806. #define _EPIN(p,q) __EPIN(p,q)
  807. // The X2 axis, if any, should be the next open extruder port
  808. #if ENABLED(DUAL_X_CARRIAGE) || ENABLED(X_DUAL_STEPPER_DRIVERS)
  809. #ifndef X2_STEP_PIN
  810. #define X2_STEP_PIN _EPIN(E_STEPPERS, STEP)
  811. #define X2_DIR_PIN _EPIN(E_STEPPERS, DIR)
  812. #define X2_ENABLE_PIN _EPIN(E_STEPPERS, ENABLE)
  813. #if E_STEPPERS >= MAX_EXTRUDERS || !PIN_EXISTS(X2_STEP)
  814. #error "No E stepper plug left for X2!"
  815. #endif
  816. #endif
  817. #ifndef X2_CS_PIN
  818. #define X2_CS_PIN _EPIN(E_STEPPERS, CS)
  819. #endif
  820. #ifndef X2_MS1_PIN
  821. #define X2_MS1_PIN _EPIN(E_STEPPERS, MS1)
  822. #endif
  823. #ifndef X2_MS2_PIN
  824. #define X2_MS2_PIN _EPIN(E_STEPPERS, MS2)
  825. #endif
  826. #ifndef X2_MS3_PIN
  827. #define X2_MS3_PIN _EPIN(E_STEPPERS, MS3)
  828. #endif
  829. #define Y2_E_INDEX INCREMENT(E_STEPPERS)
  830. #else
  831. #define Y2_E_INDEX E_STEPPERS
  832. #endif
  833. // The Y2 axis, if any, should be the next open extruder port
  834. #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
  835. #ifndef Y2_STEP_PIN
  836. #define Y2_STEP_PIN _EPIN(Y2_E_INDEX, STEP)
  837. #define Y2_DIR_PIN _EPIN(Y2_E_INDEX, DIR)
  838. #define Y2_ENABLE_PIN _EPIN(Y2_E_INDEX, ENABLE)
  839. #if Y2_E_INDEX >= MAX_EXTRUDERS || !PIN_EXISTS(Y2_STEP)
  840. #error "No E stepper plug left for Y2!"
  841. #endif
  842. #endif
  843. #ifndef Y2_CS_PIN
  844. #define Y2_CS_PIN _EPIN(Y2_E_INDEX, CS)
  845. #endif
  846. #ifndef Y2_MS1_PIN
  847. #define Y2_MS1_PIN _EPIN(Y2_E_INDEX, MS1)
  848. #endif
  849. #ifndef Y2_MS2_PIN
  850. #define Y2_MS2_PIN _EPIN(Y2_E_INDEX, MS2)
  851. #endif
  852. #ifndef Y2_MS3_PIN
  853. #define Y2_MS3_PIN _EPIN(Y2_E_INDEX, MS3)
  854. #endif
  855. #define Z2_E_INDEX INCREMENT(Y2_E_INDEX)
  856. #else
  857. #define Z2_E_INDEX Y2_E_INDEX
  858. #endif
  859. // The Z2 axis, if any, should be the next open extruder port
  860. #if Z_MULTI_STEPPER_DRIVERS
  861. #ifndef Z2_STEP_PIN
  862. #define Z2_STEP_PIN _EPIN(Z2_E_INDEX, STEP)
  863. #define Z2_DIR_PIN _EPIN(Z2_E_INDEX, DIR)
  864. #define Z2_ENABLE_PIN _EPIN(Z2_E_INDEX, ENABLE)
  865. #if Z2_E_INDEX >= MAX_EXTRUDERS || !PIN_EXISTS(Z2_STEP)
  866. #error "No E stepper plug left for Z2!"
  867. #endif
  868. #endif
  869. #ifndef Z2_CS_PIN
  870. #define Z2_CS_PIN _EPIN(Z2_E_INDEX, CS)
  871. #endif
  872. #ifndef Z2_MS1_PIN
  873. #define Z2_MS1_PIN _EPIN(Z2_E_INDEX, MS1)
  874. #endif
  875. #ifndef Z2_MS2_PIN
  876. #define Z2_MS2_PIN _EPIN(Z2_E_INDEX, MS2)
  877. #endif
  878. #ifndef Z2_MS3_PIN
  879. #define Z2_MS3_PIN _EPIN(Z2_E_INDEX, MS3)
  880. #endif
  881. #define Z3_E_INDEX INCREMENT(Z2_E_INDEX)
  882. #else
  883. #define Z3_E_INDEX Z2_E_INDEX
  884. #endif
  885. #if ENABLED(Z_TRIPLE_STEPPER_DRIVERS)
  886. #ifndef Z3_STEP_PIN
  887. #define Z3_STEP_PIN _EPIN(Z3_E_INDEX, STEP)
  888. #define Z3_DIR_PIN _EPIN(Z3_E_INDEX, DIR)
  889. #define Z3_ENABLE_PIN _EPIN(Z3_E_INDEX, ENABLE)
  890. #if Z3_E_INDEX >= MAX_EXTRUDERS || !PIN_EXISTS(Z3_STEP)
  891. #error "No E stepper plug left for Z3!"
  892. #endif
  893. #endif
  894. #ifndef Z3_CS_PIN
  895. #define Z3_CS_PIN _EPIN(Z3_E_INDEX, CS)
  896. #endif
  897. #ifndef Z3_MS1_PIN
  898. #define Z3_MS1_PIN _EPIN(Z3_E_INDEX, MS1)
  899. #endif
  900. #ifndef Z3_MS2_PIN
  901. #define Z3_MS2_PIN _EPIN(Z3_E_INDEX, MS2)
  902. #endif
  903. #ifndef Z3_MS3_PIN
  904. #define Z3_MS3_PIN _EPIN(Z3_E_INDEX, MS3)
  905. #endif
  906. #endif