diff --git a/Marlin/src/pins/mega/pins_HJC2560C_REV2.h b/Marlin/src/pins/mega/pins_HJC2560C_REV2.h index 66adfb2fa7d79005e16032c50e7490c885061fb8..f296f1ba3e2e5d67e9e2d73a03e68183e0f530dd 100644 --- a/Marlin/src/pins/mega/pins_HJC2560C_REV2.h +++ b/Marlin/src/pins/mega/pins_HJC2560C_REV2.h @@ -103,7 +103,10 @@ #define SDSS 53 #define SD_DETECT_PIN 39 //#define LED_PIN 8 -#define CASE_LIGHT_PIN 8 // 8 默认挤出机风扇作为Case LED,如果需è¦PWM FAN,则需è¦å°†FAN_PIN置为7,LED_PIN置为8 + +#ifndef CASE_LIGHT_PIN + #define CASE_LIGHT_PIN 8 // 8 默认挤出机风扇作为Case LED,如果需è¦PWM FAN,则需è¦å°†FAN_PIN置为7,LED_PIN置为8 +#endif //#define SAFETY_TRIGGERED_PIN 28 // PIN to detect the safety circuit has triggered //#define MAIN_VOLTAGE_MEASURE_PIN 14 // ANALOG PIN to measure the main voltage, with a 100k - 4k7 resitor divider. diff --git a/Marlin/src/pins/mega/pins_MEGACONTROLLER.h b/Marlin/src/pins/mega/pins_MEGACONTROLLER.h index 2d0db15825118db6f037060fb9cfa2b9f15c0452..bcb0f77570c958ae1b9cd48cebdf6629615bd031 100644 --- a/Marlin/src/pins/mega/pins_MEGACONTROLLER.h +++ b/Marlin/src/pins/mega/pins_MEGACONTROLLER.h @@ -128,7 +128,10 @@ // #define SDSS 53 #define LED_PIN 13 -#define CASE_LIGHT_PIN 2 + +#ifndef CASE_LIGHT_PIN + #define CASE_LIGHT_PIN 2 +#endif // // LCD / Controller diff --git a/Marlin/src/pins/mega/pins_MEGATRONICS.h b/Marlin/src/pins/mega/pins_MEGATRONICS.h index 4d7a98005077c068b2c666b9a67a8de09a1e415f..db50dddc7d81478e9f57c2d076a54d1a403eaf59 100644 --- a/Marlin/src/pins/mega/pins_MEGATRONICS.h +++ b/Marlin/src/pins/mega/pins_MEGATRONICS.h @@ -98,7 +98,10 @@ #define SDSS 53 #define LED_PIN 13 #define PS_ON_PIN 12 -#define CASE_LIGHT_PIN 2 + +#ifndef CASE_LIGHT_PIN + #define CASE_LIGHT_PIN 2 +#endif // // LCD / Controller diff --git a/Marlin/src/pins/mega/pins_MEGATRONICS_2.h b/Marlin/src/pins/mega/pins_MEGATRONICS_2.h index d976e0981682258e36fcbebf0e02dfeeaaddf580..f3551114e241fb8be87a4fff931958d68bb45901 100644 --- a/Marlin/src/pins/mega/pins_MEGATRONICS_2.h +++ b/Marlin/src/pins/mega/pins_MEGATRONICS_2.h @@ -113,7 +113,10 @@ #define SDSS 53 #define LED_PIN 13 #define PS_ON_PIN 12 -#define CASE_LIGHT_PIN 2 + +#ifndef CASE_LIGHT_PIN + #define CASE_LIGHT_PIN 2 +#endif // // M3/M4/M5 - Spindle/Laser Control diff --git a/Marlin/src/pins/mega/pins_MEGATRONICS_3.h b/Marlin/src/pins/mega/pins_MEGATRONICS_3.h index 78dd88809ff0d4e1d709dbcc5c72e48f0b32b26c..3bee7e5f1a935012abc845392d8d0175cbd655f3 100644 --- a/Marlin/src/pins/mega/pins_MEGATRONICS_3.h +++ b/Marlin/src/pins/mega/pins_MEGATRONICS_3.h @@ -132,7 +132,10 @@ #define SDSS 53 #define LED_PIN 13 #define PS_ON_PIN 12 -#define CASE_LIGHT_PIN 45 // Try the keypad connector + +#ifndef CASE_LIGHT_PIN + #define CASE_LIGHT_PIN 45 // Try the keypad connector +#endif // // LCD / Controller diff --git a/Marlin/src/pins/mega/pins_SILVER_GATE.h b/Marlin/src/pins/mega/pins_SILVER_GATE.h index 351691a09e85b816fce401c7b488a2d6ee5209a1..dbe473ddb9b8142fb0cef863aba9a1fdcec3be99 100644 --- a/Marlin/src/pins/mega/pins_SILVER_GATE.h +++ b/Marlin/src/pins/mega/pins_SILVER_GATE.h @@ -93,4 +93,7 @@ #define STAT_LED_RED_PIN 23 #define STAT_LED_BLUE_PIN 26 -#define CASE_LIGHT_PIN 51 + +#ifndef CASE_LIGHT_PIN + #define CASE_LIGHT_PIN 51 +#endif diff --git a/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h b/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h index 430fa170e12aee4cade3d054faeffad099b99060..630d993d21a15eda8a0579419f42b7ed97dcfa81 100644 --- a/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h +++ b/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h @@ -129,7 +129,10 @@ // #define SDSS 77 #define LED_PIN 13 -#define CASE_LIGHT_PIN 9 + +#ifndef CASE_LIGHT_PIN + #define CASE_LIGHT_PIN 9 +#endif // // M3/M4/M5 - Spindle/Laser Control diff --git a/Marlin/src/pins/rambo/pins_EINSY_RETRO.h b/Marlin/src/pins/rambo/pins_EINSY_RETRO.h index 6e8463d0bdcd2870a83894478f5284b43e10c479..ed5b008bf8d15518e9b9f92e07036eb9d3c05a2c 100644 --- a/Marlin/src/pins/rambo/pins_EINSY_RETRO.h +++ b/Marlin/src/pins/rambo/pins_EINSY_RETRO.h @@ -143,7 +143,10 @@ // #define SDSS 53 #define LED_PIN 13 -#define CASE_LIGHT_PIN 9 + +#ifndef CASE_LIGHT_PIN + #define CASE_LIGHT_PIN 9 +#endif // // M3/M4/M5 - Spindle/Laser Control diff --git a/Marlin/src/pins/rambo/pins_RAMBO.h b/Marlin/src/pins/rambo/pins_RAMBO.h index dec72b8ea7517898dc2c13384e1e9688d81c0ad4..7a61053069f5a9efbc021040230f4d3250c6f556 100644 --- a/Marlin/src/pins/rambo/pins_RAMBO.h +++ b/Marlin/src/pins/rambo/pins_RAMBO.h @@ -144,7 +144,10 @@ #define SDSS 53 #define LED_PIN 13 #define PS_ON_PIN 4 -#define CASE_LIGHT_PIN 46 + +#ifndef CASE_LIGHT_PIN + #define CASE_LIGHT_PIN 46 +#endif #ifndef FILWIDTH_PIN #define FILWIDTH_PIN 3 // Analog Input diff --git a/Marlin/src/pins/ramps/pins_3DRAG.h b/Marlin/src/pins/ramps/pins_3DRAG.h index 69d2ac2088ff4b592c9297bce25e93f7ae1101e7..974e9ad8b868680a6e45c3443d45d55fc680a664 100644 --- a/Marlin/src/pins/ramps/pins_3DRAG.h +++ b/Marlin/src/pins/ramps/pins_3DRAG.h @@ -44,7 +44,9 @@ #define RAMPS_D9_PIN 8 #define MOSFET_D_PIN 12 -#define CASE_LIGHT_PIN -1 // Hardware PWM but one is not available on expansion header +#ifndef CASE_LIGHT_PIN + #define CASE_LIGHT_PIN -1 // Hardware PWM but one is not available on expansion header +#endif #include "pins_RAMPS.h" diff --git a/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h b/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h index 454311b7cc7932822846a8a647a1bbeac90c987b..99392117962e5120f7bf7ec3fbf12cab2e97f379 100644 --- a/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h +++ b/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h @@ -102,7 +102,9 @@ #undef PS_ON_PIN // 12 #define PS_ON_PIN 81 // External Power Supply -#define CASE_LIGHT_PIN 44 // Hardware PWM +#ifndef CASE_LIGHT_PIN + #define CASE_LIGHT_PIN 44 // Hardware PWM +#endif // This board has headers for Z-min, Z-max and IND_S_5V *but* as the bq team // decided to ship the printer only with the probe and no additional Z-min diff --git a/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h b/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h index 8993d0ff57a012f8378b52b4dc65844d3a1810ad..c95db793c1af2151938fe2282f960ceace044c05 100644 --- a/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h +++ b/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h @@ -172,7 +172,9 @@ #define PS_ON_PIN 12 #endif -#define CASE_LIGHT_PIN 5 +#ifndef CASE_LIGHT_PIN + #define CASE_LIGHT_PIN 5 +#endif // // LCD / Controller diff --git a/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h b/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h index 4e62c67aaff86dcd091030c9fdfd4909843ccc7a..d9286e4a01da16680fd1c63a48525df4b25db36f 100644 --- a/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h +++ b/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h @@ -175,7 +175,9 @@ #define PS_ON_PIN 12 #endif -#define CASE_LIGHT_PIN 8 +#ifndef CASE_LIGHT_PIN + #define CASE_LIGHT_PIN 8 +#endif // // LCD / Controller diff --git a/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h b/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h index 3846a7649e70da4fcbcfadc46627da6259a9e086..2a789a2167803536213c24f3446bdd8aac53dce7 100644 --- a/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h +++ b/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h @@ -134,12 +134,16 @@ // // Misc. Functions // -#define CASE_LIGHT_PIN 5 #define SDSS 53 + #ifndef LED_PIN #define LED_PIN 13 #endif +#ifndef CASE_LIGHT_PIN + #define CASE_LIGHT_PIN 5 +#endif + #define SPINDLE_LASER_PWM_PIN -1 // Hardware PWM #define SPINDLE_LASER_ENA_PIN 4 // Pullup! diff --git a/Marlin/src/pins/ramps/pins_MKS_BASE_14.h b/Marlin/src/pins/ramps/pins_MKS_BASE_14.h index 057b51a5845c3a38732bf409b0a727ca3ec224d2..0d5929b71448ca918e8708b333cc6babc699f688 100644 --- a/Marlin/src/pins/ramps/pins_MKS_BASE_14.h +++ b/Marlin/src/pins/ramps/pins_MKS_BASE_14.h @@ -38,7 +38,7 @@ #define FAN_PIN 9 // PH6 ** Pin18 ** PWM9 // Other Mods -#define CASE_LIGHT_PIN 11 // PB5 ** Pin24 ** PWM11 + #define SERVO3_PIN 12 // PB6 ** Pin25 ** D12 #define PS_ON_PIN 2 // X+ // PE4 ** Pin6 ** PWM2 **MUST BE HARDWARE PWM #define FILWIDTH_PIN 15 // Y+ // PJ0 ** Pin63 ** USART3_RX **Pin should have a pullup! @@ -54,6 +54,10 @@ #define RGB_LED_B_PIN 52 #endif +#ifndef CASE_LIGHT_PIN + #define CASE_LIGHT_PIN 11 // PB5 ** Pin24 ** PWM11 +#endif + #include "pins_MKS_BASE_common.h" /* diff --git a/Marlin/src/pins/ramps/pins_RAMPS_OLD.h b/Marlin/src/pins/ramps/pins_RAMPS_OLD.h index 0323366944d4d49b1ba37699a756c190735aa89d..b3d1a7ca6363fd26f533d302ca4bc77e0274f279 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS_OLD.h +++ b/Marlin/src/pins/ramps/pins_RAMPS_OLD.h @@ -106,7 +106,10 @@ #define SDPOWER_PIN 48 #define SDSS 53 #define LED_PIN 13 -#define CASE_LIGHT_PIN 45 // Hardware PWM + +#ifndef CASE_LIGHT_PIN + #define CASE_LIGHT_PIN 45 // Hardware PWM +#endif // // M3/M4/M5 - Spindle/Laser Control diff --git a/Marlin/src/pins/ramps/pins_RUMBA.h b/Marlin/src/pins/ramps/pins_RUMBA.h index 4bf10d73994e3ceba1163abd2a4701b775dd838e..fd220dc5b79cd92969b8d5b749d4f546acdd71b8 100644 --- a/Marlin/src/pins/ramps/pins_RUMBA.h +++ b/Marlin/src/pins/ramps/pins_RUMBA.h @@ -153,7 +153,10 @@ #define LED_PIN 13 #define PS_ON_PIN 45 #define KILL_PIN 46 -#define CASE_LIGHT_PIN 45 + +#ifndef CASE_LIGHT_PIN + #define CASE_LIGHT_PIN 45 +#endif // // M3/M4/M5 - Spindle/Laser Control diff --git a/Marlin/src/pins/ramps/pins_ULTIMAKER.h b/Marlin/src/pins/ramps/pins_ULTIMAKER.h index 8cc588a2f9915cd7e4cdda8db63aa937481ba93a..4e666b78cedb66d05b2f7d2381b32181ca927c74 100644 --- a/Marlin/src/pins/ramps/pins_ULTIMAKER.h +++ b/Marlin/src/pins/ramps/pins_ULTIMAKER.h @@ -111,7 +111,10 @@ #define LED_PIN 13 #define PS_ON_PIN 12 #define SUICIDE_PIN 54 // PIN that has to be turned on right after start, to keep power flowing. -#define CASE_LIGHT_PIN 8 + +#ifndef CASE_LIGHT_PIN + #define CASE_LIGHT_PIN 8 +#endif // // LCD / Controller diff --git a/Marlin/src/pins/sam/pins_ARCHIM2.h b/Marlin/src/pins/sam/pins_ARCHIM2.h index d2114ea4333fe4b47a7afaa6e36bab20fd44c401..03d5ebef198e829baf9d4c90ecdaf50e91a7b8d6 100644 --- a/Marlin/src/pins/sam/pins_ARCHIM2.h +++ b/Marlin/src/pins/sam/pins_ARCHIM2.h @@ -216,7 +216,9 @@ // Case Light -#define CASE_LIGHT_PIN GPIO_PB1_J20_5 +#ifndef CASE_LIGHT_PIN + #define CASE_LIGHT_PIN GPIO_PB1_J20_5 +#endif // 2MB SPI Flash #define SPI_FLASH_SS 52 // D52 PB21 diff --git a/Marlin/src/pins/sanguino/pins_GEN6.h b/Marlin/src/pins/sanguino/pins_GEN6.h index 0d2449ae6e998ba71de02ecec1b93bb9113f7fc4..dd00e6f42b1a559b15bf81d55e863cb4b7fb5c12 100644 --- a/Marlin/src/pins/sanguino/pins_GEN6.h +++ b/Marlin/src/pins/sanguino/pins_GEN6.h @@ -106,7 +106,10 @@ // #define SDSS 17 #define DEBUG_PIN 0 -#define CASE_LIGHT_PIN 16 // Hardware PWM + +#ifndef CASE_LIGHT_PIN + #define CASE_LIGHT_PIN 16 // Hardware PWM +#endif // RS485 pins #define TX_ENABLE_PIN 12 diff --git a/Marlin/src/pins/sanguino/pins_GEN7_14.h b/Marlin/src/pins/sanguino/pins_GEN7_14.h index 9dc9f2808b7799bc6b1bd2037e2e31d9718619f0..f53563cdece4be8c37fda7729eee72c835dd2e12 100644 --- a/Marlin/src/pins/sanguino/pins_GEN7_14.h +++ b/Marlin/src/pins/sanguino/pins_GEN7_14.h @@ -102,7 +102,10 @@ // Misc. Functions // #define PS_ON_PIN 15 -#define CASE_LIGHT_PIN 15 // Hardware PWM + +#ifndef CASE_LIGHT_PIN + #define CASE_LIGHT_PIN 15 // Hardware PWM +#endif // A pin for debugging #define DEBUG_PIN 0 diff --git a/Marlin/src/pins/sanguino/pins_GEN7_CUSTOM.h b/Marlin/src/pins/sanguino/pins_GEN7_CUSTOM.h index 67a9762fa085ac4f70cf4acd1d3c83fc1bc0d414..a3279eb8e6b15311cfe81a96f7d8c66ec4715f79 100644 --- a/Marlin/src/pins/sanguino/pins_GEN7_CUSTOM.h +++ b/Marlin/src/pins/sanguino/pins_GEN7_CUSTOM.h @@ -104,7 +104,10 @@ // #define SDSS 31 // SCL pin of I2C header || CS Pin for SD Card support #define PS_ON_PIN 19 -#define CASE_LIGHT_PIN 15 // Hardware PWM + +#ifndef CASE_LIGHT_PIN + #define CASE_LIGHT_PIN 15 // Hardware PWM +#endif // A pin for debugging #define DEBUG_PIN -1 diff --git a/Marlin/src/pins/stm32f1/pins_CHITU3D.h b/Marlin/src/pins/stm32f1/pins_CHITU3D.h index b9272c72116710dbd27896d580a1dc9cfc1d3113..810d916ccfb7208fa26a83369696ba179230a338 100644 --- a/Marlin/src/pins/stm32f1/pins_CHITU3D.h +++ b/Marlin/src/pins/stm32f1/pins_CHITU3D.h @@ -84,7 +84,10 @@ // #define SDSS -1 #define LED_PIN -1 -#define CASE_LIGHT_PIN PA8 // 8 + +#ifndef CASE_LIGHT_PIN + #define CASE_LIGHT_PIN PA8 // 8 +#endif #define PS_ON_PIN -1 #define KILL_PIN PD6 // LED strip 24v diff --git a/Marlin/src/pins/teensy2/pins_TEENSY2.h b/Marlin/src/pins/teensy2/pins_TEENSY2.h index eb116ee3e8922c85c1e31560f98b6d2f708cc7d8..f72cb2bfd35ac81b39226c2e397b503a609567b7 100644 --- a/Marlin/src/pins/teensy2/pins_TEENSY2.h +++ b/Marlin/src/pins/teensy2/pins_TEENSY2.h @@ -160,7 +160,10 @@ #define SDSS 20 // B0 #define LED_PIN 6 // D6 #define PS_ON_PIN 27 // B7 -#define CASE_LIGHT_PIN 1 // D1 PWM2B MUST BE HARDWARE PWM + +#ifndef CASE_LIGHT_PIN + #define CASE_LIGHT_PIN 1 // D1 PWM2B MUST BE HARDWARE PWM +#endif // // LCD / Controller diff --git a/Marlin/src/pins/teensy2/pins_TEENSYLU.h b/Marlin/src/pins/teensy2/pins_TEENSYLU.h index 05f433cb89284b79983ce6aacac80500dee5012a..5061b849cf3298edd49c417bf289555798b65dfb 100644 --- a/Marlin/src/pins/teensy2/pins_TEENSYLU.h +++ b/Marlin/src/pins/teensy2/pins_TEENSYLU.h @@ -134,7 +134,10 @@ // Misc. Functions // #define SDSS 20 // B0 JP31-6 -#define CASE_LIGHT_PIN 0 // D0 IO-14 PWM0B + +#ifndef CASE_LIGHT_PIN + #define CASE_LIGHT_PIN 0 // D0 IO-14 PWM0B +#endif // // LCD / Controller