From 09de17fb599051a2037aa70ca18098a901351360 Mon Sep 17 00:00:00 2001
From: Scott Lahteine <github@thinkyhead.com>
Date: Mon, 19 Apr 2021 13:30:21 -0500
Subject: [PATCH] Trigorilla Pro: Allow for swapped Z-stops

---
 Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h b/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h
index dc603cda54..5eefedb141 100644
--- a/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h
+++ b/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h
@@ -40,6 +40,8 @@
 
 #define DISABLE_JTAG
 
+//#define SWAPPED_Z_PLUGS
+
 //
 // EEPROM
 //
@@ -59,10 +61,18 @@
 #define X_STOP_PIN                          PG10
 #define Y_STOP_PIN                          PA12
 #ifndef Z_MIN_PIN
-  #define Z_MIN_PIN                         PA14
+  #ifdef SWAPPED_Z_PLUGS
+    #define Z_MIN_PIN                       PA14
+  #else
+    #define Z_MIN_PIN                       PA13
+  #endif
 #endif
 #ifndef Z_MAX_PIN
-  #define Z_MAX_PIN                         PA13
+  #ifdef SWAPPED_Z_PLUGS
+    #define Z_MAX_PIN                       PA13
+  #else
+    #define Z_MAX_PIN                       PA14
+  #endif
 #endif
 
 //
@@ -185,3 +195,5 @@
   #define SDSS                              PD2
   #define SD_DETECT_PIN                     -1
 #endif
+
+#undef SWAPPED_Z_PLUGS