Browse Source

Fix some pin inits

Scott Lahteine 3 years ago
parent
commit
b3223d7b41

+ 2
- 4
Marlin/src/lcd/extui/lib/anycubic_i3mega/anycubic_i3mega_lcd.cpp View File

@@ -123,12 +123,10 @@ void AnycubicTFTClass::OnSetup() {
123 123
 
124 124
   // initialise the state of the key pins running on the tft
125 125
   #if ENABLED(SDSUPPORT) && PIN_EXISTS(SD_DETECT)
126
-    pinMode(SD_DETECT_PIN, INPUT);
127
-    WRITE(SD_DETECT_PIN, HIGH);
126
+    SET_INPUT_PULLUP(SD_DETECT_PIN);
128 127
   #endif
129 128
   #if ENABLED(FILAMENT_RUNOUT_SENSOR)
130
-    pinMode(FIL_RUNOUT_PIN, INPUT);
131
-    WRITE(FIL_RUNOUT_PIN, HIGH);
129
+    SET_INPUT_PULLUP(FIL_RUNOUT_PIN);
132 130
   #endif
133 131
 
134 132
   mediaPrintingState = AMPRINTSTATE_NOT_PRINTING;

+ 3
- 3
Marlin/src/lcd/extui/lib/mks_ui/printer_operation.cpp View File

@@ -161,13 +161,13 @@ void printer_state_polling() {
161 161
 
162 162
 void filament_pin_setup() {
163 163
   #if PIN_EXISTS(MT_DET_1)
164
-    pinMode(MT_DET_1_PIN, INPUT_PULLUP);
164
+    SET_INPUT_PULLUP(MT_DET_1_PIN);
165 165
   #endif
166 166
   #if PIN_EXISTS(MT_DET_2)
167
-    pinMode(MT_DET_2_PIN, INPUT_PULLUP);
167
+    SET_INPUT_PULLUP(MT_DET_2_PIN);
168 168
   #endif
169 169
   #if PIN_EXISTS(MT_DET_3)
170
-    pinMode(MT_DET_3_PIN, INPUT_PULLUP);
170
+    SET_INPUT_PULLUP(MT_DET_3_PIN);
171 171
   #endif
172 172
 }
173 173
 

Loading…
Cancel
Save