|
@@ -245,7 +245,11 @@ millis_t max_inactive_time, // = 0
|
245
|
245
|
|
246
|
246
|
void setup_killpin() {
|
247
|
247
|
#if HAS_KILL
|
248
|
|
- SET_INPUT_PULLUP(KILL_PIN);
|
|
248
|
+ #if KILL_PIN_STATE
|
|
249
|
+ SET_INPUT_PULLDOWN(KILL_PIN);
|
|
250
|
+ #else
|
|
251
|
+ SET_INPUT_PULLUP(KILL_PIN);
|
|
252
|
+ #endif
|
249
|
253
|
#endif
|
250
|
254
|
}
|
251
|
255
|
|
|
@@ -496,7 +500,7 @@ inline void manage_inactivity(const bool ignore_stepper_queue=false) {
|
496
|
500
|
// -------------------------------------------------------------------------------
|
497
|
501
|
static int killCount = 0; // make the inactivity button a bit less responsive
|
498
|
502
|
const int KILL_DELAY = 750;
|
499
|
|
- if (!READ(KILL_PIN))
|
|
503
|
+ if (kill_state())
|
500
|
504
|
killCount++;
|
501
|
505
|
else if (killCount > 0)
|
502
|
506
|
killCount--;
|
|
@@ -770,10 +774,10 @@ void minkill(const bool steppers_off/*=false*/) {
|
770
|
774
|
#if HAS_KILL
|
771
|
775
|
|
772
|
776
|
// Wait for kill to be released
|
773
|
|
- while (!READ(KILL_PIN)) watchdog_refresh();
|
|
777
|
+ while (kill_state()) watchdog_refresh();
|
774
|
778
|
|
775
|
779
|
// Wait for kill to be pressed
|
776
|
|
- while (READ(KILL_PIN)) watchdog_refresh();
|
|
780
|
+ while (!kill_state()) watchdog_refresh();
|
777
|
781
|
|
778
|
782
|
void (*resetFunc)() = 0; // Declare resetFunc() at address 0
|
779
|
783
|
resetFunc(); // Jump to address 0
|