My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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. /**
  24. * Test AVR specific configuration values for errors at compile-time.
  25. */
  26. /**
  27. * Digipot requirement
  28. */
  29. #if ENABLED(DIGIPOT_MCP4018)
  30. #if !defined(DIGIPOTS_I2C_SDA_X) || !defined(DIGIPOTS_I2C_SDA_Y) || !defined(DIGIPOTS_I2C_SDA_Z) \
  31. || !defined(DIGIPOTS_I2C_SDA_E0) || !defined(DIGIPOTS_I2C_SDA_E1)
  32. #error "DIGIPOT_MCP4018 requires DIGIPOTS_I2C_SDA_* pins to be defined."
  33. #endif
  34. #endif
  35. /**
  36. * Sanity checks for Spindle / Laser
  37. */
  38. #if ENABLED(SPINDLE_LASER_ENABLE)
  39. #if !PIN_EXISTS(SPINDLE_LASER_ENABLE)
  40. #error "SPINDLE_LASER_ENABLE requires SPINDLE_LASER_ENABLE_PIN."
  41. #elif SPINDLE_DIR_CHANGE && !PIN_EXISTS(SPINDLE_DIR)
  42. #error "SPINDLE_DIR_PIN not defined."
  43. #elif ENABLED(SPINDLE_LASER_PWM) && PIN_EXISTS(SPINDLE_LASER_PWM)
  44. #if !(WITHIN(SPINDLE_LASER_PWM_PIN, 2, 13) || WITHIN(SPINDLE_LASER_PWM_PIN, 44, 46))
  45. #error "SPINDLE_LASER_PWM_PIN not assigned to a PWM pin."
  46. #elif SPINDLE_LASER_POWERUP_DELAY < 1
  47. #error "SPINDLE_LASER_POWERUP_DELAY must be greater than 0."
  48. #elif SPINDLE_LASER_POWERDOWN_DELAY < 1
  49. #error "SPINDLE_LASER_POWERDOWN_DELAY must be greater than 0."
  50. #elif !defined(SPINDLE_LASER_PWM_INVERT)
  51. #error "SPINDLE_LASER_PWM_INVERT missing."
  52. #elif !defined(SPEED_POWER_SLOPE) || !defined(SPEED_POWER_INTERCEPT) || !defined(SPEED_POWER_MIN) || !defined(SPEED_POWER_MAX)
  53. #error "SPINDLE_LASER_PWM equation constant(s) missing."
  54. #elif SPINDLE_LASER_PWM_PIN == 4 || WITHIN(SPINDLE_LASER_PWM_PIN, 11, 13)
  55. #error "Counter/Timer for SPINDLE_LASER_PWM_PIN is used by a system interrupt."
  56. #elif PIN_EXISTS(X_MAX) && X_MAX_PIN == SPINDLE_LASER_PWM_PIN
  57. #error "SPINDLE_LASER_PWM pin is in use by X_MAX endstop."
  58. #elif PIN_EXISTS(X_MIN) && X_MIN_PIN == SPINDLE_LASER_PWM_PIN
  59. #error "SPINDLE_LASER_PWM pin is in use by X_MIN endstop."
  60. #elif PIN_EXISTS(Z_STEP) && Z_STEP_PIN == SPINDLE_LASER_PWM_PIN
  61. #error "SPINDLE_LASER_PWM pin in use by Z_STEP."
  62. #elif NUM_SERVOS > 0 && (WITHIN(SPINDLE_LASER_PWM_PIN, 2, 3) || SPINDLE_LASER_PWM_PIN == 5)
  63. #error "Counter/Timer for SPINDLE_LASER_PWM_PIN is used by the servo system."
  64. #elif PIN_EXISTS(CASE_LIGHT) && SPINDLE_LASER_PWM_PIN == CASE_LIGHT_PIN
  65. #error "SPINDLE_LASER_PWM_PIN is used by CASE_LIGHT_PIN."
  66. #elif PIN_EXISTS(E0_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E0_AUTO_FAN_PIN
  67. #error "SPINDLE_LASER_PWM_PIN is used by E0_AUTO_FAN_PIN."
  68. #elif PIN_EXISTS(E1_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E1_AUTO_FAN_PIN
  69. #error "SPINDLE_LASER_PWM_PIN is used by E1_AUTO_FAN_PIN."
  70. #elif PIN_EXISTS(E2_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E2_AUTO_FAN_PIN
  71. #error "SPINDLE_LASER_PWM_PIN is used by E2_AUTO_FAN_PIN."
  72. #elif PIN_EXISTS(E3_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E3_AUTO_FAN_PIN
  73. #error "SPINDLE_LASER_PWM_PIN is used by E3_AUTO_FAN_PIN."
  74. #elif PIN_EXISTS(E4_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E4_AUTO_FAN_PIN
  75. #error "SPINDLE_LASER_PWM_PIN is used by E4_AUTO_FAN_PIN."
  76. #elif PIN_EXISTS(E5_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E5_AUTO_FAN_PIN
  77. #error "SPINDLE_LASER_PWM_PIN is used by E5_AUTO_FAN_PIN."
  78. #elif PIN_EXISTS(FAN) && SPINDLE_LASER_PWM_PIN == FAN_PIN
  79. #error "SPINDLE_LASER_PWM_PIN is used by FAN_PIN."
  80. #elif PIN_EXISTS(FAN1) && SPINDLE_LASER_PWM_PIN == FAN1_PIN
  81. #error "SPINDLE_LASER_PWM_PIN is used by FAN1_PIN."
  82. #elif PIN_EXISTS(FAN2) && SPINDLE_LASER_PWM_PIN == FAN2_PIN
  83. #error "SPINDLE_LASER_PWM_PIN is used by FAN2_PIN."
  84. #elif PIN_EXISTS(CONTROLLERFAN) && SPINDLE_LASER_PWM_PIN == CONTROLLERFAN_PIN
  85. #error "SPINDLE_LASER_PWM_PIN is used by CONTROLLERFAN_PIN."
  86. #elif PIN_EXISTS(MOTOR_CURRENT_PWM_XY) && SPINDLE_LASER_PWM_PIN == MOTOR_CURRENT_PWM_XY_PIN
  87. #error "SPINDLE_LASER_PWM_PIN is used by MOTOR_CURRENT_PWM_XY."
  88. #elif PIN_EXISTS(MOTOR_CURRENT_PWM_Z) && SPINDLE_LASER_PWM_PIN == MOTOR_CURRENT_PWM_Z_PIN
  89. #error "SPINDLE_LASER_PWM_PIN is used by MOTOR_CURRENT_PWM_Z."
  90. #elif PIN_EXISTS(MOTOR_CURRENT_PWM_E) && SPINDLE_LASER_PWM_PIN == MOTOR_CURRENT_PWM_E_PIN
  91. #error "SPINDLE_LASER_PWM_PIN is used by MOTOR_CURRENT_PWM_E."
  92. #endif
  93. #endif
  94. #endif // SPINDLE_LASER_ENABLE
  95. /**
  96. * The Trinamic library includes SoftwareSerial.h, leading to a compile error.
  97. */
  98. #if HAS_TRINAMIC && ENABLED(ENDSTOP_INTERRUPTS_FEATURE)
  99. #error "TMCStepper includes SoftwareSerial.h which is incompatible with ENDSTOP_INTERRUPTS_FEATURE. Disable ENDSTOP_INTERRUPTS_FEATURE to continue."
  100. #endif