Skip to content

Commit

Permalink
🔧 Add RAMPS TMC SPI pins when !TMC_USE_SW_SPI (#26960)
Browse files Browse the repository at this point in the history
* Allows RAMPS to auto assign HW SPI Pins for TMC
  • Loading branch information
InsanityAutomation authored Apr 21, 2024
1 parent bc0d7d7 commit f433b2c
Showing 1 changed file with 21 additions and 9 deletions.
30 changes: 21 additions & 9 deletions Marlin/src/pins/ramps/pins_RAMPS.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit f433b2c

Please sign in to comment.