Browse Source

Overrideable CASE_LIGHT_PIN

Scott Lahteine 4 years ago
parent
commit
6be76af617

+ 4
- 1
Marlin/src/pins/mega/pins_HJC2560C_REV2.h View File

@@ -103,7 +103,10 @@
103 103
 #define SDSS                                  53
104 104
 #define SD_DETECT_PIN                         39
105 105
 //#define LED_PIN                              8
106
-#define CASE_LIGHT_PIN                         8  // 8 默认挤出机风扇作为Case LED,如果需要PWM FAN,则需要将FAN_PIN置为7,LED_PIN置为8
106
+
107
+#ifndef CASE_LIGHT_PIN
108
+  #define CASE_LIGHT_PIN                       8  // 8 默认挤出机风扇作为Case LED,如果需要PWM FAN,则需要将FAN_PIN置为7,LED_PIN置为8
109
+#endif
107 110
 
108 111
 //#define SAFETY_TRIGGERED_PIN                28  // PIN to detect the safety circuit has triggered
109 112
 //#define MAIN_VOLTAGE_MEASURE_PIN            14  // ANALOG PIN to measure the main voltage, with a 100k - 4k7 resitor divider.

+ 4
- 1
Marlin/src/pins/mega/pins_MEGACONTROLLER.h View File

@@ -128,7 +128,10 @@
128 128
 //
129 129
 #define SDSS                                  53
130 130
 #define LED_PIN                               13
131
-#define CASE_LIGHT_PIN                         2
131
+
132
+#ifndef CASE_LIGHT_PIN
133
+  #define CASE_LIGHT_PIN                       2
134
+#endif
132 135
 
133 136
 //
134 137
 // LCD / Controller

+ 4
- 1
Marlin/src/pins/mega/pins_MEGATRONICS.h View File

@@ -98,7 +98,10 @@
98 98
 #define SDSS                                  53
99 99
 #define LED_PIN                               13
100 100
 #define PS_ON_PIN                             12
101
-#define CASE_LIGHT_PIN                         2
101
+
102
+#ifndef CASE_LIGHT_PIN
103
+  #define CASE_LIGHT_PIN                       2
104
+#endif
102 105
 
103 106
 //
104 107
 // LCD / Controller

+ 4
- 1
Marlin/src/pins/mega/pins_MEGATRONICS_2.h View File

@@ -113,7 +113,10 @@
113 113
 #define SDSS                                  53
114 114
 #define LED_PIN                               13
115 115
 #define PS_ON_PIN                             12
116
-#define CASE_LIGHT_PIN                         2
116
+
117
+#ifndef CASE_LIGHT_PIN
118
+  #define CASE_LIGHT_PIN                       2
119
+#endif
117 120
 
118 121
 //
119 122
 // M3/M4/M5 - Spindle/Laser Control

+ 4
- 1
Marlin/src/pins/mega/pins_MEGATRONICS_3.h View File

@@ -132,7 +132,10 @@
132 132
 #define SDSS                                  53
133 133
 #define LED_PIN                               13
134 134
 #define PS_ON_PIN                             12
135
-#define CASE_LIGHT_PIN                        45  // Try the keypad connector
135
+
136
+#ifndef CASE_LIGHT_PIN
137
+  #define CASE_LIGHT_PIN                      45  // Try the keypad connector
138
+#endif
136 139
 
137 140
 //
138 141
 // LCD / Controller

+ 4
- 1
Marlin/src/pins/mega/pins_SILVER_GATE.h View File

@@ -93,4 +93,7 @@
93 93
 
94 94
 #define STAT_LED_RED_PIN                      23
95 95
 #define STAT_LED_BLUE_PIN                     26
96
-#define CASE_LIGHT_PIN                        51
96
+
97
+#ifndef CASE_LIGHT_PIN
98
+  #define CASE_LIGHT_PIN                      51
99
+#endif

+ 4
- 1
Marlin/src/pins/rambo/pins_EINSY_RAMBO.h View File

@@ -129,7 +129,10 @@
129 129
 //
130 130
 #define SDSS                                  77
131 131
 #define LED_PIN                               13
132
-#define CASE_LIGHT_PIN                         9
132
+
133
+#ifndef CASE_LIGHT_PIN
134
+  #define CASE_LIGHT_PIN                       9
135
+#endif
133 136
 
134 137
 //
135 138
 // M3/M4/M5 - Spindle/Laser Control

+ 4
- 1
Marlin/src/pins/rambo/pins_EINSY_RETRO.h View File

@@ -143,7 +143,10 @@
143 143
 //
144 144
 #define SDSS                                  53
145 145
 #define LED_PIN                               13
146
-#define CASE_LIGHT_PIN                         9
146
+
147
+#ifndef CASE_LIGHT_PIN
148
+  #define CASE_LIGHT_PIN                       9
149
+#endif
147 150
 
148 151
 //
149 152
 // M3/M4/M5 - Spindle/Laser Control

+ 4
- 1
Marlin/src/pins/rambo/pins_RAMBO.h View File

@@ -144,7 +144,10 @@
144 144
 #define SDSS                                  53
145 145
 #define LED_PIN                               13
146 146
 #define PS_ON_PIN                              4
147
-#define CASE_LIGHT_PIN                        46
147
+
148
+#ifndef CASE_LIGHT_PIN
149
+  #define CASE_LIGHT_PIN                      46
150
+#endif
148 151
 
149 152
 #ifndef FILWIDTH_PIN
150 153
   #define FILWIDTH_PIN                         3  // Analog Input

+ 3
- 1
Marlin/src/pins/ramps/pins_3DRAG.h View File

@@ -44,7 +44,9 @@
44 44
 #define RAMPS_D9_PIN                           8
45 45
 #define MOSFET_D_PIN                          12
46 46
 
47
-#define CASE_LIGHT_PIN                        -1  // Hardware PWM but one is not available on expansion header
47
+#ifndef CASE_LIGHT_PIN
48
+  #define CASE_LIGHT_PIN                      -1  // Hardware PWM but one is not available on expansion header
49
+#endif
48 50
 
49 51
 #include "pins_RAMPS.h"
50 52
 

+ 3
- 1
Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h View File

@@ -102,7 +102,9 @@
102 102
 #undef PS_ON_PIN                                  // 12
103 103
 #define PS_ON_PIN                             81  // External Power Supply
104 104
 
105
-#define CASE_LIGHT_PIN                        44  // Hardware PWM
105
+#ifndef CASE_LIGHT_PIN
106
+  #define CASE_LIGHT_PIN                      44  // Hardware PWM
107
+#endif
106 108
 
107 109
 // This board has headers for Z-min, Z-max and IND_S_5V *but* as the bq team
108 110
 // decided to ship the printer only with the probe and no additional Z-min

+ 3
- 1
Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h View File

@@ -172,7 +172,9 @@
172 172
   #define PS_ON_PIN                           12
173 173
 #endif
174 174
 
175
-#define CASE_LIGHT_PIN                         5
175
+#ifndef CASE_LIGHT_PIN
176
+  #define CASE_LIGHT_PIN                       5
177
+#endif
176 178
 
177 179
 //
178 180
 // LCD / Controller

+ 3
- 1
Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h View File

@@ -175,7 +175,9 @@
175 175
   #define PS_ON_PIN                           12
176 176
 #endif
177 177
 
178
-#define CASE_LIGHT_PIN                         8
178
+#ifndef CASE_LIGHT_PIN
179
+  #define CASE_LIGHT_PIN                       8
180
+#endif
179 181
 
180 182
 //
181 183
 // LCD / Controller

+ 5
- 1
Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h View File

@@ -134,12 +134,16 @@
134 134
 //
135 135
 // Misc. Functions
136 136
 //
137
-#define CASE_LIGHT_PIN                         5
138 137
 #define SDSS                                  53
138
+
139 139
 #ifndef LED_PIN
140 140
   #define LED_PIN                             13
141 141
 #endif
142 142
 
143
+#ifndef CASE_LIGHT_PIN
144
+  #define CASE_LIGHT_PIN                       5
145
+#endif
146
+
143 147
 #define SPINDLE_LASER_PWM_PIN                 -1  // Hardware PWM
144 148
 #define SPINDLE_LASER_ENA_PIN                  4  // Pullup!
145 149
 

+ 5
- 1
Marlin/src/pins/ramps/pins_MKS_BASE_14.h View File

@@ -38,7 +38,7 @@
38 38
 #define FAN_PIN                                9  // PH6 ** Pin18 ** PWM9
39 39
 
40 40
 // Other Mods
41
-#define CASE_LIGHT_PIN                        11  // PB5 ** Pin24 ** PWM11
41
+
42 42
 #define SERVO3_PIN                            12  // PB6 ** Pin25 ** D12
43 43
 #define PS_ON_PIN                              2  // X+ // PE4 ** Pin6  ** PWM2       **MUST BE HARDWARE PWM
44 44
 #define FILWIDTH_PIN                          15  // Y+ // PJ0 ** Pin63 ** USART3_RX  **Pin should have a pullup!
@@ -54,6 +54,10 @@
54 54
   #define RGB_LED_B_PIN                       52
55 55
 #endif
56 56
 
57
+#ifndef CASE_LIGHT_PIN
58
+  #define CASE_LIGHT_PIN                      11  // PB5 ** Pin24 ** PWM11
59
+#endif
60
+
57 61
 #include "pins_MKS_BASE_common.h"
58 62
 
59 63
 /*

+ 4
- 1
Marlin/src/pins/ramps/pins_RAMPS_OLD.h View File

@@ -106,7 +106,10 @@
106 106
 #define SDPOWER_PIN                           48
107 107
 #define SDSS                                  53
108 108
 #define LED_PIN                               13
109
-#define CASE_LIGHT_PIN                        45  // Hardware PWM
109
+
110
+#ifndef CASE_LIGHT_PIN
111
+  #define CASE_LIGHT_PIN                      45  // Hardware PWM
112
+#endif
110 113
 
111 114
 //
112 115
 // M3/M4/M5 - Spindle/Laser Control

+ 4
- 1
Marlin/src/pins/ramps/pins_RUMBA.h View File

@@ -153,7 +153,10 @@
153 153
 #define LED_PIN                               13
154 154
 #define PS_ON_PIN                             45
155 155
 #define KILL_PIN                              46
156
-#define CASE_LIGHT_PIN                        45
156
+
157
+#ifndef CASE_LIGHT_PIN
158
+  #define CASE_LIGHT_PIN                      45
159
+#endif
157 160
 
158 161
 //
159 162
 // M3/M4/M5 - Spindle/Laser Control

+ 4
- 1
Marlin/src/pins/ramps/pins_ULTIMAKER.h View File

@@ -111,7 +111,10 @@
111 111
 #define LED_PIN                               13
112 112
 #define PS_ON_PIN                             12
113 113
 #define SUICIDE_PIN                           54  // PIN that has to be turned on right after start, to keep power flowing.
114
-#define CASE_LIGHT_PIN                         8
114
+
115
+#ifndef CASE_LIGHT_PIN
116
+  #define CASE_LIGHT_PIN                       8
117
+#endif
115 118
 
116 119
 //
117 120
 // LCD / Controller

+ 3
- 1
Marlin/src/pins/sam/pins_ARCHIM2.h View File

@@ -216,7 +216,9 @@
216 216
 
217 217
 // Case Light
218 218
 
219
-#define CASE_LIGHT_PIN            GPIO_PB1_J20_5
219
+#ifndef CASE_LIGHT_PIN
220
+  #define CASE_LIGHT_PIN          GPIO_PB1_J20_5
221
+#endif
220 222
 
221 223
 // 2MB SPI Flash
222 224
 #define SPI_FLASH_SS                          52  // D52 PB21

+ 4
- 1
Marlin/src/pins/sanguino/pins_GEN6.h View File

@@ -106,7 +106,10 @@
106 106
 //
107 107
 #define SDSS                                  17
108 108
 #define DEBUG_PIN                              0
109
-#define CASE_LIGHT_PIN                        16  // Hardware PWM
109
+
110
+#ifndef CASE_LIGHT_PIN
111
+  #define CASE_LIGHT_PIN                      16  // Hardware PWM
112
+#endif
110 113
 
111 114
 // RS485 pins
112 115
 #define TX_ENABLE_PIN                         12

+ 4
- 1
Marlin/src/pins/sanguino/pins_GEN7_14.h View File

@@ -102,7 +102,10 @@
102 102
 // Misc. Functions
103 103
 //
104 104
 #define PS_ON_PIN                             15
105
-#define CASE_LIGHT_PIN                        15  // Hardware PWM
105
+
106
+#ifndef CASE_LIGHT_PIN
107
+  #define CASE_LIGHT_PIN                      15  // Hardware PWM
108
+#endif
106 109
 
107 110
 // A pin for debugging
108 111
 #define DEBUG_PIN                              0

+ 4
- 1
Marlin/src/pins/sanguino/pins_GEN7_CUSTOM.h View File

@@ -104,7 +104,10 @@
104 104
 //
105 105
 #define SDSS                                  31  // SCL pin of I2C header || CS Pin for SD Card support
106 106
 #define PS_ON_PIN                             19
107
-#define CASE_LIGHT_PIN                        15  // Hardware PWM
107
+
108
+#ifndef CASE_LIGHT_PIN
109
+  #define CASE_LIGHT_PIN                      15  // Hardware PWM
110
+#endif
108 111
 
109 112
 // A pin for debugging
110 113
 #define DEBUG_PIN                             -1

+ 4
- 1
Marlin/src/pins/stm32f1/pins_CHITU3D.h View File

@@ -84,7 +84,10 @@
84 84
 //
85 85
 #define SDSS                                -1
86 86
 #define LED_PIN                             -1
87
-#define CASE_LIGHT_PIN                      PA8   // 8
87
+
88
+#ifndef CASE_LIGHT_PIN
89
+  #define CASE_LIGHT_PIN                    PA8   // 8
90
+#endif
88 91
 
89 92
 #define PS_ON_PIN                           -1
90 93
 #define KILL_PIN                            PD6   // LED strip 24v

+ 4
- 1
Marlin/src/pins/teensy2/pins_TEENSY2.h View File

@@ -160,7 +160,10 @@
160 160
 #define SDSS                                  20  // B0
161 161
 #define LED_PIN                                6  // D6
162 162
 #define PS_ON_PIN                             27  // B7
163
-#define CASE_LIGHT_PIN                         1  // D1 PWM2B  MUST BE HARDWARE PWM
163
+
164
+#ifndef CASE_LIGHT_PIN
165
+  #define CASE_LIGHT_PIN                       1  // D1 PWM2B  MUST BE HARDWARE PWM
166
+#endif
164 167
 
165 168
 //
166 169
 // LCD / Controller

+ 4
- 1
Marlin/src/pins/teensy2/pins_TEENSYLU.h View File

@@ -134,7 +134,10 @@
134 134
 // Misc. Functions
135 135
 //
136 136
 #define SDSS                                  20  // B0 JP31-6
137
-#define CASE_LIGHT_PIN                         0  // D0 IO-14  PWM0B
137
+
138
+#ifndef CASE_LIGHT_PIN
139
+  #define CASE_LIGHT_PIN                       0  // D0 IO-14  PWM0B
140
+#endif
138 141
 
139 142
 //
140 143
 // LCD / Controller

Loading…
Cancel
Save