My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

pins.h 37KB

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