My Marlin configs for Fabrikator Mini and CTC i3 Pro B
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

pins.h 6.8KB

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