Преглед изворни кода

🎨 EXP headers, ST7920 delays (#22641)

Scott Lahteine пре 2 година
родитељ
комит
d818a019c5
No account linked to committer's email address
65 измењених фајлова са 630 додато и 698 уклоњено
  1. 13
    0
      Marlin/src/HAL/AVR/HAL.h
  2. 3
    3
      Marlin/src/HAL/LINUX/HAL.h
  3. 3
    9
      Marlin/src/HAL/LPC1768/HAL.h
  4. 3
    3
      Marlin/src/HAL/NATIVE_SIM/HAL.h
  5. 7
    0
      Marlin/src/HAL/STM32/HAL.h
  6. 7
    0
      Marlin/src/HAL/STM32F1/HAL.h
  7. 3
    3
      Marlin/src/HAL/TEENSY31_32/HAL.h
  8. 3
    3
      Marlin/src/HAL/TEENSY35_36/HAL.h
  9. 3
    3
      Marlin/src/HAL/TEENSY40_41/HAL.h
  10. 11
    4
      Marlin/src/inc/Conditionals_LCD.h
  11. 0
    54
      Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp
  12. 1
    1
      Marlin/src/pins/esp32/pins_MRR_ESPE.h
  13. 0
    1
      Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h
  14. 8
    9
      Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h
  15. 9
    10
      Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h
  16. 0
    1
      Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h
  17. 0
    1
      Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h
  18. 1
    1
      Marlin/src/pins/mega/pins_OVERLORD.h
  19. 4
    1
      Marlin/src/pins/mega/pins_SILVER_GATE.h
  20. 31
    7
      Marlin/src/pins/pins_postprocess.h
  21. 6
    0
      Marlin/src/pins/rambo/pins_EINSY_RAMBO.h
  22. 7
    0
      Marlin/src/pins/rambo/pins_EINSY_RETRO.h
  23. 7
    1
      Marlin/src/pins/rambo/pins_MINIRAMBO.h
  24. 7
    0
      Marlin/src/pins/rambo/pins_RAMBO.h
  25. 7
    0
      Marlin/src/pins/ramps/pins_3DRAG.h
  26. 2
    4
      Marlin/src/pins/ramps/pins_BAM_DICE_DUE.h
  27. 7
    0
      Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h
  28. 2
    4
      Marlin/src/pins/ramps/pins_DAGOMA_F5.h
  29. 5
    10
      Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h
  30. 0
    21
      Marlin/src/pins/ramps/pins_K8600.h
  31. 26
    43
      Marlin/src/pins/ramps/pins_MKS_GEN_13.h
  32. 75
    49
      Marlin/src/pins/ramps/pins_RAMPS.h
  33. 13
    0
      Marlin/src/pins/sanguino/pins_MELZI.h
  34. 11
    17
      Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h
  35. 0
    13
      Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h
  36. 5
    10
      Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h
  37. 5
    10
      Marlin/src/pins/sanguino/pins_MELZI_V2.h
  38. 0
    23
      Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h
  39. 3
    4
      Marlin/src/pins/sanguino/pins_ZMIB_V2.h
  40. 68
    58
      Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h
  41. 28
    26
      Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h
  42. 63
    46
      Marlin/src/pins/stm32f1/pins_FLY_MINI.h
  43. 5
    10
      Marlin/src/pins/stm32f1/pins_GTM32_MINI.h
  44. 5
    10
      Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h
  45. 5
    10
      Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h
  46. 5
    10
      Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h
  47. 3
    9
      Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h
  48. 75
    44
      Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h
  49. 5
    10
      Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h
  50. 1
    5
      Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h
  51. 5
    10
      Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h
  52. 2
    1
      Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h
  53. 2
    1
      Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h
  54. 4
    11
      Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h
  55. 4
    10
      Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h
  56. 4
    10
      Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h
  57. 12
    20
      Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h
  58. 11
    13
      Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h
  59. 2
    3
      Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h
  60. 5
    14
      Marlin/src/pins/stm32f4/pins_FLYF407ZG.h
  61. 4
    10
      Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h
  62. 4
    10
      Marlin/src/pins/stm32f4/pins_FYSETC_S6.h
  63. 0
    1
      Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h
  64. 6
    13
      Marlin/src/pins/stm32f4/pins_RUMBA32_common.h
  65. 4
    10
      Marlin/src/pins/stm32f4/pins_VAKE403D.h

+ 13
- 0
Marlin/src/HAL/AVR/HAL.h Прегледај датотеку

@@ -39,6 +39,19 @@
39 39
 #include <avr/interrupt.h>
40 40
 #include <avr/io.h>
41 41
 
42
+//
43
+// Default graphical display delays
44
+//
45
+#if F_CPU >= 20000000
46
+  #define CPU_ST7920_DELAY_1 DELAY_NS(150)
47
+  #define CPU_ST7920_DELAY_2 DELAY_NS(  0)
48
+  #define CPU_ST7920_DELAY_3 DELAY_NS(150)
49
+#elif F_CPU == 16000000
50
+  #define CPU_ST7920_DELAY_1 DELAY_NS(125)
51
+  #define CPU_ST7920_DELAY_2 DELAY_NS(  0)
52
+  #define CPU_ST7920_DELAY_3 DELAY_NS(188)
53
+#endif
54
+
42 55
 #ifndef pgm_read_ptr
43 56
   // Compatibility for avr-libc 1.8.0-4.1 included with Ubuntu for
44 57
   // Windows Subsystem for Linux on Windows 10 as of 10/18/2019

+ 3
- 3
Marlin/src/HAL/LINUX/HAL.h Прегледај датотеку

@@ -63,9 +63,9 @@ uint8_t _getc();
63 63
 extern MSerialT usb_serial;
64 64
 #define MYSERIAL1 usb_serial
65 65
 
66
-#define ST7920_DELAY_1 DELAY_NS(600)
67
-#define ST7920_DELAY_2 DELAY_NS(750)
68
-#define ST7920_DELAY_3 DELAY_NS(750)
66
+#define CPU_ST7920_DELAY_1 DELAY_NS(600)
67
+#define CPU_ST7920_DELAY_2 DELAY_NS(750)
68
+#define CPU_ST7920_DELAY_3 DELAY_NS(750)
69 69
 
70 70
 //
71 71
 // Interrupts

+ 3
- 9
Marlin/src/HAL/LPC1768/HAL.h Прегледај датотеку

@@ -50,15 +50,9 @@ extern "C" volatile uint32_t _millis;
50 50
 //
51 51
 // Default graphical display delays
52 52
 //
53
-#ifndef ST7920_DELAY_1
54
-  #define ST7920_DELAY_1 DELAY_NS(600)
55
-#endif
56
-#ifndef ST7920_DELAY_2
57
-  #define ST7920_DELAY_2 DELAY_NS(750)
58
-#endif
59
-#ifndef ST7920_DELAY_3
60
-  #define ST7920_DELAY_3 DELAY_NS(750)
61
-#endif
53
+#define CPU_ST7920_DELAY_1 DELAY_NS(600)
54
+#define CPU_ST7920_DELAY_2 DELAY_NS(750)
55
+#define CPU_ST7920_DELAY_3 DELAY_NS(750)
62 56
 
63 57
 typedef ForwardSerial1Class< decltype(UsbSerial) > DefaultSerial1;
64 58
 extern DefaultSerial1 USBSerial;

+ 3
- 3
Marlin/src/HAL/NATIVE_SIM/HAL.h Прегледај датотеку

@@ -99,9 +99,9 @@ extern MSerialT serial_stream_3;
99 99
 #endif
100 100
 
101 101
 
102
-#define ST7920_DELAY_1 DELAY_NS(600)
103
-#define ST7920_DELAY_2 DELAY_NS(750)
104
-#define ST7920_DELAY_3 DELAY_NS(750)
102
+#define CPU_ST7920_DELAY_1 DELAY_NS(600)
103
+#define CPU_ST7920_DELAY_2 DELAY_NS(750)
104
+#define CPU_ST7920_DELAY_3 DELAY_NS(750)
105 105
 
106 106
 //
107 107
 // Interrupts

+ 7
- 0
Marlin/src/HAL/STM32/HAL.h Прегледај датотеку

@@ -38,6 +38,13 @@
38 38
 #include <stdint.h>
39 39
 
40 40
 //
41
+// Default graphical display delays
42
+//
43
+#define CPU_ST7920_DELAY_1 DELAY_NS(300)
44
+#define CPU_ST7920_DELAY_2 DELAY_NS( 40)
45
+#define CPU_ST7920_DELAY_3 DELAY_NS(340)
46
+
47
+//
41 48
 // Serial Ports
42 49
 //
43 50
 #ifdef USBCON

+ 7
- 0
Marlin/src/HAL/STM32F1/HAL.h Прегледај датотеку

@@ -51,6 +51,13 @@
51 51
 // Defines
52 52
 // ------------------------
53 53
 
54
+//
55
+// Default graphical display delays
56
+//
57
+#define CPU_ST7920_DELAY_1 DELAY_NS(300)
58
+#define CPU_ST7920_DELAY_2 DELAY_NS( 40)
59
+#define CPU_ST7920_DELAY_3 DELAY_NS(340)
60
+
54 61
 #ifndef STM32_FLASH_SIZE
55 62
   #if ANY(MCU_STM32F103RE, MCU_STM32F103VE, MCU_STM32F103ZE)
56 63
     #define STM32_FLASH_SIZE 512

+ 3
- 3
Marlin/src/HAL/TEENSY31_32/HAL.h Прегледај датотеку

@@ -36,9 +36,9 @@
36 36
 
37 37
 #include <stdint.h>
38 38
 
39
-#define ST7920_DELAY_1 DELAY_NS(600)
40
-#define ST7920_DELAY_2 DELAY_NS(750)
41
-#define ST7920_DELAY_3 DELAY_NS(750)
39
+#define CPU_ST7920_DELAY_1 DELAY_NS(600)
40
+#define CPU_ST7920_DELAY_2 DELAY_NS(750)
41
+#define CPU_ST7920_DELAY_3 DELAY_NS(750)
42 42
 
43 43
 //#undef MOTHERBOARD
44 44
 //#define MOTHERBOARD BOARD_TEENSY31_32

+ 3
- 3
Marlin/src/HAL/TEENSY35_36/HAL.h Прегледај датотеку

@@ -37,9 +37,9 @@
37 37
 #include <stdint.h>
38 38
 #include <util/atomic.h>
39 39
 
40
-#define ST7920_DELAY_1 DELAY_NS(600)
41
-#define ST7920_DELAY_2 DELAY_NS(750)
42
-#define ST7920_DELAY_3 DELAY_NS(750)
40
+#define CPU_ST7920_DELAY_1 DELAY_NS(600)
41
+#define CPU_ST7920_DELAY_2 DELAY_NS(750)
42
+#define CPU_ST7920_DELAY_3 DELAY_NS(750)
43 43
 
44 44
 // ------------------------
45 45
 // Defines

+ 3
- 3
Marlin/src/HAL/TEENSY40_41/HAL.h Прегледај датотеку

@@ -41,9 +41,9 @@
41 41
   #include "../../feature/ethernet.h"
42 42
 #endif
43 43
 
44
-//#define ST7920_DELAY_1 DELAY_NS(600)
45
-//#define ST7920_DELAY_2 DELAY_NS(750)
46
-//#define ST7920_DELAY_3 DELAY_NS(750)
44
+#define CPU_ST7920_DELAY_1 DELAY_NS(600)
45
+#define CPU_ST7920_DELAY_2 DELAY_NS(750)
46
+#define CPU_ST7920_DELAY_3 DELAY_NS(750)
47 47
 
48 48
 // ------------------------
49 49
 // Defines

+ 11
- 4
Marlin/src/inc/Conditionals_LCD.h Прегледај датотеку

@@ -237,11 +237,18 @@
237 237
 #elif ENABLED(CR10_STOCKDISPLAY)
238 238
 
239 239
   #define IS_RRD_FG_SC 1
240
-  #define BOARD_ST7920_DELAY_1 DELAY_NS(125)
241
-  #define BOARD_ST7920_DELAY_2 DELAY_NS(125)
242
-  #define BOARD_ST7920_DELAY_3 DELAY_NS(125)
240
+  #define LCD_ST7920_DELAY_1 DELAY_NS(125)
241
+  #define LCD_ST7920_DELAY_2 DELAY_NS(125)
242
+  #define LCD_ST7920_DELAY_3 DELAY_NS(125)
243 243
 
244
-#elif ANY(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER, ANET_FULL_GRAPHICS_LCD, ANET_FULL_GRAPHICS_LCD_ALT_WIRING, BQ_LCD_SMART_CONTROLLER, K3D_FULL_GRAPHIC_SMART_CONTROLLER)
244
+#elif ENABLED(ANET_FULL_GRAPHICS_LCD, ANET_FULL_GRAPHICS_LCD_ALT_WIRING)
245
+
246
+  #define IS_RRD_FG_SC 1
247
+  #define LCD_ST7920_DELAY_1 DELAY_NS(150)
248
+  #define LCD_ST7920_DELAY_2 DELAY_NS(150)
249
+  #define LCD_ST7920_DELAY_3 DELAY_NS(150)
250
+
251
+#elif ANY(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER, BQ_LCD_SMART_CONTROLLER, K3D_FULL_GRAPHIC_SMART_CONTROLLER)
245 252
 
246 253
   #define IS_RRD_FG_SC 1
247 254
 

+ 0
- 54
Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp Прегледај датотеку

@@ -33,60 +33,6 @@
33 33
 
34 34
 #include "ultralcd_st7920_u8glib_rrd_AVR.h"
35 35
 
36
-#if F_CPU >= 20000000
37
-  #define CPU_ST7920_DELAY_1 DELAY_NS(150)
38
-  #define CPU_ST7920_DELAY_2 DELAY_NS(0)
39
-  #define CPU_ST7920_DELAY_3 DELAY_NS(150)
40
-#elif MB(3DRAG, K8200, K8400)
41
-  #define CPU_ST7920_DELAY_1 DELAY_NS(0)
42
-  #define CPU_ST7920_DELAY_2 DELAY_NS(188)
43
-  #define CPU_ST7920_DELAY_3 DELAY_NS(0)
44
-#elif MB(MINIRAMBO, EINSY_RAMBO, EINSY_RETRO, SILVER_GATE)
45
-  #define CPU_ST7920_DELAY_1 DELAY_NS(0)
46
-  #define CPU_ST7920_DELAY_2 DELAY_NS(250)
47
-  #define CPU_ST7920_DELAY_3 DELAY_NS(0)
48
-#elif MB(RAMBO)
49
-  #define CPU_ST7920_DELAY_1 DELAY_NS(0)
50
-  #define CPU_ST7920_DELAY_2 DELAY_NS(0)
51
-  #define CPU_ST7920_DELAY_3 DELAY_NS(0)
52
-#elif MB(BQ_ZUM_MEGA_3D)
53
-  #define CPU_ST7920_DELAY_1 DELAY_NS(0)
54
-  #define CPU_ST7920_DELAY_2 DELAY_NS(0)
55
-  #define CPU_ST7920_DELAY_3 DELAY_NS(189)
56
-#elif defined(ARDUINO_ARCH_STM32)
57
-  #define CPU_ST7920_DELAY_1 DELAY_NS(300)
58
-  #define CPU_ST7920_DELAY_2 DELAY_NS(40)
59
-  #define CPU_ST7920_DELAY_3 DELAY_NS(340)
60
-#elif F_CPU == 16000000
61
-  #define CPU_ST7920_DELAY_1 DELAY_NS(125)
62
-  #define CPU_ST7920_DELAY_2 DELAY_NS(0)
63
-  #define CPU_ST7920_DELAY_3 DELAY_NS(188)
64
-#else
65
-  #error "No valid condition for delays in 'ultralcd_st7920_u8glib_rrd_AVR.h'"
66
-#endif
67
-
68
-#ifndef ST7920_DELAY_1
69
-  #ifdef BOARD_ST7920_DELAY_1
70
-    #define ST7920_DELAY_1 BOARD_ST7920_DELAY_1
71
-  #else
72
-    #define ST7920_DELAY_1 CPU_ST7920_DELAY_1
73
-  #endif
74
-#endif
75
-#ifndef ST7920_DELAY_2
76
-  #ifdef BOARD_ST7920_DELAY_2
77
-    #define ST7920_DELAY_2 BOARD_ST7920_DELAY_2
78
-  #else
79
-    #define ST7920_DELAY_2 CPU_ST7920_DELAY_2
80
-  #endif
81
-#endif
82
-#ifndef ST7920_DELAY_3
83
-  #ifdef BOARD_ST7920_DELAY_3
84
-    #define ST7920_DELAY_3 BOARD_ST7920_DELAY_3
85
-  #else
86
-    #define ST7920_DELAY_3 CPU_ST7920_DELAY_3
87
-  #endif
88
-#endif
89
-
90 36
 // Optimize this code with -O3
91 37
 #pragma GCC optimize (3)
92 38
 

+ 1
- 1
Marlin/src/pins/esp32/pins_MRR_ESPE.h Прегледај датотеку

@@ -122,7 +122,7 @@
122 122
 // LCDs and Controllers //
123 123
 //////////////////////////
124 124
 
125
-#if HAS_MARLINUI_U8GLIB
125
+#if HAS_WIRED_LCD
126 126
 
127 127
   #define LCD_PINS_RS                         13
128 128
   #define LCD_PINS_ENABLE                     17

+ 0
- 1
Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h Прегледај датотеку

@@ -63,7 +63,6 @@
63 63
  *          ------                    ------
64 64
  *           EXP2                      EXP1
65 65
  */
66
-
67 66
 #define EXP1_03_PIN                        -1
68 67
 #define EXP1_04_PIN                        -1
69 68
 #define EXP1_05_PIN                        -1

+ 8
- 9
Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h Прегледај датотеку

@@ -184,16 +184,15 @@
184 184
 #endif
185 185
 
186 186
 /**
187
- *               ------                                             ------
188
- *           NC | 1  2 | GND                                    5V | 1  2 | GND
189
- *        RESET | 3  4 | 1.31 (SD_DETECT)            (LCD_D7) 1.23 | 3  4 | 1.22 (LCD_D6)
190
- *  (MOSI) 0.18 | 5  6   3.25 (BTN_EN2)              (LCD_D5) 1.21 | 5  6   1.20 (LCD_D4)
191
- * (SD_SS) 0.16 | 7  8 | 3.26 (BTN_EN1)              (LCD_RS) 1.19 | 7  8 | 1.18 (LCD_EN)
192
- *   (SCK) 0.15 | 9 10 | 0.17 (MISO)                (BTN_ENC) 0.28 | 9 10 | 1.30 (BEEPER)
193
- *               ------                                             ------
194
- *               EXP2                                               EXP1
187
+ *                 ------                                     ------
188
+ *  (BEEPER) 1.30 |10  9 | 0.28 (BTN_ENC)        (MISO) 0.17 |10  9 | 0.15 (SCK)
189
+ *  (LCD_EN) 1.18 | 8  7 | 1.19  (LCD_RS)     (BTN_EN1) 3.26 | 8  7 | 0.16 (SD_SS)
190
+ *  (LCD_D4) 1.20   6  5 | 1.21  (LCD_D5)     (BTN_EN2) 3.25   6  5 | 0.18 (MOSI)
191
+ *  (LCD_D6) 1.22 | 4  3 | 1.23  (LCD_D7)   (SD_DETECT) 1.31 | 4  3 | RESET
192
+ *            GND | 2  1 | 5V                            GND | 2  1 | NC
193
+ *                 ------                                     ------
194
+ *                  EXP1                                       EXP2
195 195
  */
196
-
197 196
 #define EXP1_03_PIN                        P1_23
198 197
 #define EXP1_04_PIN                        P1_22
199 198
 #define EXP1_05_PIN                        P1_21

+ 9
- 10
Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h Прегледај датотеку

@@ -239,16 +239,15 @@
239 239
   #define TMC_BAUD_RATE                    19200
240 240
 #endif
241 241
 
242
-/**       ------                        ------
243
- *    NC | 1  2 | GND               5V | 1  2 | GND
244
- * RESET | 3  4 | 1.31            1.23 | 3  4 | 1.22
245
- *  0.18 | 5  6   3.25            1.21 | 5  6   1.20
246
- *  0.16 | 7  8 | 3.26            1.19 | 7  8 | 1.18
247
- *  0.15 | 9  10| 0.17            0.28 | 9  10| 1.30
248
- *        ------                        ------
249
- *         EXP2                          EXP1
242
+/**       ------                ------
243
+ *  1.30 |10  9 | 0.28    0.17 |10  9 | 0.15
244
+ *  1.18 | 8  7 | 1.19    3.26 | 8  7 | 0.16
245
+ *  1.20   6  5 | 1.21    3.25   6  5 | 0.18
246
+ *  1.22 | 4  3 | 1.23    1.31 | 4  3 | RESET
247
+ *   GND | 2  1 | 5V       GND | 2  1 | NC
248
+ *        ------                ------
249
+ *         EXP1                  EXP2
250 250
  */
251
-
252 251
 #define EXP1_03_PIN                        P1_23
253 252
 #define EXP1_04_PIN                        P1_22
254 253
 #define EXP1_05_PIN                        P1_21
@@ -258,7 +257,7 @@
258 257
 #define EXP1_09_PIN                        P0_28
259 258
 #define EXP1_10_PIN                        P1_30
260 259
 
261
-#define EXP2_03_PIN                        -1
260
+#define EXP2_03_PIN                        -1     // RESET
262 261
 #define EXP2_04_PIN                        P1_31
263 262
 #define EXP2_05_PIN                        P0_18
264 263
 #define EXP2_06_PIN                        P3_25

+ 0
- 1
Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h Прегледај датотеку

@@ -237,7 +237,6 @@
237 237
  *                ------                                        ------
238 238
  *                 EXP1                                          EXP2
239 239
  */
240
-
241 240
 #define EXP1_03_PIN                        P1_22
242 241
 #define EXP1_04_PIN                        P1_00
243 242
 #define EXP1_05_PIN                        P0_17

+ 0
- 1
Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h Прегледај датотеку

@@ -188,7 +188,6 @@
188 188
  *                  ------
189 189
  *                   EXP
190 190
  */
191
-
192 191
 #define EXP1_03_PIN                        P0_18
193 192
 #define EXP1_04_PIN                        P0_17
194 193
 #define EXP1_05_PIN                        P0_15

+ 1
- 1
Marlin/src/pins/mega/pins_OVERLORD.h Прегледај датотеку

@@ -119,7 +119,7 @@
119 119
 //
120 120
 // LCD / Controller
121 121
 //
122
-#if HAS_MARLINUI_U8GLIB
122
+#if HAS_WIRED_LCD
123 123
   // OVERLORD OLED pins
124 124
   #define LCD_PINS_RS                         20
125 125
   #define LCD_PINS_D5                         21

+ 4
- 1
Marlin/src/pins/mega/pins_SILVER_GATE.h Прегледај датотеку

@@ -72,7 +72,7 @@
72 72
 #define HEATER_BED_PIN                         8
73 73
 #define TEMP_BED_PIN                           6
74 74
 
75
-#if HAS_MARLINUI_U8GLIB
75
+#if HAS_WIRED_LCD
76 76
   #if ENABLED(U8GLIB_ST7920)                      // SPI GLCD 12864 ST7920
77 77
     #define LCD_PINS_RS                       30
78 78
     #define LCD_PINS_ENABLE                   20
@@ -86,6 +86,9 @@
86 86
       #define KILL_PIN                        21
87 87
       #define HOME_PIN                        28
88 88
     #endif
89
+    #define BOARD_ST7920_DELAY_1   DELAY_NS(  0)
90
+    #define BOARD_ST7920_DELAY_2   DELAY_NS(250)
91
+    #define BOARD_ST7920_DELAY_3   DELAY_NS(  0)
89 92
   #endif
90 93
 #endif
91 94
 

+ 31
- 7
Marlin/src/pins/pins_postprocess.h Прегледај датотеку

@@ -1221,23 +1221,47 @@
1221 1221
 //
1222 1222
 // Default DOGLCD SPI delays
1223 1223
 //
1224
-#if HAS_MARLINUI_U8GLIB
1225
-  #if !defined(ST7920_DELAY_1) && defined(BOARD_ST7920_DELAY_1)
1226
-    #define ST7920_DELAY_1 BOARD_ST7920_DELAY_1
1224
+#if ENABLED(U8GLIB_ST7920)
1225
+  #ifndef ST7920_DELAY_1
1226
+    #ifdef LCD_ST7920_DELAY_1
1227
+      #define ST7920_DELAY_1 LCD_ST7920_DELAY_1
1228
+    #elif defined(BOARD_ST7920_DELAY_1)
1229
+      #define ST7920_DELAY_1 BOARD_ST7920_DELAY_1
1230
+    #elif defined(CPU_ST7920_DELAY_1)
1231
+      #define ST7920_DELAY_1 CPU_ST7920_DELAY_1
1232
+    #endif
1227 1233
   #endif
1228
-  #if !defined(ST7920_DELAY_2) && defined(BOARD_ST7920_DELAY_2)
1229
-    #define ST7920_DELAY_2 BOARD_ST7920_DELAY_2
1234
+  #ifndef ST7920_DELAY_2
1235
+    #ifdef LCD_ST7920_DELAY_2
1236
+      #define ST7920_DELAY_2 LCD_ST7920_DELAY_2
1237
+    #elif defined(BOARD_ST7920_DELAY_2)
1238
+      #define ST7920_DELAY_2 BOARD_ST7920_DELAY_2
1239
+    #elif defined(CPU_ST7920_DELAY_2)
1240
+      #define ST7920_DELAY_2 CPU_ST7920_DELAY_2
1241
+    #endif
1230 1242
   #endif
1231
-  #if !defined(ST7920_DELAY_3) && defined(BOARD_ST7920_DELAY_3)
1232
-    #define ST7920_DELAY_3 BOARD_ST7920_DELAY_3
1243
+  #ifndef ST7920_DELAY_3
1244
+    #ifdef LCD_ST7920_DELAY_3
1245
+      #define ST7920_DELAY_3 LCD_ST7920_DELAY_3
1246
+    #elif defined(BOARD_ST7920_DELAY_3)
1247
+      #define ST7920_DELAY_3 BOARD_ST7920_DELAY_3
1248
+    #elif defined(CPU_ST7920_DELAY_3)
1249
+      #define ST7920_DELAY_3 CPU_ST7920_DELAY_3
1250
+    #endif
1233 1251
   #endif
1234 1252
 #else
1235 1253
   #undef ST7920_DELAY_1
1236 1254
   #undef ST7920_DELAY_2
1237 1255
   #undef ST7920_DELAY_3
1256
+  #undef LCD_ST7920_DELAY_1
1257
+  #undef LCD_ST7920_DELAY_2
1258
+  #undef LCD_ST7920_DELAY_3
1238 1259
   #undef BOARD_ST7920_DELAY_1
1239 1260
   #undef BOARD_ST7920_DELAY_2
1240 1261
   #undef BOARD_ST7920_DELAY_3
1262
+  #undef CPU_ST7920_DELAY_1
1263
+  #undef CPU_ST7920_DELAY_2
1264
+  #undef CPU_ST7920_DELAY_3
1241 1265
 #endif
1242 1266
 
1243 1267
 #if !NEED_CASE_LIGHT_PIN

+ 6
- 0
Marlin/src/pins/rambo/pins_EINSY_RAMBO.h Прегледај датотеку

@@ -205,4 +205,10 @@
205 205
   #endif // IS_ULTIPANEL || TOUCH_UI_ULTIPANEL
206 206
 #endif // HAS_WIRED_LCD
207 207
 
208
+#if ENABLED(U8GLIB_ST7920)
209
+  #define BOARD_ST7920_DELAY_1     DELAY_NS(  0)
210
+  #define BOARD_ST7920_DELAY_2     DELAY_NS(250)
211
+  #define BOARD_ST7920_DELAY_3     DELAY_NS(  0)
212
+#endif
213
+
208 214
 #undef MK3_FAN_PINS

+ 7
- 0
Marlin/src/pins/rambo/pins_EINSY_RETRO.h Прегледај датотеку

@@ -199,3 +199,10 @@
199 199
   #endif // IS_ULTIPANEL || TOUCH_UI_ULTIPANEL || TOUCH_UI_FTDI_EVE
200 200
 
201 201
 #endif // HAS_WIRED_LCD || TOUCH_UI_ULTIPANEL || TOUCH_UI_FTDI_EVE
202
+
203
+// Alter timing for graphical display
204
+#if ENABLED(U8GLIB_ST7920)
205
+  #define BOARD_ST7920_DELAY_1     DELAY_NS(  0)
206
+  #define BOARD_ST7920_DELAY_2     DELAY_NS(250)
207
+  #define BOARD_ST7920_DELAY_3     DELAY_NS(  0)
208
+#endif

+ 7
- 1
Marlin/src/pins/rambo/pins_MINIRAMBO.h Прегледај датотеку

@@ -69,7 +69,7 @@
69 69
 #define E0_DIR_PIN                            43
70 70
 #define E0_ENABLE_PIN                         26
71 71
 
72
-// Microstepping pins - Mapping not from fastio.h (?)
72
+// Microstepping pins
73 73
 #define X_MS1_PIN                             40
74 74
 #define X_MS2_PIN                             41
75 75
 #define Y_MS1_PIN                             69
@@ -192,3 +192,9 @@
192 192
   #endif // IS_ULTIPANEL || TOUCH_UI_ULTIPANEL
193 193
 
194 194
 #endif // HAS_WIRED_LCD || TOUCH_UI_ULTIPANEL
195
+
196
+#if ENABLED(U8GLIB_ST7920)
197
+  #define BOARD_ST7920_DELAY_1     DELAY_NS(  0)
198
+  #define BOARD_ST7920_DELAY_2     DELAY_NS(250)
199
+  #define BOARD_ST7920_DELAY_3     DELAY_NS(  0)
200
+#endif

+ 7
- 0
Marlin/src/pins/rambo/pins_RAMBO.h Прегледај датотеку

@@ -268,3 +268,10 @@
268 268
   #endif // !IS_NEWPANEL
269 269
 
270 270
 #endif // HAS_WIRED_LCD
271
+
272
+// Alter timing for graphical display
273
+#if ENABLED(U8GLIB_ST7920)
274
+  #define BOARD_ST7920_DELAY_1       DELAY_NS(0)
275
+  #define BOARD_ST7920_DELAY_2       DELAY_NS(0)
276
+  #define BOARD_ST7920_DELAY_3       DELAY_NS(0)
277
+#endif

+ 7
- 0
Marlin/src/pins/ramps/pins_3DRAG.h Прегледај датотеку

@@ -80,6 +80,7 @@
80 80
 #if IS_ULTRA_LCD && IS_NEWPANEL
81 81
   #undef BEEPER_PIN
82 82
 
83
+  // TODO: Remap EXP1/2 based on adapter
83 84
   #undef LCD_PINS_RS
84 85
   #undef LCD_PINS_ENABLE
85 86
   #undef LCD_PINS_D4
@@ -107,6 +108,12 @@
107 108
 
108 109
 #endif // IS_ULTRA_LCD && IS_NEWPANEL
109 110
 
111
+#if ENABLED(U8GLIB_ST7920)
112
+  #define BOARD_ST7920_DELAY_1     DELAY_NS(  0)
113
+  #define BOARD_ST7920_DELAY_2     DELAY_NS(188)
114
+  #define BOARD_ST7920_DELAY_3     DELAY_NS(  0)
115
+#endif
116
+
110 117
 /**
111 118
  *  M3/M4/M5 - Spindle/Laser Control
112 119
  *

+ 2
- 4
Marlin/src/pins/ramps/pins_BAM_DICE_DUE.h Прегледај датотеку

@@ -38,12 +38,10 @@
38 38
 #define SPINDLE_DIR_PIN                       67
39 39
 #define SPINDLE_LASER_PWM_PIN                 44  // Hardware PWM
40 40
 
41
-#include "pins_RAMPS.h"
42
-
43 41
 //
44 42
 // Temperature Sensors
45 43
 //
46
-#undef TEMP_0_PIN
47
-#undef TEMP_1_PIN
48 44
 #define TEMP_0_PIN                             9  // Analog Input
49 45
 #define TEMP_1_PIN                            11  // Analog Input
46
+
47
+#include "pins_RAMPS.h"

+ 7
- 0
Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h Прегледај датотеку

@@ -123,3 +123,10 @@
123 123
   #undef HEATER_BED_PIN
124 124
   #define HEATER_BED_PIN                       8
125 125
 #endif
126
+
127
+// Alter timing for graphical display
128
+#if ENABLED(U8GLIB_ST7920)
129
+  #define BOARD_ST7920_DELAY_1     DELAY_NS(  0)
130
+  #define BOARD_ST7920_DELAY_2     DELAY_NS(  0)
131
+  #define BOARD_ST7920_DELAY_3     DELAY_NS(189)
132
+#endif

+ 2
- 4
Marlin/src/pins/ramps/pins_DAGOMA_F5.h Прегледај датотеку

@@ -39,10 +39,8 @@
39 39
   #define FIL_RUNOUT2_PIN                     14
40 40
 #endif
41 41
 
42
-//
43
-// LCD delays
44
-//
45
-#if HAS_MARLINUI_U8GLIB
42
+// Alter timing for graphical display
43
+#if ENABLED(U8GLIB_ST7920)
46 44
   #define BOARD_ST7920_DELAY_1 DELAY_NS(0)
47 45
   #define BOARD_ST7920_DELAY_2 DELAY_NS(250)
48 46
   #define BOARD_ST7920_DELAY_3 DELAY_NS(250)

+ 5
- 10
Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h Прегледај датотеку

@@ -198,14 +198,9 @@
198 198
   #define LCD_PINS_D7                         29
199 199
 #endif
200 200
 
201
-#if HAS_MARLINUI_U8GLIB
202
-  #ifndef BOARD_ST7920_DELAY_1
203
-    #define BOARD_ST7920_DELAY_1 DELAY_NS(200)
204
-  #endif
205
-  #ifndef BOARD_ST7920_DELAY_2
206
-    #define BOARD_ST7920_DELAY_2 DELAY_NS(200)
207
-  #endif
208
-  #ifndef BOARD_ST7920_DELAY_3
209
-    #define BOARD_ST7920_DELAY_3 DELAY_NS(200)
210
-  #endif
201
+// Alter timing for graphical display
202
+#if ENABLED(U8GLIB_ST7920)
203
+  #define BOARD_ST7920_DELAY_1     DELAY_NS(200)
204
+  #define BOARD_ST7920_DELAY_2     DELAY_NS(200)
205
+  #define BOARD_ST7920_DELAY_3     DELAY_NS(200)
211 206
 #endif

+ 0
- 21
Marlin/src/pins/ramps/pins_K8600.h Прегледај датотеку

@@ -60,30 +60,9 @@
60 60
 //
61 61
 // Steppers
62 62
 //
63
-#undef X_STEP_PIN
64
-#undef X_DIR_PIN
65
-#undef X_ENABLE_PIN
66
-#define X_STEP_PIN                            54
67
-#define X_DIR_PIN                             55
68
-#define X_ENABLE_PIN                          38
69
-
70
-#undef Y_STEP_PIN
71
-#undef Y_DIR_PIN
72
-#undef Y_ENABLE_PIN
73
-#define Y_STEP_PIN                            60
74
-#define Y_DIR_PIN                             61
75
-#define Y_ENABLE_PIN                          56
76
-
77 63
 #undef Z_ENABLE_PIN
78 64
 #define Z_ENABLE_PIN                          63
79 65
 
80
-#undef E0_STEP_PIN
81
-#undef E0_DIR_PIN
82
-#undef E0_ENABLE_PIN
83
-#define E0_STEP_PIN                           26
84
-#define E0_DIR_PIN                            28
85
-#define E0_ENABLE_PIN                         24
86
-
87 66
 //
88 67
 // Heaters / Fans
89 68
 //

+ 26
- 43
Marlin/src/pins/ramps/pins_MKS_GEN_13.h Прегледај датотеку

@@ -54,6 +54,9 @@
54 54
 
55 55
 #include "pins_RAMPS.h"
56 56
 
57
+#undef EXP2_03_PIN
58
+#define EXP2_03_PIN                           -1  // RESET
59
+
57 60
 //
58 61
 // LCD / Controller
59 62
 //
@@ -81,19 +84,21 @@
81 84
    *
82 85
    * This configuration uses the following arrangement:
83 86
    *
84
-   * EXP1 D37 = EN2   D35 = EN1     EXP2 D50 = MISO  D52 = SCK
85
-   *      D17 = BLUE  D16 = RED          D31 = ENC   D53 = SDCS
86
-   *      D23 = KILL  D25 = BUZZ         D33 = ---   D51 = MOSI
87
-   *      D27 = A0    D29 = LCS          D49 = SDCD  RST = ---
88
-   *      GND = GND   5V  = 5V           GND = ---   D41 = ---
87
+   *             ------                       ------
88
+   *       ENCB |10  9 |  ENCA          MISO |10  9 | SCK
89
+   *   BLUE_LED | 8  7 |  RED_LED     ENCBTN | 8  7 | SDCS
90
+   *       KILL   6  5 |  BEEPER               6  5 | MOSI
91
+   *         A0 | 4  3 |  LCD_CS        SDCD | 4  3 |
92
+   *        GND | 2  1 | 5V              GND | 2  1 | NC
93
+   *             ------                       ------
94
+   *              EXP1                         EXP2
89 95
    */
90
-
96
+  #undef SD_DETECT_PIN
91 97
   #undef BTN_EN1
92 98
   #undef BTN_EN2
93 99
   #undef BTN_ENC
94 100
   #undef DOGLCD_A0
95 101
   #undef DOGLCD_CS
96
-  #undef SD_DETECT_PIN
97 102
   #undef BEEPER_PIN
98 103
   #undef KILL_PIN
99 104
   #undef STAT_LED_RED_PIN
@@ -102,46 +107,24 @@
102 107
   //
103 108
   // VIKI2 12-wire lead
104 109
   //
110
+  #define SD_DETECT_PIN              EXP2_04_PIN  // SDCD     orange/white
111
+  #define BTN_EN1                    EXP1_09_PIN  // ENCA     white
112
+  #define BTN_EN2                    EXP1_10_PIN  // ENCB     green
113
+  #define BTN_ENC                    EXP2_08_PIN  // ENCBTN   purple
114
+  #define DOGLCD_A0                  EXP1_04_PIN  // A0       brown
115
+  #define DOGLCD_CS                  EXP1_03_PIN  // LCS      green/white
105 116
 
106
-  // orange/white          SDCD
107
-  #define SD_DETECT_PIN                       49
108
-
109
-  // white                 ENCA
110
-  #define BTN_EN1                             35
111
-
112
-  // green                 ENCB
113
-  #define BTN_EN2                             37
114
-
115
-  // purple                ENCBTN
116
-  #define BTN_ENC                             31
117
-
118
-  // brown                 A0
119
-  #define DOGLCD_A0                           27
117
+  // EXP2_10_PIN  gray   MISO
118
+  // EXP2_05_PIN  yellow MOSI
119
+  // EXP2_09_PIN  orange SCK
120 120
 
121
-  // green/white           LCS
122
-  #define DOGLCD_CS                           29
123
-
124
-                        // 50    gray   MISO
125
-                        // 51    yellow MOSI
126
-                        // 52    orange SCK
127
-
128
-  // blue                  SDCS
129
-  //#define SDSS                              53
121
+  //#define SDSS                     EXP2_07_PIN  // SDCS     blue
130 122
 
131 123
   //
132 124
   // VIKI2 4-wire lead
133 125
   //
134
-
135
-  // blue                  BTN
136
-  #define KILL_PIN                            23
137
-
138
-  // green                 BUZZER
139
-  #define BEEPER_PIN                          25
140
-
141
-  // yellow                RED-LED
142
-  #define STAT_LED_RED_PIN                    16
143
-
144
-  // white                 BLUE-LED
145
-  #define STAT_LED_BLUE_PIN                   17
146
-
126
+  #define KILL_PIN                   EXP1_06_PIN  // BTN      blue
127
+  #define BEEPER_PIN                 EXP1_05_PIN  // BUZZER   green
128
+  #define STAT_LED_RED_PIN           EXP1_07_PIN  // RED-LED  yellow
129
+  #define STAT_LED_BLUE_PIN          EXP1_08_PIN  // BLUE-LED white
147 130
 #endif

+ 75
- 49
Marlin/src/pins/ramps/pins_RAMPS.h Прегледај датотеку

@@ -120,14 +120,14 @@
120 120
 #define X_DIR_PIN                             55
121 121
 #define X_ENABLE_PIN                          38
122 122
 #ifndef X_CS_PIN
123
-  #define X_CS_PIN                   EXP2_07_PIN
123
+  #define X_CS_PIN                   AUX3_03_PIN
124 124
 #endif
125 125
 
126 126
 #define Y_STEP_PIN                            60
127 127
 #define Y_DIR_PIN                             61
128 128
 #define Y_ENABLE_PIN                          56
129 129
 #ifndef Y_CS_PIN
130
-  #define Y_CS_PIN                   EXP2_04_PIN
130
+  #define Y_CS_PIN                   AUX3_07_PIN
131 131
 #endif
132 132
 
133 133
 #ifndef Z_STEP_PIN
@@ -242,7 +242,7 @@
242 242
 // Misc. Functions
243 243
 //
244 244
 #ifndef SDSS
245
-  #define SDSS                       EXP2_07_PIN
245
+  #define SDSS                       AUX3_03_PIN
246 246
 #endif
247 247
 #define LED_PIN                               13
248 248
 
@@ -424,58 +424,79 @@
424 424
 #endif
425 425
 
426 426
 //
427
-// Aux 3 GND D52 D50 5V
428
-//       NC  D53 D51 D49
427
+// AUX3 : GND D52 D50 5V
428
+//        NC  D53 D51 D49
429
+
430
+#define AUX3_03_PIN                           53
431
+#define AUX3_04_PIN                           52
432
+#define AUX3_05_PIN                           51
433
+#define AUX3_06_PIN                           50
434
+#define AUX3_07_PIN                           49
429 435
 
430 436
 //
431
-// Aux 4 D16 D17 D23 D25 D27 D29 D31 D33 D35 D37 D39 D41 D43 D45 D47 D32 GND 5V
437
+// AUX4 : D16 D17 D23 D25 D27 D29 D31 D33 D35 D37 D39 D41 D43 D45 D47 D32 GND 5V
432 438
 //
433 439
 
440
+#define AUX4_03_PIN                           32
441
+#define AUX4_04_PIN                           47
442
+#define AUX4_05_PIN                           45
443
+#define AUX4_06_PIN                           43
444
+#define AUX4_07_PIN                           41
445
+#define AUX4_08_PIN                           39
446
+#define AUX4_09_PIN                           37
447
+#define AUX4_10_PIN                           35
448
+#define AUX4_11_PIN                           33
449
+#define AUX4_12_PIN                           31
450
+#define AUX4_13_PIN                           29
451
+#define AUX4_14_PIN                           27
452
+#define AUX4_15_PIN                           25
453
+#define AUX4_16_PIN                           23
454
+#define AUX4_17_PIN                           17
455
+#define AUX4_18_PIN                           16
456
+
434 457
 /**
435
- * LCD adapter. Please note: These comes in two variants. The socket keys can be
458
+ * LCD adapter. NOTE: These come in two variants. The socket keys can be
436 459
  * on either side, and may be backwards on some boards / displays.
437
- *         -----                           -----
438
- *    D37 |10 9 | D35          (MISO) D50 |10 9 | D52 (SCK)
439
- *    D17 | 8 7 | D16                 D31 | 8 7 | D53
440
- *    D23   6 5   D25                 D33   6 5   D51 (MOSI)
441
- *    D27 | 4 3 | D29                 D49 | 4 3 | D41
442
- *    GND | 2 1 | 5V                  GND | 2 1 | NC
443
- *         -----                           -----
444
- *         EXP1                            EXP2
460
+ *         ------                     ------
461
+ *    D37 |10  9 | D35    (MISO) D50 |10  9 | D52 (SCK)
462
+ *    D17 | 8  7 | D16           D31 | 8  7 | D53
463
+ *    D23   6  5   D25           D33   6  5   D51 (MOSI)
464
+ *    D27 | 4  3 | D29           D49 | 4  3 | D41
465
+ *    GND | 2  1 | 5V            GND | 2  1 | NC
466
+ *         ------                     ------
467
+ *          EXP1                       EXP2
445 468
  */
446
-
447 469
 #ifndef EXP1_03_PIN
448
-  #define EXP1_03_PIN                         29
449
-  #define EXP1_04_PIN                         27
450
-  #define EXP1_05_PIN                         25
451
-  #define EXP1_06_PIN                         23
452
-  #define EXP1_07_PIN                         16
453
-  #define EXP1_08_PIN                         17
454
-  #define EXP1_09_PIN                         35
455
-  #define EXP1_10_PIN                         37
456
-
457
-  #define EXP2_03_PIN                         41
458
-  #define EXP2_04_PIN                         49
459
-  #define EXP2_05_PIN                         51
460
-  #define EXP2_06_PIN                         33
461
-  #define EXP2_07_PIN                         53
462
-  #define EXP2_08_PIN                         31
463
-  #define EXP2_09_PIN                         52
464
-  #define EXP2_10_PIN                         50
470
+  #define EXP1_03_PIN                AUX4_13_PIN
471
+  #define EXP1_04_PIN                AUX4_14_PIN
472
+  #define EXP1_05_PIN                AUX4_15_PIN
473
+  #define EXP1_06_PIN                AUX4_16_PIN
474
+  #define EXP1_07_PIN                AUX4_18_PIN
475
+  #define EXP1_08_PIN                AUX4_17_PIN
476
+  #define EXP1_09_PIN                AUX4_10_PIN
477
+  #define EXP1_10_PIN                AUX4_09_PIN
478
+
479
+  #define EXP2_03_PIN                AUX4_07_PIN
480
+  #define EXP2_04_PIN                AUX3_07_PIN
481
+  #define EXP2_05_PIN                AUX3_05_PIN
482
+  #define EXP2_06_PIN                AUX4_11_PIN
483
+  #define EXP2_07_PIN                AUX3_03_PIN
484
+  #define EXP2_08_PIN                AUX4_12_PIN
485
+  #define EXP2_09_PIN                AUX3_04_PIN
486
+  #define EXP2_10_PIN                AUX3_06_PIN
465 487
 #endif
466 488
 
467 489
 //////////////////////////
468 490
 // LCDs and Controllers //
469 491
 //////////////////////////
470 492
 
471
-// GLCD features
472
-// Uncomment screen orientation
473
-//#define LCD_SCREEN_ROT_90
474
-//#define LCD_SCREEN_ROT_180
475
-//#define LCD_SCREEN_ROT_270
476
-
477 493
 #if HAS_WIRED_LCD
478 494
 
495
+  // Uncomment screen orientation
496
+  //#define LCD_SCREEN_ROT_90
497
+  //#define LCD_SCREEN_ROT_180
498
+  //#define LCD_SCREEN_ROT_270
499
+
479 500
   //
480 501
   // LCD Display output pins
481 502
   //
@@ -587,7 +608,7 @@
587 608
       #endif
588 609
 
589 610
       #if ENABLED(BQ_LCD_SMART_CONTROLLER)
590
-        #define LCD_BACKLIGHT_PIN             39
611
+        #define LCD_BACKLIGHT_PIN    AUX4_08_PIN
591 612
       #endif
592 613
 
593 614
     #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
@@ -599,9 +620,9 @@
599 620
 
600 621
     #elif ENABLED(LCD_I2C_PANELOLU2)
601 622
 
602
-      #define BTN_EN1                         47
603
-      #define BTN_EN2                         43
604
-      #define BTN_ENC                         32
623
+      #define BTN_EN1                AUX4_04_PIN
624
+      #define BTN_EN2                AUX4_06_PIN
625
+      #define BTN_ENC                AUX4_03_PIN
605 626
       #define LCD_SDSS                      SDSS
606 627
       #define KILL_PIN               EXP2_03_PIN
607 628
 
@@ -725,13 +746,23 @@
725 746
 
726 747
       // Pins only defined for RAMPS_SMART currently
727 748
 
749
+    #elif ENABLED(G3D_PANEL)
750
+
751
+      #define BEEPER_PIN             EXP2_06_PIN
752
+
753
+      #define SD_DETECT_PIN          EXP2_04_PIN
754
+      #define KILL_PIN               EXP2_03_PIN
755
+
756
+      #define BTN_EN1                EXP1_10_PIN
757
+      #define BTN_EN2                EXP1_09_PIN
758
+      #define BTN_ENC                EXP2_08_PIN
759
+
728 760
     #elif IS_TFTGLCD_PANEL
729 761
 
730 762
       #define SD_DETECT_PIN          EXP2_04_PIN
731 763
 
732 764
     #else
733 765
 
734
-      // Beeper on AUX-4
735 766
       #define BEEPER_PIN             EXP2_06_PIN
736 767
 
737 768
       // Buttons are directly attached to AUX-2
@@ -745,11 +776,6 @@
745 776
         #define BTN_ENC              EXP2_08_PIN
746 777
       #endif
747 778
 
748
-      #if ENABLED(G3D_PANEL)
749
-        #define SD_DETECT_PIN        EXP2_04_PIN
750
-        #define KILL_PIN             EXP2_03_PIN
751
-      #endif
752
-
753 779
     #endif
754 780
   #endif // IS_NEWPANEL
755 781
 

+ 13
- 0
Marlin/src/pins/sanguino/pins_MELZI.h Прегледај датотеку

@@ -31,4 +31,17 @@
31 31
 
32 32
 #define IS_MELZI 1
33 33
 
34
+// Alter timing for graphical display
35
+#if ENABLED(U8GLIB_ST7920)
36
+  #ifndef BOARD_ST7920_DELAY_1
37
+    #define BOARD_ST7920_DELAY_1   DELAY_NS(  0)
38
+  #endif
39
+  #ifndef BOARD_ST7920_DELAY_2
40
+    #define BOARD_ST7920_DELAY_2   DELAY_NS(188)
41
+  #endif
42
+  #ifndef BOARD_ST7920_DELAY_3
43
+    #define BOARD_ST7920_DELAY_3   DELAY_NS(  0)
44
+  #endif
45
+#endif
46
+
34 47
 #include "pins_SANGUINOLOLU_12.h"

+ 11
- 17
Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h Прегледај датотеку

@@ -36,16 +36,10 @@
36 36
 #define BOARD_INFO_NAME "Melzi (Creality)"
37 37
 
38 38
 // Alter timing for graphical display
39
-#if HAS_MARLINUI_U8GLIB
40
-  #ifndef BOARD_ST7920_DELAY_1
41
-    #define BOARD_ST7920_DELAY_1 DELAY_NS(125)
42
-  #endif
43
-  #ifndef BOARD_ST7920_DELAY_2
44
-    #define BOARD_ST7920_DELAY_2 DELAY_NS(125)
45
-  #endif
46
-  #ifndef BOARD_ST7920_DELAY_3
47
-    #define BOARD_ST7920_DELAY_3 DELAY_NS(125)
48
-  #endif
39
+#if ENABLED(U8GLIB_ST7920)
40
+  #define BOARD_ST7920_DELAY_1     DELAY_NS(125)
41
+  #define BOARD_ST7920_DELAY_2     DELAY_NS(125)
42
+  #define BOARD_ST7920_DELAY_3     DELAY_NS(125)
49 43
 #endif
50 44
 
51 45
 #include "pins_MELZI.h"
@@ -137,11 +131,11 @@
137 131
 
138 132
 /**
139 133
  *    EXP1 Connector                      EXP1 as CR10 STOCKDISPLAY
140
- *        -----                                      -----
141
- *   PA4 | 6 5 | PC0                     BEEPER_PIN | 6 5 | BTN_ENC
142
- *   PD3 | 7 4 | RESET                      BTN_EN1 | 7 4 | RESET
143
- *   PD2   8 3 | PA1                        BTN_EN2   8 3 | LCD_PINS_D4 (ST9720 CLK)
144
- *   PA3 | 9 2 | PC1        (ST9720 CS) LCD_PINS_RS | 9 2 | LCD_PINS_ENABLE (ST9720 DAT)
145
- *   GND |10 1 | 5V                             GND |10 1 | 5V
146
- *        -----                                   -----
134
+ *        ------                                      ------
135
+ *   PA4 |10  9 | PC0                     BEEPER_PIN |10  9 | BTN_ENC
136
+ *   PD3 | 8  7 | RESET                      BTN_EN1 | 8  7 | RESET
137
+ *   PD2   6  5 | PA1                        BTN_EN2   6  5 | LCD_PINS_D4     (ST9720 CLK)
138
+ *   PA3 | 4  3 | PC1        (ST9720 CS) LCD_PINS_RS | 4  3 | LCD_PINS_ENABLE (ST9720 DAT)
139
+ *   GND | 2  1 | 5V                             GND | 2  1 | 5V
140
+ *        ------                                      ------
147 141
  */

+ 0
- 13
Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h Прегледај датотеку

@@ -27,19 +27,6 @@
27 27
 
28 28
 #define BOARD_INFO_NAME "Melzi (Malyan)"
29 29
 
30
-// Alter timing for graphical display
31
-#if HAS_MARLINUI_U8GLIB
32
-  #ifndef BOARD_ST7920_DELAY_1
33
-    #define BOARD_ST7920_DELAY_1 DELAY_NS(125)
34
-  #endif
35
-  #ifndef BOARD_ST7920_DELAY_2
36
-    #define BOARD_ST7920_DELAY_2 DELAY_NS(125)
37
-  #endif
38
-  #ifndef BOARD_ST7920_DELAY_3
39
-    #define BOARD_ST7920_DELAY_3 DELAY_NS(125)
40
-  #endif
41
-#endif
42
-
43 30
 #include "pins_MELZI.h"
44 31
 
45 32
 #undef LCD_SDSS

+ 5
- 10
Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h Прегледај датотеку

@@ -27,16 +27,11 @@
27 27
 
28 28
 #define BOARD_INFO_NAME "Melzi (Tronxy)"
29 29
 
30
-#if HAS_MARLINUI_U8GLIB
31
-  #ifndef BOARD_ST7920_DELAY_1
32
-    #define BOARD_ST7920_DELAY_1 DELAY_NS(0)
33
-  #endif
34
-  #ifndef BOARD_ST7920_DELAY_2
35
-    #define BOARD_ST7920_DELAY_2 DELAY_NS(125)
36
-  #endif
37
-  #ifndef BOARD_ST7920_DELAY_3
38
-    #define BOARD_ST7920_DELAY_3 DELAY_NS(0)
39
-  #endif
30
+// Alter timing for graphical display
31
+#if ENABLED(U8GLIB_ST7920)
32
+  #define BOARD_ST7920_DELAY_1     DELAY_NS(  0)
33
+  #define BOARD_ST7920_DELAY_2     DELAY_NS(125)
34
+  #define BOARD_ST7920_DELAY_3     DELAY_NS(  0)
40 35
 #endif
41 36
 
42 37
 #include "pins_MELZI.h"

+ 5
- 10
Marlin/src/pins/sanguino/pins_MELZI_V2.h Прегледај датотеку

@@ -24,16 +24,11 @@
24 24
 
25 25
 #define BOARD_INFO_NAME "Melzi V2"
26 26
 
27
-#if HAS_MARLINUI_U8GLIB
28
-  #ifndef BOARD_ST7920_DELAY_1
29
-    #define BOARD_ST7920_DELAY_1 DELAY_NS(0)
30
-  #endif
31
-  #ifndef BOARD_ST7920_DELAY_2
32
-    #define BOARD_ST7920_DELAY_2 DELAY_NS(400)
33
-  #endif
34
-  #ifndef BOARD_ST7920_DELAY_3
35
-    #define BOARD_ST7920_DELAY_3 DELAY_NS(0)
36
-  #endif
27
+// Alter timing for graphical display
28
+#if ENABLED(U8GLIB_ST7920)
29
+  #define BOARD_ST7920_DELAY_1     DELAY_NS(  0)
30
+  #define BOARD_ST7920_DELAY_2     DELAY_NS(400)
31
+  #define BOARD_ST7920_DELAY_3     DELAY_NS(  0)
37 32
 #endif
38 33
 
39 34
 #include "pins_MELZI.h"

+ 0
- 23
Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h Прегледај датотеку

@@ -165,16 +165,6 @@
165 165
       #define KILL_PIN                        10
166 166
       #define BEEPER_PIN                      27
167 167
 
168
-      #ifndef BOARD_ST7920_DELAY_1
169
-        #define BOARD_ST7920_DELAY_1 DELAY_NS(0)
170
-      #endif
171
-      #ifndef BOARD_ST7920_DELAY_2
172
-        #define BOARD_ST7920_DELAY_2 DELAY_NS(188)
173
-      #endif
174
-      #ifndef BOARD_ST7920_DELAY_3
175
-        #define BOARD_ST7920_DELAY_3 DELAY_NS(0)
176
-      #endif
177
-
178 168
     #elif ENABLED(U8GLIB_ST7920)                  // SPI GLCD 12864 ST7920 ( like [www.digole.com] ) For Melzi V2.0
179 169
 
180 170
       #if IS_MELZI
@@ -185,19 +175,6 @@
185 175
         // Marlin so this can be used for BEEPER_PIN. You can use this pin
186 176
         // with M42 instead of BEEPER_PIN.
187 177
         #define BEEPER_PIN                    27
188
-
189
-        #if IS_RRD_FG_SC
190
-          #ifndef BOARD_ST7920_DELAY_1
191
-            #define BOARD_ST7920_DELAY_1 DELAY_NS(0)
192
-          #endif
193
-          #ifndef BOARD_ST7920_DELAY_2
194
-            #define BOARD_ST7920_DELAY_2 DELAY_NS(188)
195
-          #endif
196
-          #ifndef BOARD_ST7920_DELAY_3
197
-            #define BOARD_ST7920_DELAY_3 DELAY_NS(0)
198
-          #endif
199
-        #endif
200
-
201 178
       #else                                       // Sanguinololu >=1.3
202 179
         #define LCD_PINS_RS                    4
203 180
         #define LCD_PINS_ENABLE               17

+ 3
- 4
Marlin/src/pins/sanguino/pins_ZMIB_V2.h Прегледај датотеку

@@ -189,10 +189,9 @@
189 189
   #endif
190 190
   #define LCD_PINS_D4                         10  // ST7920_CLK_PIN LCD_PIN_ENABLE (PIN6 of LCD module)
191 191
 
192
-  // Alter timing for graphical display
193
-  #define ST7920_DELAY_1             DELAY_2_NOP
194
-  #define ST7920_DELAY_2             DELAY_2_NOP
195
-  #define ST7920_DELAY_3             DELAY_2_NOP
192
+  #define BOARD_ST7920_DELAY_1       DELAY_2_NOP
193
+  #define BOARD_ST7920_DELAY_2       DELAY_2_NOP
194
+  #define BOARD_ST7920_DELAY_3       DELAY_2_NOP
196 195
 
197 196
 #elif EITHER(ZONESTAR_12864OLED, ZONESTAR_12864OLED_SSD1306)
198 197
   //

+ 68
- 58
Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h Прегледај датотеку

@@ -68,7 +68,7 @@
68 68
 #define E0_DIR_PIN                          PB0
69 69
 #define E0_ENABLE_PIN                       PC4
70 70
 
71
-#if ENABLED(TMC_USE_SW_SPI)
71
+#if ENABLED(TMC_USE_SW_SPI)                       // Shared with EXP2
72 72
   #ifndef TMC_SW_SCK
73 73
     #define TMC_SW_SCK                      PB3
74 74
   #endif
@@ -93,33 +93,48 @@
93 93
 #define TEMP_BED_PIN                        PB1   // Analog Input
94 94
 #define TEMP_0_PIN                          PA0   // Analog Input
95 95
 
96
-//
97
-// LCD Pins
98
-//
99
-
100
-/**
101
- *                -----                                             -----
102
- *            NC | · · | GND                                    5V | · · | GND
103
- *         RESET | · · | PB9 (SD_DETECT)             (LCD_D7) PC14 | · · | PC15 (LCD_D6)
104
- *  (MOSI)   PB5 | · · | PB8 (BTN_EN2)               (LCD_D5)  PB7 | · · | PC13 (LCD_D4)
105
- * (SD_SS)  PA15 | · · | PD2 (BTN_EN1)               (LCD_RS) PC12 | · · | PB6  (LCD_EN)
106
- *   (SCK)   PB3 | · · | PB4 (MISO)                 (BTN_ENC) PC11 | · · | PC10 (BEEPER)
107
- *                -----                                             -----
108
- *                EXP2                                              EXP1
96
+/**                ------                                    ------
97
+ *  (BEEPER) PC10 |10  9 | PC11 (BTN_ENC)        (MISO) PB4 |10  9 | PB3   (SCK)
98
+ *  (LCD_EN) PB6  | 8  7 | PC12  (LCD_RS)     (BTN_EN1) PD2 | 8  7 | PA15  (SD_SS)
99
+ *  (LCD_D4) PC13 | 6  5 | PB7   (LCD_D5)     (BTN_EN2) PB8 | 6  5 | PB5   (MOSI)
100
+ *  (LCD_D6) PC15 | 4  3 | PC14  (LCD_D7)   (SD_DETECT) PB9 | 4  3 | RESET
101
+ *           GND  | 2  1 | 5V                           GND | 2  1 | NC
102
+ *                 ------                                    ------
103
+ *                  EXP1                                      EXP2
109 104
  */
105
+#define EXP1_03_PIN                         PC14
106
+#define EXP1_04_PIN                         PC15
107
+#define EXP1_05_PIN                         PB7
108
+#define EXP1_06_PIN                         PC13
109
+#define EXP1_07_PIN                         PC12
110
+#define EXP1_08_PIN                         PB6
111
+#define EXP1_09_PIN                         PC11
112
+#define EXP1_10_PIN                         PC10
113
+
114
+#define EXP2_03_PIN                         -1    // RESET
115
+#define EXP2_04_PIN                         PB9
116
+#define EXP2_05_PIN                         PB5
117
+#define EXP2_06_PIN                         PB8
118
+#define EXP2_07_PIN                         PA15
119
+#define EXP2_08_PIN                         PD2
120
+#define EXP2_09_PIN                         PB3
121
+#define EXP2_10_PIN                         PB4
110 122
 
123
+//
124
+// LCD / Controller
125
+//
111 126
 #if HAS_WIRED_LCD
112
-  #define BEEPER_PIN                        PC10
113
-  #define BTN_ENC                           PC11
127
+  #define BEEPER_PIN                 EXP1_10_PIN
128
+  #define BTN_ENC                    EXP1_09_PIN
114 129
 
115 130
   #if ENABLED(CR10_STOCKDISPLAY)
116
-    #define LCD_PINS_RS                     PC15
131
+    #define LCD_PINS_RS              EXP1_04_PIN
117 132
 
118
-    #define BTN_EN1                         PB6
119
-    #define BTN_EN2                         PC13
133
+    #define BTN_EN1                  EXP1_08_PIN
134
+    #define BTN_EN2                  EXP1_06_PIN
120 135
 
121
-    #define LCD_PINS_ENABLE                 PC14
122
-    #define LCD_PINS_D4                     PB7
136
+    #define LCD_PINS_ENABLE          EXP1_03_PIN
137
+    #define LCD_PINS_D4              EXP1_05_PIN
123 138
 
124 139
   #elif IS_TFTGLCD_PANEL
125 140
 
@@ -127,56 +142,56 @@
127 142
     #undef BTN_ENC
128 143
 
129 144
     #if ENABLED(TFTGLCD_PANEL_SPI)
130
-      #define TFTGLCD_CS                    PD2
145
+      #define TFTGLCD_CS             EXP2_08_PIN
131 146
     #endif
132 147
 
133
-    #define SD_DETECT_PIN                   PB9
148
+    #define SD_DETECT_PIN            EXP2_04_PIN
134 149
 
135 150
   #else
136 151
 
137
-    #define LCD_PINS_RS                     PC12
152
+    #define LCD_PINS_RS              EXP1_07_PIN
138 153
 
139
-    #define BTN_EN1                         PD2
140
-    #define BTN_EN2                         PB8
154
+    #define BTN_EN1                  EXP2_08_PIN
155
+    #define BTN_EN2                  EXP2_06_PIN
141 156
 
142
-    #define LCD_PINS_ENABLE                 PB6
157
+    #define LCD_PINS_ENABLE          EXP1_08_PIN
143 158
 
144 159
     #if ENABLED(FYSETC_MINI_12864)
145 160
 
146 161
       #define LCD_BACKLIGHT_PIN             -1
147
-      #define LCD_RESET_PIN                 PC13
148
-      #define DOGLCD_A0                     PC12
149
-      #define DOGLCD_CS                     PB6
150
-      #define DOGLCD_SCK                    PB3
151
-      #define DOGLCD_MOSI                   PB5
162
+      #define LCD_RESET_PIN          EXP1_06_PIN
163
+      #define DOGLCD_A0              EXP1_07_PIN
164
+      #define DOGLCD_CS              EXP1_08_PIN
165
+      #define DOGLCD_SCK             EXP2_09_PIN
166
+      #define DOGLCD_MOSI            EXP2_05_PIN
152 167
 
153 168
       #define FORCE_SOFT_SPI                      // SPI MODE3
154 169
 
155
-      #define LED_PIN                       PB7   // red pwm
156
-      //#define LED_PIN                     PC15  // green
157
-      //#define LED_PIN                     PC14  // blue
170
+      #define LED_PIN                EXP1_05_PIN   // red pwm
171
+      //#define LED_PIN              EXP1_04_PIN  // green
172
+      //#define LED_PIN              EXP1_03_PIN  // blue
158 173
 
159 174
       //#if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
160 175
       //  #ifndef RGB_LED_R_PIN
161
-      //    #define RGB_LED_R_PIN PB7
176
+      //    #define RGB_LED_R_PIN    EXP1_05_PIN
162 177
       //  #endif
163 178
       //  #ifndef RGB_LED_G_PIN
164
-      //    #define RGB_LED_G_PIN PC15
179
+      //    #define RGB_LED_G_PIN    EXP1_04_PIN
165 180
       //  #endif
166 181
       //  #ifndef RGB_LED_B_PIN
167
-      //    #define RGB_LED_B_PIN PC14
182
+      //    #define RGB_LED_B_PIN    EXP1_03_PIN
168 183
       //  #endif
169 184
       //#elif ENABLED(FYSETC_MINI_12864_2_1)
170
-      //  #define NEOPIXEL_PIN    PB7
185
+      //  #define NEOPIXEL_PIN       EXP1_05_PIN
171 186
       //#endif
172 187
 
173 188
     #else                                         // !FYSETC_MINI_12864
174 189
 
175
-      #define LCD_PINS_D4                   PC13
190
+      #define LCD_PINS_D4            EXP1_06_PIN
176 191
       #if IS_ULTIPANEL
177
-        #define LCD_PINS_D5                 PB7
178
-        #define LCD_PINS_D6                 PC15
179
-        #define LCD_PINS_D7                 PC14
192
+        #define LCD_PINS_D5          EXP1_05_PIN
193
+        #define LCD_PINS_D6          EXP1_04_PIN
194
+        #define LCD_PINS_D7          EXP1_03_PIN
180 195
 
181 196
         #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
182 197
           #define BTN_ENC_EN         LCD_PINS_D7  // Detect the presence of the encoder
@@ -186,16 +201,11 @@
186 201
 
187 202
     #endif // !FYSETC_MINI_12864
188 203
 
189
-    #if HAS_MARLINUI_U8GLIB
190
-      #ifndef BOARD_ST7920_DELAY_1
191
-        #define BOARD_ST7920_DELAY_1 DELAY_NS(125)
192
-      #endif
193
-      #ifndef BOARD_ST7920_DELAY_2
194
-        #define BOARD_ST7920_DELAY_2 DELAY_NS(125)
195
-      #endif
196
-      #ifndef BOARD_ST7920_DELAY_3
197
-        #define BOARD_ST7920_DELAY_3 DELAY_NS(125)
198
-      #endif
204
+    // Alter timing for graphical display
205
+    #if ENABLED(U8GLIB_ST7920)
206
+      #define BOARD_ST7920_DELAY_1 DELAY_NS(125)
207
+      #define BOARD_ST7920_DELAY_2 DELAY_NS(125)
208
+      #define BOARD_ST7920_DELAY_3 DELAY_NS(125)
199 209
     #endif
200 210
 
201 211
   #endif
@@ -214,11 +224,11 @@
214 224
 
215 225
 #if SD_CONNECTION_IS(LCD)
216 226
   #define SPI_DEVICE                           3
217
-  #define SD_DETECT_PIN                     PB9
218
-  #define SD_SCK_PIN                        PB3
219
-  #define SD_MISO_PIN                       PB4
220
-  #define SD_MOSI_PIN                       PB5
221
-  #define SD_SS_PIN                         PA15
227
+  #define SD_DETECT_PIN              EXP2_04_PIN
228
+  #define SD_SCK_PIN                 EXP2_09_PIN
229
+  #define SD_MISO_PIN                EXP2_10_PIN
230
+  #define SD_MOSI_PIN                EXP2_05_PIN
231
+  #define SD_SS_PIN                  EXP2_07_PIN
222 232
 #elif SD_CONNECTION_IS(ONBOARD)
223 233
   #define SD_DETECT_PIN                     PA3
224 234
   #define SD_SCK_PIN                        PA5

+ 28
- 26
Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h Прегледај датотеку

@@ -122,41 +122,43 @@
122 122
 #define NEOPIXEL_PIN                        PC7   // The NEOPIXEL LED driving pin
123 123
 
124 124
 /**
125
- *     1 ----- 2
126
- *  PB5 | · · | PB6
127
- *  PA2 | · · | RESET
128
- *  PA3 | · · | PB8
129
- *  PB7 | · · | PA4
130
- *  GND | · · | VCC5
131
- *     9 ----- 10
132
- *      LCD EXP
125
+ *       ------
126
+ *  PB5 |10  9 | PB6
127
+ *  PA2 | 8  7 | RESET
128
+ *  PA3   6  5 | PB8
129
+ *  PB7 | 4  3 | PA4
130
+ *  GND | 2  1 | VCC5
131
+ *       ------
132
+ *        EXP1
133 133
  */
134
+#define EXP1_03_PIN                         PA4
135
+#define EXP1_04_PIN                         PB7
136
+#define EXP1_05_PIN                         PB8
137
+#define EXP1_06_PIN                         PA3
138
+#define EXP1_07_PIN                         -1   // RESET
139
+#define EXP1_08_PIN                         PA2
140
+#define EXP1_09_PIN                         PB6
141
+#define EXP1_10_PIN                         PB5
134 142
 
135 143
 //
136 144
 // LCD / Controller
137 145
 //
138 146
 #if ENABLED(CR10_STOCKDISPLAY)
139
-  #define BEEPER_PIN                        PB5
140
-  #define BTN_EN1                           PA2
141
-  #define BTN_EN2                           PA3
142
-  #define BTN_ENC                           PB6
143
-
144
-  #define LCD_PINS_RS                       PB7   // CS -- SOFT SPI for ENDER3 LCD
145
-  #define LCD_PINS_D4                       PB8   // SCLK
146
-  #define LCD_PINS_ENABLE                   PA4   // DATA MOSI
147
+  #define BEEPER_PIN                 EXP1_10_PIN
148
+  #define BTN_EN1                    EXP1_08_PIN
149
+  #define BTN_EN2                    EXP1_06_PIN
150
+  #define BTN_ENC                    EXP1_09_PIN
151
+
152
+  #define LCD_PINS_RS                EXP1_04_PIN  // CS -- SOFT SPI for ENDER3 LCD
153
+  #define LCD_PINS_D4                EXP1_05_PIN  // SCLK
154
+  #define LCD_PINS_ENABLE            EXP1_03_PIN  // DATA MOSI
147 155
 #endif
148 156
 
149 157
 // Alter timing for graphical display
150
-#if HAS_MARLINUI_U8GLIB
151
-  #ifndef BOARD_ST7920_DELAY_1
152
-    #define BOARD_ST7920_DELAY_1 DELAY_NS(125)
153
-  #endif
154
-  #ifndef BOARD_ST7920_DELAY_2
155
-    #define BOARD_ST7920_DELAY_2 DELAY_NS(125)
156
-  #endif
157
-  #ifndef BOARD_ST7920_DELAY_3
158
-    #define BOARD_ST7920_DELAY_3 DELAY_NS(125)
159
-  #endif
158
+#if ENABLED(U8GLIB_ST7920)
159
+  #define BOARD_ST7920_DELAY_1     DELAY_NS(125)
160
+  #define BOARD_ST7920_DELAY_2     DELAY_NS(125)
161
+  #define BOARD_ST7920_DELAY_3     DELAY_NS(125)
160 162
 #endif
161 163
 
162 164
 //

+ 63
- 46
Marlin/src/pins/stm32f1/pins_FLY_MINI.h Прегледај датотеку

@@ -83,13 +83,13 @@
83 83
 
84 84
 #if ENABLED(TMC_USE_SW_SPI)
85 85
   #ifndef TMC_SW_MOSI
86
-    #define TMC_SW_MOSI                     PB15
86
+    #define TMC_SW_MOSI              EXP2_05_PIN
87 87
   #endif
88 88
   #ifndef TMC_SW_MISO
89
-    #define TMC_SW_MISO                     PB14
89
+    #define TMC_SW_MISO              EXP2_10_PIN
90 90
   #endif
91 91
   #ifndef TMC_SW_SCK
92
-    #define TMC_SW_SCK                      PB13
92
+    #define TMC_SW_SCK               EXP2_09_PIN
93 93
   #endif
94 94
 #endif
95 95
 
@@ -120,52 +120,69 @@
120 120
 #define TEMP_BED_PIN                        PC0   // Analog Input
121 121
 #define TEMP_0_PIN                          PC1   // Analog Input
122 122
 
123
-//
124
-// LCD Pins
125
-//
123
+/**               ------                                        ------
124
+ * (BEEPER) PC14 |10  9 | PC13 (BTN_ENC)      (MISO)      PB14 |10  9 | PB13 (SD_SCK)
125
+ * (LCD_EN) PB9  | 8  7 | PB8  (LCD_RS)       (BTN_EN1)   PB3  | 8  7 | PB12 (SD_CS2)
126
+ * (LCD_D4) PB7  | 6  5   PB6  (LCD_D5)       (BTN_EN2)   PD2  | 6  5   PB15 (SD_MOSI)
127
+ * (LCD_D6) PB5  | 4  3 | PB4  (LCD_D7)       (SD_DETECT) PB11 | 4  3 | RESET
128
+ *          GND  | 2  1 | 5V                              GND  | 2  1 | NC
129
+ *                ------                                        ------
130
+ *                 EXP1                                          EXP2
131
+ */
132
+#define EXP1_03_PIN                        PB4
133
+#define EXP1_04_PIN                        PB5
134
+#define EXP1_05_PIN                        PB6
135
+#define EXP1_06_PIN                        PB7
136
+#define EXP1_07_PIN                        PB8
137
+#define EXP1_08_PIN                        PB9
138
+#define EXP1_09_PIN                        PC13
139
+#define EXP1_10_PIN                        PC14
140
+
141
+#define EXP2_03_PIN                        -1     // RESET
142
+#define EXP2_04_PIN                        PB11
143
+#define EXP2_05_PIN                        PB15
144
+#define EXP2_06_PIN                        PD2
145
+#define EXP2_07_PIN                        PB12
146
+#define EXP2_08_PIN                        PB3
147
+#define EXP2_09_PIN                        PB13
148
+#define EXP2_10_PIN                        PB14
126 149
 
127 150
 //
128 151
 // LCD / Controller
129 152
 //
130
-#define SPI_DEVICE                             2
131
-#define SD_SS_PIN                           PB12
132
-#define SD_SCK_PIN                          PB13
133
-#define SD_MISO_PIN                         PB14
134
-#define SD_MOSI_PIN                         PB15
135
-
136
-#define SDSS                           SD_SS_PIN
137
-#define SD_DETECT_PIN                       PB11
138
-
139
-#define BEEPER_PIN                          PC14
140
-
141
-#define LCD_PINS_RS                         PB8
142
-#define LCD_PINS_ENABLE                     PB9
143
-#define LCD_PINS_D4                         PB7
144
-#define LCD_PINS_D5                         PB6
145
-#define LCD_PINS_D6                         PB5
146
-#define LCD_PINS_D7                         PB4
147
-
148
-#define BTN_EN1                             PD2
149
-#define BTN_EN2                             PB3
150
-#define BTN_ENC                             PC13
151
-
152
-#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
153
-  #define BTN_ENC_EN                 LCD_PINS_D7  // Detect the presence of the encoder
154
-#endif
153
+#if HAS_WIRED_LCD
155 154
 
156
-//
157
-// Filament runout
158
-//
155
+  #define SPI_DEVICE                           2
156
+  #define SD_SS_PIN                  EXP2_07_PIN
157
+  #define SD_SCK_PIN                 EXP2_09_PIN
158
+  #define SD_MISO_PIN                EXP2_10_PIN
159
+  #define SD_MOSI_PIN                EXP2_05_PIN
159 160
 
160
-//
161
-// ST7920 Delays
162
-//
163
-#ifndef ST7920_DELAY_1
164
-  #define ST7920_DELAY_1            DELAY_NS(96)
165
-#endif
166
-#ifndef ST7920_DELAY_2
167
-  #define ST7920_DELAY_2            DELAY_NS(48)
168
-#endif
169
-#ifndef ST7920_DELAY_3
170
-  #define ST7920_DELAY_3           DELAY_NS(715)
171
-#endif
161
+  #define SDSS                         SD_SS_PIN
162
+  #define SD_DETECT_PIN              EXP2_04_PIN
163
+
164
+  #define BEEPER_PIN                 EXP1_10_PIN
165
+
166
+  #define LCD_PINS_RS                EXP1_07_PIN
167
+  #define LCD_PINS_ENABLE            EXP1_08_PIN
168
+  #define LCD_PINS_D4                EXP1_06_PIN
169
+  #define LCD_PINS_D5                EXP1_05_PIN
170
+  #define LCD_PINS_D6                EXP1_04_PIN
171
+  #define LCD_PINS_D7                EXP1_03_PIN
172
+
173
+  #define BTN_EN1                    EXP2_06_PIN
174
+  #define BTN_EN2                    EXP2_08_PIN
175
+  #define BTN_ENC                    EXP1_09_PIN
176
+
177
+  #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
178
+    #define BTN_ENC_EN               LCD_PINS_D7  // Detect the presence of the encoder
179
+  #endif
180
+
181
+  // Alter timing for graphical display
182
+  #if ENABLED(U8GLIB_ST7920)
183
+    #define BOARD_ST7920_DELAY_1   DELAY_NS( 96)
184
+    #define BOARD_ST7920_DELAY_2   DELAY_NS( 48)
185
+    #define BOARD_ST7920_DELAY_3   DELAY_NS(715)
186
+  #endif
187
+
188
+#endif // HAS_WIRED_LCD

+ 5
- 10
Marlin/src/pins/stm32f1/pins_GTM32_MINI.h Прегледај датотеку

@@ -157,16 +157,11 @@
157 157
     //#define LCD_UART_RX                   PD9
158 158
   #endif
159 159
 
160
-  #if HAS_MARLINUI_U8GLIB
161
-    #ifndef BOARD_ST7920_DELAY_1
162
-      #define BOARD_ST7920_DELAY_1 DELAY_NS(96)
163
-    #endif
164
-    #ifndef BOARD_ST7920_DELAY_2
165
-      #define BOARD_ST7920_DELAY_2 DELAY_NS(48)
166
-    #endif
167
-    #ifndef BOARD_ST7920_DELAY_3
168
-      #define BOARD_ST7920_DELAY_3 DELAY_NS(715)
169
-    #endif
160
+  // Alter timing for graphical display
161
+  #if ENABLED(U8GLIB_ST7920)
162
+    #define BOARD_ST7920_DELAY_1   DELAY_NS( 96)
163
+    #define BOARD_ST7920_DELAY_2   DELAY_NS( 48)
164
+    #define BOARD_ST7920_DELAY_3   DELAY_NS(715)
170 165
   #endif
171 166
 
172 167
 #endif // HAS_WIRED_LCD

+ 5
- 10
Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h Прегледај датотеку

@@ -165,16 +165,11 @@
165 165
     //#define LCD_UART_RX                   PD9
166 166
   #endif
167 167
 
168
-  #if HAS_MARLINUI_U8GLIB
169
-    #ifndef BOARD_ST7920_DELAY_1
170
-      #define BOARD_ST7920_DELAY_1 DELAY_NS(96)
171
-    #endif
172
-    #ifndef BOARD_ST7920_DELAY_2
173
-      #define BOARD_ST7920_DELAY_2 DELAY_NS(48)
174
-    #endif
175
-    #ifndef BOARD_ST7920_DELAY_3
176
-      #define BOARD_ST7920_DELAY_3 DELAY_NS(715)
177
-    #endif
168
+  // Alter timing for graphical display
169
+  #if ENABLED(U8GLIB_ST7920)
170
+    #define BOARD_ST7920_DELAY_1   DELAY_NS( 96)
171
+    #define BOARD_ST7920_DELAY_2   DELAY_NS( 48)
172
+    #define BOARD_ST7920_DELAY_3   DELAY_NS(715)
178 173
   #endif
179 174
 
180 175
 #endif // HAS_WIRED_LCD

+ 5
- 10
Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h Прегледај датотеку

@@ -162,16 +162,11 @@
162 162
     //#define LCD_UART_RX                   PD9
163 163
   #endif
164 164
 
165
-  #if HAS_MARLINUI_U8GLIB
166
-    #ifndef BOARD_ST7920_DELAY_1
167
-      #define BOARD_ST7920_DELAY_1 DELAY_NS(96)
168
-    #endif
169
-    #ifndef BOARD_ST7920_DELAY_2
170
-      #define BOARD_ST7920_DELAY_2 DELAY_NS(48)
171
-    #endif
172
-    #ifndef BOARD_ST7920_DELAY_3
173
-      #define BOARD_ST7920_DELAY_3 DELAY_NS(715)
174
-    #endif
165
+  // Alter timing for graphical display
166
+  #if ENABLED(U8GLIB_ST7920)
167
+    #define BOARD_ST7920_DELAY_1   DELAY_NS( 96)
168
+    #define BOARD_ST7920_DELAY_2   DELAY_NS( 48)
169
+    #define BOARD_ST7920_DELAY_3   DELAY_NS(715)
175 170
   #endif
176 171
 
177 172
 #endif // HAS_WIRED_LCD

+ 5
- 10
Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h Прегледај датотеку

@@ -167,16 +167,11 @@
167 167
     //#define LCD_UART_RX                   PD9
168 168
   #endif
169 169
 
170
-  #if HAS_MARLINUI_U8GLIB
171
-    #ifndef BOARD_ST7920_DELAY_1
172
-      #define BOARD_ST7920_DELAY_1  DELAY_NS(96)
173
-    #endif
174
-    #ifndef BOARD_ST7920_DELAY_2
175
-      #define BOARD_ST7920_DELAY_2  DELAY_NS(48)
176
-    #endif
177
-    #ifndef BOARD_ST7920_DELAY_3
178
-      #define BOARD_ST7920_DELAY_3 DELAY_NS(715)
179
-    #endif
170
+  // Alter timing for graphical display
171
+  #if ENABLED(U8GLIB_ST7920)
172
+    #define BOARD_ST7920_DELAY_1   DELAY_NS( 96)
173
+    #define BOARD_ST7920_DELAY_2   DELAY_NS( 48)
174
+    #define BOARD_ST7920_DELAY_3   DELAY_NS(715)
180 175
   #endif
181 176
 
182 177
 #endif // HAS_WIRED_LCD

+ 3
- 9
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h Прегледај датотеку

@@ -342,15 +342,9 @@
342 342
 
343 343
     #endif
344 344
 
345
-    #ifndef BOARD_ST7920_DELAY_1
346
-      #define BOARD_ST7920_DELAY_1 DELAY_NS(125)
347
-    #endif
348
-    #ifndef BOARD_ST7920_DELAY_2
349
-      #define BOARD_ST7920_DELAY_2 DELAY_NS(125)
350
-    #endif
351
-    #ifndef BOARD_ST7920_DELAY_3
352
-      #define BOARD_ST7920_DELAY_3 DELAY_NS(125)
353
-    #endif
345
+    #define BOARD_ST7920_DELAY_1   DELAY_NS(125)
346
+    #define BOARD_ST7920_DELAY_2   DELAY_NS(125)
347
+    #define BOARD_ST7920_DELAY_3   DELAY_NS(125)
354 348
 
355 349
   #endif // !MKS_MINI_12864
356 350
 

+ 75
- 44
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h Прегледај датотеку

@@ -133,54 +133,82 @@
133 133
 #endif
134 134
 
135 135
 /**
136
- *                -----                                      -----                                     -----
137
- *  (BEEPER) PC1 | 1 2 | PC3 (BTN_ENC)          (MISO) PB14 | 1 2 | PB13 (SD_SCK)                  5V | 1 2 | GND
138
- *  (LCD_EN) PA4 | 3 4 | PA5 (LCD_RS)        (BTN_EN1) PB11 | 3 4 | PA15 (SD_SS)         (LCD_EN) PA4 | 3 4 | PA5  (LCD_RS)
139
- *  (LCD_D4) PA6 | 5 6   PA7 (LCD_D5)        (BTN_EN2)  PB0 | 5 6   PB15 (SD_MOSI)       (LCD_D4) PA6 | 5 6   PB0  (BTN_EN2)
140
- *  (LCD_D6) PC4 | 7 8 | PC5 (LCD_D7)      (SD_DETECT) PC10 | 7 8 | RESET                       RESET | 7 8 | PB11 (BTN_EN1)
141
- *           GND | 9 10| 5V                             GND | 9 10| NC                  (BTN_ENC) PC3 | 9 10| PC1  (BEEPER)
142
- *                -----                                      -----                                     -----
143
- *                EXP1                                       EXP2                                      EXP3
136
+ *                ------                                    ------                                  ------
137
+ *  (BEEPER) PC1 |10  9 | PC3 (BTN_ENC)        (MISO) PB14 |10  9 | PB13 (SD_SCK)    (BEEPER) PC1  |10  9 | PC3 (BTN_ENC)
138
+ *  (LCD_EN) PA4 | 8  7 | PA5 (LCD_RS)      (BTN_EN1) PB11 | 8  7 | PA15 (SD_SS)    (BTN_EN1) PB11 | 8  7 | RESET
139
+ *  (LCD_D4) PA6   6  5 | PA7 (LCD_D5)      (BTN_EN2)  PB0   6  5 | PB15 (SD_MOSI)  (BTN_EN2) PB0    6  5 | PA6  (LCD_D4)
140
+ *  (LCD_D6) PC4 | 4  3 | PC5 (LCD_D7)    (SD_DETECT) PC10 | 4  3 | RESET            (LCD_RS) PA5  | 4  3 | PA4  (LCD_EN)
141
+ *           GND | 2  1 | 5V                           GND | 2  1 | NC                        GND  | 2  1 | 5V
142
+ *                ------                                    ------                                  ------
143
+ *                 EXP1                                      EXP2                                "Ender-3 EXP1"
144 144
  */
145
+#define EXP1_03_PIN                         PC5
146
+#define EXP1_04_PIN                         PC4
147
+#define EXP1_05_PIN                         PA7
148
+#define EXP1_06_PIN                         PA6
149
+#define EXP1_07_PIN                         PA5
150
+#define EXP1_08_PIN                         PA4
151
+#define EXP1_09_PIN                         PC3
152
+#define EXP1_10_PIN                         PC1
153
+
154
+#define EXP2_03_PIN                         -1   // RESET
155
+#define EXP2_04_PIN                         PC10
156
+#define EXP2_05_PIN                         PB15
157
+#define EXP2_06_PIN                         PB0
158
+#define EXP2_07_PIN                         PA15
159
+#define EXP2_08_PIN                         PB11
160
+#define EXP2_09_PIN                         PB13
161
+#define EXP2_10_PIN                         PB14
162
+
163
+// "Ender-3 EXP1"
164
+#define E3_EXP1_03_PIN                      PA4
165
+#define E3_EXP1_04_PIN                      PA5
166
+#define E3_EXP1_05_PIN                      PA6
167
+#define E3_EXP1_06_PIN                      PB0
168
+#define E3_EXP1_07_PIN                      -1   // RESET
169
+#define E3_EXP1_08_PIN                      PB11
170
+#define E3_EXP1_09_PIN                      PC3
171
+#define E3_EXP1_10_PIN                      PC1
172
+
145 173
 #if HAS_WIRED_LCD
146 174
 
147
-  #define BEEPER_PIN                        PC1
148
-  #define BTN_ENC                           PC3
149
-  #define LCD_PINS_ENABLE                   PA4
150
-  #define LCD_PINS_RS                       PA5
151
-  #define BTN_EN1                           PB11
152
-  #define BTN_EN2                           PB0
175
+  #define BEEPER_PIN                 EXP1_10_PIN
176
+  #define BTN_ENC                    EXP1_09_PIN
177
+  #define LCD_PINS_ENABLE            EXP1_08_PIN
178
+  #define LCD_PINS_RS                EXP1_07_PIN
179
+  #define BTN_EN1                    EXP2_08_PIN
180
+  #define BTN_EN2                    EXP2_06_PIN
153 181
 
154 182
   // MKS MINI12864 and MKS LCD12864B; If using MKS LCD12864A (Need to remove RPK2 resistor)
155 183
   #if ENABLED(MKS_MINI_12864)
156 184
 
157 185
     #define LCD_BACKLIGHT_PIN               -1
158 186
     #define LCD_RESET_PIN                   -1
159
-    #define DOGLCD_A0                       PC4
160
-    #define DOGLCD_CS                       PA7
161
-    #define DOGLCD_SCK                      PB13
162
-    #define DOGLCD_MOSI                     PB15
187
+    #define DOGLCD_A0                EXP1_04_PIN
188
+    #define DOGLCD_CS                EXP1_05_PIN
189
+    #define DOGLCD_SCK               EXP2_09_PIN
190
+    #define DOGLCD_MOSI              EXP2_05_PIN
163 191
 
164 192
   #elif ENABLED(MKS_MINI_12864_V3)
165
-    #define DOGLCD_CS                       PA4
166
-    #define DOGLCD_A0                       PA5
193
+    #define DOGLCD_CS                EXP1_08_PIN
194
+    #define DOGLCD_A0                EXP1_07_PIN
167 195
     #define LCD_PINS_DC                DOGLCD_A0
168 196
     #define LCD_BACKLIGHT_PIN               -1
169
-    #define LCD_RESET_PIN                   PA6
170
-    #define NEOPIXEL_PIN                    PA7
171
-    #define DOGLCD_MOSI                     PB15
172
-    #define DOGLCD_SCK                      PB13
197
+    #define LCD_RESET_PIN            EXP1_06_PIN
198
+    #define NEOPIXEL_PIN             EXP1_05_PIN
199
+    #define DOGLCD_MOSI              EXP2_05_PIN
200
+    #define DOGLCD_SCK               EXP2_09_PIN
173 201
     #define FORCE_SOFT_SPI
174 202
     #define SOFTWARE_SPI
175 203
 	//#define LCD_SCREEN_ROT_180
176 204
 
177 205
   #else
178 206
 
179
-    #define LCD_PINS_D4                     PA6
207
+    #define LCD_PINS_D4              EXP1_06_PIN
180 208
     #if IS_ULTIPANEL
181
-      #define LCD_PINS_D5                   PA7
182
-      #define LCD_PINS_D6                   PC4
183
-      #define LCD_PINS_D7                   PC5
209
+      #define LCD_PINS_D5            EXP1_05_PIN
210
+      #define LCD_PINS_D6            EXP1_04_PIN
211
+      #define LCD_PINS_D7            EXP1_03_PIN
184 212
 
185 213
       #if !defined(BTN_ENC_EN) && ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
186 214
         #define BTN_ENC_EN           LCD_PINS_D7  // Detect the presence of the encoder
@@ -192,30 +220,33 @@
192 220
 
193 221
 #endif // HAS_WIRED_LCD
194 222
 
223
+// Alter timing for graphical display
224
+#if ENABLED(U8GLIB_ST7920)
225
+  #ifndef BOARD_ST7920_DELAY_1
226
+    #define BOARD_ST7920_DELAY_1   DELAY_NS(125)
227
+  #endif
228
+  #ifndef BOARD_ST7920_DELAY_2
229
+    #define BOARD_ST7920_DELAY_2   DELAY_NS(125)
230
+  #endif
231
+  #ifndef BOARD_ST7920_DELAY_3
232
+    #define BOARD_ST7920_DELAY_3   DELAY_NS(125)
233
+  #endif
234
+#endif
235
+
195 236
 //
196 237
 // SD Card
197 238
 //
239
+#define SDCARD_CONNECTION                ONBOARD
198 240
 #define SPI_DEVICE                             2
199 241
 #define ONBOARD_SPI_DEVICE                     2
200 242
 #define SDSS                           SD_SS_PIN
201
-#define SDCARD_CONNECTION                ONBOARD
202
-#define SD_DETECT_PIN                       PC10
203 243
 #define ONBOARD_SD_CS_PIN              SD_SS_PIN
244
+#define SD_DETECT_PIN                       PC10  // EXP2_04_PIN
204 245
 #define NO_SD_HOST_DRIVE
205 246
 
206 247
 // TODO: This is the only way to set SPI for SD on STM32 (for now)
207 248
 #define ENABLE_SPI2
208
-#define SD_SCK_PIN                          PB13
209
-#define SD_MISO_PIN                         PB14
210
-#define SD_MOSI_PIN                         PB15
211
-#define SD_SS_PIN                           PA15
212
-
213
-#ifndef BOARD_ST7920_DELAY_1
214
-  #define BOARD_ST7920_DELAY_1     DELAY_NS(125)
215
-#endif
216
-#ifndef BOARD_ST7920_DELAY_2
217
-  #define BOARD_ST7920_DELAY_2     DELAY_NS(125)
218
-#endif
219
-#ifndef BOARD_ST7920_DELAY_3
220
-  #define BOARD_ST7920_DELAY_3     DELAY_NS(125)
221
-#endif
249
+#define SD_SCK_PIN                   EXP2_09_PIN
250
+#define SD_MISO_PIN                  EXP2_10_PIN
251
+#define SD_MOSI_PIN                  EXP2_05_PIN
252
+#define SD_SS_PIN                    EXP2_07_PIN

+ 5
- 10
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h Прегледај датотеку

@@ -112,16 +112,11 @@
112 112
 
113 113
   #endif // !MKS_MINI_12864
114 114
 
115
-  #if HAS_MARLINUI_U8GLIB
116
-    #ifndef BOARD_ST7920_DELAY_1
117
-      #define BOARD_ST7920_DELAY_1 DELAY_NS(125)
118
-    #endif
119
-    #ifndef BOARD_ST7920_DELAY_2
120
-      #define BOARD_ST7920_DELAY_2 DELAY_NS(125)
121
-    #endif
122
-    #ifndef BOARD_ST7920_DELAY_3
123
-      #define BOARD_ST7920_DELAY_3 DELAY_NS(125)
124
-    #endif
115
+  // Alter timing for graphical display
116
+  #if ENABLED(U8GLIB_ST7920)
117
+    #define BOARD_ST7920_DELAY_1   DELAY_NS(125)
118
+    #define BOARD_ST7920_DELAY_2   DELAY_NS(125)
119
+    #define BOARD_ST7920_DELAY_3   DELAY_NS(125)
125 120
   #endif
126 121
 
127 122
 #endif // HAS_WIRED_LCD

+ 1
- 5
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h Прегледај датотеку

@@ -365,13 +365,9 @@
365 365
 
366 366
     #endif
367 367
 
368
-    #ifndef BOARD_ST7920_DELAY_1
368
+    #if ENABLED(U8GLIB_ST7920)
369 369
       #define BOARD_ST7920_DELAY_1 DELAY_NS(125)
370
-    #endif
371
-    #ifndef BOARD_ST7920_DELAY_2
372 370
       #define BOARD_ST7920_DELAY_2 DELAY_NS(125)
373
-    #endif
374
-    #ifndef BOARD_ST7920_DELAY_3
375 371
       #define BOARD_ST7920_DELAY_3 DELAY_NS(125)
376 372
     #endif
377 373
 

+ 5
- 10
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h Прегледај датотеку

@@ -299,16 +299,11 @@
299 299
 
300 300
 #endif
301 301
 
302
-#if HAS_MARLINUI_U8GLIB
303
-  #ifndef BOARD_ST7920_DELAY_1
304
-    #define BOARD_ST7920_DELAY_1   DELAY_NS(125)
305
-  #endif
306
-  #ifndef BOARD_ST7920_DELAY_2
307
-    #define BOARD_ST7920_DELAY_2   DELAY_NS(125)
308
-  #endif
309
-  #ifndef BOARD_ST7920_DELAY_3
310
-    #define BOARD_ST7920_DELAY_3   DELAY_NS(125)
311
-  #endif
302
+// Alter timing for graphical display
303
+#if ENABLED(U8GLIB_ST7920)
304
+  #define BOARD_ST7920_DELAY_1     DELAY_NS(125)
305
+  #define BOARD_ST7920_DELAY_2     DELAY_NS(125)
306
+  #define BOARD_ST7920_DELAY_3     DELAY_NS(125)
312 307
 #endif
313 308
 
314 309
 #define HAS_SPI_FLASH                          1

+ 2
- 1
Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h Прегледај датотеку

@@ -331,7 +331,8 @@
331 331
   #define ADC_KEYPAD_PIN                    PC0   // PIN6 of AUX1
332 332
 #endif
333 333
 
334
-#if HAS_MARLINUI_U8GLIB
334
+// Alter timing for graphical display
335
+#if ENABLED(U8GLIB_ST7920)
335 336
   #define BOARD_ST7920_DELAY_1     DELAY_NS(125)
336 337
   #define BOARD_ST7920_DELAY_2     DELAY_NS(250)
337 338
   #define BOARD_ST7920_DELAY_3     DELAY_NS(125)

+ 2
- 1
Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h Прегледај датотеку

@@ -304,7 +304,8 @@
304 304
   #define BTN_ENC                    EXP2_05_PIN  // PE15
305 305
 #endif
306 306
 
307
-#if HAS_MARLINUI_U8GLIB
307
+// Alter timing for graphical display
308
+#if ENABLED(U8GLIB_ST7920)
308 309
   #define BOARD_ST7920_DELAY_1     DELAY_NS(200)  // Tclk_fall <200ns
309 310
   #define BOARD_ST7920_DELAY_2     DELAY_NS(250)  // Tdata_width >200ns
310 311
   #define BOARD_ST7920_DELAY_3     DELAY_NS(200)  // Tclk_rise <200ns

+ 4
- 11
Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h Прегледај датотеку

@@ -182,7 +182,6 @@
182 182
  *                EXP2                                            EXP1                   |
183 183
  * --------------------------------------------------------------------------------------
184 184
  */
185
-
186 185
 #define EXP1_03_PIN                         PE13
187 186
 #define EXP1_04_PIN                         PE12
188 187
 #define EXP1_05_PIN                         PE11
@@ -286,16 +285,10 @@
286 285
   #endif
287 286
 
288 287
   // Alter timing for graphical display
289
-  #if HAS_MARLINUI_U8GLIB
290
-    #ifndef BOARD_ST7920_DELAY_1
291
-      #define BOARD_ST7920_DELAY_1 DELAY_NS(96)
292
-    #endif
293
-    #ifndef BOARD_ST7920_DELAY_2
294
-      #define BOARD_ST7920_DELAY_2 DELAY_NS(48)
295
-    #endif
296
-    #ifndef BOARD_ST7920_DELAY_3
297
-      #define BOARD_ST7920_DELAY_3 DELAY_NS(600)
298
-    #endif
288
+  #if ENABLED(U8GLIB_ST7920)
289
+    #define BOARD_ST7920_DELAY_1   DELAY_NS( 96)
290
+    #define BOARD_ST7920_DELAY_2   DELAY_NS( 48)
291
+    #define BOARD_ST7920_DELAY_3   DELAY_NS(600)
299 292
   #endif
300 293
 
301 294
 #endif // HAS_WIRED_LCD

+ 4
- 10
Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h Прегледај датотеку

@@ -282,16 +282,10 @@
282 282
   #endif
283 283
 
284 284
   // Alter timing for graphical display
285
-  #if HAS_MARLINUI_U8GLIB
286
-    #ifndef BOARD_ST7920_DELAY_1
287
-      #define BOARD_ST7920_DELAY_1 DELAY_NS(96)
288
-    #endif
289
-    #ifndef BOARD_ST7920_DELAY_2
290
-      #define BOARD_ST7920_DELAY_2 DELAY_NS(48)
291
-    #endif
292
-    #ifndef BOARD_ST7920_DELAY_3
293
-      #define BOARD_ST7920_DELAY_3 DELAY_NS(600)
294
-    #endif
285
+  #if ENABLED(U8GLIB_ST7920)
286
+    #define BOARD_ST7920_DELAY_1   DELAY_NS( 96)
287
+    #define BOARD_ST7920_DELAY_2   DELAY_NS( 48)
288
+    #define BOARD_ST7920_DELAY_3   DELAY_NS(600)
295 289
   #endif
296 290
 
297 291
 #endif // HAS_WIRED_LCD

+ 4
- 10
Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h Прегледај датотеку

@@ -488,16 +488,10 @@
488 488
   #endif
489 489
 
490 490
   // Alter timing for graphical display
491
-  #if HAS_MARLINUI_U8GLIB
492
-    #ifndef BOARD_ST7920_DELAY_1
493
-      #define BOARD_ST7920_DELAY_1 DELAY_NS(96)
494
-    #endif
495
-    #ifndef BOARD_ST7920_DELAY_2
496
-      #define BOARD_ST7920_DELAY_2 DELAY_NS(48)
497
-    #endif
498
-    #ifndef BOARD_ST7920_DELAY_3
499
-      #define BOARD_ST7920_DELAY_3 DELAY_NS(600)
500
-    #endif
491
+  #if ENABLED(U8GLIB_ST7920)
492
+    #define BOARD_ST7920_DELAY_1   DELAY_NS( 96)
493
+    #define BOARD_ST7920_DELAY_2   DELAY_NS( 48)
494
+    #define BOARD_ST7920_DELAY_3   DELAY_NS(600)
501 495
   #endif
502 496
 
503 497
 #endif // HAS_WIRED_LCD

+ 12
- 20
Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h Прегледај датотеку

@@ -310,17 +310,15 @@
310 310
   #define TMC_BAUD_RATE                    19200
311 311
 #endif
312 312
 
313
-/**
314
- *               ------                                              ------
315
- *           NC | 1  2 | GND                                     5V | 1  2 | GND
316
- *        RESET | 3  4 | PC15 (SD_DETECT)             (LCD_D7) PE15 | 3  4 | PE14 (LCD_D6)
317
- *   (MOSI) PA7 | 5  6   PB1  (BTN_EN2)               (LCD_D5) PE13 | 5  6   PE12 (LCD_D4)
318
- *  (SD_SS) PA4 | 7  8 | PB2  (BTN_EN1)               (LCD_RS) PE10 | 7  8 | PE9  (LCD_EN)
319
- *    (SCK) PA5 | 9 10 | PA6  (MISO)                 (BTN_ENC)  PE7 | 9 10 | PE8  (BEEPER)
320
- *               ------                                               -----
321
- *               EXP2                                                EXP1
313
+/**               ------                                      ------
314
+ * (BEEPER) PE8  |10  9 | PE7  (BTN_ENC)         (MISO) PA6  |10  9 | PA5  (SCK)
315
+ * (LCD_EN) PE9  | 8  7 | PE10 (LCD_RS)       (BTN_EN1) PB2  | 8  7 | PA4  (SD_SS)
316
+ * (LCD_D4) PE12   6  5 | PE13 (LCD_D5)       (BTN_EN2) PB1    6  5 | PA7  (MOSI)
317
+ * (LCD_D6) PE14 | 4  3 | PE15 (LCD_D7)     (SD_DETECT) PC15 | 4  3 | RESET
318
+ *          GND  | 2  1 | 5V                            GND  | 2  1 | NC
319
+ *                ------                                      ------
320
+ *                 EXP1                                        EXP2
322 321
  */
323
-
324 322
 #define EXP1_03_PIN                         PE15
325 323
 #define EXP1_04_PIN                         PE14
326 324
 #define EXP1_05_PIN                         PE13
@@ -485,16 +483,10 @@
485 483
 #endif  // HAS_WIRED_LCD
486 484
 
487 485
 // Alter timing for graphical display
488
-#if HAS_MARLINUI_U8GLIB
489
-  #ifndef BOARD_ST7920_DELAY_1
490
-    #define BOARD_ST7920_DELAY_1   DELAY_NS(120)  // DELAY_NS(96)
491
-  #endif
492
-  #ifndef BOARD_ST7920_DELAY_2
493
-    #define BOARD_ST7920_DELAY_2   DELAY_NS(80)   // DELAY_NS(48)
494
-  #endif
495
-  #ifndef BOARD_ST7920_DELAY_3
496
-    #define BOARD_ST7920_DELAY_3   DELAY_NS(580)  // DELAY_NS(600)
497
-  #endif
486
+#if ENABLED(U8GLIB_ST7920)
487
+  #define BOARD_ST7920_DELAY_1     DELAY_NS(120)
488
+  #define BOARD_ST7920_DELAY_2     DELAY_NS( 80)
489
+  #define BOARD_ST7920_DELAY_3     DELAY_NS(580)
498 490
 #endif
499 491
 
500 492
 #if HAS_SPI_TFT

+ 11
- 13
Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h Прегледај датотеку

@@ -311,17 +311,15 @@
311 311
   #define SDCARD_CONNECTION                  LCD
312 312
 #endif
313 313
 
314
-/**
315
- *               -----                                             -----
316
- *           NC | 1 2 | GND                                    5V | 1 2 | GND
317
- *        RESET | 3 4 | PF12(SD_DETECT)             (LCD_D7)  PG7 | 3 4 | PG6  (LCD_D6)
318
- *   (MOSI)PB15 | 5 6   PF11(BTN_EN2)               (LCD_D5)  PG3 | 5 6   PG2  (LCD_D4)
319
- *  (SD_SS)PB12 | 7 8 | PG10(BTN_EN1)               (LCD_RS) PD10 | 7 8 | PD11 (LCD_EN)
320
- *    (SCK)PB13 | 9 10| PB14(MISO)                 (BTN_ENC)  PA8 | 9 10| PG4  (BEEPER)
321
- *               -----                                             -----
322
- *               EXP2                                              EXP1
314
+/**               ------                                      ------
315
+ * (BEEPER) PG4  |10  9 | PA8  (BTN_ENC)         (MISO) PB14 |10  9 | PB13 (SCK)
316
+ * (LCD_EN) PD11 | 8  7 | PD10 (LCD_RS)       (BTN_EN1) PG10 | 8  7 | PB12 (SD_SS)
317
+ * (LCD_D4) PG2    6  5 | PG3  (LCD_D5)       (BTN_EN2) PF11   6  5 | PB15 (MOSI)
318
+ * (LCD_D6) PG6  | 4  3 | PG7  (LCD_D7)     (SD_DETECT) PF12 | 4  3 | RESET
319
+ *          GND  | 2  1 | 5V                            GND  | 2  1 | NC
320
+ *                ------                                      ------
321
+ *                 EXP1                                        EXP2
323 322
  */
324
-
325 323
 #define EXP1_03_PIN                         PG7
326 324
 #define EXP1_04_PIN                         PG6
327 325
 #define EXP1_05_PIN                         PG3
@@ -506,12 +504,12 @@
506 504
 #endif // HAS_WIRED_LCD
507 505
 
508 506
 // Alter timing for graphical display
509
-#if HAS_MARLINUI_U8GLIB
507
+#if ENABLED(U8GLIB_ST7920)
510 508
   #ifndef BOARD_ST7920_DELAY_1
511
-    #define BOARD_ST7920_DELAY_1    DELAY_NS(125)
509
+    #define BOARD_ST7920_DELAY_1   DELAY_NS(125)
512 510
   #endif
513 511
   #ifndef BOARD_ST7920_DELAY_2
514
-    #define BOARD_ST7920_DELAY_2    DELAY_NS(90)
512
+    #define BOARD_ST7920_DELAY_2   DELAY_NS( 90)
515 513
   #endif
516 514
   #ifndef BOARD_ST7920_DELAY_3
517 515
     #define BOARD_ST7920_DELAY_3   DELAY_NS(600)

+ 2
- 3
Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h Прегледај датотеку

@@ -303,7 +303,6 @@
303 303
  *               -----                                             -----
304 304
  *               EXP2                                              EXP1
305 305
  */
306
-
307 306
 #define EXP1_03_PIN                         PE13
308 307
 #define EXP1_04_PIN                         PE12
309 308
 #define EXP1_05_PIN                         PE11
@@ -489,12 +488,12 @@
489 488
 #endif // HAS_WIRED_LCD
490 489
 
491 490
 // Alter timing for graphical display
492
-#if HAS_MARLINUI_U8GLIB
491
+#if ENABLED(U8GLIB_ST7920)
493 492
   #ifndef BOARD_ST7920_DELAY_1
494 493
     #define BOARD_ST7920_DELAY_1   DELAY_NS(120)
495 494
   #endif
496 495
   #ifndef BOARD_ST7920_DELAY_2
497
-    #define BOARD_ST7920_DELAY_2    DELAY_NS(80)
496
+    #define BOARD_ST7920_DELAY_2   DELAY_NS( 80)
498 497
   #endif
499 498
   #ifndef BOARD_ST7920_DELAY_3
500 499
     #define BOARD_ST7920_DELAY_3   DELAY_NS(580)

+ 5
- 14
Marlin/src/pins/stm32f4/pins_FLYF407ZG.h Прегледај датотеку

@@ -185,7 +185,6 @@
185 185
  *        ------                ------
186 186
  *         EXP1                  EXP2
187 187
  */
188
-
189 188
 #define EXP1_03_PIN                         PE7
190 189
 #define EXP1_04_PIN                         PE8
191 190
 #define EXP1_05_PIN                         PE9
@@ -305,17 +304,9 @@
305 304
 
306 305
 #define FIL_RUNOUT_PIN                      PA3
307 306
 
308
-//
309
-// ST7920 Delays
310
-//
311
-#if HAS_MARLINUI_U8GLIB
312
-  #ifndef BOARD_ST7920_DELAY_1
313
-    #define BOARD_ST7920_DELAY_1    DELAY_NS(96)
314
-  #endif
315
-  #ifndef BOARD_ST7920_DELAY_2
316
-    #define BOARD_ST7920_DELAY_2    DELAY_NS(48)
317
-  #endif
318
-  #ifndef BOARD_ST7920_DELAY_3
319
-    #define BOARD_ST7920_DELAY_3   DELAY_NS(715)
320
-  #endif
307
+// Alter timing for graphical display
308
+#if ENABLED(U8GLIB_ST7920)
309
+  #define BOARD_ST7920_DELAY_1     DELAY_NS( 96)
310
+  #define BOARD_ST7920_DELAY_2     DELAY_NS( 48)
311
+  #define BOARD_ST7920_DELAY_3     DELAY_NS(715)
321 312
 #endif

+ 4
- 10
Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h Прегледај датотеку

@@ -250,16 +250,10 @@
250 250
 #endif // HAS_WIRED_LCD
251 251
 
252 252
 // Alter timing for graphical display
253
-#if HAS_MARLINUI_U8GLIB
254
-  #ifndef BOARD_ST7920_DELAY_1
255
-    #define BOARD_ST7920_DELAY_1    DELAY_NS(96)
256
-  #endif
257
-  #ifndef BOARD_ST7920_DELAY_2
258
-    #define BOARD_ST7920_DELAY_2    DELAY_NS(48)
259
-  #endif
260
-  #ifndef BOARD_ST7920_DELAY_3
261
-    #define BOARD_ST7920_DELAY_3   DELAY_NS(600)
262
-  #endif
253
+#if ENABLED(U8GLIB_ST7920)
254
+  #define BOARD_ST7920_DELAY_1     DELAY_NS( 96)
255
+  #define BOARD_ST7920_DELAY_2     DELAY_NS( 48)
256
+  #define BOARD_ST7920_DELAY_3     DELAY_NS(600)
263 257
 #endif
264 258
 
265 259
 #if ENABLED(TOUCH_UI_FTDI_EVE)

+ 4
- 10
Marlin/src/pins/stm32f4/pins_FYSETC_S6.h Прегледај датотеку

@@ -314,16 +314,10 @@
314 314
 #endif // HAS_WIRED_LCD
315 315
 
316 316
 // Alter timing for graphical display
317
-#if HAS_MARLINUI_U8GLIB
318
-  #ifndef BOARD_ST7920_DELAY_1
319
-    #define BOARD_ST7920_DELAY_1  DELAY_NS(96)
320
-  #endif
321
-  #ifndef BOARD_ST7920_DELAY_2
322
-    #define BOARD_ST7920_DELAY_2  DELAY_NS(48)
323
-  #endif
324
-  #ifndef BOARD_ST7920_DELAY_3
325
-    #define BOARD_ST7920_DELAY_3 DELAY_NS(640)
326
-  #endif
317
+#if ENABLED(U8GLIB_ST7920)
318
+  #define BOARD_ST7920_DELAY_1     DELAY_NS( 96)
319
+  #define BOARD_ST7920_DELAY_2     DELAY_NS( 48)
320
+  #define BOARD_ST7920_DELAY_3     DELAY_NS(640)
327 321
 #endif
328 322
 
329 323
 #ifndef RGB_LED_R_PIN

+ 0
- 1
Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h Прегледај датотеку

@@ -276,7 +276,6 @@
276 276
  *                ------                                     ------
277 277
  *                 EXP1                                       EXP2
278 278
  */
279
-
280 279
 #define EXP1_03_PIN                         PD10
281 280
 #define EXP1_04_PIN                         PD11
282 281
 #define EXP1_05_PIN                         PE15

+ 6
- 13
Marlin/src/pins/stm32f4/pins_RUMBA32_common.h Прегледај датотеку

@@ -167,20 +167,13 @@
167 167
     #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
168 168
       #define BTN_ENC_EN             LCD_PINS_D7  // Detect the presence of the encoder
169 169
     #endif
170
-
171 170
   #endif
172 171
 
173
-  // Alter timing for graphical display
174
-  #if HAS_MARLINUI_U8GLIB
175
-    #ifndef BOARD_ST7920_DELAY_1
176
-      #define BOARD_ST7920_DELAY_1 DELAY_NS(96)
177
-    #endif
178
-    #ifndef BOARD_ST7920_DELAY_2
179
-      #define BOARD_ST7920_DELAY_2 DELAY_NS(48)
180
-    #endif
181
-    #ifndef BOARD_ST7920_DELAY_3
182
-      #define BOARD_ST7920_DELAY_3 DELAY_NS(640)
183
-    #endif
184
-  #endif
172
+#endif // HAS_WIRED_LCD
185 173
 
174
+// Alter timing for graphical display
175
+#if ENABLED(U8GLIB_ST7920)
176
+  #define BOARD_ST7920_DELAY_1     DELAY_NS( 96)
177
+  #define BOARD_ST7920_DELAY_2     DELAY_NS( 48)
178
+  #define BOARD_ST7920_DELAY_3     DELAY_NS(640)
186 179
 #endif

+ 4
- 10
Marlin/src/pins/stm32f4/pins_VAKE403D.h Прегледај датотеку

@@ -182,15 +182,9 @@
182 182
   #define BTN_ENC                           PB12
183 183
 #endif
184 184
 
185
-//
186
-// ST7920 Delays
187
-//
188
-#ifndef BOARD_ST7920_DELAY_1
189
-  #define BOARD_ST7920_DELAY_1      DELAY_NS(96)
190
-#endif
191
-#ifndef BOARD_ST7920_DELAY_2
192
-  #define BOARD_ST7920_DELAY_2      DELAY_NS(48)
193
-#endif
194
-#ifndef BOARD_ST7920_DELAY_3
185
+// Alter timing for graphical display
186
+#if ENABLED(U8GLIB_ST7920)
187
+  #define BOARD_ST7920_DELAY_1     DELAY_NS( 96)
188
+  #define BOARD_ST7920_DELAY_2     DELAY_NS( 48)
195 189
   #define BOARD_ST7920_DELAY_3     DELAY_NS(715)
196 190
 #endif

Loading…
Откажи
Сачувај