Singleton for cutting tools (#14429)
This commit is contained in:
@ -22,7 +22,7 @@
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Test AVR specific configuration values for errors at compile-time.
|
||||
* Test AVR-specific configuration values for errors at compile-time.
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -43,65 +43,15 @@
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sanity checks for Spindle / Laser
|
||||
* Sanity checks for Spindle / Laser PWM
|
||||
*/
|
||||
#if ENABLED(SPINDLE_LASER_ENABLE)
|
||||
#if !PIN_EXISTS(SPINDLE_LASER_ENA)
|
||||
#error "SPINDLE_LASER_ENABLE requires SPINDLE_LASER_ENA_PIN."
|
||||
#elif SPINDLE_DIR_CHANGE && !PIN_EXISTS(SPINDLE_DIR)
|
||||
#error "SPINDLE_DIR_PIN not defined."
|
||||
#elif ENABLED(SPINDLE_LASER_PWM) && PIN_EXISTS(SPINDLE_LASER_PWM)
|
||||
#if !(WITHIN(SPINDLE_LASER_PWM_PIN, 2, 13) || WITHIN(SPINDLE_LASER_PWM_PIN, 44, 46))
|
||||
#error "SPINDLE_LASER_PWM_PIN not assigned to a PWM pin."
|
||||
#elif SPINDLE_LASER_POWERUP_DELAY < 1
|
||||
#error "SPINDLE_LASER_POWERUP_DELAY must be greater than 0."
|
||||
#elif SPINDLE_LASER_POWERDOWN_DELAY < 1
|
||||
#error "SPINDLE_LASER_POWERDOWN_DELAY must be greater than 0."
|
||||
#elif !defined(SPINDLE_LASER_PWM_INVERT)
|
||||
#error "SPINDLE_LASER_PWM_INVERT missing."
|
||||
#elif !defined(SPEED_POWER_SLOPE) || !defined(SPEED_POWER_INTERCEPT) || !defined(SPEED_POWER_MIN) || !defined(SPEED_POWER_MAX)
|
||||
#error "SPINDLE_LASER_PWM equation constant(s) missing."
|
||||
#elif SPINDLE_LASER_PWM_PIN == 4 || WITHIN(SPINDLE_LASER_PWM_PIN, 11, 13)
|
||||
#error "Counter/Timer for SPINDLE_LASER_PWM_PIN is used by a system interrupt."
|
||||
#elif PIN_EXISTS(X_MAX) && X_MAX_PIN == SPINDLE_LASER_PWM_PIN
|
||||
#error "SPINDLE_LASER_PWM pin is in use by X_MAX endstop."
|
||||
#elif PIN_EXISTS(X_MIN) && X_MIN_PIN == SPINDLE_LASER_PWM_PIN
|
||||
#error "SPINDLE_LASER_PWM pin is in use by X_MIN endstop."
|
||||
#elif PIN_EXISTS(Z_STEP) && Z_STEP_PIN == SPINDLE_LASER_PWM_PIN
|
||||
#error "SPINDLE_LASER_PWM pin in use by Z_STEP."
|
||||
#elif NUM_SERVOS > 0 && (WITHIN(SPINDLE_LASER_PWM_PIN, 2, 3) || SPINDLE_LASER_PWM_PIN == 5)
|
||||
#error "Counter/Timer for SPINDLE_LASER_PWM_PIN is used by the servo system."
|
||||
#elif PIN_EXISTS(CASE_LIGHT) && SPINDLE_LASER_PWM_PIN == CASE_LIGHT_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by CASE_LIGHT_PIN."
|
||||
#elif PIN_EXISTS(E0_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E0_AUTO_FAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by E0_AUTO_FAN_PIN."
|
||||
#elif PIN_EXISTS(E1_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E1_AUTO_FAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by E1_AUTO_FAN_PIN."
|
||||
#elif PIN_EXISTS(E2_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E2_AUTO_FAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by E2_AUTO_FAN_PIN."
|
||||
#elif PIN_EXISTS(E3_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E3_AUTO_FAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by E3_AUTO_FAN_PIN."
|
||||
#elif PIN_EXISTS(E4_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E4_AUTO_FAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by E4_AUTO_FAN_PIN."
|
||||
#elif PIN_EXISTS(E5_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E5_AUTO_FAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by E5_AUTO_FAN_PIN."
|
||||
#elif PIN_EXISTS(FAN) && SPINDLE_LASER_PWM_PIN == FAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by FAN_PIN."
|
||||
#elif PIN_EXISTS(FAN1) && SPINDLE_LASER_PWM_PIN == FAN1_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by FAN1_PIN."
|
||||
#elif PIN_EXISTS(FAN2) && SPINDLE_LASER_PWM_PIN == FAN2_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by FAN2_PIN."
|
||||
#elif PIN_EXISTS(CONTROLLERFAN) && SPINDLE_LASER_PWM_PIN == CONTROLLERFAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by CONTROLLERFAN_PIN."
|
||||
#elif PIN_EXISTS(MOTOR_CURRENT_PWM_XY) && SPINDLE_LASER_PWM_PIN == MOTOR_CURRENT_PWM_XY_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by MOTOR_CURRENT_PWM_XY."
|
||||
#elif PIN_EXISTS(MOTOR_CURRENT_PWM_Z) && SPINDLE_LASER_PWM_PIN == MOTOR_CURRENT_PWM_Z_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by MOTOR_CURRENT_PWM_Z."
|
||||
#elif PIN_EXISTS(MOTOR_CURRENT_PWM_E) && SPINDLE_LASER_PWM_PIN == MOTOR_CURRENT_PWM_E_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by MOTOR_CURRENT_PWM_E."
|
||||
#endif
|
||||
#if ENABLED(SPINDLE_LASER_PWM)
|
||||
#if SPINDLE_LASER_PWM_PIN == 4 || WITHIN(SPINDLE_LASER_PWM_PIN, 11, 13)
|
||||
#error "Counter/Timer for SPINDLE_LASER_PWM_PIN is used by a system interrupt."
|
||||
#elif NUM_SERVOS > 0 && (WITHIN(SPINDLE_LASER_PWM_PIN, 2, 3) || SPINDLE_LASER_PWM_PIN == 5)
|
||||
#error "Counter/Timer for SPINDLE_LASER_PWM_PIN is used by the servo system."
|
||||
#endif
|
||||
#endif // SPINDLE_LASER_ENABLE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* The Trinamic library includes SoftwareSerial.h, leading to a compile error.
|
||||
|
@ -21,50 +21,13 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Test X86_64 configuration values for errors at compile-time.
|
||||
* Test X86_64-specific configuration values for errors at compile-time.
|
||||
*/
|
||||
|
||||
#if ENABLED(SPINDLE_LASER_ENABLE)
|
||||
#if !PIN_EXISTS(SPINDLE_LASER_ENA)
|
||||
#error "SPINDLE_LASER_ENABLE requires SPINDLE_LASER_ENA_PIN."
|
||||
#elif SPINDLE_DIR_CHANGE && !PIN_EXISTS(SPINDLE_DIR)
|
||||
#error "SPINDLE_DIR_PIN not defined."
|
||||
#elif ENABLED(SPINDLE_LASER_PWM) && PIN_EXISTS(SPINDLE_LASER_PWM)
|
||||
#if !PWM_PIN(SPINDLE_LASER_PWM_PIN)
|
||||
#error "SPINDLE_LASER_PWM_PIN not assigned to a PWM pin."
|
||||
#elif !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11)
|
||||
#error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector"
|
||||
#elif SPINDLE_LASER_POWERUP_DELAY < 1
|
||||
#error "SPINDLE_LASER_POWERUP_DELAY must be greater than 0."
|
||||
#elif SPINDLE_LASER_POWERDOWN_DELAY < 1
|
||||
#error "SPINDLE_LASER_POWERDOWN_DELAY must be greater than 0."
|
||||
#elif !defined(SPINDLE_LASER_PWM_INVERT)
|
||||
#error "SPINDLE_LASER_PWM_INVERT missing."
|
||||
#elif !defined(SPEED_POWER_SLOPE) || !defined(SPEED_POWER_INTERCEPT) || !defined(SPEED_POWER_MIN) || !defined(SPEED_POWER_MAX)
|
||||
#error "SPINDLE_LASER_PWM equation constant(s) missing."
|
||||
#elif PIN_EXISTS(CASE_LIGHT) && SPINDLE_LASER_PWM_PIN == CASE_LIGHT_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by CASE_LIGHT_PIN."
|
||||
#elif PIN_EXISTS(E0_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E0_AUTO_FAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by E0_AUTO_FAN_PIN."
|
||||
#elif PIN_EXISTS(E1_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E1_AUTO_FAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by E1_AUTO_FAN_PIN."
|
||||
#elif PIN_EXISTS(E2_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E2_AUTO_FAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by E2_AUTO_FAN_PIN."
|
||||
#elif PIN_EXISTS(E3_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E3_AUTO_FAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by E3_AUTO_FAN_PIN."
|
||||
#elif PIN_EXISTS(E4_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E4_AUTO_FAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by E4_AUTO_FAN_PIN."
|
||||
#elif PIN_EXISTS(FAN) && SPINDLE_LASER_PWM_PIN == FAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used FAN_PIN."
|
||||
#elif PIN_EXISTS(FAN1) && SPINDLE_LASER_PWM_PIN == FAN1_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used FAN1_PIN."
|
||||
#elif PIN_EXISTS(FAN2) && SPINDLE_LASER_PWM_PIN == FAN2_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used FAN2_PIN."
|
||||
#elif PIN_EXISTS(CONTROLLERFAN) && SPINDLE_LASER_PWM_PIN == CONTROLLERFAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by CONTROLLERFAN_PIN."
|
||||
#endif
|
||||
#endif
|
||||
#endif // SPINDLE_LASER_ENABLE
|
||||
// Emulating RAMPS
|
||||
#if ENABLED(SPINDLE_LASER_PWM) && !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11)
|
||||
#error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector"
|
||||
#endif
|
||||
|
||||
#if ENABLED(FAST_PWM_FAN)
|
||||
#error "FAST_PWM_FAN is not yet implemented for this platform."
|
||||
|
@ -21,50 +21,12 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Test Re-ARM specific configuration values for errors at compile-time.
|
||||
* Test LPC176x-specific configuration values for errors at compile-time.
|
||||
*/
|
||||
|
||||
#if ENABLED(SPINDLE_LASER_ENABLE)
|
||||
#if !PIN_EXISTS(SPINDLE_LASER_ENA)
|
||||
#error "SPINDLE_LASER_ENABLE requires SPINDLE_LASER_ENA_PIN."
|
||||
#elif SPINDLE_DIR_CHANGE && !PIN_EXISTS(SPINDLE_DIR)
|
||||
#error "SPINDLE_DIR_PIN not defined."
|
||||
#elif ENABLED(SPINDLE_LASER_PWM) && PIN_EXISTS(SPINDLE_LASER_PWM)
|
||||
#if !PWM_PIN(SPINDLE_LASER_PWM_PIN)
|
||||
#error "SPINDLE_LASER_PWM_PIN not assigned to a PWM pin."
|
||||
#elif !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11)
|
||||
#error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector"
|
||||
#elif SPINDLE_LASER_POWERUP_DELAY < 1
|
||||
#error "SPINDLE_LASER_POWERUP_DELAY must be greater than 0."
|
||||
#elif SPINDLE_LASER_POWERDOWN_DELAY < 1
|
||||
#error "SPINDLE_LASER_POWERDOWN_DELAY must be greater than 0."
|
||||
#elif !defined(SPINDLE_LASER_PWM_INVERT)
|
||||
#error "SPINDLE_LASER_PWM_INVERT missing."
|
||||
#elif !defined(SPEED_POWER_SLOPE) || !defined(SPEED_POWER_INTERCEPT) || !defined(SPEED_POWER_MIN) || !defined(SPEED_POWER_MAX)
|
||||
#error "SPINDLE_LASER_PWM equation constant(s) missing."
|
||||
#elif PIN_EXISTS(CASE_LIGHT) && SPINDLE_LASER_PWM_PIN == CASE_LIGHT_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by CASE_LIGHT_PIN."
|
||||
#elif PIN_EXISTS(E0_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E0_AUTO_FAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by E0_AUTO_FAN_PIN."
|
||||
#elif PIN_EXISTS(E1_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E1_AUTO_FAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by E1_AUTO_FAN_PIN."
|
||||
#elif PIN_EXISTS(E2_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E2_AUTO_FAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by E2_AUTO_FAN_PIN."
|
||||
#elif PIN_EXISTS(E3_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E3_AUTO_FAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by E3_AUTO_FAN_PIN."
|
||||
#elif PIN_EXISTS(E4_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E4_AUTO_FAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by E4_AUTO_FAN_PIN."
|
||||
#elif PIN_EXISTS(FAN) && SPINDLE_LASER_PWM_PIN == FAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used FAN_PIN."
|
||||
#elif PIN_EXISTS(FAN1) && SPINDLE_LASER_PWM_PIN == FAN1_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used FAN1_PIN."
|
||||
#elif PIN_EXISTS(FAN2) && SPINDLE_LASER_PWM_PIN == FAN2_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used FAN2_PIN."
|
||||
#elif PIN_EXISTS(CONTROLLERFAN) && SPINDLE_LASER_PWM_PIN == CONTROLLERFAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by CONTROLLERFAN_PIN."
|
||||
#endif
|
||||
#endif
|
||||
#endif // SPINDLE_LASER_ENABLE
|
||||
//#if ENABLED(SPINDLE_LASER_PWM) && !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11)
|
||||
// #error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector"
|
||||
//#endif
|
||||
|
||||
#if IS_RE_ARM_BOARD && ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) && HAS_DRIVER(TMC2130) && DISABLED(TMC_USE_SW_SPI)
|
||||
#error "Re-ARM with REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER and TMC2130 require TMC_USE_SW_SPI"
|
||||
|
@ -22,49 +22,11 @@
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Test Re-ARM specific configuration values for errors at compile-time.
|
||||
* Test STM32-specific configuration values for errors at compile-time.
|
||||
*/
|
||||
#if ENABLED(SPINDLE_LASER_ENABLE)
|
||||
#if !PIN_EXISTS(SPINDLE_LASER_ENA)
|
||||
#error "SPINDLE_LASER_ENABLE requires SPINDLE_LASER_ENA_PIN."
|
||||
#elif SPINDLE_DIR_CHANGE && !PIN_EXISTS(SPINDLE_DIR)
|
||||
#error "SPINDLE_DIR_PIN not defined."
|
||||
#elif ENABLED(SPINDLE_LASER_PWM) && PIN_EXISTS(SPINDLE_LASER_PWM)
|
||||
#if !PWM_PIN(SPINDLE_LASER_PWM_PIN)
|
||||
#error "SPINDLE_LASER_PWM_PIN not assigned to a PWM pin."
|
||||
#elif !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11)
|
||||
#error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector"
|
||||
#elif SPINDLE_LASER_POWERUP_DELAY < 1
|
||||
#error "SPINDLE_LASER_POWERUP_DELAY must be greater than 0."
|
||||
#elif SPINDLE_LASER_POWERDOWN_DELAY < 1
|
||||
#error "SPINDLE_LASER_POWERDOWN_DELAY must be greater than 0."
|
||||
#elif !defined(SPINDLE_LASER_PWM_INVERT)
|
||||
#error "SPINDLE_LASER_PWM_INVERT missing."
|
||||
#elif !defined(SPEED_POWER_SLOPE) || !defined(SPEED_POWER_INTERCEPT) || !defined(SPEED_POWER_MIN) || !defined(SPEED_POWER_MAX)
|
||||
#error "SPINDLE_LASER_PWM equation constant(s) missing."
|
||||
#elif PIN_EXISTS(CASE_LIGHT) && SPINDLE_LASER_PWM_PIN == CASE_LIGHT_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by CASE_LIGHT_PIN."
|
||||
#elif PIN_EXISTS(E0_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E0_AUTO_FAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by E0_AUTO_FAN_PIN."
|
||||
#elif PIN_EXISTS(E1_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E1_AUTO_FAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by E1_AUTO_FAN_PIN."
|
||||
#elif PIN_EXISTS(E2_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E2_AUTO_FAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by E2_AUTO_FAN_PIN."
|
||||
#elif PIN_EXISTS(E3_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E3_AUTO_FAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by E3_AUTO_FAN_PIN."
|
||||
#elif PIN_EXISTS(E4_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E4_AUTO_FAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by E4_AUTO_FAN_PIN."
|
||||
#elif PIN_EXISTS(FAN) && SPINDLE_LASER_PWM_PIN == FAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used FAN_PIN."
|
||||
#elif PIN_EXISTS(FAN1) && SPINDLE_LASER_PWM_PIN == FAN1_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used FAN1_PIN."
|
||||
#elif PIN_EXISTS(FAN2) && SPINDLE_LASER_PWM_PIN == FAN2_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used FAN2_PIN."
|
||||
#elif PIN_EXISTS(CONTROLLERFAN) && SPINDLE_LASER_PWM_PIN == CONTROLLERFAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by CONTROLLERFAN_PIN."
|
||||
#endif
|
||||
#endif
|
||||
#endif // SPINDLE_LASER_ENABLE
|
||||
//#if ENABLED(SPINDLE_LASER_PWM) && !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11)
|
||||
// #error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector"
|
||||
//#endif
|
||||
|
||||
#if ENABLED(EMERGENCY_PARSER)
|
||||
#error "EMERGENCY_PARSER is not yet implemented for STM32. Disable EMERGENCY_PARSER to continue."
|
||||
|
@ -21,52 +21,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* HAL for stm32duino.com based on Libmaple and compatible (STM32F1)
|
||||
* Test STM32F1-specific configuration values for errors at compile-time.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Test Re-ARM specific configuration values for errors at compile-time.
|
||||
*/
|
||||
#if ENABLED(SPINDLE_LASER_ENABLE)
|
||||
#if !PIN_EXISTS(SPINDLE_LASER_ENA)
|
||||
#error "SPINDLE_LASER_ENABLE requires SPINDLE_LASER_ENA_PIN."
|
||||
#elif SPINDLE_DIR_CHANGE && !PIN_EXISTS(SPINDLE_DIR)
|
||||
#error "SPINDLE_DIR_PIN not defined."
|
||||
#elif ENABLED(SPINDLE_LASER_PWM) && PIN_EXISTS(SPINDLE_LASER_PWM)
|
||||
#if !PWM_PIN(SPINDLE_LASER_PWM_PIN)
|
||||
#error "SPINDLE_LASER_PWM_PIN not assigned to a PWM pin."
|
||||
#elif SPINDLE_LASER_POWERUP_DELAY < 0
|
||||
#error "SPINDLE_LASER_POWERUP_DELAY must be positive"
|
||||
#elif SPINDLE_LASER_POWERDOWN_DELAY < 0
|
||||
#error "SPINDLE_LASER_POWERDOWN_DELAY must be positive"
|
||||
#elif !defined(SPINDLE_LASER_PWM_INVERT)
|
||||
#error "SPINDLE_LASER_PWM_INVERT missing."
|
||||
#elif !defined(SPEED_POWER_SLOPE) || !defined(SPEED_POWER_INTERCEPT) || !defined(SPEED_POWER_MIN) || !defined(SPEED_POWER_MAX)
|
||||
#error "SPINDLE_LASER_PWM equation constant(s) missing."
|
||||
#elif PIN_EXISTS(CASE_LIGHT) && SPINDLE_LASER_PWM_PIN == CASE_LIGHT_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by CASE_LIGHT_PIN."
|
||||
#elif PIN_EXISTS(E0_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E0_AUTO_FAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by E0_AUTO_FAN_PIN."
|
||||
#elif PIN_EXISTS(E1_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E1_AUTO_FAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by E1_AUTO_FAN_PIN."
|
||||
#elif PIN_EXISTS(E2_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E2_AUTO_FAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by E2_AUTO_FAN_PIN."
|
||||
#elif PIN_EXISTS(E3_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E3_AUTO_FAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by E3_AUTO_FAN_PIN."
|
||||
#elif PIN_EXISTS(E4_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E4_AUTO_FAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by E4_AUTO_FAN_PIN."
|
||||
#elif PIN_EXISTS(FAN) && SPINDLE_LASER_PWM_PIN == FAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used FAN_PIN."
|
||||
#elif PIN_EXISTS(FAN1) && SPINDLE_LASER_PWM_PIN == FAN1_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used FAN1_PIN."
|
||||
#elif PIN_EXISTS(FAN2) && SPINDLE_LASER_PWM_PIN == FAN2_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used FAN2_PIN."
|
||||
#elif PIN_EXISTS(CONTROLLERFAN) && SPINDLE_LASER_PWM_PIN == CONTROLLERFAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by CONTROLLERFAN_PIN."
|
||||
#endif
|
||||
#endif
|
||||
#endif // SPINDLE_LASER_ENABLE
|
||||
|
||||
#if ENABLED(EMERGENCY_PARSER)
|
||||
#error "EMERGENCY_PARSER is not yet implemented for STM32F1. Disable EMERGENCY_PARSER to continue."
|
||||
#endif
|
||||
|
@ -21,49 +21,11 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Test Re-ARM specific configuration values for errors at compile-time.
|
||||
* Test STM32F4-specific configuration values for errors at compile-time.
|
||||
*/
|
||||
#if ENABLED(SPINDLE_LASER_ENABLE)
|
||||
#if !PIN_EXISTS(SPINDLE_LASER_ENA)
|
||||
#error "SPINDLE_LASER_ENABLE requires SPINDLE_LASER_ENA_PIN."
|
||||
#elif SPINDLE_DIR_CHANGE && !PIN_EXISTS(SPINDLE_DIR)
|
||||
#error "SPINDLE_DIR_PIN not defined."
|
||||
#elif ENABLED(SPINDLE_LASER_PWM) && PIN_EXISTS(SPINDLE_LASER_PWM)
|
||||
#if !PWM_PIN(SPINDLE_LASER_PWM_PIN)
|
||||
#error "SPINDLE_LASER_PWM_PIN not assigned to a PWM pin."
|
||||
#elif !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11)
|
||||
#error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector"
|
||||
#elif SPINDLE_LASER_POWERUP_DELAY < 1
|
||||
#error "SPINDLE_LASER_POWERUP_DELAY must be greater than 0."
|
||||
#elif SPINDLE_LASER_POWERDOWN_DELAY < 1
|
||||
#error "SPINDLE_LASER_POWERDOWN_DELAY must be greater than 0."
|
||||
#elif !defined(SPINDLE_LASER_PWM_INVERT)
|
||||
#error "SPINDLE_LASER_PWM_INVERT missing."
|
||||
#elif !defined(SPEED_POWER_SLOPE) || !defined(SPEED_POWER_INTERCEPT) || !defined(SPEED_POWER_MIN) || !defined(SPEED_POWER_MAX)
|
||||
#error "SPINDLE_LASER_PWM equation constant(s) missing."
|
||||
#elif PIN_EXISTS(CASE_LIGHT) && SPINDLE_LASER_PWM_PIN == CASE_LIGHT_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by CASE_LIGHT_PIN."
|
||||
#elif PIN_EXISTS(E0_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E0_AUTO_FAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by E0_AUTO_FAN_PIN."
|
||||
#elif PIN_EXISTS(E1_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E1_AUTO_FAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by E1_AUTO_FAN_PIN."
|
||||
#elif PIN_EXISTS(E2_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E2_AUTO_FAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by E2_AUTO_FAN_PIN."
|
||||
#elif PIN_EXISTS(E3_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E3_AUTO_FAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by E3_AUTO_FAN_PIN."
|
||||
#elif PIN_EXISTS(E4_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E4_AUTO_FAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by E4_AUTO_FAN_PIN."
|
||||
#elif PIN_EXISTS(FAN) && SPINDLE_LASER_PWM_PIN == FAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used FAN_PIN."
|
||||
#elif PIN_EXISTS(FAN1) && SPINDLE_LASER_PWM_PIN == FAN1_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used FAN1_PIN."
|
||||
#elif PIN_EXISTS(FAN2) && SPINDLE_LASER_PWM_PIN == FAN2_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used FAN2_PIN."
|
||||
#elif PIN_EXISTS(CONTROLLERFAN) && SPINDLE_LASER_PWM_PIN == CONTROLLERFAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by CONTROLLERFAN_PIN."
|
||||
#endif
|
||||
#endif
|
||||
#endif // SPINDLE_LASER_ENABLE
|
||||
//#if ENABLED(SPINDLE_LASER_PWM) && !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11)
|
||||
// #error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector"
|
||||
//#endif
|
||||
|
||||
#if ENABLED(EMERGENCY_PARSER)
|
||||
#error "EMERGENCY_PARSER is not yet implemented for STM32F4. Disable EMERGENCY_PARSER to continue."
|
||||
|
@ -21,51 +21,11 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Test Re-ARM specific configuration values for errors at compile-time.
|
||||
* Test STM32F7-specific configuration values for errors at compile-time.
|
||||
*/
|
||||
#if ENABLED(SPINDLE_LASER_ENABLE)
|
||||
#if !PIN_EXISTS(SPINDLE_LASER_ENA)
|
||||
#error "SPINDLE_LASER_ENABLE requires SPINDLE_LASER_ENA_PIN."
|
||||
#elif SPINDLE_DIR_CHANGE && !PIN_EXISTS(SPINDLE_DIR)
|
||||
#error "SPINDLE_DIR_PIN not defined."
|
||||
#elif ENABLED(SPINDLE_LASER_PWM) && PIN_EXISTS(SPINDLE_LASER_PWM)
|
||||
#if !PWM_PIN(SPINDLE_LASER_PWM_PIN)
|
||||
#error "SPINDLE_LASER_PWM_PIN not assigned to a PWM pin."
|
||||
#elif !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11)
|
||||
#error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector"
|
||||
#elif SPINDLE_LASER_POWERUP_DELAY < 1
|
||||
#error "SPINDLE_LASER_POWERUP_DELAY must be greater than 0."
|
||||
#elif SPINDLE_LASER_POWERDOWN_DELAY < 1
|
||||
#error "SPINDLE_LASER_POWERDOWN_DELAY must be greater than 0."
|
||||
#elif !defined(SPINDLE_LASER_PWM_INVERT)
|
||||
#error "SPINDLE_LASER_PWM_INVERT missing."
|
||||
#elif !defined(SPEED_POWER_SLOPE) || !defined(SPEED_POWER_INTERCEPT) || !defined(SPEED_POWER_MIN) || !defined(SPEED_POWER_MAX)
|
||||
#error "SPINDLE_LASER_PWM equation constant(s) missing."
|
||||
#elif PIN_EXISTS(CASE_LIGHT) && SPINDLE_LASER_PWM_PIN == CASE_LIGHT_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by CASE_LIGHT_PIN."
|
||||
#elif PIN_EXISTS(E0_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E0_AUTO_FAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by E0_AUTO_FAN_PIN."
|
||||
#elif PIN_EXISTS(E1_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E1_AUTO_FAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by E1_AUTO_FAN_PIN."
|
||||
#elif PIN_EXISTS(E2_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E2_AUTO_FAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by E2_AUTO_FAN_PIN."
|
||||
#elif PIN_EXISTS(E3_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E3_AUTO_FAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by E3_AUTO_FAN_PIN."
|
||||
#elif PIN_EXISTS(E4_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E4_AUTO_FAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by E4_AUTO_FAN_PIN."
|
||||
#elif PIN_EXISTS(E5_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E5_AUTO_FAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by E5_AUTO_FAN_PIN."
|
||||
#elif PIN_EXISTS(FAN) && SPINDLE_LASER_PWM_PIN == FAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used FAN_PIN."
|
||||
#elif PIN_EXISTS(FAN1) && SPINDLE_LASER_PWM_PIN == FAN1_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used FAN1_PIN."
|
||||
#elif PIN_EXISTS(FAN2) && SPINDLE_LASER_PWM_PIN == FAN2_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used FAN2_PIN."
|
||||
#elif PIN_EXISTS(CONTROLLERFAN) && SPINDLE_LASER_PWM_PIN == CONTROLLERFAN_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by CONTROLLERFAN_PIN."
|
||||
#endif
|
||||
#endif
|
||||
#endif // SPINDLE_LASER_ENABLE
|
||||
//#if ENABLED(SPINDLE_LASER_PWM) && !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11)
|
||||
// #error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector"
|
||||
//#endif
|
||||
|
||||
#if ENABLED(EMERGENCY_PARSER)
|
||||
#error "EMERGENCY_PARSER is not yet implemented for STM32F7. Disable EMERGENCY_PARSER to continue."
|
||||
|
Reference in New Issue
Block a user