Skip to content

Commit 41d78a2

Browse files
committed
♻️ TMC_SW_* => TMC_SPI_*
1 parent 5febc39 commit 41d78a2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+298
-296
lines changed

Marlin/Configuration_adv.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2963,9 +2963,9 @@
29632963
* but you can override or define them here.
29642964
*/
29652965
//#define TMC_USE_SW_SPI
2966-
//#define TMC_SW_MOSI -1
2967-
//#define TMC_SW_MISO -1
2968-
//#define TMC_SW_SCK -1
2966+
//#define TMC_SPI_MOSI -1
2967+
//#define TMC_SPI_MISO -1
2968+
//#define TMC_SPI_SCK -1
29692969

29702970
// @section tmc/serial
29712971

Marlin/src/HAL/DUE/inc/SanityCheck.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
* Usually the hardware SPI pins are only available to the LCD. This makes the DUE hard SPI used at the same time
6969
* as the TMC2130 soft SPI the most common setup.
7070
*/
71-
#define _IS_HW_SPI(P) (defined(TMC_SW_##P) && (TMC_SW_##P == SD_MOSI_PIN || TMC_SW_##P == SD_MISO_PIN || TMC_SW_##P == SD_SCK_PIN))
71+
#define _IS_HW_SPI(P) (defined(TMC_SPI_##P) && (TMC_SPI_##P == SD_MOSI_PIN || TMC_SPI_##P == SD_MISO_PIN || TMC_SPI_##P == SD_SCK_PIN))
7272

7373
#if HAS_MEDIA && HAS_DRIVER(TMC2130)
7474
#if ENABLED(TMC_USE_SW_SPI)

Marlin/src/HAL/LPC1768/inc/SanityCheck.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ static_assert(DISABLED(BAUD_RATE_GCODE), "BAUD_RATE_GCODE is not yet supported o
9999
#if USING_HW_SERIAL0
100100
#define IS_TX0(P) (P == P0_02)
101101
#define IS_RX0(P) (P == P0_03)
102-
#if IS_TX0(TMC_SW_MISO) || IS_RX0(TMC_SW_MOSI)
102+
#if IS_TX0(TMC_SPI_MISO) || IS_RX0(TMC_SPI_MOSI)
103103
#error "Serial port pins (0) conflict with Trinamic SPI pins!"
104104
#elif HAS_PRUSA_MMU1 && (IS_TX0(E_MUX1_PIN) || IS_RX0(E_MUX0_PIN))
105105
#error "Serial port pins (0) conflict with Multi-Material-Unit multiplexer pins!"
@@ -115,7 +115,7 @@ static_assert(DISABLED(BAUD_RATE_GCODE), "BAUD_RATE_GCODE is not yet supported o
115115
#define IS_RX1(P) (P == P0_16)
116116
#define _IS_TX1_1 IS_TX1
117117
#define _IS_RX1_1 IS_RX1
118-
#if IS_TX1(TMC_SW_SCK)
118+
#if IS_TX1(TMC_SPI_SCK)
119119
#error "Serial port pins (1) conflict with other pins!"
120120
#elif HAS_ROTARY_ENCODER
121121
#if IS_TX1(BTN_EN2) || IS_RX1(BTN_EN1)

Marlin/src/inc/SanityCheck.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,8 @@
658658
#error "EXTRA_LIN_ADVANCE_K is now ADVANCE_K_EXTRA."
659659
#elif defined(POLAR_SEGMENTS_PER_SECOND) || defined(DELTA_SEGMENTS_PER_SECOND) || defined(SCARA_SEGMENTS_PER_SECOND) || defined(TPARA_SEGMENTS_PER_SECOND)
660660
#error "(POLAR|DELTA|SCARA|TPARA)_SEGMENTS_PER_SECOND is now DEFAULT_SEGMENTS_PER_SECOND."
661+
#elif defined(TMC_SW_MOSI) || defined(TMC_SW_MISO) || defined(TMC_SW_SCK)
662+
#error "TMC_SW_(MOSI|MISO|SCK) is now TMC_SPI_(MOSI|MISO|SCK)."
661663
#endif
662664

663665
// L64xx stepper drivers have been removed

Marlin/src/module/stepper/trinamic.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ enum StealthIndex : uint8_t {
4646
// AI = Axis Enum Index
4747
// SWHW = SW/SH UART selection
4848
#if ENABLED(TMC_USE_SW_SPI)
49-
#define __TMC_SPI_DEFINE(IC, ST, L, AI) TMCMarlin<IC##Stepper, L, AI> stepper##ST(ST##_CS_PIN, float(ST##_RSENSE), TMC_SW_MOSI, TMC_SW_MISO, TMC_SW_SCK, ST##_CHAIN_POS)
49+
#define __TMC_SPI_DEFINE(IC, ST, L, AI) TMCMarlin<IC##Stepper, L, AI> stepper##ST(ST##_CS_PIN, float(ST##_RSENSE), TMC_SPI_MOSI, TMC_SPI_MISO, TMC_SPI_SCK, ST##_CHAIN_POS)
5050
#else
5151
#define __TMC_SPI_DEFINE(IC, ST, L, AI) TMCMarlin<IC##Stepper, L, AI> stepper##ST(ST##_CS_PIN, float(ST##_RSENSE), ST##_CHAIN_POS)
5252
#endif

Marlin/src/pins/linux/pins_RAMPS_LINUX.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -250,14 +250,14 @@
250250
* Default pins for TMC software SPI
251251
*/
252252
#if ENABLED(TMC_USE_SW_SPI)
253-
#ifndef TMC_SW_MOSI
254-
#define TMC_SW_MOSI 66
253+
#ifndef TMC_SPI_MOSI
254+
#define TMC_SPI_MOSI 66
255255
#endif
256-
#ifndef TMC_SW_MISO
257-
#define TMC_SW_MISO 44
256+
#ifndef TMC_SPI_MISO
257+
#define TMC_SPI_MISO 44
258258
#endif
259-
#ifndef TMC_SW_SCK
260-
#define TMC_SW_SCK 64
259+
#ifndef TMC_SPI_SCK
260+
#define TMC_SPI_SCK 64
261261
#endif
262262
#endif
263263

Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,14 @@
7676
// Software SPI pins for TMC2130 stepper drivers
7777
//
7878
#if ENABLED(TMC_USE_SW_SPI)
79-
#ifndef TMC_SW_MOSI
80-
#define TMC_SW_MOSI P0_18 // ETH
79+
#ifndef TMC_SPI_MOSI
80+
#define TMC_SPI_MOSI P0_18 // ETH
8181
#endif
82-
#ifndef TMC_SW_MISO
83-
#define TMC_SW_MISO P0_17 // ETH
82+
#ifndef TMC_SPI_MISO
83+
#define TMC_SPI_MISO P0_17 // ETH
8484
#endif
85-
#ifndef TMC_SW_SCK
86-
#define TMC_SW_SCK P0_15 // ETH
85+
#ifndef TMC_SPI_SCK
86+
#define TMC_SPI_SCK P0_15 // ETH
8787
#endif
8888
#endif
8989

Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,12 @@
167167
// When using any TMC SPI-based drivers, software SPI is used
168168
// because pins may be shared with the display or SD card.
169169
#define TMC_USE_SW_SPI
170-
#define TMC_SW_MOSI EXP2_06_PIN
171-
#define TMC_SW_MISO EXP2_01_PIN
170+
#define TMC_SPI_MOSI EXP2_06_PIN
171+
#define TMC_SPI_MISO EXP2_01_PIN
172172
// To minimize pin usage use the same clock pin as the display/SD card reader. (May generate LCD noise.)
173-
#define TMC_SW_SCK EXP2_02_PIN
173+
#define TMC_SPI_SCK EXP2_02_PIN
174174
// If pin 2_06 is unused, it can be used for the clock to avoid the LCD noise.
175-
//#define TMC_SW_SCK P2_06
175+
//#define TMC_SPI_SCK P2_06
176176

177177
#if ENABLED(SOFTWARE_DRIVER_ENABLE)
178178

Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,14 @@
142142
// Software SPI pins for TMC2130 stepper drivers
143143
//
144144
#if ENABLED(TMC_USE_SW_SPI)
145-
#ifndef TMC_SW_MOSI
146-
#define TMC_SW_MOSI P4_28
145+
#ifndef TMC_SPI_MOSI
146+
#define TMC_SPI_MOSI P4_28
147147
#endif
148-
#ifndef TMC_SW_MISO
149-
#define TMC_SW_MISO P0_05
148+
#ifndef TMC_SPI_MISO
149+
#define TMC_SPI_MISO P0_05
150150
#endif
151-
#ifndef TMC_SW_SCK
152-
#define TMC_SW_SCK P0_04
151+
#ifndef TMC_SPI_SCK
152+
#define TMC_SPI_SCK P0_04
153153
#endif
154154
#endif
155155

Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -199,14 +199,14 @@
199199
// Software SPI pins for TMC2130 stepper drivers
200200
//
201201
#if ENABLED(TMC_USE_SW_SPI)
202-
#ifndef TMC_SW_MOSI
203-
#define TMC_SW_MOSI P1_17
202+
#ifndef TMC_SPI_MOSI
203+
#define TMC_SPI_MOSI P1_17
204204
#endif
205-
#ifndef TMC_SW_MISO
206-
#define TMC_SW_MISO P0_05
205+
#ifndef TMC_SPI_MISO
206+
#define TMC_SPI_MISO P0_05
207207
#endif
208-
#ifndef TMC_SW_SCK
209-
#define TMC_SW_SCK P0_04
208+
#ifndef TMC_SPI_SCK
209+
#define TMC_SPI_SCK P0_04
210210
#endif
211211
#endif
212212

0 commit comments

Comments
 (0)