Clean up Melzi LCD timing defaults (#18187)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
git-user44 2020-06-05 01:55:39 +01:00 committed by GitHub
parent fcb8c5a1c1
commit 9e2f142391
Signed by: GitHub
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 95 additions and 41 deletions

View file

@ -361,34 +361,38 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1501)
else ifeq ($(HARDWARE_MOTHERBOARD),1502) else ifeq ($(HARDWARE_MOTHERBOARD),1502)
HARDWARE_VARIANT ?= Sanguino HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega644p MCU ?= atmega644p
# Melzi with ATmega1284 (MaKr3d version) # Melzi V2.0
else ifeq ($(HARDWARE_MOTHERBOARD),1503) else ifeq ($(HARDWARE_MOTHERBOARD),1503)
HARDWARE_VARIANT ?= Sanguino HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p MCU ?= atmega1284p
# Melzi Creality3D board (for CR-10 etc) # Melzi with ATmega1284 (MaKr3d version)
else ifeq ($(HARDWARE_MOTHERBOARD),1504) else ifeq ($(HARDWARE_MOTHERBOARD),1504)
HARDWARE_VARIANT ?= Sanguino HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p MCU ?= atmega1284p
# Melzi Malyan M150 board # Melzi Creality3D board (for CR-10 etc)
else ifeq ($(HARDWARE_MOTHERBOARD),1505) else ifeq ($(HARDWARE_MOTHERBOARD),1505)
HARDWARE_VARIANT ?= Sanguino HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p MCU ?= atmega1284p
# Tronxy X5S # Melzi Malyan M150 board
else ifeq ($(HARDWARE_MOTHERBOARD),1506) else ifeq ($(HARDWARE_MOTHERBOARD),1506)
HARDWARE_VARIANT ?= Sanguino HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p MCU ?= atmega1284p
# STB V1.1 # Tronxy X5S
else ifeq ($(HARDWARE_MOTHERBOARD),1507) else ifeq ($(HARDWARE_MOTHERBOARD),1507)
HARDWARE_VARIANT ?= Sanguino HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p MCU ?= atmega1284p
# Azteeg X1 # STB V1.1
else ifeq ($(HARDWARE_MOTHERBOARD),1508) else ifeq ($(HARDWARE_MOTHERBOARD),1508)
HARDWARE_VARIANT ?= Sanguino HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p MCU ?= atmega1284p
# Anet 1.0 (Melzi clone) # Azteeg X1
else ifeq ($(HARDWARE_MOTHERBOARD),1509) else ifeq ($(HARDWARE_MOTHERBOARD),1509)
HARDWARE_VARIANT ?= Sanguino HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p MCU ?= atmega1284p
# Anet 1.0 (Melzi clone)
else ifeq ($(HARDWARE_MOTHERBOARD),1510)
HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p
# #
# Other ATmega644P, ATmega644, ATmega1284P # Other ATmega644P, ATmega644, ATmega1284P

View file

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

View file

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

View file

@ -33,6 +33,13 @@
#define BOARD_INFO_NAME "Melzi (Creality)" #define BOARD_INFO_NAME "Melzi (Creality)"
// Alter timing for graphical display
#if HAS_GRAPHICAL_LCD
#define BOARD_ST7920_DELAY_1 DELAY_NS(125)
#define BOARD_ST7920_DELAY_2 DELAY_NS(125)
#define BOARD_ST7920_DELAY_3 DELAY_NS(125)
#endif
#include "pins_MELZI.h" #include "pins_MELZI.h"
// //
@ -58,13 +65,6 @@
#undef BEEPER_PIN #undef BEEPER_PIN
#endif #endif
// Alter timing for graphical display
#if HAS_GRAPHICAL_LCD
#define BOARD_ST7920_DELAY_1 DELAY_NS(125)
#define BOARD_ST7920_DELAY_2 DELAY_NS(125)
#define BOARD_ST7920_DELAY_3 DELAY_NS(125)
#endif
#if ENABLED(MINIPANEL) #if ENABLED(MINIPANEL)
#undef DOGLCD_CS #undef DOGLCD_CS
#define DOGLCD_CS LCD_PINS_RS #define DOGLCD_CS LCD_PINS_RS

View file

@ -26,6 +26,14 @@
*/ */
#define BOARD_INFO_NAME "Melzi (Malyan)" #define BOARD_INFO_NAME "Melzi (Malyan)"
// Alter timing for graphical display
#if HAS_GRAPHICAL_LCD
#define BOARD_ST7920_DELAY_1 DELAY_NS(125)
#define BOARD_ST7920_DELAY_2 DELAY_NS(125)
#define BOARD_ST7920_DELAY_3 DELAY_NS(125)
#endif
#include "pins_MELZI.h" #include "pins_MELZI.h"
#undef LCD_SDSS #undef LCD_SDSS
@ -42,10 +50,3 @@
#define BTN_EN1 30 #define BTN_EN1 30
#define BTN_EN2 29 #define BTN_EN2 29
#define BTN_ENC 28 #define BTN_ENC 28
// Alter timing for graphical display
#if HAS_GRAPHICAL_LCD
#define BOARD_ST7920_DELAY_1 DELAY_NS(125)
#define BOARD_ST7920_DELAY_2 DELAY_NS(125)
#define BOARD_ST7920_DELAY_3 DELAY_NS(125)
#endif

View file

@ -26,6 +26,13 @@
*/ */
#define BOARD_INFO_NAME "Melzi (Tronxy)" #define BOARD_INFO_NAME "Melzi (Tronxy)"
#if HAS_GRAPHICAL_LCD
#define BOARD_ST7920_DELAY_1 DELAY_NS(0)
#define BOARD_ST7920_DELAY_2 DELAY_NS(125)
#define BOARD_ST7920_DELAY_3 DELAY_NS(0)
#endif
#include "pins_MELZI.h" #include "pins_MELZI.h"
#undef Z_ENABLE_PIN #undef Z_ENABLE_PIN
@ -50,9 +57,3 @@
#define BTN_EN1 10 #define BTN_EN1 10
#define BTN_EN2 11 #define BTN_EN2 11
#define BTN_ENC 26 #define BTN_ENC 26
#if HAS_GRAPHICAL_LCD
#define BOARD_ST7920_DELAY_1 DELAY_NS(0)
#define BOARD_ST7920_DELAY_2 DELAY_NS(125)
#define BOARD_ST7920_DELAY_3 DELAY_NS(0)
#endif

View file

@ -0,0 +1,33 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Melzi V2.0 as found at https://www.reprap.org/wiki/Melzi
*/
#define BOARD_INFO_NAME "Melzi V2"
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
#define BOARD_ST7920_DELAY_1 DELAY_NS(0)
#define BOARD_ST7920_DELAY_2 DELAY_NS(188)
#define BOARD_ST7920_DELAY_3 DELAY_NS(0)
#endif
#include "pins_MELZI.h"

View file

@ -166,9 +166,15 @@
#define LCD_PINS_ENABLE 16 #define LCD_PINS_ENABLE 16
#define LCD_PINS_D4 11 #define LCD_PINS_D4 11
#define BOARD_ST7920_DELAY_1 DELAY_NS(0) #ifndef BOARD_ST7920_DELAY_1
#define BOARD_ST7920_DELAY_2 DELAY_NS(188) #define BOARD_ST7920_DELAY_1 DELAY_NS(0)
#define BOARD_ST7920_DELAY_3 DELAY_NS(0) #endif
#ifndef BOARD_ST7920_DELAY_2
#define BOARD_ST7920_DELAY_2 DELAY_NS(188)
#endif
#ifndef BOARD_ST7920_DELAY_3
#define BOARD_ST7920_DELAY_3 DELAY_NS(0)
#endif
#elif ENABLED(U8GLIB_ST7920) // SPI GLCD 12864 ST7920 ( like [www.digole.com] ) For Melzi V2.0 #elif ENABLED(U8GLIB_ST7920) // SPI GLCD 12864 ST7920 ( like [www.digole.com] ) For Melzi V2.0
@ -182,9 +188,15 @@
#define BEEPER_PIN 27 #define BEEPER_PIN 27
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
#define BOARD_ST7920_DELAY_1 DELAY_NS(0) #ifndef BOARD_ST7920_DELAY_1
#define BOARD_ST7920_DELAY_2 DELAY_NS(188) #define BOARD_ST7920_DELAY_1 DELAY_NS(0)
#define BOARD_ST7920_DELAY_3 DELAY_NS(0) #endif
#ifndef BOARD_ST7920_DELAY_2
#define BOARD_ST7920_DELAY_2 DELAY_NS(188)
#endif
#ifndef BOARD_ST7920_DELAY_3
#define BOARD_ST7920_DELAY_3 DELAY_NS(0)
#endif
#endif #endif
#else // Sanguinololu >=1.3 #else // Sanguinololu >=1.3