From 5a3a53379f908f0d06ab97b5fc35caacc981fa4f Mon Sep 17 00:00:00 2001 From: Phr3d13 Date: Wed, 27 Sep 2017 05:06:55 -0400 Subject: [PATCH 1/2] Update pins for GT2560_Rev_A_Plus For PR #7738 --- Marlin/src/pins/pins_GT2560_REV_A_PLUS.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Marlin/src/pins/pins_GT2560_REV_A_PLUS.h b/Marlin/src/pins/pins_GT2560_REV_A_PLUS.h index 7eed3b8595..16660e0d16 100644 --- a/Marlin/src/pins/pins_GT2560_REV_A_PLUS.h +++ b/Marlin/src/pins/pins_GT2560_REV_A_PLUS.h @@ -29,4 +29,8 @@ #undef BOARD_NAME #define BOARD_NAME "GT2560 Rev.A+" -#define SERVO0_PIN 11 +#if ENABLED(BLTOUCH) + #define SERVO0_PIN 32 +#else + #define SERVO0_PIN 11 +#endif From 10c1b442caa1653a925b357ebaf92d1e1c0c4066 Mon Sep 17 00:00:00 2001 From: Phr3d13 Date: Wed, 27 Sep 2017 05:40:48 -0400 Subject: [PATCH 2/2] Fixes for Anet10 and gt2560 Fixes for 2 "... not declared in this scope" compiler errors. --- Marlin/src/Marlin.cpp | 11 ++++------- Marlin/src/Marlin.h | 4 ++++ Marlin/src/gcode/control/M80_M81.cpp | 4 ++++ Marlin/src/module/temperature.cpp | 2 +- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/Marlin/src/Marlin.cpp b/Marlin/src/Marlin.cpp index 01952606e2..0607242648 100644 --- a/Marlin/src/Marlin.cpp +++ b/Marlin/src/Marlin.cpp @@ -239,12 +239,6 @@ void setup_powerhold() { #endif } -void suicide() { - #if HAS_SUICIDE - OUT_WRITE(SUICIDE_PIN, LOW); - #endif -} - #if HAS_SERVOS HAL_SERVO_LIB servo[NUM_SERVOS]; @@ -612,7 +606,10 @@ void kill(const char* lcd_msg) { SET_INPUT(PS_ON_PIN); #endif - suicide(); + #if HAS_SUICIDE + suicide(); + #endif + while (1) { #if ENABLED(USE_WATCHDOG) watchdog_reset(); diff --git a/Marlin/src/Marlin.h b/Marlin/src/Marlin.h index e28b09e4e6..27c908b13a 100644 --- a/Marlin/src/Marlin.h +++ b/Marlin/src/Marlin.h @@ -218,4 +218,8 @@ extern millis_t max_inactive_time, stepper_inactive_time; bool pin_is_protected(const int8_t pin); +#if HAS_SUICIDE + inline void suicide() { OUT_WRITE(SUICIDE_PIN, LOW); } +#endif + #endif // __MARLIN_H__ diff --git a/Marlin/src/gcode/control/M80_M81.cpp b/Marlin/src/gcode/control/M80_M81.cpp index a5164a1a7a..682676448f 100644 --- a/Marlin/src/gcode/control/M80_M81.cpp +++ b/Marlin/src/gcode/control/M80_M81.cpp @@ -30,6 +30,10 @@ #include "../../lcd/ultralcd.h" #endif +#if HAS_SUICIDE + #include "../../Marlin.h" +#endif + #if HAS_POWER_SWITCH // Could be moved to a feature, but this is all the data diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index c25e0929f3..e1c8154af3 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -1972,7 +1972,7 @@ void Temperature::isr() { #if ENABLED(ADC_KEYPAD) case Prepare_ADC_KEY: - START_ADC(ADC_KEYPAD_PIN); + HAL_START_ADC(ADC_KEYPAD_PIN); break; case Measure_ADC_KEY: if (ADCKey_count < 16) {