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

+3-3
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

+1-1
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

+2-2
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

+2
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

+1-1
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

+6-6
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

+6-6
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

+4-4
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

+6-6
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

+6-6
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

Marlin/src/pins/lpc1768/pins_MKS_SBASE.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -303,14 +303,14 @@
303303
// https://github.com/makerbase-mks/MKS-SBASE/issues/25
304304
#define TMC_USE_SW_SPI
305305
#if ENABLED(TMC_USE_SW_SPI)
306-
#ifndef TMC_SW_MOSI
307-
#define TMC_SW_MOSI P0_03 // AUX1
306+
#ifndef TMC_SPI_MOSI
307+
#define TMC_SPI_MOSI P0_03 // AUX1
308308
#endif
309-
#ifndef TMC_SW_MISO
310-
#define TMC_SW_MISO P0_02 // AUX1
309+
#ifndef TMC_SPI_MISO
310+
#define TMC_SPI_MISO P0_02 // AUX1
311311
#endif
312-
#ifndef TMC_SW_SCK
313-
#define TMC_SW_SCK P0_26 // TH4
312+
#ifndef TMC_SPI_SCK
313+
#define TMC_SPI_SCK P0_26 // TH4
314314
#endif
315315
#endif
316316

Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -137,14 +137,14 @@
137137
// Software SPI pins for TMC2130 stepper drivers
138138
//
139139
#if ENABLED(TMC_USE_SW_SPI)
140-
#ifndef TMC_SW_MOSI
141-
#define TMC_SW_MOSI P4_28
140+
#ifndef TMC_SPI_MOSI
141+
#define TMC_SPI_MOSI P4_28
142142
#endif
143-
#ifndef TMC_SW_MISO
144-
#define TMC_SW_MISO P0_05
143+
#ifndef TMC_SPI_MISO
144+
#define TMC_SPI_MISO P0_05
145145
#endif
146-
#ifndef TMC_SW_SCK
147-
#define TMC_SW_SCK P0_04
146+
#ifndef TMC_SPI_SCK
147+
#define TMC_SPI_SCK P0_04
148148
#endif
149149
#endif
150150

Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,14 @@
102102
// Software SPI pins for TMC2130 stepper drivers
103103
//
104104
#if ENABLED(TMC_USE_SW_SPI)
105-
#ifndef TMC_SW_MOSI
106-
#define TMC_SW_MOSI P1_00 // ETH
105+
#ifndef TMC_SPI_MOSI
106+
#define TMC_SPI_MOSI P1_00 // ETH
107107
#endif
108-
#ifndef TMC_SW_MISO
109-
#define TMC_SW_MISO P1_08 // ETH
108+
#ifndef TMC_SPI_MISO
109+
#define TMC_SPI_MISO P1_08 // ETH
110110
#endif
111-
#ifndef TMC_SW_SCK
112-
#define TMC_SW_SCK P1_09 // ETH
111+
#ifndef TMC_SPI_SCK
112+
#define TMC_SPI_SCK P1_09 // ETH
113113
#endif
114114
#endif
115115

Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,14 @@
7373
// Default pins for TMC software SPI
7474
//
7575
#if ENABLED(TMC_USE_SW_SPI)
76-
#ifndef TMC_SW_MOSI
77-
#define TMC_SW_MOSI P1_16 // Ethernet Expansion - Pin 5
76+
#ifndef TMC_SPI_MOSI
77+
#define TMC_SPI_MOSI P1_16 // Ethernet Expansion - Pin 5
7878
#endif
79-
#ifndef TMC_SW_MISO
80-
#define TMC_SW_MISO P1_17 // Ethernet Expansion - Pin 6
79+
#ifndef TMC_SPI_MISO
80+
#define TMC_SPI_MISO P1_17 // Ethernet Expansion - Pin 6
8181
#endif
82-
#ifndef TMC_SW_SCK
83-
#define TMC_SW_SCK P1_08 // Ethernet Expansion - Pin 7
82+
#ifndef TMC_SPI_SCK
83+
#define TMC_SPI_SCK P1_08 // Ethernet Expansion - Pin 7
8484
#endif
8585
#endif
8686

Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,14 @@
9090
// Default pins for TMC software SPI
9191
//
9292
#if ENABLED(TMC_USE_SW_SPI)
93-
#ifndef TMC_SW_MOSI
94-
#define TMC_SW_MOSI P1_16 // Ethernet Expansion - Pin 5
93+
#ifndef TMC_SPI_MOSI
94+
#define TMC_SPI_MOSI P1_16 // Ethernet Expansion - Pin 5
9595
#endif
96-
#ifndef TMC_SW_MISO
97-
#define TMC_SW_MISO P1_17 // Ethernet Expansion - Pin 6
96+
#ifndef TMC_SPI_MISO
97+
#define TMC_SPI_MISO P1_17 // Ethernet Expansion - Pin 6
9898
#endif
99-
#ifndef TMC_SW_SCK
100-
#define TMC_SW_SCK P1_08 // Ethernet Expansion - Pin 7
99+
#ifndef TMC_SPI_SCK
100+
#define TMC_SPI_SCK P1_08 // Ethernet Expansion - Pin 7
101101
#endif
102102
#endif
103103

Marlin/src/pins/lpc1769/pins_FLY_CDY.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,14 @@
9797
// Software SPI pins for TMC2130 stepper drivers
9898
//
9999
#if ENABLED(TMC_USE_SW_SPI)
100-
#ifndef TMC_SW_MOSI
101-
#define TMC_SW_MOSI P0_20
100+
#ifndef TMC_SPI_MOSI
101+
#define TMC_SPI_MOSI P0_20
102102
#endif
103-
#ifndef TMC_SW_MISO
104-
#define TMC_SW_MISO P0_19
103+
#ifndef TMC_SPI_MISO
104+
#define TMC_SPI_MISO P0_19
105105
#endif
106-
#ifndef TMC_SW_SCK
107-
#define TMC_SW_SCK P0_21
106+
#ifndef TMC_SPI_SCK
107+
#define TMC_SPI_SCK P0_21
108108
#endif
109109
#endif
110110

Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -151,14 +151,14 @@
151151
// Software SPI pins for TMC2130 stepper drivers
152152
//
153153
#if ENABLED(TMC_USE_SW_SPI)
154-
#ifndef TMC_SW_MOSI
155-
#define TMC_SW_MOSI P1_16
154+
#ifndef TMC_SPI_MOSI
155+
#define TMC_SPI_MOSI P1_16
156156
#endif
157-
#ifndef TMC_SW_MISO
158-
#define TMC_SW_MISO P0_05
157+
#ifndef TMC_SPI_MISO
158+
#define TMC_SPI_MISO P0_05
159159
#endif
160-
#ifndef TMC_SW_SCK
161-
#define TMC_SW_SCK P0_04
160+
#ifndef TMC_SPI_SCK
161+
#define TMC_SPI_SCK P0_04
162162
#endif
163163
#endif
164164

Marlin/src/pins/pinsDebug_list.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -489,14 +489,14 @@
489489
REPORT_NAME_DIGITAL(__LINE__, EXP3_10_PIN)
490490
#endif
491491

492-
#if _EXISTS(TMC_SW_MISO)
493-
REPORT_NAME_DIGITAL(__LINE__, TMC_SW_MISO)
492+
#if _EXISTS(TMC_SPI_MISO)
493+
REPORT_NAME_DIGITAL(__LINE__, TMC_SPI_MISO)
494494
#endif
495-
#if _EXISTS(TMC_SW_MOSI)
496-
REPORT_NAME_DIGITAL(__LINE__, TMC_SW_MOSI)
495+
#if _EXISTS(TMC_SPI_MOSI)
496+
REPORT_NAME_DIGITAL(__LINE__, TMC_SPI_MOSI)
497497
#endif
498-
#if _EXISTS(TMC_SW_SCK)
499-
REPORT_NAME_DIGITAL(__LINE__, TMC_SW_SCK)
498+
#if _EXISTS(TMC_SPI_SCK)
499+
REPORT_NAME_DIGITAL(__LINE__, TMC_SPI_SCK)
500500
#endif
501501
#if _EXISTS(TFTGLCD_CS)
502502
REPORT_NAME_DIGITAL(__LINE__, TFTGLCD_CS)

Marlin/src/pins/ramps/pins_RAMPS.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -321,14 +321,14 @@
321321
// TMC software SPI
322322
//
323323
#if ENABLED(TMC_USE_SW_SPI)
324-
#ifndef TMC_SW_MOSI
325-
#define TMC_SW_MOSI 66
324+
#ifndef TMC_SPI_MOSI
325+
#define TMC_SPI_MOSI 66
326326
#endif
327-
#ifndef TMC_SW_MISO
328-
#define TMC_SW_MISO 44
327+
#ifndef TMC_SPI_MISO
328+
#define TMC_SPI_MISO 44
329329
#endif
330-
#ifndef TMC_SW_SCK
331-
#define TMC_SW_SCK 64
330+
#ifndef TMC_SPI_SCK
331+
#define TMC_SPI_SCK 64
332332
#endif
333333
#endif
334334

Marlin/src/pins/ramps/pins_RAMPS_S_12.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -220,14 +220,14 @@
220220
// TMC software SPI
221221
//
222222
#if ENABLED(TMC_USE_SW_SPI)
223-
#ifndef TMC_SW_MOSI
224-
#define TMC_SW_MOSI 51
223+
#ifndef TMC_SPI_MOSI
224+
#define TMC_SPI_MOSI 51
225225
#endif
226-
#ifndef TMC_SW_MISO
227-
#define TMC_SW_MISO 50
226+
#ifndef TMC_SPI_MISO
227+
#define TMC_SPI_MISO 50
228228
#endif
229-
#ifndef TMC_SW_SCK
230-
#define TMC_SW_SCK 53
229+
#ifndef TMC_SPI_SCK
230+
#define TMC_SPI_SCK 53
231231
#endif
232232
#endif
233233

Marlin/src/pins/ramps/pins_TT_OSCAR.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -153,14 +153,14 @@
153153
// Default pins for TMC software SPI
154154
//
155155
//#if ENABLED(TMC_USE_SW_SPI)
156-
// #ifndef TMC_SW_MOSI
157-
// #define TMC_SW_MOSI 66
156+
// #ifndef TMC_SPI_MOSI
157+
// #define TMC_SPI_MOSI 66
158158
// #endif
159-
// #ifndef TMC_SW_MISO
160-
// #define TMC_SW_MISO 44
159+
// #ifndef TMC_SPI_MISO
160+
// #define TMC_SPI_MISO 44
161161
// #endif
162-
// #ifndef TMC_SW_SCK
163-
// #define TMC_SW_SCK 64
162+
// #ifndef TMC_SPI_SCK
163+
// #define TMC_SPI_SCK 64
164164
// #endif
165165
//#endif
166166

0 commit comments

Comments
 (0)