SPINDLE_LASER_ENABLE => SPINDLE_LASER_ENA
This commit is contained in:
		@@ -46,8 +46,8 @@
 | 
			
		||||
 * 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."
 | 
			
		||||
  #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)
 | 
			
		||||
 
 | 
			
		||||
@@ -25,8 +25,8 @@
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#if ENABLED(SPINDLE_LASER_ENABLE)
 | 
			
		||||
  #if !PIN_EXISTS(SPINDLE_LASER_ENABLE)
 | 
			
		||||
    #error "SPINDLE_LASER_ENABLE requires SPINDLE_LASER_ENABLE_PIN."
 | 
			
		||||
  #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)
 | 
			
		||||
 
 | 
			
		||||
@@ -25,8 +25,8 @@
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#if ENABLED(SPINDLE_LASER_ENABLE)
 | 
			
		||||
  #if !PIN_EXISTS(SPINDLE_LASER_ENABLE)
 | 
			
		||||
    #error "SPINDLE_LASER_ENABLE requires SPINDLE_LASER_ENABLE_PIN."
 | 
			
		||||
  #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)
 | 
			
		||||
 
 | 
			
		||||
@@ -25,8 +25,8 @@
 | 
			
		||||
 * Test Re-ARM specific configuration values for errors at compile-time.
 | 
			
		||||
 */
 | 
			
		||||
#if ENABLED(SPINDLE_LASER_ENABLE)
 | 
			
		||||
  #if !PIN_EXISTS(SPINDLE_LASER_ENABLE)
 | 
			
		||||
    #error "SPINDLE_LASER_ENABLE requires SPINDLE_LASER_ENABLE_PIN."
 | 
			
		||||
  #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)
 | 
			
		||||
 
 | 
			
		||||
@@ -28,8 +28,8 @@
 | 
			
		||||
 * Test Re-ARM specific configuration values for errors at compile-time.
 | 
			
		||||
 */
 | 
			
		||||
#if ENABLED(SPINDLE_LASER_ENABLE)
 | 
			
		||||
  #if !PIN_EXISTS(SPINDLE_LASER_ENABLE)
 | 
			
		||||
    #error "SPINDLE_LASER_ENABLE requires SPINDLE_LASER_ENABLE_PIN."
 | 
			
		||||
  #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)
 | 
			
		||||
 
 | 
			
		||||
@@ -24,8 +24,8 @@
 | 
			
		||||
 * Test Re-ARM specific configuration values for errors at compile-time.
 | 
			
		||||
 */
 | 
			
		||||
#if ENABLED(SPINDLE_LASER_ENABLE)
 | 
			
		||||
  #if !PIN_EXISTS(SPINDLE_LASER_ENABLE)
 | 
			
		||||
    #error "SPINDLE_LASER_ENABLE requires SPINDLE_LASER_ENABLE_PIN."
 | 
			
		||||
  #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)
 | 
			
		||||
 
 | 
			
		||||
@@ -24,8 +24,8 @@
 | 
			
		||||
 * Test Re-ARM specific configuration values for errors at compile-time.
 | 
			
		||||
 */
 | 
			
		||||
#if ENABLED(SPINDLE_LASER_ENABLE)
 | 
			
		||||
  #if !PIN_EXISTS(SPINDLE_LASER_ENABLE)
 | 
			
		||||
    #error "SPINDLE_LASER_ENABLE requires SPINDLE_LASER_ENABLE_PIN."
 | 
			
		||||
  #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)
 | 
			
		||||
 
 | 
			
		||||
@@ -975,7 +975,7 @@ void setup() {
 | 
			
		||||
  #endif
 | 
			
		||||
 | 
			
		||||
  #if ENABLED(SPINDLE_LASER_ENABLE)
 | 
			
		||||
    OUT_WRITE(SPINDLE_LASER_ENABLE_PIN, !SPINDLE_LASER_ENABLE_INVERT);  // init spindle to off
 | 
			
		||||
    OUT_WRITE(SPINDLE_LASER_ENA_PIN, !SPINDLE_LASER_ENABLE_INVERT);  // init spindle to off
 | 
			
		||||
    #if SPINDLE_DIR_CHANGE
 | 
			
		||||
      OUT_WRITE(SPINDLE_DIR_PIN, SPINDLE_INVERT_DIR ? 255 : 0);  // init rotation to clockwise (M3)
 | 
			
		||||
    #endif
 | 
			
		||||
 
 | 
			
		||||
@@ -53,7 +53,7 @@ uint8_t spindle_laser_power; // = 0
 | 
			
		||||
 * NOTE: A minimum PWM frequency of 50 Hz is needed. All prescaler
 | 
			
		||||
 *       factors for timers 2, 3, 4, and 5 are acceptable.
 | 
			
		||||
 *
 | 
			
		||||
 *  SPINDLE_LASER_ENABLE_PIN needs an external pullup or it may power on
 | 
			
		||||
 *  SPINDLE_LASER_ENA_PIN needs an external pullup or it may power on
 | 
			
		||||
 *  the spindle/laser during power-up or when connecting to the host
 | 
			
		||||
 *  (usually goes through a reset which sets all I/O pins to tri-state)
 | 
			
		||||
 *
 | 
			
		||||
@@ -73,7 +73,7 @@ inline void delay_for_power_down() { safe_delay(SPINDLE_LASER_POWERDOWN_DELAY);
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
inline void set_spindle_laser_ocr(const uint8_t ocr) {
 | 
			
		||||
  WRITE(SPINDLE_LASER_ENABLE_PIN, SPINDLE_LASER_ENABLE_INVERT); // turn spindle on (active low)
 | 
			
		||||
  WRITE(SPINDLE_LASER_ENA_PIN, SPINDLE_LASER_ENABLE_INVERT); // turn spindle on (active low)
 | 
			
		||||
  analogWrite(SPINDLE_LASER_PWM_PIN, (SPINDLE_LASER_PWM_INVERT) ? 255 - ocr : ocr);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -81,7 +81,7 @@ inline void set_spindle_laser_ocr(const uint8_t ocr) {
 | 
			
		||||
 | 
			
		||||
  void update_spindle_laser_power() {
 | 
			
		||||
    if (spindle_laser_power == 0) {
 | 
			
		||||
      WRITE(SPINDLE_LASER_ENABLE_PIN, !SPINDLE_LASER_ENABLE_INVERT);                      // turn spindle off (active low)
 | 
			
		||||
      WRITE(SPINDLE_LASER_ENA_PIN, !SPINDLE_LASER_ENABLE_INVERT);                      // turn spindle off (active low)
 | 
			
		||||
      analogWrite(SPINDLE_LASER_PWM_PIN, SPINDLE_LASER_PWM_INVERT ? 255 : 0);             // only write low byte
 | 
			
		||||
      delay_for_power_down();
 | 
			
		||||
    }
 | 
			
		||||
@@ -101,7 +101,7 @@ inline void set_spindle_laser_ocr(const uint8_t ocr) {
 | 
			
		||||
#endif // SPINDLE_LASER_PWM
 | 
			
		||||
 | 
			
		||||
bool spindle_laser_enabled() {
 | 
			
		||||
  return !!spindle_laser_power; // READ(SPINDLE_LASER_ENABLE_PIN) == SPINDLE_LASER_ENABLE_INVERT;
 | 
			
		||||
  return !!spindle_laser_power; // READ(SPINDLE_LASER_ENA_PIN) == SPINDLE_LASER_ENABLE_INVERT;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void set_spindle_laser_enabled(const bool enable) {
 | 
			
		||||
@@ -111,11 +111,11 @@ void set_spindle_laser_enabled(const bool enable) {
 | 
			
		||||
    update_spindle_laser_power();
 | 
			
		||||
  #else
 | 
			
		||||
    if (enable) {
 | 
			
		||||
      WRITE(SPINDLE_LASER_ENABLE_PIN, SPINDLE_LASER_ENABLE_INVERT);
 | 
			
		||||
      WRITE(SPINDLE_LASER_ENA_PIN, SPINDLE_LASER_ENABLE_INVERT);
 | 
			
		||||
      delay_for_power_up();
 | 
			
		||||
    }
 | 
			
		||||
    else {
 | 
			
		||||
      WRITE(SPINDLE_LASER_ENABLE_PIN, !SPINDLE_LASER_ENABLE_INVERT);
 | 
			
		||||
      WRITE(SPINDLE_LASER_ENA_PIN, !SPINDLE_LASER_ENABLE_INVERT);
 | 
			
		||||
      delay_for_power_down();
 | 
			
		||||
    }
 | 
			
		||||
  #endif
 | 
			
		||||
 
 | 
			
		||||
@@ -341,6 +341,8 @@
 | 
			
		||||
  #error "MAX6675_SS is now MAX6675_SS_PIN. Please update your configuration and/or pins."
 | 
			
		||||
#elif defined(MAX6675_SS2)
 | 
			
		||||
  #error "MAX6675_SS2 is now MAX6675_SS2_PIN. Please update your configuration and/or pins."
 | 
			
		||||
#elif defined(SPINDLE_LASER_ENABLE_PIN)
 | 
			
		||||
  #error "SPINDLE_LASER_ENABLE_PIN is now SPINDLE_LASER_ENA_PIN. Please update your configuration and/or pins."
 | 
			
		||||
#elif defined(TMC_Z_CALIBRATION)
 | 
			
		||||
  #error "TMC_Z_CALIBRATION has been deprecated in favor of Z_STEPPER_AUTO_ALIGN. Please update your configuration."
 | 
			
		||||
#elif defined(Z_MIN_PROBE_ENDSTOP)
 | 
			
		||||
 
 | 
			
		||||
@@ -788,8 +788,8 @@
 | 
			
		||||
#if PIN_EXISTS(SPINDLE_ENABLE)
 | 
			
		||||
  REPORT_NAME_DIGITAL(__LINE__, SPINDLE_ENABLE_PIN)
 | 
			
		||||
#endif
 | 
			
		||||
#if PIN_EXISTS(SPINDLE_LASER_ENABLE)
 | 
			
		||||
  REPORT_NAME_DIGITAL(__LINE__, SPINDLE_LASER_ENABLE_PIN)
 | 
			
		||||
#if PIN_EXISTS(SPINDLE_LASER_ENA)
 | 
			
		||||
  REPORT_NAME_DIGITAL(__LINE__, SPINDLE_LASER_ENA_PIN)
 | 
			
		||||
#endif
 | 
			
		||||
#if PIN_EXISTS(SPINDLE_LASER_PWM)
 | 
			
		||||
  REPORT_NAME_DIGITAL(__LINE__, SPINDLE_LASER_PWM_PIN)
 | 
			
		||||
 
 | 
			
		||||
@@ -124,7 +124,7 @@
 | 
			
		||||
 *
 | 
			
		||||
 *      stepper signal           socket name       socket name
 | 
			
		||||
 *                                          -------
 | 
			
		||||
 *       SPINDLE_LASER_ENABLE_PIN /ENABLE  O|     |O  VMOT
 | 
			
		||||
 *       SPINDLE_LASER_ENA_PIN    /ENABLE  O|     |O  VMOT
 | 
			
		||||
 *                                    MS1  O|     |O  GND
 | 
			
		||||
 *                                    MS2  O|     |O  2B
 | 
			
		||||
 *                                    MS3  O|     |O  2A
 | 
			
		||||
@@ -137,7 +137,7 @@
 | 
			
		||||
 *  Note: Socket names vary from vendor to vendor
 | 
			
		||||
 */
 | 
			
		||||
#undef SPINDLE_LASER_PWM_PIN    // Definitions in pins_RAMPS.h are not good with 3DRAG
 | 
			
		||||
#undef SPINDLE_LASER_ENABLE_PIN
 | 
			
		||||
#undef SPINDLE_LASER_ENA_PIN
 | 
			
		||||
#undef SPINDLE_DIR_PIN
 | 
			
		||||
 | 
			
		||||
#if ENABLED(SPINDLE_LASER_ENABLE)
 | 
			
		||||
@@ -152,10 +152,10 @@
 | 
			
		||||
    #define Z_ENABLE_PIN             24
 | 
			
		||||
    #define Z_STEP_PIN               26
 | 
			
		||||
    #define SPINDLE_LASER_PWM_PIN    46   // MUST BE HARDWARE PWM
 | 
			
		||||
    #define SPINDLE_LASER_ENABLE_PIN 62   // Pin should have a pullup!
 | 
			
		||||
    #define SPINDLE_LASER_ENA_PIN    62   // Pin should have a pullup!
 | 
			
		||||
    #define SPINDLE_DIR_PIN          48
 | 
			
		||||
  #elif !BOTH(ULTRA_LCD, NEWPANEL)     // use expansion header if no LCD in use
 | 
			
		||||
    #define SPINDLE_LASER_ENABLE_PIN 16   // Pin should have a pullup/pulldown!
 | 
			
		||||
    #define SPINDLE_LASER_ENA_PIN    16   // Pin should have a pullup/pulldown!
 | 
			
		||||
    #define SPINDLE_DIR_PIN          17
 | 
			
		||||
  #endif
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -83,7 +83,7 @@
 | 
			
		||||
// M3/M4/M5 - Spindle/Laser Control
 | 
			
		||||
//
 | 
			
		||||
#undef SPINDLE_LASER_PWM_PIN    // Definitions in pins_RAMPS.h are no good with the AzteegX3 board
 | 
			
		||||
#undef SPINDLE_LASER_ENABLE_PIN
 | 
			
		||||
#undef SPINDLE_LASER_ENA_PIN
 | 
			
		||||
#undef SPINDLE_DIR_PIN
 | 
			
		||||
 | 
			
		||||
#if ENABLED(SPINDLE_LASER_ENABLE)
 | 
			
		||||
@@ -94,6 +94,6 @@
 | 
			
		||||
    #define SERVO0_PIN     11
 | 
			
		||||
  #endif
 | 
			
		||||
  #define SPINDLE_LASER_PWM_PIN     7   // MUST BE HARDWARE PWM
 | 
			
		||||
  #define SPINDLE_LASER_ENABLE_PIN 20   // Pin should have a pullup!
 | 
			
		||||
  #define SPINDLE_LASER_ENA_PIN    20   // Pin should have a pullup!
 | 
			
		||||
  #define SPINDLE_DIR_PIN          21
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -162,7 +162,7 @@
 | 
			
		||||
// M3/M4/M5 - Spindle/Laser Control
 | 
			
		||||
//
 | 
			
		||||
#undef SPINDLE_LASER_PWM_PIN    // Definitions in pins_RAMPS.h are no good with the AzteegX3pro board
 | 
			
		||||
#undef SPINDLE_LASER_ENABLE_PIN
 | 
			
		||||
#undef SPINDLE_LASER_ENA_PIN
 | 
			
		||||
#undef SPINDLE_DIR_PIN
 | 
			
		||||
 | 
			
		||||
#if ENABLED(SPINDLE_LASER_ENABLE)   // EXP2 header
 | 
			
		||||
@@ -171,6 +171,6 @@
 | 
			
		||||
    #define BTN_EN2             31   // need 7 for the spindle speed PWM
 | 
			
		||||
  #endif
 | 
			
		||||
  #define SPINDLE_LASER_PWM_PIN     7   // must have a hardware PWM
 | 
			
		||||
  #define SPINDLE_LASER_ENABLE_PIN 20   // Pin should have a pullup!
 | 
			
		||||
  #define SPINDLE_LASER_ENA_PIN    20   // Pin should have a pullup!
 | 
			
		||||
  #define SPINDLE_DIR_PIN          21
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -33,7 +33,7 @@
 | 
			
		||||
//
 | 
			
		||||
// M3/M4/M5 - Spindle/Laser Control
 | 
			
		||||
//
 | 
			
		||||
#define SPINDLE_LASER_ENABLE_PIN 66   // Pin should have a pullup/pulldown!
 | 
			
		||||
#define SPINDLE_LASER_ENA_PIN    66   // Pin should have a pullup/pulldown!
 | 
			
		||||
#define SPINDLE_DIR_PIN          67
 | 
			
		||||
#define SPINDLE_LASER_PWM_PIN    44   // MUST BE HARDWARE PWM
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -49,7 +49,7 @@
 | 
			
		||||
//
 | 
			
		||||
// M3/M4/M5 - Spindle/Laser Control
 | 
			
		||||
//
 | 
			
		||||
#define SPINDLE_LASER_ENABLE_PIN 40   // Pin should have a pullup/pulldown!
 | 
			
		||||
#define SPINDLE_LASER_ENA_PIN    40   // Pin should have a pullup/pulldown!
 | 
			
		||||
#define SPINDLE_LASER_PWM_PIN    44   // MUST BE HARDWARE PWM
 | 
			
		||||
#define SPINDLE_DIR_PIN          42
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -118,7 +118,7 @@
 | 
			
		||||
//
 | 
			
		||||
#if ENABLED(SPINDLE_LASER_ENABLE)
 | 
			
		||||
  #undef HEATER_0_PIN
 | 
			
		||||
  #define SPINDLE_LASER_ENABLE_PIN  P2_07   // FET 1
 | 
			
		||||
  #define SPINDLE_LASER_ENA_PIN     P2_07   // FET 1
 | 
			
		||||
  #undef HEATER_BED_PIN
 | 
			
		||||
  #define SPINDLE_LASER_PWM_PIN     P2_05   // Bed FET
 | 
			
		||||
  #undef FAN_PIN
 | 
			
		||||
 
 | 
			
		||||
@@ -139,7 +139,7 @@
 | 
			
		||||
//
 | 
			
		||||
#if ENABLED(SPINDLE_LASER_ENABLE)
 | 
			
		||||
  #undef HEATER_0_PIN
 | 
			
		||||
  #define SPINDLE_LASER_ENABLE_PIN  P2_07   // FET 1
 | 
			
		||||
  #define SPINDLE_LASER_ENA_PIN     P2_07   // FET 1
 | 
			
		||||
  #undef HEATER_BED_PIN
 | 
			
		||||
  #define SPINDLE_LASER_PWM_PIN     P2_05   // Bed FET
 | 
			
		||||
  #undef FAN_PIN
 | 
			
		||||
 
 | 
			
		||||
@@ -135,7 +135,7 @@
 | 
			
		||||
//
 | 
			
		||||
// use P1 connector for spindle pins
 | 
			
		||||
#define SPINDLE_LASER_PWM_PIN     9   // MUST BE HARDWARE PWM
 | 
			
		||||
#define SPINDLE_LASER_ENABLE_PIN 18   // Pin should have a pullup!
 | 
			
		||||
#define SPINDLE_LASER_ENA_PIN    18   // Pin should have a pullup!
 | 
			
		||||
#define SPINDLE_DIR_PIN          19
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
 
 | 
			
		||||
@@ -149,7 +149,7 @@
 | 
			
		||||
//
 | 
			
		||||
// use P1 connector for spindle pins
 | 
			
		||||
#define SPINDLE_LASER_PWM_PIN     9   // MUST BE HARDWARE PWM
 | 
			
		||||
#define SPINDLE_LASER_ENABLE_PIN 18   // Pin should have a pullup!
 | 
			
		||||
#define SPINDLE_LASER_ENA_PIN    18   // Pin should have a pullup!
 | 
			
		||||
#define SPINDLE_DIR_PIN          19
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
 
 | 
			
		||||
@@ -59,5 +59,5 @@
 | 
			
		||||
// M3/M4/M5 - Spindle/Laser Control
 | 
			
		||||
//
 | 
			
		||||
#undef SPINDLE_LASER_PWM_PIN     // Definitions in pins_RAMPS.h are not valid with this board
 | 
			
		||||
#undef SPINDLE_LASER_ENABLE_PIN
 | 
			
		||||
#undef SPINDLE_LASER_ENA_PIN
 | 
			
		||||
#undef SPINDLE_DIR_PIN
 | 
			
		||||
 
 | 
			
		||||
@@ -40,13 +40,13 @@
 | 
			
		||||
//
 | 
			
		||||
// M3/M4/M5 - Spindle/Laser Control
 | 
			
		||||
//
 | 
			
		||||
#if ENABLED(SPINDLE_LASER_ENABLE) && !PIN_EXISTS(SPINDLE_LASER_ENABLE)
 | 
			
		||||
#if ENABLED(SPINDLE_LASER_ENABLE) && !PIN_EXISTS(SPINDLE_LASER_ENA)
 | 
			
		||||
  #if !NUM_SERVOS                       // Try to use servo connector first
 | 
			
		||||
    #define SPINDLE_LASER_ENABLE_PIN  6 // Pin should have a pullup/pulldown!
 | 
			
		||||
    #define SPINDLE_LASER_ENA_PIN     6 // Pin should have a pullup/pulldown!
 | 
			
		||||
    #define SPINDLE_LASER_PWM_PIN     4 // MUST BE HARDWARE PWM
 | 
			
		||||
    #define SPINDLE_DIR_PIN           5
 | 
			
		||||
  #elif !GREEDY_PANEL                   // Try to use AUX2
 | 
			
		||||
    #define SPINDLE_LASER_ENABLE_PIN 40 // Pin should have a pullup/pulldown!
 | 
			
		||||
    #define SPINDLE_LASER_ENA_PIN    40 // Pin should have a pullup/pulldown!
 | 
			
		||||
    #define SPINDLE_LASER_PWM_PIN    44 // MUST BE HARDWARE PWM
 | 
			
		||||
    #define SPINDLE_DIR_PIN          65
 | 
			
		||||
  #endif
 | 
			
		||||
@@ -62,6 +62,6 @@
 | 
			
		||||
 | 
			
		||||
#undef GREEDY_PANEL
 | 
			
		||||
 | 
			
		||||
#if ENABLED(CASE_LIGHT_ENABLE) && PIN_EXISTS(CASE_LIGHT) && (CASE_LIGHT_PIN == SPINDLE_LASER_ENABLE_PIN || CASE_LIGHT_PIN == SPINDLE_LASER_PWM_PIN)
 | 
			
		||||
#if ENABLED(CASE_LIGHT_ENABLE) && PIN_EXISTS(CASE_LIGHT) && (CASE_LIGHT_PIN == SPINDLE_LASER_ENA_PIN || CASE_LIGHT_PIN == SPINDLE_LASER_PWM_PIN)
 | 
			
		||||
  #error "CASE_LIGHT_PIN conflicts with a Spindle / Laser pin."
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -144,7 +144,7 @@
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#define SPINDLE_LASER_PWM_PIN     7   // MUST BE HARDWARE PWM
 | 
			
		||||
#define SPINDLE_LASER_ENABLE_PIN  4   // Pin should have a pullup!
 | 
			
		||||
#define SPINDLE_LASER_ENA_PIN     4   // Pin should have a pullup!
 | 
			
		||||
 | 
			
		||||
// Use the RAMPS 1.4 Analog input 5 on the AUX2 connector
 | 
			
		||||
#define FILWIDTH_PIN        5   // Analog Input
 | 
			
		||||
 
 | 
			
		||||
@@ -114,6 +114,6 @@
 | 
			
		||||
//
 | 
			
		||||
// M3/M4/M5 - Spindle/Laser Control
 | 
			
		||||
//
 | 
			
		||||
#define SPINDLE_LASER_ENABLE_PIN  5   // Pin should have a pullup/pulldown!
 | 
			
		||||
#define SPINDLE_LASER_ENA_PIN     5   // Pin should have a pullup/pulldown!
 | 
			
		||||
#define SPINDLE_LASER_PWM_PIN    16   // MUST BE HARDWARE PWM
 | 
			
		||||
#define SPINDLE_DIR_PIN           6
 | 
			
		||||
 
 | 
			
		||||
@@ -140,7 +140,7 @@
 | 
			
		||||
//
 | 
			
		||||
// M3/M4/M5 - Spindle/Laser Control
 | 
			
		||||
//
 | 
			
		||||
#define SPINDLE_LASER_ENABLE_PIN 10   // Pin should have a pullup/pulldown!
 | 
			
		||||
#define SPINDLE_LASER_ENA_PIN    10   // Pin should have a pullup/pulldown!
 | 
			
		||||
#define SPINDLE_DIR_PIN          11
 | 
			
		||||
#if GEN7_VERSION < 13
 | 
			
		||||
  #define SPINDLE_LASER_PWM_PIN  16   // MUST BE HARDWARE PWM
 | 
			
		||||
 
 | 
			
		||||
@@ -113,6 +113,6 @@
 | 
			
		||||
//
 | 
			
		||||
// M3/M4/M5 - Spindle/Laser Control
 | 
			
		||||
//
 | 
			
		||||
#define SPINDLE_LASER_ENABLE_PIN 20   // Pin should have a pullup/pulldown!
 | 
			
		||||
#define SPINDLE_LASER_ENA_PIN    20   // Pin should have a pullup/pulldown!
 | 
			
		||||
#define SPINDLE_LASER_PWM_PIN    16   // MUST BE HARDWARE PWM
 | 
			
		||||
#define SPINDLE_DIR_PIN          21
 | 
			
		||||
 
 | 
			
		||||
@@ -133,6 +133,6 @@
 | 
			
		||||
//
 | 
			
		||||
// M3/M4/M5 - Spindle/Laser Control
 | 
			
		||||
//
 | 
			
		||||
#define SPINDLE_LASER_ENABLE_PIN  5   // Pin should have a pullup/pulldown!
 | 
			
		||||
#define SPINDLE_LASER_ENA_PIN     5   // Pin should have a pullup/pulldown!
 | 
			
		||||
#define SPINDLE_LASER_PWM_PIN    16   // MUST BE HARDWARE PWM
 | 
			
		||||
#define SPINDLE_DIR_PIN           6
 | 
			
		||||
 
 | 
			
		||||
@@ -161,5 +161,5 @@
 | 
			
		||||
// M3/M4/M5 - Spindle/Laser Control
 | 
			
		||||
//
 | 
			
		||||
#define SPINDLE_LASER_PWM_PIN     6   // MUST BE HARDWARE PWM
 | 
			
		||||
#define SPINDLE_LASER_ENABLE_PIN  7   // Pin should have a pullup!
 | 
			
		||||
#define SPINDLE_LASER_ENA_PIN     7   // Pin should have a pullup!
 | 
			
		||||
#define SPINDLE_DIR_PIN           8
 | 
			
		||||
 
 | 
			
		||||
@@ -126,5 +126,5 @@
 | 
			
		||||
// M3/M4/M5 - Spindle/Laser Control
 | 
			
		||||
//
 | 
			
		||||
#define SPINDLE_LASER_PWM_PIN     3   // MUST BE HARDWARE PWM
 | 
			
		||||
#define SPINDLE_LASER_ENABLE_PIN  4   // Pin should have a pullup!
 | 
			
		||||
#define SPINDLE_LASER_ENA_PIN     4   // Pin should have a pullup!
 | 
			
		||||
#define SPINDLE_DIR_PIN          11
 | 
			
		||||
 
 | 
			
		||||
@@ -141,5 +141,5 @@
 | 
			
		||||
// M3/M4/M5 - Spindle/Laser Control
 | 
			
		||||
//
 | 
			
		||||
#define SPINDLE_LASER_PWM_PIN     3   // MUST BE HARDWARE PWM
 | 
			
		||||
#define SPINDLE_LASER_ENABLE_PIN 16   // Pin should have a pullup!
 | 
			
		||||
#define SPINDLE_LASER_ENA_PIN    16   // Pin should have a pullup!
 | 
			
		||||
#define SPINDLE_DIR_PIN          11
 | 
			
		||||
 
 | 
			
		||||
@@ -174,7 +174,7 @@
 | 
			
		||||
//
 | 
			
		||||
#if DISABLED(REPRAPWORLD_KEYPAD)        // try to use the keypad connector first
 | 
			
		||||
  #define SPINDLE_LASER_PWM_PIN    44   // MUST BE HARDWARE PWM
 | 
			
		||||
  #define SPINDLE_LASER_ENABLE_PIN 43   // Pin should have a pullup!
 | 
			
		||||
  #define SPINDLE_LASER_ENA_PIN    43   // Pin should have a pullup!
 | 
			
		||||
  #define SPINDLE_DIR_PIN          42
 | 
			
		||||
#elif EXTRUDERS <= 2
 | 
			
		||||
  // Hijack the last extruder so that we can get the PWM signal off the Y breakout
 | 
			
		||||
@@ -189,6 +189,6 @@
 | 
			
		||||
  #define Y_STEP_PIN               22
 | 
			
		||||
  #define Y_DIR_PIN                60
 | 
			
		||||
  #define SPINDLE_LASER_PWM_PIN     4   // MUST BE HARDWARE PWM
 | 
			
		||||
  #define SPINDLE_LASER_ENABLE_PIN 17   // Pin should have a pullup!
 | 
			
		||||
  #define SPINDLE_LASER_ENA_PIN    17   // Pin should have a pullup!
 | 
			
		||||
  #define SPINDLE_DIR_PIN           5
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -263,7 +263,7 @@
 | 
			
		||||
//
 | 
			
		||||
// M3/M4/M5 - Spindle/Laser Control
 | 
			
		||||
//
 | 
			
		||||
#define SPINDLE_LASER_ENABLE_PIN 66   // K4   Pin should have a pullup!
 | 
			
		||||
#define SPINDLE_LASER_ENA_PIN    66   // K4   Pin should have a pullup!
 | 
			
		||||
#define SPINDLE_LASER_PWM_PIN     8   // H5   MUST BE HARDWARE PWM
 | 
			
		||||
#define SPINDLE_DIR_PIN          67   // K5
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -125,7 +125,7 @@
 | 
			
		||||
//
 | 
			
		||||
// use P1 connector for spindle pins
 | 
			
		||||
#define SPINDLE_LASER_PWM_PIN     9   // MUST BE HARDWARE PWM
 | 
			
		||||
#define SPINDLE_LASER_ENABLE_PIN 18   // Pin should have a pullup!
 | 
			
		||||
#define SPINDLE_LASER_ENA_PIN    18   // Pin should have a pullup!
 | 
			
		||||
#define SPINDLE_DIR_PIN          19
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
 
 | 
			
		||||
@@ -138,7 +138,7 @@
 | 
			
		||||
  #define HEATER_BED_PIN      4   // won't compile
 | 
			
		||||
  #define TEMP_BED_PIN       50
 | 
			
		||||
  #define TEMP_0_PIN         51
 | 
			
		||||
  #define SPINDLE_LASER_ENABLE_PIN      52   // using A6 because it already has a pullup
 | 
			
		||||
  #define SPINDLE_LASER_ENA_PIN         52   // using A6 because it already has a pullup
 | 
			
		||||
  #define SPINDLE_LASER_PWM_PIN          3   // WARNING - LED & resistor pull up to +12/+24V stepper voltage
 | 
			
		||||
  #define SPINDLE_DIR_PIN               53
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -44,7 +44,7 @@
 | 
			
		||||
// M3/M4/M5 - Spindle/Laser Control
 | 
			
		||||
//
 | 
			
		||||
#define SPINDLE_LASER_PWM_PIN     2   // MUST BE HARDWARE PWM
 | 
			
		||||
#define SPINDLE_LASER_ENABLE_PIN 15   // Pin should have a pullup!
 | 
			
		||||
#define SPINDLE_LASER_ENA_PIN    15   // Pin should have a pullup!
 | 
			
		||||
#define SPINDLE_DIR_PIN          19
 | 
			
		||||
 | 
			
		||||
#include "pins_RAMPS.h"
 | 
			
		||||
 
 | 
			
		||||
@@ -47,7 +47,7 @@
 | 
			
		||||
// M3/M4/M5 - Spindle/Laser Control
 | 
			
		||||
//
 | 
			
		||||
#define SPINDLE_LASER_PWM_PIN     2   // X+ // PE4 ** Pin6  ** PWM2       **MUST BE HARDWARE PWM
 | 
			
		||||
#define SPINDLE_LASER_ENABLE_PIN 15   // Y+ // PJ0 ** Pin63 ** USART3_RX  **Pin should have a pullup!
 | 
			
		||||
#define SPINDLE_LASER_ENA_PIN    15   // Y+ // PJ0 ** Pin63 ** USART3_RX  **Pin should have a pullup!
 | 
			
		||||
#define SPINDLE_DIR_PIN          19   // Z+ // PD2 ** Pin45 ** USART1_RX
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
 
 | 
			
		||||
@@ -149,7 +149,7 @@
 | 
			
		||||
// M3/M4/M5 - Spindle/Laser Control
 | 
			
		||||
//
 | 
			
		||||
#define SPINDLE_LASER_PWM_PIN    45   // MUST BE HARDWARE PWM
 | 
			
		||||
#define SPINDLE_LASER_ENABLE_PIN 31   // Pin should have a pullup!
 | 
			
		||||
#define SPINDLE_LASER_ENA_PIN    31   // Pin should have a pullup!
 | 
			
		||||
#define SPINDLE_DIR_PIN          32
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
 
 | 
			
		||||
@@ -231,7 +231,7 @@
 | 
			
		||||
  #define PS_ON_PIN        12
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if ENABLED(CASE_LIGHT_ENABLE) && !defined(CASE_LIGHT_PIN) && !defined(SPINDLE_LASER_ENABLE_PIN)
 | 
			
		||||
#if ENABLED(CASE_LIGHT_ENABLE) && !defined(CASE_LIGHT_PIN) && !defined(SPINDLE_LASER_ENA_PIN)
 | 
			
		||||
  #if NUM_SERVOS <= 1 // try to use servo connector first
 | 
			
		||||
    #define CASE_LIGHT_PIN    6   // MUST BE HARDWARE PWM
 | 
			
		||||
  #elif !(BOTH(ULTRA_LCD, NEWPANEL) && ANY(PANEL_ONE, VIKI2, miniVIKI, MINIPANEL, REPRAPWORLD_KEYPAD))  // try to use AUX 2
 | 
			
		||||
@@ -242,13 +242,13 @@
 | 
			
		||||
//
 | 
			
		||||
// M3/M4/M5 - Spindle/Laser Control
 | 
			
		||||
//
 | 
			
		||||
#if ENABLED(SPINDLE_LASER_ENABLE) && !PIN_EXISTS(SPINDLE_LASER_ENABLE)
 | 
			
		||||
#if ENABLED(SPINDLE_LASER_ENABLE) && !PIN_EXISTS(SPINDLE_LASER_ENA)
 | 
			
		||||
  #if !defined(NUM_SERVOS) || NUM_SERVOS == 0 // try to use servo connector first
 | 
			
		||||
    #define SPINDLE_LASER_ENABLE_PIN  4   // Pin should have a pullup/pulldown!
 | 
			
		||||
    #define SPINDLE_LASER_ENA_PIN     4   // Pin should have a pullup/pulldown!
 | 
			
		||||
    #define SPINDLE_LASER_PWM_PIN     6   // MUST BE HARDWARE PWM
 | 
			
		||||
    #define SPINDLE_DIR_PIN           5
 | 
			
		||||
  #elif !(BOTH(ULTRA_LCD, NEWPANEL) && ANY(PANEL_ONE, VIKI2, miniVIKI, MINIPANEL, REPRAPWORLD_KEYPAD))  // try to use AUX 2
 | 
			
		||||
    #define SPINDLE_LASER_ENABLE_PIN 40   // Pin should have a pullup/pulldown!
 | 
			
		||||
    #define SPINDLE_LASER_ENA_PIN    40   // Pin should have a pullup/pulldown!
 | 
			
		||||
    #define SPINDLE_LASER_PWM_PIN    44   // MUST BE HARDWARE PWM
 | 
			
		||||
    #define SPINDLE_DIR_PIN          65
 | 
			
		||||
  #endif
 | 
			
		||||
 
 | 
			
		||||
@@ -198,9 +198,9 @@
 | 
			
		||||
//
 | 
			
		||||
// M3/M4/M5 - Spindle/Laser Control
 | 
			
		||||
//
 | 
			
		||||
#if ENABLED(SPINDLE_LASER_ENABLE) && !PIN_EXISTS(SPINDLE_LASER_ENABLE)
 | 
			
		||||
#if ENABLED(SPINDLE_LASER_ENABLE) && !PIN_EXISTS(SPINDLE_LASER_ENA)
 | 
			
		||||
  #if HOTENDS < 3
 | 
			
		||||
    #define SPINDLE_LASER_ENABLE_PIN  45   // Use E2 ENA
 | 
			
		||||
    #define SPINDLE_LASER_ENA_PIN     45   // Use E2 ENA
 | 
			
		||||
    #define SPINDLE_LASER_PWM_PIN     12   // MUST BE HARDWARE PWM
 | 
			
		||||
    #define SPINDLE_DIR_PIN           47   // Use E2 DIR
 | 
			
		||||
  #endif
 | 
			
		||||
 
 | 
			
		||||
@@ -217,7 +217,7 @@
 | 
			
		||||
  #define PS_ON_PIN        12
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if ENABLED(CASE_LIGHT_ENABLE) && !defined(CASE_LIGHT_PIN) && !defined(SPINDLE_LASER_ENABLE_PIN)
 | 
			
		||||
#if ENABLED(CASE_LIGHT_ENABLE) && !defined(CASE_LIGHT_PIN) && !defined(SPINDLE_LASER_ENA_PIN)
 | 
			
		||||
  #if NUM_SERVOS <= 1 // try to use servo connector first
 | 
			
		||||
    #define CASE_LIGHT_PIN    6   // MUST BE HARDWARE PWM
 | 
			
		||||
  #elif !(BOTH(ULTRA_LCD, NEWPANEL) && ANY(PANEL_ONE, VIKI2, miniVIKI, MINIPANEL, REPRAPWORLD_KEYPAD))  // try to use AUX 2
 | 
			
		||||
@@ -228,13 +228,13 @@
 | 
			
		||||
//
 | 
			
		||||
// M3/M4/M5 - Spindle/Laser Control
 | 
			
		||||
//
 | 
			
		||||
#if ENABLED(SPINDLE_LASER_ENABLE) && !PIN_EXISTS(SPINDLE_LASER_ENABLE)
 | 
			
		||||
#if ENABLED(SPINDLE_LASER_ENABLE) && !PIN_EXISTS(SPINDLE_LASER_ENA)
 | 
			
		||||
  #if !defined(NUM_SERVOS) || NUM_SERVOS == 0 // try to use servo connector first
 | 
			
		||||
    #define SPINDLE_LASER_ENABLE_PIN  4   // Pin should have a pullup/pulldown!
 | 
			
		||||
    #define SPINDLE_LASER_ENA_PIN     4   // Pin should have a pullup/pulldown!
 | 
			
		||||
    #define SPINDLE_LASER_PWM_PIN     6   // MUST BE HARDWARE PWM
 | 
			
		||||
    #define SPINDLE_DIR_PIN           5
 | 
			
		||||
  #elif !(BOTH(ULTRA_LCD, NEWPANEL) && ANY(PANEL_ONE, VIKI2, miniVIKI, MINIPANEL, REPRAPWORLD_KEYPAD))  // try to use AUX 2
 | 
			
		||||
    #define SPINDLE_LASER_ENABLE_PIN 40   // Pin should have a pullup/pulldown!
 | 
			
		||||
    #define SPINDLE_LASER_ENA_PIN    40   // Pin should have a pullup/pulldown!
 | 
			
		||||
    #define SPINDLE_LASER_PWM_PIN    44   // MUST BE HARDWARE PWM
 | 
			
		||||
    #define SPINDLE_DIR_PIN          65
 | 
			
		||||
  #endif
 | 
			
		||||
 
 | 
			
		||||
@@ -110,6 +110,6 @@
 | 
			
		||||
//
 | 
			
		||||
// M3/M4/M5 - Spindle/Laser Control
 | 
			
		||||
//
 | 
			
		||||
#define SPINDLE_LASER_ENABLE_PIN 41   // Pin should have a pullup/pulldown!
 | 
			
		||||
#define SPINDLE_LASER_ENA_PIN    41   // Pin should have a pullup/pulldown!
 | 
			
		||||
#define SPINDLE_LASER_PWM_PIN    45   // MUST BE HARDWARE PWM
 | 
			
		||||
#define SPINDLE_DIR_PIN          43
 | 
			
		||||
 
 | 
			
		||||
@@ -200,7 +200,7 @@
 | 
			
		||||
  #define MAX6675_SS_PIN   P1_28
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if ENABLED(CASE_LIGHT_ENABLE) && !PIN_EXISTS(CASE_LIGHT) && !defined(SPINDLE_LASER_ENABLE_PIN)
 | 
			
		||||
#if ENABLED(CASE_LIGHT_ENABLE) && !PIN_EXISTS(CASE_LIGHT) && !defined(SPINDLE_LASER_ENA_PIN)
 | 
			
		||||
  #if !defined(NUM_SERVOS) || NUM_SERVOS < 4   // Try to use servo connector
 | 
			
		||||
    #define CASE_LIGHT_PIN P1_18   // (4) MUST BE HARDWARE PWM
 | 
			
		||||
  #endif
 | 
			
		||||
@@ -210,11 +210,11 @@
 | 
			
		||||
// M3/M4/M5 - Spindle/Laser Control
 | 
			
		||||
//            Use servo pins, if available
 | 
			
		||||
//
 | 
			
		||||
#if ENABLED(SPINDLE_LASER_ENABLE) && !PIN_EXISTS(SPINDLE_LASER_ENABLE)
 | 
			
		||||
#if ENABLED(SPINDLE_LASER_ENABLE) && !PIN_EXISTS(SPINDLE_LASER_ENA)
 | 
			
		||||
  #if NUM_SERVOS > 1
 | 
			
		||||
    #error "SPINDLE_LASER_ENABLE requires 3 free servo pins."
 | 
			
		||||
  #endif
 | 
			
		||||
  #define SPINDLE_LASER_ENABLE_PIN SERVO1_PIN   // (6) Pin should have a pullup/pulldown!
 | 
			
		||||
  #define SPINDLE_LASER_ENA_PIN    SERVO1_PIN   // (6) Pin should have a pullup/pulldown!
 | 
			
		||||
  #define SPINDLE_LASER_PWM_PIN    SERVO3_PIN   // (4) MUST BE HARDWARE PWM
 | 
			
		||||
  #define SPINDLE_DIR_PIN          SERVO2_PIN   // (5)
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -157,8 +157,8 @@
 | 
			
		||||
#ifndef SPINDLE_LASER_PWM_PIN
 | 
			
		||||
  #define SPINDLE_LASER_PWM_PIN 4   // MUST BE HARDWARE PWM. Pin 4 interrupts OC0* and OC1* always in use?
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef SPINDLE_LASER_ENABLE_PIN
 | 
			
		||||
  #define SPINDLE_LASER_ENABLE_PIN 14   // Pin should have a pullup!
 | 
			
		||||
#ifndef SPINDLE_LASER_ENA_PIN
 | 
			
		||||
  #define SPINDLE_LASER_ENA_PIN    14   // Pin should have a pullup!
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef SPINDLE_DIR_PIN
 | 
			
		||||
  #define SPINDLE_DIR_PIN  15
 | 
			
		||||
 
 | 
			
		||||
@@ -279,7 +279,7 @@
 | 
			
		||||
#if ENABLED(SPINDLE_LASER_ENABLE)
 | 
			
		||||
  #if !MB(AZTEEG_X1) && ENABLED(SANGUINOLOLU_V_1_2) && !BOTH(ULTRA_LCD, NEWPANEL)  // try to use IO Header
 | 
			
		||||
 | 
			
		||||
    #define SPINDLE_LASER_ENABLE_PIN 10   // Pin should have a pullup/pulldown!
 | 
			
		||||
    #define SPINDLE_LASER_ENA_PIN    10   // Pin should have a pullup/pulldown!
 | 
			
		||||
    #define SPINDLE_LASER_PWM_PIN     4   // MUST BE HARDWARE PWM
 | 
			
		||||
    #define SPINDLE_DIR_PIN          11
 | 
			
		||||
 | 
			
		||||
@@ -307,7 +307,7 @@
 | 
			
		||||
     *                                /RESET  O|     |O  1A
 | 
			
		||||
     *                                /SLEEP  O|     |O  1B
 | 
			
		||||
     *  SPINDLE_LASER_PWM_PIN           STEP  O|     |O  VDD
 | 
			
		||||
     *  SPINDLE_LASER_ENABLE_PIN         DIR  O|     |O  GND
 | 
			
		||||
     *  SPINDLE_LASER_ENA_PIN         DIR  O|     |O  GND
 | 
			
		||||
     *                                         -------
 | 
			
		||||
     *
 | 
			
		||||
     *  Note: Socket names vary from vendor to vendor.
 | 
			
		||||
@@ -319,7 +319,7 @@
 | 
			
		||||
    #define X_ENABLE_PIN             14
 | 
			
		||||
    #define X_STEP_PIN                1
 | 
			
		||||
    #define SPINDLE_LASER_PWM_PIN    15   // MUST BE HARDWARE PWM
 | 
			
		||||
    #define SPINDLE_LASER_ENABLE_PIN 21   // Pin should have a pullup!
 | 
			
		||||
    #define SPINDLE_LASER_ENA_PIN    21   // Pin should have a pullup!
 | 
			
		||||
    #define SPINDLE_DIR_PIN          -1   // No pin available on the socket for the direction pin
 | 
			
		||||
  #endif
 | 
			
		||||
#endif // SPINDLE_LASER_ENABLE
 | 
			
		||||
 
 | 
			
		||||
@@ -176,7 +176,7 @@
 | 
			
		||||
  // M3/M4/M5 - Spindle/Laser Control
 | 
			
		||||
  //
 | 
			
		||||
  #define SPINDLE_LASER_PWM_PIN    24   // B4  PWM2A
 | 
			
		||||
  #define SPINDLE_LASER_ENABLE_PIN 39   // F1  Pin should have a pullup!
 | 
			
		||||
  #define SPINDLE_LASER_ENA_PIN    39   // F1  Pin should have a pullup!
 | 
			
		||||
  #define SPINDLE_DIR_PIN          40   // F2
 | 
			
		||||
 | 
			
		||||
  #define CASE_LIGHT_PIN            0   // D0  PWM0B
 | 
			
		||||
 
 | 
			
		||||
@@ -108,7 +108,7 @@
 | 
			
		||||
// Laser control
 | 
			
		||||
#if ENABLED(SPINDLE_LASER_ENABLE)
 | 
			
		||||
  #define SPINDLE_LASER_PWM_PIN     PB8
 | 
			
		||||
  #define SPINDLE_LASER_ENABLE_PIN  PD5
 | 
			
		||||
  #define SPINDLE_LASER_ENA_PIN     PD5
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
 
 | 
			
		||||
@@ -179,6 +179,6 @@
 | 
			
		||||
//
 | 
			
		||||
// M3/M4/M5 - Spindle/Laser Control
 | 
			
		||||
//
 | 
			
		||||
#define SPINDLE_LASER_ENABLE_PIN  5   // D5  Pin should have a pullup!
 | 
			
		||||
#define SPINDLE_LASER_ENA_PIN     5   // D5  Pin should have a pullup!
 | 
			
		||||
#define SPINDLE_LASER_PWM_PIN     0   // D0 PWM0B   MUST BE HARDWARE PWM
 | 
			
		||||
#define SPINDLE_DIR_PIN           7   // D7
 | 
			
		||||
 
 | 
			
		||||
@@ -159,5 +159,5 @@
 | 
			
		||||
// M3/M4/M5 - Spindle/Laser Control
 | 
			
		||||
//
 | 
			
		||||
#define SPINDLE_LASER_PWM_PIN    24   // B4 IO-3 PWM2A - MUST BE HARDWARE PWM
 | 
			
		||||
#define SPINDLE_LASER_ENABLE_PIN 39   // F1 IO-11 - Pin should have a pullup!
 | 
			
		||||
#define SPINDLE_LASER_ENA_PIN    39   // F1 IO-11 - Pin should have a pullup!
 | 
			
		||||
#define SPINDLE_DIR_PIN          40   // F2 IO-9
 | 
			
		||||
 
 | 
			
		||||
@@ -131,7 +131,7 @@
 | 
			
		||||
#if ENABLED(SPINDLE_LASER_ENABLE)   // use the LED_PIN for spindle speed control or case light
 | 
			
		||||
  #undef LED_PIN
 | 
			
		||||
  #define SPINDLE_DIR_PIN          16
 | 
			
		||||
  #define SPINDLE_LASER_ENABLE_PIN 17   // Pin should have a pullup!
 | 
			
		||||
  #define SPINDLE_LASER_ENA_PIN    17   // Pin should have a pullup!
 | 
			
		||||
  #define SPINDLE_LASER_PWM_PIN     8   // MUST BE HARDWARE PWM
 | 
			
		||||
#else
 | 
			
		||||
  #undef LED_PIN
 | 
			
		||||
 
 | 
			
		||||
@@ -160,5 +160,5 @@
 | 
			
		||||
// M3/M4/M5 - Spindle/Laser Control
 | 
			
		||||
//
 | 
			
		||||
#define SPINDLE_LASER_PWM_PIN     9   // MUST BE HARDWARE PWM
 | 
			
		||||
#define SPINDLE_LASER_ENABLE_PIN 10   // Pin should have a pullup!
 | 
			
		||||
#define SPINDLE_LASER_ENA_PIN    10   // Pin should have a pullup!
 | 
			
		||||
#define SPINDLE_DIR_PIN          11   // use the EXP3 PWM header
 | 
			
		||||
 
 | 
			
		||||
@@ -221,13 +221,13 @@
 | 
			
		||||
 | 
			
		||||
    #define SPINDLE_DIR_PIN          10   // SW4
 | 
			
		||||
    #define SPINDLE_LASER_PWM_PIN     9   // SW5  MUST BE HARDWARE PWM
 | 
			
		||||
    #define SPINDLE_LASER_ENABLE_PIN  8   // SW6  Pin should have a pullup!
 | 
			
		||||
    #define SPINDLE_LASER_ENA_PIN     8   // SW6  Pin should have a pullup!
 | 
			
		||||
 | 
			
		||||
  #elif ENABLED(board_rev_1_5)      // use the same pins - but now they are on a different connector
 | 
			
		||||
 | 
			
		||||
    #define SPINDLE_DIR_PIN          10   // EXP3-6 (silkscreen says 10)
 | 
			
		||||
    #define SPINDLE_LASER_PWM_PIN     9   // EXP3-7 (silkscreen says 9) MUST BE HARDWARE PWM
 | 
			
		||||
    #define SPINDLE_LASER_ENABLE_PIN  8   // EXP3-8 (silkscreen says 8) Pin should have a pullup!
 | 
			
		||||
    #define SPINDLE_LASER_ENA_PIN     8   // EXP3-8 (silkscreen says 8) Pin should have a pullup!
 | 
			
		||||
 | 
			
		||||
  #elif ENABLED(board_rev_1_1_TO_1_3)
 | 
			
		||||
 | 
			
		||||
@@ -251,12 +251,12 @@
 | 
			
		||||
      #define E0_ENABLE_PIN            48
 | 
			
		||||
      #define SPINDLE_DIR_PIN          43
 | 
			
		||||
      #define SPINDLE_LASER_PWM_PIN    45   // MUST BE HARDWARE PWM
 | 
			
		||||
      #define SPINDLE_LASER_ENABLE_PIN 41   // Pin should have a pullup!
 | 
			
		||||
      #define SPINDLE_LASER_ENA_PIN    41   // Pin should have a pullup!
 | 
			
		||||
    #elif TEMP_SENSOR_BED == 0  // Can't use E0 so see if HEATER_BED_PIN is available
 | 
			
		||||
      #undef HEATER_BED_PIN
 | 
			
		||||
      #define SPINDLE_DIR_PIN          38   // Probably pin 4 on 10 pin connector closest to the E0 socket
 | 
			
		||||
      #define SPINDLE_LASER_PWM_PIN     4   // MUST BE HARDWARE PWM - Special precautions usually needed.
 | 
			
		||||
      #define SPINDLE_LASER_ENABLE_PIN 40   // Pin should have a pullup! (Probably pin 6 on the 10-pin
 | 
			
		||||
      #define SPINDLE_LASER_ENA_PIN    40   // Pin should have a pullup! (Probably pin 6 on the 10-pin
 | 
			
		||||
                                            // connector closest to the E0 socket)
 | 
			
		||||
    #endif
 | 
			
		||||
  #endif
 | 
			
		||||
@@ -267,7 +267,7 @@
 | 
			
		||||
 *
 | 
			
		||||
 *         spindle signal     socket name       socket name
 | 
			
		||||
 *                                       -------
 | 
			
		||||
 * SPINDLE_LASER_ENABLE_PIN    /ENABLE  *|     |O  VMOT
 | 
			
		||||
 * SPINDLE_LASER_ENA_PIN    /ENABLE  *|     |O  VMOT
 | 
			
		||||
 *                                 MS1  O|     |O  GND
 | 
			
		||||
 *                                 MS2  O|     |O  2B
 | 
			
		||||
 *                                 MS3  O|     |O  2A
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user