From f433b2c4338294bbe3189b58d6223a31a2bebb96 Mon Sep 17 00:00:00 2001 From: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> Date: Sat, 20 Apr 2024 21:27:56 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Add=20RAMPS=20TMC=20SPI=20pins?= =?UTF-8?q?=20when=20!TMC=5FUSE=5FSW=5FSPI=20(#26960)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Allows RAMPS to auto assign HW SPI Pins for TMC --- Marlin/src/pins/ramps/pins_RAMPS.h | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/Marlin/src/pins/ramps/pins_RAMPS.h b/Marlin/src/pins/ramps/pins_RAMPS.h index 0195f3a1bc9a..0e6e33e18e88 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS.h +++ b/Marlin/src/pins/ramps/pins_RAMPS.h @@ -320,17 +320,29 @@ #endif // -// TMC software SPI +// TMC SPI // #if HAS_TMC_SPI - #ifndef TMC_SPI_MOSI - #define TMC_SPI_MOSI AUX2_09 - #endif - #ifndef TMC_SPI_MISO - #define TMC_SPI_MISO AUX2_07 - #endif - #ifndef TMC_SPI_SCK - #define TMC_SPI_SCK AUX2_05 + #if ENABLED(TMC_USE_SW_SPI) + #ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI AUX2_09 + #endif + #ifndef TMC_SPI_MISO + #define TMC_SPI_MISO AUX2_07 + #endif + #ifndef TMC_SPI_SCK + #define TMC_SPI_SCK AUX2_05 + #endif + #else + #ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI AUX3_04 + #endif + #ifndef TMC_SPI_MISO + #define TMC_SPI_MISO AUX3_03 + #endif + #ifndef TMC_SPI_SCK + #define TMC_SPI_SCK AUX3_05 + #endif #endif #endif