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

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