Browse Source

Clean up Melzi LCD timing defaults (#18187)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
git-user44 4 years ago
parent
commit
9e2f142391
No account linked to committer's email address

+ 11
- 7
Marlin/Makefile View File

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

+ 9
- 8
Marlin/src/core/boards.h View File

162
 #define BOARD_SANGUINOLOLU_11         1500  // Sanguinololu < 1.2
162
 #define BOARD_SANGUINOLOLU_11         1500  // Sanguinololu < 1.2
163
 #define BOARD_SANGUINOLOLU_12         1501  // Sanguinololu 1.2 and above
163
 #define BOARD_SANGUINOLOLU_12         1501  // Sanguinololu 1.2 and above
164
 #define BOARD_MELZI                   1502  // Melzi
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
 // Other ATmega644P, ATmega644, ATmega1284P
175
 // Other ATmega644P, ATmega644, ATmega1284P
365
 #define _MB_1(B)  (defined(BOARD_##B) && MOTHERBOARD==BOARD_##B)
366
 #define _MB_1(B)  (defined(BOARD_##B) && MOTHERBOARD==BOARD_##B)
366
 #define MB(V...)  DO(MB,||,V)
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 View File

284
   #include "sanguino/pins_SANGUINOLOLU_12.h"    // ATmega644P, ATmega1284P                env:sanguino644p env:sanguino1284p
284
   #include "sanguino/pins_SANGUINOLOLU_12.h"    // ATmega644P, ATmega1284P                env:sanguino644p env:sanguino1284p
285
 #elif MB(MELZI)
285
 #elif MB(MELZI)
286
   #include "sanguino/pins_MELZI.h"              // ATmega644P, ATmega1284P                env:sanguino644p env:sanguino1284p
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
 #elif MB(MELZI_MAKR3D)
289
 #elif MB(MELZI_MAKR3D)
288
   #include "sanguino/pins_MELZI_MAKR3D.h"       // ATmega644P, ATmega1284P                env:sanguino644p env:sanguino1284p
290
   #include "sanguino/pins_MELZI_MAKR3D.h"       // ATmega644P, ATmega1284P                env:sanguino644p env:sanguino1284p
289
 #elif MB(MELZI_CREALITY)
291
 #elif MB(MELZI_CREALITY)

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

33
 
33
 
34
 #define BOARD_INFO_NAME "Melzi (Creality)"
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
 #include "pins_MELZI.h"
43
 #include "pins_MELZI.h"
37
 
44
 
38
 //
45
 //
58
   #undef BEEPER_PIN
65
   #undef BEEPER_PIN
59
 #endif
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
 #if ENABLED(MINIPANEL)
68
 #if ENABLED(MINIPANEL)
69
   #undef DOGLCD_CS
69
   #undef DOGLCD_CS
70
   #define DOGLCD_CS LCD_PINS_RS
70
   #define DOGLCD_CS LCD_PINS_RS

+ 8
- 7
Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h View File

26
  */
26
  */
27
 
27
 
28
 #define BOARD_INFO_NAME "Melzi (Malyan)"
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
 #include "pins_MELZI.h"
37
 #include "pins_MELZI.h"
30
 
38
 
31
 #undef LCD_SDSS
39
 #undef LCD_SDSS
42
 #define BTN_EN1                              30
50
 #define BTN_EN1                              30
43
 #define BTN_EN2                              29
51
 #define BTN_EN2                              29
44
 #define BTN_ENC                              28
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 View File

26
  */
26
  */
27
 
27
 
28
 #define BOARD_INFO_NAME "Melzi (Tronxy)"
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
 #include "pins_MELZI.h"
36
 #include "pins_MELZI.h"
30
 
37
 
31
 #undef Z_ENABLE_PIN
38
 #undef Z_ENABLE_PIN
50
 #define BTN_EN1                               10
57
 #define BTN_EN1                               10
51
 #define BTN_EN2                               11
58
 #define BTN_EN2                               11
52
 #define BTN_ENC                               26
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 View File

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 View File

166
       #define LCD_PINS_ENABLE                 16
166
       #define LCD_PINS_ENABLE                 16
167
       #define LCD_PINS_D4                     11
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
     #elif ENABLED(U8GLIB_ST7920)                  // SPI GLCD 12864 ST7920 ( like [www.digole.com] ) For Melzi V2.0
179
     #elif ENABLED(U8GLIB_ST7920)                  // SPI GLCD 12864 ST7920 ( like [www.digole.com] ) For Melzi V2.0
174
 
180
 
182
         #define BEEPER_PIN                    27
188
         #define BEEPER_PIN                    27
183
 
189
 
184
         #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
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
         #endif
200
         #endif
189
 
201
 
190
       #else                                       // Sanguinololu >=1.3
202
       #else                                       // Sanguinololu >=1.3

Loading…
Cancel
Save