Browse Source

Improve U8G+SPI delay override (#18386)

Co-authored-by: Scott Lahteine <github@thinkyhead.com>
Jason Smith 4 years ago
parent
commit
819e48972d
No account linked to committer's email address

+ 3
- 9
Marlin/src/inc/Conditionals_LCD.h View File

@@ -106,15 +106,9 @@
106 106
 #elif ENABLED(CR10_STOCKDISPLAY)
107 107
 
108 108
   #define IS_RRD_FG_SC
109
-  #ifndef ST7920_DELAY_1
110
-    #define ST7920_DELAY_1 DELAY_NS(125)
111
-  #endif
112
-  #ifndef ST7920_DELAY_2
113
-    #define ST7920_DELAY_2 DELAY_NS(125)
114
-  #endif
115
-  #ifndef ST7920_DELAY_3
116
-    #define ST7920_DELAY_3 DELAY_NS(125)
117
-  #endif
109
+  #define BOARD_ST7920_DELAY_1 DELAY_NS(125)
110
+  #define BOARD_ST7920_DELAY_2 DELAY_NS(125)
111
+  #define BOARD_ST7920_DELAY_3 DELAY_NS(125)
118 112
 
119 113
 #elif ENABLED(MKS_12864OLED)
120 114
 

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

@@ -34,19 +34,30 @@
34 34
 #include "ultralcd_st7920_u8glib_rrd_AVR.h"
35 35
 
36 36
 #ifndef ST7920_DELAY_1
37
-  #define ST7920_DELAY_1 CPU_ST7920_DELAY_1
37
+  #ifdef BOARD_ST7920_DELAY_1
38
+    #define ST7920_DELAY_1 BOARD_ST7920_DELAY_1
39
+  #else
40
+    #define ST7920_DELAY_1 CPU_ST7920_DELAY_1
41
+  #endif
38 42
 #endif
39 43
 #ifndef ST7920_DELAY_2
40
-  #define ST7920_DELAY_2 CPU_ST7920_DELAY_2
44
+  #ifdef BOARD_ST7920_DELAY_2
45
+    #define ST7920_DELAY_2 BOARD_ST7920_DELAY_2
46
+  #else
47
+    #define ST7920_DELAY_2 CPU_ST7920_DELAY_2
48
+  #endif
41 49
 #endif
42 50
 #ifndef ST7920_DELAY_3
43
-  #define ST7920_DELAY_3 CPU_ST7920_DELAY_3
51
+  #ifdef BOARD_ST7920_DELAY_3
52
+    #define ST7920_DELAY_3 BOARD_ST7920_DELAY_3
53
+  #else
54
+    #define ST7920_DELAY_3 CPU_ST7920_DELAY_3
55
+  #endif
44 56
 #endif
45 57
 
46 58
 // Optimize this code with -O3
47 59
 #pragma GCC optimize (3)
48 60
 
49
-
50 61
 #ifdef ARDUINO_ARCH_STM32F1
51 62
   #define ST7920_DAT(V) !!((V) & 0x80)
52 63
 #else

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

@@ -49,9 +49,9 @@
49 49
 //
50 50
 // Servos
51 51
 //
52
-#define SERVO0_PIN                           3
53
-#define SERVO1_PIN                           4
54
-#define SERVO2_PIN                           5
52
+#define SERVO0_PIN                             3
53
+#define SERVO1_PIN                             4
54
+#define SERVO2_PIN                             5
55 55
 //
56 56
 // Limit Switches
57 57
 //

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

@@ -22,15 +22,6 @@
22 22
 #pragma once
23 23
 
24 24
 /**
25
- * Override default LCD timing for Formbot T-Rex 2+ machines.
26
- * The long LCD cables and the routing near electrically noisy stepper motors
27
- * requires a slightly longer setup and hold time on the signals.
28
- */
29
-#define BOARD_ST7920_DELAY_1 DELAY_NS(200)
30
-#define BOARD_ST7920_DELAY_2 DELAY_NS(200)
31
-#define BOARD_ST7920_DELAY_3 DELAY_NS(200)
32
-
33
-/**
34 25
  * Formbot pin assignments
35 26
  */
36 27
 
@@ -205,3 +196,15 @@
205 196
   #define LCD_PINS_D6                         27
206 197
   #define LCD_PINS_D7                         29
207 198
 #endif
199
+
200
+#if HAS_GRAPHICAL_LCD
201
+  #ifndef BOARD_ST7920_DELAY_1
202
+    #define BOARD_ST7920_DELAY_1 DELAY_NS(200)
203
+  #endif
204
+  #ifndef BOARD_ST7920_DELAY_2
205
+    #define BOARD_ST7920_DELAY_2 DELAY_NS(200)
206
+  #endif
207
+  #ifndef BOARD_ST7920_DELAY_3
208
+    #define BOARD_ST7920_DELAY_3 DELAY_NS(200)
209
+  #endif
210
+#endif

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

@@ -37,9 +37,15 @@
37 37
 
38 38
 // Alter timing for graphical display
39 39
 #if HAS_GRAPHICAL_LCD
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)
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
43 49
 #endif
44 50
 
45 51
 #include "pins_MELZI.h"

+ 9
- 3
Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h View File

@@ -29,9 +29,15 @@
29 29
 
30 30
 // Alter timing for graphical display
31 31
 #if HAS_GRAPHICAL_LCD
32
-  #define BOARD_ST7920_DELAY_1 DELAY_NS(125)
33
-  #define BOARD_ST7920_DELAY_2 DELAY_NS(125)
34
-  #define BOARD_ST7920_DELAY_3 DELAY_NS(125)
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
35 41
 #endif
36 42
 
37 43
 #include "pins_MELZI.h"

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

@@ -28,9 +28,15 @@
28 28
 #define BOARD_INFO_NAME "Melzi (Tronxy)"
29 29
 
30 30
 #if HAS_GRAPHICAL_LCD
31
-  #define BOARD_ST7920_DELAY_1 DELAY_NS(0)
32
-  #define BOARD_ST7920_DELAY_2 DELAY_NS(125)
33
-  #define BOARD_ST7920_DELAY_3 DELAY_NS(0)
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
34 40
 #endif
35 41
 
36 42
 #include "pins_MELZI.h"

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

@@ -24,10 +24,16 @@
24 24
 
25 25
 #define BOARD_INFO_NAME "Melzi V2"
26 26
 
27
-#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
28
-  #define BOARD_ST7920_DELAY_1 DELAY_NS(0)
29
-  #define BOARD_ST7920_DELAY_2 DELAY_NS(188)
30
-  #define BOARD_ST7920_DELAY_3 DELAY_NS(0)
27
+#if HAS_GRAPHICAL_LCD
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(188)
33
+  #endif
34
+  #ifndef BOARD_ST7920_DELAY_3
35
+    #define BOARD_ST7920_DELAY_3 DELAY_NS(0)
36
+  #endif
31 37
 #endif
32 38
 
33 39
 #include "pins_MELZI.h"

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

@@ -163,15 +163,27 @@
163 163
 
164 164
     #else                                         // !FYSETC_MINI_12864
165 165
 
166
-    #define LCD_PINS_D4                     PC13
167
-    #if ENABLED(ULTIPANEL)
168
-      #define LCD_PINS_D5                   PB7
169
-      #define LCD_PINS_D6                   PC15
170
-      #define LCD_PINS_D7                   PC14
171
-    #endif
166
+      #define LCD_PINS_D4                   PC13
167
+      #if ENABLED(ULTIPANEL)
168
+        #define LCD_PINS_D5                 PB7
169
+        #define LCD_PINS_D6                 PC15
170
+        #define LCD_PINS_D7                 PC14
171
+      #endif
172 172
 
173 173
     #endif // !FYSETC_MINI_12864
174 174
 
175
+    #if HAS_GRAPHICAL_LCD
176
+      #ifndef BOARD_ST7920_DELAY_1
177
+        #define BOARD_ST7920_DELAY_1 DELAY_NS(125)
178
+      #endif
179
+      #ifndef BOARD_ST7920_DELAY_2
180
+        #define BOARD_ST7920_DELAY_2 DELAY_NS(125)
181
+      #endif
182
+      #ifndef BOARD_ST7920_DELAY_3
183
+        #define BOARD_ST7920_DELAY_3 DELAY_NS(125)
184
+      #endif
185
+    #endif
186
+
175 187
   #endif
176 188
 
177 189
 #endif // HAS_SPI_LCD
@@ -203,9 +215,3 @@
203 215
 #endif
204 216
 #define ON_BOARD_SPI_DEVICE 1                     // SPI1
205 217
 #define ONBOARD_SD_CS_PIN                   PA4   // Chip select for "System" SD card
206
-
207
-#if HAS_GRAPHICAL_LCD
208
-  #define BOARD_ST7920_DELAY_1 DELAY_NS(125)
209
-  #define BOARD_ST7920_DELAY_2 DELAY_NS(125)
210
-  #define BOARD_ST7920_DELAY_3 DELAY_NS(125)
211
-#endif

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

@@ -43,9 +43,9 @@
43 43
 //
44 44
 #if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION)
45 45
   #define FLASH_EEPROM_EMULATION
46
-  #define EEPROM_PAGE_SIZE     0x800U             // 2KB
46
+  #define EEPROM_PAGE_SIZE 0x800U                 // 2KB
47 47
   #define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL)
48
-  #define MARLIN_EEPROM_SIZE   0x1000             // 4KB
48
+  #define MARLIN_EEPROM_SIZE 0x1000               // 4KB
49 49
 #endif
50 50
 
51 51
 //
@@ -143,9 +143,15 @@
143 143
 
144 144
 // Alter timing for graphical display
145 145
 #if HAS_GRAPHICAL_LCD
146
-  #define BOARD_ST7920_DELAY_1 DELAY_NS(125)
147
-  #define BOARD_ST7920_DELAY_2 DELAY_NS(125)
148
-  #define BOARD_ST7920_DELAY_3 DELAY_NS(125)
146
+  #ifndef BOARD_ST7920_DELAY_1
147
+    #define BOARD_ST7920_DELAY_1 DELAY_NS(125)
148
+  #endif
149
+  #ifndef BOARD_ST7920_DELAY_2
150
+    #define BOARD_ST7920_DELAY_2 DELAY_NS(125)
151
+  #endif
152
+  #ifndef BOARD_ST7920_DELAY_3
153
+    #define BOARD_ST7920_DELAY_3 DELAY_NS(125)
154
+  #endif
149 155
 #endif
150 156
 
151 157
 //

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

@@ -42,9 +42,9 @@
42 42
   // SoC Flash (framework-arduinoststm32-maple/STM32F1/libraries/EEPROM/EEPROM.h)
43 43
   #define EEPROM_START_ADDRESS (0x8000000UL + (512 * 1024) - 2 * EEPROM_PAGE_SIZE)
44 44
   #define EEPROM_PAGE_SIZE     (0x800U)     // 2KB, but will use 2x more (4KB)
45
-  #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE
45
+  #define MARLIN_EEPROM_SIZE    EEPROM_PAGE_SIZE
46 46
 #else
47
-  #define MARLIN_EEPROM_SIZE 0x800U         // On SD, Limit to 2KB, require this amount of RAM
47
+  #define MARLIN_EEPROM_SIZE 0x800U               // On SD, Limit to 2KB, require this amount of RAM
48 48
 #endif
49 49
 
50 50
 //

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

@@ -46,9 +46,9 @@
46 46
   // SoC Flash (framework-arduinoststm32-maple/STM32F1/libraries/EEPROM/EEPROM.h)
47 47
   #define EEPROM_START_ADDRESS (0x8000000UL + (512 * 1024) - 2 * EEPROM_PAGE_SIZE)
48 48
   #define EEPROM_PAGE_SIZE     (0x800U)     // 2KB, but will use 2x more (4KB)
49
-  #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE
49
+  #define MARLIN_EEPROM_SIZE    EEPROM_PAGE_SIZE
50 50
 #else
51
-  #define MARLIN_EEPROM_SIZE 0x800U         // On SD, Limit to 2KB, require this amount of RAM
51
+  #define MARLIN_EEPROM_SIZE 0x800U               // On SD, Limit to 2KB, require this amount of RAM
52 52
 #endif
53 53
 
54 54
 //

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

@@ -119,7 +119,7 @@
119 119
 #define SD_DETECT_PIN                       PC7
120 120
 #define SDCARD_CONNECTION                ONBOARD
121 121
 #define ON_BOARD_SPI_DEVICE 1
122
-#define ONBOARD_SD_CS_PIN                   PA4  // SDSS
122
+#define ONBOARD_SD_CS_PIN                   PA4   // SDSS
123 123
 #define SDIO_SUPPORT
124 124
 
125 125
 #if ENABLED(RET6_12864_LCD)

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

@@ -159,9 +159,15 @@
159 159
   #endif
160 160
 
161 161
   #if HAS_GRAPHICAL_LCD
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)
162
+    #ifndef BOARD_ST7920_DELAY_1
163
+      #define BOARD_ST7920_DELAY_1 DELAY_NS(96)
164
+    #endif
165
+    #ifndef BOARD_ST7920_DELAY_2
166
+      #define BOARD_ST7920_DELAY_2 DELAY_NS(48)
167
+    #endif
168
+    #ifndef BOARD_ST7920_DELAY_3
169
+      #define BOARD_ST7920_DELAY_3 DELAY_NS(715)
170
+    #endif
165 171
   #endif
166 172
 
167 173
 #endif // HAS_SPI_LCD

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

@@ -159,9 +159,15 @@
159 159
   #endif
160 160
 
161 161
   #if HAS_GRAPHICAL_LCD
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)
162
+    #ifndef BOARD_ST7920_DELAY_1
163
+      #define BOARD_ST7920_DELAY_1 DELAY_NS(96)
164
+    #endif
165
+    #ifndef BOARD_ST7920_DELAY_2
166
+      #define BOARD_ST7920_DELAY_2 DELAY_NS(48)
167
+    #endif
168
+    #ifndef BOARD_ST7920_DELAY_3
169
+      #define BOARD_ST7920_DELAY_3 DELAY_NS(715)
170
+    #endif
165 171
   #endif
166 172
 
167 173
 #endif // HAS_SPI_LCD

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

@@ -42,7 +42,7 @@
42 42
   #define FLASH_EEPROM_EMULATION
43 43
   #define EEPROM_PAGE_SIZE     (0x800U) // 2KB
44 44
   #define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL)
45
-  #define MARLIN_EEPROM_SIZE   EEPROM_PAGE_SIZE  // 2KB
45
+  #define MARLIN_EEPROM_SIZE    EEPROM_PAGE_SIZE  // 2KB
46 46
 #endif
47 47
 
48 48
 //

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

@@ -111,6 +111,18 @@
111 111
 
112 112
   #endif // !MKS_MINI_12864
113 113
 
114
+  #if HAS_GRAPHICAL_LCD
115
+    #ifndef BOARD_ST7920_DELAY_1
116
+      #define BOARD_ST7920_DELAY_1 DELAY_NS(125)
117
+    #endif
118
+    #ifndef BOARD_ST7920_DELAY_2
119
+      #define BOARD_ST7920_DELAY_2 DELAY_NS(125)
120
+    #endif
121
+    #ifndef BOARD_ST7920_DELAY_3
122
+      #define BOARD_ST7920_DELAY_3 DELAY_NS(125)
123
+    #endif
124
+  #endif
125
+
114 126
 #endif // HAS_SPI_LCD
115 127
 
116 128
 // Motor current PWM pins
@@ -129,9 +141,3 @@
129 141
 #define MISO_PIN                            P1B4
130 142
 #define MOSI_PIN                            P1B5
131 143
 #define SS_PIN                              PA15
132
-
133
-#if HAS_GRAPHICAL_LCD
134
-  #define BOARD_ST7920_DELAY_1 DELAY_NS(125)
135
-  #define BOARD_ST7920_DELAY_2 DELAY_NS(125)
136
-  #define BOARD_ST7920_DELAY_3 DELAY_NS(125)
137
-#endif

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

@@ -237,9 +237,15 @@
237 237
 
238 238
   // Alter timing for graphical display
239 239
   #if HAS_GRAPHICAL_LCD
240
-    #define BOARD_ST7920_DELAY_1 DELAY_NS(96)
241
-    #define BOARD_ST7920_DELAY_2 DELAY_NS(48)
242
-    #define BOARD_ST7920_DELAY_3 DELAY_NS(600)
240
+    #ifndef BOARD_ST7920_DELAY_1
241
+      #define BOARD_ST7920_DELAY_1 DELAY_NS(96)
242
+    #endif
243
+    #ifndef BOARD_ST7920_DELAY_2
244
+      #define BOARD_ST7920_DELAY_2 DELAY_NS(48)
245
+    #endif
246
+    #ifndef BOARD_ST7920_DELAY_3
247
+      #define BOARD_ST7920_DELAY_3 DELAY_NS(600)
248
+    #endif
243 249
   #endif
244 250
 
245 251
 #endif // HAS_SPI_LCD

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

@@ -328,9 +328,10 @@
328 328
     #define LCD_PINS_ENABLE                 PG5
329 329
     #define LCD_PINS_D4                     PG7
330 330
 
331
-    //#undef ST7920_DELAY_1
332
-    //#undef ST7920_DELAY_2
333
-    //#undef ST7920_DELAY_3
331
+    // CR10_STOCKDISPLAY default timing is too fast
332
+    #undef BOARD_ST7920_DELAY_1
333
+    #undef BOARD_ST7920_DELAY_2
334
+    #undef BOARD_ST7920_DELAY_3
334 335
 
335 336
   #else
336 337
 
@@ -377,9 +378,15 @@
377 378
 
378 379
   // Alter timing for graphical display
379 380
   #if HAS_GRAPHICAL_LCD
380
-    #define BOARD_ST7920_DELAY_1 DELAY_NS(96)
381
-    #define BOARD_ST7920_DELAY_2 DELAY_NS(48)
382
-    #define BOARD_ST7920_DELAY_3 DELAY_NS(600)
381
+    #ifndef BOARD_ST7920_DELAY_1
382
+      #define BOARD_ST7920_DELAY_1 DELAY_NS(96)
383
+    #endif
384
+    #ifndef BOARD_ST7920_DELAY_2
385
+      #define BOARD_ST7920_DELAY_2 DELAY_NS(48)
386
+    #endif
387
+    #ifndef BOARD_ST7920_DELAY_3
388
+      #define BOARD_ST7920_DELAY_3 DELAY_NS(600)
389
+    #endif
383 390
   #endif
384 391
 
385 392
   //#define DOGLCD_CS                       PB12

+ 13
- 8
Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h View File

@@ -275,11 +275,10 @@
275 275
     #define LCD_PINS_ENABLE                 PG7
276 276
     #define LCD_PINS_D4                     PG3
277 277
 
278
-    // CR10_Stock Display needs a different delay setting on SKR PRO v1.1, so undef it here.
279
-    // It will be defined again at the #HAS_GRAPHICAL_LCD section below.
280
-    #undef ST7920_DELAY_1
281
-    #undef ST7920_DELAY_2
282
-    #undef ST7920_DELAY_3
278
+    // CR10_STOCKDISPLAY default timing is too fast
279
+    #undef BOARD_ST7920_DELAY_1
280
+    #undef BOARD_ST7920_DELAY_2
281
+    #undef BOARD_ST7920_DELAY_3
283 282
 
284 283
   #elif ENABLED(MKS_MINI_12864)
285 284
     #define DOGLCD_A0                       PG6
@@ -328,9 +327,15 @@
328 327
 
329 328
   // Alter timing for graphical display
330 329
   #if HAS_GRAPHICAL_LCD
331
-    #define BOARD_ST7920_DELAY_1 DELAY_NS(96)
332
-    #define BOARD_ST7920_DELAY_2 DELAY_NS(48)
333
-    #define BOARD_ST7920_DELAY_3 DELAY_NS(600)
330
+    #ifndef BOARD_ST7920_DELAY_1
331
+      #define BOARD_ST7920_DELAY_1  DELAY_NS(96)
332
+    #endif
333
+    #ifndef BOARD_ST7920_DELAY_2
334
+      #define BOARD_ST7920_DELAY_2  DELAY_NS(48)
335
+    #endif
336
+    #ifndef BOARD_ST7920_DELAY_3
337
+      #define BOARD_ST7920_DELAY_3 DELAY_NS(600)
338
+    #endif
334 339
   #endif
335 340
 
336 341
 #endif // HAS_SPI_LCD

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

@@ -191,11 +191,10 @@
191 191
     #define LCD_PINS_ENABLE                 PD1
192 192
     #define LCD_PINS_D4                     PC12
193 193
 
194
-    // CR10_Stock Display needs a different delay setting on SKR PRO v1.1, so undef it here.
195
-    // It will be defined again at the #HAS_GRAPHICAL_LCD section below.
196
-    #undef ST7920_DELAY_1
197
-    #undef ST7920_DELAY_2
198
-    #undef ST7920_DELAY_3
194
+    // CR10_STOCKDISPLAY default timing is too fast
195
+    #undef BOARD_ST7920_DELAY_1
196
+    #undef BOARD_ST7920_DELAY_2
197
+    #undef BOARD_ST7920_DELAY_3
199 198
 
200 199
   #else
201 200
 

+ 9
- 3
Marlin/src/pins/stm32f4/pins_GENERIC_STM32F4.h View File

@@ -185,7 +185,13 @@
185 185
 // ST7920 Delays
186 186
 //
187 187
 #if HAS_GRAPHICAL_LCD
188
-  #define BOARD_ST7920_DELAY_1 DELAY_NS(96)
189
-  #define BOARD_ST7920_DELAY_2 DELAY_NS(48)
190
-  #define BOARD_ST7920_DELAY_3 DELAY_NS(715)
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
195
+    #define BOARD_ST7920_DELAY_3 DELAY_NS(715)
196
+  #endif
191 197
 #endif

+ 9
- 3
Marlin/src/pins/stm32f4/pins_LERDGE_K.h View File

@@ -173,7 +173,13 @@
173 173
 // ST7920 Delays
174 174
 //
175 175
 #if HAS_GRAPHICAL_LCD
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(715)
176
+  #ifndef BOARD_ST7920_DELAY_1
177
+    #define BOARD_ST7920_DELAY_1  DELAY_NS(96)
178
+  #endif
179
+  #ifndef BOARD_ST7920_DELAY_2
180
+    #define BOARD_ST7920_DELAY_2  DELAY_NS(48)
181
+  #endif
182
+  #ifndef BOARD_ST7920_DELAY_3
183
+    #define BOARD_ST7920_DELAY_3 DELAY_NS(715)
184
+  #endif
179 185
 #endif

+ 9
- 3
Marlin/src/pins/stm32f4/pins_LERDGE_X.h View File

@@ -170,7 +170,13 @@
170 170
 // ST7920 Delays
171 171
 //
172 172
 #if HAS_GRAPHICAL_LCD
173
-  #define BOARD_ST7920_DELAY_1 DELAY_NS(96)
174
-  #define BOARD_ST7920_DELAY_2 DELAY_NS(48)
175
-  #define BOARD_ST7920_DELAY_3 DELAY_NS(715)
173
+  #ifndef BOARD_ST7920_DELAY_1
174
+    #define BOARD_ST7920_DELAY_1  DELAY_NS(96)
175
+  #endif
176
+  #ifndef BOARD_ST7920_DELAY_2
177
+    #define BOARD_ST7920_DELAY_2  DELAY_NS(48)
178
+  #endif
179
+  #ifndef BOARD_ST7920_DELAY_3
180
+    #define BOARD_ST7920_DELAY_3 DELAY_NS(715)
181
+  #endif
176 182
 #endif

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

@@ -37,7 +37,7 @@
37 37
 
38 38
 #if NO_EEPROM_SELECTED
39 39
   #define FLASH_EEPROM_EMULATION
40
-  #define MARLIN_EEPROM_SIZE 0x1000             // 4KB
40
+  #define MARLIN_EEPROM_SIZE 0x1000               // 4KB
41 41
 #endif
42 42
 
43 43
 #if ENABLED(FLASH_EEPROM_EMULATION)

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

@@ -44,10 +44,10 @@
44 44
 // TIM7 is used for SERVO
45 45
 // TIMER_SERIAL defaults to TIM7 so we'll override it here
46 46
 //
47
-#define STEP_TIMER                          10
48
-#define TEMP_TIMER                          14
47
+#define STEP_TIMER 10
48
+#define TEMP_TIMER 14
49 49
 #define TIMER_SERIAL                        TIM9
50
-#define HAL_TIMER_RATE                      F_CPU
50
+#define HAL_TIMER_RATE                     F_CPU
51 51
 
52 52
 //
53 53
 // Limit Switches

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

@@ -246,7 +246,7 @@
246 246
     //#define MOSI                            22  //         12               B2                ICSP-03             EXP2-05
247 247
     //#define MISO                            23  //         13               B3                ICSP-06             EXP2-05
248 248
 
249
-    // increase delays
249
+    // Alter timing for graphical display
250 250
     #define BOARD_ST7920_DELAY_1 DELAY_NS(313)
251 251
     #define BOARD_ST7920_DELAY_2 DELAY_NS(313)
252 252
     #define BOARD_ST7920_DELAY_3 DELAY_NS(313)

Loading…
Cancel
Save