Skip to content

Commit

Permalink
Fix some pin inits
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead authored and vgadreau committed Dec 9, 2020
1 parent 0f7d786 commit 5f2f19a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,10 @@ void AnycubicTFTClass::OnSetup() {

// initialise the state of the key pins running on the tft
#if ENABLED(SDSUPPORT) && PIN_EXISTS(SD_DETECT)
pinMode(SD_DETECT_PIN, INPUT);
WRITE(SD_DETECT_PIN, HIGH);
SET_INPUT_PULLUP(SD_DETECT_PIN);
#endif
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
pinMode(FIL_RUNOUT_PIN, INPUT);
WRITE(FIL_RUNOUT_PIN, HIGH);
SET_INPUT_PULLUP(FIL_RUNOUT_PIN);
#endif

mediaPrintingState = AMPRINTSTATE_NOT_PRINTING;
Expand Down
6 changes: 3 additions & 3 deletions Marlin/src/lcd/extui/lib/mks_ui/printer_operation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,13 @@ void printer_state_polling() {

void filament_pin_setup() {
#if PIN_EXISTS(MT_DET_1)
pinMode(MT_DET_1_PIN, INPUT_PULLUP);
SET_INPUT_PULLUP(MT_DET_1_PIN);
#endif
#if PIN_EXISTS(MT_DET_2)
pinMode(MT_DET_2_PIN, INPUT_PULLUP);
SET_INPUT_PULLUP(MT_DET_2_PIN);
#endif
#if PIN_EXISTS(MT_DET_3)
pinMode(MT_DET_3_PIN, INPUT_PULLUP);
SET_INPUT_PULLUP(MT_DET_3_PIN);
#endif
}

Expand Down

0 comments on commit 5f2f19a

Please sign in to comment.