HAL compatible pinsDebug & misc
Re-ARM has been tested. AVR has not been tested. 1) moved all cpu specific items to files in the low level HAL directory for that CPU (pinDebug_Re-ARM.h & pinsDebug_AVR_8_bit.h 2) added pinsDebug.h to the top level directory 3) modified HAL_pinsDebug.h to select the correct support file for the selected CPU 4) Patched sanitycheck to stop throwing false errors. A long term solution will be done 5) misc changes & bug fixes arduino.cpp - included macros.h to fix a missing definition pinmap_re-arm.h - removed a duplicated line. pinmapping.h - changed from "ENABLED" to "defined" to fix a compile error ====================================================================== split SanityCheck up, improve pinsDebug system ====================================================================== switch to latest pins_RAMPS_RE_ARM.h
This commit is contained in:
committed by
Scott Lahteine
parent
32e759c928
commit
84a11cfedc
@@ -1283,16 +1283,6 @@ static_assert(1 >= 0
|
||||
#error "HAVE_L6470DRIVER requires at least one L6470 stepper to be set."
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Digipot requirement
|
||||
*/
|
||||
#if ENABLED(DIGIPOT_MCP4018)
|
||||
#if !defined(DIGIPOTS_I2C_SDA_X) || !defined(DIGIPOTS_I2C_SDA_Y) || !defined(DIGIPOTS_I2C_SDA_Z) \
|
||||
|| !defined(DIGIPOTS_I2C_SDA_E0) || !defined(DIGIPOTS_I2C_SDA_E1)
|
||||
#error "DIGIPOT_MCP4018 requires DIGIPOTS_I2C_SDA_* pins to be defined."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Require 4 or more elements in per-axis initializers
|
||||
*/
|
||||
@@ -1306,63 +1296,5 @@ static_assert(COUNT(sanity_arr_1) <= XYZE_N, "DEFAULT_AXIS_STEPS_PER_UNIT has to
|
||||
static_assert(COUNT(sanity_arr_2) <= XYZE_N, "DEFAULT_MAX_FEEDRATE has too many elements.");
|
||||
static_assert(COUNT(sanity_arr_3) <= XYZE_N, "DEFAULT_MAX_ACCELERATION has too many elements.");
|
||||
|
||||
/**
|
||||
* Sanity checks for Spindle / Laser
|
||||
*/
|
||||
#if ENABLED(SPINDLE_LASER_ENABLE)
|
||||
#if !PIN_EXISTS(SPINDLE_LASER_ENABLE)
|
||||
#error "SPINDLE_LASER_ENABLE requires SPINDLE_LASER_ENABLE_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(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."
|
||||
#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."
|
||||
#elif PIN_EXISTS(CASE_LIGHT) && SPINDLE_LASER_PWM_PIN == CASE_LIGHT_PIN
|
||||
#error "SPINDLE_LASER_PWM_PIN is used by CASE_LIGHT."
|
||||
#endif
|
||||
#endif
|
||||
#endif // SPINDLE_LASER_ENABLE
|
||||
|
||||
#include "src/HAL/HAL_SanityCheck.h" // get CPU specific checks
|
||||
|
||||
Reference in New Issue
Block a user