Browse Source

Overrideable CASE_LIGHT_PIN

Scott Lahteine 5 years ago
parent
commit
6be76af617

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

103
 #define SDSS                                  53
103
 #define SDSS                                  53
104
 #define SD_DETECT_PIN                         39
104
 #define SD_DETECT_PIN                         39
105
 //#define LED_PIN                              8
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
 //#define SAFETY_TRIGGERED_PIN                28  // PIN to detect the safety circuit has triggered
111
 //#define SAFETY_TRIGGERED_PIN                28  // PIN to detect the safety circuit has triggered
109
 //#define MAIN_VOLTAGE_MEASURE_PIN            14  // ANALOG PIN to measure the main voltage, with a 100k - 4k7 resitor divider.
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
 //
128
 //
129
 #define SDSS                                  53
129
 #define SDSS                                  53
130
 #define LED_PIN                               13
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
 // LCD / Controller
137
 // LCD / Controller

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

98
 #define SDSS                                  53
98
 #define SDSS                                  53
99
 #define LED_PIN                               13
99
 #define LED_PIN                               13
100
 #define PS_ON_PIN                             12
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
 // LCD / Controller
107
 // LCD / Controller

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

113
 #define SDSS                                  53
113
 #define SDSS                                  53
114
 #define LED_PIN                               13
114
 #define LED_PIN                               13
115
 #define PS_ON_PIN                             12
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
 // M3/M4/M5 - Spindle/Laser Control
122
 // M3/M4/M5 - Spindle/Laser Control

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

132
 #define SDSS                                  53
132
 #define SDSS                                  53
133
 #define LED_PIN                               13
133
 #define LED_PIN                               13
134
 #define PS_ON_PIN                             12
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
 // LCD / Controller
141
 // LCD / Controller

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

93
 
93
 
94
 #define STAT_LED_RED_PIN                      23
94
 #define STAT_LED_RED_PIN                      23
95
 #define STAT_LED_BLUE_PIN                     26
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
 //
129
 //
130
 #define SDSS                                  77
130
 #define SDSS                                  77
131
 #define LED_PIN                               13
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
 // M3/M4/M5 - Spindle/Laser Control
138
 // M3/M4/M5 - Spindle/Laser Control

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

143
 //
143
 //
144
 #define SDSS                                  53
144
 #define SDSS                                  53
145
 #define LED_PIN                               13
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
 // M3/M4/M5 - Spindle/Laser Control
152
 // M3/M4/M5 - Spindle/Laser Control

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

144
 #define SDSS                                  53
144
 #define SDSS                                  53
145
 #define LED_PIN                               13
145
 #define LED_PIN                               13
146
 #define PS_ON_PIN                              4
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
 #ifndef FILWIDTH_PIN
152
 #ifndef FILWIDTH_PIN
150
   #define FILWIDTH_PIN                         3  // Analog Input
153
   #define FILWIDTH_PIN                         3  // Analog Input

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

44
 #define RAMPS_D9_PIN                           8
44
 #define RAMPS_D9_PIN                           8
45
 #define MOSFET_D_PIN                          12
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
 #include "pins_RAMPS.h"
51
 #include "pins_RAMPS.h"
50
 
52
 

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

102
 #undef PS_ON_PIN                                  // 12
102
 #undef PS_ON_PIN                                  // 12
103
 #define PS_ON_PIN                             81  // External Power Supply
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
 // This board has headers for Z-min, Z-max and IND_S_5V *but* as the bq team
109
 // This board has headers for Z-min, Z-max and IND_S_5V *but* as the bq team
108
 // decided to ship the printer only with the probe and no additional Z-min
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
   #define PS_ON_PIN                           12
172
   #define PS_ON_PIN                           12
173
 #endif
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
 // LCD / Controller
180
 // LCD / Controller

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

175
   #define PS_ON_PIN                           12
175
   #define PS_ON_PIN                           12
176
 #endif
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
 // LCD / Controller
183
 // LCD / Controller

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

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

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

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

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

106
 #define SDPOWER_PIN                           48
106
 #define SDPOWER_PIN                           48
107
 #define SDSS                                  53
107
 #define SDSS                                  53
108
 #define LED_PIN                               13
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
 // M3/M4/M5 - Spindle/Laser Control
115
 // M3/M4/M5 - Spindle/Laser Control

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

153
 #define LED_PIN                               13
153
 #define LED_PIN                               13
154
 #define PS_ON_PIN                             45
154
 #define PS_ON_PIN                             45
155
 #define KILL_PIN                              46
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
 // M3/M4/M5 - Spindle/Laser Control
162
 // M3/M4/M5 - Spindle/Laser Control

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

111
 #define LED_PIN                               13
111
 #define LED_PIN                               13
112
 #define PS_ON_PIN                             12
112
 #define PS_ON_PIN                             12
113
 #define SUICIDE_PIN                           54  // PIN that has to be turned on right after start, to keep power flowing.
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
 // LCD / Controller
120
 // LCD / Controller

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

216
 
216
 
217
 // Case Light
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
 // 2MB SPI Flash
223
 // 2MB SPI Flash
222
 #define SPI_FLASH_SS                          52  // D52 PB21
224
 #define SPI_FLASH_SS                          52  // D52 PB21

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

106
 //
106
 //
107
 #define SDSS                                  17
107
 #define SDSS                                  17
108
 #define DEBUG_PIN                              0
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
 // RS485 pins
114
 // RS485 pins
112
 #define TX_ENABLE_PIN                         12
115
 #define TX_ENABLE_PIN                         12

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

102
 // Misc. Functions
102
 // Misc. Functions
103
 //
103
 //
104
 #define PS_ON_PIN                             15
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
 // A pin for debugging
110
 // A pin for debugging
108
 #define DEBUG_PIN                              0
111
 #define DEBUG_PIN                              0

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

104
 //
104
 //
105
 #define SDSS                                  31  // SCL pin of I2C header || CS Pin for SD Card support
105
 #define SDSS                                  31  // SCL pin of I2C header || CS Pin for SD Card support
106
 #define PS_ON_PIN                             19
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
 // A pin for debugging
112
 // A pin for debugging
110
 #define DEBUG_PIN                             -1
113
 #define DEBUG_PIN                             -1

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

84
 //
84
 //
85
 #define SDSS                                -1
85
 #define SDSS                                -1
86
 #define LED_PIN                             -1
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
 #define PS_ON_PIN                           -1
92
 #define PS_ON_PIN                           -1
90
 #define KILL_PIN                            PD6   // LED strip 24v
93
 #define KILL_PIN                            PD6   // LED strip 24v

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

160
 #define SDSS                                  20  // B0
160
 #define SDSS                                  20  // B0
161
 #define LED_PIN                                6  // D6
161
 #define LED_PIN                                6  // D6
162
 #define PS_ON_PIN                             27  // B7
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
 // LCD / Controller
169
 // LCD / Controller

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

134
 // Misc. Functions
134
 // Misc. Functions
135
 //
135
 //
136
 #define SDSS                                  20  // B0 JP31-6
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
 // LCD / Controller
143
 // LCD / Controller

Loading…
Cancel
Save