diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 15149f257..dca5727d4 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -8719,8 +8719,8 @@ void prepare_move_to_destination() { bool new_led = (max_temp > 55.0) ? true : (max_temp < 54.0) ? false : red_led; if (new_led != red_led) { red_led = new_led; - digitalWrite(STAT_LED_RED, new_led ? HIGH : LOW); - digitalWrite(STAT_LED_BLUE, new_led ? LOW : HIGH); + WRITE(STAT_LED_RED_PIN, new_led ? HIGH : LOW); + WRITE(STAT_LED_BLUE_PIN, new_led ? LOW : HIGH); } } } @@ -9200,14 +9200,12 @@ void setup() { setup_homepin(); - #ifdef STAT_LED_RED - pinMode(STAT_LED_RED, OUTPUT); - digitalWrite(STAT_LED_RED, LOW); // turn it off + #if PIN_EXISTS(STAT_LED_RED) + OUT_WRITE(STAT_LED_RED_PIN, LOW); // turn it off #endif - #ifdef STAT_LED_BLUE - pinMode(STAT_LED_BLUE, OUTPUT); - digitalWrite(STAT_LED_BLUE, LOW); // turn it off + #if PIN_EXISTS(STAT_LED_BLUE) + OUT_WRITE(STAT_LED_BLUE_PIN, LOW); // turn it off #endif lcd_init(); diff --git a/Marlin/pins_A4JP.h b/Marlin/pins_A4JP.h index 28db6c8ea..57cea712b 100644 --- a/Marlin/pins_A4JP.h +++ b/Marlin/pins_A4JP.h @@ -149,8 +149,6 @@ #define SD_DETECT_PIN -1 // Pin 72 if using easy adapter board - #if ENABLED(TEMP_STAT_LEDS) - #define STAT_LED_RED 22 - #define STAT_LED_BLUE 32 - #endif + #define STAT_LED_RED_PIN 22 + #define STAT_LED_BLUE_PIN 32 #endif // VIKI2/miniVIKI diff --git a/Marlin/pins_AZTEEG_X3.h b/Marlin/pins_AZTEEG_X3.h index b33818ee7..1d2ebf74e 100644 --- a/Marlin/pins_AZTEEG_X3.h +++ b/Marlin/pins_AZTEEG_X3.h @@ -42,15 +42,15 @@ #define BTN_ENC 12 #if ENABLED(TEMP_STAT_LEDS) - #undef STAT_LED_RED - #undef STAT_LED_BLUE - #define STAT_LED_RED 64 - #define STAT_LED_BLUE 63 + #undef STAT_LED_RED_PIN + #undef STAT_LED_BLUE_PIN + #define STAT_LED_RED_PIN 64 + #define STAT_LED_BLUE_PIN 63 #endif #elif ENABLED(TEMP_STAT_LEDS) - #define STAT_LED_RED 6 - #define STAT_LED_BLUE 11 + #define STAT_LED_RED_PIN 6 + #define STAT_LED_BLUE_PIN 11 #endif diff --git a/Marlin/pins_AZTEEG_X3_PRO.h b/Marlin/pins_AZTEEG_X3_PRO.h index 4bc575a33..4e64e75a7 100644 --- a/Marlin/pins_AZTEEG_X3_PRO.h +++ b/Marlin/pins_AZTEEG_X3_PRO.h @@ -117,6 +117,6 @@ #undef SD_DETECT_PIN #define SD_DETECT_PIN 49 // For easy adapter board #else - #define STAT_LED_RED 32 - #define STAT_LED_BLUE 35 + #define STAT_LED_RED_PIN 32 + #define STAT_LED_BLUE_PIN 35 #endif diff --git a/Marlin/pins_CNCONTROLS_11.h b/Marlin/pins_CNCONTROLS_11.h index 174fb1634..25be66bcc 100644 --- a/Marlin/pins_CNCONTROLS_11.h +++ b/Marlin/pins_CNCONTROLS_11.h @@ -115,5 +115,5 @@ // // Misc. Functions // -#define STAT_LED_BLUE -1 -#define STAT_LED_RED 31 +#define STAT_LED_BLUE_PIN -1 +#define STAT_LED_RED_PIN 31 diff --git a/Marlin/pins_CNCONTROLS_12.h b/Marlin/pins_CNCONTROLS_12.h index c3d694589..a64b28a0d 100644 --- a/Marlin/pins_CNCONTROLS_12.h +++ b/Marlin/pins_CNCONTROLS_12.h @@ -111,8 +111,8 @@ //#define UI1 43 //#define UI2 37 -#define STAT_LED_BLUE -1 -#define STAT_LED_RED 10 // TOOL_0_PWM_PIN +#define STAT_LED_BLUE_PIN -1 +#define STAT_LED_RED_PIN 10 // TOOL_0_PWM_PIN // // SD Card diff --git a/Marlin/pins_MKS_13.h b/Marlin/pins_MKS_13.h index 3b5b242ab..94099cb68 100644 --- a/Marlin/pins_MKS_13.h +++ b/Marlin/pins_MKS_13.h @@ -120,9 +120,9 @@ #define BEEPER_PIN 25 // yellow RED-LED - #define STAT_LED_RED 16 + #define STAT_LED_RED_PIN 16 // white BLUE-LED - #define STAT_LED_BLUE 17 + #define STAT_LED_BLUE_PIN 17 #endif diff --git a/Marlin/pins_PRINTRBOARD.h b/Marlin/pins_PRINTRBOARD.h index f2a2bbb0f..c51a87a58 100644 --- a/Marlin/pins_PRINTRBOARD.h +++ b/Marlin/pins_PRINTRBOARD.h @@ -132,7 +132,7 @@ #define SDSS 45 #define SD_DETECT_PIN -1 // FastIO (Manual says 72 I'm not certain cause I can't test) #if ENABLED(TEMP_STAT_LEDS) - #define STAT_LED_RED 12 //Non-FastIO - #define STAT_LED_BLUE 10 //Non-FastIO + #define STAT_LED_RED_PIN 12 //Non-FastIO + #define STAT_LED_BLUE_PIN 10 //Non-FastIO #endif #endif diff --git a/Marlin/pins_PRINTRBOARD_REVF.h b/Marlin/pins_PRINTRBOARD_REVF.h index 1b49f8986..31098e937 100644 --- a/Marlin/pins_PRINTRBOARD_REVF.h +++ b/Marlin/pins_PRINTRBOARD_REVF.h @@ -131,7 +131,7 @@ #define SD_DETECT_PIN -1 // FastIO (Manual says 72 I'm not certain cause I can't test) #if ENABLED(TEMP_STAT_LEDS) - #define STAT_LED_RED 12 //Non-FastIO - #define STAT_LED_BLUE 10 //Non-FastIO + #define STAT_LED_RED_PIN 12 //Non-FastIO + #define STAT_LED_BLUE_PIN 10 //Non-FastIO #endif #endif diff --git a/Marlin/pins_RAMBO.h b/Marlin/pins_RAMBO.h index 19778ebc9..22a28fa17 100755 --- a/Marlin/pins_RAMBO.h +++ b/Marlin/pins_RAMBO.h @@ -170,8 +170,8 @@ #define SD_DETECT_PIN -1 // Pin 72 if using easy adapter board #if ENABLED(TEMP_STAT_LEDS) - #define STAT_LED_RED 22 - #define STAT_LED_BLUE 32 + #define STAT_LED_RED_PIN 22 + #define STAT_LED_BLUE_PIN 32 #endif #else diff --git a/Marlin/pins_RAMPS.h b/Marlin/pins_RAMPS.h index 8d5fb41c9..9a1b54a13 100644 --- a/Marlin/pins_RAMPS.h +++ b/Marlin/pins_RAMPS.h @@ -281,8 +281,8 @@ #define KILL_PIN 31 #if ENABLED(TEMP_STAT_LEDS) - #define STAT_LED_RED 32 - #define STAT_LED_BLUE 35 + #define STAT_LED_RED_PIN 32 + #define STAT_LED_BLUE_PIN 35 #endif #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) #define BTN_EN1 35 // reverse if the encoder turns the wrong way.