Browse Source

Use _PIN suffix on some pins

Scott Lahteine 8 years ago
parent
commit
07703d2bd6

+ 10
- 4
Marlin/SanityCheck.h View File

@@ -61,10 +61,6 @@
61 61
   #error "Z_LATE_ENABLE can't be used with COREXZ."
62 62
 #elif defined(X_HOME_RETRACT_MM)
63 63
   #error "[XYZ]_HOME_RETRACT_MM settings have been renamed [XYZ]_HOME_BUMP_MM."
64
-#elif defined(BEEPER)
65
-  #error "BEEPER is now BEEPER_PIN. Please update your pins definitions."
66
-#elif defined(SDCARDDETECT)
67
-  #error "SDCARDDETECT is now SD_DETECT_PIN. Please update your pins definitions."
68 64
 #elif defined(SDCARDDETECTINVERTED)
69 65
   #error "SDCARDDETECTINVERTED is now SD_DETECT_INVERTED. Please update your configuration."
70 66
 #elif defined(BTENABLED)
@@ -143,6 +139,16 @@
143 139
   #error "SCARA is now MORGAN_SCARA. Please update your configuration."
144 140
 #elif defined(AUTO_BED_LEVELING_GRID_POINTS)
145 141
   #error "AUTO_BED_LEVELING_GRID_POINTS is now ABL_GRID_POINTS_X and ABL_GRID_POINTS_Y. Please update your configuration."
142
+#elif defined(BEEPER)
143
+  #error "BEEPER is now BEEPER_PIN. Please update your pins definitions."
144
+#elif defined(SDCARDDETECT)
145
+  #error "SDCARDDETECT is now SD_DETECT_PIN. Please update your pins definitions."
146
+#elif defined(STAT_LED_RED) || defined(STAT_LED_BLUE)
147
+  #error "STAT_LED_RED/STAT_LED_BLUE are now STAT_LED_RED_PIN/STAT_LED_BLUE_PIN. Please update your pins definitions."
148
+#elif defined(LCD_PIN_BL)
149
+  #error "LCD_PIN_BL is now LCD_BACKLIGHT_PIN. Please update your pins definitions."
150
+#elif defined(LCD_PIN_RESET)
151
+  #error "LCD_PIN_RESET is now LCD_RESET_PIN. Please update your pins definitions."
146 152
 #endif
147 153
 
148 154
 /**

+ 1
- 1
Marlin/pins_MEGACONTROLLER.h View File

@@ -134,7 +134,7 @@
134 134
   // Pins for DOGM SPI LCD Support
135 135
   #define DOGLCD_A0        47
136 136
   #define DOGLCD_CS        45
137
-  #define LCD_PIN_BL       44  // backlight LED on PA3
137
+  #define LCD_BACKLIGHT_PIN 44  // backlight LED on PA3
138 138
 
139 139
   #define KILL_PIN         12
140 140
   // GLCD features

+ 3
- 3
Marlin/pins_RAMPS.h View File

@@ -240,7 +240,7 @@
240 240
       #define KILL_PIN 41
241 241
 
242 242
       #if ENABLED(BQ_LCD_SMART_CONTROLLER)
243
-        #define LCD_PIN_BL 39
243
+        #define LCD_BACKLIGHT_PIN 39
244 244
       #endif
245 245
 
246 246
     #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
@@ -293,13 +293,13 @@
293 293
       #define BEEPER_PIN 23
294 294
       #define DOGLCD_CS 29
295 295
       #define DOGLCD_A0 27
296
-      #define LCD_PIN_BL 33
296
+      #define LCD_BACKLIGHT_PIN 33
297 297
     #elif ENABLED(MINIPANEL)
298 298
       #define BEEPER_PIN 42
299 299
       // Pins for DOGM SPI LCD Support
300 300
       #define DOGLCD_A0  44
301 301
       #define DOGLCD_CS  66
302
-      #define LCD_PIN_BL 65 // backlight LED on A11/D65
302
+      #define LCD_BACKLIGHT_PIN 65 // backlight LED on A11/D65
303 303
       #define SDSS   53
304 304
 
305 305
       #define KILL_PIN 64

+ 2
- 2
Marlin/pins_SANGUINOLOLU_11.h View File

@@ -56,7 +56,7 @@
56 56
 #if IS_MELZI
57 57
   #define LED_PIN          27 // On some broken versions of the Sanguino libraries the pin definitions are wrong, so LED_PIN needs to be 28. But you should upgrade your Sanguino libraries! See #368.
58 58
 #elif MB(STB_11)
59
-  #define LCD_PIN_BL       17 // LCD backlight LED
59
+  #define LCD_BACKLIGHT_PIN 17 // LCD backlight LED
60 60
 #endif
61 61
 
62 62
 #if ENABLED(Z_PROBE_SLED)
@@ -173,7 +173,7 @@
173 173
   // Pins for DOGM SPI LCD Support
174 174
   #define DOGLCD_A0             30
175 175
   #define DOGLCD_CS             17
176
-  #define LCD_PIN_BL            28 // backlight LED on PA3
176
+  #define LCD_BACKLIGHT_PIN     28 // backlight LED on PA3
177 177
   // GLCD features
178 178
   #define LCD_CONTRAST           1
179 179
   // Uncomment screen orientation

+ 6
- 6
Marlin/ultralcd_impl_DOGM.h View File

@@ -220,14 +220,14 @@ void lcd_printPGM(const char* str) {
220 220
 // Initialize or re-initializw the LCD
221 221
 static void lcd_implementation_init() {
222 222
 
223
-  #if defined(LCD_PIN_BL) && LCD_PIN_BL > -1 // Enable LCD backlight
224
-    pinMode(LCD_PIN_BL, OUTPUT);
225
-    digitalWrite(LCD_PIN_BL, HIGH);
223
+  #if PIN_EXISTS(LCD_BACKLIGHT) // Enable LCD backlight
224
+    pinMode(LCD_BACKLIGHT_PIN, OUTPUT);
225
+    digitalWrite(LCD_BACKLIGHT_PIN, HIGH);
226 226
   #endif
227 227
 
228
-  #if defined(LCD_PIN_RESET) && LCD_PIN_RESET > -1
229
-    pinMode(LCD_PIN_RESET, OUTPUT);
230
-    digitalWrite(LCD_PIN_RESET, HIGH);
228
+  #if PIN_EXISTS(LCD_RESET)
229
+    pinMode(LCD_RESET_PIN, OUTPUT);
230
+    digitalWrite(LCD_RESET_PIN, HIGH);
231 231
   #endif
232 232
 
233 233
   #if DISABLED(MINIPANEL) // setContrast not working for Mini Panel

Loading…
Cancel
Save