From 285c3b1130ccdf135d398e91009486c202357aba Mon Sep 17 00:00:00 2001
From: Plynix / Ben Hartiwch <77836725+Plyn1x@users.noreply.github.com>
Date: Tue, 13 Sep 2022 16:53:10 +0200
Subject: [PATCH 1/6] added CREALITY_V521
---
Marlin/src/pins/pins.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h
index e2f6ea292476..7431aa83b1db 100644
--- a/Marlin/src/pins/pins.h
+++ b/Marlin/src/pins/pins.h
@@ -44,7 +44,7 @@
#define FET_ORDER_EEB 1
#elif MB(RAMPS_13_EFF, RAMPS_14_EFF, RAMPS_PLUS_EFF, RAMPS_14_RE_ARM_EFF, RAMPS_SMART_EFF, RAMPS_DUO_EFF, RAMPS4DUE_EFF)
#define FET_ORDER_EFF 1
- #elif MB(RAMPS_13_EEF, RAMPS_14_EEF, RAMPS_PLUS_EEF, RAMPS_14_RE_ARM_EEF, RAMPS_SMART_EEF, RAMPS_DUO_EEF, RAMPS4DUE_EEF)
+ #elif MB(RAMPS_13_EEF, RAMPS_14_EEF, RAMPS_PLUS_EEF, RAMPS_14_RE_ARM_EEF, RAMPS_SMART_PANDA_PI_V29EEF, RAMPS_DUO_EEF, RAMPS4DUE_EEF)
#define FET_ORDER_EEF 1
#elif MB(RAMPS_13_SF, RAMPS_14_SF, RAMPS_PLUS_SF, RAMPS_14_RE_ARM_SF, RAMPS_SMART_SF, RAMPS_DUO_SF, RAMPS4DUE_SF)
#define FET_ORDER_SF 1
@@ -609,6 +609,8 @@
#include "stm32f1/pins_ERYONE_ERY32_MINI.h" // STM32F103VET6 env:ERYONE_ERY32_MINI_maple
#elif MB(PANDA_PI_V29)
#include "stm32f1/pins_PANDA_PI_V29.h" // STM32F103RCT6 env:PANDA_PI_V29
+#elif MB(CREALITY_V521)
+ #include "stm32f1/pins_CREALITY_V521.h" // STM32F103RET6_creality env:STM32F103RET6_creality
//
// ARM Cortex-M4F
From ba7328f79db9f6d1ffec341441a02fd078bc2462 Mon Sep 17 00:00:00 2001
From: Plynix / Ben Hartiwch <77836725+Plyn1x@users.noreply.github.com>
Date: Tue, 13 Sep 2022 16:55:36 +0200
Subject: [PATCH 2/6] Pins added for CREALITY_V5.2.1
---
pins_CREALITY_V521.h | 242 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 242 insertions(+)
create mode 100644 pins_CREALITY_V521.h
diff --git a/pins_CREALITY_V521.h b/pins_CREALITY_V521.h
new file mode 100644
index 000000000000..983dbcbc1ad8
--- /dev/null
+++ b/pins_CREALITY_V521.h
@@ -0,0 +1,242 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * 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 .
+ *
+ */
+
+/**
+ * CREALITY (STM32F103) board pin assignments
+ */
+
+#include "env_validate.h"
+
+#if HOTENDS > 2 || E_STEPPERS > 2
+ #error "CREALITY supports up to 2 hotends / E-steppers. Comment out this line to continue."
+#endif
+
+#ifndef BOARD_INFO_NAME
+ #define BOARD_INFO_NAME "Creality V521"
+#endif
+#ifndef DEFAULT_MACHINE_NAME
+ #define DEFAULT_MACHINE_NAME "Creality V5.2.1"
+#endif
+
+//
+// EEPROM
+//
+#if NO_EEPROM_SELECTED
+ // FLASH
+ //#define FLASH_EEPROM_EMULATION
+
+ // I2C
+ #define IIC_BL24CXX_EEPROM // EEPROM on I2C-0 used only for display settings
+ #if ENABLED(IIC_BL24CXX_EEPROM)
+ #define IIC_EEPROM_SDA PC2
+ #define IIC_EEPROM_SCL PC3
+ #define MARLIN_EEPROM_SIZE 0x800 // 2Kb (24C16)
+ #else
+ #define SDCARD_EEPROM_EMULATION // SD EEPROM until all EEPROM is BL24CXX
+ #define MARLIN_EEPROM_SIZE 0x800 // 2Kb
+ #endif
+
+ // SPI
+ //#define SPI_EEPROM // EEPROM on SPI-0
+ //#define SPI_CHAN_EEPROM1 ?
+ //#define SPI_EEPROM1_CS ?
+
+ // 2K EEPROM
+ //#define SPI_EEPROM2_CS ?
+
+ // 32Mb FLASH
+ //#define SPI_FLASH_CS ?
+#endif
+
+//
+// Servos
+//
+#ifdef BLTOUCH
+ #define SERVO0_PIN PD13 // BLTouch OUT
+ #define Z_MIN_PIN PD12
+#else
+ #define Z_MIN_PIN PE1
+#endif
+
+//
+// Limit Switches
+//
+#define X_MIN_PIN PD10
+#define X_MAX_PIN PE15
+#define Y_MIN_PIN PE0
+// #define Z_MIN_PIN PE1
+#define Z2_MIN_PIN PE2
+
+//
+// Filament Runout Sensor
+//
+ #define FIL_RUNOUT_PIN PE5 // "Pulled-high"
+ #define FIL_RUNOUT2_PIN PE6 // "Pulled-high"
+
+//
+// Steppers
+//
+#define X_ENABLE_PIN PC7
+#ifndef X_STEP_PIN
+ #define X_STEP_PIN PD15
+#endif
+#ifndef X_DIR_PIN
+ #define X_DIR_PIN PD14
+#endif
+
+#define X2_ENABLE_PIN PE11
+#ifndef X2_STEP_PIN
+ #define X2_STEP_PIN PE9
+#endif
+#ifndef X2_DIR_PIN
+ #define X2_DIR_PIN PE8
+#endif
+
+#define Y_ENABLE_PIN PB9
+#ifndef Y_STEP_PIN
+ #define Y_STEP_PIN PB7
+#endif
+#ifndef Y_DIR_PIN
+ #define Y_DIR_PIN PB6
+#endif
+
+#define Z_ENABLE_PIN PB5
+#ifndef Z_STEP_PIN
+ #define Z_STEP_PIN PB3
+#endif
+#ifndef Z_DIR_PIN
+ #define Z_DIR_PIN PD7
+#endif
+
+#define Z2_ENABLE_PIN PC5
+#ifndef Z2_STEP_PIN
+ #define Z2_STEP_PIN PA7
+#endif
+#ifndef Z2_DIR_PIN
+ #define Z2_DIR_PIN PA6
+#endif
+
+#define E0_ENABLE_PIN PD4
+#ifndef E0_STEP_PIN
+ #define E0_STEP_PIN PD1
+#endif
+#ifndef E0_DIR_PIN
+ #define E0_DIR_PIN PD0
+#endif
+
+#define E1_ENABLE_PIN PE7
+#ifndef E1_STEP_PIN
+ #define E1_STEP_PIN PB1
+#endif
+#ifndef E1_DIR_PIN
+ #define E1_DIR_PIN PB0
+#endif
+
+//
+// Release PB4 (Y_ENABLE_PIN) from JTAG NRST role
+//
+#define DISABLE_JTAG
+
+//
+// Temperature Sensors
+//
+#define TEMP_0_PIN PA4 // TH0
+#define TEMP_1_PIN PA5 // TH1
+#define TEMP_BED_PIN PA3 // TB1
+
+//
+// Heaters / Fans
+//
+#define HEATER_0_PIN PA1 // HEATER0
+#define HEATER_1_PIN PA0 // HEATER1
+#define HEATER_BED_PIN PA2 // HOT BED
+
+#define FAN_PIN PB14 // FAN
+#define FAN1_PIN PB12 // FAN
+#define FAN_SOFT_PWM
+
+//
+// SD Card
+//
+#define SD_DETECT_PIN PA8
+#define SDCARD_CONNECTION ONBOARD
+#define ONBOARD_SPI_DEVICE 1
+#define ONBOARD_SD_CS_PIN PC11 // SDSS
+#define SDIO_SUPPORT
+#define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer
+
+#if ENABLED(CR10_STOCKDISPLAY) && NONE(RET6_12864_LCD, VET6_12864_LCD)
+ #error "Define RET6_12864_LCD or VET6_12864_LCD to select pins for CR10_STOCKDISPLAY with the Creality V4 controller."
+#endif
+
+#if ENABLED(RET6_12864_LCD)
+
+ // RET6 12864 LCD
+ #define LCD_PINS_RS PB12
+ #define LCD_PINS_ENABLE PB15
+ #define LCD_PINS_D4 PB13
+
+ #define BTN_ENC PB2
+ #define BTN_EN1 PB10
+ #define BTN_EN2 PB14
+
+ #define BEEPER_PIN PC6
+
+#elif ENABLED(VET6_12864_LCD)
+
+ // VET6 12864 LCD
+ #define LCD_PINS_RS PA4
+ #define LCD_PINS_ENABLE PA7
+ #define LCD_PINS_D4 PA5
+
+ #define BTN_ENC PC5
+ #define BTN_EN1 PB10
+ #define BTN_EN2 PA6
+
+#elif ENABLED(DWIN_CREALITY_LCD)
+
+ // RET6 DWIN ENCODER LCD
+ #define BTN_ENC PB14
+ #define BTN_EN1 PB15
+ #define BTN_EN2 PB12
+
+ //#define LCD_LED_PIN PB2
+ #ifndef BEEPER_PIN
+ #define BEEPER_PIN PB13
+ #undef SPEAKER
+ #endif
+
+#elif ENABLED(DWIN_VET6_CREALITY_LCD)
+
+ // VET6 DWIN ENCODER LCD
+ #define BTN_ENC PA6
+ #define BTN_EN1 PA7
+ #define BTN_EN2 PA4
+
+ #define BEEPER_PIN PA5
+
+#endif
+
+// DGUS LCDs
+#if HAS_DGUS_LCD
+ #define LCD_SERIAL_PORT 3
+#endif // HAS_DGUS_LCD
From d660a2ef123355ead1142cd34057a4813b1a1e46 Mon Sep 17 00:00:00 2001
From: Plynix / Ben Hartiwch <77836725+Plyn1x@users.noreply.github.com>
Date: Tue, 13 Sep 2022 17:02:59 +0200
Subject: [PATCH 3/6] added Creality V5.2.1
---
Marlin/src/core/boards.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/Marlin/src/core/boards.h b/Marlin/src/core/boards.h
index 272a82f3b766..7c4200154f73 100644
--- a/Marlin/src/core/boards.h
+++ b/Marlin/src/core/boards.h
@@ -368,6 +368,7 @@
#define BOARD_ZONESTAR_ZM3E4V2 4064 // Zonestar ZM3E4 V2 (STM32F103VC)
#define BOARD_ERYONE_ERY32_MINI 4065 // Eryone Ery32 mini (STM32F103VE)
#define BOARD_PANDA_PI_V29 4066 // Panda Pi V2.9 - Standalone (STM32F103RC)
+#define BOARD_CREALITY_V521 4067 // SV04 Board
//
// ARM Cortex-M4F
From 448b4f4d8a12c9baa0d40f9312e79ad28a4d96d9 Mon Sep 17 00:00:00 2001
From: Plynix / Ben Hartiwch <77836725+Plyn1x@users.noreply.github.com>
Date: Tue, 13 Sep 2022 17:06:13 +0200
Subject: [PATCH 4/6] added STM32F103RET6_creality
---
ini/stm32f1.ini | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/ini/stm32f1.ini b/ini/stm32f1.ini
index 49dac9e47664..ecdf554328e4 100644
--- a/ini/stm32f1.ini
+++ b/ini/stm32f1.ini
@@ -467,3 +467,24 @@ board = genericSTM32F103VE
board_build.variant = MARLIN_F103Vx
build_flags = ${ZONESTAR_ZM3E.build_flags} -DTIMER_TONE=TIM1
board_upload.maximum_size = 499712
+
+#
+# Creality (STM32F103RET6)
+#
+[env:STM32F103RET6_creality]
+platform = ${common_stm32f1.platform}
+extends = stm32_variant
+board = genericSTM32F103VE
+board_build.variant = MARLIN_F103Vx
+board_build.offset = 0x7000
+board_upload.offset_address = 0x08007000
+build_flags = ${stm32_variant.build_flags}
+ -DSS_TIMER=4 -DTIMER_SERVO=TIM5
+ -DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8
+build_unflags = ${stm32_variant.build_unflags}
+ -DUSBCON -DUSBD_USE_CDC
+extra_scripts = ${stm32_variant.extra_scripts}
+ pre:buildroot/share/PlatformIO/scripts/random-bin.py
+monitor_speed = 115200
+debug_tool = jlink
+upload_protocol = jlink
From 067a403f74566340ca93f44c7693756bf3945c86 Mon Sep 17 00:00:00 2001
From: Plynix / Ben Hartiwch <77836725+Plyn1x@users.noreply.github.com>
Date: Tue, 13 Sep 2022 17:14:06 +0200
Subject: [PATCH 5/6] Added Creality V5.2.1
---
Marlin/src/pins/pins.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h
index 7431aa83b1db..543c173bf33a 100644
--- a/Marlin/src/pins/pins.h
+++ b/Marlin/src/pins/pins.h
@@ -44,7 +44,7 @@
#define FET_ORDER_EEB 1
#elif MB(RAMPS_13_EFF, RAMPS_14_EFF, RAMPS_PLUS_EFF, RAMPS_14_RE_ARM_EFF, RAMPS_SMART_EFF, RAMPS_DUO_EFF, RAMPS4DUE_EFF)
#define FET_ORDER_EFF 1
- #elif MB(RAMPS_13_EEF, RAMPS_14_EEF, RAMPS_PLUS_EEF, RAMPS_14_RE_ARM_EEF, RAMPS_SMART_PANDA_PI_V29EEF, RAMPS_DUO_EEF, RAMPS4DUE_EEF)
+ #elif MB(RAMPS_13_EEF, RAMPS_14_EEF, RAMPS_PLUS_EEF, RAMPS_14_RE_ARM_EEF, RAMPS_SMART_EEF, RAMPS_DUO_EEF, RAMPS4DUE_EEF)
#define FET_ORDER_EEF 1
#elif MB(RAMPS_13_SF, RAMPS_14_SF, RAMPS_PLUS_SF, RAMPS_14_RE_ARM_SF, RAMPS_SMART_SF, RAMPS_DUO_SF, RAMPS4DUE_SF)
#define FET_ORDER_SF 1
From 38c743d3364b09417d9f63326f998b6448a28da1 Mon Sep 17 00:00:00 2001
From: Scott Lahteine
Date: Mon, 26 Sep 2022 16:49:14 -0500
Subject: [PATCH 6/6] misc. cleanup
---
Marlin/src/core/boards.h | 2 +-
Marlin/src/module/thermistor/thermistor_504.h | 4 +-
Marlin/src/module/thermistor/thermistor_505.h | 4 +-
Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h | 1 +
Marlin/src/pins/pins.h | 2 +-
Marlin/src/pins/stm32f1/pins_CREALITY_V4.h | 150 +++++------
Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h | 136 +++++-----
Marlin/src/pins/stm32f1/pins_CREALITY_V425.h | 4 +-
Marlin/src/pins/stm32f1/pins_CREALITY_V521.h | 226 ++++++++++++++++
pins_CREALITY_V521.h | 242 ------------------
10 files changed, 363 insertions(+), 408 deletions(-)
create mode 100644 Marlin/src/pins/stm32f1/pins_CREALITY_V521.h
delete mode 100644 pins_CREALITY_V521.h
diff --git a/Marlin/src/core/boards.h b/Marlin/src/core/boards.h
index 41337fa4654d..17051b484cc9 100644
--- a/Marlin/src/core/boards.h
+++ b/Marlin/src/core/boards.h
@@ -355,7 +355,7 @@
#define BOARD_CREALITY_V431_D 4051 // Creality v4.3.1d (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V452 4052 // Creality v4.5.2 (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V453 4053 // Creality v4.5.3 (STM32F103RC / STM32F103RE)
-#define BOARD_CREALITY_V521 4054 // Sovol SV04 Board
+#define BOARD_CREALITY_V521 4054 // SV04 Board
#define BOARD_CREALITY_V24S1 4055 // Creality v2.4.S1 (STM32F103RC / STM32F103RE) v101 as found in the Ender-7
#define BOARD_CREALITY_V24S1_301 4056 // Creality v2.4.S1_301 (STM32F103RC / STM32F103RE) v301 as found in the Ender-3 S1
#define BOARD_CREALITY_V25S1 4057 // Creality v2.5.S1 (STM32F103RE) as found in the CR-10 Smart Pro
diff --git a/Marlin/src/module/thermistor/thermistor_504.h b/Marlin/src/module/thermistor/thermistor_504.h
index 0724e49b9d74..751bea233e44 100644
--- a/Marlin/src/module/thermistor/thermistor_504.h
+++ b/Marlin/src/module/thermistor/thermistor_504.h
@@ -1,9 +1,9 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* 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
diff --git a/Marlin/src/module/thermistor/thermistor_505.h b/Marlin/src/module/thermistor/thermistor_505.h
index 1377b43d2401..12600f63ae9c 100644
--- a/Marlin/src/module/thermistor/thermistor_505.h
+++ b/Marlin/src/module/thermistor/thermistor_505.h
@@ -1,9 +1,9 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* 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
diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h
index 209529cbe1ce..aac839808119 100644
--- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h
+++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h
@@ -43,6 +43,7 @@
#if NO_EEPROM_SELECTED
//#define I2C_EEPROM // EEPROM on I2C-0
//#define SDCARD_EEPROM_EMULATION
+ //#undef NO_EEPROM_SELECTED
#endif
#if ENABLED(I2C_EEPROM)
diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h
index 2f9427776e13..1e7f5ec3981a 100644
--- a/Marlin/src/pins/pins.h
+++ b/Marlin/src/pins/pins.h
@@ -612,7 +612,7 @@
#elif MB(PANDA_PI_V29)
#include "stm32f1/pins_PANDA_PI_V29.h" // STM32F103RCT6 env:PANDA_PI_V29
#elif MB(CREALITY_V521)
- #include "stm32f1/pins_CREALITY_V521.h" // STM32F103RET6_creality env:STM32F103RET6_creality
+ #include "stm32f1/pins_CREALITY_V521.h" // STM32F103RET6 env:STM32F103RET6_creality
//
// ARM Cortex-M4F
diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h
index 56caa7d35ee5..ea2cc52f03d1 100644
--- a/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h
+++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h
@@ -161,94 +161,74 @@
#define SDIO_SUPPORT
#define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer
-#if EITHER(CR10_STOCKDISPLAY, FYSETC_MINI_12864_2_1)
-
- #if ENABLED(RET6_12864_LCD)
-
- /**
- * RET6 12864 LCD
- * ------
- * PC6 | 1 2 | PB2
- * PB10 | 3 4 | PB11
- * PB14 5 6 | PB13
- * PB12 | 7 8 | PB15
- * GND | 9 10 | 5V
- * ------
- * EXP1
- */
- #define EXP1_01_PIN PC6
- #define EXP1_02_PIN PB2
- #define EXP1_03_PIN PB10
- #define EXP1_04_PIN PB11
- #define EXP1_05_PIN PB14
- #define EXP1_06_PIN PB13
- #define EXP1_07_PIN PB12
- #define EXP1_08_PIN PB15
-
- #elif ENABLED(VET6_12864_LCD)
-
- /**
- * VET6 12864 LCD
- * ------
- * ? | 1 2 | PC5
- * PB10 | 3 4 | ?
- * PA6 5 6 | PA5
- * PA4 | 7 8 | PA7
- * GND | 9 10 | 5V
- * ------
- * EXP1
- */
- #define EXP1_01_PIN -1
- #define EXP1_02_PIN PC5
- #define EXP1_03_PIN PB10
- #define EXP1_04_PIN -1
- #define EXP1_05_PIN PA6
- #define EXP1_06_PIN PA5
- #define EXP1_07_PIN PA4
- #define EXP1_08_PIN PA7
+#if ANY(RET6_12864_LCD, HAS_DWIN_E3V2, IS_DWIN_MARLINUI)
- #else
- #error "Define RET6_12864_LCD or VET6_12864_LCD to select pins for the LCD with the Creality V4 controller."
- #endif
+ /**
+ * RET6 12864 LCD
+ * ------
+ * PC6 | 1 2 | PB2
+ * PB10 | 3 4 | PB11
+ * PB14 5 6 | PB13
+ * PB12 | 7 8 | PB15
+ * GND | 9 10 | 5V
+ * ------
+ */
+ #define EXP3_01_PIN PC6
+ #define EXP3_02_PIN PB2
+ #define EXP3_03_PIN PB10
+ #define EXP3_04_PIN PB11
+ #define EXP3_05_PIN PB14
+ #define EXP3_06_PIN PB13
+ #define EXP3_07_PIN PB12
+ #define EXP3_08_PIN PB15
+
+#elif EITHER(VET6_12864_LCD, DWIN_VET6_CREALITY_LCD)
+
+ /**
+ * VET6 12864 LCD
+ * ------
+ * ? | 1 2 | PC5
+ * PB10 | 3 4 | ?
+ * PA6 5 6 | PA5
+ * PA4 | 7 8 | PA7
+ * GND | 9 10 | 5V
+ * ------
+ */
+ #define EXP3_01_PIN -1
+ #define EXP3_02_PIN PC5
+ #define EXP3_03_PIN PB10
+ #define EXP3_04_PIN -1
+ #define EXP3_05_PIN PA6
+ #define EXP3_06_PIN PA5
+ #define EXP3_07_PIN PA4
+ #define EXP3_08_PIN PA7
+
+#elif EITHER(CR10_STOCKDISPLAY, FYSETC_MINI_12864_2_1)
+ #error "Define RET6_12864_LCD or VET6_12864_LCD to select pins for the LCD with the Creality V4 controller."
#endif
#if ENABLED(CR10_STOCKDISPLAY)
- #define LCD_PINS_RS EXP1_07_PIN
- #define LCD_PINS_ENABLE EXP1_08_PIN
- #define LCD_PINS_D4 EXP1_06_PIN
+ #define LCD_PINS_RS EXP3_07_PIN
+ #define LCD_PINS_ENABLE EXP3_08_PIN
+ #define LCD_PINS_D4 EXP3_06_PIN
- #define BTN_ENC EXP1_02_PIN
- #define BTN_EN1 EXP1_03_PIN
- #define BTN_EN2 EXP1_05_PIN
+ #define BTN_ENC EXP3_02_PIN
+ #define BTN_EN1 EXP3_03_PIN
+ #define BTN_EN2 EXP3_05_PIN
#ifndef HAS_PIN_27_BOARD
- #define BEEPER_PIN EXP1_01_PIN
+ #define BEEPER_PIN EXP3_01_PIN
#endif
#elif ANY(HAS_DWIN_E3V2, IS_DWIN_MARLINUI, DWIN_VET6_CREALITY_LCD)
- #if HAS_DWIN_E3V2 || IS_DWIN_MARLINUI
- // RET6 DWIN ENCODER LCD
- #define EXP1_05_PIN PB14
- #define EXP1_06_PIN PB13
- #define EXP1_07_PIN PB12
- #define EXP1_08_PIN PB15
- //#define LCD_LED_PIN PB2
- #else
- // VET6 DWIN ENCODER LCD
- #define EXP1_05_PIN PA6
- #define EXP1_06_PIN PA5
- #define EXP1_07_PIN PA4
- #define EXP1_08_PIN PA7
- #endif
-
- #define BTN_ENC EXP1_05_PIN
- #define BTN_EN1 EXP1_08_PIN
- #define BTN_EN2 EXP1_07_PIN
+ #define BTN_ENC EXP3_05_PIN
+ #define BTN_EN1 EXP3_08_PIN
+ #define BTN_EN2 EXP3_07_PIN
#ifndef BEEPER_PIN
- #define BEEPER_PIN EXP1_06_PIN
+ #define BEEPER_PIN EXP3_06_PIN
#endif
#elif ENABLED(FYSETC_MINI_12864_2_1)
@@ -257,8 +237,8 @@
#error "CAUTION! FYSETC_MINI_12864_2_1 and clones require wiring modifications. See 'pins_CREALITY_V4.h' for details. Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning"
#endif
- #if SD_CONNECTION_IS(LCD)
- #error "The LCD sdcard is not connected with this configuration"
+ #if SD_CONNECTION_IS(LCD)
+ #error "The LCD SD Card is not connected with this configuration."
#endif
/**
@@ -283,20 +263,20 @@
* Debug port EXP2
*
* Needs custom cable. Connect EN2-EN2, LCD_CS-LCD_CS and so on.
- * Debug port is just above EXP1, You need to add pins
+ * Debug port is just above EXP1. You need to add pins.
*
*/
- #define BTN_ENC EXP1_02_PIN
- #define BTN_EN1 EXP1_01_PIN
- #define BTN_EN2 EXP1_06_PIN
+ #define BTN_ENC EXP3_02_PIN
+ #define BTN_EN1 EXP3_01_PIN
+ #define BTN_EN2 EXP3_06_PIN
#define BEEPER_PIN -1
- #define DOGLCD_CS EXP1_03_PIN
- #define DOGLCD_A0 EXP1_05_PIN
- #define DOGLCD_SCK EXP1_07_PIN
- #define DOGLCD_MOSI EXP1_08_PIN
- #define LCD_RESET_PIN EXP1_04_PIN
+ #define DOGLCD_CS EXP3_03_PIN
+ #define DOGLCD_A0 EXP3_05_PIN
+ #define DOGLCD_SCK EXP3_07_PIN
+ #define DOGLCD_MOSI EXP3_08_PIN
+ #define LCD_RESET_PIN EXP3_04_PIN
#define FORCE_SOFT_SPI
#define LCD_BACKLIGHT_PIN -1
diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h
index 86ede843be57..f3b7e4f308b9 100644
--- a/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h
+++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h
@@ -1,9 +1,9 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* 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
@@ -22,7 +22,7 @@
#pragma once
/**
- * CREALITY 4.2.10 (STM32F103RE / STM32F103RC) board pin assignments
+ * Creality 4.2.10 (STM32F103RE / STM32F103RC) board pin assignments
*/
#include "env_validate.h"
@@ -143,85 +143,75 @@
#define SDIO_SUPPORT
#define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer
-#if ENABLED(CR10_STOCKDISPLAY)
+#if ANY(RET6_12864_LCD, HAS_DWIN_E3V2, IS_DWIN_MARLINUI)
+
+ /**
+ * RET6 12864 LCD
+ * ------
+ * PC6 | 1 2 | PB2
+ * PB10 | 3 4 | PE8
+ * PB14 5 6 | PB13
+ * PB12 | 7 8 | PB15
+ * GND | 9 10 | 5V
+ * ------
+ */
+ #define EXP3_01_PIN PC6
+ #define EXP3_02_PIN PB2
+ #define EXP3_03_PIN PB10
+ #define EXP3_04_PIN PE8
+ #define EXP3_05_PIN PB14
+ #define EXP3_06_PIN PB13
+ #define EXP3_07_PIN PB12
+ #define EXP3_08_PIN PB15
+
+#elif EITHER(VET6_12864_LCD, DWIN_VET6_CREALITY_LCD)
+
+ /**
+ * VET6 12864 LCD
+ * ------
+ * ? | 1 2 | PC5
+ * PB10 | 3 4 | ?
+ * PA6 5 6 | PA5
+ * PA4 | 7 8 | PA7
+ * GND | 9 10 | 5V
+ * ------
+ */
+ #define EXP3_01_PIN -1
+ #define EXP3_02_PIN PC5
+ #define EXP3_03_PIN PB10
+ #define EXP3_04_PIN -1
+ #define EXP3_05_PIN PA6
+ #define EXP3_06_PIN PA5
+ #define EXP3_07_PIN PA4
+ #define EXP3_08_PIN PA7
+
+#endif
- #if ENABLED(RET6_12864_LCD)
-
- /**
- * RET6 12864 LCD
- * ------
- * PC6 | 1 2 | PB2
- * PB10 | 3 4 | PE8
- * PB14 5 6 | PB13
- * PB12 | 7 8 | PB15
- * GND | 9 10 | 5V
- * ------
- * EXP1
- */
- #define EXP1_01_PIN PC6
- #define EXP1_02_PIN PB2
- #define EXP1_03_PIN PB10
- #define EXP1_04_PIN PE8
- #define EXP1_05_PIN PB14
- #define EXP1_06_PIN PB13
- #define EXP1_07_PIN PB12
- #define EXP1_08_PIN PB15
-
- #define BEEPER_PIN EXP1_01_PIN
-
- #elif ENABLED(VET6_12864_LCD)
-
- /**
- * VET6 12864 LCD
- * ------
- * ? | 1 2 | PC5
- * PB10 | 3 4 | ?
- * PA6 5 6 | PA5
- * PA4 | 7 8 | PA7
- * GND | 9 10 | 5V
- * ------
- * EXP1
- */
- #define EXP1_01_PIN -1
- #define EXP1_02_PIN PC5
- #define EXP1_03_PIN PB10
- #define EXP1_04_PIN -1
- #define EXP1_05_PIN PA6
- #define EXP1_06_PIN PA5
- #define EXP1_07_PIN PA4
- #define EXP1_08_PIN PA7
-
- #else
+#if ENABLED(CR10_STOCKDISPLAY)
+ #if NONE(RET6_12864_LCD, VET6_12864_LCD)
#error "Define RET6_12864_LCD or VET6_12864_LCD to select pins for CR10_STOCKDISPLAY with the Creality V4 controller."
#endif
- #define LCD_PINS_RS EXP1_07_PIN
- #define LCD_PINS_ENABLE EXP1_08_PIN
- #define LCD_PINS_D4 EXP1_06_PIN
+ #define LCD_PINS_RS EXP3_07_PIN
+ #define LCD_PINS_ENABLE EXP3_08_PIN
+ #define LCD_PINS_D4 EXP3_06_PIN
- #define BTN_ENC EXP1_02_PIN
- #define BTN_EN1 EXP1_03_PIN
- #define BTN_EN2 EXP1_05_PIN
+ #define BTN_ENC EXP3_02_PIN
+ #define BTN_EN1 EXP3_03_PIN
+ #define BTN_EN2 EXP3_05_PIN
-#elif HAS_DWIN_E3V2 || IS_DWIN_MARLINUI
+ #define BEEPER_PIN EXP3_01_PIN
- // RET6 DWIN ENCODER LCD
- #define BTN_ENC PB14
- #define BTN_EN1 PB15
- #define BTN_EN2 PB12
+#elif ANY(DWIN_VET6_CREALITY_LCD, HAS_DWIN_E3V2, IS_DWIN_MARLINUI)
- //#define LCD_LED_PIN PB2
+ // RET6 / VET6 DWIN ENCODER LCD
+ #define BTN_ENC EXP3_05_PIN
+ #define BTN_EN1 EXP3_08_PIN
+ #define BTN_EN2 EXP3_07_PIN
+
+ //#define LCD_LED_PIN EXP3_02_PIN
#ifndef BEEPER_PIN
- #define BEEPER_PIN PB13
+ #define BEEPER_PIN EXP3_06_PIN
#endif
-#elif ENABLED(DWIN_VET6_CREALITY_LCD)
-
- // VET6 DWIN ENCODER LCD
- #define BTN_ENC PA6
- #define BTN_EN1 PA7
- #define BTN_EN2 PA4
-
- #define BEEPER_PIN PA5
-
#endif
diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V425.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V425.h
index 46f437ecafb2..1c62d19a99e4 100644
--- a/Marlin/src/pins/stm32f1/pins_CREALITY_V425.h
+++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V425.h
@@ -1,9 +1,9 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* 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
diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V521.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V521.h
new file mode 100644
index 000000000000..d3d3685531dc
--- /dev/null
+++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V521.h
@@ -0,0 +1,226 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * 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 .
+ *
+ */
+#pragma once
+
+/**
+ * Creality 5.2.1 (STM32F103RE) board pin assignments
+ */
+
+#include "env_validate.h"
+
+#if HOTENDS > 2 || E_STEPPERS > 2
+ #error "Creality v5.2.1 supports up to 2 hotends / E steppers."
+#endif
+
+#ifndef BOARD_INFO_NAME
+ #define BOARD_INFO_NAME "Creality V521"
+#endif
+#ifndef DEFAULT_MACHINE_NAME
+ #define DEFAULT_MACHINE_NAME "Creality V5.2.1"
+#endif
+
+//
+// EEPROM
+//
+#if NO_EEPROM_SELECTED
+ // FLASH
+ //#define FLASH_EEPROM_EMULATION
+
+ // I2C
+ #define IIC_BL24CXX_EEPROM // EEPROM on I2C-0 used only for display settings
+ #if ENABLED(IIC_BL24CXX_EEPROM)
+ #define IIC_EEPROM_SDA PC2
+ #define IIC_EEPROM_SCL PC3
+ #define MARLIN_EEPROM_SIZE 0x800 // 2K (24C16)
+ #else
+ #define SDCARD_EEPROM_EMULATION // SD EEPROM until all EEPROM is BL24CXX
+ #define MARLIN_EEPROM_SIZE 0x800 // 2K
+ #endif
+
+ #undef NO_EEPROM_SELECTED
+#endif
+
+//
+// Servos
+//
+#define SERVO0_PIN PD13 // BLTouch OUT
+
+//
+// Limit Switches
+//
+#define X_STOP_PIN PD10 // X
+#define X2_STOP_PIN PE15 // X2
+#define Y_STOP_PIN PE0 // Y
+#define Z_STOP_PIN PE1 // Z
+#define Z2_STOP_PIN PE2 // Z2
+
+#ifndef Z_MIN_PROBE_PIN
+ #define Z_MIN_PROBE_PIN PD12 // BLTouch IN
+#endif
+
+//
+// Filament Runout Sensor
+//
+#define FIL_RUNOUT_PIN PE5 // "Pulled-high"
+#define FIL_RUNOUT2_PIN PE6 // "Pulled-high"
+
+//
+// Steppers
+//
+#define X_ENABLE_PIN PC7
+#define X_STEP_PIN PD15
+#define X_DIR_PIN PD14
+
+#define Y_ENABLE_PIN PB9
+#define Y_STEP_PIN PB7
+#define Y_DIR_PIN PB6
+
+#define Z_ENABLE_PIN PB5
+#define Z_STEP_PIN PB3
+#define Z_DIR_PIN PD7
+
+#define E0_ENABLE_PIN PD4
+#define E0_STEP_PIN PD1
+#define E0_DIR_PIN PD0
+
+#define E1_ENABLE_PIN PE7
+#define E1_STEP_PIN PB1
+#define E1_DIR_PIN PB0
+
+#define X2_ENABLE_PIN PE11
+#define X2_STEP_PIN PE9
+#define X2_DIR_PIN PE8
+
+#define Z2_ENABLE_PIN PC5
+#define Z2_STEP_PIN PA7
+#define Z2_DIR_PIN PA6
+
+//
+// Release PB4 (Y_ENABLE_PIN) from JTAG NRST role
+//
+#define DISABLE_JTAG
+
+//
+// Temperature Sensors
+//
+#define TEMP_0_PIN PA4 // TH0
+#define TEMP_1_PIN PA5 // TH1
+#define TEMP_BED_PIN PA3 // TB1
+
+//
+// Heaters / Fans
+//
+#define HEATER_0_PIN PA1 // HEATER0
+#define HEATER_1_PIN PA0 // HEATER1
+#define HEATER_BED_PIN PA2 // HOT BED
+
+#define FAN_PIN PB14 // FAN
+#define FAN1_PIN PB12 // FAN
+#define FAN_SOFT_PWM
+
+//
+// SD Card
+//
+#define SD_DETECT_PIN PA8
+#define SDCARD_CONNECTION ONBOARD
+#define ONBOARD_SPI_DEVICE 1
+#define ONBOARD_SD_CS_PIN PC11 // SDSS
+#define SDIO_SUPPORT
+#define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer
+
+#if ANY(RET6_12864_LCD, HAS_DWIN_E3V2, IS_DWIN_MARLINUI)
+
+ /**
+ * RET6 12864 LCD
+ * ------
+ * PC6 | 1 2 | PB2
+ * PB10 | 3 4 | PE8
+ * PB14 5 6 | PB13
+ * PB12 | 7 8 | PB15
+ * GND | 9 10 | 5V
+ * ------
+ */
+ #define EXP3_01_PIN PC6
+ #define EXP3_02_PIN PB2
+ #define EXP3_03_PIN PB10
+ #define EXP3_04_PIN PE8
+ #define EXP3_05_PIN PB14
+ #define EXP3_06_PIN PB13
+ #define EXP3_07_PIN PB12
+ #define EXP3_08_PIN PB15
+
+#elif EITHER(VET6_12864_LCD, DWIN_VET6_CREALITY_LCD)
+
+ /**
+ * VET6 12864 LCD
+ * ------
+ * ? | 1 2 | PC5
+ * PB10 | 3 4 | ?
+ * PA6 5 6 | PA5
+ * PA4 | 7 8 | PA7
+ * GND | 9 10 | 5V
+ * ------
+ */
+ #define EXP3_01_PIN -1
+ #define EXP3_02_PIN PC5
+ #define EXP3_03_PIN PB10
+ #define EXP3_04_PIN -1
+ #define EXP3_05_PIN PA6
+ #define EXP3_06_PIN PA5
+ #define EXP3_07_PIN PA4
+ #define EXP3_08_PIN PA7
+
+#endif
+
+#if ENABLED(CR10_STOCKDISPLAY)
+ #if NONE(RET6_12864_LCD, VET6_12864_LCD)
+ #error "Define RET6_12864_LCD or VET6_12864_LCD to select pins for CR10_STOCKDISPLAY with the Creality V4 controller."
+ #endif
+
+ #define LCD_PINS_RS EXP3_07_PIN
+ #define LCD_PINS_ENABLE EXP3_08_PIN
+ #define LCD_PINS_D4 EXP3_06_PIN
+
+ #define BTN_ENC EXP3_02_PIN
+ #define BTN_EN1 EXP3_03_PIN
+ #define BTN_EN2 EXP3_05_PIN
+
+ #define BEEPER_PIN EXP3_01_PIN
+
+#elif ANY(DWIN_VET6_CREALITY_LCD, HAS_DWIN_E3V2, IS_DWIN_MARLINUI)
+
+ // RET6 / VET6 DWIN ENCODER LCD
+ #define BTN_ENC EXP3_05_PIN
+ #define BTN_EN1 EXP3_08_PIN
+ #define BTN_EN2 EXP3_07_PIN
+
+ //#define LCD_LED_PIN EXP3_02_PIN
+ #ifndef BEEPER_PIN
+ #define BEEPER_PIN EXP3_06_PIN
+ #endif
+
+#endif
+
+// DGUS LCDs
+#if HAS_DGUS_LCD
+ #define LCD_SERIAL_PORT 3
+#endif
diff --git a/pins_CREALITY_V521.h b/pins_CREALITY_V521.h
deleted file mode 100644
index 983dbcbc1ad8..000000000000
--- a/pins_CREALITY_V521.h
+++ /dev/null
@@ -1,242 +0,0 @@
-/**
- * Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
- *
- * Based on Sprinter and grbl.
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
- *
- * 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 .
- *
- */
-
-/**
- * CREALITY (STM32F103) board pin assignments
- */
-
-#include "env_validate.h"
-
-#if HOTENDS > 2 || E_STEPPERS > 2
- #error "CREALITY supports up to 2 hotends / E-steppers. Comment out this line to continue."
-#endif
-
-#ifndef BOARD_INFO_NAME
- #define BOARD_INFO_NAME "Creality V521"
-#endif
-#ifndef DEFAULT_MACHINE_NAME
- #define DEFAULT_MACHINE_NAME "Creality V5.2.1"
-#endif
-
-//
-// EEPROM
-//
-#if NO_EEPROM_SELECTED
- // FLASH
- //#define FLASH_EEPROM_EMULATION
-
- // I2C
- #define IIC_BL24CXX_EEPROM // EEPROM on I2C-0 used only for display settings
- #if ENABLED(IIC_BL24CXX_EEPROM)
- #define IIC_EEPROM_SDA PC2
- #define IIC_EEPROM_SCL PC3
- #define MARLIN_EEPROM_SIZE 0x800 // 2Kb (24C16)
- #else
- #define SDCARD_EEPROM_EMULATION // SD EEPROM until all EEPROM is BL24CXX
- #define MARLIN_EEPROM_SIZE 0x800 // 2Kb
- #endif
-
- // SPI
- //#define SPI_EEPROM // EEPROM on SPI-0
- //#define SPI_CHAN_EEPROM1 ?
- //#define SPI_EEPROM1_CS ?
-
- // 2K EEPROM
- //#define SPI_EEPROM2_CS ?
-
- // 32Mb FLASH
- //#define SPI_FLASH_CS ?
-#endif
-
-//
-// Servos
-//
-#ifdef BLTOUCH
- #define SERVO0_PIN PD13 // BLTouch OUT
- #define Z_MIN_PIN PD12
-#else
- #define Z_MIN_PIN PE1
-#endif
-
-//
-// Limit Switches
-//
-#define X_MIN_PIN PD10
-#define X_MAX_PIN PE15
-#define Y_MIN_PIN PE0
-// #define Z_MIN_PIN PE1
-#define Z2_MIN_PIN PE2
-
-//
-// Filament Runout Sensor
-//
- #define FIL_RUNOUT_PIN PE5 // "Pulled-high"
- #define FIL_RUNOUT2_PIN PE6 // "Pulled-high"
-
-//
-// Steppers
-//
-#define X_ENABLE_PIN PC7
-#ifndef X_STEP_PIN
- #define X_STEP_PIN PD15
-#endif
-#ifndef X_DIR_PIN
- #define X_DIR_PIN PD14
-#endif
-
-#define X2_ENABLE_PIN PE11
-#ifndef X2_STEP_PIN
- #define X2_STEP_PIN PE9
-#endif
-#ifndef X2_DIR_PIN
- #define X2_DIR_PIN PE8
-#endif
-
-#define Y_ENABLE_PIN PB9
-#ifndef Y_STEP_PIN
- #define Y_STEP_PIN PB7
-#endif
-#ifndef Y_DIR_PIN
- #define Y_DIR_PIN PB6
-#endif
-
-#define Z_ENABLE_PIN PB5
-#ifndef Z_STEP_PIN
- #define Z_STEP_PIN PB3
-#endif
-#ifndef Z_DIR_PIN
- #define Z_DIR_PIN PD7
-#endif
-
-#define Z2_ENABLE_PIN PC5
-#ifndef Z2_STEP_PIN
- #define Z2_STEP_PIN PA7
-#endif
-#ifndef Z2_DIR_PIN
- #define Z2_DIR_PIN PA6
-#endif
-
-#define E0_ENABLE_PIN PD4
-#ifndef E0_STEP_PIN
- #define E0_STEP_PIN PD1
-#endif
-#ifndef E0_DIR_PIN
- #define E0_DIR_PIN PD0
-#endif
-
-#define E1_ENABLE_PIN PE7
-#ifndef E1_STEP_PIN
- #define E1_STEP_PIN PB1
-#endif
-#ifndef E1_DIR_PIN
- #define E1_DIR_PIN PB0
-#endif
-
-//
-// Release PB4 (Y_ENABLE_PIN) from JTAG NRST role
-//
-#define DISABLE_JTAG
-
-//
-// Temperature Sensors
-//
-#define TEMP_0_PIN PA4 // TH0
-#define TEMP_1_PIN PA5 // TH1
-#define TEMP_BED_PIN PA3 // TB1
-
-//
-// Heaters / Fans
-//
-#define HEATER_0_PIN PA1 // HEATER0
-#define HEATER_1_PIN PA0 // HEATER1
-#define HEATER_BED_PIN PA2 // HOT BED
-
-#define FAN_PIN PB14 // FAN
-#define FAN1_PIN PB12 // FAN
-#define FAN_SOFT_PWM
-
-//
-// SD Card
-//
-#define SD_DETECT_PIN PA8
-#define SDCARD_CONNECTION ONBOARD
-#define ONBOARD_SPI_DEVICE 1
-#define ONBOARD_SD_CS_PIN PC11 // SDSS
-#define SDIO_SUPPORT
-#define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer
-
-#if ENABLED(CR10_STOCKDISPLAY) && NONE(RET6_12864_LCD, VET6_12864_LCD)
- #error "Define RET6_12864_LCD or VET6_12864_LCD to select pins for CR10_STOCKDISPLAY with the Creality V4 controller."
-#endif
-
-#if ENABLED(RET6_12864_LCD)
-
- // RET6 12864 LCD
- #define LCD_PINS_RS PB12
- #define LCD_PINS_ENABLE PB15
- #define LCD_PINS_D4 PB13
-
- #define BTN_ENC PB2
- #define BTN_EN1 PB10
- #define BTN_EN2 PB14
-
- #define BEEPER_PIN PC6
-
-#elif ENABLED(VET6_12864_LCD)
-
- // VET6 12864 LCD
- #define LCD_PINS_RS PA4
- #define LCD_PINS_ENABLE PA7
- #define LCD_PINS_D4 PA5
-
- #define BTN_ENC PC5
- #define BTN_EN1 PB10
- #define BTN_EN2 PA6
-
-#elif ENABLED(DWIN_CREALITY_LCD)
-
- // RET6 DWIN ENCODER LCD
- #define BTN_ENC PB14
- #define BTN_EN1 PB15
- #define BTN_EN2 PB12
-
- //#define LCD_LED_PIN PB2
- #ifndef BEEPER_PIN
- #define BEEPER_PIN PB13
- #undef SPEAKER
- #endif
-
-#elif ENABLED(DWIN_VET6_CREALITY_LCD)
-
- // VET6 DWIN ENCODER LCD
- #define BTN_ENC PA6
- #define BTN_EN1 PA7
- #define BTN_EN2 PA4
-
- #define BEEPER_PIN PA5
-
-#endif
-
-// DGUS LCDs
-#if HAS_DGUS_LCD
- #define LCD_SERIAL_PORT 3
-#endif // HAS_DGUS_LCD