My Marlin configs for Fabrikator Mini and CTC i3 Pro B
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

pins.h 7.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
  4. *
  5. * Based on Sprinter and grbl.
  6. * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
  7. *
  8. * This program is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  20. *
  21. */
  22. #ifndef PINS_H
  23. #define PINS_H
  24. // Preset optional pins
  25. #define X_MS1_PIN -1
  26. #define X_MS2_PIN -1
  27. #define Y_MS1_PIN -1
  28. #define Y_MS2_PIN -1
  29. #define Z_MS1_PIN -1
  30. #define Z_MS2_PIN -1
  31. #define E0_MS1_PIN -1
  32. #define E0_MS2_PIN -1
  33. #define E1_MS1_PIN -1
  34. #define E1_MS2_PIN -1
  35. #define HEATER_3_PIN -1
  36. #define TEMP_3_PIN -1
  37. #if MB(GEN7_CUSTOM)
  38. #include "pins_GEN7_CUSTOM.h"
  39. #elif MB(GEN7_12)
  40. #include "pins_GEN7_12.h"
  41. #elif MB(GEN7_13)
  42. #include "pins_GEN7_13.h"
  43. #elif MB(GEN7_14)
  44. #include "pins_GEN7_14.h"
  45. #elif MB(CHEAPTRONIC)
  46. #include "pins_CHEAPTRONIC.h"
  47. #elif MB(SETHI)
  48. #include "pins_SETHI.h"
  49. #elif MB(RAMPS_OLD)
  50. #include "pins_RAMPS_OLD.h"
  51. #elif MB(RAMPS_13_EFB)
  52. #include "pins_RAMPS_13_EFB.h"
  53. #elif MB(RAMPS_13_EEB) || MB(RAMPS_13_EFF) || MB(RAMPS_13_EEF) || MB(RAMPS_13_SF)
  54. #include "pins_RAMPS_13.h"
  55. #elif MB(RAMPS_14_EFB)
  56. #include "pins_RAMPS_14_EFB.h"
  57. #elif MB(RAMPS_14_EEB) || MB(RAMPS_14_EFF) || MB(RAMPS_14_EEF) || MB(RAMPS_14_SF)
  58. #include "pins_RAMPS_14.h"
  59. #elif MB(GEN6)
  60. #include "pins_GEN6.h"
  61. #elif MB(GEN6_DELUXE)
  62. #include "pins_GEN6_DELUXE.h"
  63. #elif MB(SANGUINOLOLU_11)
  64. #include "pins_SANGUINOLOLU_11.h"
  65. #elif MB(SANGUINOLOLU_12)
  66. #include "pins_SANGUINOLOLU_12.h"
  67. #elif MB(MELZI)
  68. #include "pins_MELZI.h"
  69. #elif MB(STB_11)
  70. #include "pins_STB_11.h"
  71. #elif MB(AZTEEG_X1)
  72. #include "pins_AZTEEG_X1.h"
  73. #elif MB(MELZI_MAKR3D)
  74. #include "pins_MELZI_MAKR3D.h"
  75. #elif MB(AZTEEG_X3)
  76. #include "pins_AZTEEG_X3.h"
  77. #elif MB(AZTEEG_X3_PRO)
  78. #include "pins_AZTEEG_X3_PRO.h"
  79. #elif MB(ULTIMAKER)
  80. #include "pins_ULTIMAKER.h"
  81. #elif MB(ULTIMAKER_OLD)
  82. #include "pins_ULTIMAKER_OLD.h"
  83. #elif MB(ULTIMAIN_2)
  84. #include "pins_ULTIMAIN_2.h"
  85. #elif MB(3DRAG)
  86. #include "pins_3DRAG.h"
  87. #elif MB(K8200)
  88. #include "pins_K8200.h"
  89. #elif MB(TEENSYLU)
  90. #include "pins_TEENSYLU.h"
  91. #elif MB(RUMBA)
  92. #include "pins_RUMBA.h"
  93. #elif MB(PRINTRBOARD)
  94. #include "pins_PRINTRBOARD.h"
  95. #elif MB(PRINTRBOARD_REVF)
  96. #include "pins_PRINTRBOARD_REVF.h"
  97. #elif MB(BRAINWAVE)
  98. #include "pins_BRAINWAVE.h"
  99. #elif MB(BRAINWAVE_PRO)
  100. #include "pins_BRAINWAVE_PRO.h"
  101. #elif MB(SAV_MKI)
  102. #include "pins_SAV_MKI.h"
  103. #elif MB(TEENSY2)
  104. #include "pins_TEENSY2.h"
  105. #elif MB(GEN3_PLUS)
  106. #include "pins_GEN3_PLUS.h"
  107. #elif MB(GEN3_MONOLITHIC)
  108. #include "pins_GEN3_MONOLITHIC.h"
  109. #elif MB(MEGATRONICS)
  110. #include "pins_MEGATRONICS.h"
  111. #elif MB(MINITRONICS)
  112. #include "pins_MINITRONICS.h"
  113. #elif MB(MEGATRONICS_2)
  114. #include "pins_MEGATRONICS_2.h"
  115. #elif MB(MEGATRONICS_3)
  116. #include "pins_MEGATRONICS_3.h"
  117. #elif MB(OMCA_A)
  118. #include "pins_OMCA_A.h"
  119. #elif MB(OMCA)
  120. #include "pins_OMCA.h"
  121. #elif MB(RAMBO)
  122. #include "pins_RAMBO.h"
  123. #elif MB(MINIRAMBO)
  124. #include "pins_MINIRAMBO.h"
  125. #elif MB(ELEFU_3)
  126. #include "pins_ELEFU_3.h"
  127. #elif MB(5DPRINT)
  128. #include "pins_5DPRINT.h"
  129. #elif MB(LEAPFROG)
  130. #include "pins_LEAPFROG.h"
  131. #elif MB(BAM_DICE)
  132. #include "pins_RAMPS_14.h"
  133. #elif MB(BAM_DICE_DUE)
  134. #include "pins_BAM_DICE_DUE.h"
  135. #elif MB(FELIX2)
  136. #include "pins_FELIX2.h"
  137. #elif MB(MKS_BASE)
  138. #include "pins_MKS_BASE.h"
  139. #elif MB(RIGIDBOARD)
  140. #include "pins_RIGIDBOARD.h"
  141. #elif MB(MEGACONTROLLER)
  142. #include "pins_MEGACONTROLLER.h"
  143. #elif MB(BQ_ZUM_MEGA_3D)
  144. #include "pins_BQ_ZUM_MEGA_3D.h"
  145. #elif MB(99)
  146. #include "pins_99.h"
  147. #elif MB(AJ4P)
  148. #include "pins_AJ4P.h"
  149. #elif MB(MKS_13)
  150. #include "pins_MKS_13.h"
  151. #elif MB(SAINSMART_2IN1)
  152. #include "pins_SAINSMART_2IN1.h"
  153. #else
  154. #error Unknown MOTHERBOARD value set in Configuration.h
  155. #endif
  156. // List of pins which to ignore when asked to change by gcode, 0 and 1 are RX and TX, do not mess with those!
  157. #define _E0_PINS E0_STEP_PIN, E0_DIR_PIN, E0_ENABLE_PIN, HEATER_0_PIN, analogInputToDigitalPin(TEMP_0_PIN),
  158. #define _E1_PINS
  159. #define _E2_PINS
  160. #define _E3_PINS
  161. #if EXTRUDERS > 1
  162. #undef _E1_PINS
  163. #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN, HEATER_1_PIN, analogInputToDigitalPin(TEMP_1_PIN),
  164. #if EXTRUDERS > 2
  165. #undef _E2_PINS
  166. #define _E2_PINS E2_STEP_PIN, E2_DIR_PIN, E2_ENABLE_PIN, HEATER_2_PIN, analogInputToDigitalPin(TEMP_2_PIN),
  167. #if EXTRUDERS > 3
  168. #undef _E3_PINS
  169. #define _E3_PINS E3_STEP_PIN, E3_DIR_PIN, E3_ENABLE_PIN, HEATER_3_PIN, analogInputToDigitalPin(TEMP_3_PIN),
  170. #endif
  171. #endif
  172. #elif ENABLED(Y_DUAL_STEPPER_DRIVERS) || ENABLED(Z_DUAL_STEPPER_DRIVERS)
  173. #undef _E1_PINS
  174. #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN,
  175. #endif
  176. #ifdef X_STOP_PIN
  177. #if X_HOME_DIR < 0
  178. #define X_MIN_PIN X_STOP_PIN
  179. #define X_MAX_PIN -1
  180. #else
  181. #define X_MIN_PIN -1
  182. #define X_MAX_PIN X_STOP_PIN
  183. #endif
  184. #endif
  185. #ifdef Y_STOP_PIN
  186. #if Y_HOME_DIR < 0
  187. #define Y_MIN_PIN Y_STOP_PIN
  188. #define Y_MAX_PIN -1
  189. #else
  190. #define Y_MIN_PIN -1
  191. #define Y_MAX_PIN Y_STOP_PIN
  192. #endif
  193. #endif
  194. #ifdef Z_STOP_PIN
  195. #if Z_HOME_DIR < 0
  196. #define Z_MIN_PIN Z_STOP_PIN
  197. #define Z_MAX_PIN -1
  198. #else
  199. #define Z_MIN_PIN -1
  200. #define Z_MAX_PIN Z_STOP_PIN
  201. #endif
  202. #endif
  203. #if ENABLED(DISABLE_Z_MIN_PROBE_ENDSTOP) || DISABLED(Z_MIN_PROBE_ENDSTOP) // Allow code to compile regardless of Z_MIN_PROBE_ENDSTOP setting.
  204. #undef Z_MIN_PROBE_PIN
  205. #define Z_MIN_PROBE_PIN -1
  206. #endif
  207. #if DISABLED(USE_XMAX_PLUG)
  208. #undef X_MAX_PIN
  209. #define X_MAX_PIN -1
  210. #endif
  211. #if DISABLED(USE_YMAX_PLUG)
  212. #undef Y_MAX_PIN
  213. #define Y_MAX_PIN -1
  214. #endif
  215. #if DISABLED(USE_ZMAX_PLUG)
  216. #undef Z_MAX_PIN
  217. #define Z_MAX_PIN -1
  218. #endif
  219. #if DISABLED(USE_XMIN_PLUG)
  220. #undef X_MIN_PIN
  221. #define X_MIN_PIN -1
  222. #endif
  223. #if DISABLED(USE_YMIN_PLUG)
  224. #undef Y_MIN_PIN
  225. #define Y_MIN_PIN -1
  226. #endif
  227. #if DISABLED(USE_ZMIN_PLUG)
  228. #undef Z_MIN_PIN
  229. #define Z_MIN_PIN -1
  230. #endif
  231. //
  232. // Dual Y and Dual Z support
  233. // These options are mutually-exclusive
  234. //
  235. #define __EPIN(p,q) E##p##_##q##_PIN
  236. #define _EPIN(p,q) __EPIN(p,q)
  237. // The Y2 axis, if any, should be the next open extruder port
  238. #ifndef Y2_STEP_PIN
  239. #define Y2_STEP_PIN _EPIN(EXTRUDERS, STEP)
  240. #define Y2_DIR_PIN _EPIN(EXTRUDERS, DIR)
  241. #define Y2_ENABLE_PIN _EPIN(EXTRUDERS, ENABLE)
  242. #endif
  243. // The Z2 axis, if any, should be the next open extruder port
  244. #ifndef Z2_STEP_PIN
  245. #define Z2_STEP_PIN _EPIN(EXTRUDERS, STEP)
  246. #define Z2_DIR_PIN _EPIN(EXTRUDERS, DIR)
  247. #define Z2_ENABLE_PIN _EPIN(EXTRUDERS, ENABLE)
  248. #endif
  249. #define SENSITIVE_PINS { 0, 1, \
  250. X_STEP_PIN, X_DIR_PIN, X_ENABLE_PIN, X_MIN_PIN, X_MAX_PIN, \
  251. Y_STEP_PIN, Y_DIR_PIN, Y_ENABLE_PIN, Y_MIN_PIN, Y_MAX_PIN, \
  252. Z_STEP_PIN, Z_DIR_PIN, Z_ENABLE_PIN, Z_MIN_PIN, Z_MAX_PIN, Z_MIN_PROBE_PIN, \
  253. PS_ON_PIN, HEATER_BED_PIN, FAN_PIN, \
  254. _E0_PINS _E1_PINS _E2_PINS _E3_PINS \
  255. analogInputToDigitalPin(TEMP_BED_PIN) \
  256. }
  257. #define HAS_DIGIPOTSS (PIN_EXISTS(DIGIPOTSS))
  258. #endif //__PINS_H