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

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