♻️ TMC_SW_* => TMC_SPI_*

This commit is contained in:
Scott Lahteine
2024-01-30 19:38:57 -06:00
parent 5febc393db
commit 41d78a2b64
55 changed files with 298 additions and 296 deletions

View File

@@ -2963,9 +2963,9 @@
* but you can override or define them here. * but you can override or define them here.
*/ */
//#define TMC_USE_SW_SPI //#define TMC_USE_SW_SPI
//#define TMC_SW_MOSI -1 //#define TMC_SPI_MOSI -1
//#define TMC_SW_MISO -1 //#define TMC_SPI_MISO -1
//#define TMC_SW_SCK -1 //#define TMC_SPI_SCK -1
// @section tmc/serial // @section tmc/serial

View File

@@ -68,7 +68,7 @@
* Usually the hardware SPI pins are only available to the LCD. This makes the DUE hard SPI used at the same time * Usually the hardware SPI pins are only available to the LCD. This makes the DUE hard SPI used at the same time
* as the TMC2130 soft SPI the most common setup. * as the TMC2130 soft SPI the most common setup.
*/ */
#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)) #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))
#if HAS_MEDIA && HAS_DRIVER(TMC2130) #if HAS_MEDIA && HAS_DRIVER(TMC2130)
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)

View File

@@ -99,7 +99,7 @@ static_assert(DISABLED(BAUD_RATE_GCODE), "BAUD_RATE_GCODE is not yet supported o
#if USING_HW_SERIAL0 #if USING_HW_SERIAL0
#define IS_TX0(P) (P == P0_02) #define IS_TX0(P) (P == P0_02)
#define IS_RX0(P) (P == P0_03) #define IS_RX0(P) (P == P0_03)
#if IS_TX0(TMC_SW_MISO) || IS_RX0(TMC_SW_MOSI) #if IS_TX0(TMC_SPI_MISO) || IS_RX0(TMC_SPI_MOSI)
#error "Serial port pins (0) conflict with Trinamic SPI pins!" #error "Serial port pins (0) conflict with Trinamic SPI pins!"
#elif HAS_PRUSA_MMU1 && (IS_TX0(E_MUX1_PIN) || IS_RX0(E_MUX0_PIN)) #elif HAS_PRUSA_MMU1 && (IS_TX0(E_MUX1_PIN) || IS_RX0(E_MUX0_PIN))
#error "Serial port pins (0) conflict with Multi-Material-Unit multiplexer pins!" #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
#define IS_RX1(P) (P == P0_16) #define IS_RX1(P) (P == P0_16)
#define _IS_TX1_1 IS_TX1 #define _IS_TX1_1 IS_TX1
#define _IS_RX1_1 IS_RX1 #define _IS_RX1_1 IS_RX1
#if IS_TX1(TMC_SW_SCK) #if IS_TX1(TMC_SPI_SCK)
#error "Serial port pins (1) conflict with other pins!" #error "Serial port pins (1) conflict with other pins!"
#elif HAS_ROTARY_ENCODER #elif HAS_ROTARY_ENCODER
#if IS_TX1(BTN_EN2) || IS_RX1(BTN_EN1) #if IS_TX1(BTN_EN2) || IS_RX1(BTN_EN1)

View File

@@ -658,6 +658,8 @@
#error "EXTRA_LIN_ADVANCE_K is now ADVANCE_K_EXTRA." #error "EXTRA_LIN_ADVANCE_K is now ADVANCE_K_EXTRA."
#elif defined(POLAR_SEGMENTS_PER_SECOND) || defined(DELTA_SEGMENTS_PER_SECOND) || defined(SCARA_SEGMENTS_PER_SECOND) || defined(TPARA_SEGMENTS_PER_SECOND) #elif defined(POLAR_SEGMENTS_PER_SECOND) || defined(DELTA_SEGMENTS_PER_SECOND) || defined(SCARA_SEGMENTS_PER_SECOND) || defined(TPARA_SEGMENTS_PER_SECOND)
#error "(POLAR|DELTA|SCARA|TPARA)_SEGMENTS_PER_SECOND is now DEFAULT_SEGMENTS_PER_SECOND." #error "(POLAR|DELTA|SCARA|TPARA)_SEGMENTS_PER_SECOND is now DEFAULT_SEGMENTS_PER_SECOND."
#elif defined(TMC_SW_MOSI) || defined(TMC_SW_MISO) || defined(TMC_SW_SCK)
#error "TMC_SW_(MOSI|MISO|SCK) is now TMC_SPI_(MOSI|MISO|SCK)."
#endif #endif
// L64xx stepper drivers have been removed // L64xx stepper drivers have been removed

View File

@@ -46,7 +46,7 @@ enum StealthIndex : uint8_t {
// AI = Axis Enum Index // AI = Axis Enum Index
// SWHW = SW/SH UART selection // SWHW = SW/SH UART selection
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)
#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) #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)
#else #else
#define __TMC_SPI_DEFINE(IC, ST, L, AI) TMCMarlin<IC##Stepper, L, AI> stepper##ST(ST##_CS_PIN, float(ST##_RSENSE), ST##_CHAIN_POS) #define __TMC_SPI_DEFINE(IC, ST, L, AI) TMCMarlin<IC##Stepper, L, AI> stepper##ST(ST##_CS_PIN, float(ST##_RSENSE), ST##_CHAIN_POS)
#endif #endif

View File

@@ -250,14 +250,14 @@
* Default pins for TMC software SPI * Default pins for TMC software SPI
*/ */
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI #ifndef TMC_SPI_MOSI
#define TMC_SW_MOSI 66 #define TMC_SPI_MOSI 66
#endif #endif
#ifndef TMC_SW_MISO #ifndef TMC_SPI_MISO
#define TMC_SW_MISO 44 #define TMC_SPI_MISO 44
#endif #endif
#ifndef TMC_SW_SCK #ifndef TMC_SPI_SCK
#define TMC_SW_SCK 64 #define TMC_SPI_SCK 64
#endif #endif
#endif #endif

View File

@@ -76,14 +76,14 @@
// Software SPI pins for TMC2130 stepper drivers // Software SPI pins for TMC2130 stepper drivers
// //
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI #ifndef TMC_SPI_MOSI
#define TMC_SW_MOSI P0_18 // ETH #define TMC_SPI_MOSI P0_18 // ETH
#endif #endif
#ifndef TMC_SW_MISO #ifndef TMC_SPI_MISO
#define TMC_SW_MISO P0_17 // ETH #define TMC_SPI_MISO P0_17 // ETH
#endif #endif
#ifndef TMC_SW_SCK #ifndef TMC_SPI_SCK
#define TMC_SW_SCK P0_15 // ETH #define TMC_SPI_SCK P0_15 // ETH
#endif #endif
#endif #endif

View File

@@ -167,12 +167,12 @@
// When using any TMC SPI-based drivers, software SPI is used // When using any TMC SPI-based drivers, software SPI is used
// because pins may be shared with the display or SD card. // because pins may be shared with the display or SD card.
#define TMC_USE_SW_SPI #define TMC_USE_SW_SPI
#define TMC_SW_MOSI EXP2_06_PIN #define TMC_SPI_MOSI EXP2_06_PIN
#define TMC_SW_MISO EXP2_01_PIN #define TMC_SPI_MISO EXP2_01_PIN
// To minimize pin usage use the same clock pin as the display/SD card reader. (May generate LCD noise.) // To minimize pin usage use the same clock pin as the display/SD card reader. (May generate LCD noise.)
#define TMC_SW_SCK EXP2_02_PIN #define TMC_SPI_SCK EXP2_02_PIN
// If pin 2_06 is unused, it can be used for the clock to avoid the LCD noise. // If pin 2_06 is unused, it can be used for the clock to avoid the LCD noise.
//#define TMC_SW_SCK P2_06 //#define TMC_SPI_SCK P2_06
#if ENABLED(SOFTWARE_DRIVER_ENABLE) #if ENABLED(SOFTWARE_DRIVER_ENABLE)

View File

@@ -142,14 +142,14 @@
// Software SPI pins for TMC2130 stepper drivers // Software SPI pins for TMC2130 stepper drivers
// //
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI #ifndef TMC_SPI_MOSI
#define TMC_SW_MOSI P4_28 #define TMC_SPI_MOSI P4_28
#endif #endif
#ifndef TMC_SW_MISO #ifndef TMC_SPI_MISO
#define TMC_SW_MISO P0_05 #define TMC_SPI_MISO P0_05
#endif #endif
#ifndef TMC_SW_SCK #ifndef TMC_SPI_SCK
#define TMC_SW_SCK P0_04 #define TMC_SPI_SCK P0_04
#endif #endif
#endif #endif

View File

@@ -199,14 +199,14 @@
// Software SPI pins for TMC2130 stepper drivers // Software SPI pins for TMC2130 stepper drivers
// //
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI #ifndef TMC_SPI_MOSI
#define TMC_SW_MOSI P1_17 #define TMC_SPI_MOSI P1_17
#endif #endif
#ifndef TMC_SW_MISO #ifndef TMC_SPI_MISO
#define TMC_SW_MISO P0_05 #define TMC_SPI_MISO P0_05
#endif #endif
#ifndef TMC_SW_SCK #ifndef TMC_SPI_SCK
#define TMC_SW_SCK P0_04 #define TMC_SPI_SCK P0_04
#endif #endif
#endif #endif

View File

@@ -303,14 +303,14 @@
// https://github.com/makerbase-mks/MKS-SBASE/issues/25 // https://github.com/makerbase-mks/MKS-SBASE/issues/25
#define TMC_USE_SW_SPI #define TMC_USE_SW_SPI
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI #ifndef TMC_SPI_MOSI
#define TMC_SW_MOSI P0_03 // AUX1 #define TMC_SPI_MOSI P0_03 // AUX1
#endif #endif
#ifndef TMC_SW_MISO #ifndef TMC_SPI_MISO
#define TMC_SW_MISO P0_02 // AUX1 #define TMC_SPI_MISO P0_02 // AUX1
#endif #endif
#ifndef TMC_SW_SCK #ifndef TMC_SPI_SCK
#define TMC_SW_SCK P0_26 // TH4 #define TMC_SPI_SCK P0_26 // TH4
#endif #endif
#endif #endif

View File

@@ -137,14 +137,14 @@
// Software SPI pins for TMC2130 stepper drivers // Software SPI pins for TMC2130 stepper drivers
// //
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI #ifndef TMC_SPI_MOSI
#define TMC_SW_MOSI P4_28 #define TMC_SPI_MOSI P4_28
#endif #endif
#ifndef TMC_SW_MISO #ifndef TMC_SPI_MISO
#define TMC_SW_MISO P0_05 #define TMC_SPI_MISO P0_05
#endif #endif
#ifndef TMC_SW_SCK #ifndef TMC_SPI_SCK
#define TMC_SW_SCK P0_04 #define TMC_SPI_SCK P0_04
#endif #endif
#endif #endif

View File

@@ -102,14 +102,14 @@
// Software SPI pins for TMC2130 stepper drivers // Software SPI pins for TMC2130 stepper drivers
// //
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI #ifndef TMC_SPI_MOSI
#define TMC_SW_MOSI P1_00 // ETH #define TMC_SPI_MOSI P1_00 // ETH
#endif #endif
#ifndef TMC_SW_MISO #ifndef TMC_SPI_MISO
#define TMC_SW_MISO P1_08 // ETH #define TMC_SPI_MISO P1_08 // ETH
#endif #endif
#ifndef TMC_SW_SCK #ifndef TMC_SPI_SCK
#define TMC_SW_SCK P1_09 // ETH #define TMC_SPI_SCK P1_09 // ETH
#endif #endif
#endif #endif

View File

@@ -73,14 +73,14 @@
// Default pins for TMC software SPI // Default pins for TMC software SPI
// //
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI #ifndef TMC_SPI_MOSI
#define TMC_SW_MOSI P1_16 // Ethernet Expansion - Pin 5 #define TMC_SPI_MOSI P1_16 // Ethernet Expansion - Pin 5
#endif #endif
#ifndef TMC_SW_MISO #ifndef TMC_SPI_MISO
#define TMC_SW_MISO P1_17 // Ethernet Expansion - Pin 6 #define TMC_SPI_MISO P1_17 // Ethernet Expansion - Pin 6
#endif #endif
#ifndef TMC_SW_SCK #ifndef TMC_SPI_SCK
#define TMC_SW_SCK P1_08 // Ethernet Expansion - Pin 7 #define TMC_SPI_SCK P1_08 // Ethernet Expansion - Pin 7
#endif #endif
#endif #endif

View File

@@ -90,14 +90,14 @@
// Default pins for TMC software SPI // Default pins for TMC software SPI
// //
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI #ifndef TMC_SPI_MOSI
#define TMC_SW_MOSI P1_16 // Ethernet Expansion - Pin 5 #define TMC_SPI_MOSI P1_16 // Ethernet Expansion - Pin 5
#endif #endif
#ifndef TMC_SW_MISO #ifndef TMC_SPI_MISO
#define TMC_SW_MISO P1_17 // Ethernet Expansion - Pin 6 #define TMC_SPI_MISO P1_17 // Ethernet Expansion - Pin 6
#endif #endif
#ifndef TMC_SW_SCK #ifndef TMC_SPI_SCK
#define TMC_SW_SCK P1_08 // Ethernet Expansion - Pin 7 #define TMC_SPI_SCK P1_08 // Ethernet Expansion - Pin 7
#endif #endif
#endif #endif

View File

@@ -97,14 +97,14 @@
// Software SPI pins for TMC2130 stepper drivers // Software SPI pins for TMC2130 stepper drivers
// //
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI #ifndef TMC_SPI_MOSI
#define TMC_SW_MOSI P0_20 #define TMC_SPI_MOSI P0_20
#endif #endif
#ifndef TMC_SW_MISO #ifndef TMC_SPI_MISO
#define TMC_SW_MISO P0_19 #define TMC_SPI_MISO P0_19
#endif #endif
#ifndef TMC_SW_SCK #ifndef TMC_SPI_SCK
#define TMC_SW_SCK P0_21 #define TMC_SPI_SCK P0_21
#endif #endif
#endif #endif

View File

@@ -151,14 +151,14 @@
// Software SPI pins for TMC2130 stepper drivers // Software SPI pins for TMC2130 stepper drivers
// //
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI #ifndef TMC_SPI_MOSI
#define TMC_SW_MOSI P1_16 #define TMC_SPI_MOSI P1_16
#endif #endif
#ifndef TMC_SW_MISO #ifndef TMC_SPI_MISO
#define TMC_SW_MISO P0_05 #define TMC_SPI_MISO P0_05
#endif #endif
#ifndef TMC_SW_SCK #ifndef TMC_SPI_SCK
#define TMC_SW_SCK P0_04 #define TMC_SPI_SCK P0_04
#endif #endif
#endif #endif

View File

@@ -489,14 +489,14 @@
REPORT_NAME_DIGITAL(__LINE__, EXP3_10_PIN) REPORT_NAME_DIGITAL(__LINE__, EXP3_10_PIN)
#endif #endif
#if _EXISTS(TMC_SW_MISO) #if _EXISTS(TMC_SPI_MISO)
REPORT_NAME_DIGITAL(__LINE__, TMC_SW_MISO) REPORT_NAME_DIGITAL(__LINE__, TMC_SPI_MISO)
#endif #endif
#if _EXISTS(TMC_SW_MOSI) #if _EXISTS(TMC_SPI_MOSI)
REPORT_NAME_DIGITAL(__LINE__, TMC_SW_MOSI) REPORT_NAME_DIGITAL(__LINE__, TMC_SPI_MOSI)
#endif #endif
#if _EXISTS(TMC_SW_SCK) #if _EXISTS(TMC_SPI_SCK)
REPORT_NAME_DIGITAL(__LINE__, TMC_SW_SCK) REPORT_NAME_DIGITAL(__LINE__, TMC_SPI_SCK)
#endif #endif
#if _EXISTS(TFTGLCD_CS) #if _EXISTS(TFTGLCD_CS)
REPORT_NAME_DIGITAL(__LINE__, TFTGLCD_CS) REPORT_NAME_DIGITAL(__LINE__, TFTGLCD_CS)

View File

@@ -321,14 +321,14 @@
// TMC software SPI // TMC software SPI
// //
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI #ifndef TMC_SPI_MOSI
#define TMC_SW_MOSI 66 #define TMC_SPI_MOSI 66
#endif #endif
#ifndef TMC_SW_MISO #ifndef TMC_SPI_MISO
#define TMC_SW_MISO 44 #define TMC_SPI_MISO 44
#endif #endif
#ifndef TMC_SW_SCK #ifndef TMC_SPI_SCK
#define TMC_SW_SCK 64 #define TMC_SPI_SCK 64
#endif #endif
#endif #endif

View File

@@ -220,14 +220,14 @@
// TMC software SPI // TMC software SPI
// //
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI #ifndef TMC_SPI_MOSI
#define TMC_SW_MOSI 51 #define TMC_SPI_MOSI 51
#endif #endif
#ifndef TMC_SW_MISO #ifndef TMC_SPI_MISO
#define TMC_SW_MISO 50 #define TMC_SPI_MISO 50
#endif #endif
#ifndef TMC_SW_SCK #ifndef TMC_SPI_SCK
#define TMC_SW_SCK 53 #define TMC_SPI_SCK 53
#endif #endif
#endif #endif

View File

@@ -153,14 +153,14 @@
// Default pins for TMC software SPI // Default pins for TMC software SPI
// //
//#if ENABLED(TMC_USE_SW_SPI) //#if ENABLED(TMC_USE_SW_SPI)
// #ifndef TMC_SW_MOSI // #ifndef TMC_SPI_MOSI
// #define TMC_SW_MOSI 66 // #define TMC_SPI_MOSI 66
// #endif // #endif
// #ifndef TMC_SW_MISO // #ifndef TMC_SPI_MISO
// #define TMC_SW_MISO 44 // #define TMC_SPI_MISO 44
// #endif // #endif
// #ifndef TMC_SW_SCK // #ifndef TMC_SPI_SCK
// #define TMC_SW_SCK 64 // #define TMC_SPI_SCK 64
// #endif // #endif
//#endif //#endif

View File

@@ -184,14 +184,14 @@
// TMC software SPI // TMC software SPI
// //
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI #ifndef TMC_SPI_MOSI
#define TMC_SW_MOSI 66 #define TMC_SPI_MOSI 66
#endif #endif
#ifndef TMC_SW_MISO #ifndef TMC_SPI_MISO
#define TMC_SW_MISO 44 #define TMC_SPI_MISO 44
#endif #endif
#ifndef TMC_SW_SCK #ifndef TMC_SPI_SCK
#define TMC_SW_SCK 64 #define TMC_SPI_SCK 64
#endif #endif
#endif #endif

View File

@@ -149,14 +149,14 @@
// Required for the Archim2 board. // Required for the Archim2 board.
// //
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI #ifndef TMC_SPI_MOSI
#define TMC_SW_MOSI 28 // PD3 #define TMC_SPI_MOSI 28 // PD3
#endif #endif
#ifndef TMC_SW_MISO #ifndef TMC_SPI_MISO
#define TMC_SW_MISO 26 // PD1 #define TMC_SPI_MISO 26 // PD1
#endif #endif
#ifndef TMC_SW_SCK #ifndef TMC_SPI_SCK
#define TMC_SW_SCK 27 // PD2 #define TMC_SPI_SCK 27 // PD2
#endif #endif
#endif #endif

View File

@@ -167,14 +167,14 @@
// TMC software SPI // TMC software SPI
// //
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI #ifndef TMC_SPI_MOSI
#define TMC_SW_MOSI 58 // Mega/Due:66 - AGCM4:58 #define TMC_SPI_MOSI 58 // Mega/Due:66 - AGCM4:58
#endif #endif
#ifndef TMC_SW_MISO #ifndef TMC_SPI_MISO
#define TMC_SW_MISO 44 #define TMC_SPI_MISO 44
#endif #endif
#ifndef TMC_SW_SCK #ifndef TMC_SPI_SCK
#define TMC_SW_SCK 56 // Mega/Due:64 - AGCM4:56 #define TMC_SPI_SCK 56 // Mega/Due:64 - AGCM4:56
#endif #endif
#endif #endif

View File

@@ -97,14 +97,14 @@
// Software SPI pins for TMC2130 stepper drivers // Software SPI pins for TMC2130 stepper drivers
// //
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI #ifndef TMC_SPI_MOSI
#define TMC_SW_MOSI PB5 #define TMC_SPI_MOSI PB5
#endif #endif
#ifndef TMC_SW_MISO #ifndef TMC_SPI_MISO
#define TMC_SW_MISO PB4 #define TMC_SPI_MISO PB4
#endif #endif
#ifndef TMC_SW_SCK #ifndef TMC_SPI_SCK
#define TMC_SW_SCK PB3 #define TMC_SPI_SCK PB3
#endif #endif
#endif #endif

View File

@@ -69,14 +69,14 @@
#define E0_ENABLE_PIN PC4 #define E0_ENABLE_PIN PC4
#if ENABLED(TMC_USE_SW_SPI) // Shared with EXP2 #if ENABLED(TMC_USE_SW_SPI) // Shared with EXP2
#ifndef TMC_SW_SCK #ifndef TMC_SPI_SCK
#define TMC_SW_SCK PB3 #define TMC_SPI_SCK PB3
#endif #endif
#ifndef TMC_SW_MISO #ifndef TMC_SPI_MISO
#define TMC_SW_MISO PB4 #define TMC_SPI_MISO PB4
#endif #endif
#ifndef TMC_SW_MOSI #ifndef TMC_SPI_MOSI
#define TMC_SW_MOSI PB5 #define TMC_SPI_MOSI PB5
#endif #endif
#endif #endif

View File

@@ -84,14 +84,14 @@
#endif #endif
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI #ifndef TMC_SPI_MOSI
#define TMC_SW_MOSI EXP2_06_PIN #define TMC_SPI_MOSI EXP2_06_PIN
#endif #endif
#ifndef TMC_SW_MISO #ifndef TMC_SPI_MISO
#define TMC_SW_MISO EXP2_01_PIN #define TMC_SPI_MISO EXP2_01_PIN
#endif #endif
#ifndef TMC_SW_SCK #ifndef TMC_SPI_SCK
#define TMC_SW_SCK EXP2_02_PIN #define TMC_SPI_SCK EXP2_02_PIN
#endif #endif
#endif #endif

View File

@@ -53,14 +53,14 @@
// Software SPI pins for TMC2130 stepper drivers // Software SPI pins for TMC2130 stepper drivers
// //
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI #ifndef TMC_SPI_MOSI
#define TMC_SW_MOSI PB15 #define TMC_SPI_MOSI PB15
#endif #endif
#ifndef TMC_SW_MISO #ifndef TMC_SPI_MISO
#define TMC_SW_MISO PB14 #define TMC_SPI_MISO PB14
#endif #endif
#ifndef TMC_SW_SCK #ifndef TMC_SPI_SCK
#define TMC_SW_SCK PB13 #define TMC_SPI_SCK PB13
#endif #endif
#endif #endif

View File

@@ -53,14 +53,14 @@
// Software SPI pins for TMC2130 stepper drivers // Software SPI pins for TMC2130 stepper drivers
// //
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI #ifndef TMC_SPI_MOSI
#define TMC_SW_MOSI PB15 #define TMC_SPI_MOSI PB15
#endif #endif
#ifndef TMC_SW_MISO #ifndef TMC_SPI_MISO
#define TMC_SW_MISO PB14 #define TMC_SPI_MISO PB14
#endif #endif
#ifndef TMC_SW_SCK #ifndef TMC_SPI_SCK
#define TMC_SW_SCK PB13 #define TMC_SPI_SCK PB13
#endif #endif
#endif #endif

View File

@@ -115,14 +115,14 @@
// Software SPI pins for TMC2130 stepper drivers // Software SPI pins for TMC2130 stepper drivers
// //
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI #ifndef TMC_SPI_MOSI
#define TMC_SW_MOSI PD14 #define TMC_SPI_MOSI PD14
#endif #endif
#ifndef TMC_SW_MISO #ifndef TMC_SPI_MISO
#define TMC_SW_MISO PD1 #define TMC_SPI_MISO PD1
#endif #endif
#ifndef TMC_SW_SCK #ifndef TMC_SPI_SCK
#define TMC_SW_SCK PD0 #define TMC_SPI_SCK PD0
#endif #endif
#endif #endif

View File

@@ -125,14 +125,14 @@
// Software SPI pins for TMC2130 stepper drivers // Software SPI pins for TMC2130 stepper drivers
// //
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI #ifndef TMC_SPI_MOSI
#define TMC_SW_MOSI PD14 #define TMC_SPI_MOSI PD14
#endif #endif
#ifndef TMC_SW_MISO #ifndef TMC_SPI_MISO
#define TMC_SW_MISO PD1 #define TMC_SPI_MISO PD1
#endif #endif
#ifndef TMC_SW_SCK #ifndef TMC_SPI_SCK
#define TMC_SW_SCK PD0 #define TMC_SPI_SCK PD0
#endif #endif
#endif #endif

View File

@@ -108,14 +108,14 @@
// Software SPI pins for TMC2130 stepper drivers // Software SPI pins for TMC2130 stepper drivers
// //
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI #ifndef TMC_SPI_MOSI
#define TMC_SW_MOSI PB15 #define TMC_SPI_MOSI PB15
#endif #endif
#ifndef TMC_SW_MISO #ifndef TMC_SPI_MISO
#define TMC_SW_MISO PB14 #define TMC_SPI_MISO PB14
#endif #endif
#ifndef TMC_SW_SCK #ifndef TMC_SPI_SCK
#define TMC_SW_SCK PB13 #define TMC_SPI_SCK PB13
#endif #endif
#endif #endif

View File

@@ -91,14 +91,14 @@
// Software SPI pins for TMC2130 stepper drivers // Software SPI pins for TMC2130 stepper drivers
// //
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI #ifndef TMC_SPI_MOSI
#define TMC_SW_MOSI PB5 #define TMC_SPI_MOSI PB5
#endif #endif
#ifndef TMC_SW_MISO #ifndef TMC_SPI_MISO
#define TMC_SW_MISO PB4 #define TMC_SPI_MISO PB4
#endif #endif
#ifndef TMC_SW_SCK #ifndef TMC_SPI_SCK
#define TMC_SW_SCK PB3 #define TMC_SPI_SCK PB3
#endif #endif
#endif #endif

View File

@@ -111,14 +111,14 @@
// Software SPI pins for TMC2130 stepper drivers // Software SPI pins for TMC2130 stepper drivers
// //
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI #ifndef TMC_SPI_MOSI
#define TMC_SW_MOSI PB15 #define TMC_SPI_MOSI PB15
#endif #endif
#ifndef TMC_SW_MISO #ifndef TMC_SPI_MISO
#define TMC_SW_MISO PB14 #define TMC_SPI_MISO PB14
#endif #endif
#ifndef TMC_SW_SCK #ifndef TMC_SPI_SCK
#define TMC_SW_SCK PB13 #define TMC_SPI_SCK PB13
#endif #endif
#endif #endif

View File

@@ -205,14 +205,14 @@
// Software SPI pins for TMC2130 stepper drivers // Software SPI pins for TMC2130 stepper drivers
// //
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI #ifndef TMC_SPI_MOSI
#define TMC_SW_MOSI PG15 #define TMC_SPI_MOSI PG15
#endif #endif
#ifndef TMC_SW_MISO #ifndef TMC_SPI_MISO
#define TMC_SW_MISO PB6 #define TMC_SPI_MISO PB6
#endif #endif
#ifndef TMC_SW_SCK #ifndef TMC_SPI_SCK
#define TMC_SW_SCK PB3 #define TMC_SPI_SCK PB3
#endif #endif
#endif #endif

View File

@@ -263,14 +263,14 @@
// Software SPI pins for TMC2130 stepper drivers // Software SPI pins for TMC2130 stepper drivers
// //
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI #ifndef TMC_SPI_MOSI
#define TMC_SW_MOSI PA7 #define TMC_SPI_MOSI PA7
#endif #endif
#ifndef TMC_SW_MISO #ifndef TMC_SPI_MISO
#define TMC_SW_MISO PA6 #define TMC_SPI_MISO PA6
#endif #endif
#ifndef TMC_SW_SCK #ifndef TMC_SPI_SCK
#define TMC_SW_SCK PA5 #define TMC_SPI_SCK PA5
#endif #endif
#endif #endif

View File

@@ -175,14 +175,14 @@
// Software SPI pins for TMC2130 stepper drivers // Software SPI pins for TMC2130 stepper drivers
// //
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI #ifndef TMC_SPI_MOSI
#define TMC_SW_MOSI PC12 #define TMC_SPI_MOSI PC12
#endif #endif
#ifndef TMC_SW_MISO #ifndef TMC_SPI_MISO
#define TMC_SW_MISO PC11 #define TMC_SPI_MISO PC11
#endif #endif
#ifndef TMC_SW_SCK #ifndef TMC_SPI_SCK
#define TMC_SW_SCK PC10 #define TMC_SPI_SCK PC10
#endif #endif
#endif #endif

View File

@@ -275,14 +275,14 @@
// Software SPI pins for TMC2130 stepper drivers // Software SPI pins for TMC2130 stepper drivers
// //
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI #ifndef TMC_SPI_MOSI
#define TMC_SW_MOSI PE14 #define TMC_SPI_MOSI PE14
#endif #endif
#ifndef TMC_SW_MISO #ifndef TMC_SPI_MISO
#define TMC_SW_MISO PA14 #define TMC_SPI_MISO PA14
#endif #endif
#ifndef TMC_SW_SCK #ifndef TMC_SPI_SCK
#define TMC_SW_SCK PE15 #define TMC_SPI_SCK PE15
#endif #endif
#endif #endif

View File

@@ -238,14 +238,14 @@
// Trinamic Software SPI // Trinamic Software SPI
// //
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_SCK #ifndef TMC_SPI_SCK
#define TMC_SW_SCK EXP2_02_PIN #define TMC_SPI_SCK EXP2_02_PIN
#endif #endif
#ifndef TMC_SW_MISO #ifndef TMC_SPI_MISO
#define TMC_SW_MISO EXP2_01_PIN #define TMC_SPI_MISO EXP2_01_PIN
#endif #endif
#ifndef TMC_SW_MOSI #ifndef TMC_SPI_MOSI
#define TMC_SW_MOSI EXP2_06_PIN #define TMC_SPI_MOSI EXP2_06_PIN
#endif #endif
#endif #endif

View File

@@ -57,14 +57,14 @@
// //
#define TMC_USE_SW_SPI #define TMC_USE_SW_SPI
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI #ifndef TMC_SPI_MOSI
#define TMC_SW_MOSI PE14 #define TMC_SPI_MOSI PE14
#endif #endif
#ifndef TMC_SW_MISO #ifndef TMC_SPI_MISO
#define TMC_SW_MISO PE13 #define TMC_SPI_MISO PE13
#endif #endif
#ifndef TMC_SW_SCK #ifndef TMC_SPI_SCK
#define TMC_SW_SCK PE12 #define TMC_SPI_SCK PE12
#endif #endif
#endif #endif

View File

@@ -105,14 +105,14 @@
// //
#define TMC_USE_SW_SPI #define TMC_USE_SW_SPI
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI #ifndef TMC_SPI_MOSI
#define TMC_SW_MOSI PE14 #define TMC_SPI_MOSI PE14
#endif #endif
#ifndef TMC_SW_MISO #ifndef TMC_SPI_MISO
#define TMC_SW_MISO PE13 #define TMC_SPI_MISO PE13
#endif #endif
#ifndef TMC_SW_SCK #ifndef TMC_SPI_SCK
#define TMC_SW_SCK PE12 #define TMC_SPI_SCK PE12
#endif #endif
#endif #endif

View File

@@ -133,14 +133,14 @@
#define TMC_USE_SW_SPI #define TMC_USE_SW_SPI
#endif #endif
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)
#if !defined(TMC_SW_MOSI) || TMC_SW_MOSI == -1 #if !defined(TMC_SPI_MOSI) || TMC_SPI_MOSI == -1
#define TMC_SW_MOSI PE14 #define TMC_SPI_MOSI PE14
#endif #endif
#if !defined(TMC_SW_MISO) || TMC_SW_MISO == -1 #if !defined(TMC_SPI_MISO) || TMC_SPI_MISO == -1
#define TMC_SW_MISO PE13 #define TMC_SPI_MISO PE13
#endif #endif
#if !defined(TMC_SW_SCK) || TMC_SW_SCK == -1 #if !defined(TMC_SPI_SCK) || TMC_SPI_SCK == -1
#define TMC_SW_SCK PE12 #define TMC_SPI_SCK PE12
#endif #endif
#endif #endif

View File

@@ -58,14 +58,14 @@
#define TMC_USE_SW_SPI #define TMC_USE_SW_SPI
#endif #endif
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)
#if !defined(TMC_SW_MOSI) || TMC_SW_MOSI == -1 #if !defined(TMC_SPI_MOSI) || TMC_SPI_MOSI == -1
#define TMC_SW_MOSI PD14 #define TMC_SPI_MOSI PD14
#endif #endif
#if !defined(TMC_SW_MISO) || TMC_SW_MISO == -1 #if !defined(TMC_SPI_MISO) || TMC_SPI_MISO == -1
#define TMC_SW_MISO PD1 #define TMC_SPI_MISO PD1
#endif #endif
#if !defined(TMC_SW_SCK) || TMC_SW_SCK == -1 #if !defined(TMC_SPI_SCK) || TMC_SPI_SCK == -1
#define TMC_SW_SCK PD0 #define TMC_SPI_SCK PD0
#endif #endif
#endif #endif

View File

@@ -116,14 +116,14 @@
// Software SPI pins for TMC2130 stepper drivers // Software SPI pins for TMC2130 stepper drivers
// //
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI #ifndef TMC_SPI_MOSI
#define TMC_SW_MOSI PD14 #define TMC_SPI_MOSI PD14
#endif #endif
#ifndef TMC_SW_MISO #ifndef TMC_SPI_MISO
#define TMC_SW_MISO PD1 #define TMC_SPI_MISO PD1
#endif #endif
#ifndef TMC_SW_SCK #ifndef TMC_SPI_SCK
#define TMC_SW_SCK PD0 #define TMC_SPI_SCK PD0
#endif #endif
#endif #endif

View File

@@ -196,9 +196,9 @@
// //
#if HAS_TMC_SPI #if HAS_TMC_SPI
#define TMC_USE_SW_SPI #define TMC_USE_SW_SPI
#define TMC_SW_MOSI PE14 #define TMC_SPI_MOSI PE14
#define TMC_SW_MISO PE13 #define TMC_SPI_MISO PE13
#define TMC_SW_SCK PE12 #define TMC_SPI_SCK PE12
#endif #endif
// //

View File

@@ -171,9 +171,9 @@
#define MOSI_PIN PB5 #define MOSI_PIN PB5
#define SCK_PIN PB3 #define SCK_PIN PB3
#define TMC_SW_MISO MISO_PIN #define TMC_SPI_MISO MISO_PIN
#define TMC_SW_MOSI MOSI_PIN #define TMC_SPI_MOSI MOSI_PIN
#define TMC_SW_SCK SCK_PIN #define TMC_SPI_SCK SCK_PIN
// //
// I2C // I2C

View File

@@ -168,9 +168,9 @@
#define MOSI_PIN PB5 #define MOSI_PIN PB5
#define SCK_PIN PB3 #define SCK_PIN PB3
#define TMC_SW_MISO MISO_PIN #define TMC_SPI_MISO MISO_PIN
#define TMC_SW_MOSI MOSI_PIN #define TMC_SPI_MOSI MOSI_PIN
#define TMC_SW_SCK SCK_PIN #define TMC_SPI_SCK SCK_PIN
// //
// I2C // I2C

View File

@@ -92,14 +92,14 @@
#define E2_CS_PIN PD1 #define E2_CS_PIN PD1
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI #ifndef TMC_SPI_MOSI
#define TMC_SW_MOSI PA7 #define TMC_SPI_MOSI PA7
#endif #endif
#ifndef TMC_SW_MISO #ifndef TMC_SPI_MISO
#define TMC_SW_MISO PA6 #define TMC_SPI_MISO PA6
#endif #endif
#ifndef TMC_SW_SCK #ifndef TMC_SPI_SCK
#define TMC_SW_SCK PA5 #define TMC_SPI_SCK PA5
#endif #endif
#endif #endif

View File

@@ -146,14 +146,14 @@
// Software SPI pins for TMC2130 stepper drivers // Software SPI pins for TMC2130 stepper drivers
// //
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI #ifndef TMC_SPI_MOSI
#define TMC_SW_MOSI PC12 // Shared with SPI header, Pin 5 (SPI3) #define TMC_SPI_MOSI PC12 // Shared with SPI header, Pin 5 (SPI3)
#endif #endif
#ifndef TMC_SW_MISO #ifndef TMC_SPI_MISO
#define TMC_SW_MISO PC11 // Shared with SPI header, Pin 6 (SPI3) #define TMC_SPI_MISO PC11 // Shared with SPI header, Pin 6 (SPI3)
#endif #endif
#ifndef TMC_SW_SCK #ifndef TMC_SPI_SCK
#define TMC_SW_SCK PC10 // Shared with SPI header, Pin 4 (SPI3) #define TMC_SPI_SCK PC10 // Shared with SPI header, Pin 4 (SPI3)
#endif #endif
#endif #endif

View File

@@ -115,14 +115,14 @@
// Software SPI pins for TMC2130 stepper drivers // Software SPI pins for TMC2130 stepper drivers
// //
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI #ifndef TMC_SPI_MOSI
#define TMC_SW_MOSI PB15 #define TMC_SPI_MOSI PB15
#endif #endif
#ifndef TMC_SW_MISO #ifndef TMC_SPI_MISO
#define TMC_SW_MISO PB14 #define TMC_SPI_MISO PB14
#endif #endif
#ifndef TMC_SW_SCK #ifndef TMC_SPI_SCK
#define TMC_SW_SCK PB13 #define TMC_SPI_SCK PB13
#endif #endif
#endif #endif

View File

@@ -132,14 +132,14 @@
// Software SPI pins for TMC2130 stepper drivers // Software SPI pins for TMC2130 stepper drivers
// //
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI #ifndef TMC_SPI_MOSI
#define TMC_SW_MOSI PB15 // Shared with SPI header, Pin 5 (SPI2) #define TMC_SPI_MOSI PB15 // Shared with SPI header, Pin 5 (SPI2)
#endif #endif
#ifndef TMC_SW_MISO #ifndef TMC_SPI_MISO
#define TMC_SW_MISO PB14 // Shared with SPI header, Pin 6 (SPI2) #define TMC_SPI_MISO PB14 // Shared with SPI header, Pin 6 (SPI2)
#endif #endif
#ifndef TMC_SW_SCK #ifndef TMC_SPI_SCK
#define TMC_SW_SCK PB13 // Shared with SPI header, Pin 4 (SPI2) #define TMC_SPI_SCK PB13 // Shared with SPI header, Pin 4 (SPI2)
#endif #endif
#endif #endif

View File

@@ -182,14 +182,14 @@
// Software SPI pins for TMC2130 stepper drivers // Software SPI pins for TMC2130 stepper drivers
// //
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI #ifndef TMC_SPI_MOSI
#define TMC_SW_MOSI PA7 #define TMC_SPI_MOSI PA7
#endif #endif
#ifndef TMC_SW_MISO #ifndef TMC_SPI_MISO
#define TMC_SW_MISO PA6 #define TMC_SPI_MISO PA6
#endif #endif
#ifndef TMC_SW_SCK #ifndef TMC_SPI_SCK
#define TMC_SW_SCK PA5 #define TMC_SPI_SCK PA5
#endif #endif
#endif #endif

View File

@@ -276,14 +276,14 @@
// Software SPI pins for TMC2130 stepper drivers // Software SPI pins for TMC2130 stepper drivers
// //
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI #ifndef TMC_SPI_MOSI
#define TMC_SW_MOSI PE14 #define TMC_SPI_MOSI PE14
#endif #endif
#ifndef TMC_SW_MISO #ifndef TMC_SPI_MISO
#define TMC_SW_MISO PE13 #define TMC_SPI_MISO PE13
#endif #endif
#ifndef TMC_SW_SCK #ifndef TMC_SPI_SCK
#define TMC_SW_SCK PE12 #define TMC_SPI_SCK PE12
#endif #endif
#endif #endif

View File

@@ -94,14 +94,14 @@
// Software SPI pins for TMC2130 stepper drivers // Software SPI pins for TMC2130 stepper drivers
// //
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI #ifndef TMC_SPI_MOSI
#define TMC_SW_MOSI PC6 #define TMC_SPI_MOSI PC6
#endif #endif
#ifndef TMC_SW_MISO #ifndef TMC_SPI_MISO
#define TMC_SW_MISO PG3 #define TMC_SPI_MISO PG3
#endif #endif
#ifndef TMC_SW_SCK #ifndef TMC_SPI_SCK
#define TMC_SW_SCK PC7 #define TMC_SPI_SCK PC7
#endif #endif
#endif #endif

View File

@@ -263,14 +263,14 @@
// Software SPI pins for TMC2130 stepper drivers // Software SPI pins for TMC2130 stepper drivers
// //
#if ENABLED(TMC_USE_SW_SPI) #if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI #ifndef TMC_SPI_MOSI
#define TMC_SW_MOSI PE13 #define TMC_SPI_MOSI PE13
#endif #endif
#ifndef TMC_SW_MISO #ifndef TMC_SPI_MISO
#define TMC_SW_MISO PE15 #define TMC_SPI_MISO PE15
#endif #endif
#ifndef TMC_SW_SCK #ifndef TMC_SPI_SCK
#define TMC_SW_SCK PE14 #define TMC_SPI_SCK PE14
#endif #endif
#endif #endif