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.

SanityCheck.h 4.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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. /**
  23. * Test Re-ARM specific configuration values for errors at compile-time.
  24. */
  25. #if ENABLED(SPINDLE_LASER_ENABLE)
  26. #if !PIN_EXISTS(SPINDLE_LASER_ENABLE)
  27. #error "SPINDLE_LASER_ENABLE requires SPINDLE_LASER_ENABLE_PIN."
  28. #elif SPINDLE_DIR_CHANGE && !PIN_EXISTS(SPINDLE_DIR)
  29. #error "SPINDLE_DIR_PIN not defined."
  30. #elif ENABLED(SPINDLE_LASER_PWM) && PIN_EXISTS(SPINDLE_LASER_PWM)
  31. #if !PWM_PIN(SPINDLE_LASER_PWM_PIN)
  32. #error "SPINDLE_LASER_PWM_PIN not assigned to a PWM pin."
  33. #elif !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11)
  34. #error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector"
  35. #elif SPINDLE_LASER_POWERUP_DELAY < 1
  36. #error "SPINDLE_LASER_POWERUP_DELAY must be greater than 0."
  37. #elif SPINDLE_LASER_POWERDOWN_DELAY < 1
  38. #error "SPINDLE_LASER_POWERDOWN_DELAY must be greater than 0."
  39. #elif !defined(SPINDLE_LASER_PWM_INVERT)
  40. #error "SPINDLE_LASER_PWM_INVERT missing."
  41. #elif !defined(SPEED_POWER_SLOPE) || !defined(SPEED_POWER_INTERCEPT) || !defined(SPEED_POWER_MIN) || !defined(SPEED_POWER_MAX)
  42. #error "SPINDLE_LASER_PWM equation constant(s) missing."
  43. #elif PIN_EXISTS(CASE_LIGHT) && SPINDLE_LASER_PWM_PIN == CASE_LIGHT_PIN
  44. #error "SPINDLE_LASER_PWM_PIN is used by CASE_LIGHT_PIN."
  45. #elif PIN_EXISTS(E0_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E0_AUTO_FAN_PIN
  46. #error "SPINDLE_LASER_PWM_PIN is used by E0_AUTO_FAN_PIN."
  47. #elif PIN_EXISTS(E1_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E1_AUTO_FAN_PIN
  48. #error "SPINDLE_LASER_PWM_PIN is used by E1_AUTO_FAN_PIN."
  49. #elif PIN_EXISTS(E2_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E2_AUTO_FAN_PIN
  50. #error "SPINDLE_LASER_PWM_PIN is used by E2_AUTO_FAN_PIN."
  51. #elif PIN_EXISTS(E3_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E3_AUTO_FAN_PIN
  52. #error "SPINDLE_LASER_PWM_PIN is used by E3_AUTO_FAN_PIN."
  53. #elif PIN_EXISTS(E4_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E4_AUTO_FAN_PIN
  54. #error "SPINDLE_LASER_PWM_PIN is used by E4_AUTO_FAN_PIN."
  55. #elif PIN_EXISTS(FAN) && SPINDLE_LASER_PWM_PIN == FAN_PIN
  56. #error "SPINDLE_LASER_PWM_PIN is used FAN_PIN."
  57. #elif PIN_EXISTS(FAN1) && SPINDLE_LASER_PWM_PIN == FAN1_PIN
  58. #error "SPINDLE_LASER_PWM_PIN is used FAN1_PIN."
  59. #elif PIN_EXISTS(FAN2) && SPINDLE_LASER_PWM_PIN == FAN2_PIN
  60. #error "SPINDLE_LASER_PWM_PIN is used FAN2_PIN."
  61. #elif PIN_EXISTS(CONTROLLERFAN) && SPINDLE_LASER_PWM_PIN == CONTROLLERFAN_PIN
  62. #error "SPINDLE_LASER_PWM_PIN is used by CONTROLLERFAN_PIN."
  63. #endif
  64. #endif
  65. #endif // SPINDLE_LASER_ENABLE
  66. #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) && HAS_DRIVER(TMC2130) && DISABLED(TMC_USE_SW_SPI) \
  67. && (MB(RAMPS_14_RE_ARM_EFB) \
  68. || MB(RAMPS_14_RE_ARM_EEB) \
  69. || MB(RAMPS_14_RE_ARM_EFF) \
  70. || MB(RAMPS_14_RE_ARM_EEF) \
  71. || MB(RAMPS_14_RE_ARM_SF))
  72. #error "Re-ARM with REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER and TMC2130 require TMC_USE_SW_SPI"
  73. #endif
  74. #if 1 < (ENABLED(LPC_SD_CUSTOM_CABLE) + ENABLED(LPC_SD_LCD) + ENABLED(LPC_SD_ONBOARD))
  75. #error "Enable only one of LPC_SD_CUSTOM_CABLE, LPC_SD_LCD, or LPC_SD_ONBOARD."
  76. #endif
  77. #if 1 < (ENABLED(USB_SD_DISABLED) + ENABLED(USB_SD_ONBOARD))
  78. #error "Enable only one of USB_SD_DISABLED or USB_SD_ONBOARD."
  79. #endif