Procházet zdrojové kódy

Board-based LCD delays

Scott Lahteine před 5 roky
rodič
revize
7010f92c4b

+ 16
- 0
Marlin/src/pins/pins.h Zobrazit soubor

@@ -1165,4 +1165,20 @@
1165 1165
   #define Z3_MS3_PIN -1
1166 1166
 #endif
1167 1167
 
1168
+#if HAS_GRAPHICAL_LCD
1169
+  #if !defined(ST7920_DELAY_1) && defined(BOARD_ST7920_DELAY_1)
1170
+    #define ST7920_DELAY_1 BOARD_ST7920_DELAY_1
1171
+  #endif
1172
+  #if !defined(ST7920_DELAY_2) && defined(BOARD_ST7920_DELAY_2)
1173
+    #define ST7920_DELAY_2 BOARD_ST7920_DELAY_2
1174
+  #endif
1175
+  #if !defined(ST7920_DELAY_3) && defined(BOARD_ST7920_DELAY_3)
1176
+    #define ST7920_DELAY_3 BOARD_ST7920_DELAY_3
1177
+  #endif
1178
+#else
1179
+  #undef ST7920_DELAY_1
1180
+  #undef ST7920_DELAY_2
1181
+  #undef ST7920_DELAY_3
1182
+#endif
1183
+
1168 1184
 #undef HAS_FREE_AUX2_PINS

+ 3
- 9
Marlin/src/pins/sanguino/pins_ANET_10.h Zobrazit soubor

@@ -175,15 +175,9 @@
175 175
     #define BTN_EN1          11
176 176
     #define BTN_EN2          10
177 177
     #define BTN_ENC          16
178
-    #ifndef ST7920_DELAY_1
179
-      #define ST7920_DELAY_1 DELAY_NS(0)
180
-    #endif
181
-    #ifndef ST7920_DELAY_2
182
-      #define ST7920_DELAY_2 DELAY_NS(63)
183
-    #endif
184
-    #ifndef ST7920_DELAY_3
185
-      #define ST7920_DELAY_3 DELAY_NS(125)
186
-    #endif
178
+    #define BOARD_ST7920_DELAY_1 DELAY_NS(0)
179
+    #define BOARD_ST7920_DELAY_2 DELAY_NS(63)
180
+    #define BOARD_ST7920_DELAY_3 DELAY_NS(125)
187 181
     #define STD_ENCODER_PULSES_PER_STEP 4
188 182
     #define STD_ENCODER_STEPS_PER_MENU_ITEM 1
189 183
   #endif

+ 4
- 8
Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h Zobrazit soubor

@@ -59,14 +59,10 @@
59 59
 #endif
60 60
 
61 61
 // Alter timing for graphical display
62
-#ifndef ST7920_DELAY_1
63
-  #define ST7920_DELAY_1 DELAY_NS(125)
64
-#endif
65
-#ifndef ST7920_DELAY_2
66
-  #define ST7920_DELAY_2 DELAY_NS(125)
67
-#endif
68
-#ifndef ST7920_DELAY_3
69
-  #define ST7920_DELAY_3 DELAY_NS(125)
62
+#if HAS_GRAPHICAL_LCD
63
+  #define BOARD_ST7920_DELAY_1 DELAY_NS(125)
64
+  #define BOARD_ST7920_DELAY_2 DELAY_NS(125)
65
+  #define BOARD_ST7920_DELAY_3 DELAY_NS(125)
70 66
 #endif
71 67
 
72 68
 #if ENABLED(MINIPANEL)

+ 4
- 8
Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h Zobrazit soubor

@@ -44,12 +44,8 @@
44 44
 #define BTN_ENC            28
45 45
 
46 46
 // Alter timing for graphical display
47
-#ifndef ST7920_DELAY_1
48
-  #define ST7920_DELAY_1 DELAY_NS(125)
49
-#endif
50
-#ifndef ST7920_DELAY_2
51
-  #define ST7920_DELAY_2 DELAY_NS(125)
52
-#endif
53
-#ifndef ST7920_DELAY_3
54
-  #define ST7920_DELAY_3 DELAY_NS(125)
47
+#if HAS_GRAPHICAL_LCD
48
+  #define BOARD_ST7920_DELAY_1 DELAY_NS(125)
49
+  #define BOARD_ST7920_DELAY_2 DELAY_NS(125)
50
+  #define BOARD_ST7920_DELAY_3 DELAY_NS(125)
55 51
 #endif

+ 4
- 8
Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h Zobrazit soubor

@@ -51,12 +51,8 @@
51 51
 #define BTN_EN2         11
52 52
 #define BTN_ENC         26
53 53
 
54
-#ifndef ST7920_DELAY_1
55
-  #define ST7920_DELAY_1 DELAY_NS(0)
56
-#endif
57
-#ifndef ST7920_DELAY_2
58
-  #define ST7920_DELAY_2 DELAY_NS(125)
59
-#endif
60
-#ifndef ST7920_DELAY_3
61
-  #define ST7920_DELAY_3 DELAY_NS(0)
54
+#if HAS_GRAPHICAL_LCD
55
+  #define BOARD_ST7920_DELAY_1 DELAY_NS(0)
56
+  #define BOARD_ST7920_DELAY_2 DELAY_NS(125)
57
+  #define BOARD_ST7920_DELAY_3 DELAY_NS(0)
62 58
 #endif

+ 3
- 9
Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h Zobrazit soubor

@@ -235,15 +235,9 @@
235 235
     #define BTN_EN1             29
236 236
     #define BTN_EN2             30
237 237
 
238
-    #ifndef ST7920_DELAY_1
239
-      #define ST7920_DELAY_1 DELAY_NS(0)
240
-    #endif
241
-    #ifndef ST7920_DELAY_2
242
-      #define ST7920_DELAY_2 DELAY_NS(188)
243
-    #endif
244
-    #ifndef ST7920_DELAY_3
245
-      #define ST7920_DELAY_3 DELAY_NS(0)
246
-    #endif
238
+    #define BOARD_ST7920_DELAY_1 DELAY_NS(0)
239
+    #define BOARD_ST7920_DELAY_2 DELAY_NS(188)
240
+    #define BOARD_ST7920_DELAY_3 DELAY_NS(0)
247 241
 
248 242
   #elif ENABLED(ZONESTAR_LCD) // For the Tronxy Melzi boards
249 243
 

+ 3
- 9
Marlin/src/pins/stm32/pins_BIGTREE_BTT002_V1.0.h Zobrazit soubor

@@ -243,15 +243,9 @@
243 243
 
244 244
   // Alter timing for graphical display
245 245
   #if HAS_GRAPHICAL_LCD
246
-    #ifndef ST7920_DELAY_1
247
-      #define ST7920_DELAY_1 DELAY_NS(96)
248
-    #endif
249
-    #ifndef ST7920_DELAY_2
250
-      #define ST7920_DELAY_2 DELAY_NS(48)
251
-    #endif
252
-    #ifndef ST7920_DELAY_3
253
-      #define ST7920_DELAY_3 DELAY_NS(600)
254
-    #endif
246
+    #define BOARD_ST7920_DELAY_1 DELAY_NS(96)
247
+    #define BOARD_ST7920_DELAY_2 DELAY_NS(48)
248
+    #define BOARD_ST7920_DELAY_3 DELAY_NS(600)
255 249
   #endif
256 250
 
257 251
 #endif // HAS_SPI_LCD

+ 4
- 9
Marlin/src/pins/stm32/pins_BIGTREE_SKR_MINI_V1_1.h Zobrazit soubor

@@ -209,13 +209,8 @@
209 209
 #define ON_BOARD_SPI_DEVICE 1    //SPI1
210 210
 #define ONBOARD_SD_CS_PIN  PA4   // Chip select for "System" SD card
211 211
 
212
-#ifndef ST7920_DELAY_1
213
-  #define ST7920_DELAY_1 DELAY_NS(125)
212
+#if HAS_GRAPHICAL_LCD
213
+  #define BOARD_ST7920_DELAY_1 DELAY_NS(125)
214
+  #define BOARD_ST7920_DELAY_2 DELAY_NS(125)
215
+  #define BOARD_ST7920_DELAY_3 DELAY_NS(125)
214 216
 #endif
215
-#ifndef ST7920_DELAY_2
216
-  #define ST7920_DELAY_2 DELAY_NS(125)
217
-#endif
218
-#ifndef ST7920_DELAY_3
219
-  #define ST7920_DELAY_3 DELAY_NS(125)
220
-#endif
221
-

+ 3
- 9
Marlin/src/pins/stm32/pins_BIGTREE_SKR_PRO_V1.1.h Zobrazit soubor

@@ -260,15 +260,9 @@
260 260
 
261 261
   // Alter timing for graphical display
262 262
   #if HAS_GRAPHICAL_LCD
263
-    #ifndef ST7920_DELAY_1
264
-      #define ST7920_DELAY_1 DELAY_NS(96)
265
-    #endif
266
-    #ifndef ST7920_DELAY_2
267
-      #define ST7920_DELAY_2 DELAY_NS(48)
268
-    #endif
269
-    #ifndef ST7920_DELAY_3
270
-      #define ST7920_DELAY_3 DELAY_NS(600)
271
-    #endif
263
+    #define BOARD_ST7920_DELAY_1 DELAY_NS(96)
264
+    #define BOARD_ST7920_DELAY_2 DELAY_NS(48)
265
+    #define BOARD_ST7920_DELAY_3 DELAY_NS(600)
272 266
   #endif
273 267
 
274 268
 #endif // HAS_SPI_LCD

+ 4
- 10
Marlin/src/pins/stm32/pins_GENERIC_STM32F4.h Zobrazit soubor

@@ -183,14 +183,8 @@
183 183
 //
184 184
 // ST7920 Delays
185 185
 //
186
-#ifndef ST7920_DELAY_1
187
-  #define ST7920_DELAY_1 DELAY_NS(96)
188
-#endif
189
-
190
-#ifndef ST7920_DELAY_2
191
-  #define ST7920_DELAY_2 DELAY_NS(48)
192
-#endif
193
-
194
-#ifndef ST7920_DELAY_3
195
-  #define ST7920_DELAY_3 DELAY_NS(715)
186
+#if HAS_GRAPHICAL_LCD
187
+  #define BOARD_ST7920_DELAY_1 DELAY_NS(96)
188
+  #define BOARD_ST7920_DELAY_2 DELAY_NS(48)
189
+  #define BOARD_ST7920_DELAY_3 DELAY_NS(715)
196 190
 #endif

+ 4
- 8
Marlin/src/pins/stm32/pins_GTM32_PRO_VB.h Zobrazit soubor

@@ -153,14 +153,10 @@
153 153
     //#define LCD_UART_RX    PD9
154 154
   #endif
155 155
 
156
-  #ifndef ST7920_DELAY_1
157
-    #define ST7920_DELAY_1 DELAY_NS(96)
158
-  #endif
159
-  #ifndef ST7920_DELAY_2
160
-    #define ST7920_DELAY_2 DELAY_NS(48)
161
-  #endif
162
-  #ifndef ST7920_DELAY_3
163
-    #define ST7920_DELAY_3 DELAY_NS(715)
156
+  #if HAS_GRAPHICAL_LCD
157
+    #define BOARD_ST7920_DELAY_1 DELAY_NS(96)
158
+    #define BOARD_ST7920_DELAY_2 DELAY_NS(48)
159
+    #define BOARD_ST7920_DELAY_3 DELAY_NS(715)
164 160
   #endif
165 161
 
166 162
 #endif // HAS_SPI_LCD

+ 4
- 8
Marlin/src/pins/stm32/pins_LERDGE_K.h Zobrazit soubor

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

+ 4
- 8
Marlin/src/pins/stm32/pins_LERDGE_X.h Zobrazit soubor

@@ -167,12 +167,8 @@
167 167
 //
168 168
 // ST7920 Delays
169 169
 //
170
-#ifndef ST7920_DELAY_1
171
-  #define ST7920_DELAY_1 DELAY_NS(96)
172
-#endif
173
-#ifndef ST7920_DELAY_2
174
-  #define ST7920_DELAY_2 DELAY_NS(48)
175
-#endif
176
-#ifndef ST7920_DELAY_3
177
-  #define ST7920_DELAY_3 DELAY_NS(715)
170
+#if HAS_GRAPHICAL_LCD
171
+  #define BOARD_ST7920_DELAY_1 DELAY_NS(96)
172
+  #define BOARD_ST7920_DELAY_2 DELAY_NS(48)
173
+  #define BOARD_ST7920_DELAY_3 DELAY_NS(715)
178 174
 #endif

+ 4
- 8
Marlin/src/pins/stm32/pins_MKS_ROBIN_LITE.h Zobrazit soubor

@@ -132,12 +132,8 @@
132 132
 #define MOSI_PIN           P1B5
133 133
 #define SS_PIN             PA15
134 134
 
135
-#ifndef ST7920_DELAY_1
136
-  #define ST7920_DELAY_1 DELAY_NS(125)
137
-#endif
138
-#ifndef ST7920_DELAY_2
139
-  #define ST7920_DELAY_2 DELAY_NS(125)
140
-#endif
141
-#ifndef ST7920_DELAY_3
142
-  #define ST7920_DELAY_3 DELAY_NS(125)
135
+#if HAS_GRAPHICAL_LCD
136
+  #define BOARD_ST7920_DELAY_1 DELAY_NS(125)
137
+  #define BOARD_ST7920_DELAY_2 DELAY_NS(125)
138
+  #define BOARD_ST7920_DELAY_3 DELAY_NS(125)
143 139
 #endif

+ 3
- 9
Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h Zobrazit soubor

@@ -247,15 +247,9 @@
247 247
     //#define MISO         23   //         13               B3                ICSP-06             EXP2-05
248 248
 
249 249
     // increase delays
250
-    #ifndef ST7920_DELAY_1
251
-      #define ST7920_DELAY_1 DELAY_NS(313)
252
-    #endif
253
-    #ifndef ST7920_DELAY_2
254
-      #define ST7920_DELAY_2 DELAY_NS(313)
255
-    #endif
256
-    #ifndef ST7920_DELAY_3
257
-      #define ST7920_DELAY_3 DELAY_NS(313)
258
-    #endif
250
+    #define BOARD_ST7920_DELAY_1 DELAY_NS(313)
251
+    #define BOARD_ST7920_DELAY_2 DELAY_NS(313)
252
+    #define BOARD_ST7920_DELAY_3 DELAY_NS(313)
259 253
 
260 254
   #else
261 255
 

Loading…
Zrušit
Uložit