浏览代码

No need to set input after attachInterrupt

Scott Lahteine 7 年前
父节点
当前提交
cf53e502a2

+ 0
- 9
Marlin/src/HAL/HAL_STM32F1/endstop_interrupts.h 查看文件

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

+ 0
- 9
Marlin/src/HAL/HAL_STM32F4/endstop_interrupts.h 查看文件

@@ -32,39 +32,30 @@ void endstop_ISR(void) { endstops.check_possible_change(); }
32 32
 void setup_endstop_interrupts(void) {
33 33
   #if HAS_X_MAX
34 34
     attachInterrupt(X_MAX_PIN, endstop_ISR, CHANGE);
35
-    SET_INPUT(X_MAX_PIN);
36 35
   #endif
37 36
   #if HAS_X_MIN
38 37
     attachInterrupt(X_MIN_PIN, endstop_ISR, CHANGE);
39
-    SET_INPUT(X_MIN_PIN);
40 38
   #endif
41 39
   #if HAS_Y_MAX
42 40
     attachInterrupt(Y_MAX_PIN, endstop_ISR, CHANGE);
43
-    SET_INPUT(Y_MAX_PIN);
44 41
   #endif
45 42
   #if HAS_Y_MIN
46 43
     attachInterrupt(Y_MIN_PIN, endstop_ISR, CHANGE);
47
-    SET_INPUT(Y_MIN_PIN);
48 44
   #endif
49 45
   #if HAS_Z_MAX
50 46
     attachInterrupt(Z_MAX_PIN, endstop_ISR, CHANGE);
51
-    SET_INPUT(Z_MAX_PIN);
52 47
   #endif
53 48
   #if HAS_Z_MIN
54 49
     attachInterrupt(Z_MIN_PIN, endstop_ISR, CHANGE);
55
-    SET_INPUT(Z_MIN_PIN);
56 50
   #endif
57 51
   #if HAS_Z2_MAX
58 52
     attachInterrupt(Z2_MAX_PIN, endstop_ISR, CHANGE);
59
-    SET_INPUT(Z2_MAX_PIN);
60 53
   #endif
61 54
   #if HAS_Z2_MIN
62 55
     attachInterrupt(Z2_MIN_PIN, endstop_ISR, CHANGE);
63
-    SET_INPUT(Z2_MIN_PIN);
64 56
   #endif
65 57
   #if HAS_Z_MIN_PROBE_PIN
66 58
     attachInterrupt(Z_MIN_PROBE_PIN, endstop_ISR, CHANGE);
67
-    SET_INPUT(Z_MIN_PROBE_PIN);
68 59
   #endif
69 60
 }
70 61
 

+ 0
- 9
Marlin/src/HAL/HAL_STM32F7/endstop_interrupts.h 查看文件

@@ -34,39 +34,30 @@ void endstop_ISR(void) { endstops.check_possible_change(); }
34 34
 void setup_endstop_interrupts(void) {
35 35
   #if HAS_X_MAX
36 36
     attachInterrupt(X_MAX_PIN, endstop_ISR, CHANGE);
37
-    SET_INPUT(X_MAX_PIN);
38 37
   #endif
39 38
   #if HAS_X_MIN
40 39
     attachInterrupt(X_MIN_PIN, endstop_ISR, CHANGE);
41
-    SET_INPUT(X_MIN_PIN);
42 40
   #endif
43 41
   #if HAS_Y_MAX
44 42
     attachInterrupt(Y_MAX_PIN, endstop_ISR, CHANGE);
45
-    SET_INPUT(Y_MAX_PIN);
46 43
   #endif
47 44
   #if HAS_Y_MIN
48 45
     attachInterrupt(Y_MIN_PIN, endstop_ISR, CHANGE);
49
-    SET_INPUT(Y_MIN_PIN);
50 46
   #endif
51 47
   #if HAS_Z_MAX
52 48
     attachInterrupt(Z_MAX_PIN, endstop_ISR, CHANGE);
53
-    SET_INPUT(Z_MAX_PIN);
54 49
   #endif
55 50
   #if HAS_Z_MIN
56 51
     attachInterrupt(Z_MIN_PIN, endstop_ISR, CHANGE);
57
-    SET_INPUT(Z_MIN_PIN);
58 52
   #endif
59 53
   #if HAS_Z2_MAX
60 54
     attachInterrupt(Z2_MAX_PIN, endstop_ISR, CHANGE);
61
-    SET_INPUT(Z2_MAX_PIN);
62 55
   #endif
63 56
   #if HAS_Z2_MIN
64 57
     attachInterrupt(Z2_MIN_PIN, endstop_ISR, CHANGE);
65
-    SET_INPUT(Z2_MIN_PIN);
66 58
   #endif
67 59
   #if HAS_Z_MIN_PROBE_PIN
68 60
     attachInterrupt(Z_MIN_PROBE_PIN, endstop_ISR, CHANGE);
69
-    SET_INPUT(Z_MIN_PROBE_PIN);
70 61
   #endif
71 62
 }
72 63
 

正在加载...
取消
保存