Skip to content

Commit 89cd4c4

Browse files
InsanityAutomationRPGFabi
authored andcommitted
🔧 Add RAMPS TMC SPI pins when !TMC_USE_SW_SPI (MarlinFirmware#26960)
* Allows RAMPS to auto assign HW SPI Pins for TMC
1 parent 537cd9f commit 89cd4c4

File tree

1 file changed

+21
-9
lines changed

1 file changed

+21
-9
lines changed

Marlin/src/pins/ramps/pins_RAMPS.h

+21-9
Original file line numberDiff line numberDiff line change
@@ -320,17 +320,29 @@
320320
#endif
321321

322322
//
323-
// TMC software SPI
323+
// TMC SPI
324324
//
325325
#if HAS_TMC_SPI
326-
#ifndef TMC_SPI_MOSI
327-
#define TMC_SPI_MOSI AUX2_09
328-
#endif
329-
#ifndef TMC_SPI_MISO
330-
#define TMC_SPI_MISO AUX2_07
331-
#endif
332-
#ifndef TMC_SPI_SCK
333-
#define TMC_SPI_SCK AUX2_05
326+
#if ENABLED(TMC_USE_SW_SPI)
327+
#ifndef TMC_SPI_MOSI
328+
#define TMC_SPI_MOSI AUX2_09
329+
#endif
330+
#ifndef TMC_SPI_MISO
331+
#define TMC_SPI_MISO AUX2_07
332+
#endif
333+
#ifndef TMC_SPI_SCK
334+
#define TMC_SPI_SCK AUX2_05
335+
#endif
336+
#else
337+
#ifndef TMC_SPI_MOSI
338+
#define TMC_SPI_MOSI AUX3_04
339+
#endif
340+
#ifndef TMC_SPI_MISO
341+
#define TMC_SPI_MISO AUX3_03
342+
#endif
343+
#ifndef TMC_SPI_SCK
344+
#define TMC_SPI_SCK AUX3_05
345+
#endif
334346
#endif
335347
#endif
336348

0 commit comments

Comments
 (0)