Merge upstream changes from Marlin 2.1.1

This commit is contained in:
Stefan Kalscheuer
2022-09-03 09:23:32 +02:00
parent 626283aadb
commit 986e416c7f
1610 changed files with 73839 additions and 40857 deletions

View File

@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016 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
@@ -22,13 +22,13 @@
#pragma once
/**
* CREALITY 4.2.10 (STM32F103) board pin assignments
* CREALITY 4.2.10 (STM32F103RE / STM32F103RC) board pin assignments
*/
#include "env_validate.h"
#if HOTENDS > 1 || E_STEPPERS > 1
#error "CREALITY supports up to 1 hotends / E-steppers. Comment out this line to continue."
#if HAS_MULTI_HOTEND || E_STEPPERS > 1
#error "Creality v4.2.10 only supports 1 hotend / E stepper."
#endif
#ifndef BOARD_INFO_NAME
@@ -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 // 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_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
@@ -144,7 +131,7 @@
#define HEATER_BED_PIN PA1 // HOT BED
#define FAN_PIN PA2 // FAN
#define FAN_SOFT_PWM
#define FAN_SOFT_PWM_REQUIRED
//
// SD Card
@@ -163,60 +150,60 @@
/**
* RET6 12864 LCD
* ------
* PC6 |10 9 | PB2
* PB10 | 8 7 | PE8
* PB14 6 5 | PB13
* PB12 | 4 3 | PB15
* GND | 2 1 | 5V
* PC6 | 1 2 | PB2
* PB10 | 3 4 | PE8
* PB14 5 6 | PB13
* PB12 | 7 8 | PB15
* GND | 9 10 | 5V
* ------
* EXP1
*/
#define EXP1_03_PIN PB15
#define EXP1_04_PIN PB12
#define EXP1_05_PIN PB13
#define EXP1_06_PIN PB14
#define EXP1_07_PIN PE8
#define EXP1_08_PIN PB10
#define EXP1_09_PIN PB2
#define EXP1_10_PIN PC6
#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_10_PIN
#define BEEPER_PIN EXP1_01_PIN
#elif ENABLED(VET6_12864_LCD)
/**
* VET6 12864 LCD
* ------
* ? |10 9 | PC5
* PB10 | 8 7 | ?
* PA6 6 5 | PA5
* PA4 | 4 3 | PA7
* GND | 2 1 | 5V
* ? | 1 2 | PC5
* PB10 | 3 4 | ?
* PA6 5 6 | PA5
* PA4 | 7 8 | PA7
* GND | 9 10 | 5V
* ------
* EXP1
*/
#define EXP1_03_PIN PA7
#define EXP1_04_PIN PA4
#define EXP1_05_PIN PA5
#define EXP1_06_PIN PA6
#define EXP1_07_PIN -1
#define EXP1_08_PIN PB10
#define EXP1_09_PIN PC5
#define EXP1_10_PIN -1
#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
#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_04_PIN
#define LCD_PINS_ENABLE EXP1_03_PIN
#define LCD_PINS_D4 EXP1_05_PIN
#define LCD_PINS_RS EXP1_07_PIN
#define LCD_PINS_ENABLE EXP1_08_PIN
#define LCD_PINS_D4 EXP1_06_PIN
#define BTN_ENC EXP1_09_PIN
#define BTN_EN1 EXP1_08_PIN
#define BTN_EN2 EXP1_06_PIN
#define BTN_ENC EXP1_02_PIN
#define BTN_EN1 EXP1_03_PIN
#define BTN_EN2 EXP1_05_PIN
#elif EITHER(HAS_DWIN_E3V2, IS_DWIN_MARLINUI)
#elif HAS_DWIN_E3V2 || IS_DWIN_MARLINUI
// RET6 DWIN ENCODER LCD
#define BTN_ENC PB14