|
@@ -582,4 +582,43 @@ void _tmc_say_sgt(const char name[], const uint32_t sgt) {
|
582
|
582
|
|
583
|
583
|
#endif // SENSORLESS_HOMING
|
584
|
584
|
|
|
585
|
+#if ENABLED(HAVE_TMC2130)
|
|
586
|
+ #define SET_CS_PIN(st) OUT_WRITE(st##_CS_PIN, HIGH)
|
|
587
|
+ void tmc_init_cs_pins() {
|
|
588
|
+ #if ENABLED(X_IS_TMC2130)
|
|
589
|
+ SET_CS_PIN(X);
|
|
590
|
+ #endif
|
|
591
|
+ #if ENABLED(Y_IS_TMC2130)
|
|
592
|
+ SET_CS_PIN(Y);
|
|
593
|
+ #endif
|
|
594
|
+ #if ENABLED(Z_IS_TMC2130)
|
|
595
|
+ SET_CS_PIN(Z);
|
|
596
|
+ #endif
|
|
597
|
+ #if ENABLED(X2_IS_TMC2130)
|
|
598
|
+ SET_CS_PIN(X2);
|
|
599
|
+ #endif
|
|
600
|
+ #if ENABLED(Y2_IS_TMC2130)
|
|
601
|
+ SET_CS_PIN(Y2);
|
|
602
|
+ #endif
|
|
603
|
+ #if ENABLED(Z2_IS_TMC2130)
|
|
604
|
+ SET_CS_PIN(Z2);
|
|
605
|
+ #endif
|
|
606
|
+ #if ENABLED(E0_IS_TMC2130)
|
|
607
|
+ SET_CS_PIN(E0);
|
|
608
|
+ #endif
|
|
609
|
+ #if ENABLED(E1_IS_TMC2130)
|
|
610
|
+ SET_CS_PIN(E1);
|
|
611
|
+ #endif
|
|
612
|
+ #if ENABLED(E2_IS_TMC2130)
|
|
613
|
+ SET_CS_PIN(E2);
|
|
614
|
+ #endif
|
|
615
|
+ #if ENABLED(E3_IS_TMC2130)
|
|
616
|
+ SET_CS_PIN(E3);
|
|
617
|
+ #endif
|
|
618
|
+ #if ENABLED(E4_IS_TMC2130)
|
|
619
|
+ SET_CS_PIN(E4);
|
|
620
|
+ #endif
|
|
621
|
+ }
|
|
622
|
+#endif // HAVE_TMC2130
|
|
623
|
+
|
585
|
624
|
#endif // HAS_TRINAMIC
|