My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

pins.h 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571
  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. #if MB(GEN7_CUSTOM)
  25. #include "pins_GEN7_CUSTOM.h"
  26. #elif MB(GEN7_12)
  27. #include "pins_GEN7_12.h"
  28. #elif MB(GEN7_13)
  29. #include "pins_GEN7_13.h"
  30. #elif MB(GEN7_14)
  31. #include "pins_GEN7_14.h"
  32. #elif MB(CNCONTROLS_11)
  33. #include "pins_CNCONTROLS_11.h"
  34. #elif MB(CNCONTROLS_12)
  35. #include "pins_CNCONTROLS_12.h"
  36. #elif MB(CHEAPTRONIC)
  37. #include "pins_CHEAPTRONIC.h"
  38. #elif MB(CHEAPTRONIC_V2)
  39. #include "pins_CHEAPTRONICv2.h"
  40. #elif MB(SETHI)
  41. #include "pins_SETHI.h"
  42. #elif MB(MIGHTYBOARD_REVE)
  43. #include "pins_MIGHTYBOARD_REVE.h"
  44. #elif MB(RAMPS_OLD)
  45. #include "pins_RAMPS_OLD.h"
  46. #elif MB(RAMPS_13_EFB)
  47. #define IS_RAMPS_EFB
  48. #include "pins_RAMPS_13.h"
  49. #elif MB(RAMPS_13_EEB)
  50. #define IS_RAMPS_EEB
  51. #include "pins_RAMPS_13.h"
  52. #elif MB(RAMPS_13_EFF)
  53. #define IS_RAMPS_EFF
  54. #include "pins_RAMPS_13.h"
  55. #elif MB(RAMPS_13_EEF)
  56. #define IS_RAMPS_EEF
  57. #include "pins_RAMPS_13.h"
  58. #elif MB(RAMPS_13_SF)
  59. #define IS_RAMPS_SF
  60. #include "pins_RAMPS_13.h"
  61. #elif MB(RAMPS_14_EFB)
  62. #define IS_RAMPS_EFB
  63. #include "pins_RAMPS.h"
  64. #elif MB(RAMPS_14_EEB)
  65. #define IS_RAMPS_EEB
  66. #include "pins_RAMPS.h"
  67. #elif MB(RAMPS_14_EFF)
  68. #define IS_RAMPS_EFF
  69. #include "pins_RAMPS.h"
  70. #elif MB(RAMPS_14_EEF)
  71. #define IS_RAMPS_EEF
  72. #include "pins_RAMPS.h"
  73. #elif MB(RAMPS_14_SF)
  74. #define IS_RAMPS_SF
  75. #include "pins_RAMPS.h"
  76. #elif MB(GEN6)
  77. #include "pins_GEN6.h"
  78. #elif MB(GEN6_DELUXE)
  79. #include "pins_GEN6_DELUXE.h"
  80. #elif MB(SANGUINOLOLU_11)
  81. #include "pins_SANGUINOLOLU_11.h"
  82. #elif MB(SANGUINOLOLU_12)
  83. #include "pins_SANGUINOLOLU_12.h"
  84. #elif MB(MELZI)
  85. #include "pins_MELZI.h"
  86. #elif MB(STB_11)
  87. #include "pins_STB_11.h"
  88. #elif MB(AZTEEG_X1)
  89. #include "pins_AZTEEG_X1.h"
  90. #elif MB(MELZI_MAKR3D)
  91. #include "pins_MELZI_MAKR3D.h"
  92. #elif MB(AZTEEG_X3)
  93. #include "pins_AZTEEG_X3.h"
  94. #elif MB(AZTEEG_X3_PRO)
  95. #include "pins_AZTEEG_X3_PRO.h"
  96. #elif MB(ULTIMAKER)
  97. #include "pins_ULTIMAKER.h"
  98. #elif MB(ULTIMAKER_OLD)
  99. #include "pins_ULTIMAKER_OLD.h"
  100. #elif MB(ULTIMAIN_2)
  101. #include "pins_ULTIMAIN_2.h"
  102. #elif MB(3DRAG)
  103. #include "pins_3DRAG.h"
  104. #elif MB(K8200)
  105. #include "pins_K8200.h"
  106. #elif MB(K8400)
  107. #include "pins_K8400.h"
  108. #elif MB(TEENSYLU)
  109. #include "pins_TEENSYLU.h"
  110. #elif MB(RUMBA)
  111. #include "pins_RUMBA.h"
  112. #elif MB(PRINTRBOARD)
  113. #include "pins_PRINTRBOARD.h"
  114. #elif MB(PRINTRBOARD_REVF)
  115. #include "pins_PRINTRBOARD_REVF.h"
  116. #elif MB(BRAINWAVE)
  117. #include "pins_BRAINWAVE.h"
  118. #elif MB(BRAINWAVE_PRO)
  119. #include "pins_BRAINWAVE_PRO.h"
  120. #elif MB(SAV_MKI)
  121. #include "pins_SAV_MKI.h"
  122. #elif MB(TEENSY2)
  123. #include "pins_TEENSY2.h"
  124. #elif MB(GEN3_PLUS)
  125. #include "pins_GEN3_PLUS.h"
  126. #elif MB(GEN3_MONOLITHIC)
  127. #include "pins_GEN3_MONOLITHIC.h"
  128. #elif MB(MEGATRONICS)
  129. #include "pins_MEGATRONICS.h"
  130. #elif MB(MINITRONICS)
  131. #include "pins_MINITRONICS.h"
  132. #elif MB(MEGATRONICS_2)
  133. #include "pins_MEGATRONICS_2.h"
  134. #elif MB(MEGATRONICS_3)
  135. #include "pins_MEGATRONICS_3.h"
  136. #elif MB(MEGATRONICS_31)
  137. #define MEGATRONICS_31
  138. #include "pins_MEGATRONICS_3.h"
  139. #elif MB(OMCA_A)
  140. #include "pins_OMCA_A.h"
  141. #elif MB(OMCA)
  142. #include "pins_OMCA.h"
  143. #elif MB(RAMBO)
  144. #include "pins_RAMBO.h"
  145. #elif MB(MINIRAMBO)
  146. #include "pins_MINIRAMBO.h"
  147. #elif MB(ELEFU_3)
  148. #include "pins_ELEFU_3.h"
  149. #elif MB(5DPRINT)
  150. #include "pins_5DPRINT.h"
  151. #elif MB(LEAPFROG)
  152. #include "pins_LEAPFROG.h"
  153. #elif MB(BAM_DICE)
  154. #include "pins_RAMPS.h"
  155. #elif MB(BAM_DICE_DUE)
  156. #include "pins_BAM_DICE_DUE.h"
  157. #elif MB(FELIX2)
  158. #include "pins_FELIX2.h"
  159. #elif MB(MKS_BASE)
  160. #include "pins_MKS_BASE.h"
  161. #elif MB(RIGIDBOARD)
  162. #include "pins_RIGIDBOARD.h"
  163. #elif MB(RIGIDBOARD_V2)
  164. #include "pins_RIGIDBOARD_V2.h"
  165. #elif MB(MEGACONTROLLER)
  166. #include "pins_MEGACONTROLLER.h"
  167. #elif MB(BQ_ZUM_MEGA_3D)
  168. #include "pins_BQ_ZUM_MEGA_3D.h"
  169. #elif MB(SCOOVO_X9H)
  170. #include "pins_SCOOVO_X9H.h"
  171. #elif MB(MKS_13)
  172. #include "pins_MKS_13.h"
  173. #elif MB(SAINSMART_2IN1)
  174. #include "pins_SAINSMART_2IN1.h"
  175. #else
  176. #error "Unknown MOTHERBOARD value set in Configuration.h"
  177. #endif
  178. // Define certain undefined pins
  179. #ifndef X_MS1_PIN
  180. #define X_MS1_PIN -1
  181. #endif
  182. #ifndef X_MS2_PIN
  183. #define X_MS2_PIN -1
  184. #endif
  185. #ifndef Y_MS1_PIN
  186. #define Y_MS1_PIN -1
  187. #endif
  188. #ifndef Y_MS2_PIN
  189. #define Y_MS2_PIN -1
  190. #endif
  191. #ifndef Z_MS1_PIN
  192. #define Z_MS1_PIN -1
  193. #endif
  194. #ifndef Z_MS2_PIN
  195. #define Z_MS2_PIN -1
  196. #endif
  197. #ifndef E0_MS1_PIN
  198. #define E0_MS1_PIN -1
  199. #endif
  200. #ifndef E0_MS2_PIN
  201. #define E0_MS2_PIN -1
  202. #endif
  203. #ifndef E1_MS1_PIN
  204. #define E1_MS1_PIN -1
  205. #endif
  206. #ifndef E1_MS2_PIN
  207. #define E1_MS2_PIN -1
  208. #endif
  209. #ifndef FAN_PIN
  210. #define FAN_PIN -1
  211. #endif
  212. #ifndef FAN1_PIN
  213. #define FAN1_PIN -1
  214. #endif
  215. #ifndef FAN2_PIN
  216. #define FAN2_PIN -1
  217. #endif
  218. #ifndef CONTROLLER_FAN_PIN
  219. #define CONTROLLER_FAN_PIN -1
  220. #endif
  221. #ifndef HEATER_0_PIN
  222. #define HEATER_0_PIN -1
  223. #endif
  224. #ifndef HEATER_1_PIN
  225. #define HEATER_1_PIN -1
  226. #endif
  227. #ifndef HEATER_2_PIN
  228. #define HEATER_2_PIN -1
  229. #endif
  230. #ifndef HEATER_3_PIN
  231. #define HEATER_3_PIN -1
  232. #endif
  233. #ifndef HEATER_4_PIN
  234. #define HEATER_4_PIN -1
  235. #endif
  236. #ifndef HEATER_BED_PIN
  237. #define HEATER_BED_PIN -1
  238. #endif
  239. #ifndef TEMP_0_PIN
  240. #define TEMP_0_PIN -1
  241. #endif
  242. #ifndef TEMP_1_PIN
  243. #define TEMP_1_PIN -1
  244. #endif
  245. #ifndef TEMP_2_PIN
  246. #define TEMP_2_PIN -1
  247. #endif
  248. #ifndef TEMP_3_PIN
  249. #define TEMP_3_PIN -1
  250. #endif
  251. #ifndef TEMP_4_PIN
  252. #define TEMP_4_PIN -1
  253. #endif
  254. #ifndef TEMP_BED_PIN
  255. #define TEMP_BED_PIN -1
  256. #endif
  257. #ifndef SD_DETECT_PIN
  258. #define SD_DETECT_PIN -1
  259. #endif
  260. #ifndef SDPOWER
  261. #define SDPOWER -1
  262. #endif
  263. #ifndef SDSS
  264. #define SDSS -1
  265. #endif
  266. #ifndef LED_PIN
  267. #define LED_PIN -1
  268. #endif
  269. #ifndef PS_ON_PIN
  270. #define PS_ON_PIN -1
  271. #endif
  272. #ifndef KILL_PIN
  273. #define KILL_PIN -1
  274. #endif
  275. #ifndef SUICIDE_PIN
  276. #define SUICIDE_PIN -1
  277. #endif
  278. #ifndef MAX_EXTRUDERS
  279. #define MAX_EXTRUDERS 5
  280. #endif
  281. // Marlin needs to account for pins that equal -1
  282. #define marlinAnalogInputToDigitalPin(p) ((p) == -1 ? -1 : analogInputToDigitalPin(p))
  283. //
  284. // Assign auto fan pins if needed
  285. //
  286. #if !defined(E0_AUTO_FAN_PIN) && defined(ORIG_E0_AUTO_FAN_PIN)
  287. #define E0_AUTO_FAN_PIN ORIG_E0_AUTO_FAN_PIN
  288. #endif
  289. #if !defined(E1_AUTO_FAN_PIN) && defined(ORIG_E1_AUTO_FAN_PIN)
  290. #define E1_AUTO_FAN_PIN ORIG_E1_AUTO_FAN_PIN
  291. #endif
  292. #if !defined(E2_AUTO_FAN_PIN) && defined(ORIG_E2_AUTO_FAN_PIN)
  293. #define E2_AUTO_FAN_PIN ORIG_E2_AUTO_FAN_PIN
  294. #endif
  295. #if !defined(E3_AUTO_FAN_PIN) && defined(ORIG_E3_AUTO_FAN_PIN)
  296. #define E3_AUTO_FAN_PIN ORIG_E3_AUTO_FAN_PIN
  297. #endif
  298. #if !defined(E4_AUTO_FAN_PIN) && defined(ORIG_E4_AUTO_FAN_PIN)
  299. #define E4_AUTO_FAN_PIN ORIG_E4_AUTO_FAN_PIN
  300. #endif
  301. // List of pins which to ignore when asked to change by gcode, 0 and 1 are RX and TX, do not mess with those!
  302. #define _E0_PINS E0_STEP_PIN, E0_DIR_PIN, E0_ENABLE_PIN, E0_MS1_PIN, E0_MS2_PIN,
  303. #define _E1_PINS
  304. #define _E2_PINS
  305. #define _E3_PINS
  306. #define _E4_PINS
  307. #if EXTRUDERS > 1
  308. #undef _E1_PINS
  309. #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN, E1_MS1_PIN, E1_MS2_PIN,
  310. #if EXTRUDERS > 2
  311. #undef _E2_PINS
  312. #define _E2_PINS E2_STEP_PIN, E2_DIR_PIN, E2_ENABLE_PIN,
  313. #if EXTRUDERS > 3
  314. #undef _E3_PINS
  315. #define _E3_PINS E3_STEP_PIN, E3_DIR_PIN, E3_ENABLE_PIN,
  316. #if EXTRUDERS > 4
  317. #undef _E4_PINS
  318. #define _E4_PINS E4_STEP_PIN, E4_DIR_PIN, E4_ENABLE_PIN,
  319. #endif // EXTRUDERS > 4
  320. #endif // EXTRUDERS > 3
  321. #endif // EXTRUDERS > 2
  322. #endif // EXTRUDERS > 1
  323. #define _H0_PINS HEATER_0_PIN, E0_AUTO_FAN_PIN, marlinAnalogInputToDigitalPin(TEMP_0_PIN),
  324. #define _H1_PINS
  325. #define _H2_PINS
  326. #define _H3_PINS
  327. #define _H4_PINS
  328. #if HOTENDS > 1
  329. #undef _H1_PINS
  330. #define _H1_PINS HEATER_1_PIN, E1_AUTO_FAN_PIN, marlinAnalogInputToDigitalPin(TEMP_1_PIN),
  331. #if HOTENDS > 2
  332. #undef _H2_PINS
  333. #define _H2_PINS HEATER_2_PIN, E2_AUTO_FAN_PIN, marlinAnalogInputToDigitalPin(TEMP_2_PIN),
  334. #if HOTENDS > 3
  335. #undef _H3_PINS
  336. #define _H3_PINS HEATER_3_PIN, E3_AUTO_FAN_PIN, marlinAnalogInputToDigitalPin(TEMP_3_PIN),
  337. #if HOTENDS > 4
  338. #undef _H4_PINS
  339. #define _H4_PINS HEATER_4_PIN, marlinAnalogInputToDigitalPin(TEMP_4_PIN),
  340. #endif // HOTENDS > 4
  341. #endif // HOTENDS > 3
  342. #endif // HOTENDS > 2
  343. #elif ENABLED(MIXING_EXTRUDER)
  344. #undef _E1_PINS
  345. #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN,
  346. #if MIXING_STEPPERS > 2
  347. #undef _E2_PINS
  348. #define _E2_PINS E2_STEP_PIN, E2_DIR_PIN, E2_ENABLE_PIN,
  349. #if MIXING_STEPPERS > 3
  350. #undef _E3_PINS
  351. #define _E3_PINS E3_STEP_PIN, E3_DIR_PIN, E3_ENABLE_PIN,
  352. #if MIXING_STEPPERS > 4
  353. #undef _E4_PINS
  354. #define _E4_PINS E4_STEP_PIN, E4_DIR_PIN, E4_ENABLE_PIN,
  355. #endif // MIXING_STEPPERS > 4
  356. #endif // MIXING_STEPPERS > 3
  357. #endif // MIXING_STEPPERS > 2
  358. #endif // MIXING_STEPPERS > 1
  359. #define BED_PINS HEATER_BED_PIN, marlinAnalogInputToDigitalPin(TEMP_BED_PIN),
  360. //
  361. // Assign endstop pins for boards with only 3 connectors
  362. //
  363. #ifdef X_STOP_PIN
  364. #if X_HOME_DIR < 0
  365. #define X_MIN_PIN X_STOP_PIN
  366. #define X_MAX_PIN -1
  367. #else
  368. #define X_MIN_PIN -1
  369. #define X_MAX_PIN X_STOP_PIN
  370. #endif
  371. #endif
  372. #ifdef Y_STOP_PIN
  373. #if Y_HOME_DIR < 0
  374. #define Y_MIN_PIN Y_STOP_PIN
  375. #define Y_MAX_PIN -1
  376. #else
  377. #define Y_MIN_PIN -1
  378. #define Y_MAX_PIN Y_STOP_PIN
  379. #endif
  380. #endif
  381. #ifdef Z_STOP_PIN
  382. #if Z_HOME_DIR < 0
  383. #define Z_MIN_PIN Z_STOP_PIN
  384. #define Z_MAX_PIN -1
  385. #else
  386. #define Z_MIN_PIN -1
  387. #define Z_MAX_PIN Z_STOP_PIN
  388. #endif
  389. #endif
  390. //
  391. // Disable unused endstop / probe pins
  392. //
  393. #if DISABLED(Z_MIN_PROBE_ENDSTOP)
  394. #undef Z_MIN_PROBE_PIN
  395. #define Z_MIN_PROBE_PIN -1
  396. #endif
  397. #if DISABLED(USE_XMAX_PLUG)
  398. #undef X_MAX_PIN
  399. #define X_MAX_PIN -1
  400. #endif
  401. #if DISABLED(USE_YMAX_PLUG)
  402. #undef Y_MAX_PIN
  403. #define Y_MAX_PIN -1
  404. #endif
  405. #if DISABLED(USE_ZMAX_PLUG)
  406. #undef Z_MAX_PIN
  407. #define Z_MAX_PIN -1
  408. #endif
  409. #if DISABLED(USE_XMIN_PLUG)
  410. #undef X_MIN_PIN
  411. #define X_MIN_PIN -1
  412. #endif
  413. #if DISABLED(USE_YMIN_PLUG)
  414. #undef Y_MIN_PIN
  415. #define Y_MIN_PIN -1
  416. #endif
  417. #if DISABLED(USE_ZMIN_PLUG)
  418. #undef Z_MIN_PIN
  419. #define Z_MIN_PIN -1
  420. #endif
  421. //
  422. // Dual X-carriage, Dual Y, Dual Z support
  423. //
  424. #define _X2_PINS
  425. #define _Y2_PINS
  426. #define _Z2_PINS
  427. #define __EPIN(p,q) E##p##_##q##_PIN
  428. #define _EPIN(p,q) __EPIN(p,q)
  429. // The X2 axis, if any, should be the next open extruder port
  430. #if ENABLED(DUAL_X_CARRIAGE) || ENABLED(X_DUAL_STEPPER_DRIVERS)
  431. #ifndef X2_STEP_PIN
  432. #define X2_STEP_PIN _EPIN(E_STEPPERS, STEP)
  433. #define X2_DIR_PIN _EPIN(E_STEPPERS, DIR)
  434. #define X2_ENABLE_PIN _EPIN(E_STEPPERS, ENABLE)
  435. #if X2_ENABLE_PIN == 0
  436. #error "No E stepper plug left for X2!"
  437. #endif
  438. #endif
  439. #undef _X2_PINS
  440. #define _X2_PINS X2_STEP_PIN, X2_DIR_PIN, X2_ENABLE_PIN,
  441. #define Y2_E_INDEX INCREMENT(E_STEPPERS)
  442. #else
  443. #define Y2_E_INDEX E_STEPPERS
  444. #endif
  445. // The Y2 axis, if any, should be the next open extruder port
  446. #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
  447. #ifndef Y2_STEP_PIN
  448. #define Y2_STEP_PIN _EPIN(Y2_E_INDEX, STEP)
  449. #define Y2_DIR_PIN _EPIN(Y2_E_INDEX, DIR)
  450. #define Y2_ENABLE_PIN _EPIN(Y2_E_INDEX, ENABLE)
  451. #if Y2_ENABLE_PIN == 0
  452. #error "No E stepper plug left for Y2!"
  453. #endif
  454. #endif
  455. #undef _Y2_PINS
  456. #define _Y2_PINS Y2_STEP_PIN, Y2_DIR_PIN, Y2_ENABLE_PIN,
  457. #define Z2_E_INDEX INCREMENT(Y2_E_INDEX)
  458. #else
  459. #define Z2_E_INDEX Y2_E_INDEX
  460. #endif
  461. // The Z2 axis, if any, should be the next open extruder port
  462. #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
  463. #ifndef Z2_STEP_PIN
  464. #define Z2_STEP_PIN _EPIN(Z2_E_INDEX, STEP)
  465. #define Z2_DIR_PIN _EPIN(Z2_E_INDEX, DIR)
  466. #define Z2_ENABLE_PIN _EPIN(Z2_E_INDEX, ENABLE)
  467. #if Z2_ENABLE_PIN == 0
  468. #error "No E stepper plug left for Z2!"
  469. #endif
  470. #endif
  471. #undef _Z2_PINS
  472. #define _Z2_PINS Z2_STEP_PIN, Z2_DIR_PIN, Z2_ENABLE_PIN,
  473. #endif
  474. #define SENSITIVE_PINS { 0, 1, \
  475. X_STEP_PIN, X_DIR_PIN, X_ENABLE_PIN, X_MIN_PIN, X_MAX_PIN, \
  476. Y_STEP_PIN, Y_DIR_PIN, Y_ENABLE_PIN, Y_MIN_PIN, Y_MAX_PIN, \
  477. Z_STEP_PIN, Z_DIR_PIN, Z_ENABLE_PIN, Z_MIN_PIN, Z_MAX_PIN, Z_MIN_PROBE_PIN, \
  478. PS_ON_PIN, HEATER_BED_PIN, FAN_PIN, FAN1_PIN, FAN2_PIN, CONTROLLER_FAN_PIN, \
  479. _E0_PINS _E1_PINS _E2_PINS _E3_PINS _E4_PINS BED_PINS \
  480. _H0_PINS _H1_PINS _H2_PINS _H3_PINS _H4_PINS \
  481. _X2_PINS _Y2_PINS _Z2_PINS \
  482. X_MS1_PIN, X_MS2_PIN, Y_MS1_PIN, Y_MS2_PIN, Z_MS1_PIN, Z_MS2_PIN \
  483. }
  484. #define HAS_DIGIPOTSS (PIN_EXISTS(DIGIPOTSS))
  485. /**
  486. * Define SPI Pins: SCK, MISO, MOSI, SS
  487. */
  488. #if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328__) || defined(__AVR_ATmega328P__)
  489. #define AVR_SCK_PIN 13
  490. #define AVR_MISO_PIN 12
  491. #define AVR_MOSI_PIN 11
  492. #define AVR_SS_PIN 10
  493. #elif defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644PA__) || defined(__AVR_ATmega1284P__)
  494. #define AVR_SCK_PIN 7
  495. #define AVR_MISO_PIN 6
  496. #define AVR_MOSI_PIN 5
  497. #define AVR_SS_PIN 4
  498. #elif defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
  499. #define AVR_SCK_PIN 52
  500. #define AVR_MISO_PIN 50
  501. #define AVR_MOSI_PIN 51
  502. #define AVR_SS_PIN 53
  503. #elif defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__)
  504. #if ENABLED(AT90USBxx_TEENSYPP_ASSIGNMENTS)
  505. // Teensy pin assignments
  506. #define AVR_SCK_PIN 21
  507. #define AVR_MISO_PIN 23
  508. #define AVR_MOSI_PIN 22
  509. #define AVR_SS_PIN 20
  510. #else
  511. // Traditional pin assignments
  512. #define AVR_SCK_PIN 9
  513. #define AVR_MISO_PIN 11
  514. #define AVR_MOSI_PIN 10
  515. #define AVR_SS_PIN 8
  516. #endif
  517. #elif defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__)
  518. #define AVR_SCK_PIN 10
  519. #define AVR_MISO_PIN 12
  520. #define AVR_MOSI_PIN 11
  521. #define AVR_SS_PIN 16
  522. #endif
  523. #ifndef SCK_PIN
  524. #define SCK_PIN AVR_SCK_PIN
  525. #endif
  526. #ifndef MISO_PIN
  527. #define MISO_PIN AVR_MISO_PIN
  528. #endif
  529. #ifndef MOSI_PIN
  530. #define MOSI_PIN AVR_MOSI_PIN
  531. #endif
  532. #ifndef SS_PIN
  533. #define SS_PIN AVR_SS_PIN
  534. #endif
  535. #endif // __PINS_H