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

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