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

SanityCheck.h 3.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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 X86_64 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