📌 'STOP' auto-assign, some Chitu V9 pins (#22889)

Co-authored-by: Scott Lahteine <github@thinkyhead.com>
This commit is contained in:
ellensp 2021-11-04 14:04:06 +13:00 committed by Scott Lahteine
parent a0a57406a2
commit f97635de36
5 changed files with 143 additions and 8 deletions

View File

@ -33,6 +33,12 @@
#define _AXIS(A) (A##_AXIS)
#define _XSTOP_ 0x01
#define _YSTOP_ 0x02
#define _ZSTOP_ 0x03
#define _ISTOP_ 0x04
#define _JSTOP_ 0x05
#define _KSTOP_ 0x06
#define _XMIN_ 0x11
#define _YMIN_ 0x12
#define _ZMIN_ 0x13

View File

@ -767,19 +767,25 @@
#define X2_MAX_ENDSTOP_INVERTING false
#endif
#endif
#ifndef X2_MAX_PIN
#if !defined(X2_MAX_PIN) && !defined(X2_STOP_PIN)
#if X2_USE_ENDSTOP == _XMIN_
#define X2_MAX_PIN X_MIN_PIN
#elif X2_USE_ENDSTOP == _XMAX_
#define X2_MAX_PIN X_MAX_PIN
#elif X2_USE_ENDSTOP == _XSTOP_
#define X2_MAX_PIN X_STOP_PIN
#elif X2_USE_ENDSTOP == _YMIN_
#define X2_MAX_PIN Y_MIN_PIN
#elif X2_USE_ENDSTOP == _YMAX_
#define X2_MAX_PIN Y_MAX_PIN
#elif X2_USE_ENDSTOP == _YSTOP_
#define X2_MAX_PIN Y_STOP_PIN
#elif X2_USE_ENDSTOP == _ZMIN_
#define X2_MAX_PIN Z_MIN_PIN
#elif X2_USE_ENDSTOP == _ZMAX_
#define X2_MAX_PIN Z_MAX_PIN
#elif X2_USE_ENDSTOP == _ZSTOP_
#define X2_MAX_PIN Z_STOP_PIN
#elif X2_USE_ENDSTOP == _XDIAG_
#define X2_MAX_PIN X_DIAG_PIN
#elif X2_USE_ENDSTOP == _YDIAG_
@ -825,19 +831,25 @@
#define X2_MIN_ENDSTOP_INVERTING false
#endif
#endif
#ifndef X2_MIN_PIN
#if !defined(X2_MIN_PIN) && !defined(X2_STOP_PIN)
#if X2_USE_ENDSTOP == _XMIN_
#define X2_MIN_PIN X_MIN_PIN
#elif X2_USE_ENDSTOP == _XMAX_
#define X2_MIN_PIN X_MAX_PIN
#elif X2_USE_ENDSTOP == _XSTOP_
#define X2_MIN_PIN X_STOP_PIN
#elif X2_USE_ENDSTOP == _YMIN_
#define X2_MIN_PIN Y_MIN_PIN
#elif X2_USE_ENDSTOP == _YMAX_
#define X2_MIN_PIN Y_MAX_PIN
#elif X2_USE_ENDSTOP == _YSTOP_
#define X2_MIN_PIN Y_STOP_PIN
#elif X2_USE_ENDSTOP == _ZMIN_
#define X2_MIN_PIN Z_MIN_PIN
#elif X2_USE_ENDSTOP == _ZMAX_
#define X2_MIN_PIN Z_MAX_PIN
#elif X2_USE_ENDSTOP == _ZSTOP_
#define X2_MIN_PIN Z_STOP_PIN
#elif X2_USE_ENDSTOP == _XDIAG_
#define X2_MIN_PIN X_DIAG_PIN
#elif X2_USE_ENDSTOP == _YDIAG_
@ -890,19 +902,25 @@
#define Y2_MAX_ENDSTOP_INVERTING false
#endif
#endif
#ifndef Y2_MAX_PIN
#if !defined(Y2_MAX_PIN) && !defined(Y2_STOP_PIN)
#if Y2_USE_ENDSTOP == _XMIN_
#define Y2_MAX_PIN X_MIN_PIN
#elif Y2_USE_ENDSTOP == _XMAX_
#define Y2_MAX_PIN X_MAX_PIN
#elif Y2_USE_ENDSTOP == _XSTOP_
#define Y2_MAX_PIN X_STOP_PIN
#elif Y2_USE_ENDSTOP == _YMIN_
#define Y2_MAX_PIN Y_MIN_PIN
#elif Y2_USE_ENDSTOP == _YMAX_
#define Y2_MAX_PIN Y_MAX_PIN
#elif Y2_USE_ENDSTOP == _YSTOP_
#define Y2_MAX_PIN Y_STOP_PIN
#elif Y2_USE_ENDSTOP == _ZMIN_
#define Y2_MAX_PIN Z_MIN_PIN
#elif Y2_USE_ENDSTOP == _ZMAX_
#define Y2_MAX_PIN Z_MAX_PIN
#elif Y2_USE_ENDSTOP == _ZSTOP_
#define Y2_MAX_PIN Z_STOP_PIN
#elif Y2_USE_ENDSTOP == _XDIAG_
#define Y2_MAX_PIN X_DIAG_PIN
#elif Y2_USE_ENDSTOP == _YDIAG_
@ -948,19 +966,25 @@
#define Y2_MIN_ENDSTOP_INVERTING false
#endif
#endif
#ifndef Y2_MIN_PIN
#if !defined(Y2_MIN_PIN) && !defined(Y2_STOP_PIN)
#if Y2_USE_ENDSTOP == _XMIN_
#define Y2_MIN_PIN X_MIN_PIN
#elif Y2_USE_ENDSTOP == _XMAX_
#define Y2_MIN_PIN X_MAX_PIN
#elif Y2_USE_ENDSTOP == _XSTOP_
#define Y2_MIN_PIN X_STOP_PIN
#elif Y2_USE_ENDSTOP == _YMIN_
#define Y2_MIN_PIN Y_MIN_PIN
#elif Y2_USE_ENDSTOP == _YMAX_
#define Y2_MIN_PIN Y_MAX_PIN
#elif Y2_USE_ENDSTOP == _YSTOP_
#define Y2_MIN_PIN Y_STOP_PIN
#elif Y2_USE_ENDSTOP == _ZMIN_
#define Y2_MIN_PIN Z_MIN_PIN
#elif Y2_USE_ENDSTOP == _ZMAX_
#define Y2_MIN_PIN Z_MAX_PIN
#elif Y2_USE_ENDSTOP == _ZSTOP_
#define Y2_MIN_PIN Z_STOP_PIN
#elif Y2_USE_ENDSTOP == _XDIAG_
#define Y2_MIN_PIN X_DIAG_PIN
#elif Y2_USE_ENDSTOP == _YDIAG_
@ -1014,19 +1038,25 @@
#define Z2_MAX_ENDSTOP_INVERTING false
#endif
#endif
#ifndef Z2_MAX_PIN
#if !defined(Z2_MAX_PIN) && !defined(Z2_STOP_PIN)
#if Z2_USE_ENDSTOP == _XMIN_
#define Z2_MAX_PIN X_MIN_PIN
#elif Z2_USE_ENDSTOP == _XMAX_
#define Z2_MAX_PIN X_MAX_PIN
#elif Z2_USE_ENDSTOP == _XSTOP_
#define Z2_MAX_PIN X_STOP_PIN
#elif Z2_USE_ENDSTOP == _YMIN_
#define Z2_MAX_PIN Y_MIN_PIN
#elif Z2_USE_ENDSTOP == _YMAX_
#define Z2_MAX_PIN Y_MAX_PIN
#elif Z2_USE_ENDSTOP == _YSTOP_
#define Z2_MAX_PIN Y_STOP_PIN
#elif Z2_USE_ENDSTOP == _ZMIN_
#define Z2_MAX_PIN Z_MIN_PIN
#elif Z2_USE_ENDSTOP == _ZMAX_
#define Z2_MAX_PIN Z_MAX_PIN
#elif Z2_USE_ENDSTOP == _ZSTOP_
#define Z2_MAX_PIN Z_STOP_PIN
#elif Z2_USE_ENDSTOP == _XDIAG_
#define Z2_MAX_PIN X_DIAG_PIN
#elif Z2_USE_ENDSTOP == _YDIAG_
@ -1077,14 +1107,20 @@
#define Z2_MIN_PIN X_MIN_PIN
#elif Z2_USE_ENDSTOP == _XMAX_
#define Z2_MIN_PIN X_MAX_PIN
#elif Z2_USE_ENDSTOP == _XSTOP_
#define Z2_MIN_PIN X_STOP_PIN
#elif Z2_USE_ENDSTOP == _YMIN_
#define Z2_MIN_PIN Y_MIN_PIN
#elif Z2_USE_ENDSTOP == _YMAX_
#define Z2_MIN_PIN Y_MAX_PIN
#elif Z2_USE_ENDSTOP == _YSTOP_
#define Z2_MIN_PIN Y_STOP_PIN
#elif Z2_USE_ENDSTOP == _ZMIN_
#define Z2_MIN_PIN Z_MIN_PIN
#elif Z2_USE_ENDSTOP == _ZMAX_
#define Z2_MIN_PIN Z_MAX_PIN
#elif Z2_USE_ENDSTOP == _ZSTOP_
#define Z2_MIN_PIN Z_STOP_PIN
#elif Z2_USE_ENDSTOP == _XDIAG_
#define Z2_MIN_PIN X_DIAG_PIN
#elif Z2_USE_ENDSTOP == _YDIAG_
@ -1138,14 +1174,20 @@
#define Z3_MAX_PIN X_MIN_PIN
#elif Z3_USE_ENDSTOP == _XMAX_
#define Z3_MAX_PIN X_MAX_PIN
#elif Z3_USE_ENDSTOP == _XSTOP_
#define Z3_MAX_PIN X_STOP_PIN
#elif Z3_USE_ENDSTOP == _YMIN_
#define Z3_MAX_PIN Y_MIN_PIN
#elif Z3_USE_ENDSTOP == _YMAX_
#define Z3_MAX_PIN Y_MAX_PIN
#elif Z3_USE_ENDSTOP == _YSTOP_
#define Z3_MAX_PIN Y_STOP_PIN
#elif Z3_USE_ENDSTOP == _ZMIN_
#define Z3_MAX_PIN Z_MIN_PIN
#elif Z3_USE_ENDSTOP == _ZMAX_
#define Z3_MAX_PIN Z_MAX_PIN
#elif Z3_USE_ENDSTOP == _ZSTOP_
#define Z3_MAX_PIN Z_STOP_PIN
#elif Z3_USE_ENDSTOP == _XDIAG_
#define Z3_MAX_PIN X_DIAG_PIN
#elif Z3_USE_ENDSTOP == _YDIAG_
@ -1196,14 +1238,20 @@
#define Z3_MIN_PIN X_MIN_PIN
#elif Z3_USE_ENDSTOP == _XMAX_
#define Z3_MIN_PIN X_MAX_PIN
#elif Z3_USE_ENDSTOP == _XSTOP_
#define Z3_MIN_PIN X_STOP_PIN
#elif Z3_USE_ENDSTOP == _YMIN_
#define Z3_MIN_PIN Y_MIN_PIN
#elif Z3_USE_ENDSTOP == _YMAX_
#define Z3_MIN_PIN Y_MAX_PIN
#elif Z3_USE_ENDSTOP == _YSTOP_
#define Z3_MIN_PIN Y_STOP_PIN
#elif Z3_USE_ENDSTOP == _ZMIN_
#define Z3_MIN_PIN Z_MIN_PIN
#elif Z3_USE_ENDSTOP == _ZMAX_
#define Z3_MIN_PIN Z_MAX_PIN
#elif Z3_USE_ENDSTOP == _ZSTOP_
#define Z3_MIN_PIN Z_STOP_PIN
#elif Z3_USE_ENDSTOP == _XDIAG_
#define Z3_MIN_PIN X_DIAG_PIN
#elif Z3_USE_ENDSTOP == _YDIAG_
@ -1258,14 +1306,20 @@
#define Z4_MAX_PIN X_MIN_PIN
#elif Z4_USE_ENDSTOP == _XMAX_
#define Z4_MAX_PIN X_MAX_PIN
#elif Z4_USE_ENDSTOP == _XSTOP_
#define Z4_MAX_PIN X_STOP_PIN
#elif Z4_USE_ENDSTOP == _YMIN_
#define Z4_MAX_PIN Y_MIN_PIN
#elif Z4_USE_ENDSTOP == _YMAX_
#define Z4_MAX_PIN Y_MAX_PIN
#elif Z4_USE_ENDSTOP == _YSTOP_
#define Z4_MAX_PIN Y_STOP_PIN
#elif Z4_USE_ENDSTOP == _ZMIN_
#define Z4_MAX_PIN Z_MIN_PIN
#elif Z4_USE_ENDSTOP == _ZMAX_
#define Z4_MAX_PIN Z_MAX_PIN
#elif Z4_USE_ENDSTOP == _ZSTOP_
#define Z4_MAX_PIN Z_STOP_PIN
#elif Z4_USE_ENDSTOP == _XDIAG_
#define Z4_MAX_PIN X_DIAG_PIN
#elif Z4_USE_ENDSTOP == _YDIAG_
@ -1316,14 +1370,20 @@
#define Z4_MIN_PIN X_MIN_PIN
#elif Z4_USE_ENDSTOP == _XMAX_
#define Z4_MIN_PIN X_MAX_PIN
#elif Z4_USE_ENDSTOP == _XSTOP_
#define Z4_MIN_PIN X_STOP_PIN
#elif Z4_USE_ENDSTOP == _YMIN_
#define Z4_MIN_PIN Y_MIN_PIN
#elif Z4_USE_ENDSTOP == _YMAX_
#define Z4_MIN_PIN Y_MAX_PIN
#elif Z4_USE_ENDSTOP == _YSTOP_
#define Z4_MIN_PIN Y_STOP_PIN
#elif Z4_USE_ENDSTOP == _ZMIN_
#define Z4_MIN_PIN Z_MIN_PIN
#elif Z4_USE_ENDSTOP == _ZMAX_
#define Z4_MIN_PIN Z_MAX_PIN
#elif Z4_USE_ENDSTOP == _ZSTOP_
#define Z4_MIN_PIN Z_STOP_PIN
#elif Z4_USE_ENDSTOP == _XDIAG_
#define Z4_MIN_PIN X_DIAG_PIN
#elif Z4_USE_ENDSTOP == _YDIAG_

View File

@ -79,14 +79,20 @@
#warning "Auto-assigned X2_DIAG_PIN to X_MIN_PIN."
#elif X2_USE_ENDSTOP == _XMAX_
#warning "Auto-assigned X2_DIAG_PIN to X_MAX_PIN."
#elif X2_USE_ENDSTOP == _XSTOP_
#warning "Auto-assigned X2_DIAG_PIN to X_STOP_PIN."
#elif X2_USE_ENDSTOP == _YMIN_
#warning "Auto-assigned X2_DIAG_PIN to Y_MIN_PIN."
#elif X2_USE_ENDSTOP == _YMAX_
#warning "Auto-assigned X2_DIAG_PIN to Y_MAX_PIN."
#elif X2_USE_ENDSTOP == _YSTOP_
#warning "Auto-assigned X2_DIAG_PIN to Y_STOP_PIN."
#elif X2_USE_ENDSTOP == _ZMIN_
#warning "Auto-assigned X2_DIAG_PIN to Z_MIN_PIN."
#elif X2_USE_ENDSTOP == _ZMAX_
#warning "Auto-assigned X2_DIAG_PIN to Z_MAX_PIN."
#elif X2_USE_ENDSTOP == _ZSTOP_
#warning "Auto-assigned X2_DIAG_PIN to Z_STOP_PIN."
#elif X2_USE_ENDSTOP == _XDIAG_
#warning "Auto-assigned X2_DIAG_PIN to X_DIAG_PIN."
#elif X2_USE_ENDSTOP == _YDIAG_
@ -131,14 +137,20 @@
#warning "Auto-assigned Y2_DIAG_PIN to X_MIN_PIN."
#elif Y2_USE_ENDSTOP == _XMAX_
#warning "Auto-assigned Y2_DIAG_PIN to X_MAX_PIN."
#elif Y2_USE_ENDSTOP == _XSTOP_
#warning "Auto-assigned Y2_DIAG_PIN to X_STOP_PIN."
#elif Y2_USE_ENDSTOP == _YMIN_
#warning "Auto-assigned Y2_DIAG_PIN to Y_MIN_PIN."
#elif Y2_USE_ENDSTOP == _YMAX_
#warning "Auto-assigned Y2_DIAG_PIN to Y_MAX_PIN."
#elif Y2_USE_ENDSTOP == _YSTOP_
#warning "Auto-assigned Y2_DIAG_PIN to Y_STOP_PIN."
#elif Y2_USE_ENDSTOP == _ZMIN_
#warning "Auto-assigned Y2_DIAG_PIN to Z_MIN_PIN."
#elif Y2_USE_ENDSTOP == _ZMAX_
#warning "Auto-assigned Y2_DIAG_PIN to Z_MAX_PIN."
#elif Y2_USE_ENDSTOP == _ZSTOP_
#warning "Auto-assigned Y2_DIAG_PIN to Z_STOP_PIN."
#elif Y2_USE_ENDSTOP == _XDIAG_
#warning "Auto-assigned Y2_DIAG_PIN to X_DIAG_PIN."
#elif Y2_USE_ENDSTOP == _YDIAG_
@ -183,14 +195,20 @@
#warning "Auto-assigned Z2_DIAG_PIN to X_MIN_PIN."
#elif Z2_USE_ENDSTOP == _XMAX_
#warning "Auto-assigned Z2_DIAG_PIN to X_MAX_PIN."
#elif Z2_USE_ENDSTOP == _XSTOP_
#warning "Auto-assigned Z2_DIAG_PIN to X_STOP_PIN."
#elif Z2_USE_ENDSTOP == _YMIN_
#warning "Auto-assigned Z2_DIAG_PIN to Y_MIN_PIN."
#elif Z2_USE_ENDSTOP == _YMAX_
#warning "Auto-assigned Z2_DIAG_PIN to Y_MAX_PIN."
#elif Z2_USE_ENDSTOP == _YSTOP_
#warning "Auto-assigned Z2_DIAG_PIN to Y_STOP_PIN."
#elif Z2_USE_ENDSTOP == _ZMIN_
#warning "Auto-assigned Z2_DIAG_PIN to Z_MIN_PIN."
#elif Z2_USE_ENDSTOP == _ZMAX_
#warning "Auto-assigned Z2_DIAG_PIN to Z_MAX_PIN."
#elif Z2_USE_ENDSTOP == _ZSTOP_
#warning "Auto-assigned Z2_DIAG_PIN to Z_STOP_PIN."
#elif Z2_USE_ENDSTOP == _XDIAG_
#warning "Auto-assigned Z2_DIAG_PIN to X_DIAG_PIN."
#elif Z2_USE_ENDSTOP == _YDIAG_
@ -235,14 +253,20 @@
#warning "Auto-assigned Z3_DIAG_PIN to X_MIN_PIN."
#elif Z3_USE_ENDSTOP == _XMAX_
#warning "Auto-assigned Z3_DIAG_PIN to X_MAX_PIN."
#elif Z3_USE_ENDSTOP == _XSTOP_
#warning "Auto-assigned Z3_DIAG_PIN to X_STOP_PIN."
#elif Z3_USE_ENDSTOP == _YMIN_
#warning "Auto-assigned Z3_DIAG_PIN to Y_MIN_PIN."
#elif Z3_USE_ENDSTOP == _YMAX_
#warning "Auto-assigned Z3_DIAG_PIN to Y_MAX_PIN."
#elif Z3_USE_ENDSTOP == _YSTOP_
#warning "Auto-assigned Z3_DIAG_PIN to Y_STOP_PIN."
#elif Z3_USE_ENDSTOP == _ZMIN_
#warning "Auto-assigned Z3_DIAG_PIN to Z_MIN_PIN."
#elif Z3_USE_ENDSTOP == _ZMAX_
#warning "Auto-assigned Z3_DIAG_PIN to Z_MAX_PIN."
#elif Z3_USE_ENDSTOP == _ZSTOP_
#warning "Auto-assigned Z3_DIAG_PIN to Z_STOP_PIN."
#elif Z3_USE_ENDSTOP == _XDIAG_
#warning "Auto-assigned Z3_DIAG_PIN to X_DIAG_PIN."
#elif Z3_USE_ENDSTOP == _YDIAG_
@ -287,14 +311,20 @@
#warning "Auto-assigned Z4_DIAG_PIN to X_MIN_PIN."
#elif Z4_USE_ENDSTOP == _XMAX_
#warning "Auto-assigned Z4_DIAG_PIN to X_MAX_PIN."
#elif Z4_USE_ENDSTOP == _XSTOP_
#warning "Auto-assigned Z4_DIAG_PIN to X_STOP_PIN."
#elif Z4_USE_ENDSTOP == _YMIN_
#warning "Auto-assigned Z4_DIAG_PIN to Y_MIN_PIN."
#elif Z4_USE_ENDSTOP == _YMAX_
#warning "Auto-assigned Z4_DIAG_PIN to Y_MAX_PIN."
#elif Z4_USE_ENDSTOP == _YSTOP_
#warning "Auto-assigned Z4_DIAG_PIN to Y_STOP_PIN."
#elif Z4_USE_ENDSTOP == _ZMIN_
#warning "Auto-assigned Z4_DIAG_PIN to Z_MIN_PIN."
#elif Z4_USE_ENDSTOP == _ZMAX_
#warning "Auto-assigned Z4_DIAG_PIN to Z_MAX_PIN."
#elif Z4_USE_ENDSTOP == _ZSTOP_
#warning "Auto-assigned Z4_DIAG_PIN to Z_STOP_PIN."
#elif Z4_USE_ENDSTOP == _XDIAG_
#warning "Auto-assigned Z4_DIAG_PIN to X_DIAG_PIN."
#elif Z4_USE_ENDSTOP == _YDIAG_
@ -339,14 +369,20 @@
#warning "Auto-assigned I_DIAG_PIN to X_MIN_PIN."
#elif I_USE_ENDSTOP == _XMAX_
#warning "Auto-assigned I_DIAG_PIN to X_MAX_PIN."
#elif I_USE_ENDSTOP == _XSTOP_
#warning "Auto-assigned I_DIAG_PIN to X_STOP_PIN."
#elif I_USE_ENDSTOP == _YMIN_
#warning "Auto-assigned I_DIAG_PIN to Y_MIN_PIN."
#elif I_USE_ENDSTOP == _YMAX_
#warning "Auto-assigned I_DIAG_PIN to Y_MAX_PIN."
#elif I_USE_ENDSTOP == _YSTOP_
#warning "Auto-assigned I_DIAG_PIN to Y_STOP_PIN."
#elif I_USE_ENDSTOP == _ZMIN_
#warning "Auto-assigned I_DIAG_PIN to Z_MIN_PIN."
#elif I_USE_ENDSTOP == _ZMAX_
#warning "Auto-assigned I_DIAG_PIN to Z_MAX_PIN."
#elif I_USE_ENDSTOP == _ZSTOP_
#warning "Auto-assigned I_DIAG_PIN to Z_STOP_PIN."
#elif I_USE_ENDSTOP == _XDIAG_
#warning "Auto-assigned I_DIAG_PIN to X_DIAG_PIN."
#elif I_USE_ENDSTOP == _YDIAG_
@ -391,14 +427,20 @@
#warning "Auto-assigned J_DIAG_PIN to X_MIN_PIN."
#elif J_USE_ENDSTOP == _XMAX_
#warning "Auto-assigned J_DIAG_PIN to X_MAX_PIN."
#elif J_USE_ENDSTOP == _XSTOP_
#warning "Auto-assigned J_DIAG_PIN to X_STOP_PIN."
#elif J_USE_ENDSTOP == _YMIN_
#warning "Auto-assigned J_DIAG_PIN to Y_MIN_PIN."
#elif J_USE_ENDSTOP == _YMAX_
#warning "Auto-assigned J_DIAG_PIN to Y_MAX_PIN."
#elif J_USE_ENDSTOP == _YSTOP_
#warning "Auto-assigned J_DIAG_PIN to Y_STOP_PIN."
#elif J_USE_ENDSTOP == _ZMIN_
#warning "Auto-assigned J_DIAG_PIN to Z_MIN_PIN."
#elif J_USE_ENDSTOP == _ZMAX_
#warning "Auto-assigned J_DIAG_PIN to Z_MAX_PIN."
#elif J_USE_ENDSTOP == _ZSTOP_
#warning "Auto-assigned J_DIAG_PIN to Z_STOP_PIN."
#elif J_USE_ENDSTOP == _XDIAG_
#warning "Auto-assigned J_DIAG_PIN to X_DIAG_PIN."
#elif J_USE_ENDSTOP == _YDIAG_
@ -443,14 +485,20 @@
#warning "Auto-assigned K_DIAG_PIN to X_MIN_PIN."
#elif K_USE_ENDSTOP == _XMAX_
#warning "Auto-assigned K_DIAG_PIN to X_MAX_PIN."
#elif K_USE_ENDSTOP == _XSTOP_
#warning "Auto-assigned K_DIAG_PIN to X_STOP_PIN."
#elif K_USE_ENDSTOP == _YMIN_
#warning "Auto-assigned K_DIAG_PIN to Y_MIN_PIN."
#elif K_USE_ENDSTOP == _YMAX_
#warning "Auto-assigned K_DIAG_PIN to Y_MAX_PIN."
#elif K_USE_ENDSTOP == _YSTOP_
#warning "Auto-assigned K_DIAG_PIN to Y_STOP_PIN."
#elif K_USE_ENDSTOP == _ZMIN_
#warning "Auto-assigned K_DIAG_PIN to Z_MIN_PIN."
#elif K_USE_ENDSTOP == _ZMAX_
#warning "Auto-assigned K_DIAG_PIN to Z_MAX_PIN."
#elif K_USE_ENDSTOP == _ZSTOP_
#warning "Auto-assigned K_DIAG_PIN to Z_STOP_PIN."
#elif K_USE_ENDSTOP == _XDIAG_
#warning "Auto-assigned K_DIAG_PIN to X_DIAG_PIN."
#elif K_USE_ENDSTOP == _YDIAG_

View File

@ -419,6 +419,9 @@
#else
#define X_STOP_PIN X_MAX_PIN
#endif
#if !defined(X2_USE_ENDSTOP) && ENABLED(X_DUAL_ENDSTOPS) && PIN_EXISTS(X_STOP)
#define X2_USE_ENDSTOP _XSTOP_
#endif
#if HAS_Y_AXIS
#ifdef Y_STOP_PIN
@ -438,6 +441,9 @@
#else
#define Y_STOP_PIN Y_MAX_PIN
#endif
#if !defined(Y2_USE_ENDSTOP) && ENABLED(Y_DUAL_ENDSTOPS) && PIN_EXISTS(Y_STOP)
#define Y2_USE_ENDSTOP _YSTOP_
#endif
#endif
#if HAS_Z_AXIS
@ -458,6 +464,17 @@
#else
#define Z_STOP_PIN Z_MAX_PIN
#endif
#if ENABLED(Z_MULTI_ENDSTOPS) && PIN_EXISTS(Z_STOP)
#ifndef Z2_USE_ENDSTOP
#define Z2_USE_ENDSTOP _ZSTOP_
#endif
#if NUM_Z_STEPPER_DRIVERS >= 3 && !defined(Z3_USE_ENDSTOP)
#define Z3_USE_ENDSTOP _ZSTOP_
#endif
#if NUM_Z_STEPPER_DRIVERS >= 4 && !defined(Z4_USE_ENDSTOP)
#define Z4_USE_ENDSTOP _ZSTOP_
#endif
#endif
#endif
#if LINEAR_AXES >= 4
@ -801,7 +818,7 @@
#endif
#endif
// Auto-assign pins for stallGuard sensorless homing
#if !defined(Z2_DIAG_PIN) && !defined(Z2_USE_ENDSTOP) && defined(Z2_STALL_SENSITIVITY) && ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 2 && _PEXI(Z2_E_INDEX, DIAG)
#if !defined(Z2_DIAG_PIN) && !defined(Z2_USE_ENDSTOP) && defined(Z2_STALL_SENSITIVITY) && ENABLED(Z_MULTI_ENDSTOPS) && _PEXI(Z2_E_INDEX, DIAG)
#define Z2_DIAG_PIN _EPIN(Z2_E_INDEX, DIAG)
#if DIAG_REMAPPED(Z2, X_MIN)
#define Z2_USE_ENDSTOP _XMIN_
@ -886,7 +903,7 @@
#endif
#endif
// Auto-assign pins for stallGuard sensorless homing
#if !defined(Z3_DIAG_PIN) && !defined(Z3_USE_ENDSTOP) && defined(Z3_STALL_SENSITIVITY) && ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 3 && _PEXI(Z3_E_INDEX, DIAG)
#if !defined(Z3_DIAG_PIN) && !defined(Z3_USE_ENDSTOP) && defined(Z3_STALL_SENSITIVITY) && ENABLED(Z_MULTI_ENDSTOPS) && _PEXI(Z3_E_INDEX, DIAG)
#define Z3_DIAG_PIN _EPIN(Z3_E_INDEX, DIAG)
#if DIAG_REMAPPED(Z3, X_MIN)
#define Z3_USE_ENDSTOP _XMIN_
@ -971,7 +988,7 @@
#endif
#endif
// Auto-assign pins for stallGuard sensorless homing
#if !defined(Z4_DIAG_PIN) && !defined(Z4_USE_ENDSTOP) && defined(Z4_STALL_SENSITIVITY) && ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 4 && _PEXI(Z4_E_INDEX, DIAG)
#if !defined(Z4_DIAG_PIN) && !defined(Z4_USE_ENDSTOP) && defined(Z4_STALL_SENSITIVITY) && ENABLED(Z_MULTI_ENDSTOPS) && _PEXI(Z4_E_INDEX, DIAG)
#define Z4_DIAG_PIN _EPIN(Z4_E_INDEX, DIAG)
#if DIAG_REMAPPED(Z4, X_MIN)
#define Z4_USE_ENDSTOP _XMIN_

View File

@ -28,7 +28,11 @@
#define Z2_ENABLE_PIN PF3
#define Z2_STEP_PIN PF5
#define Z2_DIR_PIN PF1
#define Z2_STOP_PIN PA13
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN PG9
#endif
#ifndef FIL_RUNOUT2_PIN
#define FIL_RUNOUT2_PIN PF13
#endif