Bläddra i källkod

Use fastio for STM32F1 endstop interrupts

Scott Lahteine 7 år sedan
förälder
incheckning
c8dfa26bc8
1 ändrade filer med 9 tillägg och 9 borttagningar
  1. 9
    9
      Marlin/src/HAL/HAL_STM32F1/endstop_interrupts.h

+ 9
- 9
Marlin/src/HAL/HAL_STM32F1/endstop_interrupts.h Visa fil

@@ -51,39 +51,39 @@
51 51
 
52 52
 void setup_endstop_interrupts(void) {
53 53
   #if HAS_X_MAX
54
-    pinMode(X_MAX_PIN, INPUT);
54
+    SET_INPUT(X_MAX_PIN);
55 55
     attachInterrupt(X_MAX_PIN, endstop_ISR, CHANGE); // assign it
56 56
   #endif
57 57
   #if HAS_X_MIN
58
-    pinMode(X_MIN_PIN, INPUT);
58
+    SET_INPUT(X_MIN_PIN);
59 59
     attachInterrupt(X_MIN_PIN, endstop_ISR, CHANGE);
60 60
   #endif
61 61
   #if HAS_Y_MAX
62
-    pinMode(Y_MAX_PIN, INPUT);
62
+    SET_INPUT(Y_MAX_PIN);
63 63
     attachInterrupt(Y_MAX_PIN, endstop_ISR, CHANGE);
64 64
   #endif
65 65
   #if HAS_Y_MIN
66
-    pinMode(Y_MIN_PIN, INPUT);
66
+    SET_INPUT(Y_MIN_PIN);
67 67
     attachInterrupt(Y_MIN_PIN, endstop_ISR, CHANGE);
68 68
   #endif
69 69
   #if HAS_Z_MAX
70
-    pinMode(Z_MAX_PIN, INPUT);
70
+    SET_INPUT(Z_MAX_PIN);
71 71
     attachInterrupt(Z_MAX_PIN, endstop_ISR, CHANGE);
72 72
   #endif
73 73
   #if HAS_Z_MIN
74
-    pinMode(Z_MIN_PIN, INPUT);
74
+    SET_INPUT(Z_MIN_PIN);
75 75
     attachInterrupt(Z_MIN_PIN, endstop_ISR, CHANGE);
76 76
   #endif
77 77
   #if HAS_Z2_MAX
78
-    pinMode(Z2_MAX_PIN, INPUT);
78
+    SET_INPUT(Z2_MAX_PIN);
79 79
     attachInterrupt(Z2_MAX_PIN, endstop_ISR, CHANGE);
80 80
   #endif
81 81
   #if HAS_Z2_MIN
82
-    pinMode(Z2_MIN_PIN, INPUT);
82
+    SET_INPUT(Z2_MIN_PIN);
83 83
     attachInterrupt(Z2_MIN_PIN, endstop_ISR, CHANGE);
84 84
   #endif
85 85
   #if HAS_Z_MIN_PROBE_PIN
86
-    pinMode(Z_MIN_PROBE_PIN, INPUT);
86
+    SET_INPUT(Z_MIN_PROBE_PIN);
87 87
     attachInterrupt(Z_MIN_PROBE_PIN, endstop_ISR, CHANGE);
88 88
   #endif
89 89
 }

Laddar…
Avbryt
Spara