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

Co-authored-by: Scott Lahteine <github@thinkyhead.com>
x301
ellensp 3 years ago committed by Scott Lahteine
parent a0a57406a2
commit f97635de36

@ -33,6 +33,12 @@
#define _AXIS(A) (A##_AXIS) #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 _XMIN_ 0x11
#define _YMIN_ 0x12 #define _YMIN_ 0x12
#define _ZMIN_ 0x13 #define _ZMIN_ 0x13

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

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

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

@ -28,7 +28,11 @@
#define Z2_ENABLE_PIN PF3 #define Z2_ENABLE_PIN PF3
#define Z2_STEP_PIN PF5 #define Z2_STEP_PIN PF5
#define Z2_DIR_PIN PF1 #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 #ifndef FIL_RUNOUT2_PIN
#define FIL_RUNOUT2_PIN PF13 #define FIL_RUNOUT2_PIN PF13
#endif #endif

Loading…
Cancel
Save