浏览代码

Clean up Melzi LCD timing defaults (#18187)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
git-user44 4 年前
父节点
当前提交
9e2f142391
没有帐户链接到提交者的电子邮件

+ 11
- 7
Marlin/Makefile 查看文件

@@ -361,34 +361,38 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1501)
361 361
 else ifeq ($(HARDWARE_MOTHERBOARD),1502)
362 362
   HARDWARE_VARIANT ?= Sanguino
363 363
   MCU              ?= atmega644p
364
-# Melzi with ATmega1284 (MaKr3d version)
364
+# Melzi V2.0
365 365
 else ifeq ($(HARDWARE_MOTHERBOARD),1503)
366 366
   HARDWARE_VARIANT ?= Sanguino
367 367
   MCU              ?= atmega1284p
368
-# Melzi Creality3D board (for CR-10 etc)
368
+# Melzi with ATmega1284 (MaKr3d version)
369 369
 else ifeq ($(HARDWARE_MOTHERBOARD),1504)
370 370
   HARDWARE_VARIANT ?= Sanguino
371 371
   MCU              ?= atmega1284p
372
-# Melzi Malyan M150 board
372
+# Melzi Creality3D board (for CR-10 etc)
373 373
 else ifeq ($(HARDWARE_MOTHERBOARD),1505)
374 374
   HARDWARE_VARIANT ?= Sanguino
375 375
   MCU              ?= atmega1284p
376
-# Tronxy X5S
376
+# Melzi Malyan M150 board
377 377
 else ifeq ($(HARDWARE_MOTHERBOARD),1506)
378 378
   HARDWARE_VARIANT ?= Sanguino
379 379
   MCU              ?= atmega1284p
380
-# STB V1.1
380
+# Tronxy X5S
381 381
 else ifeq ($(HARDWARE_MOTHERBOARD),1507)
382 382
   HARDWARE_VARIANT ?= Sanguino
383 383
   MCU              ?= atmega1284p
384
-# Azteeg X1
384
+# STB V1.1
385 385
 else ifeq ($(HARDWARE_MOTHERBOARD),1508)
386 386
   HARDWARE_VARIANT ?= Sanguino
387 387
   MCU              ?= atmega1284p
388
-# Anet 1.0 (Melzi clone)
388
+# Azteeg X1
389 389
 else ifeq ($(HARDWARE_MOTHERBOARD),1509)
390 390
   HARDWARE_VARIANT ?= Sanguino
391 391
   MCU              ?= atmega1284p
392
+# Anet 1.0 (Melzi clone)
393
+else ifeq ($(HARDWARE_MOTHERBOARD),1510)
394
+  HARDWARE_VARIANT ?= Sanguino
395
+  MCU              ?= atmega1284p
392 396
 
393 397
 #
394 398
 # Other ATmega644P, ATmega644, ATmega1284P

+ 9
- 8
Marlin/src/core/boards.h 查看文件

@@ -162,13 +162,14 @@
162 162
 #define BOARD_SANGUINOLOLU_11         1500  // Sanguinololu < 1.2
163 163
 #define BOARD_SANGUINOLOLU_12         1501  // Sanguinololu 1.2 and above
164 164
 #define BOARD_MELZI                   1502  // Melzi
165
-#define BOARD_MELZI_MAKR3D            1503  // Melzi with ATmega1284 (MaKr3d version)
166
-#define BOARD_MELZI_CREALITY          1504  // Melzi Creality3D board (for CR-10 etc)
167
-#define BOARD_MELZI_MALYAN            1505  // Melzi Malyan M150 board
168
-#define BOARD_MELZI_TRONXY            1506  // Tronxy X5S
169
-#define BOARD_STB_11                  1507  // STB V1.1
170
-#define BOARD_AZTEEG_X1               1508  // Azteeg X1
171
-#define BOARD_ANET_10                 1509  // Anet 1.0 (Melzi clone)
165
+#define BOARD_MELZI_V2                1503  // Melzi V2
166
+#define BOARD_MELZI_MAKR3D            1504  // Melzi with ATmega1284 (MaKr3d version)
167
+#define BOARD_MELZI_CREALITY          1505  // Melzi Creality3D board (for CR-10 etc)
168
+#define BOARD_MELZI_MALYAN            1506  // Melzi Malyan M150 board
169
+#define BOARD_MELZI_TRONXY            1507  // Tronxy X5S
170
+#define BOARD_STB_11                  1508  // STB V1.1
171
+#define BOARD_AZTEEG_X1               1509  // Azteeg X1
172
+#define BOARD_ANET_10                 1510  // Anet 1.0 (Melzi clone)
172 173
 
173 174
 //
174 175
 // Other ATmega644P, ATmega644, ATmega1284P
@@ -365,4 +366,4 @@
365 366
 #define _MB_1(B)  (defined(BOARD_##B) && MOTHERBOARD==BOARD_##B)
366 367
 #define MB(V...)  DO(MB,||,V)
367 368
 
368
-#define IS_MELZI MB(MELZI, MELZI_CREALITY, MELZI_MAKR3D, MELZI_MALYAN, MELZI_TRONXY)
369
+#define IS_MELZI MB(MELZI, MELZI_CREALITY, MELZI_MAKR3D, MELZI_MALYAN, MELZI_TRONXY, MELZI_V2)

+ 2
- 0
Marlin/src/pins/pins.h 查看文件

@@ -284,6 +284,8 @@
284 284
   #include "sanguino/pins_SANGUINOLOLU_12.h"    // ATmega644P, ATmega1284P                env:sanguino644p env:sanguino1284p
285 285
 #elif MB(MELZI)
286 286
   #include "sanguino/pins_MELZI.h"              // ATmega644P, ATmega1284P                env:sanguino644p env:sanguino1284p
287
+#elif MB(MELZI_V2)
288
+  #include "sanguino/pins_MELZI_V2.h"           // ATmega644P, ATmega1284P                env:sanguino644p env:sanguino1284p
287 289
 #elif MB(MELZI_MAKR3D)
288 290
   #include "sanguino/pins_MELZI_MAKR3D.h"       // ATmega644P, ATmega1284P                env:sanguino644p env:sanguino1284p
289 291
 #elif MB(MELZI_CREALITY)

+ 7
- 7
Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h 查看文件

@@ -33,6 +33,13 @@
33 33
 
34 34
 #define BOARD_INFO_NAME "Melzi (Creality)"
35 35
 
36
+// Alter timing for graphical display
37
+#if HAS_GRAPHICAL_LCD
38
+  #define BOARD_ST7920_DELAY_1 DELAY_NS(125)
39
+  #define BOARD_ST7920_DELAY_2 DELAY_NS(125)
40
+  #define BOARD_ST7920_DELAY_3 DELAY_NS(125)
41
+#endif
42
+
36 43
 #include "pins_MELZI.h"
37 44
 
38 45
 //
@@ -58,13 +65,6 @@
58 65
   #undef BEEPER_PIN
59 66
 #endif
60 67
 
61
-// Alter timing for graphical display
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)
66
-#endif
67
-
68 68
 #if ENABLED(MINIPANEL)
69 69
   #undef DOGLCD_CS
70 70
   #define DOGLCD_CS LCD_PINS_RS

+ 8
- 7
Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h 查看文件

@@ -26,6 +26,14 @@
26 26
  */
27 27
 
28 28
 #define BOARD_INFO_NAME "Melzi (Malyan)"
29
+
30
+// Alter timing for graphical display
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)
35
+#endif
36
+
29 37
 #include "pins_MELZI.h"
30 38
 
31 39
 #undef LCD_SDSS
@@ -42,10 +50,3 @@
42 50
 #define BTN_EN1                              30
43 51
 #define BTN_EN2                              29
44 52
 #define BTN_ENC                              28
45
-
46
-// Alter timing for graphical display
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)
51
-#endif

+ 7
- 6
Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h 查看文件

@@ -26,6 +26,13 @@
26 26
  */
27 27
 
28 28
 #define BOARD_INFO_NAME "Melzi (Tronxy)"
29
+
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)
34
+#endif
35
+
29 36
 #include "pins_MELZI.h"
30 37
 
31 38
 #undef Z_ENABLE_PIN
@@ -50,9 +57,3 @@
50 57
 #define BTN_EN1                               10
51 58
 #define BTN_EN2                               11
52 59
 #define BTN_ENC                               26
53
-
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)
58
-#endif

+ 33
- 0
Marlin/src/pins/sanguino/pins_MELZI_V2.h 查看文件

@@ -0,0 +1,33 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * (at your option) any later version.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
+ * GNU General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU General Public License
16
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
+ *
18
+ */
19
+#pragma once
20
+
21
+/**
22
+ * Melzi V2.0 as found at https://www.reprap.org/wiki/Melzi
23
+ */
24
+
25
+#define BOARD_INFO_NAME "Melzi V2"
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)
31
+#endif
32
+
33
+#include "pins_MELZI.h"

+ 18
- 6
Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h 查看文件

@@ -166,9 +166,15 @@
166 166
       #define LCD_PINS_ENABLE                 16
167 167
       #define LCD_PINS_D4                     11
168 168
 
169
-      #define BOARD_ST7920_DELAY_1 DELAY_NS(0)
170
-      #define BOARD_ST7920_DELAY_2 DELAY_NS(188)
171
-      #define BOARD_ST7920_DELAY_3 DELAY_NS(0)
169
+      #ifndef BOARD_ST7920_DELAY_1
170
+        #define BOARD_ST7920_DELAY_1 DELAY_NS(0)
171
+      #endif
172
+      #ifndef BOARD_ST7920_DELAY_2
173
+        #define BOARD_ST7920_DELAY_2 DELAY_NS(188)
174
+      #endif
175
+      #ifndef BOARD_ST7920_DELAY_3
176
+        #define BOARD_ST7920_DELAY_3 DELAY_NS(0)
177
+      #endif
172 178
 
173 179
     #elif ENABLED(U8GLIB_ST7920)                  // SPI GLCD 12864 ST7920 ( like [www.digole.com] ) For Melzi V2.0
174 180
 
@@ -182,9 +188,15 @@
182 188
         #define BEEPER_PIN                    27
183 189
 
184 190
         #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
185
-          #define BOARD_ST7920_DELAY_1 DELAY_NS(0)
186
-          #define BOARD_ST7920_DELAY_2 DELAY_NS(188)
187
-          #define BOARD_ST7920_DELAY_3 DELAY_NS(0)
191
+          #ifndef BOARD_ST7920_DELAY_1
192
+            #define BOARD_ST7920_DELAY_1 DELAY_NS(0)
193
+          #endif
194
+          #ifndef BOARD_ST7920_DELAY_2
195
+            #define BOARD_ST7920_DELAY_2 DELAY_NS(188)
196
+          #endif
197
+          #ifndef BOARD_ST7920_DELAY_3
198
+            #define BOARD_ST7920_DELAY_3 DELAY_NS(0)
199
+          #endif
188 200
         #endif
189 201
 
190 202
       #else                                       // Sanguinololu >=1.3

正在加载...
取消
保存