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 3.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (C) 2016, 2017 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. * HAL for stm32duino.com based on Libmaple and compatible (STM32F1)
  24. */
  25. /**
  26. * Test Re-ARM specific configuration values for errors at compile-time.
  27. */
  28. #if ENABLED(SPINDLE_LASER_ENABLE)
  29. #if !PIN_EXISTS(SPINDLE_LASER_ENABLE)
  30. #error "SPINDLE_LASER_ENABLE requires SPINDLE_LASER_ENABLE_PIN."
  31. #elif SPINDLE_DIR_CHANGE && !PIN_EXISTS(SPINDLE_DIR)
  32. #error "SPINDLE_DIR_PIN not defined."
  33. #elif ENABLED(SPINDLE_LASER_PWM) && PIN_EXISTS(SPINDLE_LASER_PWM)
  34. #if !PWM_PIN(SPINDLE_LASER_PWM_PIN)
  35. #error "SPINDLE_LASER_PWM_PIN not assigned to a PWM pin."
  36. #elif SPINDLE_LASER_POWERUP_DELAY < 0
  37. #error "SPINDLE_LASER_POWERUP_DELAY must be positive"
  38. #elif SPINDLE_LASER_POWERDOWN_DELAY < 0
  39. #error "SPINDLE_LASER_POWERDOWN_DELAY must be positive"
  40. #elif !defined(SPINDLE_LASER_PWM_INVERT)
  41. #error "SPINDLE_LASER_PWM_INVERT missing."
  42. #elif !defined(SPEED_POWER_SLOPE) || !defined(SPEED_POWER_INTERCEPT) || !defined(SPEED_POWER_MIN) || !defined(SPEED_POWER_MAX)
  43. #error "SPINDLE_LASER_PWM equation constant(s) missing."
  44. #elif PIN_EXISTS(CASE_LIGHT) && SPINDLE_LASER_PWM_PIN == CASE_LIGHT_PIN
  45. #error "SPINDLE_LASER_PWM_PIN is used by CASE_LIGHT_PIN."
  46. #elif PIN_EXISTS(E0_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E0_AUTO_FAN_PIN
  47. #error "SPINDLE_LASER_PWM_PIN is used by E0_AUTO_FAN_PIN."
  48. #elif PIN_EXISTS(E1_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E1_AUTO_FAN_PIN
  49. #error "SPINDLE_LASER_PWM_PIN is used by E1_AUTO_FAN_PIN."
  50. #elif PIN_EXISTS(E2_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E2_AUTO_FAN_PIN
  51. #error "SPINDLE_LASER_PWM_PIN is used by E2_AUTO_FAN_PIN."
  52. #elif PIN_EXISTS(E3_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E3_AUTO_FAN_PIN
  53. #error "SPINDLE_LASER_PWM_PIN is used by E3_AUTO_FAN_PIN."
  54. #elif PIN_EXISTS(E4_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E4_AUTO_FAN_PIN
  55. #error "SPINDLE_LASER_PWM_PIN is used by E4_AUTO_FAN_PIN."
  56. #elif PIN_EXISTS(FAN) && SPINDLE_LASER_PWM_PIN == FAN_PIN
  57. #error "SPINDLE_LASER_PWM_PIN is used FAN_PIN."
  58. #elif PIN_EXISTS(FAN1) && SPINDLE_LASER_PWM_PIN == FAN1_PIN
  59. #error "SPINDLE_LASER_PWM_PIN is used FAN1_PIN."
  60. #elif PIN_EXISTS(FAN2) && SPINDLE_LASER_PWM_PIN == FAN2_PIN
  61. #error "SPINDLE_LASER_PWM_PIN is used FAN2_PIN."
  62. #elif PIN_EXISTS(CONTROLLERFAN) && SPINDLE_LASER_PWM_PIN == CONTROLLERFAN_PIN
  63. #error "SPINDLE_LASER_PWM_PIN is used by CONTROLLERFAN_PIN."
  64. #endif
  65. #endif
  66. #endif // SPINDLE_LASER_ENABLE
  67. #if ENABLED(EMERGENCY_PARSER)
  68. #error "EMERGENCY_PARSER is not yet implemented for STM32F1. Disable EMERGENCY_PARSER to continue."
  69. #endif
  70. #if ENABLED(SDIO_SUPPORT) && DISABLED(SDSUPPORT)
  71. #error "SDIO_SUPPORT requires SDSUPPORT. Enable SDSUPPORT to continue."
  72. #endif