Skip to content

Commit

Permalink
Fix BTT GTR 1.0 endstop/DIAG pins (MarlinFirmware#20296)
Browse files Browse the repository at this point in the history
  • Loading branch information
ellensp authored and vgadreau committed Dec 9, 2020
1 parent e033f05 commit 7660e6e
Showing 1 changed file with 45 additions and 6 deletions.
51 changes: 45 additions & 6 deletions Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,54 @@

#define PS_ON_PIN PH6

//
// Trinamic Stallguard pins
//
#define X_DIAG_PIN PF2 // X-
#define Y_DIAG_PIN PC13 // Y-
#define Z_DIAG_PIN PE0 // Z-
#define E0_DIAG_PIN PG14 // X+
#define E1_DIAG_PIN PG9 // Y+
#define E2_DIAG_PIN PD3 // Z+

//
// Limit Switches
//
#define X_MIN_PIN PF2
#define X_MAX_PIN PG14
#define Y_MIN_PIN PC13
#define Y_MAX_PIN PG9
#define Z_MIN_PIN PE0
#define Z_MAX_PIN PD3
#ifdef X_STALL_SENSITIVITY
#define X_STOP_PIN X_DIAG_PIN
#if X_HOME_DIR < 0
#define X_MAX_PIN E0_DIAG_PIN // X+
#else
#define X_MIN_PIN E0_DIAG_PIN // X+
#endif
#else
#define X_MIN_PIN X_DIAG_PIN // X-
#define X_MAX_PIN E0_DIAG_PIN // X+
#endif

#ifdef Y_STALL_SENSITIVITY
#define Y_STOP_PIN Y_DIAG_PIN
#if Y_HOME_DIR < 0
#define Y_MAX_PIN E1_DIAG_PIN // Y+
#else
#define Y_MIN_PIN E1_DIAG_PIN // Y+
#endif
#else
#define Y_MIN_PIN Y_DIAG_PIN // Y-
#define Y_MAX_PIN E1_DIAG_PIN // Y+
#endif

#ifdef Z_STALL_SENSITIVITY
#define Z_STOP_PIN Z_DIAG_PIN
#if Z_HOME_DIR < 0
#define Z_MAX_PIN E2_DIAG_PIN // Z+
#else
#define Z_MIN_PIN E2_DIAG_PIN // Z+
#endif
#else
#define Z_MIN_PIN Z_DIAG_PIN // Z-
#define Z_MAX_PIN E2_DIAG_PIN // Z+
#endif

//
// Pins on the extender
Expand Down

0 comments on commit 7660e6e

Please sign in to comment.