Browse Source

Use _PIN suffix on some pins

Scott Lahteine 9 years ago
parent
commit
07703d2bd6

+ 10
- 4
Marlin/SanityCheck.h View File

61
   #error "Z_LATE_ENABLE can't be used with COREXZ."
61
   #error "Z_LATE_ENABLE can't be used with COREXZ."
62
 #elif defined(X_HOME_RETRACT_MM)
62
 #elif defined(X_HOME_RETRACT_MM)
63
   #error "[XYZ]_HOME_RETRACT_MM settings have been renamed [XYZ]_HOME_BUMP_MM."
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
 #elif defined(SDCARDDETECTINVERTED)
64
 #elif defined(SDCARDDETECTINVERTED)
69
   #error "SDCARDDETECTINVERTED is now SD_DETECT_INVERTED. Please update your configuration."
65
   #error "SDCARDDETECTINVERTED is now SD_DETECT_INVERTED. Please update your configuration."
70
 #elif defined(BTENABLED)
66
 #elif defined(BTENABLED)
143
   #error "SCARA is now MORGAN_SCARA. Please update your configuration."
139
   #error "SCARA is now MORGAN_SCARA. Please update your configuration."
144
 #elif defined(AUTO_BED_LEVELING_GRID_POINTS)
140
 #elif defined(AUTO_BED_LEVELING_GRID_POINTS)
145
   #error "AUTO_BED_LEVELING_GRID_POINTS is now ABL_GRID_POINTS_X and ABL_GRID_POINTS_Y. Please update your configuration."
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
 #endif
152
 #endif
147
 
153
 
148
 /**
154
 /**

+ 1
- 1
Marlin/pins_MEGACONTROLLER.h View File

134
   // Pins for DOGM SPI LCD Support
134
   // Pins for DOGM SPI LCD Support
135
   #define DOGLCD_A0        47
135
   #define DOGLCD_A0        47
136
   #define DOGLCD_CS        45
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
   #define KILL_PIN         12
139
   #define KILL_PIN         12
140
   // GLCD features
140
   // GLCD features

+ 3
- 3
Marlin/pins_RAMPS.h View File

240
       #define KILL_PIN 41
240
       #define KILL_PIN 41
241
 
241
 
242
       #if ENABLED(BQ_LCD_SMART_CONTROLLER)
242
       #if ENABLED(BQ_LCD_SMART_CONTROLLER)
243
-        #define LCD_PIN_BL 39
243
+        #define LCD_BACKLIGHT_PIN 39
244
       #endif
244
       #endif
245
 
245
 
246
     #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
246
     #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
293
       #define BEEPER_PIN 23
293
       #define BEEPER_PIN 23
294
       #define DOGLCD_CS 29
294
       #define DOGLCD_CS 29
295
       #define DOGLCD_A0 27
295
       #define DOGLCD_A0 27
296
-      #define LCD_PIN_BL 33
296
+      #define LCD_BACKLIGHT_PIN 33
297
     #elif ENABLED(MINIPANEL)
297
     #elif ENABLED(MINIPANEL)
298
       #define BEEPER_PIN 42
298
       #define BEEPER_PIN 42
299
       // Pins for DOGM SPI LCD Support
299
       // Pins for DOGM SPI LCD Support
300
       #define DOGLCD_A0  44
300
       #define DOGLCD_A0  44
301
       #define DOGLCD_CS  66
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
       #define SDSS   53
303
       #define SDSS   53
304
 
304
 
305
       #define KILL_PIN 64
305
       #define KILL_PIN 64

+ 2
- 2
Marlin/pins_SANGUINOLOLU_11.h View File

56
 #if IS_MELZI
56
 #if IS_MELZI
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.
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
 #elif MB(STB_11)
58
 #elif MB(STB_11)
59
-  #define LCD_PIN_BL       17 // LCD backlight LED
59
+  #define LCD_BACKLIGHT_PIN 17 // LCD backlight LED
60
 #endif
60
 #endif
61
 
61
 
62
 #if ENABLED(Z_PROBE_SLED)
62
 #if ENABLED(Z_PROBE_SLED)
173
   // Pins for DOGM SPI LCD Support
173
   // Pins for DOGM SPI LCD Support
174
   #define DOGLCD_A0             30
174
   #define DOGLCD_A0             30
175
   #define DOGLCD_CS             17
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
   // GLCD features
177
   // GLCD features
178
   #define LCD_CONTRAST           1
178
   #define LCD_CONTRAST           1
179
   // Uncomment screen orientation
179
   // Uncomment screen orientation

+ 6
- 6
Marlin/ultralcd_impl_DOGM.h View File

220
 // Initialize or re-initializw the LCD
220
 // Initialize or re-initializw the LCD
221
 static void lcd_implementation_init() {
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
   #endif
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
   #endif
231
   #endif
232
 
232
 
233
   #if DISABLED(MINIPANEL) // setContrast not working for Mini Panel
233
   #if DISABLED(MINIPANEL) // setContrast not working for Mini Panel

Loading…
Cancel
Save