Browse Source

✨ WYH L12864 LCD (Alfawise Ex8) (#22863)

VragVideo 2 years ago
parent
commit
9bb562f40a
No account linked to committer's email address
56 changed files with 180 additions and 100 deletions
  1. 5
    0
      Marlin/Configuration.h
  2. 1
    1
      Marlin/Configuration_adv.h
  3. 2
    2
      Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_st7920_sw_spi.cpp
  4. 2
    2
      Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_sw_spi.cpp
  5. 2
    2
      Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_st7920_sw_spi.cpp
  6. 2
    2
      Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_sw_spi.cpp
  7. 2
    2
      Marlin/src/HAL/NATIVE_SIM/u8g/u8g_com_st7920_sw_spi.cpp
  8. 2
    2
      Marlin/src/HAL/NATIVE_SIM/u8g/u8g_com_sw_spi.cpp
  9. 41
    38
      Marlin/src/inc/Conditionals_LCD.h
  10. 2
    0
      Marlin/src/inc/Conditionals_post.h
  11. 2
    1
      Marlin/src/inc/SanityCheck.h
  12. 3
    3
      Marlin/src/lcd/dogm/marlinui_DOGM.h
  13. 4
    1
      Marlin/src/lcd/dogm/u8g_dev_st7565_64128n_HAL.cpp
  14. 2
    2
      Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp
  15. 34
    1
      Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h
  16. 1
    1
      Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h
  17. 1
    1
      Marlin/src/pins/mega/pins_SILVER_GATE.h
  18. 1
    1
      Marlin/src/pins/pins.h
  19. 1
    1
      Marlin/src/pins/pins_postprocess.h
  20. 1
    1
      Marlin/src/pins/rambo/pins_EINSY_RAMBO.h
  21. 1
    1
      Marlin/src/pins/rambo/pins_EINSY_RETRO.h
  22. 1
    1
      Marlin/src/pins/rambo/pins_MINIRAMBO.h
  23. 1
    1
      Marlin/src/pins/rambo/pins_RAMBO.h
  24. 1
    1
      Marlin/src/pins/ramps/pins_3DRAG.h
  25. 1
    1
      Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h
  26. 1
    1
      Marlin/src/pins/ramps/pins_DAGOMA_F5.h
  27. 1
    1
      Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h
  28. 1
    1
      Marlin/src/pins/sanguino/pins_MELZI.h
  29. 1
    1
      Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h
  30. 1
    1
      Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h
  31. 1
    1
      Marlin/src/pins/sanguino/pins_MELZI_V2.h
  32. 1
    1
      Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h
  33. 1
    1
      Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h
  34. 1
    1
      Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h
  35. 1
    1
      Marlin/src/pins/stm32f1/pins_FLY_MINI.h
  36. 1
    1
      Marlin/src/pins/stm32f1/pins_GTM32_MINI.h
  37. 1
    1
      Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h
  38. 1
    1
      Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h
  39. 1
    1
      Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h
  40. 1
    1
      Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h
  41. 1
    1
      Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h
  42. 1
    1
      Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h
  43. 1
    1
      Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h
  44. 1
    1
      Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h
  45. 1
    1
      Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h
  46. 1
    1
      Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h
  47. 1
    1
      Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h
  48. 1
    1
      Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h
  49. 1
    1
      Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h
  50. 34
    1
      Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h
  51. 1
    1
      Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h
  52. 1
    1
      Marlin/src/pins/stm32f4/pins_FLYF407ZG.h
  53. 1
    1
      Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h
  54. 1
    1
      Marlin/src/pins/stm32f4/pins_FYSETC_S6.h
  55. 1
    1
      Marlin/src/pins/stm32f4/pins_RUMBA32_common.h
  56. 1
    1
      Marlin/src/pins/stm32f4/pins_VAKE403D.h

+ 5
- 0
Marlin/Configuration.h View File

2377
 //#define miniVIKI
2377
 //#define miniVIKI
2378
 
2378
 
2379
 //
2379
 //
2380
+// Alfawise Ex8 printer LCD marked as WYH L12864 COG
2381
+//
2382
+//#define WYH_L12864
2383
+
2384
+//
2380
 // MakerLab Mini Panel with graphic
2385
 // MakerLab Mini Panel with graphic
2381
 // controller and SD support - https://reprap.org/wiki/Mini_panel
2386
 // controller and SD support - https://reprap.org/wiki/Mini_panel
2382
 //
2387
 //

+ 1
- 1
Marlin/Configuration_adv.h View File

1603
    * Set STATUS_EXPIRE_SECONDS to zero to never clear the status.
1603
    * Set STATUS_EXPIRE_SECONDS to zero to never clear the status.
1604
    * This will prevent position updates from being displayed.
1604
    * This will prevent position updates from being displayed.
1605
    */
1605
    */
1606
-  #if ENABLED(U8GLIB_ST7920)
1606
+  #if IS_U8GLIB_ST7920
1607
     // Enable this option and reduce the value to optimize screen updates.
1607
     // Enable this option and reduce the value to optimize screen updates.
1608
     // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
1608
     // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
1609
     //#define DOGM_SPI_DELAY_US 5
1609
     //#define DOGM_SPI_DELAY_US 5

+ 2
- 2
Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_st7920_sw_spi.cpp View File

57
 
57
 
58
 #include "../../../inc/MarlinConfigPre.h"
58
 #include "../../../inc/MarlinConfigPre.h"
59
 
59
 
60
-#if ENABLED(U8GLIB_ST7920)
60
+#if IS_U8GLIB_ST7920
61
 
61
 
62
 #include "../../../inc/MarlinConfig.h"
62
 #include "../../../inc/MarlinConfig.h"
63
 #include "../../shared/Delay.h"
63
 #include "../../shared/Delay.h"
182
   }
182
   }
183
 #endif // LIGHTWEIGHT_UI
183
 #endif // LIGHTWEIGHT_UI
184
 
184
 
185
-#endif // U8GLIB_ST7920
185
+#endif // IS_U8GLIB_ST7920
186
 #endif // ARDUINO_ARCH_SAM
186
 #endif // ARDUINO_ARCH_SAM

+ 2
- 2
Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_sw_spi.cpp View File

57
 
57
 
58
 #include "../../../inc/MarlinConfigPre.h"
58
 #include "../../../inc/MarlinConfigPre.h"
59
 
59
 
60
-#if HAS_MARLINUI_U8GLIB && DISABLED(U8GLIB_ST7920)
60
+#if HAS_MARLINUI_U8GLIB && !IS_U8GLIB_ST7920
61
 
61
 
62
 #include "u8g_com_HAL_DUE_sw_spi_shared.h"
62
 #include "u8g_com_HAL_DUE_sw_spi_shared.h"
63
 
63
 
141
   return 1;
141
   return 1;
142
 }
142
 }
143
 
143
 
144
-#endif // HAS_MARLINUI_U8GLIB && !U8GLIB_ST7920
144
+#endif // HAS_MARLINUI_U8GLIB && !IS_U8GLIB_ST7920
145
 #endif // ARDUINO_ARCH_SAM
145
 #endif // ARDUINO_ARCH_SAM

+ 2
- 2
Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_st7920_sw_spi.cpp View File

57
 
57
 
58
 #include "../../../inc/MarlinConfigPre.h"
58
 #include "../../../inc/MarlinConfigPre.h"
59
 
59
 
60
-#if ENABLED(U8GLIB_ST7920)
60
+#if IS_U8GLIB_ST7920
61
 
61
 
62
 #include <U8glib-HAL.h>
62
 #include <U8glib-HAL.h>
63
 #include <SoftwareSPI.h>
63
 #include <SoftwareSPI.h>
143
   return 1;
143
   return 1;
144
 }
144
 }
145
 
145
 
146
-#endif // U8GLIB_ST7920
146
+#endif // IS_U8GLIB_ST7920
147
 #endif // TARGET_LPC1768
147
 #endif // TARGET_LPC1768

+ 2
- 2
Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_sw_spi.cpp View File

57
 
57
 
58
 #include "../../../inc/MarlinConfigPre.h"
58
 #include "../../../inc/MarlinConfigPre.h"
59
 
59
 
60
-#if HAS_MARLINUI_U8GLIB && DISABLED(U8GLIB_ST7920)
60
+#if HAS_MARLINUI_U8GLIB && !IS_U8GLIB_ST7920
61
 
61
 
62
 #include <SoftwareSPI.h>
62
 #include <SoftwareSPI.h>
63
 #include "../../shared/HAL_SPI.h"
63
 #include "../../shared/HAL_SPI.h"
205
   return 1;
205
   return 1;
206
 }
206
 }
207
 
207
 
208
-#endif // HAS_MARLINUI_U8GLIB && !U8GLIB_ST7920
208
+#endif // HAS_MARLINUI_U8GLIB && !IS_U8GLIB_ST7920
209
 #endif // TARGET_LPC1768
209
 #endif // TARGET_LPC1768

+ 2
- 2
Marlin/src/HAL/NATIVE_SIM/u8g/u8g_com_st7920_sw_spi.cpp View File

57
 
57
 
58
 #include "../../../inc/MarlinConfig.h"
58
 #include "../../../inc/MarlinConfig.h"
59
 
59
 
60
-#if ENABLED(U8GLIB_ST7920)
60
+#if IS_U8GLIB_ST7920
61
 
61
 
62
 #include <U8glib-HAL.h>
62
 #include <U8glib-HAL.h>
63
 #include "../../shared/Delay.h"
63
 #include "../../shared/Delay.h"
167
   }
167
   }
168
 #endif
168
 #endif
169
 
169
 
170
-#endif // U8GLIB_ST7920
170
+#endif // IS_U8GLIB_ST7920
171
 #endif // TARGET_LPC1768
171
 #endif // TARGET_LPC1768

+ 2
- 2
Marlin/src/HAL/NATIVE_SIM/u8g/u8g_com_sw_spi.cpp View File

57
 
57
 
58
 #include "../../../inc/MarlinConfig.h"
58
 #include "../../../inc/MarlinConfig.h"
59
 
59
 
60
-#if HAS_MARLINUI_U8GLIB && DISABLED(U8GLIB_ST7920)
60
+#if HAS_MARLINUI_U8GLIB && !IS_U8GLIB_ST7920
61
 
61
 
62
 #undef SPI_SPEED
62
 #undef SPI_SPEED
63
 #define SPI_SPEED 2  // About 2 MHz
63
 #define SPI_SPEED 2  // About 2 MHz
211
 #elif !ANY(TFT_COLOR_UI, TFT_CLASSIC_UI, TFT_LVGL_UI, HAS_MARLINUI_HD44780) && HAS_MARLINUI_U8GLIB
211
 #elif !ANY(TFT_COLOR_UI, TFT_CLASSIC_UI, TFT_LVGL_UI, HAS_MARLINUI_HD44780) && HAS_MARLINUI_U8GLIB
212
   #include <U8glib-HAL.h>
212
   #include <U8glib-HAL.h>
213
   uint8_t u8g_com_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) {return 0;}
213
   uint8_t u8g_com_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) {return 0;}
214
-#endif // HAS_MARLINUI_U8GLIB && !U8GLIB_ST7920
214
+#endif // HAS_MARLINUI_U8GLIB && !IS_U8GLIB_ST7920
215
 #endif // __PLAT_NATIVE_SIM__
215
 #endif // __PLAT_NATIVE_SIM__

+ 41
- 38
Marlin/src/inc/Conditionals_LCD.h View File

39
 /**
39
 /**
40
  * General Flags that may be set below by specific LCDs
40
  * General Flags that may be set below by specific LCDs
41
  *
41
  *
42
- *  DOGLCD                : Run a Graphical LCD through U8GLib (with MarlinUI)
43
- *  IS_ULTIPANEL          : Define LCD_PINS_D5/6/7 for direct-connected "Ultipanel" LCDs
44
- *  IS_ULTRA_LCD          : Ultra LCD, not necessarily Ultipanel.
45
- *  IS_RRD_SC             : Common RRD Smart Controller digital interface pins
46
- *  IS_RRD_FG_SC          : Common RRD Full Graphical Smart Controller digital interface pins
47
- *  U8GLIB_ST7920         : Most common DOGM display SPI interface, supporting a "lightweight" display mode.
48
- *  U8GLIB_SH1106         : SH1106 OLED with I2C interface via U8GLib
49
- *  IS_U8GLIB_SSD1306     : SSD1306 OLED with I2C interface via U8GLib
50
- *  U8GLIB_SSD1309        : SSD1309 OLED with I2C interface via U8GLib
51
- *  U8GLIB_ST7565_64128N  : ST7565 128x64 LCD with SPI interface via U8GLib
52
- *  U8GLIB_LM6059_AF      : LM6059 with Hardware SPI via U8GLib
42
+ *  DOGLCD                  : Run a Graphical LCD through U8GLib (with MarlinUI)
43
+ *  IS_ULTIPANEL            : Define LCD_PINS_D5/6/7 for direct-connected "Ultipanel" LCDs
44
+ *  IS_ULTRA_LCD            : Ultra LCD, not necessarily Ultipanel.
45
+ *  IS_RRD_SC               : Common RRD Smart Controller digital interface pins
46
+ *  IS_RRD_FG_SC            : Common RRD Full Graphical Smart Controller digital interface pins
47
+ *  IS_U8GLIB_ST7920        : Most common DOGM display SPI interface, supporting a "lightweight" display mode.
48
+ *  U8GLIB_SH1106           : SH1106 OLED with I2C interface via U8GLib
49
+ *  IS_U8GLIB_SSD1306       : SSD1306 OLED with I2C interface via U8GLib (U8GLIB_SSD1306)
50
+ *  U8GLIB_SSD1309          : SSD1309 OLED with I2C interface via U8GLib (HAS_U8GLIB_I2C_OLED, IS_ULTRA_LCD, DOGLCD)
51
+ *  IS_U8GLIB_ST7565_64128N : ST7565 128x64 LCD with SPI interface via U8GLib
52
+ *  IS_U8GLIB_LM6059_AF     : LM6059 with Hardware SPI via U8GLib
53
  */
53
  */
54
 #if EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY)
54
 #if EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY)
55
 
55
 
85
 #elif ENABLED(ZONESTAR_12864LCD)
85
 #elif ENABLED(ZONESTAR_12864LCD)
86
   #define DOGLCD
86
   #define DOGLCD
87
   #define IS_RRD_SC 1
87
   #define IS_RRD_SC 1
88
-  #define U8GLIB_ST7920
88
+  #define IS_U8GLIB_ST7920 1
89
 
89
 
90
 #elif ENABLED(ZONESTAR_12864OLED)
90
 #elif ENABLED(ZONESTAR_12864OLED)
91
   #define IS_RRD_SC 1
91
   #define IS_RRD_SC 1
99
   #define IS_ULTIPANEL 1
99
   #define IS_ULTIPANEL 1
100
   #define ENCODER_PULSES_PER_STEP 2
100
   #define ENCODER_PULSES_PER_STEP 2
101
 
101
 
102
-#elif ANY(miniVIKI, VIKI2, ELB_FULL_GRAPHIC_CONTROLLER, AZSMZ_12864)
102
+#elif ANY(miniVIKI, VIKI2, WYH_L12864, ELB_FULL_GRAPHIC_CONTROLLER, AZSMZ_12864)
103
+
104
+  #define IS_DOGM_12864 1
103
 
105
 
104
   #define DOGLCD
106
   #define DOGLCD
105
   #define IS_ULTIPANEL 1
107
   #define IS_ULTIPANEL 1
106
 
108
 
107
   #if ENABLED(miniVIKI)
109
   #if ENABLED(miniVIKI)
108
-    #define U8GLIB_ST7565_64128N
110
+    #define IS_U8GLIB_ST7565_64128N 1
109
   #elif ENABLED(VIKI2)
111
   #elif ENABLED(VIKI2)
110
-    #define U8GLIB_ST7565_64128N
112
+    #define IS_U8GLIB_ST7565_64128N 1
113
+  #elif ENABLED(WYH_L12864)
114
+    #define IS_U8GLIB_ST7565_64128N 1
115
+    #define ST7565_XOFFSET 0x04
111
   #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
116
   #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
112
-    #define U8GLIB_LM6059_AF
117
+    #define IS_U8GLIB_LM6059_AF 1
113
   #elif ENABLED(AZSMZ_12864)
118
   #elif ENABLED(AZSMZ_12864)
114
-    #define U8GLIB_ST7565_64128N
119
+    #define IS_U8GLIB_ST7565_64128N 1
115
   #endif
120
   #endif
116
 
121
 
117
 #elif ENABLED(OLED_PANEL_TINYBOY2)
122
 #elif ENABLED(OLED_PANEL_TINYBOY2)
128
 #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
133
 #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
129
 
134
 
130
   #define DOGLCD
135
   #define DOGLCD
131
-  #define U8GLIB_ST7920
136
+  #define IS_U8GLIB_ST7920 1
132
   #define IS_ULTIPANEL 1
137
   #define IS_ULTIPANEL 1
133
 
138
 
134
 #elif ENABLED(MKS_12864OLED)
139
 #elif ENABLED(MKS_12864OLED)
144
 #elif ENABLED(SAV_3DGLCD)
149
 #elif ENABLED(SAV_3DGLCD)
145
 
150
 
146
   #ifdef U8GLIB_SSD1306
151
   #ifdef U8GLIB_SSD1306
147
-    #define IS_U8GLIB_SSD1306
152
+    #define IS_U8GLIB_SSD1306 // Allow for U8GLIB_SSD1306 + SAV_3DGLCD
148
   #endif
153
   #endif
149
   #define IS_NEWPANEL 1
154
   #define IS_NEWPANEL 1
150
 
155
 
266
 // ST7920-based graphical displays
271
 // ST7920-based graphical displays
267
 #if ANY(IS_RRD_FG_SC, LCD_FOR_MELZI, SILVER_GATE_GLCD_CONTROLLER)
272
 #if ANY(IS_RRD_FG_SC, LCD_FOR_MELZI, SILVER_GATE_GLCD_CONTROLLER)
268
   #define DOGLCD
273
   #define DOGLCD
269
-  #define U8GLIB_ST7920
274
+  #define IS_U8GLIB_ST7920 1
270
   #define IS_RRD_SC 1
275
   #define IS_RRD_SC 1
271
 #endif
276
 #endif
272
 
277
 
275
   #define IS_ULTIPANEL 1
280
   #define IS_ULTIPANEL 1
276
   #define DOGLCD
281
   #define DOGLCD
277
   #if ENABLED(MAKRPANEL)
282
   #if ENABLED(MAKRPANEL)
278
-    #define U8GLIB_ST7565_64128N
283
+    #define IS_U8GLIB_ST7565_64128N 1
279
   #endif
284
   #endif
280
 #endif
285
 #endif
281
 
286
 
373
  * I2C Panels
378
  * I2C Panels
374
  */
379
  */
375
 
380
 
376
-#if EITHER(LCD_SAINSMART_I2C_1602, LCD_SAINSMART_I2C_2004)
381
+#if ANY(IS_RRD_SC, IS_DOGM_12864, OLED_PANEL_TINYBOY2, LCD_I2C_PANELOLU2)
377
 
382
 
378
-  #define LCD_I2C_TYPE_PCF8575
379
-  #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
383
+  #define STD_ENCODER_PULSES_PER_STEP 4
384
+  #define STD_ENCODER_STEPS_PER_MENU_ITEM 1
380
 
385
 
381
-  #if ENABLED(LCD_SAINSMART_I2C_2004)
382
-    #define LCD_WIDTH 20
383
-    #define LCD_HEIGHT 4
386
+  #if ENABLED(LCD_I2C_PANELOLU2)  // PANELOLU2 LCD with status LEDs, separate encoder and click inputs
387
+    #define LCD_I2C_TYPE_MCP23017 // I2C Character-based 12864 display
388
+    #define LCD_I2C_ADDRESS 0x20  // I2C Address of the port expander
389
+    #define LCD_USE_I2C_BUZZER    // Enable buzzer on LCD (optional)
390
+    #define IS_ULTIPANEL 1
384
   #endif
391
   #endif
385
 
392
 
386
-#elif ENABLED(LCD_I2C_PANELOLU2)
393
+#elif EITHER(LCD_SAINSMART_I2C_1602, LCD_SAINSMART_I2C_2004)
387
 
394
 
388
-  // PANELOLU2 LCD with status LEDs, separate encoder and click inputs
395
+  #define LCD_I2C_TYPE_PCF8575    // I2C Character-based 12864 display
396
+  #define LCD_I2C_ADDRESS 0x27    // I2C Address of the port expander
389
 
397
 
390
-  #define LCD_I2C_TYPE_MCP23017
391
-  #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
392
-  #define LCD_USE_I2C_BUZZER   // Enable buzzer on LCD (optional)
393
-  #define IS_ULTIPANEL 1
398
+  #if ENABLED(LCD_SAINSMART_I2C_2004)
399
+    #define LCD_WIDTH 20
400
+    #define LCD_HEIGHT 4
401
+  #endif
394
 
402
 
395
 #elif ENABLED(LCD_I2C_VIKI)
403
 #elif ENABLED(LCD_I2C_VIKI)
396
 
404
 
417
   #define STD_ENCODER_PULSES_PER_STEP 2
425
   #define STD_ENCODER_PULSES_PER_STEP 2
418
   #define STD_ENCODER_STEPS_PER_MENU_ITEM 1
426
   #define STD_ENCODER_STEPS_PER_MENU_ITEM 1
419
 
427
 
420
-#elif ANY(IS_RRD_SC, miniVIKI, VIKI2, ELB_FULL_GRAPHIC_CONTROLLER, AZSMZ_12864, OLED_PANEL_TINYBOY2, BQ_LCD_SMART_CONTROLLER, LCD_I2C_PANELOLU2)
421
-
422
-  #define STD_ENCODER_PULSES_PER_STEP 4
423
-  #define STD_ENCODER_STEPS_PER_MENU_ITEM 1
424
-
425
 #endif
428
 #endif
426
 
429
 
427
 #if EITHER(LCD_I2C_TYPE_MCP23017, LCD_I2C_TYPE_MCP23008) && DISABLED(NO_LCD_DETECT)
430
 #if EITHER(LCD_I2C_TYPE_MCP23017, LCD_I2C_TYPE_MCP23008) && DISABLED(NO_LCD_DETECT)

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

358
   #define _LCD_CONTRAST_MAX  115
358
   #define _LCD_CONTRAST_MAX  115
359
 #elif ENABLED(VIKI2)
359
 #elif ENABLED(VIKI2)
360
   #define _LCD_CONTRAST_INIT 140
360
   #define _LCD_CONTRAST_INIT 140
361
+#elif ENABLED(WYH_L12864)
362
+  #define _LCD_CONTRAST_INIT 190
361
 #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
363
 #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
362
   #define _LCD_CONTRAST_MIN   90
364
   #define _LCD_CONTRAST_MIN   90
363
   #define _LCD_CONTRAST_INIT 110
365
   #define _LCD_CONTRAST_INIT 110

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

833
 /**
833
 /**
834
  * LCD Lightweight Screen Style
834
  * LCD Lightweight Screen Style
835
  */
835
  */
836
-#if ENABLED(LIGHTWEIGHT_UI) && DISABLED(U8GLIB_ST7920)
836
+#if ENABLED(LIGHTWEIGHT_UI) && !IS_U8GLIB_ST7920
837
   #error "LIGHTWEIGHT_UI requires a U8GLIB_ST7920-based display."
837
   #error "LIGHTWEIGHT_UI requires a U8GLIB_ST7920-based display."
838
 #endif
838
 #endif
839
 
839
 
2672
   + 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, ANET_ET4_TFT28, ANET_ET5_TFT35) \
2672
   + 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, ANET_ET4_TFT28, ANET_ET5_TFT35) \
2673
   + COUNT_ENABLED(TFTGLCD_PANEL_SPI, TFTGLCD_PANEL_I2C) \
2673
   + COUNT_ENABLED(TFTGLCD_PANEL_SPI, TFTGLCD_PANEL_I2C) \
2674
   + COUNT_ENABLED(VIKI2, miniVIKI) \
2674
   + COUNT_ENABLED(VIKI2, miniVIKI) \
2675
+  + ENABLED(WYH_L12864) \
2675
   + COUNT_ENABLED(ZONESTAR_12864LCD, ZONESTAR_12864OLED, ZONESTAR_12864OLED_SSD1306) \
2676
   + COUNT_ENABLED(ZONESTAR_12864LCD, ZONESTAR_12864OLED, ZONESTAR_12864OLED_SSD1306) \
2676
   + COUNT_ENABLED(ANET_FULL_GRAPHICS_LCD, ANET_FULL_GRAPHICS_LCD_ALT_WIRING) \
2677
   + COUNT_ENABLED(ANET_FULL_GRAPHICS_LCD, ANET_FULL_GRAPHICS_LCD_ALT_WIRING) \
2677
   + ENABLED(AZSMZ_12864) \
2678
   + ENABLED(AZSMZ_12864) \

+ 3
- 3
Marlin/src/lcd/dogm/marlinui_DOGM.h View File

43
     #define U8G_PARAM LCD_PINS_D4, LCD_PINS_ENABLE, LCD_PINS_RS
43
     #define U8G_PARAM LCD_PINS_D4, LCD_PINS_ENABLE, LCD_PINS_RS
44
   #endif
44
   #endif
45
 
45
 
46
-#elif ENABLED(U8GLIB_ST7920)
46
+#elif IS_U8GLIB_ST7920
47
 
47
 
48
   // RepRap Discount Full Graphics Smart Controller
48
   // RepRap Discount Full Graphics Smart Controller
49
   // and other variant LCDs using ST7920
49
   // and other variant LCDs using ST7920
72
     #define U8G_CLASS U8GLIB_DOGM128_2X                         // 4 stripes (HW-SPI)
72
     #define U8G_CLASS U8GLIB_DOGM128_2X                         // 4 stripes (HW-SPI)
73
   #endif
73
   #endif
74
 
74
 
75
-#elif ENABLED(U8GLIB_LM6059_AF)
75
+#elif IS_U8GLIB_LM6059_AF
76
 
76
 
77
   // Based on the Adafruit ST7565 (https://www.adafruit.com/products/250)
77
   // Based on the Adafruit ST7565 (https://www.adafruit.com/products/250)
78
 
78
 
82
     #define U8G_CLASS U8GLIB_LM6059_2X                          // 4 stripes (HW-SPI)
82
     #define U8G_CLASS U8GLIB_LM6059_2X                          // 4 stripes (HW-SPI)
83
   #endif
83
   #endif
84
 
84
 
85
-#elif ENABLED(U8GLIB_ST7565_64128N)
85
+#elif IS_U8GLIB_ST7565_64128N
86
 
86
 
87
   // MaKrPanel, Mini Viki, Viki 2.0, AZSMZ 12864 ST7565 controller
87
   // MaKrPanel, Mini Viki, Viki 2.0, AZSMZ 12864 ST7565 controller
88
 
88
 

+ 4
- 1
Marlin/src/lcd/dogm/u8g_dev_st7565_64128n_HAL.cpp View File

63
 #define WIDTH 128
63
 #define WIDTH 128
64
 #define HEIGHT 64
64
 #define HEIGHT 64
65
 #define PAGE_HEIGHT 8
65
 #define PAGE_HEIGHT 8
66
+#ifndef ST7565_XOFFSET
67
+  #define ST7565_XOFFSET 0x00
68
+#endif
66
 
69
 
67
 #define ST7565_ADC_REVERSE(N)    ((N) ? 0xA1 : 0xA0)
70
 #define ST7565_ADC_REVERSE(N)    ((N) ? 0xA1 : 0xA0)
68
 #define ST7565_BIAS_MODE(N)      ((N) ? 0xA3 : 0xA2)
71
 #define ST7565_BIAS_MODE(N)      ((N) ? 0xA3 : 0xA2)
123
 static const uint8_t u8g_dev_st7565_64128n_HAL_data_start[] PROGMEM = {
126
 static const uint8_t u8g_dev_st7565_64128n_HAL_data_start[] PROGMEM = {
124
   U8G_ESC_ADR(0),             // instruction mode
127
   U8G_ESC_ADR(0),             // instruction mode
125
   U8G_ESC_CS(1),              // enable chip
128
   U8G_ESC_CS(1),              // enable chip
126
-  ST7565_COLUMN_ADR(0x00),    // high 4 bits to 0, low 4 bits to 0. Changed for DisplayTech 64128N
129
+  ST7565_COLUMN_ADR(ST7565_XOFFSET), // high 4 bits to 0, low 4 bits to 0. Changed for DisplayTech 64128N
127
   U8G_ESC_END                 // end of sequence
130
   U8G_ESC_END                 // end of sequence
128
 };
131
 };
129
 
132
 

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

29
 
29
 
30
 #include "../../inc/MarlinConfig.h"
30
 #include "../../inc/MarlinConfig.h"
31
 
31
 
32
-#if ENABLED(U8GLIB_ST7920)
32
+#if IS_U8GLIB_ST7920
33
 
33
 
34
 #include "ultralcd_st7920_u8glib_rrd_AVR.h"
34
 #include "ultralcd_st7920_u8glib_rrd_AVR.h"
35
 
35
 
192
   void ST7920_write_byte(const uint8_t val) { ST7920_WRITE_BYTE(val); }
192
   void ST7920_write_byte(const uint8_t val) { ST7920_WRITE_BYTE(val); }
193
 #endif
193
 #endif
194
 
194
 
195
-#endif // U8GLIB_ST7920
195
+#endif // IS_U8GLIB_ST7920
196
 #endif // !U8G_HAL_LINKS && (__AVR__ || ARDUINO_ARCH_STM32 || ARDUINO_ARCH_ESP32)
196
 #endif // !U8G_HAL_LINKS && (__AVR__ || ARDUINO_ARCH_STM32 || ARDUINO_ARCH_ESP32)

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

220
     #error "ANET_FULL_GRAPHICS_LCD_ALT_WIRING only applies to the ANET 1.0 board."
220
     #error "ANET_FULL_GRAPHICS_LCD_ALT_WIRING only applies to the ANET 1.0 board."
221
 
221
 
222
   #elif ENABLED(ANET_FULL_GRAPHICS_LCD)
222
   #elif ENABLED(ANET_FULL_GRAPHICS_LCD)
223
+
223
     #error "CAUTION! ANET_FULL_GRAPHICS_LCD requires wiring modifications. See 'pins_BTT_SKR_V1_3.h' for details. Comment out this line to continue."
224
     #error "CAUTION! ANET_FULL_GRAPHICS_LCD requires wiring modifications. See 'pins_BTT_SKR_V1_3.h' for details. Comment out this line to continue."
224
 
225
 
225
    /**
226
    /**
226
     * 1. Cut the tab off the LCD connector so it can be plugged into the "EXP1" connector the other way.
227
     * 1. Cut the tab off the LCD connector so it can be plugged into the "EXP1" connector the other way.
227
     * 2. Swap the LCD's +5V (Pin2) and GND (Pin1) wires. (This is the critical part!)
228
     * 2. Swap the LCD's +5V (Pin2) and GND (Pin1) wires. (This is the critical part!)
228
-    * 3. Rewire the CLK Signal (LCD Pin9) to LCD Pin7. (LCD Pin9 remains open because this pin is open drain.)
229
+    * 3. Rewire the CLK Signal (LCD Pin9) to LCD Pin7. (LCD Pin9 remains open because it is open drain.)
229
     * 4. A wire is needed to connect the Reset switch at J3 (LCD Pin7) to EXP2 (Pin3) on the board.
230
     * 4. A wire is needed to connect the Reset switch at J3 (LCD Pin7) to EXP2 (Pin3) on the board.
230
     *
231
     *
231
     * !!! If you are unsure, ask for help! Your motherboard may be damaged in some circumstances !!!
232
     * !!! If you are unsure, ask for help! Your motherboard may be damaged in some circumstances !!!
252
     #define LCD_PINS_ENABLE          EXP1_05_PIN
253
     #define LCD_PINS_ENABLE          EXP1_05_PIN
253
     #define LCD_PINS_D4              EXP1_07_PIN
254
     #define LCD_PINS_D4              EXP1_07_PIN
254
 
255
 
256
+  #elif ENABLED(WYH_L12864)
257
+
258
+    #error "CAUTION! WYH_L12864 requires wiring modifications. Comment out this line to continue."
259
+
260
+    /**
261
+     * 1. Cut the tab off the LCD connector so it can be plugged into the "EXP1" connector the other way.
262
+     * 2. Swap the LCD's +5V (Pin2) and GND (Pin1) wires. (This is the critical part!)
263
+     * 3. Swap the LCD's MOSI (Pin9) and empty (Pin10) wires because Pin9 is open drain.
264
+     *
265
+     * !!! If you are unsure, ask for help! Your motherboard may be damaged in some circumstances !!!
266
+     *
267
+     * The WYH_L12864 connector plug:
268
+     *
269
+     *                  BEFORE                      AFTER
270
+     *                  ______                     ______
271
+     *             GND | 1  2 | 5V             5V | 1  2 | GND
272
+     *              CS | 3  4 | BTN_EN2        CS | 3  4 | BTN_EN2
273
+     *             SID | 5  6   BTN_EN1       SID | 5  6   BTN_EN1
274
+     *             SCK | 7  8 | BTN_ENC       SCK | 7  8 | BTN_ENC
275
+     *            MOSI | 9 10 |              open | 9 10 | MOSI
276
+     *                  ------                     ------
277
+     *                   LCD                        LCD
278
+     */
279
+    #define BTN_EN1                  EXP1_06_PIN
280
+    #define BTN_EN2                  EXP1_04_PIN
281
+    #define BTN_ENC                  EXP1_08_PIN
282
+    #define DOGLCD_CS                EXP1_03_PIN
283
+    #define DOGLCD_A0                EXP1_05_PIN
284
+    #define DOGLCD_SCK               EXP1_07_PIN
285
+    #define DOGLCD_MOSI              EXP1_10_PIN
286
+    #define LCD_BACKLIGHT_PIN            -1
287
+
255
   #elif ENABLED(CR10_STOCKDISPLAY)
288
   #elif ENABLED(CR10_STOCKDISPLAY)
256
 
289
 
257
     #define LCD_PINS_RS              EXP1_04_PIN
290
     #define LCD_PINS_RS              EXP1_04_PIN

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

321
    /**
321
    /**
322
     * 1. Cut the tab off the LCD connector so it can be plugged into the "EXP1" connector the other way.
322
     * 1. Cut the tab off the LCD connector so it can be plugged into the "EXP1" connector the other way.
323
     * 2. Swap the LCD's +5V (Pin2) and GND (Pin1) wires. (This is the critical part!)
323
     * 2. Swap the LCD's +5V (Pin2) and GND (Pin1) wires. (This is the critical part!)
324
-    * 3. Rewire the CLK Signal (LCD Pin9) to LCD Pin7. (LCD Pin9 remains open because this pin is open drain.)
324
+    * 3. Rewire the CLK Signal (LCD Pin9) to LCD Pin7. (LCD Pin9 remains open because it is open drain.)
325
     * 4. A wire is needed to connect the Reset switch at J3 (LCD Pin7) to EXP2 (Pin3) on the board.
325
     * 4. A wire is needed to connect the Reset switch at J3 (LCD Pin7) to EXP2 (Pin3) on the board.
326
     *
326
     *
327
     * !!! If you are unsure, ask for help! Your motherboard may be damaged in some circumstances !!!
327
     * !!! If you are unsure, ask for help! Your motherboard may be damaged in some circumstances !!!

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

73
 #define TEMP_BED_PIN                           6
73
 #define TEMP_BED_PIN                           6
74
 
74
 
75
 #if HAS_WIRED_LCD
75
 #if HAS_WIRED_LCD
76
-  #if ENABLED(U8GLIB_ST7920)                      // SPI GLCD 12864 ST7920
76
+  #if IS_U8GLIB_ST7920                      // SPI GLCD 12864 ST7920
77
     #define LCD_PINS_RS                       30
77
     #define LCD_PINS_RS                       30
78
     #define LCD_PINS_ENABLE                   20
78
     #define LCD_PINS_ENABLE                   20
79
     #define LCD_PINS_D4                       25
79
     #define LCD_PINS_D4                       25

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

49
   #define IS_RAMPS_SF
49
   #define IS_RAMPS_SF
50
 #endif
50
 #endif
51
 
51
 
52
-#if !(BOTH(IS_ULTRA_LCD, IS_NEWPANEL) && ANY(PANEL_ONE, VIKI2, miniVIKI, MINIPANEL, REPRAPWORLD_KEYPAD))
52
+#if !(BOTH(IS_ULTRA_LCD, IS_NEWPANEL) && ANY(PANEL_ONE, VIKI2, miniVIKI, WYH_L12864, MINIPANEL, REPRAPWORLD_KEYPAD))
53
   #define HAS_FREE_AUX2_PINS 1
53
   #define HAS_FREE_AUX2_PINS 1
54
 #endif
54
 #endif
55
 
55
 

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

1366
 //
1366
 //
1367
 // Default DOGLCD SPI delays
1367
 // Default DOGLCD SPI delays
1368
 //
1368
 //
1369
-#if DISABLED(U8GLIB_ST7920)
1369
+#if !IS_U8GLIB_ST7920
1370
   #undef ST7920_DELAY_1
1370
   #undef ST7920_DELAY_1
1371
   #undef ST7920_DELAY_2
1371
   #undef ST7920_DELAY_2
1372
   #undef ST7920_DELAY_3
1372
   #undef ST7920_DELAY_3

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

205
   #endif // IS_ULTIPANEL || TOUCH_UI_ULTIPANEL
205
   #endif // IS_ULTIPANEL || TOUCH_UI_ULTIPANEL
206
 #endif // HAS_WIRED_LCD
206
 #endif // HAS_WIRED_LCD
207
 
207
 
208
-#if ENABLED(U8GLIB_ST7920)
208
+#if IS_U8GLIB_ST7920
209
   #define BOARD_ST7920_DELAY_1                 0
209
   #define BOARD_ST7920_DELAY_1                 0
210
   #define BOARD_ST7920_DELAY_2               250
210
   #define BOARD_ST7920_DELAY_2               250
211
   #define BOARD_ST7920_DELAY_3                 0
211
   #define BOARD_ST7920_DELAY_3                 0

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

201
 #endif // HAS_WIRED_LCD || TOUCH_UI_ULTIPANEL || TOUCH_UI_FTDI_EVE
201
 #endif // HAS_WIRED_LCD || TOUCH_UI_ULTIPANEL || TOUCH_UI_FTDI_EVE
202
 
202
 
203
 // Alter timing for graphical display
203
 // Alter timing for graphical display
204
-#if ENABLED(U8GLIB_ST7920)
204
+#if IS_U8GLIB_ST7920
205
   #define BOARD_ST7920_DELAY_1                 0
205
   #define BOARD_ST7920_DELAY_1                 0
206
   #define BOARD_ST7920_DELAY_2               250
206
   #define BOARD_ST7920_DELAY_2               250
207
   #define BOARD_ST7920_DELAY_3                 0
207
   #define BOARD_ST7920_DELAY_3                 0

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

193
 
193
 
194
 #endif // HAS_WIRED_LCD || TOUCH_UI_ULTIPANEL
194
 #endif // HAS_WIRED_LCD || TOUCH_UI_ULTIPANEL
195
 
195
 
196
-#if ENABLED(U8GLIB_ST7920)
196
+#if IS_U8GLIB_ST7920
197
   #define BOARD_ST7920_DELAY_1                 0
197
   #define BOARD_ST7920_DELAY_1                 0
198
   #define BOARD_ST7920_DELAY_2               250
198
   #define BOARD_ST7920_DELAY_2               250
199
   #define BOARD_ST7920_DELAY_3                 0
199
   #define BOARD_ST7920_DELAY_3                 0

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

270
 #endif // HAS_WIRED_LCD
270
 #endif // HAS_WIRED_LCD
271
 
271
 
272
 // Alter timing for graphical display
272
 // Alter timing for graphical display
273
-#if ENABLED(U8GLIB_ST7920)
273
+#if IS_U8GLIB_ST7920
274
   #define BOARD_ST7920_DELAY_1                 0
274
   #define BOARD_ST7920_DELAY_1                 0
275
   #define BOARD_ST7920_DELAY_2                 0
275
   #define BOARD_ST7920_DELAY_2                 0
276
   #define BOARD_ST7920_DELAY_3                 0
276
   #define BOARD_ST7920_DELAY_3                 0

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

166
 
166
 
167
 #endif // IS_ULTRA_LCD && IS_NEWPANEL
167
 #endif // IS_ULTRA_LCD && IS_NEWPANEL
168
 
168
 
169
-#if ENABLED(U8GLIB_ST7920)
169
+#if IS_U8GLIB_ST7920
170
   #define BOARD_ST7920_DELAY_1                 0
170
   #define BOARD_ST7920_DELAY_1                 0
171
   #define BOARD_ST7920_DELAY_2               188
171
   #define BOARD_ST7920_DELAY_2               188
172
   #define BOARD_ST7920_DELAY_3                 0
172
   #define BOARD_ST7920_DELAY_3                 0

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

106
 #endif
106
 #endif
107
 
107
 
108
 // Alter timing for graphical display
108
 // Alter timing for graphical display
109
-#if ENABLED(U8GLIB_ST7920)
109
+#if IS_U8GLIB_ST7920
110
   #define BOARD_ST7920_DELAY_1                 0
110
   #define BOARD_ST7920_DELAY_1                 0
111
   #define BOARD_ST7920_DELAY_2                 0
111
   #define BOARD_ST7920_DELAY_2                 0
112
   #define BOARD_ST7920_DELAY_3               189
112
   #define BOARD_ST7920_DELAY_3               189

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

40
 #endif
40
 #endif
41
 
41
 
42
 // Alter timing for graphical display
42
 // Alter timing for graphical display
43
-#if ENABLED(U8GLIB_ST7920)
43
+#if IS_U8GLIB_ST7920
44
   #define BOARD_ST7920_DELAY_1                 0
44
   #define BOARD_ST7920_DELAY_1                 0
45
   #define BOARD_ST7920_DELAY_2               250
45
   #define BOARD_ST7920_DELAY_2               250
46
   #define BOARD_ST7920_DELAY_3               250
46
   #define BOARD_ST7920_DELAY_3               250

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

199
 #endif
199
 #endif
200
 
200
 
201
 // Alter timing for graphical display
201
 // Alter timing for graphical display
202
-#if ENABLED(U8GLIB_ST7920)
202
+#if IS_U8GLIB_ST7920
203
   #define BOARD_ST7920_DELAY_1               200
203
   #define BOARD_ST7920_DELAY_1               200
204
   #define BOARD_ST7920_DELAY_2               200
204
   #define BOARD_ST7920_DELAY_2               200
205
   #define BOARD_ST7920_DELAY_3               200
205
   #define BOARD_ST7920_DELAY_3               200

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

32
 #define IS_MELZI 1
32
 #define IS_MELZI 1
33
 
33
 
34
 // Alter timing for graphical display
34
 // Alter timing for graphical display
35
-#if ENABLED(U8GLIB_ST7920)
35
+#if IS_U8GLIB_ST7920
36
   #ifndef BOARD_ST7920_DELAY_1
36
   #ifndef BOARD_ST7920_DELAY_1
37
     #define BOARD_ST7920_DELAY_1               0
37
     #define BOARD_ST7920_DELAY_1               0
38
   #endif
38
   #endif

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

36
 #define BOARD_INFO_NAME "Melzi (Creality)"
36
 #define BOARD_INFO_NAME "Melzi (Creality)"
37
 
37
 
38
 // Alter timing for graphical display
38
 // Alter timing for graphical display
39
-#if ENABLED(U8GLIB_ST7920)
39
+#if IS_U8GLIB_ST7920
40
   #define BOARD_ST7920_DELAY_1               125
40
   #define BOARD_ST7920_DELAY_1               125
41
   #define BOARD_ST7920_DELAY_2               125
41
   #define BOARD_ST7920_DELAY_2               125
42
   #define BOARD_ST7920_DELAY_3               125
42
   #define BOARD_ST7920_DELAY_3               125

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

28
 #define BOARD_INFO_NAME "Melzi (Tronxy)"
28
 #define BOARD_INFO_NAME "Melzi (Tronxy)"
29
 
29
 
30
 // Alter timing for graphical display
30
 // Alter timing for graphical display
31
-#if ENABLED(U8GLIB_ST7920)
31
+#if IS_U8GLIB_ST7920
32
   #define BOARD_ST7920_DELAY_1                 0
32
   #define BOARD_ST7920_DELAY_1                 0
33
   #define BOARD_ST7920_DELAY_2               125
33
   #define BOARD_ST7920_DELAY_2               125
34
   #define BOARD_ST7920_DELAY_3                 0
34
   #define BOARD_ST7920_DELAY_3                 0

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

28
 #define BOARD_INFO_NAME "Melzi V2"
28
 #define BOARD_INFO_NAME "Melzi V2"
29
 
29
 
30
 // Alter timing for graphical display
30
 // Alter timing for graphical display
31
-#if ENABLED(U8GLIB_ST7920)
31
+#if IS_U8GLIB_ST7920
32
   #define BOARD_ST7920_DELAY_1                 0
32
   #define BOARD_ST7920_DELAY_1                 0
33
   #define BOARD_ST7920_DELAY_2               400
33
   #define BOARD_ST7920_DELAY_2               400
34
   #define BOARD_ST7920_DELAY_3                 0
34
   #define BOARD_ST7920_DELAY_3                 0

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

165
       #define KILL_PIN                        10
165
       #define KILL_PIN                        10
166
       #define BEEPER_PIN                      27
166
       #define BEEPER_PIN                      27
167
 
167
 
168
-    #elif ENABLED(U8GLIB_ST7920)                  // SPI GLCD 12864 ST7920 ( like [www.digole.com] ) For Melzi V2.0
168
+    #elif IS_U8GLIB_ST7920                  // SPI GLCD 12864 ST7920 ( like [www.digole.com] ) For Melzi V2.0
169
 
169
 
170
       #if IS_MELZI
170
       #if IS_MELZI
171
         #define LCD_PINS_RS                   30  // CS chip select /SS chip slave select
171
         #define LCD_PINS_RS                   30  // CS chip select /SS chip slave select

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

202
     #endif // !FYSETC_MINI_12864
202
     #endif // !FYSETC_MINI_12864
203
 
203
 
204
     // Alter timing for graphical display
204
     // Alter timing for graphical display
205
-    #if ENABLED(U8GLIB_ST7920)
205
+    #if IS_U8GLIB_ST7920
206
       #define BOARD_ST7920_DELAY_1           125
206
       #define BOARD_ST7920_DELAY_1           125
207
       #define BOARD_ST7920_DELAY_2           125
207
       #define BOARD_ST7920_DELAY_2           125
208
       #define BOARD_ST7920_DELAY_3           125
208
       #define BOARD_ST7920_DELAY_3           125

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

155
 #endif
155
 #endif
156
 
156
 
157
 // Alter timing for graphical display
157
 // Alter timing for graphical display
158
-#if ENABLED(U8GLIB_ST7920)
158
+#if IS_U8GLIB_ST7920
159
   #define BOARD_ST7920_DELAY_1               125
159
   #define BOARD_ST7920_DELAY_1               125
160
   #define BOARD_ST7920_DELAY_2               125
160
   #define BOARD_ST7920_DELAY_2               125
161
   #define BOARD_ST7920_DELAY_3               125
161
   #define BOARD_ST7920_DELAY_3               125

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

179
   #endif
179
   #endif
180
 
180
 
181
   // Alter timing for graphical display
181
   // Alter timing for graphical display
182
-  #if ENABLED(U8GLIB_ST7920)
182
+  #if IS_U8GLIB_ST7920
183
     #define BOARD_ST7920_DELAY_1              96
183
     #define BOARD_ST7920_DELAY_1              96
184
     #define BOARD_ST7920_DELAY_2              48
184
     #define BOARD_ST7920_DELAY_2              48
185
     #define BOARD_ST7920_DELAY_3             715
185
     #define BOARD_ST7920_DELAY_3             715

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

158
   #endif
158
   #endif
159
 
159
 
160
   // Alter timing for graphical display
160
   // Alter timing for graphical display
161
-  #if ENABLED(U8GLIB_ST7920)
161
+  #if IS_U8GLIB_ST7920
162
     #define BOARD_ST7920_DELAY_1              96
162
     #define BOARD_ST7920_DELAY_1              96
163
     #define BOARD_ST7920_DELAY_2              48
163
     #define BOARD_ST7920_DELAY_2              48
164
     #define BOARD_ST7920_DELAY_3             715
164
     #define BOARD_ST7920_DELAY_3             715

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

166
   #endif
166
   #endif
167
 
167
 
168
   // Alter timing for graphical display
168
   // Alter timing for graphical display
169
-  #if ENABLED(U8GLIB_ST7920)
169
+  #if IS_U8GLIB_ST7920
170
     #define BOARD_ST7920_DELAY_1              96
170
     #define BOARD_ST7920_DELAY_1              96
171
     #define BOARD_ST7920_DELAY_2              48
171
     #define BOARD_ST7920_DELAY_2              48
172
     #define BOARD_ST7920_DELAY_3             715
172
     #define BOARD_ST7920_DELAY_3             715

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

163
   #endif
163
   #endif
164
 
164
 
165
   // Alter timing for graphical display
165
   // Alter timing for graphical display
166
-  #if ENABLED(U8GLIB_ST7920)
166
+  #if IS_U8GLIB_ST7920
167
     #define BOARD_ST7920_DELAY_1              96
167
     #define BOARD_ST7920_DELAY_1              96
168
     #define BOARD_ST7920_DELAY_2              48
168
     #define BOARD_ST7920_DELAY_2              48
169
     #define BOARD_ST7920_DELAY_3             715
169
     #define BOARD_ST7920_DELAY_3             715

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

168
   #endif
168
   #endif
169
 
169
 
170
   // Alter timing for graphical display
170
   // Alter timing for graphical display
171
-  #if ENABLED(U8GLIB_ST7920)
171
+  #if IS_U8GLIB_ST7920
172
     #define BOARD_ST7920_DELAY_1              96
172
     #define BOARD_ST7920_DELAY_1              96
173
     #define BOARD_ST7920_DELAY_2              48
173
     #define BOARD_ST7920_DELAY_2              48
174
     #define BOARD_ST7920_DELAY_3             715
174
     #define BOARD_ST7920_DELAY_3             715

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

221
 #endif // HAS_WIRED_LCD
221
 #endif // HAS_WIRED_LCD
222
 
222
 
223
 // Alter timing for graphical display
223
 // Alter timing for graphical display
224
-#if ENABLED(U8GLIB_ST7920)
224
+#if IS_U8GLIB_ST7920
225
   #ifndef BOARD_ST7920_DELAY_1
225
   #ifndef BOARD_ST7920_DELAY_1
226
     #define BOARD_ST7920_DELAY_1             125
226
     #define BOARD_ST7920_DELAY_1             125
227
   #endif
227
   #endif

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

113
   #endif // !MKS_MINI_12864
113
   #endif // !MKS_MINI_12864
114
 
114
 
115
   // Alter timing for graphical display
115
   // Alter timing for graphical display
116
-  #if ENABLED(U8GLIB_ST7920)
116
+  #if IS_U8GLIB_ST7920
117
     #define BOARD_ST7920_DELAY_1             125
117
     #define BOARD_ST7920_DELAY_1             125
118
     #define BOARD_ST7920_DELAY_2             125
118
     #define BOARD_ST7920_DELAY_2             125
119
     #define BOARD_ST7920_DELAY_3             125
119
     #define BOARD_ST7920_DELAY_3             125

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

365
 
365
 
366
     #endif
366
     #endif
367
 
367
 
368
-    #if ENABLED(U8GLIB_ST7920)
368
+    #if IS_U8GLIB_ST7920
369
       #define BOARD_ST7920_DELAY_1           125
369
       #define BOARD_ST7920_DELAY_1           125
370
       #define BOARD_ST7920_DELAY_2           125
370
       #define BOARD_ST7920_DELAY_2           125
371
       #define BOARD_ST7920_DELAY_3           125
371
       #define BOARD_ST7920_DELAY_3           125

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

300
 #endif
300
 #endif
301
 
301
 
302
 // Alter timing for graphical display
302
 // Alter timing for graphical display
303
-#if ENABLED(U8GLIB_ST7920)
303
+#if IS_U8GLIB_ST7920
304
   #define BOARD_ST7920_DELAY_1               125
304
   #define BOARD_ST7920_DELAY_1               125
305
   #define BOARD_ST7920_DELAY_2               125
305
   #define BOARD_ST7920_DELAY_2               125
306
   #define BOARD_ST7920_DELAY_3               125
306
   #define BOARD_ST7920_DELAY_3               125

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

332
 #endif
332
 #endif
333
 
333
 
334
 // Alter timing for graphical display
334
 // Alter timing for graphical display
335
-#if ENABLED(U8GLIB_ST7920)
335
+#if IS_U8GLIB_ST7920
336
   #define BOARD_ST7920_DELAY_1               125
336
   #define BOARD_ST7920_DELAY_1               125
337
   #define BOARD_ST7920_DELAY_2               250
337
   #define BOARD_ST7920_DELAY_2               250
338
   #define BOARD_ST7920_DELAY_3               125
338
   #define BOARD_ST7920_DELAY_3               125

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

305
 #endif
305
 #endif
306
 
306
 
307
 // Alter timing for graphical display
307
 // Alter timing for graphical display
308
-#if ENABLED(U8GLIB_ST7920)
308
+#if IS_U8GLIB_ST7920
309
   #define BOARD_ST7920_DELAY_1               200  // Tclk_fall <200ns
309
   #define BOARD_ST7920_DELAY_1               200  // Tclk_fall <200ns
310
   #define BOARD_ST7920_DELAY_2               250  // Tdata_width >200ns
310
   #define BOARD_ST7920_DELAY_2               250  // Tdata_width >200ns
311
   #define BOARD_ST7920_DELAY_3               200  // Tclk_rise <200ns
311
   #define BOARD_ST7920_DELAY_3               200  // Tclk_rise <200ns

+ 1
- 1
Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h View File

285
   #endif
285
   #endif
286
 
286
 
287
   // Alter timing for graphical display
287
   // Alter timing for graphical display
288
-  #if ENABLED(U8GLIB_ST7920)
288
+  #if IS_U8GLIB_ST7920
289
     #define BOARD_ST7920_DELAY_1              96
289
     #define BOARD_ST7920_DELAY_1              96
290
     #define BOARD_ST7920_DELAY_2              48
290
     #define BOARD_ST7920_DELAY_2              48
291
     #define BOARD_ST7920_DELAY_3             600
291
     #define BOARD_ST7920_DELAY_3             600

+ 1
- 1
Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h View File

277
   #endif
277
   #endif
278
 
278
 
279
   // Alter timing for graphical display
279
   // Alter timing for graphical display
280
-  #if ENABLED(U8GLIB_ST7920)
280
+  #if IS_U8GLIB_ST7920
281
     #define BOARD_ST7920_DELAY_1              96
281
     #define BOARD_ST7920_DELAY_1              96
282
     #define BOARD_ST7920_DELAY_2              48
282
     #define BOARD_ST7920_DELAY_2              48
283
     #define BOARD_ST7920_DELAY_3             600
283
     #define BOARD_ST7920_DELAY_3             600

+ 1
- 1
Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h View File

483
   #endif
483
   #endif
484
 
484
 
485
   // Alter timing for graphical display
485
   // Alter timing for graphical display
486
-  #if ENABLED(U8GLIB_ST7920)
486
+  #if IS_U8GLIB_ST7920
487
     #define BOARD_ST7920_DELAY_1              96
487
     #define BOARD_ST7920_DELAY_1              96
488
     #define BOARD_ST7920_DELAY_2              48
488
     #define BOARD_ST7920_DELAY_2              48
489
     #define BOARD_ST7920_DELAY_3             600
489
     #define BOARD_ST7920_DELAY_3             600

+ 1
- 1
Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h View File

478
 #endif  // HAS_WIRED_LCD
478
 #endif  // HAS_WIRED_LCD
479
 
479
 
480
 // Alter timing for graphical display
480
 // Alter timing for graphical display
481
-#if ENABLED(U8GLIB_ST7920)
481
+#if IS_U8GLIB_ST7920
482
   #define BOARD_ST7920_DELAY_1               120
482
   #define BOARD_ST7920_DELAY_1               120
483
   #define BOARD_ST7920_DELAY_2                80
483
   #define BOARD_ST7920_DELAY_2                80
484
   #define BOARD_ST7920_DELAY_3               580
484
   #define BOARD_ST7920_DELAY_3               580

+ 34
- 1
Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h View File

453
     #define BTN_EN1                  EXP2_08_PIN
453
     #define BTN_EN1                  EXP2_08_PIN
454
     #define BTN_EN2                  EXP2_06_PIN
454
     #define BTN_EN2                  EXP2_06_PIN
455
 
455
 
456
+  #elif ENABLED(WYH_L12864)
457
+
458
+    #error "CAUTION! WYH_L12864 requires wiring modifications. Comment out this line to continue."
459
+
460
+    /**
461
+     * 1. Cut the tab off the LCD connector so it can be plugged into the "EXP1" connector the other way.
462
+     * 2. Swap the LCD's +5V (Pin2) and GND (Pin1) wires.
463
+     *
464
+     * !!! If you are unsure, ask for help! Your motherboard may be damaged in some circumstances !!!
465
+     *
466
+     * The WYH_L12864 connector plug:
467
+     *
468
+     *                  BEFORE                      AFTER
469
+     *                  ______                     ______
470
+     *             GND | 1  2 | 5V             5V | 1  2 | GND
471
+     *              CS | 3  4 | BTN_EN2        CS | 3  4 | BTN_EN2
472
+     *             SID | 5  6   BTN_EN1       SID | 5  6   BTN_EN1
473
+     *             SCK | 7  8 | BTN_ENC       SCK | 7  8 | BTN_ENC
474
+     *            MOSI | 9 10 |              MOSI | 9 10 |
475
+     *                  ------                     ------
476
+     *                   LCD                        LCD
477
+     */
478
+    #undef BEEPER_PIN
479
+    #undef BTN_ENC
480
+    #define BTN_EN1                  EXP1_06_PIN
481
+    #define BTN_EN2                  EXP1_04_PIN
482
+    #define BTN_ENC                  EXP1_08_PIN
483
+    #define DOGLCD_CS                EXP1_03_PIN
484
+    #define DOGLCD_A0                EXP1_05_PIN
485
+    #define DOGLCD_SCK               EXP1_07_PIN
486
+    #define DOGLCD_MOSI              EXP1_09_PIN
487
+    #define LCD_BACKLIGHT_PIN            -1
488
+
456
   #else
489
   #else
457
 
490
 
458
     #define LCD_PINS_RS              EXP1_07_PIN
491
     #define LCD_PINS_RS              EXP1_07_PIN
499
 #endif // HAS_WIRED_LCD
532
 #endif // HAS_WIRED_LCD
500
 
533
 
501
 // Alter timing for graphical display
534
 // Alter timing for graphical display
502
-#if ENABLED(U8GLIB_ST7920)
535
+#if IS_U8GLIB_ST7920
503
   #ifndef BOARD_ST7920_DELAY_1
536
   #ifndef BOARD_ST7920_DELAY_1
504
     #define BOARD_ST7920_DELAY_1             125
537
     #define BOARD_ST7920_DELAY_1             125
505
   #endif
538
   #endif

+ 1
- 1
Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h View File

483
 #endif // HAS_WIRED_LCD
483
 #endif // HAS_WIRED_LCD
484
 
484
 
485
 // Alter timing for graphical display
485
 // Alter timing for graphical display
486
-#if ENABLED(U8GLIB_ST7920)
486
+#if IS_U8GLIB_ST7920
487
   #ifndef BOARD_ST7920_DELAY_1
487
   #ifndef BOARD_ST7920_DELAY_1
488
     #define BOARD_ST7920_DELAY_1             120
488
     #define BOARD_ST7920_DELAY_1             120
489
   #endif
489
   #endif

+ 1
- 1
Marlin/src/pins/stm32f4/pins_FLYF407ZG.h View File

305
 #define FIL_RUNOUT_PIN                      PA3
305
 #define FIL_RUNOUT_PIN                      PA3
306
 
306
 
307
 // Alter timing for graphical display
307
 // Alter timing for graphical display
308
-#if ENABLED(U8GLIB_ST7920)
308
+#if IS_U8GLIB_ST7920
309
   #define BOARD_ST7920_DELAY_1                96
309
   #define BOARD_ST7920_DELAY_1                96
310
   #define BOARD_ST7920_DELAY_2                48
310
   #define BOARD_ST7920_DELAY_2                48
311
   #define BOARD_ST7920_DELAY_3               715
311
   #define BOARD_ST7920_DELAY_3               715

+ 1
- 1
Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h View File

245
 #endif // HAS_WIRED_LCD
245
 #endif // HAS_WIRED_LCD
246
 
246
 
247
 // Alter timing for graphical display
247
 // Alter timing for graphical display
248
-#if ENABLED(U8GLIB_ST7920)
248
+#if IS_U8GLIB_ST7920
249
   #define BOARD_ST7920_DELAY_1                96
249
   #define BOARD_ST7920_DELAY_1                96
250
   #define BOARD_ST7920_DELAY_2                48
250
   #define BOARD_ST7920_DELAY_2                48
251
   #define BOARD_ST7920_DELAY_3               600
251
   #define BOARD_ST7920_DELAY_3               600

+ 1
- 1
Marlin/src/pins/stm32f4/pins_FYSETC_S6.h View File

314
 #endif // HAS_WIRED_LCD
314
 #endif // HAS_WIRED_LCD
315
 
315
 
316
 // Alter timing for graphical display
316
 // Alter timing for graphical display
317
-#if ENABLED(U8GLIB_ST7920)
317
+#if IS_U8GLIB_ST7920
318
   #define BOARD_ST7920_DELAY_1                96
318
   #define BOARD_ST7920_DELAY_1                96
319
   #define BOARD_ST7920_DELAY_2                48
319
   #define BOARD_ST7920_DELAY_2                48
320
   #define BOARD_ST7920_DELAY_3               640
320
   #define BOARD_ST7920_DELAY_3               640

+ 1
- 1
Marlin/src/pins/stm32f4/pins_RUMBA32_common.h View File

172
 #endif // HAS_WIRED_LCD
172
 #endif // HAS_WIRED_LCD
173
 
173
 
174
 // Alter timing for graphical display
174
 // Alter timing for graphical display
175
-#if ENABLED(U8GLIB_ST7920)
175
+#if IS_U8GLIB_ST7920
176
   #define BOARD_ST7920_DELAY_1                96
176
   #define BOARD_ST7920_DELAY_1                96
177
   #define BOARD_ST7920_DELAY_2                48
177
   #define BOARD_ST7920_DELAY_2                48
178
   #define BOARD_ST7920_DELAY_3               640
178
   #define BOARD_ST7920_DELAY_3               640

+ 1
- 1
Marlin/src/pins/stm32f4/pins_VAKE403D.h View File

183
 #endif
183
 #endif
184
 
184
 
185
 // Alter timing for graphical display
185
 // Alter timing for graphical display
186
-#if ENABLED(U8GLIB_ST7920)
186
+#if IS_U8GLIB_ST7920
187
   #define BOARD_ST7920_DELAY_1                96
187
   #define BOARD_ST7920_DELAY_1                96
188
   #define BOARD_ST7920_DELAY_2                48
188
   #define BOARD_ST7920_DELAY_2                48
189
   #define BOARD_ST7920_DELAY_3               715
189
   #define BOARD_ST7920_DELAY_3               715

Loading…
Cancel
Save