Browse Source

TFT Presets, Generic options, Sanity checks (#19723)

Scott Lahteine 4 years ago
parent
commit
f6ffbe548c
No account linked to committer's email address
100 changed files with 514 additions and 527 deletions
  1. 76
    15
      Marlin/Configuration.h
  2. 3
    3
      Marlin/Configuration_adv.h
  3. 1
    1
      Marlin/src/HAL/LPC1768/inc/SanityCheck.h
  4. 3
    3
      Marlin/src/HAL/STM32F1/HAL.cpp
  5. 3
    1
      Marlin/src/core/macros.h
  6. 1
    1
      Marlin/src/feature/bedlevel/ubl/ubl.h
  7. 118
    136
      Marlin/src/inc/Conditionals_LCD.h
  8. 2
    2
      Marlin/src/inc/Conditionals_adv.h
  9. 2
    2
      Marlin/src/inc/Conditionals_post.h
  10. 88
    105
      Marlin/src/inc/SanityCheck.h
  11. 1
    1
      Marlin/src/inc/Version.h
  12. 1
    1
      Marlin/src/lcd/TFTGLCD/ultralcd_TFTGLCD.cpp
  13. 1
    1
      Marlin/src/lcd/dogm/HAL_LCD_com_defines.h
  14. 2
    2
      Marlin/src/lcd/dogm/u8g_dev_tft_upscale_from_128x64.cpp
  15. 1
    1
      Marlin/src/lcd/dogm/ultralcd_DOGM.h
  16. 3
    3
      Marlin/src/lcd/extui/lib/mks_ui/draw_print_file.cpp
  17. 2
    2
      Marlin/src/lcd/extui/lib/mks_ui/draw_ui.cpp
  18. 2
    2
      Marlin/src/lcd/scaled_tft.h
  19. 4
    4
      Marlin/src/lcd/ultralcd.cpp
  20. 5
    6
      Marlin/src/lcd/ultralcd.h
  21. 1
    1
      Marlin/src/pins/esp32/pins_MRR_ESPE.h
  22. 7
    7
      Marlin/src/pins/linux/pins_RAMPS_LINUX.h
  23. 2
    2
      Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h
  24. 2
    2
      Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h
  25. 1
    1
      Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h
  26. 1
    4
      Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h
  27. 1
    1
      Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h
  28. 1
    1
      Marlin/src/pins/lpc1768/pins_MKS_SBASE.h
  29. 1
    1
      Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h
  30. 4
    4
      Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h
  31. 2
    2
      Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h
  32. 3
    3
      Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h
  33. 1
    1
      Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h
  34. 1
    1
      Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h
  35. 1
    1
      Marlin/src/pins/mega/pins_CHEAPTRONICv2.h
  36. 3
    3
      Marlin/src/pins/mega/pins_GT2560_REV_A.h
  37. 1
    1
      Marlin/src/pins/mega/pins_GT2560_V3.h
  38. 1
    1
      Marlin/src/pins/mega/pins_GT2560_V3_A20.h
  39. 2
    2
      Marlin/src/pins/mega/pins_HJC2560C_REV2.h
  40. 2
    2
      Marlin/src/pins/mega/pins_MEGATRONICS.h
  41. 1
    1
      Marlin/src/pins/mega/pins_MEGATRONICS_2.h
  42. 1
    1
      Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h
  43. 1
    1
      Marlin/src/pins/mega/pins_OVERLORD.h
  44. 3
    1
      Marlin/src/pins/pins.h
  45. 2
    2
      Marlin/src/pins/rambo/pins_EINSY_RAMBO.h
  46. 2
    2
      Marlin/src/pins/rambo/pins_EINSY_RETRO.h
  47. 2
    2
      Marlin/src/pins/rambo/pins_MINIRAMBO.h
  48. 3
    3
      Marlin/src/pins/rambo/pins_RAMBO.h
  49. 3
    3
      Marlin/src/pins/ramps/pins_3DRAG.h
  50. 2
    2
      Marlin/src/pins/ramps/pins_FELIX2.h
  51. 1
    1
      Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h
  52. 1
    1
      Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h
  53. 1
    1
      Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h
  54. 1
    1
      Marlin/src/pins/ramps/pins_FYSETC_F6_13.h
  55. 1
    1
      Marlin/src/pins/ramps/pins_K8600.h
  56. 1
    1
      Marlin/src/pins/ramps/pins_K8800.h
  57. 1
    1
      Marlin/src/pins/ramps/pins_ORTUR_4.h
  58. 10
    9
      Marlin/src/pins/ramps/pins_RAMPS.h
  59. 1
    1
      Marlin/src/pins/ramps/pins_RAMPS_PLUS.h
  60. 1
    1
      Marlin/src/pins/ramps/pins_RIGIDBOARD.h
  61. 1
    1
      Marlin/src/pins/ramps/pins_RUMBA.h
  62. 2
    2
      Marlin/src/pins/ramps/pins_TENLOG_D3_HERO.h
  63. 2
    2
      Marlin/src/pins/ramps/pins_TRIGORILLA_14.h
  64. 8
    8
      Marlin/src/pins/ramps/pins_TT_OSCAR.h
  65. 3
    3
      Marlin/src/pins/ramps/pins_ULTIMAKER.h
  66. 4
    4
      Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h
  67. 2
    2
      Marlin/src/pins/sam/pins_ALLIGATOR_R2.h
  68. 2
    2
      Marlin/src/pins/sam/pins_ARCHIM1.h
  69. 6
    6
      Marlin/src/pins/sam/pins_ARCHIM2.h
  70. 1
    1
      Marlin/src/pins/sam/pins_DUE3DOM.h
  71. 1
    1
      Marlin/src/pins/sam/pins_DUE3DOM_MINI.h
  72. 1
    1
      Marlin/src/pins/sam/pins_RADDS.h
  73. 4
    4
      Marlin/src/pins/sam/pins_RAMPS_DUO.h
  74. 2
    2
      Marlin/src/pins/sam/pins_RAMPS_FD_V1.h
  75. 4
    4
      Marlin/src/pins/sam/pins_RURAMPS4D_11.h
  76. 4
    4
      Marlin/src/pins/sam/pins_RURAMPS4D_13.h
  77. 8
    8
      Marlin/src/pins/samd/pins_RAMPS_144.h
  78. 2
    2
      Marlin/src/pins/sanguino/pins_ANET_10.h
  79. 4
    4
      Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h
  80. 1
    1
      Marlin/src/pins/sanguino/pins_ZMIB_V2.h
  81. 1
    1
      Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h
  82. 6
    6
      Marlin/src/pins/stm32f1/pins_CHITU3D.h
  83. 0
    3
      Marlin/src/pins/stm32f1/pins_CHITU3D_V5.h
  84. 0
    3
      Marlin/src/pins/stm32f1/pins_CHITU3D_V6.h
  85. 1
    1
      Marlin/src/pins/stm32f1/pins_FYSETC_AIO_II.h
  86. 1
    1
      Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h
  87. 2
    2
      Marlin/src/pins/stm32f1/pins_GTM32_MINI.h
  88. 1
    1
      Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h
  89. 2
    2
      Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h
  90. 1
    1
      Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h
  91. 7
    6
      Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h
  92. 5
    14
      Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h
  93. 1
    1
      Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h
  94. 1
    1
      Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h
  95. 1
    1
      Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE3.h
  96. 20
    37
      Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h
  97. 1
    1
      Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h
  98. 3
    12
      Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h
  99. 2
    2
      Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h
  100. 0
    0
      Marlin/src/pins/stm32f1/pins_STM32F1R.h

+ 76
- 15
Marlin/Configuration.h View File

@@ -35,7 +35,7 @@
35 35
  *
36 36
  * Advanced settings can be found in Configuration_adv.h
37 37
  */
38
-#define CONFIGURATION_H_VERSION 020007
38
+#define CONFIGURATION_H_VERSION 020008
39 39
 
40 40
 //===========================================================================
41 41
 //============================= Getting Started =============================
@@ -2205,22 +2205,83 @@
2205 2205
 //=============================================================================
2206 2206
 
2207 2207
 /**
2208
- * TFT Type - Select your Display type
2209
- *
2210
- * Available options are:
2211
- *   MKS_TS35_V2_0,
2212
- *   MKS_ROBIN_TFT24, MKS_ROBIN_TFT28, MKS_ROBIN_TFT32, MKS_ROBIN_TFT35,
2213
- *   MKS_ROBIN_TFT43, MKS_ROBIN_TFT_V1_1R
2214
- *   TFT_TRONXY_X5SA, ANYCUBIC_TFT35, LONGER_LK_TFT28
2215
- *   TFT_GENERIC
2216
- *
2217
- * For TFT_GENERIC, you need to configure these 3 options:
2218
- *   Driver:     TFT_DRIVER
2219
- *               Current Drivers are: AUTO, ST7735, ST7789, ST7796, R61505, ILI9328, ILI9341, ILI9488
2220
- *   Resolution: TFT_WIDTH and TFT_HEIGHT
2221
- *   Interface:  TFT_INTERFACE_FSMC or TFT_INTERFACE_SPI
2208
+ * Specific TFT Model Presets. Enable one of the following options
2209
+ * or enable TFT_GENERIC and set sub-options.
2222 2210
  */
2211
+
2212
+//
2213
+// 480x320, 3.5", SPI Display From MKS
2214
+// Normally used in MKS Robin Nano V2
2215
+//
2216
+//#define MKS_TS35_V2_0
2217
+
2218
+//
2219
+// 320x240, 2.4", FSMC Display From MKS
2220
+// Normally used in MKS Robin Nano V1.2
2221
+//
2222
+//#define MKS_ROBIN_TFT24
2223
+
2224
+//
2225
+// 320x240, 2.8", FSMC Display From MKS
2226
+// Normally used in MKS Robin Nano V1.2
2227
+//
2228
+//#define MKS_ROBIN_TFT28
2229
+
2230
+//
2231
+// 320x240, 3.2", FSMC Display From MKS
2232
+// Normally used in MKS Robin Nano V1.2
2233
+//
2234
+//#define MKS_ROBIN_TFT32
2235
+
2236
+//
2237
+// 480x320, 3.5", FSMC Display From MKS
2238
+// Normally used in MKS Robin Nano V1.2
2239
+//
2240
+//#define MKS_ROBIN_TFT35
2241
+
2242
+//
2243
+// 480x272, 4.3", FSMC Display From MKS
2244
+//
2245
+//#define MKS_ROBIN_TFT43
2246
+
2247
+//
2248
+// 320x240, 3.2", FSMC Display From MKS
2249
+// Normally used in MKS Robin
2250
+//
2251
+//#define MKS_ROBIN_TFT_V1_1R
2252
+
2253
+//
2254
+// 480x320, 3.5", FSMC Stock Display from TronxXY
2255
+//
2256
+//#define TFT_TRONXY_X5SA
2257
+
2258
+//
2259
+// 480x320, 3.5", FSMC Stock Display from AnyCubic
2260
+//
2261
+//#define ANYCUBIC_TFT35
2262
+
2263
+//
2264
+// 320x240, 2.8", FSMC Stock Display from Longer/Alfawise
2265
+//
2266
+//#define LONGER_LK_TFT28
2267
+
2268
+//
2269
+// Generic TFT with detailed options
2270
+//
2223 2271
 //#define TFT_GENERIC
2272
+#if ENABLED(TFT_GENERIC)
2273
+  // :[ 'AUTO', 'ST7735', 'ST7789', 'ST7796', 'R61505', 'ILI9328', 'ILI9341', 'ILI9488' ]
2274
+  #define TFT_DRIVER AUTO
2275
+
2276
+  // Interface. Enable one of the following options:
2277
+  //#define TFT_INTERFACE_FSMC
2278
+  //#define TFT_INTERFACE_SPI
2279
+
2280
+  // TFT Resolution. Enable one of the following options:
2281
+  //#define TFT_RES_320x240
2282
+  //#define TFT_RES_480x272
2283
+  //#define TFT_RES_480x320
2284
+#endif
2224 2285
 
2225 2286
 /**
2226 2287
  * TFT UI - User Interface Selection. Enable one of the following options:

+ 3
- 3
Marlin/Configuration_adv.h View File

@@ -30,7 +30,7 @@
30 30
  *
31 31
  * Basic settings can be found in Configuration.h
32 32
  */
33
-#define CONFIGURATION_ADV_H_VERSION 020007
33
+#define CONFIGURATION_ADV_H_VERSION 020008
34 34
 
35 35
 //===========================================================================
36 36
 //============================= Thermal Settings ============================
@@ -1048,10 +1048,10 @@
1048 1048
 
1049 1049
 // @section lcd
1050 1050
 
1051
-#if EITHER(ULTIPANEL, EXTENSIBLE_UI)
1051
+#if EITHER(IS_ULTIPANEL, EXTENSIBLE_UI)
1052 1052
   #define MANUAL_FEEDRATE { 50*60, 50*60, 4*60, 2*60 } // (mm/min) Feedrates for manual moves along X, Y, Z, E from panel
1053 1053
   #define SHORT_MANUAL_Z_MOVE 0.025 // (mm) Smallest manual Z move (< 0.1mm)
1054
-  #if ENABLED(ULTIPANEL)
1054
+  #if IS_ULTIPANEL
1055 1055
     #define MANUAL_E_MOVES_RELATIVE // Display extruder move distance rather than "position"
1056 1056
     #define ULTIPANEL_FEEDMULTIPLY  // Encoder sets the feedrate multiplier on the Status Screen
1057 1057
   #endif

+ 1
- 1
Marlin/src/HAL/LPC1768/inc/SanityCheck.h View File

@@ -72,7 +72,7 @@ static_assert(!(NUM_SERVOS && ENABLED(FAST_PWM_FAN)), "BLTOUCH and Servos are in
72 72
 //#endif
73 73
 
74 74
 #if MB(RAMPS_14_RE_ARM_EFB, RAMPS_14_RE_ARM_EEB, RAMPS_14_RE_ARM_EFF, RAMPS_14_RE_ARM_EEF, RAMPS_14_RE_ARM_SF)
75
-  #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) && HAS_DRIVER(TMC2130) && DISABLED(TMC_USE_SW_SPI)
75
+  #if IS_RRD_FG_SC && HAS_DRIVER(TMC2130) && DISABLED(TMC_USE_SW_SPI)
76 76
     #error "Re-ARM with REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER and TMC2130 requires TMC_USE_SW_SPI."
77 77
   #endif
78 78
 #endif

+ 3
- 3
Marlin/src/HAL/STM32F1/HAL.cpp View File

@@ -130,7 +130,7 @@ const uint8_t adc_pins[] = {
130 130
   #if ENABLED(FILAMENT_WIDTH_SENSOR)
131 131
     FILWIDTH_PIN,
132 132
   #endif
133
-  #if ENABLED(ADC_KEYPAD)
133
+  #if HAS_ADC_BUTTONS
134 134
     ADC_KEYPAD_PIN,
135 135
   #endif
136 136
   #if HAS_JOY_ADC_X
@@ -187,7 +187,7 @@ enum TempPinIndex : char {
187 187
   #if ENABLED(FILAMENT_WIDTH_SENSOR)
188 188
     FILWIDTH,
189 189
   #endif
190
-  #if ENABLED(ADC_KEYPAD)
190
+  #if HAS_ADC_BUTTONS
191 191
     ADC_KEY,
192 192
   #endif
193 193
   #if HAS_JOY_ADC_X
@@ -389,7 +389,7 @@ void HAL_adc_start_conversion(const uint8_t adc_pin) {
389 389
     #if ENABLED(FILAMENT_WIDTH_SENSOR)
390 390
       case FILWIDTH_PIN: pin_index = FILWIDTH; break;
391 391
     #endif
392
-    #if ENABLED(ADC_KEYPAD)
392
+    #if HAS_ADC_BUTTONS
393 393
       case ADC_KEYPAD_PIN: pin_index = ADC_KEY; break;
394 394
     #endif
395 395
     #if ENABLED(POWER_MONITOR_CURRENT)

+ 3
- 1
Marlin/src/core/macros.h View File

@@ -170,7 +170,7 @@
170 170
 #define _DO_12(W,C,A,V...) (_##W##_1(A) C _DO_11(W,C,V))
171 171
 #define __DO_N(W,C,N,V...) _DO_##N(W,C,V)
172 172
 #define _DO_N(W,C,N,V...)  __DO_N(W,C,N,V)
173
-#define DO(W,C,V...)       _DO_N(W,C,NUM_ARGS(V),V)
173
+#define DO(W,C,V...)       (_DO_N(W,C,NUM_ARGS(V),V))
174 174
 
175 175
 // Macros to support option testing
176 176
 #define _CAT(a,V...) a##V
@@ -186,6 +186,7 @@
186 186
 #define _DIS_1(O)           NOT(_ENA_1(O))
187 187
 #define ENABLED(V...)       DO(ENA,&&,V)
188 188
 #define DISABLED(V...)      DO(DIS,&&,V)
189
+#define COUNT_ENABLED(V...) DO(ENA,+,V)
189 190
 
190 191
 #define TERN(O,A,B)         _TERN(_ENA_1(O),B,A)    // OPTION converted to '0' or '1'
191 192
 #define TERN0(O,A)          _TERN(_ENA_1(O),0,A)    // OPTION converted to A or '0'
@@ -200,6 +201,7 @@
200 201
 #define ALL(V...)           ENABLED(V)
201 202
 #define BOTH(V1,V2)         ALL(V1,V2)
202 203
 #define EITHER(V1,V2)       ANY(V1,V2)
204
+#define MANY(V...)          (COUNT_ENABLED(V) > 1)
203 205
 
204 206
 // Macros to support pins/buttons exist testing
205 207
 #define PIN_EXISTS(PN)      (defined(PN##_PIN) && PN##_PIN >= 0)

+ 1
- 1
Marlin/src/feature/bedlevel/ubl/ubl.h View File

@@ -59,7 +59,7 @@ class unified_bed_leveling {
59 59
       static int  g29_grid_size;
60 60
     #endif
61 61
 
62
-    #if ENABLED(NEWPANEL)
62
+    #if IS_NEWPANEL
63 63
       static void move_z_with_encoder(const float &multiplier);
64 64
       static float measure_point_with_encoder();
65 65
       static float measure_business_card_thickness(float in_height);

+ 118
- 136
Marlin/src/inc/Conditionals_LCD.h View File

@@ -46,7 +46,7 @@
46 46
  *
47 47
  *  DOGLCD                : Run a Graphical LCD through U8GLib (with MarlinUI)
48 48
  *  IS_ULTIPANEL          : Define LCD_PINS_D5/6/7 for direct-connected "Ultipanel" LCDs
49
- *  IS_ULTRA_LCD          : Ultra LCD, not necessarily Ultipanel. Used most often with NEWPANEL.
49
+ *  IS_ULTRA_LCD          : Ultra LCD, not necessarily Ultipanel.
50 50
  *  IS_RRD_SC             : Common RRD Smart Controller digital interface pins
51 51
  *  IS_RRD_FG_SC          : Common RRD Full Graphical Smart Controller digital interface pins
52 52
  *  U8GLIB_ST7920         : Most common DOGM display SPI interface, supporting a "lightweight" display mode.
@@ -63,22 +63,21 @@
63 63
 #elif ENABLED(CARTESIO_UI)
64 64
 
65 65
   #define DOGLCD
66
-  #define IS_ULTIPANEL
66
+  #define IS_ULTIPANEL 1
67 67
 
68 68
 #elif EITHER(DWIN_MARLINUI_PORTRAIT, DWIN_MARLINUI_LANDSCAPE)
69 69
 
70 70
   #define IS_DWIN_MARLINUI 1
71
-  #define IS_ULTIPANEL
71
+  #define IS_ULTIPANEL 1
72 72
 
73 73
 #elif ENABLED(ZONESTAR_LCD)
74 74
 
75
-  #define ADC_KEYPAD
76
-  #define IS_RRW_KEYPAD
75
+  #define HAS_ADC_BUTTONS 1
77 76
   #define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
78 77
   #define ADC_KEY_NUM 8
79
-  #define IS_ULTIPANEL
78
+  #define IS_ULTIPANEL 1
80 79
 
81
-  // This helps to implement ADC_KEYPAD menus
80
+  // This helps to implement HAS_ADC_BUTTONS menus
82 81
   #define REVERSE_MENU_DIRECTION
83 82
   #define ENCODER_PULSES_PER_STEP 1
84 83
   #define ENCODER_STEPS_PER_MENU_ITEM 1
@@ -86,29 +85,25 @@
86 85
 
87 86
 #elif ENABLED(ZONESTAR_12864LCD)
88 87
   #define DOGLCD
89
-  #define IS_RRD_SC
88
+  #define IS_RRD_SC 1
90 89
   #define U8GLIB_ST7920
91 90
 
92 91
 #elif ENABLED(ZONESTAR_12864OLED)
93
-  #define IS_RRD_SC
92
+  #define IS_RRD_SC 1
94 93
   #define U8GLIB_SH1106
95 94
 
96 95
 #elif ENABLED(ZONESTAR_12864OLED_SSD1306)
97
-  #define IS_RRD_SC
96
+  #define IS_RRD_SC 1
98 97
   #define IS_U8GLIB_SSD1306
99 98
 
100 99
 #elif ENABLED(RADDS_DISPLAY)
101
-  #define IS_ULTIPANEL
100
+  #define IS_ULTIPANEL 1
102 101
   #define ENCODER_PULSES_PER_STEP 2
103 102
 
104
-#elif EITHER(ANET_FULL_GRAPHICS_LCD, BQ_LCD_SMART_CONTROLLER)
105
-
106
-  #define IS_RRD_FG_SC
107
-
108 103
 #elif ANY(miniVIKI, VIKI2, ELB_FULL_GRAPHIC_CONTROLLER, AZSMZ_12864)
109 104
 
110 105
   #define DOGLCD
111
-  #define IS_ULTIPANEL
106
+  #define IS_ULTIPANEL 1
112 107
 
113 108
   #if ENABLED(miniVIKI)
114 109
     #define U8GLIB_ST7565_64128N
@@ -123,40 +118,33 @@
123 118
 #elif ENABLED(OLED_PANEL_TINYBOY2)
124 119
 
125 120
   #define IS_U8GLIB_SSD1306
126
-  #define IS_ULTIPANEL
121
+  #define IS_ULTIPANEL 1
127 122
 
128 123
 #elif ENABLED(RA_CONTROL_PANEL)
129 124
 
130 125
   #define LCD_I2C_TYPE_PCA8574
131 126
   #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
132
-  #define IS_ULTIPANEL
127
+  #define IS_ULTIPANEL 1
133 128
 
134 129
 #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
135 130
 
136 131
   #define DOGLCD
137 132
   #define U8GLIB_ST7920
138
-  #define IS_ULTIPANEL
139
-
140
-#elif ENABLED(CR10_STOCKDISPLAY)
141
-
142
-  #define IS_RRD_FG_SC
143
-  #define BOARD_ST7920_DELAY_1 DELAY_NS(125)
144
-  #define BOARD_ST7920_DELAY_2 DELAY_NS(125)
145
-  #define BOARD_ST7920_DELAY_3 DELAY_NS(125)
133
+  #define IS_ULTIPANEL 1
146 134
 
147 135
 #elif ENABLED(MKS_12864OLED)
148 136
 
149
-  #define IS_RRD_SC
137
+  #define IS_RRD_SC 1
150 138
   #define U8GLIB_SH1106
151 139
 
152 140
 #elif ENABLED(MKS_12864OLED_SSD1306)
153 141
 
154
-  #define IS_RRD_SC
142
+  #define IS_RRD_SC 1
155 143
   #define IS_U8GLIB_SSD1306
156 144
 
157 145
 #elif ENABLED(FYSETC_242_OLED_12864)
158 146
 
159
-  #define IS_RRD_SC
147
+  #define IS_RRD_SC 1
160 148
   #define U8GLIB_SH1106
161 149
 
162 150
   #define LED_CONTROL_MENU
@@ -179,7 +167,7 @@
179 167
 
180 168
   #define FYSETC_MINI_12864
181 169
   #define DOGLCD
182
-  #define IS_ULTIPANEL
170
+  #define IS_ULTIPANEL 1
183 171
   #define LED_COLORS_REDUCE_GREEN
184 172
   #if ENABLED(PSU_CONTROL) && EITHER(FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1)
185 173
     #define LED_BACKLIGHT_TIMEOUT 10000
@@ -205,7 +193,7 @@
205 193
 
206 194
 #elif ENABLED(ULTI_CONTROLLER)
207 195
 
208
-  #define IS_ULTIPANEL
196
+  #define IS_ULTIPANEL 1
209 197
   #define U8GLIB_SSD1309
210 198
   #define LCD_RESET_PIN LCD_PINS_D6 //  This controller need a reset pin
211 199
   #define ENCODER_PULSES_PER_STEP 2
@@ -213,14 +201,14 @@
213 201
 
214 202
 #elif ENABLED(MAKEBOARD_MINI_2_LINE_DISPLAY_1602)
215 203
 
216
-  #define IS_RRD_SC
204
+  #define IS_RRD_SC 1
217 205
   #define LCD_WIDTH 16
218 206
   #define LCD_HEIGHT 2
219 207
 
220 208
 #elif EITHER(TFTGLCD_PANEL_SPI, TFTGLCD_PANEL_I2C)
221 209
 
222 210
   #define IS_TFTGLCD_PANEL 1
223
-  #define IS_ULTIPANEL                      // Note that IS_ULTIPANEL leads to HAS_WIRED_LCD
211
+  #define IS_ULTIPANEL 1                    // Note that IS_ULTIPANEL leads to HAS_WIRED_LCD
224 212
 
225 213
   #if ENABLED(SDSUPPORT) && DISABLED(LCD_PROGRESS_BAR)
226 214
     #define LCD_PROGRESS_BAR
@@ -239,14 +227,35 @@
239 227
   #define CONVERT_TO_EXT_ASCII        // Use extended 128-255 symbols from ASCII table.
240 228
                                       // At this time present conversion only for cyrillic - bg, ru and uk languages.
241 229
                                       // First 7 ASCII symbols in panel font must be replaced with Marlin's special symbols.
230
+
231
+#elif ENABLED(CR10_STOCKDISPLAY)
232
+
233
+  #define IS_RRD_FG_SC 1
234
+  #define BOARD_ST7920_DELAY_1 DELAY_NS(125)
235
+  #define BOARD_ST7920_DELAY_2 DELAY_NS(125)
236
+  #define BOARD_ST7920_DELAY_3 DELAY_NS(125)
237
+
238
+#elif ANY(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER, ANET_FULL_GRAPHICS_LCD, BQ_LCD_SMART_CONTROLLER)
239
+
240
+  #define IS_RRD_FG_SC 1
241
+
242
+#elif ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
243
+
244
+  // RepRapDiscount LCD or Graphical LCD with rotary click encoder
245
+  #define IS_RRD_SC 1
246
+
242 247
 #endif
243 248
 
244
-#if ENABLED(IS_RRD_FG_SC)
245
-  #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
249
+// ST7920-based graphical displays
250
+#if ANY(IS_RRD_FG_SC, LCD_FOR_MELZI, SILVER_GATE_GLCD_CONTROLLER)
251
+  #define DOGLCD
252
+  #define U8GLIB_ST7920
253
+  #define IS_RRD_SC 1
246 254
 #endif
247 255
 
256
+// ST7565 / 64128N graphical displays
248 257
 #if EITHER(MAKRPANEL, MINIPANEL)
249
-  #define IS_ULTIPANEL
258
+  #define IS_ULTIPANEL 1
250 259
   #define DOGLCD
251 260
   #if ENABLED(MAKRPANEL)
252 261
     #define U8GLIB_ST7565_64128N
@@ -258,7 +267,7 @@
258 267
 #endif
259 268
 
260 269
 #if ENABLED(OVERLORD_OLED)
261
-  #define IS_ULTIPANEL
270
+  #define IS_ULTIPANEL 1
262 271
   #define U8GLIB_SH1106
263 272
   /**
264 273
    * PCA9632 for buzzer and LEDs via i2c
@@ -278,64 +287,44 @@
278 287
 // 128x64 I2C OLED LCDs - SSD1306/SSD1309/SH1106
279 288
 #if ANY(U8GLIB_SSD1306, U8GLIB_SSD1309, U8GLIB_SH1106)
280 289
   #define HAS_U8GLIB_I2C_OLED 1
281
-#endif
282
-#if HAS_U8GLIB_I2C_OLED
283
-  #define IS_ULTRA_LCD
290
+  #define IS_ULTRA_LCD 1
284 291
   #define DOGLCD
285 292
 #endif
286 293
 
287
-// ST7920-based graphical displays
288
-#if ANY(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER, LCD_FOR_MELZI, SILVER_GATE_GLCD_CONTROLLER)
289
-  #define DOGLCD
290
-  #define U8GLIB_ST7920
291
-  #define IS_RRD_SC
292
-#endif
293
-
294
-// RepRapDiscount LCD or Graphical LCD with rotary click encoder
295
-#if ENABLED(IS_RRD_SC)
296
-  #define REPRAP_DISCOUNT_SMART_CONTROLLER
297
-#endif
298
-
299 294
 /**
300 295
  * SPI Ultipanels
301 296
  */
302 297
 
303 298
 // Basic Ultipanel-like displays
304
-#if ANY(ULTIMAKERCONTROLLER, REPRAP_DISCOUNT_SMART_CONTROLLER, G3D_PANEL, RIGIDBOT_PANEL, PANEL_ONE, U8GLIB_SH1106)
305
-  #define IS_ULTIPANEL
299
+#if ANY(ULTIMAKERCONTROLLER, IS_RRD_SC, G3D_PANEL, RIGIDBOT_PANEL, PANEL_ONE, U8GLIB_SH1106)
300
+  #define IS_ULTIPANEL 1
306 301
 #endif
307 302
 
308 303
 // Einstart OLED has Cardinal nav via pins defined in pins_EINSTART-S.h
309 304
 #if ENABLED(U8GLIB_SH1106_EINSTART)
310 305
   #define DOGLCD
311
-  #define IS_ULTIPANEL
306
+  #define IS_ULTIPANEL 1
312 307
 #endif
313 308
 
314
-// Compatibility
315
-#if ENABLED(FSMC_GRAPHICAL_TFT)
316
-  #define TFT_CLASSIC_UI
317
-  #define TFT_INTERFACE_FSMC
318
-  #define TFT_GENERIC
319
-#elif ENABLED(SPI_GRAPHICAL_TFT)
320
-  #define TFT_CLASSIC_UI
321
-  #define TFT_INTERFACE_SPI
309
+// TFT Compatibility
310
+#if ANY(FSMC_GRAPHICAL_TFT, SPI_GRAPHICAL_TFT, TFT_320x240, TFT_480x320, TFT_320x240_SPI, TFT_480x320_SPI, TFT_LVGL_UI_FSMC, TFT_LVGL_UI_SPI)
311
+  #define IS_LEGACY_TFT 1
322 312
   #define TFT_GENERIC
323
-#elif EITHER(TFT_320x240, TFT_480x320)
324
-  #define TFT_COLOR_UI
313
+  #warning "Don't forget to update your TFT settings in Configuration.h."
314
+#endif
315
+
316
+#if ANY(FSMC_GRAPHICAL_TFT, TFT_320x240, TFT_480x320, TFT_LVGL_UI_FSMC)
325 317
   #define TFT_INTERFACE_FSMC
326
-  #define TFT_GENERIC
327
-#elif EITHER(TFT_320x240_SPI, TFT_480x320_SPI)
328
-  #define TFT_COLOR_UI
318
+#elif ANY(SPI_GRAPHICAL_TFT, TFT_320x240_SPI, TFT_480x320_SPI, TFT_LVGL_UI_SPI)
329 319
   #define TFT_INTERFACE_SPI
330
-  #define TFT_GENERIC
331
-#elif ENABLED(TFT_LVGL_UI_FSMC)
332
-  #define TFT_LVGL_UI
333
-  #define TFT_INTERFACE_FSMC
334
-  #define TFT_GENERIC
335
-#elif ENABLED(TFT_LVGL_UI_SPI)
320
+#endif
321
+
322
+#if EITHER(FSMC_GRAPHICAL_TFT, SPI_GRAPHICAL_TFT)
323
+  #define TFT_CLASSIC_UI
324
+#elif ANY(TFT_320x240, TFT_480x320, TFT_320x240_SPI, TFT_480x320_SPI)
325
+  #define TFT_COLOR_UI
326
+#elif EITHER(TFT_LVGL_UI_FSMC, TFT_LVGL_UI_SPI)
336 327
   #define TFT_LVGL_UI
337
-  #define TFT_INTERFACE_SPI
338
-  #define TFT_GENERIC
339 328
 #endif
340 329
 
341 330
 // FSMC/SPI TFT Panels (LVGL)
@@ -350,7 +339,7 @@
350 339
 
351 340
 #if TFT_SCALED_DOGLCD
352 341
   #define DOGLCD
353
-  #define IS_ULTIPANEL
342
+  #define IS_ULTIPANEL 1
354 343
   #define DELAYED_BACKLIGHT_INIT
355 344
 #elif ENABLED(TFT_LVGL_UI)
356 345
   #define DELAYED_BACKLIGHT_INIT
@@ -359,7 +348,7 @@
359 348
 // Color UI
360 349
 #if ENABLED(TFT_COLOR_UI)
361 350
   #define HAS_GRAPHICAL_TFT 1
362
-  #define IS_ULTIPANEL
351
+  #define IS_ULTIPANEL 1
363 352
 #endif
364 353
 
365 354
 /**
@@ -383,7 +372,7 @@
383 372
   #define LCD_I2C_TYPE_MCP23017
384 373
   #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
385 374
   #define LCD_USE_I2C_BUZZER   // Enable buzzer on LCD (optional)
386
-  #define IS_ULTIPANEL
375
+  #define IS_ULTIPANEL 1
387 376
 
388 377
 #elif ENABLED(LCD_I2C_VIKI)
389 378
 
@@ -398,7 +387,7 @@
398 387
   #define LCD_I2C_TYPE_MCP23017
399 388
   #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
400 389
   #define LCD_USE_I2C_BUZZER   // Enable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later)
401
-  #define IS_ULTIPANEL
390
+  #define IS_ULTIPANEL 1
402 391
 
403 392
   #define ENCODER_FEEDRATE_DEADZONE 4
404 393
 
@@ -410,7 +399,7 @@
410 399
   #define STD_ENCODER_PULSES_PER_STEP 2
411 400
   #define STD_ENCODER_STEPS_PER_MENU_ITEM 1
412 401
 
413
-#elif ANY(REPRAP_DISCOUNT_SMART_CONTROLLER, miniVIKI, VIKI2, ELB_FULL_GRAPHIC_CONTROLLER, AZSMZ_12864, OLED_PANEL_TINYBOY2, BQ_LCD_SMART_CONTROLLER, LCD_I2C_PANELOLU2)
402
+#elif ANY(IS_RRD_SC, miniVIKI, VIKI2, ELB_FULL_GRAPHIC_CONTROLLER, AZSMZ_12864, OLED_PANEL_TINYBOY2, BQ_LCD_SMART_CONTROLLER, LCD_I2C_PANELOLU2)
414 403
 
415 404
   #define STD_ENCODER_PULSES_PER_STEP 4
416 405
   #define STD_ENCODER_STEPS_PER_MENU_ITEM 1
@@ -443,30 +432,24 @@
443 432
 // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
444 433
 #if ENABLED(FF_INTERFACEBOARD)
445 434
   #define SR_LCD_3W_NL    // Non latching 3 wire shift register
446
-  #define IS_ULTIPANEL
435
+  #define IS_ULTIPANEL 1
447 436
 #elif ENABLED(SAV_3DLCD)
448 437
   #define SR_LCD_2W_NL    // Non latching 2 wire shift register
449
-  #define IS_ULTIPANEL
438
+  #define IS_ULTIPANEL 1
439
+#elif ENABLED(ULTIPANEL)
440
+  #define IS_ULTIPANEL 1
450 441
 #endif
451 442
 
452
-#if ENABLED(IS_ULTIPANEL)
453
-  #define ULTIPANEL
454
-#endif
455
-#if ENABLED(ULTIPANEL)
456
-  #define IS_ULTRA_LCD
457
-  #define NEWPANEL
458
-#endif
459
-#if ENABLED(IS_ULTRA_LCD)
460
-  #define ULTRA_LCD
443
+#if EITHER(IS_ULTIPANEL, ULTRA_LCD)
444
+  #define IS_ULTRA_LCD 1
461 445
 #endif
462 446
 
463
-#if ENABLED(IS_RRW_KEYPAD)
464
-  #define REPRAPWORLD_KEYPAD
447
+#if EITHER(IS_ULTIPANEL, REPRAPWORLD_KEYPAD)
448
+  #define IS_NEWPANEL 1
465 449
 #endif
466 450
 
467
-// Keypad needs a move step
468
-#if ENABLED(REPRAPWORLD_KEYPAD)
469
-  #define NEWPANEL
451
+#if EITHER(ZONESTAR_LCD, REPRAPWORLD_KEYPAD)
452
+  #define IS_RRW_KEYPAD 1
470 453
   #ifndef REPRAPWORLD_KEYPAD_MOVE_STEP
471 454
     #define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
472 455
   #endif
@@ -479,16 +462,16 @@
479 462
 
480 463
 // Extensible UI serial touch screens. (See src/lcd/extui)
481 464
 #if ANY(HAS_DGUS_LCD, MALYAN_LCD, TOUCH_UI_FTDI_EVE, ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON)
482
-  #define IS_EXTUI
465
+  #define IS_EXTUI 1
483 466
   #define EXTENSIBLE_UI
484 467
 #endif
485 468
 
486 469
 // Aliases for LCD features
487
-#if EITHER(ULTRA_LCD, EXTENSIBLE_UI)
470
+#if EITHER(IS_ULTRA_LCD, EXTENSIBLE_UI)
488 471
   #define HAS_DISPLAY 1
489 472
 #endif
490 473
 
491
-#if ENABLED(ULTRA_LCD)
474
+#if IS_ULTRA_LCD
492 475
   #define HAS_WIRED_LCD 1
493 476
   #if ENABLED(DOGLCD)
494 477
     #define HAS_MARLINUI_U8GLIB 1
@@ -499,12 +482,9 @@
499 482
   #endif
500 483
 #endif
501 484
 
502
-#if ENABLED(ULTIPANEL) && DISABLED(NO_LCD_MENUS)
485
+#if IS_ULTIPANEL && DISABLED(NO_LCD_MENUS)
503 486
   #define HAS_LCD_MENU 1
504 487
 #endif
505
-#if ENABLED(ADC_KEYPAD)
506
-  #define HAS_ADC_BUTTONS 1
507
-#endif
508 488
 
509 489
 #if HAS_MARLINUI_U8GLIB
510 490
   #ifndef LCD_PIXEL_WIDTH
@@ -837,83 +817,85 @@
837 817
 #if ENABLED(MKS_TS35_V2_0)
838 818
   // Most common: ST7796
839 819
   #define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY)
840
-  #define TFT_WIDTH  480
841
-  #define TFT_HEIGHT 320
820
+  #define TFT_RES_480x320
842 821
   #define TFT_INTERFACE_SPI
843
-  #define GRAPHICAL_TFT_UPSCALE 3
844 822
 #elif ENABLED(MKS_ROBIN_TFT24)
845 823
   // Most common: ST7789
846 824
   #define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_Y)
847
-  #define TFT_WIDTH  320
848
-  #define TFT_HEIGHT 240
825
+  #define TFT_RES_320x240
849 826
   #define TFT_INTERFACE_FSMC
850
-  #define GRAPHICAL_TFT_UPSCALE 2
851 827
 #elif ENABLED(MKS_ROBIN_TFT28)
852 828
   // Most common: ST7789
853 829
   #define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_Y)
854
-  #define TFT_WIDTH  320
855
-  #define TFT_HEIGHT 240
830
+  #define TFT_RES_320x240
856 831
   #define TFT_INTERFACE_FSMC
857
-  #define GRAPHICAL_TFT_UPSCALE 2
858 832
 #elif ENABLED(MKS_ROBIN_TFT32)
859 833
   // Most common: ST7789
860 834
   #define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_Y)
861
-  #define TFT_WIDTH  320
862
-  #define TFT_HEIGHT 240
835
+  #define TFT_RES_320x240
863 836
   #define TFT_INTERFACE_FSMC
864
-  #define GRAPHICAL_TFT_UPSCALE 2
865 837
 #elif ENABLED(MKS_ROBIN_TFT35)
866 838
   // Most common: ILI9488
867 839
   #define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_X | TFT_INVERT_Y)
868
-  #define TFT_WIDTH  480
869
-  #define TFT_HEIGHT 320
840
+  #define TFT_RES_480x320
870 841
   #define TFT_INTERFACE_FSMC
871
-  #define GRAPHICAL_TFT_UPSCALE 3
872 842
 #elif ENABLED(MKS_ROBIN_TFT43)
873 843
   #define TFT_DEFAULT_ORIENTATION 0
874 844
   #define TFT_DRIVER SSD1963
875
-  #define TFT_WIDTH  480
876
-  #define TFT_HEIGHT 272
845
+  #define TFT_RES_480x272
877 846
   #define TFT_INTERFACE_FSMC
878
-  #define GRAPHICAL_TFT_UPSCALE 2
879 847
 #elif ENABLED(MKS_ROBIN_TFT_V1_1R)
880 848
   // ILI9328 or R61505
881
-  #define TFT_DEFAULT_ORIENTATION (TFT_INVERT_X | TFT_INVERT_Y | TFT_EXCHANGE_XY)
882
-  #define TFT_WIDTH  320
883
-  #define TFT_HEIGHT 240
849
+  #define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_X | TFT_INVERT_Y)
850
+  #define TFT_RES_320x240
884 851
   #define TFT_INTERFACE_FSMC
885
-  #define GRAPHICAL_TFT_UPSCALE 2
886 852
 #elif EITHER(TFT_TRONXY_X5SA, ANYCUBIC_TFT35)
887 853
   #define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_X | TFT_INVERT_Y)
888 854
   #define TFT_DRIVER ILI9488
889
-  #define TFT_WIDTH  480
890
-  #define TFT_HEIGHT 320
855
+  #define TFT_RES_480x320
891 856
   #define TFT_INTERFACE_FSMC
892
-  #define GRAPHICAL_TFT_UPSCALE 3
893 857
 #elif ENABLED(LONGER_LK_TFT28)
894 858
   #define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_X | TFT_INVERT_Y)
895
-  #define TFT_WIDTH  320
896
-  #define TFT_HEIGHT 240
859
+  #define TFT_RES_320x240
897 860
   #define TFT_INTERFACE_FSMC
898
-  #define GRAPHICAL_TFT_UPSCALE 2
899 861
 #elif ENABLED(TFT_GENERIC)
900 862
   #define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_X | TFT_INVERT_Y)
863
+  #if NONE(TFT_RES_320x240, TFT_RES_480x272, TFT_RES_480x320)
864
+    #define TFT_RES_320x240
865
+  #endif
866
+  #if NONE(TFT_INTERFACE_FSMC, TFT_INTERFACE_SPI)
867
+    #define TFT_INTERFACE_SPI
868
+  #endif
869
+#endif
870
+
871
+#if ENABLED(TFT_RES_320x240)
872
+  #define TFT_WIDTH  320
873
+  #define TFT_HEIGHT 240
874
+  #define GRAPHICAL_TFT_UPSCALE 2
875
+#elif ENABLED(TFT_RES_480x272)
876
+  #define TFT_WIDTH  480
877
+  #define TFT_HEIGHT 272
878
+  #define GRAPHICAL_TFT_UPSCALE 2
879
+#elif ENABLED(TFT_RES_480x320)
880
+  #define TFT_WIDTH  480
881
+  #define TFT_HEIGHT 320
882
+  #define GRAPHICAL_TFT_UPSCALE 3
901 883
 #endif
902 884
 
903 885
 // FSMC/SPI TFT Panels using standard HAL/tft/tft_(fsmc|spi).h
904 886
 #if ENABLED(TFT_INTERFACE_FSMC)
905 887
   #define HAS_FSMC_TFT 1
906 888
   #if ENABLED(TFT_CLASSIC_UI)
907
-    #define FSMC_GRAPHICAL_TFT
889
+    #define HAS_FSMC_GRAPHICAL_TFT 1
908 890
   #elif ENABLED(TFT_LVGL_UI)
909
-    #define TFT_LVGL_UI_FSMC
891
+    #define HAS_TFT_LVGL_UI_FSMC 1
910 892
   #endif
911 893
 #elif ENABLED(TFT_INTERFACE_SPI)
912 894
   #define HAS_SPI_TFT 1
913 895
   #if ENABLED(TFT_CLASSIC_UI)
914
-    #define SPI_GRAPHICAL_TFT
896
+    #define HAS_SPI_GRAPHICAL_TFT 1
915 897
   #elif ENABLED(TFT_LVGL_UI)
916
-    #define TFT_LVGL_UI_SPI
898
+    #define HAS_TFT_LVGL_UI_SPI 1
917 899
   #endif
918 900
 #endif
919 901
 

+ 2
- 2
Marlin/src/inc/Conditionals_adv.h View File

@@ -148,7 +148,7 @@
148 148
 
149 149
 #if ANY(MARLIN_BRICKOUT, MARLIN_INVADERS, MARLIN_SNAKE, MARLIN_MAZE)
150 150
   #define HAS_GAMES 1
151
-  #if (1 < ENABLED(MARLIN_BRICKOUT) + ENABLED(MARLIN_INVADERS) + ENABLED(MARLIN_SNAKE) + ENABLED(MARLIN_MAZE))
151
+  #if MANY(MARLIN_BRICKOUT, MARLIN_INVADERS, MARLIN_SNAKE, MARLIN_MAZE)
152 152
     #define HAS_GAME_MENU 1
153 153
   #endif
154 154
 #endif
@@ -163,7 +163,7 @@
163 163
 #if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS)
164 164
   #define HAS_SOFTWARE_ENDSTOPS 1
165 165
 #endif
166
-#if ANY(EXTENSIBLE_UI, NEWPANEL, EMERGENCY_PARSER, HAS_ADC_BUTTONS, DWIN_CREALITY_LCD)
166
+#if ANY(EXTENSIBLE_UI, IS_NEWPANEL, EMERGENCY_PARSER, HAS_ADC_BUTTONS, DWIN_CREALITY_LCD)
167 167
   #define HAS_RESUME_CONTINUE 1
168 168
 #endif
169 169
 

+ 2
- 2
Marlin/src/inc/Conditionals_post.h View File

@@ -383,7 +383,7 @@
383 383
 
384 384
 #endif
385 385
 
386
-#if ANY(HAS_GRAPHICAL_TFT, LCD_USE_DMA_FSMC, FSMC_GRAPHICAL_TFT, SPI_GRAPHICAL_TFT) || !PIN_EXISTS(SD_DETECT)
386
+#if ANY(HAS_GRAPHICAL_TFT, LCD_USE_DMA_FSMC, HAS_FSMC_GRAPHICAL_TFT, HAS_SPI_GRAPHICAL_TFT) || !PIN_EXISTS(SD_DETECT)
387 387
   #define NO_LCD_REINIT 1  // Suppress LCD re-initialization
388 388
 #endif
389 389
 
@@ -2578,7 +2578,7 @@
2578 2578
 // Force SDCARD_SORT_ALPHA to be enabled for Graphical LCD on LPC1768
2579 2579
 // on boards where SD card and LCD display share the same SPI bus
2580 2580
 // because of a bug in the shared SPI implementation. (See #8122)
2581
-#if defined(TARGET_LPC1768) && ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) && (SCK_PIN == LCD_PINS_D4)
2581
+#if defined(TARGET_LPC1768) && IS_RRD_FG_SC && (SCK_PIN == LCD_PINS_D4)
2582 2582
   #define SDCARD_SORT_ALPHA         // Keep one directory level in RAM. Changing directory levels
2583 2583
                                     // may still glitch the screen, but LCD updates clean it up.
2584 2584
   #undef SDSORT_LIMIT

+ 88
- 105
Marlin/src/inc/SanityCheck.h View File

@@ -702,8 +702,10 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
702 702
   #elif PROGRESS_MSG_EXPIRE < 0
703 703
     #error "PROGRESS_MSG_EXPIRE must be greater than or equal to 0."
704 704
   #endif
705
-#elif ENABLED(LCD_SET_PROGRESS_MANUALLY) && NONE(HAS_MARLINUI_U8GLIB, HAS_GRAPHICAL_TFT, HAS_MARLINUI_HD44780, EXTENSIBLE_UI)
706
-  #error "LCD_SET_PROGRESS_MANUALLY requires LCD_PROGRESS_BAR, Character LCD, Graphical LCD, TFT, or EXTENSIBLE_UI."
705
+#elif ENABLED(LCD_SET_PROGRESS_MANUALLY)
706
+  #if NONE(HAS_MARLINUI_U8GLIB, HAS_GRAPHICAL_TFT, HAS_MARLINUI_HD44780, EXTENSIBLE_UI)
707
+    #error "LCD_SET_PROGRESS_MANUALLY requires LCD_PROGRESS_BAR, Character LCD, Graphical LCD, TFT, or EXTENSIBLE_UI."
708
+  #endif
707 709
 #endif
708 710
 
709 711
 #if !HAS_LCD_MENU && ENABLED(SD_REPRINT_LAST_SELECTED_FILE)
@@ -843,7 +845,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
843 845
     #error "ADVANCED_PAUSE_FEATURE requires FILAMENT_UNLOAD_PURGE_FEEDRATE. Please add it to Configuration_adv.h."
844 846
   #elif ENABLED(EXTRUDER_RUNOUT_PREVENT)
845 847
     #error "EXTRUDER_RUNOUT_PREVENT is incompatible with ADVANCED_PAUSE_FEATURE."
846
-  #elif ENABLED(PARK_HEAD_ON_PAUSE) && NONE(SDSUPPORT, NEWPANEL, EMERGENCY_PARSER)
848
+  #elif ENABLED(PARK_HEAD_ON_PAUSE) && NONE(SDSUPPORT, IS_NEWPANEL, EMERGENCY_PARSER)
847 849
     #error "PARK_HEAD_ON_PAUSE requires SDSUPPORT, EMERGENCY_PARSER, or an LCD controller."
848 850
   #elif ENABLED(HOME_BEFORE_FILAMENT_CHANGE) && DISABLED(PAUSE_PARK_NO_STEPPER_TIMEOUT)
849 851
     #error "HOME_BEFORE_FILAMENT_CHANGE requires PAUSE_PARK_NO_STEPPER_TIMEOUT."
@@ -1026,15 +1028,8 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
1026 1028
 /**
1027 1029
  * Special tool-changing options
1028 1030
  */
1029
-#if 1 < 0 \
1030
-  + ENABLED(SINGLENOZZLE) \
1031
-  + ENABLED(DUAL_X_CARRIAGE) \
1032
-  + ENABLED(PARKING_EXTRUDER) \
1033
-  + ENABLED(MAGNETIC_PARKING_EXTRUDER) \
1034
-  + ENABLED(SWITCHING_TOOLHEAD) \
1035
-  + ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) \
1036
-  + ENABLED(ELECTROMAGNETIC_SWITCHING_TOOLHEAD)
1037
-  #error "Please select only one of SINGLENOZZLE, DUAL_X_CARRIAGE, PARKING_EXTRUDER, SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD, or ELECTROMAGNETIC_SWITCHING_TOOLHEAD."
1031
+#if MANY(SINGLENOZZLE, DUAL_X_CARRIAGE, PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER, SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD, ELECTROMAGNETIC_SWITCHING_TOOLHEAD)
1032
+  #error "Please select only one of SINGLENOZZLE, DUAL_X_CARRIAGE, PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER, SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD, or ELECTROMAGNETIC_SWITCHING_TOOLHEAD."
1038 1033
 #endif
1039 1034
 
1040 1035
 /**
@@ -1161,16 +1156,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
1161 1156
 /**
1162 1157
  * Allow only one kinematic type to be defined
1163 1158
  */
1164
-#if 1 < 0 \
1165
-  + ENABLED(DELTA) \
1166
-  + ENABLED(MORGAN_SCARA) \
1167
-  + ENABLED(COREXY) \
1168
-  + ENABLED(COREXZ) \
1169
-  + ENABLED(COREYZ) \
1170
-  + ENABLED(COREYX) \
1171
-  + ENABLED(COREZX) \
1172
-  + ENABLED(COREZY) \
1173
-  + ENABLED(MARKFORGED_XY)
1159
+#if MANY(DELTA, MORGAN_SCARA, COREXY, COREXZ, COREYZ, COREYX, COREZX, COREZY, MARKFORGED_XY)
1174 1160
   #error "Please enable only one of DELTA, MORGAN_SCARA, COREXY, COREYX, COREXZ, COREZX, COREYZ, COREZY, or MARKFORGED_XY."
1175 1161
 #endif
1176 1162
 
@@ -1210,18 +1196,9 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
1210 1196
  * Allow only one probe option to be defined
1211 1197
  */
1212 1198
 #if 1 < 0 \
1213
-  + ENABLED(PROBE_MANUALLY) \
1214
-  + ENABLED(FIX_MOUNTED_PROBE) \
1215
-  + ENABLED(NOZZLE_AS_PROBE) \
1216
-  + (HAS_Z_SERVO_PROBE && DISABLED(BLTOUCH)) \
1217
-  + ENABLED(BLTOUCH) && DISABLED(CREALITY_TOUCH) \
1218
-  + ENABLED(CREALITY_TOUCH) \
1219
-  + ENABLED(TOUCH_MI_PROBE) \
1220
-  + ENABLED(SOLENOID_PROBE) \
1221
-  + ENABLED(Z_PROBE_ALLEN_KEY) \
1222
-  + ENABLED(Z_PROBE_SLED) \
1223
-  + ENABLED(RACK_AND_PINION_PROBE) \
1224
-  + ENABLED(SENSORLESS_PROBING)
1199
+  + (DISABLED(BLTOUCH) && HAS_Z_SERVO_PROBE) \
1200
+  + (ENABLED(BLTOUCH) && DISABLED(CREALITY_TOUCH)) \
1201
+  + COUNT_ENABLED(PROBE_MANUALLY, FIX_MOUNTED_PROBE, NOZZLE_AS_PROBE, CREALITY_TOUCH, TOUCH_MI_PROBE, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, RACK_AND_PINION_PROBE, SENSORLESS_PROBING)
1225 1202
   #error "Please enable only one probe option: PROBE_MANUALLY, SENSORLESS_PROBING, BLTOUCH, FIX_MOUNTED_PROBE, NOZZLE_AS_PROBE, TOUCH_MI_PROBE, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or Z Servo."
1226 1203
 #endif
1227 1204
 
@@ -1391,12 +1368,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
1391 1368
 /**
1392 1369
  * Allow only one bed leveling option to be defined
1393 1370
  */
1394
-#if 1 < 0 \
1395
-  + ENABLED(AUTO_BED_LEVELING_LINEAR) \
1396
-  + ENABLED(AUTO_BED_LEVELING_3POINT) \
1397
-  + ENABLED(AUTO_BED_LEVELING_BILINEAR) \
1398
-  + ENABLED(AUTO_BED_LEVELING_UBL) \
1399
-  + ENABLED(MESH_BED_LEVELING)
1371
+#if MANY(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL, MESH_BED_LEVELING)
1400 1372
   #error "Select only one of: MESH_BED_LEVELING, AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_BILINEAR or AUTO_BED_LEVELING_UBL."
1401 1373
 #endif
1402 1374
 
@@ -1558,8 +1530,8 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal
1558 1530
 /**
1559 1531
  * ULTIPANEL encoder
1560 1532
  */
1561
-#if ENABLED(ULTIPANEL) && NONE(NEWPANEL, SR_LCD_2W_NL) && !defined(SHIFT_CLK)
1562
-  #error "ULTIPANEL requires some kind of encoder."
1533
+#if IS_ULTIPANEL && NONE(IS_NEWPANEL, SR_LCD_2W_NL) && !defined(SHIFT_CLK)
1534
+  #error "ULTIPANEL controllers require some kind of encoder."
1563 1535
 #endif
1564 1536
 
1565 1537
 #if ENCODER_PULSES_PER_STEP < 0
@@ -2237,89 +2209,100 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal
2237 2209
  * Make sure only one display is enabled
2238 2210
  */
2239 2211
 #if 1 < 0 \
2240
-  + (ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) && DISABLED(IS_RRD_SC)) \
2241
-  + (ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) && DISABLED(IS_RRD_FG_SC)) \
2242
-  + (ENABLED(ULTRA_LCD) && DISABLED(IS_ULTRA_LCD)) \
2212
+  + ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) \
2213
+  + ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) \
2214
+  + ENABLED(ULTIPANEL) \
2215
+  + ENABLED(ULTRA_LCD) \
2243 2216
   + (ENABLED(U8GLIB_SSD1306) && DISABLED(IS_U8GLIB_SSD1306)) \
2244 2217
   + (ENABLED(MINIPANEL) && NONE(MKS_MINI_12864, ENDER2_STOCKDISPLAY)) \
2245 2218
   + (ENABLED(MKS_MINI_12864) && DISABLED(MKS_LCD12864)) \
2246 2219
   + (ENABLED(EXTENSIBLE_UI) && DISABLED(IS_EXTUI)) \
2247
-  + (ENABLED(ULTIPANEL) && DISABLED(IS_ULTIPANEL)) \
2248
-  + ENABLED(RADDS_DISPLAY) \
2249
-  + ENABLED(ULTIMAKERCONTROLLER) \
2250
-  + ENABLED(PANEL_ONE) \
2220
+  + (DISABLED(IS_LEGACY_TFT) && ENABLED(TFT_GENERIC)) \
2221
+  + (ENABLED(IS_LEGACY_TFT) && COUNT_ENABLED(TFT_320x240, TFT_320x240_SPI, TFT_480x320, TFT_480x320_SPI)) \
2222
+  + COUNT_ENABLED(ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, ANYCUBIC_TFT35) \
2223
+  + COUNT_ENABLED(DGUS_LCD_UI_ORIGIN, DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY) \
2224
+  + COUNT_ENABLED(ENDER2_STOCKDISPLAY, CR10_STOCKDISPLAY, DWIN_CREALITY_LCD) \
2225
+  + COUNT_ENABLED(FYSETC_MINI_12864_X_X, FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1, FYSETC_GENERIC_12864_1_1) \
2226
+  + COUNT_ENABLED(LCD_SAINSMART_I2C_1602, LCD_SAINSMART_I2C_2004) \
2227
+  + COUNT_ENABLED(MKS_12864OLED, MKS_12864OLED_SSD1306) \
2228
+  + COUNT_ENABLED(MKS_TS35_V2_0, MKS_ROBIN_TFT24, MKS_ROBIN_TFT28, MKS_ROBIN_TFT32, MKS_ROBIN_TFT35, MKS_ROBIN_TFT43, MKS_ROBIN_TFT_V1_1R) \
2229
+  + COUNT_ENABLED(TFTGLCD_PANEL_SPI, TFTGLCD_PANEL_I2C) \
2230
+  + COUNT_ENABLED(VIKI2, miniVIKI) \
2231
+  + COUNT_ENABLED(ZONESTAR_12864LCD, ZONESTAR_12864OLED, ZONESTAR_12864OLED_SSD1306) \
2232
+  + ENABLED(ANET_FULL_GRAPHICS_LCD) \
2233
+  + ENABLED(AZSMZ_12864) \
2234
+  + ENABLED(BQ_LCD_SMART_CONTROLLER) \
2235
+  + ENABLED(CARTESIO_UI) \
2236
+  + ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) \
2237
+  + ENABLED(FF_INTERFACEBOARD) \
2238
+  + ENABLED(FYSETC_242_OLED_12864) \
2251 2239
   + ENABLED(G3D_PANEL) \
2252
-  + ENABLED(RIGIDBOT_PANEL) \
2253
-  + ENABLED(MAKEBOARD_MINI_2_LINE_DISPLAY_1602) \
2254
-  + ENABLED(ZONESTAR_LCD) \
2255
-  + ENABLED(RA_CONTROL_PANEL) \
2256
-  + ENABLED(LCD_SAINSMART_I2C_1602) \
2257
-  + ENABLED(LCD_SAINSMART_I2C_2004) \
2258
-  + ENABLED(LCM1602) \
2240
+  + ENABLED(LCD_FOR_MELZI) \
2259 2241
   + ENABLED(LCD_I2C_PANELOLU2) \
2260 2242
   + ENABLED(LCD_I2C_VIKI) \
2261
-  + ENABLED(SAV_3DLCD) \
2262
-  + ENABLED(FF_INTERFACEBOARD) \
2263
-  + ENABLED(REPRAPWORLD_GRAPHICAL_LCD) \
2264
-  + ENABLED(VIKI2) \
2265
-  + ENABLED(miniVIKI) \
2243
+  + ENABLED(LCM1602) \
2244
+  + ENABLED(LONGER_LK_TFT28) \
2245
+  + ENABLED(MAKEBOARD_MINI_2_LINE_DISPLAY_1602) \
2266 2246
   + ENABLED(MAKRPANEL) \
2267
-  + ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) \
2268
-  + ENABLED(BQ_LCD_SMART_CONTROLLER) \
2269
-  + ENABLED(CARTESIO_UI) \
2270
-  + ENABLED(LCD_FOR_MELZI) \
2271
-  + ENABLED(ULTI_CONTROLLER) \
2247
+  + ENABLED(MALYAN_LCD) \
2272 2248
   + ENABLED(MKS_LCD12864) \
2273
-  + ENABLED(ENDER2_STOCKDISPLAY) \
2274
-  + ENABLED(FYSETC_MINI_12864_X_X) \
2275
-  + ENABLED(FYSETC_MINI_12864_1_2) \
2276
-  + ENABLED(FYSETC_MINI_12864_2_0) \
2277
-  + ENABLED(FYSETC_MINI_12864_2_1) \
2278
-  + ENABLED(FYSETC_GENERIC_12864_1_1) \
2279
-  + ENABLED(CR10_STOCKDISPLAY) \
2280
-  + ENABLED(DWIN_CREALITY_LCD) \
2281
-  + ENABLED(ANET_FULL_GRAPHICS_LCD) \
2282
-  + ENABLED(AZSMZ_12864) \
2283
-  + ENABLED(SILVER_GATE_GLCD_CONTROLLER) \
2284
-  + ENABLED(SAV_3DGLCD) \
2285 2249
   + ENABLED(OLED_PANEL_TINYBOY2) \
2286
-  + ENABLED(MKS_12864OLED) \
2287
-  + ENABLED(MKS_12864OLED_SSD1306) \
2288
-  + ENABLED(ZONESTAR_12864LCD) \
2289
-  + ENABLED(ZONESTAR_12864OLED) \
2290
-  + ENABLED(ZONESTAR_12864OLED_SSD1306) \
2291
-  + ENABLED(U8GLIB_SH1106_EINSTART) \
2292 2250
   + ENABLED(OVERLORD_OLED) \
2293
-  + ENABLED(FYSETC_242_OLED_12864) \
2294
-  + ENABLED(DGUS_LCD_UI_ORIGIN) \
2295
-  + ENABLED(DGUS_LCD_UI_FYSETC) \
2296
-  + ENABLED(DGUS_LCD_UI_HIPRECY) \
2297
-  + ENABLED(MALYAN_LCD) \
2251
+  + ENABLED(PANEL_ONE) \
2252
+  + ENABLED(RA_CONTROL_PANEL) \
2253
+  + ENABLED(RADDS_DISPLAY) \
2254
+  + ENABLED(REPRAPWORLD_GRAPHICAL_LCD) \
2255
+  + ENABLED(RIGIDBOT_PANEL) \
2256
+  + ENABLED(SAV_3DGLCD) \
2257
+  + ENABLED(SAV_3DLCD) \
2258
+  + ENABLED(SILVER_GATE_GLCD_CONTROLLER) \
2259
+  + ENABLED(TFT_TRONXY_X5SA) \
2298 2260
   + ENABLED(TOUCH_UI_FTDI_EVE) \
2299
-  + ENABLED(TFT_320x240) \
2300
-  + ENABLED(TFT_320x240_SPI) \
2301
-  + ENABLED(FSMC_GRAPHICAL_TFT) \
2302
-  + ENABLED(TFT_LVGL_UI_FSMC) \
2303
-  + ENABLED(TFT_LVGL_UI_SPI) \
2304
-  + ENABLED(ANYCUBIC_LCD_I3MEGA) \
2305
-  + ENABLED(ANYCUBIC_LCD_CHIRON) \
2306
-  + ENABLED(TFTGLCD_PANEL_SPI) \
2307
-  + ENABLED(TFTGLCD_PANEL_I2C)
2261
+  + ENABLED(U8GLIB_SH1106_EINSTART) \
2262
+  + ENABLED(ULTI_CONTROLLER) \
2263
+  + ENABLED(ULTIMAKERCONTROLLER) \
2264
+  + ENABLED(ZONESTAR_LCD)
2308 2265
   #error "Please select only one LCD controller option."
2309 2266
 #endif
2310 2267
 
2311
-#undef IS_RRD_SC
2312
-#undef IS_RRD_FG_SC
2313
-#undef IS_ULTRA_LCD
2314 2268
 #undef IS_U8GLIB_SSD1306
2315
-#undef IS_RRW_KEYPAD
2316 2269
 #undef IS_EXTUI
2317
-#undef IS_ULTIPANEL
2270
+#undef IS_LEGACY_TFT
2271
+
2272
+#if ANY(TFT_GENERIC, MKS_TS35_V2_0, MKS_ROBIN_TFT24, MKS_ROBIN_TFT28, MKS_ROBIN_TFT32, MKS_ROBIN_TFT35, MKS_ROBIN_TFT43, MKS_ROBIN_TFT_V1_1R, TFT_TRONXY_X5SA, ANYCUBIC_TFT35, ANYCUBIC_TFT35, LONGER_LK_TFT28)
2273
+  #if NONE(TFT_COLOR_UI, TFT_CLASSIC_UI, TFT_LVGL_UI)
2274
+    #error "TFT_COLOR_UI, TFT_CLASSIC_UI, TFT_LVGL_UI is required for your TFT. Please enable one."
2275
+  #elif 1 < ENABLED(TFT_COLOR_UI) + ENABLED(TFT_CLASSIC_UI) + ENABLED(TFT_LVGL_UI)
2276
+    #error "Please select only one of TFT_COLOR_UI, TFT_CLASSIC_UI, or TFT_LVGL_UI."
2277
+  #endif
2278
+#elif ANY(TFT_COLOR_UI, TFT_CLASSIC_UI, TFT_LVGL_UI)
2279
+  #error "TFT_(COLOR|CLASSIC|LVGL)_UI requires a TFT display to be enabled."
2280
+#endif
2281
+
2282
+#if ENABLED(TFT_GENERIC) && NONE(TFT_INTERFACE_FSMC, TFT_INTERFACE_SPI)
2283
+  #error "TFT_GENERIC requires either TFT_INTERFACE_FSMC or TFT_INTERFACE_SPI interface."
2284
+#endif
2318 2285
 
2319
-#if 1 < ENABLED(LCD_SCREEN_ROT_0) + ENABLED(LCD_SCREEN_ROT_90) + ENABLED(LCD_SCREEN_ROT_180) + ENABLED(LCD_SCREEN_ROT_270)
2286
+#if BOTH(TFT_INTERFACE_FSMC, TFT_INTERFACE_SPI)
2287
+  #error "Please enable only one of TFT_INTERFACE_SPI or TFT_INTERFACE_SPI."
2288
+#endif
2289
+
2290
+#if MANY(LCD_SCREEN_ROT_0, LCD_SCREEN_ROT_90, LCD_SCREEN_ROT_180, LCD_SCREEN_ROT_270)
2320 2291
   #error "Please enable only one LCD_SCREEN_ROT_* option: 0, 90, 180, or 270."
2321 2292
 #endif
2322 2293
 
2294
+#if MANY(TFT_RES_320x240, TFT_RES_480x272, TFT_RES_480x320)
2295
+  #error "Please select only one of TFT_RES_480x320, TFT_RES_480x320, or TFT_RES_480x272."
2296
+#endif
2297
+
2298
+#if HAS_TFT_LVGL_UI && DISABLED(TFT_RES_480x320)
2299
+  #error "(FMSC|SPI)TFT_LVGL_UI requires TFT_RES_480x320."
2300
+#endif
2301
+
2302
+#if defined(GRAPHICAL_TFT_UPSCALE) && !WITHIN(GRAPHICAL_TFT_UPSCALE, 2, 3)
2303
+  #error "GRAPHICAL_TFT_UPSCALE must be set to 2 or 3."
2304
+#endif
2305
+
2323 2306
 /**
2324 2307
  * Serial displays require a dedicated serial port
2325 2308
  */
@@ -2756,7 +2739,7 @@ static_assert(   _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2)
2756 2739
   #error "BLOCK_BUFFER_SIZE must be a power of 2."
2757 2740
 #endif
2758 2741
 
2759
-#if ENABLED(LED_CONTROL_MENU) && DISABLED(ULTIPANEL)
2742
+#if ENABLED(LED_CONTROL_MENU) && !IS_ULTIPANEL
2760 2743
   #error "LED_CONTROL_MENU requires an LCD controller."
2761 2744
 #endif
2762 2745
 

+ 1
- 1
Marlin/src/inc/Version.h View File

@@ -52,7 +52,7 @@
52 52
  * to alert users to major changes.
53 53
  */
54 54
 
55
-#define MARLIN_HEX_VERSION 020007
55
+#define MARLIN_HEX_VERSION 020008
56 56
 #ifndef REQUIRED_CONFIGURATION_H_VERSION
57 57
   #define REQUIRED_CONFIGURATION_H_VERSION MARLIN_HEX_VERSION
58 58
 #endif

+ 1
- 1
Marlin/src/lcd/TFTGLCD/ultralcd_TFTGLCD.cpp View File

@@ -28,7 +28,7 @@
28 28
  * ultralcd_TFTGLCD.cpp
29 29
  *
30 30
  * Implementation of the LCD display routines for a TFT GLCD displays with external controller.
31
- * This display looks as a REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER but has good text font
31
+ * This display looks like a REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER but has good text font
32 32
  * and supports color output.
33 33
  */
34 34
 

+ 1
- 1
Marlin/src/lcd/dogm/HAL_LCD_com_defines.h View File

@@ -112,7 +112,7 @@
112 112
 #ifndef U8G_COM_SSD_I2C_HAL
113 113
   #define U8G_COM_SSD_I2C_HAL       u8g_com_null_fn
114 114
 #endif
115
-#if EITHER(FSMC_GRAPHICAL_TFT, SPI_GRAPHICAL_TFT)
115
+#if HAS_FSMC_GRAPHICAL_TFT || HAS_SPI_GRAPHICAL_TFT
116 116
   uint8_t u8g_com_hal_tft_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
117 117
   #define U8G_COM_HAL_TFT_FN       u8g_com_hal_tft_fn
118 118
 #else

+ 2
- 2
Marlin/src/lcd/dogm/u8g_dev_tft_upscale_from_128x64.cpp View File

@@ -55,7 +55,7 @@
55 55
 
56 56
 #include "../../inc/MarlinConfig.h"
57 57
 
58
-#if HAS_MARLINUI_U8GLIB && (PIN_EXISTS(FSMC_CS) || ENABLED(SPI_GRAPHICAL_TFT))
58
+#if HAS_MARLINUI_U8GLIB && (PIN_EXISTS(FSMC_CS) || HAS_SPI_GRAPHICAL_TFT)
59 59
 
60 60
 #include "HAL_LCD_com_defines.h"
61 61
 #include "ultralcd_DOGM.h"
@@ -477,4 +477,4 @@ uint8_t u8g_com_hal_tft_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_p
477 477
 
478 478
 U8G_PB_DEV(u8g_dev_tft_320x240_upscale_from_128x64, WIDTH, HEIGHT, PAGE_HEIGHT, u8g_dev_tft_320x240_upscale_from_128x64_fn, U8G_COM_HAL_TFT_FN);
479 479
 
480
-#endif // HAS_MARLINUI_U8GLIB && FSMC_CS
480
+#endif // HAS_MARLINUI_U8GLIB && (FSMC_CS_PIN || HAS_SPI_GRAPHICAL_TFT)

+ 1
- 1
Marlin/src/lcd/dogm/ultralcd_DOGM.h View File

@@ -189,7 +189,7 @@
189 189
   // Unspecified 320x240 TFT pre-initialized by built-in bootloader
190 190
 
191 191
   #define U8G_CLASS U8GLIB_TFT_320X240_UPSCALE_FROM_128X64
192
-  #if ENABLED(FSMC_GRAPHICAL_TFT)
192
+  #if HAS_FSMC_GRAPHICAL_TFT
193 193
     #define U8G_PARAM FSMC_CS_PIN, FSMC_RS_PIN
194 194
   #else
195 195
     #define U8G_PARAM -1, -1

+ 3
- 3
Marlin/src/lcd/extui/lib/mks_ui/draw_print_file.cpp View File

@@ -520,7 +520,7 @@ void lv_gcode_file_read(uint8_t *data_buf) {
520 520
       j = 0;
521 521
       ignore_start = false;
522 522
     }
523
-    #if ENABLED(TFT_LVGL_UI_SPI)
523
+    #if HAS_TFT_LVGL_UI_SPI
524 524
       for (i = 0; i < 200;) {
525 525
         p_index = (uint16_t *)(&public_buf[i]);
526 526
 
@@ -529,7 +529,7 @@ void lv_gcode_file_read(uint8_t *data_buf) {
529 529
         i += 2;
530 530
         if (*p_index == 0x0000) *p_index = LV_COLOR_BACKGROUND.full;
531 531
       }
532
-    #else
532
+    #else // !HAS_TFT_LVGL_UI_SPI
533 533
       for (i = 0; i < 200;) {
534 534
         p_index = (uint16_t *)(&public_buf[i]);
535 535
         //Color = (*p_index >> 8);
@@ -537,7 +537,7 @@ void lv_gcode_file_read(uint8_t *data_buf) {
537 537
         i += 2;
538 538
         if (*p_index == 0x0000) *p_index = LV_COLOR_BACKGROUND.full; // 0x18C3;
539 539
       }
540
-    #endif // TFT_LVGL_UI_SPI
540
+    #endif // !HAS_TFT_LVGL_UI_SPI
541 541
     memcpy(data_buf, public_buf, 200);
542 542
   #endif // SDSUPPORT
543 543
 }

+ 2
- 2
Marlin/src/lcd/extui/lib/mks_ui/draw_ui.cpp View File

@@ -751,7 +751,7 @@ char *creat_title_text() {
751 751
         card.openFileRead(cur_name);
752 752
 
753 753
         card.setIndex((PREVIEW_LITTLE_PIC_SIZE + To_pre_view) + size * row + 8);
754
-        #if ENABLED(TFT_LVGL_UI_SPI)
754
+        #if HAS_TFT_LVGL_UI_SPI
755 755
           SPI_TFT.setWindow(xpos_pixel, ypos_pixel + row, 200, 1);
756 756
         #else
757 757
           LCD_setWindowArea(xpos_pixel, ypos_pixel + row, 200, 1);
@@ -782,7 +782,7 @@ char *creat_title_text() {
782 782
           //#endif
783 783
 
784 784
         }
785
-        #if ENABLED(TFT_LVGL_UI_SPI)
785
+        #if HAS_TFT_LVGL_UI_SPI
786 786
           for (i = 0; i < 400;) {
787 787
             p_index = (uint16_t *)(&bmp_public_buf[i]);
788 788
 

+ 2
- 2
Marlin/src/lcd/scaled_tft.h View File

@@ -49,7 +49,7 @@
49 49
     #define TFT_PIXEL_OFFSET_X 48
50 50
   #endif
51 51
 #endif
52
+
52 53
 #ifndef TFT_PIXEL_OFFSET_Y
53
-  // 32 is better for both 320x240 and 480x320
54
-  #define TFT_PIXEL_OFFSET_Y 32
54
+  #define TFT_PIXEL_OFFSET_Y 32 // 32 is best for both 320x240 and 480x320
55 55
 #endif

+ 4
- 4
Marlin/src/lcd/ultralcd.cpp View File

@@ -400,7 +400,7 @@ bool MarlinUI::get_blink() {
400 400
 ///////////// Keypad Handling //////////////
401 401
 ////////////////////////////////////////////
402 402
 
403
-#if BOTH(REPRAPWORLD_KEYPAD, HAS_ENCODER_ACTION)
403
+#if IS_RRW_KEYPAD && HAS_ENCODER_ACTION
404 404
 
405 405
   volatile uint8_t MarlinUI::keypad_buttons;
406 406
 
@@ -432,7 +432,7 @@ bool MarlinUI::get_blink() {
432 432
         #if HAS_ENCODER_ACTION
433 433
           refresh(LCDVIEW_REDRAW_NOW);
434 434
           #if HAS_LCD_MENU
435
-            if (encoderDirection == -(ENCODERBASE)) { // ADC_KEYPAD forces REVERSE_MENU_DIRECTION, so this indicates menu navigation
435
+            if (encoderDirection == -(ENCODERBASE)) { // HAS_ADC_BUTTONS forces REVERSE_MENU_DIRECTION, so this indicates menu navigation
436 436
                    if (RRK(EN_KEYPAD_UP))     encoderPosition += ENCODER_STEPS_PER_MENU_ITEM;
437 437
               else if (RRK(EN_KEYPAD_DOWN))   encoderPosition -= ENCODER_STEPS_PER_MENU_ITEM;
438 438
               else if (RRK(EN_KEYPAD_LEFT))   { MenuItem_back::action(); quick_feedback(); }
@@ -497,12 +497,12 @@ bool MarlinUI::get_blink() {
497 497
         return true;
498 498
       }
499 499
 
500
-    #endif // !ADC_KEYPAD
500
+    #endif // !HAS_ADC_BUTTONS
501 501
 
502 502
     return false;
503 503
   }
504 504
 
505
-#endif // REPRAPWORLD_KEYPAD
505
+#endif // IS_RRW_KEYPAD && HAS_ENCODER_ACTION
506 506
 
507 507
 /**
508 508
  * Status Screen

+ 5
- 6
Marlin/src/lcd/ultralcd.h View File

@@ -34,13 +34,13 @@
34 34
 #if EITHER(HAS_LCD_MENU, ULTIPANEL_FEEDMULTIPLY)
35 35
   #define HAS_ENCODER_ACTION 1
36 36
 #endif
37
-#if ((!HAS_ADC_BUTTONS && ENABLED(NEWPANEL)) || BUTTONS_EXIST(EN1, EN2)) && !IS_TFTGLCD_PANEL
37
+#if ((!HAS_ADC_BUTTONS && IS_NEWPANEL) || BUTTONS_EXIST(EN1, EN2)) && !IS_TFTGLCD_PANEL
38 38
   #define HAS_ENCODER_WHEEL 1
39 39
 #endif
40 40
 #if HAS_ENCODER_WHEEL || ANY_BUTTON(ENC, BACK, UP, DWN, LFT, RT)
41 41
   #define HAS_DIGITAL_BUTTONS 1
42 42
 #endif
43
-#if !HAS_ADC_BUTTONS && (ENABLED(REPRAPWORLD_KEYPAD) || (HAS_WIRED_LCD && DISABLED(NEWPANEL)))
43
+#if !HAS_ADC_BUTTONS && (IS_RRW_KEYPAD || (HAS_WIRED_LCD && !IS_NEWPANEL))
44 44
   #define HAS_SHIFT_ENCODER 1
45 45
 #endif
46 46
 
@@ -106,8 +106,7 @@
106 106
 
107 107
 #endif // HAS_WIRED_LCD
108 108
 
109
-// REPRAPWORLD_KEYPAD (and ADC_KEYPAD)
110
-#if ENABLED(REPRAPWORLD_KEYPAD)
109
+#if IS_RRW_KEYPAD
111 110
   #define BTN_OFFSET          0 // Bit offset into buttons for shift register values
112 111
 
113 112
   #define BLEN_KEYPAD_F3      0
@@ -136,7 +135,7 @@
136 135
     #define BUTTON_CLICK() RRK(EN_KEYPAD_MIDDLE)
137 136
   #endif
138 137
 
139
-#endif
138
+#endif // IS_RRW_KEYPAD
140 139
 
141 140
 #if HAS_DIGITAL_BUTTONS
142 141
 
@@ -633,7 +632,7 @@ public:
633 632
   #if HAS_ENCODER_ACTION
634 633
 
635 634
     static volatile uint8_t buttons;
636
-    #if ENABLED(REPRAPWORLD_KEYPAD)
635
+    #if IS_RRW_KEYPAD
637 636
       static volatile uint8_t keypad_buttons;
638 637
       static bool handle_keypad();
639 638
     #endif

+ 1
- 1
Marlin/src/pins/esp32/pins_MRR_ESPE.h View File

@@ -134,7 +134,7 @@
134 134
 
135 135
     #define BEEPER_PIN                       151
136 136
 
137
-  #elif ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
137
+  #elif IS_RRD_FG_SC
138 138
 
139 139
     #define BEEPER_PIN                       151
140 140
 

+ 7
- 7
Marlin/src/pins/linux/pins_RAMPS_LINUX.h View File

@@ -400,7 +400,7 @@
400 400
     #define LCD_PINS_ENABLE                   51  // SID (MOSI)
401 401
     #define LCD_PINS_D4                       52  // SCK (CLK) clock
402 402
 
403
-  #elif BOTH(NEWPANEL, PANEL_ONE)
403
+  #elif BOTH(IS_NEWPANEL, PANEL_ONE)
404 404
 
405 405
     #define LCD_PINS_RS                       40
406 406
     #define LCD_PINS_ENABLE                   42
@@ -417,7 +417,7 @@
417 417
       #define LCD_PINS_ENABLE                 29
418 418
       #define LCD_PINS_D4                     25
419 419
 
420
-      #if DISABLED(NEWPANEL)
420
+      #if !IS_NEWPANEL
421 421
         #define BEEPER_PIN                    37
422 422
       #endif
423 423
 
@@ -450,13 +450,13 @@
450 450
 
451 451
       #define LCD_PINS_D7                     29
452 452
 
453
-      #if DISABLED(NEWPANEL)
453
+      #if !IS_NEWPANEL
454 454
         #define BEEPER_PIN                    33
455 455
       #endif
456 456
 
457 457
     #endif
458 458
 
459
-    #if DISABLED(NEWPANEL)
459
+    #if !IS_NEWPANEL
460 460
       // Buttons attached to a shift register
461 461
       // Not wired yet
462 462
       //#define SHIFT_CLK                     38
@@ -470,7 +470,7 @@
470 470
   //
471 471
   // LCD Display input pins
472 472
   //
473
-  #if ENABLED(NEWPANEL)
473
+  #if IS_NEWPANEL
474 474
 
475 475
     #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
476 476
 
@@ -607,7 +607,7 @@
607 607
       #define BEEPER_PIN                      33
608 608
 
609 609
       // Buttons are directly attached to AUX-2
610
-      #if ENABLED(REPRAPWORLD_KEYPAD)
610
+      #if IS_RRW_KEYPAD
611 611
         #define SHIFT_OUT                     40
612 612
         #define SHIFT_CLK                     44
613 613
         #define SHIFT_LD                      42
@@ -630,6 +630,6 @@
630 630
       #endif
631 631
 
632 632
     #endif
633
-  #endif // NEWPANEL
633
+  #endif // IS_NEWPANEL
634 634
 
635 635
 #endif // HAS_WIRED_LCD

+ 2
- 2
Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h View File

@@ -138,8 +138,8 @@
138 138
   #define LCD_PINS_ENABLE                  P0_18  // (MOSI) EXP1-3
139 139
   #define LCD_PINS_D4                      P0_15  // (SCK)  EXP1-5
140 140
 
141
-  #if BOTH(HAS_MARLINUI_HD44780, REPRAP_DISCOUNT_SMART_CONTROLLER)
142
-    #error "REPRAP_DISCOUNT_SMART_CONTROLLER is not supported by the BIQU B300 v1.0"
141
+  #if BOTH(HAS_MARLINUI_HD44780, IS_RRD_SC)
142
+    #error "REPRAP_DISCOUNT_SMART_CONTROLLER displays aren't supported by the BIQU B300 v1.0"
143 143
   #endif
144 144
 
145 145
   #if ENABLED(SDSUPPORT)

+ 2
- 2
Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h View File

@@ -109,8 +109,8 @@
109 109
   #define LCD_PINS_ENABLE                  P0_18  // (MOSI) EXP1-3
110 110
   #define LCD_PINS_D4                      P0_15  // (SCK)  EXP1-5
111 111
 
112
-  #if BOTH(HAS_MARLINUI_HD44780, REPRAP_DISCOUNT_SMART_CONTROLLER)
113
-    #error "REPRAP_DISCOUNT_SMART_CONTROLLER is not supported by the BIQU BQ111-A4"
112
+  #if BOTH(HAS_MARLINUI_HD44780, IS_RRD_SC)
113
+    #error "REPRAP_DISCOUNT_SMART_CONTROLLER displays aren't supported by the BIQU BQ111-A4"
114 114
   #endif
115 115
 
116 116
   #if ENABLED(SDSUPPORT)

+ 1
- 1
Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h View File

@@ -348,7 +348,7 @@
348 348
         #define LCD_BACKLIGHT_PIN          -1
349 349
       #endif
350 350
 
351
-      #if ENABLED(ULTIPANEL)
351
+      #if IS_ULTIPANEL
352 352
         #define LCD_PINS_D5         EXPA1_05_PIN
353 353
         #define LCD_PINS_D6         EXPA1_04_PIN
354 354
         #define LCD_PINS_D7         EXPA1_03_PIN

+ 1
- 4
Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h View File

@@ -293,9 +293,6 @@
293 293
     #define TOUCH_BUTTONS_HW_SPI
294 294
     #define TOUCH_BUTTONS_HW_SPI_DEVICE        1
295 295
 
296
-    #ifndef GRAPHICAL_TFT_UPSCALE
297
-      #define GRAPHICAL_TFT_UPSCALE            3
298
-    #endif
299 296
     // SPI 1
300 297
     #define SCK_PIN                        P0_15
301 298
     #define MISO_PIN                       P0_17
@@ -398,7 +395,7 @@
398 395
         #define FORCE_SOFT_SPI
399 396
       #endif
400 397
 
401
-      #if ENABLED(ULTIPANEL)
398
+      #if IS_ULTIPANEL
402 399
         #define LCD_PINS_D5                P1_21
403 400
         #define LCD_PINS_D6                P1_22
404 401
         #define LCD_PINS_D7                P1_23

+ 1
- 1
Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h View File

@@ -125,7 +125,7 @@
125 125
 //
126 126
 // LCD
127 127
 //
128
-#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
128
+#if IS_RRD_SC
129 129
   #define BEEPER_PIN                       P0_19
130 130
   #define BTN_EN1                          P1_23
131 131
   #define BTN_EN2                          P1_24

+ 1
- 1
Marlin/src/pins/lpc1768/pins_MKS_SBASE.h View File

@@ -147,7 +147,7 @@
147 147
 //
148 148
 // Ethernet pins
149 149
 //
150
-#ifndef ULTIPANEL
150
+#if !IS_ULTIPANEL
151 151
   #define ENET_MDIO                        P1_17  // J12-4
152 152
   #define ENET_RX_ER                       P1_14  // J12-6
153 153
   #define ENET_RXD1                        P1_10  // J12-8

+ 1
- 1
Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h View File

@@ -319,7 +319,7 @@
319 319
           #define DOGLCD_A0                P1_00
320 320
         #endif
321 321
 
322
-        #if ENABLED(ULTIPANEL)
322
+        #if IS_ULTIPANEL
323 323
           #define LCD_PINS_D5              P0_17
324 324
           #define LCD_PINS_D6              P1_00
325 325
           #define LCD_PINS_D7              P1_22

+ 4
- 4
Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h View File

@@ -357,8 +357,8 @@
357 357
   #define LCD_PINS_RS                      P0_16  // (16) J3-7 & AUX-4
358 358
   #define LCD_SDSS                         P1_23  // (53) J3-5 & AUX-3
359 359
 
360
-  #if ENABLED(NEWPANEL)
361
-    #if ENABLED(REPRAPWORLD_KEYPAD)
360
+  #if IS_NEWPANEL
361
+    #if IS_RRW_KEYPAD
362 362
       #define SHIFT_OUT                    P0_18  // (51) (MOSI) J3-10 & AUX-3
363 363
       #define SHIFT_CLK                    P0_15  // (52) (SCK)  J3-9 & AUX-3
364 364
       #define SHIFT_LD                     P1_31  // (49)        J3-1 & AUX-3 (NOT 5V tolerant)
@@ -416,7 +416,7 @@
416 416
     #define LCD_BACKLIGHT_PIN              P0_16  //(16) J3-7 & AUX-4 - only used on DOGLCD controllers
417 417
     #define LCD_PINS_ENABLE                P0_18  // (51) (MOSI) J3-10 & AUX-3
418 418
     #define LCD_PINS_D4                    P0_15  // (52) (SCK)  J3-9 & AUX-3
419
-    #if ENABLED(ULTIPANEL)
419
+    #if IS_ULTIPANEL
420 420
       #define LCD_PINS_D5                  P1_17  // (71) ENET_MDIO
421 421
       #define LCD_PINS_D6                  P1_14  // (73) ENET_RX_ER
422 422
       #define LCD_PINS_D7                  P1_10  // (75) ENET_RXD1
@@ -436,7 +436,7 @@
436 436
 //
437 437
 // Ethernet pins
438 438
 //
439
-#if DISABLED(ULTIPANEL)
439
+#if !IS_ULTIPANEL
440 440
   #define ENET_MDIO                        P1_17  // (71)  J12-4
441 441
   #define ENET_RX_ER                       P1_14  // (73)  J12-6
442 442
   #define ENET_RXD1                        P1_10  // (75)  J12-8

+ 2
- 2
Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h View File

@@ -96,7 +96,7 @@
96 96
 // Display
97 97
 //
98 98
 
99
-#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
99
+#if IS_RRD_FG_SC
100 100
     #define LCD_PINS_RS                    P0_16
101 101
     #define LCD_PINS_ENABLE                P0_18
102 102
     #define LCD_PINS_D4                    P0_15
@@ -110,4 +110,4 @@
110 110
     #define BTN_ENC                        P1_30
111 111
 
112 112
     #define SD_DETECT_PIN                  -1
113
-#endif // REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
113
+#endif // IS_RRD_FG_SC

+ 3
- 3
Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h View File

@@ -144,11 +144,11 @@
144 144
 
145 145
     #define DOGLCD_A0                      P2_06  // (59) J3-8 & AUX-2
146 146
 
147
-    #if ENABLED(REPRAPWORLD_KEYPAD)
147
+    #if IS_RRW_KEYPAD
148 148
       #define SHIFT_OUT                    P0_18  // (51)  (MOSI) J3-10 & AUX-3
149 149
       #define SHIFT_CLK                    P0_15  // (52)  (SCK)  J3-9 & AUX-3
150 150
       #define SHIFT_LD                     P1_31  // (49)  not 5V tolerant   J3-1 & AUX-3
151
-    #elif DISABLED(NEWPANEL)
151
+    #elif !IS_NEWPANEL
152 152
       //#define SHIFT_OUT                  P2_11  // (35)  J3-3 & AUX-4
153 153
       //#define SHIFT_CLK                  P3_26  // (31)  J3-2 & AUX-4
154 154
       //#define SHIFT_LD                   P3_25  // (33)  J3-4 & AUX-4
@@ -166,7 +166,7 @@
166 166
       #define STAT_LED_BLUE_PIN            P0_26  // (63)  may change if cable changes
167 167
       #define STAT_LED_RED_PIN             P1_21  // ( 6)  may change if cable changes
168 168
     #else
169
-      #if ENABLED(ULTIPANEL)
169
+      #if IS_ULTIPANEL
170 170
         #define LCD_PINS_D5                P1_17  // (71) ENET_MDIO
171 171
         #define LCD_PINS_D6                P1_14  // (73) ENET_RX_ER
172 172
         #define LCD_PINS_D7                P1_10  // (75) ENET_RXD1

+ 1
- 1
Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h View File

@@ -325,7 +325,7 @@
325 325
           #define DOGLCD_A0                P1_00
326 326
         #endif
327 327
 
328
-        #if ENABLED(ULTIPANEL)
328
+        #if IS_ULTIPANEL
329 329
           #define LCD_PINS_D5              P0_17
330 330
           #define LCD_PINS_D6              P1_00
331 331
           #define LCD_PINS_D7              P1_22

+ 1
- 1
Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h View File

@@ -138,7 +138,7 @@
138 138
    * http://chibidibidiwah.wdfiles.com/local--files/panel/smoothieboard2sd.jpg
139 139
    * http://smoothieware.org/panel
140 140
    */
141
-  #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
141
+  #if IS_RRD_FG_SC
142 142
     //  EXP1 Pins
143 143
     #define BEEPER_PIN                     P1_31  // EXP1 Pin 1
144 144
     #define BTN_ENC                        P1_30  // EXP1 Pin 2

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

@@ -129,7 +129,7 @@
129 129
   #define SD_DETECT_PIN                       49
130 130
 #endif
131 131
 
132
-#if ENABLED(NEWPANEL)
132
+#if IS_NEWPANEL
133 133
   #define BTN_EN1                             11
134 134
   #define BTN_EN2                             12
135 135
   #define BTN_ENC                             43

+ 3
- 3
Marlin/src/pins/mega/pins_GT2560_REV_A.h View File

@@ -109,7 +109,7 @@
109 109
 
110 110
   #define BEEPER_PIN                          18
111 111
 
112
-  #if ENABLED(NEWPANEL)
112
+  #if IS_NEWPANEL
113 113
 
114 114
     #if ENABLED(MKS_MINI_12864)
115 115
       #define DOGLCD_A0                        5
@@ -130,7 +130,7 @@
130 130
     #define BTN_ENC                           19
131 131
     #define SD_DETECT_PIN                     38
132 132
 
133
-  #else                                           // !NEWPANEL
133
+  #else                                           // !IS_NEWPANEL
134 134
 
135 135
     #define SHIFT_CLK                         38
136 136
     #define SHIFT_LD                          42
@@ -146,6 +146,6 @@
146 146
 
147 147
     #define SD_DETECT_PIN                     -1
148 148
 
149
-  #endif // !NEWPANEL
149
+  #endif // !IS_NEWPANEL
150 150
 
151 151
 #endif // HAS_WIRED_LCD

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

@@ -172,7 +172,7 @@
172 172
   #define LCD_PINS_D7                         36
173 173
 #endif
174 174
 
175
-#if ENABLED(NEWPANEL)
175
+#if IS_NEWPANEL
176 176
   #ifndef BTN_EN1
177 177
     #define BTN_EN1                           42
178 178
   #endif

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

@@ -32,7 +32,7 @@
32 32
 
33 33
 #define SPEAKER  // The speaker can produce tones
34 34
 
35
-#if ENABLED(NEWPANEL)
35
+#if IS_NEWPANEL
36 36
   #define BTN_EN1                            16
37 37
   #define BTN_EN2                            17
38 38
   #define BTN_ENC                            19

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

@@ -127,7 +127,7 @@
127 127
 
128 128
   #define BEEPER_PIN                          18
129 129
 
130
-  #if ENABLED(NEWPANEL)
130
+  #if IS_NEWPANEL
131 131
 
132 132
     #define LCD_PINS_RS                       20  // LCD_CS
133 133
     #define LCD_PINS_ENABLE                   15  // LCD_SDA
@@ -168,6 +168,6 @@
168 168
     #define LCD_PINS_D6                       20
169 169
     #define LCD_PINS_D7                       19
170 170
 
171
-  #endif // !NEWPANEL
171
+  #endif // !IS_NEWPANEL
172 172
 
173 173
 #endif // HAS_WIRED_LCD

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

@@ -108,7 +108,7 @@
108 108
 //
109 109
 #define BEEPER_PIN                            33
110 110
 
111
-#if BOTH(ULTRA_LCD, NEWPANEL)
111
+#if IS_ULTRA_LCD && IS_NEWPANEL
112 112
 
113 113
   #define LCD_PINS_RS                         16
114 114
   #define LCD_PINS_ENABLE                     17
@@ -124,7 +124,7 @@
124 124
 
125 125
   #define SD_DETECT_PIN                       -1  // RAMPS doesn't use this
126 126
 
127
-#endif // ULTRA_LCD && NEWPANEL
127
+#endif // IS_ULTRA_LCD && IS_NEWPANEL
128 128
 
129 129
 //
130 130
 // M3/M4/M5 - Spindle/Laser Control

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

@@ -139,7 +139,7 @@
139 139
   #define LCD_PINS_D6                         32
140 140
   #define LCD_PINS_D7                         33
141 141
 
142
-  #if ENABLED(NEWPANEL)
142
+  #if IS_NEWPANEL
143 143
     // Buttons are directly attached using keypad
144 144
     #define BTN_EN1                           61
145 145
     #define BTN_EN2                           59

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

@@ -214,7 +214,7 @@
214 214
 //
215 215
 #if HAS_WIRED_LCD
216 216
 
217
-  #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
217
+  #if IS_RRD_FG_SC
218 218
 
219 219
     #define LCD_PINS_RS                       33  // C4: LCD-STROBE
220 220
     #define LCD_PINS_ENABLE                   72  // J2: LEFT

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

@@ -132,7 +132,7 @@
132 132
   #endif
133 133
 #endif
134 134
 
135
-#if ENABLED(NEWPANEL)
135
+#if IS_NEWPANEL
136 136
   #define BTN_ENC                             16  // Enter Pin
137 137
   #define BTN_UP                              19  // Button UP Pin
138 138
   #define BTN_DWN                             17  // Button DOWN Pin

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

@@ -49,7 +49,9 @@
49 49
   #define IS_RAMPS_SF
50 50
 #endif
51 51
 
52
-#define HAS_FREE_AUX2_PINS !(BOTH(ULTRA_LCD, NEWPANEL) && ANY(PANEL_ONE, VIKI2, miniVIKI, MINIPANEL, REPRAPWORLD_KEYPAD))
52
+#if !(BOTH(IS_ULTRA_LCD, IS_NEWPANEL) && ANY(PANEL_ONE, VIKI2, miniVIKI, MINIPANEL, REPRAPWORLD_KEYPAD))
53
+  #define HAS_FREE_AUX2_PINS 1
54
+#endif
53 55
 
54 56
 // Test the target within the included pins file
55 57
 #ifdef __MARLIN_DEPS__

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

@@ -164,7 +164,7 @@
164 164
 
165 165
   #define KILL_PIN                            32
166 166
 
167
-  #if ENABLED(ULTIPANEL) || TOUCH_UI_ULTIPANEL
167
+  #if IS_ULTIPANEL || TOUCH_UI_ULTIPANEL
168 168
 
169 169
     #if ENABLED(CR10_STOCKDISPLAY)
170 170
       #define LCD_PINS_RS                     85
@@ -187,5 +187,5 @@
187 187
     #define BEEPER_PIN                        84  // AUX-4
188 188
     #define SD_DETECT_PIN                     15
189 189
 
190
-  #endif // ULTIPANEL || TOUCH_UI_ULTIPANEL
190
+  #endif // IS_ULTIPANEL || TOUCH_UI_ULTIPANEL
191 191
 #endif // HAS_WIRED_LCD

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

@@ -170,7 +170,7 @@
170 170
 
171 171
   #define KILL_PIN                            32
172 172
 
173
-  #if ANY(ULTIPANEL, TOUCH_UI_ULTIPANEL, TOUCH_UI_FTDI_EVE)
173
+  #if ANY(IS_ULTIPANEL, TOUCH_UI_ULTIPANEL, TOUCH_UI_FTDI_EVE)
174 174
 
175 175
     #if ENABLED(CR10_STOCKDISPLAY)
176 176
       #define LCD_PINS_RS                     85
@@ -194,6 +194,6 @@
194 194
 
195 195
     #define SD_DETECT_PIN                     15
196 196
 
197
-  #endif // ULTIPANEL || TOUCH_UI_ULTIPANEL || TOUCH_UI_FTDI_EVE
197
+  #endif // IS_ULTIPANEL || TOUCH_UI_ULTIPANEL || TOUCH_UI_FTDI_EVE
198 198
 
199 199
 #endif // HAS_WIRED_LCD || TOUCH_UI_ULTIPANEL || TOUCH_UI_FTDI_EVE

+ 2
- 2
Marlin/src/pins/rambo/pins_MINIRAMBO.h View File

@@ -147,7 +147,7 @@
147 147
     #define KILL_PIN                          32
148 148
   #endif
149 149
 
150
-  #if ENABLED(ULTIPANEL) || TOUCH_UI_ULTIPANEL
150
+  #if IS_ULTIPANEL || TOUCH_UI_ULTIPANEL
151 151
 
152 152
     #if MB(MINIRAMBO_10A)
153 153
 
@@ -187,6 +187,6 @@
187 187
 
188 188
     #endif // !MINIRAMBO_10A
189 189
 
190
-  #endif // ULTIPANEL || TOUCH_UI_ULTIPANEL
190
+  #endif // IS_ULTIPANEL || TOUCH_UI_ULTIPANEL
191 191
 
192 192
 #endif // HAS_WIRED_LCD || TOUCH_UI_ULTIPANEL

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

@@ -187,7 +187,7 @@
187 187
 
188 188
   #define KILL_PIN                            80
189 189
 
190
-  #if ENABLED(ULTIPANEL) || TOUCH_UI_ULTIPANEL
190
+  #if IS_ULTIPANEL || TOUCH_UI_ULTIPANEL
191 191
 
192 192
     #define LCD_PINS_RS                       70
193 193
     #define LCD_PINS_ENABLE                   71
@@ -228,7 +228,7 @@
228 228
 
229 229
     #endif // !VIKI2 && !miniVIKI
230 230
 
231
-  #else                                           // !NEWPANEL - old style panel with shift register
231
+  #else                                           // !IS_NEWPANEL - old style panel with shift register
232 232
 
233 233
     // No Beeper added
234 234
     #define BEEPER_PIN                        33
@@ -247,6 +247,6 @@
247 247
     #define LCD_PINS_D6                       27
248 248
     #define LCD_PINS_D7                       29
249 249
 
250
-  #endif // !NEWPANEL
250
+  #endif // !IS_NEWPANEL
251 251
 
252 252
 #endif // HAS_WIRED_LCD

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

@@ -78,7 +78,7 @@
78 78
 //
79 79
 // LCD / Controller
80 80
 //
81
-#if BOTH(ULTRA_LCD, NEWPANEL)
81
+#if IS_ULTRA_LCD && IS_NEWPANEL
82 82
   #undef BEEPER_PIN
83 83
 
84 84
   #undef LCD_PINS_RS
@@ -106,7 +106,7 @@
106 106
 
107 107
   #define BEEPER_PIN                          33
108 108
 
109
-#endif // ULTRA_LCD && NEWPANEL
109
+#endif // IS_ULTRA_LCD && IS_NEWPANEL
110 110
 
111 111
 /**
112 112
  *  M3/M4/M5 - Spindle/Laser Control
@@ -157,7 +157,7 @@
157 157
     #define SPINDLE_LASER_PWM_PIN             46  // Hardware PWM
158 158
     #define SPINDLE_LASER_ENA_PIN             62  // Pullup!
159 159
     #define SPINDLE_DIR_PIN                   48
160
-  #elif !BOTH(ULTRA_LCD, NEWPANEL)                // use expansion header if no LCD in use
160
+  #elif !BOTH(IS_ULTRA_LCD, IS_NEWPANEL)             // use expansion header if no LCD in use
161 161
     #define SPINDLE_LASER_ENA_PIN             16  // Pullup or pulldown!
162 162
     #define SPINDLE_DIR_PIN                   17
163 163
   #endif

+ 2
- 2
Marlin/src/pins/ramps/pins_FELIX2.h View File

@@ -49,11 +49,11 @@
49 49
 //
50 50
 // LCD / Controller
51 51
 //
52
-#if BOTH(ULTRA_LCD, NEWPANEL)
52
+#if IS_ULTRA_LCD && IS_NEWPANEL
53 53
 
54 54
   #define SD_DETECT_PIN                       6
55 55
 
56
-#endif // NEWPANEL && ULTRA_LCD
56
+#endif
57 57
 
58 58
 //
59 59
 // M3/M4/M5 - Spindle/Laser Control

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

@@ -181,7 +181,7 @@
181 181
 //
182 182
 // Formbot only supports REPRAP_DISCOUNT_SMART_CONTROLLER
183 183
 //
184
-#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
184
+#if IS_RRD_SC
185 185
   #define BEEPER_PIN                          37
186 186
   #define BTN_EN1                             31
187 187
   #define BTN_EN2                             33

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

@@ -175,7 +175,7 @@
175 175
 //
176 176
 // Formbot only supports REPRAP_DISCOUNT_SMART_CONTROLLER
177 177
 //
178
-#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
178
+#if IS_RRD_SC
179 179
   #ifndef BEEPER_PIN
180 180
     #define BEEPER_PIN                        37
181 181
   #endif

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

@@ -155,7 +155,7 @@
155 155
 //
156 156
 // Formbot only supports REPRAP_DISCOUNT_SMART_CONTROLLER
157 157
 //
158
-#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
158
+#if IS_RRD_SC
159 159
   #define LCD_PINS_RS                         16
160 160
   #define LCD_PINS_ENABLE                     17
161 161
   #define LCD_PINS_D4                         23

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

@@ -277,7 +277,7 @@
277 277
 
278 278
   #endif
279 279
 
280
-  #if ENABLED(NEWPANEL)
280
+  #if IS_NEWPANEL
281 281
     #define BTN_EN1                           31
282 282
     #define BTN_EN2                           33
283 283
     #define BTN_ENC                           35

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

@@ -96,7 +96,7 @@
96 96
 //
97 97
 // LCD / Controller
98 98
 //
99
-#if BOTH(ULTRA_LCD, NEWPANEL)
99
+#if IS_ULTRA_LCD && IS_NEWPANEL
100 100
   #undef BEEPER_PIN
101 101
 
102 102
   #undef LCD_PINS_RS

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

@@ -113,7 +113,7 @@
113 113
   #define LCD_CONTRAST_MAX                   100
114 114
   #define DEFAULT_LCD_CONTRAST                30
115 115
 
116
-  #if ENABLED(NEWPANEL)
116
+  #if IS_NEWPANEL
117 117
     #define BTN_EN1                           17
118 118
     #define BTN_EN2                           16
119 119
     #define BTN_ENC                           23

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

@@ -91,7 +91,7 @@
91 91
 //
92 92
 // LCD / Controller
93 93
 //
94
-#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
94
+#if IS_RRD_FG_SC
95 95
   #undef BEEPER_PIN
96 96
   #define BEEPER_PIN                          35
97 97
 

+ 10
- 9
Marlin/src/pins/ramps/pins_RAMPS.h View File

@@ -441,7 +441,7 @@
441 441
     #define LCD_PINS_ENABLE                   51  // SID (MOSI)
442 442
     #define LCD_PINS_D4                       52  // SCK (CLK) clock
443 443
 
444
-  #elif BOTH(NEWPANEL, PANEL_ONE)
444
+  #elif BOTH(IS_NEWPANEL, PANEL_ONE)
445 445
 
446 446
     #define LCD_PINS_RS                       40
447 447
     #define LCD_PINS_ENABLE                   42
@@ -462,7 +462,7 @@
462 462
       #define LCD_PINS_ENABLE                 29
463 463
       #define LCD_PINS_D4                     25
464 464
 
465
-      #if DISABLED(NEWPANEL)
465
+      #if !IS_NEWPANEL
466 466
         #define BEEPER_PIN                    37
467 467
       #endif
468 468
 
@@ -481,10 +481,10 @@
481 481
         #define LCD_PINS_DC                   25  // Set as output on init
482 482
         #define LCD_PINS_RS                   27  // Pull low for 1s to init
483 483
         // DOGM SPI LCD Support
484
+        #define DOGLCD_A0            LCD_PINS_DC
484 485
         #define DOGLCD_CS                     16
485 486
         #define DOGLCD_MOSI                   17
486 487
         #define DOGLCD_SCK                    23
487
-        #define DOGLCD_A0            LCD_PINS_DC
488 488
       #else
489 489
         #define LCD_PINS_RS                   16
490 490
         #define LCD_PINS_ENABLE               17
@@ -495,13 +495,13 @@
495 495
 
496 496
       #define LCD_PINS_D7                     29
497 497
 
498
-      #if DISABLED(NEWPANEL)
498
+      #if !IS_NEWPANEL
499 499
         #define BEEPER_PIN                    33
500 500
       #endif
501 501
 
502 502
     #endif
503 503
 
504
-    #if DISABLED(NEWPANEL)
504
+    #if !IS_NEWPANEL
505 505
       // Buttons attached to a shift register
506 506
       // Not wired yet
507 507
       //#define SHIFT_CLK                     38
@@ -515,9 +515,9 @@
515 515
   //
516 516
   // LCD Display input pins
517 517
   //
518
-  #if ENABLED(NEWPANEL)
518
+  #if IS_NEWPANEL
519 519
 
520
-    #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
520
+    #if IS_RRD_SC
521 521
 
522 522
       #define BEEPER_PIN                      37
523 523
 
@@ -685,6 +685,7 @@
685 685
     #elif ENABLED(AZSMZ_12864)
686 686
 
687 687
       // Pins only defined for RAMPS_SMART currently
688
+      #error "No pins defined for RAMPS with AZSMZ_12864."
688 689
 
689 690
     #elif IS_TFTGLCD_PANEL
690 691
 
@@ -712,11 +713,11 @@
712 713
       #endif
713 714
 
714 715
     #endif
715
-  #endif // NEWPANEL
716
+  #endif // IS_NEWPANEL
716 717
 
717 718
 #endif // HAS_WIRED_LCD
718 719
 
719
-#if ENABLED(REPRAPWORLD_KEYPAD) && DISABLED(ADC_KEYPAD)
720
+#if IS_RRW_KEYPAD && !HAS_ADC_BUTTONS
720 721
   #define SHIFT_OUT                           40
721 722
   #define SHIFT_CLK                           44
722 723
   #define SHIFT_LD                            42

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

@@ -73,7 +73,7 @@
73 73
 #undef E0_CS_PIN
74 74
 #undef E1_CS_PIN
75 75
 
76
-#if ENABLED(ULTRA_LCD) && NONE(REPRAPWORLD_GRAPHICAL_LCD, CR10_STOCKDISPLAY) && !BOTH(NEWPANEL, PANEL_ONE)
76
+#if IS_ULTRA_LCD && NONE(REPRAPWORLD_GRAPHICAL_LCD, CR10_STOCKDISPLAY) && !BOTH(IS_NEWPANEL, PANEL_ONE)
77 77
   #if DISABLED(MKS_12864OLED) || ENABLED(MKS_12864OLED_SSD1306)
78 78
     #undef LCD_PINS_RS
79 79
     #define LCD_PINS_RS                       42  // 3DYMY boards pin 16 -> 42

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

@@ -124,7 +124,7 @@
124 124
   #undef SD_DETECT_PIN
125 125
   #define SD_DETECT_PIN                       22
126 126
 
127
-#elif ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
127
+#elif IS_RRD_SC
128 128
 
129 129
   #undef SD_DETECT_PIN
130 130
   #define SD_DETECT_PIN                       22

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

@@ -227,7 +227,7 @@
227 227
   #define SD_DETECT_PIN                       49
228 228
 #endif
229 229
 
230
-#if ENABLED(NEWPANEL)
230
+#if IS_NEWPANEL
231 231
   #define BTN_EN1                             11
232 232
   #define BTN_EN2                             12
233 233
   #define BTN_ENC                             43

+ 2
- 2
Marlin/src/pins/ramps/pins_TENLOG_D3_HERO.h View File

@@ -163,7 +163,7 @@
163 163
 // LCD / Controller
164 164
 //
165 165
 
166
-//#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
166
+//#if IS_RRD_SC
167 167
 
168 168
 #define LCD_PINS_RS                           -1
169 169
 #define LCD_PINS_ENABLE                       -1
@@ -182,4 +182,4 @@
182 182
 #define BEEPER_PIN                            -1
183 183
 //#endif
184 184
 
185
-//#endif // REPRAP_DISCOUNT_SMART_CONTROLLER
185
+//#endif // IS_RRD_SC

+ 2
- 2
Marlin/src/pins/ramps/pins_TRIGORILLA_14.h View File

@@ -131,13 +131,13 @@
131 131
 #if 0 && HAS_WIRED_LCD
132 132
 
133 133
   // LCD Display output pins
134
-  #if BOTH(NEWPANEL, PANEL_ONE)
134
+  #if BOTH(IS_NEWPANEL, PANEL_ONE)
135 135
     #undef LCD_PINS_D6
136 136
     #define LCD_PINS_D6                       57
137 137
   #endif
138 138
 
139 139
   // LCD Display input pins
140
-  #if ENABLED(NEWPANEL)
140
+  #if IS_NEWPANEL
141 141
     #if ANY(VIKI2, miniVIKI)
142 142
       #undef DOGLCD_A0
143 143
       #define DOGLCD_A0                       23

+ 8
- 8
Marlin/src/pins/ramps/pins_TT_OSCAR.h View File

@@ -282,7 +282,7 @@
282 282
     #define LCD_PINS_ENABLE                   51  // SID (MOSI)
283 283
     #define LCD_PINS_D4                       52  // SCK (CLK) clock
284 284
 
285
-  #elif BOTH(NEWPANEL, PANEL_ONE)
285
+  #elif BOTH(IS_NEWPANEL, PANEL_ONE)
286 286
 
287 287
     #define LCD_PINS_RS                       40
288 288
     #define LCD_PINS_ENABLE                   42
@@ -309,7 +309,7 @@
309 309
       #define LCD_PINS_ENABLE                 29
310 310
       #define LCD_PINS_D4                     25
311 311
 
312
-      #if DISABLED(NEWPANEL)
312
+      #if !IS_NEWPANEL
313 313
         #define BEEPER_PIN                    37
314 314
       #endif
315 315
 
@@ -333,13 +333,13 @@
333 333
 
334 334
       #define LCD_PINS_D7                     29
335 335
 
336
-      #if DISABLED(NEWPANEL)
336
+      #if !IS_NEWPANEL
337 337
         #define BEEPER_PIN                    33
338 338
       #endif
339 339
 
340 340
     #endif
341 341
 
342
-    #if DISABLED(NEWPANEL)
342
+    #if !IS_NEWPANEL
343 343
       // Buttons attached to a shift register
344 344
       // Not wired yet
345 345
       //#define SHIFT_CLK                     38
@@ -353,9 +353,9 @@
353 353
   //
354 354
   // LCD Display input pins
355 355
   //
356
-  #if ENABLED(NEWPANEL)
356
+  #if IS_NEWPANEL
357 357
 
358
-    #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
358
+    #if IS_RRD_SC
359 359
 
360 360
       #define BEEPER_PIN                      37
361 361
 
@@ -486,7 +486,7 @@
486 486
       #define BEEPER_PIN                      33
487 487
 
488 488
       // Buttons are directly attached to AUX-2
489
-      #if ENABLED(REPRAPWORLD_KEYPAD)
489
+      #if IS_RRW_KEYPAD
490 490
         #define SHIFT_OUT                     40
491 491
         #define SHIFT_CLK                     44
492 492
         #define SHIFT_LD                      42
@@ -510,6 +510,6 @@
510 510
 
511 511
     #endif
512 512
 
513
-  #endif // NEWPANEL
513
+  #endif // IS_NEWPANEL
514 514
 
515 515
 #endif

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

@@ -123,7 +123,7 @@
123 123
 
124 124
   #define BEEPER_PIN                          18
125 125
 
126
-  #if ENABLED(NEWPANEL)
126
+  #if IS_NEWPANEL
127 127
 
128 128
     #define LCD_PINS_RS                       20
129 129
     #define LCD_PINS_ENABLE                   17
@@ -139,7 +139,7 @@
139 139
 
140 140
     #define SD_DETECT_PIN                     38
141 141
 
142
-  #else                                           // !NEWPANEL - Old style panel with shift register
142
+  #else                                           // !IS_NEWPANEL - Old style panel with shift register
143 143
 
144 144
     // Buttons attached to a shift register
145 145
     #define SHIFT_CLK                         38
@@ -156,7 +156,7 @@
156 156
 
157 157
     #define SD_DETECT_PIN                     -1
158 158
 
159
-  #endif // !NEWPANEL
159
+  #endif // !IS_NEWPANEL
160 160
 
161 161
 #endif // HAS_WIRED_LCD
162 162
 

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

@@ -174,11 +174,11 @@
174 174
   #define LCD_PINS_D6                         32
175 175
   #define LCD_PINS_D7                         30
176 176
 
177
-#elif BOTH(BOARD_REV_1_5, ULTRA_LCD)
177
+#elif BOTH(BOARD_REV_1_5, IS_ULTRA_LCD)
178 178
 
179 179
   #define BEEPER_PIN                          18
180 180
 
181
-  #if ENABLED(NEWPANEL)
181
+  #if IS_NEWPANEL
182 182
 
183 183
     #define LCD_PINS_RS                       20
184 184
     #define LCD_PINS_ENABLE                   17
@@ -194,7 +194,7 @@
194 194
 
195 195
     #define SD_DETECT_PIN                     38
196 196
 
197
-  #else                                           // !NEWPANEL - Old style panel with shift register
197
+  #else                                           // !IS_NEWPANEL - Old style panel with shift register
198 198
 
199 199
     // Buttons attached to a shift register
200 200
     #define SHIFT_CLK                         38
@@ -209,7 +209,7 @@
209 209
     #define LCD_PINS_D6                       20
210 210
     #define LCD_PINS_D7                       19
211 211
 
212
-  #endif // !NEWPANEL
212
+  #endif // !IS_NEWPANEL
213 213
 
214 214
 #endif
215 215
 

+ 2
- 2
Marlin/src/pins/sam/pins_ALLIGATOR_R2.h View File

@@ -143,7 +143,7 @@
143 143
 //
144 144
 // LCD / Controller
145 145
 //
146
-#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
146
+#if IS_RRD_FG_SC
147 147
   #define LCD_PINS_RS                         18
148 148
   #define LCD_PINS_ENABLE                     15
149 149
   #define LCD_PINS_D4                         19
@@ -152,7 +152,7 @@
152 152
   #define UI_VOLTAGE_LEVEL                     1
153 153
 #endif
154 154
 
155
-#if ENABLED(NEWPANEL)
155
+#if IS_NEWPANEL
156 156
   #define BTN_EN1                             14
157 157
   #define BTN_EN2                             16
158 158
   #define BTN_ENC                             17

+ 2
- 2
Marlin/src/pins/sam/pins_ARCHIM1.h View File

@@ -192,10 +192,10 @@
192 192
 
193 193
   #define SD_DETECT_PIN                        2  // D2  PB25_TIOA0
194 194
 
195
-  #if ENABLED(NEWPANEL)
195
+  #if IS_NEWPANEL
196 196
     // Buttons on AUX-2
197 197
     #define BTN_EN1                           60  // D60 PA3_TIOB1
198 198
     #define BTN_EN2                           13  // D13 PB27_TIOB0
199 199
     #define BTN_ENC                           16  // D16 PA13_TXD1
200
-  #endif // NEWPANEL
200
+  #endif // IS_NEWPANEL
201 201
 #endif // HAS_WIRED_LCD

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

@@ -247,11 +247,11 @@
247 247
   #define LCD_PINS_D7                         34  // D34 PC2_PWML0
248 248
 
249 249
   #define SD_DETECT_PIN                        2  // D2  PB25_TIOA0
250
+#endif
250 251
 
251
-  #if ANY(ULTIPANEL, TOUCH_UI_ULTIPANEL, TOUCH_UI_FTDI_EVE)
252
-    // Buttons on AUX-2
253
-    #define BTN_EN1                           60  // D60 PA3_TIOB1
254
-    #define BTN_EN2                           13  // D13 PB27_TIOB0
255
-    #define BTN_ENC                           16  // D16 PA13_TXD1 // the click
256
-  #endif
252
+#if ANY(IS_ULTIPANEL, TOUCH_UI_ULTIPANEL, TOUCH_UI_FTDI_EVE)
253
+  // Buttons on AUX-2
254
+  #define BTN_EN1                             60  // D60 PA3_TIOB1
255
+  #define BTN_EN2                             13  // D13 PB27_TIOB0
256
+  #define BTN_ENC                             16  // D16 PA13_TXD1 // the click
257 257
 #endif

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

@@ -122,7 +122,7 @@
122 122
   #define LCD_PINS_D6                         46
123 123
   #define LCD_PINS_D7                         47
124 124
 
125
-  #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
125
+  #if IS_RRD_SC
126 126
 
127 127
     #define BEEPER_PIN                        41
128 128
 

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

@@ -114,7 +114,7 @@
114 114
   #define LCD_PINS_D6                         46
115 115
   #define LCD_PINS_D7                         47
116 116
 
117
-  #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
117
+  #if IS_RRD_SC
118 118
 
119 119
     #define BEEPER_PIN                        41
120 120
 

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

@@ -248,7 +248,7 @@
248 248
     #define SDSS                              10
249 249
     #define SD_DETECT_PIN                     14
250 250
 
251
-  #elif ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
251
+  #elif IS_RRD_FG_SC
252 252
 
253 253
     // The REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER requires
254 254
     // an adapter such as https://www.thingiverse.com/thing:1740725

+ 4
- 4
Marlin/src/pins/sam/pins_RAMPS_DUO.h View File

@@ -78,7 +78,7 @@
78 78
 //
79 79
 #if HAS_WIRED_LCD
80 80
 
81
-  #if BOTH(NEWPANEL, PANEL_ONE)
81
+  #if BOTH(IS_NEWPANEL, PANEL_ONE)
82 82
     #undef LCD_PINS_D4
83 83
     #define LCD_PINS_D4                       68
84 84
 
@@ -89,7 +89,7 @@
89 89
     #define LCD_PINS_D7                       67
90 90
   #endif
91 91
 
92
-  #if ENABLED(NEWPANEL)
92
+  #if IS_NEWPANEL
93 93
 
94 94
     #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
95 95
 
@@ -115,7 +115,7 @@
115 115
 
116 116
     #else
117 117
 
118
-      #if ENABLED(REPRAPWORLD_KEYPAD)
118
+      #if IS_RRW_KEYPAD
119 119
         #undef BTN_EN1
120 120
         #define BTN_EN1                       67  // encoder
121 121
 
@@ -127,6 +127,6 @@
127 127
       #endif
128 128
     #endif
129 129
 
130
-  #endif // NEWPANEL
130
+  #endif // IS_NEWPANEL
131 131
 
132 132
 #endif // HAS_WIRED_LCD

+ 2
- 2
Marlin/src/pins/sam/pins_RAMPS_FD_V1.h View File

@@ -148,7 +148,7 @@
148 148
   #define BTN_ENC                             35
149 149
   #define SD_DETECT_PIN                       49
150 150
 
151
-  #if ENABLED(NEWPANEL)
151
+  #if IS_NEWPANEL
152 152
     #define LCD_PINS_RS                       16
153 153
     #define LCD_PINS_ENABLE                   17
154 154
   #endif
@@ -178,7 +178,7 @@
178 178
       #define NEOPIXEL_PIN                    25
179 179
     #endif
180 180
 
181
-  #elif ENABLED(NEWPANEL)
181
+  #elif IS_NEWPANEL
182 182
 
183 183
     #define LCD_PINS_D4                       23
184 184
     #define LCD_PINS_D5                       25

+ 4
- 4
Marlin/src/pins/sam/pins_RURAMPS4D_11.h View File

@@ -202,7 +202,7 @@
202 202
 //
203 203
 #if HAS_WIRED_LCD
204 204
 
205
-  #if ANY(RADDS_DISPLAY, REPRAP_DISCOUNT_SMART_CONTROLLER, REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
205
+  #if ANY(RADDS_DISPLAY, IS_RRD_SC, IS_RRD_FG_SC)
206 206
     #define BEEPER_PIN                        62
207 207
     #define LCD_PINS_D4                       48
208 208
     #define LCD_PINS_D5                       50
@@ -211,12 +211,12 @@
211 211
     #define SD_DETECT_PIN                     51
212 212
   #endif
213 213
 
214
-  #if EITHER(RADDS_DISPLAY, REPRAP_DISCOUNT_SMART_CONTROLLER)
214
+  #if EITHER(RADDS_DISPLAY, IS_RRD_SC)
215 215
 
216 216
     #define LCD_PINS_RS                       63
217 217
     #define LCD_PINS_ENABLE                   64
218 218
 
219
-  #elif ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
219
+  #elif IS_RRD_FG_SC
220 220
 
221 221
     #define LCD_PINS_RS                       52
222 222
     #define LCD_PINS_ENABLE                   53
@@ -265,7 +265,7 @@
265 265
 
266 266
   #endif // SPARK_FULL_GRAPHICS
267 267
 
268
-  #if ENABLED(NEWPANEL)
268
+  #if IS_NEWPANEL
269 269
     #define BTN_EN1                           44
270 270
     #define BTN_EN2                           42
271 271
     #define BTN_ENC                           40

+ 4
- 4
Marlin/src/pins/sam/pins_RURAMPS4D_13.h View File

@@ -188,7 +188,7 @@
188 188
 //
189 189
 #if HAS_WIRED_LCD
190 190
 
191
-  #if ANY(RADDS_DISPLAY, REPRAP_DISCOUNT_SMART_CONTROLLER, REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
191
+  #if ANY(RADDS_DISPLAY, IS_RRD_SC, IS_RRD_FG_SC)
192 192
     #define BEEPER_PIN                        62
193 193
     #define LCD_PINS_D4                       48
194 194
     #define LCD_PINS_D5                       50
@@ -197,12 +197,12 @@
197 197
     #define SD_DETECT_PIN                     51
198 198
   #endif
199 199
 
200
-  #if EITHER(RADDS_DISPLAY, REPRAP_DISCOUNT_SMART_CONTROLLER)
200
+  #if EITHER(RADDS_DISPLAY, IS_RRD_SC)
201 201
 
202 202
     #define LCD_PINS_RS                       63
203 203
     #define LCD_PINS_ENABLE                   64
204 204
 
205
-  #elif ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
205
+  #elif IS_RRD_FG_SC
206 206
 
207 207
     #define LCD_PINS_RS                       52
208 208
     #define LCD_PINS_ENABLE                   53
@@ -247,7 +247,7 @@
247 247
 
248 248
   #endif
249 249
 
250
-  #if ENABLED(NEWPANEL)
250
+  #if IS_NEWPANEL
251 251
     #define BTN_EN1                           44
252 252
     #define BTN_EN2                           42
253 253
     #define BTN_ENC                           40

+ 8
- 8
Marlin/src/pins/samd/pins_RAMPS_144.h View File

@@ -299,7 +299,7 @@
299 299
     //#define LCD_PINS_ENABLE                 51  // SID (MOSI)
300 300
     //#define LCD_PINS_D4                     52  // SCK (CLK) clock
301 301
 
302
-  #elif BOTH(NEWPANEL, PANEL_ONE)
302
+  #elif BOTH(IS_NEWPANEL, PANEL_ONE)
303 303
 
304 304
     // TO TEST
305 305
     //#define LCD_PINS_RS                     40
@@ -318,7 +318,7 @@
318 318
       //#define LCD_PINS_ENABLE               29
319 319
       //#define LCD_PINS_D4                   25
320 320
 
321
-      #if DISABLED(NEWPANEL)
321
+      #if !IS_NEWPANEL
322 322
         // TO TEST
323 323
         //#define BEEPER_PIN                  37
324 324
       #endif
@@ -354,13 +354,13 @@
354 354
 
355 355
       #define LCD_PINS_D7                     29
356 356
 
357
-      #if DISABLED(NEWPANEL)
357
+      #if !IS_NEWPANEL
358 358
         #define BEEPER_PIN                    33
359 359
       #endif
360 360
 
361 361
     #endif
362 362
 
363
-    #if DISABLED(NEWPANEL)
363
+    #if !IS_NEWPANEL
364 364
       // Buttons attached to a shift register
365 365
       // Not wired yet
366 366
       //#define SHIFT_CLK                     38
@@ -374,9 +374,9 @@
374 374
   //
375 375
   // LCD Display input pins
376 376
   //
377
-  #if ENABLED(NEWPANEL)
377
+  #if IS_NEWPANEL
378 378
 
379
-    #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
379
+    #if IS_RRD_SC
380 380
 
381 381
       #define BEEPER_PIN                      37
382 382
 
@@ -565,7 +565,7 @@
565 565
       //#define BEEPER_PIN                    33
566 566
 
567 567
       // Buttons are directly attached to AUX-2
568
-      #if ENABLED(REPRAPWORLD_KEYPAD)
568
+      #if IS_RRW_KEYPAD
569 569
         // TO TEST
570 570
         //#define SHIFT_OUT                   40
571 571
         //#define SHIFT_CLK                   44
@@ -592,7 +592,7 @@
592 592
       #endif
593 593
 
594 594
     #endif
595
-  #endif // NEWPANEL
595
+  #endif // IS_NEWPANEL
596 596
 
597 597
 #endif // HAS_WIRED_LCD
598 598
 

+ 2
- 2
Marlin/src/pins/sanguino/pins_ANET_10.h View File

@@ -151,7 +151,7 @@
151 151
 
152 152
 #if HAS_WIRED_LCD
153 153
   #define LCD_SDSS                            28
154
-  #if ENABLED(ADC_KEYPAD)
154
+  #if HAS_ADC_BUTTONS
155 155
     #define SERVO0_PIN                        27  // free for BLTouch/3D-Touch
156 156
     #define LCD_PINS_RS                       28
157 157
     #define LCD_PINS_ENABLE                   29
@@ -160,7 +160,7 @@
160 160
     #define LCD_PINS_D6                       16
161 161
     #define LCD_PINS_D7                       17
162 162
     #define ADC_KEYPAD_PIN                     1
163
-  #elif ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
163
+  #elif IS_RRD_FG_SC
164 164
     // Pin definitions for the Anet A6 Full Graphics display and the RepRapDiscount Full Graphics
165 165
     // display using an adapter board  // https://go.aisler.net/benlye/anet-lcd-adapter/pcb
166 166
     // See below for alternative pin definitions for use with https://www.thingiverse.com/thing:2103748

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

@@ -136,7 +136,7 @@
136 136
   #define LCD_BACKLIGHT_PIN                   17  // LCD backlight LED
137 137
 #endif
138 138
 
139
-#if NONE(SPINDLE_FEATURE, LASER_FEATURE) && ENABLED(SANGUINOLOLU_V_1_2) && !BOTH(ULTRA_LCD, NEWPANEL)// try to use IO Header
139
+#if NONE(SPINDLE_FEATURE, LASER_FEATURE) && ENABLED(SANGUINOLOLU_V_1_2) && !BOTH(IS_ULTRA_LCD, IS_NEWPANEL) // try to use IO Header
140 140
   #define CASE_LIGHT_PIN                       4  // Hardware PWM  - see if IO Header is available
141 141
 #endif
142 142
 
@@ -185,7 +185,7 @@
185 185
         // with M42 instead of BEEPER_PIN.
186 186
         #define BEEPER_PIN                    27
187 187
 
188
-        #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
188
+        #if IS_RRD_FG_SC
189 189
           #ifndef BOARD_ST7920_DELAY_1
190 190
             #define BOARD_ST7920_DELAY_1 DELAY_NS(0)
191 191
           #endif
@@ -283,7 +283,7 @@
283 283
 
284 284
   #endif
285 285
 
286
-  #if ENABLED(NEWPANEL) && !defined(BTN_EN1)
286
+  #if IS_NEWPANEL && !defined(BTN_EN1)
287 287
     #define BTN_EN1                           11
288 288
     #define BTN_EN2                           10
289 289
   #endif
@@ -294,7 +294,7 @@
294 294
 // M3/M4/M5 - Spindle/Laser Control
295 295
 //
296 296
 #if HAS_CUTTER
297
-  #if !MB(AZTEEG_X1) && ENABLED(SANGUINOLOLU_V_1_2) && !BOTH(ULTRA_LCD, NEWPANEL)// try to use IO Header
297
+  #if !MB(AZTEEG_X1) && ENABLED(SANGUINOLOLU_V_1_2) && !BOTH(IS_ULTRA_LCD, IS_NEWPANEL) // try to use IO Header
298 298
 
299 299
     #define SPINDLE_LASER_ENA_PIN             10  // Pullup or pulldown!
300 300
     #define SPINDLE_LASER_PWM_PIN              4  // Hardware PWM

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

@@ -225,7 +225,7 @@
225 225
 //
226 226
 // All the above are also RRDSC with rotary encoder
227 227
 //
228
-#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
228
+#if IS_RRD_SC
229 229
   #define BTN_EN1                              2
230 230
   #define BTN_EN2                             12
231 231
   #define BTN_ENC                             29

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

@@ -175,7 +175,7 @@
175 175
     #else                                         // !FYSETC_MINI_12864
176 176
 
177 177
       #define LCD_PINS_D4                   PC13
178
-      #if ENABLED(ULTIPANEL)
178
+      #if IS_ULTIPANEL
179 179
         #define LCD_PINS_D5                 PB7
180 180
         #define LCD_PINS_D6                 PC15
181 181
         #define LCD_PINS_D7                 PC14

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

@@ -126,7 +126,7 @@
126 126
     #define LCD_PINS_RS                     PD1   // 49  // CS chip select /SS chip slave select
127 127
     #define LCD_PINS_ENABLE                 PD3   // 51  // SID (MOSI)
128 128
     #define LCD_PINS_D4                     PD4   // 52  // SCK (CLK) clock
129
-  #elif BOTH(NEWPANEL, PANEL_ONE)
129
+  #elif BOTH(IS_NEWPANEL, PANEL_ONE)
130 130
     #define LCD_PINS_RS                     PB8
131 131
     #define LCD_PINS_ENABLE                 PD2
132 132
     #define LCD_PINS_D4                     PB12
@@ -140,7 +140,7 @@
140 140
     #define LCD_PINS_D5                     PB13
141 141
     #define LCD_PINS_D6                     PB14
142 142
     #define LCD_PINS_D7                     PB15
143
-    #if DISABLED(NEWPANEL)
143
+    #if !IS_NEWPANEL
144 144
       #define BEEPER_PIN                    PC1   // 33
145 145
       // Buttons attached to a shift register
146 146
       // Not wired yet
@@ -151,9 +151,9 @@
151 151
     #endif
152 152
   #endif
153 153
 
154
-  #if ENABLED(NEWPANEL)
154
+  #if IS_NEWPANEL
155 155
 
156
-    #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
156
+    #if IS_RRD_SC
157 157
 
158 158
       #define BEEPER_PIN                    PC5
159 159
 
@@ -254,7 +254,7 @@
254 254
       #define BEEPER_PIN                    PC1   // 33
255 255
 
256 256
       // Buttons directly attached to AUX-2
257
-      #if ENABLED(REPRAPWORLD_KEYPAD)
257
+      #if IS_RRW_KEYPAD
258 258
         #define BTN_EN1                     PE0   // 64
259 259
         #define BTN_EN2                     PD11  // 59
260 260
         #define BTN_ENC                     PD15  // 63
@@ -279,6 +279,6 @@
279 279
       #endif
280 280
 
281 281
     #endif
282
-  #endif // NEWPANEL
282
+  #endif // IS_NEWPANEL
283 283
 
284 284
 #endif // HAS_WIRED_LCD

+ 0
- 3
Marlin/src/pins/stm32f1/pins_CHITU3D_V5.h View File

@@ -152,9 +152,6 @@
152 152
   // Color UI
153 153
   #define TFT_DRIVER                     ILI9488
154 154
   #define TFT_BUFFER_SIZE                  14400
155
-#elif ENABLED(TFT_CLASSIC_UI)
156
-  // Emulated DOGM
157
-  #define GRAPHICAL_TFT_UPSCALE                3
158 155
 #endif
159 156
 
160 157
 // XPT2046 Touch Screen calibration

+ 0
- 3
Marlin/src/pins/stm32f1/pins_CHITU3D_V6.h View File

@@ -167,9 +167,6 @@
167 167
   // Color UI
168 168
   #define TFT_DRIVER                     ILI9488
169 169
   #define TFT_BUFFER_SIZE                  14400
170
-#elif ENABLED(TFT_CLASSIC_UI)
171
-  // Emulated DOGM
172
-  #define GRAPHICAL_TFT_UPSCALE                3
173 170
 #endif
174 171
 
175 172
 // XPT2046 Touch Screen calibration

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

@@ -162,7 +162,7 @@
162 162
   // not connected to a pin
163 163
   #define SD_DETECT_PIN                     PC3
164 164
 
165
-  #if ENABLED(NEWPANEL)
165
+  #if IS_NEWPANEL
166 166
     // The encoder and click button
167 167
     #define BTN_EN1                         PC10
168 168
     #define BTN_EN2                         PC11

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

@@ -153,7 +153,7 @@
153 153
 
154 154
   //#define LCD_CONTRAST_INIT                190
155 155
 
156
-  #if ENABLED(NEWPANEL)
156
+  #if IS_NEWPANEL
157 157
     #define BTN_EN1                         PC10
158 158
     #define BTN_EN2                         PC11
159 159
     #define BTN_ENC                         PC12

+ 2
- 2
Marlin/src/pins/stm32f1/pins_GTM32_MINI.h View File

@@ -137,7 +137,7 @@
137 137
 //
138 138
 #if HAS_WIRED_LCD
139 139
 
140
-  #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
140
+  #if IS_RRD_SC
141 141
     //
142 142
     // LCD display on J2 FFC40
143 143
     // Geeetech's LCD2004A Control Panel is very much like
@@ -172,7 +172,7 @@
172 172
 
173 173
 #endif // HAS_WIRED_LCD
174 174
 
175
-#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
175
+#if IS_RRD_SC
176 176
   //
177 177
   // Geeetech's LCD2004A Control Panel is very much like
178 178
   // RepRapDiscount Smart Controller, but adds an FFC40 connector

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

@@ -137,7 +137,7 @@
137 137
 //
138 138
 #if HAS_WIRED_LCD
139 139
 
140
-  #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
140
+  #if IS_RRD_SC
141 141
     //
142 142
     // LCD display on J2 FFC40
143 143
     // Geeetech's LCD2004A Control Panel is very much like

+ 2
- 2
Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h View File

@@ -137,7 +137,7 @@
137 137
 //
138 138
 #if HAS_WIRED_LCD
139 139
 
140
-  #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
140
+  #if IS_RRD_SC
141 141
     //
142 142
     // LCD display on J2 FFC40
143 143
     // Geeetech's LCD2004A Control Panel is very much like
@@ -172,7 +172,7 @@
172 172
 
173 173
 #endif // HAS_WIRED_LCD
174 174
 
175
-#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
175
+#if IS_RRD_SC
176 176
   //
177 177
   // Geeetech's LCD2004A Control Panel is very much like
178 178
   // RepRapDiscount Smart Controller, but adds an FFC40 connector

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

@@ -137,7 +137,7 @@
137 137
 //
138 138
 #if HAS_WIRED_LCD
139 139
 
140
- #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
140
+ #if IS_RRD_SC
141 141
 
142 142
     //
143 143
     // LCD display on J2 FFC40

+ 7
- 6
Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h View File

@@ -126,6 +126,11 @@
126 126
 #endif
127 127
 #define LED_PIN                             PB2
128 128
 
129
+#if HAS_FSMC_TFT || HAS_GRAPHICAL_TFT
130
+  #define TFT_CS_PIN                        PG12  // NE4
131
+  #define TFT_RS_PIN                        PF0   // A0
132
+#endif
133
+
129 134
 #if HAS_FSMC_TFT
130 135
   /**
131 136
    * Note: MKS Robin TFT screens use various TFT controllers
@@ -141,10 +146,8 @@
141 146
    */
142 147
   //#define LCD_RESET_PIN                   PF6
143 148
   #define LCD_BACKLIGHT_PIN                 PG11
144
-  #define FSMC_CS_PIN                       PG12  // NE4
145
-  #define FSMC_RS_PIN                       PF0   // A0
146
-  #define TFT_CS_PIN                 FSMC_CS_PIN
147
-  #define TFT_RS_PIN                 FSMC_RS_PIN
149
+  #define FSMC_CS_PIN                 TFT_CS_PIN
150
+  #define FSMC_RS_PIN                 TFT_RS_PIN
148 151
 
149 152
   #define LCD_USE_DMA_FSMC                        // Use DMA transfers to send data to the TFT
150 153
   #define FSMC_DMA_DEV                      DMA2
@@ -152,8 +155,6 @@
152 155
 #elif HAS_GRAPHICAL_TFT
153 156
   #define TFT_RESET_PIN                     PF6
154 157
   #define TFT_BACKLIGHT_PIN                 PG11
155
-  #define TFT_CS_PIN                        PG12  // NE4
156
-  #define TFT_RS_PIN                        PF0   // A0
157 158
 #endif
158 159
 
159 160
 #if NEED_TOUCH_PINS

+ 5
- 14
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h View File

@@ -269,22 +269,13 @@
269 269
 
270 270
 #endif
271 271
 
272
-#if ENABLED(SPI_GRAPHICAL_TFT)
272
+#if HAS_SPI_GRAPHICAL_TFT
273 273
   // Emulated DOGM SPI
274
-  #ifndef GRAPHICAL_TFT_UPSCALE
275
-    #define GRAPHICAL_TFT_UPSCALE              3
276
-  #endif
277
-  #ifndef TFT_PIXEL_OFFSET_Y
278
-    #define TFT_PIXEL_OFFSET_Y                32
279
-  #endif
280
-
274
+  #define LCD_PINS_ENABLE                   PD13
275
+  #define LCD_PINS_RS                       PC6
281 276
   #define BTN_ENC                           PE13
282 277
   #define BTN_EN1                           PE8
283 278
   #define BTN_EN2                           PE11
284
-
285
-  #define LCD_PINS_ENABLE                   PD13
286
-  #define LCD_PINS_RS                       PC6
287
-
288 279
 #elif ENABLED(TFT_480x320_SPI)
289 280
   #define TFT_DRIVER                      ST7796
290 281
   #define TFT_BUFFER_SIZE                  14400
@@ -304,7 +295,7 @@
304 295
   #ifndef XPT2046_Y_OFFSET
305 296
     #define XPT2046_Y_OFFSET                 -24
306 297
   #endif
307
-#elif ENABLED(SPI_GRAPHICAL_TFT)
298
+#elif HAS_SPI_GRAPHICAL_TFT
308 299
   #ifndef XPT2046_X_CALIBRATION
309 300
     #define XPT2046_X_CALIBRATION         -11386
310 301
   #endif
@@ -342,7 +333,7 @@
342 333
   #else                                           // !MKS_MINI_12864
343 334
 
344 335
     #define LCD_PINS_D4                     PE14
345
-    #if ENABLED(ULTIPANEL)
336
+    #if IS_ULTIPANEL
346 337
       #define LCD_PINS_D5                   PE15
347 338
       #define LCD_PINS_D6                   PD11
348 339
       #define LCD_PINS_D7                   PD10

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

@@ -154,7 +154,7 @@
154 154
   #else
155 155
 
156 156
     #define LCD_PINS_D4                     PA6
157
-    #if ENABLED(ULTIPANEL)
157
+    #if IS_ULTIPANEL
158 158
       #define LCD_PINS_D5                   PA7
159 159
       #define LCD_PINS_D6                   PC4
160 160
       #define LCD_PINS_D7                   PC5

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

@@ -103,7 +103,7 @@
103 103
   #else                                           // !MKS_MINI_12864
104 104
 
105 105
     #define LCD_PINS_D4                     PC1
106
-    #if ENABLED(ULTIPANEL)
106
+    #if IS_ULTIPANEL
107 107
       #define LCD_PINS_D5                   -1
108 108
       #define LCD_PINS_D6                   -1
109 109
       #define LCD_PINS_D7                   -1

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

@@ -124,7 +124,7 @@
124 124
   #else                                           // !MKS_MINI_12864
125 125
 
126 126
     #define LCD_PINS_D4                     PA6
127
-    #if ENABLED(ULTIPANEL)
127
+    #if IS_ULTIPANEL
128 128
       #define LCD_PINS_D5                   PA7
129 129
       #define LCD_PINS_D6                   PC4
130 130
       #define LCD_PINS_D7                   PC5

+ 20
- 37
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h View File

@@ -139,23 +139,7 @@
139 139
  * If the screen stays white, disable 'LCD_RESET_PIN'
140 140
  * to let the bootloader init the screen.
141 141
  */
142
-#if ENABLED(TOUCH_SCREEN)
143
-  #ifndef XPT2046_X_CALIBRATION
144
-    #define XPT2046_X_CALIBRATION          12033
145
-  #endif
146
-  #ifndef XPT2046_Y_CALIBRATION
147
-    #define XPT2046_Y_CALIBRATION          -9047
148
-  #endif
149
-  #ifndef XPT2046_X_OFFSET
150
-    #define XPT2046_X_OFFSET                 -30
151
-  #endif
152
-  #ifndef XPT2046_Y_OFFSET
153
-    #define XPT2046_Y_OFFSET                 254
154
-  #endif
155
-#endif
156
-
157
-#if ENABLED(FSMC_GRAPHICAL_TFT)
158
-
142
+#if EITHER(HAS_FSMC_GRAPHICAL_TFT, TFT_320x240)
159 143
   #define FSMC_CS_PIN                       PD7   // NE4
160 144
   #define FSMC_RS_PIN                       PD11  // A0
161 145
 
@@ -165,39 +149,38 @@
165 149
 
166 150
   #define LCD_RESET_PIN                     PC6   // FSMC_RST
167 151
   #define LCD_BACKLIGHT_PIN                 PD13
152
+#endif
168 153
 
169
-  #if NEED_TOUCH_PINS
170
-    #define TOUCH_CS_PIN                    PC2   // SPI2_NSS
171
-    #define TOUCH_SCK_PIN                   PB13  // SPI2_SCK
172
-    #define TOUCH_MISO_PIN                  PB14  // SPI2_MISO
173
-    #define TOUCH_MOSI_PIN                  PB15  // SPI2_MOSI
174
-  #endif
175
-
176
-#elif ENABLED(TFT_320x240)                        //TFT32/28
177
-
178
-  #define TFT_RESET_PIN                     PC6
179
-  #define TFT_BACKLIGHT_PIN                 PD13
180
-
181
-  #define LCD_USE_DMA_FSMC                        // Use DMA transfers to send data to the TFT
182
-  #define FSMC_CS_PIN                       PD7
183
-  #define FSMC_RS_PIN                       PD11
184
-  #define FSMC_DMA_DEV                      DMA2
185
-  #define FSMC_DMA_CHANNEL               DMA_CH5
186
-
154
+#if BOTH(NEED_TOUCH_PINS, HAS_FSMC_GRAPHICAL_TFT) || ENABLED(TFT_320x240)
187 155
   #define TOUCH_CS_PIN                      PC2   // SPI2_NSS
188 156
   #define TOUCH_SCK_PIN                     PB13  // SPI2_SCK
189 157
   #define TOUCH_MISO_PIN                    PB14  // SPI2_MISO
190 158
   #define TOUCH_MOSI_PIN                    PB15  // SPI2_MOSI
159
+#endif
191 160
 
161
+#if ENABLED(TFT_320x240)                          // TFT32/28
192 162
   #define TFT_DRIVER                     ILI9341
193 163
   #define TFT_BUFFER_SIZE                  14400
194
-
164
+  #define ILI9341_COLOR_RGB
195 165
   // YV for normal screen mounting
196 166
   #define ILI9341_ORIENTATION  ILI9341_MADCTL_MY | ILI9341_MADCTL_MV
197 167
   // XV for 180° rotated screen mounting
198 168
   //#define ILI9341_ORIENTATION  ILI9341_MADCTL_MX | ILI9341_MADCTL_MV
169
+#endif
199 170
 
200
-  #define ILI9341_COLOR_RGB
171
+#if ENABLED(TOUCH_SCREEN)
172
+  #ifndef XPT2046_X_CALIBRATION
173
+    #define XPT2046_X_CALIBRATION          12033
174
+  #endif
175
+  #ifndef XPT2046_Y_CALIBRATION
176
+    #define XPT2046_Y_CALIBRATION          -9047
177
+  #endif
178
+  #ifndef XPT2046_X_OFFSET
179
+    #define XPT2046_X_OFFSET                 -30
180
+  #endif
181
+  #ifndef XPT2046_Y_OFFSET
182
+    #define XPT2046_Y_OFFSET                 254
183
+  #endif
201 184
 #endif
202 185
 
203 186
 #define HAS_SPI_FLASH                          1

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

@@ -198,7 +198,7 @@
198 198
 #endif
199 199
 
200 200
 // XPT2046 Touch Screen calibration
201
-#if EITHER(TFT_LVGL_UI_FSMC, TFT_480x320)
201
+#if EITHER(HAS_TFT_LVGL_UI_FSMC, TFT_480x320)
202 202
   #ifndef XPT2046_X_CALIBRATION
203 203
     #define XPT2046_X_CALIBRATION          17880
204 204
   #endif

+ 3
- 12
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h View File

@@ -275,20 +275,11 @@
275 275
 
276 276
 #if ENABLED(TFT_CLASSIC_UI)
277 277
   // Emulated DOGM SPI
278
-  #ifndef GRAPHICAL_TFT_UPSCALE
279
-    #define GRAPHICAL_TFT_UPSCALE              3
280
-  #endif
281
-  #ifndef TFT_PIXEL_OFFSET_Y
282
-    #define TFT_PIXEL_OFFSET_Y                32
283
-  #endif
284
-
278
+  #define LCD_PINS_ENABLE                   PD13
279
+  #define LCD_PINS_RS                       PC6
285 280
   #define BTN_ENC                           PE13
286 281
   #define BTN_EN1                           PE8
287 282
   #define BTN_EN2                           PE11
288
-
289
-  #define LCD_PINS_ENABLE                   PD13
290
-  #define LCD_PINS_RS                       PC6
291
-
292 283
 #elif ENABLED(TFT_COLOR_UI)
293 284
   #define TFT_BUFFER_SIZE                  14400
294 285
 #endif
@@ -354,7 +345,7 @@
354 345
   #else                                           // !MKS_MINI_12864
355 346
 
356 347
     #define LCD_PINS_D4                     PE14
357
-    #if ENABLED(ULTIPANEL)
348
+    #if IS_ULTIPANEL
358 349
       #define LCD_PINS_D5                   PE15
359 350
       #define LCD_PINS_D6                   PD11
360 351
       #define LCD_PINS_D7                   PD10

+ 2
- 2
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h View File

@@ -210,7 +210,7 @@
210 210
  * If the screen stays white, disable 'LCD_RESET_PIN'
211 211
  * to let the bootloader init the screen.
212 212
  */
213
-#if ENABLED(FSMC_GRAPHICAL_TFT)
213
+#if HAS_FSMC_GRAPHICAL_TFT
214 214
   #define FSMC_CS_PIN                       PD7   // NE4
215 215
   #define FSMC_RS_PIN                       PD11  // A0
216 216
 
@@ -254,7 +254,7 @@
254 254
   #else                                           // !MKS_MINI_12864 && !ENDER2_STOCKDISPLAY
255 255
 
256 256
     #define LCD_PINS_D4                     PF14
257
-    #if ENABLED(ULTIPANEL)
257
+    #if IS_ULTIPANEL
258 258
       #define LCD_PINS_D5                   PF15
259 259
       #define LCD_PINS_D6                   PF12
260 260
       #define LCD_PINS_D7                   PF13

+ 0
- 0
Marlin/src/pins/stm32f1/pins_STM32F1R.h View File


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save