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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312
  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. #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 6
  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:megaatmega1280 env:megaatmega2560
  53. #elif MB(RAMPS_13_EFB)
  54. #include "ramps/pins_RAMPS_13.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  55. #elif MB(RAMPS_13_EEB)
  56. #include "ramps/pins_RAMPS_13.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  57. #elif MB(RAMPS_13_EFF)
  58. #include "ramps/pins_RAMPS_13.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  59. #elif MB(RAMPS_13_EEF)
  60. #include "ramps/pins_RAMPS_13.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  61. #elif MB(RAMPS_13_SF)
  62. #include "ramps/pins_RAMPS_13.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  63. #elif MB(RAMPS_14_EFB)
  64. #include "ramps/pins_RAMPS.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  65. #elif MB(RAMPS_14_EEB)
  66. #include "ramps/pins_RAMPS.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  67. #elif MB(RAMPS_14_EFF)
  68. #include "ramps/pins_RAMPS.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  69. #elif MB(RAMPS_14_EEF)
  70. #include "ramps/pins_RAMPS.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  71. #elif MB(RAMPS_14_SF)
  72. #include "ramps/pins_RAMPS.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  73. #elif MB(RAMPS_PLUS_EFB)
  74. #include "ramps/pins_RAMPS_PLUS.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  75. #elif MB(RAMPS_PLUS_EEB)
  76. #include "ramps/pins_RAMPS_PLUS.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  77. #elif MB(RAMPS_PLUS_EFF)
  78. #include "ramps/pins_RAMPS_PLUS.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  79. #elif MB(RAMPS_PLUS_EEF)
  80. #include "ramps/pins_RAMPS_PLUS.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  81. #elif MB(RAMPS_PLUS_SF)
  82. #include "ramps/pins_RAMPS_PLUS.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  83. //
  84. // RAMPS Derivatives - ATmega1280, ATmega2560
  85. //
  86. #elif MB(3DRAG)
  87. #include "ramps/pins_3DRAG.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  88. #elif MB(K8200)
  89. #include "ramps/pins_K8200.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560 (3DRAG)
  90. #elif MB(K8400)
  91. #include "ramps/pins_K8400.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560 (3DRAG)
  92. #elif MB(K8800)
  93. #include "ramps/pins_K8800.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560 (3DRAG)
  94. #elif MB(BAM_DICE)
  95. #include "ramps/pins_RAMPS.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  96. #elif MB(BAM_DICE_DUE)
  97. #include "ramps/pins_BAM_DICE_DUE.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  98. #elif MB(MKS_BASE)
  99. #include "ramps/pins_MKS_BASE.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  100. #elif MB(MKS_BASE_14)
  101. #include "ramps/pins_MKS_BASE_14.h" // ATmega2560 env:megaatmega2560
  102. #elif MB(MKS_BASE_15)
  103. #include "ramps/pins_MKS_BASE_15.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  104. #elif MB(MKS_BASE_HEROIC)
  105. #include "ramps/pins_MKS_BASE_HEROIC.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  106. #elif MB(MKS_GEN_13)
  107. #include "ramps/pins_MKS_GEN_13.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  108. #elif MB(MKS_GEN_L)
  109. #include "ramps/pins_MKS_GEN_L.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  110. #elif MB(KFB_2)
  111. #include "ramps/pins_BIQU_KFB_2.h" // ATmega2560 env:megaatmega2560
  112. #elif MB(ZRIB_V20)
  113. #include "ramps/pins_ZRIB_V20.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560 (MKS_GEN_13)
  114. #elif MB(FELIX2)
  115. #include "ramps/pins_FELIX2.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  116. #elif MB(RIGIDBOARD)
  117. #include "ramps/pins_RIGIDBOARD.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  118. #elif MB(RIGIDBOARD_V2)
  119. #include "ramps/pins_RIGIDBOARD_V2.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  120. #elif MB(SAINSMART_2IN1)
  121. #include "ramps/pins_SAINSMART_2IN1.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  122. #elif MB(ULTIMAKER)
  123. #include "ramps/pins_ULTIMAKER.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  124. #elif MB(ULTIMAKER_OLD)
  125. #include "ramps/pins_ULTIMAKER_OLD.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  126. #elif MB(AZTEEG_X3)
  127. #include "ramps/pins_AZTEEG_X3.h" // ATmega2560 env:megaatmega2560
  128. #elif MB(AZTEEG_X3_PRO)
  129. #include "ramps/pins_AZTEEG_X3_PRO.h" // ATmega2560 env:megaatmega2560
  130. #elif MB(ULTIMAIN_2)
  131. #include "ramps/pins_ULTIMAIN_2.h" // ATmega2560 env:megaatmega2560
  132. #elif MB(FORMBOT_RAPTOR)
  133. #include "ramps/pins_FORMBOT_RAPTOR.h" // ATmega2560 env:megaatmega2560
  134. #elif MB(FORMBOT_RAPTOR2)
  135. #include "ramps/pins_FORMBOT_RAPTOR2.h" // ATmega2560 env:megaatmega2560
  136. #elif MB(FORMBOT_TREX2PLUS)
  137. #include "ramps/pins_FORMBOT_TREX2PLUS.h" // ATmega2560 env:megaatmega2560
  138. #elif MB(FORMBOT_TREX3)
  139. #include "ramps/pins_FORMBOT_TREX3.h" // ATmega2560 env:megaatmega2560
  140. #elif MB(RUMBA)
  141. #include "ramps/pins_RUMBA.h" // ATmega2560 env:megaatmega2560
  142. #elif MB(RUMBA_RAISE3D)
  143. #include "ramps/pins_RUMBA_RAISE3D.h" // ATmega2560 env:megaatmega2560
  144. #elif MB(RL200)
  145. #include "ramps/pins_RL200.h" // ATmega2560 env:megaatmega2560
  146. #elif MB(BQ_ZUM_MEGA_3D)
  147. #include "ramps/pins_BQ_ZUM_MEGA_3D.h" // ATmega2560 env:megaatmega2560
  148. #elif MB(MAKEBOARD_MINI)
  149. #include "ramps/pins_MAKEBOARD_MINI.h" // ATmega2560 env:megaatmega2560
  150. #elif MB(TRIGORILLA_13)
  151. #include "ramps/pins_TRIGORILLA_13.h" // ATmega2560 env:megaatmega2560
  152. #elif MB(TRIGORILLA_14)
  153. #include "ramps/pins_TRIGORILLA_14.h" // ATmega2560 env:megaatmega2560
  154. #elif MB(TRIGORILLA_14_11)
  155. #include "ramps/pins_TRIGORILLA_14.h" // ATmega2560 env:megaatmega2560
  156. #elif MB(RAMPS_ENDER_4)
  157. #include "ramps/pins_RAMPS_ENDER_4.h" // ATmega2560 env:megaatmega2560
  158. #elif MB(RAMPS_CREALITY)
  159. #include "ramps/pins_RAMPS_CREALITY.h" // ATmega2560 env:megaatmega2560
  160. #elif MB(RAMPS_DAGOMA)
  161. #include "ramps/pins_RAMPS_DAGOMA.h" // ATmega2560 env:megaatmega2560
  162. #elif MB(FYSETC_F6_13)
  163. #include "ramps/pins_FYSETC_F6_13.h" // ATmega2560 env:FYSETC_F6_13
  164. #elif MB(FYSETC_F6_14)
  165. #include "ramps/pins_FYSETC_F6_14.h" // ATmega2560 env:FYSETC_F6_14
  166. #elif MB(DUPLICATOR_I3_PLUS)
  167. #include "ramps/pins_DUPLICATOR_I3_PLUS.h" // ATmega2560 env:megaatmega2560
  168. #elif MB(VORON)
  169. #include "ramps/pins_VORON.h" // ATmega2560 env:megaatmega2560
  170. #elif MB(TRONXY_V3_1_0)
  171. #include "ramps/pins_TRONXY_V3_1_0.h" // ATmega2560 env:megaatmega2560
  172. #elif MB(Z_BOLT_X_SERIES)
  173. #include "ramps/pins_Z_BOLT_X_SERIES.h" // ATmega2560 env:megaatmega2560
  174. #elif MB(TT_OSCAR)
  175. #include "ramps/pins_TT_OSCAR.h" // ATmega2560 env:megaatmega2560
  176. #elif MB(TANGO)
  177. #include "ramps/pins_TANGO.h" // ATmega2560 env:megaatmega2560
  178. #elif MB(MKS_GEN_L_V2)
  179. #include "ramps/pins_MKS_GEN_L_V2.h" // ATmega2560 env:megaatmega2560
  180. //
  181. // RAMBo and derivatives
  182. //
  183. #elif MB(RAMBO)
  184. #include "rambo/pins_RAMBO.h" // ATmega2560 env:rambo
  185. #elif MB(MINIRAMBO, MINIRAMBO_10A)
  186. #include "rambo/pins_MINIRAMBO.h" // ATmega2560 env:rambo
  187. #elif MB(EINSY_RAMBO)
  188. #include "rambo/pins_EINSY_RAMBO.h" // ATmega2560 env:rambo
  189. #elif MB(EINSY_RETRO)
  190. #include "rambo/pins_EINSY_RETRO.h" // ATmega2560 env:rambo
  191. #elif MB(SCOOVO_X9H)
  192. #include "rambo/pins_SCOOVO_X9H.h" // ATmega2560 env:rambo
  193. //
  194. // Other ATmega1280, ATmega2560
  195. //
  196. #elif MB(CNCONTROLS_11)
  197. #include "mega/pins_CNCONTROLS_11.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  198. #elif MB(CNCONTROLS_12)
  199. #include "mega/pins_CNCONTROLS_12.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  200. #elif MB(CNCONTROLS_15)
  201. #include "mega/pins_CNCONTROLS_15.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  202. #elif MB(MIGHTYBOARD_REVE)
  203. #include "mega/pins_MIGHTYBOARD_REVE.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  204. #elif MB(CHEAPTRONIC)
  205. #include "mega/pins_CHEAPTRONIC.h" // ATmega2560 env:megaatmega2560
  206. #elif MB(CHEAPTRONIC_V2)
  207. #include "mega/pins_CHEAPTRONICv2.h" // ATmega2560 env:megaatmega2560
  208. #elif MB(MEGATRONICS)
  209. #include "mega/pins_MEGATRONICS.h" // ATmega2560 env:megaatmega2560
  210. #elif MB(MEGATRONICS_2)
  211. #include "mega/pins_MEGATRONICS_2.h" // ATmega2560 env:megaatmega2560
  212. #elif MB(MEGATRONICS_3, MEGATRONICS_31, MEGATRONICS_32)
  213. #include "mega/pins_MEGATRONICS_3.h" // ATmega2560 env:megaatmega2560
  214. #elif MB(ELEFU_3)
  215. #include "mega/pins_ELEFU_3.h" // ATmega2560 env:megaatmega2560
  216. #elif MB(LEAPFROG)
  217. #include "mega/pins_LEAPFROG.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  218. #elif MB(MEGACONTROLLER)
  219. #include "mega/pins_MEGACONTROLLER.h" // ATmega2560 env:megaatmega2560
  220. #elif MB(GT2560_REV_A)
  221. #include "mega/pins_GT2560_REV_A.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  222. #elif MB(GT2560_REV_A_PLUS)
  223. #include "mega/pins_GT2560_REV_A_PLUS.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  224. #elif MB(GT2560_V3)
  225. #include "mega/pins_GT2560_V3.h" // ATmega2560 env:megaatmega2560
  226. #elif MB(GT2560_V3_MC2)
  227. #include "mega/pins_GT2560_V3_MC2.h" // ATmega2560 env:megaatmega2560
  228. #elif MB(GT2560_V3_A20)
  229. #include "mega/pins_GT2560_V3_A20.h" // ATmega2560 env:megaatmega2560
  230. #elif MB(EINSTART_S)
  231. #include "mega/pins_EINSTART-S.h" // ATmega1280, ATmega2560 env:megaatmega1280 env:megaatmega2560
  232. #elif MB(WANHAO_ONEPLUS)
  233. #include "mega/pins_WANHAO_ONEPLUS.h" // ATmega2560 env:megaatmega2560
  234. #elif MB(OVERLORD)
  235. #include "mega/pins_OVERLORD.h" // ATmega2560 env:megaatmega2560
  236. #elif MB(HJC2560C_REV2)
  237. #include "mega/pins_HJC2560C_REV2.h" // ATmega2560 env:megaatmega2560
  238. #elif MB(LEAPFROG_XEED2015)
  239. #include "mega/pins_LEAPFROG_XEED2015.h" // ATmega2560 env:megaatmega2560
  240. //
  241. // ATmega1281, ATmega2561
  242. //
  243. #elif MB(MINITRONICS)
  244. #include "mega/pins_MINITRONICS.h" // ATmega1281 env:megaatmega1280
  245. #elif MB(SILVER_GATE)
  246. #include "mega/pins_SILVER_GATE.h" // ATmega2561 env:megaatmega2560
  247. //
  248. // Sanguinololu and Derivatives - ATmega644P, ATmega1284P
  249. //
  250. #elif MB(SANGUINOLOLU_11)
  251. #include "sanguino/pins_SANGUINOLOLU_11.h" // ATmega644P, ATmega1284P env:sanguino_atmega644p env:sanguino_atmega1284p
  252. #elif MB(SANGUINOLOLU_12)
  253. #include "sanguino/pins_SANGUINOLOLU_12.h" // ATmega644P, ATmega1284P env:sanguino_atmega644p env:sanguino_atmega1284p
  254. #elif MB(MELZI)
  255. #include "sanguino/pins_MELZI.h" // ATmega644P, ATmega1284P env:sanguino_atmega644p env:sanguino_atmega1284p
  256. #elif MB(MELZI_MAKR3D)
  257. #include "sanguino/pins_MELZI_MAKR3D.h" // ATmega644P, ATmega1284P env:sanguino_atmega644p env:sanguino_atmega1284p
  258. #elif MB(MELZI_CREALITY)
  259. #include "sanguino/pins_MELZI_CREALITY.h" // ATmega644P, ATmega1284P env:sanguino_atmega644p env:sanguino_atmega1284p
  260. #elif MB(MELZI_MALYAN)
  261. #include "sanguino/pins_MELZI_MALYAN.h" // ATmega644P, ATmega1284P env:sanguino_atmega644p env:sanguino_atmega1284p
  262. #elif MB(MELZI_TRONXY)
  263. #include "sanguino/pins_MELZI_TRONXY.h" // ATmega644P, ATmega1284P env:sanguino_atmega644p env:sanguino_atmega1284p
  264. #elif MB(STB_11)
  265. #include "sanguino/pins_STB_11.h" // ATmega644P, ATmega1284P env:sanguino_atmega644p env:sanguino_atmega1284p
  266. #elif MB(AZTEEG_X1)
  267. #include "sanguino/pins_AZTEEG_X1.h" // ATmega644P, ATmega1284P env:sanguino_atmega644p env:sanguino_atmega1284p
  268. //
  269. // Other ATmega644P, ATmega644, ATmega1284P
  270. //
  271. #elif MB(GEN3_MONOLITHIC)
  272. #include "sanguino/pins_GEN3_MONOLITHIC.h" // ATmega644P env:sanguino_atmega644p
  273. #elif MB(GEN3_PLUS)
  274. #include "sanguino/pins_GEN3_PLUS.h" // ATmega644P, ATmega1284P env:sanguino_atmega644p env:sanguino_atmega1284p
  275. #elif MB(GEN6)
  276. #include "sanguino/pins_GEN6.h" // ATmega644P, ATmega1284P env:sanguino_atmega644p env:sanguino_atmega1284p
  277. #elif MB(GEN6_DELUXE)
  278. #include "sanguino/pins_GEN6_DELUXE.h" // ATmega644P, ATmega1284P env:sanguino_atmega644p env:sanguino_atmega1284p
  279. #elif MB(GEN7_CUSTOM)
  280. #include "sanguino/pins_GEN7_CUSTOM.h" // ATmega644P, ATmega644, ATmega1284P env:sanguino_atmega644p env:sanguino_atmega1284p
  281. #elif MB(GEN7_12)
  282. #include "sanguino/pins_GEN7_12.h" // ATmega644P, ATmega644, ATmega1284P env:sanguino_atmega644p env:sanguino_atmega1284p
  283. #elif MB(GEN7_13)
  284. #include "sanguino/pins_GEN7_13.h" // ATmega644P, ATmega644, ATmega1284P env:sanguino_atmega644p env:sanguino_atmega1284p
  285. #elif MB(GEN7_14)
  286. #include "sanguino/pins_GEN7_14.h" // ATmega644P, ATmega644, ATmega1284P env:sanguino_atmega644p env:sanguino_atmega1284p
  287. #elif MB(OMCA_A)
  288. #include "sanguino/pins_OMCA_A.h" // ATmega644 env:sanguino_atmega644p
  289. #elif MB(OMCA)
  290. #include "sanguino/pins_OMCA.h" // ATmega644P, ATmega644 env:sanguino_atmega644p
  291. #elif MB(ANET_10)
  292. #include "sanguino/pins_ANET_10.h" // ATmega1284P env:sanguino_atmega1284p
  293. #elif MB(SETHI)
  294. #include "sanguino/pins_SETHI.h" // ATmega644P, ATmega644, ATmega1284P env:sanguino_atmega644p env:sanguino_atmega1284p
  295. //
  296. // Teensyduino - AT90USB1286, AT90USB1286P
  297. //
  298. #elif MB(TEENSYLU)
  299. #include "teensy2/pins_TEENSYLU.h" // AT90USB1286, AT90USB1286P env:at90usb1286_cdc
  300. #elif MB(PRINTRBOARD)
  301. #include "teensy2/pins_PRINTRBOARD.h" // AT90USB1286 env:at90usb1286_dfu
  302. #elif MB(PRINTRBOARD_REVF)
  303. #include "teensy2/pins_PRINTRBOARD_REVF.h" // AT90USB1286 env:at90usb1286_dfu
  304. #elif MB(BRAINWAVE)
  305. #include "teensy2/pins_BRAINWAVE.h" // AT90USB646 env:at90usb1286_cdc
  306. #elif MB(BRAINWAVE_PRO)
  307. #include "teensy2/pins_BRAINWAVE_PRO.h" // AT90USB1286 env:at90usb1286_cdc
  308. #elif MB(SAV_MKI)
  309. #include "teensy2/pins_SAV_MKI.h" // AT90USB1286 env:at90usb1286_cdc
  310. #elif MB(TEENSY2)
  311. #include "teensy2/pins_TEENSY2.h" // AT90USB1286 env:teensy20
  312. #elif MB(5DPRINT)
  313. #include "teensy2/pins_5DPRINT.h" // AT90USB1286 env:at90usb1286_dfu
  314. //
  315. // LPC1768 ARM Cortex M3
  316. //
  317. #elif MB(RAMPS_14_RE_ARM_EFB)
  318. #include "lpc1768/pins_RAMPS_RE_ARM.h" // LPC1768 env:LPC1768
  319. #elif MB(RAMPS_14_RE_ARM_EEB)
  320. #include "lpc1768/pins_RAMPS_RE_ARM.h" // LPC1768 env:LPC1768
  321. #elif MB(RAMPS_14_RE_ARM_EFF)
  322. #include "lpc1768/pins_RAMPS_RE_ARM.h" // LPC1768 env:LPC1768
  323. #elif MB(RAMPS_14_RE_ARM_EEF)
  324. #include "lpc1768/pins_RAMPS_RE_ARM.h" // LPC1768 env:LPC1768
  325. #elif MB(RAMPS_14_RE_ARM_SF)
  326. #include "lpc1768/pins_RAMPS_RE_ARM.h" // LPC1768 env:LPC1768
  327. #elif MB(MKS_SBASE)
  328. #include "lpc1768/pins_MKS_SBASE.h" // LPC1768 env:LPC1768
  329. #elif MB(MKS_SGEN_L)
  330. #include "lpc1768/pins_MKS_SGEN_L.h" // LPC1768 env:LPC1768
  331. #elif MB(AZSMZ_MINI)
  332. #include "lpc1768/pins_AZSMZ_MINI.h" // LPC1768 env:LPC1768
  333. #elif MB(BIQU_BQ111_A4)
  334. #include "lpc1768/pins_BIQU_BQ111_A4.h" // LPC1768 env:LPC1768
  335. #elif MB(SELENA_COMPACT)
  336. #include "lpc1768/pins_SELENA_COMPACT.h" // LPC1768 env:LPC1768
  337. #elif MB(BIQU_B300_V1_0)
  338. #include "lpc1768/pins_BIQU_B300_V1.0.h" // LPC1768 env:LPC1768
  339. #elif MB(GMARSH_X6_REV1)
  340. #include "lpc1768/pins_GMARSH_X6_REV1.h" // LPC1768 env:LPC1768
  341. #elif MB(BIGTREE_SKR_V1_1)
  342. #include "lpc1768/pins_BTT_SKR_V1_1.h" // LPC1768 env:LPC1768
  343. #elif MB(BIGTREE_SKR_V1_3)
  344. #include "lpc1768/pins_BTT_SKR_V1_3.h" // LPC1768 env:LPC1768
  345. #elif MB(BIGTREE_SKR_V1_4)
  346. #include "lpc1768/pins_BTT_SKR_V1_4.h" // LPC1768 env:LPC1768
  347. //
  348. // LPC1769 ARM Cortex M3
  349. //
  350. #elif MB(MKS_SGEN)
  351. #include "lpc1769/pins_MKS_SGEN.h" // LPC1769 env:LPC1769
  352. #elif MB(AZTEEG_X5_GT)
  353. #include "lpc1769/pins_AZTEEG_X5_GT.h" // LPC1769 env:LPC1769
  354. #elif MB(AZTEEG_X5_MINI)
  355. #include "lpc1769/pins_AZTEEG_X5_MINI.h" // LPC1769 env:LPC1769
  356. #elif MB(AZTEEG_X5_MINI_WIFI)
  357. #include "lpc1769/pins_AZTEEG_X5_MINI_WIFI.h" // LPC1769 env:LPC1769
  358. #elif MB(COHESION3D_REMIX)
  359. #include "lpc1769/pins_COHESION3D_REMIX.h" // LPC1769 env:LPC1769
  360. #elif MB(COHESION3D_MINI)
  361. #include "lpc1769/pins_COHESION3D_MINI.h" // LPC1769 env:LPC1769
  362. #elif MB(SMOOTHIEBOARD)
  363. #include "lpc1769/pins_SMOOTHIEBOARD.h" // LPC1769 env:LPC1769
  364. #elif MB(TH3D_EZBOARD)
  365. #include "lpc1769/pins_TH3D_EZBOARD.h" // LPC1769 env:LPC1769
  366. #elif MB(BIGTREE_SKR_V1_4_TURBO)
  367. #include "lpc1769/pins_BTT_SKR_V1_4_TURBO.h" // LPC1769 env:LPC1769
  368. //
  369. // Due (ATSAM) boards
  370. //
  371. #elif MB(DUE3DOM)
  372. #include "sam/pins_DUE3DOM.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  373. #elif MB(DUE3DOM_MINI)
  374. #include "sam/pins_DUE3DOM_MINI.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  375. #elif MB(RADDS)
  376. #include "sam/pins_RADDS.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  377. #elif MB(RURAMPS4D_11)
  378. #include "sam/pins_RURAMPS4D_11.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  379. #elif MB(RURAMPS4D_13)
  380. #include "sam/pins_RURAMPS4D_13.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  381. #elif MB(RAMPS_FD_V1)
  382. #include "sam/pins_RAMPS_FD_V1.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  383. #elif MB(RAMPS_FD_V2)
  384. #include "sam/pins_RAMPS_FD_V2.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  385. #elif MB(RAMPS_SMART_EFB)
  386. #include "sam/pins_RAMPS_SMART.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  387. #elif MB(RAMPS_SMART_EEB)
  388. #include "sam/pins_RAMPS_SMART.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  389. #elif MB(RAMPS_SMART_EFF)
  390. #include "sam/pins_RAMPS_SMART.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  391. #elif MB(RAMPS_SMART_EEF)
  392. #include "sam/pins_RAMPS_SMART.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  393. #elif MB(RAMPS_SMART_SF)
  394. #include "sam/pins_RAMPS_SMART.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  395. #elif MB(RAMPS_DUO_EFB)
  396. #include "sam/pins_RAMPS_DUO.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  397. #elif MB(RAMPS_DUO_EEB)
  398. #include "sam/pins_RAMPS_DUO.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  399. #elif MB(RAMPS_DUO_EFF)
  400. #include "sam/pins_RAMPS_DUO.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  401. #elif MB(RAMPS_DUO_EEF)
  402. #include "sam/pins_RAMPS_DUO.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  403. #elif MB(RAMPS_DUO_SF)
  404. #include "sam/pins_RAMPS_DUO.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  405. #elif MB(RAMPS4DUE_EFB)
  406. #include "sam/pins_RAMPS4DUE.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  407. #elif MB(RAMPS4DUE_EEB)
  408. #include "sam/pins_RAMPS4DUE.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  409. #elif MB(RAMPS4DUE_EFF)
  410. #include "sam/pins_RAMPS4DUE.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  411. #elif MB(RAMPS4DUE_EEF)
  412. #include "sam/pins_RAMPS4DUE.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  413. #elif MB(RAMPS4DUE_SF)
  414. #include "sam/pins_RAMPS4DUE.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug
  415. #elif MB(ULTRATRONICS_PRO)
  416. #include "sam/pins_ULTRATRONICS_PRO.h" // SAM3X8E env:DUE env:DUE_debug
  417. #elif MB(ARCHIM1)
  418. #include "sam/pins_ARCHIM1.h" // SAM3X8E env:DUE env:DUE_debug
  419. #elif MB(ARCHIM2)
  420. #include "sam/pins_ARCHIM2.h" // SAM3X8E env:DUE env:DUE_debug
  421. #elif MB(ALLIGATOR)
  422. #include "sam/pins_ALLIGATOR_R2.h" // SAM3X8E env:DUE env:DUE_debug
  423. #elif MB(ADSK)
  424. #include "sam/pins_ADSK.h" // SAM3X8E env:DUE env:DUE_debug
  425. #elif MB(PRINTRBOARD_G2)
  426. #include "sam/pins_PRINTRBOARD_G2.h" // SAM3X8C env:DUE_USB
  427. //
  428. // STM32 ARM Cortex-M3
  429. //
  430. #elif MB(STM32F103RE)
  431. #include "stm32/pins_STM32F1R.h" // STM32F1 env:STM32F103RE
  432. #elif MB(MALYAN_M200)
  433. #include "stm32/pins_MALYAN_M200.h" // STM32F1 env:STM32F103CB_malyan
  434. #elif MB(STM3R_MINI)
  435. #include "stm32/pins_STM3R_MINI.h" // STM32F1 env:STM32F103RE
  436. #elif MB(GTM32_PRO_VB)
  437. #include "stm32/pins_GTM32_PRO_VB.h" // STM32F1 env:STM32F103RE
  438. #elif MB(GTM32_MINI_A30)
  439. #include "stm32/pins_GTM32_MINI_A30.h" // STM32F1 env:STM32F103RE
  440. #elif MB(GTM32_MINI)
  441. #include "stm32/pins_GTM32_MINI.h" // STM32F1 env:STM32F103RE
  442. #elif MB(GTM32_REV_B)
  443. #include "stm32/pins_GTM32_REV_B.h" // STM32F1 env:STM32F103RE
  444. #elif MB(MORPHEUS)
  445. #include "stm32/pins_MORPHEUS.h" // STM32F1 env:STM32F103RE
  446. #elif MB(CHITU3D)
  447. #include "stm32/pins_CHITU3D.h" // STM32F1 env:STM32F103RE
  448. #elif MB(MKS_ROBIN)
  449. #include "stm32/pins_MKS_ROBIN.h" // STM32F1 env:mks_robin
  450. #elif MB(MKS_ROBIN_MINI)
  451. #include "stm32/pins_MKS_ROBIN_MINI.h" // STM32F1 env:mks_robin_mini
  452. #elif MB(MKS_ROBIN_NANO)
  453. #include "stm32/pins_MKS_ROBIN_NANO.h" // STM32F1 env:mks_robin_nano
  454. #elif MB(MKS_ROBIN_LITE)
  455. #include "stm32/pins_MKS_ROBIN_LITE.h" // STM32F1 env:mks_robin_lite
  456. #elif MB(BIGTREE_SKR_MINI_V1_1)
  457. #include "stm32/pins_BTT_SKR_MINI_V1_1.h" // STM32F1 env:STM32F103RC_bigtree env:STM32F103RC_bigtree_512K env:STM32F103RC_bigtree_USB env:STM32F103RC_bigtree_512K_USB
  458. #elif MB(BTT_SKR_MINI_E3_V1_0)
  459. #include "stm32/pins_BTT_SKR_MINI_E3_V1_0.h" // STM32F1 env:STM32F103RC_bigtree env:STM32F103RC_bigtree_512K env:STM32F103RC_bigtree_USB env:STM32F103RC_bigtree_512K_USB
  460. #elif MB(BTT_SKR_MINI_E3_V1_2)
  461. #include "stm32/pins_BTT_SKR_MINI_E3_V1_2.h" // STM32F1 env:STM32F103RC_bigtree env:STM32F103RC_bigtree_512K env:STM32F103RC_bigtree_USB env:STM32F103RC_bigtree_512K_USB
  462. #elif MB(BIGTREE_SKR_E3_DIP)
  463. #include "stm32/pins_BTT_SKR_E3_DIP.h" // STM32F1 env:STM32F103RE_bigtree env:STM32F103RE_bigtree_USB env:STM32F103RC_bigtree env:STM32F103RC_bigtree_512K env:STM32F103RC_bigtree_USB env:STM32F103RC_bigtree_512K_USB
  464. #elif MB(JGAURORA_A5S_A1)
  465. #include "stm32/pins_JGAURORA_A5S_A1.h" // STM32F1 env:jgaurora_a5s_a1
  466. #elif MB(FYSETC_AIO_II)
  467. #include "stm32/pins_FYSETC_AIO_II.h" // STM32F1 env:STM32F103RC_fysetc
  468. #elif MB(FYSETC_CHEETAH)
  469. #include "stm32/pins_FYSETC_CHEETAH.h" // STM32F1 env:STM32F103RC_fysetc
  470. #elif MB(FYSETC_CHEETAH_V12)
  471. #include "stm32/pins_FYSETC_CHEETAH_V12.h" // STM32F1 env:STM32F103RC_fysetc
  472. #elif MB(LONGER3D_LK)
  473. #include "stm32/pins_LONGER3D_LK.h" // STM32F1 env:STM32F103VE_longer
  474. #elif MB(MKS_ROBIN_LITE3)
  475. #include "stm32/pins_MKS_ROBIN_LITE3.h" // STM32F1 env:mks_robin_lite3
  476. #elif MB(MKS_ROBIN_PRO)
  477. #include "stm32/pins_MKS_ROBIN_PRO.h" // STM32F1 env:mks_robin_pro
  478. //
  479. // ARM Cortex-M4F
  480. //
  481. #elif MB(TEENSY31_32)
  482. #include "teensy3/pins_TEENSY31_32.h" // TEENSY31_32 env:teensy31
  483. #elif MB(TEENSY35_36)
  484. #include "teensy3/pins_TEENSY35_36.h" // TEENSY35_36 env:teensy35
  485. //
  486. // STM32 ARM Cortex-M4F
  487. //
  488. #elif MB(BEAST)
  489. #include "stm32/pins_BEAST.h" // STM32F4 env:STM32F4
  490. #elif MB(GENERIC_STM32F4)
  491. #include "stm32/pins_GENERIC_STM32F4.h" // STM32F4 env:STM32F4
  492. #elif MB(ARMED)
  493. #include "stm32/pins_ARMED.h" // STM32F4 env:ARMED
  494. #elif MB(RUMBA32)
  495. #include "stm32/pins_RUMBA32.h" // STM32F4 env:RUMBA32
  496. #elif MB(BLACK_STM32F407VE)
  497. #include "stm32/pins_BLACK_STM32F407VE.h" // STM32F4 env:STM32F407VE_black
  498. #elif MB(STEVAL_3DP001V1)
  499. #include "stm32/pins_STEVAL_3DP001V1.h" // STM32F4 env:STM32F401VE_STEVAL
  500. #elif MB(BIGTREE_SKR_PRO_V1_1)
  501. #include "stm32/pins_BTT_SKR_PRO_V1_1.h" // STM32F4 env:BIGTREE_SKR_PRO
  502. #elif MB(BIGTREE_BTT002_V1_0)
  503. #include "stm32/pins_BTT_BTT002_V1_0.h" // STM32F4 env:BIGTREE_BTT002
  504. #elif MB(LERDGE_K)
  505. #include "stm32/pins_LERDGE_K.h" // STM32F4 env:STM32F4
  506. #elif MB(LERDGE_X)
  507. #include "stm32/pins_LERDGE_X.h" // STM32F4 env:STM32F4
  508. #elif MB(VAKE403D)
  509. #include "stm32/pins_VAKE403D.h" // STM32F4 env:STM32F4
  510. #elif MB(FYSETC_S6)
  511. #include "stm32/pins_FYSETC_S6.h" // STM32F4 env:FYSETC_S6
  512. #elif MB(FLYF407ZG)
  513. #include "stm32/pins_FLYF407ZG.h" // STM32F4 env:FLYF407ZG
  514. #elif MB(MKS_ROBIN2)
  515. #include "pins_MKS_ROBIN2.h" // STM32F4 env:MKS_ROBIN2
  516. //
  517. // ARM Cortex M7
  518. //
  519. #elif MB(THE_BORG)
  520. #include "stm32/pins_THE_BORG.h" // STM32F7 env:STM32F7
  521. #elif MB(REMRAM_V1)
  522. #include "stm32/pins_REMRAM_V1.h" // STM32F7 env:STM32F7
  523. //
  524. // Espressif ESP32
  525. //
  526. #elif MB(ESPRESSIF_ESP32)
  527. #include "esp32/pins_ESP32.h" // ESP32 env:esp32
  528. #elif MB(MRR_ESPA)
  529. #include "esp32/pins_MRR_ESPA.h" // ESP32 env:esp32
  530. #elif MB(MRR_ESPE)
  531. #include "esp32/pins_MRR_ESPE.h" // ESP32 env:esp32
  532. //
  533. // Linux Native Debug board
  534. //
  535. #elif MB(LINUX_RAMPS)
  536. #include "linux/pins_RAMPS_LINUX.h" // Linux env:linux_native
  537. #else
  538. //
  539. // Obsolete or unknown board
  540. //
  541. #define BOARD_MKS_13 -1000
  542. #define BOARD_TRIGORILLA -1001
  543. #define BOARD_RURAMPS4D -1002
  544. #define BOARD_FORMBOT_TREX2 -1003
  545. #define BOARD_BIQU_SKR_V1_1 -1004
  546. #define BOARD_STM32F1R -1005
  547. #define BOARD_STM32F103R -1006
  548. #define BOARD_ESP32 -1007
  549. #define BOARD_BIGTREE_SKR_MINI_E3 -1008
  550. #define BOARD_STEVAL -1009
  551. #if MB(MKS_13)
  552. #error "BOARD_MKS_13 has been renamed BOARD_MKS_GEN_13. Please update your configuration."
  553. #elif MB(TRIGORILLA)
  554. #error "BOARD_TRIGORILLA has been renamed BOARD_TRIGORILLA_13. Please update your configuration."
  555. #elif MB(RURAMPS4D)
  556. #error "BOARD_RURAMPS4D has been renamed BOARD_RURAMPS4D_11. Please update your configuration."
  557. #elif MB(FORMBOT_TREX2)
  558. #error "FORMBOT_TREX2 has been renamed BOARD_FORMBOT_TREX2PLUS. Please update your configuration."
  559. #elif MB(BIQU_SKR_V1_1)
  560. #error "BOARD_BIQU_SKR_V1_1 has been renamed BOARD_BIGTREE_SKR_V1_1. Please update your configuration."
  561. #elif MB(STM32F1R)
  562. #error "BOARD_STM32F1R has been renamed BOARD_STM32F103RE. Please update your configuration."
  563. #elif MB(STM32F103R)
  564. #error "BOARD_STM32F103R has been renamed BOARD_STM32F103RE. Please update your configuration."
  565. #elif MOTHERBOARD == BOARD_ESP32
  566. #error "BOARD_ESP32 has been renamed BOARD_ESPRESSIF_ESP32. Please update your configuration."
  567. #elif MB(BIGTREE_SKR_MINI_E3)
  568. #error "BOARD_BIGTREE_SKR_MINI_E3 has been renamed BOARD_BTT_SKR_MINI_E3_V1_0. Please update your configuration."
  569. #elif MB(STEVAL)
  570. #error "BOARD_STEVAL has been renamed BOARD_STEVAL_3DP001V1. Please update your configuration."
  571. #else
  572. #error "Unknown MOTHERBOARD value set in Configuration.h"
  573. #endif
  574. #undef BOARD_MKS_13
  575. #undef BOARD_TRIGORILLA
  576. #undef BOARD_RURAMPS4D
  577. #undef BOARD_FORMBOT_TREX2
  578. #undef BOARD_BIQU_SKR_V1_1
  579. #undef BOARD_STM32F1R
  580. #undef BOARD_STM32F103R
  581. #undef BOARD_ESP32
  582. #undef BOARD_BIGTREE_SKR_MINI_E3
  583. #undef BOARD_STEVAL
  584. #endif
  585. // Define certain undefined pins
  586. #ifndef X_MS1_PIN
  587. #define X_MS1_PIN -1
  588. #endif
  589. #ifndef X_MS2_PIN
  590. #define X_MS2_PIN -1
  591. #endif
  592. #ifndef X_MS3_PIN
  593. #define X_MS3_PIN -1
  594. #endif
  595. #ifndef Y_MS1_PIN
  596. #define Y_MS1_PIN -1
  597. #endif
  598. #ifndef Y_MS2_PIN
  599. #define Y_MS2_PIN -1
  600. #endif
  601. #ifndef Y_MS3_PIN
  602. #define Y_MS3_PIN -1
  603. #endif
  604. #ifndef Z_MS1_PIN
  605. #define Z_MS1_PIN -1
  606. #endif
  607. #ifndef Z_MS2_PIN
  608. #define Z_MS2_PIN -1
  609. #endif
  610. #ifndef Z_MS3_PIN
  611. #define Z_MS3_PIN -1
  612. #endif
  613. #ifndef E0_MS1_PIN
  614. #define E0_MS1_PIN -1
  615. #endif
  616. #ifndef E0_MS2_PIN
  617. #define E0_MS2_PIN -1
  618. #endif
  619. #ifndef E0_MS3_PIN
  620. #define E0_MS3_PIN -1
  621. #endif
  622. #ifndef E1_MS1_PIN
  623. #define E1_MS1_PIN -1
  624. #endif
  625. #ifndef E1_MS2_PIN
  626. #define E1_MS2_PIN -1
  627. #endif
  628. #ifndef E1_MS3_PIN
  629. #define E1_MS3_PIN -1
  630. #endif
  631. #ifndef E2_MS1_PIN
  632. #define E2_MS1_PIN -1
  633. #endif
  634. #ifndef E2_MS2_PIN
  635. #define E2_MS2_PIN -1
  636. #endif
  637. #ifndef E2_MS3_PIN
  638. #define E2_MS3_PIN -1
  639. #endif
  640. #ifndef E3_MS1_PIN
  641. #define E3_MS1_PIN -1
  642. #endif
  643. #ifndef E3_MS2_PIN
  644. #define E3_MS2_PIN -1
  645. #endif
  646. #ifndef E3_MS3_PIN
  647. #define E3_MS3_PIN -1
  648. #endif
  649. #ifndef E4_MS1_PIN
  650. #define E4_MS1_PIN -1
  651. #endif
  652. #ifndef E4_MS2_PIN
  653. #define E4_MS2_PIN -1
  654. #endif
  655. #ifndef E4_MS3_PIN
  656. #define E4_MS3_PIN -1
  657. #endif
  658. #ifndef E5_MS1_PIN
  659. #define E5_MS1_PIN -1
  660. #endif
  661. #ifndef E5_MS2_PIN
  662. #define E5_MS2_PIN -1
  663. #endif
  664. #ifndef E5_MS3_PIN
  665. #define E5_MS3_PIN -1
  666. #endif
  667. #ifndef E0_STEP_PIN
  668. #define E0_STEP_PIN -1
  669. #endif
  670. #ifndef E0_DIR_PIN
  671. #define E0_DIR_PIN -1
  672. #endif
  673. #ifndef E0_ENABLE_PIN
  674. #define E0_ENABLE_PIN -1
  675. #endif
  676. #ifndef E1_STEP_PIN
  677. #define E1_STEP_PIN -1
  678. #endif
  679. #ifndef E1_DIR_PIN
  680. #define E1_DIR_PIN -1
  681. #endif
  682. #ifndef E1_ENABLE_PIN
  683. #define E1_ENABLE_PIN -1
  684. #endif
  685. #ifndef E2_STEP_PIN
  686. #define E2_STEP_PIN -1
  687. #endif
  688. #ifndef E2_DIR_PIN
  689. #define E2_DIR_PIN -1
  690. #endif
  691. #ifndef E2_ENABLE_PIN
  692. #define E2_ENABLE_PIN -1
  693. #endif
  694. #ifndef E3_STEP_PIN
  695. #define E3_STEP_PIN -1
  696. #endif
  697. #ifndef E3_DIR_PIN
  698. #define E3_DIR_PIN -1
  699. #endif
  700. #ifndef E3_ENABLE_PIN
  701. #define E3_ENABLE_PIN -1
  702. #endif
  703. #ifndef E4_STEP_PIN
  704. #define E4_STEP_PIN -1
  705. #endif
  706. #ifndef E4_DIR_PIN
  707. #define E4_DIR_PIN -1
  708. #endif
  709. #ifndef E4_ENABLE_PIN
  710. #define E4_ENABLE_PIN -1
  711. #endif
  712. #ifndef E5_STEP_PIN
  713. #define E5_STEP_PIN -1
  714. #endif
  715. #ifndef E5_DIR_PIN
  716. #define E5_DIR_PIN -1
  717. #endif
  718. #ifndef E5_ENABLE_PIN
  719. #define E5_ENABLE_PIN -1
  720. #endif
  721. #ifndef X_CS_PIN
  722. #define X_CS_PIN -1
  723. #endif
  724. #ifndef Y_CS_PIN
  725. #define Y_CS_PIN -1
  726. #endif
  727. #ifndef Z_CS_PIN
  728. #define Z_CS_PIN -1
  729. #endif
  730. #ifndef E0_CS_PIN
  731. #define E0_CS_PIN -1
  732. #endif
  733. #ifndef E1_CS_PIN
  734. #define E1_CS_PIN -1
  735. #endif
  736. #ifndef E2_CS_PIN
  737. #define E2_CS_PIN -1
  738. #endif
  739. #ifndef E3_CS_PIN
  740. #define E3_CS_PIN -1
  741. #endif
  742. #ifndef E4_CS_PIN
  743. #define E4_CS_PIN -1
  744. #endif
  745. #ifndef E5_CS_PIN
  746. #define E5_CS_PIN -1
  747. #endif
  748. #ifndef FAN_PIN
  749. #define FAN_PIN -1
  750. #endif
  751. #define FAN0_PIN FAN_PIN
  752. #ifndef FAN1_PIN
  753. #define FAN1_PIN -1
  754. #endif
  755. #ifndef FAN2_PIN
  756. #define FAN2_PIN -1
  757. #endif
  758. #ifndef CONTROLLER_FAN_PIN
  759. #define CONTROLLER_FAN_PIN -1
  760. #endif
  761. #ifndef FANMUX0_PIN
  762. #define FANMUX0_PIN -1
  763. #endif
  764. #ifndef FANMUX1_PIN
  765. #define FANMUX1_PIN -1
  766. #endif
  767. #ifndef FANMUX2_PIN
  768. #define FANMUX2_PIN -1
  769. #endif
  770. #ifndef HEATER_0_PIN
  771. #define HEATER_0_PIN -1
  772. #endif
  773. #ifndef HEATER_1_PIN
  774. #define HEATER_1_PIN -1
  775. #endif
  776. #ifndef HEATER_2_PIN
  777. #define HEATER_2_PIN -1
  778. #endif
  779. #ifndef HEATER_3_PIN
  780. #define HEATER_3_PIN -1
  781. #endif
  782. #ifndef HEATER_4_PIN
  783. #define HEATER_4_PIN -1
  784. #endif
  785. #ifndef HEATER_5_PIN
  786. #define HEATER_5_PIN -1
  787. #endif
  788. #ifndef HEATER_BED_PIN
  789. #define HEATER_BED_PIN -1
  790. #endif
  791. #ifndef TEMP_0_PIN
  792. #define TEMP_0_PIN -1
  793. #endif
  794. #ifndef TEMP_1_PIN
  795. #define TEMP_1_PIN -1
  796. #endif
  797. #ifndef TEMP_2_PIN
  798. #define TEMP_2_PIN -1
  799. #endif
  800. #ifndef TEMP_3_PIN
  801. #define TEMP_3_PIN -1
  802. #endif
  803. #ifndef TEMP_4_PIN
  804. #define TEMP_4_PIN -1
  805. #endif
  806. #ifndef TEMP_5_PIN
  807. #define TEMP_5_PIN -1
  808. #endif
  809. #ifndef TEMP_BED_PIN
  810. #define TEMP_BED_PIN -1
  811. #endif
  812. #ifndef SD_DETECT_PIN
  813. #define SD_DETECT_PIN -1
  814. #endif
  815. #ifndef SDPOWER_PIN
  816. #define SDPOWER_PIN -1
  817. #endif
  818. #ifndef SDSS
  819. #define SDSS -1
  820. #endif
  821. #ifndef LED_PIN
  822. #define LED_PIN -1
  823. #endif
  824. #if DISABLED(PSU_CONTROL) || !defined(PS_ON_PIN)
  825. #undef PS_ON_PIN
  826. #define PS_ON_PIN -1
  827. #endif
  828. #ifndef KILL_PIN
  829. #define KILL_PIN -1
  830. #endif
  831. #ifndef SUICIDE_PIN
  832. #define SUICIDE_PIN -1
  833. #endif
  834. #ifndef SUICIDE_PIN_INVERTING
  835. #define SUICIDE_PIN_INVERTING false
  836. #endif
  837. #ifndef NUM_SERVO_PLUGS
  838. #define NUM_SERVO_PLUGS 4
  839. #endif
  840. //
  841. // Assign auto fan pins if needed
  842. //
  843. #ifndef E0_AUTO_FAN_PIN
  844. #ifdef ORIG_E0_AUTO_FAN_PIN
  845. #define E0_AUTO_FAN_PIN ORIG_E0_AUTO_FAN_PIN
  846. #else
  847. #define E0_AUTO_FAN_PIN -1
  848. #endif
  849. #endif
  850. #ifndef E1_AUTO_FAN_PIN
  851. #ifdef ORIG_E1_AUTO_FAN_PIN
  852. #define E1_AUTO_FAN_PIN ORIG_E1_AUTO_FAN_PIN
  853. #else
  854. #define E1_AUTO_FAN_PIN -1
  855. #endif
  856. #endif
  857. #ifndef E2_AUTO_FAN_PIN
  858. #ifdef ORIG_E2_AUTO_FAN_PIN
  859. #define E2_AUTO_FAN_PIN ORIG_E2_AUTO_FAN_PIN
  860. #else
  861. #define E2_AUTO_FAN_PIN -1
  862. #endif
  863. #endif
  864. #ifndef E3_AUTO_FAN_PIN
  865. #ifdef ORIG_E3_AUTO_FAN_PIN
  866. #define E3_AUTO_FAN_PIN ORIG_E3_AUTO_FAN_PIN
  867. #else
  868. #define E3_AUTO_FAN_PIN -1
  869. #endif
  870. #endif
  871. #ifndef E4_AUTO_FAN_PIN
  872. #ifdef ORIG_E4_AUTO_FAN_PIN
  873. #define E4_AUTO_FAN_PIN ORIG_E4_AUTO_FAN_PIN
  874. #else
  875. #define E4_AUTO_FAN_PIN -1
  876. #endif
  877. #endif
  878. #ifndef E5_AUTO_FAN_PIN
  879. #ifdef ORIG_E5_AUTO_FAN_PIN
  880. #define E5_AUTO_FAN_PIN ORIG_E5_AUTO_FAN_PIN
  881. #else
  882. #define E5_AUTO_FAN_PIN -1
  883. #endif
  884. #endif
  885. #ifndef CHAMBER_AUTO_FAN_PIN
  886. #ifdef ORIG_CHAMBER_AUTO_FAN_PIN
  887. #define CHAMBER_AUTO_FAN_PIN ORIG_CHAMBER_AUTO_FAN_PIN
  888. #else
  889. #define CHAMBER_AUTO_FAN_PIN -1
  890. #endif
  891. #endif
  892. //
  893. // Assign endstop pins for boards with only 3 connectors
  894. //
  895. #ifdef X_STOP_PIN
  896. #if X_HOME_DIR < 0
  897. #define X_MIN_PIN X_STOP_PIN
  898. #define X_MAX_PIN -1
  899. #else
  900. #define X_MIN_PIN -1
  901. #define X_MAX_PIN X_STOP_PIN
  902. #endif
  903. #elif X_HOME_DIR < 0
  904. #define X_STOP_PIN X_MIN_PIN
  905. #else
  906. #define X_STOP_PIN X_MAX_PIN
  907. #endif
  908. #ifdef Y_STOP_PIN
  909. #if Y_HOME_DIR < 0
  910. #define Y_MIN_PIN Y_STOP_PIN
  911. #define Y_MAX_PIN -1
  912. #else
  913. #define Y_MIN_PIN -1
  914. #define Y_MAX_PIN Y_STOP_PIN
  915. #endif
  916. #elif Y_HOME_DIR < 0
  917. #define Y_STOP_PIN Y_MIN_PIN
  918. #else
  919. #define Y_STOP_PIN Y_MAX_PIN
  920. #endif
  921. #ifdef Z_STOP_PIN
  922. #if Z_HOME_DIR < 0
  923. #define Z_MIN_PIN Z_STOP_PIN
  924. #define Z_MAX_PIN -1
  925. #else
  926. #define Z_MIN_PIN -1
  927. #define Z_MAX_PIN Z_STOP_PIN
  928. #endif
  929. #elif Z_HOME_DIR < 0
  930. #define Z_STOP_PIN Z_MIN_PIN
  931. #else
  932. #define Z_STOP_PIN Z_MAX_PIN
  933. #endif
  934. //
  935. // Disable unused endstop / probe pins
  936. //
  937. #if !HAS_CUSTOM_PROBE_PIN
  938. #undef Z_MIN_PROBE_PIN
  939. #define Z_MIN_PROBE_PIN -1
  940. #endif
  941. #if DISABLED(USE_XMAX_PLUG)
  942. #undef X_MAX_PIN
  943. #define X_MAX_PIN -1
  944. #endif
  945. #if DISABLED(USE_YMAX_PLUG)
  946. #undef Y_MAX_PIN
  947. #define Y_MAX_PIN -1
  948. #endif
  949. #if DISABLED(USE_ZMAX_PLUG)
  950. #undef Z_MAX_PIN
  951. #define Z_MAX_PIN -1
  952. #endif
  953. #if DISABLED(USE_XMIN_PLUG)
  954. #undef X_MIN_PIN
  955. #define X_MIN_PIN -1
  956. #endif
  957. #if DISABLED(USE_YMIN_PLUG)
  958. #undef Y_MIN_PIN
  959. #define Y_MIN_PIN -1
  960. #endif
  961. #if DISABLED(USE_ZMIN_PLUG)
  962. #undef Z_MIN_PIN
  963. #define Z_MIN_PIN -1
  964. #endif
  965. #ifndef LCD_PINS_D4
  966. #define LCD_PINS_D4 -1
  967. #endif
  968. #if HAS_CHARACTER_LCD || TOUCH_UI_ULTIPANEL
  969. #ifndef LCD_PINS_D5
  970. #define LCD_PINS_D5 -1
  971. #endif
  972. #ifndef LCD_PINS_D6
  973. #define LCD_PINS_D6 -1
  974. #endif
  975. #ifndef LCD_PINS_D7
  976. #define LCD_PINS_D7 -1
  977. #endif
  978. #endif
  979. /**
  980. * Auto-Assignment for Dual X, Dual Y, Multi-Z Steppers
  981. *
  982. * By default X2 is assigned to the next open E plug
  983. * on the board, then in order, Y2, Z2, Z3. These can be
  984. * overridden in Configuration.h or Configuration_adv.h.
  985. */
  986. #define __EPIN(p,q) E##p##_##q##_PIN
  987. #define _EPIN(p,q) __EPIN(p,q)
  988. // The X2 axis, if any, should be the next open extruder port
  989. #if EITHER(DUAL_X_CARRIAGE, X_DUAL_STEPPER_DRIVERS)
  990. #ifndef X2_STEP_PIN
  991. #define X2_STEP_PIN _EPIN(E_STEPPERS, STEP)
  992. #define X2_DIR_PIN _EPIN(E_STEPPERS, DIR)
  993. #define X2_ENABLE_PIN _EPIN(E_STEPPERS, ENABLE)
  994. #if E_STEPPERS >= MAX_EXTRUDERS || !PIN_EXISTS(X2_STEP)
  995. #error "No E stepper plug left for X2!"
  996. #endif
  997. #endif
  998. #ifndef X2_MS1_PIN
  999. #define X2_MS1_PIN _EPIN(E_STEPPERS, MS1)
  1000. #endif
  1001. #ifndef X2_MS2_PIN
  1002. #define X2_MS2_PIN _EPIN(E_STEPPERS, MS2)
  1003. #endif
  1004. #ifndef X2_MS3_PIN
  1005. #define X2_MS3_PIN _EPIN(E_STEPPERS, MS3)
  1006. #endif
  1007. #if AXIS_HAS_SPI(X2) && !defined(X2_CS_PIN)
  1008. #define X2_CS_PIN _EPIN(E_STEPPERS, CS)
  1009. #endif
  1010. #if AXIS_HAS_UART(X2)
  1011. #ifndef X2_SERIAL_TX_PIN
  1012. #define X2_SERIAL_TX_PIN _EPIN(E_STEPPERS, SERIAL_TX)
  1013. #endif
  1014. #ifndef X2_SERIAL_RX_PIN
  1015. #define X2_SERIAL_RX_PIN _EPIN(E_STEPPERS, SERIAL_RX)
  1016. #endif
  1017. #endif
  1018. #define Y2_E_INDEX INCREMENT(E_STEPPERS)
  1019. #else
  1020. #define Y2_E_INDEX E_STEPPERS
  1021. #endif
  1022. #ifndef X2_CS_PIN
  1023. #define X2_CS_PIN -1
  1024. #endif
  1025. #ifndef X2_MS1_PIN
  1026. #define X2_MS1_PIN -1
  1027. #endif
  1028. #ifndef X2_MS2_PIN
  1029. #define X2_MS2_PIN -1
  1030. #endif
  1031. #ifndef X2_MS3_PIN
  1032. #define X2_MS3_PIN -1
  1033. #endif
  1034. // The Y2 axis, if any, should be the next open extruder port
  1035. #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
  1036. #ifndef Y2_STEP_PIN
  1037. #define Y2_STEP_PIN _EPIN(Y2_E_INDEX, STEP)
  1038. #define Y2_DIR_PIN _EPIN(Y2_E_INDEX, DIR)
  1039. #define Y2_ENABLE_PIN _EPIN(Y2_E_INDEX, ENABLE)
  1040. #if Y2_E_INDEX >= MAX_EXTRUDERS || !PIN_EXISTS(Y2_STEP)
  1041. #error "No E stepper plug left for Y2!"
  1042. #endif
  1043. #endif
  1044. #ifndef Y2_MS1_PIN
  1045. #define Y2_MS1_PIN _EPIN(Y2_E_INDEX, MS1)
  1046. #endif
  1047. #ifndef Y2_MS2_PIN
  1048. #define Y2_MS2_PIN _EPIN(Y2_E_INDEX, MS2)
  1049. #endif
  1050. #ifndef Y2_MS3_PIN
  1051. #define Y2_MS3_PIN _EPIN(Y2_E_INDEX, MS3)
  1052. #endif
  1053. #if AXIS_HAS_SPI(Y2) && !defined(Y2_CS_PIN)
  1054. #define Y2_CS_PIN _EPIN(Y2_E_INDEX, CS)
  1055. #endif
  1056. #if AXIS_HAS_UART(Y2)
  1057. #ifndef Y2_SERIAL_TX_PIN
  1058. #define Y2_SERIAL_TX_PIN _EPIN(Y2_E_INDEX, SERIAL_TX)
  1059. #endif
  1060. #ifndef Y2_SERIAL_RX_PIN
  1061. #define Y2_SERIAL_RX_PIN _EPIN(Y2_E_INDEX, SERIAL_RX)
  1062. #endif
  1063. #endif
  1064. #define Z2_E_INDEX INCREMENT(Y2_E_INDEX)
  1065. #else
  1066. #define Z2_E_INDEX Y2_E_INDEX
  1067. #endif
  1068. #ifndef Y2_CS_PIN
  1069. #define Y2_CS_PIN -1
  1070. #endif
  1071. #ifndef Y2_MS1_PIN
  1072. #define Y2_MS1_PIN -1
  1073. #endif
  1074. #ifndef Y2_MS2_PIN
  1075. #define Y2_MS2_PIN -1
  1076. #endif
  1077. #ifndef Y2_MS3_PIN
  1078. #define Y2_MS3_PIN -1
  1079. #endif
  1080. // The Z2 axis, if any, should be the next open extruder port
  1081. #if NUM_Z_STEPPER_DRIVERS >= 2
  1082. #ifndef Z2_STEP_PIN
  1083. #define Z2_STEP_PIN _EPIN(Z2_E_INDEX, STEP)
  1084. #define Z2_DIR_PIN _EPIN(Z2_E_INDEX, DIR)
  1085. #define Z2_ENABLE_PIN _EPIN(Z2_E_INDEX, ENABLE)
  1086. #if Z2_E_INDEX >= MAX_EXTRUDERS || !PIN_EXISTS(Z2_STEP)
  1087. #error "No E stepper plug left for Z2!"
  1088. #endif
  1089. #endif
  1090. #ifndef Z2_MS1_PIN
  1091. #define Z2_MS1_PIN _EPIN(Z2_E_INDEX, MS1)
  1092. #endif
  1093. #ifndef Z2_MS2_PIN
  1094. #define Z2_MS2_PIN _EPIN(Z2_E_INDEX, MS2)
  1095. #endif
  1096. #ifndef Z2_MS3_PIN
  1097. #define Z2_MS3_PIN _EPIN(Z2_E_INDEX, MS3)
  1098. #endif
  1099. #if AXIS_HAS_SPI(Z2) && !defined(Z2_CS_PIN)
  1100. #define Z2_CS_PIN _EPIN(Z2_E_INDEX, CS)
  1101. #endif
  1102. #if AXIS_HAS_UART(Z2)
  1103. #ifndef Z2_SERIAL_TX_PIN
  1104. #define Z2_SERIAL_TX_PIN _EPIN(Z2_E_INDEX, SERIAL_TX)
  1105. #endif
  1106. #ifndef Z2_SERIAL_RX_PIN
  1107. #define Z2_SERIAL_RX_PIN _EPIN(Z2_E_INDEX, SERIAL_RX)
  1108. #endif
  1109. #endif
  1110. #define Z3_E_INDEX INCREMENT(Z2_E_INDEX)
  1111. #else
  1112. #define Z3_E_INDEX Z2_E_INDEX
  1113. #endif
  1114. #ifndef Z2_CS_PIN
  1115. #define Z2_CS_PIN -1
  1116. #endif
  1117. #ifndef Z2_MS1_PIN
  1118. #define Z2_MS1_PIN -1
  1119. #endif
  1120. #ifndef Z2_MS2_PIN
  1121. #define Z2_MS2_PIN -1
  1122. #endif
  1123. #ifndef Z2_MS3_PIN
  1124. #define Z2_MS3_PIN -1
  1125. #endif
  1126. #if NUM_Z_STEPPER_DRIVERS >= 3
  1127. #ifndef Z3_STEP_PIN
  1128. #define Z3_STEP_PIN _EPIN(Z3_E_INDEX, STEP)
  1129. #define Z3_DIR_PIN _EPIN(Z3_E_INDEX, DIR)
  1130. #define Z3_ENABLE_PIN _EPIN(Z3_E_INDEX, ENABLE)
  1131. #if Z3_E_INDEX >= MAX_EXTRUDERS || !PIN_EXISTS(Z3_STEP)
  1132. #error "No E stepper plug left for Z3!"
  1133. #endif
  1134. #endif
  1135. #if AXIS_HAS_SPI(Z3)
  1136. #ifndef Z3_CS_PIN
  1137. #define Z3_CS_PIN _EPIN(Z3_E_INDEX, CS)
  1138. #endif
  1139. #endif
  1140. #ifndef Z3_MS1_PIN
  1141. #define Z3_MS1_PIN _EPIN(Z3_E_INDEX, MS1)
  1142. #endif
  1143. #ifndef Z3_MS2_PIN
  1144. #define Z3_MS2_PIN _EPIN(Z3_E_INDEX, MS2)
  1145. #endif
  1146. #ifndef Z3_MS3_PIN
  1147. #define Z3_MS3_PIN _EPIN(Z3_E_INDEX, MS3)
  1148. #endif
  1149. #if AXIS_HAS_UART(Z3)
  1150. #ifndef Z3_SERIAL_TX_PIN
  1151. #define Z3_SERIAL_TX_PIN _EPIN(Z3_E_INDEX, SERIAL_TX)
  1152. #endif
  1153. #ifndef Z3_SERIAL_RX_PIN
  1154. #define Z3_SERIAL_RX_PIN _EPIN(Z3_E_INDEX, SERIAL_RX)
  1155. #endif
  1156. #endif
  1157. #define Z4_E_INDEX INCREMENT(Z3_E_INDEX)
  1158. #endif
  1159. #ifndef Z3_CS_PIN
  1160. #define Z3_CS_PIN -1
  1161. #endif
  1162. #ifndef Z3_MS1_PIN
  1163. #define Z3_MS1_PIN -1
  1164. #endif
  1165. #ifndef Z3_MS2_PIN
  1166. #define Z3_MS2_PIN -1
  1167. #endif
  1168. #ifndef Z3_MS3_PIN
  1169. #define Z3_MS3_PIN -1
  1170. #endif
  1171. #if NUM_Z_STEPPER_DRIVERS >= 4
  1172. #ifndef Z4_STEP_PIN
  1173. #define Z4_STEP_PIN _EPIN(Z4_E_INDEX, STEP)
  1174. #define Z4_DIR_PIN _EPIN(Z4_E_INDEX, DIR)
  1175. #define Z4_ENABLE_PIN _EPIN(Z4_E_INDEX, ENABLE)
  1176. #if Z4_E_INDEX >= MAX_EXTRUDERS || !PIN_EXISTS(Z4_STEP)
  1177. #error "No E stepper plug left for Z4!"
  1178. #endif
  1179. #endif
  1180. #if AXIS_HAS_SPI(Z4)
  1181. #ifndef Z4_CS_PIN
  1182. #define Z4_CS_PIN _EPIN(Z4_E_INDEX, CS)
  1183. #endif
  1184. #endif
  1185. #ifndef Z4_MS1_PIN
  1186. #define Z4_MS1_PIN _EPIN(Z4_E_INDEX, MS1)
  1187. #endif
  1188. #ifndef Z4_MS2_PIN
  1189. #define Z4_MS2_PIN _EPIN(Z4_E_INDEX, MS2)
  1190. #endif
  1191. #ifndef Z4_MS3_PIN
  1192. #define Z4_MS3_PIN _EPIN(Z4_E_INDEX, MS3)
  1193. #endif
  1194. #if AXIS_HAS_UART(Z4)
  1195. #ifndef Z4_SERIAL_TX_PIN
  1196. #define Z4_SERIAL_TX_PIN _EPIN(Z4_E_INDEX, SERIAL_TX)
  1197. #endif
  1198. #ifndef Z4_SERIAL_RX_PIN
  1199. #define Z4_SERIAL_RX_PIN _EPIN(Z4_E_INDEX, SERIAL_RX)
  1200. #endif
  1201. #endif
  1202. #endif
  1203. #ifndef Z4_CS_PIN
  1204. #define Z4_CS_PIN -1
  1205. #endif
  1206. #ifndef Z4_MS1_PIN
  1207. #define Z4_MS1_PIN -1
  1208. #endif
  1209. #ifndef Z4_MS2_PIN
  1210. #define Z4_MS2_PIN -1
  1211. #endif
  1212. #ifndef Z4_MS3_PIN
  1213. #define Z4_MS3_PIN -1
  1214. #endif
  1215. #if HAS_GRAPHICAL_LCD
  1216. #if !defined(ST7920_DELAY_1) && defined(BOARD_ST7920_DELAY_1)
  1217. #define ST7920_DELAY_1 BOARD_ST7920_DELAY_1
  1218. #endif
  1219. #if !defined(ST7920_DELAY_2) && defined(BOARD_ST7920_DELAY_2)
  1220. #define ST7920_DELAY_2 BOARD_ST7920_DELAY_2
  1221. #endif
  1222. #if !defined(ST7920_DELAY_3) && defined(BOARD_ST7920_DELAY_3)
  1223. #define ST7920_DELAY_3 BOARD_ST7920_DELAY_3
  1224. #endif
  1225. #else
  1226. #undef ST7920_DELAY_1
  1227. #undef ST7920_DELAY_2
  1228. #undef ST7920_DELAY_3
  1229. #endif
  1230. #undef HAS_FREE_AUX2_PINS