Browse Source

Rename status led pins

Scott Lahteine 8 years ago
parent
commit
fba0b67f7d

+ 6
- 8
Marlin/Marlin_main.cpp View File

8719
       bool new_led = (max_temp > 55.0) ? true : (max_temp < 54.0) ? false : red_led;
8719
       bool new_led = (max_temp > 55.0) ? true : (max_temp < 54.0) ? false : red_led;
8720
       if (new_led != red_led) {
8720
       if (new_led != red_led) {
8721
         red_led = new_led;
8721
         red_led = new_led;
8722
-        digitalWrite(STAT_LED_RED, new_led ? HIGH : LOW);
8723
-        digitalWrite(STAT_LED_BLUE, new_led ? LOW : HIGH);
8722
+        WRITE(STAT_LED_RED_PIN, new_led ? HIGH : LOW);
8723
+        WRITE(STAT_LED_BLUE_PIN, new_led ? LOW : HIGH);
8724
       }
8724
       }
8725
     }
8725
     }
8726
   }
8726
   }
9200
 
9200
 
9201
   setup_homepin();
9201
   setup_homepin();
9202
 
9202
 
9203
-  #ifdef STAT_LED_RED
9204
-    pinMode(STAT_LED_RED, OUTPUT);
9205
-    digitalWrite(STAT_LED_RED, LOW); // turn it off
9203
+  #if PIN_EXISTS(STAT_LED_RED)
9204
+    OUT_WRITE(STAT_LED_RED_PIN, LOW); // turn it off
9206
   #endif
9205
   #endif
9207
 
9206
 
9208
-  #ifdef STAT_LED_BLUE
9209
-    pinMode(STAT_LED_BLUE, OUTPUT);
9210
-    digitalWrite(STAT_LED_BLUE, LOW); // turn it off
9207
+  #if PIN_EXISTS(STAT_LED_BLUE)
9208
+    OUT_WRITE(STAT_LED_BLUE_PIN, LOW); // turn it off
9211
   #endif
9209
   #endif
9212
 
9210
 
9213
   lcd_init();
9211
   lcd_init();

+ 2
- 4
Marlin/pins_A4JP.h View File

149
 
149
 
150
   #define SD_DETECT_PIN -1 // Pin 72 if using easy adapter board
150
   #define SD_DETECT_PIN -1 // Pin 72 if using easy adapter board
151
 
151
 
152
-  #if ENABLED(TEMP_STAT_LEDS)
153
-    #define STAT_LED_RED      22
154
-    #define STAT_LED_BLUE     32
155
-  #endif
152
+  #define STAT_LED_RED_PIN  22
153
+  #define STAT_LED_BLUE_PIN 32
156
 #endif // VIKI2/miniVIKI
154
 #endif // VIKI2/miniVIKI

+ 6
- 6
Marlin/pins_AZTEEG_X3.h View File

42
   #define BTN_ENC           12
42
   #define BTN_ENC           12
43
 
43
 
44
   #if ENABLED(TEMP_STAT_LEDS)
44
   #if ENABLED(TEMP_STAT_LEDS)
45
-    #undef STAT_LED_RED
46
-    #undef STAT_LED_BLUE
47
-    #define STAT_LED_RED    64
48
-    #define STAT_LED_BLUE   63
45
+    #undef STAT_LED_RED_PIN
46
+    #undef STAT_LED_BLUE_PIN
47
+    #define STAT_LED_RED_PIN    64
48
+    #define STAT_LED_BLUE_PIN   63
49
   #endif
49
   #endif
50
 
50
 
51
 #elif ENABLED(TEMP_STAT_LEDS)
51
 #elif ENABLED(TEMP_STAT_LEDS)
52
 
52
 
53
-  #define STAT_LED_RED       6
54
-  #define STAT_LED_BLUE     11
53
+  #define STAT_LED_RED_PIN       6
54
+  #define STAT_LED_BLUE_PIN     11
55
 
55
 
56
 #endif
56
 #endif

+ 2
- 2
Marlin/pins_AZTEEG_X3_PRO.h View File

117
   #undef SD_DETECT_PIN
117
   #undef SD_DETECT_PIN
118
   #define SD_DETECT_PIN    49 // For easy adapter board
118
   #define SD_DETECT_PIN    49 // For easy adapter board
119
 #else
119
 #else
120
-  #define STAT_LED_RED     32
121
-  #define STAT_LED_BLUE    35
120
+  #define STAT_LED_RED_PIN     32
121
+  #define STAT_LED_BLUE_PIN    35
122
 #endif
122
 #endif

+ 2
- 2
Marlin/pins_CNCONTROLS_11.h View File

115
 //
115
 //
116
 // Misc. Functions
116
 // Misc. Functions
117
 //
117
 //
118
-#define STAT_LED_BLUE      -1
119
-#define STAT_LED_RED       31
118
+#define STAT_LED_BLUE_PIN      -1
119
+#define STAT_LED_RED_PIN       31

+ 2
- 2
Marlin/pins_CNCONTROLS_12.h View File

111
 //#define UI1              43
111
 //#define UI1              43
112
 //#define UI2              37
112
 //#define UI2              37
113
 
113
 
114
-#define STAT_LED_BLUE      -1
115
-#define STAT_LED_RED       10 // TOOL_0_PWM_PIN
114
+#define STAT_LED_BLUE_PIN      -1
115
+#define STAT_LED_RED_PIN       10 // TOOL_0_PWM_PIN
116
 
116
 
117
 //
117
 //
118
 // SD Card
118
 // SD Card

+ 2
- 2
Marlin/pins_MKS_13.h View File

120
   #define BEEPER_PIN      25
120
   #define BEEPER_PIN      25
121
 
121
 
122
   // yellow               RED-LED
122
   // yellow               RED-LED
123
-  #define STAT_LED_RED    16
123
+  #define STAT_LED_RED_PIN    16
124
 
124
 
125
   // white                BLUE-LED
125
   // white                BLUE-LED
126
-  #define STAT_LED_BLUE   17
126
+  #define STAT_LED_BLUE_PIN   17
127
 
127
 
128
 #endif
128
 #endif

+ 2
- 2
Marlin/pins_PRINTRBOARD.h View File

132
   #define SDSS 45
132
   #define SDSS 45
133
   #define SD_DETECT_PIN -1 // FastIO (Manual says 72 I'm not certain cause I can't test)
133
   #define SD_DETECT_PIN -1 // FastIO (Manual says 72 I'm not certain cause I can't test)
134
   #if ENABLED(TEMP_STAT_LEDS)
134
   #if ENABLED(TEMP_STAT_LEDS)
135
-    #define STAT_LED_RED      12 //Non-FastIO
136
-    #define STAT_LED_BLUE     10 //Non-FastIO
135
+    #define STAT_LED_RED_PIN      12 //Non-FastIO
136
+    #define STAT_LED_BLUE_PIN     10 //Non-FastIO
137
   #endif
137
   #endif
138
 #endif
138
 #endif

+ 2
- 2
Marlin/pins_PRINTRBOARD_REVF.h View File

131
   #define SD_DETECT_PIN -1 // FastIO (Manual says 72 I'm not certain cause I can't test)
131
   #define SD_DETECT_PIN -1 // FastIO (Manual says 72 I'm not certain cause I can't test)
132
 
132
 
133
   #if ENABLED(TEMP_STAT_LEDS)
133
   #if ENABLED(TEMP_STAT_LEDS)
134
-    #define STAT_LED_RED      12 //Non-FastIO
135
-    #define STAT_LED_BLUE     10 //Non-FastIO
134
+    #define STAT_LED_RED_PIN      12 //Non-FastIO
135
+    #define STAT_LED_BLUE_PIN     10 //Non-FastIO
136
   #endif
136
   #endif
137
 #endif
137
 #endif

+ 2
- 2
Marlin/pins_RAMBO.h View File

170
       #define SD_DETECT_PIN -1 // Pin 72 if using easy adapter board
170
       #define SD_DETECT_PIN -1 // Pin 72 if using easy adapter board
171
 
171
 
172
       #if ENABLED(TEMP_STAT_LEDS)
172
       #if ENABLED(TEMP_STAT_LEDS)
173
-        #define STAT_LED_RED      22
174
-        #define STAT_LED_BLUE     32
173
+        #define STAT_LED_RED_PIN      22
174
+        #define STAT_LED_BLUE_PIN     32
175
       #endif
175
       #endif
176
 
176
 
177
     #else
177
     #else

+ 2
- 2
Marlin/pins_RAMPS.h View File

281
       #define KILL_PIN         31
281
       #define KILL_PIN         31
282
 
282
 
283
       #if ENABLED(TEMP_STAT_LEDS)
283
       #if ENABLED(TEMP_STAT_LEDS)
284
-        #define STAT_LED_RED   32
285
-        #define STAT_LED_BLUE  35
284
+        #define STAT_LED_RED_PIN   32
285
+        #define STAT_LED_BLUE_PIN  35
286
       #endif
286
       #endif
287
     #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
287
     #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
288
       #define BTN_EN1 35  // reverse if the encoder turns the wrong way.
288
       #define BTN_EN1 35  // reverse if the encoder turns the wrong way.

Loading…
Cancel
Save