@ -679,48 +679,110 @@
# if X_HOME_DIR > 0
# if X_HOME_DIR > 0
# if X2_USE_ENDSTOP == _XMIN_
# if X2_USE_ENDSTOP == _XMIN_
# define X2_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
# define X2_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
# define X2_MAX_PIN X_MIN_PIN
# elif X2_USE_ENDSTOP == _XMAX_
# elif X2_USE_ENDSTOP == _XMAX_
# define X2_MAX_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
# define X2_MAX_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
# define X2_MAX_PIN X_MAX_PIN
# elif X2_USE_ENDSTOP == _YMIN_
# elif X2_USE_ENDSTOP == _YMIN_
# define X2_MAX_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
# define X2_MAX_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
# define X2_MAX_PIN Y_MIN_PIN
# elif X2_USE_ENDSTOP == _YMAX_
# elif X2_USE_ENDSTOP == _YMAX_
# define X2_MAX_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
# define X2_MAX_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
# define X2_MAX_PIN Y_MAX_PIN
# elif X2_USE_ENDSTOP == _ZMIN_
# elif X2_USE_ENDSTOP == _ZMIN_
# define X2_MAX_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
# define X2_MAX_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
# define X2_MAX_PIN Z_MIN_PIN
# elif X2_USE_ENDSTOP == _ZMAX_
# elif X2_USE_ENDSTOP == _ZMAX_
# define X2_MAX_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
# define X2_MAX_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
# define X2_MAX_PIN Z_MAX_PIN
# else
# else
# define X2_MAX_ENDSTOP_INVERTING false
# define X2_MAX_ENDSTOP_INVERTING false
# endif
# endif
# ifndef X2_MAX_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 == _YMIN_
# define X2_MAX_PIN Y_MIN_PIN
# elif X2_USE_ENDSTOP == _YMAX_
# define X2_MAX_PIN Y_MAX_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 == _XDIAG_
# define X2_MAX_PIN X_DIAG_PIN
# elif X2_USE_ENDSTOP == _YDIAG_
# define X2_MAX_PIN Y_DIAG_PIN
# elif X2_USE_ENDSTOP == _ZDIAG_
# define X2_MAX_PIN Z_DIAG_PIN
# elif X2_USE_ENDSTOP == _E0DIAG_
# define X2_MAX_PIN E0_DIAG_PIN
# elif X2_USE_ENDSTOP == _E1DIAG_
# define X2_MAX_PIN E1_DIAG_PIN
# elif X2_USE_ENDSTOP == _E2DIAG_
# define X2_MAX_PIN E2_DIAG_PIN
# elif X2_USE_ENDSTOP == _E3DIAG_
# define X2_MAX_PIN E3_DIAG_PIN
# elif X2_USE_ENDSTOP == _E4DIAG_
# define X2_MAX_PIN E4_DIAG_PIN
# elif X2_USE_ENDSTOP == _E5DIAG_
# define X2_MAX_PIN E5_DIAG_PIN
# elif X2_USE_ENDSTOP == _E6DIAG_
# define X2_MAX_PIN E6_DIAG_PIN
# elif X2_USE_ENDSTOP == _E7DIAG_
# define X2_MAX_PIN E7_DIAG_PIN
# endif
# endif
# define X2_MIN_ENDSTOP_INVERTING false
# define X2_MIN_ENDSTOP_INVERTING false
# else
# else
# if X2_USE_ENDSTOP == _XMIN_
# if X2_USE_ENDSTOP == _XMIN_
# define X2_MIN_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
# define X2_MIN_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
# define X2_MIN_PIN X_MIN_PIN
# elif X2_USE_ENDSTOP == _XMAX_
# elif X2_USE_ENDSTOP == _XMAX_
# define X2_MIN_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
# define X2_MIN_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
# define X2_MIN_PIN X_MAX_PIN
# elif X2_USE_ENDSTOP == _YMIN_
# elif X2_USE_ENDSTOP == _YMIN_
# define X2_MIN_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
# define X2_MIN_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
# define X2_MIN_PIN Y_MIN_PIN
# elif X2_USE_ENDSTOP == _YMAX_
# elif X2_USE_ENDSTOP == _YMAX_
# define X2_MIN_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
# define X2_MIN_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
# define X2_MIN_PIN Y_MAX_PIN
# elif X2_USE_ENDSTOP == _ZMIN_
# elif X2_USE_ENDSTOP == _ZMIN_
# define X2_MIN_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
# define X2_MIN_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
# define X2_MIN_PIN Z_MIN_PIN
# elif X2_USE_ENDSTOP == _ZMAX_
# elif X2_USE_ENDSTOP == _ZMAX_
# define X2_MIN_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
# define X2_MIN_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
# define X2_MIN_PIN Z_MAX_PIN
# else
# else
# define X2_MIN_ENDSTOP_INVERTING false
# define X2_MIN_ENDSTOP_INVERTING false
# endif
# endif
# ifndef X2_MIN_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 == _YMIN_
# define X2_MIN_PIN Y_MIN_PIN
# elif X2_USE_ENDSTOP == _YMAX_
# define X2_MIN_PIN Y_MAX_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 == _XDIAG_
# define X2_MIN_PIN X_DIAG_PIN
# elif X2_USE_ENDSTOP == _YDIAG_
# define X2_MIN_PIN Y_DIAG_PIN
# elif X2_USE_ENDSTOP == _ZDIAG_
# define X2_MIN_PIN Z_DIAG_PIN
# elif X2_USE_ENDSTOP == _E0DIAG_
# define X2_MIN_PIN E0_DIAG_PIN
# elif X2_USE_ENDSTOP == _E1DIAG_
# define X2_MIN_PIN E1_DIAG_PIN
# elif X2_USE_ENDSTOP == _E2DIAG_
# define X2_MIN_PIN E2_DIAG_PIN
# elif X2_USE_ENDSTOP == _E3DIAG_
# define X2_MIN_PIN E3_DIAG_PIN
# elif X2_USE_ENDSTOP == _E4DIAG_
# define X2_MIN_PIN E4_DIAG_PIN
# elif X2_USE_ENDSTOP == _E5DIAG_
# define X2_MIN_PIN E5_DIAG_PIN
# elif X2_USE_ENDSTOP == _E6DIAG_
# define X2_MIN_PIN E6_DIAG_PIN
# elif X2_USE_ENDSTOP == _E7DIAG_
# define X2_MIN_PIN E7_DIAG_PIN
# endif
# endif
# define X2_MAX_ENDSTOP_INVERTING false
# define X2_MAX_ENDSTOP_INVERTING false
# endif
# endif
# endif
# endif
@ -732,48 +794,110 @@
# if Y_HOME_DIR > 0
# if Y_HOME_DIR > 0
# if Y2_USE_ENDSTOP == _XMIN_
# if Y2_USE_ENDSTOP == _XMIN_
# define Y2_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
# define Y2_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
# define Y2_MAX_PIN X_MIN_PIN
# elif Y2_USE_ENDSTOP == _XMAX_
# elif Y2_USE_ENDSTOP == _XMAX_
# define Y2_MAX_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
# define Y2_MAX_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
# define Y2_MAX_PIN X_MAX_PIN
# elif Y2_USE_ENDSTOP == _YMIN_
# elif Y2_USE_ENDSTOP == _YMIN_
# define Y2_MAX_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
# define Y2_MAX_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
# define Y2_MAX_PIN Y_MIN_PIN
# elif Y2_USE_ENDSTOP == _YMAX_
# elif Y2_USE_ENDSTOP == _YMAX_
# define Y2_MAX_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
# define Y2_MAX_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
# define Y2_MAX_PIN Y_MAX_PIN
# elif Y2_USE_ENDSTOP == _ZMIN_
# elif Y2_USE_ENDSTOP == _ZMIN_
# define Y2_MAX_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
# define Y2_MAX_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
# define Y2_MAX_PIN Z_MIN_PIN
# elif Y2_USE_ENDSTOP == _ZMAX_
# elif Y2_USE_ENDSTOP == _ZMAX_
# define Y2_MAX_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
# define Y2_MAX_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
# define Y2_MAX_PIN Z_MAX_PIN
# else
# else
# define Y2_MAX_ENDSTOP_INVERTING false
# define Y2_MAX_ENDSTOP_INVERTING false
# endif
# endif
# ifndef Y2_MAX_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 == _YMIN_
# define Y2_MAX_PIN Y_MIN_PIN
# elif Y2_USE_ENDSTOP == _YMAX_
# define Y2_MAX_PIN Y_MAX_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 == _XDIAG_
# define Y2_MAX_PIN X_DIAG_PIN
# elif Y2_USE_ENDSTOP == _YDIAG_
# define Y2_MAX_PIN Y_DIAG_PIN
# elif Y2_USE_ENDSTOP == _ZDIAG_
# define Y2_MAX_PIN Z_DIAG_PIN
# elif Y2_USE_ENDSTOP == _E0DIAG_
# define Y2_MAX_PIN E0_DIAG_PIN
# elif Y2_USE_ENDSTOP == _E1DIAG_
# define Y2_MAX_PIN E1_DIAG_PIN
# elif Y2_USE_ENDSTOP == _E2DIAG_
# define Y2_MAX_PIN E2_DIAG_PIN
# elif Y2_USE_ENDSTOP == _E3DIAG_
# define Y2_MAX_PIN E3_DIAG_PIN
# elif Y2_USE_ENDSTOP == _E4DIAG_
# define Y2_MAX_PIN E4_DIAG_PIN
# elif Y2_USE_ENDSTOP == _E5DIAG_
# define Y2_MAX_PIN E5_DIAG_PIN
# elif Y2_USE_ENDSTOP == _E6DIAG_
# define Y2_MAX_PIN E6_DIAG_PIN
# elif Y2_USE_ENDSTOP == _E7DIAG_
# define Y2_MAX_PIN E7_DIAG_PIN
# endif
# endif
# define Y2_MIN_ENDSTOP_INVERTING false
# define Y2_MIN_ENDSTOP_INVERTING false
# else
# else
# if Y2_USE_ENDSTOP == _XMIN_
# if Y2_USE_ENDSTOP == _XMIN_
# define Y2_MIN_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
# define Y2_MIN_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
# define Y2_MIN_PIN X_MIN_PIN
# elif Y2_USE_ENDSTOP == _XMAX_
# elif Y2_USE_ENDSTOP == _XMAX_
# define Y2_MIN_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
# define Y2_MIN_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
# define Y2_MIN_PIN X_MAX_PIN
# elif Y2_USE_ENDSTOP == _YMIN_
# elif Y2_USE_ENDSTOP == _YMIN_
# define Y2_MIN_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
# define Y2_MIN_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
# define Y2_MIN_PIN Y_MIN_PIN
# elif Y2_USE_ENDSTOP == _YMAX_
# elif Y2_USE_ENDSTOP == _YMAX_
# define Y2_MIN_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
# define Y2_MIN_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
# define Y2_MIN_PIN Y_MAX_PIN
# elif Y2_USE_ENDSTOP == _ZMIN_
# elif Y2_USE_ENDSTOP == _ZMIN_
# define Y2_MIN_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
# define Y2_MIN_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
# define Y2_MIN_PIN Z_MIN_PIN
# elif Y2_USE_ENDSTOP == _ZMAX_
# elif Y2_USE_ENDSTOP == _ZMAX_
# define Y2_MIN_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
# define Y2_MIN_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
# define Y2_MIN_PIN Z_MAX_PIN
# else
# else
# define Y2_MIN_ENDSTOP_INVERTING false
# define Y2_MIN_ENDSTOP_INVERTING false
# endif
# endif
# ifndef Y2_MIN_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 == _YMIN_
# define Y2_MIN_PIN Y_MIN_PIN
# elif Y2_USE_ENDSTOP == _YMAX_
# define Y2_MIN_PIN Y_MAX_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 == _XDIAG_
# define Y2_MIN_PIN X_DIAG_PIN
# elif Y2_USE_ENDSTOP == _YDIAG_
# define Y2_MIN_PIN Y_DIAG_PIN
# elif Y2_USE_ENDSTOP == _ZDIAG_
# define Y2_MIN_PIN Z_DIAG_PIN
# elif Y2_USE_ENDSTOP == _E0DIAG_
# define Y2_MIN_PIN E0_DIAG_PIN
# elif Y2_USE_ENDSTOP == _E1DIAG_
# define Y2_MIN_PIN E1_DIAG_PIN
# elif Y2_USE_ENDSTOP == _E2DIAG_
# define Y2_MIN_PIN E2_DIAG_PIN
# elif Y2_USE_ENDSTOP == _E3DIAG_
# define Y2_MIN_PIN E3_DIAG_PIN
# elif Y2_USE_ENDSTOP == _E4DIAG_
# define Y2_MIN_PIN E4_DIAG_PIN
# elif Y2_USE_ENDSTOP == _E5DIAG_
# define Y2_MIN_PIN E5_DIAG_PIN
# elif Y2_USE_ENDSTOP == _E6DIAG_
# define Y2_MIN_PIN E6_DIAG_PIN
# elif Y2_USE_ENDSTOP == _E7DIAG_
# define Y2_MIN_PIN E7_DIAG_PIN
# endif
# endif
# define Y2_MAX_ENDSTOP_INVERTING false
# define Y2_MAX_ENDSTOP_INVERTING false
# endif
# endif
# endif
# endif
@ -786,48 +910,110 @@
# if Z_HOME_DIR > 0
# if Z_HOME_DIR > 0
# if Z2_USE_ENDSTOP == _XMIN_
# if Z2_USE_ENDSTOP == _XMIN_
# define Z2_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
# define Z2_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
# define Z2_MAX_PIN X_MIN_PIN
# elif Z2_USE_ENDSTOP == _XMAX_
# elif Z2_USE_ENDSTOP == _XMAX_
# define Z2_MAX_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
# define Z2_MAX_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
# define Z2_MAX_PIN X_MAX_PIN
# elif Z2_USE_ENDSTOP == _YMIN_
# elif Z2_USE_ENDSTOP == _YMIN_
# define Z2_MAX_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
# define Z2_MAX_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
# define Z2_MAX_PIN Y_MIN_PIN
# elif Z2_USE_ENDSTOP == _YMAX_
# elif Z2_USE_ENDSTOP == _YMAX_
# define Z2_MAX_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
# define Z2_MAX_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
# define Z2_MAX_PIN Y_MAX_PIN
# elif Z2_USE_ENDSTOP == _ZMIN_
# elif Z2_USE_ENDSTOP == _ZMIN_
# define Z2_MAX_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
# define Z2_MAX_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
# define Z2_MAX_PIN Z_MIN_PIN
# elif Z2_USE_ENDSTOP == _ZMAX_
# elif Z2_USE_ENDSTOP == _ZMAX_
# define Z2_MAX_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
# define Z2_MAX_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
# define Z2_MAX_PIN Z_MAX_PIN
# else
# else
# define Z2_MAX_ENDSTOP_INVERTING false
# define Z2_MAX_ENDSTOP_INVERTING false
# endif
# endif
# ifndef Z2_MAX_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 == _YMIN_
# define Z2_MAX_PIN Y_MIN_PIN
# elif Z2_USE_ENDSTOP == _YMAX_
# define Z2_MAX_PIN Y_MAX_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 == _XDIAG_
# define Z2_MAX_PIN X_DIAG_PIN
# elif Z2_USE_ENDSTOP == _YDIAG_
# define Z2_MAX_PIN Y_DIAG_PIN
# elif Z2_USE_ENDSTOP == _ZDIAG_
# define Z2_MAX_PIN Z_DIAG_PIN
# elif Z2_USE_ENDSTOP == _E0DIAG_
# define Z2_MAX_PIN E0_DIAG_PIN
# elif Z2_USE_ENDSTOP == _E1DIAG_
# define Z2_MAX_PIN E1_DIAG_PIN
# elif Z2_USE_ENDSTOP == _E2DIAG_
# define Z2_MAX_PIN E2_DIAG_PIN
# elif Z2_USE_ENDSTOP == _E3DIAG_
# define Z2_MAX_PIN E3_DIAG_PIN
# elif Z2_USE_ENDSTOP == _E4DIAG_
# define Z2_MAX_PIN E4_DIAG_PIN
# elif Z2_USE_ENDSTOP == _E5DIAG_
# define Z2_MAX_PIN E5_DIAG_PIN
# elif Z2_USE_ENDSTOP == _E6DIAG_
# define Z2_MAX_PIN E6_DIAG_PIN
# elif Z2_USE_ENDSTOP == _E7DIAG_
# define Z2_MAX_PIN E7_DIAG_PIN
# endif
# endif
# define Z2_MIN_ENDSTOP_INVERTING false
# define Z2_MIN_ENDSTOP_INVERTING false
# else
# else
# if Z2_USE_ENDSTOP == _XMIN_
# if Z2_USE_ENDSTOP == _XMIN_
# define Z2_MIN_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
# define Z2_MIN_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
# define Z2_MIN_PIN X_MIN_PIN
# elif Z2_USE_ENDSTOP == _XMAX_
# elif Z2_USE_ENDSTOP == _XMAX_
# define Z2_MIN_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
# define Z2_MIN_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
# define Z2_MIN_PIN X_MAX_PIN
# elif Z2_USE_ENDSTOP == _YMIN_
# elif Z2_USE_ENDSTOP == _YMIN_
# define Z2_MIN_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
# define Z2_MIN_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
# define Z2_MIN_PIN Y_MIN_PIN
# elif Z2_USE_ENDSTOP == _YMAX_
# elif Z2_USE_ENDSTOP == _YMAX_
# define Z2_MIN_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
# define Z2_MIN_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
# define Z2_MIN_PIN Y_MAX_PIN
# elif Z2_USE_ENDSTOP == _ZMIN_
# elif Z2_USE_ENDSTOP == _ZMIN_
# define Z2_MIN_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
# define Z2_MIN_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
# define Z2_MIN_PIN Z_MIN_PIN
# elif Z2_USE_ENDSTOP == _ZMAX_
# elif Z2_USE_ENDSTOP == _ZMAX_
# define Z2_MIN_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
# define Z2_MIN_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
# define Z2_MIN_PIN Z_MAX_PIN
# else
# else
# define Z2_MIN_ENDSTOP_INVERTING false
# define Z2_MIN_ENDSTOP_INVERTING false
# endif
# endif
# ifndef Z2_MIN_PIN
# if Z2_USE_ENDSTOP == _XMIN_
# define Z2_MIN_PIN X_MIN_PIN
# elif Z2_USE_ENDSTOP == _XMAX_
# define Z2_MIN_PIN X_MAX_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 == _ZMIN_
# define Z2_MIN_PIN Z_MIN_PIN
# elif Z2_USE_ENDSTOP == _ZMAX_
# define Z2_MIN_PIN Z_MAX_PIN
# elif Z2_USE_ENDSTOP == _XDIAG_
# define Z2_MIN_PIN X_DIAG_PIN
# elif Z2_USE_ENDSTOP == _YDIAG_
# define Z2_MIN_PIN Y_DIAG_PIN
# elif Z2_USE_ENDSTOP == _ZDIAG_
# define Z2_MIN_PIN Z_DIAG_PIN
# elif Z2_USE_ENDSTOP == _E0DIAG_
# define Z2_MIN_PIN E0_DIAG_PIN
# elif Z2_USE_ENDSTOP == _E1DIAG_
# define Z2_MIN_PIN E1_DIAG_PIN
# elif Z2_USE_ENDSTOP == _E2DIAG_
# define Z2_MIN_PIN E2_DIAG_PIN
# elif Z2_USE_ENDSTOP == _E3DIAG_
# define Z2_MIN_PIN E3_DIAG_PIN
# elif Z2_USE_ENDSTOP == _E4DIAG_
# define Z2_MIN_PIN E4_DIAG_PIN
# elif Z2_USE_ENDSTOP == _E5DIAG_
# define Z2_MIN_PIN E5_DIAG_PIN
# elif Z2_USE_ENDSTOP == _E6DIAG_
# define Z2_MIN_PIN E6_DIAG_PIN
# elif Z2_USE_ENDSTOP == _E7DIAG_
# define Z2_MIN_PIN E7_DIAG_PIN
# endif
# endif
# define Z2_MAX_ENDSTOP_INVERTING false
# define Z2_MAX_ENDSTOP_INVERTING false
# endif
# endif
@ -835,48 +1021,110 @@
# if Z_HOME_DIR > 0
# if Z_HOME_DIR > 0
# if Z3_USE_ENDSTOP == _XMIN_
# if Z3_USE_ENDSTOP == _XMIN_
# define Z3_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
# define Z3_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
# define Z3_MAX_PIN X_MIN_PIN
# elif Z3_USE_ENDSTOP == _XMAX_
# elif Z3_USE_ENDSTOP == _XMAX_
# define Z3_MAX_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
# define Z3_MAX_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
# define Z3_MAX_PIN X_MAX_PIN
# elif Z3_USE_ENDSTOP == _YMIN_
# elif Z3_USE_ENDSTOP == _YMIN_
# define Z3_MAX_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
# define Z3_MAX_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
# define Z3_MAX_PIN Y_MIN_PIN
# elif Z3_USE_ENDSTOP == _YMAX_
# elif Z3_USE_ENDSTOP == _YMAX_
# define Z3_MAX_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
# define Z3_MAX_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
# define Z3_MAX_PIN Y_MAX_PIN
# elif Z3_USE_ENDSTOP == _ZMIN_
# elif Z3_USE_ENDSTOP == _ZMIN_
# define Z3_MAX_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
# define Z3_MAX_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
# define Z3_MAX_PIN Z_MIN_PIN
# elif Z3_USE_ENDSTOP == _ZMAX_
# elif Z3_USE_ENDSTOP == _ZMAX_
# define Z3_MAX_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
# define Z3_MAX_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
# define Z3_MAX_PIN Z_MAX_PIN
# else
# else
# define Z3_MAX_ENDSTOP_INVERTING false
# define Z3_MAX_ENDSTOP_INVERTING false
# endif
# endif
# ifndef Z3_MAX_PIN
# if Z3_USE_ENDSTOP == _XMIN_
# define Z3_MAX_PIN X_MIN_PIN
# elif Z3_USE_ENDSTOP == _XMAX_
# define Z3_MAX_PIN X_MAX_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 == _ZMIN_
# define Z3_MAX_PIN Z_MIN_PIN
# elif Z3_USE_ENDSTOP == _ZMAX_
# define Z3_MAX_PIN Z_MAX_PIN
# elif Z3_USE_ENDSTOP == _XDIAG_
# define Z3_MAX_PIN X_DIAG_PIN
# elif Z3_USE_ENDSTOP == _YDIAG_
# define Z3_MAX_PIN Y_DIAG_PIN
# elif Z3_USE_ENDSTOP == _ZDIAG_
# define Z3_MAX_PIN Z_DIAG_PIN
# elif Z3_USE_ENDSTOP == _E0DIAG_
# define Z3_MAX_PIN E0_DIAG_PIN
# elif Z3_USE_ENDSTOP == _E1DIAG_
# define Z3_MAX_PIN E1_DIAG_PIN
# elif Z3_USE_ENDSTOP == _E2DIAG_
# define Z3_MAX_PIN E2_DIAG_PIN
# elif Z3_USE_ENDSTOP == _E3DIAG_
# define Z3_MAX_PIN E3_DIAG_PIN
# elif Z3_USE_ENDSTOP == _E4DIAG_
# define Z3_MAX_PIN E4_DIAG_PIN
# elif Z3_USE_ENDSTOP == _E5DIAG_
# define Z3_MAX_PIN E5_DIAG_PIN
# elif Z3_USE_ENDSTOP == _E6DIAG_
# define Z3_MAX_PIN E6_DIAG_PIN
# elif Z3_USE_ENDSTOP == _E7DIAG_
# define Z3_MAX_PIN E7_DIAG_PIN
# endif
# endif
# define Z3_MIN_ENDSTOP_INVERTING false
# define Z3_MIN_ENDSTOP_INVERTING false
# else
# else
# if Z3_USE_ENDSTOP == _XMIN_
# if Z3_USE_ENDSTOP == _XMIN_
# define Z3_MIN_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
# define Z3_MIN_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
# define Z3_MIN_PIN X_MIN_PIN
# elif Z3_USE_ENDSTOP == _XMAX_
# elif Z3_USE_ENDSTOP == _XMAX_
# define Z3_MIN_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
# define Z3_MIN_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
# define Z3_MIN_PIN X_MAX_PIN
# elif Z3_USE_ENDSTOP == _YMIN_
# elif Z3_USE_ENDSTOP == _YMIN_
# define Z3_MIN_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
# define Z3_MIN_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
# define Z3_MIN_PIN Y_MIN_PIN
# elif Z3_USE_ENDSTOP == _YMAX_
# elif Z3_USE_ENDSTOP == _YMAX_
# define Z3_MIN_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
# define Z3_MIN_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
# define Z3_MIN_PIN Y_MAX_PIN
# elif Z3_USE_ENDSTOP == _ZMIN_
# elif Z3_USE_ENDSTOP == _ZMIN_
# define Z3_MIN_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
# define Z3_MIN_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
# define Z3_MIN_PIN Z_MIN_PIN
# elif Z3_USE_ENDSTOP == _ZMAX_
# elif Z3_USE_ENDSTOP == _ZMAX_
# define Z3_MIN_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
# define Z3_MIN_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
# define Z3_MIN_PIN Z_MAX_PIN
# else
# else
# define Z3_MIN_ENDSTOP_INVERTING false
# define Z3_MIN_ENDSTOP_INVERTING false
# endif
# endif
# ifndef Z3_MIN_PIN
# if Z3_USE_ENDSTOP == _XMIN_
# define Z3_MIN_PIN X_MIN_PIN
# elif Z3_USE_ENDSTOP == _XMAX_
# define Z3_MIN_PIN X_MAX_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 == _ZMIN_
# define Z3_MIN_PIN Z_MIN_PIN
# elif Z3_USE_ENDSTOP == _ZMAX_
# define Z3_MIN_PIN Z_MAX_PIN
# elif Z3_USE_ENDSTOP == _XDIAG_
# define Z3_MIN_PIN X_DIAG_PIN
# elif Z3_USE_ENDSTOP == _YDIAG_
# define Z3_MIN_PIN Y_DIAG_PIN
# elif Z3_USE_ENDSTOP == _ZDIAG_
# define Z3_MIN_PIN Z_DIAG_PIN
# elif Z3_USE_ENDSTOP == _E0DIAG_
# define Z3_MIN_PIN E0_DIAG_PIN
# elif Z3_USE_ENDSTOP == _E1DIAG_
# define Z3_MIN_PIN E1_DIAG_PIN
# elif Z3_USE_ENDSTOP == _E2DIAG_
# define Z3_MIN_PIN E2_DIAG_PIN
# elif Z3_USE_ENDSTOP == _E3DIAG_
# define Z3_MIN_PIN E3_DIAG_PIN
# elif Z3_USE_ENDSTOP == _E4DIAG_
# define Z3_MIN_PIN E4_DIAG_PIN
# elif Z3_USE_ENDSTOP == _E5DIAG_
# define Z3_MIN_PIN E5_DIAG_PIN
# elif Z3_USE_ENDSTOP == _E6DIAG_
# define Z3_MIN_PIN E6_DIAG_PIN
# elif Z3_USE_ENDSTOP == _E7DIAG_
# define Z3_MIN_PIN E7_DIAG_PIN
# endif
# endif
# define Z3_MAX_ENDSTOP_INVERTING false
# define Z3_MAX_ENDSTOP_INVERTING false
# endif
# endif
# endif
# endif
@ -885,48 +1133,110 @@
# if Z_HOME_DIR > 0
# if Z_HOME_DIR > 0
# if Z4_USE_ENDSTOP == _XMIN_
# if Z4_USE_ENDSTOP == _XMIN_
# define Z4_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
# define Z4_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
# define Z4_MAX_PIN X_MIN_PIN
# elif Z4_USE_ENDSTOP == _XMAX_
# elif Z4_USE_ENDSTOP == _XMAX_
# define Z4_MAX_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
# define Z4_MAX_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
# define Z4_MAX_PIN X_MAX_PIN
# elif Z4_USE_ENDSTOP == _YMIN_
# elif Z4_USE_ENDSTOP == _YMIN_
# define Z4_MAX_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
# define Z4_MAX_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
# define Z4_MAX_PIN Y_MIN_PIN
# elif Z4_USE_ENDSTOP == _YMAX_
# elif Z4_USE_ENDSTOP == _YMAX_
# define Z4_MAX_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
# define Z4_MAX_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
# define Z4_MAX_PIN Y_MAX_PIN
# elif Z4_USE_ENDSTOP == _ZMIN_
# elif Z4_USE_ENDSTOP == _ZMIN_
# define Z4_MAX_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
# define Z4_MAX_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
# define Z4_MAX_PIN Z_MIN_PIN
# elif Z4_USE_ENDSTOP == _ZMAX_
# elif Z4_USE_ENDSTOP == _ZMAX_
# define Z4_MAX_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
# define Z4_MAX_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
# define Z4_MAX_PIN Z_MAX_PIN
# else
# else
# define Z4_MAX_ENDSTOP_INVERTING false
# define Z4_MAX_ENDSTOP_INVERTING false
# endif
# endif
# ifndef Z4_MAX_PIN
# if Z4_USE_ENDSTOP == _XMIN_
# define Z4_MAX_PIN X_MIN_PIN
# elif Z4_USE_ENDSTOP == _XMAX_
# define Z4_MAX_PIN X_MAX_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 == _ZMIN_
# define Z4_MAX_PIN Z_MIN_PIN
# elif Z4_USE_ENDSTOP == _ZMAX_
# define Z4_MAX_PIN Z_MAX_PIN
# elif Z4_USE_ENDSTOP == _XDIAG_
# define Z4_MAX_PIN X_DIAG_PIN
# elif Z4_USE_ENDSTOP == _YDIAG_
# define Z4_MAX_PIN Y_DIAG_PIN
# elif Z4_USE_ENDSTOP == _ZDIAG_
# define Z4_MAX_PIN Z_DIAG_PIN
# elif Z4_USE_ENDSTOP == _E0DIAG_
# define Z4_MAX_PIN E0_DIAG_PIN
# elif Z4_USE_ENDSTOP == _E1DIAG_
# define Z4_MAX_PIN E1_DIAG_PIN
# elif Z4_USE_ENDSTOP == _E2DIAG_
# define Z4_MAX_PIN E2_DIAG_PIN
# elif Z4_USE_ENDSTOP == _E3DIAG_
# define Z4_MAX_PIN E3_DIAG_PIN
# elif Z4_USE_ENDSTOP == _E4DIAG_
# define Z4_MAX_PIN E4_DIAG_PIN
# elif Z4_USE_ENDSTOP == _E5DIAG_
# define Z4_MAX_PIN E5_DIAG_PIN
# elif Z4_USE_ENDSTOP == _E6DIAG_
# define Z4_MAX_PIN E6_DIAG_PIN
# elif Z4_USE_ENDSTOP == _E7DIAG_
# define Z4_MAX_PIN E7_DIAG_PIN
# endif
# endif
# define Z4_MIN_ENDSTOP_INVERTING false
# define Z4_MIN_ENDSTOP_INVERTING false
# else
# else
# if Z4_USE_ENDSTOP == _XMIN_
# if Z4_USE_ENDSTOP == _XMIN_
# define Z4_MIN_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
# define Z4_MIN_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
# define Z4_MIN_PIN X_MIN_PIN
# elif Z4_USE_ENDSTOP == _XMAX_
# elif Z4_USE_ENDSTOP == _XMAX_
# define Z4_MIN_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
# define Z4_MIN_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
# define Z4_MIN_PIN X_MAX_PIN
# elif Z4_USE_ENDSTOP == _YMIN_
# elif Z4_USE_ENDSTOP == _YMIN_
# define Z4_MIN_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
# define Z4_MIN_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
# define Z4_MIN_PIN Y_MIN_PIN
# elif Z4_USE_ENDSTOP == _YMAX_
# elif Z4_USE_ENDSTOP == _YMAX_
# define Z4_MIN_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
# define Z4_MIN_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
# define Z4_MIN_PIN Y_MAX_PIN
# elif Z4_USE_ENDSTOP == _ZMIN_
# elif Z4_USE_ENDSTOP == _ZMIN_
# define Z4_MIN_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
# define Z4_MIN_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
# define Z4_MIN_PIN Z_MIN_PIN
# elif Z4_USE_ENDSTOP == _ZMAX_
# elif Z4_USE_ENDSTOP == _ZMAX_
# define Z4_MIN_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
# define Z4_MIN_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
# define Z4_MIN_PIN Z_MAX_PIN
# else
# else
# define Z4_MIN_ENDSTOP_INVERTING false
# define Z4_MIN_ENDSTOP_INVERTING false
# endif
# endif
# ifndef Z4_MIN_PIN
# if Z4_USE_ENDSTOP == _XMIN_
# define Z4_MIN_PIN X_MIN_PIN
# elif Z4_USE_ENDSTOP == _XMAX_
# define Z4_MIN_PIN X_MAX_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 == _ZMIN_
# define Z4_MIN_PIN Z_MIN_PIN
# elif Z4_USE_ENDSTOP == _ZMAX_
# define Z4_MIN_PIN Z_MAX_PIN
# elif Z4_USE_ENDSTOP == _XDIAG_
# define Z4_MIN_PIN X_DIAG_PIN
# elif Z4_USE_ENDSTOP == _YDIAG_
# define Z4_MIN_PIN Y_DIAG_PIN
# elif Z4_USE_ENDSTOP == _ZDIAG_
# define Z4_MIN_PIN Z_DIAG_PIN
# elif Z4_USE_ENDSTOP == _E0DIAG_
# define Z4_MIN_PIN E0_DIAG_PIN
# elif Z4_USE_ENDSTOP == _E1DIAG_
# define Z4_MIN_PIN E1_DIAG_PIN
# elif Z4_USE_ENDSTOP == _E2DIAG_
# define Z4_MIN_PIN E2_DIAG_PIN
# elif Z4_USE_ENDSTOP == _E3DIAG_
# define Z4_MIN_PIN E3_DIAG_PIN
# elif Z4_USE_ENDSTOP == _E4DIAG_
# define Z4_MIN_PIN E4_DIAG_PIN
# elif Z4_USE_ENDSTOP == _E5DIAG_
# define Z4_MIN_PIN E5_DIAG_PIN
# elif Z4_USE_ENDSTOP == _E6DIAG_
# define Z4_MIN_PIN E6_DIAG_PIN
# elif Z4_USE_ENDSTOP == _E7DIAG_
# define Z4_MIN_PIN E7_DIAG_PIN
# endif
# endif
# define Z4_MAX_ENDSTOP_INVERTING false
# define Z4_MAX_ENDSTOP_INVERTING false
# endif
# endif
# endif
# endif
@ -1220,7 +1530,7 @@
// Other fans
// Other fans
# define HAS_FAN0 (PIN_EXISTS(FAN))
# define HAS_FAN0 (PIN_EXISTS(FAN))
# define _HAS_FAN(P) (PIN_EXISTS(FAN_ ##P) && CONTROLLER_FAN_PIN != FAN_ ##P##_PIN && E0_AUTO_FAN_PIN != FAN_ ##P##_PIN && E1_AUTO_FAN_PIN != FAN_ ##P##_PIN && E2_AUTO_FAN_PIN != FAN_ ##P##_PIN && E3_AUTO_FAN_PIN != FAN_ ##P##_PIN && E4_AUTO_FAN_PIN != FAN_ ##P##_PIN && E5_AUTO_FAN_PIN != FAN_ ##P##_PIN && E6_AUTO_FAN_PIN != FAN_ ##P##_PIN && E7_AUTO_FAN_PIN != FAN_ ##P##_PIN)
# define _HAS_FAN(P) (PIN_EXISTS(FAN##P) && CONTROLLER_FAN_PIN != FAN##P##_PIN && E0_AUTO_FAN_PIN != FAN##P##_PIN && E1_AUTO_FAN_PIN != FAN##P##_PIN && E2_AUTO_FAN_PIN != FAN##P##_PIN && E3_AUTO_FAN_PIN != FAN##P##_PIN && E4_AUTO_FAN_PIN != FAN##P##_PIN && E5_AUTO_FAN_PIN != FAN##P##_PIN && E6_AUTO_FAN_PIN != FAN##P##_PIN && E7_AUTO_FAN_PIN != FAN##P##_PIN)
# define HAS_FAN1 _HAS_FAN(1)
# define HAS_FAN1 _HAS_FAN(1)
# define HAS_FAN2 _HAS_FAN(2)
# define HAS_FAN2 _HAS_FAN(2)
# define HAS_FAN3 _HAS_FAN(3)
# define HAS_FAN3 _HAS_FAN(3)