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

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