From c52db9bf5770e0cc88965e3f590ec55e381710b2 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 12 May 2022 04:43:06 -0500 Subject: [PATCH] apply formatting and patches --- Marlin/src/pins/stm32f1/pins_CREALITY_V24S1.h | 2 +- Marlin/src/pins/stm32f1/pins_CREALITY_V25S1.h | 105 +++++++++--------- Marlin/src/pins/stm32f1/pins_CREALITY_V4.h | 10 +- Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h | 55 ++++----- 4 files changed, 77 insertions(+), 95 deletions(-) diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1.h index 9d7e0f695b79d..0d2ad835d3978 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1.h @@ -22,7 +22,7 @@ #pragma once /** - * Creality v2.4.S1 (STM32F103RE / STM32F103RC) v101 as found in the Ender 7 board pin assignments + * Creality v2.4.S1 (STM32F103RE / STM32F103RC) v101 as found in the Ender 7 */ #define BOARD_INFO_NAME "Creality v2.4.S1 V101" diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V25S1.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V25S1.h index f514d1c75e413..432eff87e4d66 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V25S1.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V25S1.h @@ -1,6 +1,6 @@ /** * Marlin 3D Printer Firmware - * Copyright (c) 2021 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 @@ -22,40 +22,38 @@ #pragma once /** - * Creality v2.4.S1 (STM32F103RE / STM32F103RC) v101 as found in the Ender 7 board pin assignments + * Creality v2.5.S1 (STM32F103RE / STM32F103RC) v101 as found in the Ender 7 */ +#include "env_validate.h" + +#if HAS_MULTI_HOTEND || E_STEPPERS > 1 + #error "Creality V2.5.S1 only supports one hotend / E-stepper. Comment out this line to continue." +#endif + #define BOARD_INFO_NAME "Creality v2.5.S1" #define DEFAULT_MACHINE_NAME "Creality3D" +// +// Release PB4 (Y_ENABLE_PIN) from JTAG NRST role +// +#define DISABLE_DEBUG + // // EEPROM // #if NO_EEPROM_SELECTED - // FLASH + #define IIC_BL24CXX_EEPROM // EEPROM on I2C-0 + //#define SDCARD_EEPROM_EMULATION //#define FLASH_EEPROM_EMULATION +#endif - // I2C - #define IIC_BL24CXX_EEPROM // EEPROM on I2C-0 used only for display settings - #if ENABLED(IIC_BL24CXX_EEPROM) - #define IIC_EEPROM_SDA PA11 - #define IIC_EEPROM_SCL PA12 - #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 ? +#if ENABLED(IIC_BL24CXX_EEPROM) + #define IIC_EEPROM_SDA PA11 + #define IIC_EEPROM_SCL PA12 + #define MARLIN_EEPROM_SIZE 0x800 // 2K (24C16) +#elif EITHER(SDCARD_EEPROM_EMULATION, FLASH_EEPROM_EMULATION) + #define MARLIN_EEPROM_SIZE 0x800 // 2K #endif // @@ -64,51 +62,45 @@ #define X_STOP_PIN PC4 #define Y_STOP_PIN PC5 -// -// Servos -// #if ENABLED(BLTOUCH) - #define Z_MIN_PROBE_PIN PC15 // BLTouch IN PIN - #define SERVO0_PIN PC14 // BLTouch OUT PIN - #define Z_MIN_PIN -1 -#elif ENABLED(PROBE_ACTIVATION_SWITCH) - #define Z_MIN_PIN PC15 - #define PROBE_TARE_PIN PC14 - #define PROBE_ACTIVATION_SWITCH_PIN PB2 + #define Z_STOP_PIN -1 + #define SERVO0_PIN PC14 // BLTouch OUT PIN + #ifndef Z_MIN_PROBE_PIN + #define Z_MIN_PROBE_PIN PC15 // BLTouch IN PIN + #endif #else - #define Z_MIN_PIN PC15 + #define Z_STOP_PIN PC15 + #if ENABLED(PROBE_ACTIVATION_SWITCH) + #define PROBE_TARE_PIN PC14 + #define PROBE_ACTIVATION_SWITCH_PIN PB2 + #endif #endif // // Filament Runout Sensor // #if ENABLED(FILAMENT_RUNOUT_SENSOR) - #define FIL_RUNOUT_PIN PA15 // "Pulled-high" + #define FIL_RUNOUT_PIN PA15 // "Pulled-high" #endif // // Steppers // -#define X_ENABLE_PIN PC3 #define X_STEP_PIN PB8 #define X_DIR_PIN PB7 +#define X_ENABLE_PIN PC3 -#define Y_ENABLE_PIN PC3 #define Y_STEP_PIN PB6 #define Y_DIR_PIN PB5 +#define Y_ENABLE_PIN X_ENABLE_PIN -#define Z_ENABLE_PIN PC3 #define Z_STEP_PIN PB4 #define Z_DIR_PIN PB3 +#define Z_ENABLE_PIN X_ENABLE_PIN -#define E0_ENABLE_PIN PC3 #define E0_STEP_PIN PC2 #define E0_DIR_PIN PB9 - -// -// Release PB4 (Y_ENABLE_PIN) from JTAG NRST role -// -#define DISABLE_DEBUG +#define E0_ENABLE_PIN X_ENABLE_PIN // // Temperature Sensors @@ -124,9 +116,9 @@ #define FAN_PIN PB15 // FAN #ifndef E0_AUTO_FAN_PIN - #define E0_AUTO_FAN_PIN PC13 // FAN + #define E0_AUTO_FAN_PIN PC13 // FAN #endif -#define FAN_SOFT_PWM +#define FAN_SOFT_PWM_REQUIRED // // SD Card @@ -134,24 +126,27 @@ #define SD_DETECT_PIN PC7 #define SDCARD_CONNECTION ONBOARD #define ON_BOARD_SPI_DEVICE 1 -#define ONBOARD_SD_CS_PIN PC12 // SDSS +#define ONBOARD_SD_CS_PIN PC12 // SDSS #define SDIO_SUPPORT -#define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer +#define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer -#define CASE_LIGHT_PIN PA7 +// +// Misc. Functions +// +#define CASE_LIGHT_PIN PA7 // // Suicide Power // -#define PS_ON_PIN PA0 -#define MOTOR_CIRCUIT_PIN PA1 +#define PS_ON_PIN PA0 +#define MOTOR_CIRCUIT_PIN PA1 // // Motor Protect // -#define MOTOR_PROTECT_PIN PC0 +#define MOTOR_PROTECT_PIN PC0 // -// WiFI Reset +// WiFi Reset // -#define RESET_WIFI_PIN PB12 +#define RESET_WIFI_PIN PB12 diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h index b2534beab6dbd..1b95032b367fb 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h @@ -40,6 +40,11 @@ #define BOARD_NO_NATIVE_USB +// +// Release PB4 (Y_ENABLE_PIN) from JTAG NRST role +// +#define DISABLE_DEBUG + // // EEPROM // @@ -122,11 +127,6 @@ #endif #define E0_ENABLE_PIN X_ENABLE_PIN -// -// Release PB4 (Y_ENABLE_PIN) from JTAG NRST role -// -#define DISABLE_DEBUG - // // Temperature Sensors // diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h index 87101ecccd540..1c9a0a8f997f7 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h @@ -40,34 +40,24 @@ #define BOARD_NO_NATIVE_USB +// +// Release PB4 (Y_ENABLE_PIN) from JTAG NRST role +// +#define DISABLE_DEBUG + // // 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 PA11 - #define IIC_EEPROM_SCL PA12 - #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 - - // SPI - //#define SPI_EEPROM // EEPROM on SPI-0 - //#define SPI_CHAN_EEPROM1 ? - //#define SPI_EEPROM1_CS_PIN ? - - // 2K EEPROM - //#define SPI_EEPROM2_CS_PIN ? - - // 32Mb FLASH - //#define SPI_FLASH_CS_PIN ? + #define IIC_BL24CXX_EEPROM // EEPROM on I2C-0 +#endif +#if ENABLED(IIC_BL24CXX_EEPROM) + #define IIC_EEPROM_SDA PA11 + #define IIC_EEPROM_SCL PA12 + #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 // @@ -82,7 +72,9 @@ #define Y_STOP_PIN PA7 #define Z_STOP_PIN PA5 -#define Z_MIN_PROBE_PIN PA5 // BLTouch IN +#ifndef Z_MIN_PROBE_PIN + #define Z_MIN_PROBE_PIN PA5 // BLTouch IN +#endif // // Filament Runout Sensor @@ -94,42 +86,37 @@ // // Steppers // -#define X_ENABLE_PIN PC3 #ifndef X_STEP_PIN #define X_STEP_PIN PC2 #endif #ifndef X_DIR_PIN #define X_DIR_PIN PB9 #endif +#define X_ENABLE_PIN PC3 -#define Y_ENABLE_PIN PC3 #ifndef Y_STEP_PIN #define Y_STEP_PIN PB8 #endif #ifndef Y_DIR_PIN #define Y_DIR_PIN PB7 #endif +#define Y_ENABLE_PIN X_ENABLE_PIN -#define Z_ENABLE_PIN PC3 #ifndef Z_STEP_PIN #define Z_STEP_PIN PB6 #endif #ifndef Z_DIR_PIN #define Z_DIR_PIN PB5 #endif +#define Z_ENABLE_PIN X_ENABLE_PIN -#define E0_ENABLE_PIN PC3 #ifndef E0_STEP_PIN #define E0_STEP_PIN PB4 #endif #ifndef E0_DIR_PIN #define E0_DIR_PIN PB3 #endif - -// -// Release PB4 (Y_ENABLE_PIN) from JTAG NRST role -// -#define DISABLE_DEBUG +#define E0_ENABLE_PIN X_ENABLE_PIN // // Temperature Sensors