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

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2020 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. #include "../core/boards.h"
  24. /**
  25. * Include pins definitions
  26. *
  27. * Pins numbering schemes:
  28. *
  29. * - Digital I/O pin number if used by READ/WRITE macros. (e.g., X_STEP_DIR)
  30. * The FastIO headers map digital pins to their ports and functions.
  31. *
  32. * - Analog Input number if used by analogRead or DAC. (e.g., TEMP_n_PIN)
  33. * These numbers are the same in any pin mapping.
  34. */
  35. #define MAX_EXTRUDERS 8
  36. #if MB(RAMPS_13_EFB, RAMPS_14_EFB, RAMPS_PLUS_EFB, RAMPS_14_RE_ARM_EFB, RAMPS_SMART_EFB, RAMPS_DUO_EFB, RAMPS4DUE_EFB)
  37. #define IS_RAMPS_EFB
  38. #elif MB(RAMPS_13_EEB, RAMPS_14_EEB, RAMPS_PLUS_EEB, RAMPS_14_RE_ARM_EEB, RAMPS_SMART_EEB, RAMPS_DUO_EEB, RAMPS4DUE_EEB)
  39. #define IS_RAMPS_EEB
  40. #elif MB(RAMPS_13_EFF, RAMPS_14_EFF, RAMPS_PLUS_EFF, RAMPS_14_RE_ARM_EFF, RAMPS_SMART_EFF, RAMPS_DUO_EFF, RAMPS4DUE_EFF)
  41. #define IS_RAMPS_EFF
  42. #elif MB(RAMPS_13_EEF, RAMPS_14_EEF, RAMPS_PLUS_EEF, RAMPS_14_RE_ARM_EEF, RAMPS_SMART_EEF, RAMPS_DUO_EEF, RAMPS4DUE_EEF)
  43. #define IS_RAMPS_EEF
  44. #elif MB(RAMPS_13_SF, RAMPS_14_SF, RAMPS_PLUS_SF, RAMPS_14_RE_ARM_SF, RAMPS_SMART_SF, RAMPS_DUO_SF, RAMPS4DUE_SF)
  45. #define IS_RAMPS_SF
  46. #endif
  47. #define HAS_FREE_AUX2_PINS !(BOTH(ULTRA_LCD, NEWPANEL) && ANY(PANEL_ONE, VIKI2, miniVIKI, MINIPANEL, REPRAPWORLD_KEYPAD))
  48. //
  49. // RAMPS 1.3 / 1.4 - ATmega1280, ATmega2560
  50. //
  51. #if MB(RAMPS_OLD)
  52. #include "ramps/pins_RAMPS_OLD.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  53. #elif MB(RAMPS_13_EFB)
  54. #include "ramps/pins_RAMPS_13.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  55. #elif MB(RAMPS_13_EEB)
  56. #include "ramps/pins_RAMPS_13.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  57. #elif MB(RAMPS_13_EFF)
  58. #include "ramps/pins_RAMPS_13.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  59. #elif MB(RAMPS_13_EEF)
  60. #include "ramps/pins_RAMPS_13.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  61. #elif MB(RAMPS_13_SF)
  62. #include "ramps/pins_RAMPS_13.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  63. #elif MB(RAMPS_14_EFB)
  64. #include "ramps/pins_RAMPS.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  65. #elif MB(RAMPS_14_EEB)
  66. #include "ramps/pins_RAMPS.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  67. #elif MB(RAMPS_14_EFF)
  68. #include "ramps/pins_RAMPS.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  69. #elif MB(RAMPS_14_EEF)
  70. #include "ramps/pins_RAMPS.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  71. #elif MB(RAMPS_14_SF)
  72. #include "ramps/pins_RAMPS.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  73. #elif MB(RAMPS_PLUS_EFB)
  74. #include "ramps/pins_RAMPS_PLUS.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  75. #elif MB(RAMPS_PLUS_EEB)
  76. #include "ramps/pins_RAMPS_PLUS.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  77. #elif MB(RAMPS_PLUS_EFF)
  78. #include "ramps/pins_RAMPS_PLUS.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  79. #elif MB(RAMPS_PLUS_EEF)
  80. #include "ramps/pins_RAMPS_PLUS.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  81. #elif MB(RAMPS_PLUS_SF)
  82. #include "ramps/pins_RAMPS_PLUS.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  83. //
  84. // RAMPS Derivatives - ATmega1280, ATmega2560
  85. //
  86. #elif MB(3DRAG)
  87. #include "ramps/pins_3DRAG.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  88. #elif MB(K8200)
  89. #include "ramps/pins_K8200.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 (3DRAG)
  90. #elif MB(K8400)
  91. #include "ramps/pins_K8400.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 (3DRAG)
  92. #elif MB(K8800)
  93. #include "ramps/pins_K8800.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 (3DRAG)
  94. #elif MB(BAM_DICE)
  95. #include "ramps/pins_RAMPS.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  96. #elif MB(BAM_DICE_DUE)
  97. #include "ramps/pins_BAM_DICE_DUE.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  98. #elif MB(MKS_BASE)
  99. #include "ramps/pins_MKS_BASE_10.h" // ATmega2560 env:mega2560
  100. #elif MB(MKS_BASE_14)
  101. #include "ramps/pins_MKS_BASE_14.h" // ATmega2560 env:mega2560
  102. #elif MB(MKS_BASE_15)
  103. #include "ramps/pins_MKS_BASE_15.h" // ATmega2560 env:mega2560
  104. #elif MB(MKS_BASE_16)
  105. #include "ramps/pins_MKS_BASE_16.h" // ATmega2560 env:mega2560
  106. #elif MB(MKS_BASE_HEROIC)
  107. #include "ramps/pins_MKS_BASE_HEROIC.h" // ATmega2560 env:mega2560
  108. #elif MB(MKS_GEN_13)
  109. #include "ramps/pins_MKS_GEN_13.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  110. #elif MB(MKS_GEN_L)
  111. #include "ramps/pins_MKS_GEN_L.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  112. #elif MB(KFB_2)
  113. #include "ramps/pins_BIQU_KFB_2.h" // ATmega2560 env:mega2560
  114. #elif MB(ZRIB_V20)
  115. #include "ramps/pins_ZRIB_V20.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 (MKS_GEN_13)
  116. #elif MB(FELIX2)
  117. #include "ramps/pins_FELIX2.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  118. #elif MB(RIGIDBOARD)
  119. #include "ramps/pins_RIGIDBOARD.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  120. #elif MB(RIGIDBOARD_V2)
  121. #include "ramps/pins_RIGIDBOARD_V2.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  122. #elif MB(SAINSMART_2IN1)
  123. #include "ramps/pins_SAINSMART_2IN1.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  124. #elif MB(ULTIMAKER)
  125. #include "ramps/pins_ULTIMAKER.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  126. #elif MB(ULTIMAKER_OLD)
  127. #include "ramps/pins_ULTIMAKER_OLD.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  128. #elif MB(AZTEEG_X3)
  129. #include "ramps/pins_AZTEEG_X3.h" // ATmega2560 env:mega2560
  130. #elif MB(AZTEEG_X3_PRO)
  131. #include "ramps/pins_AZTEEG_X3_PRO.h" // ATmega2560 env:mega2560
  132. #elif MB(ULTIMAIN_2)
  133. #include "ramps/pins_ULTIMAIN_2.h" // ATmega2560 env:mega2560
  134. #elif MB(FORMBOT_RAPTOR)
  135. #include "ramps/pins_FORMBOT_RAPTOR.h" // ATmega2560 env:mega2560
  136. #elif MB(FORMBOT_RAPTOR2)
  137. #include "ramps/pins_FORMBOT_RAPTOR2.h" // ATmega2560 env:mega2560
  138. #elif MB(FORMBOT_TREX2PLUS)
  139. #include "ramps/pins_FORMBOT_TREX2PLUS.h" // ATmega2560 env:mega2560
  140. #elif MB(FORMBOT_TREX3)
  141. #include "ramps/pins_FORMBOT_TREX3.h" // ATmega2560 env:mega2560
  142. #elif MB(RUMBA)
  143. #include "ramps/pins_RUMBA.h" // ATmega2560 env:mega2560
  144. #elif MB(RUMBA_RAISE3D)
  145. #include "ramps/pins_RUMBA_RAISE3D.h" // ATmega2560 env:mega2560
  146. #elif MB(RL200)
  147. #include "ramps/pins_RL200.h" // ATmega2560 env:mega2560
  148. #elif MB(BQ_ZUM_MEGA_3D)
  149. #include "ramps/pins_BQ_ZUM_MEGA_3D.h" // ATmega2560 env:mega2560
  150. #elif MB(MAKEBOARD_MINI)
  151. #include "ramps/pins_MAKEBOARD_MINI.h" // ATmega2560 env:mega2560
  152. #elif MB(TRIGORILLA_13)
  153. #include "ramps/pins_TRIGORILLA_13.h" // ATmega2560 env:mega2560
  154. #elif MB(TRIGORILLA_14)
  155. #include "ramps/pins_TRIGORILLA_14.h" // ATmega2560 env:mega2560
  156. #elif MB(TRIGORILLA_14_11)
  157. #include "ramps/pins_TRIGORILLA_14.h" // ATmega2560 env:mega2560
  158. #elif MB(RAMPS_ENDER_4)
  159. #include "ramps/pins_RAMPS_ENDER_4.h" // ATmega2560 env:mega2560
  160. #elif MB(RAMPS_CREALITY)
  161. #include "ramps/pins_RAMPS_CREALITY.h" // ATmega2560 env:mega2560
  162. #elif MB(RAMPS_DAGOMA)
  163. #include "ramps/pins_RAMPS_DAGOMA.h" // ATmega2560 env:mega2560
  164. #elif MB(FYSETC_F6_13)
  165. #include "ramps/pins_FYSETC_F6_13.h" // ATmega2560 env:FYSETC_F6_13
  166. #elif MB(FYSETC_F6_14)
  167. #include "ramps/pins_FYSETC_F6_14.h" // ATmega2560 env:FYSETC_F6_14
  168. #elif MB(DUPLICATOR_I3_PLUS)
  169. #include "ramps/pins_DUPLICATOR_I3_PLUS.h" // ATmega2560 env:mega2560
  170. #elif MB(VORON)
  171. #include "ramps/pins_VORON.h" // ATmega2560 env:mega2560
  172. #elif MB(TRONXY_V3_1_0)
  173. #include "ramps/pins_TRONXY_V3_1_0.h" // ATmega2560 env:mega2560
  174. #elif MB(Z_BOLT_X_SERIES)
  175. #include "ramps/pins_Z_BOLT_X_SERIES.h" // ATmega2560 env:mega2560
  176. #elif MB(TT_OSCAR)
  177. #include "ramps/pins_TT_OSCAR.h" // ATmega2560 env:mega2560
  178. #elif MB(TANGO)
  179. #include "ramps/pins_TANGO.h" // ATmega2560 env:mega2560
  180. #elif MB(MKS_GEN_L_V2)
  181. #include "ramps/pins_MKS_GEN_L_V2.h" // ATmega2560 env:mega2560
  182. #elif MB(COPYMASTER_3D)
  183. #include "ramps/pins_COPYMASTER_3D.h" // ATmega2560 env:mega2560
  184. //
  185. // RAMBo and derivatives
  186. //
  187. #elif MB(RAMBO)
  188. #include "rambo/pins_RAMBO.h" // ATmega2560 env:rambo
  189. #elif MB(MINIRAMBO, MINIRAMBO_10A)
  190. #include "rambo/pins_MINIRAMBO.h" // ATmega2560 env:rambo
  191. #elif MB(EINSY_RAMBO)
  192. #include "rambo/pins_EINSY_RAMBO.h" // ATmega2560 env:rambo
  193. #elif MB(EINSY_RETRO)
  194. #include "rambo/pins_EINSY_RETRO.h" // ATmega2560 env:rambo
  195. #elif MB(SCOOVO_X9H)
  196. #include "rambo/pins_SCOOVO_X9H.h" // ATmega2560 env:rambo
  197. //
  198. // Other ATmega1280, ATmega2560
  199. //
  200. #elif MB(CNCONTROLS_11)
  201. #include "mega/pins_CNCONTROLS_11.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  202. #elif MB(CNCONTROLS_12)
  203. #include "mega/pins_CNCONTROLS_12.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  204. #elif MB(CNCONTROLS_15)
  205. #include "mega/pins_CNCONTROLS_15.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  206. #elif MB(MIGHTYBOARD_REVE)
  207. #include "mega/pins_MIGHTYBOARD_REVE.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  208. #elif MB(CHEAPTRONIC)
  209. #include "mega/pins_CHEAPTRONIC.h" // ATmega2560 env:mega2560
  210. #elif MB(CHEAPTRONIC_V2)
  211. #include "mega/pins_CHEAPTRONICv2.h" // ATmega2560 env:mega2560
  212. #elif MB(MEGATRONICS)
  213. #include "mega/pins_MEGATRONICS.h" // ATmega2560 env:mega2560
  214. #elif MB(MEGATRONICS_2)
  215. #include "mega/pins_MEGATRONICS_2.h" // ATmega2560 env:mega2560
  216. #elif MB(MEGATRONICS_3, MEGATRONICS_31, MEGATRONICS_32)
  217. #include "mega/pins_MEGATRONICS_3.h" // ATmega2560 env:mega2560
  218. #elif MB(ELEFU_3)
  219. #include "mega/pins_ELEFU_3.h" // ATmega2560 env:mega2560
  220. #elif MB(LEAPFROG)
  221. #include "mega/pins_LEAPFROG.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  222. #elif MB(MEGACONTROLLER)
  223. #include "mega/pins_MEGACONTROLLER.h" // ATmega2560 env:mega2560
  224. #elif MB(GT2560_REV_A)
  225. #include "mega/pins_GT2560_REV_A.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  226. #elif MB(GT2560_REV_A_PLUS)
  227. #include "mega/pins_GT2560_REV_A_PLUS.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  228. #elif MB(GT2560_V3)
  229. #include "mega/pins_GT2560_V3.h" // ATmega2560 env:mega2560
  230. #elif MB(GT2560_V3_MC2)
  231. #include "mega/pins_GT2560_V3_MC2.h" // ATmega2560 env:mega2560
  232. #elif MB(GT2560_V3_A20)
  233. #include "mega/pins_GT2560_V3_A20.h" // ATmega2560 env:mega2560
  234. #elif MB(EINSTART_S)
  235. #include "mega/pins_EINSTART-S.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560
  236. #elif MB(WANHAO_ONEPLUS)
  237. #include "mega/pins_WANHAO_ONEPLUS.h" // ATmega2560 env:mega2560
  238. #elif MB(OVERLORD)
  239. #include "mega/pins_OVERLORD.h" // ATmega2560 env:mega2560
  240. #elif MB(HJC2560C_REV2)
  241. #include "mega/pins_HJC2560C_REV2.h" // ATmega2560 env:mega2560
  242. #elif MB(LEAPFROG_XEED2015)
  243. #include "mega/pins_LEAPFROG_XEED2015.h" // ATmega2560 env:mega2560
  244. #elif MB(PICA)
  245. #include "mega/pins_PICA.h" // ATmega2560 env:mega2560
  246. #elif MB(PICA_REVB)
  247. #include "mega/pins_PICAOLD.h" // ATmega2560 env:mega2560
  248. #elif MB(INTAMSYS40)
  249. #include "mega/pins_INTAMSYS40.h" // ATmega2560 env:mega2560
  250. //
  251. // ATmega1281, ATmega2561
  252. //
  253. #elif MB(MINITRONICS)
  254. #include "mega/pins_MINITRONICS.h" // ATmega1281 env:mega1280
  255. #elif MB(SILVER_GATE)
  256. #include "mega/pins_SILVER_GATE.h" // ATmega2561 env:mega2560
  257. //
  258. // Sanguinololu and Derivatives - ATmega644P, ATmega1284P
  259. //
  260. #elif MB(SANGUINOLOLU_11)
  261. #include "sanguino/pins_SANGUINOLOLU_11.h" // ATmega644P, ATmega1284P env:sanguino644p env:sanguino1284p
  262. #elif MB(SANGUINOLOLU_12)
  263. #include "sanguino/pins_SANGUINOLOLU_12.h" // ATmega644P, ATmega1284P env:sanguino644p env:sanguino1284p
  264. #elif MB(MELZI)
  265. #include "sanguino/pins_MELZI.h" // ATmega644P, ATmega1284P env:sanguino644p env:sanguino1284p
  266. #elif MB(MELZI_MAKR3D)
  267. #include "sanguino/pins_MELZI_MAKR3D.h" // ATmega644P, ATmega1284P env:sanguino644p env:sanguino1284p
  268. #elif MB(MELZI_CREALITY)
  269. #include "sanguino/pins_MELZI_CREALITY.h" // ATmega1284P env:melzi env:melzi_optiboot
  270. #elif MB(MELZI_MALYAN)
  271. #include "sanguino/pins_MELZI_MALYAN.h" // ATmega644P, ATmega1284P env:sanguino644p env:sanguino1284p
  272. #elif MB(MELZI_TRONXY)
  273. #include "sanguino/pins_MELZI_TRONXY.h" // ATmega644P, ATmega1284P env:sanguino644p env:sanguino1284p
  274. #elif MB(STB_11)
  275. #include "sanguino/pins_STB_11.h" // ATmega644P, ATmega1284P env:sanguino644p env:sanguino1284p
  276. #elif MB(AZTEEG_X1)
  277. #include "sanguino/pins_AZTEEG_X1.h" // ATmega644P, ATmega1284P env:sanguino644p env:sanguino1284p
  278. //
  279. // Other ATmega644P, ATmega644, ATmega1284P
  280. //
  281. #elif MB(GEN3_MONOLITHIC)
  282. #include "sanguino/pins_GEN3_MONOLITHIC.h" // ATmega644P env:sanguino644p
  283. #elif MB(GEN3_PLUS)
  284. #include "sanguino/pins_GEN3_PLUS.h" // ATmega644P, ATmega1284P env:sanguino644p env:sanguino1284p
  285. #elif MB(GEN6)
  286. #include "sanguino/pins_GEN6.h" // ATmega644P, ATmega1284P env:sanguino644p env:sanguino1284p
  287. #elif MB(GEN6_DELUXE)
  288. #include "sanguino/pins_GEN6_DELUXE.h" // ATmega644P, ATmega1284P env:sanguino644p env:sanguino1284p
  289. #elif MB(GEN7_CUSTOM)
  290. #include "sanguino/pins_GEN7_CUSTOM.h" // ATmega644P, ATmega644, ATmega1284P env:sanguino644p env:sanguino1284p
  291. #elif MB(GEN7_12)
  292. #include "sanguino/pins_GEN7_12.h" // ATmega644P, ATmega644, ATmega1284P env:sanguino644p env:sanguino1284p
  293. #elif MB(GEN7_13)
  294. #include "sanguino/pins_GEN7_13.h" // ATmega644P, ATmega644, ATmega1284P env:sanguino644p env:sanguino1284p
  295. #elif MB(GEN7_14)
  296. #include "sanguino/pins_GEN7_14.h" // ATmega644P, ATmega644, ATmega1284P env:sanguino644p env:sanguino1284p
  297. #elif MB(OMCA_A)
  298. #include "sanguino/pins_OMCA_A.h" // ATmega644 env:sanguino644p
  299. #elif MB(OMCA)
  300. #include "sanguino/pins_OMCA.h" // ATmega644P, ATmega644 env:sanguino644p
  301. #elif MB(ANET_10)
  302. #include "sanguino/pins_ANET_10.h" // ATmega1284P env:sanguino1284p
  303. #elif MB(SETHI)
  304. #include "sanguino/pins_SETHI.h" // ATmega644P, ATmega644, ATmega1284P env:sanguino644p env:sanguino1284p
  305. //
  306. // Teensyduino - AT90USB1286, AT90USB1286P
  307. //
  308. #elif MB(TEENSYLU)
  309. #include "teensy2/pins_TEENSYLU.h" // AT90USB1286, AT90USB1286P env:at90usb1286_cdc
  310. #elif MB(PRINTRBOARD)
  311. #include "teensy2/pins_PRINTRBOARD.h" // AT90USB1286 env:at90usb1286_dfu
  312. #elif MB(PRINTRBOARD_REVF)
  313. #include "teensy2/pins_PRINTRBOARD_REVF.h" // AT90USB1286 env:at90usb1286_dfu
  314. #elif MB(BRAINWAVE)
  315. #include "teensy2/pins_BRAINWAVE.h" // AT90USB646 env:at90usb1286_cdc
  316. #elif MB(BRAINWAVE_PRO)
  317. #include "teensy2/pins_BRAINWAVE_PRO.h" // AT90USB1286 env:at90usb1286_cdc
  318. #elif MB(SAV_MKI)
  319. #include "teensy2/pins_SAV_MKI.h" // AT90USB1286 env:at90usb1286_cdc
  320. #elif MB(TEENSY2)
  321. #include "teensy2/pins_TEENSY2.h" // AT90USB1286 env:teensy20
  322. #elif MB(5DPRINT)
  323. #include "teensy2/pins_5DPRINT.h" // AT90USB1286 env:at90usb1286_dfu
  324. //
  325. // LPC1768 ARM Cortex M3
  326. //
  327. #elif MB(RAMPS_14_RE_ARM_EFB)
  328. #include "lpc1768/pins_RAMPS_RE_ARM.h" // LPC1768 env:LPC1768
  329. #elif MB(RAMPS_14_RE_ARM_EEB)
  330. #include "lpc1768/pins_RAMPS_RE_ARM.h" // LPC1768 env:LPC1768
  331. #elif MB(RAMPS_14_RE_ARM_EFF)
  332. #include "lpc1768/pins_RAMPS_RE_ARM.h" // LPC1768 env:LPC1768
  333. #elif MB(RAMPS_14_RE_ARM_EEF)
  334. #include "lpc1768/pins_RAMPS_RE_ARM.h" // LPC1768 env:LPC1768
  335. #elif MB(RAMPS_14_RE_ARM_SF)
  336. #include "lpc1768/pins_RAMPS_RE_ARM.h" // LPC1768 env:LPC1768
  337. #elif MB(MKS_SBASE)
  338. #include "lpc1768/pins_MKS_SBASE.h" // LPC1768 env:LPC1768
  339. #elif MB(MKS_SGEN_L)
  340. #include "lpc1768/pins_MKS_SGEN_L.h" // LPC1768 env:LPC1768
  341. #elif MB(AZSMZ_MINI)
  342. #include "lpc1768/pins_AZSMZ_MINI.h" // LPC1768 env:LPC1768
  343. #elif MB(BIQU_BQ111_A4)
  344. #include "lpc1768/pins_BIQU_BQ111_A4.h" // LPC1768 env:LPC1768
  345. #elif MB(SELENA_COMPACT)
  346. #include "lpc1768/pins_SELENA_COMPACT.h" // LPC1768 env:LPC1768
  347. #elif MB(BIQU_B300_V1_0)
  348. #include "lpc1768/pins_BIQU_B300_V1.0.h" // LPC1768 env:LPC1768
  349. #elif MB(GMARSH_X6_REV1)
  350. #include "lpc1768/pins_GMARSH_X6_REV1.h" // LPC1768 env:LPC1768
  351. #elif MB(BTT_SKR_V1_1)
  352. #include "lpc1768/pins_BTT_SKR_V1_1.h" // LPC1768 env:LPC1768
  353. #elif MB(BTT_SKR_V1_3)
  354. #include "lpc1768/pins_BTT_SKR_V1_3.h" // LPC1768 env:LPC1768
  355. #elif MB(BTT_SKR_V1_4)
  356. #include "lpc1768/pins_BTT_SKR_V1_4.h" // LPC1768 env:LPC1768
  357. //
  358. // LPC1769 ARM Cortex M3
  359. //
  360. #elif MB(MKS_SGEN)
  361. #include "lpc1769/pins_MKS_SGEN.h" // LPC1769 env:LPC1769
  362. #elif MB(AZTEEG_X5_GT)
  363. #include "lpc1769/pins_AZTEEG_X5_GT.h" // LPC1769 env:LPC1769
  364. #elif MB(AZTEEG_X5_MINI)
  365. #include "lpc1769/pins_AZTEEG_X5_MINI.h" // LPC1769 env:LPC1769
  366. #elif MB(AZTEEG_X5_MINI_WIFI)
  367. #include "lpc1769/pins_AZTEEG_X5_MINI_WIFI.h" // LPC1769 env:LPC1769
  368. #elif MB(COHESION3D_REMIX)
  369. #include "lpc1769/pins_COHESION3D_REMIX.h" // LPC1769 env:LPC1769
  370. #elif MB(COHESION3D_MINI)
  371. #include "lpc1769/pins_COHESION3D_MINI.h" // LPC1769 env:LPC1769
  372. #elif MB(SMOOTHIEBOARD)
  373. #include "lpc1769/pins_SMOOTHIEBOARD.h" // LPC1769 env:LPC1769
  374. #elif MB(TH3D_EZBOARD)
  375. #include "lpc1769/pins_TH3D_EZBOARD.h" // LPC1769 env:LPC1769
  376. #elif MB(BTT_SKR_V1_4_TURBO)
  377. #include "lpc1769/pins_BTT_SKR_V1_4_TURBO.h" // LPC1769 env:LPC1769
  378. //
  379. // Due (ATSAM) boards
  380. //
  381. #elif MB(DUE3DOM)
  382. #include "sam/pins_DUE3DOM.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  383. #elif MB(DUE3DOM_MINI)
  384. #include "sam/pins_DUE3DOM_MINI.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  385. #elif MB(RADDS)
  386. #include "sam/pins_RADDS.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  387. #elif MB(RURAMPS4D_11)
  388. #include "sam/pins_RURAMPS4D_11.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  389. #elif MB(RURAMPS4D_13)
  390. #include "sam/pins_RURAMPS4D_13.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  391. #elif MB(RAMPS_FD_V1)
  392. #include "sam/pins_RAMPS_FD_V1.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  393. #elif MB(RAMPS_FD_V2)
  394. #include "sam/pins_RAMPS_FD_V2.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  395. #elif MB(RAMPS_SMART_EFB)
  396. #include "sam/pins_RAMPS_SMART.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  397. #elif MB(RAMPS_SMART_EEB)
  398. #include "sam/pins_RAMPS_SMART.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  399. #elif MB(RAMPS_SMART_EFF)
  400. #include "sam/pins_RAMPS_SMART.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  401. #elif MB(RAMPS_SMART_EEF)
  402. #include "sam/pins_RAMPS_SMART.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  403. #elif MB(RAMPS_SMART_SF)
  404. #include "sam/pins_RAMPS_SMART.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  405. #elif MB(RAMPS_DUO_EFB)
  406. #include "sam/pins_RAMPS_DUO.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  407. #elif MB(RAMPS_DUO_EEB)
  408. #include "sam/pins_RAMPS_DUO.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  409. #elif MB(RAMPS_DUO_EFF)
  410. #include "sam/pins_RAMPS_DUO.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  411. #elif MB(RAMPS_DUO_EEF)
  412. #include "sam/pins_RAMPS_DUO.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  413. #elif MB(RAMPS_DUO_SF)
  414. #include "sam/pins_RAMPS_DUO.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  415. #elif MB(RAMPS4DUE_EFB)
  416. #include "sam/pins_RAMPS4DUE.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  417. #elif MB(RAMPS4DUE_EEB)
  418. #include "sam/pins_RAMPS4DUE.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  419. #elif MB(RAMPS4DUE_EFF)
  420. #include "sam/pins_RAMPS4DUE.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  421. #elif MB(RAMPS4DUE_EEF)
  422. #include "sam/pins_RAMPS4DUE.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  423. #elif MB(RAMPS4DUE_SF)
  424. #include "sam/pins_RAMPS4DUE.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  425. #elif MB(ULTRATRONICS_PRO)
  426. #include "sam/pins_ULTRATRONICS_PRO.h" // SAM3X8E env:DUE env:DUE_debug
  427. #elif MB(ARCHIM1)
  428. #include "sam/pins_ARCHIM1.h" // SAM3X8E env:DUE env:DUE_debug
  429. #elif MB(ARCHIM2)
  430. #include "sam/pins_ARCHIM2.h" // SAM3X8E env:DUE_archim env:DUE_archim_debug
  431. #elif MB(ALLIGATOR)
  432. #include "sam/pins_ALLIGATOR_R2.h" // SAM3X8E env:DUE env:DUE_debug
  433. #elif MB(ADSK)
  434. #include "sam/pins_ADSK.h" // SAM3X8E env:DUE env:DUE_debug
  435. #elif MB(PRINTRBOARD_G2)
  436. #include "sam/pins_PRINTRBOARD_G2.h" // SAM3X8C env:DUE_USB
  437. #elif MB(CNCONTROLS_15D)
  438. #include "sam/pins_CNCONTROLS_15D.h" // SAM3X8E env:DUE env:DUE_USB
  439. //
  440. // STM32 ARM Cortex-M0
  441. //
  442. #elif MB(MALYAN_M300)
  443. #include "stm32f0/pins_MALYAN_M300.h" // STM32F070 env:malyan_M300
  444. //
  445. // STM32 ARM Cortex-M3
  446. //
  447. #elif MB(STM32F103RE)
  448. #include "stm32f1/pins_STM32F1R.h" // STM32F1 env:STM32F103RE
  449. #elif MB(MALYAN_M200)
  450. #include "stm32f1/pins_MALYAN_M200.h" // STM32F1 env:STM32F103CB_malyan
  451. #elif MB(STM3R_MINI)
  452. #include "stm32f1/pins_STM3R_MINI.h" // STM32F1 env:STM32F103RE
  453. #elif MB(GTM32_PRO_VB)
  454. #include "stm32f1/pins_GTM32_PRO_VB.h" // STM32F1 env:STM32F103RE
  455. #elif MB(GTM32_MINI_A30)
  456. #include "stm32f1/pins_GTM32_MINI_A30.h" // STM32F1 env:STM32F103RE
  457. #elif MB(GTM32_MINI)
  458. #include "stm32f1/pins_GTM32_MINI.h" // STM32F1 env:STM32F103RE
  459. #elif MB(GTM32_REV_B)
  460. #include "stm32f1/pins_GTM32_REV_B.h" // STM32F1 env:STM32F103RE
  461. #elif MB(MORPHEUS)
  462. #include "stm32f1/pins_MORPHEUS.h" // STM32F1 env:STM32F103RE
  463. #elif MB(CHITU3D)
  464. #include "stm32f1/pins_CHITU3D.h" // STM32F1 env:STM32F103RE
  465. #elif MB(MKS_ROBIN)
  466. #include "stm32f1/pins_MKS_ROBIN.h" // STM32F1 env:mks_robin
  467. #elif MB(MKS_ROBIN_MINI)
  468. #include "stm32f1/pins_MKS_ROBIN_MINI.h" // STM32F1 env:mks_robin_mini
  469. #elif MB(MKS_ROBIN_NANO)
  470. #include "stm32f1/pins_MKS_ROBIN_NANO.h" // STM32F1 env:mks_robin_nano
  471. #elif MB(MKS_ROBIN_LITE)
  472. #include "stm32f1/pins_MKS_ROBIN_LITE.h" // STM32F1 env:mks_robin_lite
  473. #elif MB(BTT_SKR_MINI_V1_1)
  474. #include "stm32f1/pins_BTT_SKR_MINI_V1_1.h" // STM32F1 env:STM32F103RC_btt env:STM32F103RC_btt_512K env:STM32F103RC_btt_USB env:STM32F103RC_btt_512K_USB
  475. #elif MB(BTT_SKR_MINI_E3_V1_0)
  476. #include "stm32f1/pins_BTT_SKR_MINI_E3_V1_0.h" // STM32F1 env:STM32F103RC_btt env:STM32F103RC_btt_512K env:STM32F103RC_btt_USB env:STM32F103RC_btt_512K_USB
  477. #elif MB(BTT_SKR_MINI_E3_V1_2)
  478. #include "stm32f1/pins_BTT_SKR_MINI_E3_V1_2.h" // STM32F1 env:STM32F103RC_btt env:STM32F103RC_btt_512K env:STM32F103RC_btt_USB env:STM32F103RC_btt_512K_USB
  479. #elif MB(BTT_SKR_E3_DIP)
  480. #include "stm32f1/pins_BTT_SKR_E3_DIP.h" // STM32F1 env:STM32F103RE_btt env:STM32F103RE_btt_USB env:STM32F103RC_btt env:STM32F103RC_btt_512K env:STM32F103RC_btt_USB env:STM32F103RC_btt_512K_USB
  481. #elif MB(JGAURORA_A5S_A1)
  482. #include "stm32f1/pins_JGAURORA_A5S_A1.h" // STM32F1 env:jgaurora_a5s_a1
  483. #elif MB(FYSETC_AIO_II)
  484. #include "stm32f1/pins_FYSETC_AIO_II.h" // STM32F1 env:STM32F103RC_fysetc
  485. #elif MB(FYSETC_CHEETAH)
  486. #include "stm32f1/pins_FYSETC_CHEETAH.h" // STM32F1 env:STM32F103RC_fysetc
  487. #elif MB(FYSETC_CHEETAH_V12)
  488. #include "stm32f1/pins_FYSETC_CHEETAH_V12.h" // STM32F1 env:STM32F103RC_fysetc
  489. #elif MB(LONGER3D_LK)
  490. #include "stm32f1/pins_LONGER3D_LK.h" // STM32F1 env:STM32F103VE_longer
  491. #elif MB(MKS_ROBIN_LITE3)
  492. #include "stm32f1/pins_MKS_ROBIN_LITE3.h" // STM32F1 env:mks_robin_lite3
  493. #elif MB(MKS_ROBIN_PRO)
  494. #include "stm32f1/pins_MKS_ROBIN_PRO.h" // STM32F1 env:mks_robin_pro
  495. #elif MB(MKS_ROBIN_E3D)
  496. #include "stm32f1/pins_MKS_ROBIN_E3D.h" // STM32F1 env:mks_robin_e3
  497. #elif MB(MKS_ROBIN_E3)
  498. #include "stm32f1/pins_MKS_ROBIN_E3.h" // STM32F1 env:mks_robin_e3
  499. //
  500. // ARM Cortex-M4F
  501. //
  502. #elif MB(TEENSY31_32)
  503. #include "teensy3/pins_TEENSY31_32.h" // TEENSY31_32 env:teensy31
  504. #elif MB(TEENSY35_36)
  505. #include "teensy3/pins_TEENSY35_36.h" // TEENSY35_36 env:teensy35
  506. //
  507. // STM32 ARM Cortex-M4F
  508. //
  509. #elif MB(BEAST)
  510. #include "stm32f4/pins_BEAST.h" // STM32F4 env:STM32F4
  511. #elif MB(GENERIC_STM32F4)
  512. #include "stm32f4/pins_GENERIC_STM32F4.h" // STM32F4 env:STM32F4
  513. #elif MB(ARMED)
  514. #include "stm32f4/pins_ARMED.h" // STM32F4 env:ARMED
  515. #elif MB(RUMBA32_AUS3D)
  516. #include "stm32f4/pins_RUMBA32_AUS3D.h" // STM32F4 env:rumba32_f446ve
  517. #elif MB(RUMBA32_MKS)
  518. #include "stm32f4/pins_RUMBA32_MKS.h" // STM32F4 env:rumba32_mks
  519. #elif MB(BLACK_STM32F407VE)
  520. #include "stm32f4/pins_BLACK_STM32F407VE.h" // STM32F4 env:STM32F407VE_black
  521. #elif MB(STEVAL_3DP001V1)
  522. #include "stm32f4/pins_STEVAL_3DP001V1.h" // STM32F4 env:STM32F401VE_STEVAL
  523. #elif MB(BTT_SKR_PRO_V1_1)
  524. #include "stm32f4/pins_BTT_SKR_PRO_V1_1.h" // STM32F4 env:BIGTREE_SKR_PRO
  525. #elif MB(BTT_GTR_V1_0)
  526. #include "stm32f4/pins_BTT_GTR_V1_0.h" // STM32F4 env:BIGTREE_GTR_V1_0
  527. #elif MB(BTT_BTT002_V1_0)
  528. #include "stm32f4/pins_BTT_BTT002_V1_0.h" // STM32F4 env:BIGTREE_BTT002
  529. #elif MB(LERDGE_K)
  530. #include "stm32f4/pins_LERDGE_K.h" // STM32F4 env:STM32F4
  531. #elif MB(LERDGE_X)
  532. #include "stm32f4/pins_LERDGE_X.h" // STM32F4 env:STM32F4
  533. #elif MB(VAKE403D)
  534. #include "stm32f4/pins_VAKE403D.h" // STM32F4 env:STM32F4
  535. #elif MB(FYSETC_S6)
  536. #include "stm32f4/pins_FYSETC_S6.h" // STM32F4 env:FYSETC_S6
  537. #elif MB(FLYF407ZG)
  538. #include "stm32f4/pins_FLYF407ZG.h" // STM32F4 env:FLYF407ZG
  539. #elif MB(MKS_ROBIN2)
  540. #include "stm32f4/pins_MKS_ROBIN2.h" // STM32F4 env:MKS_ROBIN2
  541. //
  542. // ARM Cortex M7
  543. //
  544. #elif MB(THE_BORG)
  545. #include "stm32f7/pins_THE_BORG.h" // STM32F7 env:STM32F7
  546. #elif MB(REMRAM_V1)
  547. #include "stm32f7/pins_REMRAM_V1.h" // STM32F7 env:STM32F7
  548. //
  549. // Espressif ESP32
  550. //
  551. #elif MB(ESPRESSIF_ESP32)
  552. #include "esp32/pins_ESP32.h" // ESP32 env:esp32
  553. #elif MB(MRR_ESPA)
  554. #include "esp32/pins_MRR_ESPA.h" // ESP32 env:esp32
  555. #elif MB(MRR_ESPE)
  556. #include "esp32/pins_MRR_ESPE.h" // ESP32 env:esp32
  557. #elif MB(E4D_BOX)
  558. #include "esp32/pins_E4D.h" // ESP32 env:esp32
  559. //
  560. // Adafruit Grand Central M4 (SAMD51 ARM Cortex-M4)
  561. //
  562. #elif MB(AGCM4_RAMPS_144)
  563. #include "samd/pins_RAMPS_144.h" // SAMD51 env:SAMD51_grandcentral_m4
  564. //
  565. // Linux Native Debug board
  566. //
  567. #elif MB(LINUX_RAMPS)
  568. #include "linux/pins_RAMPS_LINUX.h" // Linux env:linux_native
  569. #else
  570. //
  571. // Obsolete or unknown board
  572. //
  573. #define BOARD_MKS_13 -1000
  574. #define BOARD_TRIGORILLA -1001
  575. #define BOARD_RURAMPS4D -1002
  576. #define BOARD_FORMBOT_TREX2 -1003
  577. #define BOARD_BIQU_SKR_V1_1 -1004
  578. #define BOARD_STM32F1R -1005
  579. #define BOARD_STM32F103R -1006
  580. #define BOARD_ESP32 -1007
  581. #define BOARD_STEVAL -1008
  582. #define BOARD_BIGTREE_SKR_V1_1 -1009
  583. #define BOARD_BIGTREE_SKR_V1_3 -1010
  584. #define BOARD_BIGTREE_SKR_V1_4 -1011
  585. #define BOARD_BIGTREE_SKR_V1_4_TURBO -1012
  586. #define BOARD_BIGTREE_BTT002_V1_0 -1013
  587. #define BOARD_BIGTREE_SKR_PRO_V1_1 -1014
  588. #define BOARD_BIGTREE_SKR_MINI_V1_1 -1015
  589. #define BOARD_BIGTREE_SKR_MINI_E3 -1016
  590. #define BOARD_BIGTREE_SKR_E3_DIP -1017
  591. #define BOARD_RUMBA32 -1018
  592. #if MB(MKS_13)
  593. #error "BOARD_MKS_13 has been renamed BOARD_MKS_GEN_13. Please update your configuration."
  594. #elif MB(TRIGORILLA)
  595. #error "BOARD_TRIGORILLA has been renamed BOARD_TRIGORILLA_13. Please update your configuration."
  596. #elif MB(RURAMPS4D)
  597. #error "BOARD_RURAMPS4D has been renamed BOARD_RURAMPS4D_11. Please update your configuration."
  598. #elif MB(FORMBOT_TREX2)
  599. #error "FORMBOT_TREX2 has been renamed BOARD_FORMBOT_TREX2PLUS. Please update your configuration."
  600. #elif MB(BIQU_SKR_V1_1)
  601. #error "BOARD_BIQU_SKR_V1_1 has been renamed BOARD_BTT_SKR_V1_1. Please update your configuration."
  602. #elif MB(BIGTREE_SKR_V1_1)
  603. #error "BOARD_BIGTREE_SKR_V1_1 has been renamed BOARD_BTT_SKR_V1_1. Please update your configuration."
  604. #elif MB(BIGTREE_SKR_V2_2)
  605. #error "BOARD_BIGTREE_SKR_V1_2 has been renamed BOARD_BTT_SKR_V1_2. Please update your configuration."
  606. #elif MB(BIGTREE_SKR_V1_3)
  607. #error "BOARD_BIGTREE_SKR_V1_3 has been renamed BOARD_BTT_SKR_V1_3. Please update your configuration."
  608. #elif MB(BIGTREE_SKR_V1_4)
  609. #error "BOARD_BIGTREE_SKR_V1_4 has been renamed BOARD_BTT_SKR_V1_4. Please update your configuration."
  610. #elif MB(BIGTREE_SKR_V1_4_TURBO)
  611. #error "BOARD_BIGTREE_SKR_V1_4_TURBO has been renamed BOARD_BTT_SKR_V1_4_TURBO. Please update your configuration."
  612. #elif MB(BIGTREE_BTT002_V1_0)
  613. #error "BOARD_BIGTREE_BTT002_V1_0 has been renamed BOARD_BTT_BTT002_V1_0. Please update your configuration."
  614. #elif MB(BIGTREE_SKR_PRO_V1_1)
  615. #error "BOARD_BIGTREE_SKR_PRO_V1_1 has been renamed BOARD_BTT_SKR_PRO_V1_1. Please update your configuration."
  616. #elif MB(BIGTREE_SKR_MINI_V1_1)
  617. #error "BOARD_BIGTREE_SKR_MINI_V1_1 has been renamed BOARD_BTT_SKR_MINI_V1_1. Please update your configuration."
  618. #elif MB(BIGTREE_SKR_MINI_E3)
  619. #error "BOARD_BIGTREE_SKR_MINI_E3 has been renamed BOARD_BTT_SKR_MINI_E3_V1_0. Please update your configuration."
  620. #elif MB(BIGTREE_SKR_E3_DIP)
  621. #error "BOARD_BIGTREE_SKR_E3_DIP has been renamed BOARD_BTT_SKR_E3_DIP. Please update your configuration."
  622. #elif MB(STM32F1R)
  623. #error "BOARD_STM32F1R has been renamed BOARD_STM32F103RE. Please update your configuration."
  624. #elif MB(STM32F103R)
  625. #error "BOARD_STM32F103R has been renamed BOARD_STM32F103RE. Please update your configuration."
  626. #elif MOTHERBOARD == BOARD_ESP32
  627. #error "BOARD_ESP32 has been renamed BOARD_ESPRESSIF_ESP32. Please update your configuration."
  628. #elif MB(STEVAL)
  629. #error "BOARD_STEVAL has been renamed BOARD_STEVAL_3DP001V1. Please update your configuration."
  630. #elif MB(RUMBA32)
  631. #error "BOARD_RUMBA32 is now BOARD_RUMBA32_MKS or BOARD_RUMBA32_AUS3D. Please update your configuration."
  632. #else
  633. #error "Unknown MOTHERBOARD value set in Configuration.h"
  634. #endif
  635. #undef BOARD_MKS_13
  636. #undef BOARD_TRIGORILLA
  637. #undef BOARD_RURAMPS4D
  638. #undef BOARD_FORMBOT_TREX2
  639. #undef BOARD_BIQU_SKR_V1_1
  640. #undef BOARD_STM32F1R
  641. #undef BOARD_STM32F103R
  642. #undef BOARD_ESP32
  643. #undef BOARD_STEVAL
  644. #undef BOARD_BIGTREE_SKR_MINI_E3
  645. #undef BOARD_BIGTREE_SKR_V1_1
  646. #undef BOARD_BIGTREE_SKR_V1_3
  647. #undef BOARD_BIGTREE_SKR_V1_4
  648. #undef BOARD_BIGTREE_SKR_V1_4_TURBO
  649. #undef BOARD_BIGTREE_BTT002_V1_0
  650. #undef BOARD_BIGTREE_SKR_PRO_V1_1
  651. #undef BOARD_BIGTREE_SKR_MINI_V1_1
  652. #undef BOARD_BIGTREE_SKR_E3_DIP
  653. #undef BOARD_RUMBA32
  654. #endif
  655. // Define certain undefined pins
  656. #ifndef X_MS1_PIN
  657. #define X_MS1_PIN -1
  658. #endif
  659. #ifndef X_MS2_PIN
  660. #define X_MS2_PIN -1
  661. #endif
  662. #ifndef X_MS3_PIN
  663. #define X_MS3_PIN -1
  664. #endif
  665. #ifndef Y_MS1_PIN
  666. #define Y_MS1_PIN -1
  667. #endif
  668. #ifndef Y_MS2_PIN
  669. #define Y_MS2_PIN -1
  670. #endif
  671. #ifndef Y_MS3_PIN
  672. #define Y_MS3_PIN -1
  673. #endif
  674. #ifndef Z_MS1_PIN
  675. #define Z_MS1_PIN -1
  676. #endif
  677. #ifndef Z_MS2_PIN
  678. #define Z_MS2_PIN -1
  679. #endif
  680. #ifndef Z_MS3_PIN
  681. #define Z_MS3_PIN -1
  682. #endif
  683. #ifndef E0_MS1_PIN
  684. #define E0_MS1_PIN -1
  685. #endif
  686. #ifndef E0_MS2_PIN
  687. #define E0_MS2_PIN -1
  688. #endif
  689. #ifndef E0_MS3_PIN
  690. #define E0_MS3_PIN -1
  691. #endif
  692. #ifndef E1_MS1_PIN
  693. #define E1_MS1_PIN -1
  694. #endif
  695. #ifndef E1_MS2_PIN
  696. #define E1_MS2_PIN -1
  697. #endif
  698. #ifndef E1_MS3_PIN
  699. #define E1_MS3_PIN -1
  700. #endif
  701. #ifndef E2_MS1_PIN
  702. #define E2_MS1_PIN -1
  703. #endif
  704. #ifndef E2_MS2_PIN
  705. #define E2_MS2_PIN -1
  706. #endif
  707. #ifndef E2_MS3_PIN
  708. #define E2_MS3_PIN -1
  709. #endif
  710. #ifndef E3_MS1_PIN
  711. #define E3_MS1_PIN -1
  712. #endif
  713. #ifndef E3_MS2_PIN
  714. #define E3_MS2_PIN -1
  715. #endif
  716. #ifndef E3_MS3_PIN
  717. #define E3_MS3_PIN -1
  718. #endif
  719. #ifndef E4_MS1_PIN
  720. #define E4_MS1_PIN -1
  721. #endif
  722. #ifndef E4_MS2_PIN
  723. #define E4_MS2_PIN -1
  724. #endif
  725. #ifndef E4_MS3_PIN
  726. #define E4_MS3_PIN -1
  727. #endif
  728. #ifndef E5_MS1_PIN
  729. #define E5_MS1_PIN -1
  730. #endif
  731. #ifndef E5_MS2_PIN
  732. #define E5_MS2_PIN -1
  733. #endif
  734. #ifndef E5_MS3_PIN
  735. #define E5_MS3_PIN -1
  736. #endif
  737. #ifndef E6_MS1_PIN
  738. #define E6_MS1_PIN -1
  739. #endif
  740. #ifndef E6_MS2_PIN
  741. #define E6_MS2_PIN -1
  742. #endif
  743. #ifndef E6_MS3_PIN
  744. #define E6_MS3_PIN -1
  745. #endif
  746. #ifndef E7_MS1_PIN
  747. #define E7_MS1_PIN -1
  748. #endif
  749. #ifndef E7_MS2_PIN
  750. #define E7_MS2_PIN -1
  751. #endif
  752. #ifndef E7_MS3_PIN
  753. #define E7_MS3_PIN -1
  754. #endif
  755. #ifndef E0_STEP_PIN
  756. #define E0_STEP_PIN -1
  757. #endif
  758. #ifndef E0_DIR_PIN
  759. #define E0_DIR_PIN -1
  760. #endif
  761. #ifndef E0_ENABLE_PIN
  762. #define E0_ENABLE_PIN -1
  763. #endif
  764. #ifndef E1_STEP_PIN
  765. #define E1_STEP_PIN -1
  766. #endif
  767. #ifndef E1_DIR_PIN
  768. #define E1_DIR_PIN -1
  769. #endif
  770. #ifndef E1_ENABLE_PIN
  771. #define E1_ENABLE_PIN -1
  772. #endif
  773. #ifndef E2_STEP_PIN
  774. #define E2_STEP_PIN -1
  775. #endif
  776. #ifndef E2_DIR_PIN
  777. #define E2_DIR_PIN -1
  778. #endif
  779. #ifndef E2_ENABLE_PIN
  780. #define E2_ENABLE_PIN -1
  781. #endif
  782. #ifndef E3_STEP_PIN
  783. #define E3_STEP_PIN -1
  784. #endif
  785. #ifndef E3_DIR_PIN
  786. #define E3_DIR_PIN -1
  787. #endif
  788. #ifndef E3_ENABLE_PIN
  789. #define E3_ENABLE_PIN -1
  790. #endif
  791. #ifndef E4_STEP_PIN
  792. #define E4_STEP_PIN -1
  793. #endif
  794. #ifndef E4_DIR_PIN
  795. #define E4_DIR_PIN -1
  796. #endif
  797. #ifndef E4_ENABLE_PIN
  798. #define E4_ENABLE_PIN -1
  799. #endif
  800. #ifndef E5_STEP_PIN
  801. #define E5_STEP_PIN -1
  802. #endif
  803. #ifndef E5_DIR_PIN
  804. #define E5_DIR_PIN -1
  805. #endif
  806. #ifndef E5_ENABLE_PIN
  807. #define E5_ENABLE_PIN -1
  808. #endif
  809. #ifndef E6_STEP_PIN
  810. #define E6_STEP_PIN -1
  811. #endif
  812. #ifndef E6_DIR_PIN
  813. #define E6_DIR_PIN -1
  814. #endif
  815. #ifndef E6_ENABLE_PIN
  816. #define E6_ENABLE_PIN -1
  817. #endif
  818. #ifndef E7_STEP_PIN
  819. #define E7_STEP_PIN -1
  820. #endif
  821. #ifndef E7_DIR_PIN
  822. #define E7_DIR_PIN -1
  823. #endif
  824. #ifndef E7_ENABLE_PIN
  825. #define E7_ENABLE_PIN -1
  826. #endif
  827. //
  828. // Destroy unused CS pins
  829. //
  830. #if !AXIS_HAS_SPI(X)
  831. #undef X_CS_PIN
  832. #endif
  833. #if !AXIS_HAS_SPI(Y)
  834. #undef Y_CS_PIN
  835. #endif
  836. #if !AXIS_HAS_SPI(Z)
  837. #undef Z_CS_PIN
  838. #endif
  839. #if E_STEPPERS && !AXIS_HAS_SPI(E0)
  840. #undef E0_CS_PIN
  841. #endif
  842. #if E_STEPPERS > 1 && !AXIS_HAS_SPI(E1)
  843. #undef E1_CS_PIN
  844. #endif
  845. #if E_STEPPERS > 2 && !AXIS_HAS_SPI(E2)
  846. #undef E2_CS_PIN
  847. #endif
  848. #if E_STEPPERS > 3 && !AXIS_HAS_SPI(E3)
  849. #undef E3_CS_PIN
  850. #endif
  851. #if E_STEPPERS > 4 && !AXIS_HAS_SPI(E4)
  852. #undef E4_CS_PIN
  853. #endif
  854. #if E_STEPPERS > 5 && !AXIS_HAS_SPI(E5)
  855. #undef E5_CS_PIN
  856. #endif
  857. #if E_STEPPERS > 6 && !AXIS_HAS_SPI(E6)
  858. #undef E6_CS_PIN
  859. #endif
  860. #if E_STEPPERS > 7 && !AXIS_HAS_SPI(E7)
  861. #undef E7_CS_PIN
  862. #endif
  863. #ifndef X_CS_PIN
  864. #define X_CS_PIN -1
  865. #endif
  866. #ifndef Y_CS_PIN
  867. #define Y_CS_PIN -1
  868. #endif
  869. #ifndef Z_CS_PIN
  870. #define Z_CS_PIN -1
  871. #endif
  872. #ifndef E0_CS_PIN
  873. #define E0_CS_PIN -1
  874. #endif
  875. #ifndef E1_CS_PIN
  876. #define E1_CS_PIN -1
  877. #endif
  878. #ifndef E2_CS_PIN
  879. #define E2_CS_PIN -1
  880. #endif
  881. #ifndef E3_CS_PIN
  882. #define E3_CS_PIN -1
  883. #endif
  884. #ifndef E4_CS_PIN
  885. #define E4_CS_PIN -1
  886. #endif
  887. #ifndef E5_CS_PIN
  888. #define E5_CS_PIN -1
  889. #endif
  890. #ifndef E6_CS_PIN
  891. #define E6_CS_PIN -1
  892. #endif
  893. #ifndef E7_CS_PIN
  894. #define E7_CS_PIN -1
  895. #endif
  896. #ifndef FAN_PIN
  897. #define FAN_PIN -1
  898. #endif
  899. #define FAN0_PIN FAN_PIN
  900. #ifndef FAN1_PIN
  901. #define FAN1_PIN -1
  902. #endif
  903. #ifndef FAN2_PIN
  904. #define FAN2_PIN -1
  905. #endif
  906. #ifndef CONTROLLER_FAN_PIN
  907. #define CONTROLLER_FAN_PIN -1
  908. #endif
  909. #ifndef FANMUX0_PIN
  910. #define FANMUX0_PIN -1
  911. #endif
  912. #ifndef FANMUX1_PIN
  913. #define FANMUX1_PIN -1
  914. #endif
  915. #ifndef FANMUX2_PIN
  916. #define FANMUX2_PIN -1
  917. #endif
  918. #ifndef HEATER_0_PIN
  919. #define HEATER_0_PIN -1
  920. #endif
  921. #ifndef HEATER_1_PIN
  922. #define HEATER_1_PIN -1
  923. #endif
  924. #ifndef HEATER_2_PIN
  925. #define HEATER_2_PIN -1
  926. #endif
  927. #ifndef HEATER_3_PIN
  928. #define HEATER_3_PIN -1
  929. #endif
  930. #ifndef HEATER_4_PIN
  931. #define HEATER_4_PIN -1
  932. #endif
  933. #ifndef HEATER_5_PIN
  934. #define HEATER_5_PIN -1
  935. #endif
  936. #ifndef HEATER_6_PIN
  937. #define HEATER_6_PIN -1
  938. #endif
  939. #ifndef HEATER_7_PIN
  940. #define HEATER_7_PIN -1
  941. #endif
  942. #ifndef HEATER_BED_PIN
  943. #define HEATER_BED_PIN -1
  944. #endif
  945. #ifndef TEMP_0_PIN
  946. #define TEMP_0_PIN -1
  947. #endif
  948. #ifndef TEMP_1_PIN
  949. #define TEMP_1_PIN -1
  950. #endif
  951. #ifndef TEMP_2_PIN
  952. #define TEMP_2_PIN -1
  953. #endif
  954. #ifndef TEMP_3_PIN
  955. #define TEMP_3_PIN -1
  956. #endif
  957. #ifndef TEMP_4_PIN
  958. #define TEMP_4_PIN -1
  959. #endif
  960. #ifndef TEMP_5_PIN
  961. #define TEMP_5_PIN -1
  962. #endif
  963. #ifndef TEMP_6_PIN
  964. #define TEMP_6_PIN -1
  965. #endif
  966. #ifndef TEMP_7_PIN
  967. #define TEMP_7_PIN -1
  968. #endif
  969. #ifndef TEMP_BED_PIN
  970. #define TEMP_BED_PIN -1
  971. #endif
  972. #ifndef SD_DETECT_PIN
  973. #define SD_DETECT_PIN -1
  974. #endif
  975. #ifndef SDPOWER_PIN
  976. #define SDPOWER_PIN -1
  977. #endif
  978. #ifndef SDSS
  979. #define SDSS -1
  980. #endif
  981. #ifndef LED_PIN
  982. #define LED_PIN -1
  983. #endif
  984. #if DISABLED(PSU_CONTROL) || !defined(PS_ON_PIN)
  985. #undef PS_ON_PIN
  986. #define PS_ON_PIN -1
  987. #endif
  988. #ifndef KILL_PIN
  989. #define KILL_PIN -1
  990. #endif
  991. #ifndef SUICIDE_PIN
  992. #define SUICIDE_PIN -1
  993. #endif
  994. #ifndef SUICIDE_PIN_INVERTING
  995. #define SUICIDE_PIN_INVERTING false
  996. #endif
  997. #ifndef NUM_SERVO_PLUGS
  998. #define NUM_SERVO_PLUGS 4
  999. #endif
  1000. //
  1001. // Assign endstop pins for boards with only 3 connectors
  1002. //
  1003. #ifdef X_STOP_PIN
  1004. #if X_HOME_DIR < 0
  1005. #define X_MIN_PIN X_STOP_PIN
  1006. #ifndef X_MAX_PIN
  1007. #define X_MAX_PIN -1
  1008. #endif
  1009. #else
  1010. #define X_MAX_PIN X_STOP_PIN
  1011. #ifndef X_MIN_PIN
  1012. #define X_MIN_PIN -1
  1013. #endif
  1014. #endif
  1015. #elif X_HOME_DIR < 0
  1016. #define X_STOP_PIN X_MIN_PIN
  1017. #else
  1018. #define X_STOP_PIN X_MAX_PIN
  1019. #endif
  1020. #ifdef Y_STOP_PIN
  1021. #if Y_HOME_DIR < 0
  1022. #define Y_MIN_PIN Y_STOP_PIN
  1023. #ifndef Y_MAX_PIN
  1024. #define Y_MAX_PIN -1
  1025. #endif
  1026. #else
  1027. #define Y_MAX_PIN Y_STOP_PIN
  1028. #ifndef Y_MIN_PIN
  1029. #define Y_MIN_PIN -1
  1030. #endif
  1031. #endif
  1032. #elif Y_HOME_DIR < 0
  1033. #define Y_STOP_PIN Y_MIN_PIN
  1034. #else
  1035. #define Y_STOP_PIN Y_MAX_PIN
  1036. #endif
  1037. #ifdef Z_STOP_PIN
  1038. #if Z_HOME_DIR < 0
  1039. #define Z_MIN_PIN Z_STOP_PIN
  1040. #ifndef Z_MAX_PIN
  1041. #define Z_MAX_PIN -1
  1042. #endif
  1043. #else
  1044. #define Z_MAX_PIN Z_STOP_PIN
  1045. #ifndef Z_MIN_PIN
  1046. #define Z_MIN_PIN -1
  1047. #endif
  1048. #endif
  1049. #elif Z_HOME_DIR < 0
  1050. #define Z_STOP_PIN Z_MIN_PIN
  1051. #else
  1052. #define Z_STOP_PIN Z_MAX_PIN
  1053. #endif
  1054. //
  1055. // Disable unused endstop / probe pins
  1056. //
  1057. #if !HAS_CUSTOM_PROBE_PIN
  1058. #undef Z_MIN_PROBE_PIN
  1059. #define Z_MIN_PROBE_PIN -1
  1060. #endif
  1061. #if DISABLED(USE_XMAX_PLUG)
  1062. #undef X_MAX_PIN
  1063. #define X_MAX_PIN -1
  1064. #endif
  1065. #if DISABLED(USE_YMAX_PLUG)
  1066. #undef Y_MAX_PIN
  1067. #define Y_MAX_PIN -1
  1068. #endif
  1069. #if DISABLED(USE_ZMAX_PLUG)
  1070. #undef Z_MAX_PIN
  1071. #define Z_MAX_PIN -1
  1072. #endif
  1073. #if DISABLED(USE_XMIN_PLUG)
  1074. #undef X_MIN_PIN
  1075. #define X_MIN_PIN -1
  1076. #endif
  1077. #if DISABLED(USE_YMIN_PLUG)
  1078. #undef Y_MIN_PIN
  1079. #define Y_MIN_PIN -1
  1080. #endif
  1081. #if DISABLED(USE_ZMIN_PLUG)
  1082. #undef Z_MIN_PIN
  1083. #define Z_MIN_PIN -1
  1084. #endif
  1085. #if HAS_FILAMENT_SENSOR
  1086. #define FIL_RUNOUT1_PIN FIL_RUNOUT_PIN
  1087. #else
  1088. #undef FIL_RUNOUT_PIN
  1089. #undef FIL_RUNOUT1_PIN
  1090. #endif
  1091. #ifndef LCD_PINS_D4
  1092. #define LCD_PINS_D4 -1
  1093. #endif
  1094. #if HAS_CHARACTER_LCD || TOUCH_UI_ULTIPANEL
  1095. #ifndef LCD_PINS_D5
  1096. #define LCD_PINS_D5 -1
  1097. #endif
  1098. #ifndef LCD_PINS_D6
  1099. #define LCD_PINS_D6 -1
  1100. #endif
  1101. #ifndef LCD_PINS_D7
  1102. #define LCD_PINS_D7 -1
  1103. #endif
  1104. #endif
  1105. /**
  1106. * Auto-Assignment for Dual X, Dual Y, Multi-Z Steppers
  1107. *
  1108. * By default X2 is assigned to the next open E plug
  1109. * on the board, then in order, Y2, Z2, Z3. These can be
  1110. * overridden in Configuration.h or Configuration_adv.h.
  1111. */
  1112. #define __PEXI(p,q) PIN_EXISTS(E##p##_##q)
  1113. #define _PEXI(p,q) __PEXI(p,q)
  1114. #define __EPIN(p,q) E##p##_##q##_PIN
  1115. #define _EPIN(p,q) __EPIN(p,q)
  1116. #define DIAG_REMAPPED(p,q) (PIN_EXISTS(q) && _EPIN(p##_E_INDEX, DIAG) == q##_PIN)
  1117. // The X2 axis, if any, should be the next open extruder port
  1118. #define X2_E_INDEX E_STEPPERS
  1119. #if EITHER(DUAL_X_CARRIAGE, X_DUAL_STEPPER_DRIVERS)
  1120. #ifndef X2_STEP_PIN
  1121. #define X2_STEP_PIN _EPIN(X2_E_INDEX, STEP)
  1122. #define X2_DIR_PIN _EPIN(X2_E_INDEX, DIR)
  1123. #define X2_ENABLE_PIN _EPIN(X2_E_INDEX, ENABLE)
  1124. #if X2_E_INDEX >= MAX_EXTRUDERS || !PIN_EXISTS(X2_STEP)
  1125. #error "No E stepper plug left for X2!"
  1126. #endif
  1127. #endif
  1128. #ifndef X2_MS1_PIN
  1129. #define X2_MS1_PIN _EPIN(X2_E_INDEX, MS1)
  1130. #endif
  1131. #ifndef X2_MS2_PIN
  1132. #define X2_MS2_PIN _EPIN(X2_E_INDEX, MS2)
  1133. #endif
  1134. #ifndef X2_MS3_PIN
  1135. #define X2_MS3_PIN _EPIN(X2_E_INDEX, MS3)
  1136. #endif
  1137. #if AXIS_HAS_SPI(X2) && !defined(X2_CS_PIN)
  1138. #define X2_CS_PIN _EPIN(X2_E_INDEX, CS)
  1139. #endif
  1140. #if AXIS_HAS_UART(X2)
  1141. #ifndef X2_SERIAL_TX_PIN
  1142. #define X2_SERIAL_TX_PIN _EPIN(X2_E_INDEX, SERIAL_TX)
  1143. #endif
  1144. #ifndef X2_SERIAL_RX_PIN
  1145. #define X2_SERIAL_RX_PIN _EPIN(X2_E_INDEX, SERIAL_RX)
  1146. #endif
  1147. #endif
  1148. //
  1149. // Auto-assign pins for stallGuard sensorless homing
  1150. //
  1151. #if X2_STALL_SENSITIVITY && ENABLED(X_DUAL_ENDSTOPS) && _PEXI(X2_E_INDEX, DIAG)
  1152. #define X2_DIAG_PIN _EPIN(X2_E_INDEX, DIAG)
  1153. #if DIAG_REMAPPED(X2, X_MIN) // If already remapped in the pins file...
  1154. #define X2_USE_ENDSTOP _XMIN_
  1155. #elif DIAG_REMAPPED(X2, Y_MIN)
  1156. #define X2_USE_ENDSTOP _YMIN_
  1157. #elif DIAG_REMAPPED(X2, Z_MIN)
  1158. #define X2_USE_ENDSTOP _ZMIN_
  1159. #elif DIAG_REMAPPED(X2, X_MAX)
  1160. #define X2_USE_ENDSTOP _XMAX_
  1161. #elif DIAG_REMAPPED(X2, Y_MAX)
  1162. #define X2_USE_ENDSTOP _YMAX_
  1163. #elif DIAG_REMAPPED(X2, Z_MAX)
  1164. #define X2_USE_ENDSTOP _ZMAX_
  1165. #else // Otherwise use the driver DIAG_PIN directly
  1166. #define _X2_USE_ENDSTOP(P) _E##P##_DIAG_
  1167. #define X2_USE_ENDSTOP _X2_USE_ENDSTOP(X2_E_INDEX)
  1168. #endif
  1169. #undef X2_DIAG_PIN
  1170. #endif
  1171. #define Y2_E_INDEX INCREMENT(X2_E_INDEX)
  1172. #else
  1173. #define Y2_E_INDEX X2_E_INDEX
  1174. #endif
  1175. #ifndef X2_CS_PIN
  1176. #define X2_CS_PIN -1
  1177. #endif
  1178. #ifndef X2_MS1_PIN
  1179. #define X2_MS1_PIN -1
  1180. #endif
  1181. #ifndef X2_MS2_PIN
  1182. #define X2_MS2_PIN -1
  1183. #endif
  1184. #ifndef X2_MS3_PIN
  1185. #define X2_MS3_PIN -1
  1186. #endif
  1187. // The Y2 axis, if any, should be the next open extruder port
  1188. #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
  1189. #ifndef Y2_STEP_PIN
  1190. #define Y2_STEP_PIN _EPIN(Y2_E_INDEX, STEP)
  1191. #define Y2_DIR_PIN _EPIN(Y2_E_INDEX, DIR)
  1192. #define Y2_ENABLE_PIN _EPIN(Y2_E_INDEX, ENABLE)
  1193. #if Y2_E_INDEX >= MAX_EXTRUDERS || !PIN_EXISTS(Y2_STEP)
  1194. #error "No E stepper plug left for Y2!"
  1195. #endif
  1196. #endif
  1197. #ifndef Y2_MS1_PIN
  1198. #define Y2_MS1_PIN _EPIN(Y2_E_INDEX, MS1)
  1199. #endif
  1200. #ifndef Y2_MS2_PIN
  1201. #define Y2_MS2_PIN _EPIN(Y2_E_INDEX, MS2)
  1202. #endif
  1203. #ifndef Y2_MS3_PIN
  1204. #define Y2_MS3_PIN _EPIN(Y2_E_INDEX, MS3)
  1205. #endif
  1206. #if AXIS_HAS_SPI(Y2) && !defined(Y2_CS_PIN)
  1207. #define Y2_CS_PIN _EPIN(Y2_E_INDEX, CS)
  1208. #endif
  1209. #if AXIS_HAS_UART(Y2)
  1210. #ifndef Y2_SERIAL_TX_PIN
  1211. #define Y2_SERIAL_TX_PIN _EPIN(Y2_E_INDEX, SERIAL_TX)
  1212. #endif
  1213. #ifndef Y2_SERIAL_RX_PIN
  1214. #define Y2_SERIAL_RX_PIN _EPIN(Y2_E_INDEX, SERIAL_RX)
  1215. #endif
  1216. #endif
  1217. #if Y2_STALL_SENSITIVITY && ENABLED(Y_DUAL_ENDSTOPS) && _PEXI(Y2_E_INDEX, DIAG)
  1218. #define Y2_DIAG_PIN _EPIN(Y2_E_INDEX, DIAG)
  1219. #if DIAG_REMAPPED(Y2, X_MIN)
  1220. #define Y2_USE_ENDSTOP _XMIN_
  1221. #elif DIAG_REMAPPED(Y2, Y_MIN)
  1222. #define Y2_USE_ENDSTOP _YMIN_
  1223. #elif DIAG_REMAPPED(Y2, Z_MIN)
  1224. #define Y2_USE_ENDSTOP _ZMIN_
  1225. #elif DIAG_REMAPPED(Y2, X_MAX)
  1226. #define Y2_USE_ENDSTOP _XMAX_
  1227. #elif DIAG_REMAPPED(Y2, Y_MAX)
  1228. #define Y2_USE_ENDSTOP _YMAX_
  1229. #elif DIAG_REMAPPED(Y2, Z_MAX)
  1230. #define Y2_USE_ENDSTOP _ZMAX_
  1231. #else
  1232. #define _Y2_USE_ENDSTOP(P) _E##P##_DIAG_
  1233. #define Y2_USE_ENDSTOP _Y2_USE_ENDSTOP(Y2_E_INDEX)
  1234. #endif
  1235. #undef Y2_DIAG_PIN
  1236. #endif
  1237. #define Z2_E_INDEX INCREMENT(Y2_E_INDEX)
  1238. #else
  1239. #define Z2_E_INDEX Y2_E_INDEX
  1240. #endif
  1241. #ifndef Y2_CS_PIN
  1242. #define Y2_CS_PIN -1
  1243. #endif
  1244. #ifndef Y2_MS1_PIN
  1245. #define Y2_MS1_PIN -1
  1246. #endif
  1247. #ifndef Y2_MS2_PIN
  1248. #define Y2_MS2_PIN -1
  1249. #endif
  1250. #ifndef Y2_MS3_PIN
  1251. #define Y2_MS3_PIN -1
  1252. #endif
  1253. // The Z2 axis, if any, should be the next open extruder port
  1254. #if NUM_Z_STEPPER_DRIVERS >= 2
  1255. #ifndef Z2_STEP_PIN
  1256. #define Z2_STEP_PIN _EPIN(Z2_E_INDEX, STEP)
  1257. #define Z2_DIR_PIN _EPIN(Z2_E_INDEX, DIR)
  1258. #define Z2_ENABLE_PIN _EPIN(Z2_E_INDEX, ENABLE)
  1259. #if Z2_E_INDEX >= MAX_EXTRUDERS || !PIN_EXISTS(Z2_STEP)
  1260. #error "No E stepper plug left for Z2!"
  1261. #endif
  1262. #endif
  1263. #ifndef Z2_MS1_PIN
  1264. #define Z2_MS1_PIN _EPIN(Z2_E_INDEX, MS1)
  1265. #endif
  1266. #ifndef Z2_MS2_PIN
  1267. #define Z2_MS2_PIN _EPIN(Z2_E_INDEX, MS2)
  1268. #endif
  1269. #ifndef Z2_MS3_PIN
  1270. #define Z2_MS3_PIN _EPIN(Z2_E_INDEX, MS3)
  1271. #endif
  1272. #if AXIS_HAS_SPI(Z2) && !defined(Z2_CS_PIN)
  1273. #define Z2_CS_PIN _EPIN(Z2_E_INDEX, CS)
  1274. #endif
  1275. #if AXIS_HAS_UART(Z2)
  1276. #ifndef Z2_SERIAL_TX_PIN
  1277. #define Z2_SERIAL_TX_PIN _EPIN(Z2_E_INDEX, SERIAL_TX)
  1278. #endif
  1279. #ifndef Z2_SERIAL_RX_PIN
  1280. #define Z2_SERIAL_RX_PIN _EPIN(Z2_E_INDEX, SERIAL_RX)
  1281. #endif
  1282. #endif
  1283. #if Z2_STALL_SENSITIVITY && ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 2 && _PEXI(Z2_E_INDEX, DIAG)
  1284. #define Z2_DIAG_PIN _EPIN(Z2_E_INDEX, DIAG)
  1285. #if DIAG_REMAPPED(Z2, X_MIN)
  1286. #define Z2_USE_ENDSTOP _XMIN_
  1287. #elif DIAG_REMAPPED(Z2, Y_MIN)
  1288. #define Z2_USE_ENDSTOP _YMIN_
  1289. #elif DIAG_REMAPPED(Z2, Z_MIN)
  1290. #define Z2_USE_ENDSTOP _ZMIN_
  1291. #elif DIAG_REMAPPED(Z2, X_MAX)
  1292. #define Z2_USE_ENDSTOP _XMAX_
  1293. #elif DIAG_REMAPPED(Z2, Y_MAX)
  1294. #define Z2_USE_ENDSTOP _YMAX_
  1295. #elif DIAG_REMAPPED(Z2, Z_MAX)
  1296. #define Z2_USE_ENDSTOP _ZMAX_
  1297. #else
  1298. #define _Z2_USE_ENDSTOP(P) _E##P##_DIAG_
  1299. #define Z2_USE_ENDSTOP _Z2_USE_ENDSTOP(Z2_E_INDEX)
  1300. #endif
  1301. #undef Z2_DIAG_PIN
  1302. #endif
  1303. #define Z3_E_INDEX INCREMENT(Z2_E_INDEX)
  1304. #else
  1305. #define Z3_E_INDEX Z2_E_INDEX
  1306. #endif
  1307. #ifndef Z2_CS_PIN
  1308. #define Z2_CS_PIN -1
  1309. #endif
  1310. #ifndef Z2_MS1_PIN
  1311. #define Z2_MS1_PIN -1
  1312. #endif
  1313. #ifndef Z2_MS2_PIN
  1314. #define Z2_MS2_PIN -1
  1315. #endif
  1316. #ifndef Z2_MS3_PIN
  1317. #define Z2_MS3_PIN -1
  1318. #endif
  1319. #if NUM_Z_STEPPER_DRIVERS >= 3
  1320. #ifndef Z3_STEP_PIN
  1321. #define Z3_STEP_PIN _EPIN(Z3_E_INDEX, STEP)
  1322. #define Z3_DIR_PIN _EPIN(Z3_E_INDEX, DIR)
  1323. #define Z3_ENABLE_PIN _EPIN(Z3_E_INDEX, ENABLE)
  1324. #if Z3_E_INDEX >= MAX_EXTRUDERS || !PIN_EXISTS(Z3_STEP)
  1325. #error "No E stepper plug left for Z3!"
  1326. #endif
  1327. #endif
  1328. #if AXIS_HAS_SPI(Z3)
  1329. #ifndef Z3_CS_PIN
  1330. #define Z3_CS_PIN _EPIN(Z3_E_INDEX, CS)
  1331. #endif
  1332. #endif
  1333. #ifndef Z3_MS1_PIN
  1334. #define Z3_MS1_PIN _EPIN(Z3_E_INDEX, MS1)
  1335. #endif
  1336. #ifndef Z3_MS2_PIN
  1337. #define Z3_MS2_PIN _EPIN(Z3_E_INDEX, MS2)
  1338. #endif
  1339. #ifndef Z3_MS3_PIN
  1340. #define Z3_MS3_PIN _EPIN(Z3_E_INDEX, MS3)
  1341. #endif
  1342. #if AXIS_HAS_UART(Z3)
  1343. #ifndef Z3_SERIAL_TX_PIN
  1344. #define Z3_SERIAL_TX_PIN _EPIN(Z3_E_INDEX, SERIAL_TX)
  1345. #endif
  1346. #ifndef Z3_SERIAL_RX_PIN
  1347. #define Z3_SERIAL_RX_PIN _EPIN(Z3_E_INDEX, SERIAL_RX)
  1348. #endif
  1349. #endif
  1350. #if Z3_STALL_SENSITIVITY && ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 3 && _PEXI(Z3_E_INDEX, DIAG)
  1351. #define Z3_DIAG_PIN _EPIN(Z3_E_INDEX, DIAG)
  1352. #if DIAG_REMAPPED(Z3, X_MIN)
  1353. #define Z3_USE_ENDSTOP _XMIN_
  1354. #elif DIAG_REMAPPED(Z3, Y_MIN)
  1355. #define Z3_USE_ENDSTOP _YMIN_
  1356. #elif DIAG_REMAPPED(Z3, Z_MIN)
  1357. #define Z3_USE_ENDSTOP _ZMIN_
  1358. #elif DIAG_REMAPPED(Z3, X_MAX)
  1359. #define Z3_USE_ENDSTOP _XMAX_
  1360. #elif DIAG_REMAPPED(Z3, Y_MAX)
  1361. #define Z3_USE_ENDSTOP _YMAX_
  1362. #elif DIAG_REMAPPED(Z3, Z_MAX)
  1363. #define Z3_USE_ENDSTOP _ZMAX_
  1364. #else
  1365. #define _Z3_USE_ENDSTOP(P) _E##P##_DIAG_
  1366. #define Z3_USE_ENDSTOP _Z3_USE_ENDSTOP(Z3_E_INDEX)
  1367. #endif
  1368. #undef Z3_DIAG_PIN
  1369. #endif
  1370. #define Z4_E_INDEX INCREMENT(Z3_E_INDEX)
  1371. #endif
  1372. #ifndef Z3_CS_PIN
  1373. #define Z3_CS_PIN -1
  1374. #endif
  1375. #ifndef Z3_MS1_PIN
  1376. #define Z3_MS1_PIN -1
  1377. #endif
  1378. #ifndef Z3_MS2_PIN
  1379. #define Z3_MS2_PIN -1
  1380. #endif
  1381. #ifndef Z3_MS3_PIN
  1382. #define Z3_MS3_PIN -1
  1383. #endif
  1384. #if NUM_Z_STEPPER_DRIVERS >= 4
  1385. #ifndef Z4_STEP_PIN
  1386. #define Z4_STEP_PIN _EPIN(Z4_E_INDEX, STEP)
  1387. #define Z4_DIR_PIN _EPIN(Z4_E_INDEX, DIR)
  1388. #define Z4_ENABLE_PIN _EPIN(Z4_E_INDEX, ENABLE)
  1389. #if Z4_E_INDEX >= MAX_EXTRUDERS || !PIN_EXISTS(Z4_STEP)
  1390. #error "No E stepper plug left for Z4!"
  1391. #endif
  1392. #endif
  1393. #if AXIS_HAS_SPI(Z4)
  1394. #ifndef Z4_CS_PIN
  1395. #define Z4_CS_PIN _EPIN(Z4_E_INDEX, CS)
  1396. #endif
  1397. #endif
  1398. #ifndef Z4_MS1_PIN
  1399. #define Z4_MS1_PIN _EPIN(Z4_E_INDEX, MS1)
  1400. #endif
  1401. #ifndef Z4_MS2_PIN
  1402. #define Z4_MS2_PIN _EPIN(Z4_E_INDEX, MS2)
  1403. #endif
  1404. #ifndef Z4_MS3_PIN
  1405. #define Z4_MS3_PIN _EPIN(Z4_E_INDEX, MS3)
  1406. #endif
  1407. #if AXIS_HAS_UART(Z4)
  1408. #ifndef Z4_SERIAL_TX_PIN
  1409. #define Z4_SERIAL_TX_PIN _EPIN(Z4_E_INDEX, SERIAL_TX)
  1410. #endif
  1411. #ifndef Z4_SERIAL_RX_PIN
  1412. #define Z4_SERIAL_RX_PIN _EPIN(Z4_E_INDEX, SERIAL_RX)
  1413. #endif
  1414. #endif
  1415. #if Z4_STALL_SENSITIVITY && ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 4 && _PEXI(Z4_E_INDEX, DIAG)
  1416. #define Z4_DIAG_PIN _EPIN(Z4_E_INDEX, DIAG)
  1417. #if DIAG_REMAPPED(Z4, X_MIN)
  1418. #define Z4_USE_ENDSTOP _XMIN_
  1419. #elif DIAG_REMAPPED(Z4, Y_MIN)
  1420. #define Z4_USE_ENDSTOP _YMIN_
  1421. #elif DIAG_REMAPPED(Z4, Z_MIN)
  1422. #define Z4_USE_ENDSTOP _ZMIN_
  1423. #elif DIAG_REMAPPED(Z4, X_MAX)
  1424. #define Z4_USE_ENDSTOP _XMAX_
  1425. #elif DIAG_REMAPPED(Z4, Y_MAX)
  1426. #define Z4_USE_ENDSTOP _YMAX_
  1427. #elif DIAG_REMAPPED(Z4, Z_MAX)
  1428. #define Z4_USE_ENDSTOP _ZMAX_
  1429. #else
  1430. #define _Z4_USE_ENDSTOP(P) _E##P##_DIAG_
  1431. #define Z4_USE_ENDSTOP _Z4_USE_ENDSTOP(Z4_E_INDEX)
  1432. #endif
  1433. #undef Z4_DIAG_PIN
  1434. #endif
  1435. #endif
  1436. #ifndef Z4_CS_PIN
  1437. #define Z4_CS_PIN -1
  1438. #endif
  1439. #ifndef Z4_MS1_PIN
  1440. #define Z4_MS1_PIN -1
  1441. #endif
  1442. #ifndef Z4_MS2_PIN
  1443. #define Z4_MS2_PIN -1
  1444. #endif
  1445. #ifndef Z4_MS3_PIN
  1446. #define Z4_MS3_PIN -1
  1447. #endif
  1448. #if HAS_GRAPHICAL_LCD
  1449. #if !defined(ST7920_DELAY_1) && defined(BOARD_ST7920_DELAY_1)
  1450. #define ST7920_DELAY_1 BOARD_ST7920_DELAY_1
  1451. #endif
  1452. #if !defined(ST7920_DELAY_2) && defined(BOARD_ST7920_DELAY_2)
  1453. #define ST7920_DELAY_2 BOARD_ST7920_DELAY_2
  1454. #endif
  1455. #if !defined(ST7920_DELAY_3) && defined(BOARD_ST7920_DELAY_3)
  1456. #define ST7920_DELAY_3 BOARD_ST7920_DELAY_3
  1457. #endif
  1458. #else
  1459. #undef ST7920_DELAY_1
  1460. #undef ST7920_DELAY_2
  1461. #undef ST7920_DELAY_3
  1462. #endif
  1463. #undef HAS_FREE_AUX2_PINS
  1464. #undef DIAG_REMAPPED