From 28b101cceff79eaf1401b583a05e0251b1e6e55c Mon Sep 17 00:00:00 2001 From: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Fri, 10 Mar 2023 15:56:33 -0800 Subject: [PATCH 001/225] =?UTF-8?q?=E2=9C=A8=20BTT=20Octopus=20Max=20EZ=20?= =?UTF-8?q?1.0,=20SKR=203.0=20/=203.0=20EZ=20(#25387)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BTT Octopus Max EZ V1.0 (STM32H723VE/ZE), SKR V3.0 / V3.0 EZ (STM32H723VG) --- Marlin/src/HAL/STM32/HAL.h | 2 +- Marlin/src/HAL/STM32/HAL_SPI.cpp | 1 - Marlin/src/core/boards.h | 1 + Marlin/src/pins/pins.h | 12 +- Marlin/src/pins/pins_postprocess.h | 5 + .../pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h | 28 +- Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h | 14 +- .../pins/stm32g0/pins_BTT_MANTA_M8P_common.h | 9 +- Marlin/src/pins/stm32h7/env_validate.h | 26 + .../pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h | 545 ++++++++++++++ .../pins/stm32h7/pins_BTT_SKR_SE_BX_common.h | 4 +- .../pins/stm32h7/pins_BTT_SKR_V3_0_common.h | 4 +- .../boards/marlin_BTT_SKR_SE_BX.json | 2 +- .../PlatformIO/boards/marlin_STM32H723Vx.json | 61 ++ .../PlatformIO/boards/marlin_STM32H723Zx.json | 61 ++ .../variants/MARLIN_H723Vx/PeripheralPins.c | 590 +++++++++++++++ .../variants/MARLIN_H723Vx/PinNamesVar.h | 108 +++ .../variants/MARLIN_H723Vx/ldscript.ld | 174 +++++ .../variant_MARLIN_STM32H723VX.cpp | 273 +++++++ .../variant_MARLIN_STM32H723VX.h | 269 +++++++ .../variants/MARLIN_H723Zx/PeripheralPins.c | 688 ++++++++++++++++++ .../variants/MARLIN_H723Zx/PinNamesVar.h | 117 +++ .../variants/MARLIN_H723Zx/ldscript.ld | 174 +++++ .../variant_MARLIN_STM32H723Zx.cpp | 317 ++++++++ .../variant_MARLIN_STM32H723Zx.h | 308 ++++++++ ini/renamed.ini | 18 + ini/stm32f1-maple.ini | 1 - ini/stm32f4.ini | 22 +- ini/stm32h7.ini | 57 +- 29 files changed, 3834 insertions(+), 57 deletions(-) create mode 100644 Marlin/src/pins/stm32h7/env_validate.h create mode 100644 Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h create mode 100644 buildroot/share/PlatformIO/boards/marlin_STM32H723Vx.json create mode 100644 buildroot/share/PlatformIO/boards/marlin_STM32H723Zx.json create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_H723Vx/PeripheralPins.c create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_H723Vx/PinNamesVar.h create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_H723Vx/ldscript.ld create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_H723Vx/variant_MARLIN_STM32H723VX.cpp create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_H723Vx/variant_MARLIN_STM32H723VX.h create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_H723Zx/PeripheralPins.c create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_H723Zx/PinNamesVar.h create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_H723Zx/ldscript.ld create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_H723Zx/variant_MARLIN_STM32H723Zx.cpp create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_H723Zx/variant_MARLIN_STM32H723Zx.h diff --git a/Marlin/src/HAL/STM32/HAL.h b/Marlin/src/HAL/STM32/HAL.h index 3e85aca293..61569c7937 100644 --- a/Marlin/src/HAL/STM32/HAL.h +++ b/Marlin/src/HAL/STM32/HAL.h @@ -138,7 +138,7 @@ typedef double isr_float_t; // FPU ops are used for single-precision, so use double for ISRs. -#ifdef STM32G0B1xx +#if defined(STM32G0B1xx) || defined(STM32H7xx) typedef int32_t pin_t; #else typedef int16_t pin_t; diff --git a/Marlin/src/HAL/STM32/HAL_SPI.cpp b/Marlin/src/HAL/STM32/HAL_SPI.cpp index 40d320d5e8..278d209c47 100644 --- a/Marlin/src/HAL/STM32/HAL_SPI.cpp +++ b/Marlin/src/HAL/STM32/HAL_SPI.cpp @@ -78,7 +78,6 @@ static SPISettings spiConfig; case SPI_SPEED_6: delaySPIFunc = &delaySPI_2000; break; // desired: 250,000 actual: ~210K default: delaySPIFunc = &delaySPI_4000; break; // desired: 125,000 actual: ~123K } - SPI.begin(); } // Begin SPI transaction, set clock, bit order, data mode diff --git a/Marlin/src/core/boards.h b/Marlin/src/core/boards.h index bdf86392c9..f861e8864f 100644 --- a/Marlin/src/core/boards.h +++ b/Marlin/src/core/boards.h @@ -452,6 +452,7 @@ #define BOARD_BTT_SKR_SE_BX_V3 6005 // BigTreeTech SKR SE BX V3.0 (STM32H743II) #define BOARD_BTT_SKR_V3_0 6006 // BigTreeTech SKR V3.0 (STM32H743VG) #define BOARD_BTT_SKR_V3_0_EZ 6007 // BigTreeTech SKR V3.0 EZ (STM32H743VG) +#define BOARD_BTT_OCTOPUS_MAX_EZ_V1_0 6008 // BigTreeTech Octopus Max EZ V1.0 (STM32H723VE / STM32H723ZE) // // Espressif ESP32 WiFi diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index 1c45b0b155..721e037b8c 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -666,11 +666,11 @@ #elif MB(BTT_SKR_V2_0_REV_B) #include "stm32f4/pins_BTT_SKR_V2_0_REV_B.h" // STM32F4 env:BIGTREE_SKR_2 env:BIGTREE_SKR_2_USB env:BIGTREE_SKR_2_USB_debug env:BIGTREE_SKR_2_F429 env:BIGTREE_SKR_2_F429_USB env:BIGTREE_SKR_2_F429_USB_debug #elif MB(BTT_OCTOPUS_V1_0) - #include "stm32f4/pins_BTT_OCTOPUS_V1_0.h" // STM32F4 env:BIGTREE_OCTOPUS_V1 env:BIGTREE_OCTOPUS_V1_USB + #include "stm32f4/pins_BTT_OCTOPUS_V1_0.h" // STM32F4 env:STM32F446ZE_btt env:STM32F446ZE_btt_USB #elif MB(BTT_OCTOPUS_V1_1) - #include "stm32f4/pins_BTT_OCTOPUS_V1_1.h" // STM32F4 env:BIGTREE_OCTOPUS_V1 env:BIGTREE_OCTOPUS_V1_USB env:BIGTREE_OCTOPUS_V1_F407 env:BIGTREE_OCTOPUS_V1_F407_USB + #include "stm32f4/pins_BTT_OCTOPUS_V1_1.h" // STM32F4 env:STM32F446ZE_btt env:STM32F446ZE_btt_USB env:STM32F429ZG_btt env:STM32F429ZG_btt_USB env:STM32F407ZE_btt env:STM32F407ZE_btt_USB #elif MB(BTT_OCTOPUS_PRO_V1_0) - #include "stm32f4/pins_BTT_OCTOPUS_PRO_V1_0.h" // STM32F4 env:BIGTREE_OCTOPUS_V1 env:BIGTREE_OCTOPUS_V1_USB env:BIGTREE_OCTOPUS_PRO_V1_F429 env:BIGTREE_OCTOPUS_PRO_V1_F429_USB + #include "stm32f4/pins_BTT_OCTOPUS_PRO_V1_0.h" // STM32F4 env:STM32F446ZE_btt env:STM32F446ZE_btt_USB env:STM32F429ZG_btt env:STM32F429ZG_btt_USB env:STM32H723Zx_btt #elif MB(LERDGE_K) #include "stm32f4/pins_LERDGE_K.h" // STM32F4 env:LERDGEK env:LERDGEK_usb_flash_drive #elif MB(LERDGE_S) @@ -741,9 +741,11 @@ #elif MB(BTT_SKR_SE_BX_V3) #include "stm32h7/pins_BTT_SKR_SE_BX_V3.h" // STM32H7 env:BTT_SKR_SE_BX #elif MB(BTT_SKR_V3_0) - #include "stm32h7/pins_BTT_SKR_V3_0.h" // STM32H7 env:STM32H743Vx_btt + #include "stm32h7/pins_BTT_SKR_V3_0.h" // STM32H7 env:STM32H723Vx_btt env:STM32H743Vx_btt #elif MB(BTT_SKR_V3_0_EZ) - #include "stm32h7/pins_BTT_SKR_V3_0_EZ.h" // STM32H7 env:STM32H743Vx_btt + #include "stm32h7/pins_BTT_SKR_V3_0_EZ.h" // STM32H7 env:STM32H723Vx_btt env:STM32H743Vx_btt +#elif MB(BTT_OCTOPUS_MAX_EZ_V1_0) + #include "stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h" // STM32H7 env:STM32H723Vx_btt env:STM32H723Zx_btt #elif MB(TEENSY41) #include "teensy4/pins_TEENSY41.h" // Teensy-4.x env:teensy41 #elif MB(T41U5XBB) diff --git a/Marlin/src/pins/pins_postprocess.h b/Marlin/src/pins/pins_postprocess.h index 5b5cbcd214..8906c3cafb 100644 --- a/Marlin/src/pins/pins_postprocess.h +++ b/Marlin/src/pins/pins_postprocess.h @@ -487,6 +487,11 @@ #define NUM_SERVO_PLUGS 4 #endif +// Only used within pins files +#undef NEEDS_X_MINMAX +#undef NEEDS_Y_MINMAX +#undef NEEDS_Z_MINMAX + // // Assign endstop pins for boards with only 3 connectors // diff --git a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h index b3d97ae059..a25c2339f2 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h @@ -27,13 +27,17 @@ #define USES_DIAG_JUMPERS // Onboard I2C EEPROM -#define I2C_EEPROM -#define MARLIN_EEPROM_SIZE 0x1000 // 4K (AT24C32) -#define I2C_SCL_PIN PB8 -#define I2C_SDA_PIN PB9 +#if EITHER(NO_EEPROM_SELECTED, I2C_EEPROM) + #undef NO_EEPROM_SELECTED + #define I2C_EEPROM + #define MARLIN_EEPROM_SIZE 0x1000 // 4K (AT24C32) + #define SOFT_I2C_EEPROM // Force the use of Software I2C + #define I2C_SCL_PIN PB8 + #define I2C_SDA_PIN PB9 +#endif // Avoid conflict with TIMER_TONE -#define STEP_TIMER 10 +#define STEP_TIMER 8 // // Servos @@ -70,13 +74,13 @@ #if HAS_EXTRA_ENDSTOPS #define _ENDSTOP_IS_ANY(ES) X2_USE_ENDSTOP == ES || Y2_USE_ENDSTOP == ES || Z2_USE_ENDSTOP == ES || Z3_USE_ENDSTOP == ES || Z4_USE_ENDSTOP == ES #if _ENDSTOP_IS_ANY(_XMIN_) || _ENDSTOP_IS_ANY(_XMAX_) - #define NEEDS_X_MINMAX 1 + #define NEEDS_X_MINMAX #endif #if _ENDSTOP_IS_ANY(_YMIN_) || _ENDSTOP_IS_ANY(_YMAX_) - #define NEEDS_Y_MINMAX 1 + #define NEEDS_Y_MINMAX #endif #if _ENDSTOP_IS_ANY(_ZMIN_) || _ENDSTOP_IS_ANY(_ZMAX_) - #define NEEDS_Z_MINMAX 1 + #define NEEDS_Z_MINMAX #endif #undef _ENDSTOP_IS_ANY #endif @@ -109,7 +113,7 @@ #else #define Y_MIN_PIN E1_DIAG_PIN // E1DET #endif -#elif NEEDS_Y_MINMAX +#elif ENABLED(NEEDS_Y_MINMAX) #ifndef Y_MIN_PIN #define Y_MIN_PIN Y_DIAG_PIN // Y-STOP #endif @@ -127,7 +131,7 @@ #else #define Z_MIN_PIN E2_DIAG_PIN // PWRDET #endif -#elif NEEDS_Z_MINMAX +#elif ENABLED(NEEDS_Z_MINMAX) #ifndef Z_MIN_PIN #define Z_MIN_PIN Z_DIAG_PIN // Z-STOP #endif @@ -138,10 +142,6 @@ #define Z_STOP_PIN Z_DIAG_PIN // Z-STOP #endif -#undef NEEDS_X_MINMAX -#undef NEEDS_Y_MINMAX -#undef NEEDS_Z_MINMAX - // // Filament Runout Sensor // diff --git a/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h b/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h index d00b21c30b..3f0d4e5ee9 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h @@ -59,13 +59,13 @@ #if HAS_EXTRA_ENDSTOPS #define _ENDSTOP_IS_ANY(ES) X2_USE_ENDSTOP == ES || Y2_USE_ENDSTOP == ES || Z2_USE_ENDSTOP == ES || Z3_USE_ENDSTOP == ES || Z4_USE_ENDSTOP == ES #if _ENDSTOP_IS_ANY(_XMIN_) || _ENDSTOP_IS_ANY(_XMAX_) - #define NEEDS_X_MINMAX 1 + #define NEEDS_X_MINMAX #endif #if _ENDSTOP_IS_ANY(_YMIN_) || _ENDSTOP_IS_ANY(_YMAX_) - #define NEEDS_Y_MINMAX 1 + #define NEEDS_Y_MINMAX #endif #if _ENDSTOP_IS_ANY(_ZMIN_) || _ENDSTOP_IS_ANY(_ZMAX_) - #define NEEDS_Z_MINMAX 1 + #define NEEDS_Z_MINMAX #endif #undef _ENDSTOP_IS_ANY #endif @@ -88,7 +88,7 @@ #ifdef Y_STALL_SENSITIVITY #define Y_STOP_PIN Y_DIAG_PIN // Y- -#elif NEEDS_Y_MINMAX +#elif ENABLED(NEEDS_Y_MINMAX) #ifndef Y_MIN_PIN #define Y_MIN_PIN Y_DIAG_PIN // Y- #endif @@ -101,7 +101,7 @@ #ifdef Z_STALL_SENSITIVITY #define Z_STOP_PIN Z_DIAG_PIN // Z- -#elif NEEDS_Z_MINMAX +#elif ENABLED(NEEDS_Z_MINMAX) #ifndef Z_MIN_PIN #define Z_MIN_PIN Z_DIAG_PIN // Z- #endif @@ -118,10 +118,6 @@ #endif #endif -#undef NEEDS_X_MINMAX -#undef NEEDS_Y_MINMAX -#undef NEEDS_Z_MINMAX - // // Steppers // diff --git a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h index 0d4a74b6f9..6516538c44 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h @@ -81,10 +81,10 @@ #if HAS_EXTRA_ENDSTOPS #define _ENDSTOP_IS_ANY(ES) X2_USE_ENDSTOP == ES || Y2_USE_ENDSTOP == ES || Z2_USE_ENDSTOP == ES || Z3_USE_ENDSTOP == ES || Z4_USE_ENDSTOP == ES #if _ENDSTOP_IS_ANY(_XMIN_) || _ENDSTOP_IS_ANY(_XMAX_) - #define NEEDS_X_MINMAX 1 + #define NEEDS_X_MINMAX #endif #if _ENDSTOP_IS_ANY(_YMIN_) || _ENDSTOP_IS_ANY(_YMAX_) - #define NEEDS_Y_MINMAX 1 + #define NEEDS_Y_MINMAX #endif #undef _ENDSTOP_IS_ANY #endif @@ -117,7 +117,7 @@ #else #define Y_MIN_PIN E1_DIAG_PIN // MIN6 #endif -#elif NEEDS_Y_MINMAX +#elif ENABLED(NEEDS_Y_MINMAX) #ifndef Y_MIN_PIN #define Y_MIN_PIN Y_DIAG_PIN // MIN2 #endif @@ -130,9 +130,6 @@ #define Z_STOP_PIN Z_DIAG_PIN // MIN3 -#undef NEEDS_X_MINMAX -#undef NEEDS_Y_MINMAX - // // Filament Runout Sensors // diff --git a/Marlin/src/pins/stm32h7/env_validate.h b/Marlin/src/pins/stm32h7/env_validate.h new file mode 100644 index 0000000000..0c515e5df6 --- /dev/null +++ b/Marlin/src/pins/stm32h7/env_validate.h @@ -0,0 +1,26 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2023 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 + +#if NOT_TARGET(STM32H7) + #error "Oops! Select an STM32H7 board in 'Tools > Board.'" +#endif diff --git a/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h b/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h new file mode 100644 index 0000000000..80ea354982 --- /dev/null +++ b/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h @@ -0,0 +1,545 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2023 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 + +#include "env_validate.h" + +#define BOARD_INFO_NAME "OCTOPUS MAX EZ V1.0" + +#define USES_DIAG_JUMPERS + +// Onboard I2C EEPROM +#if EITHER(NO_EEPROM_SELECTED, I2C_EEPROM) + #undef NO_EEPROM_SELECTED + #define I2C_EEPROM + #define SOFT_I2C_EEPROM // Force the use of Software I2C + #define I2C_SCL_PIN PB10 + #define I2C_SDA_PIN PB11 + #define MARLIN_EEPROM_SIZE 0x1000 // 4KB +#endif + +// Avoid conflict with TIMER_TONE +#define STEP_TIMER 8 + +// +// Servos +// +#define SERVO0_PIN PB14 + +// +// Misc. Functions +// +#define LED_PIN PA14 + +// +// Trinamic Stallguard pins +// +#define X_DIAG_PIN PF0 // M1-STOP +#define Y_DIAG_PIN PF2 // M2-STOP +#define Z_DIAG_PIN PF4 // M3-STOP +#define Z2_DIAG_PIN PF3 // M4-STOP +#define E0_DIAG_PIN PF1 // M5-STOP +#define E1_DIAG_PIN PC15 // M6-STOP +#define E2_DIAG_PIN PF12 // PWRDET + +// +// Z Probe (when not Z_MIN_PIN) +// +#ifndef Z_MIN_PROBE_PIN + #define Z_MIN_PROBE_PIN PB15 +#endif + +// +// Check for additional used endstop pins +// +#if HAS_EXTRA_ENDSTOPS + #define _ENDSTOP_IS_ANY(ES) X2_USE_ENDSTOP == ES || Y2_USE_ENDSTOP == ES || Z2_USE_ENDSTOP == ES || Z3_USE_ENDSTOP == ES || Z4_USE_ENDSTOP == ES + #if _ENDSTOP_IS_ANY(_XMIN_) || _ENDSTOP_IS_ANY(_XMAX_) + #define NEEDS_X_MINMAX + #endif + #if _ENDSTOP_IS_ANY(_YMIN_) || _ENDSTOP_IS_ANY(_YMAX_) + #define NEEDS_Y_MINMAX + #endif + #if _ENDSTOP_IS_ANY(_ZMIN_) || _ENDSTOP_IS_ANY(_ZMAX_) + #define NEEDS_Z_MINMAX + #endif + #undef _ENDSTOP_IS_ANY +#endif + +// +// Limit Switches +// +#ifdef X_STALL_SENSITIVITY + #define X_STOP_PIN X_DIAG_PIN + #if X_HOME_TO_MIN + #define X_MAX_PIN E0_DIAG_PIN // E0DET + #else + #define X_MIN_PIN E0_DIAG_PIN // E0DET + #endif +#elif EITHER(DUAL_X_CARRIAGE, NEEDS_X_MINMAX) + #ifndef X_MIN_PIN + #define X_MIN_PIN X_DIAG_PIN // X-STOP + #endif + #ifndef X_MAX_PIN + #define X_MAX_PIN E0_DIAG_PIN // E0DET + #endif +#else + #define X_STOP_PIN X_DIAG_PIN // X-STOP +#endif + +#ifdef Y_STALL_SENSITIVITY + #define Y_STOP_PIN Y_DIAG_PIN + #if Y_HOME_TO_MIN + #define Y_MAX_PIN E1_DIAG_PIN // E1DET + #else + #define Y_MIN_PIN E1_DIAG_PIN // E1DET + #endif +#elif ENABLED(NEEDS_Y_MINMAX) + #ifndef Y_MIN_PIN + #define Y_MIN_PIN Y_DIAG_PIN // Y-STOP + #endif + #ifndef Y_MAX_PIN + #define Y_MAX_PIN E1_DIAG_PIN // E1DET + #endif +#else + #define Y_STOP_PIN Y_DIAG_PIN // Y-STOP +#endif + +#ifdef Z_STALL_SENSITIVITY + #define Z_STOP_PIN Z_DIAG_PIN + #if Z_HOME_TO_MIN + #define Z_MAX_PIN E2_DIAG_PIN // PWRDET + #else + #define Z_MIN_PIN E2_DIAG_PIN // PWRDET + #endif +#elif ENABLED(NEEDS_Z_MINMAX) + #ifndef Z_MIN_PIN + #define Z_MIN_PIN Z_DIAG_PIN // Z-STOP + #endif + #ifndef Z_MAX_PIN + #define Z_MAX_PIN E2_DIAG_PIN // PWRDET + #endif +#else + #define Z_STOP_PIN Z_DIAG_PIN // Z-STOP +#endif + +// +// Filament Runout Sensor +// +#define FIL_RUNOUT_PIN PF1 // E0DET +#define FIL_RUNOUT2_PIN PF15 // E1DET + +// +// Power Supply Control +// +#ifndef PS_ON_PIN + #define PS_ON_PIN PF13 // PS-ON +#endif + +// +// Power Loss Detection +// +#ifndef POWER_LOSS_PIN + #define POWER_LOSS_PIN PF12 // PWRDET +#endif + +// +// Steppers +// +#define X_STEP_PIN PC13 // MOTOR 1 +#define X_DIR_PIN PC14 +#define X_ENABLE_PIN PE6 +#ifndef X_CS_PIN + #define X_CS_PIN PG14 +#endif + +#define Y_STEP_PIN PE4 // MOTOR 2 +#define Y_DIR_PIN PE5 +#define Y_ENABLE_PIN PE3 +#ifndef Y_CS_PIN + #define Y_CS_PIN PG13 +#endif + +#define Z_STEP_PIN PE1 // MOTOR 3 +#define Z_DIR_PIN PE0 +#define Z_ENABLE_PIN PE2 +#ifndef Z_CS_PIN + #define Z_CS_PIN PG12 +#endif + +#define Z2_STEP_PIN PB8 // MOTOR 4 +#define Z2_DIR_PIN PB9 +#define Z2_ENABLE_PIN PB7 +#ifndef Z2_CS_PIN + #define Z2_CS_PIN PG11 +#endif + +#define E0_STEP_PIN PB5 // MOTOR 5 +#define E0_DIR_PIN PB4 +#define E0_ENABLE_PIN PB6 +#ifndef E0_CS_PIN + #define E0_CS_PIN PG10 +#endif + +#define E1_STEP_PIN PG15 // MOTOR 6 +#define E1_DIR_PIN PB3 +#define E1_ENABLE_PIN PD5 +#ifndef E1_CS_PIN + #define E1_CS_PIN PG9 +#endif + +#define E2_STEP_PIN PD3 // MOTOR 7 +#define E2_DIR_PIN PD2 +#define E2_ENABLE_PIN PD4 +#ifndef E2_CS_PIN + #define E2_CS_PIN PD7 +#endif + +#define E3_STEP_PIN PA10 // MOTOR 8 +#define E3_DIR_PIN PA9 +#define E3_ENABLE_PIN PA15 +#ifndef E3_CS_PIN + #define E3_CS_PIN PD6 +#endif + +#define E4_STEP_PIN PA8 // MOTOR 9 +#define E4_DIR_PIN PC7 +#define E4_ENABLE_PIN PC9 +#ifndef E4_CS_PIN + #define E4_CS_PIN PG8 +#endif + +#define E5_STEP_PIN PG6 // MOTOR 10 +#define E5_DIR_PIN PC6 +#define E5_ENABLE_PIN PC8 +#ifndef E5_CS_PIN + #define E5_CS_PIN PG7 +#endif + +// +// Temperature Sensors +// +#define TEMP_BED_PIN PB1 // TB +#define TEMP_0_PIN PB0 // TH0 +#define TEMP_1_PIN PC5 // TH1 +#define TEMP_2_PIN PC4 // TH2 +#define TEMP_3_PIN PA7 // TH3 + +// +// Heaters / Fans +// +#define HEATER_BED_PIN PF5 // Hotbed +#define HEATER_0_PIN PF6 // Heater0 +#define HEATER_1_PIN PA0 // Heater1 +#define HEATER_2_PIN PF9 // Heater2 +#define HEATER_3_PIN PF7 // Heater3 + +#define FAN_PIN PA6 // Fan0 +#define FAN1_PIN PA5 // Fan1 +#define FAN2_PIN PA4 // Fan2 +#define FAN3_PIN PA3 // Fan3 +#define FAN4_PIN PA1 // 4 wire Fan4 +#define FAN5_PIN PF8 // 4 wire Fan5 +#define FAN6_PIN PA2 // 4 wire Fan6 + +// +// SD Support +// +#ifndef SDCARD_CONNECTION + #if HAS_WIRED_LCD + #define SDCARD_CONNECTION LCD + #else + #define SDCARD_CONNECTION ONBOARD + #endif +#endif + +// +// Software SPI pins for TMC2130 stepper drivers +// +#if ENABLED(TMC_USE_SW_SPI) + #ifndef TMC_SW_MOSI + #define TMC_SW_MOSI PE14 + #endif + #ifndef TMC_SW_MISO + #define TMC_SW_MISO PE13 + #endif + #ifndef TMC_SW_SCK + #define TMC_SW_SCK PE12 + #endif +#endif + +#if HAS_TMC_UART + /** + * TMC2208/TMC2209 stepper drivers + * + * Hardware serial communication ports. + * If undefined software serial is used according to the pins below + */ + //#define X_HARDWARE_SERIAL Serial1 + //#define X2_HARDWARE_SERIAL Serial1 + //#define Y_HARDWARE_SERIAL Serial1 + //#define Y2_HARDWARE_SERIAL Serial1 + //#define Z_HARDWARE_SERIAL Serial1 + //#define Z2_HARDWARE_SERIAL Serial1 + //#define E0_HARDWARE_SERIAL Serial1 + //#define E1_HARDWARE_SERIAL Serial1 + //#define E2_HARDWARE_SERIAL Serial1 + //#define E3_HARDWARE_SERIAL Serial1 + //#define E4_HARDWARE_SERIAL Serial1 + + #define X_SERIAL_TX_PIN PG14 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN + + #define Y_SERIAL_TX_PIN PG13 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN + + #define Z_SERIAL_TX_PIN PG12 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN + + #define Z2_SERIAL_TX_PIN PG11 + #define Z2_SERIAL_RX_PIN Z2_SERIAL_TX_PIN + + #define E0_SERIAL_TX_PIN PG10 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN + + #define E1_SERIAL_TX_PIN PG9 + #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN + + #define E2_SERIAL_TX_PIN PD7 + #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN + + #define E3_SERIAL_TX_PIN PD6 + #define E3_SERIAL_RX_PIN E3_SERIAL_TX_PIN + + #define E4_SERIAL_TX_PIN PG8 + #define E4_SERIAL_RX_PIN E3_SERIAL_TX_PIN + + #define E5_SERIAL_TX_PIN PG7 + #define E5_SERIAL_RX_PIN E3_SERIAL_TX_PIN + + // Reduce baud rate to improve software serial reliability + #define TMC_BAUD_RATE 19200 +#endif + +/** + * ---- + * (MISO) PE13 | 1 | + * (SCK) PE12 | 2 | + * (BTN_EN1) PG5 | 3 | + * (SD_SS) PE11 | 4 | + * (BTN_EN2) PG4 | 5 | + * (MOSI) PE14 | 6 | + * (SD_DETECT) PG3 | 7 | + * RESET | 8 | + * (BEEPER) PG2 | 9 | + * (BTN_ENC) PD15 | 10 | + * (LCD_EN) PD14 | 11 | + * (LCD_RS) PD13 | 12 | + * (LCD_D4) PD12 | 13 | + * (LCD_D5) PD11 | 14 | + * (LCD_D6) PD10 | 15 | + * (LCD_D7) PE15 | 16 | + * GND | 17 | + * 5V | 18 | + * ---- + * LCD + */ + +#define EXP1_01_PIN PG2 +#define EXP1_02_PIN PD15 +#define EXP1_03_PIN PD14 +#define EXP1_04_PIN PD13 +#define EXP1_05_PIN PD12 +#define EXP1_06_PIN PD11 +#define EXP1_07_PIN PD10 +#define EXP1_08_PIN PE15 + +#define EXP2_01_PIN PE13 +#define EXP2_02_PIN PE12 +#define EXP2_03_PIN PG5 +#define EXP2_04_PIN PE11 +#define EXP2_05_PIN PG4 +#define EXP2_06_PIN PE14 +#define EXP2_07_PIN PG3 +#define EXP2_08_PIN -1 + +// +// Onboard SD card +// Must use soft SPI because Marlin's default hardware SPI is tied to LCD's EXP2 +// +#if SD_CONNECTION_IS(ONBOARD) + #ifndef SD_DETECT_STATE + #define SD_DETECT_STATE HIGH + #elif SD_DETECT_STATE == LOW + #error "BOARD_BTT_OCTOPUS_MAX_EZ onboard SD requires SD_DETECT_STATE set to HIGH." + #endif + #define SDSS PB12 + #define SD_SS_PIN SDSS + #define SD_SCK_PIN PE12 + #define SD_MISO_PIN PE13 + #define SD_MOSI_PIN PE14 + #define SD_DETECT_PIN PB13 + #define SOFTWARE_SPI +#elif SD_CONNECTION_IS(LCD) + #define SDSS EXP2_04_PIN + #define SD_SS_PIN SDSS + #define SD_SCK_PIN EXP2_02_PIN + #define SD_MISO_PIN EXP2_01_PIN + #define SD_MOSI_PIN EXP2_06_PIN + #define SD_DETECT_PIN EXP2_07_PIN + #define SOFTWARE_SPI +#elif SD_CONNECTION_IS(CUSTOM_CABLE) + #error "CUSTOM_CABLE is not a supported SDCARD_CONNECTION for this board" +#endif + +// +// LCDs and Controllers +// +#if IS_TFTGLCD_PANEL + + #if ENABLED(TFTGLCD_PANEL_SPI) + #define TFTGLCD_CS EXP2_03_PIN + #endif + +#elif HAS_WIRED_LCD + + #define BEEPER_PIN EXP1_01_PIN + #define BTN_ENC EXP1_02_PIN + + #if ENABLED(CR10_STOCKDISPLAY) + + #define LCD_PINS_RS EXP1_07_PIN + + #define BTN_EN1 EXP1_03_PIN + #define BTN_EN2 EXP1_05_PIN + + #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_D4 EXP1_06_PIN + + #else + + #define LCD_PINS_RS EXP1_04_PIN + + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_05_PIN + + #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_D4 EXP1_05_PIN + + #if ENABLED(FYSETC_MINI_12864) + #define DOGLCD_CS EXP1_03_PIN + #define DOGLCD_A0 EXP1_04_PIN + #define DOGLCD_SCK EXP2_02_PIN + #define DOGLCD_MOSI EXP2_06_PIN + + #define SOFTWARE_SPI + #define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems + // results in LCD soft SPI mode 3, SD soft SPI mode 0 + //#define LCD_BACKLIGHT_PIN -1 + #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. + #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #ifndef RGB_LED_R_PIN + #define RGB_LED_R_PIN EXP1_06_PIN + #endif + #ifndef RGB_LED_G_PIN + #define RGB_LED_G_PIN EXP1_07_PIN + #endif + #ifndef RGB_LED_B_PIN + #define RGB_LED_B_PIN EXP1_08_PIN + #endif + #elif ENABLED(FYSETC_MINI_12864_2_1) + #define NEOPIXEL_PIN EXP1_06_PIN + #endif + #endif // !FYSETC_MINI_12864 + + #if IS_ULTIPANEL + #define LCD_PINS_D5 EXP1_06_PIN + #define LCD_PINS_D6 EXP1_07_PIN + #define LCD_PINS_D7 EXP1_08_PIN + + #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) + #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder + #endif + + #endif + + #endif +#endif // HAS_WIRED_LCD + +// Alter timing for graphical display +#if IS_U8GLIB_ST7920 + #define BOARD_ST7920_DELAY_1 120 + #define BOARD_ST7920_DELAY_2 80 + #define BOARD_ST7920_DELAY_3 580 +#endif + +#if HAS_SPI_TFT + #define TFT_CS_PIN EXP2_04_PIN + #define TFT_A0_PIN EXP2_07_PIN + #define TFT_SCK_PIN EXP2_02_PIN + #define TFT_MISO_PIN EXP2_01_PIN + #define TFT_MOSI_PIN EXP2_06_PIN + + #define TOUCH_INT_PIN EXP1_07_PIN + #define TOUCH_MISO_PIN EXP1_06_PIN + #define TOUCH_MOSI_PIN EXP1_03_PIN + #define TOUCH_SCK_PIN EXP1_05_PIN + #define TOUCH_CS_PIN EXP1_04_PIN + + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_05_PIN + #define BTN_ENC EXP1_02_PIN +#endif + +// +// NeoPixel LED +// +#ifndef NEOPIXEL_PIN + #define NEOPIXEL_PIN PE10 +#endif + +#ifndef NEOPIXEL2_PIN + #define NEOPIXEL2_PIN PE9 +#endif + +// +// WIFI +// + +/** + * ------- + * GND | 9 | | 8 | 3.3V + * (ESP-CS) PG1 | 10 | | 7 | PB15 (ESP-MOSI) + * 3.3V | 11 | | 6 | PB14 (ESP-MISO) + * (ESP-IO0) PG0 | 12 | | 5 | PB13 (ESP-CLK) + * (ESP-IO4) PF15 | 13 | | 4 | -- + * -- | 14 | | 3 | 3.3V (ESP-EN) + * (ESP-RX) PE7 | 15 | | 2 | -- + * (ESP-TX) PE8 | 16 | | 1 | PB2 (ESP-RST) + * ------- + * WIFI + */ +#define ESP_WIFI_MODULE_COM 7 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this +#define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2 +#define ESP_WIFI_MODULE_RESET_PIN PB2 +#define ESP_WIFI_MODULE_GPIO0_PIN PG0 +#define ESP_WIFI_MODULE_GPIO4_PIN PF15 diff --git a/Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX_common.h b/Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX_common.h index 1ee7846c93..d06e27d9c0 100644 --- a/Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX_common.h +++ b/Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX_common.h @@ -21,9 +21,7 @@ */ #pragma once -#if NOT_TARGET(STM32H7) - #error "Oops! Select an STM32H7 board in 'Tools > Board.'" -#endif +#include "env_validate.h" #define DEFAULT_MACHINE_NAME "Biqu BX" diff --git a/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h b/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h index eaceafe29e..809a1f3f8c 100644 --- a/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h +++ b/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h @@ -21,9 +21,7 @@ */ #pragma once -#if NOT_TARGET(STM32H7) - #error "Oops! Select an STM32H7 board in 'Tools > Board.'" -#endif +#include "env_validate.h" // If you have the BigTreeTech driver expansion module, enable BTT_MOTOR_EXPANSION // https://github.com/bigtreetech/BTT-Expansion-module/tree/master/BTT%20EXP-MOT diff --git a/buildroot/share/PlatformIO/boards/marlin_BTT_SKR_SE_BX.json b/buildroot/share/PlatformIO/boards/marlin_BTT_SKR_SE_BX.json index 65735d433b..3ed21e393b 100644 --- a/buildroot/share/PlatformIO/boards/marlin_BTT_SKR_SE_BX.json +++ b/buildroot/share/PlatformIO/boards/marlin_BTT_SKR_SE_BX.json @@ -3,7 +3,7 @@ "core": "stm32", "cpu": "cortex-m7", "extra_flags": "-DSTM32H743xx", - "f_cpu": "400000000L", + "f_cpu": "480000000L", "mcu": "stm32h743iit6", "variant": "MARLIN_BTT_SKR_SE_BX" }, diff --git a/buildroot/share/PlatformIO/boards/marlin_STM32H723Vx.json b/buildroot/share/PlatformIO/boards/marlin_STM32H723Vx.json new file mode 100644 index 0000000000..73620c162d --- /dev/null +++ b/buildroot/share/PlatformIO/boards/marlin_STM32H723Vx.json @@ -0,0 +1,61 @@ +{ + "build": { + "core": "stm32", + "cpu": "cortex-m7", + "extra_flags": "-DSTM32H7xx -DSTM32H723xx", + "f_cpu": "550000000L", + "mcu": "stm32h723vet6", + "product_line": "STM32H723xx", + "variant": "MARLIN_H723vx" + }, + "connectivity": [ + "can", + "ethernet" + ], + "debug": { + "jlink_device": "STM32H723VE", + "openocd_target": "stm32h7x", + "svd_path": "STM32H7x3.svd", + "tools": { + "stlink": { + "server": { + "arguments": [ + "-f", + "scripts/interface/stlink.cfg", + "-c", + "transport select hla_swd", + "-f", + "scripts/target/stm32h7x.cfg", + "-c", + "reset_config none" + ], + "executable": "bin/openocd", + "package": "tool-openocd" + } + } + } + }, + "frameworks": [ + "arduino", + "stm32cube" + ], + "name": "STM32H723VE (564k RAM. 512k Flash)", + "upload": { + "disable_flushing": false, + "maximum_ram_size": 577536, + "maximum_size": 524288, + "protocol": "stlink", + "protocols": [ + "stlink", + "dfu", + "jlink", + "cmsis-dap" + ], + "offset_address": "0x8020000", + "require_upload_port": true, + "use_1200bps_touch": false, + "wait_for_upload_port": false + }, + "url": "https://www.st.com/en/microcontrollers-microprocessors/stm32h723ze.html", + "vendor": "ST" +} diff --git a/buildroot/share/PlatformIO/boards/marlin_STM32H723Zx.json b/buildroot/share/PlatformIO/boards/marlin_STM32H723Zx.json new file mode 100644 index 0000000000..8525793c4e --- /dev/null +++ b/buildroot/share/PlatformIO/boards/marlin_STM32H723Zx.json @@ -0,0 +1,61 @@ +{ + "build": { + "core": "stm32", + "cpu": "cortex-m7", + "extra_flags": "-DSTM32H7xx -DSTM32H723xx", + "f_cpu": "550000000L", + "mcu": "stm32h723zet6", + "product_line": "STM32H723xx", + "variant": "MARLIN_H723Zx" + }, + "connectivity": [ + "can", + "ethernet" + ], + "debug": { + "jlink_device": "STM32H723ZE", + "openocd_target": "stm32h7x", + "svd_path": "STM32H7x3.svd", + "tools": { + "stlink": { + "server": { + "arguments": [ + "-f", + "scripts/interface/stlink.cfg", + "-c", + "transport select hla_swd", + "-f", + "scripts/target/stm32h7x.cfg", + "-c", + "reset_config none" + ], + "executable": "bin/openocd", + "package": "tool-openocd" + } + } + } + }, + "frameworks": [ + "arduino", + "stm32cube" + ], + "name": "STM32H723ZE (564k RAM. 512k Flash)", + "upload": { + "disable_flushing": false, + "maximum_ram_size": 577536, + "maximum_size": 524288, + "protocol": "stlink", + "protocols": [ + "stlink", + "dfu", + "jlink", + "cmsis-dap" + ], + "offset_address": "0x8020000", + "require_upload_port": true, + "use_1200bps_touch": false, + "wait_for_upload_port": false + }, + "url": "https://www.st.com/en/microcontrollers-microprocessors/stm32h723ze.html", + "vendor": "ST" +} diff --git a/buildroot/share/PlatformIO/variants/MARLIN_H723Vx/PeripheralPins.c b/buildroot/share/PlatformIO/variants/MARLIN_H723Vx/PeripheralPins.c new file mode 100644 index 0000000000..e484edd1ad --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_H723Vx/PeripheralPins.c @@ -0,0 +1,590 @@ +/* + ******************************************************************************* + * Copyright (c) 2020, STMicroelectronics + * All rights reserved. + * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ******************************************************************************* + */ +/* + * Automatically generated from STM32H723VEHx.xml, STM32H723VETx.xml + * STM32H723VGHx.xml, STM32H723VGTx.xml + * STM32H730VBHx.xml, STM32H730VBTx.xml + * STM32H733VGHx.xml, STM32H733VGTx.xml + * CubeMX DB release 6.0.60 + */ +#if !defined(CUSTOM_PERIPHERAL_PINS) +#include "Arduino.h" +#include "PeripheralPins.h" + +/* ===== + * Notes: + * - The pins mentioned Px_y_ALTz are alternative possibilities which use other + * HW peripheral instances. You can use them the same way as any other "normal" + * pin (i.e. analogWrite(PA7_ALT1, 128);). + * + * - Commented lines are alternative possibilities which are not used per default. + * If you change them, you will have to know what you do + * ===== + */ + +//*** ADC *** + +#ifdef HAL_ADC_MODULE_ENABLED +WEAK const PinMap PinMap_ADC[] = { + {PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 16, 0)}, // ADC1_INP16 + {PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 17, 0)}, // ADC1_INP17 + {PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC1_INP14 + {PA_2_ALT1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC2_INP14 + {PA_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC1_INP15 + {PA_3_ALT1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC2_INP15 + {PA_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 18, 0)}, // ADC1_INP18 + {PA_4_ALT1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 18, 0)}, // ADC2_INP18 + {PA_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 19, 0)}, // ADC1_INP19 + {PA_5_ALT1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 19, 0)}, // ADC2_INP19 + {PA_6, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC1_INP3 + {PA_6_ALT1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC2_INP3 + {PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC1_INP7 + {PA_7_ALT1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC2_INP7 + {PB_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC1_INP9 + {PB_0_ALT1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC2_INP9 + {PB_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC1_INP5 + {PB_1_ALT1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC2_INP5 + {PC_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC1_INP10 + {PC_0_ALT1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC2_INP10 + {PC_0_ALT2, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC3_INP10 + {PC_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC1_INP11 + {PC_1_ALT1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC2_INP11 + {PC_1_ALT2, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC3_INP11 + {PC_2_C, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC3_INP0 + {PC_3_C, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC3_INP1 + {PC_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC1_INP4 + {PC_4_ALT1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC2_INP4 + {PC_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC1_INP8 + {PC_5_ALT1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC2_INP8 + {NC, NP, 0} +}; +#endif + +//*** DAC *** + +#ifdef HAL_DAC_MODULE_ENABLED +WEAK const PinMap PinMap_DAC[] = { + {PA_4, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // DAC1_OUT1 + {PA_5, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // DAC1_OUT2 + {NC, NP, 0} +}; +#endif + +//*** I2C *** + +#ifdef HAL_I2C_MODULE_ENABLED +WEAK const PinMap PinMap_I2C_SDA[] = { + {PB_7, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, + {PB_7_ALT1, I2C4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF6_I2C4)}, + {PB_9, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, + {PB_9_ALT1, I2C4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF6_I2C4)}, + {PB_11, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, + {PC_9, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, + {PC_9_ALT1, I2C5, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF6_I2C5)}, + {PC_10, I2C5, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C5)}, + {PD_13, I2C4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C4)}, + {NC, NP, 0} +}; +#endif + +#ifdef HAL_I2C_MODULE_ENABLED +WEAK const PinMap PinMap_I2C_SCL[] = { + {PA_8, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, + {PA_8_ALT1, I2C5, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF6_I2C5)}, + {PB_6, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, + {PB_6_ALT1, I2C4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF6_I2C4)}, + {PB_8, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, + {PB_8_ALT1, I2C4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF6_I2C4)}, + {PB_10, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, + {PC_11, I2C5, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C5)}, + {PD_12, I2C4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C4)}, + {NC, NP, 0} +}; +#endif + +//*** TIM *** + +#ifdef HAL_TIM_MODULE_ENABLED +WEAK const PinMap PinMap_TIM[] = { + {PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 + {PA_0_ALT1, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 1, 0)}, // TIM5_CH1 + {PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 + {PA_1_ALT1, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 2, 0)}, // TIM5_CH2 + {PA_1_ALT2, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM15, 1, 1)}, // TIM15_CH1N + {PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 + {PA_2_ALT1, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 3, 0)}, // TIM5_CH3 + {PA_2_ALT2, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM15, 1, 0)}, // TIM15_CH1 + {PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4 + {PA_3_ALT1, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 4, 0)}, // TIM5_CH4 + {PA_3_ALT2, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM15, 2, 0)}, // TIM15_CH2 + {PA_5, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 + {PA_5_ALT1, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 1)}, // TIM8_CH1N + {PA_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 + {PA_6_ALT1, TIM13, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM13, 1, 0)}, // TIM13_CH1 + {PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N + {PA_7_ALT1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 + {PA_7_ALT2, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 1)}, // TIM8_CH1N + {PA_7_ALT3, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM14, 1, 0)}, // TIM14_CH1 + {PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1 + {PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 0)}, // TIM1_CH2 + {PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3 + {PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 4, 0)}, // TIM1_CH4 + {PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 + {PB_0, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N + {PB_0_ALT1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 3, 0)}, // TIM3_CH3 + {PB_0_ALT2, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 1)}, // TIM8_CH2N + {PB_1, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N + {PB_1_ALT1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 4, 0)}, // TIM3_CH4 + {PB_1_ALT2, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 1)}, // TIM8_CH3N + {PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 + {PB_4, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 + {PB_5, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 + {PB_6, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 1, 0)}, // TIM4_CH1 + {PB_6_ALT1, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM16, 1, 1)}, // TIM16_CH1N + {PB_7, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 2, 0)}, // TIM4_CH2 + {PB_7_ALT1, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM17, 1, 1)}, // TIM17_CH1N + {PB_8, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 3, 0)}, // TIM4_CH3 + {PB_8_ALT1, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM16, 1, 0)}, // TIM16_CH1 + {PB_9, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4 + {PB_9_ALT1, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM17, 1, 0)}, // TIM17_CH1 + {PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 + {PB_11, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4 + {PB_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N + {PB_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N + {PB_14_ALT1, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 1)}, // TIM8_CH2N + {PB_14_ALT2, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM12, 1, 0)}, // TIM12_CH1 + {PB_15, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N + {PB_15_ALT1, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 1)}, // TIM8_CH3N + {PB_15_ALT2, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM12, 2, 0)}, // TIM12_CH2 + {PC_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 + {PC_6_ALT1, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 0)}, // TIM8_CH1 + {PC_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 + {PC_7_ALT1, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 0)}, // TIM8_CH2 + {PC_8, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 3, 0)}, // TIM3_CH3 + {PC_8_ALT1, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 0)}, // TIM8_CH3 + {PC_9, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 4, 0)}, // TIM3_CH4 + {PC_9_ALT1, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 4, 0)}, // TIM8_CH4 + {PC_12, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM15, 1, 0)}, // TIM15_CH1 + {PD_12, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 1, 0)}, // TIM4_CH1 + {PD_13, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 2, 0)}, // TIM4_CH2 + {PD_14, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 3, 0)}, // TIM4_CH3 + {PD_15, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4 + {PE_4, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM15, 1, 1)}, // TIM15_CH1N + {PE_5, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM15, 1, 0)}, // TIM15_CH1 + {PE_6, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM15, 2, 0)}, // TIM15_CH2 + {PE_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N + {PE_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1 + {PE_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N + {PE_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 0)}, // TIM1_CH2 + {PE_12, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N + {PE_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3 + {PE_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 4, 0)}, // TIM1_CH4 + {NC, NP, 0} +}; +#endif + +//*** UART *** + +#ifdef HAL_UART_MODULE_ENABLED +WEAK const PinMap PinMap_UART_TX[] = { + {PA_0, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + {PA_2, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + {PA_9, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_LPUART)}, + {PA_9_ALT1, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + {PA_12, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_UART4)}, + {PA_15, UART7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_UART7)}, + {PB_4, UART7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_UART7)}, + {PB_6, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART)}, + {PB_6_ALT1, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_UART5)}, + {PB_6_ALT2, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + {PB_9, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + {PB_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + {PB_13, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_UART5)}, + {PB_14, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART1)}, + {PC_6, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART6)}, + {PC_10, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + {PC_10_ALT1, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + {PC_12, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)}, + {PD_1, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + {PD_5, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + {PD_8, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + {PD_15, UART9, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_UART9)}, + {PE_1, UART8, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART8)}, + {PE_3, USART10, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_USART10)}, + {PE_8, UART7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_UART7)}, + {NC, NP, 0} +}; +#endif + +#ifdef HAL_UART_MODULE_ENABLED +WEAK const PinMap PinMap_UART_RX[] = { + {PA_1, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + {PA_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + {PA_8, UART7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_UART7)}, + {PA_10, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_LPUART)}, + {PA_10_ALT1, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + {PA_11, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_UART4)}, + {PB_3, UART7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_UART7)}, + {PB_5, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_UART5)}, + {PB_7, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART)}, + {PB_7_ALT1, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + {PB_8, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + {PB_11, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + {PB_12, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_UART5)}, + {PB_15, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART1)}, + {PC_7, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART6)}, + {PC_11, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + {PC_11_ALT1, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + {PD_0, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + {PD_2, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)}, + {PD_6, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + {PD_9, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + {PD_14, UART9, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_UART9)}, + {PE_0, UART8, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART8)}, + {PE_2, USART10, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART10)}, + {PE_7, UART7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_UART7)}, + {NC, NP, 0} +}; +#endif + +#ifdef HAL_UART_MODULE_ENABLED +WEAK const PinMap PinMap_UART_RTS[] = { + {PA_1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + {PA_12, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_LPUART)}, + {PA_12_ALT1, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + {PA_15, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + {PB_14, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + {PB_14_ALT1, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + {PC_8, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)}, + {PD_4, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + {PD_12, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + {PD_13, UART9, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_UART9)}, + {PD_15, UART8, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART8)}, + {PE_9, UART7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_UART7)}, + {NC, NP, 0} +}; +#endif + +#ifdef HAL_UART_MODULE_ENABLED +WEAK const PinMap PinMap_UART_CTS[] = { + {PA_0, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + {PA_11, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_LPUART)}, + {PA_11_ALT1, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + {PB_0, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + {PB_13, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + {PB_15, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + {PC_9, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)}, + {PD_0, UART9, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_UART9)}, + {PD_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + {PD_11, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + {PD_14, UART8, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART8)}, + {PE_10, UART7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_UART7)}, + {NC, NP, 0} +}; +#endif + +//*** SPI *** + +#ifdef HAL_SPI_MODULE_ENABLED +WEAK const PinMap PinMap_SPI_MOSI[] = { + {PA_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + {PA_7_ALT1, SPI6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_SPI6)}, + {PB_2, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_SPI3)}, + {PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + {PB_5_ALT1, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_SPI3)}, + {PB_5_ALT2, SPI6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_SPI6)}, + {PB_15, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + {PC_1, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + {PC_3_C, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + {PC_12, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + {PD_6, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI3)}, + {PD_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + {PE_6, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, + {PE_14, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, + {NC, NP, 0} +}; +#endif + +#ifdef HAL_SPI_MODULE_ENABLED +WEAK const PinMap PinMap_SPI_MISO[] = { + {PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + {PA_6_ALT1, SPI6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_SPI6)}, + {PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + {PB_4_ALT1, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + {PB_4_ALT2, SPI6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_SPI6)}, + {PB_14, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + {PC_2_C, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + {PC_11, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + {PE_5, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, + {PE_13, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, + {NC, NP, 0} +}; +#endif + +#ifdef HAL_SPI_MODULE_ENABLED +WEAK const PinMap PinMap_SPI_SCLK[] = { + {PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + {PA_5_ALT1, SPI6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_SPI6)}, + {PA_9, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + {PA_12, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + {PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + {PB_3_ALT1, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + {PB_3_ALT2, SPI6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_SPI6)}, + {PB_10, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + {PB_13, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + {PC_10, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + {PC_12, SPI6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI6)}, + {PD_3, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + {PE_2, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, + {PE_12, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, + {NC, NP, 0} +}; +#endif + +#ifdef HAL_SPI_MODULE_ENABLED +WEAK const PinMap PinMap_SPI_SSEL[] = { + {PA_0, SPI6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI6)}, + {PA_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + {PA_4_ALT1, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + {PA_4_ALT2, SPI6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_SPI6)}, + {PA_11, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + {PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + {PA_15_ALT1, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + {PA_15_ALT2, SPI6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_SPI6)}, + {PB_4, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_SPI2)}, + {PB_9, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + {PB_12, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + {PE_4, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, + {PE_11, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, + {NC, NP, 0} +}; +#endif + +//*** FDCAN *** + +#ifdef HAL_FDCAN_MODULE_ENABLED +WEAK const PinMap PinMap_CAN_RD[] = { + {PA_11, FDCAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_FDCAN1)}, + {PB_5, FDCAN2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_FDCAN2)}, + {PB_8, FDCAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_FDCAN1)}, + {PB_12, FDCAN2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_FDCAN2)}, + {PD_0, FDCAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_FDCAN1)}, + {PD_12, FDCAN3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_FDCAN3)}, + {NC, NP, 0} +}; +#endif + +#ifdef HAL_FDCAN_MODULE_ENABLED +WEAK const PinMap PinMap_CAN_TD[] = { + {PA_12, FDCAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_FDCAN1)}, + {PB_6, FDCAN2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_FDCAN2)}, + {PB_9, FDCAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_FDCAN1)}, + {PB_13, FDCAN2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_FDCAN2)}, + {PD_1, FDCAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_FDCAN1)}, + {PD_13, FDCAN3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_FDCAN3)}, + {NC, NP, 0} +}; +#endif + +//*** ETHERNET *** + +#if defined(HAL_ETH_MODULE_ENABLED) || defined(HAL_ETH_LEGACY_MODULE_ENABLED) +WEAK const PinMap PinMap_Ethernet[] = { + {PA_0, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_CRS + {PA_1, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_REF_CLK + {PA_1_ALT1, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_RX_CLK + {PA_2, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_MDIO + {PA_3, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_COL + {PA_7, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_CRS_DV + {PA_7_ALT1, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_RX_DV + {PA_9, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_TX_ER + {PB_0, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_RXD2 + {PB_1, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_RXD3 + {PB_2, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_TX_ER + {PB_5, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_PPS_OUT + {PB_8, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_TXD3 + {PB_10, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_RX_ER + {PB_11, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_TX_EN + {PB_12, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_TXD0 + {PB_13, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_TXD1 + {PC_1, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_MDC + {PC_2_C, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_TXD2 + {PC_3_C, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_TX_CLK + {PC_4, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_RXD0 + {PC_5, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_RXD1 + {PE_2, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_TXD3 + {NC, NP, 0} +}; +#endif + +//*** OCTOSPI *** + +#ifdef HAL_OSPI_MODULE_ENABLED +WEAK const PinMap PinMap_OCTOSPI_DATA0[] = { + {PA_2, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO0 + {PB_1, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO0 + {PB_12, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO0 + {PC_3_C, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO0 + {PC_9, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO0 + {PD_11, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO0 + {NC, NP, 0} +}; +#endif + +#ifdef HAL_OSPI_MODULE_ENABLED +WEAK const PinMap PinMap_OCTOSPI_DATA1[] = { + {PB_0, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO1 + {PC_10, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO1 + {PD_12, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO1 + {NC, NP, 0} +}; +#endif + +#ifdef HAL_OSPI_MODULE_ENABLED +WEAK const PinMap PinMap_OCTOSPI_DATA2[] = { + {PA_3, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO2 + {PA_7, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO2 + {PB_13, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO2 + {PC_2_C, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO2 + {PE_2, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO2 + {NC, NP, 0} +}; +#endif + +#ifdef HAL_OSPI_MODULE_ENABLED +WEAK const PinMap PinMap_OCTOSPI_DATA3[] = { + {PA_1, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO3 + {PA_6, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO3 + {PD_13, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO3 + {NC, NP, 0} +}; +#endif + +#ifdef HAL_OSPI_MODULE_ENABLED +WEAK const PinMap PinMap_OCTOSPI_DATA4[] = { + {PC_1, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO4 + {PD_4, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO4 + {PE_7, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO4 + {NC, NP, 0} +}; +#endif + +#ifdef HAL_OSPI_MODULE_ENABLED +WEAK const PinMap PinMap_OCTOSPI_DATA5[] = { + {PC_2_C, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO5 + {PD_5, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO5 + {PE_8, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO5 + {NC, NP, 0} +}; +#endif + +#ifdef HAL_OSPI_MODULE_ENABLED +WEAK const PinMap PinMap_OCTOSPI_DATA6[] = { + {PC_3_C, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO6 + {PD_6, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO6 + {PE_9, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO6 + {NC, NP, 0} +}; +#endif + +#ifdef HAL_OSPI_MODULE_ENABLED +WEAK const PinMap PinMap_OCTOSPI_DATA7[] = { + {PD_7, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO7 + {PE_10, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO7 + {NC, NP, 0} +}; +#endif + +#ifdef HAL_OSPI_MODULE_ENABLED +WEAK const PinMap PinMap_OCTOSPI_SCLK[] = { + {PA_3, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_OCTOSPIM_P1)}, // OCTOSPIM_P1_CLK + {PB_2, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_OCTOSPIM_P1)}, // OCTOSPIM_P1_CLK + {NC, NP, 0} +}; +#endif + +#ifdef HAL_OSPI_MODULE_ENABLED +WEAK const PinMap PinMap_OCTOSPI_SSEL[] = { + {PB_6, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_NCS + {PB_10, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_OCTOSPIM_P1)}, // OCTOSPIM_P1_NCS + {PC_11, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_OCTOSPIM_P1)}, // OCTOSPIM_P1_NCS + {PE_11, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_OCTOSPIM_P1)}, // OCTOSPIM_P1_NCS + {NC, NP, 0} +}; +#endif + +//*** USB *** + +#if defined(HAL_PCD_MODULE_ENABLED) || defined(HAL_HCD_MODULE_ENABLED) +WEAK const PinMap PinMap_USB_OTG_HS[] = { +#ifdef USE_USB_HS_IN_FS + {PA_8, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG1_HS)}, // USB_OTG_HS_SOF + {PA_9, USB_OTG_HS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_OTG_HS_VBUS + {PA_10, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_PULLUP, GPIO_AF10_OTG1_HS)}, // USB_OTG_HS_ID + {PA_11, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF_NONE)}, // USB_OTG_HS_DM + {PA_12, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF_NONE)}, // USB_OTG_HS_DP +#else + {PA_3, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG1_HS)}, // USB_OTG_HS_ULPI_D0 + {PA_5, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG1_HS)}, // USB_OTG_HS_ULPI_CK + {PB_0, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG1_HS)}, // USB_OTG_HS_ULPI_D1 + {PB_1, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG1_HS)}, // USB_OTG_HS_ULPI_D2 + {PB_5, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG1_HS)}, // USB_OTG_HS_ULPI_D7 + {PB_10, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG1_HS)}, // USB_OTG_HS_ULPI_D3 + {PB_11, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG1_HS)}, // USB_OTG_HS_ULPI_D4 + {PB_12, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG1_HS)}, // USB_OTG_HS_ULPI_D5 + {PB_13, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG1_HS)}, // USB_OTG_HS_ULPI_D6 + {PC_0, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG1_HS)}, // USB_OTG_HS_ULPI_STP + {PC_2_C, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG1_HS)}, // USB_OTG_HS_ULPI_DIR + {PC_3_C, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG1_HS)}, // USB_OTG_HS_ULPI_NXT +#endif /* USE_USB_HS_IN_FS */ + {NC, NP, 0} +}; +#endif + +//*** SD *** + +#ifdef HAL_SD_MODULE_ENABLED +WEAK const PinMap PinMap_SD[] = { + {PA_0, SDMMC2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_SDMMC2)}, // SDMMC2_CMD + {PB_3, SDMMC2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_SDMMC2)}, // SDMMC2_D2 + {PB_4, SDMMC2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_SDMMC2)}, // SDMMC2_D3 + {PB_8, SDMMC1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF7_SDMMC1)}, // SDMMC1_CKIN + {PB_8_ALT1, SDMMC1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDMMC1)}, // SDMMC1_D4 + {PB_8_ALT2, SDMMC2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_SDMMC2)}, // SDMMC2_D4 + {PB_9, SDMMC1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF7_SDMMC1)}, // SDMMC1_CDIR + {PB_9_ALT1, SDMMC1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDMMC1)}, // SDMMC1_D5 + {PB_9_ALT2, SDMMC2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_SDMMC2)}, // SDMMC2_D5 + {PB_13, SDMMC1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDMMC1)}, // SDMMC1_D0 + {PB_14, SDMMC2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_SDMMC2)}, // SDMMC2_D0 + {PB_15, SDMMC2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_SDMMC2)}, // SDMMC2_D1 + {PC_1, SDMMC2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_SDMMC2)}, // SDMMC2_CK + {PC_4, SDMMC2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF10_SDMMC2)}, // SDMMC2_CKIN + {PC_6, SDMMC1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF8_SDMMC1)}, // SDMMC1_D0DIR + {PC_6_ALT1, SDMMC1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDMMC1)}, // SDMMC1_D6 + {PC_6_ALT2, SDMMC2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_SDMMC2)}, // SDMMC2_D6 + {PC_7, SDMMC1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF8_SDMMC1)}, // SDMMC1_D123DIR + {PC_7_ALT1, SDMMC1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDMMC1)}, // SDMMC1_D7 + {PC_7_ALT2, SDMMC2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_SDMMC2)}, // SDMMC2_D7 + {PC_8, SDMMC1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDMMC1)}, // SDMMC1_D0 + {PC_9, SDMMC1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDMMC1)}, // SDMMC1_D1 + {PC_10, SDMMC1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDMMC1)}, // SDMMC1_D2 + {PC_11, SDMMC1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDMMC1)}, // SDMMC1_D3 + {PC_12, SDMMC1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF12_SDMMC1)}, // SDMMC1_CK + {PD_2, SDMMC1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF12_SDMMC1)}, // SDMMC1_CMD + {PD_6, SDMMC2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF11_SDMMC2)}, // SDMMC2_CK + {PD_7, SDMMC2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF11_SDMMC2)}, // SDMMC2_CMD + {NC, NP, 0} +}; +#endif + +#endif /* !CUSTOM_PERIPHERAL_PINS */ diff --git a/buildroot/share/PlatformIO/variants/MARLIN_H723Vx/PinNamesVar.h b/buildroot/share/PlatformIO/variants/MARLIN_H723Vx/PinNamesVar.h new file mode 100644 index 0000000000..3bd0ed8fcd --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_H723Vx/PinNamesVar.h @@ -0,0 +1,108 @@ +/* Dual pad pin name */ +PC_2_C = PC_2 | PDUAL, +PC_3_C = PC_3 | PDUAL, + +/* Alternate pin name */ +PA_0_ALT1 = PA_0 | ALT1, +PA_1_ALT1 = PA_1 | ALT1, +PA_1_ALT2 = PA_1 | ALT2, +PA_2_ALT1 = PA_2 | ALT1, +PA_2_ALT2 = PA_2 | ALT2, +PA_3_ALT1 = PA_3 | ALT1, +PA_3_ALT2 = PA_3 | ALT2, +PA_4_ALT1 = PA_4 | ALT1, +PA_4_ALT2 = PA_4 | ALT2, +PA_5_ALT1 = PA_5 | ALT1, +PA_6_ALT1 = PA_6 | ALT1, +PA_7_ALT1 = PA_7 | ALT1, +PA_7_ALT2 = PA_7 | ALT2, +PA_7_ALT3 = PA_7 | ALT3, +PA_8_ALT1 = PA_8 | ALT1, +PA_9_ALT1 = PA_9 | ALT1, +PA_10_ALT1 = PA_10 | ALT1, +PA_11_ALT1 = PA_11 | ALT1, +PA_12_ALT1 = PA_12 | ALT1, +PA_15_ALT1 = PA_15 | ALT1, +PA_15_ALT2 = PA_15 | ALT2, +PB_0_ALT1 = PB_0 | ALT1, +PB_0_ALT2 = PB_0 | ALT2, +PB_1_ALT1 = PB_1 | ALT1, +PB_1_ALT2 = PB_1 | ALT2, +PB_3_ALT1 = PB_3 | ALT1, +PB_3_ALT2 = PB_3 | ALT2, +PB_4_ALT1 = PB_4 | ALT1, +PB_4_ALT2 = PB_4 | ALT2, +PB_5_ALT1 = PB_5 | ALT1, +PB_5_ALT2 = PB_5 | ALT2, +PB_6_ALT1 = PB_6 | ALT1, +PB_6_ALT2 = PB_6 | ALT2, +PB_7_ALT1 = PB_7 | ALT1, +PB_8_ALT1 = PB_8 | ALT1, +PB_8_ALT2 = PB_8 | ALT2, +PB_9_ALT1 = PB_9 | ALT1, +PB_9_ALT2 = PB_9 | ALT2, +PB_14_ALT1 = PB_14 | ALT1, +PB_14_ALT2 = PB_14 | ALT2, +PB_15_ALT1 = PB_15 | ALT1, +PB_15_ALT2 = PB_15 | ALT2, +PC_0_ALT1 = PC_0 | ALT1, +PC_0_ALT2 = PC_0 | ALT2, +PC_1_ALT1 = PC_1 | ALT1, +PC_1_ALT2 = PC_1 | ALT2, +PC_4_ALT1 = PC_4 | ALT1, +PC_5_ALT1 = PC_5 | ALT1, +PC_6_ALT1 = PC_6 | ALT1, +PC_6_ALT2 = PC_6 | ALT2, +PC_7_ALT1 = PC_7 | ALT1, +PC_7_ALT2 = PC_7 | ALT2, +PC_8_ALT1 = PC_8 | ALT1, +PC_9_ALT1 = PC_9 | ALT1, +PC_10_ALT1 = PC_10 | ALT1, +PC_11_ALT1 = PC_11 | ALT1, + +/* SYS_WKUP */ +#ifdef PWR_WAKEUP_PIN1 + SYS_WKUP1 = PA_0, +#endif +#ifdef PWR_WAKEUP_PIN2 + SYS_WKUP2 = PA_2, +#endif +#ifdef PWR_WAKEUP_PIN3 + SYS_WKUP3 = NC, +#endif +#ifdef PWR_WAKEUP_PIN4 + SYS_WKUP4 = PC_13, +#endif +#ifdef PWR_WAKEUP_PIN5 + SYS_WKUP5 = NC, +#endif +#ifdef PWR_WAKEUP_PIN6 + SYS_WKUP6 = PC_1, +#endif +#ifdef PWR_WAKEUP_PIN7 + SYS_WKUP7 = NC, +#endif +#ifdef PWR_WAKEUP_PIN8 + SYS_WKUP8 = NC, +#endif + +/* USB */ +#ifdef USBCON + USB_OTG_HS_DM = PA_11, + USB_OTG_HS_DP = PA_12, + USB_OTG_HS_ID = PA_10, + USB_OTG_HS_SOF = PA_8, + USB_OTG_HS_ULPI_CK = PA_5, + USB_OTG_HS_ULPI_D0 = PA_3, + USB_OTG_HS_ULPI_D1 = PB_0, + USB_OTG_HS_ULPI_D2 = PB_1, + USB_OTG_HS_ULPI_D3 = PB_10, + USB_OTG_HS_ULPI_D4 = PB_11, + USB_OTG_HS_ULPI_D5 = PB_12, + USB_OTG_HS_ULPI_D6 = PB_13, + USB_OTG_HS_ULPI_D7 = PB_5, + USB_OTG_HS_ULPI_DIR = PC_2_C, + USB_OTG_HS_ULPI_NXT = PC_3_C, + USB_OTG_HS_ULPI_STP = PC_0, + USB_OTG_HS_VBUS = PA_9, +#endif diff --git a/buildroot/share/PlatformIO/variants/MARLIN_H723Vx/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_H723Vx/ldscript.ld new file mode 100644 index 0000000000..6322861033 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_H723Vx/ldscript.ld @@ -0,0 +1,174 @@ +/* +****************************************************************************** +** +** File : LinkerScript.ld +** +** Author : STM32CubeIDE +** +** Abstract : Linker script for STM32H7 series +** 512Kbytes FLASH and 560Kbytes RAM +** +** Set heap size, stack size and stack location according +** to application requirements. +** +** Set memory bank area and size if external memory is used. +** +** Target : STMicroelectronics STM32 +** +** Distribution: The file is distributed as is, without any warranty +** of any kind. +** +***************************************************************************** +** @attention +** +** Copyright (c) 2022 STMicroelectronics. +** All rights reserved. +** +** This software is licensed under terms that can be found in the LICENSE file +** in the root directory of this software component. +** If no LICENSE file comes with this software, it is provided AS-IS. +** +**************************************************************************** +*/ + +/* Entry Point */ +ENTRY(Reset_Handler) + +/* Highest address of the user mode stack */ +_estack = ORIGIN(RAM_D1) + LENGTH(RAM_D1); /* end of RAM */ +/* Generate a link error if heap and stack don't fit into RAM */ +_Min_Heap_Size = 0x200 ; /* required amount of heap */ +_Min_Stack_Size = 0x400 ; /* required amount of stack */ + +/* Specify the memory areas */ +MEMORY +{ + ITCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K + DTCMRAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K + FLASH (rx) : ORIGIN = 0x8000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET + RAM_D1 (xrw) : ORIGIN = 0x24000000, LENGTH = 320K + RAM_D2 (xrw) : ORIGIN = 0x30000000, LENGTH = 32K + RAM_D3 (xrw) : ORIGIN = 0x38000000, LENGTH = 16K +} + +/* Define output sections */ +SECTIONS +{ + /* The startup code goes first into FLASH */ + .isr_vector : + { + . = ALIGN(4); + KEEP(*(.isr_vector)) /* Startup code */ + . = ALIGN(4); + } >FLASH + + /* The program code and other data goes into FLASH */ + .text : + { + . = ALIGN(4); + *(.text) /* .text sections (code) */ + *(.text*) /* .text* sections (code) */ + *(.glue_7) /* glue arm to thumb code */ + *(.glue_7t) /* glue thumb to arm code */ + *(.eh_frame) + + KEEP (*(.init)) + KEEP (*(.fini)) + + . = ALIGN(4); + _etext = .; /* define a global symbols at end of code */ + } >FLASH + + /* Constant data goes into FLASH */ + .rodata : + { + . = ALIGN(4); + *(.rodata) /* .rodata sections (constants, strings, etc.) */ + *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ + . = ALIGN(4); + } >FLASH + + .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH + .ARM : { + __exidx_start = .; + *(.ARM.exidx*) + __exidx_end = .; + } >FLASH + + .preinit_array : + { + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP (*(.preinit_array*)) + PROVIDE_HIDDEN (__preinit_array_end = .); + } >FLASH + + .init_array : + { + PROVIDE_HIDDEN (__init_array_start = .); + KEEP (*(SORT(.init_array.*))) + KEEP (*(.init_array*)) + PROVIDE_HIDDEN (__init_array_end = .); + } >FLASH + + .fini_array : + { + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP (*(SORT(.fini_array.*))) + KEEP (*(.fini_array*)) + PROVIDE_HIDDEN (__fini_array_end = .); + } >FLASH + + /* used by the startup to initialize data */ + _sidata = LOADADDR(.data); + + /* Initialized data sections goes into RAM, load LMA copy after code */ + .data : + { + . = ALIGN(4); + _sdata = .; /* create a global symbol at data start */ + *(.data) /* .data sections */ + *(.data*) /* .data* sections */ + *(.RamFunc) /* .RamFunc sections */ + *(.RamFunc*) /* .RamFunc* sections */ + + . = ALIGN(4); + _edata = .; /* define a global symbol at data end */ + } >RAM_D1 AT> FLASH + + /* Uninitialized data section */ + . = ALIGN(4); + .bss : + { + /* This is used by the startup in order to initialize the .bss section */ + _sbss = .; /* define a global symbol at bss start */ + __bss_start__ = _sbss; + *(.bss) + *(.bss*) + *(COMMON) + + . = ALIGN(4); + _ebss = .; /* define a global symbol at bss end */ + __bss_end__ = _ebss; + } >RAM_D1 + + /* User_heap_stack section, used to check that there is enough RAM left */ + ._user_heap_stack : + { + . = ALIGN(8); + PROVIDE ( end = . ); + PROVIDE ( _end = . ); + . = . + _Min_Heap_Size; + . = . + _Min_Stack_Size; + . = ALIGN(8); + } >RAM_D1 + + /* Remove information from the standard libraries */ + /DISCARD/ : + { + libc.a ( * ) + libm.a ( * ) + libgcc.a ( * ) + } + + .ARM.attributes 0 : { *(.ARM.attributes) } +} diff --git a/buildroot/share/PlatformIO/variants/MARLIN_H723Vx/variant_MARLIN_STM32H723VX.cpp b/buildroot/share/PlatformIO/variants/MARLIN_H723Vx/variant_MARLIN_STM32H723VX.cpp new file mode 100644 index 0000000000..bfeb0f9abc --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_H723Vx/variant_MARLIN_STM32H723VX.cpp @@ -0,0 +1,273 @@ +/* + ******************************************************************************* + * Copyright (c) 2020-2021, STMicroelectronics + * All rights reserved. + * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ******************************************************************************* + */ +#ifdef STM32H723xx +#include "pins_arduino.h" + +// Digital PinName array +const PinName digitalPin[] = { + PA_0, // D0/A0 + PA_1, // D1/A1 + PA_2, // D2/A2 + PA_3, // D3/A3 + PA_4, // D4/A4 + PA_5, // D5/A5 + PA_6, // D6/A6 + PA_7, // D7/A7 + PA_8, // D8 + PA_9, // D9 + PA_10, // D10 + PA_11, // D11 + PA_12, // D12 + PA_13, // D13 + PA_14, // D14 + PA_15, // D15 + PB_0, // D16/A8 + PB_1, // D17/A9 + PB_2, // D18 + PB_3, // D19 + PB_4, // D20 + PB_5, // D21 + PB_6, // D22 + PB_7, // D23 + PB_8, // D24 + PB_9, // D25 + PB_10, // D26 + PB_11, // D27 + PB_12, // D28 + PB_13, // D29 + PB_14, // D30 + PB_15, // D31 + PC_0, // D32/A10 + PC_1, // D33/A11 + PC_4, // D34/A12 + PC_5, // D35/A13 + PC_6, // D36 + PC_7, // D37 + PC_8, // D38 + PC_9, // D39 + PC_10, // D40 + PC_11, // D41 + PC_12, // D42 + PC_13, // D43 + PC_14, // D44 + PC_15, // D45 + PD_0, // D46 + PD_1, // D47 + PD_2, // D48 + PD_3, // D49 + PD_4, // D50 + PD_5, // D51 + PD_6, // D52 + PD_7, // D53 + PD_8, // D54 + PD_9, // D55 + PD_10, // D56 + PD_11, // D57 + PD_12, // D58 + PD_13, // D59 + PD_14, // D60 + PD_15, // D61 + PE_0, // D62 + PE_1, // D63 + PE_2, // D64 + PE_3, // D65 + PE_4, // D66 + PE_5, // D67 + PE_6, // D68 + PE_7, // D69 + PE_8, // D70 + PE_9, // D71 + PE_10, // D72 + PE_11, // D73 + PE_12, // D74 + PE_13, // D75 + PE_14, // D76 + PE_15, // D77 + PH_0, // D78 + PH_1, // D79 + PC_2_C, // D80/A14 + PC_3_C // D81/A15 +}; + +// Analog (Ax) pin number array +const uint32_t analogInputPin[] = { + 0, // A0, PA0 + 1, // A1, PA1 + 2, // A2, PA2 + 3, // A3, PA3 + 4, // A4, PA4 + 5, // A5, PA5 + 6, // A6, PA6 + 7, // A7, PA7 + 16, // A8, PB0 + 17, // A9, PB1 + 32, // A10, PC0 + 33, // A11, PC1 + 34, // A12, PC4 + 35, // A13, PC5 + 80, // A14, PC2_C + 81 // A15, PC3_C +}; + +void MPU_Config(void) +{ + MPU_Region_InitTypeDef MPU_InitStruct = {0}; + + /* Disables the MPU */ + HAL_MPU_Disable(); + + /** Initializes and configures the Region and the memory to be protected + */ + MPU_InitStruct.Enable = MPU_REGION_ENABLE; + MPU_InitStruct.Number = MPU_REGION_NUMBER0; + MPU_InitStruct.BaseAddress = 0x0; + MPU_InitStruct.Size = MPU_REGION_SIZE_4GB; + MPU_InitStruct.SubRegionDisable = 0x87; + MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0; + MPU_InitStruct.AccessPermission = MPU_REGION_NO_ACCESS; + MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_DISABLE; + MPU_InitStruct.IsShareable = MPU_ACCESS_SHAREABLE; + MPU_InitStruct.IsCacheable = MPU_ACCESS_NOT_CACHEABLE; + MPU_InitStruct.IsBufferable = MPU_ACCESS_NOT_BUFFERABLE; + + HAL_MPU_ConfigRegion(&MPU_InitStruct); + /* Enables the MPU */ + HAL_MPU_Enable(MPU_PRIVILEGED_DEFAULT); + +} + +/* + * @brief System Clock Configuration + * @param None + * @retval None + */ +WEAK void SystemClock_Config(void) +{ + RCC_OscInitTypeDef RCC_OscInitStruct = {0}; + RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; + RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {}; + + MPU_Config(); + + /** Supply configuration update enable + */ + HAL_PWREx_ConfigSupply(PWR_LDO_SUPPLY); + /** Configure the main internal regulator output voltage + */ + __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE0); + + while(!__HAL_PWR_GET_FLAG(PWR_FLAG_VOSRDY)) {} + /** Initializes the RCC Oscillators according to the specified parameters + * in the RCC_OscInitTypeDef structure. + */ + RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI48 | RCC_OSCILLATORTYPE_HSE; + RCC_OscInitStruct.HSEState = RCC_HSE_ON; + RCC_OscInitStruct.HSI48State = RCC_HSI48_ON; // 48Mhz for USB + RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; + RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE; + RCC_OscInitStruct.PLL.PLLM = 5; // 25Mhz / 5 = 5Mhz + RCC_OscInitStruct.PLL.PLLN = 110; // 25Mhz / 5 * 110 = 550Mhz + RCC_OscInitStruct.PLL.PLLP = 1; // 550Mhz / 1 = 550Mhz + RCC_OscInitStruct.PLL.PLLQ = 10; // 550Mhz / 10 = 55Mhz + RCC_OscInitStruct.PLL.PLLR = 10; // unused + RCC_OscInitStruct.PLL.PLLRGE = RCC_PLL1VCIRANGE_2; + RCC_OscInitStruct.PLL.PLLVCOSEL = RCC_PLL1VCOWIDE; + RCC_OscInitStruct.PLL.PLLFRACN = 0; + if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) + { + Error_Handler(); + } + /** Initializes the CPU, AHB and APB buses clocks + */ + RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK + |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2 + |RCC_CLOCKTYPE_D3PCLK1|RCC_CLOCKTYPE_D1PCLK1; + RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; + RCC_ClkInitStruct.SYSCLKDivider = RCC_SYSCLK_DIV1; + RCC_ClkInitStruct.AHBCLKDivider = RCC_HCLK_DIV2; + RCC_ClkInitStruct.APB3CLKDivider = RCC_APB3_DIV2; + RCC_ClkInitStruct.APB1CLKDivider = RCC_APB1_DIV2; + RCC_ClkInitStruct.APB2CLKDivider = RCC_APB2_DIV2; + RCC_ClkInitStruct.APB4CLKDivider = RCC_APB4_DIV2; + + if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_4) != HAL_OK) + { + Error_Handler(); + } + + PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_USB + | RCC_PERIPHCLK_SDMMC | RCC_PERIPHCLK_ADC + | RCC_PERIPHCLK_LPUART1 | RCC_PERIPHCLK_USART16 + | RCC_PERIPHCLK_USART234578 | RCC_PERIPHCLK_I2C123 + | RCC_PERIPHCLK_I2C4 | RCC_PERIPHCLK_SPI123 + | RCC_PERIPHCLK_SPI45 | RCC_PERIPHCLK_SPI6; + + /* HSI48 used for USB 48 Mhz */ + /* PLL1 qclk also used for FMC, SDMMC, RNG, SAI */ + /* PLL2 pclk is needed for adc max 80 Mhz (p,q,r same) */ + /* PLL2 pclk also used for LP timers 2,3,4,5, SPI 1,2,3 */ + /* PLL2 qclk is needed for uart, can, spi4,5,6 80 Mhz */ + /* PLL3 r clk is needed for i2c 80 Mhz (p,q,r same) */ + PeriphClkInitStruct.PLL2.PLL2M = 15; // M DIV 15 vco 25 / 15 ~ 1.667 Mhz + PeriphClkInitStruct.PLL2.PLL2N = 96; // N MUL 96 + PeriphClkInitStruct.PLL2.PLL2P = 2; // P div 2 + PeriphClkInitStruct.PLL2.PLL2Q = 2; // Q div 2 + PeriphClkInitStruct.PLL2.PLL2R = 2; // R div 2 + // RCC_PLL1VCIRANGE_0 Clock range frequency between 1 and 2 MHz + PeriphClkInitStruct.PLL2.PLL2RGE = RCC_PLL2VCIRANGE_0; + PeriphClkInitStruct.PLL2.PLL2VCOSEL = RCC_PLL2VCOMEDIUM; + PeriphClkInitStruct.PLL2.PLL2FRACN = 0; + PeriphClkInitStruct.PLL3.PLL3M = 15; // M DIV 15 vco 25 / 15 ~ 1.667 Mhz + PeriphClkInitStruct.PLL3.PLL3N = 96; // N MUL 96 + PeriphClkInitStruct.PLL3.PLL3P = 2; // P div 2 + PeriphClkInitStruct.PLL3.PLL3Q = 2; // Q div 2 + PeriphClkInitStruct.PLL3.PLL3R = 2; // R div 2 + // RCC_PLL1VCIRANGE_0 Clock range frequency between 1 and 2 MHz + PeriphClkInitStruct.PLL3.PLL3RGE = RCC_PLL3VCIRANGE_0; + PeriphClkInitStruct.PLL3.PLL3VCOSEL = RCC_PLL3VCOMEDIUM; + PeriphClkInitStruct.PLL3.PLL3FRACN = 0; + // ADC from PLL2 pclk + PeriphClkInitStruct.AdcClockSelection = RCC_ADCCLKSOURCE_PLL2; + // USB from HSI48 + PeriphClkInitStruct.UsbClockSelection = RCC_USBCLKSOURCE_HSI48; + // SDMMC from PLL1 qclk + PeriphClkInitStruct.SdmmcClockSelection = 0; + //PeriphClkInitStruct.SdmmcClockSelection = RCC_SDMMCCLKSOURCE_PLL; + // LPUART from PLL2 qclk + PeriphClkInitStruct.Lpuart1ClockSelection = 0; + //PeriphClkInitStruct.Lpuart1ClockSelection = RCC_LPUART1CLKSOURCE_PLL2; + // USART from PLL2 qclk + PeriphClkInitStruct.Usart16ClockSelection = RCC_USART16CLKSOURCE_PLL2; + // USART from PLL2 qclk + PeriphClkInitStruct.Usart234578ClockSelection = 0; + //PeriphClkInitStruct.Usart234578ClockSelection = RCC_USART234578CLKSOURCE_PLL2; + // I2C123 from PLL3 rclk + PeriphClkInitStruct.I2c123ClockSelection = RCC_I2C123CLKSOURCE_PLL3; + // I2C4 from PLL3 rclk + PeriphClkInitStruct.I2c4ClockSelection = 0; + //PeriphClkInitStruct.I2c4ClockSelection = RCC_I2C4CLKSOURCE_PLL3; + // SPI123 from PLL2 pclk + PeriphClkInitStruct.Spi123ClockSelection = RCC_SPI123CLKSOURCE_PLL2; + // SPI45 from PLL2 qclk + PeriphClkInitStruct.Spi45ClockSelection = 0; + //PeriphClkInitStruct.Spi45ClockSelection = RCC_SPI45CLKSOURCE_PLL2; + // SPI6 from PLL2 qclk + PeriphClkInitStruct.Spi6ClockSelection = 0; + //PeriphClkInitStruct.Spi6ClockSelection = RCC_SPI6CLKSOURCE_PLL2; + + if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) { + Error_Handler(); + } +} + +#endif /* ARDUINO_GENERIC_* */ diff --git a/buildroot/share/PlatformIO/variants/MARLIN_H723Vx/variant_MARLIN_STM32H723VX.h b/buildroot/share/PlatformIO/variants/MARLIN_H723Vx/variant_MARLIN_STM32H723VX.h new file mode 100644 index 0000000000..8b67905680 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_H723Vx/variant_MARLIN_STM32H723VX.h @@ -0,0 +1,269 @@ +/* + ******************************************************************************* + * Copyright (c) 2020, STMicroelectronics + * All rights reserved. + * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ******************************************************************************* + */ +#pragma once + +/*---------------------------------------------------------------------------- + * STM32 pins number + *----------------------------------------------------------------------------*/ +#define PA0 PIN_A0 +#define PA1 PIN_A1 +#define PA2 PIN_A2 +#define PA3 PIN_A3 +#define PA4 PIN_A4 +#define PA5 PIN_A5 +#define PA6 PIN_A6 +#define PA7 PIN_A7 +#define PA8 8 +#define PA9 9 +#define PA10 10 +#define PA11 11 +#define PA12 12 +#define PA13 13 +#define PA14 14 +#define PA15 15 +#define PB0 PIN_A8 +#define PB1 PIN_A9 +#define PB2 18 +#define PB3 19 +#define PB4 20 +#define PB5 21 +#define PB6 22 +#define PB7 23 +#define PB8 24 +#define PB9 25 +#define PB10 26 +#define PB11 27 +#define PB12 28 +#define PB13 29 +#define PB14 30 +#define PB15 31 +#define PC0 PIN_A10 +#define PC1 PIN_A11 +#define PC4 PIN_A12 +#define PC5 PIN_A13 +#define PC6 36 +#define PC7 37 +#define PC8 38 +#define PC9 39 +#define PC10 40 +#define PC11 41 +#define PC12 42 +#define PC13 43 +#define PC14 44 +#define PC15 45 +#define PD0 46 +#define PD1 47 +#define PD2 48 +#define PD3 49 +#define PD4 50 +#define PD5 51 +#define PD6 52 +#define PD7 53 +#define PD8 54 +#define PD9 55 +#define PD10 56 +#define PD11 57 +#define PD12 58 +#define PD13 59 +#define PD14 60 +#define PD15 61 +#define PE0 62 +#define PE1 63 +#define PE2 64 +#define PE3 65 +#define PE4 66 +#define PE5 67 +#define PE6 68 +#define PE7 69 +#define PE8 70 +#define PE9 71 +#define PE10 72 +#define PE11 73 +#define PE12 74 +#define PE13 75 +#define PE14 76 +#define PE15 77 +#define PH0 78 +#define PH1 79 +#define PC2_C PIN_A14 +#define PC3_C PIN_A15 +#define PC2 PC2_C +#define PC3 PC3_C + +// Alternate pins number +#define PA0_ALT1 (PA0 | ALT1) +#define PA1_ALT1 (PA1 | ALT1) +#define PA1_ALT2 (PA1 | ALT2) +#define PA2_ALT1 (PA2 | ALT1) +#define PA2_ALT2 (PA2 | ALT2) +#define PA3_ALT1 (PA3 | ALT1) +#define PA3_ALT2 (PA3 | ALT2) +#define PA4_ALT1 (PA4 | ALT1) +#define PA4_ALT2 (PA4 | ALT2) +#define PA5_ALT1 (PA5 | ALT1) +#define PA6_ALT1 (PA6 | ALT1) +#define PA7_ALT1 (PA7 | ALT1) +#define PA7_ALT2 (PA7 | ALT2) +#define PA7_ALT3 (PA7 | ALT3) +#define PA8_ALT1 (PA8 | ALT1) +#define PA9_ALT1 (PA9 | ALT1) +#define PA10_ALT1 (PA10 | ALT1) +#define PA11_ALT1 (PA11 | ALT1) +#define PA12_ALT1 (PA12 | ALT1) +#define PA15_ALT1 (PA15 | ALT1) +#define PA15_ALT2 (PA15 | ALT2) +#define PB0_ALT1 (PB0 | ALT1) +#define PB0_ALT2 (PB0 | ALT2) +#define PB1_ALT1 (PB1 | ALT1) +#define PB1_ALT2 (PB1 | ALT2) +#define PB3_ALT1 (PB3 | ALT1) +#define PB3_ALT2 (PB3 | ALT2) +#define PB4_ALT1 (PB4 | ALT1) +#define PB4_ALT2 (PB4 | ALT2) +#define PB5_ALT1 (PB5 | ALT1) +#define PB5_ALT2 (PB5 | ALT2) +#define PB6_ALT1 (PB6 | ALT1) +#define PB6_ALT2 (PB6 | ALT2) +#define PB7_ALT1 (PB7 | ALT1) +#define PB8_ALT1 (PB8 | ALT1) +#define PB8_ALT2 (PB8 | ALT2) +#define PB9_ALT1 (PB9 | ALT1) +#define PB9_ALT2 (PB9 | ALT2) +#define PB14_ALT1 (PB14 | ALT1) +#define PB14_ALT2 (PB14 | ALT2) +#define PB15_ALT1 (PB15 | ALT1) +#define PB15_ALT2 (PB15 | ALT2) +#define PC0_ALT1 (PC0 | ALT1) +#define PC0_ALT2 (PC0 | ALT2) +#define PC1_ALT1 (PC1 | ALT1) +#define PC1_ALT2 (PC1 | ALT2) +#define PC4_ALT1 (PC4 | ALT1) +#define PC5_ALT1 (PC5 | ALT1) +#define PC6_ALT1 (PC6 | ALT1) +#define PC6_ALT2 (PC6 | ALT2) +#define PC7_ALT1 (PC7 | ALT1) +#define PC7_ALT2 (PC7 | ALT2) +#define PC8_ALT1 (PC8 | ALT1) +#define PC9_ALT1 (PC9 | ALT1) +#define PC10_ALT1 (PC10 | ALT1) +#define PC11_ALT1 (PC11 | ALT1) + +#define NUM_DIGITAL_PINS 82 +#define NUM_DUALPAD_PINS 2 +#define NUM_ANALOG_INPUTS 16 + +// On-board LED pin number +#ifndef LED_BUILTIN + #define LED_BUILTIN PNUM_NOT_DEFINED +#endif + +// On-board user button +#ifndef USER_BTN + #define USER_BTN PNUM_NOT_DEFINED +#endif + +// SPI definitions +#ifndef PIN_SPI_SS + #define PIN_SPI_SS PA4 +#endif +#ifndef PIN_SPI_SS1 + #define PIN_SPI_SS1 PA15 +#endif +#ifndef PIN_SPI_SS2 + #define PIN_SPI_SS2 PNUM_NOT_DEFINED +#endif +#ifndef PIN_SPI_SS3 + #define PIN_SPI_SS3 PNUM_NOT_DEFINED +#endif +#ifndef PIN_SPI_MOSI + #define PIN_SPI_MOSI PA7 +#endif +#ifndef PIN_SPI_MISO + #define PIN_SPI_MISO PA6 +#endif +#ifndef PIN_SPI_SCK + #define PIN_SPI_SCK PA5 +#endif + +// I2C definitions +#ifndef PIN_WIRE_SDA + #define PIN_WIRE_SDA PB7 +#endif +#ifndef PIN_WIRE_SCL + #define PIN_WIRE_SCL PB6 +#endif + +// Timer Definitions +// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin +#ifndef TIMER_TONE + #define TIMER_TONE TIM6 +#endif +#ifndef TIMER_SERVO + #define TIMER_SERVO TIM7 +#endif + +// UART Definitions +#ifndef SERIAL_UART_INSTANCE + #define SERIAL_UART_INSTANCE 4 +#endif + +// Default pin used for generic 'Serial' instance +// Mandatory for Firmata +#ifndef PIN_SERIAL_RX + #define PIN_SERIAL_RX PA1 +#endif +#ifndef PIN_SERIAL_TX + #define PIN_SERIAL_TX PA0 +#endif + +// Extra HAL modules +#if !defined(HAL_DAC_MODULE_DISABLED) + #define HAL_DAC_MODULE_ENABLED +#endif +#if !defined(HAL_ETH_MODULE_DISABLED) + #define HAL_ETH_MODULE_ENABLED +#endif +#if !defined(HAL_OSPI_MODULE_DISABLED) + #define HAL_OSPI_MODULE_ENABLED +#endif +#if !defined(HAL_SD_MODULE_DISABLED) + #define HAL_SD_MODULE_ENABLED +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#ifdef __cplusplus + // These serial port names are intended to allow libraries and architecture-neutral + // sketches to automatically default to the correct port name for a particular type + // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, + // the first hardware serial port whose RX/TX pins are not dedicated to another use. + // + // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor + // + // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial + // + // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library + // + // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. + // + // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX + // pins are NOT connected to anything by default. + #ifndef SERIAL_PORT_MONITOR + #define SERIAL_PORT_MONITOR Serial + #endif + #ifndef SERIAL_PORT_HARDWARE + #define SERIAL_PORT_HARDWARE Serial + #endif +#endif diff --git a/buildroot/share/PlatformIO/variants/MARLIN_H723Zx/PeripheralPins.c b/buildroot/share/PlatformIO/variants/MARLIN_H723Zx/PeripheralPins.c new file mode 100644 index 0000000000..70048173e7 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_H723Zx/PeripheralPins.c @@ -0,0 +1,688 @@ +/* + ******************************************************************************* + * Copyright (c) 2020-2021, STMicroelectronics + * All rights reserved. + * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ******************************************************************************* + */ +/* + * Automatically generated from STM32H723ZETx.xml, STM32H723ZGTx.xml + * STM32H733ZGTx.xml + * CubeMX DB release 6.0.30 + */ +#if !defined(CUSTOM_PERIPHERAL_PINS) +#include "Arduino.h" +#include "PeripheralPins.h" + +/* ===== + * Notes: + * - The pins mentioned Px_y_ALTz are alternative possibilities which use other + * HW peripheral instances. You can use them the same way as any other "normal" + * pin (i.e. analogWrite(PA7_ALT1, 128);). + * + * - Commented lines are alternative possibilities which are not used per default. + * If you change them, you will have to know what you do + * ===== + */ + +//*** ADC *** + +#ifdef HAL_ADC_MODULE_ENABLED +WEAK const PinMap PinMap_ADC[] = { + {PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 16, 0)}, // ADC1_INP16 + {PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 17, 0)}, // ADC1_INP17 + {PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC1_INP14 + {PA_2_ALT1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC2_INP14 + {PA_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC1_INP15 + {PA_3_ALT1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC2_INP15 + {PA_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 18, 0)}, // ADC1_INP18 + {PA_4_ALT1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 18, 0)}, // ADC2_INP18 + {PA_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 19, 0)}, // ADC1_INP19 + {PA_5_ALT1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 19, 0)}, // ADC2_INP19 + {PA_6, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC1_INP3 + {PA_6_ALT1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC2_INP3 + {PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC1_INP7 + {PA_7_ALT1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC2_INP7 + {PB_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC1_INP9 + {PB_0_ALT1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC2_INP9 + {PB_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC1_INP5 + {PB_1_ALT1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC2_INP5 + {PC_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC1_INP10 + {PC_0_ALT1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC2_INP10 + {PC_0_ALT2, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC3_INP10 + {PC_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC1_INP11 + {PC_1_ALT1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC2_INP11 + {PC_1_ALT2, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC3_INP11 + {PC_2_C, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC3_INP0 + {PC_3_C, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC3_INP1 + {PC_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC1_INP4 + {PC_4_ALT1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC2_INP4 + {PC_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC1_INP8 + {PC_5_ALT1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC2_INP8 + {PF_3, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC3_INP5 + {PF_4, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC3_INP9 + {PF_5, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC3_INP4 + {PF_6, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC3_INP8 + {PF_7, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC3_INP3 + {PF_8, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC3_INP7 + {PF_9, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC3_INP2 + {PF_10, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC3_INP6 + {PF_11, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC1_INP2 + {PF_12, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC1_INP6 + {PF_13, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC2_INP2 + {PF_14, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC2_INP6 + {NC, NP, 0} +}; +#endif + +//*** DAC *** + +#ifdef HAL_DAC_MODULE_ENABLED +WEAK const PinMap PinMap_DAC[] = { + {PA_4, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // DAC1_OUT1 + {PA_5, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // DAC1_OUT2 + {NC, NP, 0} +}; +#endif + +//*** I2C *** + +#ifdef HAL_I2C_MODULE_ENABLED +WEAK const PinMap PinMap_I2C_SDA[] = { + {PB_7, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, + {PB_7_ALT1, I2C4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF6_I2C4)}, + {PB_9, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, + {PB_9_ALT1, I2C4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF6_I2C4)}, + {PB_11, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, + {PC_9, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, + {PC_9_ALT1, I2C5, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF6_I2C5)}, + {PC_10, I2C5, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C5)}, + {PD_13, I2C4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C4)}, + {PF_0, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, + {PF_0_ALT1, I2C5, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF6_I2C5)}, + {PF_15, I2C4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C4)}, + {NC, NP, 0} +}; +#endif + +#ifdef HAL_I2C_MODULE_ENABLED +WEAK const PinMap PinMap_I2C_SCL[] = { + {PA_8, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, + {PA_8_ALT1, I2C5, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF6_I2C5)}, + {PB_6, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, + {PB_6_ALT1, I2C4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF6_I2C4)}, + {PB_8, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, + {PB_8_ALT1, I2C4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF6_I2C4)}, + {PB_10, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, + {PC_11, I2C5, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C5)}, + {PD_12, I2C4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C4)}, + {PF_1, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, + {PF_1_ALT1, I2C5, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF6_I2C5)}, + {PF_14, I2C4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C4)}, + {NC, NP, 0} +}; +#endif + +//*** TIM *** + +#ifdef HAL_TIM_MODULE_ENABLED +WEAK const PinMap PinMap_TIM[] = { + {PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 + {PA_0_ALT1, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 1, 0)}, // TIM5_CH1 + {PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 + {PA_1_ALT1, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 2, 0)}, // TIM5_CH2 + {PA_1_ALT2, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM15, 1, 1)}, // TIM15_CH1N + {PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 + {PA_2_ALT1, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 3, 0)}, // TIM5_CH3 + {PA_2_ALT2, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM15, 1, 0)}, // TIM15_CH1 + {PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4 + {PA_3_ALT1, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 4, 0)}, // TIM5_CH4 + {PA_3_ALT2, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM15, 2, 0)}, // TIM15_CH2 + {PA_5, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 + {PA_5_ALT1, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 1)}, // TIM8_CH1N + {PA_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 + {PA_6_ALT1, TIM13, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM13, 1, 0)}, // TIM13_CH1 + {PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N + {PA_7_ALT1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 + {PA_7_ALT2, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 1)}, // TIM8_CH1N + {PA_7_ALT3, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM14, 1, 0)}, // TIM14_CH1 + {PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1 + {PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 0)}, // TIM1_CH2 + {PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3 + {PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 4, 0)}, // TIM1_CH4 + {PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 + {PB_0, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N + {PB_0_ALT1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 3, 0)}, // TIM3_CH3 + {PB_0_ALT2, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 1)}, // TIM8_CH2N + {PB_1, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N + {PB_1_ALT1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 4, 0)}, // TIM3_CH4 + {PB_1_ALT2, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 1)}, // TIM8_CH3N + {PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 + {PB_4, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 + {PB_5, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 + {PB_6, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 1, 0)}, // TIM4_CH1 + {PB_6_ALT1, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM16, 1, 1)}, // TIM16_CH1N + {PB_7, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 2, 0)}, // TIM4_CH2 + {PB_7_ALT1, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM17, 1, 1)}, // TIM17_CH1N + {PB_8, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 3, 0)}, // TIM4_CH3 + {PB_8_ALT1, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM16, 1, 0)}, // TIM16_CH1 + {PB_9, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4 + {PB_9_ALT1, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM17, 1, 0)}, // TIM17_CH1 + {PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 + {PB_11, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4 + {PB_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N + {PB_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N + {PB_14_ALT1, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 1)}, // TIM8_CH2N + {PB_14_ALT2, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM12, 1, 0)}, // TIM12_CH1 + {PB_15, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N + {PB_15_ALT1, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 1)}, // TIM8_CH3N + {PB_15_ALT2, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM12, 2, 0)}, // TIM12_CH2 + {PC_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 + {PC_6_ALT1, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 0)}, // TIM8_CH1 + {PC_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 + {PC_7_ALT1, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 0)}, // TIM8_CH2 + {PC_8, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 3, 0)}, // TIM3_CH3 + {PC_8_ALT1, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 0)}, // TIM8_CH3 + {PC_9, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 4, 0)}, // TIM3_CH4 + {PC_9_ALT1, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 4, 0)}, // TIM8_CH4 + {PC_12, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM15, 1, 0)}, // TIM15_CH1 + {PD_12, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 1, 0)}, // TIM4_CH1 + {PD_13, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 2, 0)}, // TIM4_CH2 + {PD_14, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 3, 0)}, // TIM4_CH3 + {PD_15, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4 + {PE_4, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM15, 1, 1)}, // TIM15_CH1N + {PE_5, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM15, 1, 0)}, // TIM15_CH1 + {PE_6, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM15, 2, 0)}, // TIM15_CH2 + {PE_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N + {PE_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1 + {PE_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N + {PE_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 0)}, // TIM1_CH2 + {PE_12, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N + {PE_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3 + {PE_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 4, 0)}, // TIM1_CH4 + {PF_0, TIM23, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF13_TIM23, 1, 0)}, // TIM23_CH1 + {PF_1, TIM23, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF13_TIM23, 2, 0)}, // TIM23_CH2 + {PF_2, TIM23, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF13_TIM23, 3, 0)}, // TIM23_CH3 + {PF_3, TIM23, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF13_TIM23, 4, 0)}, // TIM23_CH4 + {PF_6, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM16, 1, 0)}, // TIM16_CH1 + {PF_6_ALT1, TIM23, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF13_TIM23, 1, 0)}, // TIM23_CH1 + {PF_7, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM17, 1, 0)}, // TIM17_CH1 + {PF_7_ALT1, TIM23, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF13_TIM23, 2, 0)}, // TIM23_CH2 + {PF_8, TIM13, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM13, 1, 0)}, // TIM13_CH1 + {PF_8_ALT1, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM16, 1, 1)}, // TIM16_CH1N + {PF_8_ALT2, TIM23, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF13_TIM23, 3, 0)}, // TIM23_CH3 + {PF_9, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM14, 1, 0)}, // TIM14_CH1 + {PF_9_ALT1, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM17, 1, 1)}, // TIM17_CH1N + {PF_9_ALT2, TIM23, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF13_TIM23, 4, 0)}, // TIM23_CH4 + {PF_11, TIM24, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_TIM24, 1, 0)}, // TIM24_CH1 + {PF_12, TIM24, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_TIM24, 2, 0)}, // TIM24_CH2 + {PF_13, TIM24, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_TIM24, 3, 0)}, // TIM24_CH3 + {PF_14, TIM24, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_TIM24, 4, 0)}, // TIM24_CH4 + {PG_12, TIM23, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF13_TIM23, 1, 0)}, // TIM23_CH1 + {PG_13, TIM23, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF13_TIM23, 2, 0)}, // TIM23_CH2 + {PG_14, TIM23, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF13_TIM23, 3, 0)}, // TIM23_CH3 + {NC, NP, 0} +}; +#endif + +//*** UART *** + +#ifdef HAL_UART_MODULE_ENABLED +WEAK const PinMap PinMap_UART_TX[] = { + {PA_0, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + {PA_2, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + {PA_9, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_LPUART)}, + {PA_9_ALT1, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + {PA_12, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_UART4)}, + {PA_15, UART7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_UART7)}, + {PB_4, UART7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_UART7)}, + {PB_6, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART)}, + {PB_6_ALT1, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_UART5)}, + {PB_6_ALT2, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + {PB_9, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + {PB_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + {PB_13, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_UART5)}, + {PB_14, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART1)}, + {PC_6, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART6)}, + {PC_10, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + {PC_10_ALT1, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + {PC_12, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)}, + {PD_1, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + {PD_5, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + {PD_8, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + {PD_15, UART9, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_UART9)}, + {PE_1, UART8, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART8)}, + {PE_3, USART10, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_USART10)}, + {PE_8, UART7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_UART7)}, + {PF_7, UART7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_UART7)}, + {PG_1, UART9, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_UART9)}, + {PG_12, USART10, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART10)}, + {PG_14, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART6)}, + {NC, NP, 0} +}; +#endif + +#ifdef HAL_UART_MODULE_ENABLED +WEAK const PinMap PinMap_UART_RX[] = { + {PA_1, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + {PA_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + {PA_8, UART7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_UART7)}, + {PA_10, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_LPUART)}, + {PA_10_ALT1, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + {PA_11, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_UART4)}, + {PB_3, UART7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_UART7)}, + {PB_5, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_UART5)}, + {PB_7, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART)}, + {PB_7_ALT1, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + {PB_8, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + {PB_11, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + {PB_12, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_UART5)}, + {PB_15, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART1)}, + {PC_7, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART6)}, + {PC_11, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + {PC_11_ALT1, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + {PD_0, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + {PD_2, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)}, + {PD_6, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + {PD_9, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + {PD_14, UART9, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_UART9)}, + {PE_0, UART8, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART8)}, + {PE_2, USART10, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART10)}, + {PE_7, UART7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_UART7)}, + {PF_6, UART7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_UART7)}, + {PG_0, UART9, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_UART9)}, + {PG_9, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART6)}, + {PG_11, USART10, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART10)}, + {NC, NP, 0} +}; +#endif + +#ifdef HAL_UART_MODULE_ENABLED +WEAK const PinMap PinMap_UART_RTS[] = { + {PA_1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + {PA_12, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_LPUART)}, + {PA_12_ALT1, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + {PA_15, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + {PB_14, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + {PB_14_ALT1, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + {PC_8, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)}, + {PD_4, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + {PD_12, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + {PD_13, UART9, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_UART9)}, + {PD_15, UART8, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART8)}, + {PE_9, UART7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_UART7)}, + {PF_8, UART7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_UART7)}, + {PG_8, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART6)}, + {PG_12, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART6)}, + {PG_14, USART10, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART10)}, + {NC, NP, 0} +}; +#endif + +#ifdef HAL_UART_MODULE_ENABLED +WEAK const PinMap PinMap_UART_CTS[] = { + {PA_0, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + {PA_11, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_LPUART)}, + {PA_11_ALT1, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + {PB_0, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + {PB_13, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + {PB_15, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + {PC_9, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)}, + {PD_0, UART9, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_UART9)}, + {PD_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + {PD_11, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + {PD_14, UART8, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART8)}, + {PE_10, UART7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_UART7)}, + {PF_9, UART7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_UART7)}, + {PG_13, USART10, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART10)}, + {PG_13_ALT1, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART6)}, + {PG_15, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART6)}, + {NC, NP, 0} +}; +#endif + +//*** SPI *** + +#ifdef HAL_SPI_MODULE_ENABLED +WEAK const PinMap PinMap_SPI_MOSI[] = { + {PA_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + {PA_7_ALT1, SPI6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_SPI6)}, + {PB_2, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_SPI3)}, + {PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + {PB_5_ALT1, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_SPI3)}, + {PB_5_ALT2, SPI6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_SPI6)}, + {PB_15, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + {PC_1, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + {PC_3_C, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + {PC_12, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + {PD_6, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI3)}, + {PD_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + {PE_6, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, + {PE_14, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, + {PF_9, SPI5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI5)}, + {PF_11, SPI5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI5)}, + {PG_14, SPI6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI6)}, + {NC, NP, 0} +}; +#endif + +#ifdef HAL_SPI_MODULE_ENABLED +WEAK const PinMap PinMap_SPI_MISO[] = { + {PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + {PA_6_ALT1, SPI6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_SPI6)}, + {PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + {PB_4_ALT1, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + {PB_4_ALT2, SPI6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_SPI6)}, + {PB_14, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + {PC_2_C, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + {PC_11, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + {PE_5, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, + {PE_13, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, + {PF_8, SPI5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI5)}, + {PG_9, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + {PG_12, SPI6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI6)}, + {NC, NP, 0} +}; +#endif + +#ifdef HAL_SPI_MODULE_ENABLED +WEAK const PinMap PinMap_SPI_SCLK[] = { + {PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + {PA_5_ALT1, SPI6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_SPI6)}, + {PA_9, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + {PA_12, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + {PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + {PB_3_ALT1, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + {PB_3_ALT2, SPI6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_SPI6)}, + {PB_10, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + {PB_13, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + {PC_10, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + {PC_12, SPI6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI6)}, + {PD_3, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + {PE_2, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, + {PE_12, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, + {PF_7, SPI5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI5)}, + {PG_11, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + {PG_13, SPI6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI6)}, + {NC, NP, 0} +}; +#endif + +#ifdef HAL_SPI_MODULE_ENABLED +WEAK const PinMap PinMap_SPI_SSEL[] = { + {PA_0, SPI6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI6)}, + {PA_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + {PA_4_ALT1, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + {PA_4_ALT2, SPI6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_SPI6)}, + {PA_11, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + {PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + {PA_15_ALT1, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + {PA_15_ALT2, SPI6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_SPI6)}, + {PB_4, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_SPI2)}, + {PB_9, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + {PB_12, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + {PE_4, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, + {PE_11, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, + {PF_6, SPI5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI5)}, + {PG_8, SPI6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI6)}, + {PG_10, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + {NC, NP, 0} +}; +#endif + +//*** FDCAN *** + +#ifdef HAL_FDCAN_MODULE_ENABLED +WEAK const PinMap PinMap_CAN_RD[] = { + {PA_11, FDCAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_FDCAN1)}, + {PB_5, FDCAN2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_FDCAN2)}, + {PB_8, FDCAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_FDCAN1)}, + {PB_12, FDCAN2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_FDCAN2)}, + {PD_0, FDCAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_FDCAN1)}, + {PD_12, FDCAN3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_FDCAN3)}, + {PF_6, FDCAN3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF2_FDCAN3)}, + {PG_10, FDCAN3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF2_FDCAN3)}, + {NC, NP, 0} +}; +#endif + +#ifdef HAL_FDCAN_MODULE_ENABLED +WEAK const PinMap PinMap_CAN_TD[] = { + {PA_12, FDCAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_FDCAN1)}, + {PB_6, FDCAN2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_FDCAN2)}, + {PB_9, FDCAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_FDCAN1)}, + {PB_13, FDCAN2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_FDCAN2)}, + {PD_1, FDCAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_FDCAN1)}, + {PD_13, FDCAN3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_FDCAN3)}, + {PF_7, FDCAN3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF2_FDCAN3)}, + {PG_9, FDCAN3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF2_FDCAN3)}, + {NC, NP, 0} +}; +#endif + +//*** ETHERNET *** + +#ifdef HAL_ETH_MODULE_ENABLED +WEAK const PinMap PinMap_Ethernet[] = { + {PA_0, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_CRS + {PA_1, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_REF_CLK + {PA_1_ALT1, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_RX_CLK + {PA_2, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_MDIO + {PA_3, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_COL + {PA_7, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_CRS_DV + {PA_7_ALT1, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_RX_DV + {PA_9, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_TX_ER + {PB_0, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_RXD2 + {PB_1, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_RXD3 + {PB_2, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_TX_ER + {PB_5, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_PPS_OUT + {PB_8, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_TXD3 + {PB_10, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_RX_ER + {PB_11, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_TX_EN + {PB_12, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_TXD0 + {PB_13, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_TXD1 + {PC_1, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_MDC + {PC_2_C, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_TXD2 + {PC_3_C, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_TX_CLK + {PC_4, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_RXD0 + {PC_5, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_RXD1 + {PE_2, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_TXD3 + {PG_8, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_PPS_OUT + {PG_11, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_TX_EN + {PG_12, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_TXD1 + {PG_13, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_TXD0 + {PG_14, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_TXD1 + {NC, NP, 0} +}; +#endif + +//*** OCTOSPI *** + +#ifdef HAL_OSPI_MODULE_ENABLED +WEAK const PinMap PinMap_OCTOSPI_DATA0[] = { + {PA_2, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO0 + {PB_1, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO0 + {PB_12, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO0 + {PC_3_C, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO0 + {PC_9, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO0 + {PD_11, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO0 + {PF_0, OCTOSPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_OCTOSPIM_P2)}, // OCTOSPIM_P2_IO0 + {PF_8, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO0 + {NC, NP, 0} +}; +#endif + +#ifdef HAL_OSPI_MODULE_ENABLED +WEAK const PinMap PinMap_OCTOSPI_DATA1[] = { + {PB_0, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO1 + {PC_10, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO1 + {PD_12, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO1 + {PF_1, OCTOSPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_OCTOSPIM_P2)}, // OCTOSPIM_P2_IO1 + {PF_9, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO1 + {NC, NP, 0} +}; +#endif + +#ifdef HAL_OSPI_MODULE_ENABLED +WEAK const PinMap PinMap_OCTOSPI_DATA2[] = { + {PA_3, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO2 + {PA_7, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO2 + {PB_13, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO2 + {PC_2_C, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO2 + {PE_2, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO2 + {PF_2, OCTOSPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_OCTOSPIM_P2)}, // OCTOSPIM_P2_IO2 + {PF_7, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO2 + {NC, NP, 0} +}; +#endif + +#ifdef HAL_OSPI_MODULE_ENABLED +WEAK const PinMap PinMap_OCTOSPI_DATA3[] = { + {PA_1, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO3 + {PA_6, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO3 + {PD_13, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO3 + {PF_3, OCTOSPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_OCTOSPIM_P2)}, // OCTOSPIM_P2_IO3 + {PF_6, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO3 + {NC, NP, 0} +}; +#endif + +#ifdef HAL_OSPI_MODULE_ENABLED +WEAK const PinMap PinMap_OCTOSPI_DATA4[] = { + {PC_1, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO4 + {PD_4, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO4 + {PE_7, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO4 + {PG_0, OCTOSPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_OCTOSPIM_P2)}, // OCTOSPIM_P2_IO4 + {NC, NP, 0} +}; +#endif + +#ifdef HAL_OSPI_MODULE_ENABLED +WEAK const PinMap PinMap_OCTOSPI_DATA5[] = { + {PC_2_C, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO5 + {PD_5, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO5 + {PE_8, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO5 + {PG_1, OCTOSPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_OCTOSPIM_P2)}, // OCTOSPIM_P2_IO5 + {NC, NP, 0} +}; +#endif + +#ifdef HAL_OSPI_MODULE_ENABLED +WEAK const PinMap PinMap_OCTOSPI_DATA6[] = { + {PC_3_C, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO6 + {PD_6, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO6 + {PE_9, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO6 + {PG_9, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO6 + {PG_10, OCTOSPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_OCTOSPIM_P2)}, // OCTOSPIM_P2_IO6 + {NC, NP, 0} +}; +#endif + +#ifdef HAL_OSPI_MODULE_ENABLED +WEAK const PinMap PinMap_OCTOSPI_DATA7[] = { + {PD_7, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO7 + {PE_10, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO7 + {PG_11, OCTOSPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_OCTOSPIM_P2)}, // OCTOSPIM_P2_IO7 + {PG_14, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO7 + {NC, NP, 0} +}; +#endif + +#ifdef HAL_OSPI_MODULE_ENABLED +WEAK const PinMap PinMap_OCTOSPI_SCLK[] = { + {PA_3, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_OCTOSPIM_P1)}, // OCTOSPIM_P1_CLK + {PB_2, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_OCTOSPIM_P1)}, // OCTOSPIM_P1_CLK + {PF_4, OCTOSPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_OCTOSPIM_P2)}, // OCTOSPIM_P2_CLK + {PF_10, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_OCTOSPIM_P1)}, // OCTOSPIM_P1_CLK + {NC, NP, 0} +}; +#endif + +#ifdef HAL_OSPI_MODULE_ENABLED +WEAK const PinMap PinMap_OCTOSPI_SSEL[] = { + {PB_6, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_NCS + {PB_10, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_OCTOSPIM_P1)}, // OCTOSPIM_P1_NCS + {PC_11, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_OCTOSPIM_P1)}, // OCTOSPIM_P1_NCS + {PE_11, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_OCTOSPIM_P1)}, // OCTOSPIM_P1_NCS + {PG_6, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_NCS + {PG_12, OCTOSPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_OCTOSPIM_P2)}, // OCTOSPIM_P2_NCS + {NC, NP, 0} +}; +#endif + +//*** USB *** + +#if defined(HAL_PCD_MODULE_ENABLED) || defined(HAL_HCD_MODULE_ENABLED) +WEAK const PinMap PinMap_USB_OTG_HS[] = { +#ifdef USE_USB_HS_IN_FS + {PA_8, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG1_HS)}, // USB_OTG_HS_SOF + {PA_9, USB_OTG_HS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_OTG_HS_VBUS + {PA_10, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_PULLUP, GPIO_AF10_OTG1_HS)}, // USB_OTG_HS_ID + {PA_11, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF_NONE)}, // USB_OTG_HS_DM + {PA_12, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF_NONE)}, // USB_OTG_HS_DP +#else + {PA_3, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG1_HS)}, // USB_OTG_HS_ULPI_D0 + {PA_5, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG1_HS)}, // USB_OTG_HS_ULPI_CK + {PB_0, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG1_HS)}, // USB_OTG_HS_ULPI_D1 + {PB_1, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG1_HS)}, // USB_OTG_HS_ULPI_D2 + {PB_5, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG1_HS)}, // USB_OTG_HS_ULPI_D7 + {PB_10, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG1_HS)}, // USB_OTG_HS_ULPI_D3 + {PB_11, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG1_HS)}, // USB_OTG_HS_ULPI_D4 + {PB_12, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG1_HS)}, // USB_OTG_HS_ULPI_D5 + {PB_13, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG1_HS)}, // USB_OTG_HS_ULPI_D6 + {PC_0, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG1_HS)}, // USB_OTG_HS_ULPI_STP + {PC_2_C, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG1_HS)}, // USB_OTG_HS_ULPI_DIR + {PC_3_C, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG1_HS)}, // USB_OTG_HS_ULPI_NXT +#endif /* USE_USB_HS_IN_FS */ + {NC, NP, 0} +}; +#endif + +//*** SD *** + +#ifdef HAL_SD_MODULE_ENABLED +WEAK const PinMap PinMap_SD[] = { + {PA_0, SDMMC2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_SDMMC2)}, // SDMMC2_CMD + {PB_3, SDMMC2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_SDMMC2)}, // SDMMC2_D2 + {PB_4, SDMMC2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_SDMMC2)}, // SDMMC2_D3 + {PB_8, SDMMC1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF7_SDMMC1)}, // SDMMC1_CKIN + {PB_8_ALT1, SDMMC1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDMMC1)}, // SDMMC1_D4 + {PB_8_ALT2, SDMMC2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_SDMMC2)}, // SDMMC2_D4 + {PB_9, SDMMC1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF7_SDMMC1)}, // SDMMC1_CDIR + {PB_9_ALT1, SDMMC1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDMMC1)}, // SDMMC1_D5 + {PB_9_ALT2, SDMMC2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_SDMMC2)}, // SDMMC2_D5 + {PB_13, SDMMC1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDMMC1)}, // SDMMC1_D0 + {PB_14, SDMMC2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_SDMMC2)}, // SDMMC2_D0 + {PB_15, SDMMC2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_SDMMC2)}, // SDMMC2_D1 + {PC_1, SDMMC2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_SDMMC2)}, // SDMMC2_CK + {PC_4, SDMMC2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF10_SDMMC2)}, // SDMMC2_CKIN + {PC_6, SDMMC1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF8_SDMMC1)}, // SDMMC1_D0DIR + {PC_6_ALT1, SDMMC1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDMMC1)}, // SDMMC1_D6 + {PC_6_ALT2, SDMMC2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_SDMMC2)}, // SDMMC2_D6 + {PC_7, SDMMC1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF8_SDMMC1)}, // SDMMC1_D123DIR + {PC_7_ALT1, SDMMC1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDMMC1)}, // SDMMC1_D7 + {PC_7_ALT2, SDMMC2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_SDMMC2)}, // SDMMC2_D7 + {PC_8, SDMMC1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDMMC1)}, // SDMMC1_D0 + {PC_9, SDMMC1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDMMC1)}, // SDMMC1_D1 + {PC_10, SDMMC1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDMMC1)}, // SDMMC1_D2 + {PC_11, SDMMC1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDMMC1)}, // SDMMC1_D3 + {PC_12, SDMMC1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF12_SDMMC1)}, // SDMMC1_CK + {PD_2, SDMMC1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF12_SDMMC1)}, // SDMMC1_CMD + {PD_6, SDMMC2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF11_SDMMC2)}, // SDMMC2_CK + {PD_7, SDMMC2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF11_SDMMC2)}, // SDMMC2_CMD + {PG_9, SDMMC2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_SDMMC2)}, // SDMMC2_D0 + {PG_10, SDMMC2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_SDMMC2)}, // SDMMC2_D1 + {PG_11, SDMMC2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_SDMMC2)}, // SDMMC2_D2 + {PG_12, SDMMC2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_SDMMC2)}, // SDMMC2_D3 + {PG_13, SDMMC2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_SDMMC2)}, // SDMMC2_D6 + {PG_14, SDMMC2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_SDMMC2)}, // SDMMC2_D7 + {NC, NP, 0} +}; +#endif + +#endif /* !CUSTOM_PERIPHERAL_PINS */ diff --git a/buildroot/share/PlatformIO/variants/MARLIN_H723Zx/PinNamesVar.h b/buildroot/share/PlatformIO/variants/MARLIN_H723Zx/PinNamesVar.h new file mode 100644 index 0000000000..ad9d80a625 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_H723Zx/PinNamesVar.h @@ -0,0 +1,117 @@ +/* Dual pad pin name */ +PC_2_C = PC_2 | PDUAL, +PC_3_C = PC_3 | PDUAL, + +/* Alternate pin name */ +PA_0_ALT1 = PA_0 | ALT1, +PA_1_ALT1 = PA_1 | ALT1, +PA_1_ALT2 = PA_1 | ALT2, +PA_2_ALT1 = PA_2 | ALT1, +PA_2_ALT2 = PA_2 | ALT2, +PA_3_ALT1 = PA_3 | ALT1, +PA_3_ALT2 = PA_3 | ALT2, +PA_4_ALT1 = PA_4 | ALT1, +PA_4_ALT2 = PA_4 | ALT2, +PA_5_ALT1 = PA_5 | ALT1, +PA_6_ALT1 = PA_6 | ALT1, +PA_7_ALT1 = PA_7 | ALT1, +PA_7_ALT2 = PA_7 | ALT2, +PA_7_ALT3 = PA_7 | ALT3, +PA_8_ALT1 = PA_8 | ALT1, +PA_9_ALT1 = PA_9 | ALT1, +PA_10_ALT1 = PA_10 | ALT1, +PA_11_ALT1 = PA_11 | ALT1, +PA_12_ALT1 = PA_12 | ALT1, +PA_15_ALT1 = PA_15 | ALT1, +PA_15_ALT2 = PA_15 | ALT2, +PB_0_ALT1 = PB_0 | ALT1, +PB_0_ALT2 = PB_0 | ALT2, +PB_1_ALT1 = PB_1 | ALT1, +PB_1_ALT2 = PB_1 | ALT2, +PB_3_ALT1 = PB_3 | ALT1, +PB_3_ALT2 = PB_3 | ALT2, +PB_4_ALT1 = PB_4 | ALT1, +PB_4_ALT2 = PB_4 | ALT2, +PB_5_ALT1 = PB_5 | ALT1, +PB_5_ALT2 = PB_5 | ALT2, +PB_6_ALT1 = PB_6 | ALT1, +PB_6_ALT2 = PB_6 | ALT2, +PB_7_ALT1 = PB_7 | ALT1, +PB_8_ALT1 = PB_8 | ALT1, +PB_8_ALT2 = PB_8 | ALT2, +PB_9_ALT1 = PB_9 | ALT1, +PB_9_ALT2 = PB_9 | ALT2, +PB_14_ALT1 = PB_14 | ALT1, +PB_14_ALT2 = PB_14 | ALT2, +PB_15_ALT1 = PB_15 | ALT1, +PB_15_ALT2 = PB_15 | ALT2, +PC_0_ALT1 = PC_0 | ALT1, +PC_0_ALT2 = PC_0 | ALT2, +PC_1_ALT1 = PC_1 | ALT1, +PC_1_ALT2 = PC_1 | ALT2, +PC_4_ALT1 = PC_4 | ALT1, +PC_5_ALT1 = PC_5 | ALT1, +PC_6_ALT1 = PC_6 | ALT1, +PC_6_ALT2 = PC_6 | ALT2, +PC_7_ALT1 = PC_7 | ALT1, +PC_7_ALT2 = PC_7 | ALT2, +PC_8_ALT1 = PC_8 | ALT1, +PC_9_ALT1 = PC_9 | ALT1, +PC_10_ALT1 = PC_10 | ALT1, +PC_11_ALT1 = PC_11 | ALT1, +PF_0_ALT1 = PF_0 | ALT1, +PF_1_ALT1 = PF_1 | ALT1, +PF_6_ALT1 = PF_6 | ALT1, +PF_7_ALT1 = PF_7 | ALT1, +PF_8_ALT1 = PF_8 | ALT1, +PF_8_ALT2 = PF_8 | ALT2, +PF_9_ALT1 = PF_9 | ALT1, +PF_9_ALT2 = PF_9 | ALT2, +PG_13_ALT1 = PG_13 | ALT1, + +/* SYS_WKUP */ +#ifdef PWR_WAKEUP_PIN1 + SYS_WKUP1 = PA_0, +#endif +#ifdef PWR_WAKEUP_PIN2 + SYS_WKUP2 = PA_2, +#endif +#ifdef PWR_WAKEUP_PIN3 + SYS_WKUP3 = NC, +#endif +#ifdef PWR_WAKEUP_PIN4 + SYS_WKUP4 = PC_13, +#endif +#ifdef PWR_WAKEUP_PIN5 + SYS_WKUP5 = NC, +#endif +#ifdef PWR_WAKEUP_PIN6 + SYS_WKUP6 = PC_1, +#endif +#ifdef PWR_WAKEUP_PIN7 + SYS_WKUP7 = NC, +#endif +#ifdef PWR_WAKEUP_PIN8 + SYS_WKUP8 = NC, +#endif + +/* USB */ +#ifdef USBCON + USB_OTG_HS_DM = PA_11, + USB_OTG_HS_DP = PA_12, + USB_OTG_HS_ID = PA_10, + USB_OTG_HS_SOF = PA_8, + USB_OTG_HS_ULPI_CK = PA_5, + USB_OTG_HS_ULPI_D0 = PA_3, + USB_OTG_HS_ULPI_D1 = PB_0, + USB_OTG_HS_ULPI_D2 = PB_1, + USB_OTG_HS_ULPI_D3 = PB_10, + USB_OTG_HS_ULPI_D4 = PB_11, + USB_OTG_HS_ULPI_D5 = PB_12, + USB_OTG_HS_ULPI_D6 = PB_13, + USB_OTG_HS_ULPI_D7 = PB_5, + USB_OTG_HS_ULPI_DIR = PC_2_C, + USB_OTG_HS_ULPI_NXT = PC_3_C, + USB_OTG_HS_ULPI_STP = PC_0, + USB_OTG_HS_VBUS = PA_9, +#endif diff --git a/buildroot/share/PlatformIO/variants/MARLIN_H723Zx/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_H723Zx/ldscript.ld new file mode 100644 index 0000000000..6322861033 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_H723Zx/ldscript.ld @@ -0,0 +1,174 @@ +/* +****************************************************************************** +** +** File : LinkerScript.ld +** +** Author : STM32CubeIDE +** +** Abstract : Linker script for STM32H7 series +** 512Kbytes FLASH and 560Kbytes RAM +** +** Set heap size, stack size and stack location according +** to application requirements. +** +** Set memory bank area and size if external memory is used. +** +** Target : STMicroelectronics STM32 +** +** Distribution: The file is distributed as is, without any warranty +** of any kind. +** +***************************************************************************** +** @attention +** +** Copyright (c) 2022 STMicroelectronics. +** All rights reserved. +** +** This software is licensed under terms that can be found in the LICENSE file +** in the root directory of this software component. +** If no LICENSE file comes with this software, it is provided AS-IS. +** +**************************************************************************** +*/ + +/* Entry Point */ +ENTRY(Reset_Handler) + +/* Highest address of the user mode stack */ +_estack = ORIGIN(RAM_D1) + LENGTH(RAM_D1); /* end of RAM */ +/* Generate a link error if heap and stack don't fit into RAM */ +_Min_Heap_Size = 0x200 ; /* required amount of heap */ +_Min_Stack_Size = 0x400 ; /* required amount of stack */ + +/* Specify the memory areas */ +MEMORY +{ + ITCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K + DTCMRAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K + FLASH (rx) : ORIGIN = 0x8000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET + RAM_D1 (xrw) : ORIGIN = 0x24000000, LENGTH = 320K + RAM_D2 (xrw) : ORIGIN = 0x30000000, LENGTH = 32K + RAM_D3 (xrw) : ORIGIN = 0x38000000, LENGTH = 16K +} + +/* Define output sections */ +SECTIONS +{ + /* The startup code goes first into FLASH */ + .isr_vector : + { + . = ALIGN(4); + KEEP(*(.isr_vector)) /* Startup code */ + . = ALIGN(4); + } >FLASH + + /* The program code and other data goes into FLASH */ + .text : + { + . = ALIGN(4); + *(.text) /* .text sections (code) */ + *(.text*) /* .text* sections (code) */ + *(.glue_7) /* glue arm to thumb code */ + *(.glue_7t) /* glue thumb to arm code */ + *(.eh_frame) + + KEEP (*(.init)) + KEEP (*(.fini)) + + . = ALIGN(4); + _etext = .; /* define a global symbols at end of code */ + } >FLASH + + /* Constant data goes into FLASH */ + .rodata : + { + . = ALIGN(4); + *(.rodata) /* .rodata sections (constants, strings, etc.) */ + *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ + . = ALIGN(4); + } >FLASH + + .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH + .ARM : { + __exidx_start = .; + *(.ARM.exidx*) + __exidx_end = .; + } >FLASH + + .preinit_array : + { + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP (*(.preinit_array*)) + PROVIDE_HIDDEN (__preinit_array_end = .); + } >FLASH + + .init_array : + { + PROVIDE_HIDDEN (__init_array_start = .); + KEEP (*(SORT(.init_array.*))) + KEEP (*(.init_array*)) + PROVIDE_HIDDEN (__init_array_end = .); + } >FLASH + + .fini_array : + { + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP (*(SORT(.fini_array.*))) + KEEP (*(.fini_array*)) + PROVIDE_HIDDEN (__fini_array_end = .); + } >FLASH + + /* used by the startup to initialize data */ + _sidata = LOADADDR(.data); + + /* Initialized data sections goes into RAM, load LMA copy after code */ + .data : + { + . = ALIGN(4); + _sdata = .; /* create a global symbol at data start */ + *(.data) /* .data sections */ + *(.data*) /* .data* sections */ + *(.RamFunc) /* .RamFunc sections */ + *(.RamFunc*) /* .RamFunc* sections */ + + . = ALIGN(4); + _edata = .; /* define a global symbol at data end */ + } >RAM_D1 AT> FLASH + + /* Uninitialized data section */ + . = ALIGN(4); + .bss : + { + /* This is used by the startup in order to initialize the .bss section */ + _sbss = .; /* define a global symbol at bss start */ + __bss_start__ = _sbss; + *(.bss) + *(.bss*) + *(COMMON) + + . = ALIGN(4); + _ebss = .; /* define a global symbol at bss end */ + __bss_end__ = _ebss; + } >RAM_D1 + + /* User_heap_stack section, used to check that there is enough RAM left */ + ._user_heap_stack : + { + . = ALIGN(8); + PROVIDE ( end = . ); + PROVIDE ( _end = . ); + . = . + _Min_Heap_Size; + . = . + _Min_Stack_Size; + . = ALIGN(8); + } >RAM_D1 + + /* Remove information from the standard libraries */ + /DISCARD/ : + { + libc.a ( * ) + libm.a ( * ) + libgcc.a ( * ) + } + + .ARM.attributes 0 : { *(.ARM.attributes) } +} diff --git a/buildroot/share/PlatformIO/variants/MARLIN_H723Zx/variant_MARLIN_STM32H723Zx.cpp b/buildroot/share/PlatformIO/variants/MARLIN_H723Zx/variant_MARLIN_STM32H723Zx.cpp new file mode 100644 index 0000000000..4506cf5ce6 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_H723Zx/variant_MARLIN_STM32H723Zx.cpp @@ -0,0 +1,317 @@ +/* + ******************************************************************************* + * Copyright (c) 2020-2021, STMicroelectronics + * All rights reserved. + * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ******************************************************************************* + */ +#if defined(STM32H723xx) +#include "pins_arduino.h" + +// Digital PinName array +const PinName digitalPin[] = { + PA_0, // D0/A0 + PA_1, // D1/A1 + PA_2, // D2/A2 + PA_3, // D3/A3 + PA_4, // D4/A4 + PA_5, // D5/A5 + PA_6, // D6/A6 + PA_7, // D7/A7 + PA_8, // D8 + PA_9, // D9 + PA_10, // D10 + PA_11, // D11 + PA_12, // D12 + PA_13, // D13 + PA_14, // D14 + PA_15, // D15 + PB_0, // D16/A8 + PB_1, // D17/A9 + PB_2, // D18 + PB_3, // D19 + PB_4, // D20 + PB_5, // D21 + PB_6, // D22 + PB_7, // D23 + PB_8, // D24 + PB_9, // D25 + PB_10, // D26 + PB_11, // D27 + PB_12, // D28 + PB_13, // D29 + PB_14, // D30 + PB_15, // D31 + PC_0, // D32/A10 + PC_1, // D33/A11 + PC_4, // D34/A12 + PC_5, // D35/A13 + PC_6, // D36 + PC_7, // D37 + PC_8, // D38 + PC_9, // D39 + PC_10, // D40 + PC_11, // D41 + PC_12, // D42 + PC_13, // D43 + PC_14, // D44 + PC_15, // D45 + PD_0, // D46 + PD_1, // D47 + PD_2, // D48 + PD_3, // D49 + PD_4, // D50 + PD_5, // D51 + PD_6, // D52 + PD_7, // D53 + PD_8, // D54 + PD_9, // D55 + PD_10, // D56 + PD_11, // D57 + PD_12, // D58 + PD_13, // D59 + PD_14, // D60 + PD_15, // D61 + PE_0, // D62 + PE_1, // D63 + PE_2, // D64 + PE_3, // D65 + PE_4, // D66 + PE_5, // D67 + PE_6, // D68 + PE_7, // D69 + PE_8, // D70 + PE_9, // D71 + PE_10, // D72 + PE_11, // D73 + PE_12, // D74 + PE_13, // D75 + PE_14, // D76 + PE_15, // D77 + PF_0, // D78 + PF_1, // D79 + PF_2, // D80 + PF_3, // D81/A14 + PF_4, // D82/A15 + PF_5, // D83/A16 + PF_6, // D84/A17 + PF_7, // D85/A18 + PF_8, // D86/A19 + PF_9, // D87/A20 + PF_10, // D88/A21 + PF_11, // D89/A22 + PF_12, // D90/A23 + PF_13, // D91/A24 + PF_14, // D92/A25 + PF_15, // D93 + PG_0, // D94 + PG_1, // D95 + PG_2, // D96 + PG_3, // D97 + PG_4, // D98 + PG_5, // D99 + PG_6, // D100 + PG_7, // D101 + PG_8, // D102 + PG_9, // D103 + PG_10, // D104 + PG_11, // D105 + PG_12, // D106 + PG_13, // D107 + PG_14, // D108 + PG_15, // D109 + PH_0, // D110 + PH_1, // D111 + PC_2_C, // D112/A26 + PC_3_C // D113/A27 +}; + +// Analog (Ax) pin number array +const uint32_t analogInputPin[] = { + 0, // A0, PA0 + 1, // A1, PA1 + 2, // A2, PA2 + 3, // A3, PA3 + 4, // A4, PA4 + 5, // A5, PA5 + 6, // A6, PA6 + 7, // A7, PA7 + 16, // A8, PB0 + 17, // A9, PB1 + 32, // A10, PC0 + 33, // A11, PC1 + 34, // A12, PC4 + 35, // A13, PC5 + 81, // A14, PF3 + 82, // A15, PF4 + 83, // A16, PF5 + 84, // A17, PF6 + 85, // A18, PF7 + 86, // A19, PF8 + 87, // A20, PF9 + 88, // A21, PF10 + 89, // A22, PF11 + 90, // A23, PF12 + 91, // A24, PF13 + 92, // A25, PF14 + 112, // A26, PC2_C + 113 // A27, PC3_C +}; + +void MPU_Config(void) +{ + MPU_Region_InitTypeDef MPU_InitStruct = {0}; + + /* Disables the MPU */ + HAL_MPU_Disable(); + + /** Initializes and configures the Region and the memory to be protected + */ + MPU_InitStruct.Enable = MPU_REGION_ENABLE; + MPU_InitStruct.Number = MPU_REGION_NUMBER0; + MPU_InitStruct.BaseAddress = 0x0; + MPU_InitStruct.Size = MPU_REGION_SIZE_4GB; + MPU_InitStruct.SubRegionDisable = 0x87; + MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0; + MPU_InitStruct.AccessPermission = MPU_REGION_NO_ACCESS; + MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_DISABLE; + MPU_InitStruct.IsShareable = MPU_ACCESS_SHAREABLE; + MPU_InitStruct.IsCacheable = MPU_ACCESS_NOT_CACHEABLE; + MPU_InitStruct.IsBufferable = MPU_ACCESS_NOT_BUFFERABLE; + + HAL_MPU_ConfigRegion(&MPU_InitStruct); + /* Enables the MPU */ + HAL_MPU_Enable(MPU_PRIVILEGED_DEFAULT); + +} + +/* + * @brief System Clock Configuration + * @param None + * @retval None + */ +WEAK void SystemClock_Config(void) +{ + RCC_OscInitTypeDef RCC_OscInitStruct = {0}; + RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; + RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {}; + + MPU_Config(); + + /** Supply configuration update enable + */ + HAL_PWREx_ConfigSupply(PWR_LDO_SUPPLY); + /** Configure the main internal regulator output voltage + */ + __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE0); + + while(!__HAL_PWR_GET_FLAG(PWR_FLAG_VOSRDY)) {} + /** Initializes the RCC Oscillators according to the specified parameters + * in the RCC_OscInitTypeDef structure. + */ + RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI48 | RCC_OSCILLATORTYPE_HSE; + RCC_OscInitStruct.HSEState = RCC_HSE_ON; + RCC_OscInitStruct.HSI48State = RCC_HSI48_ON; // 48Mhz for USB + RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; + RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE; + RCC_OscInitStruct.PLL.PLLM = 5; // 25Mhz / 5 = 5Mhz + RCC_OscInitStruct.PLL.PLLN = 110; // 25Mhz / 5 * 110 = 550Mhz + RCC_OscInitStruct.PLL.PLLP = 1; // 550Mhz / 1 = 550Mhz + RCC_OscInitStruct.PLL.PLLQ = 10; // 550Mhz / 10 = 55Mhz + RCC_OscInitStruct.PLL.PLLR = 10; // unused + RCC_OscInitStruct.PLL.PLLRGE = RCC_PLL1VCIRANGE_2; + RCC_OscInitStruct.PLL.PLLVCOSEL = RCC_PLL1VCOWIDE; + RCC_OscInitStruct.PLL.PLLFRACN = 0; + if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) + { + Error_Handler(); + } + /** Initializes the CPU, AHB and APB buses clocks + */ + RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK + |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2 + |RCC_CLOCKTYPE_D3PCLK1|RCC_CLOCKTYPE_D1PCLK1; + RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; + RCC_ClkInitStruct.SYSCLKDivider = RCC_SYSCLK_DIV1; + RCC_ClkInitStruct.AHBCLKDivider = RCC_HCLK_DIV2; + RCC_ClkInitStruct.APB3CLKDivider = RCC_APB3_DIV2; + RCC_ClkInitStruct.APB1CLKDivider = RCC_APB1_DIV2; + RCC_ClkInitStruct.APB2CLKDivider = RCC_APB2_DIV2; + RCC_ClkInitStruct.APB4CLKDivider = RCC_APB4_DIV2; + + if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_4) != HAL_OK) + { + Error_Handler(); + } + + PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_USB + | RCC_PERIPHCLK_SDMMC | RCC_PERIPHCLK_ADC + | RCC_PERIPHCLK_LPUART1 | RCC_PERIPHCLK_USART16 + | RCC_PERIPHCLK_USART234578 | RCC_PERIPHCLK_I2C123 + | RCC_PERIPHCLK_I2C4 | RCC_PERIPHCLK_SPI123 + | RCC_PERIPHCLK_SPI45 | RCC_PERIPHCLK_SPI6; + + /* HSI48 used for USB 48 Mhz */ + /* PLL1 qclk also used for FMC, SDMMC, RNG, SAI */ + /* PLL2 pclk is needed for adc max 80 Mhz (p,q,r same) */ + /* PLL2 pclk also used for LP timers 2,3,4,5, SPI 1,2,3 */ + /* PLL2 qclk is needed for uart, can, spi4,5,6 80 Mhz */ + /* PLL3 r clk is needed for i2c 80 Mhz (p,q,r same) */ + PeriphClkInitStruct.PLL2.PLL2M = 15; // M DIV 15 vco 25 / 15 ~ 1.667 Mhz + PeriphClkInitStruct.PLL2.PLL2N = 96; // N MUL 96 + PeriphClkInitStruct.PLL2.PLL2P = 2; // P div 2 + PeriphClkInitStruct.PLL2.PLL2Q = 2; // Q div 2 + PeriphClkInitStruct.PLL2.PLL2R = 2; // R div 2 + // RCC_PLL1VCIRANGE_0 Clock range frequency between 1 and 2 MHz + PeriphClkInitStruct.PLL2.PLL2RGE = RCC_PLL2VCIRANGE_0; + PeriphClkInitStruct.PLL2.PLL2VCOSEL = RCC_PLL2VCOMEDIUM; + PeriphClkInitStruct.PLL2.PLL2FRACN = 0; + PeriphClkInitStruct.PLL3.PLL3M = 15; // M DIV 15 vco 25 / 15 ~ 1.667 Mhz + PeriphClkInitStruct.PLL3.PLL3N = 96; // N MUL 96 + PeriphClkInitStruct.PLL3.PLL3P = 2; // P div 2 + PeriphClkInitStruct.PLL3.PLL3Q = 2; // Q div 2 + PeriphClkInitStruct.PLL3.PLL3R = 2; // R div 2 + // RCC_PLL1VCIRANGE_0 Clock range frequency between 1 and 2 MHz + PeriphClkInitStruct.PLL3.PLL3RGE = RCC_PLL3VCIRANGE_0; + PeriphClkInitStruct.PLL3.PLL3VCOSEL = RCC_PLL3VCOMEDIUM; + PeriphClkInitStruct.PLL3.PLL3FRACN = 0; + // ADC from PLL2 pclk + PeriphClkInitStruct.AdcClockSelection = RCC_ADCCLKSOURCE_PLL2; + // USB from HSI48 + PeriphClkInitStruct.UsbClockSelection = RCC_USBCLKSOURCE_HSI48; + // SDMMC from PLL1 qclk + PeriphClkInitStruct.SdmmcClockSelection = 0; + //PeriphClkInitStruct.SdmmcClockSelection = RCC_SDMMCCLKSOURCE_PLL; + // LPUART from PLL2 qclk + PeriphClkInitStruct.Lpuart1ClockSelection = 0; + //PeriphClkInitStruct.Lpuart1ClockSelection = RCC_LPUART1CLKSOURCE_PLL2; + // USART from PLL2 qclk + PeriphClkInitStruct.Usart16ClockSelection = RCC_USART16CLKSOURCE_PLL2; + // USART from PLL2 qclk + PeriphClkInitStruct.Usart234578ClockSelection = 0; + //PeriphClkInitStruct.Usart234578ClockSelection = RCC_USART234578CLKSOURCE_PLL2; + // I2C123 from PLL3 rclk + PeriphClkInitStruct.I2c123ClockSelection = RCC_I2C123CLKSOURCE_PLL3; + // I2C4 from PLL3 rclk + PeriphClkInitStruct.I2c4ClockSelection = 0; + //PeriphClkInitStruct.I2c4ClockSelection = RCC_I2C4CLKSOURCE_PLL3; + // SPI123 from PLL2 pclk + PeriphClkInitStruct.Spi123ClockSelection = RCC_SPI123CLKSOURCE_PLL2; + // SPI45 from PLL2 qclk + PeriphClkInitStruct.Spi45ClockSelection = 0; + //PeriphClkInitStruct.Spi45ClockSelection = RCC_SPI45CLKSOURCE_PLL2; + // SPI6 from PLL2 qclk + PeriphClkInitStruct.Spi6ClockSelection = 0; + //PeriphClkInitStruct.Spi6ClockSelection = RCC_SPI6CLKSOURCE_PLL2; + + if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) { + Error_Handler(); + } +} + +#endif /* ARDUINO_GENERIC_* */ diff --git a/buildroot/share/PlatformIO/variants/MARLIN_H723Zx/variant_MARLIN_STM32H723Zx.h b/buildroot/share/PlatformIO/variants/MARLIN_H723Zx/variant_MARLIN_STM32H723Zx.h new file mode 100644 index 0000000000..d443f5c1fd --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_H723Zx/variant_MARLIN_STM32H723Zx.h @@ -0,0 +1,308 @@ +/* + ******************************************************************************* + * Copyright (c) 2020-2021, STMicroelectronics + * All rights reserved. + * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ******************************************************************************* + */ +#pragma once + +/*---------------------------------------------------------------------------- + * STM32 pins number + *----------------------------------------------------------------------------*/ +#define PA0 PIN_A0 +#define PA1 PIN_A1 +#define PA2 PIN_A2 +#define PA3 PIN_A3 +#define PA4 PIN_A4 +#define PA5 PIN_A5 +#define PA6 PIN_A6 +#define PA7 PIN_A7 +#define PA8 8 +#define PA9 9 +#define PA10 10 +#define PA11 11 +#define PA12 12 +#define PA13 13 +#define PA14 14 +#define PA15 15 +#define PB0 PIN_A8 +#define PB1 PIN_A9 +#define PB2 18 +#define PB3 19 +#define PB4 20 +#define PB5 21 +#define PB6 22 +#define PB7 23 +#define PB8 24 +#define PB9 25 +#define PB10 26 +#define PB11 27 +#define PB12 28 +#define PB13 29 +#define PB14 30 +#define PB15 31 +#define PC0 PIN_A10 +#define PC1 PIN_A11 +#define PC4 PIN_A12 +#define PC5 PIN_A13 +#define PC6 36 +#define PC7 37 +#define PC8 38 +#define PC9 39 +#define PC10 40 +#define PC11 41 +#define PC12 42 +#define PC13 43 +#define PC14 44 +#define PC15 45 +#define PD0 46 +#define PD1 47 +#define PD2 48 +#define PD3 49 +#define PD4 50 +#define PD5 51 +#define PD6 52 +#define PD7 53 +#define PD8 54 +#define PD9 55 +#define PD10 56 +#define PD11 57 +#define PD12 58 +#define PD13 59 +#define PD14 60 +#define PD15 61 +#define PE0 62 +#define PE1 63 +#define PE2 64 +#define PE3 65 +#define PE4 66 +#define PE5 67 +#define PE6 68 +#define PE7 69 +#define PE8 70 +#define PE9 71 +#define PE10 72 +#define PE11 73 +#define PE12 74 +#define PE13 75 +#define PE14 76 +#define PE15 77 +#define PF0 78 +#define PF1 79 +#define PF2 80 +#define PF3 PIN_A14 +#define PF4 PIN_A15 +#define PF5 PIN_A16 +#define PF6 PIN_A17 +#define PF7 PIN_A18 +#define PF8 PIN_A19 +#define PF9 PIN_A20 +#define PF10 PIN_A21 +#define PF11 PIN_A22 +#define PF12 PIN_A23 +#define PF13 PIN_A24 +#define PF14 PIN_A25 +#define PF15 93 +#define PG0 94 +#define PG1 95 +#define PG2 96 +#define PG3 97 +#define PG4 98 +#define PG5 99 +#define PG6 100 +#define PG7 101 +#define PG8 102 +#define PG9 103 +#define PG10 104 +#define PG11 105 +#define PG12 106 +#define PG13 107 +#define PG14 108 +#define PG15 109 +#define PH0 110 +#define PH1 111 +#define PC2_C PIN_A26 +#define PC3_C PIN_A27 + +// Alternate pins number +#define PA0_ALT1 (PA0 | ALT1) +#define PA1_ALT1 (PA1 | ALT1) +#define PA1_ALT2 (PA1 | ALT2) +#define PA2_ALT1 (PA2 | ALT1) +#define PA2_ALT2 (PA2 | ALT2) +#define PA3_ALT1 (PA3 | ALT1) +#define PA3_ALT2 (PA3 | ALT2) +#define PA4_ALT1 (PA4 | ALT1) +#define PA4_ALT2 (PA4 | ALT2) +#define PA5_ALT1 (PA5 | ALT1) +#define PA6_ALT1 (PA6 | ALT1) +#define PA7_ALT1 (PA7 | ALT1) +#define PA7_ALT2 (PA7 | ALT2) +#define PA7_ALT3 (PA7 | ALT3) +#define PA8_ALT1 (PA8 | ALT1) +#define PA9_ALT1 (PA9 | ALT1) +#define PA10_ALT1 (PA10 | ALT1) +#define PA11_ALT1 (PA11 | ALT1) +#define PA12_ALT1 (PA12 | ALT1) +#define PA15_ALT1 (PA15 | ALT1) +#define PA15_ALT2 (PA15 | ALT2) +#define PB0_ALT1 (PB0 | ALT1) +#define PB0_ALT2 (PB0 | ALT2) +#define PB1_ALT1 (PB1 | ALT1) +#define PB1_ALT2 (PB1 | ALT2) +#define PB3_ALT1 (PB3 | ALT1) +#define PB3_ALT2 (PB3 | ALT2) +#define PB4_ALT1 (PB4 | ALT1) +#define PB4_ALT2 (PB4 | ALT2) +#define PB5_ALT1 (PB5 | ALT1) +#define PB5_ALT2 (PB5 | ALT2) +#define PB6_ALT1 (PB6 | ALT1) +#define PB6_ALT2 (PB6 | ALT2) +#define PB7_ALT1 (PB7 | ALT1) +#define PB8_ALT1 (PB8 | ALT1) +#define PB8_ALT2 (PB8 | ALT2) +#define PB9_ALT1 (PB9 | ALT1) +#define PB9_ALT2 (PB9 | ALT2) +#define PB14_ALT1 (PB14 | ALT1) +#define PB14_ALT2 (PB14 | ALT2) +#define PB15_ALT1 (PB15 | ALT1) +#define PB15_ALT2 (PB15 | ALT2) +#define PC0_ALT1 (PC0 | ALT1) +#define PC0_ALT2 (PC0 | ALT2) +#define PC1_ALT1 (PC1 | ALT1) +#define PC1_ALT2 (PC1 | ALT2) +#define PC4_ALT1 (PC4 | ALT1) +#define PC5_ALT1 (PC5 | ALT1) +#define PC6_ALT1 (PC6 | ALT1) +#define PC6_ALT2 (PC6 | ALT2) +#define PC7_ALT1 (PC7 | ALT1) +#define PC7_ALT2 (PC7 | ALT2) +#define PC8_ALT1 (PC8 | ALT1) +#define PC9_ALT1 (PC9 | ALT1) +#define PC10_ALT1 (PC10 | ALT1) +#define PC11_ALT1 (PC11 | ALT1) +#define PF0_ALT1 (PF0 | ALT1) +#define PF1_ALT1 (PF1 | ALT1) +#define PF6_ALT1 (PF6 | ALT1) +#define PF7_ALT1 (PF7 | ALT1) +#define PF8_ALT1 (PF8 | ALT1) +#define PF8_ALT2 (PF8 | ALT2) +#define PF9_ALT1 (PF9 | ALT1) +#define PF9_ALT2 (PF9 | ALT2) +#define PG13_ALT1 (PG13 | ALT1) + +#define NUM_DIGITAL_PINS 114 +#define NUM_DUALPAD_PINS 2 +#define NUM_ANALOG_INPUTS 28 + +// On-board LED pin number +#ifndef LED_BUILTIN + #define LED_BUILTIN PNUM_NOT_DEFINED +#endif + +// On-board user button +#ifndef USER_BTN + #define USER_BTN PNUM_NOT_DEFINED +#endif + +// SPI definitions +#ifndef PIN_SPI_SS + #define PIN_SPI_SS PA4 +#endif +#ifndef PIN_SPI_SS1 + #define PIN_SPI_SS1 PA15 +#endif +#ifndef PIN_SPI_SS2 + #define PIN_SPI_SS2 PG10 +#endif +#ifndef PIN_SPI_SS3 + #define PIN_SPI_SS3 PNUM_NOT_DEFINED +#endif +#ifndef PIN_SPI_MOSI + #define PIN_SPI_MOSI PA7 +#endif +#ifndef PIN_SPI_MISO + #define PIN_SPI_MISO PA6 +#endif +#ifndef PIN_SPI_SCK + #define PIN_SPI_SCK PA5 +#endif + +// I2C definitions +#ifndef PIN_WIRE_SDA + #define PIN_WIRE_SDA PB7 +#endif +#ifndef PIN_WIRE_SCL + #define PIN_WIRE_SCL PB6 +#endif + +// Timer Definitions +// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin +#ifndef TIMER_TONE + #define TIMER_TONE TIM6 +#endif +#ifndef TIMER_SERVO + #define TIMER_SERVO TIM7 +#endif + +// UART Definitions +#ifndef SERIAL_UART_INSTANCE + #define SERIAL_UART_INSTANCE 4 +#endif + +// Default pin used for generic 'Serial' instance +// Mandatory for Firmata +#ifndef PIN_SERIAL_RX + #define PIN_SERIAL_RX PA1 +#endif +#ifndef PIN_SERIAL_TX + #define PIN_SERIAL_TX PA0 +#endif + +// Extra HAL modules +#if !defined(HAL_DAC_MODULE_DISABLED) + #define HAL_DAC_MODULE_ENABLED +#endif +#if !defined(HAL_ETH_MODULE_DISABLED) + #define HAL_ETH_MODULE_ENABLED +#endif +#if !defined(HAL_OSPI_MODULE_DISABLED) + #define HAL_OSPI_MODULE_ENABLED +#endif +#if !defined(HAL_SD_MODULE_DISABLED) + #define HAL_SD_MODULE_ENABLED +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#ifdef __cplusplus + // These serial port names are intended to allow libraries and architecture-neutral + // sketches to automatically default to the correct port name for a particular type + // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, + // the first hardware serial port whose RX/TX pins are not dedicated to another use. + // + // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor + // + // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial + // + // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library + // + // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. + // + // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX + // pins are NOT connected to anything by default. + #ifndef SERIAL_PORT_MONITOR + #define SERIAL_PORT_MONITOR Serial + #endif + #ifndef SERIAL_PORT_HARDWARE + #define SERIAL_PORT_HARDWARE Serial + #endif +#endif diff --git a/ini/renamed.ini b/ini/renamed.ini index cd890b593c..ae1b5742b5 100644 --- a/ini/renamed.ini +++ b/ini/renamed.ini @@ -53,3 +53,21 @@ extends = renamed [env:mks_robin_nano35_maple] ;=> mks_robin_nano_v1v2_maple extends = renamed + +[env:BIGTREE_OCTOPUS_V1] ;=> STM32F446ZE_btt +extends = renamed + +[env:BIGTREE_OCTOPUS_V1_USB] ;=> STM32F446ZE_btt_USB +extends = renamed + +[env:BIGTREE_OCTOPUS_PRO_V1_F429] ;=> STM32F429ZG_btt +extends = renamed + +[env:BIGTREE_OCTOPUS_PRO_V1_F429_USB] ;=> STM32F429ZG_btt_USB +extends = renamed + +[env:BIGTREE_OCTOPUS_V1_F407] ;=> STM32F407ZE_btt +extends = renamed + +[env:BIGTREE_OCTOPUS_V1_F407_USB] ;=> STM32F407ZE_btt_USB +extends = renamed diff --git a/ini/stm32f1-maple.ini b/ini/stm32f1-maple.ini index d06e95750a..be7966be9d 100644 --- a/ini/stm32f1-maple.ini +++ b/ini/stm32f1-maple.ini @@ -352,7 +352,6 @@ build_flags = ${STM32F1_maple.build_flags} -DDEBUG_LEVEL=0 -DSS_TIMER=4 extends = STM32F1_maple platform_packages = tool-stm32duino board_build.address = 0x08005000 -board_build.offset = 0x5000 board_upload.maximum_size = 237568 build_flags = ${STM32F1_maple.build_flags} -D__STM32F1__=1 -DDEBUG_LEVEL=0 -DSS_TIMER=4 -DSERIAL_USB diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini index 05a549bec7..aa3b1dfc7c 100644 --- a/ini/stm32f4.ini +++ b/ini/stm32f4.ini @@ -269,7 +269,7 @@ build_unflags = ${env:BIGTREE_SKR_2_F429_USB.build_unflags} -Os -NDEBUG # # BigTreeTech Octopus V1.0/1.1 / Octopus Pro V1.0 (STM32F446ZET6 ARM Cortex-M4) # -[env:BIGTREE_OCTOPUS_V1] +[env:STM32F446ZE_btt] extends = stm32_variant board = marlin_BigTree_Octopus_v1 board_build.offset = 0x8000 @@ -282,8 +282,8 @@ build_flags = ${stm32_variant.build_flags} # # BigTreeTech Octopus V1.0/1.1 / Octopus Pro V1.0 (STM32F446ZET6 ARM Cortex-M4) with USB Flash Drive Support # -[env:BIGTREE_OCTOPUS_V1_USB] -extends = env:BIGTREE_OCTOPUS_V1 +[env:STM32F446ZE_btt_USB] +extends = env:STM32F446ZE_btt platform_packages = ${stm_flash_drive.platform_packages} build_unflags = -DUSBD_USE_CDC build_flags = ${stm_flash_drive.build_flags} @@ -293,9 +293,9 @@ build_flags = ${stm_flash_drive.build_flags} -DUSBD_USE_CDC_MSC # -# BigTreeTech Octopus Pro V1.0 (STM32F429ZGT6 ARM Cortex-M4) +# BigTreeTech Octopus V1.1 / Octopus Pro V1.0 (STM32F429ZGT6 ARM Cortex-M4) # -[env:BIGTREE_OCTOPUS_PRO_V1_F429] +[env:STM32F429ZG_btt] extends = stm32_variant board = marlin_BigTree_Octopus_Pro_v1_F429 board_build.offset = 0x8000 @@ -306,10 +306,10 @@ build_flags = ${stm32_variant.build_flags} -DUSE_USB_HS_IN_FS # -# BigTreeTech Octopus Pro V1.0 (STM32F429ZGT6 ARM Cortex-M4) with USB Flash Drive Support +# BigTreeTech Octopus V1.1 / Octopus Pro V1.0 (STM32F429ZGT6 ARM Cortex-M4) with USB Flash Drive Support # -[env:BIGTREE_OCTOPUS_PRO_V1_F429_USB] -extends = env:BIGTREE_OCTOPUS_PRO_V1_F429 +[env:STM32F429ZG_btt_USB] +extends = env:STM32F429ZG_btt platform_packages = ${stm_flash_drive.platform_packages} build_unflags = -DUSBD_USE_CDC build_flags = ${stm_flash_drive.build_flags} @@ -320,7 +320,7 @@ build_flags = ${stm_flash_drive.build_flags} # # BigTreeTech Octopus / Octopus Pro (STM32F407ZET6 ARM Cortex-M4) # -[env:BIGTREE_OCTOPUS_V1_F407] +[env:STM32F407ZE_btt] extends = stm32_variant board = marlin_STM32F407ZE board_build.offset = 0x8000 @@ -330,8 +330,8 @@ build_flags = ${stm32_variant.build_flags} # # BigTreeTech Octopus / Octopus Pro (STM32F407ZET6 ARM Cortex-M4) with USB Flash Drive Support # -[env:BIGTREE_OCTOPUS_V1_F407_USB] -extends = env:BIGTREE_OCTOPUS_V1_F407 +[env:STM32F407ZE_btt_USB] +extends = env:STM32F407ZE_btt platform_packages = ${stm_flash_drive.platform_packages} build_unflags = -DUSBD_USE_CDC build_flags = ${stm_flash_drive.build_flags} diff --git a/ini/stm32h7.ini b/ini/stm32h7.ini index d00d374c61..ff4a5b4c0b 100644 --- a/ini/stm32h7.ini +++ b/ini/stm32h7.ini @@ -44,8 +44,8 @@ debug_tool = cmsis-dap # [env:STM32H743Vx_btt] extends = stm32_variant -platform = ststm32@~15.4.1 -platform_packages = framework-arduinoststm32@~4.20200.220530 +platform = ststm32@15.4.1 +platform_packages = framework-arduinoststm32@4.20200.220530 board = marlin_STM32H743Vx board_build.offset = 0x20000 board_upload.offset_address = 0x08020000 @@ -59,3 +59,56 @@ build_flags = ${stm32_variant.build_flags} -DD_CACHE_DISABLED upload_protocol = cmsis-dap debug_tool = cmsis-dap + +# +# BigTreeTech SKR V3.0 / SKR V3.0 EZ (STM32H723VGT6 ARM Cortex-M7) +# BigTreeTech Octopus Max EZ V1.0 (STM32H723VET6 ARM Cortex-M7) +# +[env:STM32H723Vx_btt] +extends = stm32_variant +platform = ststm32@15.4.1 +platform_packages = framework-arduinoststm32@4.20200.220530 +board = marlin_STM32H723Vx +board_build.offset = 0x20000 +board_upload.offset_address = 0x08020000 +build_flags = ${stm32_variant.build_flags} + -DPIN_SERIAL1_RX=PA_10 -DPIN_SERIAL1_TX=PA_9 + -DPIN_SERIAL2_RX=PD_6 -DPIN_SERIAL2_TX=PD_5 + -DPIN_SERIAL3_RX=PD_9 -DPIN_SERIAL3_TX=PD_8 + -DPIN_SERIAL4_RX=PA_1 -DPIN_SERIAL4_TX=PA_0 + -DPIN_SERIAL7_RX=PE_7 -DPIN_SERIAL7_TX=PE_8 + -DSERIAL_RX_BUFFER_SIZE=1024 -DSERIAL_TX_BUFFER_SIZE=1024 + -DTIMER_SERVO=TIM5 -DTIMER_TONE=TIM2 + -DSTEP_TIMER_IRQ_PRIO=0 + -DRCC_PERIPHCLK_I2C35=RCC_PERIPHCLK_I2C5 + -DUSE_USB_HS -DUSE_USB_HS_IN_FS + -DD_CACHE_DISABLED + -UI2C5_BASE +upload_protocol = cmsis-dap +debug_tool = cmsis-dap + +# +# BigTreeTech Octopus Pro V1.0 / Octopus Max EZ V1.0 (STM32H723ZET6 ARM Cortex-M7) +# +[env:STM32H723Zx_btt] +extends = stm32_variant +platform = ststm32@15.4.1 +platform_packages = framework-arduinoststm32@4.20200.220530 +board = marlin_STM32H723Zx +board_build.offset = 0x20000 +board_upload.offset_address = 0x08020000 +build_flags = ${stm32_variant.build_flags} + -DPIN_SERIAL1_RX=PA_10 -DPIN_SERIAL1_TX=PA_9 + -DPIN_SERIAL2_RX=PD_6 -DPIN_SERIAL2_TX=PD_5 + -DPIN_SERIAL3_RX=PD_9 -DPIN_SERIAL3_TX=PD_8 + -DPIN_SERIAL4_RX=PA_1 -DPIN_SERIAL4_TX=PA_0 + -DPIN_SERIAL7_RX=PE_7 -DPIN_SERIAL7_TX=PE_8 + -DSERIAL_RX_BUFFER_SIZE=1024 -DSERIAL_TX_BUFFER_SIZE=1024 + -DTIMER_SERVO=TIM5 -DTIMER_TONE=TIM2 + -DSTEP_TIMER_IRQ_PRIO=0 + -DRCC_PERIPHCLK_I2C35=RCC_PERIPHCLK_I2C5 + -DUSE_USB_HS -DUSE_USB_HS_IN_FS + -DD_CACHE_DISABLED + -UI2C5_BASE +upload_protocol = cmsis-dap +debug_tool = cmsis-dap From 987923ecb4bddb0a5813cc7c5563eb69722b33d5 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sat, 11 Mar 2023 00:20:20 +0000 Subject: [PATCH 002/225] [cron] Bump distribution date (2023-03-11) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 154e1f9c4e..96b70234ed 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-03-10" +//#define STRING_DISTRIBUTION_DATE "2023-03-11" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index f1b0861dad..735f89a1fb 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-03-10" + #define STRING_DISTRIBUTION_DATE "2023-03-11" #endif /** From 3e12934ea0878c311b55c00766493f1b7cda0044 Mon Sep 17 00:00:00 2001 From: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Sat, 11 Mar 2023 00:08:07 -0800 Subject: [PATCH 003/225] =?UTF-8?q?=F0=9F=90=9B=20Fix=20Anet=20ET4=20SD=5F?= =?UTF-8?q?SS=5FPIN=20(#25492)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/stm32f4/pins_ANET_ET4.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Marlin/src/pins/stm32f4/pins_ANET_ET4.h b/Marlin/src/pins/stm32f4/pins_ANET_ET4.h index 01ca4560fe..7c6eaca812 100644 --- a/Marlin/src/pins/stm32f4/pins_ANET_ET4.h +++ b/Marlin/src/pins/stm32f4/pins_ANET_ET4.h @@ -206,6 +206,7 @@ #if DISABLED(SDIO_SUPPORT) #define SOFTWARE_SPI #define SDSS PC11 + #define SD_SS_PIN SDSS #define SD_SCK_PIN PC12 #define SD_MISO_PIN PC8 #define SD_MOSI_PIN PD2 From fe32582262a22d5e4111d14e47e087902fe3e9fd Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sun, 12 Mar 2023 00:24:43 +0000 Subject: [PATCH 004/225] [cron] Bump distribution date (2023-03-12) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 96b70234ed..614ee400b7 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-03-11" +//#define STRING_DISTRIBUTION_DATE "2023-03-12" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 735f89a1fb..ca975adb4e 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-03-11" + #define STRING_DISTRIBUTION_DATE "2023-03-12" #endif /** From 4527908c11be0f7a5f512f7235c0123b1e3f3e2a Mon Sep 17 00:00:00 2001 From: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Sat, 11 Mar 2023 17:44:56 -0800 Subject: [PATCH 005/225] =?UTF-8?q?BTT=20Octopus=20=E2=80=A6=20followup=20?= =?UTF-8?q?(#25495)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to #25387 --- ...ARLIN_STM32H723Zx.cpp => variant_MARLIN_STM32H723ZX.cpp} | 0 ...nt_MARLIN_STM32H723Zx.h => variant_MARLIN_STM32H723ZX.h} | 0 ini/stm32h7.ini | 6 +++--- 3 files changed, 3 insertions(+), 3 deletions(-) rename buildroot/share/PlatformIO/variants/MARLIN_H723Zx/{variant_MARLIN_STM32H723Zx.cpp => variant_MARLIN_STM32H723ZX.cpp} (100%) rename buildroot/share/PlatformIO/variants/MARLIN_H723Zx/{variant_MARLIN_STM32H723Zx.h => variant_MARLIN_STM32H723ZX.h} (100%) diff --git a/buildroot/share/PlatformIO/variants/MARLIN_H723Zx/variant_MARLIN_STM32H723Zx.cpp b/buildroot/share/PlatformIO/variants/MARLIN_H723Zx/variant_MARLIN_STM32H723ZX.cpp similarity index 100% rename from buildroot/share/PlatformIO/variants/MARLIN_H723Zx/variant_MARLIN_STM32H723Zx.cpp rename to buildroot/share/PlatformIO/variants/MARLIN_H723Zx/variant_MARLIN_STM32H723ZX.cpp diff --git a/buildroot/share/PlatformIO/variants/MARLIN_H723Zx/variant_MARLIN_STM32H723Zx.h b/buildroot/share/PlatformIO/variants/MARLIN_H723Zx/variant_MARLIN_STM32H723ZX.h similarity index 100% rename from buildroot/share/PlatformIO/variants/MARLIN_H723Zx/variant_MARLIN_STM32H723Zx.h rename to buildroot/share/PlatformIO/variants/MARLIN_H723Zx/variant_MARLIN_STM32H723ZX.h diff --git a/ini/stm32h7.ini b/ini/stm32h7.ini index ff4a5b4c0b..5733d35bf0 100644 --- a/ini/stm32h7.ini +++ b/ini/stm32h7.ini @@ -45,7 +45,7 @@ debug_tool = cmsis-dap [env:STM32H743Vx_btt] extends = stm32_variant platform = ststm32@15.4.1 -platform_packages = framework-arduinoststm32@4.20200.220530 +platform_packages = framework-arduinoststm32@~4.20200.220530 board = marlin_STM32H743Vx board_build.offset = 0x20000 board_upload.offset_address = 0x08020000 @@ -67,7 +67,7 @@ debug_tool = cmsis-dap [env:STM32H723Vx_btt] extends = stm32_variant platform = ststm32@15.4.1 -platform_packages = framework-arduinoststm32@4.20200.220530 +platform_packages = framework-arduinoststm32@~4.20200.220530 board = marlin_STM32H723Vx board_build.offset = 0x20000 board_upload.offset_address = 0x08020000 @@ -93,7 +93,7 @@ debug_tool = cmsis-dap [env:STM32H723Zx_btt] extends = stm32_variant platform = ststm32@15.4.1 -platform_packages = framework-arduinoststm32@4.20200.220530 +platform_packages = framework-arduinoststm32@~4.20200.220530 board = marlin_STM32H723Zx board_build.offset = 0x20000 board_upload.offset_address = 0x08020000 From cb66bff9246534c11acea192deae4ab6281b64c6 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 11 Mar 2023 19:17:25 -0600 Subject: [PATCH 006/225] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20Exit=20from=20ISR?= =?UTF-8?q?=20on=20AVR=20already=20does=20sei?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: tombrazier <68918209+tombrazier@users.noreply.github.com> --- Marlin/src/module/stepper.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index d0398b404c..b54b9668ea 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -1600,8 +1600,11 @@ void Stepper::isr() { // Set the next ISR to fire at the proper time HAL_timer_set_compare(MF_TIMER_STEP, hal_timer_t(next_isr_ticks)); - // Don't forget to finally reenable interrupts - hal.isr_on(); + // Don't forget to finally reenable interrupts on non-AVR. + // AVR automatically calls sei() for us on Return-from-Interrupt. + #ifndef __AVR__ + hal.isr_on(); + #endif } #if MINIMUM_STEPPER_PULSE || MAXIMUM_STEPPER_RATE From f9d3939d2331b785c59924538f1d248d5ad23a58 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 11 Mar 2023 18:51:37 -0600 Subject: [PATCH 007/225] =?UTF-8?q?=F0=9F=8E=A8=20Cosmetic=20stepper=20upd?= =?UTF-8?q?ates?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: tombrazier <68918209+tombrazier@users.noreply.github.com> --- Marlin/Configuration_adv.h | 18 +- Marlin/src/core/types.h | 65 ++--- Marlin/src/module/stepper.cpp | 60 ++-- Marlin/src/module/stepper.h | 28 +- Marlin/src/module/stepper/speed_lookuptable.h | 256 +++++++++--------- 5 files changed, 218 insertions(+), 209 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index abb238e33e..f3f7a4c255 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -4042,16 +4042,16 @@ * Sample debug features * If you add more debug displays, be careful to avoid conflicts! */ - #define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning - #define MAX7219_DEBUG_PLANNER_HEAD 2 // Show the planner queue head position on this and the next LED matrix row - #define MAX7219_DEBUG_PLANNER_TAIL 4 // Show the planner queue tail position on this and the next LED matrix row + #define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning + #define MAX7219_DEBUG_PLANNER_HEAD 2 // Show the planner queue head position on this and the next LED matrix row + #define MAX7219_DEBUG_PLANNER_TAIL 4 // Show the planner queue tail position on this and the next LED matrix row - #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row - // If you experience stuttering, reboots, etc. this option can reveal how - // tweaks made to the configuration are affecting the printer in real-time. - #define MAX7219_DEBUG_PROFILE 6 // Display the fraction of CPU time spent in profiled code on this LED matrix - // row. By default idle() is profiled so this shows how "idle" the processor is. - // See class CodeProfiler. + #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row + // If you experience stuttering, reboots, etc. this option can reveal how + // tweaks made to the configuration are affecting the printer in real-time. + #define MAX7219_DEBUG_PROFILE 6 // Display the fraction of CPU time spent in profiled code on this LED matrix + // row. By default idle() is profiled so this shows how "idle" the processor is. + // See class CodeProfiler. #endif /** diff --git a/Marlin/src/core/types.h b/Marlin/src/core/types.h index 4e3d7f0782..15d572af60 100644 --- a/Marlin/src/core/types.h +++ b/Marlin/src/core/types.h @@ -84,6 +84,13 @@ template struct IF { typedef L type; }; #define AXIS_COLLISION(L) (AXIS4_NAME == L || AXIS5_NAME == L || AXIS6_NAME == L || AXIS7_NAME == L || AXIS8_NAME == L || AXIS9_NAME == L) +// Helpers +#define _RECIP(N) ((N) ? 1.0f / static_cast(N) : 0.0f) +#define _ABS(N) ((N) < 0 ? -(N) : (N)) +#define _LS(N) (N = (T)(uint32_t(N) << p)) +#define _RS(N) (N = (T)(uint32_t(N) >> p)) +#define FI FORCE_INLINE + // Define types based on largest bit width stored value required #define bits_t(W) typename IF<((W)> 16), uint32_t, typename IF<((W)> 8), uint16_t, uint8_t>::type>::type #define uvalue_t(V) typename IF<((V)>65535), uint32_t, typename IF<((V)>255), uint16_t, uint8_t>::type>::type @@ -101,28 +108,30 @@ struct Flags { flagbits_t b; typename IF<(N>16), N32, typename IF<(N>8), N16, N8>::type>::type flag; }; - void reset() { b = 0; } - void set(const int n, const bool onoff) { onoff ? set(n) : clear(n); } - void set(const int n) { b |= (flagbits_t)_BV(n); } - void clear(const int n) { b &= ~(flagbits_t)_BV(n); } - bool test(const int n) const { return TEST(b, n); } - bool operator[](const int n) { return test(n); } - bool operator[](const int n) const { return test(n); } - int size() const { return sizeof(b); } + FI void reset() { b = 0; } + FI void set(const int n, const bool onoff) { onoff ? set(n) : clear(n); } + FI void set(const int n) { b |= (flagbits_t)_BV(n); } + FI void clear(const int n) { b &= ~(flagbits_t)_BV(n); } + FI bool test(const int n) const { return TEST(b, n); } + FI bool operator[](const int n) { return test(n); } + FI bool operator[](const int n) const { return test(n); } + FI int size() const { return sizeof(b); } + FI operator bool() const { return b; } }; // Specialization for a single bool flag template<> struct Flags<1> { bool b; - void reset() { b = false; } - void set(const int n, const bool onoff) { onoff ? set(n) : clear(n); } - void set(const int) { b = true; } - void clear(const int) { b = false; } - bool test(const int) const { return b; } - bool& operator[](const int) { return b; } - bool operator[](const int) const { return b; } - int size() const { return sizeof(b); } + FI void reset() { b = false; } + FI void set(const int n, const bool onoff) { onoff ? set(n) : clear(n); } + FI void set(const int) { b = true; } + FI void clear(const int) { b = false; } + FI bool test(const int) const { return b; } + FI bool& operator[](const int) { return b; } + FI bool operator[](const int) const { return b; } + FI int size() const { return sizeof(b); } + FI operator bool() const { return b; } }; typedef Flags<8> flags_8_t; @@ -134,14 +143,15 @@ typedef struct AxisFlags { struct Flags flags; struct { bool LOGICAL_AXIS_LIST(e:1, x:1, y:1, z:1, i:1, j:1, k:1, u:1, v:1, w:1); }; }; - void reset() { flags.reset(); } - void set(const int n) { flags.set(n); } - void set(const int n, const bool onoff) { flags.set(n, onoff); } - void clear(const int n) { flags.clear(n); } - bool test(const int n) const { return flags.test(n); } - bool operator[](const int n) { return flags[n]; } - bool operator[](const int n) const { return flags[n]; } - int size() const { return sizeof(flags); } + FI void reset() { flags.reset(); } + FI void set(const int n) { flags.set(n); } + FI void set(const int n, const bool onoff) { flags.set(n, onoff); } + FI void clear(const int n) { flags.clear(n); } + FI bool test(const int n) const { return flags.test(n); } + FI bool operator[](const int n) { return flags[n]; } + FI bool operator[](const int n) const { return flags[n]; } + FI int size() const { return sizeof(flags); } + FI operator bool() const { return flags; } } axis_flags_t; // @@ -230,13 +240,6 @@ typedef const_float_t const_celsius_float_t; // Coordinates structures for XY, XYZ, XYZE... // -// Helpers -#define _RECIP(N) ((N) ? 1.0f / static_cast(N) : 0.0f) -#define _ABS(N) ((N) < 0 ? -(N) : (N)) -#define _LS(N) (N = (T)(uint32_t(N) << p)) -#define _RS(N) (N = (T)(uint32_t(N) >> p)) -#define FI FORCE_INLINE - // Forward declarations template struct XYval; template struct XYZval; diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index b54b9668ea..700cdd377b 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -189,7 +189,7 @@ bool Stepper::abort_current_block; #endif uint32_t Stepper::acceleration_time, Stepper::deceleration_time; -uint8_t Stepper::steps_per_isr; +uint8_t Stepper::steps_per_isr; // Count of steps to perform per Stepper ISR call #if ENABLED(FREEZE_FEATURE) bool Stepper::frozen; // = false @@ -1996,7 +1996,7 @@ void Stepper::pulse_phase_isr() { void Stepper::shaping_isr() { xy_bool_t step_needed{0}; - // Clear the echoes that are ready to process. If the buffers are too full and risk overflo, also apply echoes early. + // Clear the echoes that are ready to process. If the buffers are too full and risk overflow, also apply echoes early. TERN_(INPUT_SHAPING_X, step_needed[X_AXIS] = !ShapingQueue::peek_x() || ShapingQueue::free_count_x() < steps_per_isr); TERN_(INPUT_SHAPING_Y, step_needed[Y_AXIS] = !ShapingQueue::peek_y() || ShapingQueue::free_count_y() < steps_per_isr); @@ -2047,39 +2047,45 @@ void Stepper::pulse_phase_isr() { // Calculate timer interval, with all limits applied. uint32_t Stepper::calc_timer_interval(uint32_t step_rate) { + #ifdef CPU_32_BIT - // In case of high-performance processor, it is able to calculate in real-time - return uint32_t(STEPPER_TIMER_RATE) / step_rate; + + return uint32_t(STEPPER_TIMER_RATE) / step_rate; // A fast processor can just do integer division + #else + // AVR is able to keep up at 30khz Stepping ISR rate. - constexpr uint32_t min_step_rate = (F_CPU) / 500000U; - if (step_rate <= min_step_rate) { + constexpr uint32_t min_step_rate = (F_CPU) / 500000U; // i.e., 32 or 40 + if (step_rate <= min_step_rate) { // lower step rates step_rate = 0; - uintptr_t table_address = (uintptr_t)&speed_lookuptable_slow[0][0]; - return uint16_t(pgm_read_word(table_address)); + return uint16_t(pgm_read_word(uintptr_t(speed_lookuptable_slow))); } else { step_rate -= min_step_rate; // Correct for minimal speed if (step_rate >= 0x0800) { // higher step rate - const uint8_t rate_mod_256 = (step_rate & 0x00FF); - const uintptr_t table_address = uintptr_t(&speed_lookuptable_fast[uint8_t(step_rate >> 8)][0]), - gain = uint16_t(pgm_read_word(table_address + 2)); - return uint16_t(pgm_read_word(table_address)) - MultiU8X16toH16(rate_mod_256, gain); + const uintptr_t table_address = uintptr_t(&speed_lookuptable_fast[uint8_t(step_rate >> 8)]); + const uint16_t gain = uint16_t(pgm_read_word(table_address + 2)); + return uint16_t(pgm_read_word(table_address)) - MultiU8X16toH16(uint8_t(step_rate & 0x00FF), gain); } else { // lower step rates - uintptr_t table_address = uintptr_t(&speed_lookuptable_slow[0][0]); - table_address += (step_rate >> 1) & 0xFFFC; + const uintptr_t table_address = uintptr_t(&speed_lookuptable_slow[uint8_t(step_rate >> 3)]); return uint16_t(pgm_read_word(table_address)) - ((uint16_t(pgm_read_word(table_address + 2)) * uint8_t(step_rate & 0x0007)) >> 3); } } - #endif + + #endif // !CPU_32_BIT } // Get the timer interval and the number of loops to perform per tick uint32_t Stepper::calc_timer_interval(uint32_t step_rate, uint8_t &loops) { uint8_t multistep = 1; - #if DISABLED(DISABLE_MULTI_STEPPING) + #if ENABLED(DISABLE_MULTI_STEPPING) + + // Just make sure the step rate is doable + NOMORE(step_rate, uint32_t(MAX_STEP_ISR_FREQUENCY_1X)); + + #else // The stepping frequency limits for each multistepping rate static const uint32_t limit[] PROGMEM = { @@ -2100,18 +2106,18 @@ uint32_t Stepper::calc_timer_interval(uint32_t step_rate, uint8_t &loops) { multistep <<= 1; ++idx; }; - #else - NOMORE(step_rate, uint32_t(MAX_STEP_ISR_FREQUENCY_1X)); + #endif loops = multistep; return calc_timer_interval(step_rate); } -// This is the last half of the stepper interrupt: This one processes and -// properly schedules blocks from the planner. This is executed after creating -// the step pulses, so it is not time critical, as pulses are already done. - +/** + * This last phase of the stepper interrupt processes and properly + * schedules planner blocks. This is executed after the step pulses + * have been done, so it is less time critical. + */ uint32_t Stepper::block_phase_isr() { // If no queued movements, just wait 1ms for the next block @@ -2555,7 +2561,7 @@ uint32_t Stepper::block_phase_isr() { if (stepper_extruder != last_moved_extruder) la_advance_steps = 0; #endif if (current_block->la_advance_rate) { - // apply LA scaling and discount the effect of frequency scaling + // Apply LA scaling and discount the effect of frequency scaling la_dividend = (advance_dividend.e << current_block->la_scaling) << oversampling_factor; } #endif @@ -2597,7 +2603,7 @@ uint32_t Stepper::block_phase_isr() { if (current_block->steps.z) enable_axis(Z_AXIS); #endif - // Mark the time_nominal as not calculated yet + // Mark ticks_nominal as not-yet-calculated ticks_nominal = -1; #if ENABLED(S_CURVE_ACCELERATION) @@ -2635,8 +2641,8 @@ uint32_t Stepper::block_phase_isr() { // the acceleration and speed values calculated in block_phase_isr(). // This helps keep LA in sync with, for example, S_CURVE_ACCELERATION. la_delta_error += la_dividend; - const bool step_needed = la_delta_error >= 0; - if (step_needed) { + const bool e_step_needed = la_delta_error >= 0; + if (e_step_needed) { count_position.e += count_direction.e; la_advance_steps += count_direction.e; la_delta_error -= advance_divisor; @@ -2647,7 +2653,7 @@ uint32_t Stepper::block_phase_isr() { TERN_(I2S_STEPPER_STREAM, i2s_push_sample()); - if (step_needed) { + if (e_step_needed) { // Enforce a minimum duration for STEP pulse ON #if ISR_PULSE_CONTROL USING_TIMED_PULSE(); diff --git a/Marlin/src/module/stepper.h b/Marlin/src/module/stepper.h index 05f609c9f3..3a3e45dccc 100644 --- a/Marlin/src/module/stepper.h +++ b/Marlin/src/module/stepper.h @@ -217,10 +217,10 @@ // The loop takes the base time plus the time for all the bresenham logic for R pulses plus the time // between pulses for (R-1) pulses. But the user could be enforcing a minimum time so the loop time is: -#define ISR_LOOP_CYCLES(R) ((ISR_LOOP_BASE_CYCLES + MIN_ISR_LOOP_CYCLES + MIN_STEPPER_PULSE_CYCLES) * (R - 1) + _MAX(MIN_ISR_LOOP_CYCLES, MIN_STEPPER_PULSE_CYCLES)) +#define ISR_LOOP_CYCLES(R) ((ISR_LOOP_BASE_CYCLES + MIN_ISR_LOOP_CYCLES + MIN_STEPPER_PULSE_CYCLES) * ((1UL << R) - 1) + _MAX(MIN_ISR_LOOP_CYCLES, MIN_STEPPER_PULSE_CYCLES)) // Model input shaping as an extra loop call -#define ISR_SHAPING_LOOP_CYCLES(R) TERN0(HAS_SHAPING, (R) * ((ISR_LOOP_BASE_CYCLES) + TERN0(INPUT_SHAPING_X, ISR_X_STEPPER_CYCLES) + TERN0(INPUT_SHAPING_Y, ISR_Y_STEPPER_CYCLES))) +#define ISR_SHAPING_LOOP_CYCLES(R) (TERN0(HAS_SHAPING, ((ISR_LOOP_BASE_CYCLES) + TERN0(INPUT_SHAPING_X, ISR_X_STEPPER_CYCLES) + TERN0(INPUT_SHAPING_Y, ISR_Y_STEPPER_CYCLES)) << R)) // If linear advance is enabled, then it is handled separately #if ENABLED(LIN_ADVANCE) @@ -245,17 +245,17 @@ #endif // Now estimate the total ISR execution time in cycles given a step per ISR multiplier -#define ISR_EXECUTION_CYCLES(R) (((ISR_BASE_CYCLES + ISR_S_CURVE_CYCLES + ISR_SHAPING_BASE_CYCLES + ISR_LOOP_CYCLES(R) + ISR_SHAPING_LOOP_CYCLES(R) + ISR_LA_BASE_CYCLES + ISR_LA_LOOP_CYCLES)) / (R)) +#define ISR_EXECUTION_CYCLES(R) (((ISR_BASE_CYCLES + ISR_S_CURVE_CYCLES + ISR_SHAPING_BASE_CYCLES + ISR_LOOP_CYCLES(R) + ISR_SHAPING_LOOP_CYCLES(R) + ISR_LA_BASE_CYCLES + ISR_LA_LOOP_CYCLES)) >> R) // The maximum allowable stepping frequency when doing x128-x1 stepping (in Hz) -#define MAX_STEP_ISR_FREQUENCY_128X ((F_CPU) / ISR_EXECUTION_CYCLES(128)) -#define MAX_STEP_ISR_FREQUENCY_64X ((F_CPU) / ISR_EXECUTION_CYCLES(64)) -#define MAX_STEP_ISR_FREQUENCY_32X ((F_CPU) / ISR_EXECUTION_CYCLES(32)) -#define MAX_STEP_ISR_FREQUENCY_16X ((F_CPU) / ISR_EXECUTION_CYCLES(16)) -#define MAX_STEP_ISR_FREQUENCY_8X ((F_CPU) / ISR_EXECUTION_CYCLES(8)) -#define MAX_STEP_ISR_FREQUENCY_4X ((F_CPU) / ISR_EXECUTION_CYCLES(4)) -#define MAX_STEP_ISR_FREQUENCY_2X ((F_CPU) / ISR_EXECUTION_CYCLES(2)) -#define MAX_STEP_ISR_FREQUENCY_1X ((F_CPU) / ISR_EXECUTION_CYCLES(1)) +#define MAX_STEP_ISR_FREQUENCY_128X ((F_CPU) / ISR_EXECUTION_CYCLES(7)) +#define MAX_STEP_ISR_FREQUENCY_64X ((F_CPU) / ISR_EXECUTION_CYCLES(6)) +#define MAX_STEP_ISR_FREQUENCY_32X ((F_CPU) / ISR_EXECUTION_CYCLES(5)) +#define MAX_STEP_ISR_FREQUENCY_16X ((F_CPU) / ISR_EXECUTION_CYCLES(4)) +#define MAX_STEP_ISR_FREQUENCY_8X ((F_CPU) / ISR_EXECUTION_CYCLES(3)) +#define MAX_STEP_ISR_FREQUENCY_4X ((F_CPU) / ISR_EXECUTION_CYCLES(2)) +#define MAX_STEP_ISR_FREQUENCY_2X ((F_CPU) / ISR_EXECUTION_CYCLES(1)) +#define MAX_STEP_ISR_FREQUENCY_1X ((F_CPU) / ISR_EXECUTION_CYCLES(0)) // The minimum step ISR rate used by ADAPTIVE_STEP_SMOOTHING to target 50% CPU usage // This does not account for the possibility of multi-stepping. @@ -459,8 +459,6 @@ constexpr ena_mask_t enable_overlap[] = { // Stepper class definition // class Stepper { - friend class KinematicSystem; - friend class DeltaKinematicSystem; friend void stepperTask(void *); public: @@ -810,8 +808,10 @@ class Stepper { // Set the current position in steps static void _set_position(const abce_long_t &spos); - // Calculate timing interval for the given step rate + // Calculate the timing interval for the given step rate static uint32_t calc_timer_interval(uint32_t step_rate); + + // Calculate timing interval and steps-per-ISR for the given step rate static uint32_t calc_timer_interval(uint32_t step_rate, uint8_t &loops); #if ENABLED(S_CURVE_ACCELERATION) diff --git a/Marlin/src/module/stepper/speed_lookuptable.h b/Marlin/src/module/stepper/speed_lookuptable.h index b173ebec08..0b4205ea57 100644 --- a/Marlin/src/module/stepper/speed_lookuptable.h +++ b/Marlin/src/module/stepper/speed_lookuptable.h @@ -24,145 +24,145 @@ #if F_CPU == 16000000 const uint16_t speed_lookuptable_fast[256][2] PROGMEM = { - { 62500, 55556}, { 6944, 3268}, { 3676, 1176}, { 2500, 607}, { 1893, 369}, { 1524, 249}, { 1275, 179}, { 1096, 135}, - { 961, 105}, { 856, 85}, { 771, 69}, { 702, 58}, { 644, 49}, { 595, 42}, { 553, 37}, { 516, 32}, - { 484, 28}, { 456, 25}, { 431, 23}, { 408, 20}, { 388, 19}, { 369, 16}, { 353, 16}, { 337, 14}, - { 323, 13}, { 310, 11}, { 299, 11}, { 288, 11}, { 277, 9}, { 268, 9}, { 259, 8}, { 251, 8}, - { 243, 8}, { 235, 7}, { 228, 6}, { 222, 6}, { 216, 6}, { 210, 6}, { 204, 5}, { 199, 5}, - { 194, 5}, { 189, 4}, { 185, 4}, { 181, 4}, { 177, 4}, { 173, 4}, { 169, 4}, { 165, 3}, - { 162, 3}, { 159, 4}, { 155, 3}, { 152, 3}, { 149, 2}, { 147, 3}, { 144, 3}, { 141, 2}, - { 139, 3}, { 136, 2}, { 134, 2}, { 132, 3}, { 129, 2}, { 127, 2}, { 125, 2}, { 123, 2}, - { 121, 2}, { 119, 1}, { 118, 2}, { 116, 2}, { 114, 1}, { 113, 2}, { 111, 2}, { 109, 1}, - { 108, 2}, { 106, 1}, { 105, 2}, { 103, 1}, { 102, 1}, { 101, 1}, { 100, 2}, { 98, 1}, - { 97, 1}, { 96, 1}, { 95, 2}, { 93, 1}, { 92, 1}, { 91, 1}, { 90, 1}, { 89, 1}, - { 88, 1}, { 87, 1}, { 86, 1}, { 85, 1}, { 84, 1}, { 83, 0}, { 83, 1}, { 82, 1}, - { 81, 1}, { 80, 1}, { 79, 1}, { 78, 0}, { 78, 1}, { 77, 1}, { 76, 1}, { 75, 0}, - { 75, 1}, { 74, 1}, { 73, 1}, { 72, 0}, { 72, 1}, { 71, 1}, { 70, 0}, { 70, 1}, - { 69, 0}, { 69, 1}, { 68, 1}, { 67, 0}, { 67, 1}, { 66, 0}, { 66, 1}, { 65, 0}, - { 65, 1}, { 64, 1}, { 63, 0}, { 63, 1}, { 62, 0}, { 62, 1}, { 61, 0}, { 61, 1}, - { 60, 0}, { 60, 0}, { 60, 1}, { 59, 0}, { 59, 1}, { 58, 0}, { 58, 1}, { 57, 0}, - { 57, 1}, { 56, 0}, { 56, 0}, { 56, 1}, { 55, 0}, { 55, 1}, { 54, 0}, { 54, 0}, - { 54, 1}, { 53, 0}, { 53, 0}, { 53, 1}, { 52, 0}, { 52, 0}, { 52, 1}, { 51, 0}, - { 51, 0}, { 51, 1}, { 50, 0}, { 50, 0}, { 50, 1}, { 49, 0}, { 49, 0}, { 49, 1}, - { 48, 0}, { 48, 0}, { 48, 1}, { 47, 0}, { 47, 0}, { 47, 0}, { 47, 1}, { 46, 0}, - { 46, 0}, { 46, 1}, { 45, 0}, { 45, 0}, { 45, 0}, { 45, 1}, { 44, 0}, { 44, 0}, - { 44, 0}, { 44, 1}, { 43, 0}, { 43, 0}, { 43, 0}, { 43, 1}, { 42, 0}, { 42, 0}, - { 42, 0}, { 42, 1}, { 41, 0}, { 41, 0}, { 41, 0}, { 41, 0}, { 41, 1}, { 40, 0}, - { 40, 0}, { 40, 0}, { 40, 0}, { 40, 1}, { 39, 0}, { 39, 0}, { 39, 0}, { 39, 0}, - { 39, 1}, { 38, 0}, { 38, 0}, { 38, 0}, { 38, 0}, { 38, 1}, { 37, 0}, { 37, 0}, - { 37, 0}, { 37, 0}, { 37, 0}, { 37, 1}, { 36, 0}, { 36, 0}, { 36, 0}, { 36, 0}, - { 36, 1}, { 35, 0}, { 35, 0}, { 35, 0}, { 35, 0}, { 35, 0}, { 35, 0}, { 35, 1}, - { 34, 0}, { 34, 0}, { 34, 0}, { 34, 0}, { 34, 0}, { 34, 1}, { 33, 0}, { 33, 0}, - { 33, 0}, { 33, 0}, { 33, 0}, { 33, 0}, { 33, 1}, { 32, 0}, { 32, 0}, { 32, 0}, - { 32, 0}, { 32, 0}, { 32, 0}, { 32, 0}, { 32, 1}, { 31, 0}, { 31, 0}, { 31, 0}, - { 31, 0}, { 31, 0}, { 31, 0}, { 31, 1}, { 30, 0}, { 30, 0}, { 30, 0}, { 30, 0} + { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, // dummy first row + { 961, 105 }, { 856, 85 }, { 771, 69 }, { 702, 58 }, { 644, 49 }, { 595, 42 }, { 553, 37 }, { 516, 32 }, + { 484, 28 }, { 456, 25 }, { 431, 23 }, { 408, 20 }, { 388, 19 }, { 369, 16 }, { 353, 16 }, { 337, 14 }, + { 323, 13 }, { 310, 11 }, { 299, 11 }, { 288, 11 }, { 277, 9 }, { 268, 9 }, { 259, 8 }, { 251, 8 }, + { 243, 8 }, { 235, 7 }, { 228, 6 }, { 222, 6 }, { 216, 6 }, { 210, 6 }, { 204, 5 }, { 199, 5 }, + { 194, 5 }, { 189, 4 }, { 185, 4 }, { 181, 4 }, { 177, 4 }, { 173, 4 }, { 169, 4 }, { 165, 3 }, + { 162, 3 }, { 159, 4 }, { 155, 3 }, { 152, 3 }, { 149, 2 }, { 147, 3 }, { 144, 3 }, { 141, 2 }, + { 139, 3 }, { 136, 2 }, { 134, 2 }, { 132, 3 }, { 129, 2 }, { 127, 2 }, { 125, 2 }, { 123, 2 }, + { 121, 2 }, { 119, 1 }, { 118, 2 }, { 116, 2 }, { 114, 1 }, { 113, 2 }, { 111, 2 }, { 109, 1 }, + { 108, 2 }, { 106, 1 }, { 105, 2 }, { 103, 1 }, { 102, 1 }, { 101, 1 }, { 100, 2 }, { 98, 1 }, + { 97, 1 }, { 96, 1 }, { 95, 2 }, { 93, 1 }, { 92, 1 }, { 91, 1 }, { 90, 1 }, { 89, 1 }, + { 88, 1 }, { 87, 1 }, { 86, 1 }, { 85, 1 }, { 84, 1 }, { 83, 0 }, { 83, 1 }, { 82, 1 }, + { 81, 1 }, { 80, 1 }, { 79, 1 }, { 78, 0 }, { 78, 1 }, { 77, 1 }, { 76, 1 }, { 75, 0 }, + { 75, 1 }, { 74, 1 }, { 73, 1 }, { 72, 0 }, { 72, 1 }, { 71, 1 }, { 70, 0 }, { 70, 1 }, + { 69, 0 }, { 69, 1 }, { 68, 1 }, { 67, 0 }, { 67, 1 }, { 66, 0 }, { 66, 1 }, { 65, 0 }, + { 65, 1 }, { 64, 1 }, { 63, 0 }, { 63, 1 }, { 62, 0 }, { 62, 1 }, { 61, 0 }, { 61, 1 }, + { 60, 0 }, { 60, 0 }, { 60, 1 }, { 59, 0 }, { 59, 1 }, { 58, 0 }, { 58, 1 }, { 57, 0 }, + { 57, 1 }, { 56, 0 }, { 56, 0 }, { 56, 1 }, { 55, 0 }, { 55, 1 }, { 54, 0 }, { 54, 0 }, + { 54, 1 }, { 53, 0 }, { 53, 0 }, { 53, 1 }, { 52, 0 }, { 52, 0 }, { 52, 1 }, { 51, 0 }, + { 51, 0 }, { 51, 1 }, { 50, 0 }, { 50, 0 }, { 50, 1 }, { 49, 0 }, { 49, 0 }, { 49, 1 }, + { 48, 0 }, { 48, 0 }, { 48, 1 }, { 47, 0 }, { 47, 0 }, { 47, 0 }, { 47, 1 }, { 46, 0 }, + { 46, 0 }, { 46, 1 }, { 45, 0 }, { 45, 0 }, { 45, 0 }, { 45, 1 }, { 44, 0 }, { 44, 0 }, + { 44, 0 }, { 44, 1 }, { 43, 0 }, { 43, 0 }, { 43, 0 }, { 43, 1 }, { 42, 0 }, { 42, 0 }, + { 42, 0 }, { 42, 1 }, { 41, 0 }, { 41, 0 }, { 41, 0 }, { 41, 0 }, { 41, 1 }, { 40, 0 }, + { 40, 0 }, { 40, 0 }, { 40, 0 }, { 40, 1 }, { 39, 0 }, { 39, 0 }, { 39, 0 }, { 39, 0 }, + { 39, 1 }, { 38, 0 }, { 38, 0 }, { 38, 0 }, { 38, 0 }, { 38, 1 }, { 37, 0 }, { 37, 0 }, + { 37, 0 }, { 37, 0 }, { 37, 0 }, { 37, 1 }, { 36, 0 }, { 36, 0 }, { 36, 0 }, { 36, 0 }, + { 36, 1 }, { 35, 0 }, { 35, 0 }, { 35, 0 }, { 35, 0 }, { 35, 0 }, { 35, 0 }, { 35, 1 }, + { 34, 0 }, { 34, 0 }, { 34, 0 }, { 34, 0 }, { 34, 0 }, { 34, 1 }, { 33, 0 }, { 33, 0 }, + { 33, 0 }, { 33, 0 }, { 33, 0 }, { 33, 0 }, { 33, 1 }, { 32, 0 }, { 32, 0 }, { 32, 0 }, + { 32, 0 }, { 32, 0 }, { 32, 0 }, { 32, 0 }, { 32, 1 }, { 31, 0 }, { 31, 0 }, { 31, 0 }, + { 31, 0 }, { 31, 0 }, { 31, 0 }, { 31, 1 }, { 30, 0 }, { 30, 0 }, { 30, 0 }, { 30, 0 } }; const uint16_t speed_lookuptable_slow[256][2] PROGMEM = { - { 62500, 12500}, { 50000, 8334}, { 41666, 5952}, { 35714, 4464}, { 31250, 3473}, { 27777, 2777}, { 25000, 2273}, { 22727, 1894}, - { 20833, 1603}, { 19230, 1373}, { 17857, 1191}, { 16666, 1041}, { 15625, 920}, { 14705, 817}, { 13888, 731}, { 13157, 657}, - { 12500, 596}, { 11904, 541}, { 11363, 494}, { 10869, 453}, { 10416, 416}, { 10000, 385}, { 9615, 356}, { 9259, 331}, - { 8928, 308}, { 8620, 287}, { 8333, 269}, { 8064, 252}, { 7812, 237}, { 7575, 223}, { 7352, 210}, { 7142, 198}, - { 6944, 188}, { 6756, 178}, { 6578, 168}, { 6410, 160}, { 6250, 153}, { 6097, 145}, { 5952, 139}, { 5813, 132}, - { 5681, 126}, { 5555, 121}, { 5434, 115}, { 5319, 111}, { 5208, 106}, { 5102, 102}, { 5000, 99}, { 4901, 94}, - { 4807, 91}, { 4716, 87}, { 4629, 84}, { 4545, 81}, { 4464, 79}, { 4385, 75}, { 4310, 73}, { 4237, 71}, - { 4166, 68}, { 4098, 66}, { 4032, 64}, { 3968, 62}, { 3906, 60}, { 3846, 59}, { 3787, 56}, { 3731, 55}, - { 3676, 53}, { 3623, 52}, { 3571, 50}, { 3521, 49}, { 3472, 48}, { 3424, 46}, { 3378, 45}, { 3333, 44}, - { 3289, 43}, { 3246, 41}, { 3205, 41}, { 3164, 39}, { 3125, 39}, { 3086, 38}, { 3048, 36}, { 3012, 36}, - { 2976, 35}, { 2941, 35}, { 2906, 33}, { 2873, 33}, { 2840, 32}, { 2808, 31}, { 2777, 30}, { 2747, 30}, - { 2717, 29}, { 2688, 29}, { 2659, 28}, { 2631, 27}, { 2604, 27}, { 2577, 26}, { 2551, 26}, { 2525, 25}, - { 2500, 25}, { 2475, 25}, { 2450, 23}, { 2427, 24}, { 2403, 23}, { 2380, 22}, { 2358, 22}, { 2336, 22}, - { 2314, 21}, { 2293, 21}, { 2272, 20}, { 2252, 20}, { 2232, 20}, { 2212, 20}, { 2192, 19}, { 2173, 18}, - { 2155, 19}, { 2136, 18}, { 2118, 18}, { 2100, 17}, { 2083, 17}, { 2066, 17}, { 2049, 17}, { 2032, 16}, - { 2016, 16}, { 2000, 16}, { 1984, 16}, { 1968, 15}, { 1953, 16}, { 1937, 14}, { 1923, 15}, { 1908, 15}, - { 1893, 14}, { 1879, 14}, { 1865, 14}, { 1851, 13}, { 1838, 14}, { 1824, 13}, { 1811, 13}, { 1798, 13}, - { 1785, 12}, { 1773, 13}, { 1760, 12}, { 1748, 12}, { 1736, 12}, { 1724, 12}, { 1712, 12}, { 1700, 11}, - { 1689, 12}, { 1677, 11}, { 1666, 11}, { 1655, 11}, { 1644, 11}, { 1633, 10}, { 1623, 11}, { 1612, 10}, - { 1602, 10}, { 1592, 10}, { 1582, 10}, { 1572, 10}, { 1562, 10}, { 1552, 9}, { 1543, 10}, { 1533, 9}, - { 1524, 9}, { 1515, 9}, { 1506, 9}, { 1497, 9}, { 1488, 9}, { 1479, 9}, { 1470, 9}, { 1461, 8}, - { 1453, 8}, { 1445, 9}, { 1436, 8}, { 1428, 8}, { 1420, 8}, { 1412, 8}, { 1404, 8}, { 1396, 8}, - { 1388, 7}, { 1381, 8}, { 1373, 7}, { 1366, 8}, { 1358, 7}, { 1351, 7}, { 1344, 8}, { 1336, 7}, - { 1329, 7}, { 1322, 7}, { 1315, 7}, { 1308, 6}, { 1302, 7}, { 1295, 7}, { 1288, 6}, { 1282, 7}, - { 1275, 6}, { 1269, 7}, { 1262, 6}, { 1256, 6}, { 1250, 7}, { 1243, 6}, { 1237, 6}, { 1231, 6}, - { 1225, 6}, { 1219, 6}, { 1213, 6}, { 1207, 6}, { 1201, 5}, { 1196, 6}, { 1190, 6}, { 1184, 5}, - { 1179, 6}, { 1173, 5}, { 1168, 6}, { 1162, 5}, { 1157, 5}, { 1152, 6}, { 1146, 5}, { 1141, 5}, - { 1136, 5}, { 1131, 5}, { 1126, 5}, { 1121, 5}, { 1116, 5}, { 1111, 5}, { 1106, 5}, { 1101, 5}, - { 1096, 5}, { 1091, 5}, { 1086, 4}, { 1082, 5}, { 1077, 5}, { 1072, 4}, { 1068, 5}, { 1063, 4}, - { 1059, 5}, { 1054, 4}, { 1050, 4}, { 1046, 5}, { 1041, 4}, { 1037, 4}, { 1033, 5}, { 1028, 4}, - { 1024, 4}, { 1020, 4}, { 1016, 4}, { 1012, 4}, { 1008, 4}, { 1004, 4}, { 1000, 4}, { 996, 4}, - { 992, 4}, { 988, 4}, { 984, 4}, { 980, 4}, { 976, 4}, { 972, 4}, { 968, 3}, { 965, 3} + { 62500, 12500 }, { 50000, 8334 }, { 41666, 5952 }, { 35714, 4464 }, { 31250, 3473 }, { 27777, 2777 }, { 25000, 2273 }, { 22727, 1894 }, + { 20833, 1603 }, { 19230, 1373 }, { 17857, 1191 }, { 16666, 1041 }, { 15625, 920 }, { 14705, 817 }, { 13888, 731 }, { 13157, 657 }, + { 12500, 596 }, { 11904, 541 }, { 11363, 494 }, { 10869, 453 }, { 10416, 416 }, { 10000, 385 }, { 9615, 356 }, { 9259, 331 }, + { 8928, 308 }, { 8620, 287 }, { 8333, 269 }, { 8064, 252 }, { 7812, 237 }, { 7575, 223 }, { 7352, 210 }, { 7142, 198 }, + { 6944, 188 }, { 6756, 178 }, { 6578, 168 }, { 6410, 160 }, { 6250, 153 }, { 6097, 145 }, { 5952, 139 }, { 5813, 132 }, + { 5681, 126 }, { 5555, 121 }, { 5434, 115 }, { 5319, 111 }, { 5208, 106 }, { 5102, 102 }, { 5000, 99 }, { 4901, 94 }, + { 4807, 91 }, { 4716, 87 }, { 4629, 84 }, { 4545, 81 }, { 4464, 79 }, { 4385, 75 }, { 4310, 73 }, { 4237, 71 }, + { 4166, 68 }, { 4098, 66 }, { 4032, 64 }, { 3968, 62 }, { 3906, 60 }, { 3846, 59 }, { 3787, 56 }, { 3731, 55 }, + { 3676, 53 }, { 3623, 52 }, { 3571, 50 }, { 3521, 49 }, { 3472, 48 }, { 3424, 46 }, { 3378, 45 }, { 3333, 44 }, + { 3289, 43 }, { 3246, 41 }, { 3205, 41 }, { 3164, 39 }, { 3125, 39 }, { 3086, 38 }, { 3048, 36 }, { 3012, 36 }, + { 2976, 35 }, { 2941, 35 }, { 2906, 33 }, { 2873, 33 }, { 2840, 32 }, { 2808, 31 }, { 2777, 30 }, { 2747, 30 }, + { 2717, 29 }, { 2688, 29 }, { 2659, 28 }, { 2631, 27 }, { 2604, 27 }, { 2577, 26 }, { 2551, 26 }, { 2525, 25 }, + { 2500, 25 }, { 2475, 25 }, { 2450, 23 }, { 2427, 24 }, { 2403, 23 }, { 2380, 22 }, { 2358, 22 }, { 2336, 22 }, + { 2314, 21 }, { 2293, 21 }, { 2272, 20 }, { 2252, 20 }, { 2232, 20 }, { 2212, 20 }, { 2192, 19 }, { 2173, 18 }, + { 2155, 19 }, { 2136, 18 }, { 2118, 18 }, { 2100, 17 }, { 2083, 17 }, { 2066, 17 }, { 2049, 17 }, { 2032, 16 }, + { 2016, 16 }, { 2000, 16 }, { 1984, 16 }, { 1968, 15 }, { 1953, 16 }, { 1937, 14 }, { 1923, 15 }, { 1908, 15 }, + { 1893, 14 }, { 1879, 14 }, { 1865, 14 }, { 1851, 13 }, { 1838, 14 }, { 1824, 13 }, { 1811, 13 }, { 1798, 13 }, + { 1785, 12 }, { 1773, 13 }, { 1760, 12 }, { 1748, 12 }, { 1736, 12 }, { 1724, 12 }, { 1712, 12 }, { 1700, 11 }, + { 1689, 12 }, { 1677, 11 }, { 1666, 11 }, { 1655, 11 }, { 1644, 11 }, { 1633, 10 }, { 1623, 11 }, { 1612, 10 }, + { 1602, 10 }, { 1592, 10 }, { 1582, 10 }, { 1572, 10 }, { 1562, 10 }, { 1552, 9 }, { 1543, 10 }, { 1533, 9 }, + { 1524, 9 }, { 1515, 9 }, { 1506, 9 }, { 1497, 9 }, { 1488, 9 }, { 1479, 9 }, { 1470, 9 }, { 1461, 8 }, + { 1453, 8 }, { 1445, 9 }, { 1436, 8 }, { 1428, 8 }, { 1420, 8 }, { 1412, 8 }, { 1404, 8 }, { 1396, 8 }, + { 1388, 7 }, { 1381, 8 }, { 1373, 7 }, { 1366, 8 }, { 1358, 7 }, { 1351, 7 }, { 1344, 8 }, { 1336, 7 }, + { 1329, 7 }, { 1322, 7 }, { 1315, 7 }, { 1308, 6 }, { 1302, 7 }, { 1295, 7 }, { 1288, 6 }, { 1282, 7 }, + { 1275, 6 }, { 1269, 7 }, { 1262, 6 }, { 1256, 6 }, { 1250, 7 }, { 1243, 6 }, { 1237, 6 }, { 1231, 6 }, + { 1225, 6 }, { 1219, 6 }, { 1213, 6 }, { 1207, 6 }, { 1201, 5 }, { 1196, 6 }, { 1190, 6 }, { 1184, 5 }, + { 1179, 6 }, { 1173, 5 }, { 1168, 6 }, { 1162, 5 }, { 1157, 5 }, { 1152, 6 }, { 1146, 5 }, { 1141, 5 }, + { 1136, 5 }, { 1131, 5 }, { 1126, 5 }, { 1121, 5 }, { 1116, 5 }, { 1111, 5 }, { 1106, 5 }, { 1101, 5 }, + { 1096, 5 }, { 1091, 5 }, { 1086, 4 }, { 1082, 5 }, { 1077, 5 }, { 1072, 4 }, { 1068, 5 }, { 1063, 4 }, + { 1059, 5 }, { 1054, 4 }, { 1050, 4 }, { 1046, 5 }, { 1041, 4 }, { 1037, 4 }, { 1033, 5 }, { 1028, 4 }, + { 1024, 4 }, { 1020, 4 }, { 1016, 4 }, { 1012, 4 }, { 1008, 4 }, { 1004, 4 }, { 1000, 4 }, { 996, 4 }, + { 992, 4 }, { 988, 4 }, { 984, 4 }, { 980, 4 }, { 976, 4 }, { 972, 4 }, { 968, 3 }, { 965, 3 } }; #elif F_CPU == 20000000 const uint16_t speed_lookuptable_fast[256][2] PROGMEM = { - {62500, 54055}, {8445, 3917}, {4528, 1434}, {3094, 745}, {2349, 456}, {1893, 307}, {1586, 222}, {1364, 167}, - {1197, 131}, {1066, 105}, {961, 86}, {875, 72}, {803, 61}, {742, 53}, {689, 45}, {644, 40}, - {604, 35}, {569, 32}, {537, 28}, {509, 25}, {484, 23}, {461, 21}, {440, 19}, {421, 17}, - {404, 16}, {388, 15}, {373, 14}, {359, 13}, {346, 12}, {334, 11}, {323, 10}, {313, 10}, - {303, 9}, {294, 9}, {285, 8}, {277, 7}, {270, 8}, {262, 7}, {255, 6}, {249, 6}, - {243, 6}, {237, 6}, {231, 5}, {226, 5}, {221, 5}, {216, 5}, {211, 4}, {207, 5}, - {202, 4}, {198, 4}, {194, 4}, {190, 3}, {187, 4}, {183, 3}, {180, 3}, {177, 4}, - {173, 3}, {170, 3}, {167, 2}, {165, 3}, {162, 3}, {159, 2}, {157, 3}, {154, 2}, - {152, 3}, {149, 2}, {147, 2}, {145, 2}, {143, 2}, {141, 2}, {139, 2}, {137, 2}, - {135, 2}, {133, 2}, {131, 2}, {129, 1}, {128, 2}, {126, 2}, {124, 1}, {123, 2}, - {121, 1}, {120, 2}, {118, 1}, {117, 1}, {116, 2}, {114, 1}, {113, 1}, {112, 2}, - {110, 1}, {109, 1}, {108, 1}, {107, 2}, {105, 1}, {104, 1}, {103, 1}, {102, 1}, - {101, 1}, {100, 1}, {99, 1}, {98, 1}, {97, 1}, {96, 1}, {95, 1}, {94, 1}, - {93, 1}, {92, 1}, {91, 0}, {91, 1}, {90, 1}, {89, 1}, {88, 1}, {87, 0}, - {87, 1}, {86, 1}, {85, 1}, {84, 0}, {84, 1}, {83, 1}, {82, 1}, {81, 0}, - {81, 1}, {80, 1}, {79, 0}, {79, 1}, {78, 0}, {78, 1}, {77, 1}, {76, 0}, - {76, 1}, {75, 0}, {75, 1}, {74, 1}, {73, 0}, {73, 1}, {72, 0}, {72, 1}, - {71, 0}, {71, 1}, {70, 0}, {70, 1}, {69, 0}, {69, 1}, {68, 0}, {68, 1}, - {67, 0}, {67, 1}, {66, 0}, {66, 1}, {65, 0}, {65, 0}, {65, 1}, {64, 0}, - {64, 1}, {63, 0}, {63, 1}, {62, 0}, {62, 0}, {62, 1}, {61, 0}, {61, 1}, - {60, 0}, {60, 0}, {60, 1}, {59, 0}, {59, 0}, {59, 1}, {58, 0}, {58, 0}, - {58, 1}, {57, 0}, {57, 0}, {57, 1}, {56, 0}, {56, 0}, {56, 1}, {55, 0}, - {55, 0}, {55, 1}, {54, 0}, {54, 0}, {54, 1}, {53, 0}, {53, 0}, {53, 0}, - {53, 1}, {52, 0}, {52, 0}, {52, 1}, {51, 0}, {51, 0}, {51, 0}, {51, 1}, - {50, 0}, {50, 0}, {50, 0}, {50, 1}, {49, 0}, {49, 0}, {49, 0}, {49, 1}, - {48, 0}, {48, 0}, {48, 0}, {48, 1}, {47, 0}, {47, 0}, {47, 0}, {47, 1}, - {46, 0}, {46, 0}, {46, 0}, {46, 0}, {46, 1}, {45, 0}, {45, 0}, {45, 0}, - {45, 1}, {44, 0}, {44, 0}, {44, 0}, {44, 0}, {44, 1}, {43, 0}, {43, 0}, - {43, 0}, {43, 0}, {43, 1}, {42, 0}, {42, 0}, {42, 0}, {42, 0}, {42, 0}, - {42, 1}, {41, 0}, {41, 0}, {41, 0}, {41, 0}, {41, 0}, {41, 1}, {40, 0}, - {40, 0}, {40, 0}, {40, 0}, {40, 1}, {39, 0}, {39, 0}, {39, 0}, {39, 0}, - {39, 0}, {39, 0}, {39, 1}, {38, 0}, {38, 0}, {38, 0}, {38, 0}, {38, 0}, + { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, // dummy first row + { 1197, 131 }, { 1066, 105 }, { 961, 86 }, { 875, 72 }, { 803, 61 }, { 742, 53 }, { 689, 45 }, { 644, 40 }, + { 604, 35 }, { 569, 32 }, { 537, 28 }, { 509, 25 }, { 484, 23 }, { 461, 21 }, { 440, 19 }, { 421, 17 }, + { 404, 16 }, { 388, 15 }, { 373, 14 }, { 359, 13 }, { 346, 12 }, { 334, 11 }, { 323, 10 }, { 313, 10 }, + { 303, 9 }, { 294, 9 }, { 285, 8 }, { 277, 7 }, { 270, 8 }, { 262, 7 }, { 255, 6 }, { 249, 6 }, + { 243, 6 }, { 237, 6 }, { 231, 5 }, { 226, 5 }, { 221, 5 }, { 216, 5 }, { 211, 4 }, { 207, 5 }, + { 202, 4 }, { 198, 4 }, { 194, 4 }, { 190, 3 }, { 187, 4 }, { 183, 3 }, { 180, 3 }, { 177, 4 }, + { 173, 3 }, { 170, 3 }, { 167, 2 }, { 165, 3 }, { 162, 3 }, { 159, 2 }, { 157, 3 }, { 154, 2 }, + { 152, 3 }, { 149, 2 }, { 147, 2 }, { 145, 2 }, { 143, 2 }, { 141, 2 }, { 139, 2 }, { 137, 2 }, + { 135, 2 }, { 133, 2 }, { 131, 2 }, { 129, 1 }, { 128, 2 }, { 126, 2 }, { 124, 1 }, { 123, 2 }, + { 121, 1 }, { 120, 2 }, { 118, 1 }, { 117, 1 }, { 116, 2 }, { 114, 1 }, { 113, 1 }, { 112, 2 }, + { 110, 1 }, { 109, 1 }, { 108, 1 }, { 107, 2 }, { 105, 1 }, { 104, 1 }, { 103, 1 }, { 102, 1 }, + { 101, 1 }, { 100, 1 }, { 99, 1 }, { 98, 1 }, { 97, 1 }, { 96, 1 }, { 95, 1 }, { 94, 1 }, + { 93, 1 }, { 92, 1 }, { 91, 0 }, { 91, 1 }, { 90, 1 }, { 89, 1 }, { 88, 1 }, { 87, 0 }, + { 87, 1 }, { 86, 1 }, { 85, 1 }, { 84, 0 }, { 84, 1 }, { 83, 1 }, { 82, 1 }, { 81, 0 }, + { 81, 1 }, { 80, 1 }, { 79, 0 }, { 79, 1 }, { 78, 0 }, { 78, 1 }, { 77, 1 }, { 76, 0 }, + { 76, 1 }, { 75, 0 }, { 75, 1 }, { 74, 1 }, { 73, 0 }, { 73, 1 }, { 72, 0 }, { 72, 1 }, + { 71, 0 }, { 71, 1 }, { 70, 0 }, { 70, 1 }, { 69, 0 }, { 69, 1 }, { 68, 0 }, { 68, 1 }, + { 67, 0 }, { 67, 1 }, { 66, 0 }, { 66, 1 }, { 65, 0 }, { 65, 0 }, { 65, 1 }, { 64, 0 }, + { 64, 1 }, { 63, 0 }, { 63, 1 }, { 62, 0 }, { 62, 0 }, { 62, 1 }, { 61, 0 }, { 61, 1 }, + { 60, 0 }, { 60, 0 }, { 60, 1 }, { 59, 0 }, { 59, 0 }, { 59, 1 }, { 58, 0 }, { 58, 0 }, + { 58, 1 }, { 57, 0 }, { 57, 0 }, { 57, 1 }, { 56, 0 }, { 56, 0 }, { 56, 1 }, { 55, 0 }, + { 55, 0 }, { 55, 1 }, { 54, 0 }, { 54, 0 }, { 54, 1 }, { 53, 0 }, { 53, 0 }, { 53, 0 }, + { 53, 1 }, { 52, 0 }, { 52, 0 }, { 52, 1 }, { 51, 0 }, { 51, 0 }, { 51, 0 }, { 51, 1 }, + { 50, 0 }, { 50, 0 }, { 50, 0 }, { 50, 1 }, { 49, 0 }, { 49, 0 }, { 49, 0 }, { 49, 1 }, + { 48, 0 }, { 48, 0 }, { 48, 0 }, { 48, 1 }, { 47, 0 }, { 47, 0 }, { 47, 0 }, { 47, 1 }, + { 46, 0 }, { 46, 0 }, { 46, 0 }, { 46, 0 }, { 46, 1 }, { 45, 0 }, { 45, 0 }, { 45, 0 }, + { 45, 1 }, { 44, 0 }, { 44, 0 }, { 44, 0 }, { 44, 0 }, { 44, 1 }, { 43, 0 }, { 43, 0 }, + { 43, 0 }, { 43, 0 }, { 43, 1 }, { 42, 0 }, { 42, 0 }, { 42, 0 }, { 42, 0 }, { 42, 0 }, + { 42, 1 }, { 41, 0 }, { 41, 0 }, { 41, 0 }, { 41, 0 }, { 41, 0 }, { 41, 1 }, { 40, 0 }, + { 40, 0 }, { 40, 0 }, { 40, 0 }, { 40, 1 }, { 39, 0 }, { 39, 0 }, { 39, 0 }, { 39, 0 }, + { 39, 0 }, { 39, 0 }, { 39, 1 }, { 38, 0 }, { 38, 0 }, { 38, 0 }, { 38, 0 }, { 38, 0 }, }; const uint16_t speed_lookuptable_slow[256][2] PROGMEM = { - {62500, 10417}, {52083, 7441}, {44642, 5580}, {39062, 4340}, {34722, 3472}, {31250, 2841}, {28409, 2368}, {26041, 2003}, - {24038, 1717}, {22321, 1488}, {20833, 1302}, {19531, 1149}, {18382, 1021}, {17361, 914}, {16447, 822}, {15625, 745}, - {14880, 676}, {14204, 618}, {13586, 566}, {13020, 520}, {12500, 481}, {12019, 445}, {11574, 414}, {11160, 385}, - {10775, 359}, {10416, 336}, {10080, 315}, {9765, 296}, {9469, 278}, {9191, 263}, {8928, 248}, {8680, 235}, - {8445, 222}, {8223, 211}, {8012, 200}, {7812, 191}, {7621, 181}, {7440, 173}, {7267, 165}, {7102, 158}, - {6944, 151}, {6793, 145}, {6648, 138}, {6510, 133}, {6377, 127}, {6250, 123}, {6127, 118}, {6009, 113}, - {5896, 109}, {5787, 106}, {5681, 101}, {5580, 98}, {5482, 95}, {5387, 91}, {5296, 88}, {5208, 86}, - {5122, 82}, {5040, 80}, {4960, 78}, {4882, 75}, {4807, 73}, {4734, 70}, {4664, 69}, {4595, 67}, - {4528, 64}, {4464, 63}, {4401, 61}, {4340, 60}, {4280, 58}, {4222, 56}, {4166, 55}, {4111, 53}, - {4058, 52}, {4006, 51}, {3955, 49}, {3906, 48}, {3858, 48}, {3810, 45}, {3765, 45}, {3720, 44}, - {3676, 43}, {3633, 42}, {3591, 40}, {3551, 40}, {3511, 39}, {3472, 38}, {3434, 38}, {3396, 36}, - {3360, 36}, {3324, 35}, {3289, 34}, {3255, 34}, {3221, 33}, {3188, 32}, {3156, 31}, {3125, 31}, - {3094, 31}, {3063, 30}, {3033, 29}, {3004, 28}, {2976, 28}, {2948, 28}, {2920, 27}, {2893, 27}, - {2866, 26}, {2840, 25}, {2815, 25}, {2790, 25}, {2765, 24}, {2741, 24}, {2717, 24}, {2693, 23}, - {2670, 22}, {2648, 22}, {2626, 22}, {2604, 22}, {2582, 21}, {2561, 21}, {2540, 20}, {2520, 20}, - {2500, 20}, {2480, 20}, {2460, 19}, {2441, 19}, {2422, 19}, {2403, 18}, {2385, 18}, {2367, 18}, - {2349, 17}, {2332, 18}, {2314, 17}, {2297, 16}, {2281, 17}, {2264, 16}, {2248, 16}, {2232, 16}, - {2216, 16}, {2200, 15}, {2185, 15}, {2170, 15}, {2155, 15}, {2140, 15}, {2125, 14}, {2111, 14}, - {2097, 14}, {2083, 14}, {2069, 14}, {2055, 13}, {2042, 13}, {2029, 13}, {2016, 13}, {2003, 13}, - {1990, 13}, {1977, 12}, {1965, 12}, {1953, 13}, {1940, 11}, {1929, 12}, {1917, 12}, {1905, 12}, - {1893, 11}, {1882, 11}, {1871, 11}, {1860, 11}, {1849, 11}, {1838, 11}, {1827, 11}, {1816, 10}, - {1806, 11}, {1795, 10}, {1785, 10}, {1775, 10}, {1765, 10}, {1755, 10}, {1745, 9}, {1736, 10}, - {1726, 9}, {1717, 10}, {1707, 9}, {1698, 9}, {1689, 9}, {1680, 9}, {1671, 9}, {1662, 9}, - {1653, 9}, {1644, 8}, {1636, 9}, {1627, 8}, {1619, 9}, {1610, 8}, {1602, 8}, {1594, 8}, - {1586, 8}, {1578, 8}, {1570, 8}, {1562, 8}, {1554, 7}, {1547, 8}, {1539, 8}, {1531, 7}, - {1524, 8}, {1516, 7}, {1509, 7}, {1502, 7}, {1495, 7}, {1488, 7}, {1481, 7}, {1474, 7}, - {1467, 7}, {1460, 7}, {1453, 7}, {1446, 6}, {1440, 7}, {1433, 7}, {1426, 6}, {1420, 6}, - {1414, 7}, {1407, 6}, {1401, 6}, {1395, 7}, {1388, 6}, {1382, 6}, {1376, 6}, {1370, 6}, - {1364, 6}, {1358, 6}, {1352, 6}, {1346, 5}, {1341, 6}, {1335, 6}, {1329, 5}, {1324, 6}, - {1318, 5}, {1313, 6}, {1307, 5}, {1302, 6}, {1296, 5}, {1291, 5}, {1286, 6}, {1280, 5}, - {1275, 5}, {1270, 5}, {1265, 5}, {1260, 5}, {1255, 5}, {1250, 5}, {1245, 5}, {1240, 5}, - {1235, 5}, {1230, 5}, {1225, 5}, {1220, 5}, {1215, 4}, {1211, 5}, {1206, 5}, {1201, 5}, + { 62500, 10417 }, { 52083, 7441 }, { 44642, 5580 }, { 39062, 4340 }, { 34722, 3472 }, { 31250, 2841 }, { 28409, 2368 }, { 26041, 2003 }, + { 24038, 1717 }, { 22321, 1488 }, { 20833, 1302 }, { 19531, 1149 }, { 18382, 1021 }, { 17361, 914 }, { 16447, 822 }, { 15625, 745 }, + { 14880, 676 }, { 14204, 618 }, { 13586, 566 }, { 13020, 520 }, { 12500, 481 }, { 12019, 445 }, { 11574, 414 }, { 11160, 385 }, + { 10775, 359 }, { 10416, 336 }, { 10080, 315 }, { 9765, 296 }, { 9469, 278 }, { 9191, 263 }, { 8928, 248 }, { 8680, 235 }, + { 8445, 222 }, { 8223, 211 }, { 8012, 200 }, { 7812, 191 }, { 7621, 181 }, { 7440, 173 }, { 7267, 165 }, { 7102, 158 }, + { 6944, 151 }, { 6793, 145 }, { 6648, 138 }, { 6510, 133 }, { 6377, 127 }, { 6250, 123 }, { 6127, 118 }, { 6009, 113 }, + { 5896, 109 }, { 5787, 106 }, { 5681, 101 }, { 5580, 98 }, { 5482, 95 }, { 5387, 91 }, { 5296, 88 }, { 5208, 86 }, + { 5122, 82 }, { 5040, 80 }, { 4960, 78 }, { 4882, 75 }, { 4807, 73 }, { 4734, 70 }, { 4664, 69 }, { 4595, 67 }, + { 4528, 64 }, { 4464, 63 }, { 4401, 61 }, { 4340, 60 }, { 4280, 58 }, { 4222, 56 }, { 4166, 55 }, { 4111, 53 }, + { 4058, 52 }, { 4006, 51 }, { 3955, 49 }, { 3906, 48 }, { 3858, 48 }, { 3810, 45 }, { 3765, 45 }, { 3720, 44 }, + { 3676, 43 }, { 3633, 42 }, { 3591, 40 }, { 3551, 40 }, { 3511, 39 }, { 3472, 38 }, { 3434, 38 }, { 3396, 36 }, + { 3360, 36 }, { 3324, 35 }, { 3289, 34 }, { 3255, 34 }, { 3221, 33 }, { 3188, 32 }, { 3156, 31 }, { 3125, 31 }, + { 3094, 31 }, { 3063, 30 }, { 3033, 29 }, { 3004, 28 }, { 2976, 28 }, { 2948, 28 }, { 2920, 27 }, { 2893, 27 }, + { 2866, 26 }, { 2840, 25 }, { 2815, 25 }, { 2790, 25 }, { 2765, 24 }, { 2741, 24 }, { 2717, 24 }, { 2693, 23 }, + { 2670, 22 }, { 2648, 22 }, { 2626, 22 }, { 2604, 22 }, { 2582, 21 }, { 2561, 21 }, { 2540, 20 }, { 2520, 20 }, + { 2500, 20 }, { 2480, 20 }, { 2460, 19 }, { 2441, 19 }, { 2422, 19 }, { 2403, 18 }, { 2385, 18 }, { 2367, 18 }, + { 2349, 17 }, { 2332, 18 }, { 2314, 17 }, { 2297, 16 }, { 2281, 17 }, { 2264, 16 }, { 2248, 16 }, { 2232, 16 }, + { 2216, 16 }, { 2200, 15 }, { 2185, 15 }, { 2170, 15 }, { 2155, 15 }, { 2140, 15 }, { 2125, 14 }, { 2111, 14 }, + { 2097, 14 }, { 2083, 14 }, { 2069, 14 }, { 2055, 13 }, { 2042, 13 }, { 2029, 13 }, { 2016, 13 }, { 2003, 13 }, + { 1990, 13 }, { 1977, 12 }, { 1965, 12 }, { 1953, 13 }, { 1940, 11 }, { 1929, 12 }, { 1917, 12 }, { 1905, 12 }, + { 1893, 11 }, { 1882, 11 }, { 1871, 11 }, { 1860, 11 }, { 1849, 11 }, { 1838, 11 }, { 1827, 11 }, { 1816, 10 }, + { 1806, 11 }, { 1795, 10 }, { 1785, 10 }, { 1775, 10 }, { 1765, 10 }, { 1755, 10 }, { 1745, 9 }, { 1736, 10 }, + { 1726, 9 }, { 1717, 10 }, { 1707, 9 }, { 1698, 9 }, { 1689, 9 }, { 1680, 9 }, { 1671, 9 }, { 1662, 9 }, + { 1653, 9 }, { 1644, 8 }, { 1636, 9 }, { 1627, 8 }, { 1619, 9 }, { 1610, 8 }, { 1602, 8 }, { 1594, 8 }, + { 1586, 8 }, { 1578, 8 }, { 1570, 8 }, { 1562, 8 }, { 1554, 7 }, { 1547, 8 }, { 1539, 8 }, { 1531, 7 }, + { 1524, 8 }, { 1516, 7 }, { 1509, 7 }, { 1502, 7 }, { 1495, 7 }, { 1488, 7 }, { 1481, 7 }, { 1474, 7 }, + { 1467, 7 }, { 1460, 7 }, { 1453, 7 }, { 1446, 6 }, { 1440, 7 }, { 1433, 7 }, { 1426, 6 }, { 1420, 6 }, + { 1414, 7 }, { 1407, 6 }, { 1401, 6 }, { 1395, 7 }, { 1388, 6 }, { 1382, 6 }, { 1376, 6 }, { 1370, 6 }, + { 1364, 6 }, { 1358, 6 }, { 1352, 6 }, { 1346, 5 }, { 1341, 6 }, { 1335, 6 }, { 1329, 5 }, { 1324, 6 }, + { 1318, 5 }, { 1313, 6 }, { 1307, 5 }, { 1302, 6 }, { 1296, 5 }, { 1291, 5 }, { 1286, 6 }, { 1280, 5 }, + { 1275, 5 }, { 1270, 5 }, { 1265, 5 }, { 1260, 5 }, { 1255, 5 }, { 1250, 5 }, { 1245, 5 }, { 1240, 5 }, + { 1235, 5 }, { 1230, 5 }, { 1225, 5 }, { 1220, 5 }, { 1215, 4 }, { 1211, 5 }, { 1206, 5 }, { 1201, 5 }, }; #endif From 4fdb0fbe8e8e8187d05bf56e8ee8e2a138120a4c Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 11 Mar 2023 19:53:32 -0600 Subject: [PATCH 008/225] =?UTF-8?q?=E2=9C=A8=20MAX7219=5FDEBUG=5FMULTISTEP?= =?UTF-8?q?PING?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: tombrazier <68918209+tombrazier@users.noreply.github.com> --- Marlin/Configuration_adv.h | 1 + Marlin/src/feature/max7219.cpp | 14 ++++++++++++++ Marlin/src/module/stepper.h | 1 + 3 files changed, 16 insertions(+) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index f3f7a4c255..35e7363423 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -4052,6 +4052,7 @@ #define MAX7219_DEBUG_PROFILE 6 // Display the fraction of CPU time spent in profiled code on this LED matrix // row. By default idle() is profiled so this shows how "idle" the processor is. // See class CodeProfiler. + //#define MAX7219_DEBUG_MULTISTEPPING 6 // Show multistepping 1 to 128 on this LED matrix row. #endif /** diff --git a/Marlin/src/feature/max7219.cpp b/Marlin/src/feature/max7219.cpp index 83d161d1fe..efc992f80f 100644 --- a/Marlin/src/feature/max7219.cpp +++ b/Marlin/src/feature/max7219.cpp @@ -44,6 +44,7 @@ #include "max7219.h" #include "../module/planner.h" +#include "../module/stepper.h" #include "../MarlinCore.h" #include "../HAL/shared/Delay.h" @@ -723,6 +724,19 @@ void Max7219::idle_tasks() { } #endif + #ifdef MAX7219_DEBUG_MULTISTEPPING + static uint8_t last_multistepping = 0; + const uint8_t multistepping = Stepper::steps_per_isr; + if (multistepping != last_multistepping) { + static uint8_t log2_old = 0; + uint8_t log2_new = 0; + for (uint8_t val = multistepping; val > 1; val >>= 1) log2_new++; + mark16(MAX7219_DEBUG_MULTISTEPPING, log2_old, log2_new, &row_change_mask); + last_multistepping = multistepping; + log2_old = log2_new; + } + #endif + // batch line updates suspended--; if (!suspended) diff --git a/Marlin/src/module/stepper.h b/Marlin/src/module/stepper.h index 3a3e45dccc..33f45b9ae1 100644 --- a/Marlin/src/module/stepper.h +++ b/Marlin/src/module/stepper.h @@ -459,6 +459,7 @@ constexpr ena_mask_t enable_overlap[] = { // Stepper class definition // class Stepper { + friend class Max7219; friend void stepperTask(void *); public: From 194f58740a34c8aa8daebf21baf614c6f1eec518 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 11 Mar 2023 19:08:13 -0600 Subject: [PATCH 009/225] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20Use=20hal=5Ftimer?= =?UTF-8?q?=5Ft=20for=20timing=20vars?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: tombrazier <68918209+tombrazier@users.noreply.github.com> --- Marlin/src/module/stepper.cpp | 36 +++++++++++++++++------------------ Marlin/src/module/stepper.h | 26 ++++++++++++------------- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index 700cdd377b..a3183c1b12 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -225,11 +225,11 @@ uint32_t Stepper::advance_divisor = 0, #endif #if ENABLED(LIN_ADVANCE) - uint32_t Stepper::nextAdvanceISR = LA_ADV_NEVER, - Stepper::la_interval = LA_ADV_NEVER; - int32_t Stepper::la_delta_error = 0, - Stepper::la_dividend = 0, - Stepper::la_advance_steps = 0; + hal_timer_t Stepper::nextAdvanceISR = LA_ADV_NEVER, + Stepper::la_interval = LA_ADV_NEVER; + int32_t Stepper::la_delta_error = 0, + Stepper::la_dividend = 0, + Stepper::la_advance_steps = 0; #endif #if HAS_SHAPING @@ -255,14 +255,14 @@ uint32_t Stepper::advance_divisor = 0, #endif #if ENABLED(INTEGRATED_BABYSTEPPING) - uint32_t Stepper::nextBabystepISR = BABYSTEP_NEVER; + hal_timer_t Stepper::nextBabystepISR = BABYSTEP_NEVER; #endif #if ENABLED(DIRECT_STEPPING) page_step_state_t Stepper::page_step_state; #endif -int32_t Stepper::ticks_nominal = -1; +hal_timer_t Stepper::ticks_nominal = 0; #if DISABLED(S_CURVE_ACCELERATION) uint32_t Stepper::acc_step_rate; // needed for deceleration start point #endif @@ -1462,7 +1462,7 @@ HAL_STEP_TIMER_ISR() { void Stepper::isr() { - static uint32_t nextMainISR = 0; // Interval until the next main Stepper Pulse phase (0 = Now) + static hal_timer_t nextMainISR = 0; // Interval until the next main Stepper Pulse phase (0 = Now) #ifndef __AVR__ // Disable interrupts, to avoid ISR preemption while we reprogram the period @@ -1518,8 +1518,8 @@ void Stepper::isr() { #endif // Get the interval to the next ISR call - const uint32_t interval = _MIN( - uint32_t(HAL_TIMER_TYPE_MAX), // Come back in a very long time + const hal_timer_t interval = _MIN( + hal_timer_t(HAL_TIMER_TYPE_MAX), // Come back in a very long time nextMainISR // Time until the next Pulse / Block phase OPTARG(INPUT_SHAPING_X, ShapingQueue::peek_x()) // Time until next input shaping echo for X OPTARG(INPUT_SHAPING_Y, ShapingQueue::peek_y()) // Time until next input shaping echo for Y @@ -1598,7 +1598,7 @@ void Stepper::isr() { // sure that the time has not arrived yet - Warrantied by the scheduler // Set the next ISR to fire at the proper time - HAL_timer_set_compare(MF_TIMER_STEP, hal_timer_t(next_isr_ticks)); + HAL_timer_set_compare(MF_TIMER_STEP, next_isr_ticks); // Don't forget to finally reenable interrupts on non-AVR. // AVR automatically calls sei() for us on Return-from-Interrupt. @@ -2046,7 +2046,7 @@ void Stepper::pulse_phase_isr() { #endif // HAS_SHAPING // Calculate timer interval, with all limits applied. -uint32_t Stepper::calc_timer_interval(uint32_t step_rate) { +hal_timer_t Stepper::calc_timer_interval(uint32_t step_rate) { #ifdef CPU_32_BIT @@ -2078,7 +2078,7 @@ uint32_t Stepper::calc_timer_interval(uint32_t step_rate) { } // Get the timer interval and the number of loops to perform per tick -uint32_t Stepper::calc_timer_interval(uint32_t step_rate, uint8_t &loops) { +hal_timer_t Stepper::calc_timer_interval(uint32_t step_rate, uint8_t &loops) { uint8_t multistep = 1; #if ENABLED(DISABLE_MULTI_STEPPING) @@ -2118,10 +2118,10 @@ uint32_t Stepper::calc_timer_interval(uint32_t step_rate, uint8_t &loops) { * schedules planner blocks. This is executed after the step pulses * have been done, so it is less time critical. */ -uint32_t Stepper::block_phase_isr() { +hal_timer_t Stepper::block_phase_isr() { // If no queued movements, just wait 1ms for the next block - uint32_t interval = (STEPPER_TIMER_RATE) / 1000UL; + hal_timer_t interval = (STEPPER_TIMER_RATE) / 1000UL; // If there is a current block if (current_block) { @@ -2296,7 +2296,7 @@ uint32_t Stepper::block_phase_isr() { else { // Must be in cruise phase otherwise // Calculate the ticks_nominal for this nominal speed, if not done yet - if (ticks_nominal < 0) { + if (ticks_nominal == 0) { // step_rate to timer interval and loops for the nominal speed ticks_nominal = calc_timer_interval(current_block->nominal_rate << oversampling_factor, steps_per_isr); @@ -2604,7 +2604,7 @@ uint32_t Stepper::block_phase_isr() { #endif // Mark ticks_nominal as not-yet-calculated - ticks_nominal = -1; + ticks_nominal = 0; #if ENABLED(S_CURVE_ACCELERATION) // Initialize the Bézier speed curve @@ -2671,7 +2671,7 @@ uint32_t Stepper::block_phase_isr() { #if ENABLED(INTEGRATED_BABYSTEPPING) // Timer interrupt for baby-stepping - uint32_t Stepper::babystepping_isr() { + hal_timer_t Stepper::babystepping_isr() { babystep.task(); return babystep.has_steps() ? BABYSTEP_TICKS : BABYSTEP_NEVER; } diff --git a/Marlin/src/module/stepper.h b/Marlin/src/module/stepper.h index 33f45b9ae1..2336bfb405 100644 --- a/Marlin/src/module/stepper.h +++ b/Marlin/src/module/stepper.h @@ -568,24 +568,24 @@ class Stepper { #endif #if ENABLED(LIN_ADVANCE) - static constexpr uint32_t LA_ADV_NEVER = 0xFFFFFFFF; - static uint32_t nextAdvanceISR, - la_interval; // Interval between ISR calls for LA - static int32_t la_delta_error, // Analogue of delta_error.e for E steps in LA ISR - la_dividend, // Analogue of advance_dividend.e for E steps in LA ISR - la_advance_steps; // Count of steps added to increase nozzle pressure + static constexpr hal_timer_t LA_ADV_NEVER = HAL_TIMER_TYPE_MAX; + static hal_timer_t nextAdvanceISR, + la_interval; // Interval between ISR calls for LA + static int32_t la_delta_error, // Analogue of delta_error.e for E steps in LA ISR + la_dividend, // Analogue of advance_dividend.e for E steps in LA ISR + la_advance_steps; // Count of steps added to increase nozzle pressure #endif #if ENABLED(INTEGRATED_BABYSTEPPING) - static constexpr uint32_t BABYSTEP_NEVER = 0xFFFFFFFF; - static uint32_t nextBabystepISR; + static constexpr hal_timer_t BABYSTEP_NEVER = HAL_TIMER_TYPE_MAX; + static hal_timer_t nextBabystepISR; #endif #if ENABLED(DIRECT_STEPPING) static page_step_state_t page_step_state; #endif - static int32_t ticks_nominal; + static hal_timer_t ticks_nominal; #if DISABLED(S_CURVE_ACCELERATION) static uint32_t acc_step_rate; // needed for deceleration start point #endif @@ -624,7 +624,7 @@ class Stepper { static void pulse_phase_isr(); // The stepper block processing ISR phase - static uint32_t block_phase_isr(); + static hal_timer_t block_phase_isr(); #if HAS_SHAPING static void shaping_isr(); @@ -637,7 +637,7 @@ class Stepper { #if ENABLED(INTEGRATED_BABYSTEPPING) // The Babystepping ISR phase - static uint32_t babystepping_isr(); + static hal_timer_t babystepping_isr(); FORCE_INLINE static void initiateBabystepping() { if (nextBabystepISR == BABYSTEP_NEVER) { nextBabystepISR = 0; @@ -810,10 +810,10 @@ class Stepper { static void _set_position(const abce_long_t &spos); // Calculate the timing interval for the given step rate - static uint32_t calc_timer_interval(uint32_t step_rate); + static hal_timer_t calc_timer_interval(uint32_t step_rate); // Calculate timing interval and steps-per-ISR for the given step rate - static uint32_t calc_timer_interval(uint32_t step_rate, uint8_t &loops); + static hal_timer_t calc_timer_interval(uint32_t step_rate, uint8_t &loops); #if ENABLED(S_CURVE_ACCELERATION) static void _calc_bezier_curve_coeffs(const int32_t v0, const int32_t v1, const uint32_t av); From d554844a51691c4e88d0fab8e7893b62e090f235 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 11 Mar 2023 19:19:36 -0600 Subject: [PATCH 010/225] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20Use=20cached=20la?= =?UTF-8?q?=5Factive=20state?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: tombrazier <68918209+tombrazier@users.noreply.github.com> --- Marlin/src/module/stepper.cpp | 14 ++++++++------ Marlin/src/module/stepper.h | 1 + 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index a3183c1b12..acb394f281 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -230,6 +230,7 @@ uint32_t Stepper::advance_divisor = 0, int32_t Stepper::la_delta_error = 0, Stepper::la_dividend = 0, Stepper::la_advance_steps = 0; + bool Stepper::la_active = false; #endif #if HAS_SHAPING @@ -1868,7 +1869,7 @@ void Stepper::pulse_phase_isr() { PULSE_PREP(E); #if ENABLED(LIN_ADVANCE) - if (step_needed.e && current_block->la_advance_rate) { + if (la_active && step_needed.e) { // don't actually step here, but do subtract movements steps // from the linear advance step count step_needed.e = false; @@ -2170,7 +2171,7 @@ hal_timer_t Stepper::block_phase_isr() { acceleration_time += interval; #if ENABLED(LIN_ADVANCE) - if (current_block->la_advance_rate) { + if (la_active) { const uint32_t la_step_rate = la_advance_steps < current_block->max_adv_steps ? current_block->la_advance_rate : 0; la_interval = calc_timer_interval(acc_step_rate + la_step_rate) << current_block->la_scaling; } @@ -2240,7 +2241,7 @@ hal_timer_t Stepper::block_phase_isr() { deceleration_time += interval; #if ENABLED(LIN_ADVANCE) - if (current_block->la_advance_rate) { + if (la_active) { const uint32_t la_step_rate = la_advance_steps > current_block->final_adv_steps ? current_block->la_advance_rate : 0; if (la_step_rate != step_rate) { bool reverse_e = la_step_rate > step_rate; @@ -2301,7 +2302,7 @@ hal_timer_t Stepper::block_phase_isr() { ticks_nominal = calc_timer_interval(current_block->nominal_rate << oversampling_factor, steps_per_isr); #if ENABLED(LIN_ADVANCE) - if (current_block->la_advance_rate) + if (la_active) la_interval = calc_timer_interval(current_block->nominal_rate) << current_block->la_scaling; #endif } @@ -2556,11 +2557,12 @@ hal_timer_t Stepper::block_phase_isr() { // Initialize the trapezoid generator from the current block. #if ENABLED(LIN_ADVANCE) + la_active = (current_block->la_advance_rate != 0); #if DISABLED(MIXING_EXTRUDER) && E_STEPPERS > 1 // If the now active extruder wasn't in use during the last move, its pressure is most likely gone. if (stepper_extruder != last_moved_extruder) la_advance_steps = 0; #endif - if (current_block->la_advance_rate) { + if (la_active) { // Apply LA scaling and discount the effect of frequency scaling la_dividend = (advance_dividend.e << current_block->la_scaling) << oversampling_factor; } @@ -2621,7 +2623,7 @@ hal_timer_t Stepper::block_phase_isr() { acceleration_time += interval; #if ENABLED(LIN_ADVANCE) - if (current_block->la_advance_rate) { + if (la_active) { const uint32_t la_step_rate = la_advance_steps < current_block->max_adv_steps ? current_block->la_advance_rate : 0; la_interval = calc_timer_interval(current_block->initial_rate + la_step_rate) << current_block->la_scaling; } diff --git a/Marlin/src/module/stepper.h b/Marlin/src/module/stepper.h index 2336bfb405..61dcb3804c 100644 --- a/Marlin/src/module/stepper.h +++ b/Marlin/src/module/stepper.h @@ -574,6 +574,7 @@ class Stepper { static int32_t la_delta_error, // Analogue of delta_error.e for E steps in LA ISR la_dividend, // Analogue of advance_dividend.e for E steps in LA ISR la_advance_steps; // Count of steps added to increase nozzle pressure + static bool la_active; // Whether linear advance is used on the present segment. #endif #if ENABLED(INTEGRATED_BABYSTEPPING) From 4a0cb4fb4ac27ab20b1f97a016b85bac6ad15470 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 11 Mar 2023 19:21:31 -0600 Subject: [PATCH 011/225] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20Use=20AxisFlags=20?= =?UTF-8?q?for=20step=5Fneeded?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: tombrazier <68918209+tombrazier@users.noreply.github.com> --- Marlin/src/module/stepper.cpp | 57 ++++++++++++++++++----------------- 1 file changed, 30 insertions(+), 27 deletions(-) diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index acb394f281..400dab5893 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -1661,21 +1661,24 @@ void Stepper::pulse_phase_isr() { bool firstStep = true; USING_TIMED_PULSE(); #endif - xyze_bool_t step_needed{0}; // Direct Stepping page? const bool is_page = current_block->is_page(); do { + AxisFlags step_needed{0}; + #define _APPLY_STEP(AXIS, INV, ALWAYS) AXIS ##_APPLY_STEP(INV, ALWAYS) #define _STEP_STATE(AXIS) STEP_STATE_## AXIS // Determine if a pulse is needed using Bresenham #define PULSE_PREP(AXIS) do{ \ - delta_error[_AXIS(AXIS)] += advance_dividend[_AXIS(AXIS)]; \ - step_needed[_AXIS(AXIS)] = (delta_error[_AXIS(AXIS)] >= 0); \ - if (step_needed[_AXIS(AXIS)]) \ - delta_error[_AXIS(AXIS)] -= advance_divisor; \ + int32_t de = delta_error[_AXIS(AXIS)] + advance_dividend[_AXIS(AXIS)]; \ + if (de >= 0) { \ + step_needed.set(_AXIS(AXIS)); \ + de -= advance_divisor; \ + } \ + delta_error[_AXIS(AXIS)] = de; \ }while(0) // With input shaping, direction changes can happen with almost only @@ -1699,7 +1702,7 @@ void Stepper::pulse_phase_isr() { #define HYSTERESIS(AXIS) _HYSTERESIS(AXIS) #define PULSE_PREP_SHAPING(AXIS, DELTA_ERROR, DIVIDEND) do{ \ - if (step_needed[_AXIS(AXIS)]) { \ + if (step_needed.test(_AXIS(AXIS))) { \ DELTA_ERROR += (DIVIDEND); \ if ((MAXDIR(AXIS) && DELTA_ERROR <= -(64 + HYSTERESIS(AXIS))) || (MINDIR(AXIS) && DELTA_ERROR >= (64 + HYSTERESIS(AXIS)))) { \ { USING_TIMED_PULSE(); START_TIMED_PULSE(); AWAIT_LOW_PULSE(); } \ @@ -1708,15 +1711,15 @@ void Stepper::pulse_phase_isr() { SET_STEP_DIR(AXIS); \ DIR_WAIT_AFTER(); \ } \ - step_needed[_AXIS(AXIS)] = DELTA_ERROR <= -(64 + HYSTERESIS(AXIS)) || DELTA_ERROR >= (64 + HYSTERESIS(AXIS)); \ - if (step_needed[_AXIS(AXIS)]) \ + step_needed.set(_AXIS(AXIS), DELTA_ERROR <= -(64 + HYSTERESIS(AXIS)) || DELTA_ERROR >= (64 + HYSTERESIS(AXIS))); \ + if (step_needed.test(_AXIS(AXIS))) \ DELTA_ERROR += MAXDIR(AXIS) ? -128 : 128; \ } \ }while(0) // Start an active pulse if needed #define PULSE_START(AXIS) do{ \ - if (step_needed[_AXIS(AXIS)]) { \ + if (step_needed.test(_AXIS(AXIS))) { \ count_position[_AXIS(AXIS)] += count_direction[_AXIS(AXIS)]; \ _APPLY_STEP(AXIS, _STEP_STATE(AXIS), 0); \ } \ @@ -1724,7 +1727,7 @@ void Stepper::pulse_phase_isr() { // Stop an active pulse if needed #define PULSE_STOP(AXIS) do { \ - if (step_needed[_AXIS(AXIS)]) { \ + if (step_needed.test(_AXIS(AXIS))) { \ _APPLY_STEP(AXIS, !_STEP_STATE(AXIS), 0); \ } \ }while(0) @@ -1743,8 +1746,8 @@ void Stepper::pulse_phase_isr() { }while(0) #define PAGE_PULSE_PREP(AXIS) do{ \ - step_needed[_AXIS(AXIS)] = \ - pgm_read_byte(&segment_table[page_step_state.sd[_AXIS(AXIS)]][page_step_state.segment_steps & 0x7]); \ + step_needed.set(_AXIS(AXIS), \ + pgm_read_byte(&segment_table[page_step_state.sd[_AXIS(AXIS)]][page_step_state.segment_steps & 0x7])); \ }while(0) switch (page_step_state.segment_steps) { @@ -1784,8 +1787,8 @@ void Stepper::pulse_phase_isr() { page_step_state.bd[_AXIS(AXIS)] += VALUE; #define PAGE_PULSE_PREP(AXIS) do{ \ - step_needed[_AXIS(AXIS)] = \ - pgm_read_byte(&segment_table[page_step_state.sd[_AXIS(AXIS)]][page_step_state.segment_steps & 0x3]); \ + step_needed.set(_AXIS(AXIS), \ + pgm_read_byte(&segment_table[page_step_state.sd[_AXIS(AXIS)]][page_step_state.segment_steps & 0x3])); \ }while(0) switch (page_step_state.segment_steps) { @@ -1812,10 +1815,10 @@ void Stepper::pulse_phase_isr() { #elif STEPPER_PAGE_FORMAT == SP_4x1_512 - #define PAGE_PULSE_PREP(AXIS, BITS) do{ \ - step_needed[_AXIS(AXIS)] = (steps >> BITS) & 0x1; \ - if (step_needed[_AXIS(AXIS)]) \ - page_step_state.bd[_AXIS(AXIS)]++; \ + #define PAGE_PULSE_PREP(AXIS, NBIT) do{ \ + step_needed.set(_AXIS(AXIS), TEST(steps, NBIT)); \ + if (step_needed.test(_AXIS(AXIS))) \ + page_step_state.bd[_AXIS(AXIS)]++; \ }while(0) uint8_t steps = page_step_state.page[page_step_state.segment_idx >> 1]; @@ -1880,8 +1883,8 @@ void Stepper::pulse_phase_isr() { #if HAS_SHAPING // record an echo if a step is needed in the primary bresenham - const bool x_step = TERN0(INPUT_SHAPING_X, shaping_x.enabled && step_needed[X_AXIS]), - y_step = TERN0(INPUT_SHAPING_Y, shaping_y.enabled && step_needed[Y_AXIS]); + const bool x_step = TERN0(INPUT_SHAPING_X, shaping_x.enabled && step_needed.x), + y_step = TERN0(INPUT_SHAPING_Y, shaping_y.enabled && step_needed.y); if (x_step || y_step) ShapingQueue::enqueue(x_step, TERN0(INPUT_SHAPING_X, shaping_x.forward), y_step, TERN0(INPUT_SHAPING_Y, shaping_y.forward)); @@ -1995,15 +1998,15 @@ void Stepper::pulse_phase_isr() { #if HAS_SHAPING void Stepper::shaping_isr() { - xy_bool_t step_needed{0}; + AxisFlags step_needed{0}; // Clear the echoes that are ready to process. If the buffers are too full and risk overflow, also apply echoes early. - TERN_(INPUT_SHAPING_X, step_needed[X_AXIS] = !ShapingQueue::peek_x() || ShapingQueue::free_count_x() < steps_per_isr); - TERN_(INPUT_SHAPING_Y, step_needed[Y_AXIS] = !ShapingQueue::peek_y() || ShapingQueue::free_count_y() < steps_per_isr); + TERN_(INPUT_SHAPING_X, step_needed.x = !ShapingQueue::peek_x() || ShapingQueue::free_count_x() < steps_per_isr); + TERN_(INPUT_SHAPING_Y, step_needed.y = !ShapingQueue::peek_y() || ShapingQueue::free_count_y() < steps_per_isr); if (bool(step_needed)) while (true) { #if ENABLED(INPUT_SHAPING_X) - if (step_needed[X_AXIS]) { + if (step_needed.x) { const bool forward = ShapingQueue::dequeue_x(); PULSE_PREP_SHAPING(X, shaping_x.delta_error, shaping_x.factor2 * (forward ? 1 : -1)); PULSE_START(X); @@ -2011,7 +2014,7 @@ void Stepper::pulse_phase_isr() { #endif #if ENABLED(INPUT_SHAPING_Y) - if (step_needed[Y_AXIS]) { + if (step_needed.y) { const bool forward = ShapingQueue::dequeue_y(); PULSE_PREP_SHAPING(Y, shaping_y.delta_error, shaping_y.factor2 * (forward ? 1 : -1)); PULSE_START(Y); @@ -2034,8 +2037,8 @@ void Stepper::pulse_phase_isr() { #endif } - TERN_(INPUT_SHAPING_X, step_needed[X_AXIS] = !ShapingQueue::peek_x() || ShapingQueue::free_count_x() < steps_per_isr); - TERN_(INPUT_SHAPING_Y, step_needed[Y_AXIS] = !ShapingQueue::peek_y() || ShapingQueue::free_count_y() < steps_per_isr); + TERN_(INPUT_SHAPING_X, step_needed.x = !ShapingQueue::peek_x() || ShapingQueue::free_count_x() < steps_per_isr); + TERN_(INPUT_SHAPING_Y, step_needed.y = !ShapingQueue::peek_y() || ShapingQueue::free_count_y() < steps_per_isr); if (!bool(step_needed)) break; From e1a209d0ce5cacf60a13b75f06ffb7ae67ee3bee Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Mon, 13 Mar 2023 00:22:40 +0000 Subject: [PATCH 012/225] [cron] Bump distribution date (2023-03-13) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 614ee400b7..c76ff2632a 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-03-12" +//#define STRING_DISTRIBUTION_DATE "2023-03-13" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index ca975adb4e..3b57bf0d03 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-03-12" + #define STRING_DISTRIBUTION_DATE "2023-03-13" #endif /** From e4b83ad5f58772f73d9b2dcc9dcccbbc2a3e893d Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 11 Mar 2023 19:22:18 -0600 Subject: [PATCH 013/225] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20Major=20shaper=20o?= =?UTF-8?q?ptimization?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: tombrazier <68918209+tombrazier@users.noreply.github.com> --- Marlin/src/module/stepper.cpp | 36 ++++++++++++++++++------------- Marlin/src/module/stepper.h | 40 ++++++++++++++++++++++++++--------- 2 files changed, 51 insertions(+), 25 deletions(-) diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index 400dab5893..0ae2a52f9d 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -1676,7 +1676,7 @@ void Stepper::pulse_phase_isr() { int32_t de = delta_error[_AXIS(AXIS)] + advance_dividend[_AXIS(AXIS)]; \ if (de >= 0) { \ step_needed.set(_AXIS(AXIS)); \ - de -= advance_divisor; \ + de -= advance_divisor_cached; \ } \ delta_error[_AXIS(AXIS)] = de; \ }while(0) @@ -1702,19 +1702,22 @@ void Stepper::pulse_phase_isr() { #define HYSTERESIS(AXIS) _HYSTERESIS(AXIS) #define PULSE_PREP_SHAPING(AXIS, DELTA_ERROR, DIVIDEND) do{ \ - if (step_needed.test(_AXIS(AXIS))) { \ - DELTA_ERROR += (DIVIDEND); \ - if ((MAXDIR(AXIS) && DELTA_ERROR <= -(64 + HYSTERESIS(AXIS))) || (MINDIR(AXIS) && DELTA_ERROR >= (64 + HYSTERESIS(AXIS)))) { \ + int16_t de = DELTA_ERROR + (DIVIDEND); \ + const bool step_fwd = de >= (64 + HYSTERESIS(AXIS)), \ + step_bak = de <= -(64 + HYSTERESIS(AXIS)); \ + if (step_fwd || step_bak) { \ + de += step_fwd ? -128 : 128; \ + if ((MAXDIR(AXIS) && step_bak) || (MINDIR(AXIS) && step_fwd)) { \ { USING_TIMED_PULSE(); START_TIMED_PULSE(); AWAIT_LOW_PULSE(); } \ TBI(last_direction_bits, _AXIS(AXIS)); \ DIR_WAIT_BEFORE(); \ SET_STEP_DIR(AXIS); \ DIR_WAIT_AFTER(); \ } \ - step_needed.set(_AXIS(AXIS), DELTA_ERROR <= -(64 + HYSTERESIS(AXIS)) || DELTA_ERROR >= (64 + HYSTERESIS(AXIS))); \ - if (step_needed.test(_AXIS(AXIS))) \ - DELTA_ERROR += MAXDIR(AXIS) ? -128 : 128; \ } \ + else \ + step_needed.clear(_AXIS(AXIS)); \ + DELTA_ERROR = de; \ }while(0) // Start an active pulse if needed @@ -1839,6 +1842,9 @@ void Stepper::pulse_phase_isr() { #endif // DIRECT_STEPPING if (!is_page) { + // Give the compiler a clue to store advance_divisor in registers for what follows + const uint32_t advance_divisor_cached = advance_divisor; + // Determine if pulses are needed #if HAS_X_STEP PULSE_PREP(X); @@ -1883,19 +1889,19 @@ void Stepper::pulse_phase_isr() { #if HAS_SHAPING // record an echo if a step is needed in the primary bresenham - const bool x_step = TERN0(INPUT_SHAPING_X, shaping_x.enabled && step_needed.x), - y_step = TERN0(INPUT_SHAPING_Y, shaping_y.enabled && step_needed.y); + const bool x_step = TERN0(INPUT_SHAPING_X, step_needed.x && shaping_x.enabled), + y_step = TERN0(INPUT_SHAPING_Y, step_needed.y && shaping_y.enabled); if (x_step || y_step) ShapingQueue::enqueue(x_step, TERN0(INPUT_SHAPING_X, shaping_x.forward), y_step, TERN0(INPUT_SHAPING_Y, shaping_y.forward)); // do the first part of the secondary bresenham #if ENABLED(INPUT_SHAPING_X) - if (shaping_x.enabled) - PULSE_PREP_SHAPING(X, shaping_x.delta_error, shaping_x.factor1 * (shaping_x.forward ? 1 : -1)); + if (x_step) + PULSE_PREP_SHAPING(X, shaping_x.delta_error, shaping_x.forward ? shaping_x.factor1 : -shaping_x.factor1); #endif #if ENABLED(INPUT_SHAPING_Y) - if (shaping_y.enabled) - PULSE_PREP_SHAPING(Y, shaping_y.delta_error, shaping_y.factor1 * (shaping_y.forward ? 1 : -1)); + if (y_step) + PULSE_PREP_SHAPING(Y, shaping_y.delta_error, shaping_y.forward ? shaping_y.factor1 : -shaping_y.factor1); #endif #endif } @@ -2008,7 +2014,7 @@ void Stepper::pulse_phase_isr() { #if ENABLED(INPUT_SHAPING_X) if (step_needed.x) { const bool forward = ShapingQueue::dequeue_x(); - PULSE_PREP_SHAPING(X, shaping_x.delta_error, shaping_x.factor2 * (forward ? 1 : -1)); + PULSE_PREP_SHAPING(X, shaping_x.delta_error, (forward ? shaping_x.factor2 : -shaping_x.factor2)); PULSE_START(X); } #endif @@ -2016,7 +2022,7 @@ void Stepper::pulse_phase_isr() { #if ENABLED(INPUT_SHAPING_Y) if (step_needed.y) { const bool forward = ShapingQueue::dequeue_y(); - PULSE_PREP_SHAPING(Y, shaping_y.delta_error, shaping_y.factor2 * (forward ? 1 : -1)); + PULSE_PREP_SHAPING(Y, shaping_y.delta_error, (forward ? shaping_y.factor2 : -shaping_y.factor2)); PULSE_START(Y); } #endif diff --git a/Marlin/src/module/stepper.h b/Marlin/src/module/stepper.h index 61dcb3804c..731d7e6ee8 100644 --- a/Marlin/src/module/stepper.h +++ b/Marlin/src/module/stepper.h @@ -392,16 +392,36 @@ constexpr ena_mask_t enable_overlap[] = { TERN_(INPUT_SHAPING_Y, if (axis == Y_AXIS) delay_y = delay); } static void enqueue(const bool x_step, const bool x_forward, const bool y_step, const bool y_forward) { - TERN_(INPUT_SHAPING_X, if (head_x == tail && x_step) peek_x_val = delay_x); - TERN_(INPUT_SHAPING_Y, if (head_y == tail && y_step) peek_y_val = delay_y); + #if ENABLED(INPUT_SHAPING_X) + if (x_step) { + if (head_x == tail) peek_x_val = delay_x; + echo_axes[tail].x = x_forward ? ECHO_FWD : ECHO_BWD; + _free_count_x--; + } + else { + echo_axes[tail].x = ECHO_NONE; + if (head_x != tail) + _free_count_x--; + else if (++head_x == shaping_echoes) + head_x = 0; + } + #endif + #if ENABLED(INPUT_SHAPING_Y) + if (y_step) { + if (head_y == tail) peek_y_val = delay_y; + echo_axes[tail].y = y_forward ? ECHO_FWD : ECHO_BWD; + _free_count_y--; + } + else { + echo_axes[tail].y = ECHO_NONE; + if (head_y != tail) + _free_count_y--; + else if (++head_y == shaping_echoes) + head_y = 0; + } + #endif times[tail] = now; - TERN_(INPUT_SHAPING_X, echo_axes[tail].x = x_step ? (x_forward ? ECHO_FWD : ECHO_BWD) : ECHO_NONE); - TERN_(INPUT_SHAPING_Y, echo_axes[tail].y = y_step ? (y_forward ? ECHO_FWD : ECHO_BWD) : ECHO_NONE); if (++tail == shaping_echoes) tail = 0; - TERN_(INPUT_SHAPING_X, _free_count_x--); - TERN_(INPUT_SHAPING_Y, _free_count_y--); - TERN_(INPUT_SHAPING_X, if (echo_axes[head_x].x == ECHO_NONE) dequeue_x()); - TERN_(INPUT_SHAPING_Y, if (echo_axes[head_y].y == ECHO_NONE) dequeue_y()); } #if ENABLED(INPUT_SHAPING_X) static shaping_time_t peek_x() { return peek_x_val; } @@ -445,11 +465,11 @@ constexpr ena_mask_t enable_overlap[] = { struct ShapeParams { float frequency; float zeta; - bool enabled; + bool enabled : 1; + bool forward : 1; int16_t delta_error = 0; // delta_error for seconday bresenham mod 128 uint8_t factor1; uint8_t factor2; - bool forward; int32_t last_block_end_pos = 0; }; From 549419e08482873422675173cd9d241362b88f00 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 11 Mar 2023 19:25:42 -0600 Subject: [PATCH 014/225] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20Set=20steps=5Fper?= =?UTF-8?q?=5Fisr=20in=20calc=5Fmultistep=5Ftimer=5Finterval?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: tombrazier <68918209+tombrazier@users.noreply.github.com> --- Marlin/src/module/stepper.cpp | 24 +++++++++++------------- Marlin/src/module/stepper.h | 2 +- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index 0ae2a52f9d..738862666f 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -189,7 +189,7 @@ bool Stepper::abort_current_block; #endif uint32_t Stepper::acceleration_time, Stepper::deceleration_time; -uint8_t Stepper::steps_per_isr; // Count of steps to perform per Stepper ISR call +uint8_t Stepper::steps_per_isr = 1; // Count of steps to perform per Stepper ISR call #if ENABLED(FREEZE_FEATURE) bool Stepper::frozen; // = false @@ -2088,8 +2088,7 @@ hal_timer_t Stepper::calc_timer_interval(uint32_t step_rate) { } // Get the timer interval and the number of loops to perform per tick -hal_timer_t Stepper::calc_timer_interval(uint32_t step_rate, uint8_t &loops) { - uint8_t multistep = 1; +hal_timer_t Stepper::calc_multistep_timer_interval(uint32_t step_rate) { #if ENABLED(DISABLE_MULTI_STEPPING) // Just make sure the step rate is doable @@ -2109,16 +2108,15 @@ hal_timer_t Stepper::calc_timer_interval(uint32_t step_rate, uint8_t &loops) { (MAX_STEP_ISR_FREQUENCY_128X >> 7) }; - // Select the proper multistepping - uint8_t idx = 0; - while (idx < 7 && step_rate > (uint32_t)pgm_read_dword(&limit[idx])) { + // Find a doable step rate using multistepping + uint8_t multistep = 1; + for (uint8_t i = 0; i < 7 && step_rate > uint32_t(pgm_read_dword(&limit[i])); ++i) { step_rate >>= 1; multistep <<= 1; - ++idx; - }; + } + steps_per_isr = multistep; #endif - loops = multistep; return calc_timer_interval(step_rate); } @@ -2176,7 +2174,7 @@ hal_timer_t Stepper::block_phase_isr() { // acc_step_rate is in steps/second // step_rate to timer interval and steps per stepper isr - interval = calc_timer_interval(acc_step_rate << oversampling_factor, steps_per_isr); + interval = calc_multistep_timer_interval(acc_step_rate << oversampling_factor); acceleration_time += interval; #if ENABLED(LIN_ADVANCE) @@ -2246,7 +2244,7 @@ hal_timer_t Stepper::block_phase_isr() { #endif // step_rate to timer interval and steps per stepper isr - interval = calc_timer_interval(step_rate << oversampling_factor, steps_per_isr); + interval = calc_multistep_timer_interval(step_rate << oversampling_factor); deceleration_time += interval; #if ENABLED(LIN_ADVANCE) @@ -2308,7 +2306,7 @@ hal_timer_t Stepper::block_phase_isr() { // Calculate the ticks_nominal for this nominal speed, if not done yet if (ticks_nominal == 0) { // step_rate to timer interval and loops for the nominal speed - ticks_nominal = calc_timer_interval(current_block->nominal_rate << oversampling_factor, steps_per_isr); + ticks_nominal = calc_multistep_timer_interval(current_block->nominal_rate << oversampling_factor); #if ENABLED(LIN_ADVANCE) if (la_active) @@ -2628,7 +2626,7 @@ hal_timer_t Stepper::block_phase_isr() { #endif // Calculate the initial timer interval - interval = calc_timer_interval(current_block->initial_rate << oversampling_factor, steps_per_isr); + interval = calc_multistep_timer_interval(current_block->initial_rate << oversampling_factor); acceleration_time += interval; #if ENABLED(LIN_ADVANCE) diff --git a/Marlin/src/module/stepper.h b/Marlin/src/module/stepper.h index 731d7e6ee8..ebd7e98aeb 100644 --- a/Marlin/src/module/stepper.h +++ b/Marlin/src/module/stepper.h @@ -834,7 +834,7 @@ class Stepper { static hal_timer_t calc_timer_interval(uint32_t step_rate); // Calculate timing interval and steps-per-ISR for the given step rate - static hal_timer_t calc_timer_interval(uint32_t step_rate, uint8_t &loops); + static hal_timer_t calc_multistep_timer_interval(uint32_t step_rate); #if ENABLED(S_CURVE_ACCELERATION) static void _calc_bezier_curve_coeffs(const int32_t v0, const int32_t v1, const uint32_t av); From 3365172e7c7b577d12912a7d942d3a2fa5c75f74 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 11 Mar 2023 19:54:48 -0600 Subject: [PATCH 015/225] =?UTF-8?q?=F0=9F=94=A7=20Expose=20MULTISTEPPING?= =?UTF-8?q?=5FLIMIT=20option?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: tombrazier <68918209+tombrazier@users.noreply.github.com> --- Marlin/Configuration_adv.h | 6 +++++ Marlin/src/inc/Conditionals_adv.h | 6 +++++ Marlin/src/inc/SanityCheck.h | 3 +++ Marlin/src/inc/Warnings.cpp | 4 ++++ Marlin/src/module/stepper.cpp | 37 ++++++++++++++++++++++--------- Marlin/src/module/stepper.h | 12 +++++----- 6 files changed, 52 insertions(+), 16 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 35e7363423..6ef72d9f04 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -1267,6 +1267,12 @@ #endif #endif +/** + * Multi-stepping sends steps in bursts to reduce MCU usage for high step-rates. + * This allows higher feedrates than the MCU could otherwise support. + */ +#define MULTISTEPPING_LIMIT 16 //: [1, 2, 4, 8, 16, 32, 64, 128] + /** * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h index 5b303e919f..5079a93c1d 100644 --- a/Marlin/src/inc/Conditionals_adv.h +++ b/Marlin/src/inc/Conditionals_adv.h @@ -1219,3 +1219,9 @@ #undef TC_GCODE_USE_GLOBAL_Y #undef TC_GCODE_USE_GLOBAL_Z #endif + +// Multi-Stepping Limit +#ifndef MULTISTEPPING_LIMIT + #define MULTISTEPPING_LIMIT 128 + #define MULTISTEPPING_LIMIT_WARNING 1 +#endif diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 7d8f404591..5f20b205a0 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -4500,6 +4500,9 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive."); #endif #endif +// Multi-Stepping Limit +static_assert(WITHIN(MULTISTEPPING_LIMIT, 1, 128) && IS_POWER_OF_2(MULTISTEPPING_LIMIT), "MULTISTEPPING_LIMIT must be 1, 2, 4, 8, 16, 32, 64, or 128."); + // Misc. Cleanup #undef _TEST_PWM #undef _NUM_AXES_STR diff --git a/Marlin/src/inc/Warnings.cpp b/Marlin/src/inc/Warnings.cpp index 1d1426936f..184d1a08da 100644 --- a/Marlin/src/inc/Warnings.cpp +++ b/Marlin/src/inc/Warnings.cpp @@ -797,3 +797,7 @@ #if HAS_SHAPING && ANY(CORE_IS_XY, MARKFORGED_XY, MARKFORGED_YX) #warning "Input Shaping for CORE / MARKFORGED kinematic axes is still experimental." #endif + +#if MULTISTEPPING_LIMIT_WARNING + #warning "MULTISTEPPING_LIMIT has been automatically set to 128. Use a lower value if the machine is slow to respond." +#endif diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index 738862666f..b4c66d1fba 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -189,7 +189,10 @@ bool Stepper::abort_current_block; #endif uint32_t Stepper::acceleration_time, Stepper::deceleration_time; -uint8_t Stepper::steps_per_isr = 1; // Count of steps to perform per Stepper ISR call + +#if MULTISTEPPING_LIMIT > 1 + uint8_t Stepper::steps_per_isr = 1; // Count of steps to perform per Stepper ISR call +#endif #if ENABLED(FREEZE_FEATURE) bool Stepper::frozen; // = false @@ -2089,7 +2092,7 @@ hal_timer_t Stepper::calc_timer_interval(uint32_t step_rate) { // Get the timer interval and the number of loops to perform per tick hal_timer_t Stepper::calc_multistep_timer_interval(uint32_t step_rate) { - #if ENABLED(DISABLE_MULTI_STEPPING) + #if MULTISTEPPING_LIMIT == 1 // Just make sure the step rate is doable NOMORE(step_rate, uint32_t(MAX_STEP_ISR_FREQUENCY_1X)); @@ -2098,19 +2101,31 @@ hal_timer_t Stepper::calc_multistep_timer_interval(uint32_t step_rate) { // The stepping frequency limits for each multistepping rate static const uint32_t limit[] PROGMEM = { - ( MAX_STEP_ISR_FREQUENCY_1X ), - ( MAX_STEP_ISR_FREQUENCY_2X >> 1), - ( MAX_STEP_ISR_FREQUENCY_4X >> 2), - ( MAX_STEP_ISR_FREQUENCY_8X >> 3), - ( MAX_STEP_ISR_FREQUENCY_16X >> 4), - ( MAX_STEP_ISR_FREQUENCY_32X >> 5), - ( MAX_STEP_ISR_FREQUENCY_64X >> 6), - (MAX_STEP_ISR_FREQUENCY_128X >> 7) + ( MAX_STEP_ISR_FREQUENCY_1X ) + , ( MAX_STEP_ISR_FREQUENCY_2X >> 1) + #if MULTISTEPPING_LIMIT >= 4 + , ( MAX_STEP_ISR_FREQUENCY_4X >> 2) + #endif + #if MULTISTEPPING_LIMIT >= 8 + , ( MAX_STEP_ISR_FREQUENCY_8X >> 3) + #endif + #if MULTISTEPPING_LIMIT >= 16 + , ( MAX_STEP_ISR_FREQUENCY_16X >> 4) + #endif + #if MULTISTEPPING_LIMIT >= 32 + , ( MAX_STEP_ISR_FREQUENCY_32X >> 5) + #endif + #if MULTISTEPPING_LIMIT >= 64 + , ( MAX_STEP_ISR_FREQUENCY_64X >> 6) + #endif + #if MULTISTEPPING_LIMIT >= 128 + , (MAX_STEP_ISR_FREQUENCY_128X >> 7) + #endif }; // Find a doable step rate using multistepping uint8_t multistep = 1; - for (uint8_t i = 0; i < 7 && step_rate > uint32_t(pgm_read_dword(&limit[i])); ++i) { + for (uint8_t i = 0; i < COUNT(limit) && step_rate > uint32_t(pgm_read_dword(&limit[i])); ++i) { step_rate >>= 1; multistep <<= 1; } diff --git a/Marlin/src/module/stepper.h b/Marlin/src/module/stepper.h index ebd7e98aeb..820d1d9a73 100644 --- a/Marlin/src/module/stepper.h +++ b/Marlin/src/module/stepper.h @@ -49,9 +49,6 @@ #include "stepper/speed_lookuptable.h" #endif -// Disable multiple steps per ISR -//#define DISABLE_MULTI_STEPPING - // // Estimate the amount of time the Stepper ISR will take to execute // @@ -259,7 +256,7 @@ // The minimum step ISR rate used by ADAPTIVE_STEP_SMOOTHING to target 50% CPU usage // This does not account for the possibility of multi-stepping. -// Perhaps DISABLE_MULTI_STEPPING should be required with ADAPTIVE_STEP_SMOOTHING. +// Should a MULTISTEPPING_LIMIT of 1 should be required with ADAPTIVE_STEP_SMOOTHING? #define MIN_STEP_ISR_FREQUENCY (MAX_STEP_ISR_FREQUENCY_1X / 2) #define ENABLE_COUNT (NUM_AXES + E_STEPPERS) @@ -543,7 +540,12 @@ class Stepper { #endif static uint32_t acceleration_time, deceleration_time; // time measured in Stepper Timer ticks - static uint8_t steps_per_isr; // Count of steps to perform per Stepper ISR call + + #if MULTISTEPPING_LIMIT == 1 + static constexpr uint8_t steps_per_isr = 1; // Count of steps to perform per Stepper ISR call + #else + static uint8_t steps_per_isr; + #endif #if ENABLED(ADAPTIVE_STEP_SMOOTHING) static uint8_t oversampling_factor; // Oversampling factor (log2(multiplier)) to increase temporal resolution of axis From 143a8701d5b11925440d643b47e5c5812a69352f Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 12 Mar 2023 16:29:21 -0500 Subject: [PATCH 016/225] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20Optimize=20speed?= =?UTF-8?q?=20lookup=20for=20AVR?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: tombrazier <68918209+tombrazier@users.noreply.github.com> --- Marlin/src/HAL/AVR/math.h | 34 +-- Marlin/src/module/stepper.cpp | 27 +- Marlin/src/module/stepper/speed_lookuptable.h | 254 +++++++++--------- .../share/scripts/createSpeedLookupTable.py | 42 +-- 4 files changed, 176 insertions(+), 181 deletions(-) diff --git a/Marlin/src/HAL/AVR/math.h b/Marlin/src/HAL/AVR/math.h index 34f859fbbb..16848524fa 100644 --- a/Marlin/src/HAL/AVR/math.h +++ b/Marlin/src/HAL/AVR/math.h @@ -84,32 +84,26 @@ FORCE_INLINE static uint16_t MultiU24X32toH16(uint32_t longIn1, uint32_t longIn2 return intRes; } -// intRes = intIn1 * intIn2 >> 8 +// charRes = charIn1 * charIn2 >> 8 // uses: -// r1, r0 for the result of mul. After the second mul, r0 holds bits 0-7 of the 24 bit result and -// the top bit of r0 is used for rounding. -// [tmp] to store 0. -// [intRes] (A B) is bits 8-15 and is the returned value. +// r1, r0 for the result of mul. After the mul, r0 holds bits 0-7 of the 16 bit result, +// and the top bit of r0 is used for rounding. +// [charRes] is bits 8-15 and is the returned value. // [charIn1] is an 8 bit parameter. -// [intIn2] (B A) is a 16 bit parameter. +// [charIn2] is an 8 bit parameter. // -FORCE_INLINE static uint16_t MultiU8X16toH16(uint8_t charIn1, uint16_t intIn2) { - uint8_t tmp; - uint16_t intRes; +FORCE_INLINE static uint8_t MultiU8X8toH8(uint8_t charIn1, uint8_t charIn2) { + uint8_t charRes; __asm__ __volatile__ ( - A("clr %[tmp]") - A("mul %[charIn1], %B[intIn2]") - A("movw %A[intRes], r0") - A("mul %[charIn1], %A[intIn2]") - A("lsl r0") - A("adc %A[intRes], r1") - A("adc %B[intRes], %[tmp]") + A("mul %[charIn1], %[charIn2]") + A("mov %[charRes], r1") A("clr r1") - : [intRes] "=&r" (intRes), - [tmp] "=&r" (tmp) + A("lsl r0") + A("adc %[charRes], r1") + : [charRes] "=&r" (charRes) : [charIn1] "d" (charIn1), - [intIn2] "d" (intIn2) + [charIn2] "d" (charIn2) : "cc" ); - return intRes; + return charRes; } diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index b4c66d1fba..ae12f0b7f4 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -2069,22 +2069,21 @@ hal_timer_t Stepper::calc_timer_interval(uint32_t step_rate) { // AVR is able to keep up at 30khz Stepping ISR rate. constexpr uint32_t min_step_rate = (F_CPU) / 500000U; // i.e., 32 or 40 - if (step_rate <= min_step_rate) { // lower step rates - step_rate = 0; - return uint16_t(pgm_read_word(uintptr_t(speed_lookuptable_slow))); + if (step_rate >= 0x0800) { // higher step rate + const uintptr_t table_address = uintptr_t(&speed_lookuptable_fast[uint8_t(step_rate >> 8)]); + const uint16_t base = uint16_t(pgm_read_word(table_address)); + const uint8_t gain = uint8_t(pgm_read_byte(table_address + 2)); + return base - MultiU8X8toH8(uint8_t(step_rate & 0x00FF), gain); + } + else if (step_rate > min_step_rate) { // lower step rates + step_rate -= min_step_rate; // Correct for minimal speed + const uintptr_t table_address = uintptr_t(&speed_lookuptable_slow[uint8_t(step_rate >> 3)]); + return uint16_t(pgm_read_word(table_address)) + - ((uint16_t(pgm_read_word(table_address + 2)) * uint8_t(step_rate & 0x0007)) >> 3); } else { - step_rate -= min_step_rate; // Correct for minimal speed - if (step_rate >= 0x0800) { // higher step rate - const uintptr_t table_address = uintptr_t(&speed_lookuptable_fast[uint8_t(step_rate >> 8)]); - const uint16_t gain = uint16_t(pgm_read_word(table_address + 2)); - return uint16_t(pgm_read_word(table_address)) - MultiU8X16toH16(uint8_t(step_rate & 0x00FF), gain); - } - else { // lower step rates - const uintptr_t table_address = uintptr_t(&speed_lookuptable_slow[uint8_t(step_rate >> 3)]); - return uint16_t(pgm_read_word(table_address)) - - ((uint16_t(pgm_read_word(table_address + 2)) * uint8_t(step_rate & 0x0007)) >> 3); - } + step_rate = 0; + return uint16_t(pgm_read_word(uintptr_t(speed_lookuptable_slow))); } #endif // !CPU_32_BIT diff --git a/Marlin/src/module/stepper/speed_lookuptable.h b/Marlin/src/module/stepper/speed_lookuptable.h index 0b4205ea57..ae30bdbf3b 100644 --- a/Marlin/src/module/stepper/speed_lookuptable.h +++ b/Marlin/src/module/stepper/speed_lookuptable.h @@ -23,146 +23,146 @@ #if F_CPU == 16000000 - const uint16_t speed_lookuptable_fast[256][2] PROGMEM = { + const struct { uint16_t base; uint8_t gain; } speed_lookuptable_fast[256] PROGMEM = { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, // dummy first row - { 961, 105 }, { 856, 85 }, { 771, 69 }, { 702, 58 }, { 644, 49 }, { 595, 42 }, { 553, 37 }, { 516, 32 }, - { 484, 28 }, { 456, 25 }, { 431, 23 }, { 408, 20 }, { 388, 19 }, { 369, 16 }, { 353, 16 }, { 337, 14 }, - { 323, 13 }, { 310, 11 }, { 299, 11 }, { 288, 11 }, { 277, 9 }, { 268, 9 }, { 259, 8 }, { 251, 8 }, - { 243, 8 }, { 235, 7 }, { 228, 6 }, { 222, 6 }, { 216, 6 }, { 210, 6 }, { 204, 5 }, { 199, 5 }, - { 194, 5 }, { 189, 4 }, { 185, 4 }, { 181, 4 }, { 177, 4 }, { 173, 4 }, { 169, 4 }, { 165, 3 }, - { 162, 3 }, { 159, 4 }, { 155, 3 }, { 152, 3 }, { 149, 2 }, { 147, 3 }, { 144, 3 }, { 141, 2 }, - { 139, 3 }, { 136, 2 }, { 134, 2 }, { 132, 3 }, { 129, 2 }, { 127, 2 }, { 125, 2 }, { 123, 2 }, - { 121, 2 }, { 119, 1 }, { 118, 2 }, { 116, 2 }, { 114, 1 }, { 113, 2 }, { 111, 2 }, { 109, 1 }, - { 108, 2 }, { 106, 1 }, { 105, 2 }, { 103, 1 }, { 102, 1 }, { 101, 1 }, { 100, 2 }, { 98, 1 }, - { 97, 1 }, { 96, 1 }, { 95, 2 }, { 93, 1 }, { 92, 1 }, { 91, 1 }, { 90, 1 }, { 89, 1 }, - { 88, 1 }, { 87, 1 }, { 86, 1 }, { 85, 1 }, { 84, 1 }, { 83, 0 }, { 83, 1 }, { 82, 1 }, - { 81, 1 }, { 80, 1 }, { 79, 1 }, { 78, 0 }, { 78, 1 }, { 77, 1 }, { 76, 1 }, { 75, 0 }, - { 75, 1 }, { 74, 1 }, { 73, 1 }, { 72, 0 }, { 72, 1 }, { 71, 1 }, { 70, 0 }, { 70, 1 }, - { 69, 0 }, { 69, 1 }, { 68, 1 }, { 67, 0 }, { 67, 1 }, { 66, 0 }, { 66, 1 }, { 65, 0 }, - { 65, 1 }, { 64, 1 }, { 63, 0 }, { 63, 1 }, { 62, 0 }, { 62, 1 }, { 61, 0 }, { 61, 1 }, - { 60, 0 }, { 60, 0 }, { 60, 1 }, { 59, 0 }, { 59, 1 }, { 58, 0 }, { 58, 1 }, { 57, 0 }, - { 57, 1 }, { 56, 0 }, { 56, 0 }, { 56, 1 }, { 55, 0 }, { 55, 1 }, { 54, 0 }, { 54, 0 }, - { 54, 1 }, { 53, 0 }, { 53, 0 }, { 53, 1 }, { 52, 0 }, { 52, 0 }, { 52, 1 }, { 51, 0 }, - { 51, 0 }, { 51, 1 }, { 50, 0 }, { 50, 0 }, { 50, 1 }, { 49, 0 }, { 49, 0 }, { 49, 1 }, - { 48, 0 }, { 48, 0 }, { 48, 1 }, { 47, 0 }, { 47, 0 }, { 47, 0 }, { 47, 1 }, { 46, 0 }, - { 46, 0 }, { 46, 1 }, { 45, 0 }, { 45, 0 }, { 45, 0 }, { 45, 1 }, { 44, 0 }, { 44, 0 }, - { 44, 0 }, { 44, 1 }, { 43, 0 }, { 43, 0 }, { 43, 0 }, { 43, 1 }, { 42, 0 }, { 42, 0 }, - { 42, 0 }, { 42, 1 }, { 41, 0 }, { 41, 0 }, { 41, 0 }, { 41, 0 }, { 41, 1 }, { 40, 0 }, - { 40, 0 }, { 40, 0 }, { 40, 0 }, { 40, 1 }, { 39, 0 }, { 39, 0 }, { 39, 0 }, { 39, 0 }, - { 39, 1 }, { 38, 0 }, { 38, 0 }, { 38, 0 }, { 38, 0 }, { 38, 1 }, { 37, 0 }, { 37, 0 }, - { 37, 0 }, { 37, 0 }, { 37, 0 }, { 37, 1 }, { 36, 0 }, { 36, 0 }, { 36, 0 }, { 36, 0 }, - { 36, 1 }, { 35, 0 }, { 35, 0 }, { 35, 0 }, { 35, 0 }, { 35, 0 }, { 35, 0 }, { 35, 1 }, - { 34, 0 }, { 34, 0 }, { 34, 0 }, { 34, 0 }, { 34, 0 }, { 34, 1 }, { 33, 0 }, { 33, 0 }, - { 33, 0 }, { 33, 0 }, { 33, 0 }, { 33, 0 }, { 33, 1 }, { 32, 0 }, { 32, 0 }, { 32, 0 }, - { 32, 0 }, { 32, 0 }, { 32, 0 }, { 32, 0 }, { 32, 1 }, { 31, 0 }, { 31, 0 }, { 31, 0 }, - { 31, 0 }, { 31, 0 }, { 31, 0 }, { 31, 1 }, { 30, 0 }, { 30, 0 }, { 30, 0 }, { 30, 0 } + { 977, 109 }, { 868, 87 }, { 781, 71 }, { 710, 59 }, { 651, 50 }, { 601, 43 }, { 558, 37 }, { 521, 33 }, + { 488, 28 }, { 460, 26 }, { 434, 23 }, { 411, 20 }, { 391, 19 }, { 372, 17 }, { 355, 15 }, { 340, 14 }, + { 326, 13 }, { 313, 13 }, { 300, 11 }, { 289, 10 }, { 279, 10 }, { 269, 9 }, { 260, 8 }, { 252, 8 }, + { 244, 7 }, { 237, 7 }, { 230, 7 }, { 223, 6 }, { 217, 6 }, { 211, 5 }, { 206, 6 }, { 200, 5 }, + { 195, 4 }, { 191, 5 }, { 186, 4 }, { 182, 4 }, { 178, 4 }, { 174, 4 }, { 170, 4 }, { 166, 3 }, + { 163, 4 }, { 159, 3 }, { 156, 3 }, { 153, 3 }, { 150, 3 }, { 147, 2 }, { 145, 3 }, { 142, 2 }, + { 140, 3 }, { 137, 2 }, { 135, 3 }, { 132, 2 }, { 130, 2 }, { 128, 2 }, { 126, 2 }, { 124, 2 }, + { 122, 2 }, { 120, 2 }, { 118, 1 }, { 117, 2 }, { 115, 2 }, { 113, 1 }, { 112, 2 }, { 110, 1 }, + { 109, 2 }, { 107, 1 }, { 106, 2 }, { 104, 1 }, { 103, 2 }, { 101, 1 }, { 100, 1 }, { 99, 1 }, + { 98, 2 }, { 96, 1 }, { 95, 1 }, { 94, 1 }, { 93, 1 }, { 92, 1 }, { 91, 1 }, { 90, 1 }, + { 89, 1 }, { 88, 1 }, { 87, 1 }, { 86, 1 }, { 85, 1 }, { 84, 1 }, { 83, 1 }, { 82, 1 }, + { 81, 0 }, { 81, 1 }, { 80, 1 }, { 79, 1 }, { 78, 1 }, { 77, 0 }, { 77, 1 }, { 76, 1 }, + { 75, 1 }, { 74, 0 }, { 74, 1 }, { 73, 1 }, { 72, 0 }, { 72, 1 }, { 71, 1 }, { 70, 0 }, + { 70, 1 }, { 69, 0 }, { 69, 1 }, { 68, 1 }, { 67, 0 }, { 67, 1 }, { 66, 0 }, { 66, 1 }, + { 65, 0 }, { 65, 1 }, { 64, 0 }, { 64, 1 }, { 63, 0 }, { 63, 1 }, { 62, 0 }, { 62, 1 }, + { 61, 0 }, { 61, 1 }, { 60, 0 }, { 60, 1 }, { 59, 0 }, { 59, 1 }, { 58, 0 }, { 58, 1 }, + { 57, 0 }, { 57, 0 }, { 57, 1 }, { 56, 0 }, { 56, 1 }, { 55, 0 }, { 55, 0 }, { 55, 1 }, + { 54, 0 }, { 54, 0 }, { 54, 1 }, { 53, 0 }, { 53, 1 }, { 52, 0 }, { 52, 0 }, { 52, 1 }, + { 51, 0 }, { 51, 0 }, { 51, 1 }, { 50, 0 }, { 50, 0 }, { 50, 1 }, { 49, 0 }, { 49, 0 }, + { 49, 0 }, { 49, 1 }, { 48, 0 }, { 48, 0 }, { 48, 1 }, { 47, 0 }, { 47, 0 }, { 47, 0 }, + { 47, 1 }, { 46, 0 }, { 46, 0 }, { 46, 1 }, { 45, 0 }, { 45, 0 }, { 45, 0 }, { 45, 1 }, + { 44, 0 }, { 44, 0 }, { 44, 0 }, { 44, 1 }, { 43, 0 }, { 43, 0 }, { 43, 0 }, { 43, 1 }, + { 42, 0 }, { 42, 0 }, { 42, 0 }, { 42, 0 }, { 42, 1 }, { 41, 0 }, { 41, 0 }, { 41, 0 }, + { 41, 1 }, { 40, 0 }, { 40, 0 }, { 40, 0 }, { 40, 0 }, { 40, 1 }, { 39, 0 }, { 39, 0 }, + { 39, 0 }, { 39, 0 }, { 39, 1 }, { 38, 0 }, { 38, 0 }, { 38, 0 }, { 38, 0 }, { 38, 0 }, + { 38, 1 }, { 37, 0 }, { 37, 0 }, { 37, 0 }, { 37, 0 }, { 37, 0 }, { 37, 1 }, { 36, 0 }, + { 36, 0 }, { 36, 0 }, { 36, 0 }, { 36, 0 }, { 36, 1 }, { 35, 0 }, { 35, 0 }, { 35, 0 }, + { 35, 0 }, { 35, 0 }, { 35, 1 }, { 34, 0 }, { 34, 0 }, { 34, 0 }, { 34, 0 }, { 34, 0 }, + { 34, 0 }, { 34, 1 }, { 33, 0 }, { 33, 0 }, { 33, 0 }, { 33, 0 }, { 33, 0 }, { 33, 0 }, + { 33, 1 }, { 32, 0 }, { 32, 0 }, { 32, 0 }, { 32, 0 }, { 32, 0 }, { 32, 0 }, { 32, 0 }, + { 32, 1 }, { 31, 0 }, { 31, 0 }, { 31, 0 }, { 31, 0 }, { 31, 0 }, { 31, 0 }, { 31, 0 }, }; const uint16_t speed_lookuptable_slow[256][2] PROGMEM = { - { 62500, 12500 }, { 50000, 8334 }, { 41666, 5952 }, { 35714, 4464 }, { 31250, 3473 }, { 27777, 2777 }, { 25000, 2273 }, { 22727, 1894 }, - { 20833, 1603 }, { 19230, 1373 }, { 17857, 1191 }, { 16666, 1041 }, { 15625, 920 }, { 14705, 817 }, { 13888, 731 }, { 13157, 657 }, - { 12500, 596 }, { 11904, 541 }, { 11363, 494 }, { 10869, 453 }, { 10416, 416 }, { 10000, 385 }, { 9615, 356 }, { 9259, 331 }, - { 8928, 308 }, { 8620, 287 }, { 8333, 269 }, { 8064, 252 }, { 7812, 237 }, { 7575, 223 }, { 7352, 210 }, { 7142, 198 }, - { 6944, 188 }, { 6756, 178 }, { 6578, 168 }, { 6410, 160 }, { 6250, 153 }, { 6097, 145 }, { 5952, 139 }, { 5813, 132 }, - { 5681, 126 }, { 5555, 121 }, { 5434, 115 }, { 5319, 111 }, { 5208, 106 }, { 5102, 102 }, { 5000, 99 }, { 4901, 94 }, - { 4807, 91 }, { 4716, 87 }, { 4629, 84 }, { 4545, 81 }, { 4464, 79 }, { 4385, 75 }, { 4310, 73 }, { 4237, 71 }, - { 4166, 68 }, { 4098, 66 }, { 4032, 64 }, { 3968, 62 }, { 3906, 60 }, { 3846, 59 }, { 3787, 56 }, { 3731, 55 }, - { 3676, 53 }, { 3623, 52 }, { 3571, 50 }, { 3521, 49 }, { 3472, 48 }, { 3424, 46 }, { 3378, 45 }, { 3333, 44 }, - { 3289, 43 }, { 3246, 41 }, { 3205, 41 }, { 3164, 39 }, { 3125, 39 }, { 3086, 38 }, { 3048, 36 }, { 3012, 36 }, - { 2976, 35 }, { 2941, 35 }, { 2906, 33 }, { 2873, 33 }, { 2840, 32 }, { 2808, 31 }, { 2777, 30 }, { 2747, 30 }, - { 2717, 29 }, { 2688, 29 }, { 2659, 28 }, { 2631, 27 }, { 2604, 27 }, { 2577, 26 }, { 2551, 26 }, { 2525, 25 }, - { 2500, 25 }, { 2475, 25 }, { 2450, 23 }, { 2427, 24 }, { 2403, 23 }, { 2380, 22 }, { 2358, 22 }, { 2336, 22 }, - { 2314, 21 }, { 2293, 21 }, { 2272, 20 }, { 2252, 20 }, { 2232, 20 }, { 2212, 20 }, { 2192, 19 }, { 2173, 18 }, - { 2155, 19 }, { 2136, 18 }, { 2118, 18 }, { 2100, 17 }, { 2083, 17 }, { 2066, 17 }, { 2049, 17 }, { 2032, 16 }, - { 2016, 16 }, { 2000, 16 }, { 1984, 16 }, { 1968, 15 }, { 1953, 16 }, { 1937, 14 }, { 1923, 15 }, { 1908, 15 }, - { 1893, 14 }, { 1879, 14 }, { 1865, 14 }, { 1851, 13 }, { 1838, 14 }, { 1824, 13 }, { 1811, 13 }, { 1798, 13 }, - { 1785, 12 }, { 1773, 13 }, { 1760, 12 }, { 1748, 12 }, { 1736, 12 }, { 1724, 12 }, { 1712, 12 }, { 1700, 11 }, - { 1689, 12 }, { 1677, 11 }, { 1666, 11 }, { 1655, 11 }, { 1644, 11 }, { 1633, 10 }, { 1623, 11 }, { 1612, 10 }, - { 1602, 10 }, { 1592, 10 }, { 1582, 10 }, { 1572, 10 }, { 1562, 10 }, { 1552, 9 }, { 1543, 10 }, { 1533, 9 }, - { 1524, 9 }, { 1515, 9 }, { 1506, 9 }, { 1497, 9 }, { 1488, 9 }, { 1479, 9 }, { 1470, 9 }, { 1461, 8 }, - { 1453, 8 }, { 1445, 9 }, { 1436, 8 }, { 1428, 8 }, { 1420, 8 }, { 1412, 8 }, { 1404, 8 }, { 1396, 8 }, - { 1388, 7 }, { 1381, 8 }, { 1373, 7 }, { 1366, 8 }, { 1358, 7 }, { 1351, 7 }, { 1344, 8 }, { 1336, 7 }, - { 1329, 7 }, { 1322, 7 }, { 1315, 7 }, { 1308, 6 }, { 1302, 7 }, { 1295, 7 }, { 1288, 6 }, { 1282, 7 }, - { 1275, 6 }, { 1269, 7 }, { 1262, 6 }, { 1256, 6 }, { 1250, 7 }, { 1243, 6 }, { 1237, 6 }, { 1231, 6 }, - { 1225, 6 }, { 1219, 6 }, { 1213, 6 }, { 1207, 6 }, { 1201, 5 }, { 1196, 6 }, { 1190, 6 }, { 1184, 5 }, - { 1179, 6 }, { 1173, 5 }, { 1168, 6 }, { 1162, 5 }, { 1157, 5 }, { 1152, 6 }, { 1146, 5 }, { 1141, 5 }, + { 62500, 12500 }, { 50000, 8333 }, { 41667, 5953 }, { 35714, 4464 }, { 31250, 3472 }, { 27778, 2778 }, { 25000, 2273 }, { 22727, 1894 }, + { 20833, 1602 }, { 19231, 1374 }, { 17857, 1190 }, { 16667, 1042 }, { 15625, 919 }, { 14706, 817 }, { 13889, 731 }, { 13158, 658 }, + { 12500, 595 }, { 11905, 541 }, { 11364, 494 }, { 10870, 453 }, { 10417, 417 }, { 10000, 385 }, { 9615, 356 }, { 9259, 330 }, + { 8929, 308 }, { 8621, 288 }, { 8333, 268 }, { 8065, 252 }, { 7813, 237 }, { 7576, 223 }, { 7353, 210 }, { 7143, 199 }, + { 6944, 187 }, { 6757, 178 }, { 6579, 169 }, { 6410, 160 }, { 6250, 152 }, { 6098, 146 }, { 5952, 138 }, { 5814, 132 }, + { 5682, 126 }, { 5556, 121 }, { 5435, 116 }, { 5319, 111 }, { 5208, 106 }, { 5102, 102 }, { 5000, 98 }, { 4902, 94 }, + { 4808, 91 }, { 4717, 87 }, { 4630, 85 }, { 4545, 81 }, { 4464, 78 }, { 4386, 76 }, { 4310, 73 }, { 4237, 70 }, + { 4167, 69 }, { 4098, 66 }, { 4032, 64 }, { 3968, 62 }, { 3906, 60 }, { 3846, 58 }, { 3788, 57 }, { 3731, 55 }, + { 3676, 53 }, { 3623, 52 }, { 3571, 50 }, { 3521, 49 }, { 3472, 47 }, { 3425, 47 }, { 3378, 45 }, { 3333, 44 }, + { 3289, 42 }, { 3247, 42 }, { 3205, 40 }, { 3165, 40 }, { 3125, 39 }, { 3086, 37 }, { 3049, 37 }, { 3012, 36 }, + { 2976, 35 }, { 2941, 34 }, { 2907, 33 }, { 2874, 33 }, { 2841, 32 }, { 2809, 31 }, { 2778, 31 }, { 2747, 30 }, + { 2717, 29 }, { 2688, 28 }, { 2660, 28 }, { 2632, 28 }, { 2604, 27 }, { 2577, 26 }, { 2551, 26 }, { 2525, 25 }, + { 2500, 25 }, { 2475, 24 }, { 2451, 24 }, { 2427, 23 }, { 2404, 23 }, { 2381, 23 }, { 2358, 22 }, { 2336, 21 }, + { 2315, 21 }, { 2294, 21 }, { 2273, 21 }, { 2252, 20 }, { 2232, 20 }, { 2212, 19 }, { 2193, 19 }, { 2174, 19 }, + { 2155, 18 }, { 2137, 18 }, { 2119, 18 }, { 2101, 18 }, { 2083, 17 }, { 2066, 17 }, { 2049, 16 }, { 2033, 17 }, + { 2016, 16 }, { 2000, 16 }, { 1984, 15 }, { 1969, 16 }, { 1953, 15 }, { 1938, 15 }, { 1923, 15 }, { 1908, 14 }, + { 1894, 14 }, { 1880, 14 }, { 1866, 14 }, { 1852, 14 }, { 1838, 13 }, { 1825, 13 }, { 1812, 13 }, { 1799, 13 }, + { 1786, 13 }, { 1773, 12 }, { 1761, 13 }, { 1748, 12 }, { 1736, 12 }, { 1724, 12 }, { 1712, 11 }, { 1701, 12 }, + { 1689, 11 }, { 1678, 11 }, { 1667, 11 }, { 1656, 11 }, { 1645, 11 }, { 1634, 11 }, { 1623, 10 }, { 1613, 10 }, + { 1603, 11 }, { 1592, 10 }, { 1582, 10 }, { 1572, 9 }, { 1563, 10 }, { 1553, 10 }, { 1543, 9 }, { 1534, 10 }, + { 1524, 9 }, { 1515, 9 }, { 1506, 9 }, { 1497, 9 }, { 1488, 9 }, { 1479, 8 }, { 1471, 9 }, { 1462, 9 }, + { 1453, 8 }, { 1445, 8 }, { 1437, 8 }, { 1429, 9 }, { 1420, 8 }, { 1412, 8 }, { 1404, 7 }, { 1397, 8 }, + { 1389, 8 }, { 1381, 7 }, { 1374, 8 }, { 1366, 7 }, { 1359, 8 }, { 1351, 7 }, { 1344, 7 }, { 1337, 7 }, + { 1330, 7 }, { 1323, 7 }, { 1316, 7 }, { 1309, 7 }, { 1302, 7 }, { 1295, 6 }, { 1289, 7 }, { 1282, 6 }, + { 1276, 7 }, { 1269, 6 }, { 1263, 7 }, { 1256, 6 }, { 1250, 6 }, { 1244, 6 }, { 1238, 6 }, { 1232, 7 }, + { 1225, 5 }, { 1220, 6 }, { 1214, 6 }, { 1208, 6 }, { 1202, 6 }, { 1196, 6 }, { 1190, 5 }, { 1185, 6 }, + { 1179, 5 }, { 1174, 6 }, { 1168, 5 }, { 1163, 6 }, { 1157, 5 }, { 1152, 5 }, { 1147, 5 }, { 1142, 6 }, { 1136, 5 }, { 1131, 5 }, { 1126, 5 }, { 1121, 5 }, { 1116, 5 }, { 1111, 5 }, { 1106, 5 }, { 1101, 5 }, - { 1096, 5 }, { 1091, 5 }, { 1086, 4 }, { 1082, 5 }, { 1077, 5 }, { 1072, 4 }, { 1068, 5 }, { 1063, 4 }, - { 1059, 5 }, { 1054, 4 }, { 1050, 4 }, { 1046, 5 }, { 1041, 4 }, { 1037, 4 }, { 1033, 5 }, { 1028, 4 }, - { 1024, 4 }, { 1020, 4 }, { 1016, 4 }, { 1012, 4 }, { 1008, 4 }, { 1004, 4 }, { 1000, 4 }, { 996, 4 }, - { 992, 4 }, { 988, 4 }, { 984, 4 }, { 980, 4 }, { 976, 4 }, { 972, 4 }, { 968, 3 }, { 965, 3 } + { 1096, 4 }, { 1092, 5 }, { 1087, 5 }, { 1082, 4 }, { 1078, 5 }, { 1073, 5 }, { 1068, 4 }, { 1064, 5 }, + { 1059, 4 }, { 1055, 5 }, { 1050, 4 }, { 1046, 4 }, { 1042, 5 }, { 1037, 4 }, { 1033, 4 }, { 1029, 4 }, + { 1025, 5 }, { 1020, 4 }, { 1016, 4 }, { 1012, 4 }, { 1008, 4 }, { 1004, 4 }, { 1000, 4 }, { 996, 4 }, + { 992, 4 }, { 988, 4 }, { 984, 4 }, { 980, 3 }, { 977, 4 }, { 973, 4 }, { 969, 4 }, { 965, 4 }, }; #elif F_CPU == 20000000 - const uint16_t speed_lookuptable_fast[256][2] PROGMEM = { + const struct { uint16_t base; uint8_t gain; } speed_lookuptable_fast[256] PROGMEM = { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, // dummy first row - { 1197, 131 }, { 1066, 105 }, { 961, 86 }, { 875, 72 }, { 803, 61 }, { 742, 53 }, { 689, 45 }, { 644, 40 }, - { 604, 35 }, { 569, 32 }, { 537, 28 }, { 509, 25 }, { 484, 23 }, { 461, 21 }, { 440, 19 }, { 421, 17 }, - { 404, 16 }, { 388, 15 }, { 373, 14 }, { 359, 13 }, { 346, 12 }, { 334, 11 }, { 323, 10 }, { 313, 10 }, - { 303, 9 }, { 294, 9 }, { 285, 8 }, { 277, 7 }, { 270, 8 }, { 262, 7 }, { 255, 6 }, { 249, 6 }, - { 243, 6 }, { 237, 6 }, { 231, 5 }, { 226, 5 }, { 221, 5 }, { 216, 5 }, { 211, 4 }, { 207, 5 }, - { 202, 4 }, { 198, 4 }, { 194, 4 }, { 190, 3 }, { 187, 4 }, { 183, 3 }, { 180, 3 }, { 177, 4 }, - { 173, 3 }, { 170, 3 }, { 167, 2 }, { 165, 3 }, { 162, 3 }, { 159, 2 }, { 157, 3 }, { 154, 2 }, - { 152, 3 }, { 149, 2 }, { 147, 2 }, { 145, 2 }, { 143, 2 }, { 141, 2 }, { 139, 2 }, { 137, 2 }, - { 135, 2 }, { 133, 2 }, { 131, 2 }, { 129, 1 }, { 128, 2 }, { 126, 2 }, { 124, 1 }, { 123, 2 }, - { 121, 1 }, { 120, 2 }, { 118, 1 }, { 117, 1 }, { 116, 2 }, { 114, 1 }, { 113, 1 }, { 112, 2 }, - { 110, 1 }, { 109, 1 }, { 108, 1 }, { 107, 2 }, { 105, 1 }, { 104, 1 }, { 103, 1 }, { 102, 1 }, - { 101, 1 }, { 100, 1 }, { 99, 1 }, { 98, 1 }, { 97, 1 }, { 96, 1 }, { 95, 1 }, { 94, 1 }, - { 93, 1 }, { 92, 1 }, { 91, 0 }, { 91, 1 }, { 90, 1 }, { 89, 1 }, { 88, 1 }, { 87, 0 }, - { 87, 1 }, { 86, 1 }, { 85, 1 }, { 84, 0 }, { 84, 1 }, { 83, 1 }, { 82, 1 }, { 81, 0 }, - { 81, 1 }, { 80, 1 }, { 79, 0 }, { 79, 1 }, { 78, 0 }, { 78, 1 }, { 77, 1 }, { 76, 0 }, - { 76, 1 }, { 75, 0 }, { 75, 1 }, { 74, 1 }, { 73, 0 }, { 73, 1 }, { 72, 0 }, { 72, 1 }, - { 71, 0 }, { 71, 1 }, { 70, 0 }, { 70, 1 }, { 69, 0 }, { 69, 1 }, { 68, 0 }, { 68, 1 }, - { 67, 0 }, { 67, 1 }, { 66, 0 }, { 66, 1 }, { 65, 0 }, { 65, 0 }, { 65, 1 }, { 64, 0 }, - { 64, 1 }, { 63, 0 }, { 63, 1 }, { 62, 0 }, { 62, 0 }, { 62, 1 }, { 61, 0 }, { 61, 1 }, - { 60, 0 }, { 60, 0 }, { 60, 1 }, { 59, 0 }, { 59, 0 }, { 59, 1 }, { 58, 0 }, { 58, 0 }, - { 58, 1 }, { 57, 0 }, { 57, 0 }, { 57, 1 }, { 56, 0 }, { 56, 0 }, { 56, 1 }, { 55, 0 }, - { 55, 0 }, { 55, 1 }, { 54, 0 }, { 54, 0 }, { 54, 1 }, { 53, 0 }, { 53, 0 }, { 53, 0 }, - { 53, 1 }, { 52, 0 }, { 52, 0 }, { 52, 1 }, { 51, 0 }, { 51, 0 }, { 51, 0 }, { 51, 1 }, - { 50, 0 }, { 50, 0 }, { 50, 0 }, { 50, 1 }, { 49, 0 }, { 49, 0 }, { 49, 0 }, { 49, 1 }, - { 48, 0 }, { 48, 0 }, { 48, 0 }, { 48, 1 }, { 47, 0 }, { 47, 0 }, { 47, 0 }, { 47, 1 }, - { 46, 0 }, { 46, 0 }, { 46, 0 }, { 46, 0 }, { 46, 1 }, { 45, 0 }, { 45, 0 }, { 45, 0 }, - { 45, 1 }, { 44, 0 }, { 44, 0 }, { 44, 0 }, { 44, 0 }, { 44, 1 }, { 43, 0 }, { 43, 0 }, - { 43, 0 }, { 43, 0 }, { 43, 1 }, { 42, 0 }, { 42, 0 }, { 42, 0 }, { 42, 0 }, { 42, 0 }, - { 42, 1 }, { 41, 0 }, { 41, 0 }, { 41, 0 }, { 41, 0 }, { 41, 0 }, { 41, 1 }, { 40, 0 }, - { 40, 0 }, { 40, 0 }, { 40, 0 }, { 40, 1 }, { 39, 0 }, { 39, 0 }, { 39, 0 }, { 39, 0 }, - { 39, 0 }, { 39, 0 }, { 39, 1 }, { 38, 0 }, { 38, 0 }, { 38, 0 }, { 38, 0 }, { 38, 0 }, + { 1221, 136 }, { 1085, 108 }, { 977, 89 }, { 888, 74 }, { 814, 63 }, { 751, 53 }, { 698, 47 }, { 651, 41 }, + { 610, 36 }, { 574, 31 }, { 543, 29 }, { 514, 26 }, { 488, 23 }, { 465, 21 }, { 444, 19 }, { 425, 18 }, + { 407, 16 }, { 391, 15 }, { 376, 14 }, { 362, 13 }, { 349, 12 }, { 337, 11 }, { 326, 11 }, { 315, 10 }, + { 305, 9 }, { 296, 9 }, { 287, 8 }, { 279, 8 }, { 271, 7 }, { 264, 7 }, { 257, 7 }, { 250, 6 }, + { 244, 6 }, { 238, 5 }, { 233, 6 }, { 227, 5 }, { 222, 5 }, { 217, 5 }, { 212, 4 }, { 208, 5 }, + { 203, 4 }, { 199, 4 }, { 195, 4 }, { 191, 3 }, { 188, 4 }, { 184, 3 }, { 181, 3 }, { 178, 4 }, + { 174, 3 }, { 171, 3 }, { 168, 2 }, { 166, 3 }, { 163, 3 }, { 160, 2 }, { 158, 3 }, { 155, 2 }, + { 153, 3 }, { 150, 2 }, { 148, 2 }, { 146, 2 }, { 144, 2 }, { 142, 2 }, { 140, 2 }, { 138, 2 }, + { 136, 2 }, { 134, 2 }, { 132, 2 }, { 130, 2 }, { 128, 1 }, { 127, 2 }, { 125, 1 }, { 124, 2 }, + { 122, 1 }, { 121, 2 }, { 119, 1 }, { 118, 2 }, { 116, 1 }, { 115, 1 }, { 114, 2 }, { 112, 1 }, + { 111, 1 }, { 110, 1 }, { 109, 2 }, { 107, 1 }, { 106, 1 }, { 105, 1 }, { 104, 1 }, { 103, 1 }, + { 102, 1 }, { 101, 1 }, { 100, 1 }, { 99, 1 }, { 98, 1 }, { 97, 1 }, { 96, 1 }, { 95, 1 }, + { 94, 1 }, { 93, 1 }, { 92, 1 }, { 91, 1 }, { 90, 0 }, { 90, 1 }, { 89, 1 }, { 88, 1 }, + { 87, 1 }, { 86, 0 }, { 86, 1 }, { 85, 1 }, { 84, 1 }, { 83, 0 }, { 83, 1 }, { 82, 1 }, + { 81, 0 }, { 81, 1 }, { 80, 1 }, { 79, 0 }, { 79, 1 }, { 78, 0 }, { 78, 1 }, { 77, 1 }, + { 76, 0 }, { 76, 1 }, { 75, 0 }, { 75, 1 }, { 74, 1 }, { 73, 0 }, { 73, 1 }, { 72, 0 }, + { 72, 1 }, { 71, 0 }, { 71, 1 }, { 70, 0 }, { 70, 1 }, { 69, 0 }, { 69, 1 }, { 68, 0 }, + { 68, 1 }, { 67, 0 }, { 67, 1 }, { 66, 0 }, { 66, 0 }, { 66, 1 }, { 65, 0 }, { 65, 1 }, + { 64, 0 }, { 64, 1 }, { 63, 0 }, { 63, 0 }, { 63, 1 }, { 62, 0 }, { 62, 1 }, { 61, 0 }, + { 61, 0 }, { 61, 1 }, { 60, 0 }, { 60, 0 }, { 60, 1 }, { 59, 0 }, { 59, 1 }, { 58, 0 }, + { 58, 0 }, { 58, 1 }, { 57, 0 }, { 57, 0 }, { 57, 1 }, { 56, 0 }, { 56, 0 }, { 56, 1 }, + { 55, 0 }, { 55, 0 }, { 55, 0 }, { 55, 1 }, { 54, 0 }, { 54, 0 }, { 54, 1 }, { 53, 0 }, + { 53, 0 }, { 53, 0 }, { 53, 1 }, { 52, 0 }, { 52, 0 }, { 52, 1 }, { 51, 0 }, { 51, 0 }, + { 51, 0 }, { 51, 1 }, { 50, 0 }, { 50, 0 }, { 50, 0 }, { 50, 1 }, { 49, 0 }, { 49, 0 }, + { 49, 0 }, { 49, 1 }, { 48, 0 }, { 48, 0 }, { 48, 0 }, { 48, 1 }, { 47, 0 }, { 47, 0 }, + { 47, 0 }, { 47, 0 }, { 47, 1 }, { 46, 0 }, { 46, 0 }, { 46, 0 }, { 46, 1 }, { 45, 0 }, + { 45, 0 }, { 45, 0 }, { 45, 0 }, { 45, 1 }, { 44, 0 }, { 44, 0 }, { 44, 0 }, { 44, 0 }, + { 44, 1 }, { 43, 0 }, { 43, 0 }, { 43, 0 }, { 43, 0 }, { 43, 1 }, { 42, 0 }, { 42, 0 }, + { 42, 0 }, { 42, 0 }, { 42, 0 }, { 42, 1 }, { 41, 0 }, { 41, 0 }, { 41, 0 }, { 41, 0 }, + { 41, 0 }, { 41, 1 }, { 40, 0 }, { 40, 0 }, { 40, 0 }, { 40, 0 }, { 40, 0 }, { 40, 1 }, + { 39, 0 }, { 39, 0 }, { 39, 0 }, { 39, 0 }, { 39, 0 }, { 39, 1 }, { 38, 0 }, { 38, 0 }, }; const uint16_t speed_lookuptable_slow[256][2] PROGMEM = { - { 62500, 10417 }, { 52083, 7441 }, { 44642, 5580 }, { 39062, 4340 }, { 34722, 3472 }, { 31250, 2841 }, { 28409, 2368 }, { 26041, 2003 }, - { 24038, 1717 }, { 22321, 1488 }, { 20833, 1302 }, { 19531, 1149 }, { 18382, 1021 }, { 17361, 914 }, { 16447, 822 }, { 15625, 745 }, - { 14880, 676 }, { 14204, 618 }, { 13586, 566 }, { 13020, 520 }, { 12500, 481 }, { 12019, 445 }, { 11574, 414 }, { 11160, 385 }, - { 10775, 359 }, { 10416, 336 }, { 10080, 315 }, { 9765, 296 }, { 9469, 278 }, { 9191, 263 }, { 8928, 248 }, { 8680, 235 }, - { 8445, 222 }, { 8223, 211 }, { 8012, 200 }, { 7812, 191 }, { 7621, 181 }, { 7440, 173 }, { 7267, 165 }, { 7102, 158 }, - { 6944, 151 }, { 6793, 145 }, { 6648, 138 }, { 6510, 133 }, { 6377, 127 }, { 6250, 123 }, { 6127, 118 }, { 6009, 113 }, - { 5896, 109 }, { 5787, 106 }, { 5681, 101 }, { 5580, 98 }, { 5482, 95 }, { 5387, 91 }, { 5296, 88 }, { 5208, 86 }, - { 5122, 82 }, { 5040, 80 }, { 4960, 78 }, { 4882, 75 }, { 4807, 73 }, { 4734, 70 }, { 4664, 69 }, { 4595, 67 }, - { 4528, 64 }, { 4464, 63 }, { 4401, 61 }, { 4340, 60 }, { 4280, 58 }, { 4222, 56 }, { 4166, 55 }, { 4111, 53 }, - { 4058, 52 }, { 4006, 51 }, { 3955, 49 }, { 3906, 48 }, { 3858, 48 }, { 3810, 45 }, { 3765, 45 }, { 3720, 44 }, - { 3676, 43 }, { 3633, 42 }, { 3591, 40 }, { 3551, 40 }, { 3511, 39 }, { 3472, 38 }, { 3434, 38 }, { 3396, 36 }, - { 3360, 36 }, { 3324, 35 }, { 3289, 34 }, { 3255, 34 }, { 3221, 33 }, { 3188, 32 }, { 3156, 31 }, { 3125, 31 }, - { 3094, 31 }, { 3063, 30 }, { 3033, 29 }, { 3004, 28 }, { 2976, 28 }, { 2948, 28 }, { 2920, 27 }, { 2893, 27 }, - { 2866, 26 }, { 2840, 25 }, { 2815, 25 }, { 2790, 25 }, { 2765, 24 }, { 2741, 24 }, { 2717, 24 }, { 2693, 23 }, - { 2670, 22 }, { 2648, 22 }, { 2626, 22 }, { 2604, 22 }, { 2582, 21 }, { 2561, 21 }, { 2540, 20 }, { 2520, 20 }, - { 2500, 20 }, { 2480, 20 }, { 2460, 19 }, { 2441, 19 }, { 2422, 19 }, { 2403, 18 }, { 2385, 18 }, { 2367, 18 }, - { 2349, 17 }, { 2332, 18 }, { 2314, 17 }, { 2297, 16 }, { 2281, 17 }, { 2264, 16 }, { 2248, 16 }, { 2232, 16 }, - { 2216, 16 }, { 2200, 15 }, { 2185, 15 }, { 2170, 15 }, { 2155, 15 }, { 2140, 15 }, { 2125, 14 }, { 2111, 14 }, - { 2097, 14 }, { 2083, 14 }, { 2069, 14 }, { 2055, 13 }, { 2042, 13 }, { 2029, 13 }, { 2016, 13 }, { 2003, 13 }, - { 1990, 13 }, { 1977, 12 }, { 1965, 12 }, { 1953, 13 }, { 1940, 11 }, { 1929, 12 }, { 1917, 12 }, { 1905, 12 }, - { 1893, 11 }, { 1882, 11 }, { 1871, 11 }, { 1860, 11 }, { 1849, 11 }, { 1838, 11 }, { 1827, 11 }, { 1816, 10 }, - { 1806, 11 }, { 1795, 10 }, { 1785, 10 }, { 1775, 10 }, { 1765, 10 }, { 1755, 10 }, { 1745, 9 }, { 1736, 10 }, - { 1726, 9 }, { 1717, 10 }, { 1707, 9 }, { 1698, 9 }, { 1689, 9 }, { 1680, 9 }, { 1671, 9 }, { 1662, 9 }, - { 1653, 9 }, { 1644, 8 }, { 1636, 9 }, { 1627, 8 }, { 1619, 9 }, { 1610, 8 }, { 1602, 8 }, { 1594, 8 }, - { 1586, 8 }, { 1578, 8 }, { 1570, 8 }, { 1562, 8 }, { 1554, 7 }, { 1547, 8 }, { 1539, 8 }, { 1531, 7 }, - { 1524, 8 }, { 1516, 7 }, { 1509, 7 }, { 1502, 7 }, { 1495, 7 }, { 1488, 7 }, { 1481, 7 }, { 1474, 7 }, - { 1467, 7 }, { 1460, 7 }, { 1453, 7 }, { 1446, 6 }, { 1440, 7 }, { 1433, 7 }, { 1426, 6 }, { 1420, 6 }, - { 1414, 7 }, { 1407, 6 }, { 1401, 6 }, { 1395, 7 }, { 1388, 6 }, { 1382, 6 }, { 1376, 6 }, { 1370, 6 }, - { 1364, 6 }, { 1358, 6 }, { 1352, 6 }, { 1346, 5 }, { 1341, 6 }, { 1335, 6 }, { 1329, 5 }, { 1324, 6 }, - { 1318, 5 }, { 1313, 6 }, { 1307, 5 }, { 1302, 6 }, { 1296, 5 }, { 1291, 5 }, { 1286, 6 }, { 1280, 5 }, - { 1275, 5 }, { 1270, 5 }, { 1265, 5 }, { 1260, 5 }, { 1255, 5 }, { 1250, 5 }, { 1245, 5 }, { 1240, 5 }, - { 1235, 5 }, { 1230, 5 }, { 1225, 5 }, { 1220, 5 }, { 1215, 4 }, { 1211, 5 }, { 1206, 5 }, { 1201, 5 }, + { 62500, 10417 }, { 52083, 7440 }, { 44643, 5580 }, { 39063, 4341 }, { 34722, 3472 }, { 31250, 2841 }, { 28409, 2367 }, { 26042, 2004 }, + { 24038, 1717 }, { 22321, 1488 }, { 20833, 1302 }, { 19531, 1149 }, { 18382, 1021 }, { 17361, 914 }, { 16447, 822 }, { 15625, 744 }, + { 14881, 676 }, { 14205, 618 }, { 13587, 566 }, { 13021, 521 }, { 12500, 481 }, { 12019, 445 }, { 11574, 413 }, { 11161, 385 }, + { 10776, 359 }, { 10417, 336 }, { 10081, 315 }, { 9766, 296 }, { 9470, 279 }, { 9191, 262 }, { 8929, 248 }, { 8681, 235 }, + { 8446, 222 }, { 8224, 211 }, { 8013, 200 }, { 7813, 191 }, { 7622, 182 }, { 7440, 173 }, { 7267, 165 }, { 7102, 158 }, + { 6944, 151 }, { 6793, 144 }, { 6649, 139 }, { 6510, 132 }, { 6378, 128 }, { 6250, 123 }, { 6127, 117 }, { 6010, 114 }, + { 5896, 109 }, { 5787, 105 }, { 5682, 102 }, { 5580, 98 }, { 5482, 94 }, { 5388, 91 }, { 5297, 89 }, { 5208, 85 }, + { 5123, 83 }, { 5040, 80 }, { 4960, 77 }, { 4883, 75 }, { 4808, 73 }, { 4735, 71 }, { 4664, 68 }, { 4596, 67 }, + { 4529, 65 }, { 4464, 63 }, { 4401, 61 }, { 4340, 59 }, { 4281, 58 }, { 4223, 56 }, { 4167, 55 }, { 4112, 54 }, + { 4058, 52 }, { 4006, 50 }, { 3956, 50 }, { 3906, 48 }, { 3858, 47 }, { 3811, 46 }, { 3765, 45 }, { 3720, 44 }, + { 3676, 42 }, { 3634, 42 }, { 3592, 41 }, { 3551, 40 }, { 3511, 39 }, { 3472, 38 }, { 3434, 37 }, { 3397, 37 }, + { 3360, 36 }, { 3324, 35 }, { 3289, 34 }, { 3255, 33 }, { 3222, 33 }, { 3189, 32 }, { 3157, 32 }, { 3125, 31 }, + { 3094, 30 }, { 3064, 30 }, { 3034, 29 }, { 3005, 29 }, { 2976, 28 }, { 2948, 27 }, { 2921, 27 }, { 2894, 27 }, + { 2867, 26 }, { 2841, 26 }, { 2815, 25 }, { 2790, 25 }, { 2765, 24 }, { 2741, 24 }, { 2717, 23 }, { 2694, 23 }, + { 2671, 23 }, { 2648, 22 }, { 2626, 22 }, { 2604, 21 }, { 2583, 22 }, { 2561, 20 }, { 2541, 21 }, { 2520, 20 }, + { 2500, 20 }, { 2480, 19 }, { 2461, 20 }, { 2441, 19 }, { 2422, 18 }, { 2404, 19 }, { 2385, 18 }, { 2367, 17 }, + { 2350, 18 }, { 2332, 17 }, { 2315, 17 }, { 2298, 17 }, { 2281, 17 }, { 2264, 16 }, { 2248, 16 }, { 2232, 16 }, + { 2216, 15 }, { 2201, 16 }, { 2185, 15 }, { 2170, 15 }, { 2155, 15 }, { 2140, 14 }, { 2126, 15 }, { 2111, 14 }, + { 2097, 14 }, { 2083, 13 }, { 2070, 14 }, { 2056, 14 }, { 2042, 13 }, { 2029, 13 }, { 2016, 13 }, { 2003, 13 }, + { 1990, 12 }, { 1978, 13 }, { 1965, 12 }, { 1953, 12 }, { 1941, 12 }, { 1929, 12 }, { 1917, 12 }, { 1905, 11 }, + { 1894, 11 }, { 1883, 12 }, { 1871, 11 }, { 1860, 11 }, { 1849, 11 }, { 1838, 11 }, { 1827, 10 }, { 1817, 11 }, + { 1806, 10 }, { 1796, 10 }, { 1786, 10 }, { 1776, 10 }, { 1766, 10 }, { 1756, 10 }, { 1746, 10 }, { 1736, 9 }, + { 1727, 10 }, { 1717, 9 }, { 1708, 10 }, { 1698, 9 }, { 1689, 9 }, { 1680, 9 }, { 1671, 9 }, { 1662, 9 }, + { 1653, 8 }, { 1645, 9 }, { 1636, 8 }, { 1628, 9 }, { 1619, 8 }, { 1611, 8 }, { 1603, 9 }, { 1594, 8 }, + { 1586, 8 }, { 1578, 8 }, { 1570, 7 }, { 1563, 8 }, { 1555, 8 }, { 1547, 8 }, { 1539, 7 }, { 1532, 8 }, + { 1524, 7 }, { 1517, 7 }, { 1510, 8 }, { 1502, 7 }, { 1495, 7 }, { 1488, 7 }, { 1481, 7 }, { 1474, 7 }, + { 1467, 7 }, { 1460, 7 }, { 1453, 6 }, { 1447, 7 }, { 1440, 7 }, { 1433, 6 }, { 1427, 7 }, { 1420, 6 }, + { 1414, 6 }, { 1408, 7 }, { 1401, 6 }, { 1395, 6 }, { 1389, 6 }, { 1383, 6 }, { 1377, 6 }, { 1371, 6 }, + { 1365, 6 }, { 1359, 6 }, { 1353, 6 }, { 1347, 6 }, { 1341, 6 }, { 1335, 5 }, { 1330, 6 }, { 1324, 5 }, + { 1319, 6 }, { 1313, 5 }, { 1308, 6 }, { 1302, 5 }, { 1297, 6 }, { 1291, 5 }, { 1286, 5 }, { 1281, 5 }, + { 1276, 6 }, { 1270, 5 }, { 1265, 5 }, { 1260, 5 }, { 1255, 5 }, { 1250, 5 }, { 1245, 5 }, { 1240, 5 }, + { 1235, 5 }, { 1230, 5 }, { 1225, 4 }, { 1221, 5 }, { 1216, 5 }, { 1211, 4 }, { 1207, 5 }, { 1202, 5 }, }; #endif diff --git a/buildroot/share/scripts/createSpeedLookupTable.py b/buildroot/share/scripts/createSpeedLookupTable.py index da24c7c811..70ed953e54 100755 --- a/buildroot/share/scripts/createSpeedLookupTable.py +++ b/buildroot/share/scripts/createSpeedLookupTable.py @@ -19,34 +19,36 @@ args = parser.parse_args() cpu_freq = args.cpu_freq * 1000000 timer_freq = cpu_freq / args.divider -print("#ifndef SPEED_LOOKUPTABLE_H") -print("#define SPEED_LOOKUPTABLE_H") +print("#pragma once") print() -print('#include "MarlinCore.h"') +print("#if F_CPU == %d" % cpu_freq) print() -print("const uint16_t speed_lookuptable_fast[256][2] PROGMEM = {") -a = [ timer_freq / ((i*256)+(args.cpu_freq*2)) for i in range(256) ] +print(" const struct { uint16_t base; uint8_t gain; } speed_lookuptable_fast[256] PROGMEM = {") +a = [0 for i in range(8)] + [ int(0.5 + float(timer_freq) / (i*256)) for i in range(8, 256) ] +b = [0 for i in range(8)] + [ a[i] - a[i+1] for i in range(8, 255) ] +b.append(b[-1]) +for i in range(32): + print(" ", end='') + for j in range(8): + print("{ %5d, %5d }," % (a[8*i+j], b[8*i+j]), end='') + if j < 7: print(" ", end='') + if i == 0: print(" // dummy first row") + else: print() +print(" };") +print() + +print(" const uint16_t speed_lookuptable_slow[256][2] PROGMEM = {") +a = [ int(0.5 + float(timer_freq) / ((i*8)+(args.cpu_freq*2))) for i in range(256) ] b = [ a[i] - a[i+1] for i in range(255) ] b.append(b[-1]) for i in range(32): - print(" ", end=' ') + print(" ", end='') for j in range(8): - print("{%d, %d}," % (a[8*i+j], b[8*i+j]), end=' ') + print("{ %5d, %5d }," % (a[8*i+j], b[8*i+j]), end='') + if j < 7: print(" ", end='') print() -print("};") -print() - -print("const uint16_t speed_lookuptable_slow[256][2] PROGMEM = {") -a = [ timer_freq / ((i*8)+(args.cpu_freq*2)) for i in range(256) ] -b = [ a[i] - a[i+1] for i in range(255) ] -b.append(b[-1]) -for i in range(32): - print(" ", end=' ') - for j in range(8): - print("{%d, %d}," % (a[8*i+j], b[8*i+j]), end=' ') - print() -print("};") +print(" };") print() print("#endif") From db2b8a695d2c1db99af009c3b72a60f566823484 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 12 Mar 2023 16:30:10 -0500 Subject: [PATCH 017/225] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20Update=20ISR=20cyc?= =?UTF-8?q?le=20counts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: tombrazier <68918209+tombrazier@users.noreply.github.com> --- Marlin/src/module/stepper.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/src/module/stepper.h b/Marlin/src/module/stepper.h index 820d1d9a73..797a72791c 100644 --- a/Marlin/src/module/stepper.h +++ b/Marlin/src/module/stepper.h @@ -111,7 +111,7 @@ #define TIMER_READ_ADD_AND_STORE_CYCLES 13UL // The base ISR - #define ISR_BASE_CYCLES 996UL + #define ISR_BASE_CYCLES 882UL // Linear advance base time is 32 cycles #if ENABLED(LIN_ADVANCE) @@ -138,7 +138,7 @@ #define ISR_LOOP_BASE_CYCLES 32UL // And each stepper (start + stop pulse) takes in worst case - #define ISR_STEPPER_CYCLES 88UL + #define ISR_STEPPER_CYCLES 60UL #endif From 9039e99df1b95f6a352fb1b2ae27f893b091cfe7 Mon Sep 17 00:00:00 2001 From: Neo2003 Date: Mon, 13 Mar 2023 22:55:03 +0100 Subject: [PATCH 018/225] =?UTF-8?q?=F0=9F=93=BA=20DGUS=5FRELOADED=201.03?= =?UTF-8?q?=20(#25490)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration.h | 2 +- Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.cpp | 9 +++------ .../src/lcd/extui/dgus_reloaded/config/DGUS_Addr.h | 12 ++++++------ .../extui/dgus_reloaded/definition/DGUS_VPList.cpp | 9 ++++----- 4 files changed, 14 insertions(+), 18 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 3b90555cec..111aa18d5d 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -3044,7 +3044,7 @@ * - Product: https://www.aliexpress.com/item/1005002008179262.html * * RELOADED (T5UID1) - * - Download https://github.com/Desuuuu/DGUS-reloaded/releases + * - Download https://github.com/Neo2003/DGUS-reloaded/releases * - Copy the downloaded DWIN_SET folder to the SD card. * * IA_CREALITY (T5UID1) diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.cpp b/Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.cpp index dc2aea8bef..b27988a89f 100644 --- a/Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.cpp +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.cpp @@ -180,12 +180,9 @@ #endif // SDSUPPORT void DGUSTxHandler::PositionZ(DGUS_VP &vp) { - float position = ExtUI::isAxisPositionKnown(ExtUI::Z) ? - planner.get_axis_position_mm(Z_AXIS) - : 0; - - const int16_t data = dgus_display.ToFixedPoint(position); - dgus_display.Write((uint16_t)vp.addr, Swap16(data)); + const float position = ExtUI::isAxisPositionKnown(ExtUI::Z) ? planner.get_axis_position_mm(Z_AXIS) : 0; + const int32_t data = dgus_display.ToFixedPoint(int32_t(position * 50.0f) / 50.0f); // Round to 0.02 + dgus_display.Write((uint16_t)vp.addr, dgus_display.SwapBytes(data)); } void DGUSTxHandler::Elapsed(DGUS_VP &vp) { diff --git a/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Addr.h b/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Addr.h index 39cc040f19..8cec8e59c9 100644 --- a/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Addr.h +++ b/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Addr.h @@ -107,10 +107,9 @@ enum class DGUS_Addr : uint16_t { SD_FileName4 = 0x30A5, // 0x30A5 - 0x30C4 SD_ScrollIcons = 0x30C5, // Bits: DGUS_Data::ScrollIcon SD_SelectedFileName = 0x30C6, // 0x30C6 - 0x30E5 - STATUS_PositionZ = 0x30E6, // Type: Fixed point, 1 decimal (16 bits signed) - STATUS_Elapsed = 0x30E7, // 0x30E7 - 0x30F5 - STATUS_Percent = 0x30F6, // Type: Integer (16 bits unsigned) - STATUS_Icons = 0x30F7, // Bits: DGUS_Data::StatusIcon + STATUS_PositionZ = 0x30E6, // Type: Fixed point, 2 decimal (32 bits signed) + STATUS_Elapsed = 0x30E8, // 0x30E8 - 0x30F6 + STATUS_Percent = 0x30F7, // Type: Integer (16 bits unsigned) ADJUST_Feedrate = 0x30F8, // Type: Integer (16 bits signed) ADJUST_Flowrate_CUR = 0x30F9, // Type: Integer (16 bits signed) #if HAS_MULTI_EXTRUDER @@ -120,11 +119,11 @@ enum class DGUS_Addr : uint16_t { TEMP_Current_Bed = 0x30FC, // Type: Integer (16 bits signed) TEMP_Target_Bed = 0x30FD, // Type: Integer (16 bits signed) TEMP_Max_Bed = 0x30FE, // Type: Integer (16 bits unsigned) - TEMP_Current_H0 = 0x30FF, // Type: Integer (16 bits signed) + TEMP_Current_H0 = 0x30FF, // Type: Fixed point, 1 decimal (16 bits signed) TEMP_Target_H0 = 0x3100, // Type: Integer (16 bits signed) TEMP_Max_H0 = 0x3101, // Type: Integer (16 bits unsigned) #if HAS_MULTI_HOTEND - TEMP_Current_H1 = 0x3102, // Type: Integer (16 bits signed) + TEMP_Current_H1 = 0x3102, // Type: Fixed point, 1 decimal (16 bits signed) TEMP_Target_H1 = 0x3103, // Type: Integer (16 bits signed) TEMP_Max_H1 = 0x3104, // Type: Integer (16 bits unsigned) #endif @@ -156,6 +155,7 @@ enum class DGUS_Addr : uint16_t { INFOS_LongestPrint = 0x318D, // 0x318D - 0x31A4 INFOS_FilamentUsed = 0x31A5, // 0x31A5 - 0x31BC WAIT_Icons = 0x31BD, // Bits: DGUS_Data::WaitIcon + STATUS_Icons = 0x31BE, // Bits: DGUS_Data::StatusIcon // READ-WRITE VARIABLES diff --git a/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VPList.cpp b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VPList.cpp index 4def1c48f8..3f00dbb037 100644 --- a/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VPList.cpp +++ b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VPList.cpp @@ -116,8 +116,7 @@ const struct DGUS_VP vp_list[] PROGMEM = { VP_HELPER_RX(DGUS_Addr::LEVEL_MANUAL_Point, &DGUSRxHandler::MoveToPoint), VP_HELPER_RX_NODATA(DGUS_Addr::LEVEL_AUTO_Probe, &DGUSRxHandler::Probe), - VP_HELPER_RX_NODATA(DGUS_Addr::LEVEL_AUTO_Disable, - &DGUSRxHandler::DisableABL), + VP_HELPER_RX_NODATA(DGUS_Addr::LEVEL_AUTO_Disable, &DGUSRxHandler::DisableABL), VP_HELPER_RX(DGUS_Addr::FILAMENT_Select, &DGUSRxHandler::FilamentSelect), VP_HELPER_RX(DGUS_Addr::FILAMENT_SetLength, &DGUSRxHandler::FilamentLength), @@ -205,14 +204,14 @@ const struct DGUS_VP vp_list[] PROGMEM = { VP_HELPER_TX_AUTO(DGUS_Addr::TEMP_Current_Bed, &thermalManager.temp_bed.celsius, - &DGUSTxHandler::ExtraToInteger), + (&DGUSTxHandler::ExtraToFixedPoint)), VP_HELPER_TX_AUTO(DGUS_Addr::TEMP_Target_Bed, &thermalManager.temp_bed.target, &DGUSTxHandler::ExtraToInteger), VP_HELPER_TX(DGUS_Addr::TEMP_Max_Bed, &DGUSTxHandler::TempMax), VP_HELPER_TX_AUTO(DGUS_Addr::TEMP_Current_H0, &thermalManager.temp_hotend[ExtUI::heater_t::H0].celsius, - &DGUSTxHandler::ExtraToInteger), + (&DGUSTxHandler::ExtraToFixedPoint)), VP_HELPER_TX_AUTO(DGUS_Addr::TEMP_Target_H0, &thermalManager.temp_hotend[ExtUI::heater_t::H0].target, &DGUSTxHandler::ExtraToInteger), @@ -220,7 +219,7 @@ const struct DGUS_VP vp_list[] PROGMEM = { #if HAS_MULTI_HOTEND VP_HELPER_TX_AUTO(DGUS_Addr::TEMP_Current_H1, &thermalManager.temp_hotend[ExtUI::heater_t::H1].celsius, - &DGUSTxHandler::ExtraToInteger), + (&DGUSTxHandler::ExtraToFixedPoint)), VP_HELPER_TX_AUTO(DGUS_Addr::TEMP_Target_H1, &thermalManager.temp_hotend[ExtUI::heater_t::H1].target, &DGUSTxHandler::ExtraToInteger), From 6f5d33ce5567310af8988c3db35c728455ff425f Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Tue, 14 Mar 2023 00:20:33 +0000 Subject: [PATCH 019/225] [cron] Bump distribution date (2023-03-14) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index c76ff2632a..a98cc9d316 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-03-13" +//#define STRING_DISTRIBUTION_DATE "2023-03-14" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 3b57bf0d03..d973188f38 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-03-13" + #define STRING_DISTRIBUTION_DATE "2023-03-14" #endif /** From 3156595078c4d6ecdae5a5976ef0dbba060fa603 Mon Sep 17 00:00:00 2001 From: jbubik Date: Tue, 14 Mar 2023 02:19:24 +0100 Subject: [PATCH 020/225] =?UTF-8?q?=F0=9F=90=9B=20Fix=20Polargraph=20witho?= =?UTF-8?q?ut=20Z=20(#25514)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/feature/mmu/mmu2.cpp | 3 +- Marlin/src/inc/SanityCheck.h | 6 +-- Marlin/src/lcd/HD44780/marlinui_HD44780.cpp | 13 +++--- Marlin/src/lcd/menu/menu_advanced.cpp | 2 +- Marlin/src/libs/nozzle.cpp | 51 +++++++++++---------- Marlin/src/module/polargraph.cpp | 2 +- 6 files changed, 41 insertions(+), 36 deletions(-) diff --git a/Marlin/src/feature/mmu/mmu2.cpp b/Marlin/src/feature/mmu/mmu2.cpp index 4f86578a60..7b6a48954b 100644 --- a/Marlin/src/feature/mmu/mmu2.cpp +++ b/Marlin/src/feature/mmu/mmu2.cpp @@ -815,8 +815,7 @@ void MMU2::manage_response(const bool move_axes, const bool turn_off_nozzle) { resume_hotend_temp = thermalManager.degTargetHotend(active_extruder); resume_position = current_position; - if (move_axes && all_axes_homed()) - nozzle.park(0, park_point /*= NOZZLE_PARK_POINT*/); + if (move_axes && all_axes_homed()) nozzle.park(0, park_point); if (turn_off_nozzle) thermalManager.setTargetHotend(0, active_extruder); diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 5f20b205a0..a03a489a01 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -1148,11 +1148,11 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #if ENABLED(NOZZLE_PARK_FEATURE) constexpr float npp[] = NOZZLE_PARK_POINT; - static_assert(COUNT(npp) == XYZ, "NOZZLE_PARK_POINT requires X, Y, and Z values."); + static_assert(COUNT(npp) == _MIN(NUM_AXES, XYZ), "NOZZLE_PARK_POINT requires coordinates for enabled axes, but only up to X,Y,Z."); constexpr xyz_pos_t npp_xyz = NOZZLE_PARK_POINT; static_assert(WITHIN(npp_xyz.x, X_MIN_POS, X_MAX_POS), "NOZZLE_PARK_POINT.X is out of bounds (X_MIN_POS, X_MAX_POS)."); - static_assert(WITHIN(npp_xyz.y, Y_MIN_POS, Y_MAX_POS), "NOZZLE_PARK_POINT.Y is out of bounds (Y_MIN_POS, Y_MAX_POS)."); - static_assert(WITHIN(npp_xyz.z, Z_MIN_POS, Z_MAX_POS), "NOZZLE_PARK_POINT.Z is out of bounds (Z_MIN_POS, Z_MAX_POS)."); + static_assert(TERN1(HAS_Y_AXIS, WITHIN(npp_xyz.y, Y_MIN_POS, Y_MAX_POS)), "NOZZLE_PARK_POINT.Y is out of bounds (Y_MIN_POS, Y_MAX_POS)."); + static_assert(TERN1(HAS_Z_AXIS, WITHIN(npp_xyz.z, Z_MIN_POS, Z_MAX_POS)), "NOZZLE_PARK_POINT.Z is out of bounds (Z_MIN_POS, Z_MAX_POS)."); #endif /** diff --git a/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp b/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp index 9093fa3eab..416c07c8f7 100644 --- a/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp +++ b/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp @@ -521,7 +521,7 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const else if (axis_should_home(axis)) while (const char c = *value++) lcd_put_lchar(c <= '.' ? c : '?'); else if (NONE(HOME_AFTER_DEACTIVATE, DISABLE_REDUCED_ACCURACY_WARNING) && !axis_is_trusted(axis)) - lcd_put_u8str(axis == Z_AXIS ? F(" ") : F(" ")); + lcd_put_u8str(TERN0(HAS_Z_AXIS, axis == Z_AXIS) ? F(" ") : F(" ")); else lcd_put_u8str(value); } @@ -998,11 +998,12 @@ void MarlinUI::draw_status_screen() { #endif // LCD_WIDTH >= 20 - lcd_moveto(LCD_WIDTH - 8, 1); - _draw_axis_value(Z_AXIS, ftostr52sp(LOGICAL_Z_POSITION(current_position.z)), blink); - - #if HAS_LEVELING && !HAS_HEATED_BED - lcd_put_lchar(planner.leveling_active || blink ? '_' : ' '); + #if HAS_Z_AXIS + lcd_moveto(LCD_WIDTH - 8, 1); + _draw_axis_value(Z_AXIS, ftostr52sp(LOGICAL_Z_POSITION(current_position.z)), blink); + #if HAS_LEVELING && !HAS_HEATED_BED + lcd_put_lchar(planner.leveling_active || blink ? '_' : ' '); + #endif #endif #endif // LCD_HEIGHT > 2 diff --git a/Marlin/src/lcd/menu/menu_advanced.cpp b/Marlin/src/lcd/menu/menu_advanced.cpp index 0e24d0ed80..71188a8688 100644 --- a/Marlin/src/lcd/menu/menu_advanced.cpp +++ b/Marlin/src/lcd/menu/menu_advanced.cpp @@ -597,7 +597,7 @@ void menu_backlash(); ; LOOP_LOGICAL_AXES(a) { - if (a == C_AXIS || TERN0(HAS_EXTRUDERS, a == E_AXIS)) + if (TERN0(HAS_C_AXIS, a == C_AXIS) || TERN0(HAS_EXTRUDERS, a == E_AXIS)) EDIT_ITEM_FAST_N(float52sign, a, MSG_VN_JERK, &planner.max_jerk[a], 0.1f, max_jerk_edit[a]); else EDIT_ITEM_FAST_N(float3, a, MSG_VN_JERK, &planner.max_jerk[a], 1.0f, max_jerk_edit[a]); diff --git a/Marlin/src/libs/nozzle.cpp b/Marlin/src/libs/nozzle.cpp index 575e74a814..74f61c33d0 100644 --- a/Marlin/src/libs/nozzle.cpp +++ b/Marlin/src/libs/nozzle.cpp @@ -225,38 +225,43 @@ Nozzle nozzle; #if ENABLED(NOZZLE_PARK_FEATURE) - float Nozzle::park_mode_0_height(const_float_t park_z) { - // Apply a minimum raise, if specified. Use park.z as a minimum height instead. - return _MAX(park_z, // Minimum height over 0 based on input - _MIN(Z_MAX_POS, // Maximum height is fixed - #ifdef NOZZLE_PARK_Z_RAISE_MIN - NOZZLE_PARK_Z_RAISE_MIN + // Minimum raise... - #endif - current_position.z // ...over current position - ) - ); - } + #if HAS_Z_AXIS + float Nozzle::park_mode_0_height(const_float_t park_z) { + // Apply a minimum raise, if specified. Use park.z as a minimum height instead. + return _MAX(park_z, // Minimum height over 0 based on input + _MIN(Z_MAX_POS, // Maximum height is fixed + #ifdef NOZZLE_PARK_Z_RAISE_MIN + NOZZLE_PARK_Z_RAISE_MIN + // Minimum raise... + #endif + current_position.z // ...over current position + ) + ); + } + #endif // HAS_Z_AXIS void Nozzle::park(const uint8_t z_action, const xyz_pos_t &park/*=NOZZLE_PARK_POINT*/) { - constexpr feedRate_t fr_xy = NOZZLE_PARK_XY_FEEDRATE, fr_z = NOZZLE_PARK_Z_FEEDRATE; + #if HAS_Z_AXIS + constexpr feedRate_t fr_z = NOZZLE_PARK_Z_FEEDRATE; - switch (z_action) { - case 1: // Go to Z-park height - do_blocking_move_to_z(park.z, fr_z); - break; + switch (z_action) { + case 1: // Go to Z-park height + do_blocking_move_to_z(park.z, fr_z); + break; - case 2: // Raise by Z-park height - do_blocking_move_to_z(_MIN(current_position.z + park.z, Z_MAX_POS), fr_z); - break; + case 2: // Raise by Z-park height + do_blocking_move_to_z(_MIN(current_position.z + park.z, Z_MAX_POS), fr_z); + break; - default: // Raise by NOZZLE_PARK_Z_RAISE_MIN, use park.z as a minimum height - do_blocking_move_to_z(park_mode_0_height(park.z), fr_z); - break; - } + default: // Raise by NOZZLE_PARK_Z_RAISE_MIN, use park.z as a minimum height + do_blocking_move_to_z(park_mode_0_height(park.z), fr_z); + break; + } + #endif // HAS_Z_AXIS #ifndef NOZZLE_PARK_MOVE #define NOZZLE_PARK_MOVE 0 #endif + constexpr feedRate_t fr_xy = NOZZLE_PARK_XY_FEEDRATE; switch (NOZZLE_PARK_MOVE) { case 0: do_blocking_move_to_xy(park, fr_xy); break; case 1: do_blocking_move_to_x(park.x, fr_xy); break; diff --git a/Marlin/src/module/polargraph.cpp b/Marlin/src/module/polargraph.cpp index d55d36a6d6..ef6a4c0db4 100644 --- a/Marlin/src/module/polargraph.cpp +++ b/Marlin/src/module/polargraph.cpp @@ -43,7 +43,7 @@ xy_pos_t draw_area_min, draw_area_max; void inverse_kinematics(const xyz_pos_t &raw) { const float x1 = raw.x - draw_area_min.x, x2 = draw_area_max.x - raw.x, y = raw.y - draw_area_max.y; - delta.set(HYPOT(x1, y), HYPOT(x2, y), raw.z); + delta.set(HYPOT(x1, y), HYPOT(x2, y) OPTARG(HAS_Z_AXIS, raw.z)); } #endif // POLARGRAPH From f90c49910defc4124f7ef0a75dc8a292b9ee85c7 Mon Sep 17 00:00:00 2001 From: Eduard Sukharev Date: Wed, 15 Mar 2023 00:49:49 +0300 Subject: [PATCH 021/225] =?UTF-8?q?=F0=9F=90=9B=20Fix=20long=20filename=20?= =?UTF-8?q?read/report=20(#25509)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/sd/SdBaseFile.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/Marlin/src/sd/SdBaseFile.cpp b/Marlin/src/sd/SdBaseFile.cpp index e3f95623ac..b8b49b7ba0 100644 --- a/Marlin/src/sd/SdBaseFile.cpp +++ b/Marlin/src/sd/SdBaseFile.cpp @@ -1013,8 +1013,7 @@ bool SdBaseFile::openNext(SdBaseFile *dirFile, uint8_t oflag) { * \return false if the dirname is a short file name 8.3 (SFN) */ bool SdBaseFile::isDirNameLFN(const char *dirname) { - uint8_t length = strlen(dirname); - uint8_t idx = length; + uint8_t length = strlen(dirname), idx = length; bool dotFound = false; if (idx > 12) return true; // LFN due to filename length > 12 ("filename.ext") // Check dot(s) position @@ -1508,8 +1507,8 @@ int8_t SdBaseFile::readDir(dir_t *dir, char *longFilename) { if (DIR_IS_FILE_OR_SUBDIR(dir)) { #if ENABLED(UTF_FILENAME_SUPPORT) #if LONG_FILENAME_CHARSIZE > 2 - // Add warning for developers for currently not supported 3-byte cases (Conversion series of 2-byte - // codepoints to 3-byte in-place will break the rest of filename) + // Add warning for developers for unsupported 3-byte cases. + // (Converting 2-byte codepoints to 3-byte in-place would break the rest of filename.) #error "Currently filename re-encoding is done in-place. It may break the remaining chars to use 3-byte codepoints." #endif @@ -1517,22 +1516,22 @@ int8_t SdBaseFile::readDir(dir_t *dir, char *longFilename) { if (longFilename) { // Reset n to the start of the long name n = 0; - for (uint16_t idx = 0; idx < (LONG_FILENAME_LENGTH) / 2; idx += 2) { // idx is fixed since FAT LFN always contains UTF-16LE encoding + for (uint16_t idx = 0; idx < (LONG_FILENAME_LENGTH); idx += 2) { // idx is fixed since FAT LFN always contains UTF-16LE encoding const uint16_t utf16_ch = longFilename[idx] | (longFilename[idx + 1] << 8); - if (0xD800 == (utf16_ch & 0xF800)) // Surrogate pair - encode as '_' + if (0xD800 == (utf16_ch & 0xF800)) // Surrogate pair - encode as '_' longFilename[n++] = '_'; - else if (0 == (utf16_ch & 0xFF80)) // Encode as 1-byte UTF-8 char + else if (0 == (utf16_ch & 0xFF80)) // Encode as 1-byte UTF-8 char longFilename[n++] = utf16_ch & 0x007F; - else if (0 == (utf16_ch & 0xF800)) { // Encode as 2-byte UTF-8 char + else if (0 == (utf16_ch & 0xF800)) { // Encode as 2-byte UTF-8 char longFilename[n++] = 0xC0 | ((utf16_ch >> 6) & 0x1F); longFilename[n++] = 0x80 | ( utf16_ch & 0x3F); } else { - #if LONG_FILENAME_CHARSIZE > 2 // Encode as 3-byte UTF-8 char + #if LONG_FILENAME_CHARSIZE > 2 // Encode as 3-byte UTF-8 char longFilename[n++] = 0xE0 | ((utf16_ch >> 12) & 0x0F); longFilename[n++] = 0xC0 | ((utf16_ch >> 6) & 0x3F); longFilename[n++] = 0xC0 | ( utf16_ch & 0x3F); - #else // Encode as '_' + #else // Encode as '_' longFilename[n++] = '_'; #endif } From 1cf85196b660795d00160ea6d83dbbdaffb290b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davide=20Rombol=C3=A0?= Date: Wed, 15 Mar 2023 00:54:24 +0100 Subject: [PATCH 022/225] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20IA=5FCREALITY=20fl?= =?UTF-8?q?oat,=20startup=20(#25493)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to #25440 --- Marlin/Configuration.h | 3 +- .../lcd/extui/ia_creality/creality_extui.cpp | 77 ++++++++++++------- .../lcd/extui/ia_creality/creality_extui.h | 2 +- 3 files changed, 52 insertions(+), 30 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 111aa18d5d..d66870949f 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -3061,7 +3061,8 @@ #if DGUS_UI_IS(MKS) #define USE_MKS_GREEN_UI #elif DGUS_UI_IS(IA_CREALITY) - //#define LCD_SCREEN_ROTATE 90 // Portrait Mode or 800x480 displays + //#define LCD_SCREEN_ROTATE 90 // Portrait Mode or 800x480 displays + //#define IA_CREALITY_BOOT_DELAY 1500 // (ms) #endif // diff --git a/Marlin/src/lcd/extui/ia_creality/creality_extui.cpp b/Marlin/src/lcd/extui/ia_creality/creality_extui.cpp index 547b500106..15dcd84bb9 100644 --- a/Marlin/src/lcd/extui/ia_creality/creality_extui.cpp +++ b/Marlin/src/lcd/extui/ia_creality/creality_extui.cpp @@ -87,6 +87,9 @@ namespace ExtUI { #ifndef CUSTOM_MACHINE_NAME #define CUSTOM_MACHINE_NAME MACHINE_NAME #endif + #ifndef IA_CREALITY_BOOT_DELAY + #define IA_CREALITY_BOOT_DELAY 500 + #endif void onStartup() { DWIN_SERIAL.begin(115200); @@ -94,7 +97,7 @@ namespace ExtUI { rtscheck.recdat.head[1] = rtscheck.snddat.head[1] = FHTWO; ZERO(rtscheck.databuf); - delay_ms(TERN(DWINOS_4, 1500, 500)); // Delay to allow screen startup + delay_ms(IA_CREALITY_BOOT_DELAY); // Delay to allow screen startup SetTouchScreenConfiguration(); rtscheck.RTS_SndData(StartSoundSet, SoundAddr); delay_ms(400); // Delay to allow screen to configure @@ -314,31 +317,31 @@ namespace ExtUI { else rtscheck.RTS_SndData(2, DisplayStandbyEnableIndicator); - rtscheck.RTS_SndData(uint16_t(getAxisSteps_per_mm(X)) * 10, StepMM_X); - rtscheck.RTS_SndData(uint16_t(getAxisSteps_per_mm(Y)) * 10, StepMM_Y); - rtscheck.RTS_SndData(uint16_t(getAxisSteps_per_mm(Z)) * 10, StepMM_Z); - rtscheck.RTS_SndData(uint16_t(getAxisSteps_per_mm(E0)) * 10, StepMM_E); + rtscheck.RTS_SndData(getAxisSteps_per_mm(X) * 10, StepMM_X); + rtscheck.RTS_SndData(getAxisSteps_per_mm(Y) * 10, StepMM_Y); + rtscheck.RTS_SndData(getAxisSteps_per_mm(Z) * 10, StepMM_Z); + rtscheck.RTS_SndData(getAxisSteps_per_mm(E0) * 10, StepMM_E); - rtscheck.RTS_SndData(uint16_t(getAxisMaxAcceleration_mm_s2(X)) / 100, Accel_X); - rtscheck.RTS_SndData(uint16_t(getAxisMaxAcceleration_mm_s2(Y)) / 100, Accel_Y); - rtscheck.RTS_SndData(uint16_t(getAxisMaxAcceleration_mm_s2(Z)) / 10, Accel_Z); - rtscheck.RTS_SndData(uint16_t(getAxisMaxAcceleration_mm_s2(E0)), Accel_E); + rtscheck.RTS_SndData(getAxisMaxAcceleration_mm_s2(X) / 100, Accel_X); + rtscheck.RTS_SndData(getAxisMaxAcceleration_mm_s2(Y) / 100, Accel_Y); + rtscheck.RTS_SndData(getAxisMaxAcceleration_mm_s2(Z) / 10, Accel_Z); + rtscheck.RTS_SndData(getAxisMaxAcceleration_mm_s2(E0), Accel_E); - rtscheck.RTS_SndData(uint16_t(getAxisMaxFeedrate_mm_s(X)), Feed_X); - rtscheck.RTS_SndData(uint16_t(getAxisMaxFeedrate_mm_s(Y)), Feed_Y); - rtscheck.RTS_SndData(uint16_t(getAxisMaxFeedrate_mm_s(Z)), Feed_Z); - rtscheck.RTS_SndData(uint16_t(getAxisMaxFeedrate_mm_s(E0)), Feed_E); + rtscheck.RTS_SndData(getAxisMaxFeedrate_mm_s(X), Feed_X); + rtscheck.RTS_SndData(getAxisMaxFeedrate_mm_s(Y), Feed_Y); + rtscheck.RTS_SndData(getAxisMaxFeedrate_mm_s(Z), Feed_Z); + rtscheck.RTS_SndData(getAxisMaxFeedrate_mm_s(E0), Feed_E); - rtscheck.RTS_SndData(uint16_t(getAxisMaxJerk_mm_s(X)) * 100, Jerk_X); - rtscheck.RTS_SndData(uint16_t(getAxisMaxJerk_mm_s(Y)) * 100, Jerk_Y); - rtscheck.RTS_SndData(uint16_t(getAxisMaxJerk_mm_s(Z)) * 100, Jerk_Z); - rtscheck.RTS_SndData(uint16_t(getAxisMaxJerk_mm_s(E0)) * 100, Jerk_E); + rtscheck.RTS_SndData(getAxisMaxJerk_mm_s(X) * 100, Jerk_X); + rtscheck.RTS_SndData(getAxisMaxJerk_mm_s(Y) * 100, Jerk_Y); + rtscheck.RTS_SndData(getAxisMaxJerk_mm_s(Z) * 100, Jerk_Z); + rtscheck.RTS_SndData(getAxisMaxJerk_mm_s(E0) * 100, Jerk_E); #if HAS_HOTEND_OFFSET - rtscheck.RTS_SndData(uint16_t(getNozzleOffset_mm(X, E1)) * 10, T2Offset_X); - rtscheck.RTS_SndData(uint16_t(getNozzleOffset_mm(Y, E1)) * 10, T2Offset_Y); - rtscheck.RTS_SndData(uint16_t(getNozzleOffset_mm(Z, E1)) * 10, T2Offset_Z); - rtscheck.RTS_SndData(uint16_t(getAxisSteps_per_mm(E1)) * 10, T2StepMM_E); + rtscheck.RTS_SndData(getNozzleOffset_mm(X, E1) * 10, T2Offset_X); + rtscheck.RTS_SndData(getNozzleOffset_mm(Y, E1) * 10, T2Offset_Y); + rtscheck.RTS_SndData(getNozzleOffset_mm(Z, E1) * 10, T2Offset_Z); + rtscheck.RTS_SndData(getAxisSteps_per_mm(E1) * 10, T2StepMM_E); #endif #if HAS_BED_PROBE @@ -349,13 +352,13 @@ namespace ExtUI { #if HAS_PID_HEATING rtscheck.RTS_SndData(pid_hotendAutoTemp, HotendPID_AutoTmp); rtscheck.RTS_SndData(pid_bedAutoTemp, BedPID_AutoTmp); - rtscheck.RTS_SndData(uint16_t(getPID_Kp(E0)) * 10, HotendPID_P); - rtscheck.RTS_SndData(uint16_t(getPID_Ki(E0)) * 10, HotendPID_I); - rtscheck.RTS_SndData(uint16_t(getPID_Kd(E0)) * 10, HotendPID_D); + rtscheck.RTS_SndData(getPID_Kp(E0) * 10, HotendPID_P); + rtscheck.RTS_SndData(getPID_Ki(E0) * 10, HotendPID_I); + rtscheck.RTS_SndData(getPID_Kd(E0) * 10, HotendPID_D); #if ENABLED(PIDTEMPBED) - rtscheck.RTS_SndData(uint16_t(getBedPID_Kp()) * 10, BedPID_P); - rtscheck.RTS_SndData(uint16_t(getBedPID_Ki()) * 10, BedPID_I); - rtscheck.RTS_SndData(uint16_t(getBedPID_Kd()) * 10, BedPID_D); + rtscheck.RTS_SndData(getBedPID_Kp() * 10, BedPID_P); + rtscheck.RTS_SndData(getBedPID_Ki() * 10, BedPID_I); + rtscheck.RTS_SndData(getBedPID_Kd() * 10, BedPID_D); #endif #endif } @@ -567,6 +570,25 @@ namespace ExtUI { RTS_SndData(); } + void RTSSHOW::RTS_SndData(const_float_t f, const uint32_t addr, const uint8_t cmd/*=VarAddr_W*/) { + int16_t n = f; + if (cmd == VarAddr_W) { + snddat.data[0] = n; + snddat.len = 5; + } + else if (cmd == RegAddr_W) { + snddat.data[0] = n; + snddat.len = 3; + } + else if (cmd == VarAddr_R) { + snddat.bytelen = n; + snddat.len = 4; + } + snddat.command = cmd; + snddat.addr = addr; + RTS_SndData(); + } + void RTSSHOW::RTS_SndData(const int n, const uint32_t addr, const uint8_t cmd/*=VarAddr_W*/) { if (cmd == VarAddr_W) { if ((unsigned int)n > 0xFFFF) { @@ -789,7 +811,6 @@ namespace ExtUI { } else { onStatusChanged(F("Requested Offset Beyond Limits")); - RTS_SndData(getZOffset_mm() * 100, ProbeOffset_Z); } rtscheck.RTS_SndData(getZOffset_mm() * 100, ProbeOffset_Z); diff --git a/Marlin/src/lcd/extui/ia_creality/creality_extui.h b/Marlin/src/lcd/extui/ia_creality/creality_extui.h index 35162eebee..099f8c238a 100644 --- a/Marlin/src/lcd/extui/ia_creality/creality_extui.h +++ b/Marlin/src/lcd/extui/ia_creality/creality_extui.h @@ -232,10 +232,10 @@ namespace ExtUI { void RTS_SndData(char, const uint32_t, const uint8_t=VarAddr_W); void RTS_SndData(int, const uint32_t, const uint8_t=VarAddr_W); void RTS_SndData(unsigned long, const uint32_t, const uint8_t=VarAddr_W); + void RTS_SndData(const_float_t, const uint32_t, const uint8_t=VarAddr_W); void RTS_SndData(uint8_t * const str, const uint32_t addr, const uint8_t cmd=VarAddr_W) { RTS_SndData((char *)str, addr, cmd); } void RTS_SndData(const unsigned int n, uint32_t addr, const uint8_t cmd=VarAddr_W) { RTS_SndData(int(n), addr, cmd); } - void RTS_SndData(const_float_t n, const uint32_t addr, const uint8_t cmd=VarAddr_W) { RTS_SndData(int(n), addr, cmd); } void RTS_SndData(const long n, const uint32_t addr, const uint8_t cmd=VarAddr_W) { RTS_SndData((unsigned long)n, addr, cmd); } void RTS_SDcard_Stop(); From 50893c414d43e2d9a351eac983ed8ebeed126ab0 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Wed, 15 Mar 2023 00:30:47 +0000 Subject: [PATCH 023/225] [cron] Bump distribution date (2023-03-15) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index a98cc9d316..c993bd48b9 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-03-14" +//#define STRING_DISTRIBUTION_DATE "2023-03-15" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index d973188f38..5f78729bd4 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-03-14" + #define STRING_DISTRIBUTION_DATE "2023-03-15" #endif /** From 66d94ece33c5f7499b1901ee7510b1017cc0fb6f Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 14 Mar 2023 16:48:17 -0500 Subject: [PATCH 024/225] =?UTF-8?q?=F0=9F=8E=A8=20Misc.=20formatting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/gcode/bedlevel/abl/G29.cpp | 4 ++-- buildroot/share/git/mfadd | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Marlin/src/gcode/bedlevel/abl/G29.cpp b/Marlin/src/gcode/bedlevel/abl/G29.cpp index 114fa55520..e1fd0124c4 100644 --- a/Marlin/src/gcode/bedlevel/abl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/abl/G29.cpp @@ -409,7 +409,7 @@ G29_TYPE GcodeSuite::G29() { if (!probe.good_bounds(abl.probe_position_lf, abl.probe_position_rb)) { if (DEBUGGING(LEVELING)) { DEBUG_ECHOLNPGM("G29 L", abl.probe_position_lf.x, " R", abl.probe_position_rb.x, - " F", abl.probe_position_lf.y, " B", abl.probe_position_rb.y); + " F", abl.probe_position_lf.y, " B", abl.probe_position_rb.y); } SERIAL_ECHOLNPGM("? (L,R,F,B) out of bounds."); G29_RETURN(false, false); @@ -417,7 +417,7 @@ G29_TYPE GcodeSuite::G29() { // Probe at the points of a lattice grid abl.gridSpacing.set((abl.probe_position_rb.x - abl.probe_position_lf.x) / (abl.grid_points.x - 1), - (abl.probe_position_rb.y - abl.probe_position_lf.y) / (abl.grid_points.y - 1)); + (abl.probe_position_rb.y - abl.probe_position_lf.y) / (abl.grid_points.y - 1)); #endif // ABL_USES_GRID diff --git a/buildroot/share/git/mfadd b/buildroot/share/git/mfadd index 30be1ec0f7..d6fc07bde0 100755 --- a/buildroot/share/git/mfadd +++ b/buildroot/share/git/mfadd @@ -29,7 +29,7 @@ REPO=${INFO[2]} set -e -echo "Adding and fetching $USER..." +echo "Adding and fetching $USER/$REPO..." git remote add "$USER" "git@github.com:$USER/$REPO.git" >/dev/null 2>&1 || echo "Remote exists." git fetch "$USER" From 10983d0cfe3e353ba465cfcadf8aeb51327f1197 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 15 Mar 2023 00:29:37 -0500 Subject: [PATCH 025/225] =?UTF-8?q?=F0=9F=8E=A8=20Misc.=20tramming=20menu?= =?UTF-8?q?=20cleanup=20(#25519)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration.h | 4 +- .../lcd/extui/mks_ui/draw_z_offset_wizard.cpp | 8 +- Marlin/src/lcd/menu/menu.cpp | 2 +- Marlin/src/lcd/menu/menu.h | 2 +- Marlin/src/lcd/menu/menu_bed_leveling.cpp | 2 +- ..._bed_corners.cpp => menu_bed_tramming.cpp} | 94 ++++++++++--------- Marlin/src/lcd/menu/menu_item.h | 2 +- Marlin/src/lcd/menu/menu_motion.cpp | 2 +- Marlin/src/lcd/menu/menu_probe_offset.cpp | 4 +- ..._tramming.cpp => menu_tramming_wizard.cpp} | 0 Marlin/src/lcd/menu/menu_x_twist.cpp | 4 +- Marlin/src/module/probe.cpp | 4 +- Marlin/src/module/probe.h | 8 +- .../PlatformIO/scripts/common-dependencies.h | 4 +- buildroot/tests/BIGTREE_GTR_V1_0 | 3 +- ini/features.ini | 4 +- platformio.ini | 4 +- 17 files changed, 80 insertions(+), 71 deletions(-) rename Marlin/src/lcd/menu/{menu_bed_corners.cpp => menu_bed_tramming.cpp} (83%) rename Marlin/src/lcd/menu/{menu_tramming.cpp => menu_tramming_wizard.cpp} (100%) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index d66870949f..b57c66a9a8 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -2114,8 +2114,8 @@ #if ENABLED(LCD_BED_TRAMMING) #define BED_TRAMMING_INSET_LFRB { 30, 30, 30, 30 } // (mm) Left, Front, Right, Back insets - #define BED_TRAMMING_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points - #define BED_TRAMMING_Z_HOP 4.0 // (mm) Z height of nozzle between leveling points + #define BED_TRAMMING_HEIGHT 0.0 // (mm) Z height of nozzle at tramming points + #define BED_TRAMMING_Z_HOP 4.0 // (mm) Z height of nozzle between tramming points //#define BED_TRAMMING_INCLUDE_CENTER // Move to the center after the last corner //#define BED_TRAMMING_USE_PROBE #if ENABLED(BED_TRAMMING_USE_PROBE) diff --git a/Marlin/src/lcd/extui/mks_ui/draw_z_offset_wizard.cpp b/Marlin/src/lcd/extui/mks_ui/draw_z_offset_wizard.cpp index d143234fd5..dbe8577dc9 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_z_offset_wizard.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_z_offset_wizard.cpp @@ -36,7 +36,7 @@ #if HAS_LEVELING #include "../../../feature/bedlevel/bedlevel.h" - bool leveling_was_active; + bool mks_leveling_was_active; #endif extern lv_group_t *g; @@ -110,7 +110,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { case ID_M_RETURN: probe.offset.z = z_offset_backup; SET_SOFT_ENDSTOP_LOOSE(false); - TERN_(HAS_LEVELING, set_bed_leveling_enabled(leveling_was_active)); + TERN_(HAS_LEVELING, set_bed_leveling_enabled(mks_leveling_was_active)); #if HOMING_Z_WITH_PROBE && defined(PROBE_OFFSET_WIZARD_START_Z) set_axis_never_homed(Z_AXIS); // On cancel the Z position needs correction queue.inject_P(PSTR("G28Z")); @@ -149,8 +149,8 @@ void lv_draw_z_offset_wizard() { // Store Bed-Leveling-State and disable #if HAS_LEVELING - leveling_was_active = planner.leveling_active; - set_bed_leveling_enabled(leveling_was_active); + mks_leveling_was_active = planner.leveling_active; + set_bed_leveling_enabled(mks_leveling_was_active); #endif queue.inject_P(PSTR("G28")); diff --git a/Marlin/src/lcd/menu/menu.cpp b/Marlin/src/lcd/menu/menu.cpp index c529ae757a..85b773bebc 100644 --- a/Marlin/src/lcd/menu/menu.cpp +++ b/Marlin/src/lcd/menu/menu.cpp @@ -48,7 +48,7 @@ //////////////////////////////////////////// #if HAS_LEVELING && ANY(LCD_BED_TRAMMING, PROBE_OFFSET_WIZARD, X_AXIS_TWIST_COMPENSATION) - bool leveling_was_active; // = false + bool menu_leveling_was_active; // = false #endif #if ANY(PROBE_MANUALLY, MESH_BED_LEVELING, X_AXIS_TWIST_COMPENSATION) uint8_t manual_probe_index; // = 0 diff --git a/Marlin/src/lcd/menu/menu.h b/Marlin/src/lcd/menu/menu.h index befffe5f72..9b9c678868 100644 --- a/Marlin/src/lcd/menu/menu.h +++ b/Marlin/src/lcd/menu/menu.h @@ -264,7 +264,7 @@ inline void clear_menu_history() { screen_history_depth = 0; } #define STICKY_SCREEN(S) []{ ui.defer_status_screen(); ui.goto_screen(S); } #if HAS_LEVELING && ANY(LCD_BED_TRAMMING, PROBE_OFFSET_WIZARD, X_AXIS_TWIST_COMPENSATION) - extern bool leveling_was_active; + extern bool menu_leveling_was_active; #endif #if ANY(PROBE_MANUALLY, MESH_BED_LEVELING, X_AXIS_TWIST_COMPENSATION) diff --git a/Marlin/src/lcd/menu/menu_bed_leveling.cpp b/Marlin/src/lcd/menu/menu_bed_leveling.cpp index d25d35011e..a7fb54f68d 100644 --- a/Marlin/src/lcd/menu/menu_bed_leveling.cpp +++ b/Marlin/src/lcd/menu/menu_bed_leveling.cpp @@ -293,7 +293,7 @@ void menu_bed_leveling() { #endif #if ENABLED(LCD_BED_TRAMMING) - SUBMENU(MSG_BED_TRAMMING, _lcd_level_bed_corners); + SUBMENU(MSG_BED_TRAMMING, _lcd_bed_tramming); #endif #if ENABLED(EEPROM_SETTINGS) diff --git a/Marlin/src/lcd/menu/menu_bed_corners.cpp b/Marlin/src/lcd/menu/menu_bed_tramming.cpp similarity index 83% rename from Marlin/src/lcd/menu/menu_bed_corners.cpp rename to Marlin/src/lcd/menu/menu_bed_tramming.cpp index 0e0051e65d..5f1b547871 100644 --- a/Marlin/src/lcd/menu/menu_bed_corners.cpp +++ b/Marlin/src/lcd/menu/menu_bed_tramming.cpp @@ -21,7 +21,7 @@ */ // -// Level Bed Corners menu +// Bed Tramming menu // #include "../../inc/MarlinConfigPre.h" @@ -54,7 +54,7 @@ #endif float last_z; int good_points; - bool corner_probing_done, wait_for_probe; + bool tramming_done, wait_for_probe; #if HAS_MARLINUI_U8GLIB #include "../dogm/marlinui_DOGM.h" @@ -66,6 +66,11 @@ static_assert(BED_TRAMMING_Z_HOP >= 0, "BED_TRAMMING_Z_HOP must be >= 0. Please update your configuration."); +#define LF 1 +#define RF 2 +#define RB 3 +#define LB 4 + #ifndef BED_TRAMMING_LEVELING_ORDER #define BED_TRAMMING_LEVELING_ORDER { LF, RF, LB, RB } // Default //#define BED_TRAMMING_LEVELING_ORDER { LF, LB, RF } // 3 hard-coded points @@ -75,18 +80,14 @@ static_assert(BED_TRAMMING_Z_HOP >= 0, "BED_TRAMMING_Z_HOP must be >= 0. Please //#define BED_TRAMMING_LEVELING_ORDER { LB, RB } // 3-Point tramming - Front #endif -#define LF 1 -#define RF 2 -#define RB 3 -#define LB 4 constexpr int lco[] = BED_TRAMMING_LEVELING_ORDER; -constexpr bool level_corners_3_points = COUNT(lco) == 2; -static_assert(level_corners_3_points || COUNT(lco) == 4, "BED_TRAMMING_LEVELING_ORDER must have exactly 2 or 4 corners."); +constexpr bool tramming_3_points = COUNT(lco) == 2; +static_assert(tramming_3_points || COUNT(lco) == 4, "BED_TRAMMING_LEVELING_ORDER must have exactly 2 or 4 corners."); constexpr int lcodiff = ABS(lco[0] - lco[1]); static_assert(COUNT(lco) == 4 || lcodiff == 1 || lcodiff == 3, "The first two BED_TRAMMING_LEVELING_ORDER corners must be on the same edge."); -constexpr int nr_edge_points = level_corners_3_points ? 3 : 4; +constexpr int nr_edge_points = tramming_3_points ? 3 : 4; constexpr int available_points = nr_edge_points + ENABLED(BED_TRAMMING_INCLUDE_CENTER); constexpr int center_index = TERN(BED_TRAMMING_INCLUDE_CENTER, available_points - 1, -1); constexpr float inset_lfrb[4] = BED_TRAMMING_INSET_LFRB; @@ -98,9 +99,9 @@ static int8_t bed_corner; /** * Select next corner coordinates */ -static void _lcd_level_bed_corners_get_next_position() { +static void _lcd_bed_tramming_get_next_position() { - if (level_corners_3_points) { + if (tramming_3_points) { if (bed_corner >= available_points) bed_corner = 0; // Above max position -> move back to first corner switch (bed_corner) { case 0 ... 1: @@ -141,9 +142,9 @@ static void _lcd_level_bed_corners_get_next_position() { else { current_position = lf; // Left front switch (lco[bed_corner]) { - case RF: current_position.x = rb.x; break; // Right front - case RB: current_position = rb; break; // Right rear - case LB: current_position.y = rb.y; break; // Left rear + case RF: current_position.x = rb.x; break; // Right Front + case RB: current_position = rb; break; // Right Back + case LB: current_position.y = rb.y; break; // Left Back } } } @@ -198,7 +199,7 @@ static void _lcd_level_bed_corners_get_next_position() { if (!ui.should_draw()) return; MenuItem_confirm::select_screen( GET_TEXT_F(MSG_BUTTON_DONE), GET_TEXT_F(MSG_BUTTON_SKIP) - , []{ corner_probing_done = true; wait_for_probe = false; } + , []{ tramming_done = true; wait_for_probe = false; } , []{ wait_for_probe = false; } , GET_TEXT_F(MSG_BED_TRAMMING_RAISE) ); @@ -207,23 +208,25 @@ static void _lcd_level_bed_corners_get_next_position() { void _lcd_draw_level_prompt() { if (!ui.should_draw()) return; MenuItem_confirm::select_screen( - GET_TEXT_F(TERN(HAS_LEVELING, MSG_BUTTON_LEVEL, MSG_BUTTON_DONE)), - TERN(HAS_LEVELING, GET_TEXT_F(MSG_BUTTON_BACK), nullptr) + GET_TEXT_F(TERN(HAS_LEVELING, MSG_BUTTON_LEVEL, MSG_BUTTON_DONE)) + , TERN(HAS_LEVELING, GET_TEXT_F(MSG_BUTTON_BACK), nullptr) , []{ queue.inject(TERN(HAS_LEVELING, F("G29N"), FPSTR(G28_STR))); ui.return_to_status(); } , TERN(HAS_LEVELING, ui.goto_previous_screen_no_defer, []{}) , GET_TEXT_F(MSG_BED_TRAMMING_IN_RANGE) ); } - bool _lcd_level_bed_corners_probe(bool verify=false) { - if (verify) do_blocking_move_to_z(current_position.z + BED_TRAMMING_Z_HOP); // do clearance if needed + bool _lcd_bed_tramming_probe(bool verify=false) { + if (verify) line_to_z(BED_TRAMMING_Z_HOP); // do clearance if needed TERN_(BLTOUCH, if (!bltouch.high_speed_mode) bltouch.deploy()); // Deploy in LOW SPEED MODE on every probe action do_blocking_move_to_z(last_z - BED_TRAMMING_PROBE_TOLERANCE, MMM_TO_MMS(Z_PROBE_FEEDRATE_SLOW)); // Move down to lower tolerance if (TEST(endstops.trigger_state(), Z_MIN_PROBE)) { // check if probe triggered endstops.hit_on_purpose(); set_current_from_steppers_for_axis(Z_AXIS); sync_plan_position(); + TERN_(BLTOUCH, if (!bltouch.high_speed_mode) bltouch.stow()); // Stow in LOW SPEED MODE on every trigger + // Triggered outside tolerance range? if (ABS(current_position.z - last_z) > BED_TRAMMING_PROBE_TOLERANCE) { last_z = current_position.z; // Above tolerance. Set a new Z for subsequent corners. @@ -231,13 +234,13 @@ static void _lcd_level_bed_corners_get_next_position() { } return true; // probe triggered } - do_blocking_move_to_z(last_z); // go back to tolerance middle point before raise + line_to_z(last_z); // go back to tolerance middle point before raise return false; // probe not triggered } - bool _lcd_level_bed_corners_raise() { + bool _lcd_bed_tramming_raise() { bool probe_triggered = false; - corner_probing_done = false; + tramming_done = false; wait_for_probe = true; ui.goto_screen(_lcd_draw_raise); // show raise screen ui.set_selection(true); @@ -264,25 +267,25 @@ static void _lcd_level_bed_corners_get_next_position() { ui.refresh(LCDVIEW_REDRAW_NOW); _lcd_draw_probing(); // update screen with # of good points - do_blocking_move_to_z(current_position.z + BED_TRAMMING_Z_HOP + TERN0(BLTOUCH, bltouch.z_extra_clearance())); // clearance + line_to_z(current_position.z + BED_TRAMMING_Z_HOP + TERN0(BLTOUCH, bltouch.z_extra_clearance())); // clearance - _lcd_level_bed_corners_get_next_position(); // Select next corner coordinates + _lcd_bed_tramming_get_next_position(); // Select next corner coordinates current_position -= probe.offset_xy; // Account for probe offsets do_blocking_move_to_xy(current_position); // Goto corner TERN_(BLTOUCH, if (bltouch.high_speed_mode) bltouch.deploy()); // Deploy in HIGH SPEED MODE - if (!_lcd_level_bed_corners_probe()) { // Probe down to tolerance - if (_lcd_level_bed_corners_raise()) { // Prompt user to raise bed if needed - #if ENABLED(BED_TRAMMING_VERIFY_RAISED) // Verify - while (!_lcd_level_bed_corners_probe(true)) { // Loop while corner verified - if (!_lcd_level_bed_corners_raise()) { // Prompt user to raise bed if needed - if (corner_probing_done) return; // Done was selected + if (!_lcd_bed_tramming_probe()) { // Probe down to tolerance + if (_lcd_bed_tramming_raise()) { // Prompt user to raise bed if needed + #if ENABLED(BED_TRAMMING_VERIFY_RAISED) // Verify + while (!_lcd_bed_tramming_probe(true)) { // Loop while corner verified + if (!_lcd_bed_tramming_raise()) { // Prompt user to raise bed if needed + if (tramming_done) return; // Done was selected break; // Skip was selected } } #endif } - else if (corner_probing_done) // Done was selected + else if (tramming_done) // Done was selected return; } @@ -293,9 +296,9 @@ static void _lcd_level_bed_corners_get_next_position() { #if ENABLED(BLTOUCH) if (bltouch.high_speed_mode) { - // In HIGH SPEED MODE do clearance and stow at the very end - do_blocking_move_to_z(current_position.z + BED_TRAMMING_Z_HOP); + // In HIGH SPEED MODE do stow and clearance at the very end bltouch.stow(); + do_z_clearance(BED_TRAMMING_Z_HOP); } #endif @@ -309,7 +312,7 @@ static void _lcd_level_bed_corners_get_next_position() { line_to_z(BED_TRAMMING_Z_HOP); // Select next corner coordinates - _lcd_level_bed_corners_get_next_position(); + _lcd_bed_tramming_get_next_position(); line_to_current_position(manual_feedrate_mm_s.x); line_to_z(BED_TRAMMING_HEIGHT); @@ -318,15 +321,19 @@ static void _lcd_level_bed_corners_get_next_position() { #endif // !BED_TRAMMING_USE_PROBE -static void _lcd_level_bed_corners_homing() { +void _lcd_bed_tramming_homing() { _lcd_draw_homing(); if (!all_axes_homed()) return; + #if ENABLED(BED_TRAMMING_USE_PROBE) + _lcd_test_corners(); - if (corner_probing_done) ui.goto_previous_screen_no_defer(); - TERN_(HAS_LEVELING, set_bed_leveling_enabled(leveling_was_active)); + if (tramming_done) ui.goto_previous_screen_no_defer(); + TERN_(HAS_LEVELING, set_bed_leveling_enabled(menu_leveling_was_active)); endstops.enable_z_probe(false); - #else + + #else // !BED_TRAMMING_USE_PROBE + bed_corner = 0; ui.goto_screen([]{ MenuItem_confirm::select_screen( @@ -334,7 +341,7 @@ static void _lcd_level_bed_corners_homing() { , _lcd_goto_next_corner , []{ line_to_z(BED_TRAMMING_Z_HOP); // Raise Z off the bed when done - TERN_(HAS_LEVELING, set_bed_leveling_enabled(leveling_was_active)); + TERN_(HAS_LEVELING, set_bed_leveling_enabled(menu_leveling_was_active)); ui.goto_previous_screen_no_defer(); } , GET_TEXT_F(TERN(BED_TRAMMING_INCLUDE_CENTER, MSG_LEVEL_BED_NEXT_POINT, MSG_NEXT_CORNER)) @@ -343,10 +350,11 @@ static void _lcd_level_bed_corners_homing() { }); ui.set_selection(true); _lcd_goto_next_corner(); - #endif + + #endif // !BED_TRAMMING_USE_PROBE } -void _lcd_level_bed_corners() { +void _lcd_bed_tramming() { ui.defer_status_screen(); if (!all_axes_trusted()) { set_all_unhomed(); @@ -355,11 +363,11 @@ void _lcd_level_bed_corners() { // Disable leveling so the planner won't mess with us #if HAS_LEVELING - leveling_was_active = planner.leveling_active; + menu_leveling_was_active = planner.leveling_active; set_bed_leveling_enabled(false); #endif - ui.goto_screen(_lcd_level_bed_corners_homing); + ui.goto_screen(_lcd_bed_tramming_homing); } #endif // HAS_MARLINUI_MENU && LCD_BED_TRAMMING diff --git a/Marlin/src/lcd/menu/menu_item.h b/Marlin/src/lcd/menu/menu_item.h index 5cc5f11142..fcf7a9ea30 100644 --- a/Marlin/src/lcd/menu/menu_item.h +++ b/Marlin/src/lcd/menu/menu_item.h @@ -537,7 +537,7 @@ class MenuItem_bool : public MenuEditItemBase { #define YESNO_ITEM_N(N,LABEL, V...) YESNO_ITEM_N_F(N, GET_TEXT_F(LABEL), ##V) #if ENABLED(LCD_BED_TRAMMING) - void _lcd_level_bed_corners(); + void _lcd_bed_tramming(); #endif #if HAS_FAN diff --git a/Marlin/src/lcd/menu/menu_motion.cpp b/Marlin/src/lcd/menu/menu_motion.cpp index 215497c4c9..d5c1a8a38a 100644 --- a/Marlin/src/lcd/menu/menu_motion.cpp +++ b/Marlin/src/lcd/menu/menu_motion.cpp @@ -411,7 +411,7 @@ void menu_motion() { #endif #if ENABLED(LCD_BED_TRAMMING) && DISABLED(LCD_BED_LEVELING) - SUBMENU(MSG_BED_TRAMMING, _lcd_level_bed_corners); + SUBMENU(MSG_BED_TRAMMING, _lcd_bed_tramming); #endif #if ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST) diff --git a/Marlin/src/lcd/menu/menu_probe_offset.cpp b/Marlin/src/lcd/menu/menu_probe_offset.cpp index c7cbebaade..428052bf2a 100644 --- a/Marlin/src/lcd/menu/menu_probe_offset.cpp +++ b/Marlin/src/lcd/menu/menu_probe_offset.cpp @@ -51,7 +51,7 @@ inline void z_clearance_move() { void set_offset_and_go_back(const_float_t z) { probe.offset.z = z; SET_SOFT_ENDSTOP_LOOSE(false); - TERN_(HAS_LEVELING, set_bed_leveling_enabled(leveling_was_active)); + TERN_(HAS_LEVELING, set_bed_leveling_enabled(menu_leveling_was_active)); ui.goto_previous_screen_no_defer(); } @@ -143,7 +143,7 @@ void goto_probe_offset_wizard() { // Store Bed-Leveling-State and disable #if HAS_LEVELING - leveling_was_active = planner.leveling_active; + menu_leveling_was_active = planner.leveling_active; set_bed_leveling_enabled(false); #endif diff --git a/Marlin/src/lcd/menu/menu_tramming.cpp b/Marlin/src/lcd/menu/menu_tramming_wizard.cpp similarity index 100% rename from Marlin/src/lcd/menu/menu_tramming.cpp rename to Marlin/src/lcd/menu/menu_tramming_wizard.cpp diff --git a/Marlin/src/lcd/menu/menu_x_twist.cpp b/Marlin/src/lcd/menu/menu_x_twist.cpp index a069b427c6..d1850a1eb2 100644 --- a/Marlin/src/lcd/menu/menu_x_twist.cpp +++ b/Marlin/src/lcd/menu/menu_x_twist.cpp @@ -46,7 +46,7 @@ float measured_z, z_offset; void xatc_wizard_done() { if (!ui.wait_for_move) { xatc.print_points(); - set_bed_leveling_enabled(leveling_was_active); + set_bed_leveling_enabled(menu_leveling_was_active); SET_SOFT_ENDSTOP_LOOSE(false); ui.goto_screen(menu_advanced_settings); } @@ -199,7 +199,7 @@ void xatc_wizard_homing() { void xatc_wizard_continue() { // Store Bed-Leveling-State and disable #if HAS_LEVELING - leveling_was_active = planner.leveling_active; + menu_leveling_was_active = planner.leveling_active; set_bed_leveling_enabled(false); #endif diff --git a/Marlin/src/module/probe.cpp b/Marlin/src/module/probe.cpp index 7daafd1139..faa3aec03d 100644 --- a/Marlin/src/module/probe.cpp +++ b/Marlin/src/module/probe.cpp @@ -528,7 +528,7 @@ bool Probe::set_deployed(const bool deploy) { } #endif - const xy_pos_t old_xy = current_position; + const xy_pos_t old_xy = current_position; // Remember location before probe deployment #if ENABLED(PROBE_TRIGGERED_WHEN_STOWED_TEST) @@ -625,7 +625,7 @@ bool Probe::probe_down_to_z(const_float_t z, const_feedRate_t fr_mm_s) { // Offset sensorless probing #if HAS_DELTA_SENSORLESS_PROBING - if (probe_triggered) probe.refresh_largest_sensorless_adj(); + if (probe_triggered) refresh_largest_sensorless_adj(); #endif TERN_(HAS_QUIET_PROBING, set_probing_paused(false)); diff --git a/Marlin/src/module/probe.h b/Marlin/src/module/probe.h index a179eb21d8..9fdbfdf9ce 100644 --- a/Marlin/src/module/probe.h +++ b/Marlin/src/module/probe.h @@ -114,7 +114,7 @@ public: } #endif - #else + #else // !IS_KINEMATIC static bool obstacle_check(const_float_t rx, const_float_t ry) { #if ENABLED(AVOID_OBSTACLES) @@ -166,7 +166,7 @@ public: } } - #endif + #endif // !IS_KINEMATIC static void move_z_after_probing() { #ifdef Z_AFTER_PROBING @@ -178,7 +178,7 @@ public: return probe_at_point(pos.x, pos.y, raise_after, verbose_level, probe_relative, sanity_check); } - #else + #else // !HAS_BED_PROBE static constexpr xyz_pos_t offset = xyz_pos_t(NUM_AXIS_ARRAY_1(0)); // See #16767 @@ -186,7 +186,7 @@ public: static bool can_reach(const_float_t rx, const_float_t ry, const bool=true) { return position_is_reachable(rx, ry); } - #endif + #endif // !HAS_BED_PROBE static void move_z_after_homing() { #if ALL(DWIN_LCD_PROUI, INDIVIDUAL_AXIS_HOMING_SUBMENU, MESH_BED_LEVELING) || defined(Z_AFTER_HOMING) diff --git a/buildroot/share/PlatformIO/scripts/common-dependencies.h b/buildroot/share/PlatformIO/scripts/common-dependencies.h index da2d380a82..344669c49b 100644 --- a/buildroot/share/PlatformIO/scripts/common-dependencies.h +++ b/buildroot/share/PlatformIO/scripts/common-dependencies.h @@ -54,7 +54,7 @@ #define HAS_MENU_BACKLASH #endif #if ENABLED(LCD_BED_TRAMMING) - #define HAS_MENU_BED_CORNERS + #define HAS_MENU_BED_TRAMMING #endif #if ENABLED(CANCEL_OBJECTS) #define HAS_MENU_CANCELOBJECT @@ -99,7 +99,7 @@ #define HAS_MENU_TOUCH_SCREEN #endif #if ENABLED(ASSISTED_TRAMMING_WIZARD) - #define HAS_MENU_TRAMMING + #define HAS_MENU_TRAMMING_WIZARD #endif #if ENABLED(AUTO_BED_LEVELING_UBL) #define HAS_MENU_UBL diff --git a/buildroot/tests/BIGTREE_GTR_V1_0 b/buildroot/tests/BIGTREE_GTR_V1_0 index 09e36d6475..e0769b6a10 100755 --- a/buildroot/tests/BIGTREE_GTR_V1_0 +++ b/buildroot/tests/BIGTREE_GTR_V1_0 @@ -16,7 +16,8 @@ opt_set E0_AUTO_FAN_PIN PC10 E1_AUTO_FAN_PIN PC11 E2_AUTO_FAN_PIN PC12 NEOPIXEL_ FIL_RUNOUT6_PIN 8 FIL_RUNOUT7_PIN 9 FIL_RUNOUT8_PIN 10 FIL_RUNOUT4_STATE HIGH FIL_RUNOUT8_STATE HIGH \ FILAMENT_RUNOUT_SCRIPT '"M600 T%c"' opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER BLTOUCH NEOPIXEL_LED Z_SAFE_HOMING NOZZLE_PARK_FEATURE ADVANCED_PAUSE_FEATURE \ - FILAMENT_RUNOUT_SENSOR FIL_RUNOUT4_PULLUP FIL_RUNOUT8_PULLUP FILAMENT_CHANGE_RESUME_ON_INSERT PAUSE_REHEAT_FAST_RESUME + FILAMENT_RUNOUT_SENSOR FIL_RUNOUT4_PULLUP FIL_RUNOUT8_PULLUP FILAMENT_CHANGE_RESUME_ON_INSERT PAUSE_REHEAT_FAST_RESUME \ + LCD_BED_TRAMMING BED_TRAMMING_USE_PROBE exec_test $1 $2 "BigTreeTech GTR | 8 Extruders | Auto-Fan | Mixed TMC Drivers | Runout Sensors w/ distinct states" "$3" restore_configs diff --git a/ini/features.ini b/ini/features.ini index c9c7528658..bfaca56ab3 100644 --- a/ini/features.ini +++ b/ini/features.ini @@ -60,8 +60,8 @@ MARLIN_INVADERS = src_filter=+ MARLIN_SNAKE = src_filter=+ HAS_MENU_BACKLASH = src_filter=+ -HAS_MENU_BED_CORNERS = src_filter=+ LCD_BED_LEVELING = src_filter=+ +HAS_MENU_BED_TRAMMING = src_filter=+ HAS_MENU_CANCELOBJECT = src_filter=+ HAS_MENU_DELTA_CALIBRATE = src_filter=+ HAS_MENU_FILAMENT = src_filter=+ @@ -78,7 +78,7 @@ HAS_MENU_CUTTER = src_filter=+ HAS_MENU_TMC = src_filter=+ HAS_MENU_TOUCH_SCREEN = src_filter=+ -HAS_MENU_TRAMMING = src_filter=+ +HAS_MENU_TRAMMING_WIZARD = src_filter=+ HAS_MENU_UBL = src_filter=+ ANYCUBIC_LCD_CHIRON = src_filter=+ ANYCUBIC_LCD_I3MEGA = src_filter=+ diff --git a/platformio.ini b/platformio.ini index 991c17b2ff..d31f23abec 100644 --- a/platformio.ini +++ b/platformio.ini @@ -60,8 +60,8 @@ default_src_filter = + - - + - - - - - - - - - + - - - - @@ -77,7 +77,7 @@ default_src_filter = + - - + - - - - - + - - - - From 65b97438fa92743ac5b2659ae55013a4c413da39 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 15 Mar 2023 19:13:09 -0500 Subject: [PATCH 026/225] =?UTF-8?q?=F0=9F=A9=B9=20Fan=20Menu=20/=20Status?= =?UTF-8?q?=20fixes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to #21888 --- Marlin/src/lcd/e3v2/marlinui/ui_common.cpp | 2 +- .../lcd/e3v2/marlinui/ui_status_480x272.cpp | 160 +++++++----------- Marlin/src/lcd/language/language_en.h | 8 - Marlin/src/lcd/marlinui.cpp | 1 - Marlin/src/lcd/marlinui.h | 1 - Marlin/src/lcd/menu/menu_item.h | 8 + Marlin/src/lcd/menu/menu_tune.cpp | 14 +- Marlin/src/lcd/tft/touch.cpp | 2 +- 8 files changed, 80 insertions(+), 116 deletions(-) diff --git a/Marlin/src/lcd/e3v2/marlinui/ui_common.cpp b/Marlin/src/lcd/e3v2/marlinui/ui_common.cpp index 12d16887d1..778bed6335 100644 --- a/Marlin/src/lcd/e3v2/marlinui/ui_common.cpp +++ b/Marlin/src/lcd/e3v2/marlinui/ui_common.cpp @@ -195,7 +195,7 @@ void MarlinUI::draw_status_message(const bool blink) { } const bool hash_changed = hash != old_hash; old_hash = hash; - return hash_changed || !ui.did_first_redraw; + return hash_changed || !did_first_redraw; }; #if ENABLED(STATUS_MESSAGE_SCROLLING) diff --git a/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp b/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp index 205913ca69..7ac0e3fcb4 100644 --- a/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp +++ b/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp @@ -61,72 +61,54 @@ #define STATUS_CHR_WIDTH 14 #define STATUS_CHR_HEIGHT 28 +bool old_is_printing; + // // Before homing, blink '123' <-> '???'. // Homed but unknown... '123' <-> ' '. // Homed and known, display constantly. // -FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const bool blink, const uint16_t x, const uint16_t y) { +void _draw_axis_value(const AxisEnum axis, const char *value, const bool blink, const uint16_t x, const uint16_t y) { + const bool x_redraw = !ui.did_first_redraw || old_is_printing != print_job_timer.isRunning(); + if (x_redraw) { + dwin_string.set('X' + axis); + DWIN_Draw_String(true, font16x32, Color_IconBlue, Color_Bg_Black, + #if ENABLED(DWIN_MARLINUI_PORTRAIT) + x + (utf8_strlen(value) * 14 - 14) / 2, y + 2 + #else + x, y + #endif + , S(dwin_string.string()) + ); + } - #if ENABLED(DWIN_MARLINUI_PORTRAIT) + dwin_string.set(); + if (blink) + dwin_string.add(value); + else if (!TEST(axes_homed, axis)) + while (const char c = *value++) dwin_string.add(c <= '.' ? c : '?'); + else if (NONE(HOME_AFTER_DEACTIVATE, DISABLE_REDUCED_ACCURACY_WARNING) && !TEST(axes_trusted, axis)) + dwin_string.add(TERN1(DWIN_MARLINUI_PORTRAIT, axis == Z_AXIS) ? PSTR(" ") : PSTR(" ")); + else + dwin_string.add(value); - uint8_t vallen = utf8_strlen(value); - if (!ui.did_first_redraw) { - dwin_string.set('X' + axis); - DWIN_Draw_String(true, font16x32, Color_IconBlue, Color_Bg_Black, x + (vallen * 14 - 14) / 2, y + 2, S(dwin_string.string())); - } + // For E_TOTAL there may be some characters to cover up + if (TERN0(LCD_SHOW_E_TOTAL, x_redraw && axis == X_AXIS)) + dwin_string.add(F(" ")); - dwin_string.set(); - if (blink) - dwin_string.add(value); - else if (!TEST(axes_homed, axis)) - while (const char c = *value++) dwin_string.add(c <= '.' ? c : '?'); - else if (NONE(HOME_AFTER_DEACTIVATE, DISABLE_REDUCED_ACCURACY_WARNING) && !TEST(axes_trusted, axis)) - dwin_string.add(TERN1(DWIN_MARLINUI_PORTRAIT, axis == Z_AXIS) ? PSTR(" ") : PSTR(" ")); - else - dwin_string.add(value); - - // For E_TOTAL there may be some characters to cover up - if (BOTH(DWIN_MARLINUI_PORTRAIT, LCD_SHOW_E_TOTAL) && axis == X_AXIS) - dwin_string.add(F(" ")); - - DWIN_Draw_String(true, font14x28, Color_White, Color_Bg_Black, x, y + 32, S(dwin_string.string())); - - #else // !DWIN_MARLINUI_PORTRAIT - - if (!ui.did_first_redraw || ui.old_is_printing != print_job_timer.isRunning()) { - dwin_string.set('X' + axis); - DWIN_Draw_String(true, font16x32, Color_IconBlue, Color_Bg_Black, x, y, S(dwin_string.string())); - } - - dwin_string.set(); - if (blink) - dwin_string.add(value); - else { - if (!TEST(axes_homed, axis)) - while (const char c = *value++) dwin_string.add(c <= '.' ? c : '?'); - else { - #if NONE(HOME_AFTER_DEACTIVATE, DISABLE_REDUCED_ACCURACY_WARNING) - if (!TEST(axes_trusted, axis)) - dwin_string.add(TERN1(DWIN_MARLINUI_PORTRAIT, axis == Z_AXIS) ? PSTR(" ") : PSTR(" ")); - else - #endif - dwin_string.add(value); - } - } - - // For E_TOTAL there may be some characters to cover up - if (ENABLED(LCD_SHOW_E_TOTAL) && (!ui.did_first_redraw || ui.old_is_printing != print_job_timer.isRunning()) && axis == X_AXIS) - dwin_string.add(F(" ")); - - DWIN_Draw_String(true, font14x28, Color_White, Color_Bg_Black, x + 32, y + 4, S(dwin_string.string())); - - #endif // !DWIN_MARLINUI_PORTRAIT + DWIN_Draw_String(true, font14x28, Color_White, Color_Bg_Black, + #if ENABLED(DWIN_MARLINUI_PORTRAIT) + x, y + 32 + #else + x + 32, y + 4 + #endif + , S(dwin_string.string()) + ); } #if ENABLED(LCD_SHOW_E_TOTAL) - FORCE_INLINE void _draw_e_value(const_float_t value, const uint16_t x, const uint16_t y) { + void _draw_e_value(const_float_t value, const uint16_t x, const uint16_t y) { const uint8_t scale = value >= 100000.0f ? 10 : 1; // show cm after 99,999mm #if ENABLED(DWIN_MARLINUI_PORTRAIT) @@ -207,72 +189,56 @@ FORCE_INLINE void _draw_heater_status(const heater_id_t heater, const uint16_t x #endif #endif - #if HAS_HOTEND && HAS_HEATED_BED - float tc, tt; - bool c_draw, t_draw, i_draw, ta; - const bool isBed = heater < 0; - if (isBed) { + celsius_float_t tc = 0, tt = 0; + bool isBed = (DISABLED(HAS_HOTEND) && ENABLED(HAS_HEATED_BED)) || (BOTH(HAS_HOTEND, HAS_HEATED_BED) && heater < 0), + ta = false, c_draw, t_draw, i_draw; + c_draw = t_draw = i_draw = !ui.did_first_redraw; + if (isBed) { + #if HAS_HEATED_BED tc = thermalManager.degBed(); tt = thermalManager.degTargetBed(); ta = thermalManager.isHeatingBed(); - c_draw = tc != old_bed_temp; - t_draw = tt != old_bed_target; - i_draw = ta != old_bed_on; + c_draw |= tc != old_bed_temp; + t_draw |= tt != old_bed_target; + i_draw |= ta != old_bed_on; old_bed_temp = tc; old_bed_target = tt; old_bed_on = ta; - } - else { + #if HAS_LEVELING + i_draw |= planner.leveling_active != old_leveling_on; + old_leveling_on = planner.leveling_active; + #endif + #endif + } + else { + #if HAS_HOTEND tc = thermalManager.degHotend(heater); tt = thermalManager.degTargetHotend(heater); ta = thermalManager.isHeatingHotend(heater); - c_draw = tc != old_temp[heater]; - t_draw = tt != old_target[heater]; - i_draw = ta != old_on[heater]; + c_draw |= tc != old_temp[heater]; + t_draw |= tt != old_target[heater]; + i_draw |= ta != old_on[heater]; old_temp[heater] = tc; old_target[heater] = tt; old_on[heater] = ta; - } - #elif HAS_HOTEND - constexpr bool isBed = false; - const float tc = thermalManager.degHotend(heater), tt = thermalManager.degTargetHotend(heater); - const uint8_t ta = thermalManager.isHeatingHotend(heater); - bool c_draw = tc != old_temp[heater], t_draw = tt != old_target[heater], i_draw = ta != old_on[heater]; - old_temp[heater] = tc; old_target[heater] = tt; old_on[heater] = ta; - #elif HAS_HEATED_BED - constexpr bool isBed = true; - const float tc = thermalManager.degBed(), tt = thermalManager.degTargetBed(); - const uint8_t ta = thermalManager.isHeatingBed(); - bool c_draw = tc != old_bed_temp, t_draw = tt != old_bed_target, i_draw = ta != old_bed_on; - old_bed_temp = tc; old_bed_target = tt; old_bed_on = ta; - #else - bool c_draw = false, t_draw = false, i_draw = false; - constexpr float tc = 0, tt = 0; - constexpr uint8_t ta = 0; - #endif - - #if HAS_HEATED_BED && HAS_LEVELING - if (isBed) { - i_draw |= (planner.leveling_active != old_leveling_on); - old_leveling_on = planner.leveling_active; - } - #endif + #endif + } // Draw target temperature, if needed - if (!ui.did_first_redraw || t_draw) { + if (t_draw) { dwin_string.set(i16tostr3rj(tt + 0.5)); dwin_string.add(LCD_STR_DEGREE); DWIN_Draw_String(true, font14x28, Color_White, Color_Bg_Black, x, y, S(dwin_string.string())); } // Draw heater icon with on / off / leveled states - if (!ui.did_first_redraw || i_draw) { + if (i_draw) { const uint8_t ico = isBed ? (TERN0(HAS_LEVELING, planner.leveling_active) ? ICON_BedLevelOff : ICON_BedOff) : ICON_HotendOff; DWIN_ICON_Show(ICON, ico + ta, x, y + STATUS_CHR_HEIGHT + 2); } // Draw current temperature, if needed - if (!ui.did_first_redraw || c_draw) { + if (c_draw) { dwin_string.set(i16tostr3rj(tc + 0.5)); dwin_string.add(LCD_STR_DEGREE); DWIN_Draw_String(true, font14x28, Color_White, Color_Bg_Black, x, y + 70, S(dwin_string.string())); @@ -414,7 +380,7 @@ void MarlinUI::draw_status_screen() { } DWIN_Draw_String(true, font14x28, Color_White, Color_Bg_Black, 378, 170, S(dwin_string.string())); } - else if (!ui.did_first_redraw || ui.old_is_printing != print_job_timer.isRunning()) { + else if (!ui.did_first_redraw || old_is_printing != print_job_timer.isRunning()) { dwin_string.set(F(" ")); DWIN_Draw_String(true, font14x28, Color_IconBlue, Color_Bg_Black, 336, 170, S(dwin_string.string())); } @@ -470,7 +436,7 @@ void MarlinUI::draw_status_screen() { draw_status_message(blink); ui.did_first_redraw = true; - ui.old_is_printing = print_job_timer.isRunning(); + old_is_printing = print_job_timer.isRunning(); } #endif // IS_DWIN_MARLINUI diff --git a/Marlin/src/lcd/language/language_en.h b/Marlin/src/lcd/language/language_en.h index 5012f8c496..55f426017c 100644 --- a/Marlin/src/lcd/language/language_en.h +++ b/Marlin/src/lcd/language/language_en.h @@ -908,11 +908,3 @@ namespace Language_en { LSTR DGUS_MSG_FILAMENT_RUNOUT = _UxGT("Filament runout E%d"); } - -#if FAN_COUNT == 1 - #define MSG_FIRST_FAN_SPEED MSG_FAN_SPEED - #define MSG_EXTRA_FIRST_FAN_SPEED MSG_EXTRA_FAN_SPEED -#else - #define MSG_FIRST_FAN_SPEED MSG_FAN_SPEED_N - #define MSG_EXTRA_FIRST_FAN_SPEED MSG_EXTRA_FAN_SPEED_N -#endif diff --git a/Marlin/src/lcd/marlinui.cpp b/Marlin/src/lcd/marlinui.cpp index d3f01e6d23..88cdb99076 100644 --- a/Marlin/src/lcd/marlinui.cpp +++ b/Marlin/src/lcd/marlinui.cpp @@ -351,7 +351,6 @@ void MarlinUI::init() { #if IS_DWIN_MARLINUI bool MarlinUI::did_first_redraw; - bool MarlinUI::old_is_printing; #endif #if ENABLED(SDSUPPORT) diff --git a/Marlin/src/lcd/marlinui.h b/Marlin/src/lcd/marlinui.h index fa18878c1b..9d6d235e96 100644 --- a/Marlin/src/lcd/marlinui.h +++ b/Marlin/src/lcd/marlinui.h @@ -503,7 +503,6 @@ public: #if IS_DWIN_MARLINUI static bool did_first_redraw; - static bool old_is_printing; #endif #if EITHER(BABYSTEP_GFX_OVERLAY, MESH_EDIT_GFX_OVERLAY) diff --git a/Marlin/src/lcd/menu/menu_item.h b/Marlin/src/lcd/menu/menu_item.h index fcf7a9ea30..3186852002 100644 --- a/Marlin/src/lcd/menu/menu_item.h +++ b/Marlin/src/lcd/menu/menu_item.h @@ -555,6 +555,14 @@ class MenuItem_bool : public MenuEditItemBase { #define EDIT_EXTRA_FAN_SPEED(...) #endif + #if FAN_COUNT == 1 + #define MSG_FIRST_FAN_SPEED MSG_FAN_SPEED + #define MSG_EXTRA_FIRST_FAN_SPEED MSG_EXTRA_FAN_SPEED + #else + #define MSG_FIRST_FAN_SPEED MSG_FAN_SPEED_N + #define MSG_EXTRA_FIRST_FAN_SPEED MSG_EXTRA_FAN_SPEED_N + #endif + #define _FAN_EDIT_ITEMS(F,L) do{ \ editable.uint8 = thermalManager.fan_speed[F]; \ EDIT_ITEM_FAST_N(percent, F, MSG_##L, &editable.uint8, 0, 255, on_fan_update); \ diff --git a/Marlin/src/lcd/menu/menu_tune.cpp b/Marlin/src/lcd/menu/menu_tune.cpp index 8c4b2b1cfc..9247607269 100644 --- a/Marlin/src/lcd/menu/menu_tune.cpp +++ b/Marlin/src/lcd/menu/menu_tune.cpp @@ -156,37 +156,37 @@ void menu_tune() { #if HAS_FAN0 _FAN_EDIT_ITEMS(0,FIRST_FAN_SPEED); #endif - #if HAS_FAN1 + #if HAS_FAN1 && REDUNDANT_PART_COOLING_FAN != 1 FAN_EDIT_ITEMS(1); #elif SNFAN(1) singlenozzle_item(1); #endif - #if HAS_FAN2 + #if HAS_FAN2 && REDUNDANT_PART_COOLING_FAN != 2 FAN_EDIT_ITEMS(2); #elif SNFAN(2) singlenozzle_item(2); #endif - #if HAS_FAN3 + #if HAS_FAN3 && REDUNDANT_PART_COOLING_FAN != 3 FAN_EDIT_ITEMS(3); #elif SNFAN(3) singlenozzle_item(3); #endif - #if HAS_FAN4 + #if HAS_FAN4 && REDUNDANT_PART_COOLING_FAN != 4 FAN_EDIT_ITEMS(4); #elif SNFAN(4) singlenozzle_item(4); #endif - #if HAS_FAN5 + #if HAS_FAN5 && REDUNDANT_PART_COOLING_FAN != 5 FAN_EDIT_ITEMS(5); #elif SNFAN(5) singlenozzle_item(5); #endif - #if HAS_FAN6 + #if HAS_FAN6 && REDUNDANT_PART_COOLING_FAN != 6 FAN_EDIT_ITEMS(6); #elif SNFAN(6) singlenozzle_item(6); #endif - #if HAS_FAN7 + #if HAS_FAN7 && REDUNDANT_PART_COOLING_FAN != 7 FAN_EDIT_ITEMS(7); #elif SNFAN(7) singlenozzle_item(7); diff --git a/Marlin/src/lcd/tft/touch.cpp b/Marlin/src/lcd/tft/touch.cpp index cc800cddc3..b73f67e744 100644 --- a/Marlin/src/lcd/tft/touch.cpp +++ b/Marlin/src/lcd/tft/touch.cpp @@ -27,7 +27,7 @@ #include "touch.h" #include "../marlinui.h" // for ui methods -#include "../menu/menu_item.h" // for touch_screen_calibration +#include "../menu/menu_item.h" // for MSG_FIRST_FAN_SPEED #include "../../module/temperature.h" #include "../../module/planner.h" From 0a00662b54dbfbe913feb676ac35ad1aea472759 Mon Sep 17 00:00:00 2001 From: dwzg <50058606+dwzg@users.noreply.github.com> Date: Thu, 16 Mar 2023 01:15:54 +0100 Subject: [PATCH 027/225] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20DWIN=20MarlinUI=20?= =?UTF-8?q?Fan/E/XY=20(#25502)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp b/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp index 7ac0e3fcb4..d0a04a3c4b 100644 --- a/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp +++ b/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp @@ -110,10 +110,11 @@ void _draw_axis_value(const AxisEnum axis, const char *value, const bool blink, void _draw_e_value(const_float_t value, const uint16_t x, const uint16_t y) { const uint8_t scale = value >= 100000.0f ? 10 : 1; // show cm after 99,999mm + const bool e_redraw = !ui.did_first_redraw || old_is_printing != print_job_timer.isRunning(); #if ENABLED(DWIN_MARLINUI_PORTRAIT) - if (!ui.did_first_redraw) { + if (e_redraw) { // Extra spaces to erase previous value dwin_string.set(F("E ")); DWIN_Draw_String(true, font16x32, Color_IconBlue, Color_Bg_Black, x + (4 * 14 / 2) - 7, y + 2, S(dwin_string.string())); @@ -127,7 +128,7 @@ void _draw_axis_value(const AxisEnum axis, const char *value, const bool blink, #else // !DWIN_MARLINUI_PORTRAIT - if (!ui.did_first_redraw || ui.old_is_printing != print_job_timer.isRunning()) { + if (e_redraw) { dwin_string.set(F("E ")); DWIN_Draw_String(true, font16x32, Color_IconBlue, Color_Bg_Black, x, y, S(dwin_string.string())); } @@ -147,11 +148,10 @@ void _draw_axis_value(const AxisEnum axis, const char *value, const bool blink, // FORCE_INLINE void _draw_fan_status(const uint16_t x, const uint16_t y) { const uint16_t fanx = (4 * STATUS_CHR_WIDTH - STATUS_FAN_WIDTH) / 2; - const uint8_t fan_pct = thermalManager.scaledFanSpeedPercent(0); - const bool fan_on = !!fan_pct; + const bool fan_on = !!thermalManager.scaledFanSpeed(0); if (fan_on) { DWIN_ICON_Animation(0, fan_on, ICON, ICON_Fan0, ICON_Fan3, x + fanx, y, 25); - dwin_string.set(i8tostr3rj(fan_pct)); + dwin_string.set(i8tostr3rj(thermalManager.scaledFanSpeedPercent(0))); dwin_string.add('%'); DWIN_Draw_String(true, font14x28, Color_White, Color_Bg_Black, x, y + STATUS_FAN_HEIGHT, S(dwin_string.string())); } From 32c7e24b4bce9fb42b4523cf35df3c51444ace71 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Thu, 16 Mar 2023 00:52:51 +0000 Subject: [PATCH 028/225] [cron] Bump distribution date (2023-03-16) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index c993bd48b9..922cdfeeb4 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-03-15" +//#define STRING_DISTRIBUTION_DATE "2023-03-16" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 5f78729bd4..a2c451f900 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-03-15" + #define STRING_DISTRIBUTION_DATE "2023-03-16" #endif /** From 41b3409ba86d5f6e0826cdf577253a801b9be1c1 Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Thu, 16 Mar 2023 18:42:52 +1300 Subject: [PATCH 029/225] =?UTF-8?q?=F0=9F=94=A7=20Safer=20default=20for=20?= =?UTF-8?q?Z=5FMIN=5FPROBE=5FPIN=20override=20(#25524)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/Configuration.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index b57c66a9a8..40f4fe4cbd 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -1345,19 +1345,17 @@ /** * Z_MIN_PROBE_PIN * - * Define this pin if the probe is not connected to Z_MIN_PIN. - * If not defined the default pin for the selected MOTHERBOARD - * will be used. Most of the time the default is what you want. + * Override this pin only if the probe cannot be connected to + * the default Z_MIN_PROBE_PIN for the selected MOTHERBOARD. * * - The simplest option is to use a free endstop connector. * - Use 5V for powered (usually inductive) sensors. * - * - RAMPS 1.3/1.4 boards may use the 5V, GND, and Aux4->D32 pin: - * - For simple switches connect... - * - normally-closed switches to GND and D32. - * - normally-open switches to 5V and D32. + * - For simple switches... + * - Normally-closed (NC) also connect to GND. + * - Normally-open (NO) also connect to 5V. */ -//#define Z_MIN_PROBE_PIN 32 // Pin 32 is the RAMPS default +//#define Z_MIN_PROBE_PIN -1 /** * Probe Type From 51d3eabf463f28411670a543a7bd7418aad46fe4 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 15 Mar 2023 22:16:53 -0500 Subject: [PATCH 030/225] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Refactor=20PROBE?= =?UTF-8?q?=5FPT=5F[123]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration_adv.h | 11 ++++------- Marlin/src/inc/Conditionals_post.h | 8 ++------ Marlin/src/inc/SanityCheck.h | 8 ++++++++ Marlin/src/module/probe.h | 10 +++++----- buildroot/tests/mega2560 | 3 ++- 5 files changed, 21 insertions(+), 19 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 6ef72d9f04..35c43c7f2c 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -2152,13 +2152,10 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) - //#define PROBE_PT_1_X 15 - //#define PROBE_PT_1_Y 180 - //#define PROBE_PT_2_X 15 - //#define PROBE_PT_2_Y 20 - //#define PROBE_PT_3_X 170 - //#define PROBE_PT_3_Y 20 +#if NEEDS_THREE_PROBE_POINTS + //#define PROBE_PT_1 { 15, 180 } // (mm) { x, y } + //#define PROBE_PT_2 { 15, 20 } + //#define PROBE_PT_3 { 170, 20 } #endif /** diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 249aa5c30e..9305e86594 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -3188,13 +3188,9 @@ #undef MESH_MAX_Y #endif -#define _POINT_COUNT (defined(PROBE_PT_1_X) + defined(PROBE_PT_2_X) + defined(PROBE_PT_3_X) + defined(PROBE_PT_1_Y) + defined(PROBE_PT_2_Y) + defined(PROBE_PT_3_Y)) -#if _POINT_COUNT == 6 - #define HAS_FIXED_3POINT 1 -#elif _POINT_COUNT > 0 - #error "For 3-Point Leveling all XY points must be defined (or none for the defaults)." +#if NEEDS_THREE_PROBE_POINTS && defined(PROBE_PT_1) + #define HAS_FIXED_3POINT 1 // Points are defined for ABL/UBL. Else calculated in probe.get_three_points. #endif -#undef _POINT_COUNT /** * Buzzer/Speaker diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index a03a489a01..a795bfb93f 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -676,6 +676,8 @@ #error "DISABLE_INACTIVE_E is now set with DISABLE_INACTIVE_EXTRUDER." #elif defined(INVERT_X_STEP_PIN) || defined(INVERT_Y_STEP_PIN) || defined(INVERT_Z_STEP_PIN) || defined(INVERT_I_STEP_PIN) || defined(INVERT_J_STEP_PIN) || defined(INVERT_K_STEP_PIN) || defined(INVERT_U_STEP_PIN) || defined(INVERT_V_STEP_PIN) || defined(INVERT_W_STEP_PIN) || defined(INVERT_E_STEP_PIN) #error "INVERT_*_STEP_PIN true is now STEP_STATE_* LOW, and INVERT_*_STEP_PIN false is now STEP_STATE_* HIGH." +#elif defined(PROBE_PT_1_X) || defined(PROBE_PT_1_Y) || defined(PROBE_PT_2_X) || defined(PROBE_PT_2_Y) || defined(PROBE_PT_3_X) || defined(PROBE_PT_3_Y) + #error "PROBE_PT_[123]_[XY] is now defined using PROBE_PT_[123] with an array { x, y }." #endif // L64xx stepper drivers have been removed @@ -2102,6 +2104,12 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #endif +#define _POINT_COUNT (defined(PROBE_PT_1) + defined(PROBE_PT_2) + defined(PROBE_PT_3)) +#if _POINT_COUNT != 0 && _POINT_COUNT != 3 + #error "For 3-Point Procedures all XY points must be defined (or none for the defaults)." +#endif +#undef _POINT_COUNT + #if ALL(HAS_LEVELING, RESTORE_LEVELING_AFTER_G28, ENABLE_LEVELING_AFTER_G28) #error "Only enable RESTORE_LEVELING_AFTER_G28 or ENABLE_LEVELING_AFTER_G28, but not both." #endif diff --git a/Marlin/src/module/probe.h b/Marlin/src/module/probe.h index 9fdbfdf9ce..42b6c4fe41 100644 --- a/Marlin/src/module/probe.h +++ b/Marlin/src/module/probe.h @@ -294,12 +294,12 @@ public: template static void get_three_points(T points[3]) { #if HAS_FIXED_3POINT - #define VALIDATE_PROBE_PT(N) static_assert(Probe::build_time::can_reach(xy_pos_t{PROBE_PT_##N##_X, PROBE_PT_##N##_Y}), \ - "PROBE_PT_" STRINGIFY(N) "_(X|Y) is unreachable using default NOZZLE_TO_PROBE_OFFSET and PROBING_MARGIN"); + #define VALIDATE_PROBE_PT(N) static_assert(Probe::build_time::can_reach(xy_pos_t(PROBE_PT_##N)), \ + "PROBE_PT_" STRINGIFY(N) " is unreachable using default NOZZLE_TO_PROBE_OFFSET and PROBING_MARGIN."); VALIDATE_PROBE_PT(1); VALIDATE_PROBE_PT(2); VALIDATE_PROBE_PT(3); - points[0] = xy_float_t({ PROBE_PT_1_X, PROBE_PT_1_Y }); - points[1] = xy_float_t({ PROBE_PT_2_X, PROBE_PT_2_Y }); - points[2] = xy_float_t({ PROBE_PT_3_X, PROBE_PT_3_Y }); + points[0] = xy_float_t(PROBE_PT_1); + points[1] = xy_float_t(PROBE_PT_2); + points[2] = xy_float_t(PROBE_PT_3); #else #if IS_KINEMATIC constexpr float SIN0 = 0.0, SIN120 = 0.866025, SIN240 = -0.866025, diff --git a/buildroot/tests/mega2560 b/buildroot/tests/mega2560 index bd855f1df1..363c386a4e 100755 --- a/buildroot/tests/mega2560 +++ b/buildroot/tests/mega2560 @@ -62,7 +62,8 @@ opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO NUM_SERVOS 1 \ NUM_RUNOUT_SENSORS 5 FIL_RUNOUT2_PIN 44 FIL_RUNOUT3_PIN 45 FIL_RUNOUT4_PIN 46 FIL_RUNOUT5_PIN 47 \ FIL_RUNOUT3_STATE HIGH FILAMENT_RUNOUT_SCRIPT '"M600 T%c"' opt_enable VIKI2 BOOT_MARLIN_LOGO_ANIMATED SDSUPPORT AUTO_REPORT_SD_STATUS \ - Z_PROBE_SERVO_NR Z_SERVO_ANGLES DEACTIVATE_SERVOS_AFTER_MOVE AUTO_BED_LEVELING_3POINT DEBUG_LEVELING_FEATURE \ + Z_PROBE_SERVO_NR Z_SERVO_ANGLES DEACTIVATE_SERVOS_AFTER_MOVE \ + AUTO_BED_LEVELING_3POINT DEBUG_LEVELING_FEATURE PROBE_PT_1 PROBE_PT_2 PROBE_PT_3 \ EEPROM_SETTINGS EEPROM_CHITCHAT M114_DETAIL AUTO_REPORT_POSITION \ NO_VOLUMETRICS EXTENDED_CAPABILITIES_REPORT AUTO_REPORT_TEMPERATURES AUTOTEMP G38_PROBE_TARGET JOYSTICK \ DIRECT_STEPPING DETECT_BROKEN_ENDSTOP \ From 507c122fcff686bc83d6c8b06bc05f3bf01bcc73 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 15 Mar 2023 22:21:03 -0500 Subject: [PATCH 031/225] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Refactor=20UBL=20'?= =?UTF-8?q?G29=20J'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp | 168 ++++++++------------ 1 file changed, 65 insertions(+), 103 deletions(-) diff --git a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp index 02efb3e065..e504379848 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp @@ -1479,82 +1479,33 @@ void unified_bed_leveling::smart_fill_mesh() { void unified_bed_leveling::tilt_mesh_based_on_probed_grid(const bool do_3_pt_leveling) { - #ifdef G29J_MESH_TILT_MARGIN - const float x_min = _MAX(probe.min_x() + (G29J_MESH_TILT_MARGIN), X_MIN_POS), - x_max = _MIN(probe.max_x() - (G29J_MESH_TILT_MARGIN), X_MAX_POS), - y_min = _MAX(probe.min_y() + (G29J_MESH_TILT_MARGIN), Y_MIN_POS), - y_max = _MIN(probe.max_y() - (G29J_MESH_TILT_MARGIN), Y_MAX_POS); - #else - const float x_min = probe.min_x(), x_max = probe.max_x(), - y_min = probe.min_y(), y_max = probe.max_y(); - #endif - const float dx = (x_max - x_min) / (param.J_grid_size - 1), - dy = (y_max - y_min) / (param.J_grid_size - 1); - - xy_float_t points[3]; - probe.get_three_points(points); - float measured_z; bool abort_flag = false; - #if ENABLED(VALIDATE_MESH_TILT) - float z1, z2, z3; // Needed for algorithm validation below - #endif - struct linear_fit_data lsf_results; incremental_LSF_reset(&lsf_results); if (do_3_pt_leveling) { - SERIAL_ECHOLNPGM("Tilting mesh (1/3)"); - TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT " 1/3"), GET_TEXT(MSG_LCD_TILTING_MESH))); + xy_float_t points[3]; + probe.get_three_points(points); - measured_z = probe.probe_at_point(points[0], PROBE_PT_RAISE, param.V_verbosity); - if (isnan(measured_z)) - abort_flag = true; - else { - measured_z -= get_z_correction(points[0]); - TERN_(VALIDATE_MESH_TILT, z1 = measured_z); - if (param.V_verbosity > 3) { - serial_spaces(16); - SERIAL_ECHOLNPGM("Corrected_Z=", measured_z); - } - incremental_LSF(&lsf_results, points[0], measured_z); - } + #if ENABLED(VALIDATE_MESH_TILT) + float gotz[3]; // Used for algorithm validation below + #endif - if (!abort_flag) { - SERIAL_ECHOLNPGM("Tilting mesh (2/3)"); - TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT " 2/3"), GET_TEXT(MSG_LCD_TILTING_MESH))); + LOOP_L_N(i, 3) { + SERIAL_ECHOLNPGM("Tilting mesh (", i + 1, "/3)"); + TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT " %i/3"), i + 1, GET_TEXT(MSG_LCD_TILTING_MESH))); - measured_z = probe.probe_at_point(points[1], PROBE_PT_RAISE, param.V_verbosity); - TERN_(VALIDATE_MESH_TILT, z2 = measured_z); - if (isnan(measured_z)) - abort_flag = true; - else { - measured_z -= get_z_correction(points[1]); - if (param.V_verbosity > 3) { - serial_spaces(16); - SERIAL_ECHOLNPGM("Corrected_Z=", measured_z); - } - incremental_LSF(&lsf_results, points[1], measured_z); - } - } + measured_z = probe.probe_at_point(points[i], i < 2 ? PROBE_PT_RAISE : PROBE_PT_LAST_STOW, param.V_verbosity); + if ((abort_flag = isnan(measured_z))) break; - if (!abort_flag) { - SERIAL_ECHOLNPGM("Tilting mesh (3/3)"); - TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT " 3/3"), GET_TEXT(MSG_LCD_TILTING_MESH))); + measured_z -= get_z_correction(points[i]); + TERN_(VALIDATE_MESH_TILT, gotz[i] = measured_z); - measured_z = probe.probe_at_point(points[2], PROBE_PT_LAST_STOW, param.V_verbosity); - TERN_(VALIDATE_MESH_TILT, z3 = measured_z); - if (isnan(measured_z)) - abort_flag = true; - else { - measured_z -= get_z_correction(points[2]); - if (param.V_verbosity > 3) { - serial_spaces(16); - SERIAL_ECHOLNPGM("Corrected_Z=", measured_z); - } - incremental_LSF(&lsf_results, points[2], measured_z); - } + if (param.V_verbosity > 3) { serial_spaces(16); SERIAL_ECHOLNPGM("Corrected_Z=", measured_z); } + + incremental_LSF(&lsf_results, points[i], measured_z); } probe.stow(); @@ -1567,54 +1518,62 @@ void unified_bed_leveling::smart_fill_mesh() { } else { // !do_3_pt_leveling + #ifdef G29J_MESH_TILT_MARGIN + const float x_min = _MAX(probe.min_x() + (G29J_MESH_TILT_MARGIN), X_MIN_POS), + x_max = _MIN(probe.max_x() - (G29J_MESH_TILT_MARGIN), X_MAX_POS), + y_min = _MAX(probe.min_y() + (G29J_MESH_TILT_MARGIN), Y_MIN_POS), + y_max = _MIN(probe.max_y() - (G29J_MESH_TILT_MARGIN), Y_MAX_POS); + #else + const float x_min = probe.min_x(), x_max = probe.max_x(), + y_min = probe.min_y(), y_max = probe.max_y(); + #endif + const float dx = (x_max - x_min) / (param.J_grid_size - 1), + dy = (y_max - y_min) / (param.J_grid_size - 1); + bool zig_zag = false; const uint16_t total_points = sq(param.J_grid_size); uint16_t point_num = 1; - xy_pos_t rpos; LOOP_L_N(ix, param.J_grid_size) { + xy_pos_t rpos; rpos.x = x_min + ix * dx; LOOP_L_N(iy, param.J_grid_size) { rpos.y = y_min + dy * (zig_zag ? param.J_grid_size - 1 - iy : iy); - if (!abort_flag) { - SERIAL_ECHOLNPGM("Tilting mesh point ", point_num, "/", total_points, "\n"); - TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT " %i/%i"), GET_TEXT(MSG_LCD_TILTING_MESH), point_num, total_points)); + SERIAL_ECHOLNPGM("Tilting mesh point ", point_num, "/", total_points, "\n"); + TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT " %i/%i"), GET_TEXT(MSG_LCD_TILTING_MESH), point_num, total_points)); - measured_z = probe.probe_at_point(rpos, parser.seen_test('E') ? PROBE_PT_STOW : PROBE_PT_RAISE, param.V_verbosity); // TODO: Needs error handling + measured_z = probe.probe_at_point(rpos, parser.seen_test('E') ? PROBE_PT_STOW : PROBE_PT_RAISE, param.V_verbosity); // TODO: Needs error handling - abort_flag = isnan(measured_z); + if ((abort_flag = isnan(measured_z))) break; - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) { - const xy_pos_t lpos = rpos.asLogical(); - DEBUG_CHAR('('); - DEBUG_ECHO_F(rpos.x, 7); - DEBUG_CHAR(','); - DEBUG_ECHO_F(rpos.y, 7); - DEBUG_ECHOPAIR_F(") logical: (", lpos.x, 7); - DEBUG_CHAR(','); - DEBUG_ECHO_F(lpos.y, 7); - DEBUG_ECHOPAIR_F(") measured: ", measured_z, 7); - DEBUG_ECHOPAIR_F(" correction: ", get_z_correction(rpos), 7); - } - #endif + const float zcorr = get_z_correction(rpos); - measured_z -= get_z_correction(rpos) /* + probe.offset.z */ ; - - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR_F(" final >>>---> ", measured_z, 7); - - if (param.V_verbosity > 3) { - serial_spaces(16); - SERIAL_ECHOLNPGM("Corrected_Z=", measured_z); + #if ENABLED(DEBUG_LEVELING_FEATURE) + if (DEBUGGING(LEVELING)) { + const xy_pos_t lpos = rpos.asLogical(); + DEBUG_CHAR('('); DEBUG_ECHO_F(rpos.x, 7); DEBUG_CHAR(','); DEBUG_ECHO_F(rpos.y, 7); + DEBUG_ECHOPAIR_F(") logical: (", lpos.x, 7); DEBUG_CHAR(','); DEBUG_ECHO_F(lpos.y, 7); + DEBUG_ECHOPAIR_F(") measured: ", measured_z, 7); + DEBUG_ECHOPAIR_F(" correction: ", zcorr, 7); } - incremental_LSF(&lsf_results, rpos, measured_z); + #endif + + measured_z -= zcorr; + + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR_F(" final >>>---> ", measured_z, 7); + + if (param.V_verbosity > 3) { + serial_spaces(16); + SERIAL_ECHOLNPGM("Corrected_Z=", measured_z); } + incremental_LSF(&lsf_results, rpos, measured_z); point_num++; } + if (abort_flag) break; zig_zag ^= true; } } @@ -1696,20 +1655,23 @@ void unified_bed_leveling::smart_fill_mesh() { auto normed = [&](const xy_pos_t &pos, const_float_t zadd) { return normal.x * pos.x + normal.y * pos.y + zadd; }; - auto debug_pt = [](FSTR_P const pre, const xy_pos_t &pos, const_float_t zadd) { - d_from(); SERIAL_ECHOF(pre); + auto debug_pt = [](const int num, const xy_pos_t &pos, const_float_t zadd) { + d_from(); DEBUG_ECHOPGM("Point ", num, ":"); DEBUG_ECHO_F(normed(pos, zadd), 6); DEBUG_ECHOLNPAIR_F(" Z error = ", zadd - get_z_correction(pos), 6); }; - debug_pt(F("1st point: "), probe_pt[0], normal.z * z1); - debug_pt(F("2nd point: "), probe_pt[1], normal.z * z2); - debug_pt(F("3rd point: "), probe_pt[2], normal.z * z3); - d_from(); DEBUG_ECHOPGM("safe home with Z="); - DEBUG_ECHOLNPAIR_F("0 : ", normed(safe_homing_xy, 0), 6); - d_from(); DEBUG_ECHOPGM("safe home with Z="); - DEBUG_ECHOLNPAIR_F("mesh value ", normed(safe_homing_xy, get_z_correction(safe_homing_xy)), 6); - DEBUG_ECHOPGM(" Z error = (", Z_SAFE_HOMING_X_POINT, ",", Z_SAFE_HOMING_Y_POINT); - DEBUG_ECHOLNPAIR_F(") = ", get_z_correction(safe_homing_xy), 6); + debug_pt(1, probe_pt[0], normal.z * gotz[0]); + debug_pt(2, probe_pt[1], normal.z * gotz[1]); + debug_pt(3, probe_pt[2], normal.z * gotz[2]); + #if ENABLED(Z_SAFE_HOMING) + constexpr xy_float_t safe_xy = { Z_SAFE_HOMING_X_POINT, Z_SAFE_HOMING_Y_POINT }; + d_from(); DEBUG_ECHOPGM("safe home with Z="); + DEBUG_ECHOLNPAIR_F("0 : ", normed(safe_xy, 0), 6); + d_from(); DEBUG_ECHOPGM("safe home with Z="); + DEBUG_ECHOLNPAIR_F("mesh value ", normed(safe_xy, get_z_correction(safe_xy)), 6); + DEBUG_ECHOPGM(" Z error = (", Z_SAFE_HOMING_X_POINT, ",", Z_SAFE_HOMING_Y_POINT); + DEBUG_ECHOLNPAIR_F(") = ", get_z_correction(safe_xy), 6); + #endif #endif } // DEBUGGING(LEVELING) From ae4fa0ab685f80124a9d183e28c7beae4234edaf Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Fri, 17 Mar 2023 00:22:26 +0000 Subject: [PATCH 032/225] [cron] Bump distribution date (2023-03-17) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 922cdfeeb4..eb0bc31d9f 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-03-16" +//#define STRING_DISTRIBUTION_DATE "2023-03-17" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index a2c451f900..62d7817606 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-03-16" + #define STRING_DISTRIBUTION_DATE "2023-03-17" #endif /** From 89e8257008507821543af8811ab78ef0365b2741 Mon Sep 17 00:00:00 2001 From: jamespearson04 Date: Fri, 17 Mar 2023 01:06:55 +0000 Subject: [PATCH 033/225] =?UTF-8?q?=F0=9F=9A=B8=20Refinements=20for=20UBL?= =?UTF-8?q?=20G29=20J=20(tilt=20mesh)=20(#25486)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration.h | 3 ++ Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp | 45 ++++++++++++++++----- Marlin/src/inc/Conditionals_post.h | 8 ++-- Marlin/src/module/probe.h | 4 ++ buildroot/tests/mega2560 | 3 +- 5 files changed, 47 insertions(+), 16 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 40f4fe4cbd..4d6f64e874 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -2054,6 +2054,9 @@ //#define UBL_HILBERT_CURVE // Use Hilbert distribution for less travel when probing multiple points + //#define UBL_TILT_ON_MESH_POINTS // Use nearest mesh points with G29 J for better Z reference + //#define UBL_TILT_ON_MESH_POINTS_3POINT // Use nearest mesh points with G29 J0 (3-point) + #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 diff --git a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp index e504379848..7b9783bfac 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp @@ -1489,6 +1489,14 @@ void unified_bed_leveling::smart_fill_mesh() { xy_float_t points[3]; probe.get_three_points(points); + #if ENABLED(UBL_TILT_ON_MESH_POINTS_3POINT) + mesh_index_pair cpos[3]; + LOOP_L_N(ix, 3) { // Convert points to coordinates of mesh points + cpos[ix] = find_closest_mesh_point_of_type(REAL, points[ix], true); + points[ix] = cpos[ix].meshpos(); + } + #endif + #if ENABLED(VALIDATE_MESH_TILT) float gotz[3]; // Used for algorithm validation below #endif @@ -1500,7 +1508,7 @@ void unified_bed_leveling::smart_fill_mesh() { measured_z = probe.probe_at_point(points[i], i < 2 ? PROBE_PT_RAISE : PROBE_PT_LAST_STOW, param.V_verbosity); if ((abort_flag = isnan(measured_z))) break; - measured_z -= get_z_correction(points[i]); + measured_z -= TERN(UBL_TILT_ON_MESH_POINTS_3POINT, z_values[cpos[i].pos.x][cpos[i].pos.y], get_z_correction(points[i])); TERN_(VALIDATE_MESH_TILT, gotz[i] = measured_z); if (param.V_verbosity > 3) { serial_spaces(16); SERIAL_ECHOLNPGM("Corrected_Z=", measured_z); } @@ -1518,16 +1526,14 @@ void unified_bed_leveling::smart_fill_mesh() { } else { // !do_3_pt_leveling - #ifdef G29J_MESH_TILT_MARGIN - const float x_min = _MAX(probe.min_x() + (G29J_MESH_TILT_MARGIN), X_MIN_POS), - x_max = _MIN(probe.max_x() - (G29J_MESH_TILT_MARGIN), X_MAX_POS), - y_min = _MAX(probe.min_y() + (G29J_MESH_TILT_MARGIN), Y_MIN_POS), - y_max = _MIN(probe.max_y() - (G29J_MESH_TILT_MARGIN), Y_MAX_POS); - #else - const float x_min = probe.min_x(), x_max = probe.max_x(), - y_min = probe.min_y(), y_max = probe.max_y(); + #ifndef G29J_MESH_TILT_MARGIN + #define G29J_MESH_TILT_MARGIN 0 #endif - const float dx = (x_max - x_min) / (param.J_grid_size - 1), + const float x_min = _MAX((X_MIN_POS) + (G29J_MESH_TILT_MARGIN), MESH_MIN_X, probe.min_x()), + x_max = _MIN((X_MAX_POS) - (G29J_MESH_TILT_MARGIN), MESH_MAX_X, probe.max_x()), + y_min = _MAX((Y_MIN_POS) + (G29J_MESH_TILT_MARGIN), MESH_MIN_Y, probe.min_y()), + y_max = _MIN((Y_MAX_POS) - (G29J_MESH_TILT_MARGIN), MESH_MAX_Y, probe.max_y()), + dx = (x_max - x_min) / (param.J_grid_size - 1), dy = (y_max - y_min) / (param.J_grid_size - 1); bool zig_zag = false; @@ -1541,6 +1547,17 @@ void unified_bed_leveling::smart_fill_mesh() { LOOP_L_N(iy, param.J_grid_size) { rpos.y = y_min + dy * (zig_zag ? param.J_grid_size - 1 - iy : iy); + #if ENABLED(UBL_TILT_ON_MESH_POINTS) + #if ENABLED(DEBUG_LEVELING_FEATURE) + xy_pos_t oldRpos; + if (DEBUGGING(LEVELING)) oldRpos = rpos; + #endif + mesh_index_pair cpos; + rpos -= probe.offset; + cpos = find_closest_mesh_point_of_type(REAL, rpos, true); + rpos = cpos.meshpos(); + #endif + SERIAL_ECHOLNPGM("Tilting mesh point ", point_num, "/", total_points, "\n"); TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT " %i/%i"), GET_TEXT(MSG_LCD_TILTING_MESH), point_num, total_points)); @@ -1548,11 +1565,17 @@ void unified_bed_leveling::smart_fill_mesh() { if ((abort_flag = isnan(measured_z))) break; - const float zcorr = get_z_correction(rpos); + const float zcorr = TERN(UBL_TILT_ON_MESH_POINTS, z_values[cpos.pos.x][cpos.pos.y], get_z_correction(rpos)); #if ENABLED(DEBUG_LEVELING_FEATURE) if (DEBUGGING(LEVELING)) { const xy_pos_t lpos = rpos.asLogical(); + #if ENABLED(UBL_TILT_ON_MESH_POINTS) + const xy_pos_t oldLpos = oldRpos.asLogical(); + DEBUG_ECHOPGM("Calculated point: ("); DEBUG_ECHO_F(oldRpos.x, 7); DEBUG_CHAR(','); DEBUG_ECHO_F(oldRpos.y, 7); + DEBUG_ECHOPAIR_F(") logical: (", oldLpos.x, 7); DEBUG_CHAR(','); DEBUG_ECHO_F(oldLpos.y, 7); + DEBUG_ECHOPGM(")\nSelected mesh point: "); + #endif DEBUG_CHAR('('); DEBUG_ECHO_F(rpos.x, 7); DEBUG_CHAR(','); DEBUG_ECHO_F(rpos.y, 7); DEBUG_ECHOPAIR_F(") logical: (", lpos.x, 7); DEBUG_CHAR(','); DEBUG_ECHO_F(lpos.y, 7); DEBUG_ECHOPAIR_F(") measured: ", measured_z, 7); diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 9305e86594..c41f87c859 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -3156,14 +3156,14 @@ // Probing points may be verified at compile time within the radius // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(PRINTABLE_RADIUS),"bad probe point!") // so that may be added to SanityCheck.h in the future. - #define _MESH_MIN_X (X_MIN_BED + MESH_INSET) - #define _MESH_MIN_Y (Y_MIN_BED + MESH_INSET) + #define _MESH_MIN_X (X_MIN_BED + (MESH_INSET)) + #define _MESH_MIN_Y (Y_MIN_BED + (MESH_INSET)) #define _MESH_MAX_X (X_MAX_BED - (MESH_INSET)) #define _MESH_MAX_Y (Y_MAX_BED - (MESH_INSET)) #else // Boundaries for Cartesian probing based on set limits - #define _MESH_MIN_X (_MAX(X_MIN_BED + MESH_INSET, X_MIN_POS)) // UBL is careful not to probe off the bed. It does not - #define _MESH_MIN_Y (_MAX(Y_MIN_BED + MESH_INSET, Y_MIN_POS)) // need NOZZLE_TO_PROBE_OFFSET in the mesh dimensions + #define _MESH_MIN_X (_MAX(X_MIN_BED + (MESH_INSET), X_MIN_POS)) // UBL is careful not to probe off the bed. It doesn't + #define _MESH_MIN_Y (_MAX(Y_MIN_BED + (MESH_INSET), Y_MIN_POS)) // need NOZZLE_TO_PROBE_OFFSET in the mesh dimensions. #define _MESH_MAX_X (_MIN(X_MAX_BED - (MESH_INSET), X_MAX_POS)) #define _MESH_MAX_Y (_MIN(Y_MAX_BED - (MESH_INSET), Y_MAX_POS)) #endif diff --git a/Marlin/src/module/probe.h b/Marlin/src/module/probe.h index 42b6c4fe41..b50f79ed5d 100644 --- a/Marlin/src/module/probe.h +++ b/Marlin/src/module/probe.h @@ -307,6 +307,10 @@ public: points[0] = xy_float_t({ (X_CENTER) + probe_radius() * COS0, (Y_CENTER) + probe_radius() * SIN0 }); points[1] = xy_float_t({ (X_CENTER) + probe_radius() * COS120, (Y_CENTER) + probe_radius() * SIN120 }); points[2] = xy_float_t({ (X_CENTER) + probe_radius() * COS240, (Y_CENTER) + probe_radius() * SIN240 }); + #elif ENABLED(AUTO_BED_LEVELING_UBL) + points[0] = xy_float_t({ _MAX(MESH_MIN_X, min_x()), _MAX(MESH_MIN_Y, min_y()) }); + points[1] = xy_float_t({ _MIN(MESH_MAX_X, max_x()), _MAX(MESH_MIN_Y, min_y()) }); + points[2] = xy_float_t({ (_MAX(MESH_MIN_X, min_x()) + _MIN(MESH_MAX_X, max_x())) / 2, _MIN(MESH_MAX_Y, max_y()) }); #else points[0] = xy_float_t({ min_x(), min_y() }); points[1] = xy_float_t({ max_x(), min_y() }); diff --git a/buildroot/tests/mega2560 b/buildroot/tests/mega2560 index 363c386a4e..daa9cc2fad 100755 --- a/buildroot/tests/mega2560 +++ b/buildroot/tests/mega2560 @@ -44,7 +44,8 @@ opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO LCD_LANGUAGE jp_kana DEFAULT_EJERK 10 \ opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER LIGHTWEIGHT_UI SHOW_CUSTOM_BOOTSCREEN BOOT_MARLIN_LOGO_SMALL \ SET_PROGRESS_MANUALLY SET_PROGRESS_PERCENT PRINT_PROGRESS_SHOW_DECIMALS SHOW_REMAINING_TIME STATUS_MESSAGE_SCROLLING SCROLL_LONG_FILENAMES \ SDSUPPORT LONG_FILENAME_WRITE_SUPPORT SDCARD_SORT_ALPHA NO_SD_AUTOSTART USB_FLASH_DRIVE_SUPPORT CANCEL_OBJECTS \ - Z_PROBE_SLED AUTO_BED_LEVELING_UBL UBL_HILBERT_CURVE RESTORE_LEVELING_AFTER_G28 DEBUG_LEVELING_FEATURE G26_MESH_VALIDATION ENABLE_LEVELING_FADE_HEIGHT \ + Z_PROBE_SLED AUTO_BED_LEVELING_UBL UBL_HILBERT_CURVE UBL_TILT_ON_MESH_POINTS UBL_TILT_ON_MESH_POINTS_3POINT \ + RESTORE_LEVELING_AFTER_G28 DEBUG_LEVELING_FEATURE G26_MESH_VALIDATION ENABLE_LEVELING_FADE_HEIGHT \ EEPROM_SETTINGS EEPROM_CHITCHAT GCODE_MACROS CUSTOM_MENU_MAIN \ MULTI_NOZZLE_DUPLICATION CLASSIC_JERK LIN_ADVANCE QUICK_HOME \ NANODLP_Z_SYNC I2C_POSITION_ENCODERS M114_DETAIL \ From 6f5b7a8b265066249782cea6485fb9fd3839e424 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sat, 18 Mar 2023 00:21:56 +0000 Subject: [PATCH 034/225] [cron] Bump distribution date (2023-03-18) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index eb0bc31d9f..2938b98713 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-03-17" +//#define STRING_DISTRIBUTION_DATE "2023-03-18" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 62d7817606..df04b198ac 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-03-17" + #define STRING_DISTRIBUTION_DATE "2023-03-18" #endif /** From b5836b243ac9321841daa9380d55b298375aaa2e Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 17 Mar 2023 20:12:36 -0500 Subject: [PATCH 035/225] =?UTF-8?q?=F0=9F=94=A7=20Optional=20MPC=5FAUTOTUN?= =?UTF-8?q?E=20to=20save=205.5=20-=205.8KB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration.h | 1 + Marlin/src/core/language.h | 7 +- Marlin/src/gcode/temp/M306.cpp | 19 ++-- Marlin/src/inc/Conditionals_LCD.h | 4 + Marlin/src/inc/Conditionals_post.h | 2 +- Marlin/src/inc/SanityCheck.h | 4 + Marlin/src/lcd/e3v2/proui/dwin.cpp | 125 ++++++++++++++++----------- Marlin/src/lcd/e3v2/proui/dwin.h | 10 ++- Marlin/src/module/temperature.cpp | 10 +-- Marlin/src/module/temperature.h | 2 +- buildroot/tests/BIGTREE_GTR_V1_0 | 2 +- buildroot/tests/STM32F103RE_creality | 2 +- 12 files changed, 109 insertions(+), 79 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 4d6f64e874..82b107ae44 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -691,6 +691,7 @@ * @section mpctemp */ #if ENABLED(MPCTEMP) + //#define MPC_AUTOTUNE // Include a method to do MPC auto-tuning (~5664-5882 bytes of flash) //#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash) //#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash) diff --git a/Marlin/src/core/language.h b/Marlin/src/core/language.h index d231a7d3e9..bf309293ac 100644 --- a/Marlin/src/core/language.h +++ b/Marlin/src/core/language.h @@ -230,10 +230,9 @@ #define STR_PID_DEBUG_INPUT ": Input " #define STR_PID_DEBUG_OUTPUT " Output " #define STR_INVALID_EXTRUDER_NUM " - Invalid extruder number !" -#define STR_MPC_AUTOTUNE "MPC Autotune" -#define STR_MPC_AUTOTUNE_START " start for " STR_E -#define STR_MPC_AUTOTUNE_INTERRUPTED " interrupted!" -#define STR_MPC_AUTOTUNE_FINISHED " finished! Put the constants below into Configuration.h" +#define STR_MPC_AUTOTUNE_START "MPC Autotune start for " STR_E +#define STR_MPC_AUTOTUNE_INTERRUPTED "MPC Autotune interrupted!" +#define STR_MPC_AUTOTUNE_FINISHED "MPC Autotune finished! Put the constants below into Configuration.h" #define STR_MPC_COOLING_TO_AMBIENT "Cooling to ambient" #define STR_MPC_HEATING_PAST_200 "Heating to over 200C" #define STR_MPC_MEASURING_AMBIENT "Measuring ambient heatloss at " diff --git a/Marlin/src/gcode/temp/M306.cpp b/Marlin/src/gcode/temp/M306.cpp index 928f375c38..d0c005ea4e 100644 --- a/Marlin/src/gcode/temp/M306.cpp +++ b/Marlin/src/gcode/temp/M306.cpp @@ -33,8 +33,6 @@ * * E Extruder index. (Default: Active Extruder) * - * T Autotune the specified or active extruder. - * * Set MPC values manually for the specified or active extruder: * A Ambient heat transfer coefficient (no fan). * C Block heat capacity. @@ -42,6 +40,9 @@ * H Filament heat capacity per mm. * P Heater power. * R Sensor responsiveness (= transfer coefficient / heat capcity). + * + * With MPC_AUTOTUNE: + * T Autotune the specified or active extruder. */ void GcodeSuite::M306() { @@ -51,12 +52,14 @@ void GcodeSuite::M306() { return; } - if (parser.seen_test('T')) { - LCD_MESSAGE(MSG_MPC_AUTOTUNE); - thermalManager.MPC_autotune(e); - ui.reset_status(); - return; - } + #if ENABLED(MPC_AUTOTUNE) + if (parser.seen_test('T')) { + LCD_MESSAGE(MSG_MPC_AUTOTUNE); + thermalManager.MPC_autotune(e); + ui.reset_status(); + return; + } + #endif if (parser.seen("ACFPRH")) { MPC_t &mpc = thermalManager.temp_hotend[e].mpc; diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 0031e17eea..dc9849399c 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -1471,6 +1471,10 @@ #define HAS_PID_DEBUG 1 #endif +#if DISABLED(MPC_AUTOTUNE) + #undef MPC_AUTOTUNE_MENU +#endif + /** * TFT Displays * diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index c41f87c859..a054f90840 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -2499,7 +2499,7 @@ #if EITHER(PIDTEMP, PIDTEMPBED) #define DWIN_PID_TUNE 1 #endif - #if EITHER(DWIN_PID_TUNE, MPCTEMP) && DISABLED(DISABLE_TUNING_GRAPH) + #if EITHER(DWIN_PID_TUNE, MPC_AUTOTUNE) && DISABLED(DISABLE_TUNING_GRAPH) #define SHOW_TUNING_GRAPH 1 #endif #endif diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index a795bfb93f..cd4c4efee2 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -1560,6 +1560,10 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS */ #if BOTH(PIDTEMP, MPCTEMP) #error "Only enable PIDTEMP or MPCTEMP, but not both." + #undef MPCTEMP + #undef MPC_AUTOTUNE + #undef MPC_EDIT_MENU + #undef MPC_AUTOTUNE_MENU #endif #if ENABLED(MPC_INCLUDE_FAN) diff --git a/Marlin/src/lcd/e3v2/proui/dwin.cpp b/Marlin/src/lcd/e3v2/proui/dwin.cpp index 6be56b0ded..b0d1fb3ff6 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/proui/dwin.cpp @@ -266,7 +266,7 @@ MenuClass *MaxAccelMenu = nullptr; MenuClass *MaxJerkMenu = nullptr; #endif MenuClass *StepsMenu = nullptr; -#if ENABLED(MPCTEMP) +#if EITHER(MPC_EDIT_MENU, MPC_AUTOTUNE_MENU) MenuClass *HotendMPCMenu = nullptr; #endif #if ENABLED(PIDTEMP) @@ -1480,46 +1480,59 @@ void DWIN_LevelingDone() { DWINUI::ClearMainArea(); Draw_Popup_Bkgd(); - #if ENABLED(MPCTEMP) + switch (HMI_value.pidresult) { + default: return; + #if ENABLED(MPC_AUTOTUNE) + case MPCTEMP_START: + DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 100, GET_TEXT_F(MSG_MPC_AUTOTUNE)); + DWINUI::Draw_String(HMI_data.PopupTxt_Color, gfrm.x, gfrm.y - DWINUI::fontHeight() - 4, F("MPC target: Celsius")); + break; + #endif + #if EITHER(PIDTEMP, PIDTEMPBED) + TERN_(PIDTEMP, case PIDTEMP_START:) + TERN_(PIDTEMPBED, case PIDTEMPBED_START:) + DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 100, GET_TEXT_F(MSG_PID_AUTOTUNE)); + DWINUI::Draw_String(HMI_data.PopupTxt_Color, gfrm.x, gfrm.y - DWINUI::fontHeight() - 4, F("PID target: Celsius")); + break; + #endif + } - switch (HMI_value.pidresult) { + switch (HMI_value.pidresult) { + default: break; + #if EITHER(PIDTEMP, MPC_AUTOTUNE) + TERN_(PIDTEMP, case PIDTEMP_START:) + TERN_(MPC_AUTOTUNE, case MPCTEMP_START:) + DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 120, F("for Nozzle is running.")); + break; + #endif + #if ENABLED(PIDTEMPBED) + case PIDTEMPBED_START: + DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 120, F("for BED is running.")); + break; + #endif + } + + switch (HMI_value.pidresult) { + default: break; + #if ENABLED(MPC_AUTOTUNE) case MPCTEMP_START: _maxtemp = thermalManager.hotend_maxtemp[0]; _target = 200; - DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 100, GET_TEXT_F(MSG_MPC_AUTOTUNE)); - DWINUI::Draw_String(HMI_data.PopupTxt_Color, gfrm.x, gfrm.y - DWINUI::fontHeight() - 4, F("MPC target: Celsius")); - DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 120, F("for Nozzle is running.")); break; - case PIDTEMPBED_START: - _maxtemp = BED_MAXTEMP; - _target = HMI_data.BedPidT; - DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 100, GET_TEXT_F(MSG_PID_AUTOTUNE)); - DWINUI::Draw_String(HMI_data.PopupTxt_Color, gfrm.x, gfrm.y - DWINUI::fontHeight() - 4, F("PID target: Celsius")); - DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 120, F("for BED is running.")); - break; - default: return; - } - - #else // PID - - DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 100, GET_TEXT_F(MSG_PID_AUTOTUNE)); - DWINUI::Draw_String(HMI_data.PopupTxt_Color, gfrm.x, gfrm.y - DWINUI::fontHeight() - 4, F("PID target: Celsius")); - - switch (HMI_value.pidresult) { + #endif + #if ENABLED(PIDTEMP) case PIDTEMP_START: _maxtemp = thermalManager.hotend_maxtemp[0]; _target = HMI_data.HotendPidT; - DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 120, F("for Nozzle is running.")); break; + #endif + #if ENABLED(PIDTEMPBED) case PIDTEMPBED_START: _maxtemp = BED_MAXTEMP; _target = HMI_data.BedPidT; - DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 120, F("for BED is running.")); break; - default: return; - } - - #endif // PID + #endif + } plot.Draw(gfrm, _maxtemp, _target); DWINUI::Draw_Int(HMI_data.PopupTxt_Color, 3, gfrm.x + 90, gfrm.y - DWINUI::fontHeight() - 4, _target); @@ -1587,7 +1600,7 @@ void DWIN_LevelingDone() { #endif // DWIN_PID_TUNE -#if ENABLED(MPCTEMP) +#if ENABLED(MPC_AUTOTUNE) void DWIN_MPCTuning(tempcontrol_t result) { HMI_value.pidresult = result; @@ -1607,7 +1620,7 @@ void DWIN_LevelingDone() { break; case MPC_INTERRUPTED: checkkey = last_checkkey; - DWIN_Popup_Confirm(ICON_TempTooHigh, GET_TEXT_F(MSG_ERROR), F(STR_MPC_AUTOTUNE STR_MPC_AUTOTUNE_INTERRUPTED)); + DWIN_Popup_Confirm(ICON_TempTooHigh, GET_TEXT_F(MSG_ERROR), F(STR_MPC_AUTOTUNE_INTERRUPTED)); ui.reset_alert_level(); break; case MPC_DONE: @@ -1622,7 +1635,7 @@ void DWIN_LevelingDone() { } } -#endif // MPCTEMP +#endif // MPC_AUTOTUNE // Started a Print Job void DWIN_Print_Started() { @@ -3090,8 +3103,8 @@ void Draw_AdvancedSettings_Menu() { #if ENABLED(PIDTEMP) MENU_ITEM_F(ICON_PIDNozzle, STR_HOTEND_PID " Settings", onDrawSubMenu, Draw_HotendPID_Menu); #endif - #if ENABLED(MPCTEMP) - MENU_ITEM_F(ICON_MPCNozzle, STR_MPC_AUTOTUNE " Settings", onDrawSubMenu, Draw_HotendMPC_Menu); + #if EITHER(MPC_EDIT_MENU, MPC_AUTOTUNE_MENU) + MENU_ITEM_F(ICON_MPCNozzle, "MPC Settings", onDrawSubMenu, Draw_HotendMPC_Menu); #endif #if ENABLED(PIDTEMPBED) MENU_ITEM_F(ICON_PIDBed, STR_BED_PID " Settings", onDrawSubMenu, Draw_BedPID_Menu); @@ -3524,37 +3537,45 @@ void Draw_Steps_Menu() { #endif -#if ENABLED(MPCTEMP) +#if EITHER(MPC_EDIT_MENU, MPC_AUTOTUNE_MENU) - void HotendMPC() { thermalManager.MPC_autotune(active_extruder); } - void SetHeaterPower() { SetPFloatOnClick(1, 200, 1); } - void SetBlkHeatCapacity() { SetPFloatOnClick(0, 40, 2); } - void SetSensorRespons() { SetPFloatOnClick(0, 1, 4); } - void SetAmbientXfer() { SetPFloatOnClick(0, 1, 4); } - #if ENABLED(MPC_INCLUDE_FAN) - void onDrawFanAdj(MenuItemClass* menuitem, int8_t line) { onDrawFloatMenu(menuitem, line, 4, thermalManager.temp_hotend[0].fanCoefficient()); } - void ApplyFanAdj() { thermalManager.temp_hotend[0].applyFanAdjustment(MenuData.Value / POW(10, 4)); } - void SetFanAdj() { SetFloatOnClick(0, 1, 4, thermalManager.temp_hotend[0].fanCoefficient(), ApplyFanAdj); } + #if ENABLED(MPC_AUTOTUNE_MENU) + void HotendMPC() { thermalManager.MPC_autotune(active_extruder); } + #endif + #if ENABLED(MPC_EDIT_MENU) + void SetHeaterPower() { SetPFloatOnClick(1, 200, 1); } + void SetBlkHeatCapacity() { SetPFloatOnClick(0, 40, 2); } + void SetSensorResponse() { SetPFloatOnClick(0, 1, 4); } + void SetAmbientXfer() { SetPFloatOnClick(0, 1, 4); } + #if ENABLED(MPC_INCLUDE_FAN) + void onDrawFanAdj(MenuItemClass* menuitem, int8_t line) { onDrawFloatMenu(menuitem, line, 4, thermalManager.temp_hotend[0].fanCoefficient()); } + void ApplyFanAdj() { thermalManager.temp_hotend[0].applyFanAdjustment(MenuData.Value / POW(10, 4)); } + void SetFanAdj() { SetFloatOnClick(0, 1, 4, thermalManager.temp_hotend[0].fanCoefficient(), ApplyFanAdj); } + #endif #endif void Draw_HotendMPC_Menu() { checkkey = Menu; - if (SET_MENU_F(HotendMPCMenu, STR_MPC_AUTOTUNE " Settings", 7)) { + if (SET_MENU_F(HotendMPCMenu, "MPC Settings", 7)) { MPC_t &mpc = thermalManager.temp_hotend[0].mpc; BACK_ITEM(Draw_AdvancedSettings_Menu); - MENU_ITEM(ICON_MPCNozzle, MSG_MPC_AUTOTUNE, onDrawMenuItem, HotendMPC); - EDIT_ITEM(ICON_MPCHeater, MSG_MPC_POWER, onDrawPFloatMenu, SetHeaterPower, &mpc.heater_power); - EDIT_ITEM(ICON_MPCHeatCap, MSG_MPC_BLOCK_HEAT_CAPACITY, onDrawPFloat2Menu, SetBlkHeatCapacity, &mpc.block_heat_capacity); - EDIT_ITEM(ICON_MPCValue, MSG_SENSOR_RESPONSIVENESS, onDrawPFloat4Menu, SetSensorRespons, &mpc.sensor_responsiveness); - EDIT_ITEM(ICON_MPCValue, MSG_MPC_AMBIENT_XFER_COEFF, onDrawPFloat4Menu, SetAmbientXfer, &mpc.ambient_xfer_coeff_fan0); - #if ENABLED(MPC_INCLUDE_FAN) - EDIT_ITEM(ICON_MPCFan, MSG_MPC_AMBIENT_XFER_COEFF_FAN, onDrawFanAdj, SetFanAdj, &mpc.fan255_adjustment); + #if ENABLED(MPC_AUTOTUNE_MENU) + MENU_ITEM(ICON_MPCNozzle, MSG_MPC_AUTOTUNE, onDrawMenuItem, HotendMPC); + #endif + #if ENABLED(MPC_EDIT_MENU) + EDIT_ITEM(ICON_MPCHeater, MSG_MPC_POWER, onDrawPFloatMenu, SetHeaterPower, &mpc.heater_power); + EDIT_ITEM(ICON_MPCHeatCap, MSG_MPC_BLOCK_HEAT_CAPACITY, onDrawPFloat2Menu, SetBlkHeatCapacity, &mpc.block_heat_capacity); + EDIT_ITEM(ICON_MPCValue, MSG_SENSOR_RESPONSIVENESS, onDrawPFloat4Menu, SetSensorResponse, &mpc.sensor_responsiveness); + EDIT_ITEM(ICON_MPCValue, MSG_MPC_AMBIENT_XFER_COEFF, onDrawPFloat4Menu, SetAmbientXfer, &mpc.ambient_xfer_coeff_fan0); + #if ENABLED(MPC_INCLUDE_FAN) + EDIT_ITEM(ICON_MPCFan, MSG_MPC_AMBIENT_XFER_COEFF_FAN, onDrawFanAdj, SetFanAdj, &mpc.fan255_adjustment); + #endif #endif } UpdateMenu(HotendMPCMenu); } -#endif // MPCTEMP +#endif // MPC_EDIT_MENU || MPC_AUTOTUNE_MENU #if ENABLED(PIDTEMPBED) diff --git a/Marlin/src/lcd/e3v2/proui/dwin.h b/Marlin/src/lcd/e3v2/proui/dwin.h index 112df5cae1..4197da4390 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.h +++ b/Marlin/src/lcd/e3v2/proui/dwin.h @@ -74,7 +74,7 @@ enum processID : uint8_t { NothingToDo }; -#if EITHER(DWIN_PID_TUNE, MPCTEMP) +#if EITHER(DWIN_PID_TUNE, MPC_AUTOTUNE) enum tempcontrol_t : uint8_t { #if DWIN_PID_TUNE @@ -85,7 +85,7 @@ enum processID : uint8_t { PID_TEMP_TOO_HIGH, PID_TUNING_TIMEOUT, #endif - #if ENABLED(MPCTEMP) + #if ENABLED(MPC_AUTOTUNE) MPC_DONE, MPCTEMP_START, MPC_TEMP_ERROR, @@ -384,7 +384,9 @@ void Draw_Steps_Menu(); #endif // MPC -#if ENABLED(MPCTEMP) - void DWIN_MPCTuning(tempcontrol_t result); +#if EITHER(MPC_EDIT_MENU, MPC_AUTOTUNE_MENU) void Draw_HotendMPC_Menu(); #endif +#if ENABLED(MPC_AUTOTUNE) + void DWIN_MPCTuning(tempcontrol_t result); +#endif diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index b572690256..bc978077f0 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -580,7 +580,6 @@ PGMSTR(str_t_heating_failed, STR_T_HEATING_FAILED); volatile bool Temperature::raw_temps_ready = false; - #if ENABLED(MPCTEMP) int32_t Temperature::mpc_e_position; // = 0 #endif @@ -925,7 +924,7 @@ volatile bool Temperature::raw_temps_ready = false; #endif // HAS_PID_HEATING -#if ENABLED(MPCTEMP) +#if ENABLED(MPC_AUTOTUNE) #if EITHER(MPC_FAN_0_ALL_HOTENDS, MPC_FAN_0_ACTIVE_HOTEND) #define SINGLEFAN 1 @@ -951,7 +950,6 @@ volatile bool Temperature::raw_temps_ready = false; TERN(DWIN_CREALITY_LCD, DWIN_Update(), ui.update()); if (!wait_for_heatup) { - SERIAL_ECHOPGM(STR_MPC_AUTOTUNE); SERIAL_ECHOLNPGM(STR_MPC_AUTOTUNE_INTERRUPTED); TERN_(DWIN_LCD_PROUI, DWIN_MPCTuning(MPC_INTERRUPTED)); return true; @@ -981,7 +979,6 @@ volatile bool Temperature::raw_temps_ready = false; } } on_exit(e); - SERIAL_ECHOPGM(STR_MPC_AUTOTUNE); SERIAL_ECHOLNPGM(STR_MPC_AUTOTUNE_START, e); MPCHeaterInfo &hotend = temp_hotend[e]; MPC_t &mpc = hotend.mpc; @@ -1150,7 +1147,6 @@ volatile bool Temperature::raw_temps_ready = false; mpc.block_heat_capacity = mpc.ambient_xfer_coeff_fan0 / block_responsiveness; mpc.sensor_responsiveness = block_responsiveness / (1.0f - (ambient_temp - asymp_temp) * exp(-block_responsiveness * t1_time) / (t1 - asymp_temp)); - SERIAL_ECHOPGM(STR_MPC_AUTOTUNE); SERIAL_ECHOLNPGM(STR_MPC_AUTOTUNE_FINISHED); TERN_(DWIN_LCD_PROUI, DWIN_MPCTuning(MPC_DONE)); @@ -1171,7 +1167,7 @@ volatile bool Temperature::raw_temps_ready = false; TERN_(HAS_FAN, SERIAL_ECHOLNPAIR_F("MPC_AMBIENT_XFER_COEFF_FAN255 ", ambient_xfer_coeff_fan255, 4)); } -#endif // MPCTEMP +#endif // MPC_AUTOTUNE int16_t Temperature::getHeaterPower(const heater_id_t heater_id) { switch (heater_id) { @@ -1509,7 +1505,7 @@ void Temperature::mintemp_error(const heater_id_t heater_id) { const int32_t e_position = stepper.position(E_AXIS); const float e_speed = (e_position - mpc_e_position) * planner.mm_per_step[E_AXIS] / MPC_dT; - // The position can appear to make big jumps when, e.g. homing + // The position can appear to make big jumps when, e.g., homing if (fabs(e_speed) > planner.settings.max_feedrate_mm_s[E_AXIS]) mpc_e_position = e_position; else if (e_speed > 0.0f) { // Ignore retract/recover moves diff --git a/Marlin/src/module/temperature.h b/Marlin/src/module/temperature.h index b7f388cbb6..4178973a9d 100644 --- a/Marlin/src/module/temperature.h +++ b/Marlin/src/module/temperature.h @@ -1194,7 +1194,7 @@ class Temperature { #endif - #if ENABLED(MPCTEMP) + #if ENABLED(MPC_AUTOTUNE) void MPC_autotune(const uint8_t e); #endif diff --git a/buildroot/tests/BIGTREE_GTR_V1_0 b/buildroot/tests/BIGTREE_GTR_V1_0 index e0769b6a10..8f69f5b069 100755 --- a/buildroot/tests/BIGTREE_GTR_V1_0 +++ b/buildroot/tests/BIGTREE_GTR_V1_0 @@ -40,7 +40,7 @@ opt_set MOTHERBOARD BOARD_BTT_GTR_V1_0 SERIAL_PORT -1 \ MPC_AMBIENT_XFER_COEFF '{ 0.068f, 0.068f, 0.068f }' \ MPC_AMBIENT_XFER_COEFF_FAN255 '{ 0.097f, 0.097f, 0.097f }' \ FILAMENT_HEAT_CAPACITY_PERMM '{ 5.6e-3f, 3.6e-3f, 5.6e-3f }' -opt_enable SWITCHING_TOOLHEAD TOOL_SENSOR MPCTEMP MPC_EDIT_MENU MPC_AUTOTUNE_MENU +opt_enable SWITCHING_TOOLHEAD TOOL_SENSOR MPCTEMP MPC_EDIT_MENU MPC_AUTOTUNE MPC_AUTOTUNE_MENU opt_disable PIDTEMP exec_test $1 $2 "BigTreeTech GTR | MPC | Switching Toolhead | Tool Sensors" "$3" diff --git a/buildroot/tests/STM32F103RE_creality b/buildroot/tests/STM32F103RE_creality index 8910db0017..a05f1d96be 100755 --- a/buildroot/tests/STM32F103RE_creality +++ b/buildroot/tests/STM32F103RE_creality @@ -28,7 +28,7 @@ opt_set PREHEAT_3_LABEL '"CUSTOM"' PREHEAT_3_TEMP_HOTEND 240 PREHEAT_3_TEMP_BED exec_test $1 $2 "Ender-3 S1 with ProUI (PIDTEMP)" "$3" opt_disable PIDTEMP -opt_enable MPCTEMP +opt_enable MPCTEMP MPC_AUTOTUNE exec_test $1 $2 "Ender-3 S1 with ProUI (MPCTEMP)" "$3" restore_configs From c914761327077cb0e715171bd0fd5db741eafeb9 Mon Sep 17 00:00:00 2001 From: Michael Hill Date: Sat, 18 Mar 2023 01:56:07 -0400 Subject: [PATCH 036/225] =?UTF-8?q?=E2=9C=A8=20Sovol=20v1.3.1=20(Sovol=20S?= =?UTF-8?q?V06)=20(#25267)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/core/boards.h | 1 + Marlin/src/inc/Warnings.cpp | 7 + Marlin/src/pins/pins.h | 2 + Marlin/src/pins/stm32f1/pins_CREALITY_V4.h | 1 + Marlin/src/pins/stm32f1/pins_SOVOL_V131.h | 236 ++++++++++++++++++ buildroot/share/PlatformIO/ldscripts/sovol.ld | 14 ++ ini/stm32f1-maple.ini | 14 ++ 7 files changed, 275 insertions(+) create mode 100644 Marlin/src/pins/stm32f1/pins_SOVOL_V131.h create mode 100644 buildroot/share/PlatformIO/ldscripts/sovol.ld diff --git a/Marlin/src/core/boards.h b/Marlin/src/core/boards.h index f861e8864f..8a1cec714e 100644 --- a/Marlin/src/core/boards.h +++ b/Marlin/src/core/boards.h @@ -381,6 +381,7 @@ #define BOARD_ZONESTAR_ZM3E4V2 5064 // Zonestar ZM3E4 V2 (STM32F103VC) #define BOARD_ERYONE_ERY32_MINI 5065 // Eryone Ery32 mini (STM32F103VE) #define BOARD_PANDA_PI_V29 5066 // Panda Pi V2.9 - Standalone (STM32F103RC) +#define BOARD_SOVOL_V131 5067 // Sovol V1.3.1 (GD32F103RET6) // // ARM Cortex-M4F diff --git a/Marlin/src/inc/Warnings.cpp b/Marlin/src/inc/Warnings.cpp index 184d1a08da..55b9a18e77 100644 --- a/Marlin/src/inc/Warnings.cpp +++ b/Marlin/src/inc/Warnings.cpp @@ -777,6 +777,13 @@ #warning "Define MK3_FAN_PINS to swap hotend and part cooling fan pins. (Define NO_MK3_FAN_PINS_WARNING to suppress this warning.)" #endif +/** + * GD32 is not exactly like STM32 + */ +#if MB(SOVOL_V131) + #warning "GD32 based controllers may not be fully compatible with Maple Generic STM32F103RE. Please report any issues." +#endif + /** * BD Sensor should always include BABYSTEPPING */ diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index 721e037b8c..6269eecb0b 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -627,6 +627,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(SOVOL_V131) + #include "stm32f1/pins_SOVOL_V131.h" // GD32F1 env:GD32F103RET6_sovol_maple // // ARM Cortex-M4F diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h index f633ee0983..7c4df3520c 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h @@ -53,6 +53,7 @@ #if NO_EEPROM_SELECTED #define IIC_BL24CXX_EEPROM // EEPROM on I2C-0 //#define SDCARD_EEPROM_EMULATION + #undef NO_EEPROM_SELECTED #endif #if ENABLED(IIC_BL24CXX_EEPROM) diff --git a/Marlin/src/pins/stm32f1/pins_SOVOL_V131.h b/Marlin/src/pins/stm32f1/pins_SOVOL_V131.h new file mode 100644 index 0000000000..67b2944f45 --- /dev/null +++ b/Marlin/src/pins/stm32f1/pins_SOVOL_V131.h @@ -0,0 +1,236 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2023 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 + +/** + * Sovol 1.3.1 (GD32F103RET6) board pin assignments + */ + +#include "env_validate.h" + +#if HOTENDS > 1 || E_STEPPERS > 1 + #error "SOVOL V131 only supports 1 hotend / E-stepper." +#endif + +#ifndef BOARD_INFO_NAME + #define BOARD_INFO_NAME "Sovol V131" +#endif +#ifndef DEFAULT_MACHINE_NAME + #define DEFAULT_MACHINE_NAME "Sovol SV06" +#endif + +//#define BOARD_NO_NATIVE_USB + +// +// Release PB4 (Y_ENABLE_PIN) from JTAG NRST role +// +#ifndef DISABLE_DEBUG + #define DISABLE_DEBUG +#endif + +// +// EEPROM +// +#if NO_EEPROM_SELECTED + #define IIC_BL24CXX_EEPROM // EEPROM on I2C-0 + //#define SDCARD_EEPROM_EMULATION + #undef NO_EEPROM_SELECTED +#endif + +#if ENABLED(IIC_BL24CXX_EEPROM) + #define IIC_EEPROM_SDA PA11 + #define IIC_EEPROM_SCL PA12 + #define MARLIN_EEPROM_SIZE 0x800 // 2K (24C16) +#elif ENABLED(SDCARD_EEPROM_EMULATION) + #define MARLIN_EEPROM_SIZE 0x800 // 2K +#endif + +// +// Servos +// +#ifndef SERVO0_PIN + #ifndef HAS_PIN_27_BOARD + #define SERVO0_PIN PB0 // BLTouch OUT + #else + #define SERVO0_PIN PC6 + #endif +#endif + +// +// Limit Switches +// +#ifndef X_STOP_PIN + #define X_STOP_PIN PA5 +#endif +#ifndef Y_STOP_PIN + #define Y_STOP_PIN PA6 +#endif +#ifndef Z_STOP_PIN + #define Z_STOP_PIN PA7 +#endif + +#ifndef Z_MIN_PROBE_PIN + #define Z_MIN_PROBE_PIN PB1 // BLTouch IN +#endif + +// +// Filament Runout Sensor +// +#ifndef FIL_RUNOUT_PIN + #define FIL_RUNOUT_PIN PA4 // "Pulled-high" +#endif + +// +// Steppers +// +#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 // Shared + +#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 + +#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 + +#ifndef E0_STEP_PIN + #define E0_STEP_PIN PB4 +#endif +#ifndef E0_DIR_PIN + #define E0_DIR_PIN PB3 +#endif +#define E0_ENABLE_PIN X_ENABLE_PIN + +#if HAS_TMC_UART + + /** + * TMC2208/TMC2209 stepper drivers + * + * Hardware serial communication ports. + * If undefined software serial is used according to the pins below + */ + + #define X_SERIAL_TX_PIN PC1 + #define X_SERIAL_RX_PIN PC1 + + #define Y_SERIAL_TX_PIN PC0 + #define Y_SERIAL_RX_PIN PC0 + + #define Z_SERIAL_TX_PIN PA15 + #define Z_SERIAL_RX_PIN PA15 + + #define E0_SERIAL_TX_PIN PC14 + #define E0_SERIAL_RX_PIN PC14 + + // Reduce baud rate to improve software serial reliability + #define TMC_BAUD_RATE 19200 + +#endif // HAS_TMC_UART + +// +// Temperature Sensors +// +#define TEMP_0_PIN PC5 // TH1 +#define TEMP_BED_PIN PC4 // TB1 + +// +// Heaters / Fans +// +#ifndef HEATER_0_PIN + #define HEATER_0_PIN PA1 // HEATER1 +#endif +#ifndef HEATER_BED_PIN + #define HEATER_BED_PIN PA2 // HOT BED +#endif +#ifndef FAN_PIN + #define FAN_PIN PA0 // FAN +#endif +#define FAN_SOFT_PWM_REQUIRED + +// +// SD Card +// +#define SD_DETECT_PIN PC7 +#define SDCARD_CONNECTION ONBOARD +#define ONBOARD_SPI_DEVICE 1 +#define ONBOARD_SD_CS_PIN PA4 // 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 | 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 +#endif + +#if ENABLED(CR10_STOCKDISPLAY) + + #if ENABLED(RET6_12864_LCD) + + #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 + + #ifndef HAS_PIN_27_BOARD + #define BEEPER_PIN EXP3_01_PIN + #endif + + #else + + #error "Only the RET6_12864_LCD variant of CR10_STOCKDISPLAY is supported." + + #endif + +#endif diff --git a/buildroot/share/PlatformIO/ldscripts/sovol.ld b/buildroot/share/PlatformIO/ldscripts/sovol.ld new file mode 100644 index 0000000000..785345543c --- /dev/null +++ b/buildroot/share/PlatformIO/ldscripts/sovol.ld @@ -0,0 +1,14 @@ +MEMORY +{ + ram (rwx) : ORIGIN = 0x20000000, LENGTH = 64K - 40 + rom (rx) : ORIGIN = 0x08007000, LENGTH = 512K - 28K +} + +/* Provide memory region aliases for common.inc */ +REGION_ALIAS("REGION_TEXT", rom); +REGION_ALIAS("REGION_DATA", ram); +REGION_ALIAS("REGION_BSS", ram); +REGION_ALIAS("REGION_RODATA", rom); + +/* Let common.inc handle the real work. */ +INCLUDE common.inc diff --git a/ini/stm32f1-maple.ini b/ini/stm32f1-maple.ini index be7966be9d..e223bdb4eb 100644 --- a/ini/stm32f1-maple.ini +++ b/ini/stm32f1-maple.ini @@ -392,3 +392,17 @@ board_build.variant = MARLIN_F103Vx board_build.ldscript = eryone_ery32_mini.ld board_build.address = 0x08004000 build_unflags = ${STM32F1_maple.build_unflags} + +# +# Sovol (GD32F103RET6) +# +[env:GD32F103RET6_sovol_maple] +extends = env:STM32F103RE_maple +build_flags = ${STM32F1_maple.build_flags} -DTEMP_TIMER_CHAN=4 +board_build.address = 0x08007000 +board_build.ldscript = sovol.ld +extra_scripts = ${STM32F1_maple.extra_scripts} + pre:buildroot/share/PlatformIO/scripts/random-bin.py + buildroot/share/PlatformIO/scripts/custom_board.py +debug_tool = jlink +upload_protocol = jlink From f50603ff1d380f759addffd2e54ac008ebec5985 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 18 Mar 2023 01:22:50 -0500 Subject: [PATCH 037/225] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Mor?= =?UTF-8?q?e=20IntelliSense-friendly=20declares?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/module/temperature.cpp | 16 ++++++++++++---- Marlin/src/module/temperature.h | 14 +++++++++----- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index bc978077f0..bafade45dd 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -508,8 +508,12 @@ PGMSTR(str_t_heating_failed, STR_T_HEATING_FAILED); // Init min and max temp with extreme values to prevent false errors during startup raw_adc_t Temperature::mintemp_raw_BED = TEMP_SENSOR_BED_RAW_LO_TEMP, Temperature::maxtemp_raw_BED = TEMP_SENSOR_BED_RAW_HI_TEMP; - TERN_(WATCH_BED, bed_watch_t Temperature::watch_bed); // = { 0 } - IF_DISABLED(PIDTEMPBED, millis_t Temperature::next_bed_check_ms); + #if WATCH_BED + bed_watch_t Temperature::watch_bed; // = { 0 } + #endif + #if DISABLED(PIDTEMPBED) + millis_t Temperature::next_bed_check_ms; + #endif #endif #if HAS_TEMP_CHAMBER @@ -519,8 +523,12 @@ PGMSTR(str_t_heating_failed, STR_T_HEATING_FAILED); celsius_float_t old_temp = 9999; raw_adc_t Temperature::mintemp_raw_CHAMBER = TEMP_SENSOR_CHAMBER_RAW_LO_TEMP, Temperature::maxtemp_raw_CHAMBER = TEMP_SENSOR_CHAMBER_RAW_HI_TEMP; - TERN_(WATCH_CHAMBER, chamber_watch_t Temperature::watch_chamber{0}); - IF_DISABLED(PIDTEMPCHAMBER, millis_t Temperature::next_chamber_check_ms); + #if WATCH_CHAMBER + chamber_watch_t Temperature::watch_chamber; // = { 0 } + #endif + #if DISABLED(PIDTEMPCHAMBER) + millis_t Temperature::next_chamber_check_ms; + #endif #endif #endif diff --git a/Marlin/src/module/temperature.h b/Marlin/src/module/temperature.h index 4178973a9d..b8bf03bf31 100644 --- a/Marlin/src/module/temperature.h +++ b/Marlin/src/module/temperature.h @@ -725,23 +725,27 @@ class Temperature { #endif #if HAS_HEATED_BED - #if ENABLED(WATCH_BED) + #if WATCH_BED static bed_watch_t watch_bed; #endif - IF_DISABLED(PIDTEMPBED, static millis_t next_bed_check_ms); + #if DISABLED(PIDTEMPBED) + static millis_t next_bed_check_ms; + #endif static raw_adc_t mintemp_raw_BED, maxtemp_raw_BED; #endif #if HAS_HEATED_CHAMBER - #if ENABLED(WATCH_CHAMBER) + #if WATCH_CHAMBER static chamber_watch_t watch_chamber; #endif - TERN(PIDTEMPCHAMBER,,static millis_t next_chamber_check_ms); + #if DISABLED(PIDTEMPCHAMBER) + static millis_t next_chamber_check_ms; + #endif static raw_adc_t mintemp_raw_CHAMBER, maxtemp_raw_CHAMBER; #endif #if HAS_COOLER - #if ENABLED(WATCH_COOLER) + #if WATCH_COOLER static cooler_watch_t watch_cooler; #endif static millis_t next_cooler_check_ms, cooler_fan_flush_ms; From ce97e42aa0a385f52fc5814595274241f73184a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davide=20Rombol=C3=A0?= Date: Sat, 18 Mar 2023 07:33:57 +0100 Subject: [PATCH 038/225] =?UTF-8?q?=F0=9F=8E=A8=20Clean=20up=20IA=5FCREALI?= =?UTF-8?q?TY=20includes=20(#25530)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/extui/ia_creality/FileNavigator.cpp | 6 +----- Marlin/src/lcd/extui/ia_creality/FileNavigator.h | 3 --- Marlin/src/lcd/extui/ia_creality/creality_extui.cpp | 10 +--------- .../{creality_extui.h => ia_creality_extui.h} | 3 +-- 4 files changed, 3 insertions(+), 19 deletions(-) rename Marlin/src/lcd/extui/ia_creality/{creality_extui.h => ia_creality_extui.h} (99%) diff --git a/Marlin/src/lcd/extui/ia_creality/FileNavigator.cpp b/Marlin/src/lcd/extui/ia_creality/FileNavigator.cpp index 448d078cc4..4e2d294a9b 100644 --- a/Marlin/src/lcd/extui/ia_creality/FileNavigator.cpp +++ b/Marlin/src/lcd/extui/ia_creality/FileNavigator.cpp @@ -33,13 +33,11 @@ #if DGUS_LCD_UI_IA_CREALITY +#include "ia_creality_extui.h" #include "FileNavigator.h" using namespace ExtUI; -#define DEBUG_OUT ENABLED(DEBUG_DWIN) -#include "../../../core/debug_out.h" - FileList FileNavigator::filelist; // Instance of the Marlin file API char FileNavigator::currentfoldername[MAX_PATH_LEN]; // Current folder path uint16_t FileNavigator::lastindex; @@ -124,8 +122,6 @@ void FileNavigator::getFiles(uint16_t index) { const int filelen = strlen(filelist.filename()); if (filelen > 20) { char *buf = (char *)filelist.filename(); - //char buf[filelen]; - //strcpy(&buf[filelen], filelist.filename()); buf[18] = '\0'; // cutoff at screen edge rtscheck.RTS_SndData(buf, (SDFILE_ADDR + (fcnt * 20))); } diff --git a/Marlin/src/lcd/extui/ia_creality/FileNavigator.h b/Marlin/src/lcd/extui/ia_creality/FileNavigator.h index 29f5628455..28d97c6746 100644 --- a/Marlin/src/lcd/extui/ia_creality/FileNavigator.h +++ b/Marlin/src/lcd/extui/ia_creality/FileNavigator.h @@ -30,9 +30,6 @@ * Written by Insanity Automation * ***************************************/ -#include "creality_extui.h" -#include "../ui_api.h" - #define MAX_FOLDER_DEPTH 4 // Limit folder depth TFT has a limit for the file path #define MAX_CMND_LEN 16 * MAX_FOLDER_DEPTH // Maximum Length for a Panel command #define MAX_PATH_LEN 16 * MAX_FOLDER_DEPTH // Maximum number of characters in a SD file path diff --git a/Marlin/src/lcd/extui/ia_creality/creality_extui.cpp b/Marlin/src/lcd/extui/ia_creality/creality_extui.cpp index 15dcd84bb9..c9c064fdc8 100644 --- a/Marlin/src/lcd/extui/ia_creality/creality_extui.cpp +++ b/Marlin/src/lcd/extui/ia_creality/creality_extui.cpp @@ -34,16 +34,8 @@ #if DGUS_LCD_UI_IA_CREALITY -#include "creality_extui.h" +#include "ia_creality_extui.h" #include "FileNavigator.h" -#include "../ui_api.h" - -#include -#include -#include - -#define DEBUG_OUT ENABLED(DEBUG_DWIN) -#include "../../../core/debug_out.h" namespace ExtUI { static uint16_t fileIndex = 0; diff --git a/Marlin/src/lcd/extui/ia_creality/creality_extui.h b/Marlin/src/lcd/extui/ia_creality/ia_creality_extui.h similarity index 99% rename from Marlin/src/lcd/extui/ia_creality/creality_extui.h rename to Marlin/src/lcd/extui/ia_creality/ia_creality_extui.h index 099f8c238a..0d93255663 100644 --- a/Marlin/src/lcd/extui/ia_creality/creality_extui.h +++ b/Marlin/src/lcd/extui/ia_creality/ia_creality_extui.h @@ -22,7 +22,7 @@ #pragma once /* **************************************** - * lcd/extui/ia_creality/creality_extui.h + * lcd/extui/ia_creality/ia_creality_extui.h * **************************************** * Extensible_UI implementation for Creality DWIN * 10SPro, Max, CRX, and others @@ -32,7 +32,6 @@ * ***************************************/ #include "string.h" -#include #include "../ui_api.h" /*********************************/ From ac1e2d0fbcb96c27da6225233be1a28ef3b5ee01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davide=20Rombol=C3=A0?= Date: Sat, 18 Mar 2023 07:35:54 +0100 Subject: [PATCH 039/225] =?UTF-8?q?=F0=9F=8E=A8=20Suppress=20warning=20(#2?= =?UTF-8?q?5529)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/gcode/feature/trinamic/M569.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Marlin/src/gcode/feature/trinamic/M569.cpp b/Marlin/src/gcode/feature/trinamic/M569.cpp index db31fe3d8e..e0aa182bf2 100644 --- a/Marlin/src/gcode/feature/trinamic/M569.cpp +++ b/Marlin/src/gcode/feature/trinamic/M569.cpp @@ -53,6 +53,8 @@ static void set_stealth_status(const bool enable, const int8_t eindex) { constexpr int8_t index = -1; #endif + UNUSED(index); + LOOP_LOGICAL_AXES(i) if (parser.seen(AXIS_CHAR(i))) { switch (i) { case X_AXIS: From 98c0cc044d1be2c098335d9656f2d0eadf524129 Mon Sep 17 00:00:00 2001 From: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Sat, 18 Mar 2023 00:22:17 -0700 Subject: [PATCH 040/225] =?UTF-8?q?=F0=9F=94=A7=20SQUARE=5FWAVE=5FSTEPPING?= =?UTF-8?q?=20=3D>=20EDGE=5FSTEPPING=20(#25526)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Scott Lahteine --- Marlin/Configuration_adv.h | 9 +++-- Marlin/src/inc/SanityCheck.h | 2 ++ Marlin/src/module/stepper/trinamic.cpp | 14 ++++---- Marlin/src/module/stepper/trinamic.h | 46 +++++++++++++------------- buildroot/tests/FYSETC_F6 | 2 +- buildroot/tests/SAMD21_minitronics20 | 2 +- buildroot/tests/SAMD51_grandcentral_m4 | 2 +- 7 files changed, 39 insertions(+), 38 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 35c43c7f2c..284ecb6b1c 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -3160,7 +3160,7 @@ * * It is recommended to set HOMING_BUMP_MM to { 0, 0, 0 }. * - * SPI_ENDSTOPS *** Beta feature! *** TMC2130/TMC5160 Only *** + * SPI_ENDSTOPS *** TMC2130/TMC5160 Only *** * Poll the driver through SPI to determine load when homing. * Removes the need for a wire from DIAG1 to an endstop pin. * @@ -3188,7 +3188,7 @@ //#define U_STALL_SENSITIVITY 8 //#define V_STALL_SENSITIVITY 8 //#define W_STALL_SENSITIVITY 8 - //#define SPI_ENDSTOPS // TMC2130 only + //#define SPI_ENDSTOPS // TMC2130/TMC5160 only //#define IMPROVE_HOMING_RELIABILITY #endif @@ -3207,10 +3207,9 @@ //#define TMC_HOME_PHASE { 896, 896, 896 } /** - * Beta feature! - * Create a 50/50 square wave step pulse optimal for stepper drivers. + * Step on both rising and falling edge signals (as with a square wave). */ - //#define SQUARE_WAVE_STEPPING + //#define EDGE_STEPPING /** * Enable M122 debugging command for TMC stepper drivers. diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index cd4c4efee2..c1e9b29444 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -678,6 +678,8 @@ #error "INVERT_*_STEP_PIN true is now STEP_STATE_* LOW, and INVERT_*_STEP_PIN false is now STEP_STATE_* HIGH." #elif defined(PROBE_PT_1_X) || defined(PROBE_PT_1_Y) || defined(PROBE_PT_2_X) || defined(PROBE_PT_2_Y) || defined(PROBE_PT_3_X) || defined(PROBE_PT_3_Y) #error "PROBE_PT_[123]_[XY] is now defined using PROBE_PT_[123] with an array { x, y }." +#elif defined(SQUARE_WAVE_STEPPING) + #error "SQUARE_WAVE_STEPPING is now EDGE_STEPPING." #endif // L64xx stepper drivers have been removed diff --git a/Marlin/src/module/stepper/trinamic.cpp b/Marlin/src/module/stepper/trinamic.cpp index 48ce020d3d..7d87e5953f 100644 --- a/Marlin/src/module/stepper/trinamic.cpp +++ b/Marlin/src/module/stepper/trinamic.cpp @@ -227,7 +227,7 @@ enum StealthIndex : uint8_t { chopconf.intpol = interpolate; chopconf.hend = chop_init.hend + 3; chopconf.hstrt = chop_init.hstrt - 1; - TERN_(SQUARE_WAVE_STEPPING, chopconf.dedge = true); + TERN_(EDGE_STEPPING, chopconf.dedge = true); st.CHOPCONF(chopconf.sr); st.rms_current(mA, hold_multiplier); @@ -262,7 +262,7 @@ enum StealthIndex : uint8_t { chopconf.intpol = interpolate; chopconf.hend = chop_init.hend + 3; chopconf.hstrt = chop_init.hstrt - 1; - TERN_(SQUARE_WAVE_STEPPING, chopconf.dedge = true); + TERN_(EDGE_STEPPING, chopconf.dedge = true); st.CHOPCONF(chopconf.sr); st.rms_current(mA, hold_multiplier); @@ -684,7 +684,7 @@ enum StealthIndex : uint8_t { chopconf.intpol = interpolate; chopconf.hend = chop_init.hend + 3; chopconf.hstrt = chop_init.hstrt - 1; - TERN_(SQUARE_WAVE_STEPPING, chopconf.dedge = true); + TERN_(EDGE_STEPPING, chopconf.dedge = true); st.CHOPCONF(chopconf.sr); st.rms_current(mA, hold_multiplier); @@ -726,7 +726,7 @@ enum StealthIndex : uint8_t { chopconf.intpol = interpolate; chopconf.hend = chop_init.hend + 3; chopconf.hstrt = chop_init.hstrt - 1; - TERN_(SQUARE_WAVE_STEPPING, chopconf.dedge = true); + TERN_(EDGE_STEPPING, chopconf.dedge = true); st.CHOPCONF(chopconf.sr); st.rms_current(mA, hold_multiplier); @@ -766,7 +766,7 @@ enum StealthIndex : uint8_t { st.sdoff(0); st.rms_current(mA); st.microsteps(microsteps); - TERN_(SQUARE_WAVE_STEPPING, st.dedge(true)); + TERN_(EDGE_STEPPING, st.dedge(true)); st.intpol(interpolate); st.diss2g(true); // Disable short to ground protection. Too many false readings? TERN_(TMC_DEBUG, st.rdsel(0b01)); @@ -784,7 +784,7 @@ enum StealthIndex : uint8_t { chopconf.intpol = interpolate; chopconf.hend = chop_init.hend + 3; chopconf.hstrt = chop_init.hstrt - 1; - TERN_(SQUARE_WAVE_STEPPING, chopconf.dedge = true); + TERN_(EDGE_STEPPING, chopconf.dedge = true); st.CHOPCONF(chopconf.sr); st.rms_current(mA, hold_multiplier); @@ -819,7 +819,7 @@ enum StealthIndex : uint8_t { chopconf.intpol = interpolate; chopconf.hend = chop_init.hend + 3; chopconf.hstrt = chop_init.hstrt - 1; - TERN_(SQUARE_WAVE_STEPPING, chopconf.dedge = true); + TERN_(EDGE_STEPPING, chopconf.dedge = true); st.CHOPCONF(chopconf.sr); st.rms_current(mA, hold_multiplier); diff --git a/Marlin/src/module/stepper/trinamic.h b/Marlin/src/module/stepper/trinamic.h index 95bab7652c..3705543c99 100644 --- a/Marlin/src/module/stepper/trinamic.h +++ b/Marlin/src/module/stepper/trinamic.h @@ -115,7 +115,7 @@ void restore_trinamic_drivers(); void reset_trinamic_drivers(); -#define AXIS_HAS_SQUARE_WAVE(A) (AXIS_IS_TMC(A) && ENABLED(SQUARE_WAVE_STEPPING)) +#define AXIS_HAS_DEDGE(A) (AXIS_IS_TMC(A) && ENABLED(EDGE_STEPPING)) // X Stepper #if AXIS_IS_TMC(X) @@ -126,7 +126,7 @@ void reset_trinamic_drivers(); #define X_ENABLE_WRITE(STATE) stepperX.toff((STATE)==X_ENABLE_ON ? chopper_timing_X.toff : 0) #define X_ENABLE_READ() stepperX.isEnabled() #endif - #if AXIS_HAS_SQUARE_WAVE(X) + #if AXIS_HAS_DEDGE(X) #define X_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(X_STEP_PIN); }while(0) #endif #endif @@ -140,7 +140,7 @@ void reset_trinamic_drivers(); #define Y_ENABLE_WRITE(STATE) stepperY.toff((STATE)==Y_ENABLE_ON ? chopper_timing_Y.toff : 0) #define Y_ENABLE_READ() stepperY.isEnabled() #endif - #if AXIS_HAS_SQUARE_WAVE(Y) + #if AXIS_HAS_DEDGE(Y) #define Y_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(Y_STEP_PIN); }while(0) #endif #endif @@ -154,7 +154,7 @@ void reset_trinamic_drivers(); #define Z_ENABLE_WRITE(STATE) stepperZ.toff((STATE)==Z_ENABLE_ON ? chopper_timing_Z.toff : 0) #define Z_ENABLE_READ() stepperZ.isEnabled() #endif - #if AXIS_HAS_SQUARE_WAVE(Z) + #if AXIS_HAS_DEDGE(Z) #define Z_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(Z_STEP_PIN); }while(0) #endif #endif @@ -171,7 +171,7 @@ void reset_trinamic_drivers(); #define X2_ENABLE_WRITE(STATE) stepperX2.toff((STATE)==X_ENABLE_ON ? chopper_timing_X2.toff : 0) #define X2_ENABLE_READ() stepperX2.isEnabled() #endif - #if AXIS_HAS_SQUARE_WAVE(X2) + #if AXIS_HAS_DEDGE(X2) #define X2_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(X2_STEP_PIN); }while(0) #endif #endif @@ -188,7 +188,7 @@ void reset_trinamic_drivers(); #define Y2_ENABLE_WRITE(STATE) stepperY2.toff((STATE)==Y_ENABLE_ON ? chopper_timing_Y2.toff : 0) #define Y2_ENABLE_READ() stepperY2.isEnabled() #endif - #if AXIS_HAS_SQUARE_WAVE(Y2) + #if AXIS_HAS_DEDGE(Y2) #define Y2_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(Y2_STEP_PIN); }while(0) #endif #endif @@ -205,7 +205,7 @@ void reset_trinamic_drivers(); #define Z2_ENABLE_WRITE(STATE) stepperZ2.toff((STATE)==Z_ENABLE_ON ? chopper_timing_Z2.toff : 0) #define Z2_ENABLE_READ() stepperZ2.isEnabled() #endif - #if AXIS_HAS_SQUARE_WAVE(Z2) + #if AXIS_HAS_DEDGE(Z2) #define Z2_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(Z2_STEP_PIN); }while(0) #endif #endif @@ -222,7 +222,7 @@ void reset_trinamic_drivers(); #define Z3_ENABLE_WRITE(STATE) stepperZ3.toff((STATE)==Z_ENABLE_ON ? chopper_timing_Z3.toff : 0) #define Z3_ENABLE_READ() stepperZ3.isEnabled() #endif - #if AXIS_HAS_SQUARE_WAVE(Z3) + #if AXIS_HAS_DEDGE(Z3) #define Z3_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(Z3_STEP_PIN); }while(0) #endif #endif @@ -239,7 +239,7 @@ void reset_trinamic_drivers(); #define Z4_ENABLE_WRITE(STATE) stepperZ4.toff((STATE)==Z_ENABLE_ON ? chopper_timing_Z4.toff : 0) #define Z4_ENABLE_READ() stepperZ4.isEnabled() #endif - #if AXIS_HAS_SQUARE_WAVE(Z4) + #if AXIS_HAS_DEDGE(Z4) #define Z4_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(Z4_STEP_PIN); }while(0) #endif #endif @@ -253,7 +253,7 @@ void reset_trinamic_drivers(); #define I_ENABLE_WRITE(STATE) stepperI.toff((STATE)==I_ENABLE_ON ? chopper_timing.toff : 0) #define I_ENABLE_READ() stepperI.isEnabled() #endif - #if AXIS_HAS_SQUARE_WAVE(I) + #if AXIS_HAS_DEDGE(I) #define I_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(I_STEP_PIN); }while(0) #endif #endif @@ -267,7 +267,7 @@ void reset_trinamic_drivers(); #define J_ENABLE_WRITE(STATE) stepperJ.toff((STATE)==J_ENABLE_ON ? chopper_timing.toff : 0) #define J_ENABLE_READ() stepperJ.isEnabled() #endif - #if AXIS_HAS_SQUARE_WAVE(J) + #if AXIS_HAS_DEDGE(J) #define J_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(J_STEP_PIN); }while(0) #endif #endif @@ -281,7 +281,7 @@ void reset_trinamic_drivers(); #define K_ENABLE_WRITE(STATE) stepperK.toff((STATE)==K_ENABLE_ON ? chopper_timing.toff : 0) #define K_ENABLE_READ() stepperK.isEnabled() #endif - #if AXIS_HAS_SQUARE_WAVE(K) + #if AXIS_HAS_DEDGE(K) #define K_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(K_STEP_PIN); }while(0) #endif #endif @@ -295,7 +295,7 @@ void reset_trinamic_drivers(); #define U_ENABLE_WRITE(STATE) stepperU.toff((STATE)==U_ENABLE_ON ? chopper_timing_U.toff : 0) #define U_ENABLE_READ() stepperU.isEnabled() #endif - #if AXIS_HAS_SQUARE_WAVE(U) + #if AXIS_HAS_DEDGE(U) #define U_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(U_STEP_PIN); }while(0) #endif #endif @@ -309,7 +309,7 @@ void reset_trinamic_drivers(); #define V_ENABLE_WRITE(STATE) stepperV.toff((STATE)==V_ENABLE_ON ? chopper_timing_V.toff : 0) #define V_ENABLE_READ() stepperV.isEnabled() #endif - #if AXIS_HAS_SQUARE_WAVE(V) + #if AXIS_HAS_DEDGE(V) #define V_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(V_STEP_PIN); }while(0) #endif #endif @@ -323,7 +323,7 @@ void reset_trinamic_drivers(); #define W_ENABLE_WRITE(STATE) stepperW.toff((STATE)==W_ENABLE_ON ? chopper_timing_W.toff : 0) #define W_ENABLE_READ() stepperW.isEnabled() #endif - #if AXIS_HAS_SQUARE_WAVE(W) + #if AXIS_HAS_DEDGE(W) #define W_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(W_STEP_PIN); }while(0) #endif #endif @@ -340,7 +340,7 @@ void reset_trinamic_drivers(); #define E0_ENABLE_WRITE(STATE) stepperE0.toff((STATE)==E_ENABLE_ON ? chopper_timing_E0.toff : 0) #define E0_ENABLE_READ() stepperE0.isEnabled() #endif - #if AXIS_HAS_SQUARE_WAVE(E0) + #if AXIS_HAS_DEDGE(E0) #define E0_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(E0_STEP_PIN); }while(0) #endif #endif @@ -357,7 +357,7 @@ void reset_trinamic_drivers(); #define E1_ENABLE_WRITE(STATE) stepperE1.toff((STATE)==E_ENABLE_ON ? chopper_timing_E1.toff : 0) #define E1_ENABLE_READ() stepperE1.isEnabled() #endif - #if AXIS_HAS_SQUARE_WAVE(E1) + #if AXIS_HAS_DEDGE(E1) #define E1_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(E1_STEP_PIN); }while(0) #endif #endif @@ -374,7 +374,7 @@ void reset_trinamic_drivers(); #define E2_ENABLE_WRITE(STATE) stepperE2.toff((STATE)==E_ENABLE_ON ? chopper_timing_E2.toff : 0) #define E2_ENABLE_READ() stepperE2.isEnabled() #endif - #if AXIS_HAS_SQUARE_WAVE(E2) + #if AXIS_HAS_DEDGE(E2) #define E2_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(E2_STEP_PIN); }while(0) #endif #endif @@ -391,7 +391,7 @@ void reset_trinamic_drivers(); #define E3_ENABLE_WRITE(STATE) stepperE3.toff((STATE)==E_ENABLE_ON ? chopper_timing_E3.toff : 0) #define E3_ENABLE_READ() stepperE3.isEnabled() #endif - #if AXIS_HAS_SQUARE_WAVE(E3) + #if AXIS_HAS_DEDGE(E3) #define E3_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(E3_STEP_PIN); }while(0) #endif #endif @@ -408,7 +408,7 @@ void reset_trinamic_drivers(); #define E4_ENABLE_WRITE(STATE) stepperE4.toff((STATE)==E_ENABLE_ON ? chopper_timing_E4.toff : 0) #define E4_ENABLE_READ() stepperE4.isEnabled() #endif - #if AXIS_HAS_SQUARE_WAVE(E4) + #if AXIS_HAS_DEDGE(E4) #define E4_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(E4_STEP_PIN); }while(0) #endif #endif @@ -425,7 +425,7 @@ void reset_trinamic_drivers(); #define E5_ENABLE_WRITE(STATE) stepperE5.toff((STATE)==E_ENABLE_ON ? chopper_timing_E5.toff : 0) #define E5_ENABLE_READ() stepperE5.isEnabled() #endif - #if AXIS_HAS_SQUARE_WAVE(E5) + #if AXIS_HAS_DEDGE(E5) #define E5_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(E5_STEP_PIN); }while(0) #endif #endif @@ -442,7 +442,7 @@ void reset_trinamic_drivers(); #define E6_ENABLE_WRITE(STATE) stepperE6.toff((STATE)==E_ENABLE_ON ? chopper_timing_E6.toff : 0) #define E6_ENABLE_READ() stepperE6.isEnabled() #endif - #if AXIS_HAS_SQUARE_WAVE(E6) + #if AXIS_HAS_DEDGE(E6) #define E6_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(E6_STEP_PIN); }while(0) #endif #endif @@ -459,7 +459,7 @@ void reset_trinamic_drivers(); #define E7_ENABLE_WRITE(STATE) stepperE7.toff((STATE)==E_ENABLE_ON ? chopper_timing_E7.toff : 0) #define E7_ENABLE_READ() stepperE7.isEnabled() #endif - #if AXIS_HAS_SQUARE_WAVE(E7) + #if AXIS_HAS_DEDGE(E7) #define E7_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(E7_STEP_PIN); }while(0) #endif #endif diff --git a/buildroot/tests/FYSETC_F6 b/buildroot/tests/FYSETC_F6 index f8fce4b5b8..f4f05ceea7 100755 --- a/buildroot/tests/FYSETC_F6 +++ b/buildroot/tests/FYSETC_F6 @@ -64,7 +64,7 @@ opt_set MOTHERBOARD BOARD_FYSETC_F6_13 \ X_HARDWARE_SERIAL Serial2 opt_enable USE_ZMIN_PLUG FIX_MOUNTED_PROBE AUTO_BED_LEVELING_BILINEAR PAUSE_BEFORE_DEPLOY_STOW \ FYSETC_242_OLED_12864 EEPROM_SETTINGS EEPROM_CHITCHAT M114_DETAIL Z_SAFE_HOMING \ - STEALTHCHOP_XY STEALTHCHOP_Z STEALTHCHOP_E HYBRID_THRESHOLD SENSORLESS_HOMING SQUARE_WAVE_STEPPING + STEALTHCHOP_XY STEALTHCHOP_Z STEALTHCHOP_E HYBRID_THRESHOLD SENSORLESS_HOMING EDGE_STEPPING exec_test $1 $2 "FYSETC_F6 | SCARA | Mixed TMC | EEPROM" "$3" # clean up diff --git a/buildroot/tests/SAMD21_minitronics20 b/buildroot/tests/SAMD21_minitronics20 index b46fb9f08a..f4a75afafe 100755 --- a/buildroot/tests/SAMD21_minitronics20 +++ b/buildroot/tests/SAMD21_minitronics20 @@ -26,7 +26,7 @@ opt_enable ENDSTOP_INTERRUPTS_FEATURE BLTOUCH Z_MIN_PROBE_REPEATABILITY_TEST \ SCROLL_LONG_FILENAMES BABYSTEPPING DOUBLECLICK_FOR_Z_BABYSTEPPING \ MOVE_Z_WHEN_IDLE BABYSTEP_ZPROBE_OFFSET BABYSTEP_GFX_OVERLAY \ LIN_ADVANCE ADVANCED_PAUSE_FEATURE PARK_HEAD_ON_PAUSE MONITOR_DRIVER_STATUS SENSORLESS_HOMING \ - SQUARE_WAVE_STEPPING + EDGE_STEPPING exec_test $1 $2 "Minitronics 2.0 with assorted features" "$3" # clean up diff --git a/buildroot/tests/SAMD51_grandcentral_m4 b/buildroot/tests/SAMD51_grandcentral_m4 index 042733072d..72996e7b7f 100755 --- a/buildroot/tests/SAMD51_grandcentral_m4 +++ b/buildroot/tests/SAMD51_grandcentral_m4 @@ -26,7 +26,7 @@ opt_enable ENDSTOP_INTERRUPTS_FEATURE S_CURVE_ACCELERATION BLTOUCH Z_MIN_PROBE_R SCROLL_LONG_FILENAMES BABYSTEPPING DOUBLECLICK_FOR_Z_BABYSTEPPING \ MOVE_Z_WHEN_IDLE BABYSTEP_ZPROBE_OFFSET BABYSTEP_GFX_OVERLAY \ LIN_ADVANCE ADVANCED_PAUSE_FEATURE PARK_HEAD_ON_PAUSE MONITOR_DRIVER_STATUS SENSORLESS_HOMING \ - SQUARE_WAVE_STEPPING TMC_DEBUG + EDGE_STEPPING TMC_DEBUG exec_test $1 $2 "Grand Central M4 with assorted features" "$3" # clean up From 88da531e5d873c342a4a6625d9cb57adb2644cce Mon Sep 17 00:00:00 2001 From: James Gilliland Date: Sat, 18 Mar 2023 03:30:30 -0500 Subject: [PATCH 041/225] =?UTF-8?q?=F0=9F=9A=B8=20Improve=20Z-Probe=20rais?= =?UTF-8?q?e=20for=20deploy=20(#25498)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/src/gcode/bedlevel/G35.cpp | 1 - Marlin/src/gcode/calibrate/G76_M871.cpp | 1 - Marlin/src/lcd/menu/menu_tramming_wizard.cpp | 4 +-- Marlin/src/module/probe.cpp | 30 +++++++++++++------- 4 files changed, 20 insertions(+), 16 deletions(-) diff --git a/Marlin/src/gcode/bedlevel/G35.cpp b/Marlin/src/gcode/bedlevel/G35.cpp index dd828bf0c8..ff0321e4aa 100644 --- a/Marlin/src/gcode/bedlevel/G35.cpp +++ b/Marlin/src/gcode/bedlevel/G35.cpp @@ -108,7 +108,6 @@ void GcodeSuite::G35() { // length of the deployed pin (BLTOUCH stroke < 7mm) // Unsure if this is even required. The probe seems to lift correctly after probe done. - do_blocking_move_to_z(SUM_TERN(BLTOUCH, Z_CLEARANCE_BETWEEN_PROBES, bltouch.z_extra_clearance())); const float z_probed_height = probe.probe_at_point(tramming_points[i], PROBE_PT_RAISE, 0, true); if (isnan(z_probed_height)) { diff --git a/Marlin/src/gcode/calibrate/G76_M871.cpp b/Marlin/src/gcode/calibrate/G76_M871.cpp index c484d4f1b7..9bea0a0b86 100644 --- a/Marlin/src/gcode/calibrate/G76_M871.cpp +++ b/Marlin/src/gcode/calibrate/G76_M871.cpp @@ -108,7 +108,6 @@ }; auto g76_probe = [](const TempSensorID sid, celsius_t &targ, const xy_pos_t &nozpos) { - do_z_clearance(5.0); // Raise nozzle before probing ptc.set_enabled(false); const float measured_z = probe.probe_at_point(nozpos, PROBE_PT_STOW, 0, false); // verbose=0, probe_relative=false ptc.set_enabled(true); diff --git a/Marlin/src/lcd/menu/menu_tramming_wizard.cpp b/Marlin/src/lcd/menu/menu_tramming_wizard.cpp index 1dd8a1cab6..4ce2cd6460 100644 --- a/Marlin/src/lcd/menu/menu_tramming_wizard.cpp +++ b/Marlin/src/lcd/menu/menu_tramming_wizard.cpp @@ -53,9 +53,7 @@ static int8_t reference_index; // = 0 #endif static bool probe_single_point() { - do_blocking_move_to_z(TERN(BLTOUCH, Z_CLEARANCE_DEPLOY_PROBE, Z_CLEARANCE_BETWEEN_PROBES)); - // Stow after each point with BLTouch "HIGH SPEED" mode for push-pin safety - const float z_probed_height = probe.probe_at_point(tramming_points[tram_index], TERN0(BLTOUCH, bltouch.high_speed_mode) ? PROBE_PT_STOW : PROBE_PT_RAISE, 0, true); + const float z_probed_height = probe.probe_at_point(tramming_points[tram_index], PROBE_PT_RAISE, 0, true); z_measured[tram_index] = z_probed_height; if (reference_index < 0) reference_index = tram_index; move_to_tramming_wait_pos(); diff --git a/Marlin/src/module/probe.cpp b/Marlin/src/module/probe.cpp index faa3aec03d..da69b725b9 100644 --- a/Marlin/src/module/probe.cpp +++ b/Marlin/src/module/probe.cpp @@ -147,7 +147,7 @@ xyz_pos_t Probe::offset; // Initialized by settings.load() WRITE(MAGLEV_TRIGGER_PIN, LOW); } - inline void maglev_idle() { do_blocking_move_to_z(10); } + inline void maglev_idle() { do_z_clearance(10); } #elif ENABLED(TOUCH_MI_PROBE) @@ -749,7 +749,7 @@ float Probe::run_z_probe(const bool sanity_check/*=true*/) { if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("1st Probe Z:", first_probe_z); // Raise to give the probe clearance - do_blocking_move_to_z(current_position.z + Z_CLEARANCE_MULTI_PROBE, z_probe_fast_mm_s); + do_z_clearance(current_position.z + Z_CLEARANCE_MULTI_PROBE); #elif Z_PROBE_FEEDRATE_FAST != Z_PROBE_FEEDRATE_SLOW @@ -759,7 +759,7 @@ float Probe::run_z_probe(const bool sanity_check/*=true*/) { if (current_position.z > z) { // Probe down fast. If the probe never triggered, raise for probe clearance if (!probe_down_to_z(z, z_probe_fast_mm_s)) - do_blocking_move_to_z(current_position.z + Z_CLEARANCE_BETWEEN_PROBES, z_probe_fast_mm_s); + do_z_clearance(current_position.z + Z_CLEARANCE_BETWEEN_PROBES); } #endif @@ -810,7 +810,7 @@ float Probe::run_z_probe(const bool sanity_check/*=true*/) { #if EXTRA_PROBING > 0 < TOTAL_PROBING - 1 #endif - ) do_blocking_move_to_z(z + Z_CLEARANCE_MULTI_PROBE, z_probe_fast_mm_s); + ) do_z_clearance(z + Z_CLEARANCE_MULTI_PROBE); #endif } @@ -878,13 +878,16 @@ float Probe::probe_at_point(const_float_t rx, const_float_t ry, const ProbePtRai } #if ENABLED(BLTOUCH) - if (bltouch.high_speed_mode && bltouch.triggered()) - bltouch._reset(); + // Reset a BLTouch in HS mode if already triggered + if (bltouch.high_speed_mode && bltouch.triggered()) bltouch._reset(); #endif + // Use a safe Z height for the XY move + const float safe_z = _MAX(current_position.z, SUM_TERN(BLTOUCH, Z_CLEARANCE_BETWEEN_PROBES, bltouch.z_extra_clearance())); + // On delta keep Z below clip height or do_blocking_move_to will abort xyz_pos_t npos = NUM_AXIS_ARRAY( - rx, ry, TERN(DELTA, _MIN(delta_clip_start_height, current_position.z), current_position.z), + rx, ry, TERN(DELTA, _MIN(delta_clip_start_height, safe_z), safe_z), current_position.i, current_position.j, current_position.k, current_position.u, current_position.v, current_position.w ); @@ -907,17 +910,22 @@ float Probe::probe_at_point(const_float_t rx, const_float_t ry, const ProbePtRai TERN_(HAS_PTC, ptc.apply_compensation(measured_z)); TERN_(X_AXIS_TWIST_COMPENSATION, measured_z += xatc.compensation(npos + offset_xy)); } + + // Deploy succeeded and a successful measurement was done. + // Raise and/or stow the probe depending on 'raise_after' and settings. if (!isnan(measured_z)) { - const bool big_raise = raise_after == PROBE_PT_BIG_RAISE; - if (big_raise || raise_after == PROBE_PT_RAISE) - do_blocking_move_to_z(current_position.z + (big_raise ? 25 : Z_CLEARANCE_BETWEEN_PROBES), z_probe_fast_mm_s); - else if (raise_after == PROBE_PT_STOW || raise_after == PROBE_PT_LAST_STOW) + const ProbePtRaise raise_type = (TERN0(BLTOUCH, !bltouch.high_speed_mode) && raise_after == PROBE_PT_RAISE) ? PROBE_PT_STOW : raise_after; + const bool big_raise = raise_type == PROBE_PT_BIG_RAISE; + if (big_raise || raise_type == PROBE_PT_RAISE) + do_z_clearance(current_position.z + (big_raise ? 25 : Z_CLEARANCE_BETWEEN_PROBES)); + else if (raise_type == PROBE_PT_STOW || raise_type == PROBE_PT_LAST_STOW) if (stow()) measured_z = NAN; // Error on stow? if (verbose_level > 2) SERIAL_ECHOLNPGM("Bed X: ", LOGICAL_X_POSITION(rx), " Y: ", LOGICAL_Y_POSITION(ry), " Z: ", measured_z); } + // If any error occurred stow the probe and set an alert if (isnan(measured_z)) { stow(); LCD_MESSAGE(MSG_LCD_PROBING_FAILED); From d0669527c43ce69d5d2313367a8752b6cac8119b Mon Sep 17 00:00:00 2001 From: Eduard Sukharev Date: Sat, 18 Mar 2023 11:33:38 +0300 Subject: [PATCH 042/225] =?UTF-8?q?=F0=9F=90=9B=20Fix=20LVGL=20/=20MKS=20W?= =?UTF-8?q?iFi=20long=20filename=20(#25483)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- .../extui/mks_ui/tft_lvgl_configuration.cpp | 6 +- Marlin/src/lcd/extui/mks_ui/wifi_module.cpp | 893 +++++++++--------- Marlin/src/lcd/extui/mks_ui/wifi_module.h | 12 +- Marlin/src/lcd/extui/mks_ui/wifi_upload.cpp | 6 +- Marlin/src/lcd/extui/mks_ui/wifi_upload.h | 4 +- 5 files changed, 472 insertions(+), 449 deletions(-) diff --git a/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp b/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp index a5a8f7cbe4..2248ef334f 100644 --- a/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp +++ b/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp @@ -298,10 +298,8 @@ void lv_fill_rect(lv_coord_t x1, lv_coord_t y1, lv_coord_t x2, lv_coord_t y2, lv W25QXX.init(SPI_QUARTER_SPEED); } -#define TICK_CYCLE 1 - -uint16_t getTickDiff(uint16_t curTick, uint16_t lastTick) { - return TICK_CYCLE * (lastTick <= curTick ? (curTick - lastTick) : (0xFFFFFFFF - lastTick + curTick)); +uint16_t getTickDiff(const uint16_t curTick, const uint16_t lastTick) { + return (TICK_CYCLE) * (lastTick <= curTick ? (curTick - lastTick) : (0xFFFFFFFF - lastTick + curTick)); } static bool get_point(int16_t *x, int16_t *y) { diff --git a/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp b/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp index 215281d450..b389109975 100644 --- a/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp +++ b/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp @@ -55,11 +55,11 @@ #define WIFI_IO1_SET() WRITE(WIFI_IO1_PIN, HIGH); #define WIFI_IO1_RESET() WRITE(WIFI_IO1_PIN, LOW); -extern uint8_t Explore_Disk(char *path, uint8_t recu_level); +uint8_t Explore_Disk(const char * const path, const uint8_t recu_level, const bool with_longnames); extern uint8_t commands_in_queue; extern uint8_t sel_id; -extern uint16_t getTickDiff(uint16_t curTick, uint16_t lastTick); +uint16_t getTickDiff(const uint16_t curTick, const uint16_t lastTick); volatile SZ_USART_FIFO WifiRxFifo; @@ -114,33 +114,34 @@ extern CLOUD_PARA cloud_para; extern bool once_flag, flash_preview_begin, default_preview_flg, gcode_preview_over; extern bool flash_dma_mode; -uint32_t getWifiTick() { return millis(); } +millis_t getWifiTick() { return millis(); } -uint32_t getWifiTickDiff(int32_t lastTick, int32_t curTick) { - return (lastTick <= curTick ? curTick - lastTick : 0xFFFFFFFF - lastTick + curTick) * TICK_CYCLE; +millis_t getWifiTickDiff(const millis_t lastTick, const millis_t curTick) { + return (TICK_CYCLE) * (lastTick <= curTick ? curTick - lastTick : 0xFFFFFFFFUL - lastTick + curTick); } -void wifi_delay(int n) { - const uint32_t start = getWifiTick(); - while (getWifiTickDiff(start, getWifiTick()) < (uint32_t)n) +void wifi_delay(const uint16_t n) { + const millis_t start = getWifiTick(); + while (getWifiTickDiff(start, getWifiTick()) < millis_t(n)) hal.watchdog_refresh(); } void wifi_reset() { - uint32_t start = getWifiTick(); + const millis_t start = getWifiTick(); WIFI_RESET(); while (getWifiTickDiff(start, getWifiTick()) < 500) { /* nada */ } WIFI_SET(); } -void mount_file_sys(uint8_t disk_type) { - if (disk_type == FILE_SYS_SD) { - TERN_(SDSUPPORT, card.mount()); - } - else if (disk_type == FILE_SYS_USB) { +void mount_file_sys(const uint8_t disk_type) { + switch (disk_type) { + case FILE_SYS_SD: TERN_(SDSUPPORT, card.mount()); break; + case FILE_SYS_USB: break; } } +#define ILLEGAL_CHAR_REPLACE 0x5F // '_' + static bool longName2DosName(const char *longName, char *dosName) { uint8_t i = FILENAME_LENGTH; while (i) dosName[--i] = '\0'; @@ -152,18 +153,24 @@ static bool longName2DosName(const char *longName, char *dosName) { strcat_P(dosName, PSTR(".GCO")); return dosName[0] != '\0'; } + + // Fail for illegal characters + if (c < 0x21 || c == 0x7F) // Check size, non-printable characters + c = ILLEGAL_CHAR_REPLACE; // replace non-printable chars with underscore '_' else { - // Fail for illegal characters PGM_P p = PSTR("|<>^+=?/[];,*\"\\"); - while (uint8_t b = pgm_read_byte(p++)) if (b == c) return false; - if (c < 0x21 || c == 0x7F) return false; // Check size, non-printable characters - dosName[i++] = (c < 'a' || c > 'z') ? (c) : (c + ('A' - 'a')); // Uppercase required for 8.3 name + while (const uint8_t b = pgm_read_byte(p++)) + if (b == c) c = ILLEGAL_CHAR_REPLACE; // replace illegal chars with underscore '_' } + + dosName[i++] = (c < 'a' || c > 'z') ? (c) : (c + ('A' - 'a')); // Uppercase required for 8.3 name + if (i >= 5) { strcat_P(dosName, PSTR("~1.GCO")); return dosName[0] != '\0'; } } + return dosName[0] != '\0'; // Return true if any name was set } @@ -562,8 +569,8 @@ static bool longName2DosName(const char *longName, char *dosName) { #if ENABLED(MKS_WIFI_MODULE) - int raw_send_to_wifi(uint8_t *buf, int len) { - if (buf == 0 || len <= 0) return 0; + int raw_send_to_wifi(uint8_t * const buf, const int len) { + if (buf == nullptr || len <= 0) return 0; for (int i = 0; i < len; i++) WIFISERIAL.write(*(buf + i)); return len; } @@ -701,13 +708,13 @@ int package_to_wifi(WIFI_RET_TYPE type, uint8_t *buf, int len) { return 1; } +int send_to_wifi(uint8_t * const buf, const int len) { return package_to_wifi(WIFI_TRANS_INF, buf, len); } -#define SEND_OK_TO_WIFI send_to_wifi((uint8_t *)"ok\r\n", strlen("ok\r\n")) -int send_to_wifi(uint8_t *buf, int len) { return package_to_wifi(WIFI_TRANS_INF, buf, len); } +inline void send_ok_to_wifi() { send_to_wifi((uint8_t *)"ok\r\n", strlen("ok\r\n")); } void set_cur_file_sys(int fileType) { gCfgItems.fileSysType = fileType; } -void get_file_list(char *path) { +void get_file_list(const char * const path, const bool with_longnames) { if (!path) return; if (gCfgItems.fileSysType == FILE_SYS_SD) { @@ -716,7 +723,7 @@ void get_file_list(char *path) { else if (gCfgItems.fileSysType == FILE_SYS_USB) { // udisk } - Explore_Disk(path, 0); + Explore_Disk(path, 0, with_longnames); } char wait_ip_back_flag = 0; @@ -795,7 +802,7 @@ typedef struct { uint8_t tail; } ESP_PROTOC_FRAME; -static int cut_msg_head(uint8_t *msg, uint16_t msgLen, uint16_t cutLen) { +static int cut_msg_head(uint8_t * const msg, const uint16_t msgLen, uint16_t cutLen) { if (msgLen < cutLen) return 0; else if (msgLen == cutLen) { @@ -811,25 +818,31 @@ static int cut_msg_head(uint8_t *msg, uint16_t msgLen, uint16_t cutLen) { return msgLen - cutLen; } -uint8_t Explore_Disk(char *path , uint8_t recu_level) { - char tmp[200]; +uint8_t Explore_Disk(const char * const path, const uint8_t recu_level, const bool with_longnames) { char Fstream[200]; if (!path) return 0; const uint8_t fileCnt = card.get_num_Files(); + MediaFile file; + MediaFile *diveDir; for (uint8_t i = 0; i < fileCnt; i++) { card.getfilename_sorted(SD_ORDER(i, fileCnt)); - ZERO(tmp); - strcpy(tmp, card.filename); ZERO(Fstream); - strcpy(Fstream, tmp); + strcpy(Fstream, card.filename); if (card.flag.filenameIsDir && recu_level <= 10) strcat_P(Fstream, PSTR(".DIR")); + strcat_P(Fstream, PSTR(" 0")); // report 0 file size + + if (with_longnames) { + strcat_P(Fstream, PSTR(" ")); + strcat_P(Fstream, card.longest_filename()); + } + strcat_P(Fstream, PSTR("\r\n")); send_to_wifi((uint8_t*)Fstream, strlen(Fstream)); } @@ -837,434 +850,449 @@ uint8_t Explore_Disk(char *path , uint8_t recu_level) { return fileCnt; } -static void wifi_gcode_exec(uint8_t *cmd_line) { +static void wifi_gcode_exec(uint8_t * const cmd_line) { int8_t tempBuf[100] = { 0 }; - uint8_t *tmpStr = 0; int cmd_value; volatile int print_rate; - if (strchr((char *)cmd_line, '\n') && (strchr((char *)cmd_line, 'G') || strchr((char *)cmd_line, 'M') || strchr((char *)cmd_line, 'T'))) { - tmpStr = (uint8_t *)strchr((char *)cmd_line, '\n'); - if (tmpStr) *tmpStr = '\0'; - tmpStr = (uint8_t *)strchr((char *)cmd_line, '\r'); - if (tmpStr) *tmpStr = '\0'; + // Only accept commands with a linefeed + char * const lfStr = strchr((char *)cmd_line, '\n'); + if (!lfStr) return; - tmpStr = (uint8_t *)strchr((char *)cmd_line, '*'); - if (tmpStr) *tmpStr = '\0'; + // Only accept commands with G, M, or T somewhere + const char * const gStr = strchr((char *)cmd_line, 'G'); + const char * const mStr = strchr((char *)cmd_line, 'M'); + const char * const tStr = strchr((char *)cmd_line, 'T'); + if (!(gStr || mStr || tStr)) return; - tmpStr = (uint8_t *)strchr((char *)cmd_line, 'M'); - if (tmpStr) { - cmd_value = atoi((char *)(tmpStr + 1)); - tmpStr = (uint8_t *)strchr((char *)tmpStr, ' '); + // Replace the linefeed with nul terminator + *lfStr = '\0'; - switch (cmd_value) { + // Terminate on the first cr, if any + char * const crStr = strchr((char *)cmd_line, '\r'); + if (crStr) *crStr = '\0'; - case 20: // M20: Print SD / µdisk file - file_writer.fileTransfer = 0; - if (uiCfg.print_state == IDLE) { - int index = 0; + // Terminate on the checksum marker, if any + char * const aStr = strchr((char *)cmd_line, '*'); + if (aStr) *aStr = '\0'; - if (tmpStr == 0) { - gCfgItems.fileSysType = FILE_SYS_SD; + // Handle some M commands here + if (mStr) { + cmd_value = atoi(mStr + 1); + char * const spStr = strchr(mStr, ' '); + + switch (cmd_value) { + + case 20: // M20: Print SD / µdisk file + file_writer.fileTransfer = 0; + if (uiCfg.print_state == IDLE) { + int index = 0; + if (spStr == nullptr) { + gCfgItems.fileSysType = FILE_SYS_SD; + send_to_wifi((uint8_t *)(STR_BEGIN_FILE_LIST "\r\n"), strlen(STR_BEGIN_FILE_LIST "\r\n")); + get_file_list("0:/", false); + send_to_wifi((uint8_t *)(STR_END_FILE_LIST "\r\n"), strlen(STR_END_FILE_LIST "\r\n")); + send_ok_to_wifi(); + break; + } + + while (mStr[index] == ' ') index++; + + if (gCfgItems.wifi_type == ESP_WIFI) { + char * const path = (char *)tempBuf; + if (strlen(&mStr[index]) < 80) { send_to_wifi((uint8_t *)(STR_BEGIN_FILE_LIST "\r\n"), strlen(STR_BEGIN_FILE_LIST "\r\n")); - get_file_list((char *)"0:/"); + + if (strncmp(&mStr[index], "1:", 2) == 0) + gCfgItems.fileSysType = FILE_SYS_SD; + else if (strncmp(&mStr[index], "0:", 2) == 0) + gCfgItems.fileSysType = FILE_SYS_USB; + + strcpy(path, &mStr[index]); + const bool with_longnames = strchr(mStr, 'L') != nullptr; + get_file_list(path, with_longnames); send_to_wifi((uint8_t *)(STR_END_FILE_LIST "\r\n"), strlen(STR_END_FILE_LIST "\r\n")); - SEND_OK_TO_WIFI; - break; } + send_ok_to_wifi(); + } + } + break; - while (tmpStr[index] == ' ') index++; + case 21: send_ok_to_wifi(); break; // Init SD card - if (gCfgItems.wifi_type == ESP_WIFI) { - char *path = (char *)tempBuf; + case 23: + // Select the file + if (uiCfg.print_state == IDLE) { + int index = 0; + while (mStr[index] == ' ') index++; - if (strlen((char *)&tmpStr[index]) < 80) { - send_to_wifi((uint8_t *)(STR_BEGIN_FILE_LIST "\r\n"), strlen(STR_BEGIN_FILE_LIST "\r\n")); + if (strstr_P(&mStr[index], PSTR(".g")) || strstr_P(&mStr[index], PSTR(".G"))) { + if (strlen(&mStr[index]) < 80) { + ZERO(list_file.file_name[sel_id]); + ZERO(list_file.long_name[sel_id]); + uint8_t has_path_selected = 0; - if (strncmp((char *)&tmpStr[index], "1:", 2) == 0) + if (gCfgItems.wifi_type == ESP_WIFI) { + if (strncmp_P(&mStr[index], PSTR("1:"), 2) == 0) { gCfgItems.fileSysType = FILE_SYS_SD; - else if (strncmp((char *)&tmpStr[index], "0:", 2) == 0) + has_path_selected = 1; + } + else if (strncmp_P(&mStr[index], PSTR("0:"), 2) == 0) { gCfgItems.fileSysType = FILE_SYS_USB; + has_path_selected = 1; + } + else if (mStr[index] != '/') + strcat_P((char *)list_file.file_name[sel_id], PSTR("/")); - strcpy((char *)path, (char *)&tmpStr[index]); - get_file_list(path); - send_to_wifi((uint8_t *)(STR_END_FILE_LIST "\r\n"), strlen(STR_END_FILE_LIST "\r\n")); - } - SEND_OK_TO_WIFI; - } - } - break; - - case 21: SEND_OK_TO_WIFI; break; // Init SD card - - case 23: - // Select the file - if (uiCfg.print_state == IDLE) { - int index = 0; - while (tmpStr[index] == ' ') index++; - - if (strstr_P((char *)&tmpStr[index], PSTR(".g")) || strstr_P((char *)&tmpStr[index], PSTR(".G"))) { - if (strlen((char *)&tmpStr[index]) < 80) { - ZERO(list_file.file_name[sel_id]); - ZERO(list_file.long_name[sel_id]); - uint8_t has_path_selected = 0; - - if (gCfgItems.wifi_type == ESP_WIFI) { - if (strncmp_P((char *)&tmpStr[index], PSTR("1:"), 2) == 0) { - gCfgItems.fileSysType = FILE_SYS_SD; - has_path_selected = 1; - } - else if (strncmp_P((char *)&tmpStr[index], PSTR("0:"), 2) == 0) { - gCfgItems.fileSysType = FILE_SYS_USB; - has_path_selected = 1; - } - else if (tmpStr[index] != '/') + if (file_writer.fileTransfer == 1) { + char dosName[FILENAME_LENGTH]; + uint8_t fileName[sizeof(list_file.file_name[sel_id])]; + fileName[0] = '\0'; + if (has_path_selected == 1) { + strcat((char *)fileName, &mStr[index + 3]); strcat_P((char *)list_file.file_name[sel_id], PSTR("/")); - - if (file_writer.fileTransfer == 1) { - char dosName[FILENAME_LENGTH]; - uint8_t fileName[sizeof(list_file.file_name[sel_id])]; - fileName[0] = '\0'; - if (has_path_selected == 1) { - strcat((char *)fileName, (char *)&tmpStr[index + 3]); - strcat_P((char *)list_file.file_name[sel_id], PSTR("/")); - } - else strcat((char *)fileName, (char *)&tmpStr[index]); - if (!longName2DosName((const char *)fileName, dosName)) - strcpy_P(list_file.file_name[sel_id], PSTR("notValid")); - strcat((char *)list_file.file_name[sel_id], dosName); - strcat((char *)list_file.long_name[sel_id], dosName); } - else { - strcat((char *)list_file.file_name[sel_id], (char *)&tmpStr[index]); - strcat((char *)list_file.long_name[sel_id], (char *)&tmpStr[index]); - } - + else strcat((char *)fileName, &mStr[index]); + if (!longName2DosName((const char *)fileName, dosName)) + strcpy_P(list_file.file_name[sel_id], PSTR("notValid")); + strcat((char *)list_file.file_name[sel_id], dosName); + strcat((char *)list_file.long_name[sel_id], (const char *)fileName); } - else - strcpy(list_file.file_name[sel_id], (char *)&tmpStr[index]); - - char *cur_name=strrchr(list_file.file_name[sel_id],'/'); - - card.openFileRead(cur_name); - - if (card.isFileOpen()) - send_to_wifi((uint8_t *)"File selected\r\n", strlen("File selected\r\n")); else { - send_to_wifi((uint8_t *)"file.open failed\r\n", strlen("file.open failed\r\n")); - strcpy_P(list_file.file_name[sel_id], PSTR("notValid")); + strcat((char *)list_file.file_name[sel_id], &mStr[index]); + strcat((char *)list_file.long_name[sel_id], &mStr[index]); } - SEND_OK_TO_WIFI; + } + else + strcpy(list_file.file_name[sel_id], &mStr[index]); + + char *cur_name = strrchr(list_file.file_name[sel_id],'/'); + + card.openFileRead(cur_name); + + if (card.isFileOpen()) + send_to_wifi((uint8_t *)"File selected\r\n", strlen("File selected\r\n")); + else { + send_to_wifi((uint8_t *)"file.open failed\r\n", strlen("file.open failed\r\n")); + strcpy_P(list_file.file_name[sel_id], PSTR("notValid")); + } + send_ok_to_wifi(); } } - break; - - case 24: - if (strcmp_P(list_file.file_name[sel_id], PSTR("notValid")) != 0) { - if (uiCfg.print_state == IDLE) { - clear_cur_ui(); - reset_print_time(); - start_print_time(); - preview_gcode_prehandle(list_file.file_name[sel_id]); - uiCfg.print_state = WORKING; - lv_draw_printing(); - - #if ENABLED(SDSUPPORT) - if (!gcode_preview_over) { - char *cur_name = strrchr(list_file.file_name[sel_id], '/'); - - MediaFile file; - MediaFile *curDir; - card.abortFilePrintNow(); - const char * const fname = card.diveToFile(false, curDir, cur_name); - if (!fname) return; - if (file.open(curDir, fname, O_READ)) { - gCfgItems.curFilesize = file.fileSize(); - file.close(); - update_spi_flash(); - } - card.openFileRead(cur_name); - if (card.isFileOpen()) { - //saved_feedrate_percentage = feedrate_percentage; - feedrate_percentage = 100; - #if HAS_EXTRUDERS - planner.flow_percentage[0] = 100; - planner.e_factor[0] = planner.flow_percentage[0] * 0.01f; - #endif - #if HAS_MULTI_EXTRUDER - planner.flow_percentage[1] = 100; - planner.e_factor[1] = planner.flow_percentage[1] * 0.01f; - #endif - card.startOrResumeFilePrinting(); - TERN_(POWER_LOSS_RECOVERY, recovery.prepare()); - once_flag = false; - } - } - #endif - } - else if (uiCfg.print_state == PAUSED) { - uiCfg.print_state = RESUMING; - clear_cur_ui(); - start_print_time(); - - if (gCfgItems.from_flash_pic) - flash_preview_begin = true; - else - default_preview_flg = true; - lv_draw_printing(); - } - else if (uiCfg.print_state == REPRINTING) { - uiCfg.print_state = REPRINTED; - clear_cur_ui(); - start_print_time(); - if (gCfgItems.from_flash_pic) - flash_preview_begin = true; - else - default_preview_flg = true; - lv_draw_printing(); - } - } - SEND_OK_TO_WIFI; - break; - - case 25: - // Pause print file - if (uiCfg.print_state == WORKING) { - stop_print_time(); + } + break; + case 24: + if (strcmp_P(list_file.file_name[sel_id], PSTR("notValid")) != 0) { + if (uiCfg.print_state == IDLE) { clear_cur_ui(); + reset_print_time(); + start_print_time(); + preview_gcode_prehandle(list_file.file_name[sel_id]); + uiCfg.print_state = WORKING; + lv_draw_printing(); #if ENABLED(SDSUPPORT) - card.pauseSDPrint(); - uiCfg.print_state = PAUSING; + if (!gcode_preview_over) { + char *cur_name = strrchr(list_file.file_name[sel_id], '/'); + + MediaFile file; + MediaFile *curDir; + card.abortFilePrintNow(); + const char * const fname = card.diveToFile(false, curDir, cur_name); + if (!fname) return; + if (file.open(curDir, fname, O_READ)) { + gCfgItems.curFilesize = file.fileSize(); + file.close(); + update_spi_flash(); + } + card.openFileRead(cur_name); + if (card.isFileOpen()) { + //saved_feedrate_percentage = feedrate_percentage; + feedrate_percentage = 100; + #if HAS_EXTRUDERS + planner.flow_percentage[0] = 100; + planner.e_factor[0] = planner.flow_percentage[0] * 0.01f; + #endif + #if HAS_MULTI_EXTRUDER + planner.flow_percentage[1] = 100; + planner.e_factor[1] = planner.flow_percentage[1] * 0.01f; + #endif + card.startOrResumeFilePrinting(); + TERN_(POWER_LOSS_RECOVERY, recovery.prepare()); + once_flag = false; + } + } #endif + } + else if (uiCfg.print_state == PAUSED) { + uiCfg.print_state = RESUMING; + clear_cur_ui(); + start_print_time(); + if (gCfgItems.from_flash_pic) flash_preview_begin = true; else default_preview_flg = true; lv_draw_printing(); - SEND_OK_TO_WIFI; - } - break; - - case 26: - // Stop print file - if ((uiCfg.print_state == WORKING) || (uiCfg.print_state == PAUSED) || (uiCfg.print_state == REPRINTING)) { - stop_print_time(); - - clear_cur_ui(); - #if ENABLED(SDSUPPORT) - uiCfg.print_state = IDLE; - card.abortFilePrintSoon(); - #endif - - lv_draw_ready_print(); - - SEND_OK_TO_WIFI; - } - break; - - case 27: - // Report print rate - if ((uiCfg.print_state == WORKING) || (uiCfg.print_state == PAUSED)|| (uiCfg.print_state == REPRINTING)) { - print_rate = uiCfg.totalSend; - ZERO(tempBuf); - sprintf_P((char *)tempBuf, PSTR("M27 %d\r\n"), print_rate); - send_to_wifi((uint8_t *)tempBuf, strlen((char *)tempBuf)); - } - break; - - case 28: - // Begin to transfer file to filesys - if (uiCfg.print_state == IDLE) { - - int index = 0; - while (tmpStr[index] == ' ') index++; - - if (strstr_P((char *)&tmpStr[index], PSTR(".g")) || strstr_P((char *)&tmpStr[index], PSTR(".G"))) { - strcpy((char *)file_writer.saveFileName, (char *)&tmpStr[index]); - - if (gCfgItems.fileSysType == FILE_SYS_SD) { - ZERO(tempBuf); - sprintf_P((char *)tempBuf, PSTR("%s"), file_writer.saveFileName); - } - else if (gCfgItems.fileSysType == FILE_SYS_USB) { - ZERO(tempBuf); - sprintf_P((char *)tempBuf, PSTR("%s"), (char *)file_writer.saveFileName); - } - mount_file_sys(gCfgItems.fileSysType); - - #if ENABLED(SDSUPPORT) - char *cur_name = strrchr(list_file.file_name[sel_id], '/'); - card.openFileWrite(cur_name); - if (card.isFileOpen()) { - ZERO(file_writer.saveFileName); - strcpy((char *)file_writer.saveFileName, (char *)&tmpStr[index]); - ZERO(tempBuf); - sprintf_P((char *)tempBuf, PSTR("Writing to file: %s\r\n"), (char *)file_writer.saveFileName); - wifi_ret_ack(); - send_to_wifi((uint8_t *)tempBuf, strlen((char *)tempBuf)); - wifi_link_state = WIFI_WAIT_TRANS_START; - } - else { - wifi_link_state = WIFI_CONNECTED; - clear_cur_ui(); - lv_draw_dialog(DIALOG_TRANSFER_NO_DEVICE); - } - #endif - } - } - break; - - case 105: - case 991: - ZERO(tempBuf); - if (cmd_value == 105) { - - SEND_OK_TO_WIFI; - - char *outBuf = (char *)tempBuf; - char tbuf[34]; - - sprintf_P(tbuf, PSTR("%d /%d"), thermalManager.wholeDegHotend(0), thermalManager.degTargetHotend(0)); - - const int tlen = strlen(tbuf); - sprintf_P(outBuf, PSTR("T:%s"), tbuf); - outBuf += 2 + tlen; - - strcpy_P(outBuf, PSTR(" B:")); - outBuf += 3; - #if HAS_HEATED_BED - sprintf_P(outBuf, PSTR("%d /%d"), thermalManager.wholeDegBed(), thermalManager.degTargetBed()); - #else - strcpy_P(outBuf, PSTR("0 /0")); - #endif - outBuf += 4; - - strcat_P(outBuf, PSTR(" T0:")); - strcat(outBuf, tbuf); - outBuf += 4 + tlen; - - strcat_P(outBuf, PSTR(" T1:")); - outBuf += 4; - #if HAS_MULTI_HOTEND - sprintf_P(outBuf, PSTR("%d /%d"), thermalManager.wholeDegHotend(1), thermalManager.degTargetHotend(1)); - #else - strcpy_P(outBuf, PSTR("0 /0")); - #endif - outBuf += 4; - - strcat_P(outBuf, PSTR(" @:0 B@:0\r\n")); - } - else { - sprintf_P((char *)tempBuf, PSTR("T:%d /%d B:%d /%d T0:%d /%d T1:%d /%d @:0 B@:0\r\n"), - thermalManager.wholeDegHotend(0), thermalManager.degTargetHotend(0), - TERN0(HAS_HEATED_BED, thermalManager.wholeDegBed()), - TERN0(HAS_HEATED_BED, thermalManager.degTargetBed()), - thermalManager.wholeDegHotend(0), thermalManager.degTargetHotend(0), - TERN0(HAS_MULTI_HOTEND, thermalManager.wholeDegHotend(1)), - TERN0(HAS_MULTI_HOTEND, thermalManager.degTargetHotend(1)) - ); - } - - send_to_wifi((uint8_t *)tempBuf, strlen((char *)tempBuf)); - queue.enqueue_one(F("M105")); - break; - - case 992: - if ((uiCfg.print_state == WORKING) || (uiCfg.print_state == PAUSED)) { - ZERO(tempBuf); - sprintf_P((char *)tempBuf, PSTR("M992 %d%d:%d%d:%d%d\r\n"), print_time.hours/10, print_time.hours%10, print_time.minutes/10, print_time.minutes%10, print_time.seconds/10, print_time.seconds%10); - wifi_ret_ack(); - send_to_wifi((uint8_t *)tempBuf, strlen((char *)tempBuf)); - } - break; - - case 994: - if ((uiCfg.print_state == WORKING) || (uiCfg.print_state == PAUSED)) { - ZERO(tempBuf); - if (strlen((char *)list_file.file_name[sel_id]) > (100 - 1)) return; - sprintf_P((char *)tempBuf, PSTR("M994 %s;%d\n"), list_file.file_name[sel_id], (int)gCfgItems.curFilesize); - wifi_ret_ack(); - send_to_wifi((uint8_t *)tempBuf, strlen((char *)tempBuf)); - } - break; - - case 997: - if (uiCfg.print_state == IDLE) { - wifi_ret_ack(); - send_to_wifi((uint8_t *)"M997 IDLE\r\n", strlen("M997 IDLE\r\n")); - } - else if (uiCfg.print_state == WORKING) { - wifi_ret_ack(); - send_to_wifi((uint8_t *)"M997 PRINTING\r\n", strlen("M997 PRINTING\r\n")); - } - else if (uiCfg.print_state == PAUSED) { - wifi_ret_ack(); - send_to_wifi((uint8_t *)"M997 PAUSE\r\n", strlen("M997 PAUSE\r\n")); } else if (uiCfg.print_state == REPRINTING) { - wifi_ret_ack(); - send_to_wifi((uint8_t *)"M997 PAUSE\r\n", strlen("M997 PAUSE\r\n")); + uiCfg.print_state = REPRINTED; + clear_cur_ui(); + start_print_time(); + if (gCfgItems.from_flash_pic) + flash_preview_begin = true; + else + default_preview_flg = true; + lv_draw_printing(); } - if (!uiCfg.command_send) get_wifi_list_command_send(); - break; - - case 998: - if (uiCfg.print_state == IDLE) { - const int v = atoi((char *)tmpStr); - if (v == 0 || v == 1) set_cur_file_sys(v); - wifi_ret_ack(); - } - break; - - case 115: - ZERO(tempBuf); - SEND_OK_TO_WIFI; - send_to_wifi((uint8_t *)"FIRMWARE_NAME:Robin_nano\r\n", strlen("FIRMWARE_NAME:Robin_nano\r\n")); - break; - - default: - strcat_P((char *)cmd_line, PSTR("\n")); - - if (espGcodeFifo.wait_tick > 5) { - const uint32_t left = espGcodeFifo.r > espGcodeFifo.w - ? espGcodeFifo.r - espGcodeFifo.w - 1 - : WIFI_GCODE_BUFFER_SIZE + espGcodeFifo.r - espGcodeFifo.w - 1; - - if (left >= strlen((const char *)cmd_line)) { - for (uint32_t index = 0; index < strlen((const char *)cmd_line); index++) { - espGcodeFifo.Buffer[espGcodeFifo.w] = cmd_line[index] ; - espGcodeFifo.w = (espGcodeFifo.w + 1) % WIFI_GCODE_BUFFER_SIZE; - } - if (left - WIFI_GCODE_BUFFER_LEAST_SIZE >= strlen((const char *)cmd_line)) - SEND_OK_TO_WIFI; - else - need_ok_later = true; - } - } - break; - } - } - else { - strcat_P((char *)cmd_line, PSTR("\n")); - - if (espGcodeFifo.wait_tick > 5) { - const uint32_t left_g = espGcodeFifo.r > espGcodeFifo.w - ? espGcodeFifo.r - espGcodeFifo.w - 1 - : WIFI_GCODE_BUFFER_SIZE + espGcodeFifo.r - espGcodeFifo.w - 1; - - if (left_g >= strlen((const char *)cmd_line)) { - for (uint32_t index = 0; index < strlen((const char *)cmd_line); index++) { - espGcodeFifo.Buffer[espGcodeFifo.w] = cmd_line[index] ; - espGcodeFifo.w = (espGcodeFifo.w + 1) % WIFI_GCODE_BUFFER_SIZE; - } - if (left_g - WIFI_GCODE_BUFFER_LEAST_SIZE >= strlen((const char *)cmd_line)) - SEND_OK_TO_WIFI; - else - need_ok_later = true; } + send_ok_to_wifi(); + break; + + case 25: + // Pause print file + if (uiCfg.print_state == WORKING) { + stop_print_time(); + + clear_cur_ui(); + + #if ENABLED(SDSUPPORT) + card.pauseSDPrint(); + uiCfg.print_state = PAUSING; + #endif + if (gCfgItems.from_flash_pic) + flash_preview_begin = true; + else + default_preview_flg = true; + lv_draw_printing(); + send_ok_to_wifi(); + } + break; + + case 26: + // Stop print file + if (uiCfg.print_state == WORKING || uiCfg.print_state == PAUSED || uiCfg.print_state == REPRINTING) { + stop_print_time(); + + clear_cur_ui(); + #if ENABLED(SDSUPPORT) + uiCfg.print_state = IDLE; + card.abortFilePrintSoon(); + #endif + + lv_draw_ready_print(); + + send_ok_to_wifi(); + } + break; + + case 27: + // Report print rate + if (uiCfg.print_state == WORKING || uiCfg.print_state == PAUSED|| uiCfg.print_state == REPRINTING) { + print_rate = uiCfg.totalSend; + ZERO(tempBuf); + sprintf_P((char *)tempBuf, PSTR("M27 %d\r\n"), print_rate); + send_to_wifi((uint8_t *)tempBuf, strlen((char *)tempBuf)); + } + break; + + case 28: + // Begin to transfer file to filesys + if (uiCfg.print_state == IDLE) { + + int index = 0; + while (mStr[index] == ' ') index++; + + if (strstr_P(&mStr[index], PSTR(".g")) || strstr_P(&mStr[index], PSTR(".G"))) { + strcpy((char *)file_writer.saveFileName, &mStr[index]); + + if (gCfgItems.fileSysType == FILE_SYS_SD) { + ZERO(tempBuf); + sprintf_P((char *)tempBuf, PSTR("%s"), file_writer.saveFileName); + } + else if (gCfgItems.fileSysType == FILE_SYS_USB) { + ZERO(tempBuf); + sprintf_P((char *)tempBuf, PSTR("%s"), (char *)file_writer.saveFileName); + } + mount_file_sys(gCfgItems.fileSysType); + + #if ENABLED(SDSUPPORT) + char *cur_name = strrchr(list_file.file_name[sel_id], '/'); + card.openFileWrite(cur_name); + if (card.isFileOpen()) { + ZERO(file_writer.saveFileName); + strcpy((char *)file_writer.saveFileName, &mStr[index]); + ZERO(tempBuf); + sprintf_P((char *)tempBuf, PSTR("Writing to file: %s\r\n"), (char *)file_writer.saveFileName); + wifi_ret_ack(); + send_to_wifi((uint8_t *)tempBuf, strlen((char *)tempBuf)); + wifi_link_state = WIFI_WAIT_TRANS_START; + } + else { + wifi_link_state = WIFI_CONNECTED; + clear_cur_ui(); + lv_draw_dialog(DIALOG_TRANSFER_NO_DEVICE); + } + #endif + } + } + break; + + case 105: + case 991: + ZERO(tempBuf); + if (cmd_value == 105) { + + send_ok_to_wifi(); + + char *outBuf = (char *)tempBuf; + char tbuf[34]; + + sprintf_P(tbuf, PSTR("%d /%d"), thermalManager.wholeDegHotend(0), thermalManager.degTargetHotend(0)); + + const int tlen = strlen(tbuf); + sprintf_P(outBuf, PSTR("T:%s"), tbuf); + outBuf += 2 + tlen; + + strcpy_P(outBuf, PSTR(" B:")); + outBuf += 3; + #if HAS_HEATED_BED + sprintf_P(outBuf, PSTR("%d /%d"), thermalManager.wholeDegBed(), thermalManager.degTargetBed()); + #else + strcpy_P(outBuf, PSTR("0 /0")); + #endif + outBuf += 4; + + strcat_P(outBuf, PSTR(" T0:")); + strcat(outBuf, tbuf); + outBuf += 4 + tlen; + + strcat_P(outBuf, PSTR(" T1:")); + outBuf += 4; + #if HAS_MULTI_HOTEND + sprintf_P(outBuf, PSTR("%d /%d"), thermalManager.wholeDegHotend(1), thermalManager.degTargetHotend(1)); + #else + strcpy_P(outBuf, PSTR("0 /0")); + #endif + outBuf += 4; + + strcat_P(outBuf, PSTR(" @:0 B@:0\r\n")); + } + else { + sprintf_P((char *)tempBuf, PSTR("T:%d /%d B:%d /%d T0:%d /%d T1:%d /%d @:0 B@:0\r\n"), + thermalManager.wholeDegHotend(0), thermalManager.degTargetHotend(0), + TERN0(HAS_HEATED_BED, thermalManager.wholeDegBed()), + TERN0(HAS_HEATED_BED, thermalManager.degTargetBed()), + thermalManager.wholeDegHotend(0), thermalManager.degTargetHotend(0), + TERN0(HAS_MULTI_HOTEND, thermalManager.wholeDegHotend(1)), + TERN0(HAS_MULTI_HOTEND, thermalManager.degTargetHotend(1)) + ); + } + + send_to_wifi((uint8_t *)tempBuf, strlen((char *)tempBuf)); + queue.enqueue_one(F("M105")); + break; + + case 992: + if (uiCfg.print_state == WORKING || uiCfg.print_state == PAUSED) { + ZERO(tempBuf); + sprintf_P((char *)tempBuf, PSTR("M992 %d%d:%d%d:%d%d\r\n"), print_time.hours/10, print_time.hours%10, print_time.minutes/10, print_time.minutes%10, print_time.seconds/10, print_time.seconds%10); + wifi_ret_ack(); + send_to_wifi((uint8_t *)tempBuf, strlen((char *)tempBuf)); + } + break; + + case 994: + if (uiCfg.print_state == WORKING || uiCfg.print_state == PAUSED) { + ZERO(tempBuf); + if (strlen((char *)list_file.file_name[sel_id]) > (100 - 1)) return; + sprintf_P((char *)tempBuf, PSTR("M994 %s;%d\n"), list_file.file_name[sel_id], (int)gCfgItems.curFilesize); + wifi_ret_ack(); + send_to_wifi((uint8_t *)tempBuf, strlen((char *)tempBuf)); + } + break; + + case 997: + #define SENDIDLE "M997 IDLE\r\n" + #define SENDPRINTING "M997 PRINTING\r\n" + #define SENDPAUSE "M997 PAUSE\r\n" + switch (uiCfg.print_state) { + default: break; + case IDLE: + wifi_ret_ack(); + send_to_wifi((uint8_t *)SENDIDLE, strlen(SENDIDLE)); + break; + case WORKING: + wifi_ret_ack(); + send_to_wifi((uint8_t *)SENDPRINTING, strlen(SENDPRINTING)); + break; + case PAUSED: + wifi_ret_ack(); + send_to_wifi((uint8_t *)SENDPAUSE, strlen(SENDPAUSE)); + break; + case REPRINTING: + wifi_ret_ack(); + send_to_wifi((uint8_t *)SENDPAUSE, strlen(SENDPAUSE)); + break; + } + if (!uiCfg.command_send) get_wifi_list_command_send(); + break; + + case 998: + if (uiCfg.print_state == IDLE) { + const int v = atoi(mStr); + if (v == 0 || v == 1) set_cur_file_sys(v); + wifi_ret_ack(); + } + break; + + case 115: + ZERO(tempBuf); + send_ok_to_wifi(); + #define SENDFW "FIRMWARE_NAME:Robin_nano\r\n" + send_to_wifi((uint8_t *)SENDFW, strlen(SENDFW)); + break; + + default: + strcat_P((char *)cmd_line, PSTR("\n")); + + if (espGcodeFifo.wait_tick > 5) { + uint32_t left = espGcodeFifo.r - espGcodeFifo.w - 1; + if (espGcodeFifo.r > espGcodeFifo.w) left += WIFI_GCODE_BUFFER_SIZE; + + if (left >= strlen((const char *)cmd_line)) { + for (uint32_t index = 0; index < strlen((const char *)cmd_line); index++) { + espGcodeFifo.Buffer[espGcodeFifo.w] = cmd_line[index]; + espGcodeFifo.w = (espGcodeFifo.w + 1) % (WIFI_GCODE_BUFFER_SIZE); + } + if (left - (WIFI_GCODE_BUFFER_LEAST_SIZE) >= strlen((const char *)cmd_line)) + send_ok_to_wifi(); + else + need_ok_later = true; + } + } + break; + } + } + else { + // Add another linefeed to the command, terminate with null + strcat_P((char *)cmd_line, PSTR("\n")); + + if (espGcodeFifo.wait_tick > 5) { + uint32_t left_g = espGcodeFifo.r - espGcodeFifo.w - 1; + if (espGcodeFifo.r > espGcodeFifo.w) left_g += WIFI_GCODE_BUFFER_SIZE; + + if (left_g >= strlen((char * const)cmd_line)) { + for (uint32_t index = 0; index < strlen((char * const)cmd_line); index++) { + espGcodeFifo.Buffer[espGcodeFifo.w] = cmd_line[index]; + espGcodeFifo.w = (espGcodeFifo.w + 1) % (WIFI_GCODE_BUFFER_SIZE); + } + if (left_g - (WIFI_GCODE_BUFFER_LEAST_SIZE) >= strlen((char * const)cmd_line)) + send_ok_to_wifi(); + else + need_ok_later = true; } } } @@ -1281,7 +1309,7 @@ void get_wifi_list_command_send() { raw_send_to_wifi(cmd_wifi_list, COUNT(cmd_wifi_list)); } -static void net_msg_handle(uint8_t * msg, uint16_t msgLen) { +static void net_msg_handle(const uint8_t * const msg, const uint16_t msgLen) { int wifiNameLen, wifiKeyLen, hostLen, id_len, ver_len; if (msgLen <= 0) return; @@ -1316,7 +1344,7 @@ static void net_msg_handle(uint8_t * msg, uint16_t msgLen) { } } - cloud_para.state =msg[10 + wifiNameLen + wifiKeyLen]; + cloud_para.state = msg[10 + wifiNameLen + wifiKeyLen]; hostLen = msg[11 + wifiNameLen + wifiKeyLen]; if (cloud_para.state) { if (hostLen < 96) { @@ -1356,7 +1384,7 @@ static void net_msg_handle(uint8_t * msg, uint16_t msgLen) { } } -static void wifi_list_msg_handle(uint8_t * msg, uint16_t msgLen) { +static void wifi_list_msg_handle(const uint8_t * const msg, const uint16_t msgLen) { int wifiNameLen,wifiMsgIdex = 1; int8_t wifi_name_is_same = 0; int8_t i, j; @@ -1415,16 +1443,15 @@ static void wifi_list_msg_handle(uint8_t * msg, uint16_t msgLen) { } } -static void gcode_msg_handle(uint8_t * msg, uint16_t msgLen) { +static void gcode_msg_handle(const uint8_t * const msg, const uint16_t msgLen) { uint8_t gcodeBuf[100] = { 0 }; - char *index_s, *index_e; if (msgLen <= 0) return; - index_s = (char *)msg; - index_e = (char *)strchr((char *)msg, '\n'); + char *index_s = (char *)msg, + *index_e = strchr((char *)msg, '\n'); if (*msg == 'N') { - index_s = (char *)strchr((char *)msg, ' '); + index_s = strchr((char *)msg, ' '); while (*index_s == ' ') index_s++; } while ((index_e != 0) && ((int)index_s < (int)index_e)) { @@ -1435,7 +1462,7 @@ static void gcode_msg_handle(uint8_t * msg, uint16_t msgLen) { } while ((*index_e == '\r') || (*index_e == '\n')) index_e++; index_s = index_e; - index_e = (char *)strchr(index_s, '\n'); + index_e = strchr(index_s, '\n'); } } @@ -1482,8 +1509,8 @@ void utf8_2_unicode(uint8_t *source, uint8_t Len) { COPY(source, FileName_unicode); } -static void file_first_msg_handle(uint8_t * msg, uint16_t msgLen) { - uint8_t fileNameLen = *msg; +static void file_first_msg_handle(const uint8_t * const msg, const uint16_t msgLen) { + const uint8_t fileNameLen = *msg; if (msgLen != fileNameLen + 5) return; @@ -1565,8 +1592,8 @@ static void file_first_msg_handle(uint8_t * msg, uint16_t msgLen) { #define FRAG_MASK ~_BV32(31) -static void file_fragment_msg_handle(uint8_t * msg, uint16_t msgLen) { - uint32_t frag = *((uint32_t *)msg); +static void file_fragment_msg_handle(const uint8_t * const msg, const uint16_t msgLen) { + const uint32_t frag = *((uint32_t *)msg); if ((frag & FRAG_MASK) != (uint32_t)(lastFragment + 1)) { ZERO(public_buf); file_writer.write_index = 0; @@ -1842,7 +1869,7 @@ void wifi_rcv_handle() { } if (need_ok_later && !queue.ring_buffer.full()) { need_ok_later = false; - send_to_wifi((uint8_t *)"ok\r\n", strlen("ok\r\n")); + send_ok_to_wifi(); } } @@ -1872,7 +1899,7 @@ void wifi_rcv_handle() { if (wifiTransError.flag == 0x1) { wifiTransError.now_tick = getWifiTick(); - if (getWifiTickDiff(wifiTransError.start_tick, wifiTransError.now_tick) > WAIT_ESP_TRANS_TIMEOUT_TICK) { + if (getWifiTickDiff(wifiTransError.start_tick, wifiTransError.now_tick) > (WAIT_ESP_TRANS_TIMEOUT_TICK)) { wifiTransError.flag = 0; WIFI_IO1_RESET(); } @@ -1992,7 +2019,7 @@ void get_wifi_commands() { char wifi_char = espGcodeFifo.Buffer[espGcodeFifo.r]; - espGcodeFifo.r = (espGcodeFifo.r + 1) % WIFI_GCODE_BUFFER_SIZE; + espGcodeFifo.r = (espGcodeFifo.r + 1) % (WIFI_GCODE_BUFFER_SIZE); /** * If the character ends the line diff --git a/Marlin/src/lcd/extui/mks_ui/wifi_module.h b/Marlin/src/lcd/extui/mks_ui/wifi_module.h index 36998899b4..851e85c512 100644 --- a/Marlin/src/lcd/extui/mks_ui/wifi_module.h +++ b/Marlin/src/lcd/extui/mks_ui/wifi_module.h @@ -163,8 +163,8 @@ typedef struct { //uint8_t uartTxBuffer[UART_FIFO_BUFFER_SIZE]; } SZ_USART_FIFO; -#define WIFI_GCODE_BUFFER_LEAST_SIZE 96 -#define WIFI_GCODE_BUFFER_SIZE (WIFI_GCODE_BUFFER_LEAST_SIZE * 3) +#define WIFI_GCODE_BUFFER_LEAST_SIZE 96 +#define WIFI_GCODE_BUFFER_SIZE (WIFI_GCODE_BUFFER_LEAST_SIZE * 3) typedef struct { uint8_t wait_tick; uint8_t Buffer[WIFI_GCODE_BUFFER_SIZE]; @@ -179,14 +179,14 @@ extern CLOUD_PARA cloud_para; extern WIFI_GCODE_BUFFER espGcodeFifo; -uint32_t getWifiTick(); -uint32_t getWifiTickDiff(int32_t lastTick, int32_t curTick); +millis_t getWifiTick(); +millis_t getWifiTickDiff(const millis_t lastTick, const millis_t curTick); void mks_esp_wifi_init(); extern int cfg_cloud_flag; -int send_to_wifi(uint8_t *buf, int len); +int send_to_wifi(uint8_t * const buf, const int len); void wifi_looping(); -int raw_send_to_wifi(uint8_t *buf, int len); +int raw_send_to_wifi(uint8_t * const buf, const int len); int package_to_wifi(WIFI_RET_TYPE type, uint8_t *buf, int len); void get_wifi_list_command_send(); void get_wifi_commands(); diff --git a/Marlin/src/lcd/extui/mks_ui/wifi_upload.cpp b/Marlin/src/lcd/extui/mks_ui/wifi_upload.cpp index 44869d4770..398d35fdc3 100644 --- a/Marlin/src/lcd/extui/mks_ui/wifi_upload.cpp +++ b/Marlin/src/lcd/extui/mks_ui/wifi_upload.cpp @@ -38,10 +38,8 @@ extern SZ_USART_FIFO WifiRxFifo; -extern int readUsartFifo(SZ_USART_FIFO *fifo, int8_t *buf, int32_t len); -extern int writeUsartFifo(SZ_USART_FIFO * fifo, int8_t * buf, int32_t len); void esp_port_begin(uint8_t interrupt); -void wifi_delay(int n); +void wifi_delay(const uint16_t n); #define ARRAY_SIZE(a) sizeof(a) / sizeof((a)[0]) @@ -246,7 +244,7 @@ EspUploadResult readPacket(uint8_t op, uint32_t *valp, size_t *bodyLen, uint32_t const size_t headerLength = 8; - uint32_t startTime = getWifiTick(); + const millis_t startTime = getWifiTick(); uint8_t hdr[headerLength]; uint16_t hdrIdx = 0; diff --git a/Marlin/src/lcd/extui/mks_ui/wifi_upload.h b/Marlin/src/lcd/extui/mks_ui/wifi_upload.h index 2daa505d90..524fb28f85 100644 --- a/Marlin/src/lcd/extui/mks_ui/wifi_upload.h +++ b/Marlin/src/lcd/extui/mks_ui/wifi_upload.h @@ -59,8 +59,8 @@ typedef struct { UploadState state; uint32_t retriesPerBaudRate; uint32_t connectAttemptNumber; - uint32_t lastAttemptTime; - uint32_t lastResetTime; + millis_t lastAttemptTime; + millis_t lastResetTime; uint32_t uploadBlockNumber; uint32_t uploadNextPercentToReport; EspUploadResult uploadResult; From 8c64fdd091f825d7fdcb0eb903c5d1af49c76129 Mon Sep 17 00:00:00 2001 From: Liam Powell Date: Sat, 18 Mar 2023 17:41:20 +0800 Subject: [PATCH 043/225] =?UTF-8?q?=F0=9F=94=A8=20Fix=20STM32H723Vx=5Fbtt?= =?UTF-8?q?=20for=20case-sensitive=20(#25535)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buildroot/share/PlatformIO/boards/marlin_STM32H723Vx.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildroot/share/PlatformIO/boards/marlin_STM32H723Vx.json b/buildroot/share/PlatformIO/boards/marlin_STM32H723Vx.json index 73620c162d..a2154d448a 100644 --- a/buildroot/share/PlatformIO/boards/marlin_STM32H723Vx.json +++ b/buildroot/share/PlatformIO/boards/marlin_STM32H723Vx.json @@ -6,7 +6,7 @@ "f_cpu": "550000000L", "mcu": "stm32h723vet6", "product_line": "STM32H723xx", - "variant": "MARLIN_H723vx" + "variant": "MARLIN_H723Vx" }, "connectivity": [ "can", From 927915a4e68772c348d3c67689363fc512559d14 Mon Sep 17 00:00:00 2001 From: George Fu Date: Sat, 18 Mar 2023 17:47:54 +0800 Subject: [PATCH 044/225] =?UTF-8?q?=F0=9F=90=9B=20Fix=20FYSETC=20Cheetah?= =?UTF-8?q?=20v2.0=20Servo/Probe=20pins=20(#24635)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- .../pins/stm32f4/pins_FYSETC_CHEETAH_V20.h | 26 ++++++++++--------- .../MARLIN_FYSETC_CHEETAH_V20/variant.h | 2 +- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h b/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h index 32ec518bf8..031caa1ce1 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h @@ -43,22 +43,24 @@ #define FLASH_ADDRESS_START 0x8004000 #endif -// -// Z Probe -// -#if ENABLED(BLTOUCH) - #error "You need to set jumper to 5v for Bltouch, then comment out this line to proceed." - #define SERVO0_PIN PA0 -#elif !defined(Z_MIN_PROBE_PIN) - #define Z_MIN_PROBE_PIN PA0 -#endif +#define SERVO0_PIN PB1 // BL-TOUCH/PWM // // Limit Switches // -#define X_STOP_PIN PB4 -#define Y_STOP_PIN PC8 -#define Z_STOP_PIN PB1 +#define X_STOP_PIN PB4 // X-MIN +#define Y_STOP_PIN PC8 // Y-MIN +#define Z_STOP_PIN PA0 // Z-MIN + +// +// Z Probe +// +#if ENABLED(BLTOUCH) + #error "You need to set jumper to 5V for BLTouch, then comment out this line to proceed." +#endif +#ifndef Z_MIN_PROBE_PIN + #define Z_MIN_PROBE_PIN PB1 // BL-TOUCH/PWM repurposed +#endif // // Filament runout diff --git a/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/variant.h index a090113fa3..041c43b55f 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/variant.h @@ -95,7 +95,7 @@ extern "C" { // Timer Definitions #define TIMER_TONE TIM2 // TIMER_TONE must be defined in this file -#define TIMER_SERVO TIM5 // TIMER_SERVO must be defined in this file +#define TIMER_SERVO TIM3 // TIMER_SERVO must be defined in this file #define TIMER_SERIAL TIM11 // TIMER_SERIAL must be defined in this file // UART Definitions From fbb1c82bc2acbbe3339e2283a797126b3c3ea515 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Paczy=C5=84ski?= Date: Sat, 18 Mar 2023 11:01:10 +0100 Subject: [PATCH 045/225] =?UTF-8?q?=F0=9F=90=9B=20Prevent=20MPC=20E-permm?= =?UTF-8?q?=20overrun=20in=20Load=20Filament=20(#25531)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/src/feature/pause.cpp | 5 +++++ Marlin/src/module/temperature.cpp | 17 +++++++++-------- Marlin/src/module/temperature.h | 8 +++----- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/Marlin/src/feature/pause.cpp b/Marlin/src/feature/pause.cpp index 83d149fa09..488f5920c2 100644 --- a/Marlin/src/feature/pause.cpp +++ b/Marlin/src/feature/pause.cpp @@ -234,6 +234,8 @@ bool load_filament(const_float_t slow_load_length/*=0*/, const_float_t fast_load TERN_(BELTPRINTER, do_blocking_move_to_xy(0.00, 50.00)); + TERN_(MPCTEMP, MPC::e_paused = true); + // Slow Load filament if (slow_load_length) unscaled_e_move(slow_load_length, FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE); @@ -297,6 +299,9 @@ bool load_filament(const_float_t slow_load_length/*=0*/, const_float_t fast_load } while (TERN0(M600_PURGE_MORE_RESUMABLE, pause_menu_response == PAUSE_RESPONSE_EXTRUDE_MORE)); #endif + + TERN_(MPCTEMP, MPC::e_paused = false); + TERN_(HOST_PROMPT_SUPPORT, hostui.prompt_end()); return true; diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index bafade45dd..578fd112d2 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -319,6 +319,11 @@ PGMSTR(str_t_heating_failed, STR_T_HEATING_FAILED); hotend_info_t Temperature::temp_hotend[HOTENDS]; constexpr celsius_t Temperature::hotend_maxtemp[HOTENDS]; + #if ENABLED(MPCTEMP) + bool MPC::e_paused; // = false + int32_t MPC::e_position; // = 0 + #endif + // Sanity-check max readable temperatures #define CHECK_MAXTEMP_(N,M,S) static_assert( \ S >= 998 || M <= _MAX(TT_NAME(S)[0].celsius, TT_NAME(S)[COUNT(TT_NAME(S)) - 1].celsius) - HOTEND_OVERSHOOT, \ @@ -588,10 +593,6 @@ PGMSTR(str_t_heating_failed, STR_T_HEATING_FAILED); volatile bool Temperature::raw_temps_ready = false; -#if ENABLED(MPCTEMP) - int32_t Temperature::mpc_e_position; // = 0 -#endif - #define TEMPDIR(N) ((TEMP_SENSOR_##N##_RAW_LO_TEMP) < (TEMP_SENSOR_##N##_RAW_HI_TEMP) ? 1 : -1) #define TP_CMP(S,A,B) (TEMPDIR(S) < 0 ? ((A)<(B)) : ((A)>(B))) @@ -1511,14 +1512,14 @@ void Temperature::mintemp_error(const heater_id_t heater_id) { if (this_hotend) { const int32_t e_position = stepper.position(E_AXIS); - const float e_speed = (e_position - mpc_e_position) * planner.mm_per_step[E_AXIS] / MPC_dT; + const float e_speed = (e_position - MPC::e_position) * planner.mm_per_step[E_AXIS] / MPC_dT; // The position can appear to make big jumps when, e.g., homing if (fabs(e_speed) > planner.settings.max_feedrate_mm_s[E_AXIS]) - mpc_e_position = e_position; + MPC::e_position = e_position; else if (e_speed > 0.0f) { // Ignore retract/recover moves - ambient_xfer_coeff += e_speed * mpc.filament_heat_capacity_permm; - mpc_e_position = e_position; + if (!MPC::e_paused) ambient_xfer_coeff += e_speed * mpc.filament_heat_capacity_permm; + MPC::e_position = e_position; } } diff --git a/Marlin/src/module/temperature.h b/Marlin/src/module/temperature.h index b8bf03bf31..0ab00ef768 100644 --- a/Marlin/src/module/temperature.h +++ b/Marlin/src/module/temperature.h @@ -377,7 +377,9 @@ typedef struct { float p, i, d, c, f; } raw_pidcf_t; #elif ENABLED(MPCTEMP) - typedef struct { + typedef struct MPC { + static bool e_paused; // Pause E filament permm tracking + static int32_t e_position; // For E tracking float heater_power; // M306 P float block_heat_capacity; // M306 C float sensor_responsiveness; // M306 R @@ -716,10 +718,6 @@ class Temperature { static hotend_watch_t watch_hotend[HOTENDS]; #endif - #if ENABLED(MPCTEMP) - static int32_t mpc_e_position; - #endif - #if HAS_HOTEND static temp_range_t temp_range[HOTENDS]; #endif From 5abfc6160f57f5e37c7e88bead4b5eef88832a9e Mon Sep 17 00:00:00 2001 From: Farva42 <100859196+Farva42@users.noreply.github.com> Date: Sat, 18 Mar 2023 04:14:51 -0600 Subject: [PATCH 046/225] =?UTF-8?q?=F0=9F=9A=B8=20Fix=20/=20improve=20LCD?= =?UTF-8?q?=5FBED=5FTRAMMING=20(#25425)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/src/gcode/probe/M401_M402.cpp | 27 ++-- Marlin/src/lcd/menu/menu_bed_tramming.cpp | 142 +++++++++++++--------- Marlin/src/module/probe.cpp | 7 +- Marlin/src/module/probe.h | 8 +- 4 files changed, 105 insertions(+), 79 deletions(-) diff --git a/Marlin/src/gcode/probe/M401_M402.cpp b/Marlin/src/gcode/probe/M401_M402.cpp index 3389574919..7114cad9e8 100644 --- a/Marlin/src/gcode/probe/M401_M402.cpp +++ b/Marlin/src/gcode/probe/M401_M402.cpp @@ -38,30 +38,33 @@ * With BLTOUCH_HS_MODE: * H Report the current BLTouch HS mode state and exit * S Set High Speed (HS) Mode and exit without deploy + * + * R Remain in place after deploying (and before activating) the probe */ void GcodeSuite::M401() { - const bool seenH = parser.seen_test('H'), - seenS = parser.seen('S'); - if (seenH || seenS) { - #ifdef BLTOUCH_HS_MODE + #ifdef BLTOUCH_HS_MODE + const bool seenH = parser.seen_test('H'), + seenS = parser.seen('S'); + if (seenH || seenS) { if (seenS) bltouch.high_speed_mode = parser.value_bool(); SERIAL_ECHO_START(); SERIAL_ECHOPGM("BLTouch HS mode "); serialprintln_onoff(bltouch.high_speed_mode); - #endif - } - else { - probe.deploy(); - TERN_(PROBE_TARE, probe.tare()); - report_current_position(); - } + return; + } + #endif + + probe.deploy(parser.boolval('R')); + TERN_(PROBE_TARE, probe.tare()); + report_current_position(); } /** * M402: Deactivate and stow the Z probe + * R Remain in place after stowing (and before deactivating) the probe */ void GcodeSuite::M402() { - probe.stow(); + probe.stow(parser.boolval('R')); probe.move_z_after_probing(); report_current_position(); } diff --git a/Marlin/src/lcd/menu/menu_bed_tramming.cpp b/Marlin/src/lcd/menu/menu_bed_tramming.cpp index 5f1b547871..8129a347c3 100644 --- a/Marlin/src/lcd/menu/menu_bed_tramming.cpp +++ b/Marlin/src/lcd/menu/menu_bed_tramming.cpp @@ -43,6 +43,10 @@ #define BED_TRAMMING_HEIGHT 0.0 #endif +#if BOTH(HAS_STOWABLE_PROBE, BED_TRAMMING_USE_PROBE) && DISABLED(BLTOUCH) + #define NEEDS_PROBE_DEPLOY 1 +#endif + #if ENABLED(BED_TRAMMING_USE_PROBE) #include "../../module/probe.h" #include "../../module/endstops.h" @@ -97,38 +101,38 @@ constexpr xy_pos_t lf { (X_MIN_BED) + inset_lfrb[0], (Y_MIN_BED) + inset_lfrb[1] static int8_t bed_corner; /** - * Select next corner coordinates + * Move to the next corner coordinates */ -static void _lcd_bed_tramming_get_next_position() { +static void _lcd_goto_next_corner() { + xy_pos_t corner_point = lf; // Left front if (tramming_3_points) { if (bed_corner >= available_points) bed_corner = 0; // Above max position -> move back to first corner switch (bed_corner) { case 0 ... 1: // First two corners set explicitly by the configuration - current_position = lf; // Left front switch (lco[bed_corner]) { - case RF: current_position.x = rb.x; break; // Right Front - case RB: current_position = rb; break; // Right Back - case LB: current_position.y = rb.y; break; // Left Back + case RF: corner_point.x = rb.x; break; // Right Front + case RB: corner_point = rb; break; // Right Back + case LB: corner_point.y = rb.y; break; // Left Back } break; case 2: // Determine which edge to probe for 3rd point - current_position.set(lf.x + (rb.x - lf.x) / 2, lf.y + (rb.y - lf.y) / 2); - if ((lco[0] == LB && lco[1] == RB) || (lco[0] == RB && lco[1] == LB)) current_position.y = lf.y; // Front Center - if ((lco[0] == LF && lco[1] == LB) || (lco[0] == LB && lco[1] == LF)) current_position.x = rb.x; // Center Right - if ((lco[0] == RF && lco[1] == RB) || (lco[0] == RB && lco[1] == RF)) current_position.x = lf.x; // Left Center - if ((lco[0] == LF && lco[1] == RF) || (lco[0] == RF && lco[1] == LF)) current_position.y = rb.y; // Center Back - #if DISABLED(BED_TRAMMING_INCLUDE_CENTER) && ENABLED(BED_TRAMMING_USE_PROBE) + corner_point.set(lf.x + (rb.x - lf.x) / 2, lf.y + (rb.y - lf.y) / 2); + if ((lco[0] == LB && lco[1] == RB) || (lco[0] == RB && lco[1] == LB)) corner_point.y = lf.y; // Front Center + if ((lco[0] == LF && lco[1] == LB) || (lco[0] == LB && lco[1] == LF)) corner_point.x = rb.x; // Center Right + if ((lco[0] == RF && lco[1] == RB) || (lco[0] == RB && lco[1] == RF)) corner_point.x = lf.x; // Left Center + if ((lco[0] == LF && lco[1] == RF) || (lco[0] == RF && lco[1] == LF)) corner_point.y = rb.y; // Center Back + #if ENABLED(BED_TRAMMING_USE_PROBE) && DISABLED(BED_TRAMMING_INCLUDE_CENTER) bed_corner++; // Must increment the count to ensure it resets the loop if the 3rd point is out of tolerance #endif break; #if ENABLED(BED_TRAMMING_INCLUDE_CENTER) case 3: - current_position.set(X_CENTER, Y_CENTER); + corner_point.set(X_CENTER, Y_CENTER); break; #endif } @@ -136,23 +140,29 @@ static void _lcd_bed_tramming_get_next_position() { else { // Four-Corner Bed Tramming with optional center if (TERN0(BED_TRAMMING_INCLUDE_CENTER, bed_corner == center_index)) { - current_position.set(X_CENTER, Y_CENTER); - TERN_(BED_TRAMMING_USE_PROBE, good_points--); // Decrement to allow one additional probe point + corner_point.set(X_CENTER, Y_CENTER); } else { - current_position = lf; // Left front switch (lco[bed_corner]) { - case RF: current_position.x = rb.x; break; // Right Front - case RB: current_position = rb; break; // Right Back - case LB: current_position.y = rb.y; break; // Left Back + case RF: corner_point.x = rb.x; break; // Right Front + case RB: corner_point = rb; break; // Right Back + case LB: corner_point.y = rb.y; break; // Left Back } } } + + float z = BED_TRAMMING_Z_HOP; + #if BOTH(BED_TRAMMING_USE_PROBE, BLTOUCH) + z += bltouch.z_extra_clearance(); + #endif + line_to_z(z); + do_blocking_move_to_xy(DIFF_TERN(BED_TRAMMING_USE_PROBE, corner_point, probe.offset_xy), manual_feedrate_mm_s.x); + #if DISABLED(BED_TRAMMING_USE_PROBE) + line_to_z(BED_TRAMMING_HEIGHT); + if (++bed_corner >= available_points) bed_corner = 0; + #endif } -/** - * Level corners, starting in the front-left corner. - */ #if ENABLED(BED_TRAMMING_USE_PROBE) #define VALIDATE_POINT(X, Y, STR) static_assert(Probe::build_time::can_reach((X), (Y)), \ @@ -210,13 +220,21 @@ static void _lcd_bed_tramming_get_next_position() { MenuItem_confirm::select_screen( GET_TEXT_F(TERN(HAS_LEVELING, MSG_BUTTON_LEVEL, MSG_BUTTON_DONE)) , TERN(HAS_LEVELING, GET_TEXT_F(MSG_BUTTON_BACK), nullptr) - , []{ queue.inject(TERN(HAS_LEVELING, F("G29N"), FPSTR(G28_STR))); ui.return_to_status(); } - , TERN(HAS_LEVELING, ui.goto_previous_screen_no_defer, []{}) + , []{ + tramming_done = true; + queue.inject(TERN(HAS_LEVELING, F("G29N"), FPSTR(G28_STR))); + ui.goto_previous_screen_no_defer(); + } + , []{ + tramming_done = true; + TERN_(HAS_LEVELING, ui.goto_previous_screen_no_defer()); + TERN_(NEEDS_PROBE_DEPLOY, probe.stow(true)); + } , GET_TEXT_F(MSG_BED_TRAMMING_IN_RANGE) ); } - bool _lcd_bed_tramming_probe(bool verify=false) { + bool _lcd_bed_tramming_probe(const bool verify=false) { if (verify) line_to_z(BED_TRAMMING_Z_HOP); // do clearance if needed TERN_(BLTOUCH, if (!bltouch.high_speed_mode) bltouch.deploy()); // Deploy in LOW SPEED MODE on every probe action do_blocking_move_to_z(last_z - BED_TRAMMING_PROBE_TOLERANCE, MMM_TO_MMS(Z_PROBE_FEEDRATE_SLOW)); // Move down to lower tolerance @@ -232,6 +250,11 @@ static void _lcd_bed_tramming_get_next_position() { last_z = current_position.z; // Above tolerance. Set a new Z for subsequent corners. good_points = 0; // ...and start over } + + // Raise the probe after the last point to give clearance for stow + if (TERN0(NEEDS_PROBE_DEPLOY, good_points == nr_edge_points - 1)) + line_to_z(BED_TRAMMING_Z_HOP); + return true; // probe triggered } line_to_z(last_z); // go back to tolerance middle point before raise @@ -267,11 +290,7 @@ static void _lcd_bed_tramming_get_next_position() { ui.refresh(LCDVIEW_REDRAW_NOW); _lcd_draw_probing(); // update screen with # of good points - line_to_z(current_position.z + BED_TRAMMING_Z_HOP + TERN0(BLTOUCH, bltouch.z_extra_clearance())); // clearance - - _lcd_bed_tramming_get_next_position(); // Select next corner coordinates - current_position -= probe.offset_xy; // Account for probe offsets - do_blocking_move_to_xy(current_position); // Goto corner + _lcd_goto_next_corner(); // Goto corner TERN_(BLTOUCH, if (bltouch.high_speed_mode) bltouch.deploy()); // Deploy in HIGH SPEED MODE if (!_lcd_bed_tramming_probe()) { // Probe down to tolerance @@ -306,31 +325,26 @@ static void _lcd_bed_tramming_get_next_position() { ui.set_selection(true); } -#else // !BED_TRAMMING_USE_PROBE - - static void _lcd_goto_next_corner() { - line_to_z(BED_TRAMMING_Z_HOP); - - // Select next corner coordinates - _lcd_bed_tramming_get_next_position(); - - line_to_current_position(manual_feedrate_mm_s.x); - line_to_z(BED_TRAMMING_HEIGHT); - if (++bed_corner >= available_points) bed_corner = 0; - } - -#endif // !BED_TRAMMING_USE_PROBE +#endif // BED_TRAMMING_USE_PROBE void _lcd_bed_tramming_homing() { - _lcd_draw_homing(); - if (!all_axes_homed()) return; + if (!all_axes_homed() && TERN1(NEEDS_PROBE_DEPLOY, probe.deploy())) return; + + #if HAS_LEVELING // Disable leveling so the planner won't mess with us + menu_leveling_was_active = planner.leveling_active; + set_bed_leveling_enabled(false); + #endif #if ENABLED(BED_TRAMMING_USE_PROBE) - _lcd_test_corners(); - if (tramming_done) ui.goto_previous_screen_no_defer(); + if (!tramming_done) _lcd_test_corners(); // May set tramming_done + if (tramming_done) { + ui.goto_previous_screen_no_defer(); + TERN_(NEEDS_PROBE_DEPLOY, probe.stow(true)); + } + tramming_done = true; TERN_(HAS_LEVELING, set_bed_leveling_enabled(menu_leveling_was_active)); - endstops.enable_z_probe(false); + TERN_(BLTOUCH, endstops.enable_z_probe(false)); #else // !BED_TRAMMING_USE_PROBE @@ -354,20 +368,28 @@ void _lcd_bed_tramming_homing() { #endif // !BED_TRAMMING_USE_PROBE } -void _lcd_bed_tramming() { - ui.defer_status_screen(); - if (!all_axes_trusted()) { - set_all_unhomed(); - queue.inject_P(G28_STR); +#if NEEDS_PROBE_DEPLOY + + void deploy_probe() { + if (!tramming_done) probe.deploy(true); + ui.goto_screen([]{ + if (ui.should_draw()) MenuItem_static::draw((LCD_HEIGHT - 1) / 2, GET_TEXT_F(MSG_MANUAL_DEPLOY)); + if (!probe.deploy() && !tramming_done) _lcd_bed_tramming_homing(); + }); } - // Disable leveling so the planner won't mess with us - #if HAS_LEVELING - menu_leveling_was_active = planner.leveling_active; - set_bed_leveling_enabled(false); - #endif +#endif // NEEDS_PROBE_DEPLOY - ui.goto_screen(_lcd_bed_tramming_homing); +void _lcd_bed_tramming() { + TERN_(BED_TRAMMING_USE_PROBE, tramming_done = false); + ui.defer_status_screen(); + set_all_unhomed(); + queue.inject(TERN(CAN_SET_LEVELING_AFTER_G28, F("G28L0"), FPSTR(G28_STR))); + ui.goto_screen([]{ + _lcd_draw_homing(); + if (!all_axes_homed()) return; + TERN(NEEDS_PROBE_DEPLOY, deploy_probe(), ui.goto_screen(_lcd_bed_tramming_homing)); + }); } #endif // HAS_MARLINUI_MENU && LCD_BED_TRAMMING diff --git a/Marlin/src/module/probe.cpp b/Marlin/src/module/probe.cpp index da69b725b9..ea17eee6ee 100644 --- a/Marlin/src/module/probe.cpp +++ b/Marlin/src/module/probe.cpp @@ -500,11 +500,11 @@ void Probe::probe_error_stop() { * * Return TRUE if the probe could not be deployed/stowed */ -bool Probe::set_deployed(const bool deploy) { +bool Probe::set_deployed(const bool deploy, const bool no_return/*=false*/) { if (DEBUGGING(LEVELING)) { DEBUG_POS("Probe::set_deployed", current_position); - DEBUG_ECHOLNPGM("deploy: ", deploy); + DEBUG_ECHOLNPGM("deploy=", deploy, " no_return=", no_return); } if (endstops.z_probe_enabled == deploy) return false; @@ -557,7 +557,8 @@ bool Probe::set_deployed(const bool deploy) { // If preheating is required before any probing... TERN_(PREHEAT_BEFORE_PROBING, if (deploy) preheat_for_probing(PROBING_NOZZLE_TEMP, PROBING_BED_TEMP)); - do_blocking_move_to(old_xy); + if (!no_return) do_blocking_move_to(old_xy); // Return to the original location unless handled externally + endstops.enable_z_probe(deploy); return false; } diff --git a/Marlin/src/module/probe.h b/Marlin/src/module/probe.h index b50f79ed5d..9aff9cff06 100644 --- a/Marlin/src/module/probe.h +++ b/Marlin/src/module/probe.h @@ -90,7 +90,7 @@ public: static void probe_error_stop(); - static bool set_deployed(const bool deploy); + static bool set_deployed(const bool deploy, const bool no_return=false); #if IS_KINEMATIC @@ -182,7 +182,7 @@ public: static constexpr xyz_pos_t offset = xyz_pos_t(NUM_AXIS_ARRAY_1(0)); // See #16767 - static bool set_deployed(const bool) { return false; } + static bool set_deployed(const bool, const bool=false) { return false; } static bool can_reach(const_float_t rx, const_float_t ry, const bool=true) { return position_is_reachable(rx, ry); } @@ -216,8 +216,8 @@ public: static constexpr xy_pos_t offset_xy = xy_pos_t({ 0, 0 }); // See #16767 #endif - static bool deploy() { return set_deployed(true); } - static bool stow() { return set_deployed(false); } + static bool deploy(const bool no_return=false) { return set_deployed(true, no_return); } + static bool stow(const bool no_return=false) { return set_deployed(false, no_return); } #if HAS_BED_PROBE || HAS_LEVELING #if IS_KINEMATIC From 6f2d8a3872cd98bafd44e563cfbca35596111ee7 Mon Sep 17 00:00:00 2001 From: John Robertson Date: Sat, 18 Mar 2023 10:33:15 +0000 Subject: [PATCH 047/225] =?UTF-8?q?=F0=9F=94=A7=20Sanity-check=20PRINTCOUN?= =?UTF-8?q?TER=5FSAVE=5FINTERVAL=20+=20ESP32=20I2S=20Exp=20(#25527)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/src/HAL/ESP32/inc/SanityCheck.h | 4 ++++ Marlin/src/HAL/LPC1768/inc/Conditionals_post.h | 2 +- Marlin/src/HAL/STM32/inc/Conditionals_post.h | 2 +- Marlin/src/inc/Warnings.cpp | 2 +- Marlin/src/module/printcounter.cpp | 2 +- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Marlin/src/HAL/ESP32/inc/SanityCheck.h b/Marlin/src/HAL/ESP32/inc/SanityCheck.h index 8c5621f10c..2d1b850330 100644 --- a/Marlin/src/HAL/ESP32/inc/SanityCheck.h +++ b/Marlin/src/HAL/ESP32/inc/SanityCheck.h @@ -56,3 +56,7 @@ #if BOTH(I2S_STEPPER_STREAM, LIN_ADVANCE) && DISABLED(EXPERIMENTAL_I2S_LA) #error "I2S stream is currently incompatible with LIN_ADVANCE." #endif + +#if BOTH(I2S_STEPPER_STREAM, PRINTCOUNTER) && PRINTCOUNTER_SAVE_INTERVAL > 0 && DISABLED(PRINTCOUNTER_SYNC) + #error "PRINTCOUNTER_SAVE_INTERVAL may cause issues on ESP32 with an I2S expander. Define PRINTCOUNTER_SYNC in Configuration.h for an imperfect solution." +#endif diff --git a/Marlin/src/HAL/LPC1768/inc/Conditionals_post.h b/Marlin/src/HAL/LPC1768/inc/Conditionals_post.h index 3549950008..a0bf421538 100644 --- a/Marlin/src/HAL/LPC1768/inc/Conditionals_post.h +++ b/Marlin/src/HAL/LPC1768/inc/Conditionals_post.h @@ -30,5 +30,5 @@ // LPC1768 boards seem to lose steps when saving to EEPROM during print (issue #20785) // TODO: Which other boards are incompatible? #if defined(MCU_LPC1768) && ENABLED(FLASH_EEPROM_EMULATION) && PRINTCOUNTER_SAVE_INTERVAL > 0 - #define PRINTCOUNTER_SYNC 1 + #define PRINTCOUNTER_SYNC #endif diff --git a/Marlin/src/HAL/STM32/inc/Conditionals_post.h b/Marlin/src/HAL/STM32/inc/Conditionals_post.h index c5ce66a26f..83ce077c75 100644 --- a/Marlin/src/HAL/STM32/inc/Conditionals_post.h +++ b/Marlin/src/HAL/STM32/inc/Conditionals_post.h @@ -30,5 +30,5 @@ // Some STM32F4 boards may lose steps when saving to EEPROM during print (PR #17946) #if defined(STM32F4xx) && ENABLED(FLASH_EEPROM_EMULATION) && PRINTCOUNTER_SAVE_INTERVAL > 0 - #define PRINTCOUNTER_SYNC 1 + #define PRINTCOUNTER_SYNC #endif diff --git a/Marlin/src/inc/Warnings.cpp b/Marlin/src/inc/Warnings.cpp index 55b9a18e77..405e7a351e 100644 --- a/Marlin/src/inc/Warnings.cpp +++ b/Marlin/src/inc/Warnings.cpp @@ -715,7 +715,7 @@ #warning "Creality 4.2.2 boards come with a variety of stepper drivers. Check the board label (typically on SD Card module) and set the correct *_DRIVER_TYPE! (C=HR4988, E=A4988, A=TMC2208, B=TMC2209, H=TMC2225, H8=HR4988). (Define NO_CREALITY_422_DRIVER_WARNING to suppress this warning.)" #endif -#if PRINTCOUNTER_SYNC +#if ENABLED(PRINTCOUNTER_SYNC) #warning "To prevent step loss, motion will pause for PRINTCOUNTER auto-save." #endif diff --git a/Marlin/src/module/printcounter.cpp b/Marlin/src/module/printcounter.cpp index 3b6239c667..f3d9ec8a9d 100644 --- a/Marlin/src/module/printcounter.cpp +++ b/Marlin/src/module/printcounter.cpp @@ -41,7 +41,7 @@ Stopwatch print_job_timer; // Global Print Job Timer instance #include "../libs/buzzer.h" #endif -#if PRINTCOUNTER_SYNC +#if ENABLED(PRINTCOUNTER_SYNC) #include "../module/planner.h" #endif From 3c882703619bde0d7cf292bb7dd7918f12edd23c Mon Sep 17 00:00:00 2001 From: tombrazier <68918209+tombrazier@users.noreply.github.com> Date: Sat, 18 Mar 2023 10:34:53 +0000 Subject: [PATCH 048/225] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20Smart=20Adaptive?= =?UTF-8?q?=20Multi-Stepping=20(#25474)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/module/stepper.cpp | 166 +++++++++++++++++++++++----------- Marlin/src/module/stepper.h | 29 +++--- 2 files changed, 124 insertions(+), 71 deletions(-) diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index ae12f0b7f4..4872e98aa9 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -194,6 +194,10 @@ uint32_t Stepper::acceleration_time, Stepper::deceleration_time; uint8_t Stepper::steps_per_isr = 1; // Count of steps to perform per Stepper ISR call #endif +#if DISABLED(OLD_ADAPTIVE_MULTISTEPPING) + hal_timer_t Stepper::time_spent_in_isr = 0, Stepper::time_spent_out_isr = 0; +#endif + #if ENABLED(FREEZE_FEATURE) bool Stepper::frozen; // = false #endif @@ -614,27 +618,26 @@ void Stepper::set_directions() { TERN_(HAS_V_DIR, SET_STEP_DIR(V)); TERN_(HAS_W_DIR, SET_STEP_DIR(W)); - #if ENABLED(MIXING_EXTRUDER) + #if HAS_EXTRUDERS // Because this is valid for the whole block we don't know // what E steppers will step. Likely all. Set all. if (motor_direction(E_AXIS)) { - MIXER_STEPPER_LOOP(j) REV_E_DIR(j); + #if ENABLED(MIXING_EXTRUDER) + MIXER_STEPPER_LOOP(j) REV_E_DIR(j); + #else + REV_E_DIR(stepper_extruder); + #endif count_direction.e = -1; } else { - MIXER_STEPPER_LOOP(j) NORM_E_DIR(j); + #if ENABLED(MIXING_EXTRUDER) + MIXER_STEPPER_LOOP(j) NORM_E_DIR(j); + #else + NORM_E_DIR(stepper_extruder); + #endif count_direction.e = 1; } - #elif HAS_EXTRUDERS - if (motor_direction(E_AXIS)) { - REV_E_DIR(stepper_extruder); - count_direction.e = -1; - } - else { - NORM_E_DIR(stepper_extruder); - count_direction.e = 1; - } - #endif + #endif // HAS_EXTRUDERS DIR_WAIT_AFTER(); } @@ -1587,16 +1590,44 @@ void Stepper::isr() { */ min_ticks = HAL_timer_get_count(MF_TIMER_STEP) + hal_timer_t(TERN(__AVR__, 8, 1) * (STEPPER_TIMER_TICKS_PER_US)); - /** - * NB: If for some reason the stepper monopolizes the MPU, eventually the - * timer will wrap around (and so will 'next_isr_ticks'). So, limit the - * loop to 10 iterations. Beyond that, there's no way to ensure correct pulse - * timing, since the MCU isn't fast enough. - */ - if (!--max_loops) next_isr_ticks = min_ticks; + #if ENABLED(OLD_ADAPTIVE_MULTISTEPPING) + /** + * NB: If for some reason the stepper monopolizes the MPU, eventually the + * timer will wrap around (and so will 'next_isr_ticks'). So, limit the + * loop to 10 iterations. Beyond that, there's no way to ensure correct pulse + * timing, since the MCU isn't fast enough. + */ + if (!--max_loops) next_isr_ticks = min_ticks; + #endif // Advance pulses if not enough time to wait for the next ISR - } while (next_isr_ticks < min_ticks); + } while (TERN(OLD_ADAPTIVE_MULTISTEPPING, true, --max_loops) && next_isr_ticks < min_ticks); + + #if DISABLED(OLD_ADAPTIVE_MULTISTEPPING) + + // Track the time spent in the ISR + const hal_timer_t time_spent = HAL_timer_get_count(MF_TIMER_STEP); + time_spent_in_isr += time_spent; + + if (next_isr_ticks < min_ticks) { + next_isr_ticks = min_ticks; + + // When forced out of the ISR, increase multi-stepping + #if MULTISTEPPING_LIMIT > 1 + if (steps_per_isr < MULTISTEPPING_LIMIT) { + steps_per_isr <<= 1; + // ticks_nominal will need to be recalculated if we are in cruise phase + ticks_nominal = 0; + } + #endif + } + else { + // Track the time spent voluntarily outside the ISR + time_spent_out_isr += next_isr_ticks; + time_spent_out_isr -= time_spent; + } + + #endif // !OLD_ADAPTIVE_MULTISTEPPING // Now 'next_isr_ticks' contains the period to the next Stepper ISR - And we are // sure that the time has not arrived yet - Warrantied by the scheduler @@ -2091,44 +2122,56 @@ hal_timer_t Stepper::calc_timer_interval(uint32_t step_rate) { // Get the timer interval and the number of loops to perform per tick hal_timer_t Stepper::calc_multistep_timer_interval(uint32_t step_rate) { - #if MULTISTEPPING_LIMIT == 1 - // Just make sure the step rate is doable - NOMORE(step_rate, uint32_t(MAX_STEP_ISR_FREQUENCY_1X)); + #if ENABLED(OLD_ADAPTIVE_MULTISTEPPING) - #else + #if MULTISTEPPING_LIMIT == 1 - // The stepping frequency limits for each multistepping rate - static const uint32_t limit[] PROGMEM = { - ( MAX_STEP_ISR_FREQUENCY_1X ) - , ( MAX_STEP_ISR_FREQUENCY_2X >> 1) - #if MULTISTEPPING_LIMIT >= 4 - , ( MAX_STEP_ISR_FREQUENCY_4X >> 2) - #endif - #if MULTISTEPPING_LIMIT >= 8 - , ( MAX_STEP_ISR_FREQUENCY_8X >> 3) - #endif - #if MULTISTEPPING_LIMIT >= 16 - , ( MAX_STEP_ISR_FREQUENCY_16X >> 4) - #endif - #if MULTISTEPPING_LIMIT >= 32 - , ( MAX_STEP_ISR_FREQUENCY_32X >> 5) - #endif - #if MULTISTEPPING_LIMIT >= 64 - , ( MAX_STEP_ISR_FREQUENCY_64X >> 6) - #endif - #if MULTISTEPPING_LIMIT >= 128 - , (MAX_STEP_ISR_FREQUENCY_128X >> 7) - #endif - }; + // Just make sure the step rate is doable + NOMORE(step_rate, uint32_t(MAX_STEP_ISR_FREQUENCY_1X)); - // Find a doable step rate using multistepping - uint8_t multistep = 1; - for (uint8_t i = 0; i < COUNT(limit) && step_rate > uint32_t(pgm_read_dword(&limit[i])); ++i) { - step_rate >>= 1; - multistep <<= 1; - } - steps_per_isr = multistep; + #else + + // The stepping frequency limits for each multistepping rate + static const uint32_t limit[] PROGMEM = { + ( MAX_STEP_ISR_FREQUENCY_1X ) + , (((F_CPU) / ISR_EXECUTION_CYCLES(1)) >> 1) + #if MULTISTEPPING_LIMIT >= 4 + , (((F_CPU) / ISR_EXECUTION_CYCLES(2)) >> 2) + #endif + #if MULTISTEPPING_LIMIT >= 8 + , (((F_CPU) / ISR_EXECUTION_CYCLES(3)) >> 3) + #endif + #if MULTISTEPPING_LIMIT >= 16 + , (((F_CPU) / ISR_EXECUTION_CYCLES(4)) >> 4) + #endif + #if MULTISTEPPING_LIMIT >= 32 + , (((F_CPU) / ISR_EXECUTION_CYCLES(5)) >> 5) + #endif + #if MULTISTEPPING_LIMIT >= 64 + , (((F_CPU) / ISR_EXECUTION_CYCLES(6)) >> 6) + #endif + #if MULTISTEPPING_LIMIT >= 128 + , (((F_CPU) / ISR_EXECUTION_CYCLES(7)) >> 7) + #endif + }; + + // Find a doable step rate using multistepping + uint8_t multistep = 1; + for (uint8_t i = 0; i < COUNT(limit) && step_rate > uint32_t(pgm_read_dword(&limit[i])); ++i) { + step_rate >>= 1; + multistep <<= 1; + } + steps_per_isr = multistep; + + #endif + + #elif MULTISTEPPING_LIMIT > 1 + + uint8_t loops = steps_per_isr; + if (MULTISTEPPING_LIMIT >= 16 && loops >= 16) { step_rate >>= 4; loops >>= 4; } + if (MULTISTEPPING_LIMIT >= 4 && loops >= 4) { step_rate >>= 2; loops >>= 2; } + if (MULTISTEPPING_LIMIT >= 2 && loops >= 2) { step_rate >>= 1; } #endif @@ -2141,6 +2184,19 @@ hal_timer_t Stepper::calc_multistep_timer_interval(uint32_t step_rate) { * have been done, so it is less time critical. */ hal_timer_t Stepper::block_phase_isr() { + #if DISABLED(OLD_ADAPTIVE_MULTISTEPPING) + // If the ISR uses < 50% of MPU time, halve multi-stepping + const hal_timer_t time_spent = HAL_timer_get_count(MF_TIMER_STEP); + #if MULTISTEPPING_LIMIT > 1 + if (steps_per_isr > 1 && time_spent_out_isr >= time_spent_in_isr + time_spent) { + steps_per_isr >>= 1; + // ticks_nominal will need to be recalculated if we are in cruise phase + ticks_nominal = 0; + } + #endif + time_spent_in_isr = -time_spent; // unsigned but guaranteed to be +ve when needed + time_spent_out_isr = 0; + #endif // If no queued movements, just wait 1ms for the next block hal_timer_t interval = (STEPPER_TIMER_RATE) / 1000UL; diff --git a/Marlin/src/module/stepper.h b/Marlin/src/module/stepper.h index 797a72791c..704805464c 100644 --- a/Marlin/src/module/stepper.h +++ b/Marlin/src/module/stepper.h @@ -212,12 +212,12 @@ #error "Expected at least one of MINIMUM_STEPPER_PULSE or MAXIMUM_STEPPER_RATE to be defined" #endif -// The loop takes the base time plus the time for all the bresenham logic for R pulses plus the time -// between pulses for (R-1) pulses. But the user could be enforcing a minimum time so the loop time is: +// The loop takes the base time plus the time for all the bresenham logic for 1 << R pulses plus the time +// between pulses for ((1 << R) - 1) pulses. But the user could be enforcing a minimum time so the loop time is: #define ISR_LOOP_CYCLES(R) ((ISR_LOOP_BASE_CYCLES + MIN_ISR_LOOP_CYCLES + MIN_STEPPER_PULSE_CYCLES) * ((1UL << R) - 1) + _MAX(MIN_ISR_LOOP_CYCLES, MIN_STEPPER_PULSE_CYCLES)) // Model input shaping as an extra loop call -#define ISR_SHAPING_LOOP_CYCLES(R) (TERN0(HAS_SHAPING, ((ISR_LOOP_BASE_CYCLES) + TERN0(INPUT_SHAPING_X, ISR_X_STEPPER_CYCLES) + TERN0(INPUT_SHAPING_Y, ISR_Y_STEPPER_CYCLES)) << R)) +#define ISR_SHAPING_LOOP_CYCLES(R) (TERN0(HAS_SHAPING, (ISR_LOOP_BASE_CYCLES + TERN0(INPUT_SHAPING_X, ISR_X_STEPPER_CYCLES) + TERN0(INPUT_SHAPING_Y, ISR_Y_STEPPER_CYCLES)) << R)) // If linear advance is enabled, then it is handled separately #if ENABLED(LIN_ADVANCE) @@ -241,24 +241,17 @@ #define ISR_LA_LOOP_CYCLES 0UL #endif -// Now estimate the total ISR execution time in cycles given a step per ISR multiplier -#define ISR_EXECUTION_CYCLES(R) (((ISR_BASE_CYCLES + ISR_S_CURVE_CYCLES + ISR_SHAPING_BASE_CYCLES + ISR_LOOP_CYCLES(R) + ISR_SHAPING_LOOP_CYCLES(R) + ISR_LA_BASE_CYCLES + ISR_LA_LOOP_CYCLES)) >> R) +// Estimate the total ISR execution time in cycles given a step-per-ISR shift multiplier +#define ISR_EXECUTION_CYCLES(R) ((ISR_BASE_CYCLES + ISR_S_CURVE_CYCLES + ISR_SHAPING_BASE_CYCLES + ISR_LOOP_CYCLES(R) + ISR_SHAPING_LOOP_CYCLES(R) + ISR_LA_BASE_CYCLES + ISR_LA_LOOP_CYCLES) >> R) -// The maximum allowable stepping frequency when doing x128-x1 stepping (in Hz) -#define MAX_STEP_ISR_FREQUENCY_128X ((F_CPU) / ISR_EXECUTION_CYCLES(7)) -#define MAX_STEP_ISR_FREQUENCY_64X ((F_CPU) / ISR_EXECUTION_CYCLES(6)) -#define MAX_STEP_ISR_FREQUENCY_32X ((F_CPU) / ISR_EXECUTION_CYCLES(5)) -#define MAX_STEP_ISR_FREQUENCY_16X ((F_CPU) / ISR_EXECUTION_CYCLES(4)) -#define MAX_STEP_ISR_FREQUENCY_8X ((F_CPU) / ISR_EXECUTION_CYCLES(3)) -#define MAX_STEP_ISR_FREQUENCY_4X ((F_CPU) / ISR_EXECUTION_CYCLES(2)) -#define MAX_STEP_ISR_FREQUENCY_2X ((F_CPU) / ISR_EXECUTION_CYCLES(1)) -#define MAX_STEP_ISR_FREQUENCY_1X ((F_CPU) / ISR_EXECUTION_CYCLES(0)) +// The maximum allowable stepping frequency when doing 1x stepping (in Hz) +#define MAX_STEP_ISR_FREQUENCY_1X ((F_CPU) / ISR_EXECUTION_CYCLES(0)) // The minimum step ISR rate used by ADAPTIVE_STEP_SMOOTHING to target 50% CPU usage // This does not account for the possibility of multi-stepping. -// Should a MULTISTEPPING_LIMIT of 1 should be required with ADAPTIVE_STEP_SMOOTHING? -#define MIN_STEP_ISR_FREQUENCY (MAX_STEP_ISR_FREQUENCY_1X / 2) +#define MIN_STEP_ISR_FREQUENCY (MAX_STEP_ISR_FREQUENCY_1X >> 1) +// Number of axes that could be enabled/disabled. Dual/multiple steppers are combined. #define ENABLE_COUNT (NUM_AXES + E_STEPPERS) typedef bits_t(ENABLE_COUNT) ena_mask_t; @@ -547,6 +540,10 @@ class Stepper { static uint8_t steps_per_isr; #endif + #if DISABLED(OLD_ADAPTIVE_MULTISTEPPING) + static hal_timer_t time_spent_in_isr, time_spent_out_isr; + #endif + #if ENABLED(ADAPTIVE_STEP_SMOOTHING) static uint8_t oversampling_factor; // Oversampling factor (log2(multiplier)) to increase temporal resolution of axis #else From 5be895d906d43a64c5e429683d136388d20341e0 Mon Sep 17 00:00:00 2001 From: John Lagonikas <39417467+zeleps@users.noreply.github.com> Date: Sat, 18 Mar 2023 13:43:15 +0200 Subject: [PATCH 049/225] =?UTF-8?q?=F0=9F=9A=B8=20Temperature=20Variance?= =?UTF-8?q?=20Monitor=20tweaks=20(#23571)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/Configuration_adv.h | 31 ++++++++++++++++++++++++++++--- Marlin/src/HAL/LPC1768/HAL.cpp | 1 + Marlin/src/HAL/LPC1768/HAL.h | 13 ++++++++----- Marlin/src/inc/Warnings.cpp | 5 +++++ Marlin/src/module/temperature.cpp | 11 +++++++++-- 5 files changed, 51 insertions(+), 10 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 284ecb6b1c..70bbf0a0e6 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -368,10 +368,35 @@ #if ANY(THERMAL_PROTECTION_HOTENDS, THERMAL_PROTECTION_BED, THERMAL_PROTECTION_CHAMBER, THERMAL_PROTECTION_COOLER) /** - * Thermal Protection Variance Monitor - EXPERIMENTAL. - * Kill the machine on a stuck temperature sensor. Disable if you get false positives. + * Thermal Protection Variance Monitor - EXPERIMENTAL + * Kill the machine on a stuck temperature sensor. + * + * This feature may cause some thermally-stable systems to halt. Be sure to test it throughly under + * a variety of conditions. Disable if you get false positives. + * + * This feature ensures that temperature sensors are updating regularly. If sensors die or get "stuck", + * or if Marlin stops reading them, temperatures will remain constant while heaters may still be powered! + * This feature only monitors temperature changes so it should catch any issue, hardware or software. + * + * By default it uses the THERMAL_PROTECTION_*_PERIOD constants (above) for the time window, within which + * at least one temperature change must occur, to indicate that sensor polling is working. If any monitored + * heater's temperature remains totally constant (without even a fractional change) during this period, a + * thermal malfunction error occurs and the printer is halted. + * + * A very stable heater might produce a false positive and halt the printer. In this case, try increasing + * the corresponding THERMAL_PROTECTION_*_PERIOD constant a bit. Keep in mind that uncontrolled heating + * shouldn't be allowed to persist for more than a minite or two. + * + * Be careful to distinguish false positives from real sensor issues before disabling this feature. If the + * heater's temperature appears even slightly higher than expected after restarting, you may have a real + * thermal malfunction. Check the temperature graph in your host for any unusual bumps. */ - //#define THERMAL_PROTECTION_VARIANCE_MONITOR // Detect a sensor malfunction preventing temperature updates + //#define THERMAL_PROTECTION_VARIANCE_MONITOR + #if ENABLED(THERMAL_PROTECTION_VARIANCE_MONITOR) + // Variance detection window to override the THERMAL_PROTECTION...PERIOD settings above. + // Keep in mind that some heaters heat up faster than others. + //#define THERMAL_PROTECTION_VARIANCE_MONITOR_PERIOD 30 // (s) Override all watch periods + #endif #endif #if ENABLED(PIDTEMP) diff --git a/Marlin/src/HAL/LPC1768/HAL.cpp b/Marlin/src/HAL/LPC1768/HAL.cpp index 9ff3a6ba59..746f43a2a4 100644 --- a/Marlin/src/HAL/LPC1768/HAL.cpp +++ b/Marlin/src/HAL/LPC1768/HAL.cpp @@ -28,6 +28,7 @@ DefaultSerial1 USBSerial(false, UsbSerial); uint32_t MarlinHAL::adc_result = 0; +pin_t MarlinHAL::adc_pin = 0; // U8glib required functions extern "C" { diff --git a/Marlin/src/HAL/LPC1768/HAL.h b/Marlin/src/HAL/LPC1768/HAL.h index b0eeb983b4..63bec2b720 100644 --- a/Marlin/src/HAL/LPC1768/HAL.h +++ b/Marlin/src/HAL/LPC1768/HAL.h @@ -241,15 +241,18 @@ public: // Begin ADC sampling on the given pin. Called from Temperature::isr! static uint32_t adc_result; - static void adc_start(const pin_t pin) { - adc_result = FilteredADC::read(pin) >> (16 - HAL_ADC_RESOLUTION); // returns 16bit value, reduce to required bits - } + static pin_t adc_pin; + + static void adc_start(const pin_t pin) { adc_pin = pin; } // Is the ADC ready for reading? - static bool adc_ready() { return true; } + static bool adc_ready() { return LPC176x::adc_hardware.done(LPC176x::pin_get_adc_channel(adc_pin)); } // The current value of the ADC register - static uint16_t adc_value() { return uint16_t(adc_result); } + static uint16_t adc_value() { + adc_result = FilteredADC::read(adc_pin) >> (16 - HAL_ADC_RESOLUTION); // returns 16bit value, reduce to required bits + return uint16_t(adc_result); + } /** * Set the PWM duty cycle for the pin to the given value. diff --git a/Marlin/src/inc/Warnings.cpp b/Marlin/src/inc/Warnings.cpp index 405e7a351e..01246596c3 100644 --- a/Marlin/src/inc/Warnings.cpp +++ b/Marlin/src/inc/Warnings.cpp @@ -63,6 +63,11 @@ #warning "Warning! Don't use dummy thermistors (998/999) for final build!" #endif +#if ANY(THERMAL_PROTECTION_HOTENDS, THERMAL_PROTECTION_BED, THERMAL_PROTECTION_CHAMBER, THERMAL_PROTECTION_COOLER) \ + && NONE(THERMAL_PROTECTION_VARIANCE_MONITOR, NO_VARIANCE_MONITOR_WARNING) + #warning "THERMAL_PROTECTION_VARIANCE_MONITOR is recommended. See Configuration_adv.h for details. (Define NO_VARIANCE_MONITOR_WARNING to suppress this.)" +#endif + #if NONE(HAS_RESUME_CONTINUE, HOST_PROMPT_SUPPORT) #warning "Your Configuration provides no method to acquire user feedback!" #endif diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 578fd112d2..2bb88320b5 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -2915,11 +2915,18 @@ void Temperature::init() { */ #if ENABLED(THERMAL_PROTECTION_VARIANCE_MONITOR) + + #ifdef THERMAL_PROTECTION_VARIANCE_MONITOR_PERIOD + #define VARIANCE_WINDOW THERMAL_PROTECTION_VARIANCE_MONITOR_PERIOD + #else + #define VARIANCE_WINDOW period_seconds + #endif + if (state == TRMalfunction) { // temperature invariance may continue, regardless of heater state variance += ABS(current - last_temp); // no need for detection window now, a single change in variance is enough last_temp = current; if (!NEAR_ZERO(variance)) { - variance_timer = millis() + SEC_TO_MS(period_seconds); + variance_timer = millis() + SEC_TO_MS(VARIANCE_WINDOW); variance = 0.0; state = TRStable; // resume from where we detected the problem } @@ -2980,7 +2987,7 @@ void Temperature::init() { state = TRMalfunction; break; } - variance_timer = now + SEC_TO_MS(period_seconds); + variance_timer = now + SEC_TO_MS(VARIANCE_WINDOW); variance = 0.0; last_temp = current; } From 283d093a4c4601ffa41e2754e790b6ed55c05e11 Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Sun, 19 Mar 2023 13:17:21 +1300 Subject: [PATCH 050/225] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20Ender=202=20stock?= =?UTF-8?q?=20LCD=20(#25538)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test-builds.yml | 1 + Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h | 5 +++-- buildroot/tests/melzi_optiboot | 16 ++++++++++++++++ 3 files changed, 20 insertions(+), 2 deletions(-) create mode 100755 buildroot/tests/melzi_optiboot diff --git a/.github/workflows/test-builds.yml b/.github/workflows/test-builds.yml index 9debb82bc9..173631e5e5 100644 --- a/.github/workflows/test-builds.yml +++ b/.github/workflows/test-builds.yml @@ -55,6 +55,7 @@ jobs: - rambo - sanguino1284p - sanguino644p + - melzi_optiboot # STM32F1 (Maple) Environments diff --git a/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h b/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h index 437ba35eea..acaf06ed9d 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h +++ b/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h @@ -46,11 +46,12 @@ // LCD / Controller // #if ANY(MKS_MINI_12864, CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY) - #if ENABLED(CR10_STOCKDISPLAY) + #if EITHER(CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY) #define LCD_PINS_RS 28 // ST9720 CS #define LCD_PINS_ENABLE 17 // ST9720 DAT #define LCD_PINS_D4 30 // ST9720 CLK - #elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY) + #endif + #if EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY) #define DOGLCD_CS 28 #define DOGLCD_A0 30 #endif diff --git a/buildroot/tests/melzi_optiboot b/buildroot/tests/melzi_optiboot new file mode 100755 index 0000000000..f31c69cdcb --- /dev/null +++ b/buildroot/tests/melzi_optiboot @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +# +# Build tests for melzi_optiboot +# + +# exit on first failure +set -e + +# +# Ender 2 +# +use_example_configs Creality/Ender-2 +exec_test $1 $2 "Ender 2" "$3" + +# clean up +restore_configs From e6ac9ff204b09c0a852f71b77417f99ce4f5473a Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 18 Mar 2023 17:13:06 -0500 Subject: [PATCH 051/225] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20Misc.=20optimizati?= =?UTF-8?q?ons?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/MarlinCore.cpp | 4 ++-- Marlin/src/core/serial.cpp | 5 ---- Marlin/src/core/serial.h | 7 +++++- Marlin/src/feature/bedlevel/ubl/ubl.cpp | 2 +- Marlin/src/module/temperature.cpp | 31 ++++++++++++++----------- Marlin/src/module/temperature.h | 6 ++--- 6 files changed, 30 insertions(+), 25 deletions(-) diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index ef6bf6aad5..342f8812d8 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -520,8 +520,8 @@ inline void manage_inactivity(const bool no_stepper_sleep=false) { if (ELAPSED(ms, next_cub_ms_##N)) { \ next_cub_ms_##N = ms + CUB_DEBOUNCE_DELAY_##N; \ CODE; \ - queue.inject(F(BUTTON##N##_GCODE)); \ - TERN_(HAS_MARLINUI_MENU, ui.quick_feedback()); \ + queue.inject(F(BUTTON##N##_GCODE)); \ + TERN_(HAS_MARLINUI_MENU, ui.quick_feedback()); \ } \ } \ }while(0) diff --git a/Marlin/src/core/serial.cpp b/Marlin/src/core/serial.cpp index 727b191d04..64704c1e6c 100644 --- a/Marlin/src/core/serial.cpp +++ b/Marlin/src/core/serial.cpp @@ -85,11 +85,6 @@ void serial_offset(const_float_t v, const uint8_t sp/*=0*/) { SERIAL_DECIMAL(v); } -void serial_ternary(const bool onoff, FSTR_P const pre, FSTR_P const on, FSTR_P const off, FSTR_P const post/*=nullptr*/) { - if (pre) serial_print(pre); - serial_print(onoff ? on : off); - if (post) serial_print(post); -} void serialprint_onoff(const bool onoff) { serial_print(onoff ? F(STR_ON) : F(STR_OFF)); } void serialprintln_onoff(const bool onoff) { serialprint_onoff(onoff); SERIAL_EOL(); } void serialprint_truefalse(const bool tf) { serial_print(tf ? F("true") : F("false")); } diff --git a/Marlin/src/core/serial.h b/Marlin/src/core/serial.h index a1126d7461..a741d4b1e4 100644 --- a/Marlin/src/core/serial.h +++ b/Marlin/src/core/serial.h @@ -327,7 +327,12 @@ inline void serial_echolnpair(FSTR_P const fstr, T v) { serial_echolnpair_P(FTOP void serial_echo_start(); void serial_error_start(); -void serial_ternary(const bool onoff, FSTR_P const pre, FSTR_P const on, FSTR_P const off, FSTR_P const post=nullptr); +inline void serial_ternary(const bool onoff, FSTR_P const pre, FSTR_P const on, FSTR_P const off, FSTR_P const post=nullptr) { + if (pre) serial_print(pre); + if (onoff && on) serial_print(on); + if (!onoff && off) serial_print(off); + if (post) serial_print(post); +} void serialprint_onoff(const bool onoff); void serialprintln_onoff(const bool onoff); void serialprint_truefalse(const bool tf); diff --git a/Marlin/src/feature/bedlevel/ubl/ubl.cpp b/Marlin/src/feature/bedlevel/ubl/ubl.cpp index f2af1445b1..6d60e7a2ef 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl.cpp @@ -59,7 +59,7 @@ void unified_bed_leveling::report_current_mesh() { void unified_bed_leveling::report_state() { echo_name(); - SERIAL_ECHO_TERNARY(planner.leveling_active, " System v" UBL_VERSION " ", "", "in", "active\n"); + serial_ternary(planner.leveling_active, " System v" UBL_VERSION " ", nullptr, "in", "active\n"); serial_delay(50); } diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 2bb88320b5..cc89d71e50 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -2890,7 +2890,7 @@ void Temperature::init() { * * TODO: Embed the last 3 parameters during init, if not less optimal */ - void Temperature::tr_state_machine_t::run(const_celsius_float_t current, const_celsius_float_t target, const heater_id_t heater_id, const uint16_t period_seconds, const celsius_t hysteresis_degc) { + void Temperature::tr_state_machine_t::run(const_celsius_float_t current, const_celsius_float_t target, const heater_id_t heater_id, const uint16_t period_seconds, const celsius_float_t hysteresis_degc) { #if HEATER_IDLE_HANDLER // Convert the given heater_id_t to an idle array index @@ -2959,21 +2959,26 @@ void Temperature::init() { // While the temperature is stable watch for a bad temperature case TRStable: { + const celsius_float_t rdiff = running_temp - current; + #if ENABLED(ADAPTIVE_FAN_SLOWING) if (adaptive_fan_slowing && heater_id >= 0) { - const int fan_index = _MIN(heater_id, FAN_COUNT - 1); - if (fan_speed[fan_index] == 0 || current >= running_temp - (hysteresis_degc * 0.25f)) - fan_speed_scaler[fan_index] = 128; - else if (current >= running_temp - (hysteresis_degc * 0.3335f)) - fan_speed_scaler[fan_index] = 96; - else if (current >= running_temp - (hysteresis_degc * 0.5f)) - fan_speed_scaler[fan_index] = 64; - else if (current >= running_temp - (hysteresis_degc * 0.8f)) - fan_speed_scaler[fan_index] = 32; + const int_fast8_t fan_index = _MIN(heater_id, FAN_COUNT - 1); + uint8_t scale; + if (fan_speed[fan_index] == 0 || rdiff <= hysteresis_degc * 0.25f) + scale = 128; + else if (rdiff <= hysteresis_degc * 0.3335f) + scale = 96; + else if (rdiff <= hysteresis_degc * 0.5f) + scale = 64; + else if (rdiff <= hysteresis_degc * 0.8f) + scale = 32; else - fan_speed_scaler[fan_index] = 0; + scale = 0; + + fan_speed_scaler[fan_index] = scale; } - #endif + #endif // ADAPTIVE_FAN_SLOWING const millis_t now = millis(); @@ -2993,7 +2998,7 @@ void Temperature::init() { } #endif - if (current >= running_temp - hysteresis_degc) { + if (rdiff <= hysteresis_degc) { timer = now + SEC_TO_MS(period_seconds); break; } diff --git a/Marlin/src/module/temperature.h b/Marlin/src/module/temperature.h index 0ab00ef768..4bf76e5d48 100644 --- a/Marlin/src/module/temperature.h +++ b/Marlin/src/module/temperature.h @@ -49,7 +49,7 @@ #define E_NAME TERN_(HAS_MULTI_HOTEND, e) // Element identifiers. Positive values are hotends. Negative values are other heaters or coolers. -typedef enum : int8_t { +typedef enum : int_fast8_t { H_REDUNDANT = HID_REDUNDANT, H_COOLER = HID_COOLER, H_PROBE = HID_PROBE, @@ -1319,12 +1319,12 @@ class Temperature { typedef struct { millis_t timer = 0; TRState state = TRInactive; - float running_temp; + celsius_float_t running_temp; #if ENABLED(THERMAL_PROTECTION_VARIANCE_MONITOR) millis_t variance_timer = 0; celsius_float_t last_temp = 0.0, variance = 0.0; #endif - void run(const_celsius_float_t current, const_celsius_float_t target, const heater_id_t heater_id, const uint16_t period_seconds, const celsius_t hysteresis_degc); + void run(const_celsius_float_t current, const_celsius_float_t target, const heater_id_t heater_id, const uint16_t period_seconds, const celsius_float_t hysteresis_degc); } tr_state_machine_t; static tr_state_machine_t tr_state_machine[NR_HEATER_RUNAWAY]; From 432aeeefe30082843e0e3cbb4a0f0673681fcfdb Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sun, 19 Mar 2023 00:55:20 +0000 Subject: [PATCH 052/225] [cron] Bump distribution date (2023-03-19) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 2938b98713..a70e6910d3 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-03-18" +//#define STRING_DISTRIBUTION_DATE "2023-03-19" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index df04b198ac..3e3244a207 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-03-18" + #define STRING_DISTRIBUTION_DATE "2023-03-19" #endif /** From 7e25e87807c7c3dd213ffa558cf6e6d0383b7650 Mon Sep 17 00:00:00 2001 From: StevilKnevil Date: Sun, 19 Mar 2023 00:57:34 +0000 Subject: [PATCH 053/225] =?UTF-8?q?=E2=9C=A8=20REPORT=5FADAPTIVE=5FFAN=5FS?= =?UTF-8?q?LOWING=20(#25537)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration_adv.h | 9 ++++++--- Marlin/src/module/temperature.cpp | 6 ++++++ buildroot/tests/LPC1769 | 2 +- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 70bbf0a0e6..3e23bb8944 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -303,9 +303,12 @@ #define THERMAL_PROTECTION_PERIOD 40 // Seconds #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius - //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && EITHER(MPCTEMP, PIDTEMP) - //#define TEMP_TUNING_MAINTAIN_FAN // Don't slow fan speed during M303 or M306 T + //#define ADAPTIVE_FAN_SLOWING // Slow down the part-cooling fan if the temperature drops + #if ENABLED(ADAPTIVE_FAN_SLOWING) + //#define REPORT_ADAPTIVE_FAN_SLOWING // Report fan slowing activity to the console + #if EITHER(MPCTEMP, PIDTEMP) + //#define TEMP_TUNING_MAINTAIN_FAN // Don't slow down the fan speed during M303 or M306 T + #endif #endif /** diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index cc89d71e50..ba2563ccdc 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -2976,6 +2976,12 @@ void Temperature::init() { else scale = 0; + if (TERN0(REPORT_ADAPTIVE_FAN_SLOWING, DEBUGGING(INFO))) { + const uint8_t fss7 = fan_speed_scaler[fan_index] & 0x80; + if (fss7 ^ (scale & 0x80)) + serial_ternary(fss7, F("Adaptive Fan Slowing "), nullptr, F("de"), F("activated.\n")); + } + fan_speed_scaler[fan_index] = scale; } #endif // ADAPTIVE_FAN_SLOWING diff --git a/buildroot/tests/LPC1769 b/buildroot/tests/LPC1769 index b3348c6d65..cf2838bdd5 100755 --- a/buildroot/tests/LPC1769 +++ b/buildroot/tests/LPC1769 @@ -18,7 +18,7 @@ opt_set MOTHERBOARD BOARD_SMOOTHIEBOARD \ GRID_MAX_POINTS_X 16 \ NOZZLE_CLEAN_START_POINT "{ { 10, 10, 3 }, { 10, 10, 3 } }" \ NOZZLE_CLEAN_END_POINT "{ { 10, 20, 3 }, { 10, 20, 3 } }" -opt_enable TFTGLCD_PANEL_SPI SDSUPPORT ADAPTIVE_FAN_SLOWING TEMP_TUNING_MAINTAIN_FAN \ +opt_enable TFTGLCD_PANEL_SPI SDSUPPORT ADAPTIVE_FAN_SLOWING REPORT_ADAPTIVE_FAN_SLOWING TEMP_TUNING_MAINTAIN_FAN \ MAX31865_SENSOR_OHMS_0 MAX31865_CALIBRATION_OHMS_0 \ MAG_MOUNTED_PROBE AUTO_BED_LEVELING_BILINEAR G29_RETRY_AND_RECOVER Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE \ BABYSTEPPING BABYSTEP_XY BABYSTEP_ZPROBE_OFFSET BED_TRAMMING_USE_PROBE BED_TRAMMING_VERIFY_RAISED \ From 9249f61a80ea48db8b437f17374c25ed5da1a65b Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 18 Mar 2023 21:57:06 -0500 Subject: [PATCH 054/225] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20a=20serial=5Fterna?= =?UTF-8?q?ry?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/feature/bedlevel/ubl/ubl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/feature/bedlevel/ubl/ubl.cpp b/Marlin/src/feature/bedlevel/ubl/ubl.cpp index 6d60e7a2ef..b7ee6aeef8 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl.cpp @@ -59,7 +59,7 @@ void unified_bed_leveling::report_current_mesh() { void unified_bed_leveling::report_state() { echo_name(); - serial_ternary(planner.leveling_active, " System v" UBL_VERSION " ", nullptr, "in", "active\n"); + serial_ternary(planner.leveling_active, F(" System v" UBL_VERSION " "), nullptr, F("in"), F("active\n")); serial_delay(50); } From fd36e69bd23b60ef8edb0848f219a5ca65dae181 Mon Sep 17 00:00:00 2001 From: FilippoR Date: Sun, 19 Mar 2023 09:55:34 +0100 Subject: [PATCH 055/225] =?UTF-8?q?=E2=9C=A8=20Z=5FSERVO=5FDEACTIVATE=5FAF?= =?UTF-8?q?TER=5FSTOW=20(#24215)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration.h | 11 +++++++---- Marlin/src/module/probe.cpp | 7 ++++++- buildroot/tests/mega2560 | 4 ++-- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 82b107ae44..b96837d50c 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -1387,10 +1387,13 @@ /** * Z Servo Probe, such as an endstop switch on a rotating arm. */ -//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. -//#define Z_SERVO_ANGLES { 70, 0 } // Z Servo Deploy and Stow angles -//#define Z_SERVO_MEASURE_ANGLE 45 // Use if the servo must move to a "free" position for measuring after deploy. -//#define Z_SERVO_INTERMEDIATE_STOW // Stow the probe between points. +//#define Z_PROBE_SERVO_NR 0 +#ifdef Z_PROBE_SERVO_NR + //#define Z_SERVO_ANGLES { 70, 0 } // Z Servo Deploy and Stow angles + //#define Z_SERVO_MEASURE_ANGLE 45 // Use if the servo must move to a "free" position for measuring after deploy + //#define Z_SERVO_INTERMEDIATE_STOW // Stow the probe between points + //#define Z_SERVO_DEACTIVATE_AFTER_STOW // Deactivate the servo when probe is stowed +#endif /** * The BLTouch probe uses a Hall effect sensor and emulates a servo. diff --git a/Marlin/src/module/probe.cpp b/Marlin/src/module/probe.cpp index ea17eee6ee..d48dc1eb1c 100644 --- a/Marlin/src/module/probe.cpp +++ b/Marlin/src/module/probe.cpp @@ -403,13 +403,16 @@ FORCE_INLINE void probe_specific_action(const bool deploy) { #elif HAS_Z_SERVO_PROBE + // i.e., deploy ? DEPLOY_Z_SERVO() : STOW_Z_SERVO(); servo[Z_PROBE_SERVO_NR].move(servo_angles[Z_PROBE_SERVO_NR][deploy ? 0 : 1]); #ifdef Z_SERVO_MEASURE_ANGLE // After deploy move back to the measure angle... - if (deploy) MOVE_SERVO(Z_PROBE_SERVO_NR, Z_SERVO_MEASURE_ANGLE); + if (deploy) servo[Z_PROBE_SERVO_NR].move(Z_SERVO_MEASURE_ANGLE); #endif + if (TERN0(Z_SERVO_DEACTIVATE_AFTER_STOW, !deploy)) servo[Z_PROBE_SERVO_NR].detach(); + #elif ANY(TOUCH_MI_PROBE, Z_PROBE_ALLEN_KEY, MAG_MOUNTED_PROBE) deploy ? run_deploy_moves() : run_stow_moves(); @@ -950,6 +953,8 @@ float Probe::probe_at_point(const_float_t rx, const_float_t ry, const ProbePtRai * homing has been done - no homing with z-probe without init! */ STOW_Z_SERVO(); + + TERN_(Z_SERVO_DEACTIVATE_AFTER_STOW, servo[Z_PROBE_SERVO_NR].detach()); } #endif // HAS_Z_SERVO_PROBE diff --git a/buildroot/tests/mega2560 b/buildroot/tests/mega2560 index daa9cc2fad..ae3d1c45f8 100755 --- a/buildroot/tests/mega2560 +++ b/buildroot/tests/mega2560 @@ -63,13 +63,13 @@ opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO NUM_SERVOS 1 \ NUM_RUNOUT_SENSORS 5 FIL_RUNOUT2_PIN 44 FIL_RUNOUT3_PIN 45 FIL_RUNOUT4_PIN 46 FIL_RUNOUT5_PIN 47 \ FIL_RUNOUT3_STATE HIGH FILAMENT_RUNOUT_SCRIPT '"M600 T%c"' opt_enable VIKI2 BOOT_MARLIN_LOGO_ANIMATED SDSUPPORT AUTO_REPORT_SD_STATUS \ - Z_PROBE_SERVO_NR Z_SERVO_ANGLES DEACTIVATE_SERVOS_AFTER_MOVE \ + Z_PROBE_SERVO_NR Z_SERVO_ANGLES Z_SERVO_MEASURE_ANGLE DEACTIVATE_SERVOS_AFTER_MOVE Z_SERVO_DEACTIVATE_AFTER_STOW \ AUTO_BED_LEVELING_3POINT DEBUG_LEVELING_FEATURE PROBE_PT_1 PROBE_PT_2 PROBE_PT_3 \ EEPROM_SETTINGS EEPROM_CHITCHAT M114_DETAIL AUTO_REPORT_POSITION \ NO_VOLUMETRICS EXTENDED_CAPABILITIES_REPORT AUTO_REPORT_TEMPERATURES AUTOTEMP G38_PROBE_TARGET JOYSTICK \ DIRECT_STEPPING DETECT_BROKEN_ENDSTOP \ FILAMENT_RUNOUT_SENSOR NOZZLE_PARK_FEATURE ADVANCED_PAUSE_FEATURE Z_SAFE_HOMING FIL_RUNOUT3_PULLUP -exec_test $1 $2 "Multiple runout sensors (x5) | Distinct runout states" "$3" +exec_test $1 $2 "Z Servo Probe | Multiple runout sensors (x5)" "$3" # From ca77850cbb8ed57d4cdcf29a12a278d6bfa5c0d5 Mon Sep 17 00:00:00 2001 From: tombrazier <68918209+tombrazier@users.noreply.github.com> Date: Sun, 19 Mar 2023 21:25:14 +0000 Subject: [PATCH 056/225] =?UTF-8?q?=F0=9F=90=9B=20Avoid=20step=20rate=20ov?= =?UTF-8?q?erflow=20(#25541)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/module/stepper.cpp | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index 4872e98aa9..5c0034a5f9 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -2098,9 +2098,15 @@ hal_timer_t Stepper::calc_timer_interval(uint32_t step_rate) { #else - // AVR is able to keep up at 30khz Stepping ISR rate. constexpr uint32_t min_step_rate = (F_CPU) / 500000U; // i.e., 32 or 40 if (step_rate >= 0x0800) { // higher step rate + // AVR is able to keep up at around 65kHz Stepping ISR rate at most. + // So values for step_rate > 65535 might as well be truncated. + // Handle it as quickly as possible. i.e., assume highest byte is zero + // because non-zero would represent a step rate far beyond AVR capabilities. + if (uint8_t(step_rate >> 16)) + return uint32_t(STEPPER_TIMER_RATE) / 0x10000; + const uintptr_t table_address = uintptr_t(&speed_lookuptable_fast[uint8_t(step_rate >> 8)]); const uint16_t base = uint16_t(pgm_read_word(table_address)); const uint8_t gain = uint8_t(pgm_read_byte(table_address + 2)); @@ -2112,10 +2118,8 @@ hal_timer_t Stepper::calc_timer_interval(uint32_t step_rate) { return uint16_t(pgm_read_word(table_address)) - ((uint16_t(pgm_read_word(table_address + 2)) * uint8_t(step_rate & 0x0007)) >> 3); } - else { - step_rate = 0; - return uint16_t(pgm_read_word(uintptr_t(speed_lookuptable_slow))); - } + + return uint16_t(pgm_read_word(uintptr_t(speed_lookuptable_slow))); #endif // !CPU_32_BIT } @@ -2250,7 +2254,7 @@ hal_timer_t Stepper::block_phase_isr() { #if ENABLED(LIN_ADVANCE) if (la_active) { const uint32_t la_step_rate = la_advance_steps < current_block->max_adv_steps ? current_block->la_advance_rate : 0; - la_interval = calc_timer_interval(acc_step_rate + la_step_rate) << current_block->la_scaling; + la_interval = calc_timer_interval((acc_step_rate + la_step_rate) >> current_block->la_scaling); } #endif @@ -2322,7 +2326,7 @@ hal_timer_t Stepper::block_phase_isr() { const uint32_t la_step_rate = la_advance_steps > current_block->final_adv_steps ? current_block->la_advance_rate : 0; if (la_step_rate != step_rate) { bool reverse_e = la_step_rate > step_rate; - la_interval = calc_timer_interval(reverse_e ? la_step_rate - step_rate : step_rate - la_step_rate) << current_block->la_scaling; + la_interval = calc_timer_interval((reverse_e ? la_step_rate - step_rate : step_rate - la_step_rate) >> current_block->la_scaling); if (reverse_e != motor_direction(E_AXIS)) { TBI(last_direction_bits, E_AXIS); @@ -2380,7 +2384,7 @@ hal_timer_t Stepper::block_phase_isr() { #if ENABLED(LIN_ADVANCE) if (la_active) - la_interval = calc_timer_interval(current_block->nominal_rate) << current_block->la_scaling; + la_interval = calc_timer_interval(current_block->nominal_rate >> current_block->la_scaling); #endif } @@ -2702,7 +2706,7 @@ hal_timer_t Stepper::block_phase_isr() { #if ENABLED(LIN_ADVANCE) if (la_active) { const uint32_t la_step_rate = la_advance_steps < current_block->max_adv_steps ? current_block->la_advance_rate : 0; - la_interval = calc_timer_interval(current_block->initial_rate + la_step_rate) << current_block->la_scaling; + la_interval = calc_timer_interval((current_block->initial_rate + la_step_rate) >> current_block->la_scaling); } #endif } From d450f67caa0d14386760f472fc3165988db95d37 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Mon, 20 Mar 2023 00:23:12 +0000 Subject: [PATCH 057/225] [cron] Bump distribution date (2023-03-20) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index a70e6910d3..d052c3bff9 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-03-19" +//#define STRING_DISTRIBUTION_DATE "2023-03-20" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 3e3244a207..99eb9bd3d7 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-03-19" + #define STRING_DISTRIBUTION_DATE "2023-03-20" #endif /** From 06cfd9c54af1537adf458a719b840cd501395278 Mon Sep 17 00:00:00 2001 From: John Lagonikas <39417467+zeleps@users.noreply.github.com> Date: Wed, 22 Mar 2023 02:15:51 +0200 Subject: [PATCH 058/225] =?UTF-8?q?=E2=9C=A8=20PROBING=5FTOOL=20(#24411)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration.h | 6 ++ Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp | 7 +- Marlin/src/gcode/bedlevel/G35.cpp | 10 +-- Marlin/src/gcode/bedlevel/abl/G29.cpp | 11 +--- Marlin/src/gcode/bedlevel/mbl/G29.cpp | 10 ++- Marlin/src/gcode/calibrate/G33.cpp | 8 +-- Marlin/src/gcode/calibrate/G34_M422.cpp | 13 ++-- Marlin/src/gcode/probe/G30.cpp | 8 +-- Marlin/src/inc/Conditionals_LCD.h | 8 +++ Marlin/src/inc/SanityCheck.h | 4 ++ Marlin/src/module/probe.cpp | 71 +++++++++++++++------ Marlin/src/module/probe.h | 2 + 12 files changed, 96 insertions(+), 62 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index b96837d50c..2603999bd5 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -1552,6 +1552,12 @@ */ #define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 } +// Enable and set to use a specific tool for probing. Disable to allow any tool. +#define PROBING_TOOL 0 +#ifdef PROBING_TOOL + //#define PROBE_TOOLCHANGE_NO_MOVE // Suppress motion on probe tool-change +#endif + // Most probes should stay away from the edges of the bed, but // with NOZZLE_AS_PROBE this can be negative for a wider probing area. #define PROBING_MARGIN 10 diff --git a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp index 7b9783bfac..d9205b7577 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp @@ -306,16 +306,13 @@ void unified_bed_leveling::G29() { const uint8_t p_val = parser.byteval('P'); const bool may_move = p_val == 1 || p_val == 2 || p_val == 4 || parser.seen_test('J'); - #if HAS_MULTI_HOTEND - const uint8_t old_tool_index = active_extruder; - #endif // Check for commands that require the printer to be homed if (may_move) { planner.synchronize(); // Send 'N' to force homing before G29 (internal only) if (axes_should_home() || parser.seen_test('N')) gcode.home_all_axes(); - TERN_(HAS_MULTI_HOTEND, if (active_extruder != 0) tool_change(0, true)); + probe.use_probing_tool(); // Position bed horizontally and Z probe vertically. #if HAS_SAFE_BED_LEVELING @@ -696,7 +693,7 @@ void unified_bed_leveling::G29() { UNUSED(probe_deployed); #endif - TERN_(HAS_MULTI_HOTEND, if (old_tool_index != 0) tool_change(old_tool_index)); + probe.use_probing_tool(false); return; } diff --git a/Marlin/src/gcode/bedlevel/G35.cpp b/Marlin/src/gcode/bedlevel/G35.cpp index ff0321e4aa..c1cef2b987 100644 --- a/Marlin/src/gcode/bedlevel/G35.cpp +++ b/Marlin/src/gcode/bedlevel/G35.cpp @@ -86,11 +86,7 @@ void GcodeSuite::G35() { workspace_plane = PLANE_XY; #endif - // Always home with tool 0 active - #if HAS_MULTI_HOTEND - const uint8_t old_tool_index = active_extruder; - tool_change(0, true); - #endif + probe.use_probing_tool(); // Disable duplication mode on homing TERN_(HAS_DUPLICATION_MODE, set_duplication_enabled(false)); @@ -153,9 +149,7 @@ void GcodeSuite::G35() { SERIAL_ECHOLNPGM("G35 aborted."); // Restore the active tool after homing - #if HAS_MULTI_HOTEND - if (old_tool_index != 0) tool_change(old_tool_index, DISABLED(PARKING_EXTRUDER)); // Fetch previous toolhead if not PARKING_EXTRUDER - #endif + probe.use_probing_tool(false); #if BOTH(HAS_LEVELING, RESTORE_LEVELING_AFTER_G35) set_bed_leveling_enabled(leveling_was_active); diff --git a/Marlin/src/gcode/bedlevel/abl/G29.cpp b/Marlin/src/gcode/bedlevel/abl/G29.cpp index e1fd0124c4..e334412054 100644 --- a/Marlin/src/gcode/bedlevel/abl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/abl/G29.cpp @@ -97,10 +97,6 @@ public: bool dryrun, reenable; - #if HAS_MULTI_HOTEND - uint8_t tool_index; - #endif - #if EITHER(PROBE_MANUALLY, AUTO_BED_LEVELING_LINEAR) int abl_probe_index; #endif @@ -281,10 +277,7 @@ G29_TYPE GcodeSuite::G29() { */ if (!g29_in_progress) { - #if HAS_MULTI_HOTEND - abl.tool_index = active_extruder; - if (active_extruder != 0) tool_change(0, true); - #endif + probe.use_probing_tool(); #if EITHER(PROBE_MANUALLY, AUTO_BED_LEVELING_LINEAR) abl.abl_probe_index = -1; @@ -947,7 +940,7 @@ G29_TYPE GcodeSuite::G29() { process_subcommands_now(F(Z_PROBE_END_SCRIPT)); #endif - TERN_(HAS_MULTI_HOTEND, if (abl.tool_index != 0) tool_change(abl.tool_index)); + probe.use_probing_tool(false); report_current_position(); diff --git a/Marlin/src/gcode/bedlevel/mbl/G29.cpp b/Marlin/src/gcode/bedlevel/mbl/G29.cpp index e3e96a7960..9f902141fb 100644 --- a/Marlin/src/gcode/bedlevel/mbl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/mbl/G29.cpp @@ -103,9 +103,8 @@ void GcodeSuite::G29() { bedlevel.reset(); mbl_probe_index = 0; if (!ui.wait_for_move) { - queue.inject(parser.seen_test('N') ? F("G28" TERN(CAN_SET_LEVELING_AFTER_G28, "L0", "") "\nG29S2") : F("G29S2")); - TERN_(EXTENSIBLE_UI, ExtUI::onLevelingStart()); - TERN_(DWIN_LCD_PROUI, DWIN_LevelingStart()); + if (parser.seen_test('N')) + queue.inject(F("G28" TERN_(CAN_SET_LEVELING_AFTER_G28, "L0"))); // Position bed horizontally and Z probe vertically. #if HAS_SAFE_BED_LEVELING @@ -141,6 +140,11 @@ void GcodeSuite::G29() { do_blocking_move_to(safe_position); #endif // HAS_SAFE_BED_LEVELING + queue.inject(F("G29S2")); + + TERN_(EXTENSIBLE_UI, ExtUI::onLevelingStart()); + TERN_(DWIN_LCD_PROUI, DWIN_LevelingStart()); + return; } state = MeshNext; diff --git a/Marlin/src/gcode/calibrate/G33.cpp b/Marlin/src/gcode/calibrate/G33.cpp index 836d5c867b..61320c0576 100644 --- a/Marlin/src/gcode/calibrate/G33.cpp +++ b/Marlin/src/gcode/calibrate/G33.cpp @@ -63,10 +63,6 @@ enum CalEnum : char { // the 7 main calibration points - #define LOOP_CAL_RAD(VAR) LOOP_CAL_PT(VAR, __A, _7P_STEP) #define LOOP_CAL_ACT(VAR, _4P, _OP) LOOP_CAL_PT(VAR, _OP ? _AB : __A, _4P ? _4P_STEP : _7P_STEP) -#if HAS_MULTI_HOTEND - const uint8_t old_tool_index = active_extruder; -#endif - float lcd_probe_pt(const xy_pos_t &xy); void ac_home() { @@ -78,7 +74,7 @@ void ac_home() { } void ac_setup(const bool reset_bed) { - TERN_(HAS_MULTI_HOTEND, tool_change(0, true)); + TERN_(HAS_BED_PROBE, probe.use_probing_tool()); planner.synchronize(); remember_feedrate_scaling_off(); @@ -92,7 +88,7 @@ void ac_cleanup(TERN_(HAS_MULTI_HOTEND, const uint8_t old_tool_index)) { TERN_(DELTA_HOME_TO_SAFE_ZONE, do_blocking_move_to_z(delta_clip_start_height)); TERN_(HAS_BED_PROBE, probe.stow()); restore_feedrate_and_scaling(); - TERN_(HAS_MULTI_HOTEND, tool_change(old_tool_index, true)); + TERN_(HAS_BED_PROBE, probe.use_probing_tool(false)); } void print_signed_float(FSTR_P const prefix, const_float_t f) { diff --git a/Marlin/src/gcode/calibrate/G34_M422.cpp b/Marlin/src/gcode/calibrate/G34_M422.cpp index 8cf652cd84..6d5ca8bf19 100644 --- a/Marlin/src/gcode/calibrate/G34_M422.cpp +++ b/Marlin/src/gcode/calibrate/G34_M422.cpp @@ -108,6 +108,7 @@ void GcodeSuite::G34() { } #if ENABLED(Z_STEPPER_AUTO_ALIGN) + do { // break out on error const int8_t z_auto_align_iterations = parser.intval('I', Z_STEPPER_ALIGN_ITERATIONS); @@ -142,11 +143,7 @@ void GcodeSuite::G34() { TERN_(CNC_WORKSPACE_PLANES, workspace_plane = PLANE_XY); - // Always home with tool 0 active - #if HAS_MULTI_HOTEND - const uint8_t old_tool_index = active_extruder; - tool_change(0, true); - #endif + probe.use_probing_tool(); TERN_(HAS_DUPLICATION_MODE, set_duplication_enabled(false)); @@ -448,14 +445,16 @@ void GcodeSuite::G34() { sync_plan_position(); #endif - // Restore the active tool after homing - TERN_(HAS_MULTI_HOTEND, tool_change(old_tool_index, DISABLED(PARKING_EXTRUDER))); // Fetch previous tool for parking extruder + probe.use_probing_tool(false); #if BOTH(HAS_LEVELING, RESTORE_LEVELING_AFTER_G34) set_bed_leveling_enabled(leveling_was_active); #endif }while(0); + + probe.use_probing_tool(false); + #endif // Z_STEPPER_AUTO_ALIGN } diff --git a/Marlin/src/gcode/probe/G30.cpp b/Marlin/src/gcode/probe/G30.cpp index 6893d4bec2..0a23e0981c 100644 --- a/Marlin/src/gcode/probe/G30.cpp +++ b/Marlin/src/gcode/probe/G30.cpp @@ -53,10 +53,7 @@ */ void GcodeSuite::G30() { - #if HAS_MULTI_HOTEND - const uint8_t old_tool_index = active_extruder; - tool_change(0); - #endif + probe.use_probing_tool(); // Convert the given logical position to native position const xy_pos_t pos = { @@ -106,8 +103,7 @@ void GcodeSuite::G30() { #endif } - // Restore the active tool - TERN_(HAS_MULTI_HOTEND, tool_change(old_tool_index)); + probe.use_probing_tool(false); } #endif // HAS_BED_PROBE diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index dc9849399c..32712a86d6 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -1110,6 +1110,14 @@ #define HAS_BED_PROBE 1 #endif +// Probing tool change +#if !HAS_MULTI_EXTRUDER + #undef PROBING_TOOL +#endif +#if HAS_BED_PROBE && defined(PROBING_TOOL) + #define DO_TOOLCHANGE_FOR_PROBING 1 +#endif + /** * Fill in undefined Filament Sensor options */ diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index c1e9b29444..5218cf792b 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -2664,6 +2664,10 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #endif // HOTENDS > 2 #endif // HAS_MULTI_HOTEND +#if DO_TOOLCHANGE_FOR_PROBING && PROBING_TOOL >= EXTRUDERS + #error "PROBING_TOOL must be a valid tool index." +#endif + /** * Pins must be set for temp sensors, with some other feature requirements. */ diff --git a/Marlin/src/module/probe.cpp b/Marlin/src/module/probe.cpp index d48dc1eb1c..25581922f6 100644 --- a/Marlin/src/module/probe.cpp +++ b/Marlin/src/module/probe.cpp @@ -196,35 +196,35 @@ xyz_pos_t Probe::offset; // Initialized by settings.load() inline void run_deploy_moves() { #ifdef Z_PROBE_ALLEN_KEY_DEPLOY_1 #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE - #define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE 0.0 + #define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE 0.0f #endif constexpr xyz_pos_t deploy_1 = Z_PROBE_ALLEN_KEY_DEPLOY_1; do_blocking_move_to(deploy_1, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE)); #endif #ifdef Z_PROBE_ALLEN_KEY_DEPLOY_2 #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE - #define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE 0.0 + #define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE 0.0f #endif constexpr xyz_pos_t deploy_2 = Z_PROBE_ALLEN_KEY_DEPLOY_2; do_blocking_move_to(deploy_2, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE)); #endif #ifdef Z_PROBE_ALLEN_KEY_DEPLOY_3 #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE - #define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE 0.0 + #define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE 0.0f #endif constexpr xyz_pos_t deploy_3 = Z_PROBE_ALLEN_KEY_DEPLOY_3; do_blocking_move_to(deploy_3, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE)); #endif #ifdef Z_PROBE_ALLEN_KEY_DEPLOY_4 #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_4_FEEDRATE - #define Z_PROBE_ALLEN_KEY_DEPLOY_4_FEEDRATE 0.0 + #define Z_PROBE_ALLEN_KEY_DEPLOY_4_FEEDRATE 0.0f #endif constexpr xyz_pos_t deploy_4 = Z_PROBE_ALLEN_KEY_DEPLOY_4; do_blocking_move_to(deploy_4, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_4_FEEDRATE)); #endif #ifdef Z_PROBE_ALLEN_KEY_DEPLOY_5 #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_5_FEEDRATE - #define Z_PROBE_ALLEN_KEY_DEPLOY_5_FEEDRATE 0.0 + #define Z_PROBE_ALLEN_KEY_DEPLOY_5_FEEDRATE 0.0f #endif constexpr xyz_pos_t deploy_5 = Z_PROBE_ALLEN_KEY_DEPLOY_5; do_blocking_move_to(deploy_5, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_5_FEEDRATE)); @@ -234,35 +234,35 @@ xyz_pos_t Probe::offset; // Initialized by settings.load() inline void run_stow_moves() { #ifdef Z_PROBE_ALLEN_KEY_STOW_1 #ifndef Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE - #define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE 0.0 + #define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE 0.0f #endif constexpr xyz_pos_t stow_1 = Z_PROBE_ALLEN_KEY_STOW_1; do_blocking_move_to(stow_1, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE)); #endif #ifdef Z_PROBE_ALLEN_KEY_STOW_2 #ifndef Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE - #define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE 0.0 + #define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE 0.0f #endif constexpr xyz_pos_t stow_2 = Z_PROBE_ALLEN_KEY_STOW_2; do_blocking_move_to(stow_2, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE)); #endif #ifdef Z_PROBE_ALLEN_KEY_STOW_3 #ifndef Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE - #define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE 0.0 + #define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE 0.0f #endif constexpr xyz_pos_t stow_3 = Z_PROBE_ALLEN_KEY_STOW_3; do_blocking_move_to(stow_3, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE)); #endif #ifdef Z_PROBE_ALLEN_KEY_STOW_4 #ifndef Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE - #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE 0.0 + #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE 0.0f #endif constexpr xyz_pos_t stow_4 = Z_PROBE_ALLEN_KEY_STOW_4; do_blocking_move_to(stow_4, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE)); #endif #ifdef Z_PROBE_ALLEN_KEY_STOW_5 #ifndef Z_PROBE_ALLEN_KEY_STOW_5_FEEDRATE - #define Z_PROBE_ALLEN_KEY_STOW_5_FEEDRATE 0.0 + #define Z_PROBE_ALLEN_KEY_STOW_5_FEEDRATE 0.0f #endif constexpr xyz_pos_t stow_5 = Z_PROBE_ALLEN_KEY_STOW_5; do_blocking_move_to(stow_5, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_5_FEEDRATE)); @@ -355,7 +355,8 @@ xyz_pos_t Probe::offset; // Initialized by settings.load() void Probe::do_z_raise(const float z_raise) { if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Probe::do_z_raise(", z_raise, ")"); float z_dest = z_raise; - if (offset.z < 0) z_dest -= offset.z; + const float zoffs = DIFF_TERN(HAS_HOTEND_OFFSET, offset.z, hotend_offset[active_extruder].z); + if (zoffs < 0) z_dest -= zoffs; do_z_clearance(z_dest); } @@ -714,13 +715,15 @@ bool Probe::probe_down_to_z(const_float_t z, const_feedRate_t fr_mm_s) { float Probe::run_z_probe(const bool sanity_check/*=true*/) { DEBUG_SECTION(log_probe, "Probe::run_z_probe", DEBUGGING(LEVELING)); + const float zoffs = SUM_TERN(HAS_HOTEND_OFFSET, -offset.z, hotend_offset[active_extruder].z); + auto try_to_probe = [&](PGM_P const plbl, const_float_t z_probe_low_point, const feedRate_t fr_mm_s, const bool scheck, const float clearance) -> bool { // Tare the probe, if supported if (TERN0(PROBE_TARE, tare())) return true; // Do a first probe at the fast speed - const bool probe_fail = probe_down_to_z(z_probe_low_point, fr_mm_s), // No probe trigger? - early_fail = (scheck && current_position.z > -offset.z + clearance); // Probe triggered too high? + const bool probe_fail = probe_down_to_z(z_probe_low_point, fr_mm_s), // No probe trigger? + early_fail = (scheck && current_position.z > zoffs + clearance); // Probe triggered too high? #if ENABLED(DEBUG_LEVELING_FEATURE) if (DEBUGGING(LEVELING) && (probe_fail || early_fail)) { DEBUG_ECHOPGM_P(plbl); @@ -737,7 +740,7 @@ float Probe::run_z_probe(const bool sanity_check/*=true*/) { // Stop the probe before it goes too low to prevent damage. // If Z isn't known then probe to -10mm. - const float z_probe_low_point = axis_is_trusted(Z_AXIS) ? -offset.z + Z_PROBE_LOW_POINT : -10.0; + const float z_probe_low_point = axis_is_trusted(Z_AXIS) ? zoffs + Z_PROBE_LOW_POINT : -10.0f; // Double-probing does a fast probe followed by a slow probe #if TOTAL_PROBING == 2 @@ -759,7 +762,7 @@ float Probe::run_z_probe(const bool sanity_check/*=true*/) { // If the nozzle is well over the travel height then // move down quickly before doing the slow probe - const float z = Z_CLEARANCE_DEPLOY_PROBE + 5.0 + (offset.z < 0 ? -offset.z : 0); + const float z = Z_CLEARANCE_DEPLOY_PROBE + 5.0f + (zoffs > 0 ? zoffs : 0); if (current_position.z > z) { // Probe down fast. If the probe never triggered, raise for probe clearance if (!probe_down_to_z(z, z_probe_fast_mm_s)) @@ -847,7 +850,7 @@ float Probe::run_z_probe(const bool sanity_check/*=true*/) { if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("2nd Probe Z:", z2, " Discrepancy:", first_probe_z - z2); // Return a weighted average of the fast and slow probes - const float measured_z = (z2 * 3.0 + first_probe_z * 2.0) * 0.2; + const float measured_z = (z2 * 3.0f + first_probe_z * 2.0f) * 0.2f; #else @@ -856,10 +859,33 @@ float Probe::run_z_probe(const bool sanity_check/*=true*/) { #endif - return measured_z; + return DIFF_TERN(HAS_HOTEND_OFFSET, measured_z, hotend_offset[active_extruder].z); } +#if DO_TOOLCHANGE_FOR_PROBING + + #include "tool_change.h" + + /** + * Switches to the appropriate tool (PROBING_TOOL) for probing (probing = true), and switches + * back to the old tool when probing = false. Uses statics to avoid unnecessary checks and to + * cache the previous tool, so always call with false after calling with true. + */ + void Probe::use_probing_tool(const bool probing/*=true*/) { + static uint8_t old_tool; + static bool old_state = false; + if (probing == old_state) return; + old_state = probing; + if (probing) old_tool = active_extruder; + const uint8_t tool = probing ? PROBING_TOOL : old_tool; + if (tool != active_extruder) + tool_change(tool, ENABLED(PROBE_TOOLCHANGE_NO_MOVE)); + } + +#endif + /** + * - Switch to PROBING_TOOL if necessary * - Move to the given XY * - Deploy the probe, if not already deployed * - Probe the bed, get the Z position @@ -867,6 +893,12 @@ float Probe::run_z_probe(const bool sanity_check/*=true*/) { * - Stow the probe, or * - Raise to the BETWEEN height * - Return the probed Z position + * - Revert to previous tool + * + * A batch of multiple probing operations should always be preceded by use_probing_tool() invocation + * and succeeded by use_probing_tool(false), in order to avoid multiple tool changes and to end up + * with the previously active tool. + * */ float Probe::probe_at_point(const_float_t rx, const_float_t ry, const ProbePtRaise raise_after/*=PROBE_PT_NONE*/, const uint8_t verbose_level/*=0*/, const bool probe_relative/*=true*/, const bool sanity_check/*=true*/) { DEBUG_SECTION(log_probe, "Probe::probe_at_point", DEBUGGING(LEVELING)); @@ -899,7 +931,9 @@ float Probe::probe_at_point(const_float_t rx, const_float_t ry, const ProbePtRai if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Position Not Reachable"); return NAN; } - if (probe_relative) npos -= offset_xy; // Get the nozzle position + + if (probe_relative) // Get the nozzle position, adjust for active hotend if not 0 + npos -= DIFF_TERN(HAS_HOTEND_OFFSET, offset_xy, xy_pos_t(hotend_offset[active_extruder])); // Move the probe to the starting XYZ do_blocking_move_to(npos, feedRate_t(XY_PROBE_FEEDRATE_MM_S)); @@ -938,6 +972,7 @@ float Probe::probe_at_point(const_float_t rx, const_float_t ry, const ProbePtRai #endif } DEBUG_ECHOLNPGM("measured_z: ", measured_z); + return measured_z; } diff --git a/Marlin/src/module/probe.h b/Marlin/src/module/probe.h index 9aff9cff06..770ca81ef4 100644 --- a/Marlin/src/module/probe.h +++ b/Marlin/src/module/probe.h @@ -188,6 +188,8 @@ public: #endif // !HAS_BED_PROBE + static void use_probing_tool(const bool=true) IF_DISABLED(DO_TOOLCHANGE_FOR_PROBING, {}); + static void move_z_after_homing() { #if ALL(DWIN_LCD_PROUI, INDIVIDUAL_AXIS_HOMING_SUBMENU, MESH_BED_LEVELING) || defined(Z_AFTER_HOMING) do_z_clearance(Z_POST_CLEARANCE, true); From 8b1830c487b29560732b079dd5defaba68560652 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Wed, 22 Mar 2023 00:23:38 +0000 Subject: [PATCH 059/225] [cron] Bump distribution date (2023-03-22) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index d052c3bff9..341cdbb482 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-03-20" +//#define STRING_DISTRIBUTION_DATE "2023-03-22" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 99eb9bd3d7..809ba498c1 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-03-20" + #define STRING_DISTRIBUTION_DATE "2023-03-22" #endif /** From 2ecd4cca1b694223802a53d5a7febaac4c4573b6 Mon Sep 17 00:00:00 2001 From: BIGTREETECH <38851044+bigtreetech@users.noreply.github.com> Date: Wed, 22 Mar 2023 15:46:03 +0800 Subject: [PATCH 060/225] =?UTF-8?q?=E2=9C=A8=20FILAMENT=5FSWITCH=5FAND=5FM?= =?UTF-8?q?OTION=20(#25548)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/Configuration.h | 41 +++++++ Marlin/src/feature/runout.cpp | 2 +- Marlin/src/feature/runout.h | 172 ++++++++++++++++++----------- Marlin/src/inc/Conditionals_LCD.h | 91 +++++++++++++++ Marlin/src/inc/Conditionals_post.h | 2 +- buildroot/tests/rambo | 4 +- 6 files changed, 243 insertions(+), 69 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 2603999bd5..9544ac5566 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -1903,6 +1903,47 @@ // as the filament moves. (Be sure to set FILAMENT_RUNOUT_DISTANCE_MM // large enough to avoid false positives.) //#define FILAMENT_MOTION_SENSOR + + #if ENABLED(FILAMENT_MOTION_SENSOR) + //#define FILAMENT_SWITCH_AND_MOTION + #if ENABLED(FILAMENT_SWITCH_AND_MOTION) + #define NUM_MOTION_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_MOTION#_PIN for each. + //#define FIL_MOTION1_PIN -1 + + // Override individually if the motion sensors vary + //#define FIL_MOTION1_STATE LOW + //#define FIL_MOTION1_PULLUP + //#define FIL_MOTION1_PULLDOWN + + //#define FIL_MOTION2_STATE LOW + //#define FIL_MOTION2_PULLUP + //#define FIL_MOTION2_PULLDOWN + + //#define FIL_MOTION3_STATE LOW + //#define FIL_MOTION3_PULLUP + //#define FIL_MOTION3_PULLDOWN + + //#define FIL_MOTION4_STATE LOW + //#define FIL_MOTION4_PULLUP + //#define FIL_MOTION4_PULLDOWN + + //#define FIL_MOTION5_STATE LOW + //#define FIL_MOTION5_PULLUP + //#define FIL_MOTION5_PULLDOWN + + //#define FIL_MOTION6_STATE LOW + //#define FIL_MOTION6_PULLUP + //#define FIL_MOTION6_PULLDOWN + + //#define FIL_MOTION7_STATE LOW + //#define FIL_MOTION7_PULLUP + //#define FIL_MOTION7_PULLDOWN + + //#define FIL_MOTION8_STATE LOW + //#define FIL_MOTION8_PULLUP + //#define FIL_MOTION8_PULLDOWN + #endif + #endif #endif #endif diff --git a/Marlin/src/feature/runout.cpp b/Marlin/src/feature/runout.cpp index 98b6bd0510..44ebd85b32 100644 --- a/Marlin/src/feature/runout.cpp +++ b/Marlin/src/feature/runout.cpp @@ -47,7 +47,7 @@ bool FilamentMonitorBase::enabled = true, #if HAS_FILAMENT_RUNOUT_DISTANCE float RunoutResponseDelayed::runout_distance_mm = FILAMENT_RUNOUT_DISTANCE_MM; - volatile float RunoutResponseDelayed::runout_mm_countdown[NUM_RUNOUT_SENSORS]; + volatile countdown_t RunoutResponseDelayed::mm_countdown; #if ENABLED(FILAMENT_MOTION_SENSOR) uint8_t FilamentSensorEncoder::motion_detected; #endif diff --git a/Marlin/src/feature/runout.h b/Marlin/src/feature/runout.h index e74d857a79..e839db3f5e 100644 --- a/Marlin/src/feature/runout.h +++ b/Marlin/src/feature/runout.h @@ -43,12 +43,18 @@ #define FILAMENT_RUNOUT_THRESHOLD 5 #endif +#if ENABLED(FILAMENT_MOTION_SENSOR) + #define HAS_FILAMENT_MOTION 1 +#endif +#if DISABLED(FILAMENT_MOTION_SENSOR) || ENABLED(FILAMENT_SWITCH_AND_MOTION) + #define HAS_FILAMENT_SWITCH 1 +#endif + void event_filament_runout(const uint8_t extruder); template class TFilamentMonitor; -class FilamentSensorEncoder; -class FilamentSensorSwitch; +class FilamentSensor; class RunoutResponseDelayed; class RunoutResponseDebounced; @@ -56,7 +62,7 @@ class RunoutResponseDebounced; typedef TFilamentMonitor< TERN(HAS_FILAMENT_RUNOUT_DISTANCE, RunoutResponseDelayed, RunoutResponseDebounced), - TERN(FILAMENT_MOTION_SENSOR, FilamentSensorEncoder, FilamentSensorSwitch) + FilamentSensor > FilamentMonitor; extern FilamentMonitor runout; @@ -98,6 +104,11 @@ class TFilamentMonitor : public FilamentMonitorBase { static void filament_present(const uint8_t extruder) { response.filament_present(extruder); } + #if ENABLED(FILAMENT_SWITCH_AND_MOTION) + static void filament_motion_present(const uint8_t extruder) { + response.filament_motion_present(extruder); + } + #endif #if HAS_FILAMENT_RUNOUT_DISTANCE static float& runout_distance() { return response.runout_distance_mm; } @@ -171,37 +182,25 @@ class FilamentSensorBase { static void filament_present(const uint8_t extruder) { runout.filament_present(extruder); // ...which calls response.filament_present(extruder) } + #if ENABLED(FILAMENT_SWITCH_AND_MOTION) + static void filament_motion_present(const uint8_t extruder) { + runout.filament_motion_present(extruder); // ...which calls response.filament_motion_present(extruder) + } + #endif public: static void setup() { - #define _INIT_RUNOUT_PIN(P,S,U,D) do{ if (ENABLED(U)) SET_INPUT_PULLUP(P); else if (ENABLED(D)) SET_INPUT_PULLDOWN(P); else SET_INPUT(P); }while(0) + #define _INIT_RUNOUT_PIN(P,S,U,D) do{ if (ENABLED(U)) SET_INPUT_PULLUP(P); else if (ENABLED(D)) SET_INPUT_PULLDOWN(P); else SET_INPUT(P); }while(0); #define INIT_RUNOUT_PIN(N) _INIT_RUNOUT_PIN(FIL_RUNOUT##N##_PIN, FIL_RUNOUT##N##_STATE, FIL_RUNOUT##N##_PULLUP, FIL_RUNOUT##N##_PULLDOWN) - #if NUM_RUNOUT_SENSORS >= 1 - INIT_RUNOUT_PIN(1); - #endif - #if NUM_RUNOUT_SENSORS >= 2 - INIT_RUNOUT_PIN(2); - #endif - #if NUM_RUNOUT_SENSORS >= 3 - INIT_RUNOUT_PIN(3); - #endif - #if NUM_RUNOUT_SENSORS >= 4 - INIT_RUNOUT_PIN(4); - #endif - #if NUM_RUNOUT_SENSORS >= 5 - INIT_RUNOUT_PIN(5); - #endif - #if NUM_RUNOUT_SENSORS >= 6 - INIT_RUNOUT_PIN(6); - #endif - #if NUM_RUNOUT_SENSORS >= 7 - INIT_RUNOUT_PIN(7); - #endif - #if NUM_RUNOUT_SENSORS >= 8 - INIT_RUNOUT_PIN(8); + REPEAT_1(NUM_RUNOUT_SENSORS, INIT_RUNOUT_PIN); + #undef INIT_RUNOUT_PIN + + #if ENABLED(FILAMENT_SWITCH_AND_MOTION) + #define INIT_MOTION_PIN(N) _INIT_RUNOUT_PIN(FIL_MOTION##N##_PIN, FIL_MOTION##N##_STATE, FIL_MOTION##N##_PULLUP, FIL_MOTION##N##_PULLDOWN) + REPEAT_1(NUM_MOTION_SENSORS, INIT_MOTION_PIN); + #undef INIT_MOTION_PIN #endif #undef _INIT_RUNOUT_PIN - #undef INIT_RUNOUT_PIN } // Return a bitmask of runout pin states @@ -213,36 +212,29 @@ class FilamentSensorBase { // Return a bitmask of runout flag states (1 bits always indicates runout) static uint8_t poll_runout_states() { - return poll_runout_pins() ^ uint8_t(0 - #if NUM_RUNOUT_SENSORS >= 1 - | (FIL_RUNOUT1_STATE ? 0 : _BV(1 - 1)) - #endif - #if NUM_RUNOUT_SENSORS >= 2 - | (FIL_RUNOUT2_STATE ? 0 : _BV(2 - 1)) - #endif - #if NUM_RUNOUT_SENSORS >= 3 - | (FIL_RUNOUT3_STATE ? 0 : _BV(3 - 1)) - #endif - #if NUM_RUNOUT_SENSORS >= 4 - | (FIL_RUNOUT4_STATE ? 0 : _BV(4 - 1)) - #endif - #if NUM_RUNOUT_SENSORS >= 5 - | (FIL_RUNOUT5_STATE ? 0 : _BV(5 - 1)) - #endif - #if NUM_RUNOUT_SENSORS >= 6 - | (FIL_RUNOUT6_STATE ? 0 : _BV(6 - 1)) - #endif - #if NUM_RUNOUT_SENSORS >= 7 - | (FIL_RUNOUT7_STATE ? 0 : _BV(7 - 1)) - #endif - #if NUM_RUNOUT_SENSORS >= 8 - | (FIL_RUNOUT8_STATE ? 0 : _BV(8 - 1)) - #endif - ); + #define _OR_RUNOUT(N) | (FIL_RUNOUT##N##_STATE ? 0 : _BV(N - 1)) + return poll_runout_pins() ^ uint8_t(0 REPEAT_1(NUM_RUNOUT_SENSORS, _OR_RUNOUT)); + #undef _OR_RUNOUT } + + #if ENABLED(FILAMENT_SWITCH_AND_MOTION) + // Return a bitmask of motion pin states + static uint8_t poll_motion_pins() { + #define _OR_MOTION(N) | (READ(FIL_MOTION##N##_PIN) ? _BV((N) - 1) : 0) + return (0 REPEAT_1(NUM_MOTION_SENSORS, _OR_MOTION)); + #undef _OR_MOTION + } + + // Return a bitmask of motion flag states (1 bits always indicates runout) + static uint8_t poll_motion_states() { + #define _OR_MOTION(N) | (FIL_MOTION##N##_STATE ? 0 : _BV(N - 1)) + return poll_motion_pins() ^ uint8_t(0 REPEAT_1(NUM_MOTION_SENSORS, _OR_MOTION)); + #undef _OR_MOTION + } + #endif }; -#if ENABLED(FILAMENT_MOTION_SENSOR) +#if HAS_FILAMENT_MOTION /** * This sensor uses a magnetic encoder disc and a Hall effect @@ -256,14 +248,14 @@ class FilamentSensorBase { static void poll_motion_sensor() { static uint8_t old_state; - const uint8_t new_state = poll_runout_pins(), + const uint8_t new_state = TERN(FILAMENT_SWITCH_AND_MOTION, poll_motion_pins, poll_runout_pins)(), change = old_state ^ new_state; old_state = new_state; #if ENABLED(FILAMENT_RUNOUT_SENSOR_DEBUG) if (change) { SERIAL_ECHOPGM("Motion detected:"); - LOOP_L_N(e, NUM_RUNOUT_SENSORS) + LOOP_L_N(e, TERN(FILAMENT_SWITCH_AND_MOTION, NUM_MOTION_SENSORS, NUM_RUNOUT_SENSORS)) if (TEST(change, e)) SERIAL_CHAR(' ', '0' + e); SERIAL_EOL(); } @@ -277,7 +269,7 @@ class FilamentSensorBase { // If the sensor wheel has moved since the last call to // this method reset the runout counter for the extruder. if (TEST(motion_detected, b->extruder)) - filament_present(b->extruder); + TERN(FILAMENT_SWITCH_AND_MOTION, filament_motion_present, filament_present)(b->extruder); // Clear motion triggers for next block motion_detected = 0; @@ -286,7 +278,9 @@ class FilamentSensorBase { static void run() { poll_motion_sensor(); } }; -#else +#endif // HAS_FILAMENT_MOTION + +#if HAS_FILAMENT_SWITCH /** * This is a simple endstop switch in the path of the filament. @@ -324,25 +318,56 @@ class FilamentSensorBase { } }; + #endif // HAS_FILAMENT_SWITCH + + /** + * This is a simple endstop switch in the path of the filament. + * It can detect filament runout, but not stripouts or jams. + */ + class FilamentSensor : public FilamentSensorBase { + private: + TERN_(HAS_FILAMENT_MOTION, static FilamentSensorEncoder encoder_sensor); + TERN_(HAS_FILAMENT_SWITCH, static FilamentSensorSwitch switch_sensor); + + public: + static void block_completed(const block_t * const b) { + TERN_(HAS_FILAMENT_MOTION, encoder_sensor.block_completed(b)); + TERN_(HAS_FILAMENT_SWITCH, switch_sensor.block_completed(b)); + } + + static void run() { + TERN_(HAS_FILAMENT_MOTION, encoder_sensor.run()); + TERN_(HAS_FILAMENT_SWITCH, switch_sensor.run()); + } + }; -#endif // !FILAMENT_MOTION_SENSOR /********************************* RESPONSE TYPE *********************************/ #if HAS_FILAMENT_RUNOUT_DISTANCE + typedef struct { + float runout[NUM_RUNOUT_SENSORS]; + #if ENABLED(FILAMENT_SWITCH_AND_MOTION) + float motion[NUM_MOTION_SENSORS]; + #endif + } countdown_t; + // RunoutResponseDelayed triggers a runout event only if the length // of filament specified by FILAMENT_RUNOUT_DISTANCE_MM has been fed // during a runout condition. class RunoutResponseDelayed { private: - static volatile float runout_mm_countdown[NUM_RUNOUT_SENSORS]; + static volatile countdown_t mm_countdown; public: static float runout_distance_mm; static void reset() { LOOP_L_N(i, NUM_RUNOUT_SENSORS) filament_present(i); + #if ENABLED(FILAMENT_SWITCH_AND_MOTION) + LOOP_L_N(i, NUM_MOTION_SENSORS) filament_motion_present(i); + #endif } static void run() { @@ -352,7 +377,11 @@ class FilamentSensorBase { if (ELAPSED(ms, t)) { t = millis() + 1000UL; LOOP_L_N(i, NUM_RUNOUT_SENSORS) - SERIAL_ECHOF(i ? F(", ") : F("Remaining mm: "), runout_mm_countdown[i]); + SERIAL_ECHOF(i ? F(", ") : F("Runout remaining mm: "), mm_countdown.runout[i]); + #if ENABLED(FILAMENT_SWITCH_AND_MOTION) + LOOP_L_N(i, NUM_MOTION_SENSORS) + SERIAL_ECHOF(i ? F(", ") : F("Motion remaining mm: "), mm_countdown.motion[i]); + #endif SERIAL_EOL(); } #endif @@ -360,20 +389,33 @@ class FilamentSensorBase { static uint8_t has_run_out() { uint8_t runout_flags = 0; - LOOP_L_N(i, NUM_RUNOUT_SENSORS) if (runout_mm_countdown[i] < 0) SBI(runout_flags, i); + LOOP_L_N(i, NUM_RUNOUT_SENSORS) if (mm_countdown.runout[i] < 0) SBI(runout_flags, i); + #if ENABLED(FILAMENT_SWITCH_AND_MOTION) + LOOP_L_N(i, NUM_MOTION_SENSORS) if (mm_countdown.motion[i] < 0) SBI(runout_flags, i); + #endif return runout_flags; } static void filament_present(const uint8_t extruder) { - runout_mm_countdown[extruder] = runout_distance_mm; + mm_countdown.runout[extruder] = runout_distance_mm; } + #if ENABLED(FILAMENT_SWITCH_AND_MOTION) + static void filament_motion_present(const uint8_t extruder) { + mm_countdown.motion[extruder] = runout_distance_mm; + } + #endif + static void block_completed(const block_t * const b) { if (b->steps.x || b->steps.y || b->steps.z || did_pause_print) { // Allow pause purge move to re-trigger runout state // Only trigger on extrusion with XYZ movement to allow filament change and retract/recover. const uint8_t e = b->extruder; const int32_t steps = b->steps.e; - runout_mm_countdown[e] -= (TEST(b->direction_bits, E_AXIS) ? -steps : steps) * planner.mm_per_step[E_AXIS_N(e)]; + const float mm = (TEST(b->direction_bits, E_AXIS) ? -steps : steps) * planner.mm_per_step[E_AXIS_N(e)]; + if (e < NUM_RUNOUT_SENSORS) mm_countdown.runout[e] -= mm; + #if ENABLED(FILAMENT_SWITCH_AND_MOTION) + if (e < NUM_MOTION_SENSORS) mm_countdown.motion[e] -= mm; + #endif } } }; diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 32712a86d6..ecaeee86e7 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -1212,6 +1212,97 @@ #endif #endif // FILAMENT_RUNOUT_SENSOR +#if ENABLED(FILAMENT_SWITCH_AND_MOTION) + #if NUM_MOTION_SENSORS >= 1 + #ifndef FIL_MOTION1_STATE + #define FIL_MOTION1_STATE FIL_RUNOUT_STATE + #endif + #ifndef FIL_MOTION1_PULLUP + #define FIL_MOTION1_PULLUP FIL_RUNOUT_PULLUP + #endif + #ifndef FIL_MOTION1_PULLDOWN + #define FIL_MOTION1_PULLDOWN FIL_RUNOUT_PULLDOWN + #endif + #endif + #if NUM_MOTION_SENSORS >= 2 + #ifndef FIL_MOTION2_STATE + #define FIL_MOTION2_STATE FIL_RUNOUT_STATE + #endif + #ifndef FIL_MOTION2_PULLUP + #define FIL_MOTION2_PULLUP FIL_RUNOUT_PULLUP + #endif + #ifndef FIL_MOTION2_PULLDOWN + #define FIL_MOTION2_PULLDOWN FIL_RUNOUT_PULLDOWN + #endif + #endif + #if NUM_MOTION_SENSORS >= 3 + #ifndef FIL_MOTION3_STATE + #define FIL_MOTION3_STATE FIL_RUNOUT_STATE + #endif + #ifndef FIL_MOTION3_PULLUP + #define FIL_MOTION3_PULLUP FIL_RUNOUT_PULLUP + #endif + #ifndef FIL_MOTION3_PULLDOWN + #define FIL_MOTION3_PULLDOWN FIL_RUNOUT_PULLDOWN + #endif + #endif + #if NUM_MOTION_SENSORS >= 4 + #ifndef FIL_MOTION4_STATE + #define FIL_MOTION4_STATE FIL_RUNOUT_STATE + #endif + #ifndef FIL_MOTION4_PULLUP + #define FIL_MOTION4_PULLUP FIL_RUNOUT_PULLUP + #endif + #ifndef FIL_MOTION4_PULLDOWN + #define FIL_MOTION4_PULLDOWN FIL_RUNOUT_PULLDOWN + #endif + #endif + #if NUM_MOTION_SENSORS >= 5 + #ifndef FIL_MOTION5_STATE + #define FIL_MOTION5_STATE FIL_RUNOUT_STATE + #endif + #ifndef FIL_MOTION5_PULLUP + #define FIL_MOTION5_PULLUP FIL_RUNOUT_PULLUP + #endif + #ifndef FIL_MOTION5_PULLDOWN + #define FIL_MOTION5_PULLDOWN FIL_RUNOUT_PULLDOWN + #endif + #endif + #if NUM_MOTION_SENSORS >= 6 + #ifndef FIL_MOTION6_STATE + #define FIL_MOTION6_STATE FIL_RUNOUT_STATE + #endif + #ifndef FIL_MOTION6_PULLUP + #define FIL_MOTION6_PULLUP FIL_RUNOUT_PULLUP + #endif + #ifndef FIL_MOTION6_PULLDOWN + #define FIL_MOTION6_PULLDOWN FIL_RUNOUT_PULLDOWN + #endif + #endif + #if NUM_MOTION_SENSORS >= 7 + #ifndef FIL_MOTION7_STATE + #define FIL_MOTION7_STATE FIL_RUNOUT_STATE + #endif + #ifndef FIL_MOTION7_PULLUP + #define FIL_MOTION7_PULLUP FIL_RUNOUT_PULLUP + #endif + #ifndef FIL_MOTION7_PULLDOWN + #define FIL_MOTION7_PULLDOWN FIL_RUNOUT_PULLDOWN + #endif + #endif + #if NUM_MOTION_SENSORS >= 8 + #ifndef FIL_MOTION8_STATE + #define FIL_MOTION8_STATE FIL_RUNOUT_STATE + #endif + #ifndef FIL_MOTION8_PULLUP + #define FIL_MOTION8_PULLUP FIL_RUNOUT_PULLUP + #endif + #ifndef FIL_MOTION8_PULLDOWN + #define FILMOTION8_PULLDOWN FIL_RUNOUT_PULLDOWN + #endif + #endif +#endif // FILAMENT_SWITCH_AND_MOTION + // Homing to Min or Max #if X_HOME_DIR > 0 #define X_HOME_TO_MAX 1 diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index a054f90840..58f04a39b6 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -2664,7 +2664,7 @@ #endif /** - * Up to 3 PWM fans + * Up to 8 PWM fans */ #ifndef FAN_INVERTING #define FAN_INVERTING false diff --git a/buildroot/tests/rambo b/buildroot/tests/rambo index 9a017c971f..7e6f71364c 100755 --- a/buildroot/tests/rambo +++ b/buildroot/tests/rambo @@ -15,7 +15,7 @@ opt_set MOTHERBOARD BOARD_RAMBO \ TEMP_SENSOR_PROBE 1 TEMP_PROBE_PIN 12 \ TEMP_SENSOR_CHAMBER 3 TEMP_CHAMBER_PIN 3 HEATER_CHAMBER_PIN 45 \ GRID_MAX_POINTS_X 16 AUTO_POWER_E_TEMP 80 \ - FANMUX0_PIN 53 + FANMUX0_PIN 53 FIL_MOTION1_PIN 45 opt_disable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN USE_WATCHDOG opt_enable USE_ZMAX_PLUG REPRAP_DISCOUNT_SMART_CONTROLLER LCD_PROGRESS_BAR LCD_PROGRESS_BAR_TEST \ FIX_MOUNTED_PROBE CODEPENDENT_XY_HOMING PIDTEMPBED PTC_PROBE PTC_BED \ @@ -25,7 +25,7 @@ opt_enable USE_ZMAX_PLUG REPRAP_DISCOUNT_SMART_CONTROLLER LCD_PROGRESS_BAR LCD_P NEOPIXEL_LED NEOPIXEL_PIN CASE_LIGHT_ENABLE CASE_LIGHT_USE_NEOPIXEL CASE_LIGHT_MENU \ PID_PARAMS_PER_HOTEND PID_AUTOTUNE_MENU PID_EDIT_MENU PID_EXTRUSION_SCALING LCD_SHOW_E_TOTAL \ PRINTCOUNTER SERVICE_NAME_1 SERVICE_INTERVAL_1 LCD_BED_TRAMMING BED_TRAMMING_INCLUDE_CENTER \ - NOZZLE_PARK_FEATURE FILAMENT_RUNOUT_SENSOR FILAMENT_RUNOUT_DISTANCE_MM \ + NOZZLE_PARK_FEATURE FILAMENT_RUNOUT_SENSOR FILAMENT_RUNOUT_DISTANCE_MM FILAMENT_MOTION_SENSOR FILAMENT_SWITCH_AND_MOTION \ ADVANCED_PAUSE_FEATURE FILAMENT_LOAD_UNLOAD_GCODES FILAMENT_UNLOAD_ALL_EXTRUDERS \ PASSWORD_FEATURE PASSWORD_ON_STARTUP PASSWORD_ON_SD_PRINT_MENU PASSWORD_AFTER_SD_PRINT_END PASSWORD_AFTER_SD_PRINT_ABORT \ AUTO_BED_LEVELING_BILINEAR Z_MIN_PROBE_REPEATABILITY_TEST DISTINCT_E_FACTORS \ From 91b5015a8b3ec5efd1052fdf7208124ff8b4120b Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 22 Mar 2023 03:22:29 -0500 Subject: [PATCH 061/225] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Ext?= =?UTF-8?q?UI::onSetPowerLoss?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/feature/powerloss.cpp | 1 + Marlin/src/lcd/extui/anycubic_chiron/chiron_extui.cpp | 7 +++++-- Marlin/src/lcd/extui/anycubic_i3mega/anycubic_extui.cpp | 7 +++++-- Marlin/src/lcd/extui/dgus/dgus_extui.cpp | 7 +++++-- Marlin/src/lcd/extui/dgus_reloaded/dgus_reloaded_extui.cpp | 7 +++++-- Marlin/src/lcd/extui/example/example.cpp | 7 +++++-- Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_extui.cpp | 7 +++++-- Marlin/src/lcd/extui/ia_creality/creality_extui.cpp | 7 +++++-- Marlin/src/lcd/extui/malyan/malyan_extui.cpp | 7 +++++-- Marlin/src/lcd/extui/nextion/nextion_extui.cpp | 7 +++++-- Marlin/src/lcd/extui/ui_api.h | 5 +++-- 11 files changed, 49 insertions(+), 20 deletions(-) diff --git a/Marlin/src/feature/powerloss.cpp b/Marlin/src/feature/powerloss.cpp index faec893928..dd20d04278 100644 --- a/Marlin/src/feature/powerloss.cpp +++ b/Marlin/src/feature/powerloss.cpp @@ -113,6 +113,7 @@ void PrintJobRecovery::changed() { purge(); else if (IS_SD_PRINTING()) save(true); + TERN_(EXTENSIBLE_UI, ExtUI::onSetPowerLoss(onoff)); } /** diff --git a/Marlin/src/lcd/extui/anycubic_chiron/chiron_extui.cpp b/Marlin/src/lcd/extui/anycubic_chiron/chiron_extui.cpp index 39b328d808..520ca587e3 100644 --- a/Marlin/src/lcd/extui/anycubic_chiron/chiron_extui.cpp +++ b/Marlin/src/lcd/extui/anycubic_chiron/chiron_extui.cpp @@ -94,12 +94,12 @@ namespace ExtUI { // Called after loading or resetting stored settings } - void onSettingsStored(bool success) { + void onSettingsStored(const bool success) { // Called after the entire EEPROM has been written, // whether successful or not. } - void onSettingsLoaded(bool success) { + void onSettingsLoaded(const bool success) { // Called after the entire EEPROM has been read, // whether successful or not. } @@ -120,6 +120,9 @@ namespace ExtUI { #endif #if ENABLED(POWER_LOSS_RECOVERY) + void onSetPowerLoss(const bool onoff) { + // Called when power-loss is enabled/disabled + } void onPowerLoss() { // Called when power-loss state is detected } diff --git a/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_extui.cpp b/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_extui.cpp index afe88bf583..a2ad678ac6 100644 --- a/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_extui.cpp +++ b/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_extui.cpp @@ -81,12 +81,12 @@ namespace ExtUI { // Called after loading or resetting stored settings } - void onSettingsStored(bool success) { + void onSettingsStored(const bool success) { // Called after the entire EEPROM has been written, // whether successful or not. } - void onSettingsLoaded(bool success) { + void onSettingsLoaded(const bool success) { // Called after the entire EEPROM has been read, // whether successful or not. } @@ -106,6 +106,9 @@ namespace ExtUI { #endif #if ENABLED(POWER_LOSS_RECOVERY) + void onSetPowerLoss(const bool onoff) { + // Called when power-loss is enabled/disabled + } void onPowerLoss() { // Called when power-loss state is detected } diff --git a/Marlin/src/lcd/extui/dgus/dgus_extui.cpp b/Marlin/src/lcd/extui/dgus/dgus_extui.cpp index 2f3bbd64cc..2fe4e03016 100644 --- a/Marlin/src/lcd/extui/dgus/dgus_extui.cpp +++ b/Marlin/src/lcd/extui/dgus/dgus_extui.cpp @@ -102,12 +102,12 @@ namespace ExtUI { // Called after loading or resetting stored settings } - void onSettingsStored(bool success) { + void onSettingsStored(const bool success) { // Called after the entire EEPROM has been written, // whether successful or not. } - void onSettingsLoaded(bool success) { + void onSettingsLoaded(const bool success) { // Called after the entire EEPROM has been read, // whether successful or not. } @@ -126,6 +126,9 @@ namespace ExtUI { #endif #if ENABLED(POWER_LOSS_RECOVERY) + void onSetPowerLoss(const bool onoff) { + // Called when power-loss is enabled/disabled + } void onPowerLoss() { // Called when power-loss state is detected } diff --git a/Marlin/src/lcd/extui/dgus_reloaded/dgus_reloaded_extui.cpp b/Marlin/src/lcd/extui/dgus_reloaded/dgus_reloaded_extui.cpp index 9aecf65f98..fb8ef8cc84 100644 --- a/Marlin/src/lcd/extui/dgus_reloaded/dgus_reloaded_extui.cpp +++ b/Marlin/src/lcd/extui/dgus_reloaded/dgus_reloaded_extui.cpp @@ -100,11 +100,11 @@ namespace ExtUI { void onPostprocessSettings() {} - void onSettingsStored(bool success) { + void onSettingsStored(const bool success) { dgus_screen_handler.ConfigurationStoreWritten(success); } - void onSettingsLoaded(bool success) { + void onSettingsLoaded(const bool success) { dgus_screen_handler.ConfigurationStoreRead(success); } @@ -123,6 +123,9 @@ namespace ExtUI { #endif #if ENABLED(POWER_LOSS_RECOVERY) + void onSetPowerLoss(const bool onoff) { + // Called when power-loss is enabled/disabled + } void onPowerLoss() { // Called when power-loss state is detected } diff --git a/Marlin/src/lcd/extui/example/example.cpp b/Marlin/src/lcd/extui/example/example.cpp index a5e816efd8..83b7a0a3ca 100644 --- a/Marlin/src/lcd/extui/example/example.cpp +++ b/Marlin/src/lcd/extui/example/example.cpp @@ -88,12 +88,12 @@ namespace ExtUI { // Called after loading or resetting stored settings } - void onSettingsStored(bool success) { + void onSettingsStored(const bool success) { // Called after the entire EEPROM has been written, // whether successful or not. } - void onSettingsLoaded(bool success) { + void onSettingsLoaded(const bool success) { // Called after the entire EEPROM has been read, // whether successful or not. } @@ -112,6 +112,9 @@ namespace ExtUI { #endif #if ENABLED(POWER_LOSS_RECOVERY) + void onSetPowerLoss(const bool onoff) { + // Called when power-loss is enabled/disabled + } void onPowerLoss() { // Called when power-loss state is detected } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_extui.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_extui.cpp index 159847bde1..b82b4a07bd 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_extui.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_extui.cpp @@ -97,7 +97,7 @@ namespace ExtUI { void onLoadSettings(const char *buff) { InterfaceSettingsScreen::loadSettings(buff); } void onPostprocessSettings() {} // Called after loading or resetting stored settings - void onSettingsStored(bool success) { + void onSettingsStored(const bool success) { #ifdef ARCHIM2_SPI_FLASH_EEPROM_BACKUP_SIZE if (success && InterfaceSettingsScreen::backupEEPROM()) { SERIAL_ECHOLNPGM("EEPROM backed up to SPI Flash"); @@ -106,7 +106,7 @@ namespace ExtUI { UNUSED(success); #endif } - void onSettingsLoaded(bool) {} + void onSettingsLoaded(const bool) {} void onPlayTone(const uint16_t frequency, const uint16_t duration) { sound.play_tone(frequency, duration); } @@ -125,6 +125,9 @@ namespace ExtUI { #endif #if ENABLED(POWER_LOSS_RECOVERY) + void onSetPowerLoss(const bool onoff) { + // Called when power-loss is enabled/disabled + } void onPowerLoss() { // Called when power-loss state is detected } diff --git a/Marlin/src/lcd/extui/ia_creality/creality_extui.cpp b/Marlin/src/lcd/extui/ia_creality/creality_extui.cpp index c9c064fdc8..d92517578f 100644 --- a/Marlin/src/lcd/extui/ia_creality/creality_extui.cpp +++ b/Marlin/src/lcd/extui/ia_creality/creality_extui.cpp @@ -1995,12 +1995,12 @@ namespace ExtUI { SetTouchScreenConfiguration(); } - void onSettingsStored(bool success) { + void onSettingsStored(const bool success) { // This is called after the entire EEPROM has been written, // whether successful or not. } - void onSettingsLoaded(bool success) { + void onSettingsLoaded(const bool success) { #if HAS_MESH if (ExtUI::getMeshValid()) { uint8_t abl_probe_index = 0; @@ -2026,6 +2026,9 @@ namespace ExtUI { } #if ENABLED(POWER_LOSS_RECOVERY) + void onSetPowerLoss(const bool onoff) { + // Called when power-loss is enabled/disabled + } void onPowerLoss() { // Called when power-loss state is detected } diff --git a/Marlin/src/lcd/extui/malyan/malyan_extui.cpp b/Marlin/src/lcd/extui/malyan/malyan_extui.cpp index b978937def..8bffa442b6 100644 --- a/Marlin/src/lcd/extui/malyan/malyan_extui.cpp +++ b/Marlin/src/lcd/extui/malyan/malyan_extui.cpp @@ -147,8 +147,8 @@ namespace ExtUI { void onStoreSettings(char*) {} void onLoadSettings(const char*) {} void onPostprocessSettings() {} - void onSettingsStored(bool) {} - void onSettingsLoaded(bool) {} + void onSettingsStored(const bool) {} + void onSettingsLoaded(const bool) {} #if HAS_MESH void onLevelingStart() {} @@ -158,6 +158,9 @@ namespace ExtUI { #endif #if ENABLED(POWER_LOSS_RECOVERY) + void onSetPowerLoss(const bool onoff) { + // Called when power-loss is enabled/disabled + } void onPowerLoss() { // Called when power-loss state is detected } diff --git a/Marlin/src/lcd/extui/nextion/nextion_extui.cpp b/Marlin/src/lcd/extui/nextion/nextion_extui.cpp index 433bbfbe8b..bf40fe97ac 100644 --- a/Marlin/src/lcd/extui/nextion/nextion_extui.cpp +++ b/Marlin/src/lcd/extui/nextion/nextion_extui.cpp @@ -79,12 +79,12 @@ namespace ExtUI { // Called after loading or resetting stored settings } - void onSettingsStored(bool success) { + void onSettingsStored(const bool success) { // Called after the entire EEPROM has been written, // whether successful or not. } - void onSettingsLoaded(bool success) { + void onSettingsLoaded(const bool success) { // Called after the entire EEPROM has been read, // whether successful or not. } @@ -103,6 +103,9 @@ namespace ExtUI { #endif #if ENABLED(POWER_LOSS_RECOVERY) + void onSetPowerLoss(const bool onoff) { + // Called when power-loss is enabled/disabled + } void onPowerLoss() { // Called when power-loss state is detected } diff --git a/Marlin/src/lcd/extui/ui_api.h b/Marlin/src/lcd/extui/ui_api.h index 46f0891bb7..98441ccdd9 100644 --- a/Marlin/src/lcd/extui/ui_api.h +++ b/Marlin/src/lcd/extui/ui_api.h @@ -423,9 +423,10 @@ namespace ExtUI { void onStoreSettings(char *); void onLoadSettings(const char *); void onPostprocessSettings(); - void onSettingsStored(bool success); - void onSettingsLoaded(bool success); + void onSettingsStored(const bool success); + void onSettingsLoaded(const bool success); #if ENABLED(POWER_LOSS_RECOVERY) + void onSetPowerLoss(const bool onoff); void onPowerLoss(); void onPowerLossResume(); #endif From 724ba4b4e607364c6c5f68d716648b90cd850fa8 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Thu, 23 Mar 2023 00:22:05 +0000 Subject: [PATCH 062/225] [cron] Bump distribution date (2023-03-23) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 341cdbb482..21baa79660 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-03-22" +//#define STRING_DISTRIBUTION_DATE "2023-03-23" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 809ba498c1..50445874e9 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-03-22" + #define STRING_DISTRIBUTION_DATE "2023-03-23" #endif /** From 17b43d6b3d10a816ba534547d37346888f3897b4 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 23 Mar 2023 17:19:20 -0500 Subject: [PATCH 063/225] =?UTF-8?q?=F0=9F=8E=A8=20calibration=5Fstage=20?= =?UTF-8?q?=3D>=20stage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dogm/u8g_dev_tft_upscale_from_128x64.cpp | 22 +++++++++---------- .../extui/mks_ui/draw_touch_calibration.cpp | 20 ++++++++--------- Marlin/src/lcd/tft/ui_common.cpp | 20 ++++++++--------- 3 files changed, 31 insertions(+), 31 deletions(-) diff --git a/Marlin/src/lcd/dogm/u8g_dev_tft_upscale_from_128x64.cpp b/Marlin/src/lcd/dogm/u8g_dev_tft_upscale_from_128x64.cpp index f1bf9d032e..efc010ca89 100644 --- a/Marlin/src/lcd/dogm/u8g_dev_tft_upscale_from_128x64.cpp +++ b/Marlin/src/lcd/dogm/u8g_dev_tft_upscale_from_128x64.cpp @@ -501,26 +501,26 @@ U8G_PB_DEV(u8g_dev_tft_320x240_upscale_from_128x64, WIDTH, HEIGHT, PAGE_HEIGHT, void MarlinUI::touch_calibration_screen() { uint16_t x, y; - calibrationState calibration_stage = touch_calibration.get_calibration_state(); + calibrationState stage = touch_calibration.get_calibration_state(); - if (calibration_stage == CALIBRATION_NONE) { + if (stage == CALIBRATION_NONE) { // start and clear screen defer_status_screen(true); - calibration_stage = touch_calibration.calibration_start(); + stage = touch_calibration.calibration_start(); tftio.set_window(0, 0, (TFT_WIDTH) - 1, (TFT_HEIGHT) - 1); tftio.WriteMultiple(TFT_MARLINBG_COLOR, uint32_t(TFT_WIDTH) * (TFT_HEIGHT)); } else { // clear last cross - x = touch_calibration.calibration_points[_MIN(calibration_stage - 1, CALIBRATION_BOTTOM_RIGHT)].x; - y = touch_calibration.calibration_points[_MIN(calibration_stage - 1, CALIBRATION_BOTTOM_RIGHT)].y; + x = touch_calibration.calibration_points[_MIN(stage - 1, CALIBRATION_BOTTOM_RIGHT)].x; + y = touch_calibration.calibration_points[_MIN(stage - 1, CALIBRATION_BOTTOM_RIGHT)].y; drawCross(x, y, TFT_MARLINBG_COLOR); } FSTR_P str = nullptr; - if (calibration_stage < CALIBRATION_SUCCESS) { + if (stage < CALIBRATION_SUCCESS) { // handle current state - switch (calibration_stage) { + switch (stage) { case CALIBRATION_TOP_LEFT: str = GET_TEXT_F(MSG_TOP_LEFT); break; case CALIBRATION_BOTTOM_LEFT: str = GET_TEXT_F(MSG_BOTTOM_LEFT); break; case CALIBRATION_TOP_RIGHT: str = GET_TEXT_F(MSG_TOP_RIGHT); break; @@ -528,13 +528,13 @@ U8G_PB_DEV(u8g_dev_tft_320x240_upscale_from_128x64, WIDTH, HEIGHT, PAGE_HEIGHT, default: break; } - x = touch_calibration.calibration_points[calibration_stage].x; - y = touch_calibration.calibration_points[calibration_stage].y; + x = touch_calibration.calibration_points[stage].x; + y = touch_calibration.calibration_points[stage].y; drawCross(x, y, TFT_MARLINUI_COLOR); } else { // end calibration - str = calibration_stage == CALIBRATION_SUCCESS ? GET_TEXT_F(MSG_CALIBRATION_COMPLETED) : GET_TEXT_F(MSG_CALIBRATION_FAILED); + str = stage == CALIBRATION_SUCCESS ? GET_TEXT_F(MSG_CALIBRATION_COMPLETED) : GET_TEXT_F(MSG_CALIBRATION_FAILED); defer_status_screen(false); touch_calibration.calibration_end(); TERN_(HAS_TOUCH_BUTTONS, redrawTouchButtons = true); @@ -548,7 +548,7 @@ U8G_PB_DEV(u8g_dev_tft_320x240_upscale_from_128x64, WIDTH, HEIGHT, PAGE_HEIGHT, } while (u8g.nextPage()); drawing_screen = false; safe_delay(250); - if (calibration_stage == CALIBRATION_SUCCESS) { + if (stage == CALIBRATION_SUCCESS) { safe_delay(500); ui.goto_previous_screen(); } diff --git a/Marlin/src/lcd/extui/mks_ui/draw_touch_calibration.cpp b/Marlin/src/lcd/extui/mks_ui/draw_touch_calibration.cpp index e0c663e282..a9a25db118 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_touch_calibration.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_touch_calibration.cpp @@ -55,22 +55,22 @@ static void drawCross(uint16_t x, uint16_t y, uint16_t color) { void lv_update_touch_calibration_screen() { uint16_t x, y; - calibrationState calibration_stage = touch_calibration.get_calibration_state(); - if (calibration_stage == CALIBRATION_NONE) { + calibrationState stage = touch_calibration.get_calibration_state(); + if (stage == CALIBRATION_NONE) { // start and clear screen - calibration_stage = touch_calibration.calibration_start(); + stage = touch_calibration.calibration_start(); } else { // clear last cross - x = touch_calibration.calibration_points[_MIN(calibration_stage - 1, CALIBRATION_BOTTOM_RIGHT)].x; - y = touch_calibration.calibration_points[_MIN(calibration_stage - 1, CALIBRATION_BOTTOM_RIGHT)].y; + x = touch_calibration.calibration_points[_MIN(stage - 1, CALIBRATION_BOTTOM_RIGHT)].x; + y = touch_calibration.calibration_points[_MIN(stage - 1, CALIBRATION_BOTTOM_RIGHT)].y; drawCross(x, y, LV_COLOR_BACKGROUND.full); } const char *str = nullptr; - if (calibration_stage < CALIBRATION_SUCCESS) { + if (stage < CALIBRATION_SUCCESS) { // handle current state - switch (calibration_stage) { + switch (stage) { case CALIBRATION_TOP_LEFT: str = GET_TEXT(MSG_TOP_LEFT); break; case CALIBRATION_BOTTOM_LEFT: str = GET_TEXT(MSG_BOTTOM_LEFT); break; case CALIBRATION_TOP_RIGHT: str = GET_TEXT(MSG_TOP_RIGHT); break; @@ -78,13 +78,13 @@ void lv_update_touch_calibration_screen() { default: break; } - x = touch_calibration.calibration_points[calibration_stage].x; - y = touch_calibration.calibration_points[calibration_stage].y; + x = touch_calibration.calibration_points[stage].x; + y = touch_calibration.calibration_points[stage].y; drawCross(x, y, LV_COLOR_WHITE.full); } else { // end calibration - str = calibration_stage == CALIBRATION_SUCCESS ? GET_TEXT(MSG_CALIBRATION_COMPLETED) : GET_TEXT(MSG_CALIBRATION_FAILED); + str = stage == CALIBRATION_SUCCESS ? GET_TEXT(MSG_CALIBRATION_COMPLETED) : GET_TEXT(MSG_CALIBRATION_FAILED); touch_calibration.calibration_end(); lv_big_button_create(scr, "F:/bmp_return.bin", common_menu.text_back, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight, event_handler, ID_TC_RETURN); } diff --git a/Marlin/src/lcd/tft/ui_common.cpp b/Marlin/src/lcd/tft/ui_common.cpp index 705438e95b..6fbde79154 100644 --- a/Marlin/src/lcd/tft/ui_common.cpp +++ b/Marlin/src/lcd/tft/ui_common.cpp @@ -228,24 +228,24 @@ void MarlinUI::clear_lcd() { void MarlinUI::touch_calibration_screen() { uint16_t x, y; - calibrationState calibration_stage = touch_calibration.get_calibration_state(); + calibrationState stage = touch_calibration.get_calibration_state(); - if (calibration_stage == CALIBRATION_NONE) { + if (stage == CALIBRATION_NONE) { defer_status_screen(true); clear_lcd(); - calibration_stage = touch_calibration.calibration_start(); + stage = touch_calibration.calibration_start(); } else { - x = touch_calibration.calibration_points[_MIN(calibration_stage - 1, CALIBRATION_BOTTOM_RIGHT)].x; - y = touch_calibration.calibration_points[_MIN(calibration_stage - 1, CALIBRATION_BOTTOM_RIGHT)].y; + x = touch_calibration.calibration_points[_MIN(stage - 1, CALIBRATION_BOTTOM_RIGHT)].x; + y = touch_calibration.calibration_points[_MIN(stage - 1, CALIBRATION_BOTTOM_RIGHT)].y; tft.canvas(x - 15, y - 15, 31, 31); tft.set_background(COLOR_BACKGROUND); } touch.clear(); - if (calibration_stage < CALIBRATION_SUCCESS) { - switch (calibration_stage) { + if (stage < CALIBRATION_SUCCESS) { + switch (stage) { case CALIBRATION_TOP_LEFT: tft_string.set(GET_TEXT(MSG_TOP_LEFT)); break; case CALIBRATION_BOTTOM_LEFT: tft_string.set(GET_TEXT(MSG_BOTTOM_LEFT)); break; case CALIBRATION_TOP_RIGHT: tft_string.set(GET_TEXT(MSG_TOP_RIGHT)); break; @@ -253,8 +253,8 @@ void MarlinUI::clear_lcd() { default: break; } - x = touch_calibration.calibration_points[calibration_stage].x; - y = touch_calibration.calibration_points[calibration_stage].y; + x = touch_calibration.calibration_points[stage].x; + y = touch_calibration.calibration_points[stage].y; tft.canvas(x - 15, y - 15, 31, 31); tft.set_background(COLOR_BACKGROUND); @@ -264,7 +264,7 @@ void MarlinUI::clear_lcd() { touch.add_control(CALIBRATE, 0, 0, TFT_WIDTH, TFT_HEIGHT, uint32_t(x) << 16 | uint32_t(y)); } else { - tft_string.set(calibration_stage == CALIBRATION_SUCCESS ? GET_TEXT(MSG_CALIBRATION_COMPLETED) : GET_TEXT(MSG_CALIBRATION_FAILED)); + tft_string.set(stage == CALIBRATION_SUCCESS ? GET_TEXT(MSG_CALIBRATION_COMPLETED) : GET_TEXT(MSG_CALIBRATION_FAILED)); defer_status_screen(false); touch_calibration.calibration_end(); touch.add_control(BACK, 0, 0, TFT_WIDTH, TFT_HEIGHT); From c641208ceb39455985f3665dc9ead2d0ae263012 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Fri, 24 Mar 2023 00:21:09 +0000 Subject: [PATCH 064/225] [cron] Bump distribution date (2023-03-24) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 21baa79660..62330c57c7 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-03-23" +//#define STRING_DISTRIBUTION_DATE "2023-03-24" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 50445874e9..d8245208b4 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-03-23" + #define STRING_DISTRIBUTION_DATE "2023-03-24" #endif /** From 28666f2fb28e8b68f641e507359a72dbf4bc117a Mon Sep 17 00:00:00 2001 From: Martin Turski Date: Fri, 24 Mar 2023 05:08:28 +0100 Subject: [PATCH 065/225] =?UTF-8?q?=F0=9F=A9=B9=20Reset=20touch=20screen?= =?UTF-8?q?=20calibration=20on=20failure=20(#25334)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/src/lcd/tft_io/touch_calibration.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/lcd/tft_io/touch_calibration.cpp b/Marlin/src/lcd/tft_io/touch_calibration.cpp index 44ebc73d71..b1ef17df17 100644 --- a/Marlin/src/lcd/tft_io/touch_calibration.cpp +++ b/Marlin/src/lcd/tft_io/touch_calibration.cpp @@ -74,7 +74,7 @@ void TouchCalibration::validate_calibration() { else { calibration_state = CALIBRATION_FAIL; calibration_reset(); - if (need_calibration() && failed_count++ < TOUCH_CALIBRATION_MAX_RETRIES) calibration_state = CALIBRATION_TOP_LEFT; + if (need_calibration() && failed_count++ < TOUCH_CALIBRATION_MAX_RETRIES) calibration_state = CALIBRATION_NONE; } #undef CAL_PTS From 769ad2764512b38e987ebbed1fe026d68a424bb1 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 24 Mar 2023 00:33:39 -0500 Subject: [PATCH 066/225] =?UTF-8?q?=F0=9F=8E=A8=20TMC=20SPI=20Pins?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Martin Turski --- Marlin/Configuration_adv.h | 50 +++++++++--------- Marlin/src/HAL/DUE/inc/SanityCheck.h | 2 +- Marlin/src/HAL/LPC1768/inc/SanityCheck.h | 4 +- Marlin/src/inc/Conditionals_post.h | 8 +++ Marlin/src/inc/SanityCheck.h | 2 + Marlin/src/module/stepper/trinamic.cpp | 2 +- Marlin/src/pins/linux/pins_RAMPS_LINUX.h | 20 ++++--- Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h | 20 ++++--- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h | 9 ++-- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h | 22 ++++---- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h | 20 ++++--- Marlin/src/pins/lpc1768/pins_MKS_SBASE.h | 18 +++---- Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h | 20 ++++--- Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h | 21 ++++---- .../src/pins/lpc1769/pins_COHESION3D_MINI.h | 18 +++---- .../src/pins/lpc1769/pins_COHESION3D_REMIX.h | 18 +++---- Marlin/src/pins/lpc1769/pins_FLY_CDY.h | 20 ++++--- Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h | 22 ++++---- Marlin/src/pins/mega/pins_GT2560_V3_A20.h | 2 +- Marlin/src/pins/mega/pins_GT2560_V4_A20.h | 2 +- Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h | 6 +-- .../pins/mega/pins_PROTONEER_CNC_SHIELD_V3.h | 6 +-- Marlin/src/pins/mega/pins_SILVER_GATE.h | 2 +- Marlin/src/pins/pins.h | 2 +- Marlin/src/pins/pinsDebug_list.h | 21 +++++--- Marlin/src/pins/ramps/pins_3DRAG.h | 2 +- Marlin/src/pins/ramps/pins_MKS_GEN_L.h | 10 ++-- Marlin/src/pins/ramps/pins_RAMPS.h | 20 ++++--- Marlin/src/pins/ramps/pins_RAMPS_S_12.h | 18 +++---- Marlin/src/pins/ramps/pins_TRIGORILLA_13.h | 14 ++--- Marlin/src/pins/ramps/pins_TT_OSCAR.h | 18 +++---- Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h | 18 +++---- Marlin/src/pins/sam/pins_ARCHIM2.h | 20 ++++--- .../src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h | 1 - Marlin/src/pins/samd/pins_MINITRONICS20.h | 10 ++-- Marlin/src/pins/samd/pins_RAMPS_144.h | 20 ++++--- .../src/pins/sanguino/pins_SANGUINOLOLU_11.h | 2 +- Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h | 20 ++++--- .../src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h | 37 +++++++------ .../src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h | 2 +- Marlin/src/pins/stm32f1/pins_CREALITY_V25S1.h | 4 +- Marlin/src/pins/stm32f1/pins_FLY_MINI.h | 50 +++++++++--------- .../pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h | 4 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3D.h | 20 ++++--- .../pins/stm32f1/pins_MKS_ROBIN_E3D_V1_1.h | 21 ++++---- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h | 20 ++++--- .../pins/stm32f1/pins_MKS_ROBIN_E3_common.h | 4 +- .../src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h | 20 ++++--- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h | 20 ++++--- Marlin/src/pins/stm32f1/pins_PANDA_PI_V29.h | 20 ++++--- .../src/pins/stm32f4/pins_BTT_BTT002_V1_0.h | 20 ++++--- Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h | 26 +++++----- .../pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h | 20 ++++--- .../pins/stm32f4/pins_BTT_SKR_PRO_common.h | 22 ++++---- .../pins/stm32f4/pins_BTT_SKR_V2_0_common.h | 20 ++++--- Marlin/src/pins/stm32f4/pins_FLYF407ZG.h | 20 ++++--- .../pins/stm32f4/pins_FYSETC_CHEETAH_V20.h | 10 ++-- Marlin/src/pins/stm32f4/pins_FYSETC_S6_V2_0.h | 20 ++++--- Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER.h | 20 ++++--- Marlin/src/pins/stm32f4/pins_LERDGE_K.h | 8 +-- .../src/pins/stm32f4/pins_MKS_MONSTER8_V1.h | 2 +- .../pins/stm32f4/pins_MKS_MONSTER8_common.h | 23 ++++---- .../src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h | 23 ++++---- .../src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h | 52 +++++++++---------- Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h | 10 ++-- .../src/pins/stm32f4/pins_OPULO_LUMEN_REV3.h | 6 +-- .../src/pins/stm32f4/pins_OPULO_LUMEN_REV4.h | 6 +-- Marlin/src/pins/stm32f4/pins_RUMBA32_common.h | 18 +++---- Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h | 6 +-- .../pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h | 20 ++++--- .../pins/stm32g0/pins_BTT_MANTA_M4P_V1_0.h | 22 ++++---- .../pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h | 24 ++++----- .../pins/stm32g0/pins_BTT_MANTA_M8P_common.h | 20 ++++--- .../pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h | 20 ++++--- .../pins/stm32h7/pins_BTT_SKR_SE_BX_common.h | 20 ++++--- .../pins/stm32h7/pins_BTT_SKR_V3_0_common.h | 20 ++++--- 76 files changed, 572 insertions(+), 638 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 3e23bb8944..9b4c58be6f 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -2979,28 +2979,28 @@ * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here. * The default pins can be found in your board's pins file. */ - //#define X_CS_PIN -1 - //#define Y_CS_PIN -1 - //#define Z_CS_PIN -1 - //#define X2_CS_PIN -1 - //#define Y2_CS_PIN -1 - //#define Z2_CS_PIN -1 - //#define Z3_CS_PIN -1 - //#define Z4_CS_PIN -1 - //#define I_CS_PIN -1 - //#define J_CS_PIN -1 - //#define K_CS_PIN -1 - //#define U_CS_PIN -1 - //#define V_CS_PIN -1 - //#define W_CS_PIN -1 - //#define E0_CS_PIN -1 - //#define E1_CS_PIN -1 - //#define E2_CS_PIN -1 - //#define E3_CS_PIN -1 - //#define E4_CS_PIN -1 - //#define E5_CS_PIN -1 - //#define E6_CS_PIN -1 - //#define E7_CS_PIN -1 + //#define X_CS_PIN -1 + //#define Y_CS_PIN -1 + //#define Z_CS_PIN -1 + //#define X2_CS_PIN -1 + //#define Y2_CS_PIN -1 + //#define Z2_CS_PIN -1 + //#define Z3_CS_PIN -1 + //#define Z4_CS_PIN -1 + //#define I_CS_PIN -1 + //#define J_CS_PIN -1 + //#define K_CS_PIN -1 + //#define U_CS_PIN -1 + //#define V_CS_PIN -1 + //#define W_CS_PIN -1 + //#define E0_CS_PIN -1 + //#define E1_CS_PIN -1 + //#define E2_CS_PIN -1 + //#define E3_CS_PIN -1 + //#define E4_CS_PIN -1 + //#define E5_CS_PIN -1 + //#define E6_CS_PIN -1 + //#define E7_CS_PIN -1 /** * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160). @@ -3008,9 +3008,9 @@ * but you can override or define them here. */ //#define TMC_USE_SW_SPI - //#define TMC_SW_MOSI -1 - //#define TMC_SW_MISO -1 - //#define TMC_SW_SCK -1 + //#define TMC_SPI_MOSI -1 + //#define TMC_SPI_MISO -1 + //#define TMC_SPI_SCK -1 // @section tmc/serial diff --git a/Marlin/src/HAL/DUE/inc/SanityCheck.h b/Marlin/src/HAL/DUE/inc/SanityCheck.h index 1f5acc360c..996404a7d0 100644 --- a/Marlin/src/HAL/DUE/inc/SanityCheck.h +++ b/Marlin/src/HAL/DUE/inc/SanityCheck.h @@ -64,7 +64,7 @@ * Usually the hardware SPI pins are only available to the LCD. This makes the DUE hard SPI used at the same time * as the TMC2130 soft SPI the most common setup. */ -#define _IS_HW_SPI(P) (defined(TMC_SW_##P) && (TMC_SW_##P == SD_MOSI_PIN || TMC_SW_##P == SD_MISO_PIN || TMC_SW_##P == SD_SCK_PIN)) +#define _IS_HW_SPI(P) (defined(TMC_SPI_##P) && (TMC_SPI_##P == SD_MOSI_PIN || TMC_SPI_##P == SD_MISO_PIN || TMC_SPI_##P == SD_SCK_PIN)) #if ENABLED(SDSUPPORT) && HAS_DRIVER(TMC2130) #if ENABLED(TMC_USE_SW_SPI) diff --git a/Marlin/src/HAL/LPC1768/inc/SanityCheck.h b/Marlin/src/HAL/LPC1768/inc/SanityCheck.h index 8265d58a6e..b9a3360668 100644 --- a/Marlin/src/HAL/LPC1768/inc/SanityCheck.h +++ b/Marlin/src/HAL/LPC1768/inc/SanityCheck.h @@ -95,7 +95,7 @@ static_assert(DISABLED(BAUD_RATE_GCODE), "BAUD_RATE_GCODE is not yet supported o #if USING_HW_SERIAL0 #define IS_TX0(P) (P == P0_02) #define IS_RX0(P) (P == P0_03) - #if IS_TX0(TMC_SW_MISO) || IS_RX0(TMC_SW_MOSI) + #if IS_TX0(TMC_SPI_MISO) || IS_RX0(TMC_SPI_MOSI) #error "Serial port pins (0) conflict with Trinamic SPI pins!" #elif HAS_PRUSA_MMU1 && (IS_TX0(E_MUX1_PIN) || IS_RX0(E_MUX0_PIN)) #error "Serial port pins (0) conflict with Multi-Material-Unit multiplexer pins!" @@ -111,7 +111,7 @@ static_assert(DISABLED(BAUD_RATE_GCODE), "BAUD_RATE_GCODE is not yet supported o #define IS_RX1(P) (P == P0_16) #define _IS_TX1_1 IS_TX1 #define _IS_RX1_1 IS_RX1 - #if IS_TX1(TMC_SW_SCK) + #if IS_TX1(TMC_SPI_SCK) #error "Serial port pins (1) conflict with other pins!" #elif HAS_ROTARY_ENCODER #if IS_TX1(BTN_EN2) || IS_RX1(BTN_EN1) diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 58f04a39b6..1377c8e73f 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -2212,6 +2212,14 @@ #undef TMC_UART_IS #undef ANY_SERIAL_IS +#if defined(__AVR_ARCH__) && defined(TMC_SPI_MISO) && defined(TMC_SPI_MOSI) && defined(TMC_SPI_SCK) + // Check that the pins are the solitary supported SPI hardware pins of the (AVR) platform. + // Otherwise we are forced to enable software SPI. + #if TMC_SPI_MISO != MISO || TMC_SPI_MOSI != MOSI || TMC_SPI_SCK != SCK + #define TMC_USE_SW_SPI + #endif +#endif + // Clean up unused ESP_WIFI pins #ifdef ESP_WIFI_MODULE_COM #if !SERIAL_IN_USE(ESP_WIFI_MODULE_COM) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 5218cf792b..feb01e533a 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -658,6 +658,8 @@ #error "EXTRA_LIN_ADVANCE_K is now ADVANCE_K_EXTRA." #elif defined(POLAR_SEGMENTS_PER_SECOND) || defined(DELTA_SEGMENTS_PER_SECOND) || defined(SCARA_SEGMENTS_PER_SECOND) || defined(TPARA_SEGMENTS_PER_SECOND) #error "(POLAR|DELTA|SCARA|TPARA)_SEGMENTS_PER_SECOND is now DEFAULT_SEGMENTS_PER_SECOND." +#elif defined(TMC_SW_MOSI) || defined(TMC_SW_MISO) || defined(TMC_SW_SCK) + #error "TMC_SW_(MOSI|MISO|SCK) is now TMC_SPI_(MOSI|MISO|SCK)." #elif ANY(DGUS_LCD_UI_ORIGIN, DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY, DGUS_LCD_UI_MKS, DGUS_LCD_UI_RELOADED) && !defined(DGUS_LCD_UI) #error "DGUS_LCD_UI_[TYPE] is now set using DGUS_LCD_UI TYPE." #elif defined(DELTA_PRINTABLE_RADIUS) diff --git a/Marlin/src/module/stepper/trinamic.cpp b/Marlin/src/module/stepper/trinamic.cpp index 7d87e5953f..02ae9cb1e4 100644 --- a/Marlin/src/module/stepper/trinamic.cpp +++ b/Marlin/src/module/stepper/trinamic.cpp @@ -46,7 +46,7 @@ enum StealthIndex : uint8_t { // AI = Axis Enum Index // SWHW = SW/SH UART selection #if ENABLED(TMC_USE_SW_SPI) - #define __TMC_SPI_DEFINE(IC, ST, L, AI) TMCMarlin stepper##ST(ST##_CS_PIN, float(ST##_RSENSE), TMC_SW_MOSI, TMC_SW_MISO, TMC_SW_SCK, ST##_CHAIN_POS) + #define __TMC_SPI_DEFINE(IC, ST, L, AI) TMCMarlin stepper##ST(ST##_CS_PIN, float(ST##_RSENSE), TMC_SPI_MOSI, TMC_SPI_MISO, TMC_SPI_SCK, ST##_CHAIN_POS) #else #define __TMC_SPI_DEFINE(IC, ST, L, AI) TMCMarlin stepper##ST(ST##_CS_PIN, float(ST##_RSENSE), ST##_CHAIN_POS) #endif diff --git a/Marlin/src/pins/linux/pins_RAMPS_LINUX.h b/Marlin/src/pins/linux/pins_RAMPS_LINUX.h index 3616b7a27c..3e8814c3ee 100644 --- a/Marlin/src/pins/linux/pins_RAMPS_LINUX.h +++ b/Marlin/src/pins/linux/pins_RAMPS_LINUX.h @@ -247,18 +247,16 @@ #endif /** - * Default pins for TMC software SPI + * Default pins for TMC SPI */ -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI 66 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO 44 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK 64 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI 66 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO 44 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK 64 #endif #if HAS_TMC_UART diff --git a/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h b/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h index 10a610ff95..0c96cb42b5 100644 --- a/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h +++ b/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h @@ -77,18 +77,16 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// Default pins for TMC software SPI // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI P0_18 // ETH - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO P0_17 // ETH - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK P0_15 // ETH - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI P0_18 // ETH +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO P0_17 // ETH +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK P0_15 // ETH #endif // diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h index d11224315b..1a8c44771a 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h @@ -56,7 +56,6 @@ #define E0_DIR_PIN P2_13 #define E0_ENABLE_PIN P2_12 - /** ------ ------ * 1.30 | 1 2 | 2.11 0.17 | 1 2 | 0.15 * 0.18 | 3 4 | 0.16 3.26 | 3 4 | 1.23 @@ -165,12 +164,12 @@ // When using any TMC SPI-based drivers, software SPI is used // because pins may be shared with the display or SD card. #define TMC_USE_SW_SPI - #define TMC_SW_MOSI EXP2_06_PIN - #define TMC_SW_MISO EXP2_01_PIN + #define TMC_SPI_MOSI EXP2_06_PIN + #define TMC_SPI_MISO EXP2_01_PIN // To minimize pin usage use the same clock pin as the display/SD card reader. (May generate LCD noise.) - #define TMC_SW_SCK EXP2_02_PIN + #define TMC_SPI_SCK EXP2_02_PIN // If pin 2_06 is unused, it can be used for the clock to avoid the LCD noise. - //#define TMC_SW_SCK P2_06 + //#define TMC_SPI_SCK P2_06 #if ENABLED(SOFTWARE_DRIVER_ENABLE) diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h index 03994187c8..6372623a30 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h @@ -137,18 +137,16 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// Default pins for TMC software SPI // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI P4_28 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO P0_05 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK P0_04 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI P4_28 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO P0_05 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK P0_04 #endif #if HAS_TMC_UART @@ -289,7 +287,7 @@ #define DOGLCD_A0 EXP1_06_PIN #define DOGLCD_SCK EXP1_04_PIN #define DOGLCD_MOSI EXP1_01_PIN - #define LCD_BACKLIGHT_PIN -1 + #define LCD_BACKLIGHT_PIN -1 #elif ENABLED(CR10_STOCKDISPLAY) 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 a574a9fe8d..e632d8afa6 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h @@ -194,18 +194,16 @@ #define TEMP_BED_PIN P0_25_A2 // A2 (T2) - (69) - TEMP_BED_PIN // -// Software SPI pins for TMC2130 stepper drivers +// Default pins for TMC software SPI // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI P1_17 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO P0_05 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK P0_04 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI P1_17 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO P0_05 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK P0_04 #endif #if HAS_TMC_UART diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h index cf12a98aef..c5c5bd3e23 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h @@ -300,16 +300,14 @@ // Hardware SPI is on EXP2. See if you can make it work: // https://github.com/makerbase-mks/MKS-SBASE/issues/25 #define TMC_USE_SW_SPI - #if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI P0_03 // AUX1 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO P0_02 // AUX1 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK P0_26 // TH4 - #endif + #ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI P0_03 // AUX1 + #endif + #ifndef TMC_SPI_MISO + #define TMC_SPI_MISO P0_02 // AUX1 + #endif + #ifndef TMC_SPI_SCK + #define TMC_SPI_SCK P0_26 // TH4 #endif #endif diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h index 4e9f98c852..1f038b4aa0 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h @@ -132,18 +132,16 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// Default pins for TMC software SPI // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI P4_28 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO P0_05 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK P0_04 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI P4_28 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO P0_05 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK P0_04 #endif #if HAS_TMC_UART diff --git a/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h b/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h index 9a210e1607..b6ce9c5c05 100644 --- a/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h +++ b/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h @@ -97,18 +97,16 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// Default pins for TMC software SPI // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI P1_00 // ETH - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO P1_08 // ETH - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK P1_09 // ETH - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI P1_00 // ETH +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO P1_08 // ETH +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK P1_09 // ETH #endif #if HAS_TMC_UART @@ -119,7 +117,6 @@ * If undefined software serial is used according to the pins below */ - // P2_08 E1-Step // P2_13 E1-Dir diff --git a/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h b/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h index 237dfaec36..e0a3b03109 100644 --- a/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h +++ b/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h @@ -70,16 +70,14 @@ // // Default pins for TMC software SPI // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI P1_16 // Ethernet Expansion - Pin 5 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO P1_17 // Ethernet Expansion - Pin 6 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK P1_08 // Ethernet Expansion - Pin 7 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI P1_16 // Ethernet Expansion - Pin 5 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO P1_17 // Ethernet Expansion - Pin 6 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK P1_08 // Ethernet Expansion - Pin 7 #endif // diff --git a/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h b/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h index ea2e0b7082..122c7462d2 100644 --- a/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h +++ b/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h @@ -87,16 +87,14 @@ // // Default pins for TMC software SPI // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI P1_16 // Ethernet Expansion - Pin 5 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO P1_17 // Ethernet Expansion - Pin 6 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK P1_08 // Ethernet Expansion - Pin 7 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI P1_16 // Ethernet Expansion - Pin 5 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO P1_17 // Ethernet Expansion - Pin 6 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK P1_08 // Ethernet Expansion - Pin 7 #endif // diff --git a/Marlin/src/pins/lpc1769/pins_FLY_CDY.h b/Marlin/src/pins/lpc1769/pins_FLY_CDY.h index ec0b14af90..1c0c21466e 100644 --- a/Marlin/src/pins/lpc1769/pins_FLY_CDY.h +++ b/Marlin/src/pins/lpc1769/pins_FLY_CDY.h @@ -92,18 +92,16 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// Default pins for TMC software SPI // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI P0_20 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO P0_19 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK P0_21 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI P0_20 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO P0_19 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK P0_21 #endif #if HAS_TMC_UART diff --git a/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h b/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h index 2f25d8b5fd..5c1b1f5638 100644 --- a/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h +++ b/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h @@ -146,18 +146,16 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// Default pins for TMC software SPI // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI P1_16 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO P0_05 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK P0_04 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI P1_16 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO P0_05 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK P0_04 #endif #if HAS_TMC_UART @@ -342,7 +340,7 @@ #define TFT_CS_PIN EXP1_07_PIN #define TFT_DC_PIN EXP1_08_PIN - #define TFT_A0_PIN TFT_DC_PIN + #define TFT_A0_PIN TFT_DC_PIN #define TFT_MISO_PIN EXP2_01_PIN #define TFT_BACKLIGHT_PIN EXP1_03_PIN #define TFT_RESET_PIN EXP1_04_PIN diff --git a/Marlin/src/pins/mega/pins_GT2560_V3_A20.h b/Marlin/src/pins/mega/pins_GT2560_V3_A20.h index 986dd1cb04..c96431141c 100644 --- a/Marlin/src/pins/mega/pins_GT2560_V3_A20.h +++ b/Marlin/src/pins/mega/pins_GT2560_V3_A20.h @@ -30,7 +30,7 @@ #define LCD_PINS_D4 21 #define LCD_PINS_D7 6 -#define SPEAKER // The speaker can produce tones +#define SPEAKER // The speaker can produce tones #if IS_NEWPANEL #define BTN_EN1 16 diff --git a/Marlin/src/pins/mega/pins_GT2560_V4_A20.h b/Marlin/src/pins/mega/pins_GT2560_V4_A20.h index 83a612e67c..c87c11e175 100644 --- a/Marlin/src/pins/mega/pins_GT2560_V4_A20.h +++ b/Marlin/src/pins/mega/pins_GT2560_V4_A20.h @@ -32,7 +32,7 @@ #define LCD_PINS_D4 21 #define LCD_PINS_D7 6 -#define SPEAKER // The speaker can produce tones +#define SPEAKER // The speaker can produce tones #if IS_NEWPANEL #define BTN_EN1 16 diff --git a/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h b/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h index cff3a11af1..0ef1c1d8ae 100644 --- a/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h +++ b/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h @@ -158,9 +158,9 @@ // Heaters / Fans (24V) // -#define HEATER_0_PIN MOSFET_1_PIN // EX1 -#define HEATER_1_PIN MOSFET_3_PIN // EX2 -#define HEATER_BED_PIN MOSFET_5_PIN // HBP +#define HEATER_0_PIN MOSFET_1_PIN // EX1 +#define HEATER_1_PIN MOSFET_3_PIN // EX2 +#define HEATER_BED_PIN MOSFET_5_PIN // HBP // EX1 FAN (Automatic Fans are disabled by default in Configuration_adv.h - comment that out for auto fans) #ifndef E0_AUTO_FAN_PIN diff --git a/Marlin/src/pins/mega/pins_PROTONEER_CNC_SHIELD_V3.h b/Marlin/src/pins/mega/pins_PROTONEER_CNC_SHIELD_V3.h index f2e4d3da02..88d549c8cb 100644 --- a/Marlin/src/pins/mega/pins_PROTONEER_CNC_SHIELD_V3.h +++ b/Marlin/src/pins/mega/pins_PROTONEER_CNC_SHIELD_V3.h @@ -51,16 +51,16 @@ #define Y_STEP_PIN 3 #define Y_DIR_PIN 6 -#define Y_ENABLE_PIN X_ENABLE_PIN +#define Y_ENABLE_PIN X_ENABLE_PIN #define Z_STEP_PIN 4 #define Z_DIR_PIN 7 -#define Z_ENABLE_PIN X_ENABLE_PIN +#define Z_ENABLE_PIN X_ENABLE_PIN // Designated with letter "A" on BOARD #define E0_STEP_PIN 12 #define E0_DIR_PIN 13 -#define E0_ENABLE_PIN X_ENABLE_PIN +#define E0_ENABLE_PIN X_ENABLE_PIN // // Temperature sensors - These could be any analog output not hidden by board diff --git a/Marlin/src/pins/mega/pins_SILVER_GATE.h b/Marlin/src/pins/mega/pins_SILVER_GATE.h index c2ca5b3103..4568ed04e2 100644 --- a/Marlin/src/pins/mega/pins_SILVER_GATE.h +++ b/Marlin/src/pins/mega/pins_SILVER_GATE.h @@ -73,7 +73,7 @@ #define TEMP_BED_PIN 6 #if HAS_WIRED_LCD - #if IS_U8GLIB_ST7920 // SPI GLCD 12864 ST7920 + #if IS_U8GLIB_ST7920 // SPI GLCD 12864 ST7920 #define LCD_PINS_RS 30 #define LCD_PINS_ENABLE 20 #define LCD_PINS_D4 25 diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index 6269eecb0b..62ddba06f5 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -530,7 +530,7 @@ #elif MB(MKS_ROBIN_E3D) #include "stm32f1/pins_MKS_ROBIN_E3D.h" // STM32F1 env:mks_robin_e3 #elif MB(MKS_ROBIN_E3D_V1_1) - #include "stm32f1/pins_MKS_ROBIN_E3D_V1_1.h" // STM32F1 env:mks_robin_e3 + #include "stm32f1/pins_MKS_ROBIN_E3D_V1_1.h" // STM32F1 env:mks_robin_e3 env:mks_robin_e3_maple #elif MB(MKS_ROBIN_E3P) #include "stm32f1/pins_MKS_ROBIN_E3P.h" // STM32F1 env:mks_robin_e3p env:mks_robin_e3p_maple #elif MB(BTT_EBB42_V1_1) diff --git a/Marlin/src/pins/pinsDebug_list.h b/Marlin/src/pins/pinsDebug_list.h index 39e07c739a..27f20b92f7 100644 --- a/Marlin/src/pins/pinsDebug_list.h +++ b/Marlin/src/pins/pinsDebug_list.h @@ -489,18 +489,27 @@ REPORT_NAME_DIGITAL(__LINE__, EXP3_10_PIN) #endif -#if _EXISTS(TMC_SW_MISO) - REPORT_NAME_DIGITAL(__LINE__, TMC_SW_MISO) +#if _EXISTS(TMC_SPI_MISO) + REPORT_NAME_DIGITAL(__LINE__, TMC_SPI_MISO) #endif -#if _EXISTS(TMC_SW_MOSI) - REPORT_NAME_DIGITAL(__LINE__, TMC_SW_MOSI) +#if _EXISTS(TMC_SPI_MOSI) + REPORT_NAME_DIGITAL(__LINE__, TMC_SPI_MOSI) #endif -#if _EXISTS(TMC_SW_SCK) - REPORT_NAME_DIGITAL(__LINE__, TMC_SW_SCK) +#if _EXISTS(TMC_SPI_SCK) + REPORT_NAME_DIGITAL(__LINE__, TMC_SPI_SCK) #endif #if _EXISTS(TFTGLCD_CS) REPORT_NAME_DIGITAL(__LINE__, TFTGLCD_CS) #endif +#if _EXISTS(TFTGLCD_SCK) + REPORT_NAME_DIGITAL(__LINE__, TFTGLCD_SCK) +#endif +#if _EXISTS(TFTGLCD_MISO) + REPORT_NAME_DIGITAL(__LINE__, TFTGLCD_MISO) +#endif +#if _EXISTS(TFTGLCD_MOSI) + REPORT_NAME_DIGITAL(__LINE__, TFTGLCD_MOSI) +#endif // // E Multiplexing diff --git a/Marlin/src/pins/ramps/pins_3DRAG.h b/Marlin/src/pins/ramps/pins_3DRAG.h index 1e9d53a6cb..0f90dd5a34 100644 --- a/Marlin/src/pins/ramps/pins_3DRAG.h +++ b/Marlin/src/pins/ramps/pins_3DRAG.h @@ -113,7 +113,7 @@ #define SPINDLE_LASER_PWM_PIN 46 // Hardware PWM #define SPINDLE_LASER_ENA_PIN 62 // Pullup! #define SPINDLE_DIR_PIN 48 - #elif !BOTH(HAS_WIRED_LCD, IS_NEWPANEL) // Use expansion header if no LCD in use + #elif !BOTH(HAS_WIRED_LCD, IS_NEWPANEL) // Use expansion header if no LCD in use #define SPINDLE_LASER_ENA_PIN 16 // Pullup or pulldown! #define SPINDLE_DIR_PIN 17 #if !NUM_SERVOS // Use servo connector if possible diff --git a/Marlin/src/pins/ramps/pins_MKS_GEN_L.h b/Marlin/src/pins/ramps/pins_MKS_GEN_L.h index ca1f133816..dd7f8e5f86 100644 --- a/Marlin/src/pins/ramps/pins_MKS_GEN_L.h +++ b/Marlin/src/pins/ramps/pins_MKS_GEN_L.h @@ -35,12 +35,12 @@ // Heaters / Fans // // Power outputs EFBF or EFBE -#define MOSFET_D_PIN 7 +#define MOSFET_D_PIN 7 // Hotend, Hotend, Bed + Fan on D9 #if FET_ORDER_EEB - #define MOSFET_B_PIN 7 - #define FAN_PIN 9 + #define MOSFET_B_PIN 7 + #define FAN_PIN 9 #endif // @@ -49,11 +49,11 @@ // #ifndef X_CS_PIN - #define X_CS_PIN 59 + #define X_CS_PIN 59 #endif #ifndef Y_CS_PIN - #define Y_CS_PIN 63 + #define Y_CS_PIN 63 #endif #include "pins_RAMPS.h" diff --git a/Marlin/src/pins/ramps/pins_RAMPS.h b/Marlin/src/pins/ramps/pins_RAMPS.h index 4e4ca60583..43780d8d27 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS.h +++ b/Marlin/src/pins/ramps/pins_RAMPS.h @@ -319,16 +319,14 @@ // // TMC software SPI // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI 66 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO 44 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK 64 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI 66 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO 44 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK 64 #endif #if HAS_TMC_UART @@ -877,7 +875,7 @@ #define BEEPER_PIN EXP2_05_PIN - #if ENABLED(PANEL_ONE) // Buttons connect directly to AUX-2 + #if ENABLED(PANEL_ONE) // Buttons connect directly to AUX-2 #define BTN_EN1 AUX2_03_PIN #define BTN_EN2 AUX2_04_PIN #define BTN_ENC AUX3_02_PIN diff --git a/Marlin/src/pins/ramps/pins_RAMPS_S_12.h b/Marlin/src/pins/ramps/pins_RAMPS_S_12.h index f41573b527..8d6a1d337e 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS_S_12.h +++ b/Marlin/src/pins/ramps/pins_RAMPS_S_12.h @@ -218,16 +218,14 @@ // // TMC software SPI // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI 51 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO 50 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK 53 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI 51 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO 50 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK 53 #endif // diff --git a/Marlin/src/pins/ramps/pins_TRIGORILLA_13.h b/Marlin/src/pins/ramps/pins_TRIGORILLA_13.h index 71dfb8c704..6e51a8e974 100644 --- a/Marlin/src/pins/ramps/pins_TRIGORILLA_13.h +++ b/Marlin/src/pins/ramps/pins_TRIGORILLA_13.h @@ -27,17 +27,17 @@ #define BOARD_INFO_NAME "Anycubic RAMPS 1.3" -#define MOSFET_B_PIN 44 +#define MOSFET_B_PIN 44 -#define E1_STEP_PIN -1 -#define E1_DIR_PIN -1 -#define E1_ENABLE_PIN -1 -#define E1_CS_PIN -1 +#define E1_STEP_PIN -1 +#define E1_DIR_PIN -1 +#define E1_ENABLE_PIN -1 +#define E1_CS_PIN -1 -#define FAN2_PIN 9 +#define FAN2_PIN 9 #ifndef E0_AUTO_FAN_PIN - #define E0_AUTO_FAN_PIN 9 + #define E0_AUTO_FAN_PIN 9 #endif #include "pins_RAMPS_13.h" // ... RAMPS diff --git a/Marlin/src/pins/ramps/pins_TT_OSCAR.h b/Marlin/src/pins/ramps/pins_TT_OSCAR.h index f81cc6039a..ecc708b395 100644 --- a/Marlin/src/pins/ramps/pins_TT_OSCAR.h +++ b/Marlin/src/pins/ramps/pins_TT_OSCAR.h @@ -150,16 +150,14 @@ // // Default pins for TMC software SPI // -//#if ENABLED(TMC_USE_SW_SPI) -// #ifndef TMC_SW_MOSI -// #define TMC_SW_MOSI 66 -// #endif -// #ifndef TMC_SW_MISO -// #define TMC_SW_MISO 44 -// #endif -// #ifndef TMC_SW_SCK -// #define TMC_SW_SCK 64 -// #endif +//#ifndef TMC_SPI_MOSI +// #define TMC_SPI_MOSI 66 +//#endif +//#ifndef TMC_SPI_MISO +// #define TMC_SPI_MISO 44 +//#endif +//#ifndef TMC_SPI_SCK +// #define TMC_SPI_SCK 64 //#endif // diff --git a/Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h b/Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h index b68e3edb45..ad7b859a0c 100644 --- a/Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h +++ b/Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h @@ -182,16 +182,14 @@ // // TMC software SPI // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI 66 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO 44 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK 64 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI 66 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO 44 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK 64 #endif #if HAS_TMC_UART diff --git a/Marlin/src/pins/sam/pins_ARCHIM2.h b/Marlin/src/pins/sam/pins_ARCHIM2.h index 310dd8e2ac..503b29f15b 100644 --- a/Marlin/src/pins/sam/pins_ARCHIM2.h +++ b/Marlin/src/pins/sam/pins_ARCHIM2.h @@ -145,19 +145,17 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers. +// SPI pins for TMC2130 stepper drivers. // Required for the Archim2 board. // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI 28 // PD3 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO 26 // PD1 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK 27 // PD2 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI 28 // PD3 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO 26 // PD1 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK 27 // PD2 #endif // diff --git a/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h b/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h index a3f98e388a..2a84d964ea 100644 --- a/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h +++ b/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h @@ -284,7 +284,6 @@ //#define DOGLCD_SCK 23 //#define DOGLCD_A0 LCD_PINS_DC - #else // Definitions for any standard Display #define LCD_PINS_RS EXP1_04_PIN diff --git a/Marlin/src/pins/samd/pins_MINITRONICS20.h b/Marlin/src/pins/samd/pins_MINITRONICS20.h index 02d806b3ec..da1919cd2b 100644 --- a/Marlin/src/pins/samd/pins_MINITRONICS20.h +++ b/Marlin/src/pins/samd/pins_MINITRONICS20.h @@ -212,9 +212,9 @@ #if ENABLED(CR10_STOCKDISPLAY) // TO TEST - //#define LCD_PINS_RS EXP3_04_PIN - //#define LCD_PINS_ENABLE EXP3_03_PIN - //#define LCD_PINS_D4 EXP3_05_PIN + //#define LCD_PINS_RS EXP3_04_PIN + //#define LCD_PINS_ENABLE EXP3_03_PIN + //#define LCD_PINS_D4 EXP3_05_PIN #if !IS_NEWPANEL // TO TEST @@ -278,7 +278,7 @@ #if IS_RRD_SC - //#define BEEPER_PIN EXP1_01_PIN + //#define BEEPER_PIN EXP1_01_PIN #if ENABLED(CR10_STOCKDISPLAY) // TO TEST @@ -297,7 +297,7 @@ #ifndef SD_DETECT_PIN #define SD_DETECT_PIN EXP2_07_PIN #endif - //#define KILL_PIN EXP2_10_PIN + //#define KILL_PIN EXP2_10_PIN #if ENABLED(BQ_LCD_SMART_CONTROLLER) //#define LCD_BACKLIGHT_PIN EXP1_08_PIN // TO TEST diff --git a/Marlin/src/pins/samd/pins_RAMPS_144.h b/Marlin/src/pins/samd/pins_RAMPS_144.h index 7adb2404c1..e5091e5cdc 100644 --- a/Marlin/src/pins/samd/pins_RAMPS_144.h +++ b/Marlin/src/pins/samd/pins_RAMPS_144.h @@ -164,18 +164,16 @@ #endif // -// TMC software SPI +// TMC SPI // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI 58 // Mega/Due:66 - AGCM4:58 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO 44 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK 56 // Mega/Due:64 - AGCM4:56 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI 58 // Mega/Due:66 - AGCM4:58 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO 44 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK 56 // Mega/Due:64 - AGCM4:56 #endif #if HAS_TMC_UART diff --git a/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h b/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h index 3b6297ba4d..6444e2e040 100644 --- a/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h +++ b/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h @@ -153,7 +153,7 @@ #define KILL_PIN 10 #define BEEPER_PIN 27 - #elif IS_U8GLIB_ST7920 // SPI GLCD 12864 ST7920 ( like [www.digole.com] ) For Melzi V2.0 + #elif IS_U8GLIB_ST7920 // SPI GLCD 12864 ST7920 ( like [www.digole.com] ) For Melzi V2.0 #if IS_MELZI #define LCD_PINS_RS 30 // CS chip select /SS chip slave select diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h index 075258991d..5007de25da 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h @@ -94,18 +94,16 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// SPI pins for TMC2130 stepper drivers // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PB5 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO PB4 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PB3 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI PB5 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO PB4 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK PB3 #endif #if HAS_TMC_UART diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h index c544e1353c..0df70d7292 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h @@ -68,30 +68,29 @@ #define E0_DIR_PIN PB0 #define E0_ENABLE_PIN PC4 -#if ENABLED(TMC_USE_SW_SPI) // Shared with EXP2 - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PB3 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO PB4 - #endif - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PB5 - #endif +// Shared with EXP2 +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK PB3 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO PB4 +#endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI PB5 #endif #if HAS_TMC_UART // Shared with EXP1 - #define X_SERIAL_TX_PIN PC10 - #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN + #define X_SERIAL_TX_PIN PC10 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN - #define Y_SERIAL_TX_PIN PC11 - #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN + #define Y_SERIAL_TX_PIN PC11 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN - #define Z_SERIAL_TX_PIN PC12 - #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN + #define Z_SERIAL_TX_PIN PC12 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN - #define E0_SERIAL_TX_PIN PC14 - #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN + #define E0_SERIAL_TX_PIN PC14 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #define TMC_BAUD_RATE 19200 @@ -287,4 +286,4 @@ #define ONBOARD_SPI_DEVICE 1 // SPI1 #define ONBOARD_SD_CS_PIN PA4 // Chip select for "System" SD card -#define SDSS SD_SS_PIN +#define SDSS SD_SS_PIN diff --git a/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h b/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h index c73544bf43..ec4535982e 100644 --- a/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h +++ b/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h @@ -134,7 +134,7 @@ #define EXP1_01_PIN PB5 #define EXP1_02_PIN PB6 #define EXP1_03_PIN PA2 -#define EXP1_04_PIN -1 // RESET +#define EXP1_04_PIN -1 // RESET #define EXP1_05_PIN PA3 #define EXP1_06_PIN PB8 #define EXP1_07_PIN PB7 diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V25S1.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V25S1.h index a0152a5221..b6316c01c6 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V25S1.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V25S1.h @@ -49,8 +49,8 @@ #endif #if ENABLED(IIC_BL24CXX_EEPROM) - #define IIC_EEPROM_SDA PA11 - #define IIC_EEPROM_SCL PA12 + #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 diff --git a/Marlin/src/pins/stm32f1/pins_FLY_MINI.h b/Marlin/src/pins/stm32f1/pins_FLY_MINI.h index f39850f755..c139b4943c 100644 --- a/Marlin/src/pins/stm32f1/pins_FLY_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_FLY_MINI.h @@ -83,16 +83,14 @@ #define E0_CS_PIN PC2 #endif -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI EXP2_06_PIN - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO EXP2_01_PIN - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK EXP2_02_PIN - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI EXP2_06_PIN +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO EXP2_01_PIN +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK EXP2_02_PIN #endif #if HAS_TMC_UART @@ -131,23 +129,23 @@ * ------ ------ * EXP1 EXP2 */ -#define EXP1_01_PIN PC14 -#define EXP1_02_PIN PC13 -#define EXP1_03_PIN PB9 -#define EXP1_04_PIN PB8 -#define EXP1_05_PIN PB7 -#define EXP1_06_PIN PB6 -#define EXP1_07_PIN PB5 -#define EXP1_08_PIN PB4 +#define EXP1_01_PIN PC14 +#define EXP1_02_PIN PC13 +#define EXP1_03_PIN PB9 +#define EXP1_04_PIN PB8 +#define EXP1_05_PIN PB7 +#define EXP1_06_PIN PB6 +#define EXP1_07_PIN PB5 +#define EXP1_08_PIN PB4 -#define EXP2_01_PIN PB14 -#define EXP2_02_PIN PB13 -#define EXP2_03_PIN PB3 -#define EXP2_04_PIN PB12 -#define EXP2_05_PIN PD2 -#define EXP2_06_PIN PB15 -#define EXP2_07_PIN PB11 -#define EXP2_08_PIN -1 // RESET +#define EXP2_01_PIN PB14 +#define EXP2_02_PIN PB13 +#define EXP2_03_PIN PB3 +#define EXP2_04_PIN PB12 +#define EXP2_05_PIN PD2 +#define EXP2_06_PIN PB15 +#define EXP2_07_PIN PB11 +#define EXP2_08_PIN -1 // RESET // // LCD / Controller diff --git a/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h b/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h index f157c8e455..9ed3c11560 100644 --- a/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h @@ -64,9 +64,9 @@ // Limit Switches // #define X_MIN_PIN PD6 -#define X_MAX_PIN PG15 // To double check +#define X_MAX_PIN PG15 // To double check #define Y_MIN_PIN PG9 -#define Y_MAX_PIN PG14 // To double check +#define Y_MAX_PIN PG14 // To double check #define Z_MIN_PIN PG10 #define Z_MAX_PIN PG13 diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3D.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3D.h index 77c2b79215..6d88897332 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3D.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3D.h @@ -50,18 +50,16 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// SPI pins for TMC2130 stepper drivers // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PB15 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO PB14 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PB13 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI PB15 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO PB14 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK PB13 #endif #include "pins_MKS_ROBIN_E3_common.h" diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3D_V1_1.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3D_V1_1.h index 2ad68a0140..89fda7ab67 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3D_V1_1.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3D_V1_1.h @@ -50,18 +50,17 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// SPI pins for TMC2130 stepper drivers +// Software and hardware actually, they are connected to SPI2 bus. // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PB15 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO PB14 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PB13 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI PB15 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO PB14 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK PB13 #endif #include "pins_MKS_ROBIN_E3_V1_1_common.h" // ... MKS_ROBIN_E3_common diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h index 89525d93ef..7994089619 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h @@ -112,18 +112,16 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// SPI pins for TMC2130 stepper drivers // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PD14 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO PD1 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PD0 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI PD14 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO PD1 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK PD0 #endif #if HAS_TMC_UART diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h index 642c97bb11..74780562b6 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h @@ -165,13 +165,13 @@ #define EXP2_05_PIN PB0 #define EXP2_06_PIN PB15 #define EXP2_07_PIN PC10 -#define EXP2_08_PIN -1 // RESET +#define EXP2_08_PIN -1 // RESET // "Ender-3 EXP1" #define EXP3_01_PIN PC1 #define EXP3_02_PIN PC3 #define EXP3_03_PIN PB11 -#define EXP3_04_PIN -1 // RESET +#define EXP3_04_PIN -1 // RESET #define EXP3_05_PIN PB0 #define EXP3_06_PIN PA6 #define EXP3_07_PIN PA5 diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h index 8dba943136..bfa6f45120 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h @@ -122,18 +122,16 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// SPI pins for TMC2130 stepper drivers // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PD14 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO PD1 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PD0 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI PD14 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO PD1 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK PD0 #endif #if HAS_TMC_UART diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h index 048570102b..7373d0d7b5 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h @@ -105,18 +105,16 @@ #define E2_CS_PIN PG9 #endif // -// Software SPI pins for TMC2130 stepper drivers +// SPI pins for TMC2130 stepper drivers // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PB15 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO PB14 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PB13 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI PB15 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO PB14 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK PB13 #endif #if HAS_TMC_UART diff --git a/Marlin/src/pins/stm32f1/pins_PANDA_PI_V29.h b/Marlin/src/pins/stm32f1/pins_PANDA_PI_V29.h index ed602d8d01..56200d5096 100644 --- a/Marlin/src/pins/stm32f1/pins_PANDA_PI_V29.h +++ b/Marlin/src/pins/stm32f1/pins_PANDA_PI_V29.h @@ -88,18 +88,16 @@ #define E0_DIR_PIN PB14 // -// Software SPI pins for TMC2130 stepper drivers +// SPI pins for TMC2130 stepper drivers // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PB5 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO PB4 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PB3 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI PB5 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO PB4 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK PB3 #endif #if HAS_TMC_UART diff --git a/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h b/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h index 2147dd9b4f..d31885e73d 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h @@ -108,18 +108,16 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// SPI pins for TMC2130 stepper drivers // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PB15 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO PB14 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PB13 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI PB15 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO PB14 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK PB13 #endif #if HAS_TMC_UART diff --git a/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h b/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h index fe03ec8983..fe0e1e52f3 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h @@ -202,18 +202,16 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// SPI pins for TMC2130 stepper drivers // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PG15 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO PB6 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PB3 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI PG15 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO PB6 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK PB3 #endif #if HAS_TMC_UART @@ -304,9 +302,9 @@ //#define TEMP_0_MOSI_PIN ... // For MAX31865 #define TEMP_1_CS_PIN PH2 // M5 K-TEMP -#define TEMP_1_SCK_PIN TEMP_0_SCK_PIN -#define TEMP_1_MISO_PIN TEMP_0_MISO_PIN -//#define TEMP_1_MOSI_PIN TEMP_0_MOSI_PIN +#define TEMP_1_SCK_PIN TEMP_0_SCK_PIN +#define TEMP_1_MISO_PIN TEMP_0_MISO_PIN +//#define TEMP_1_MOSI_PIN TEMP_0_MOSI_PIN // // Heaters / Fans diff --git a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h index a25c2339f2..a3bffbce01 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h @@ -260,18 +260,16 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// SPI pins for TMC2130 stepper drivers // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PA7 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO PA6 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PA5 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI PA7 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO PA6 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK PA5 #endif #if HAS_TMC_UART diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h index 78a137b35d..c535edfc1e 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h @@ -172,18 +172,16 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// SPI pins for TMC2130 stepper drivers // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PC12 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO PC11 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PC10 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI PC12 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO PC11 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK PC10 #endif #if HAS_TMC_UART @@ -487,7 +485,7 @@ #define DOGLCD_A0 EXP1_06_PIN #define DOGLCD_SCK EXP1_04_PIN #define DOGLCD_MOSI EXP1_02_PIN - #define LCD_BACKLIGHT_PIN -1 + #define LCD_BACKLIGHT_PIN -1 #else diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h index 7ac9156f40..76d06380b4 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h @@ -272,18 +272,16 @@ #endif // SPINDLE_FEATURE || LASER_FEATURE // -// Software SPI pins for TMC2130 stepper drivers +// SPI pins for TMC2130 stepper drivers // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PE14 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO PA14 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PE15 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI PE14 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO PA14 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK PE15 #endif #if HAS_TMC_UART diff --git a/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h b/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h index 8d5e094122..8d31130d89 100644 --- a/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h +++ b/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h @@ -235,18 +235,16 @@ #endif // -// Trinamic Software SPI +// Trinamic SPI // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_SCK - #define TMC_SW_SCK EXP2_02_PIN - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO EXP2_01_PIN - #endif - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI EXP2_06_PIN - #endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK EXP2_02_PIN +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO EXP2_01_PIN +#endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI EXP2_06_PIN #endif // diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h b/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h index 031caa1ce1..e650f2840e 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h @@ -43,14 +43,14 @@ #define FLASH_ADDRESS_START 0x8004000 #endif -#define SERVO0_PIN PB1 // BL-TOUCH/PWM +#define SERVO0_PIN PB1 // BL-TOUCH/PWM // // Limit Switches // -#define X_STOP_PIN PB4 // X-MIN -#define Y_STOP_PIN PC8 // Y-MIN -#define Z_STOP_PIN PA0 // Z-MIN +#define X_STOP_PIN PB4 // X-MIN +#define Y_STOP_PIN PC8 // Y-MIN +#define Z_STOP_PIN PA0 // Z-MIN // // Z Probe @@ -59,7 +59,7 @@ #error "You need to set jumper to 5V for BLTouch, then comment out this line to proceed." #endif #ifndef Z_MIN_PROBE_PIN - #define Z_MIN_PROBE_PIN PB1 // BL-TOUCH/PWM repurposed + #define Z_MIN_PROBE_PIN PB1 // BL-TOUCH/PWM repurposed #endif // diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_S6_V2_0.h b/Marlin/src/pins/stm32f4/pins_FYSETC_S6_V2_0.h index a9ce1383d8..a6035c2c6f 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_S6_V2_0.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_S6_V2_0.h @@ -53,19 +53,17 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// SPI pins for TMC2130 stepper drivers // #define TMC_USE_SW_SPI -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PE14 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO PE13 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PE12 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI PE14 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO PE13 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK PE12 #endif #include "pins_FYSETC_S6.h" diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER.h b/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER.h index 009bfb248d..368f464f86 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER.h @@ -101,19 +101,17 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// SPI pins for TMC2130 stepper drivers // #define TMC_USE_SW_SPI -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PE14 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO PE13 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PE12 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI PE14 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO PE13 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK PE12 #endif #if HOTENDS > 3 || E_STEPPERS > 3 diff --git a/Marlin/src/pins/stm32f4/pins_LERDGE_K.h b/Marlin/src/pins/stm32f4/pins_LERDGE_K.h index 6c6f8d25ea..0ea7255c17 100644 --- a/Marlin/src/pins/stm32f4/pins_LERDGE_K.h +++ b/Marlin/src/pins/stm32f4/pins_LERDGE_K.h @@ -154,10 +154,10 @@ #ifndef EX_SERIAL_RX_PIN #define EX_SERIAL_RX_PIN EX_SERIAL_TX_PIN #endif - //#define Z2_SERIAL_RX_PIN EX_SERIAL_RX_PIN - //#define Z2_SERIAL_TX_PIN EX_SERIAL_TX_PIN - //#define E2_SERIAL_RX_PIN EX_SERIAL_RX_PIN - //#define E2_SERIAL_TX_PIN EX_SERIAL_TX_PIN + //#define Z2_SERIAL_RX_PIN EX_SERIAL_RX_PIN + //#define Z2_SERIAL_TX_PIN EX_SERIAL_TX_PIN + //#define E2_SERIAL_RX_PIN EX_SERIAL_RX_PIN + //#define E2_SERIAL_TX_PIN EX_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #define TMC_BAUD_RATE 19200 #endif diff --git a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_V1.h b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_V1.h index 50fe790dc3..7d6ea8e039 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_V1.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_V1.h @@ -39,7 +39,7 @@ // // Misc. Functions // -#define PW_DET PC5 // Y+ +#define PW_DET PC5 // Y+ #define PW_OFF PB12 // Z+ #define MT_DET_1_PIN PW_DET #define MT_DET_2_PIN PW_OFF diff --git a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_common.h b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_common.h index 1896cd5441..c8a5b428dc 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_common.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_common.h @@ -126,22 +126,23 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// Default pins for TMC software SPI // This board only supports SW SPI for stepper drivers // #if HAS_TMC_SPI #define TMC_USE_SW_SPI #endif -#if ENABLED(TMC_USE_SW_SPI) - #if !defined(TMC_SW_MOSI) || TMC_SW_MOSI == -1 - #define TMC_SW_MOSI PE14 - #endif - #if !defined(TMC_SW_MISO) || TMC_SW_MISO == -1 - #define TMC_SW_MISO PE13 - #endif - #if !defined(TMC_SW_SCK) || TMC_SW_SCK == -1 - #define TMC_SW_SCK PE12 - #endif +#if !defined(TMC_SPI_MOSI) || TMC_SPI_MOSI == -1 + #undef TMC_SPI_MOSI + #define TMC_SPI_MOSI PE14 +#endif +#if !defined(TMC_SPI_MISO) || TMC_SPI_MISO == -1 + #undef TMC_SPI_MISO + #define TMC_SPI_MISO PE13 +#endif +#if !defined(TMC_SPI_SCK) || TMC_SPI_SCK == -1 + #undef TMC_SPI_SCK + #define TMC_SPI_SCK PE12 #endif #if HAS_TMC_UART diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h index 32d8a47488..96e19c987f 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h @@ -51,22 +51,23 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// SPI pins for TMC2130 stepper drivers // This board only supports SW SPI for stepper drivers // #if HAS_TMC_SPI #define TMC_USE_SW_SPI #endif -#if ENABLED(TMC_USE_SW_SPI) - #if !defined(TMC_SW_MOSI) || TMC_SW_MOSI == -1 - #define TMC_SW_MOSI PD14 - #endif - #if !defined(TMC_SW_MISO) || TMC_SW_MISO == -1 - #define TMC_SW_MISO PD1 - #endif - #if !defined(TMC_SW_SCK) || TMC_SW_SCK == -1 - #define TMC_SW_SCK PD0 - #endif +#if !defined(TMC_SPI_MOSI) || TMC_SPI_MOSI == -1 + #undef TMC_SPI_MOSI + #define TMC_SPI_MOSI PD14 +#endif +#if !defined(TMC_SPI_MISO) || TMC_SPI_MISO == -1 + #undef TMC_SPI_MISO + #define TMC_SPI_MISO PD1 +#endif +#if !defined(TMC_SPI_SCK) || TMC_SPI_SCK == -1 + #undef TMC_SPI_SCK + #define TMC_SPI_SCK PD0 #endif #include "pins_MKS_ROBIN_NANO_V3_common.h" diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h index 14b3d66168..daafe8dee4 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h @@ -113,18 +113,16 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// SPI pins for TMC2130 stepper drivers // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PD14 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO PD1 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PD0 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI PD14 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO PD1 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK PD0 #endif #if HAS_TMC_UART @@ -238,23 +236,23 @@ * ------ ------ * EXP1 EXP2 */ -#define EXP1_01_PIN PC5 -#define EXP1_02_PIN PE13 -#define EXP1_03_PIN PD13 -#define EXP1_04_PIN PC6 -#define EXP1_05_PIN PE14 -#define EXP1_06_PIN PE15 -#define EXP1_07_PIN PD11 -#define EXP1_08_PIN PD10 +#define EXP1_01_PIN PC5 +#define EXP1_02_PIN PE13 +#define EXP1_03_PIN PD13 +#define EXP1_04_PIN PC6 +#define EXP1_05_PIN PE14 +#define EXP1_06_PIN PE15 +#define EXP1_07_PIN PD11 +#define EXP1_08_PIN PD10 -#define EXP2_01_PIN PA6 -#define EXP2_02_PIN PA5 -#define EXP2_03_PIN PE8 -#define EXP2_04_PIN PE10 -#define EXP2_05_PIN PE11 -#define EXP2_06_PIN PA7 -#define EXP2_07_PIN PE12 -#define EXP2_08_PIN -1 // RESET +#define EXP2_01_PIN PA6 +#define EXP2_02_PIN PA5 +#define EXP2_03_PIN PE8 +#define EXP2_04_PIN PE10 +#define EXP2_05_PIN PE11 +#define EXP2_06_PIN PA7 +#define EXP2_07_PIN PE12 +#define EXP2_08_PIN -1 // RESET // // LCD SD diff --git a/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h b/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h index 3f0d4e5ee9..ac0b7679c3 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h @@ -191,14 +191,14 @@ #define FAN2_PIN PA0 // Fan2 // -// Software SPI pins for TMC2130 stepper drivers -// This board doesn't support hardware SPI there +// Default pins for TMC software SPI +// This board only supports SW SPI for stepper drivers // #if HAS_TMC_SPI #define TMC_USE_SW_SPI - #define TMC_SW_MOSI PE14 - #define TMC_SW_MISO PE13 - #define TMC_SW_SCK PE12 + #define TMC_SPI_MOSI PE14 + #define TMC_SPI_MISO PE13 + #define TMC_SPI_SCK PE12 #endif // diff --git a/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV3.h b/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV3.h index 06bf09402c..cf4720a20c 100644 --- a/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV3.h +++ b/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV3.h @@ -171,9 +171,9 @@ #define MOSI_PIN PB5 #define SCK_PIN PB3 -#define TMC_SW_MISO MISO_PIN -#define TMC_SW_MOSI MOSI_PIN -#define TMC_SW_SCK SCK_PIN +#define TMC_SPI_MISO MISO_PIN +#define TMC_SPI_MOSI MOSI_PIN +#define TMC_SPI_SCK SCK_PIN // // I2C diff --git a/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV4.h b/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV4.h index d16d7b200b..c8da0af894 100644 --- a/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV4.h +++ b/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV4.h @@ -168,9 +168,9 @@ #define MOSI_PIN PB5 #define SCK_PIN PB3 -#define TMC_SW_MISO MISO_PIN -#define TMC_SW_MOSI MOSI_PIN -#define TMC_SW_SCK SCK_PIN +#define TMC_SPI_MISO MISO_PIN +#define TMC_SPI_MOSI MOSI_PIN +#define TMC_SPI_SCK SCK_PIN // // I2C diff --git a/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h b/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h index 12871becbb..264bb91af4 100644 --- a/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h +++ b/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h @@ -91,16 +91,14 @@ #define E2_ENABLE_PIN PD0 #define E2_CS_PIN PD1 -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PA7 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO PA6 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PA5 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI PA7 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO PA6 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK PA5 #endif // diff --git a/Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h b/Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h index 3de67ea8d5..138397fa11 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h @@ -81,15 +81,15 @@ // Steppers // #define X_ENABLE_PIN -1 -#define X_STEP_PIN PA10 // Unused. Assigned so Marlin will compile +#define X_STEP_PIN PA10 // Unused. Assigned so Marlin will compile #define X_DIR_PIN -1 #define Y_ENABLE_PIN -1 -#define Y_STEP_PIN PA10 // Unused. Assigned so Marlin will compile +#define Y_STEP_PIN PA10 // Unused. Assigned so Marlin will compile #define Y_DIR_PIN -1 #define Z_ENABLE_PIN -1 -#define Z_STEP_PIN PA10 // Unused. Assigned so Marlin will compile +#define Z_STEP_PIN PA10 // Unused. Assigned so Marlin will compile #define Z_DIR_PIN -1 #define E0_ENABLE_PIN PD2 diff --git a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h index 54c2c4c77b..84bf758777 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h @@ -143,18 +143,16 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// Default pins for TMC software SPI // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PC12 // Shared with SPI header, Pin 5 (SPI3) - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO PC11 // Shared with SPI header, Pin 6 (SPI3) - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PC10 // Shared with SPI header, Pin 4 (SPI3) - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI PC12 // Shared with SPI header, Pin 5 (SPI3) +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO PC11 // Shared with SPI header, Pin 6 (SPI3) +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK PC10 // Shared with SPI header, Pin 4 (SPI3) #endif #if HAS_TMC_UART diff --git a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V1_0.h b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V1_0.h index 876475f883..7096cfbfbd 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V1_0.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V1_0.h @@ -57,7 +57,7 @@ // #if ENABLED(PROBE_ENABLE_DISABLE) #ifndef PROBE_ENABLE_PIN - #define PROBE_ENABLE_PIN SERVO0_PIN + #define PROBE_ENABLE_PIN SERVO0_PIN #endif #endif @@ -112,18 +112,16 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// Default pins for TMC software SPI // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PB15 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO PB14 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PB13 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI PB15 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO PB14 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK PB13 #endif #if HAS_TMC_UART diff --git a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h index f4ce5a16d3..59c2b0f97c 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h @@ -79,8 +79,8 @@ // Z Probe (when not Z_STOP_PIN) // #ifndef Z_MIN_PROBE_PIN - #define Z_MIN_PROBE_PIN PC13 // PROBE - //#define Z_MIN_PROBE_PIN PC15 // IND-DET (with adjustable pullup set via jumper) + #define Z_MIN_PROBE_PIN PC13 // PROBE + //#define Z_MIN_PROBE_PIN PC15 // IND-DET (with adjustable pullup set via jumper) #endif // @@ -129,18 +129,16 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// Default pins for TMC software SPI // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PB15 // Shared with SPI header, Pin 5 (SPI2) - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO PB14 // Shared with SPI header, Pin 6 (SPI2) - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PB13 // Shared with SPI header, Pin 4 (SPI2) - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI PB15 // Shared with SPI header, Pin 5 (SPI2) +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO PB14 // Shared with SPI header, Pin 6 (SPI2) +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK PB13 // Shared with SPI header, Pin 4 (SPI2) #endif #if HAS_TMC_UART diff --git a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h index 6516538c44..631b50d0f2 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h @@ -179,18 +179,16 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// Default pins for TMC software SPI // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PA7 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO PA6 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PA5 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI PA7 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO PA6 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK PA5 #endif #if HAS_TMC_UART diff --git a/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h b/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h index 80ea354982..9ddd46d6cd 100644 --- a/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h +++ b/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h @@ -273,18 +273,16 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// Default pins for TMC software SPI // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PE14 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO PE13 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PE12 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI PE14 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO PE13 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK PE12 #endif #if HAS_TMC_UART diff --git a/Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX_common.h b/Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX_common.h index d06e27d9c0..245567c27c 100644 --- a/Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX_common.h +++ b/Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX_common.h @@ -91,18 +91,16 @@ #define E1_CS_PIN PC8 // -// Software SPI pins for TMC2130 stepper drivers +// SPI pins for TMC2130 stepper drivers // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PC6 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO PG3 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PC7 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI PC6 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO PG3 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK PC7 #endif #if HAS_TMC_UART diff --git a/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h b/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h index 809a1f3f8c..c05ae971cf 100644 --- a/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h +++ b/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h @@ -260,18 +260,16 @@ #endif // SPINDLE_FEATURE || LASER_FEATURE // -// Software SPI pins for TMC2130 stepper drivers +// SPI pins for TMC2130 stepper drivers // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PE13 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO PE15 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PE14 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI PE13 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO PE15 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK PE14 #endif #if HAS_TMC_UART From 0914f9e0e1738e118176bc9fe2df03215f1c4456 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 24 Mar 2023 02:40:29 -0500 Subject: [PATCH 067/225] =?UTF-8?q?=F0=9F=8E=A8=20Pins=20header=20comments?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Martin Turski --- Marlin/src/HAL/AVR/fastio/fastio_1280.h | 3 +++ Marlin/src/HAL/AVR/fastio/fastio_1281.h | 3 +++ Marlin/src/HAL/AVR/fastio/fastio_168.h | 3 +++ Marlin/src/HAL/AVR/fastio/fastio_644.h | 3 +++ Marlin/src/HAL/AVR/fastio/fastio_AT90USB.h | 3 +++ .../src/HAL/NATIVE_SIM/u8g/LCD_I2C_routines.h | 1 - Marlin/src/HAL/NATIVE_SIM/u8g/LCD_defines.h | 2 -- Marlin/src/HAL/SAMD21/HAL_SPI.cpp | 2 +- Marlin/src/HAL/SAMD21/fastio.h | 1 - Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h | 2 ++ Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h | 6 +----- Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h | 4 ++++ Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h | 2 ++ Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h | 2 ++ Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h | 2 ++ Marlin/src/pins/lpc1768/pins_EMOTRONIC.h | 2 ++ Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h | 2 ++ Marlin/src/pins/lpc1768/pins_MKS_SBASE.h | 2 ++ Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h | 2 ++ Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h | 2 ++ Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h | 2 ++ Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h | 2 ++ Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h | 4 ++++ .../pins/lpc1769/pins_AZTEEG_X5_MINI_WIFI.h | 2 ++ .../src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h | 2 ++ .../pins/lpc1769/pins_BTT_SKR_V1_4_TURBO.h | 2 ++ .../src/pins/lpc1769/pins_COHESION3D_MINI.h | 2 ++ .../src/pins/lpc1769/pins_COHESION3D_REMIX.h | 2 ++ Marlin/src/pins/lpc1769/pins_FLY_CDY.h | 2 ++ Marlin/src/pins/lpc1769/pins_MKS_SGEN.h | 2 ++ Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h | 2 ++ Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h | 2 ++ Marlin/src/pins/mega/pins_CHEAPTRONIC.h | 1 + Marlin/src/pins/mega/pins_CHEAPTRONICv2.h | 4 +++- Marlin/src/pins/mega/pins_CNCONTROLS_11.h | 3 +++ Marlin/src/pins/mega/pins_CNCONTROLS_12.h | 3 +++ Marlin/src/pins/mega/pins_CNCONTROLS_15.h | 1 + Marlin/src/pins/mega/pins_EINSTART-S.h | 1 + Marlin/src/pins/mega/pins_ELEFU_3.h | 3 +++ Marlin/src/pins/mega/pins_GT2560_REV_A.h | 3 +++ Marlin/src/pins/mega/pins_GT2560_REV_A_PLUS.h | 3 +++ Marlin/src/pins/mega/pins_GT2560_REV_B.h | 3 +++ Marlin/src/pins/mega/pins_GT2560_V3.h | 3 +++ Marlin/src/pins/mega/pins_GT2560_V3_A20.h | 1 + Marlin/src/pins/mega/pins_GT2560_V3_MC2.h | 1 + Marlin/src/pins/mega/pins_GT2560_V4.h | 3 +++ Marlin/src/pins/mega/pins_GT2560_V4_A20.h | 1 + Marlin/src/pins/mega/pins_HJC2560C_REV2.h | 1 + Marlin/src/pins/mega/pins_INTAMSYS40.h | 1 + Marlin/src/pins/mega/pins_LEAPFROG.h | 1 + Marlin/src/pins/mega/pins_LEAPFROG_XEED2015.h | 1 + Marlin/src/pins/mega/pins_MALYAN_M180.h | 2 ++ Marlin/src/pins/mega/pins_MEGACONTROLLER.h | 3 +++ Marlin/src/pins/mega/pins_MEGATRONICS.h | 3 +++ Marlin/src/pins/mega/pins_MEGATRONICS_2.h | 3 +++ Marlin/src/pins/mega/pins_MEGATRONICS_3.h | 2 ++ Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h | 2 ++ Marlin/src/pins/mega/pins_MINITRONICS.h | 5 +++++ Marlin/src/pins/mega/pins_OVERLORD.h | 3 +++ Marlin/src/pins/mega/pins_PICA.h | 3 +++ Marlin/src/pins/mega/pins_PICAOLD.h | 4 ++++ .../pins/mega/pins_PROTONEER_CNC_SHIELD_V3.h | 3 +++ Marlin/src/pins/mega/pins_SILVER_GATE.h | 2 ++ Marlin/src/pins/mega/pins_WANHAO_ONEPLUS.h | 1 + Marlin/src/pins/mega/pins_WEEDO_62A.h | 1 + Marlin/src/pins/rambo/pins_EINSY_RAMBO.h | 2 ++ Marlin/src/pins/rambo/pins_EINSY_RETRO.h | 4 ++++ Marlin/src/pins/rambo/pins_MINIRAMBO.h | 4 ++++ Marlin/src/pins/rambo/pins_RAMBO.h | 2 ++ Marlin/src/pins/rambo/pins_SCOOVO_X9H.h | 2 +- Marlin/src/pins/ramps/pins_3DRAG.h | 4 ++++ Marlin/src/pins/ramps/pins_AZTEEG_X3.h | 3 +++ Marlin/src/pins/ramps/pins_AZTEEG_X3_PRO.h | 3 +++ Marlin/src/pins/ramps/pins_BAM_DICE_DUE.h | 3 +++ Marlin/src/pins/ramps/pins_BIQU_KFB_2.h | 1 + Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h | 3 +++ Marlin/src/pins/ramps/pins_COPYMASTER_3D.h | 2 ++ Marlin/src/pins/ramps/pins_DAGOMA_F5.h | 2 ++ .../src/pins/ramps/pins_DUPLICATOR_I3_PLUS.h | 1 + Marlin/src/pins/ramps/pins_FELIX2.h | 1 + Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h | 1 + Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR2.h | 1 + .../src/pins/ramps/pins_FORMBOT_TREX2PLUS.h | 3 ++- Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h | 3 ++- Marlin/src/pins/ramps/pins_FYSETC_F6_13.h | 3 +++ Marlin/src/pins/ramps/pins_FYSETC_F6_14.h | 3 +++ Marlin/src/pins/ramps/pins_K8200.h | 3 +++ Marlin/src/pins/ramps/pins_K8400.h | 3 +++ Marlin/src/pins/ramps/pins_K8600.h | 1 + Marlin/src/pins/ramps/pins_K8800.h | 3 +++ Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h | 1 + Marlin/src/pins/ramps/pins_MAKEBOARD_MINI.h | 2 ++ Marlin/src/pins/ramps/pins_MKS_BASE_10.h | 6 ++++++ Marlin/src/pins/ramps/pins_MKS_BASE_14.h | 1 + Marlin/src/pins/ramps/pins_MKS_BASE_15.h | 1 + Marlin/src/pins/ramps/pins_MKS_BASE_16.h | 3 +++ Marlin/src/pins/ramps/pins_MKS_BASE_HEROIC.h | 1 + Marlin/src/pins/ramps/pins_MKS_BASE_common.h | 1 + Marlin/src/pins/ramps/pins_MKS_GEN_13.h | 3 +++ Marlin/src/pins/ramps/pins_MKS_GEN_L.h | 3 +++ Marlin/src/pins/ramps/pins_MKS_GEN_L_V2.h | 3 +++ Marlin/src/pins/ramps/pins_MKS_GEN_L_V21.h | 3 +++ Marlin/src/pins/ramps/pins_ORTUR_4.h | 1 + Marlin/src/pins/ramps/pins_PXMALION_CORE_I3.h | 1 + Marlin/src/pins/ramps/pins_RAMPS.h | 1 + Marlin/src/pins/ramps/pins_RAMPS_13.h | 1 + Marlin/src/pins/ramps/pins_RAMPS_CREALITY.h | 2 ++ Marlin/src/pins/ramps/pins_RAMPS_ENDER_4.h | 2 ++ Marlin/src/pins/ramps/pins_RAMPS_OLD.h | 1 + Marlin/src/pins/ramps/pins_RAMPS_PLUS.h | 1 + Marlin/src/pins/ramps/pins_RAMPS_S_12.h | 1 + Marlin/src/pins/ramps/pins_RIGIDBOARD.h | 1 + Marlin/src/pins/ramps/pins_RIGIDBOARD_V2.h | 1 + Marlin/src/pins/ramps/pins_RL200.h | 1 + Marlin/src/pins/ramps/pins_RUMBA.h | 3 +++ Marlin/src/pins/ramps/pins_RUMBA_RAISE3D.h | 2 ++ Marlin/src/pins/ramps/pins_SAINSMART_2IN1.h | 3 ++- Marlin/src/pins/ramps/pins_TANGO.h | 3 +++ Marlin/src/pins/ramps/pins_TENLOG_D3_HERO.h | 3 ++- Marlin/src/pins/ramps/pins_TENLOG_MB1_V23.h | 3 ++- Marlin/src/pins/ramps/pins_TRIGORILLA_13.h | 1 + Marlin/src/pins/ramps/pins_TRIGORILLA_14.h | 1 + Marlin/src/pins/ramps/pins_TRONXY_V3_1_0.h | 1 + Marlin/src/pins/ramps/pins_TT_OSCAR.h | 4 +++- Marlin/src/pins/ramps/pins_ULTIMAIN_2.h | 19 +++++++++++++++++++ Marlin/src/pins/ramps/pins_ULTIMAKER.h | 1 + Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h | 3 +++ Marlin/src/pins/ramps/pins_VORON.h | 1 + Marlin/src/pins/ramps/pins_ZRIB_V20.h | 7 ++++++- Marlin/src/pins/ramps/pins_ZRIB_V52.h | 5 ++++- Marlin/src/pins/ramps/pins_ZRIB_V53.h | 3 ++- Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h | 1 + Marlin/src/pins/sanguino/pins_ANET_10.h | 2 ++ Marlin/src/pins/sanguino/pins_AZTEEG_X1.h | 2 ++ .../src/pins/sanguino/pins_GEN3_MONOLITHIC.h | 1 + Marlin/src/pins/sanguino/pins_GEN6.h | 2 ++ Marlin/src/pins/sanguino/pins_GEN7_12.h | 10 +++++++++- Marlin/src/pins/sanguino/pins_GEN7_14.h | 4 ++++ Marlin/src/pins/sanguino/pins_MELZI.h | 2 ++ .../src/pins/sanguino/pins_MELZI_CREALITY.h | 3 +++ Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h | 1 + Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h | 1 + Marlin/src/pins/sanguino/pins_MELZI_V2.h | 2 ++ .../src/pins/sanguino/pins_SANGUINOLOLU_11.h | 10 ++++++++++ .../src/pins/sanguino/pins_SANGUINOLOLU_12.h | 6 ++++++ Marlin/src/pins/sanguino/pins_STB_11.h | 3 ++- Marlin/src/pins/sanguino/pins_ZMIB_V2.h | 2 ++ Marlin/src/pins/teensy2/pins_5DPRINT.h | 2 ++ Marlin/src/pins/teensy2/pins_BRAINWAVE.h | 4 ++++ Marlin/src/pins/teensy2/pins_BRAINWAVE_PRO.h | 2 ++ Marlin/src/pins/teensy2/pins_PRINTRBOARD.h | 9 +++++++++ .../src/pins/teensy2/pins_PRINTRBOARD_REVF.h | 13 +++++++++++++ Marlin/src/pins/teensy2/pins_SAV_MKI.h | 3 +++ Marlin/src/pins/teensy2/pins_TEENSY2.h | 1 + Marlin/src/pins/teensy2/pins_TEENSYLU.h | 4 ++++ 155 files changed, 383 insertions(+), 23 deletions(-) diff --git a/Marlin/src/HAL/AVR/fastio/fastio_1280.h b/Marlin/src/HAL/AVR/fastio/fastio_1280.h index f482f823e8..e6ecbabb80 100644 --- a/Marlin/src/HAL/AVR/fastio/fastio_1280.h +++ b/Marlin/src/HAL/AVR/fastio/fastio_1280.h @@ -27,6 +27,9 @@ * Hardware Pin : 02 03 06 07 01 05 15 16 17 18 23 24 25 26 64 63 13 12 46 45 44 43 78 77 76 75 74 73 72 71 60 59 58 57 56 55 54 53 50 70 52 51 42 41 40 39 38 37 36 35 22 21 20 19 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 | 04 08 09 10 11 14 27 28 29 30 31 32 33 34 47 48 49 61 62 65 66 67 68 69 79 80 81 98 99 100 * Port : E0 E1 E4 E5 G5 E3 H3 H4 H5 H6 B4 B5 B6 B7 J1 J0 H1 H0 D3 D2 D1 D0 A0 A1 A2 A3 A4 A5 A6 A7 C7 C6 C5 C4 C3 C2 C1 C0 D7 G2 G1 G0 L7 L6 L5 L4 L3 L2 L1 L0 B3 B2 B1 B0 F0 F1 F2 F3 F4 F5 F6 F7 K0 K1 K2 K3 K4 K5 K6 K7 | E2 E6 E7 xx xx H2 H7 G3 G4 xx xx xx xx xx D4 D5 D6 xx xx J2 J3 J4 J5 J6 J7 xx xx xx xx xx * Logical Pin : 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | 78 79 80 xx xx 84 85 71 70 xx xx xx xx xx 81 82 83 xx xx 72 73 75 76 77 74 xx xx xx xx xx + * + * Arduino Pin Layout video: https://youtu.be/rIqeVCX09FA + * AVR alternate pin function overview video: https://youtu.be/1yd8wuI5Plg */ #include "../fastio.h" diff --git a/Marlin/src/HAL/AVR/fastio/fastio_1281.h b/Marlin/src/HAL/AVR/fastio/fastio_1281.h index e0bc5e2995..812586225d 100644 --- a/Marlin/src/HAL/AVR/fastio/fastio_1281.h +++ b/Marlin/src/HAL/AVR/fastio/fastio_1281.h @@ -26,6 +26,9 @@ * * Logical Pin: 38 39 40 41 42 43 44 45 16 10 11 12 06 07 08 09 30 31 32 33 34 35 36 37 17 18 19 20 21 22 23 24 00 01 13 05 02 03 14 15 46 47 48 49 50 51 52 53 25 26 27 28 29 04 * Port: A0 A1 A2 A3 A4 A5 A6 A7 B0 B1 B2 B3 B4 B5 B6 B7 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7 E0 E1 E2 E3 E4 E5 E6 E7 F0 F1 F2 F3 F4 F5 F6 F7 G0 G1 G2 G3 G4 G5 + * + * Arduino Pin Layout video: https://youtu.be/rIqeVCX09FA + * AVR alternate pin function overview video: https://youtu.be/1yd8wuI5Plg */ #include "../fastio.h" diff --git a/Marlin/src/HAL/AVR/fastio/fastio_168.h b/Marlin/src/HAL/AVR/fastio/fastio_168.h index 8cfdd1e8f8..4f591b37b9 100644 --- a/Marlin/src/HAL/AVR/fastio/fastio_168.h +++ b/Marlin/src/HAL/AVR/fastio/fastio_168.h @@ -26,6 +26,9 @@ * * Logical Pin: 08 09 10 11 12 13 14 15 16 17 18 19 20 21 00 01 02 03 04 05 06 07 * Port: B0 B1 B2 B3 B4 B5 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7 + * + * Arduino Pin Layout video: https://youtu.be/rIqeVCX09FA + * AVR alternate pin function overview video: https://youtu.be/1yd8wuI5Plg */ #include "../fastio.h" diff --git a/Marlin/src/HAL/AVR/fastio/fastio_644.h b/Marlin/src/HAL/AVR/fastio/fastio_644.h index f4a9427e0a..16bdc6a23d 100644 --- a/Marlin/src/HAL/AVR/fastio/fastio_644.h +++ b/Marlin/src/HAL/AVR/fastio/fastio_644.h @@ -26,6 +26,9 @@ * * Logical Pin: 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 * Port: B0 B1 B2 B3 B4 B5 B6 B7 D0 D1 D2 D3 D4 D5 D6 D7 C0 C1 C2 C3 C4 C5 C6 C7 A7 A6 A5 A4 A3 A2 A1 A0 + * + * Arduino Pin Layout video: https://youtu.be/rIqeVCX09FA + * AVR alternate pin function overview video: https://youtu.be/1yd8wuI5Plg */ /** ATMega644 diff --git a/Marlin/src/HAL/AVR/fastio/fastio_AT90USB.h b/Marlin/src/HAL/AVR/fastio/fastio_AT90USB.h index 51d400b705..d2a8aca6f3 100644 --- a/Marlin/src/HAL/AVR/fastio/fastio_AT90USB.h +++ b/Marlin/src/HAL/AVR/fastio/fastio_AT90USB.h @@ -27,6 +27,9 @@ * Logical Pin: 28 29 30 31 32 33 34 35 20 21 22 23 24 25 26 27 10 11 12 13 14 15 16 17 00 01 02 03 04 05 06 07 08 09(46*47)36 37 18 19 38 39 40 41 42 43 44 45 * Port: A0 A1 A2 A3 A4 A5 A6 A7 B0 B1 B2 B3 B4 B5 B6 B7 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7 E0 E1 E2 E3 E4 E5 E6 E7 F0 F1 F2 F3 F4 F5 F6 F7 * The logical pins 46 and 47 are not supported by Teensyduino, but are supported below as E2 and E3 + * + * Arduino Pin Layout video: https://youtu.be/rIqeVCX09FA + * AVR alternate pin function overview video: https://youtu.be/1yd8wuI5Plg */ #include "../fastio.h" diff --git a/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_I2C_routines.h b/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_I2C_routines.h index 6d5f91d3ba..ec263b6dd3 100644 --- a/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_I2C_routines.h +++ b/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_I2C_routines.h @@ -34,4 +34,3 @@ void u8g_i2c_stop(); #ifdef __cplusplus } #endif - diff --git a/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_defines.h b/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_defines.h index 44ffbfeb90..2a50eddcd4 100644 --- a/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_defines.h +++ b/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_defines.h @@ -40,5 +40,3 @@ uint8_t u8g_com_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void #define U8G_COM_T6963 u8g_com_null_fn #define U8G_COM_FAST_PARALLEL u8g_com_null_fn #define U8G_COM_UC_I2C u8g_com_null_fn - - diff --git a/Marlin/src/HAL/SAMD21/HAL_SPI.cpp b/Marlin/src/HAL/SAMD21/HAL_SPI.cpp index 0fc530cdb2..69c6a43af8 100644 --- a/Marlin/src/HAL/SAMD21/HAL_SPI.cpp +++ b/Marlin/src/HAL/SAMD21/HAL_SPI.cpp @@ -64,7 +64,7 @@ } void spiInit(uint8_t spiRate) { - // Use datarates Marlin uses + // Use Marlin datarates uint32_t clock; switch (spiRate) { case SPI_FULL_SPEED: clock = 8000000; break; diff --git a/Marlin/src/HAL/SAMD21/fastio.h b/Marlin/src/HAL/SAMD21/fastio.h index db64f2166f..df907ff7ec 100644 --- a/Marlin/src/HAL/SAMD21/fastio.h +++ b/Marlin/src/HAL/SAMD21/fastio.h @@ -213,4 +213,3 @@ #define DIO53_PIN PIN_PA21 #define DIO54_PIN PIN_PA06 #define DIO55_PIN PIN_PA07 - diff --git a/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h b/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h index 4d1dbecf2e..657eb8a046 100644 --- a/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h +++ b/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h @@ -23,6 +23,8 @@ /** * AZSMZ MINI pin assignments + * Schematic: http://green-candy.osdn.jp/external/MarlinFW/board_schematics/AZSMZ%20MINI/AZSMZ.svg + * Source: https://raw.githubusercontent.com/Rose-Fish/AZSMZ-mini/master/AZSMZ.sch */ #include "env_validate.h" diff --git a/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h b/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h index 0c96cb42b5..7215150d0b 100644 --- a/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h +++ b/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h @@ -22,11 +22,7 @@ #pragma once /** - * BIQU BQ111-A4 - * - * Applies to the following boards: - * - * BOARD_BIQU_BQ111_A4 (Hotend, Fan, Bed) + * BIQU Thunder B300 V1.0 */ #include "env_validate.h" diff --git a/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h b/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h index 92152170a0..2c0d52ef9a 100644 --- a/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h +++ b/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h @@ -23,6 +23,10 @@ /** * BIQU BQ111-A4 pin assignments + * + * Applies to the following boards: + * + * BOARD_BIQU_BQ111_A4 (Hotend, Fan, Bed) */ #include "env_validate.h" diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h index 1a8c44771a..d1ea2c0197 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h @@ -23,6 +23,8 @@ /** * BigTreeTech SKR 1.1 pin assignments + * Schematic: http://green-candy.osdn.jp/external/MarlinFW/board_schematics/BTT%20SKR%20V1.1/SKR-V1.1SchDoc.pdf + * Origin: https://github.com/bigtreetech/BIGTREETECH-SKR-V1.1/blob/master/hardware/SKR-V1.1SchDoc.pdf */ #define BOARD_INFO_NAME "BTT SKR V1.1" diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h index 6372623a30..aafc8d3f9f 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h @@ -23,6 +23,8 @@ /** * BigTreeTech SKR 1.3 pin assignments + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/BTT%20SKR%20V1.3/SKR-V1.3-SCH.pdf + * Origin: https://github.com/bigtreetech/BIGTREETECH-SKR-V1.3/blob/master/BTT%20SKR%20V1.3/hardware/SKR-V1.3-SCH.pdf */ #define BOARD_INFO_NAME "BTT SKR V1.3" 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 e632d8afa6..b4fafbf7a4 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h @@ -23,6 +23,8 @@ /** * BigTreeTech SKR 1.4 pin assignments + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/BTT%20SKR%20V1.4%20+%20Turbo/BTT%20SKR%20V1.4-SCH.pdf + * Origin: https://github.com/bigtreetech/BIGTREETECH-SKR-V1.3/blob/master/BTT%20SKR%20V1.4/Hardware/BTT%20SKR%20V1.4-SCH.pdf */ #include "env_validate.h" diff --git a/Marlin/src/pins/lpc1768/pins_EMOTRONIC.h b/Marlin/src/pins/lpc1768/pins_EMOTRONIC.h index 6e1ea403b1..9e62be8edb 100644 --- a/Marlin/src/pins/lpc1768/pins_EMOTRONIC.h +++ b/Marlin/src/pins/lpc1768/pins_EMOTRONIC.h @@ -23,6 +23,8 @@ /** * eMotion-Tech eMotronic pin assignments + * Schematic: http://green-candy.osdn.jp/external/MarlinFW/board_schematics/eMotion-Tech%20eMotronic/eMotronic_brd_sources_1.0.4/eMotronic_sch.pdf + * Origin: https://data.emotion-tech.com/ftp/Datasheets_et_sources/Sources/eMotronic_brd_sources_1.0.4.zip * * Board pins<->features assignments are based on the * Micro-Delta Rework printer default connections. diff --git a/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h b/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h index 39ab0bbd89..aedbd7be60 100644 --- a/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h +++ b/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h @@ -23,6 +23,8 @@ /** * GMARSH X6 Rev.1 pin assignments + * Schematic: http://green-candy.osdn.jp/external/MarlinFW/board_schematics/GMARSH%20X6%20Rev.1/armprinter_2208_1heater.pdf + * Origin: https://github.com/gmarsh/gmarsh_x6/blob/master/armprinter_2208_1heater.pdf */ #include "env_validate.h" diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h index c5c5bd3e23..14759901ac 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h @@ -23,6 +23,8 @@ /** * Makerbase MKS SBASE pin assignments + * Schematic (V1.3): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/MKS%20SBASE%20V1.3/MKS%20SBASE%20V1.3_002%20SCH.pdf + * Origin (V1.3): http://green-candy.osdn.jp/external/MarlinFW/board_schematics/MKS%20SBASE%20V1.3/MKS%20SBASE%20V1.3_002%20SCH.pdf */ #include "env_validate.h" diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h index 1f038b4aa0..1235e44ec9 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h @@ -23,6 +23,8 @@ /** * Makerbase MKS SGEN-L pin assignments + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/MKS_GEN_L_V1_0/MKS%20Gen_L%20V1.0_008%20SCH.pdf + * Origin: https://github.com/makerbase-mks/SGEN_L/blob/master/Hardware/MKS%20SGEN_L%20V1.0_001/MKS%20SGEN_L%20V1.0_001%20SCH.pdf */ #include "env_validate.h" diff --git a/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h b/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h index b6ce9c5c05..893a8a755b 100644 --- a/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h +++ b/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h @@ -23,6 +23,8 @@ /** * Re-ARM with RAMPS v1.4 pin assignments + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Re-ARM%20RAMPS%201.4/Re_ARM_Schematic.pdf + * Origin: https://reprap.org/mediawiki/images/f/fa/Re_ARM_Schematic.pdf * * Applies to the following boards: * diff --git a/Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h b/Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h index 2972ac7560..30cd76b9a2 100644 --- a/Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h +++ b/Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h @@ -23,6 +23,8 @@ /** * Selena Compact pin assignments + * Pinout: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Selena%20Compact/Compact%20Pinout.pdf + * Origin: https://github.com/f61/Selena/blob/master/Compact%20Pinout.pdf */ #include "env_validate.h" diff --git a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h index bc7cada8da..a9c61cb8c9 100644 --- a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h +++ b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h @@ -23,6 +23,8 @@ /** * Azteeg X5 GT pin assignments + * Wiring diagram: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Azteeg%20X5%20GT/X5%20GT%20Wiring%20Diagram.pdf + * Origin: https://panucattdevices.freshdesk.com/support/solutions/articles/1000244740-support-files */ #include "env_validate.h" diff --git a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h index c33fe6e28f..eabb338504 100644 --- a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h +++ b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h @@ -23,6 +23,10 @@ /** * Azteeg X5 MINI pin assignments + * Schematic (V1): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Azteeg%20X5%20MINI/x5mini_design_files/X5mini_design_files/V1/X5%20Mini%20PUB%20v1.0.pdf + * Schematic (V2): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Azteeg%20X5%20MINI/x5mini_design_files/X5mini_design_files/V2/X5%20Mini%20V2%20SCH%20Pub.pdf + * Schematic (V3): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Azteeg%20X5%20MINI/x5mini_design_files/X5mini_design_files/V3/X5%20Mini%20V3%20SCH%20Pub.pdf + * Origin: http://files.panucatt.com/datasheets/x5mini_design_files.zip */ #include "env_validate.h" diff --git a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI_WIFI.h b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI_WIFI.h index 086bacbac0..74439e4f3d 100644 --- a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI_WIFI.h +++ b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI_WIFI.h @@ -23,6 +23,8 @@ /** * Azteeg X5 MINI WIFI pin assignments + * Wiring diagram: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Azteeg%20X5%20MINI%20WIFI/x5mini_wifi_wiring.pdf + * Origin: http://files.panucatt.com/datasheets/x5mini_wifi_wiring.pdf */ #include "env_validate.h" diff --git a/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h b/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h index dbaafb89cc..f62818dd9f 100644 --- a/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h +++ b/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h @@ -23,6 +23,8 @@ /** * BigTreeTech SKR E3 Turbo pin assignments + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/BTT%20SKR%20E3%20Turbo/BTT%20SKR%20E3%20Turbo-SCH.pdf + * Origin: https://github.com/bigtreetech/BIGTREETECH-SKR-E3-Turbo/blob/master/Hardware/BTT%20SKR%20E3%20Turbo-SCH.pdf */ #include "env_validate.h" diff --git a/Marlin/src/pins/lpc1769/pins_BTT_SKR_V1_4_TURBO.h b/Marlin/src/pins/lpc1769/pins_BTT_SKR_V1_4_TURBO.h index 7f428fc918..1bd70d8fb5 100644 --- a/Marlin/src/pins/lpc1769/pins_BTT_SKR_V1_4_TURBO.h +++ b/Marlin/src/pins/lpc1769/pins_BTT_SKR_V1_4_TURBO.h @@ -23,6 +23,8 @@ /** * BigTreeTech SKR 1.4 Turbo pin assignments + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/BTT%20SKR%20V1.4%20+%20Turbo/BTT%20SKR%20V1.4-SCH.pdf + * Origin: https://github.com/bigtreetech/BIGTREETECH-SKR-V1.3/blob/master/BTT%20SKR%20V1.4/Hardware/BTT%20SKR%20V1.4-SCH.pdf */ #define BOARD_INFO_NAME "BTT SKR V1.4 TURBO" diff --git a/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h b/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h index e0a3b03109..5c9355de29 100644 --- a/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h +++ b/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h @@ -23,6 +23,8 @@ /** * Cohesion3D Mini pin assignments + * Pinout: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Cohesion3D%20Mini/c3d-pinout.jpg + * Origin: https://lasergods.com/cohesion3d-mini-pinout-diagram/ */ #include "env_validate.h" diff --git a/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h b/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h index 122c7462d2..5083a0ed48 100644 --- a/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h +++ b/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h @@ -23,6 +23,8 @@ /** * Cohesion3D ReMix pin assignments + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Cohesion3D%20ReMix/C3D%20ReMix%20rev2.svg + * Origin: https://github.com/Cohesion3D/Cohesion3D-ReMix/blob/master/C3D%20ReMix%20rev2.sch */ #include "env_validate.h" diff --git a/Marlin/src/pins/lpc1769/pins_FLY_CDY.h b/Marlin/src/pins/lpc1769/pins_FLY_CDY.h index 1c0c21466e..ed0ce30eb3 100644 --- a/Marlin/src/pins/lpc1769/pins_FLY_CDY.h +++ b/Marlin/src/pins/lpc1769/pins_FLY_CDY.h @@ -23,6 +23,8 @@ /** * FLYmaker FLY-CDY pin assignments + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/FLYmaker%20FLY-CDY%20V1/FLY_CDY%20SCH.pdf + * Origin: https://github.com/Mellow-3D/FLY-CDY/blob/master/Motherboard%20information/FLY_CDY%20SCH.pdf */ #include "env_validate.h" diff --git a/Marlin/src/pins/lpc1769/pins_MKS_SGEN.h b/Marlin/src/pins/lpc1769/pins_MKS_SGEN.h index 23bcecc78d..1e71fccfe5 100644 --- a/Marlin/src/pins/lpc1769/pins_MKS_SGEN.h +++ b/Marlin/src/pins/lpc1769/pins_MKS_SGEN.h @@ -23,6 +23,8 @@ /** * MKS SGen pin assignments + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/MKS%20SGEN/MKS%20SGEN%20V1.0_001%20SCH.pdf + * Origin: https://github.com/makerbase-mks/MKS-SGen/blob/master/Hardware/MKS%20SGEN%20V1.0_001/MKS%20SGEN%20V1.0_001%20SCH.pdf * * Pins diagram: * https://github.com/makerbase-mks/MKS-SGen/blob/master/Hardware/MKS%20SGEN%20V1.0_001/MKS%20SGEN%20V1.0_001%20PIN.pdf diff --git a/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h b/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h index 5c1b1f5638..54b771d318 100644 --- a/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h +++ b/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h @@ -23,6 +23,8 @@ /** * MKS SGen-L V2 pin assignments + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/MKS%20SGEN_L%20V2/MKS%20SGEN_L%20V2.0_003%20SCH.pdf + * Origin: https://github.com/makerbase-mks/MKS-SGEN_L-V2/blob/master/Hardware/MKS%20SGEN_L%20V2.0_003/MKS%20SGEN_L%20V2.0_003%20SCH.pdf */ #include "env_validate.h" diff --git a/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h b/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h index cfaca164f8..124c8f63c2 100644 --- a/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h +++ b/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h @@ -23,6 +23,8 @@ /** * Smoothieware Smoothieboard pin assignments + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Smoothieware%20Smoothieboard%20V1/http.i.imgur.com.oj4zqs3.png + * Origin: http://smoothieware.org/_media///external/http.i.imgur.com.oj4zqs3.png */ #include "env_validate.h" diff --git a/Marlin/src/pins/mega/pins_CHEAPTRONIC.h b/Marlin/src/pins/mega/pins_CHEAPTRONIC.h index 8bcb263bc1..e95f6c4ade 100644 --- a/Marlin/src/pins/mega/pins_CHEAPTRONIC.h +++ b/Marlin/src/pins/mega/pins_CHEAPTRONIC.h @@ -23,6 +23,7 @@ /** * Cheaptronic v1.0 pin assignments + * ATmega2560 */ #include "env_validate.h" diff --git a/Marlin/src/pins/mega/pins_CHEAPTRONICv2.h b/Marlin/src/pins/mega/pins_CHEAPTRONICv2.h index 01438975b9..e81295a653 100644 --- a/Marlin/src/pins/mega/pins_CHEAPTRONICv2.h +++ b/Marlin/src/pins/mega/pins_CHEAPTRONICv2.h @@ -24,7 +24,9 @@ /** * Cheaptronic v2.0 pin assignments * Built and sold by Michal Dyntar - RRO - * www.reprapobchod.cz + * www.reprapobchod.cz (DOES NOT EXIST ANYMORE) + * https://web.archive.org/web/20190306201523/http://reprapobchod.cz/ + * ATmega2560 */ #include "env_validate.h" diff --git a/Marlin/src/pins/mega/pins_CNCONTROLS_11.h b/Marlin/src/pins/mega/pins_CNCONTROLS_11.h index 5f7a534d11..d996635c8c 100644 --- a/Marlin/src/pins/mega/pins_CNCONTROLS_11.h +++ b/Marlin/src/pins/mega/pins_CNCONTROLS_11.h @@ -23,6 +23,9 @@ /** * CartesioV11 pin assignments + * Comes with an Arduino Mega, see + * https://web.archive.org/web/20171024190029/http://mauk.cc/mediawiki/index.php/Electronical_assembly + * ATmega2560, ATmega1280 */ #define ALLOW_MEGA1280 diff --git a/Marlin/src/pins/mega/pins_CNCONTROLS_12.h b/Marlin/src/pins/mega/pins_CNCONTROLS_12.h index 0aa0b59ca9..ea82fe429c 100644 --- a/Marlin/src/pins/mega/pins_CNCONTROLS_12.h +++ b/Marlin/src/pins/mega/pins_CNCONTROLS_12.h @@ -23,6 +23,9 @@ /** * CartesioV12 pin assignments + * Comes with an Arduino Mega, see + * https://web.archive.org/web/20171024190029/http://mauk.cc/mediawiki/index.php/Electronical_assembly + * ATmega2560, ATmega1280 */ #define ALLOW_MEGA1280 diff --git a/Marlin/src/pins/mega/pins_CNCONTROLS_15.h b/Marlin/src/pins/mega/pins_CNCONTROLS_15.h index 6de3b7172e..c77e711f9c 100644 --- a/Marlin/src/pins/mega/pins_CNCONTROLS_15.h +++ b/Marlin/src/pins/mega/pins_CNCONTROLS_15.h @@ -23,6 +23,7 @@ /** * CNControls V15 for HMS434 pin assignments + * ATmega2560, ATmega1280 */ #define ALLOW_MEGA1280 diff --git a/Marlin/src/pins/mega/pins_EINSTART-S.h b/Marlin/src/pins/mega/pins_EINSTART-S.h index c8cbee6740..274684f337 100644 --- a/Marlin/src/pins/mega/pins_EINSTART-S.h +++ b/Marlin/src/pins/mega/pins_EINSTART-S.h @@ -23,6 +23,7 @@ /** * Einstart-S pin assignments + * ATmega2560, ATmega1280 * PCB Silkscreen: 3DPrinterCon_v3.5 */ diff --git a/Marlin/src/pins/mega/pins_ELEFU_3.h b/Marlin/src/pins/mega/pins_ELEFU_3.h index f5e146cff9..6cf9e1b4e1 100644 --- a/Marlin/src/pins/mega/pins_ELEFU_3.h +++ b/Marlin/src/pins/mega/pins_ELEFU_3.h @@ -23,6 +23,9 @@ /** * Elefu RA Board Pin Assignments + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Elefu%20Ra%20v3/schematic.pdf + * Origin: https://github.com/kiyoshigawa/Elefu-RAv3/blob/master/RA_Circuits.zip + * ATmega2560 */ #include "env_validate.h" diff --git a/Marlin/src/pins/mega/pins_GT2560_REV_A.h b/Marlin/src/pins/mega/pins_GT2560_REV_A.h index 99e8704ea5..bb251dfb4e 100644 --- a/Marlin/src/pins/mega/pins_GT2560_REV_A.h +++ b/Marlin/src/pins/mega/pins_GT2560_REV_A.h @@ -25,6 +25,9 @@ * Geeetech GT2560 Revision A board pin assignments, based on the work of * George Robles (https://georges3dprinters.com) and * Richard Smith + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Geeetech%20GT2560%20Revision%20A/GT2560_sch.pdf + * Origin: https://www.geeetech.com/wiki/images/9/90/GT2560_sch.pdf + * ATmega2560 */ #define ALLOW_MEGA1280 diff --git a/Marlin/src/pins/mega/pins_GT2560_REV_A_PLUS.h b/Marlin/src/pins/mega/pins_GT2560_REV_A_PLUS.h index 7e2ce20c67..a982a0e00e 100644 --- a/Marlin/src/pins/mega/pins_GT2560_REV_A_PLUS.h +++ b/Marlin/src/pins/mega/pins_GT2560_REV_A_PLUS.h @@ -23,6 +23,9 @@ /** * Geeetech GT2560 Revision A+ board pin assignments + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Geeetech%20GT2560%20Revision%20A+/Hardware_GT2560_RevA+.pdf + * Origin: https://www.geeetech.com/wiki/images/d/d3/Hardware_GT2560_RevA%2B.pdf + * ATmega2560 */ #define BOARD_INFO_NAME "GT2560 Rev.A+" diff --git a/Marlin/src/pins/mega/pins_GT2560_REV_B.h b/Marlin/src/pins/mega/pins_GT2560_REV_B.h index be71ec4902..0702d14eb8 100644 --- a/Marlin/src/pins/mega/pins_GT2560_REV_B.h +++ b/Marlin/src/pins/mega/pins_GT2560_REV_B.h @@ -23,6 +23,9 @@ /** * Geeetech GT2560 Rev B Pins + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Geeetech%20GT2560%20Rev%20B/GT2560_REVB.pdf + * Origin: https://www.geeetech.com/wiki/images/7/72/GT2560_REVB.pdf + * ATmega2560 */ #define BOARD_INFO_NAME "GT2560 Rev B" diff --git a/Marlin/src/pins/mega/pins_GT2560_V3.h b/Marlin/src/pins/mega/pins_GT2560_V3.h index 46b4ebf428..5d2436b684 100644 --- a/Marlin/src/pins/mega/pins_GT2560_V3.h +++ b/Marlin/src/pins/mega/pins_GT2560_V3.h @@ -23,6 +23,9 @@ /** * Geeetech GT2560 3.0/3.1 pin assignments + * Schematic (3.0): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Geeetech%20GT2560%203.0/GT2560_V3.0_SCH.pdf + * Origin (3.0): https://github.com/Geeetech3D/Diagram/blob/master/GT2560_V3.0_SCH.pdf + * ATmega2560 * * Also GT2560 RevB and GT2560 4.0/4.1 */ diff --git a/Marlin/src/pins/mega/pins_GT2560_V3_A20.h b/Marlin/src/pins/mega/pins_GT2560_V3_A20.h index c96431141c..628f897b0c 100644 --- a/Marlin/src/pins/mega/pins_GT2560_V3_A20.h +++ b/Marlin/src/pins/mega/pins_GT2560_V3_A20.h @@ -23,6 +23,7 @@ /** * Geeetech A20M board pin assignments + * ATmega2560 */ #define LCD_PINS_RS 5 diff --git a/Marlin/src/pins/mega/pins_GT2560_V3_MC2.h b/Marlin/src/pins/mega/pins_GT2560_V3_MC2.h index e683d4dfda..70854c5716 100644 --- a/Marlin/src/pins/mega/pins_GT2560_V3_MC2.h +++ b/Marlin/src/pins/mega/pins_GT2560_V3_MC2.h @@ -23,6 +23,7 @@ /** * Geeetech GT2560 V 3.0 board pin assignments (for Mecreator 2) + * ATmega2560 */ #define BOARD_INFO_NAME "GT2560 V3.0 (MC2)" diff --git a/Marlin/src/pins/mega/pins_GT2560_V4.h b/Marlin/src/pins/mega/pins_GT2560_V4.h index 6ac07b70bf..98f503886f 100644 --- a/Marlin/src/pins/mega/pins_GT2560_V4.h +++ b/Marlin/src/pins/mega/pins_GT2560_V4.h @@ -23,6 +23,9 @@ /** * Geeetech GT2560 V4.X Pins + * Schematic (4.0): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Geeetech%20GT2560%20V4.x%20+%20A20/GT2560V4.0SCHA20T.pdf + * Schematic (4.1B): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Geeetech%20GT2560%20V4.x%20+%20A20/GT2560V4.1BSCHA20T.pdf + * Origin: https://www.geeetech.com/download.html?spm=a2g0s.imconversation.0.0.22d23e5fXlQBWv&download_id=45 */ #define BOARD_INFO_NAME "GT2560 4.x" diff --git a/Marlin/src/pins/mega/pins_GT2560_V4_A20.h b/Marlin/src/pins/mega/pins_GT2560_V4_A20.h index c87c11e175..8ca2d44db9 100644 --- a/Marlin/src/pins/mega/pins_GT2560_V4_A20.h +++ b/Marlin/src/pins/mega/pins_GT2560_V4_A20.h @@ -23,6 +23,7 @@ /** * Geeetech A20 GT2560 V4.x board pin assignments + * ATmega2560 */ #define BOARD_INFO_NAME "GT2560 4.x" diff --git a/Marlin/src/pins/mega/pins_HJC2560C_REV2.h b/Marlin/src/pins/mega/pins_HJC2560C_REV2.h index 5c3b1dc9f6..1b3b7b29af 100644 --- a/Marlin/src/pins/mega/pins_HJC2560C_REV2.h +++ b/Marlin/src/pins/mega/pins_HJC2560C_REV2.h @@ -23,6 +23,7 @@ /** * Geeetech HJC2560-C Rev 2.x board pin assignments + * ATmega2560 */ #include "env_validate.h" diff --git a/Marlin/src/pins/mega/pins_INTAMSYS40.h b/Marlin/src/pins/mega/pins_INTAMSYS40.h index 2e2a9b85db..ec466fb09f 100644 --- a/Marlin/src/pins/mega/pins_INTAMSYS40.h +++ b/Marlin/src/pins/mega/pins_INTAMSYS40.h @@ -23,6 +23,7 @@ /** * Intamsys Funmat HT V4.0 Mainboard + * ATmega2560 * 4988 Drivers Tested * 2208 version exists and may or may not work */ diff --git a/Marlin/src/pins/mega/pins_LEAPFROG.h b/Marlin/src/pins/mega/pins_LEAPFROG.h index 4700fd6729..3762ea98f0 100644 --- a/Marlin/src/pins/mega/pins_LEAPFROG.h +++ b/Marlin/src/pins/mega/pins_LEAPFROG.h @@ -23,6 +23,7 @@ /** * Leapfrog Driver board pin assignments + * ATmega2560, ATmega1280 */ #define ALLOW_MEGA1280 diff --git a/Marlin/src/pins/mega/pins_LEAPFROG_XEED2015.h b/Marlin/src/pins/mega/pins_LEAPFROG_XEED2015.h index 4a32472949..7be96c5def 100644 --- a/Marlin/src/pins/mega/pins_LEAPFROG_XEED2015.h +++ b/Marlin/src/pins/mega/pins_LEAPFROG_XEED2015.h @@ -23,6 +23,7 @@ /** * Leapfrog Xeed Driver board pin assignments + * ATmega2560 * * This board is used by other Leapfrog printers in addition to the Xeed, * such as the Creatr HS and Bolt. The pin assignments vary wildly between diff --git a/Marlin/src/pins/mega/pins_MALYAN_M180.h b/Marlin/src/pins/mega/pins_MALYAN_M180.h index 19095a5379..3ef606de77 100644 --- a/Marlin/src/pins/mega/pins_MALYAN_M180.h +++ b/Marlin/src/pins/mega/pins_MALYAN_M180.h @@ -24,6 +24,8 @@ /** * Malyan M180 pin assignments * Contributed by Timo Birnschein (timo.birnschein@microforge.de) + * @Timo: sind diese Pin Definitionen immernoch korrekt? (Antwort an turningtides@outlook.de bitte) + * ATmega2560 */ #include "env_validate.h" diff --git a/Marlin/src/pins/mega/pins_MEGACONTROLLER.h b/Marlin/src/pins/mega/pins_MEGACONTROLLER.h index 7ebef6e281..f45da25f62 100644 --- a/Marlin/src/pins/mega/pins_MEGACONTROLLER.h +++ b/Marlin/src/pins/mega/pins_MEGACONTROLLER.h @@ -23,6 +23,9 @@ /** * Mega controller pin assignments + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Mega%20Controller/Mega_controller.pdf + * Origin: https://reprap.org/mediawiki/images/b/ba/Mega_controller.pdf + * ATmega2560 */ #if HOTENDS > 2 || E_STEPPERS > 2 diff --git a/Marlin/src/pins/mega/pins_MEGATRONICS.h b/Marlin/src/pins/mega/pins_MEGATRONICS.h index ac0ba4eea6..a51615e3d9 100644 --- a/Marlin/src/pins/mega/pins_MEGATRONICS.h +++ b/Marlin/src/pins/mega/pins_MEGATRONICS.h @@ -23,6 +23,9 @@ /** * MegaTronics pin assignments + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/MegaTronics/Megatronics_1_0_sch.pdf + * Origin: https://reprap.org/mediawiki/images/a/a3/Megatronics_1_0_sch.pdf + * ATmega2560 */ #include "env_validate.h" diff --git a/Marlin/src/pins/mega/pins_MEGATRONICS_2.h b/Marlin/src/pins/mega/pins_MEGATRONICS_2.h index e527035910..3f7afe562b 100644 --- a/Marlin/src/pins/mega/pins_MEGATRONICS_2.h +++ b/Marlin/src/pins/mega/pins_MEGATRONICS_2.h @@ -23,6 +23,9 @@ /** * MegaTronics v2.0 pin assignments + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Megatronics%20v2.0/megatronics%20-%20Project.pdf + * Origin: https://reprap.org/wiki/File:Megatronicsv2PDF.zip + * ATmega2560 */ #include "env_validate.h" diff --git a/Marlin/src/pins/mega/pins_MEGATRONICS_3.h b/Marlin/src/pins/mega/pins_MEGATRONICS_3.h index 86aff16f92..b194c31b5d 100644 --- a/Marlin/src/pins/mega/pins_MEGATRONICS_3.h +++ b/Marlin/src/pins/mega/pins_MEGATRONICS_3.h @@ -23,6 +23,8 @@ /** * MegaTronics v3.0 / v3.1 / v3.2 pin assignments + * Schematic Origin: https://github.com/brupje/Megatronics_3/blob/master/Design%20Files/megatronics.sch + * ATmega2560 */ #include "env_validate.h" diff --git a/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h b/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h index 0ef1c1d8ae..56f92f8b25 100644 --- a/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h +++ b/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h @@ -23,6 +23,8 @@ /** * Mightyboard Rev.E pin assignments + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Mightyboard%20Rev.E/MakerBot%20MightyBoard%20REVE%20Schematic.pdf + * Origin: https://github.com/sciguy14/HelioWatcher/blob/master/HelioWatcher%20Circuit/MakerBot%20MightyBoard%20REVE%20Schematic.pdf * also works for Rev D boards. It's all rev E despite what the silk screen says */ diff --git a/Marlin/src/pins/mega/pins_MINITRONICS.h b/Marlin/src/pins/mega/pins_MINITRONICS.h index ec712a3b90..ddf6d2047d 100644 --- a/Marlin/src/pins/mega/pins_MINITRONICS.h +++ b/Marlin/src/pins/mega/pins_MINITRONICS.h @@ -23,6 +23,11 @@ /** * Minitronics v1.0/1.1 pin assignments + * Schematic (1.0): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Minitronics%20v1.0/minitronics%20-%20Project.pdf + * Origin (1.0): https://reprap.org/wiki/File:MinitronicsPDF.zip + * Datasheet (1.1): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Minitronics%20v1.1/datasheet%20minitronics%20v1.1.pdf + * Origin (1.1): https://reprapworld.nl/documentation/datasheet%20minitronics%20v1.1.pdf + * ATmega1281 */ /** diff --git a/Marlin/src/pins/mega/pins_OVERLORD.h b/Marlin/src/pins/mega/pins_OVERLORD.h index 49accf9f7c..01c02dafe2 100644 --- a/Marlin/src/pins/mega/pins_OVERLORD.h +++ b/Marlin/src/pins/mega/pins_OVERLORD.h @@ -23,6 +23,9 @@ /** * Dreammaker Overlord v1.1 pin assignments + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Dreammaker%20Overlord%20v1.1/Schematic.pdf + * Origin: https://github.com/jdpiercy/Overlord-Pro/blob/master/Motherboard/Schematic.pdf + * ATmega2560 */ #if HOTENDS > 2 || E_STEPPERS > 2 diff --git a/Marlin/src/pins/mega/pins_PICA.h b/Marlin/src/pins/mega/pins_PICA.h index 0e29d8dffe..109859388c 100644 --- a/Marlin/src/pins/mega/pins_PICA.h +++ b/Marlin/src/pins/mega/pins_PICA.h @@ -23,6 +23,9 @@ /** * Arduino Mega with PICA pin assignments + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/PICA/pica_schematic.pdf + * Origin: https://github.com/mjrice/PICA/blob/master/pica_schematic.pdf + * ATmega2560 * * PICA is Power, Interface, and Control Adapter and is open source hardware. * See https://github.com/mjrice/PICA for schematics etc. diff --git a/Marlin/src/pins/mega/pins_PICAOLD.h b/Marlin/src/pins/mega/pins_PICAOLD.h index e19ea744e5..961462fc52 100644 --- a/Marlin/src/pins/mega/pins_PICAOLD.h +++ b/Marlin/src/pins/mega/pins_PICAOLD.h @@ -21,6 +21,10 @@ */ #pragma once +// Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/PICAOLD/pica_schematic.pdf +// Origin: https://github.com/mjrice/PICA/blob/97ab9e7771a8e5eef97788f3adcc17a9fa9de9b9/pica_schematic.pdf +// ATmega2560 + #define HEATER_0_PIN 9 // E0 #define HEATER_1_PIN 10 // E1 #define FAN_PIN 11 diff --git a/Marlin/src/pins/mega/pins_PROTONEER_CNC_SHIELD_V3.h b/Marlin/src/pins/mega/pins_PROTONEER_CNC_SHIELD_V3.h index 88d549c8cb..962fddc192 100644 --- a/Marlin/src/pins/mega/pins_PROTONEER_CNC_SHIELD_V3.h +++ b/Marlin/src/pins/mega/pins_PROTONEER_CNC_SHIELD_V3.h @@ -23,6 +23,9 @@ /** * Protoneer v3.00 pin assignments + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Protoneer%20CNC%20Shield%20v3.00/Arduino-CNC-Shield-Scematics-V3.XX_.webp + * Origin: https://i0.wp.com/blog.protoneer.co.nz/wp-content/uploads/2013/07/Arduino-CNC-Shield-Scematics-V3.XX_.jpg + * ATmega2560 * * This CNC shield has an UNO pinout and fits all Arduino-compatibles. * diff --git a/Marlin/src/pins/mega/pins_SILVER_GATE.h b/Marlin/src/pins/mega/pins_SILVER_GATE.h index 4568ed04e2..6dc0c3963f 100644 --- a/Marlin/src/pins/mega/pins_SILVER_GATE.h +++ b/Marlin/src/pins/mega/pins_SILVER_GATE.h @@ -21,6 +21,8 @@ */ #pragma once +// ATmega2561 + #if NOT_TARGET(__AVR_ATmega1281__, __AVR_ATmega2561__) #error "Oops! Select 'Silvergate' in 'Tools > Board.'" #endif diff --git a/Marlin/src/pins/mega/pins_WANHAO_ONEPLUS.h b/Marlin/src/pins/mega/pins_WANHAO_ONEPLUS.h index 503dd9ec81..6ab6c4ceb9 100644 --- a/Marlin/src/pins/mega/pins_WANHAO_ONEPLUS.h +++ b/Marlin/src/pins/mega/pins_WANHAO_ONEPLUS.h @@ -23,6 +23,7 @@ /** * Wanhao 0ne+ pin assignments + * ATmega2560 */ #include "env_validate.h" diff --git a/Marlin/src/pins/mega/pins_WEEDO_62A.h b/Marlin/src/pins/mega/pins_WEEDO_62A.h index 4b3bf6a43b..4165d9e234 100644 --- a/Marlin/src/pins/mega/pins_WEEDO_62A.h +++ b/Marlin/src/pins/mega/pins_WEEDO_62A.h @@ -23,6 +23,7 @@ /** * Based on WEEDO 62A pin configuration * Copyright (c) 2019 WEEDO3D Perron + * ATmega2560 */ #pragma once diff --git a/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h b/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h index de9ecc5b45..c28fbd059c 100644 --- a/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h +++ b/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h @@ -23,6 +23,8 @@ /** * Einsy-Rambo pin assignments + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Einsy-Rambo/Schematic%20Prints_Einsy%20Rambo_1.1a.PDF + * Origin: https://github.com/ultimachine/Einsy-Rambo/blob/1.1a/board/Project%20Outputs/Schematic%20Prints_Einsy%20Rambo_1.1a.PDF */ #include "env_validate.h" diff --git a/Marlin/src/pins/rambo/pins_EINSY_RETRO.h b/Marlin/src/pins/rambo/pins_EINSY_RETRO.h index 413eb8c98c..dc91c47e9a 100644 --- a/Marlin/src/pins/rambo/pins_EINSY_RETRO.h +++ b/Marlin/src/pins/rambo/pins_EINSY_RETRO.h @@ -23,6 +23,10 @@ /** * Einsy-Retro pin assignments + * Schematic (1.0b): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Einsy-Retro/Schematic%20Prints_EinsyRetro_1.0b.PDF + * Origin (1.0b): https://github.com/ultimachine/EinsyRetro/blob/master/board/Project%20Outputs/Schematic%20Prints_EinsyRetro_1.0b.PDF + * Schematic (1.0c): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Einsy-Retro/Schematic%20Prints_EinsyRetro_1.0c.PDF + * Origin (1.0c): https://github.com/ultimachine/EinsyRetro/blob/master/board/Project%20Outputs/Schematic%20Prints_EinsyRetro_1.0c.PDF */ #include "env_validate.h" diff --git a/Marlin/src/pins/rambo/pins_MINIRAMBO.h b/Marlin/src/pins/rambo/pins_MINIRAMBO.h index 31d44f2b34..353fbd6641 100644 --- a/Marlin/src/pins/rambo/pins_MINIRAMBO.h +++ b/Marlin/src/pins/rambo/pins_MINIRAMBO.h @@ -23,6 +23,10 @@ /** * Mini-RAMBo pin assignments + * Schematic (1.3a): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Mini%20RAMBo/Mini-Rambo.PDF + * Origin (1.3a): https://github.com/ultimachine/Mini-Rambo/blob/1.3a/board/Project%20Outputs%20for%20Mini-Rambo/Mini-Rambo.PDF + * Schematic (1.0a): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Mini%20RAMBo%201.0a/Mini-Rambo.PDF + * Origin (1.0a): https://github.com/ultimachine/Mini-Rambo/blob/v1.1b/board/Project%20Outputs%20for%20Mini-Rambo/Mini-Rambo.PDF */ #include "env_validate.h" diff --git a/Marlin/src/pins/rambo/pins_RAMBO.h b/Marlin/src/pins/rambo/pins_RAMBO.h index cb7a059134..3a26811538 100644 --- a/Marlin/src/pins/rambo/pins_RAMBO.h +++ b/Marlin/src/pins/rambo/pins_RAMBO.h @@ -39,6 +39,8 @@ /** * Rambo pin assignments + * Schematic (1.1b): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMBo/Rambo1-1-schematic.png + * Origin (1.1b): https://www.reprap.org/wiki/File:Rambo1-1-schematic.png */ #include "env_validate.h" diff --git a/Marlin/src/pins/rambo/pins_SCOOVO_X9H.h b/Marlin/src/pins/rambo/pins_SCOOVO_X9H.h index 533284a4bf..ca073f5ab9 100644 --- a/Marlin/src/pins/rambo/pins_SCOOVO_X9H.h +++ b/Marlin/src/pins/rambo/pins_SCOOVO_X9H.h @@ -25,7 +25,7 @@ * Rambo pin assignments MODIFIED FOR Scoovo X9H ************************************************/ -#include "env_target.h" +#include "env_validate.h" #define BOARD_INFO_NAME "Scoovo X9H" diff --git a/Marlin/src/pins/ramps/pins_3DRAG.h b/Marlin/src/pins/ramps/pins_3DRAG.h index 0f90dd5a34..c14284865b 100644 --- a/Marlin/src/pins/ramps/pins_3DRAG.h +++ b/Marlin/src/pins/ramps/pins_3DRAG.h @@ -23,6 +23,10 @@ /** * 3DRAG (and K8200 / K8400) Arduino Mega with RAMPS v1.4 pin assignments + * This may be compatible with the standalone Controller variant. + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/3DRAG%20+%20Controller/Schema_base.jpg + * Origin: https://reprap.org/wiki/File:Schema_base.jpg + * ATmega2560, ATmega1280 */ #ifndef BOARD_INFO_NAME diff --git a/Marlin/src/pins/ramps/pins_AZTEEG_X3.h b/Marlin/src/pins/ramps/pins_AZTEEG_X3.h index 31adea4270..4d3722655d 100644 --- a/Marlin/src/pins/ramps/pins_AZTEEG_X3.h +++ b/Marlin/src/pins/ramps/pins_AZTEEG_X3.h @@ -23,6 +23,9 @@ /** * AZTEEG_X3 Arduino Mega with RAMPS v1.4 pin assignments + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/AZTEEG_X3/AZTEEG%20X3%20PUB%20v1.12.pdf + * Origin: http://files.panucatt.com/datasheets/azteegx3_designfiles.zip + * ATmega2560 */ #define REQUIRE_MEGA2560 diff --git a/Marlin/src/pins/ramps/pins_AZTEEG_X3_PRO.h b/Marlin/src/pins/ramps/pins_AZTEEG_X3_PRO.h index 24266bb9d2..2c666a6f16 100644 --- a/Marlin/src/pins/ramps/pins_AZTEEG_X3_PRO.h +++ b/Marlin/src/pins/ramps/pins_AZTEEG_X3_PRO.h @@ -23,6 +23,9 @@ /** * AZTEEG_X3_PRO (Arduino Mega) pin assignments + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/AZTEEG_X3_PRO/AZTEEG%20X3%20PRO%201.0%20PUB.pdf + * Origin: http://files.panucatt.com/datasheets/x3pro_sch_v1.0.zip + * ATmega2560 */ #define REQUIRE_MEGA2560 diff --git a/Marlin/src/pins/ramps/pins_BAM_DICE_DUE.h b/Marlin/src/pins/ramps/pins_BAM_DICE_DUE.h index fa622ffb15..f3439aa6bb 100644 --- a/Marlin/src/pins/ramps/pins_BAM_DICE_DUE.h +++ b/Marlin/src/pins/ramps/pins_BAM_DICE_DUE.h @@ -23,6 +23,9 @@ /** * BAM&DICE Due (Arduino Mega) pin assignments + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/BAM&DICE%20Due/2PRINTBETA-BAM&DICE-DUE-V1.1-sch.pdf + * Origin: http://www.2printbeta.de/download/2PRINTBETA-BAM&DICE-DUE-V1.1-sch.pdf + * ATmega2560, ATmega1280 */ #if HOTENDS > 2 || E_STEPPERS > 2 diff --git a/Marlin/src/pins/ramps/pins_BIQU_KFB_2.h b/Marlin/src/pins/ramps/pins_BIQU_KFB_2.h index 58a62fb8bc..6155e9842a 100644 --- a/Marlin/src/pins/ramps/pins_BIQU_KFB_2.h +++ b/Marlin/src/pins/ramps/pins_BIQU_KFB_2.h @@ -23,6 +23,7 @@ /** * KFB 2.0 – Arduino Mega2560 with RAMPS v1.4 pin assignments + * ATmega2560 */ #if HOTENDS > 2 || E_STEPPERS > 2 diff --git a/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h b/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h index 4a54b85ae0..cd3ada25bf 100644 --- a/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h +++ b/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h @@ -23,6 +23,9 @@ /** * bq ZUM Mega 3D board definition + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/bq%20ZUM%20Mega%203D/Zum%20Mega%203D.PDF + * Origin: https://github.com/bq/zum/blob/master/zum-mega3d/Zum%20Mega%203D.PDF + * ATmega2560 */ #define REQUIRE_MEGA2560 diff --git a/Marlin/src/pins/ramps/pins_COPYMASTER_3D.h b/Marlin/src/pins/ramps/pins_COPYMASTER_3D.h index 020941027a..1285d0244c 100644 --- a/Marlin/src/pins/ramps/pins_COPYMASTER_3D.h +++ b/Marlin/src/pins/ramps/pins_COPYMASTER_3D.h @@ -21,6 +21,8 @@ */ #pragma once +// ATmega2560 + #define BOARD_INFO_NAME "Copymaster 3D RAMPS" #define Z_STEP_PIN 47 diff --git a/Marlin/src/pins/ramps/pins_DAGOMA_F5.h b/Marlin/src/pins/ramps/pins_DAGOMA_F5.h index e1bd2ec4ed..9760ccbef5 100644 --- a/Marlin/src/pins/ramps/pins_DAGOMA_F5.h +++ b/Marlin/src/pins/ramps/pins_DAGOMA_F5.h @@ -21,6 +21,8 @@ */ #pragma once +// ATmega2560 + #if HOTENDS > 2 || E_STEPPERS > 2 #error "Dagoma3D F5 supports up to 2 hotends / E steppers." #endif diff --git a/Marlin/src/pins/ramps/pins_DUPLICATOR_I3_PLUS.h b/Marlin/src/pins/ramps/pins_DUPLICATOR_I3_PLUS.h index 1a4b83f02d..7e370a398b 100644 --- a/Marlin/src/pins/ramps/pins_DUPLICATOR_I3_PLUS.h +++ b/Marlin/src/pins/ramps/pins_DUPLICATOR_I3_PLUS.h @@ -23,6 +23,7 @@ /** * Wanhao Duplicator i3 Plus pin assignments + * ATmega2560 */ #define REQUIRE_MEGA2560 diff --git a/Marlin/src/pins/ramps/pins_FELIX2.h b/Marlin/src/pins/ramps/pins_FELIX2.h index 3e7849d71f..48ef896e96 100644 --- a/Marlin/src/pins/ramps/pins_FELIX2.h +++ b/Marlin/src/pins/ramps/pins_FELIX2.h @@ -23,6 +23,7 @@ /** * FELIXprinters v2.0/3.0 (RAMPS v1.4) pin assignments + * ATmega2560, ATmega1280 */ #if HOTENDS > 2 || E_STEPPERS > 2 diff --git a/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h b/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h index a6791ff7c8..7bed4c0884 100644 --- a/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h +++ b/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h @@ -23,6 +23,7 @@ /** * Formbot Raptor pin assignments + * ATmega2560 */ #define REQUIRE_MEGA2560 diff --git a/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR2.h b/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR2.h index 4fb10bfd35..f0e86ac4a7 100644 --- a/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR2.h +++ b/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR2.h @@ -23,6 +23,7 @@ /** * Formbot Raptor 2 pin assignments + * ATmega2560 */ #define BOARD_INFO_NAME "Formbot Raptor2" diff --git a/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h b/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h index 17d3abc71f..a5ca7e8607 100644 --- a/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h +++ b/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h @@ -22,7 +22,8 @@ #pragma once /** - * Formbot pin assignments + * Formbot T-Rex 2+ pin assignments + * ATmega2560 */ #define REQUIRE_MEGA2560 diff --git a/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h b/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h index e23a63994f..2fa3d60f67 100644 --- a/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h +++ b/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h @@ -22,7 +22,8 @@ #pragma once /** - * Formbot pin assignments + * Formbot T-Rex 3 pin assignments + * ATmega2560 */ #define REQUIRE_MEGA2560 diff --git a/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h b/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h index b8de260909..9f23647c42 100644 --- a/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h +++ b/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h @@ -23,6 +23,9 @@ // // FYSETC F6 1.3 (and 1.4) pin assignments +// Schematic (1.3): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/FYSETC%20F6%201.3/F6_V13.pdf +// Origin: https://github.com/FYSETC/FYSETC-F6/blob/master/Hardware/V1.3/F6_V13.pdf +// ATmega2560 // #if NOT_TARGET(__AVR_ATmega2560__) diff --git a/Marlin/src/pins/ramps/pins_FYSETC_F6_14.h b/Marlin/src/pins/ramps/pins_FYSETC_F6_14.h index 1fc24154b7..9604d0ecbf 100644 --- a/Marlin/src/pins/ramps/pins_FYSETC_F6_14.h +++ b/Marlin/src/pins/ramps/pins_FYSETC_F6_14.h @@ -23,6 +23,9 @@ // // FYSETC F6 v1.4 pin assignments +// Schematic (1.4): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/FYSETC%20F6%20v1.4/F6%20V1.4%20Sch.pdf +// Origin (1.4): https://github.com/FYSETC/FYSETC-F6/blob/master/Hardware/V1.4/F6%20V1.4%20Sch.pdf +// ATmega2560 // #define BOARD_INFO_NAME "FYSETC F6 1.4" diff --git a/Marlin/src/pins/ramps/pins_K8200.h b/Marlin/src/pins/ramps/pins_K8200.h index 395e1ccca5..d2557b26c3 100644 --- a/Marlin/src/pins/ramps/pins_K8200.h +++ b/Marlin/src/pins/ramps/pins_K8200.h @@ -24,6 +24,9 @@ /** * K8200 Arduino Mega with RAMPS v1.3 pin assignments * Identical to 3DRAG + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/Velleman%20K8200/K8200diagram.jpg + * Origin: https://www.velleman.eu/images/tmp/K8200diagram.jpg + * ATmega2560 */ #define BOARD_INFO_NAME "Velleman K8200" diff --git a/Marlin/src/pins/ramps/pins_K8400.h b/Marlin/src/pins/ramps/pins_K8400.h index 22ac1be8ab..56ec66191b 100644 --- a/Marlin/src/pins/ramps/pins_K8400.h +++ b/Marlin/src/pins/ramps/pins_K8400.h @@ -24,6 +24,9 @@ /** * Velleman K8400 (Vertex) * 3DRAG clone + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/Velleman%20K8400/k8400-schema-electronique.jpg + * Origin: https://filimprimante3d.fr/documents/k8400-schema-electronique.jpg + * ATmega2560, ATmega1280 * * K8400 has some minor differences over a normal 3Drag: * - No X/Y max endstops diff --git a/Marlin/src/pins/ramps/pins_K8600.h b/Marlin/src/pins/ramps/pins_K8600.h index e4468a6098..3081b04361 100644 --- a/Marlin/src/pins/ramps/pins_K8600.h +++ b/Marlin/src/pins/ramps/pins_K8600.h @@ -23,6 +23,7 @@ /** * VERTEX NANO Arduino Mega with RAMPS EFB v1.4 pin assignments. + * ATmega2560, ATmega1280 */ #if HAS_MULTI_HOTEND diff --git a/Marlin/src/pins/ramps/pins_K8800.h b/Marlin/src/pins/ramps/pins_K8800.h index 17bb59fdc9..a9669764ce 100644 --- a/Marlin/src/pins/ramps/pins_K8800.h +++ b/Marlin/src/pins/ramps/pins_K8800.h @@ -23,6 +23,9 @@ /** * Velleman K8800 (Vertex) + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/Velleman%20K8800/K8800-schematic-V1.4.pdf + * Origin: https://www.velleman.eu/downloads/files/vertex-delta/schematics/K8800-schematic-V1.4.pdf + * ATmega2560, ATmega1280 */ #include "env_validate.h" diff --git a/Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h b/Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h index 51f9cd8038..d9759153c3 100644 --- a/Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h +++ b/Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h @@ -23,6 +23,7 @@ /** * Longer3D LK1/LK4/LK5 Pro board pin assignments + * ATmega2560 */ #define REQUIRE_MEGA2560 diff --git a/Marlin/src/pins/ramps/pins_MAKEBOARD_MINI.h b/Marlin/src/pins/ramps/pins_MAKEBOARD_MINI.h index a42dba874f..2ab463d681 100644 --- a/Marlin/src/pins/ramps/pins_MAKEBOARD_MINI.h +++ b/Marlin/src/pins/ramps/pins_MAKEBOARD_MINI.h @@ -21,6 +21,8 @@ */ #pragma once +// ATmega2560 + #define BOARD_INFO_NAME "MAKEboard Mini" // diff --git a/Marlin/src/pins/ramps/pins_MKS_BASE_10.h b/Marlin/src/pins/ramps/pins_MKS_BASE_10.h index 64efa46c05..8d46ac36fa 100644 --- a/Marlin/src/pins/ramps/pins_MKS_BASE_10.h +++ b/Marlin/src/pins/ramps/pins_MKS_BASE_10.h @@ -23,6 +23,12 @@ /** * MKS BASE 1.0 – Arduino Mega2560 with RAMPS v1.4 pin assignments + * Schematics: + * - https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/MKS%20BASE%201.0/PAGE1.pdf + * - https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/MKS%20BASE%201.0/PAGE2.pdf + * - https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/MKS%20BASE%201.0/PAGE3.pdf + * Origin: https://reprap.org/wiki/File:MKS_Base_V1.0_source.zip + * ATmega2560 * * Rev B - Override pin definitions for CASE_LIGHT and M3/M4/M5 spindle control */ diff --git a/Marlin/src/pins/ramps/pins_MKS_BASE_14.h b/Marlin/src/pins/ramps/pins_MKS_BASE_14.h index 7e2a722cf2..d302def795 100644 --- a/Marlin/src/pins/ramps/pins_MKS_BASE_14.h +++ b/Marlin/src/pins/ramps/pins_MKS_BASE_14.h @@ -23,6 +23,7 @@ /** * MKS BASE v1.4 with A4982 stepper drivers and digital micro-stepping + * ATmega2560 */ #if HOTENDS > 2 || E_STEPPERS > 2 diff --git a/Marlin/src/pins/ramps/pins_MKS_BASE_15.h b/Marlin/src/pins/ramps/pins_MKS_BASE_15.h index 5fedd3f97c..1d93ec5cf9 100644 --- a/Marlin/src/pins/ramps/pins_MKS_BASE_15.h +++ b/Marlin/src/pins/ramps/pins_MKS_BASE_15.h @@ -23,6 +23,7 @@ /** * MKS BASE v1.5 with A4982 stepper drivers and digital micro-stepping + * ATmega2560 */ #if HOTENDS > 2 || E_STEPPERS > 2 diff --git a/Marlin/src/pins/ramps/pins_MKS_BASE_16.h b/Marlin/src/pins/ramps/pins_MKS_BASE_16.h index 63e0b51d3c..765a601fd0 100644 --- a/Marlin/src/pins/ramps/pins_MKS_BASE_16.h +++ b/Marlin/src/pins/ramps/pins_MKS_BASE_16.h @@ -23,6 +23,9 @@ /** * MKS BASE v1.6 with A4982 stepper drivers and digital micro-stepping + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/MKS%20BASE%201.6/MKS%20Base%20V1.6_004%20SCH.pdf + * Origin: https://github.com/makerbase-mks/MKS-BASE/blob/master/hardware/MKS%20Base%20V1.6_004/MKS%20Base%20V1.6_004%20SCH.pdf + * ATmega2560 */ #if HOTENDS > 2 || E_STEPPERS > 2 diff --git a/Marlin/src/pins/ramps/pins_MKS_BASE_HEROIC.h b/Marlin/src/pins/ramps/pins_MKS_BASE_HEROIC.h index 973f924e7c..c50f28a407 100644 --- a/Marlin/src/pins/ramps/pins_MKS_BASE_HEROIC.h +++ b/Marlin/src/pins/ramps/pins_MKS_BASE_HEROIC.h @@ -23,6 +23,7 @@ /** * MKS BASE with Heroic HR4982 stepper drivers + * ATmega2560 */ #include "pins_MKS_BASE_15.h" // ... MKS_BASE_common ... RAMPS diff --git a/Marlin/src/pins/ramps/pins_MKS_BASE_common.h b/Marlin/src/pins/ramps/pins_MKS_BASE_common.h index 9047a4bcf0..7608745a4b 100644 --- a/Marlin/src/pins/ramps/pins_MKS_BASE_common.h +++ b/Marlin/src/pins/ramps/pins_MKS_BASE_common.h @@ -23,6 +23,7 @@ /** * MKS BASE – Arduino Mega2560 with RAMPS pin assignments + * ATmega2560 */ #ifndef BOARD_INFO_NAME diff --git a/Marlin/src/pins/ramps/pins_MKS_GEN_13.h b/Marlin/src/pins/ramps/pins_MKS_GEN_13.h index 1e354a10dc..5c13288f85 100644 --- a/Marlin/src/pins/ramps/pins_MKS_GEN_13.h +++ b/Marlin/src/pins/ramps/pins_MKS_GEN_13.h @@ -23,6 +23,9 @@ /** * Arduino Mega with RAMPS v1.4 adjusted pin assignments + * Schematic (1.4): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/MKS%20GEN%20v1.4/MKS%20GEN%20V1.4_004%20SCH.pdf + * Origin (1.4): https://github.com/makerbase-mks/MKS-GEN/blob/master/hardware/MKS%20GEN%20V1.4_004/MKS%20GEN%20V1.4_004%20SCH.pdf + * ATmega2560, ATmega1280 * * MKS GEN v1.3 (Extruder, Fan, Bed) * MKS GEN v1.3 (Extruder, Extruder, Fan, Bed) diff --git a/Marlin/src/pins/ramps/pins_MKS_GEN_L.h b/Marlin/src/pins/ramps/pins_MKS_GEN_L.h index dd7f8e5f86..c610fc6206 100644 --- a/Marlin/src/pins/ramps/pins_MKS_GEN_L.h +++ b/Marlin/src/pins/ramps/pins_MKS_GEN_L.h @@ -23,6 +23,9 @@ /** * MKS GEN L – Arduino Mega2560 with RAMPS v1.4 pin assignments + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/MKS%20GEN%20L%20v1.0/MKS%20Gen_L%20V1.0_008%20SCH.pdf + * Origin: https://github.com/makerbase-mks/MKS-GEN_L/blob/master/hardware/MKS%20Gen_L%20V1.0_008/MKS%20Gen_L%20V1.0_008%20SCH.pdf + * ATmega2560, ATmega1280 */ #if HOTENDS > 2 || E_STEPPERS > 2 diff --git a/Marlin/src/pins/ramps/pins_MKS_GEN_L_V2.h b/Marlin/src/pins/ramps/pins_MKS_GEN_L_V2.h index 0378b166a2..d82c4353fd 100644 --- a/Marlin/src/pins/ramps/pins_MKS_GEN_L_V2.h +++ b/Marlin/src/pins/ramps/pins_MKS_GEN_L_V2.h @@ -23,6 +23,9 @@ /** * MKS GEN L V2 – Arduino Mega2560 with RAMPS v1.4 pin assignments + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/MKS%20GEN%20L%20V2.0/MKS%20Gen_L%20V2.0_001%20SCH.pdf + * Origin: https://github.com/makerbase-mks/MKS-GEN_L/blob/master/hardware/MKS%20Gen_L%20V2.0_001/MKS%20Gen_L%20V2.0_001%20SCH.pdf + * ATmega2560 */ #if HOTENDS > 2 || E_STEPPERS > 2 diff --git a/Marlin/src/pins/ramps/pins_MKS_GEN_L_V21.h b/Marlin/src/pins/ramps/pins_MKS_GEN_L_V21.h index d508cb453f..c2ab34c825 100644 --- a/Marlin/src/pins/ramps/pins_MKS_GEN_L_V21.h +++ b/Marlin/src/pins/ramps/pins_MKS_GEN_L_V21.h @@ -23,6 +23,9 @@ /** * MKS GEN L V2 – Arduino Mega2560 with RAMPS v1.4 pin assignments + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/MKS%20GEN%20L%20V2.1/MKS%20GEN_L%20V2.1_001%20SCH.pdf + * Origin: https://github.com/makerbase-mks/MKS-GEN_L/blob/master/hardware/MKS%20Gen_L%20V2.1_001/MKS%20GEN_L%20V2.1_001%20SCH.pdf + * ATmega2560 */ #if HOTENDS > 2 || E_STEPPERS > 2 diff --git a/Marlin/src/pins/ramps/pins_ORTUR_4.h b/Marlin/src/pins/ramps/pins_ORTUR_4.h index e47bae1915..7f0fe93084 100644 --- a/Marlin/src/pins/ramps/pins_ORTUR_4.h +++ b/Marlin/src/pins/ramps/pins_ORTUR_4.h @@ -23,6 +23,7 @@ /** * Ortur 4 Arduino Mega based on RAMPS v1.4 pin assignments + * ATmega2560 */ #define BOARD_INFO_NAME "Ortur 4.3" diff --git a/Marlin/src/pins/ramps/pins_PXMALION_CORE_I3.h b/Marlin/src/pins/ramps/pins_PXMALION_CORE_I3.h index 12c40c7dca..ee0633992e 100644 --- a/Marlin/src/pins/ramps/pins_PXMALION_CORE_I3.h +++ b/Marlin/src/pins/ramps/pins_PXMALION_CORE_I3.h @@ -22,6 +22,7 @@ /** * Pxmalion Core i3 - https://github.com/Pxmalion + * ATmega2560 */ #include "env_validate.h" diff --git a/Marlin/src/pins/ramps/pins_RAMPS.h b/Marlin/src/pins/ramps/pins_RAMPS.h index 43780d8d27..08d6475c5e 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS.h +++ b/Marlin/src/pins/ramps/pins_RAMPS.h @@ -23,6 +23,7 @@ /** * Arduino Mega with RAMPS v1.4 (or v1.3) pin assignments + * ATmega2560, ATmega1280 * * Applies to the following boards: * diff --git a/Marlin/src/pins/ramps/pins_RAMPS_13.h b/Marlin/src/pins/ramps/pins_RAMPS_13.h index 6e7c8cbab5..026492e4a8 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS_13.h +++ b/Marlin/src/pins/ramps/pins_RAMPS_13.h @@ -23,6 +23,7 @@ /** * Arduino Mega with RAMPS v1.3 pin assignments + * ATmega2560, ATmega1280 * * Applies to the following boards: * diff --git a/Marlin/src/pins/ramps/pins_RAMPS_CREALITY.h b/Marlin/src/pins/ramps/pins_RAMPS_CREALITY.h index 3d5f5d6f91..5e4366e259 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS_CREALITY.h +++ b/Marlin/src/pins/ramps/pins_RAMPS_CREALITY.h @@ -21,6 +21,8 @@ */ #pragma once +// ATmega2560 + #if HOTENDS > 2 || E_STEPPERS > 2 #error "Creality RAMPS supports up to 2 hotends / E steppers." #endif diff --git a/Marlin/src/pins/ramps/pins_RAMPS_ENDER_4.h b/Marlin/src/pins/ramps/pins_RAMPS_ENDER_4.h index 8f9148b732..3ffa940c48 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS_ENDER_4.h +++ b/Marlin/src/pins/ramps/pins_RAMPS_ENDER_4.h @@ -21,6 +21,8 @@ */ #pragma once +// ATmega2560 + #if HAS_MULTI_HOTEND || E_STEPPERS > 1 #error "Ender-4 only supports 1 hotend / E stepper." #endif diff --git a/Marlin/src/pins/ramps/pins_RAMPS_OLD.h b/Marlin/src/pins/ramps/pins_RAMPS_OLD.h index 9747666235..526045c155 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS_OLD.h +++ b/Marlin/src/pins/ramps/pins_RAMPS_OLD.h @@ -23,6 +23,7 @@ /** * Arduino Mega with RAMPS v1.0, v1.1, v1.2 pin assignments + * ATmega2560, ATmega1280 */ #include "env_validate.h" diff --git a/Marlin/src/pins/ramps/pins_RAMPS_PLUS.h b/Marlin/src/pins/ramps/pins_RAMPS_PLUS.h index 8ccb14c866..f93c6919d9 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS_PLUS.h +++ b/Marlin/src/pins/ramps/pins_RAMPS_PLUS.h @@ -23,6 +23,7 @@ /** * Arduino Mega with RAMPS v1.4Plus, also known as 3DYMY version, pin assignments + * ATmega2560, ATmega1280 * * Applies to the following boards: * diff --git a/Marlin/src/pins/ramps/pins_RAMPS_S_12.h b/Marlin/src/pins/ramps/pins_RAMPS_S_12.h index 8d6a1d337e..e74480a0d4 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS_S_12.h +++ b/Marlin/src/pins/ramps/pins_RAMPS_S_12.h @@ -24,6 +24,7 @@ /** * Arduino Mega with RAMPS-S v1.2 by Sakul.cz pin assignments * Written by Michal Rábek + * ATmega2560 * * Applies to the following boards: * diff --git a/Marlin/src/pins/ramps/pins_RIGIDBOARD.h b/Marlin/src/pins/ramps/pins_RIGIDBOARD.h index 273e0274a8..d1824d3813 100644 --- a/Marlin/src/pins/ramps/pins_RIGIDBOARD.h +++ b/Marlin/src/pins/ramps/pins_RIGIDBOARD.h @@ -23,6 +23,7 @@ /** * RIGIDBOARD Arduino Mega with RAMPS v1.4 pin assignments + * ATmega2560, ATmega1280 */ #ifndef BOARD_INFO_NAME diff --git a/Marlin/src/pins/ramps/pins_RIGIDBOARD_V2.h b/Marlin/src/pins/ramps/pins_RIGIDBOARD_V2.h index 8242f1a772..dc27378a15 100644 --- a/Marlin/src/pins/ramps/pins_RIGIDBOARD_V2.h +++ b/Marlin/src/pins/ramps/pins_RIGIDBOARD_V2.h @@ -23,6 +23,7 @@ /** * RIGIDBOARD V2 Arduino Mega with RAMPS v1.4 pin assignments + * ATmega2560, ATmega1280 */ #define BOARD_INFO_NAME "RigidBoard V2" diff --git a/Marlin/src/pins/ramps/pins_RL200.h b/Marlin/src/pins/ramps/pins_RL200.h index 00fb39a439..219a3a525d 100644 --- a/Marlin/src/pins/ramps/pins_RL200.h +++ b/Marlin/src/pins/ramps/pins_RL200.h @@ -24,6 +24,7 @@ /** * Rapide Lite 200 v1 (RUMBA clone) pin assignments. Has slightly different assignment for * extruder motors due to dual Z motors. Pinout therefore based on pins_RUMBA.h. + * ATmega2560 */ #define BOARD_INFO_NAME "RL200" diff --git a/Marlin/src/pins/ramps/pins_RUMBA.h b/Marlin/src/pins/ramps/pins_RUMBA.h index eb049c48dd..6b1f4c5691 100644 --- a/Marlin/src/pins/ramps/pins_RUMBA.h +++ b/Marlin/src/pins/ramps/pins_RUMBA.h @@ -23,6 +23,9 @@ /** * RUMBA pin assignments + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/RUMBA/RRD-RUMBA_SCHEMATICS.png + * Origin: https://reprap.org/wiki/File:RRD-RUMBA_SCHEMATICS.png + * ATmega2560 */ #define REQUIRE_MEGA2560 diff --git a/Marlin/src/pins/ramps/pins_RUMBA_RAISE3D.h b/Marlin/src/pins/ramps/pins_RUMBA_RAISE3D.h index 39942613ff..57ee32ab29 100644 --- a/Marlin/src/pins/ramps/pins_RUMBA_RAISE3D.h +++ b/Marlin/src/pins/ramps/pins_RUMBA_RAISE3D.h @@ -21,6 +21,8 @@ */ #pragma once +// ATmega2560 + #define BOARD_INFO_NAME "Raise3D Rumba" #define DEFAULT_MACHINE_NAME "Raise3D N Series" diff --git a/Marlin/src/pins/ramps/pins_SAINSMART_2IN1.h b/Marlin/src/pins/ramps/pins_SAINSMART_2IN1.h index d25029a7a3..6354cc7618 100644 --- a/Marlin/src/pins/ramps/pins_SAINSMART_2IN1.h +++ b/Marlin/src/pins/ramps/pins_SAINSMART_2IN1.h @@ -23,13 +23,14 @@ /** * Sainsmart 2-in-1 pin assignments + * ATmega2560, ATmega1280 */ #if HOTENDS > 2 || E_STEPPERS > 2 #error "Sainsmart 2-in-1 supports up to 2 hotends / E steppers." #endif -#define BOARD_INFO_NAME "Sainsmart" +#define BOARD_INFO_NAME "Sainsmart 2-in-1" // // Heaters / Fans diff --git a/Marlin/src/pins/ramps/pins_TANGO.h b/Marlin/src/pins/ramps/pins_TANGO.h index 451d2f874d..936751e9eb 100644 --- a/Marlin/src/pins/ramps/pins_TANGO.h +++ b/Marlin/src/pins/ramps/pins_TANGO.h @@ -23,6 +23,9 @@ /** * BIQU Tango pin assignments + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/BIQU%20Tango/schematic.png + * Origin: https://github.com/bigtreetech/Tango-3D-Printer-Motherboard/blob/master/Schematic/Tango%20V1.0.SchDoc + * ATmega2560 */ #define BOARD_INFO_NAME "Tango" diff --git a/Marlin/src/pins/ramps/pins_TENLOG_D3_HERO.h b/Marlin/src/pins/ramps/pins_TENLOG_D3_HERO.h index b11487b21d..dd6fb2fa70 100644 --- a/Marlin/src/pins/ramps/pins_TENLOG_D3_HERO.h +++ b/Marlin/src/pins/ramps/pins_TENLOG_D3_HERO.h @@ -22,7 +22,8 @@ #pragma once /** - * Tenlog pin assignments + * Tenlog D3 Hero pin assignments + * ATmega2560 */ #define REQUIRE_MEGA2560 diff --git a/Marlin/src/pins/ramps/pins_TENLOG_MB1_V23.h b/Marlin/src/pins/ramps/pins_TENLOG_MB1_V23.h index b3f7d5f216..780ab8daa4 100644 --- a/Marlin/src/pins/ramps/pins_TENLOG_MB1_V23.h +++ b/Marlin/src/pins/ramps/pins_TENLOG_MB1_V23.h @@ -22,7 +22,8 @@ #pragma once /** - * Tenlog pin assignments + * Tenlog MB1 V2.3 pin assignments + * ATmega2560 */ #define REQUIRE_MEGA2560 diff --git a/Marlin/src/pins/ramps/pins_TRIGORILLA_13.h b/Marlin/src/pins/ramps/pins_TRIGORILLA_13.h index 6e51a8e974..83dac111cb 100644 --- a/Marlin/src/pins/ramps/pins_TRIGORILLA_13.h +++ b/Marlin/src/pins/ramps/pins_TRIGORILLA_13.h @@ -23,6 +23,7 @@ /** * Arduino Mega with RAMPS v1.3 for Anycubic + * ATmega2560 */ #define BOARD_INFO_NAME "Anycubic RAMPS 1.3" diff --git a/Marlin/src/pins/ramps/pins_TRIGORILLA_14.h b/Marlin/src/pins/ramps/pins_TRIGORILLA_14.h index 96c3fced4c..f9856e04f5 100644 --- a/Marlin/src/pins/ramps/pins_TRIGORILLA_14.h +++ b/Marlin/src/pins/ramps/pins_TRIGORILLA_14.h @@ -23,6 +23,7 @@ /** * Arduino Mega with RAMPS v1.4 for Anycubic + * ATmega2560 */ #define BOARD_INFO_NAME "Anycubic RAMPS 1.4" diff --git a/Marlin/src/pins/ramps/pins_TRONXY_V3_1_0.h b/Marlin/src/pins/ramps/pins_TRONXY_V3_1_0.h index 04c6af67b0..0104dadf7f 100644 --- a/Marlin/src/pins/ramps/pins_TRONXY_V3_1_0.h +++ b/Marlin/src/pins/ramps/pins_TRONXY_V3_1_0.h @@ -23,6 +23,7 @@ /** * Arduino Mega for Tronxy X5S-2E, etc. + * ATmega2560 */ #define REQUIRE_MEGA2560 diff --git a/Marlin/src/pins/ramps/pins_TT_OSCAR.h b/Marlin/src/pins/ramps/pins_TT_OSCAR.h index ecc708b395..c0247c7b47 100644 --- a/Marlin/src/pins/ramps/pins_TT_OSCAR.h +++ b/Marlin/src/pins/ramps/pins_TT_OSCAR.h @@ -21,10 +21,12 @@ */ #pragma once +// ATmega2560 + #include "env_validate.h" #if HOTENDS > 5 || E_STEPPERS > 5 - #error "TTOSCAR supports up to 5 hotends / E steppers." + #error "TT OSCAR supports up to 5 hotends / E steppers." #endif #define BOARD_INFO_NAME "TT OSCAR" diff --git a/Marlin/src/pins/ramps/pins_ULTIMAIN_2.h b/Marlin/src/pins/ramps/pins_ULTIMAIN_2.h index 0b15cd35ad..4ee0a6950d 100644 --- a/Marlin/src/pins/ramps/pins_ULTIMAIN_2.h +++ b/Marlin/src/pins/ramps/pins_ULTIMAIN_2.h @@ -23,6 +23,25 @@ /** * Ultiboard v2.0 pin assignments + * Schematics (2.1.4): + * - https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/Ultimaker%202.1.4/schema1.png + * - https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/Ultimaker%202.1.4/schema2.png + * - https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/Ultimaker%202.1.4/schema3.png + * - https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/Ultimaker%202.1.4/schema4.png + * - https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/Ultimaker%202.1.4/schema5.png + * Origins (2.1.4): + * - https://github.com/Ultimaker/Ultimaker2/blob/master/1546%20ultimainboard%20V2.1.4/schema1.SchDoc + * - https://github.com/Ultimaker/Ultimaker2/blob/master/1546%20ultimainboard%20V2.1.4/schema2.SchDoc + * - https://github.com/Ultimaker/Ultimaker2/blob/master/1546%20ultimainboard%20V2.1.4/schema3.SchDoc + * - https://github.com/Ultimaker/Ultimaker2/blob/master/1546%20ultimainboard%20V2.1.4/schema4.SchDoc + * - https://github.com/Ultimaker/Ultimaker2/blob/master/1546%20ultimainboard%20V2.1.4/schema5.SchDoc + * Schematics (Original+): + * - https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/Ultimaker%20Original+/Ultimainboard%20rev.%202.1.1%20altium/schema1.png + * - https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/Ultimaker%20Original+/Ultimainboard%20rev.%202.1.1%20altium/schema2.png + * - https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/Ultimaker%20Original+/Ultimainboard%20rev.%202.1.1%20altium/schema3.png + * - https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/Ultimaker%20Original+/Ultimainboard%20rev.%202.1.1%20altium/schema4.png + * Origin (Original+): https://github.com/Ultimaker/Ultimaker-Original-Plus/blob/master/1091_Main_board_v2.1.1_(x1)/Ultimainboard%20rev.%202.1.1%20altium.zip + * ATmega2560 */ /** diff --git a/Marlin/src/pins/ramps/pins_ULTIMAKER.h b/Marlin/src/pins/ramps/pins_ULTIMAKER.h index 0bc04d962a..e3e91428df 100644 --- a/Marlin/src/pins/ramps/pins_ULTIMAKER.h +++ b/Marlin/src/pins/ramps/pins_ULTIMAKER.h @@ -23,6 +23,7 @@ /** * Ultimaker pin assignments + * ATmega2560, ATmega1280 */ /** diff --git a/Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h b/Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h index 146c519ff9..25cc278ada 100644 --- a/Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h +++ b/Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h @@ -23,6 +23,9 @@ /** * Ultimaker pin assignments (Old electronics) + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/Ultimaker%201.0/ultipanel%20rev1.1.sch.pdf + * Origin: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/Ultimaker%201.0/ultipanel%20rev1.1.sch.pdf + * ATmega2560, ATmega1280 */ /** diff --git a/Marlin/src/pins/ramps/pins_VORON.h b/Marlin/src/pins/ramps/pins_VORON.h index 9390381010..f56b0cb8fc 100644 --- a/Marlin/src/pins/ramps/pins_VORON.h +++ b/Marlin/src/pins/ramps/pins_VORON.h @@ -24,6 +24,7 @@ /** * VORON Design v2 pin assignments * See https://github.com/mzbotreprap/VORON/blob/master/Firmware/Marlin/pins_RAMPS_VORON.h + * ATmega2560 */ #define BOARD_INFO_NAME "VORON Design v2" diff --git a/Marlin/src/pins/ramps/pins_ZRIB_V20.h b/Marlin/src/pins/ramps/pins_ZRIB_V20.h index 3e236e36ba..127fffa794 100644 --- a/Marlin/src/pins/ramps/pins_ZRIB_V20.h +++ b/Marlin/src/pins/ramps/pins_ZRIB_V20.h @@ -22,8 +22,13 @@ #pragma once /** - * ZRIB V2.0 & V3.0 pin assignments + * ZONESTAR ZRIB V2.0 & V3.0 pin assignments * V2 and V3 Boards only differ in USB controller, nothing affecting the pins. + * Schematic (2.0): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/ZONESTAR%20ZRIB%20V2.0/ZRIB_V2_Schematic.pdf + * Origin (2.0): https://github.com/ZONESTAR3D/Control-Board/blob/main/8bit/ZRIB/ZRIB_V2/ZRIB_V2_Schematic.pdf + * Schematic (3.0): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/ZONESTAR%20ZRIB%20V3.0/ZRIB_V3_Schematic.pdf + * Origin (3.0): https://github.com/ZONESTAR3D/Control-Board/blob/main/8bit/ZRIB/ZRIB_V3/ZRIB_V3_Schematic.pdf + * ATmega2560, ATmega1280 */ #ifndef FILWIDTH_PIN diff --git a/Marlin/src/pins/ramps/pins_ZRIB_V52.h b/Marlin/src/pins/ramps/pins_ZRIB_V52.h index 44e0beaa9f..34eee07c95 100644 --- a/Marlin/src/pins/ramps/pins_ZRIB_V52.h +++ b/Marlin/src/pins/ramps/pins_ZRIB_V52.h @@ -22,7 +22,10 @@ #pragma once /** - * ZRIB V5.2 Based on MKS BASE v1.4 with A4982 stepper drivers and digital micro-stepping + * ZONESTAR ZRIB V5.2 Based on MKS BASE v1.4 with A4982 stepper drivers and digital micro-stepping + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/ZONESTAR%20ZRIB%20V5.2/ZRIB_V52_Schematic.pdf + * Origin: https://github.com/ZONESTAR3D/Control-Board/blob/main/8bit/ZRIB/ZRIB_V5/ZRIB_V52_Schematic.pdf + * ATmega2560, ATmega1280 */ #if HOTENDS > 2 || E_STEPPERS > 2 diff --git a/Marlin/src/pins/ramps/pins_ZRIB_V53.h b/Marlin/src/pins/ramps/pins_ZRIB_V53.h index 7a5cf14791..050516791e 100644 --- a/Marlin/src/pins/ramps/pins_ZRIB_V53.h +++ b/Marlin/src/pins/ramps/pins_ZRIB_V53.h @@ -22,7 +22,8 @@ #pragma once /** - * ZRIB V5.3 Based on MKS BASE v1.4 with A4982 stepper drivers and digital micro-stepping + * ZONESTAR ZRIB V5.3 Based on MKS BASE v1.4 with A4982 stepper drivers and digital micro-stepping + * ATmega2560, ATmega1280 */ #include "env_validate.h" diff --git a/Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h b/Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h index ad7b859a0c..1c67903a21 100644 --- a/Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h +++ b/Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h @@ -23,6 +23,7 @@ /** * Z-Bolt X Series board – based on Arduino Mega2560 + * ATmega2560 */ #define REQUIRE_MEGA2560 diff --git a/Marlin/src/pins/sanguino/pins_ANET_10.h b/Marlin/src/pins/sanguino/pins_ANET_10.h index bd69e167dc..f6816bfb95 100644 --- a/Marlin/src/pins/sanguino/pins_ANET_10.h +++ b/Marlin/src/pins/sanguino/pins_ANET_10.h @@ -23,6 +23,8 @@ /** * Anet V1.0 board pin assignments + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Anet%20V1.0/ANET3D_Board_Schematic.pdf + * Origin: https://github.com/ralf-e/ANET-3D-Board-V1.0/blob/master/ANET3D_Board_Schematic.pdf */ /** diff --git a/Marlin/src/pins/sanguino/pins_AZTEEG_X1.h b/Marlin/src/pins/sanguino/pins_AZTEEG_X1.h index 4c721da000..76d53c6021 100644 --- a/Marlin/src/pins/sanguino/pins_AZTEEG_X1.h +++ b/Marlin/src/pins/sanguino/pins_AZTEEG_X1.h @@ -23,6 +23,8 @@ /** * Azteeg X1 pin assignments + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Azteeg%20X1/Azteeg_X1_schematics.pdf + * Origin: https://reprap.org/mediawiki/images/0/07/Azteeg_X1_schematics.pdf */ #define BOARD_INFO_NAME "Azteeg X1" diff --git a/Marlin/src/pins/sanguino/pins_GEN3_MONOLITHIC.h b/Marlin/src/pins/sanguino/pins_GEN3_MONOLITHIC.h index 1343739a11..a5afc30187 100644 --- a/Marlin/src/pins/sanguino/pins_GEN3_MONOLITHIC.h +++ b/Marlin/src/pins/sanguino/pins_GEN3_MONOLITHIC.h @@ -23,6 +23,7 @@ /** * Gen3 Monolithic Electronics pin assignments + * https://reprap.org/wiki/Generation_3_Electronics */ /** diff --git a/Marlin/src/pins/sanguino/pins_GEN6.h b/Marlin/src/pins/sanguino/pins_GEN6.h index 51e8200b95..75138845f4 100644 --- a/Marlin/src/pins/sanguino/pins_GEN6.h +++ b/Marlin/src/pins/sanguino/pins_GEN6.h @@ -23,6 +23,8 @@ /** * Gen6 pin assignments + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Gen6/GEN6_Mendel_Circuit.pdf + * Origin: https://reprap.org/mediawiki/images/0/0f/GEN6_Mendel_Circuit.pdf */ /** diff --git a/Marlin/src/pins/sanguino/pins_GEN7_12.h b/Marlin/src/pins/sanguino/pins_GEN7_12.h index 0834da78c4..ade59fd807 100644 --- a/Marlin/src/pins/sanguino/pins_GEN7_12.h +++ b/Marlin/src/pins/sanguino/pins_GEN7_12.h @@ -23,6 +23,14 @@ /** * Gen7 v1.1, v1.2, v1.3 pin assignments + * Schematic (1.1): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Gen7%20v1.1/Gen7Board%20Schematic.pdf + * Origin (1.1): https://github.com/Traumflug/Generation_7_Electronics/blob/release-1.1/release%20documents/Gen7Board%20Schematic.pdf + * Schematic (1.2): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Gen7%20v1.2/Gen7Board%20Schematic.pdf + * Origin (1.2): https://github.com/Traumflug/Generation_7_Electronics/blob/release-1.2/release%20documents/Gen7Board%20Schematic.pdf + * Schematic (1.3): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Gen7%20v1.3/Gen7Board%20Schematic.pdf + * Origin (1.3): https://github.com/Traumflug/Generation_7_Electronics/blob/release-1.3/release%20documents/Gen7Board%20Schematic.pdf + * Schematic (1.3.1): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Gen7%20v1.3.1/Gen7Board%20Schematic.pdf + * Origin (1.3.1): https://github.com/Traumflug/Generation_7_Electronics/blob/release-1.3.1/release%20documents/Gen7Board%20Schematic.pdf */ /** @@ -54,7 +62,7 @@ #include "env_validate.h" #ifndef BOARD_INFO_NAME - #define BOARD_INFO_NAME "Gen7 v1.1 / 1.2" + #define BOARD_INFO_NAME "Gen7 v1.1 - v1.3" #endif #ifndef GEN7_VERSION diff --git a/Marlin/src/pins/sanguino/pins_GEN7_14.h b/Marlin/src/pins/sanguino/pins_GEN7_14.h index 97bfdd28a7..698bd06606 100644 --- a/Marlin/src/pins/sanguino/pins_GEN7_14.h +++ b/Marlin/src/pins/sanguino/pins_GEN7_14.h @@ -23,6 +23,10 @@ /** * Gen7 v1.4 pin assignments + * Schematic (1.4): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Gen7%20v1.4/Gen7Board%201.4%20Schematic.pdf + * Origin (1.4): https://github.com/Traumflug/Generation_7_Electronics/blob/Gen7Board-1.4/release%20documents/Gen7Board%201.4%20Schematic.pdf + * Schematic (1.4.1): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Gen7%20v1.4.1/Gen7Board%201.4.1%20Schematic.pdf + * Origin (1.4.1): https://github.com/Traumflug/Generation_7_Electronics/blob/Gen7Board-1.4.1/release%20documents/Gen7Board%201.4.1%20Schematic.pdf */ /** diff --git a/Marlin/src/pins/sanguino/pins_MELZI.h b/Marlin/src/pins/sanguino/pins_MELZI.h index d6f9288e8c..be1b7934c8 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI.h +++ b/Marlin/src/pins/sanguino/pins_MELZI.h @@ -23,6 +23,8 @@ /** * Melzi pin assignments + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Melzi/schematic.pdf + * Origin: https://github.com/mosfet/melzi/blob/master/melzi.sch */ #ifndef BOARD_INFO_NAME diff --git a/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h b/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h index acaf06ed9d..a61692c9f1 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h +++ b/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h @@ -23,6 +23,9 @@ /** * Melzi (Creality) pin assignments + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Melzi%20(Creality)/CR-10%20Schematic.pdf + * Origin: https://github.com/Creality3DPrinting/CR10-Melzi-1.1.2/blob/master/Circuit%20diagram/Motherboard/CR-10%20Schematic.pdf + * ATmega1284P * * The Creality board needs a bootloader installed before Marlin can be uploaded. * If you don't have a chip programmer you can use a spare Arduino plus a few diff --git a/Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h b/Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h index d6f36cc6f5..00c9db6f81 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h +++ b/Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h @@ -23,6 +23,7 @@ /** * Melzi (Malyan M150) pin assignments + * ATmega644P, ATmega1284P */ #define BOARD_INFO_NAME "Melzi (Malyan)" diff --git a/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h b/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h index aecad10dab..da010ab1a6 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h +++ b/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h @@ -23,6 +23,7 @@ /** * Melzi pin assignments + * ATmega644P, ATmega1284P */ #define BOARD_INFO_NAME "Melzi (Tronxy)" diff --git a/Marlin/src/pins/sanguino/pins_MELZI_V2.h b/Marlin/src/pins/sanguino/pins_MELZI_V2.h index e49eb57b11..2cd949e095 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI_V2.h +++ b/Marlin/src/pins/sanguino/pins_MELZI_V2.h @@ -23,6 +23,8 @@ /** * Melzi V2.0 as found at https://www.reprap.org/wiki/Melzi + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Melzi%20V2/Melzi-circuit.png + * Origin: https://www.reprap.org/mediawiki/images/7/7d/Melzi-circuit.png */ #define BOARD_INFO_NAME "Melzi V2" diff --git a/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h b/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h index 6444e2e040..a8475fb326 100644 --- a/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h +++ b/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h @@ -23,6 +23,16 @@ /** * Sanguinololu board pin assignments + * Schematic (0.1): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Sanguinololu%20v0.1/schematic.png + * Origin (0.1): https://github.com/mosfet/Sanguinololu/blob/master/rev0.1/sanguinololu.sch + * Schematic (0.6): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Sanguinololu%20v0.6/schematic.jpg + * Origin (0.6): https://github.com/mosfet/Sanguinololu/blob/master/rev0.6/images/schematic.jpg + * Schematic (0.7): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Sanguinololu%20v0.7/schematic.jpg + * Origin (0.7): https://github.com/mosfet/Sanguinololu/blob/master/rev0.7/images/schematic.jpg + * Schematic (1.0): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Sanguinololu%20v1.0/Sanguinololu-schematic.jpg + * Origin (1.0): https://reprap.org/wiki/File:Sanguinololu-schematic.jpg + * Schematic (1.1): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Sanguinololu%20v1.1/schematic.png + * Origin (1.1): https://github.com/mosfet/Sanguinololu/blob/master/rev1.1/sanguinololu.sch */ /** diff --git a/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_12.h b/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_12.h index ec7621e28f..2209569261 100644 --- a/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_12.h +++ b/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_12.h @@ -23,6 +23,12 @@ /** * Sanguinololu V1.2 pin assignments + * Schematic (1.2): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Sanguinololu%20v1.2/schematic.png + * Origin (1.2): https://github.com/mosfet/Sanguinololu/blob/master/rev1.2/sanguinololu.sch + * Schematic (1.3): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Sanguinololu%20v1.3/schematic.png + * Origin (1.3): https://github.com/mosfet/Sanguinololu/blob/master/rev1.3/sanguinololu.sch + * Schematic (1.3a): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Sanguinololu%20v1.3a/schematic.png + * Origin (1.3a): https://github.com/mosfet/Sanguinololu/blob/master/rev1.3a/sanguinololu.sch * * Applies to the following boards: * diff --git a/Marlin/src/pins/sanguino/pins_STB_11.h b/Marlin/src/pins/sanguino/pins_STB_11.h index ad0919e99e..1bda25b3d4 100644 --- a/Marlin/src/pins/sanguino/pins_STB_11.h +++ b/Marlin/src/pins/sanguino/pins_STB_11.h @@ -22,7 +22,8 @@ #pragma once /** - * STB V1.1 pin assignments + * STB Electronics V1.1 pin assignments + * https://www.reprap.org/wiki/STB_Electronics */ #define BOARD_INFO_NAME "STB V1.1" diff --git a/Marlin/src/pins/sanguino/pins_ZMIB_V2.h b/Marlin/src/pins/sanguino/pins_ZMIB_V2.h index aa3ce556d1..bd9230c32a 100644 --- a/Marlin/src/pins/sanguino/pins_ZMIB_V2.h +++ b/Marlin/src/pins/sanguino/pins_ZMIB_V2.h @@ -31,6 +31,8 @@ /** * ZMIB pin assignments + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/ZONESTAR%20ZMIB%20V2/ZMIB_V2_Schmatic.pdf + * Origin: https://github.com/ZONESTAR3D/Control-Board/blob/main/8bit/ZMIB/ZMIB%20V2/ZMIB_V2_Schmatic.pdf * * The ZMIB board needs a bootloader installed before Marlin can be uploaded. * If you don't have a chip programmer you can use a spare Arduino plus a few diff --git a/Marlin/src/pins/teensy2/pins_5DPRINT.h b/Marlin/src/pins/teensy2/pins_5DPRINT.h index 6e1f9c0217..9eb1da36f4 100644 --- a/Marlin/src/pins/teensy2/pins_5DPRINT.h +++ b/Marlin/src/pins/teensy2/pins_5DPRINT.h @@ -64,6 +64,8 @@ /** * 5DPrint D8 Driver board pin assignments + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/5DPrint%20D8/5DPD8_v1.0_OS_schematics.PDF + * Origin: https://bitbucket.org/makible/5dprint-d8-controller-board/src/master/5DPD8_v1.0_OS_schematics.PDF * * https://bitbucket.org/makible/5dprint-d8-controller-board */ diff --git a/Marlin/src/pins/teensy2/pins_BRAINWAVE.h b/Marlin/src/pins/teensy2/pins_BRAINWAVE.h index cdcc249c00..bbda3730ee 100644 --- a/Marlin/src/pins/teensy2/pins_BRAINWAVE.h +++ b/Marlin/src/pins/teensy2/pins_BRAINWAVE.h @@ -23,9 +23,13 @@ /** * Brainwave 1.0 pin assignments (AT90USB646) + * https://www.reprap.org/wiki/Brainwave * * Requires hardware bundle for Arduino: * https://github.com/unrepentantgeek/brainwave-arduino + * + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Brainwave/schematic.pdf + * Origin: https://github.com/unrepentantgeek/Brainwave/blob/master/brainwave/brainwave.sch */ /** diff --git a/Marlin/src/pins/teensy2/pins_BRAINWAVE_PRO.h b/Marlin/src/pins/teensy2/pins_BRAINWAVE_PRO.h index 319130ef96..969ec84558 100644 --- a/Marlin/src/pins/teensy2/pins_BRAINWAVE_PRO.h +++ b/Marlin/src/pins/teensy2/pins_BRAINWAVE_PRO.h @@ -26,6 +26,8 @@ * * Requires hardware bundle for Arduino: * https://github.com/unrepentantgeek/brainwave-arduino + * + * Not to be confused with the regular Brainwave controller (https://www.reprap.org/wiki/Brainwave) */ /** diff --git a/Marlin/src/pins/teensy2/pins_PRINTRBOARD.h b/Marlin/src/pins/teensy2/pins_PRINTRBOARD.h index ddf0d53ea6..1fb7387d16 100644 --- a/Marlin/src/pins/teensy2/pins_PRINTRBOARD.h +++ b/Marlin/src/pins/teensy2/pins_PRINTRBOARD.h @@ -25,6 +25,15 @@ * Rev B 2 JUN 2017 * * Converted to Arduino pin numbering + * + * Schematic (RevA): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Printrboard%20Rev.A/schematic.png + * Origin (RevA): https://raw.githubusercontent.com/lwalkera/printrboard/revA/Printrboard.sch + * Schematic (RevB): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Printrboard%20Rev.B/schematic.png + * Origin (RevB): https://raw.githubusercontent.com/lwalkera/printrboard/revB/Printrboard.sch + * Schematic (RevC): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Printrboard%20Rev.C/schematic.png + * Origin (RevC): https://raw.githubusercontent.com/lwalkera/printrboard/revC/Printrboard.sch + * Schematic (RevD): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Printrboard%20Rev.D/schematic.png + * Origin (RevD): https://raw.githubusercontent.com/lwalkera/printrboard/RevD/Printrboard.sch */ /** diff --git a/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h b/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h index 1867398087..5ce106b485 100644 --- a/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h +++ b/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h @@ -25,6 +25,19 @@ * Rev B 2 JUN 2017 * * Converted to Arduino pin numbering + * + * Schematic (RevF): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Printrboard%20Rev.F/schematic.png + * Origin (RevF): https://github.com/lwalkera/printrboard/raw/revF/Printrboard.sch + * Schematic (RevF2): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Printrboard%20Rev.F2/schematic.png + * Origin (RevF2): https://raw.githubusercontent.com/lwalkera/printrboard/revF2/Printrboard.sch + * Schematic (RevF3): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Printrboard%20Rev.F3/schematic.png + * Origin (RevF3): https://raw.githubusercontent.com/lwalkera/printrboard/revF3/Printrboard.sch + * Schematic (RevF4): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Printrboard%20Rev.F4/schematic.png + * Origin (RevF4): https://raw.githubusercontent.com/lwalkera/printrboard/revF4/Printrboard.sch + * Schematic (RevF5): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Printrboard%20Rev.F5/schematic.png + * Origin (RevF5): https://raw.githubusercontent.com/lwalkera/printrboard/revF5/Printrboard.sch + * Schematic (RevF6): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Printrboard%20Rev.F6/schematic.png + * Origin (RevF6): https://raw.githubusercontent.com/lwalkera/printrboard/revF6/Printrboard.sch */ /** diff --git a/Marlin/src/pins/teensy2/pins_SAV_MKI.h b/Marlin/src/pins/teensy2/pins_SAV_MKI.h index cdba535090..a469bba59b 100644 --- a/Marlin/src/pins/teensy2/pins_SAV_MKI.h +++ b/Marlin/src/pins/teensy2/pins_SAV_MKI.h @@ -25,6 +25,9 @@ * Rev B 2 JUN 2017 * * Converted to Arduino pin numbering + * + * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/SAV%20MkI/SAV_MK-I.pdf + * Origin: https://reprap.org/mediawiki/images/3/3c/SAV_MK-I.pdf */ /** diff --git a/Marlin/src/pins/teensy2/pins_TEENSY2.h b/Marlin/src/pins/teensy2/pins_TEENSY2.h index efb409bf32..b95e9cae48 100644 --- a/Marlin/src/pins/teensy2/pins_TEENSY2.h +++ b/Marlin/src/pins/teensy2/pins_TEENSY2.h @@ -109,6 +109,7 @@ #include "env_validate.h" +// https://reprap.org/wiki/Teensy_Breadboard #define BOARD_INFO_NAME "Teensy++2.0" // diff --git a/Marlin/src/pins/teensy2/pins_TEENSYLU.h b/Marlin/src/pins/teensy2/pins_TEENSYLU.h index ab722478fd..294a289cdb 100644 --- a/Marlin/src/pins/teensy2/pins_TEENSYLU.h +++ b/Marlin/src/pins/teensy2/pins_TEENSYLU.h @@ -24,6 +24,10 @@ * Rev C 2 JUN 2017 * * Converted to Arduino pin numbering + * + * Schematic (1.0): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Teensylu%20v1.0/schematic.png + * Origin (1.0): https://raw.githubusercontent.com/StephS/Teensylu/master/working/Teensylu-1.0.sch + * (*) Other versions are discouraged by creator. */ /** From 50b62975231fe08001c79953c796f9b371da88ad Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 24 Mar 2023 02:42:10 -0500 Subject: [PATCH 068/225] =?UTF-8?q?=F0=9F=8E=A8=20Wrap=20font=20includes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Martin Turski --- Marlin/src/lcd/tft/fontdata/Helvetica/Helvetica_19.cpp | 3 ++- Marlin/src/lcd/tft/fontdata/Helvetica/helvetica_14.cpp | 3 ++- .../tft/fontdata/NotoSans/Medium_14px/NotoSans_Medium_14.cpp | 3 ++- .../fontdata/NotoSans/Medium_14px/NotoSans_Medium_ASCII_14.cpp | 3 ++- .../NotoSans/Medium_14px/NotoSans_Medium_Cyrillic_14.cpp | 3 ++- .../fontdata/NotoSans/Medium_14px/NotoSans_Medium_Greek_14.cpp | 3 ++- .../NotoSans/Medium_14px/NotoSans_Medium_Katakana_14.cpp | 3 ++- .../NotoSans/Medium_14px/NotoSans_Medium_Korean_14.cpp | 3 ++- .../Medium_14px/NotoSans_Medium_Latin_Extended_A_14.cpp | 3 ++- .../Medium_14px/NotoSans_Medium_Simplified_Chinese_14.cpp | 3 ++- .../NotoSans/Medium_14px/NotoSans_Medium_Symbols_14.cpp | 3 ++- .../Medium_14px/NotoSans_Medium_Traditional_Chinese_14.cpp | 3 ++- .../NotoSans/Medium_14px/NotoSans_Medium_Vietnamese_14.cpp | 3 ++- .../tft/fontdata/NotoSans/Medium_16px/NotoSans_Medium_16.cpp | 3 ++- .../fontdata/NotoSans/Medium_16px/NotoSans_Medium_ASCII_16.cpp | 3 ++- .../NotoSans/Medium_16px/NotoSans_Medium_Cyrillic_16.cpp | 3 ++- .../fontdata/NotoSans/Medium_16px/NotoSans_Medium_Greek_16.cpp | 3 ++- .../NotoSans/Medium_16px/NotoSans_Medium_Katakana_16.cpp | 3 ++- .../NotoSans/Medium_16px/NotoSans_Medium_Korean_16.cpp | 3 ++- .../Medium_16px/NotoSans_Medium_Latin_Extended_A_16.cpp | 3 ++- .../Medium_16px/NotoSans_Medium_Simplified_Chinese_16.cpp | 3 ++- .../NotoSans/Medium_16px/NotoSans_Medium_Symbols_16.cpp | 3 ++- .../Medium_16px/NotoSans_Medium_Traditional_Chinese_16.cpp | 3 ++- .../NotoSans/Medium_16px/NotoSans_Medium_Vietnamese_16.cpp | 3 ++- .../tft/fontdata/NotoSans/Medium_19px/NotoSans_Medium_19.cpp | 3 ++- .../fontdata/NotoSans/Medium_19px/NotoSans_Medium_ASCII_19.cpp | 3 ++- .../NotoSans/Medium_19px/NotoSans_Medium_Cyrillic_19.cpp | 3 ++- .../fontdata/NotoSans/Medium_19px/NotoSans_Medium_Greek_19.cpp | 3 ++- .../NotoSans/Medium_19px/NotoSans_Medium_Katakana_19.cpp | 3 ++- .../NotoSans/Medium_19px/NotoSans_Medium_Korean_19.cpp | 3 ++- .../Medium_19px/NotoSans_Medium_Latin_Extended_A_19.cpp | 3 ++- .../Medium_19px/NotoSans_Medium_Simplified_Chinese_19.cpp | 3 ++- .../NotoSans/Medium_19px/NotoSans_Medium_Symbols_19.cpp | 3 ++- .../Medium_19px/NotoSans_Medium_Traditional_Chinese_19.cpp | 3 ++- .../NotoSans/Medium_19px/NotoSans_Medium_Vietnamese_19.cpp | 3 ++- Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_10.cpp | 3 ++- Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_ASCII_10.cpp | 3 ++- .../src/lcd/tft/fontdata/Unifont/10px/Unifont_Cyrillic_10.cpp | 3 ++- Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_Greek_10.cpp | 3 ++- .../src/lcd/tft/fontdata/Unifont/10px/Unifont_Katakana_10.cpp | 3 ++- Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_Korean_10.cpp | 3 ++- .../tft/fontdata/Unifont/10px/Unifont_Latin_Extended_A_10.cpp | 3 ++- .../fontdata/Unifont/10px/Unifont_Simplified_Chinese_10.cpp | 3 ++- .../src/lcd/tft/fontdata/Unifont/10px/Unifont_Symbols_10.cpp | 3 ++- .../fontdata/Unifont/10px/Unifont_Traditional_Chinese_10.cpp | 3 ++- .../lcd/tft/fontdata/Unifont/10px/Unifont_Vietnamese_10.cpp | 3 ++- Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_20.cpp | 3 ++- Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_ASCII_20.cpp | 3 ++- .../src/lcd/tft/fontdata/Unifont/20px/Unifont_Cyrillic_20.cpp | 3 ++- Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_Greek_20.cpp | 3 ++- .../src/lcd/tft/fontdata/Unifont/20px/Unifont_Katakana_20.cpp | 3 ++- Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_Korean_20.cpp | 3 ++- .../tft/fontdata/Unifont/20px/Unifont_Latin_Extended_A_20.cpp | 3 ++- .../fontdata/Unifont/20px/Unifont_Simplified_Chinese_20.cpp | 3 ++- .../src/lcd/tft/fontdata/Unifont/20px/Unifont_Symbols_20.cpp | 3 ++- .../fontdata/Unifont/20px/Unifont_Traditional_Chinese_20.cpp | 3 ++- .../lcd/tft/fontdata/Unifont/20px/Unifont_Vietnamese_20.cpp | 3 ++- 57 files changed, 114 insertions(+), 57 deletions(-) diff --git a/Marlin/src/lcd/tft/fontdata/Helvetica/Helvetica_19.cpp b/Marlin/src/lcd/tft/fontdata/Helvetica/Helvetica_19.cpp index 5b4570d010..ab2f91577a 100644 --- a/Marlin/src/lcd/tft/fontdata/Helvetica/Helvetica_19.cpp +++ b/Marlin/src/lcd/tft/fontdata/Helvetica/Helvetica_19.cpp @@ -34,7 +34,8 @@ #include "../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define HELVETICA 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == HELVETICA #include diff --git a/Marlin/src/lcd/tft/fontdata/Helvetica/helvetica_14.cpp b/Marlin/src/lcd/tft/fontdata/Helvetica/helvetica_14.cpp index 44e7d40a27..2fbf812369 100644 --- a/Marlin/src/lcd/tft/fontdata/Helvetica/helvetica_14.cpp +++ b/Marlin/src/lcd/tft/fontdata/Helvetica/helvetica_14.cpp @@ -34,7 +34,8 @@ #include "../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define HELVETICA 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == HELVETICA #include diff --git a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_14px/NotoSans_Medium_14.cpp b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_14px/NotoSans_Medium_14.cpp index 9a54351762..d9bdde8b2d 100644 --- a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_14px/NotoSans_Medium_14.cpp +++ b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_14px/NotoSans_Medium_14.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define NOTOSANS 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == NOTOSANS #include diff --git a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_14px/NotoSans_Medium_ASCII_14.cpp b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_14px/NotoSans_Medium_ASCII_14.cpp index 3db57d8ebe..0d452c9441 100644 --- a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_14px/NotoSans_Medium_ASCII_14.cpp +++ b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_14px/NotoSans_Medium_ASCII_14.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define NOTOSANS 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == NOTOSANS #include diff --git a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_14px/NotoSans_Medium_Cyrillic_14.cpp b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_14px/NotoSans_Medium_Cyrillic_14.cpp index f02086646c..7c1fc2ac4e 100644 --- a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_14px/NotoSans_Medium_Cyrillic_14.cpp +++ b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_14px/NotoSans_Medium_Cyrillic_14.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define NOTOSANS 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == NOTOSANS #include diff --git a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_14px/NotoSans_Medium_Greek_14.cpp b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_14px/NotoSans_Medium_Greek_14.cpp index cbb789870d..bb0cec7aca 100644 --- a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_14px/NotoSans_Medium_Greek_14.cpp +++ b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_14px/NotoSans_Medium_Greek_14.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define NOTOSANS 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == NOTOSANS #include diff --git a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_14px/NotoSans_Medium_Katakana_14.cpp b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_14px/NotoSans_Medium_Katakana_14.cpp index ae167c2c08..eda142fef1 100644 --- a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_14px/NotoSans_Medium_Katakana_14.cpp +++ b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_14px/NotoSans_Medium_Katakana_14.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define NOTOSANS 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == NOTOSANS #include diff --git a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_14px/NotoSans_Medium_Korean_14.cpp b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_14px/NotoSans_Medium_Korean_14.cpp index 7d69f85f4a..258ccf8799 100644 --- a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_14px/NotoSans_Medium_Korean_14.cpp +++ b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_14px/NotoSans_Medium_Korean_14.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define NOTOSANS 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == NOTOSANS #include diff --git a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_14px/NotoSans_Medium_Latin_Extended_A_14.cpp b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_14px/NotoSans_Medium_Latin_Extended_A_14.cpp index 4ff175700f..d736d12c17 100644 --- a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_14px/NotoSans_Medium_Latin_Extended_A_14.cpp +++ b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_14px/NotoSans_Medium_Latin_Extended_A_14.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define NOTOSANS 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == NOTOSANS #include diff --git a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_14px/NotoSans_Medium_Simplified_Chinese_14.cpp b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_14px/NotoSans_Medium_Simplified_Chinese_14.cpp index 01c7638e37..04825f3659 100644 --- a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_14px/NotoSans_Medium_Simplified_Chinese_14.cpp +++ b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_14px/NotoSans_Medium_Simplified_Chinese_14.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define NOTOSANS 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == NOTOSANS #include diff --git a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_14px/NotoSans_Medium_Symbols_14.cpp b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_14px/NotoSans_Medium_Symbols_14.cpp index 07f3359dc4..a806753a97 100644 --- a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_14px/NotoSans_Medium_Symbols_14.cpp +++ b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_14px/NotoSans_Medium_Symbols_14.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define NOTOSANS 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == NOTOSANS #include diff --git a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_14px/NotoSans_Medium_Traditional_Chinese_14.cpp b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_14px/NotoSans_Medium_Traditional_Chinese_14.cpp index 63ea2fc74b..863d0c2805 100644 --- a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_14px/NotoSans_Medium_Traditional_Chinese_14.cpp +++ b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_14px/NotoSans_Medium_Traditional_Chinese_14.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define NOTOSANS 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == NOTOSANS #include diff --git a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_14px/NotoSans_Medium_Vietnamese_14.cpp b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_14px/NotoSans_Medium_Vietnamese_14.cpp index dd6603f682..6a363582e1 100644 --- a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_14px/NotoSans_Medium_Vietnamese_14.cpp +++ b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_14px/NotoSans_Medium_Vietnamese_14.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define NOTOSANS 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == NOTOSANS #include diff --git a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_16px/NotoSans_Medium_16.cpp b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_16px/NotoSans_Medium_16.cpp index 1369901338..08ec0bf9d0 100644 --- a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_16px/NotoSans_Medium_16.cpp +++ b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_16px/NotoSans_Medium_16.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define NOTOSANS 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == NOTOSANS #include diff --git a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_16px/NotoSans_Medium_ASCII_16.cpp b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_16px/NotoSans_Medium_ASCII_16.cpp index 0da231be38..cac0216a75 100644 --- a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_16px/NotoSans_Medium_ASCII_16.cpp +++ b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_16px/NotoSans_Medium_ASCII_16.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define NOTOSANS 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == NOTOSANS #include diff --git a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_16px/NotoSans_Medium_Cyrillic_16.cpp b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_16px/NotoSans_Medium_Cyrillic_16.cpp index 36ca1df547..58ecea399f 100644 --- a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_16px/NotoSans_Medium_Cyrillic_16.cpp +++ b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_16px/NotoSans_Medium_Cyrillic_16.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define NOTOSANS 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == NOTOSANS #include diff --git a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_16px/NotoSans_Medium_Greek_16.cpp b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_16px/NotoSans_Medium_Greek_16.cpp index ff3ef3f843..f20b747cc4 100644 --- a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_16px/NotoSans_Medium_Greek_16.cpp +++ b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_16px/NotoSans_Medium_Greek_16.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define NOTOSANS 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == NOTOSANS #include diff --git a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_16px/NotoSans_Medium_Katakana_16.cpp b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_16px/NotoSans_Medium_Katakana_16.cpp index a159a26947..18c9345ca3 100644 --- a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_16px/NotoSans_Medium_Katakana_16.cpp +++ b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_16px/NotoSans_Medium_Katakana_16.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define NOTOSANS 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == NOTOSANS #include diff --git a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_16px/NotoSans_Medium_Korean_16.cpp b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_16px/NotoSans_Medium_Korean_16.cpp index 26e6799a89..3839ed419e 100644 --- a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_16px/NotoSans_Medium_Korean_16.cpp +++ b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_16px/NotoSans_Medium_Korean_16.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define NOTOSANS 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == NOTOSANS #include diff --git a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_16px/NotoSans_Medium_Latin_Extended_A_16.cpp b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_16px/NotoSans_Medium_Latin_Extended_A_16.cpp index 0617ee2758..afce518424 100644 --- a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_16px/NotoSans_Medium_Latin_Extended_A_16.cpp +++ b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_16px/NotoSans_Medium_Latin_Extended_A_16.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define NOTOSANS 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == NOTOSANS #include diff --git a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_16px/NotoSans_Medium_Simplified_Chinese_16.cpp b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_16px/NotoSans_Medium_Simplified_Chinese_16.cpp index cd9c617c75..aa76df275a 100644 --- a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_16px/NotoSans_Medium_Simplified_Chinese_16.cpp +++ b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_16px/NotoSans_Medium_Simplified_Chinese_16.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define NOTOSANS 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == NOTOSANS #include diff --git a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_16px/NotoSans_Medium_Symbols_16.cpp b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_16px/NotoSans_Medium_Symbols_16.cpp index ef20a4bcc6..63a2a7d071 100644 --- a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_16px/NotoSans_Medium_Symbols_16.cpp +++ b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_16px/NotoSans_Medium_Symbols_16.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define NOTOSANS 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == NOTOSANS #include diff --git a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_16px/NotoSans_Medium_Traditional_Chinese_16.cpp b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_16px/NotoSans_Medium_Traditional_Chinese_16.cpp index 177e741825..606625646b 100644 --- a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_16px/NotoSans_Medium_Traditional_Chinese_16.cpp +++ b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_16px/NotoSans_Medium_Traditional_Chinese_16.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define NOTOSANS 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == NOTOSANS #include diff --git a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_16px/NotoSans_Medium_Vietnamese_16.cpp b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_16px/NotoSans_Medium_Vietnamese_16.cpp index 16cee9a7a2..3905fba3e9 100644 --- a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_16px/NotoSans_Medium_Vietnamese_16.cpp +++ b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_16px/NotoSans_Medium_Vietnamese_16.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define NOTOSANS 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == NOTOSANS #include diff --git a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_19px/NotoSans_Medium_19.cpp b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_19px/NotoSans_Medium_19.cpp index c04f1c6d2d..925254e7f8 100644 --- a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_19px/NotoSans_Medium_19.cpp +++ b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_19px/NotoSans_Medium_19.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define NOTOSANS 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == NOTOSANS #include diff --git a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_19px/NotoSans_Medium_ASCII_19.cpp b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_19px/NotoSans_Medium_ASCII_19.cpp index 417db3946f..97ef16cf44 100644 --- a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_19px/NotoSans_Medium_ASCII_19.cpp +++ b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_19px/NotoSans_Medium_ASCII_19.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define NOTOSANS 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == NOTOSANS #include diff --git a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_19px/NotoSans_Medium_Cyrillic_19.cpp b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_19px/NotoSans_Medium_Cyrillic_19.cpp index 413141c3b1..dba08111ce 100644 --- a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_19px/NotoSans_Medium_Cyrillic_19.cpp +++ b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_19px/NotoSans_Medium_Cyrillic_19.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define NOTOSANS 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == NOTOSANS #include diff --git a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_19px/NotoSans_Medium_Greek_19.cpp b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_19px/NotoSans_Medium_Greek_19.cpp index f4dcd225c8..497e7fa8e8 100644 --- a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_19px/NotoSans_Medium_Greek_19.cpp +++ b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_19px/NotoSans_Medium_Greek_19.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define NOTOSANS 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == NOTOSANS #include diff --git a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_19px/NotoSans_Medium_Katakana_19.cpp b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_19px/NotoSans_Medium_Katakana_19.cpp index 3f8d4f761a..f5d92c5fd5 100644 --- a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_19px/NotoSans_Medium_Katakana_19.cpp +++ b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_19px/NotoSans_Medium_Katakana_19.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define NOTOSANS 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == NOTOSANS #include diff --git a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_19px/NotoSans_Medium_Korean_19.cpp b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_19px/NotoSans_Medium_Korean_19.cpp index 7f030d656d..14a0073211 100644 --- a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_19px/NotoSans_Medium_Korean_19.cpp +++ b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_19px/NotoSans_Medium_Korean_19.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define NOTOSANS 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == NOTOSANS #include diff --git a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_19px/NotoSans_Medium_Latin_Extended_A_19.cpp b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_19px/NotoSans_Medium_Latin_Extended_A_19.cpp index 00d90611fd..ccc23097fe 100644 --- a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_19px/NotoSans_Medium_Latin_Extended_A_19.cpp +++ b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_19px/NotoSans_Medium_Latin_Extended_A_19.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define NOTOSANS 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == NOTOSANS #include diff --git a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_19px/NotoSans_Medium_Simplified_Chinese_19.cpp b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_19px/NotoSans_Medium_Simplified_Chinese_19.cpp index b5999beb72..86621477e1 100644 --- a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_19px/NotoSans_Medium_Simplified_Chinese_19.cpp +++ b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_19px/NotoSans_Medium_Simplified_Chinese_19.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define NOTOSANS 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == NOTOSANS #include diff --git a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_19px/NotoSans_Medium_Symbols_19.cpp b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_19px/NotoSans_Medium_Symbols_19.cpp index 5d27793082..d28f2800d6 100644 --- a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_19px/NotoSans_Medium_Symbols_19.cpp +++ b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_19px/NotoSans_Medium_Symbols_19.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define NOTOSANS 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == NOTOSANS #include diff --git a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_19px/NotoSans_Medium_Traditional_Chinese_19.cpp b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_19px/NotoSans_Medium_Traditional_Chinese_19.cpp index e5fd6077cc..c34f5bb7f1 100644 --- a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_19px/NotoSans_Medium_Traditional_Chinese_19.cpp +++ b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_19px/NotoSans_Medium_Traditional_Chinese_19.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define NOTOSANS 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == NOTOSANS #include diff --git a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_19px/NotoSans_Medium_Vietnamese_19.cpp b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_19px/NotoSans_Medium_Vietnamese_19.cpp index 1f77fbe874..5ff24ab3b0 100644 --- a/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_19px/NotoSans_Medium_Vietnamese_19.cpp +++ b/Marlin/src/lcd/tft/fontdata/NotoSans/Medium_19px/NotoSans_Medium_Vietnamese_19.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define NOTOSANS 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == NOTOSANS #include diff --git a/Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_10.cpp b/Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_10.cpp index d22ee15a5f..2572cc60c4 100644 --- a/Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_10.cpp +++ b/Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_10.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define UNIFONT 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == UNIFONT #include diff --git a/Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_ASCII_10.cpp b/Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_ASCII_10.cpp index d4965cc061..27f3dcf325 100644 --- a/Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_ASCII_10.cpp +++ b/Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_ASCII_10.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define UNIFONT 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == UNIFONT #include diff --git a/Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_Cyrillic_10.cpp b/Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_Cyrillic_10.cpp index 013a015cca..1e112a1de1 100644 --- a/Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_Cyrillic_10.cpp +++ b/Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_Cyrillic_10.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define UNIFONT 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == UNIFONT #include diff --git a/Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_Greek_10.cpp b/Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_Greek_10.cpp index 1febf8b5b3..71375485d2 100644 --- a/Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_Greek_10.cpp +++ b/Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_Greek_10.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define UNIFONT 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == UNIFONT #include diff --git a/Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_Katakana_10.cpp b/Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_Katakana_10.cpp index ae2819dba1..1e0d15629d 100644 --- a/Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_Katakana_10.cpp +++ b/Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_Katakana_10.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define UNIFONT 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == UNIFONT #include diff --git a/Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_Korean_10.cpp b/Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_Korean_10.cpp index e4516acac2..d1bf3ba514 100644 --- a/Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_Korean_10.cpp +++ b/Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_Korean_10.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define UNIFONT 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == UNIFONT #include diff --git a/Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_Latin_Extended_A_10.cpp b/Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_Latin_Extended_A_10.cpp index 6059c6ccdd..8d381d276a 100644 --- a/Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_Latin_Extended_A_10.cpp +++ b/Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_Latin_Extended_A_10.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define UNIFONT 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == UNIFONT #include diff --git a/Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_Simplified_Chinese_10.cpp b/Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_Simplified_Chinese_10.cpp index b971dc92a0..3ce396d098 100644 --- a/Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_Simplified_Chinese_10.cpp +++ b/Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_Simplified_Chinese_10.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define UNIFONT 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == UNIFONT #include diff --git a/Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_Symbols_10.cpp b/Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_Symbols_10.cpp index 9f804f7d69..8776bfba6c 100644 --- a/Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_Symbols_10.cpp +++ b/Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_Symbols_10.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define UNIFONT 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == UNIFONT #include diff --git a/Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_Traditional_Chinese_10.cpp b/Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_Traditional_Chinese_10.cpp index 5f820cf8fc..a9b1406441 100644 --- a/Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_Traditional_Chinese_10.cpp +++ b/Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_Traditional_Chinese_10.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define UNIFONT 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == UNIFONT #include diff --git a/Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_Vietnamese_10.cpp b/Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_Vietnamese_10.cpp index 66ee7f01f6..d61d1be71b 100644 --- a/Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_Vietnamese_10.cpp +++ b/Marlin/src/lcd/tft/fontdata/Unifont/10px/Unifont_Vietnamese_10.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define UNIFONT 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == UNIFONT #include diff --git a/Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_20.cpp b/Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_20.cpp index 9d6847722f..023cc4f978 100644 --- a/Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_20.cpp +++ b/Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_20.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define UNIFONT 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == UNIFONT #include diff --git a/Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_ASCII_20.cpp b/Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_ASCII_20.cpp index 1e5d228053..e28b806b9f 100644 --- a/Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_ASCII_20.cpp +++ b/Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_ASCII_20.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define UNIFONT 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == UNIFONT #include diff --git a/Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_Cyrillic_20.cpp b/Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_Cyrillic_20.cpp index 751b60c43c..8e82a228f1 100644 --- a/Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_Cyrillic_20.cpp +++ b/Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_Cyrillic_20.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define UNIFONT 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == UNIFONT #include diff --git a/Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_Greek_20.cpp b/Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_Greek_20.cpp index fee79c3fae..d5c175977a 100644 --- a/Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_Greek_20.cpp +++ b/Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_Greek_20.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define UNIFONT 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == UNIFONT #include diff --git a/Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_Katakana_20.cpp b/Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_Katakana_20.cpp index f809a20259..3b21375016 100644 --- a/Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_Katakana_20.cpp +++ b/Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_Katakana_20.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define UNIFONT 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == UNIFONT #include diff --git a/Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_Korean_20.cpp b/Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_Korean_20.cpp index 7f750e7fa2..ac8dee91ef 100644 --- a/Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_Korean_20.cpp +++ b/Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_Korean_20.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define UNIFONT 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == UNIFONT #include diff --git a/Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_Latin_Extended_A_20.cpp b/Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_Latin_Extended_A_20.cpp index 49b8001826..9a22047c9a 100644 --- a/Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_Latin_Extended_A_20.cpp +++ b/Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_Latin_Extended_A_20.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define UNIFONT 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == UNIFONT #include diff --git a/Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_Simplified_Chinese_20.cpp b/Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_Simplified_Chinese_20.cpp index 970d30bec7..85e0d205d7 100644 --- a/Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_Simplified_Chinese_20.cpp +++ b/Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_Simplified_Chinese_20.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define UNIFONT 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == UNIFONT #include diff --git a/Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_Symbols_20.cpp b/Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_Symbols_20.cpp index 5f663efc56..a0d269e02f 100644 --- a/Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_Symbols_20.cpp +++ b/Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_Symbols_20.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define UNIFONT 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == UNIFONT #include diff --git a/Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_Traditional_Chinese_20.cpp b/Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_Traditional_Chinese_20.cpp index 70359bbc71..c541e1401d 100644 --- a/Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_Traditional_Chinese_20.cpp +++ b/Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_Traditional_Chinese_20.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define UNIFONT 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == UNIFONT #include diff --git a/Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_Vietnamese_20.cpp b/Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_Vietnamese_20.cpp index 21fbc29d81..8c9b29153c 100644 --- a/Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_Vietnamese_20.cpp +++ b/Marlin/src/lcd/tft/fontdata/Unifont/20px/Unifont_Vietnamese_20.cpp @@ -22,7 +22,8 @@ #include "../../../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_TFT +#define UNIFONT 123 +#if HAS_GRAPHICAL_TFT && TFT_FONT == UNIFONT #include From 39d08d90cd1aba3fde54dc070531c28bf2dffe53 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 24 Mar 2023 02:43:20 -0500 Subject: [PATCH 069/225] =?UTF-8?q?=F0=9F=8E=A8=20LPC=5FSOFTWARE=5FSPI=20?= =?UTF-8?q?=3D>=20SOFTWARE=5FSPI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Martin Turski --- Marlin/src/HAL/LINUX/spi_pins.h | 8 ++++---- Marlin/src/HAL/LPC1768/HAL_SPI.cpp | 4 ++-- Marlin/src/HAL/LPC1768/spi_pins.h | 8 ++++---- Marlin/src/HAL/NATIVE_SIM/spi_pins.h | 2 +- Marlin/src/pins/lpc1768/pins_MKS_SBASE.h | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Marlin/src/HAL/LINUX/spi_pins.h b/Marlin/src/HAL/LINUX/spi_pins.h index 33136ac9dd..9b40651873 100644 --- a/Marlin/src/HAL/LINUX/spi_pins.h +++ b/Marlin/src/HAL/LINUX/spi_pins.h @@ -25,10 +25,10 @@ #include "../../inc/MarlinConfigPre.h" #if BOTH(HAS_MARLINUI_U8GLIB, SDSUPPORT) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_ENABLE == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN) - #define LPC_SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently - // needed due to the speed and mode required for communicating with each device being different. - // This requirement can be removed if the SPI access to these devices is updated to use - // spiBeginTransaction. + #define SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently + // needed due to the speed and mode required for communicating with each device being different. + // This requirement can be removed if the SPI access to these devices is updated to use + // spiBeginTransaction. #endif // Onboard SD diff --git a/Marlin/src/HAL/LPC1768/HAL_SPI.cpp b/Marlin/src/HAL/LPC1768/HAL_SPI.cpp index 257d8579e2..4d6cb55cff 100644 --- a/Marlin/src/HAL/LPC1768/HAL_SPI.cpp +++ b/Marlin/src/HAL/LPC1768/HAL_SPI.cpp @@ -60,7 +60,7 @@ // ------------------------ // Public functions // ------------------------ -#if ENABLED(LPC_SOFTWARE_SPI) +#if ENABLED(SOFTWARE_SPI) // Software SPI @@ -161,7 +161,7 @@ // TODO: Implement this method } -#endif // LPC_SOFTWARE_SPI +#endif // SOFTWARE_SPI /** * @brief Wait until TXE (tx empty) flag is set and BSY (busy) flag unset. diff --git a/Marlin/src/HAL/LPC1768/spi_pins.h b/Marlin/src/HAL/LPC1768/spi_pins.h index e7d774742f..a82b21dda9 100644 --- a/Marlin/src/HAL/LPC1768/spi_pins.h +++ b/Marlin/src/HAL/LPC1768/spi_pins.h @@ -24,10 +24,10 @@ #include "../../core/macros.h" #if BOTH(SDSUPPORT, HAS_MARLINUI_U8GLIB) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_ENABLE == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN) - #define LPC_SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently - // needed due to the speed and mode required for communicating with each device being different. - // This requirement can be removed if the SPI access to these devices is updated to use - // spiBeginTransaction. + #define SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently + // needed due to the speed and mode required for communicating with each device being different. + // This requirement can be removed if the SPI access to these devices is updated to use + // spiBeginTransaction. #endif /** onboard SD card */ diff --git a/Marlin/src/HAL/NATIVE_SIM/spi_pins.h b/Marlin/src/HAL/NATIVE_SIM/spi_pins.h index a5138e0ccb..fd3378b337 100644 --- a/Marlin/src/HAL/NATIVE_SIM/spi_pins.h +++ b/Marlin/src/HAL/NATIVE_SIM/spi_pins.h @@ -25,7 +25,7 @@ #include "../../inc/MarlinConfigPre.h" #if BOTH(HAS_MARLINUI_U8GLIB, SDSUPPORT) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_ENABLE == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN) - #define LPC_SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently + #define SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently // needed due to the speed and mode required for communicating with each device being different. // This requirement can be removed if the SPI access to these devices is updated to use // spiBeginTransaction. diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h index 14759901ac..9f67a01c4e 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h @@ -186,7 +186,7 @@ #define SD_MISO_PIN P1_23 // J8-3 (moved from EXP2 P0.8) #define SD_MOSI_PIN P2_12 // J8-4 (moved from EXP2 P0.9) #define SD_SS_PIN P0_28 - #define LPC_SOFTWARE_SPI // With a custom cable we need software SPI because the + #define SOFTWARE_SPI // With a custom cable we need software SPI because the // selected pins are not on a hardware SPI controller #elif SD_CONNECTION_IS(LCD) || SD_CONNECTION_IS(ONBOARD) #define SD_SCK_PIN P0_07 From 8b6155deeebd5aa12d0a335dd9087fd7db280d5b Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 24 Mar 2023 03:01:09 -0500 Subject: [PATCH 070/225] =?UTF-8?q?=F0=9F=94=A8=20INI=20Updates?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Martin Turski --- ini/avr.ini | 7 ++++--- ini/features.ini | 1 + ini/stm32f1-maple.ini | 25 ++++++++++++------------- ini/stm32f4.ini | 2 -- platformio.ini | 2 +- 5 files changed, 18 insertions(+), 19 deletions(-) diff --git a/ini/avr.ini b/ini/avr.ini index 5944f81583..7c5f369dc6 100644 --- a/ini/avr.ini +++ b/ini/avr.ini @@ -13,8 +13,9 @@ # AVR (8-bit) Common Environment values # [common_avr8] -platform = atmelavr@~3.4 +platform = atmelavr@~4.0.1 build_flags = ${common.build_flags} -Wl,--relax +build_src_flags = -std=gnu++1z board_build.f_cpu = 16000000L build_src_filter = ${common.default_src_filter} + @@ -53,7 +54,7 @@ extends = common_avr8 board_build.variant = MARLIN_MEGA_EXTENDED extra_scripts = ${env:mega2560ext.extra_scripts} upload_speed = 57600 -build_flags = ${common.build_flags} -fno-tree-scev-cprop -fno-split-wide-types -Wl,--relax -mcall-prologues +build_flags = ${common_avr8.build_flags} -fno-tree-scev-cprop -fno-split-wide-types -mcall-prologues # # MightyBoard ATmega1280 @@ -103,7 +104,7 @@ board_upload.maximum_size = 126976 # [tuned_1284p] -build_flags = ${common.build_flags} -fno-tree-scev-cprop -fno-split-wide-types -Wl,--relax -mcall-prologues +build_flags = ${common_avr8.build_flags} -fno-tree-scev-cprop -fno-split-wide-types -mcall-prologues [env:sanguino1284p_optimized] extends = env:sanguino1284p diff --git a/ini/features.ini b/ini/features.ini index bfaca56ab3..35b6959fd9 100644 --- a/ini/features.ini +++ b/ini/features.ini @@ -205,6 +205,7 @@ HAS_GCODE_M876 = src_filter=+ HAS_RESUME_CONTINUE = src_filter=+ SET_PROGRESS_MANUALLY = src_filter=+ HAS_STATUS_MESSAGE = src_filter=+ +HAS_PREHEAT = src_filter=+ HAS_LCD_CONTRAST = src_filter=+ HAS_GCODE_M255 = src_filter=+ HAS_LCD_BRIGHTNESS = src_filter=+ diff --git a/ini/stm32f1-maple.ini b/ini/stm32f1-maple.ini index e223bdb4eb..d361a0d40a 100644 --- a/ini/stm32f1-maple.ini +++ b/ini/stm32f1-maple.ini @@ -61,7 +61,7 @@ monitor_speed = 115200 [env:STM32F103RC_meeb_maple] extends = env:STM32F103RC_maple board = marlin_maple_MEEB_3DP -build_flags = ${STM32F1_maple.build_flags} +build_flags = ${env:STM32F103RC_maple.build_flags} -DDEBUG_LEVEL=0 -DSS_TIMER=4 -DSTM32_FLASH_SIZE=512 @@ -70,10 +70,10 @@ build_flags = ${STM32F1_maple.build_flags} -DVECT_TAB_OFFSET=0x2000 -DGENERIC_BOOTLOADER board_build.ldscript = STM32F103RC_MEEB_3DP.ld -extra_scripts = ${STM32F1_maple.extra_scripts} +extra_scripts = ${env:STM32F103RC_maple.extra_scripts} pre:buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py buildroot/share/PlatformIO/scripts/STM32F103RC_MEEB_3DP.py -lib_deps = ${STM32F1_maple.lib_deps} +lib_deps = ${env:STM32F103RC_maple.lib_deps} USBComposite for STM32F1@0.91 custom_marlin.NEOPIXEL_LED = Adafruit NeoPixel=https://github.com/ccccmagicboy/Adafruit_NeoPixel#meeb_3dp_use debug_tool = stlink @@ -84,9 +84,9 @@ upload_protocol = dfu # [env:STM32F103RC_fysetc_maple] extends = env:STM32F103RC_maple -extra_scripts = ${STM32F1_maple.extra_scripts} +extra_scripts = ${env:STM32F103RC_maple.extra_scripts} buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py -build_flags = ${STM32F1_maple.build_flags} -DDEBUG_LEVEL=0 +build_flags = ${env:STM32F103RC_maple.build_flags} -DDEBUG_LEVEL=0 lib_ldf_mode = chain debug_tool = stlink upload_protocol = serial @@ -101,7 +101,7 @@ upload_protocol = serial extends = env:STM32F103RC_maple board_build.address = 0x08007000 board_build.ldscript = STM32F103RC_SKR_MINI_256K.ld -build_flags = ${STM32F1_maple.build_flags} -DDEBUG_LEVEL=0 -DSS_TIMER=4 +build_flags = ${env:STM32F103RC_maple.build_flags} -DDEBUG_LEVEL=0 -DSS_TIMER=4 monitor_speed = 115200 [env:STM32F103RC_btt_USB_maple] @@ -115,10 +115,10 @@ lib_deps = ${env:STM32F103RC_btt_maple.lib_deps} # [env:STM32F103RE_creality_maple] extends = env:STM32F103RE_maple -build_flags = ${STM32F1_maple.build_flags} -DTEMP_TIMER_CHAN=4 +build_flags = ${env:STM32F103RE_maple.build_flags} -DTEMP_TIMER_CHAN=4 board_build.address = 0x08007000 board_build.ldscript = creality.ld -extra_scripts = ${STM32F1_maple.extra_scripts} +extra_scripts = ${env:STM32F103RE_maple.extra_scripts} pre:buildroot/share/PlatformIO/scripts/random-bin.py debug_tool = jlink upload_protocol = jlink @@ -128,10 +128,10 @@ upload_protocol = jlink # [env:STM32F103RC_creality_maple] extends = env:STM32F103RC_maple -build_flags = ${STM32F1_maple.build_flags} -DTEMP_TIMER_CHAN=4 +build_flags = ${env:STM32F103RC_maple.build_flags} -DTEMP_TIMER_CHAN=4 board_build.address = 0x08007000 board_build.ldscript = creality.ld -extra_scripts = ${STM32F1_maple.extra_scripts} +extra_scripts = ${env:STM32F103RC_maple.extra_scripts} pre:buildroot/share/PlatformIO/scripts/random-bin.py debug_tool = jlink upload_protocol = jlink @@ -154,14 +154,14 @@ board_build.ldscript = crealityPro.ld extends = env:STM32F103RE_maple board_build.address = 0x08007000 board_build.ldscript = STM32F103RE_SKR_MINI_512K.ld -build_flags = ${STM32F1_maple.build_flags} -DDEBUG_LEVEL=0 -DSS_TIMER=4 +build_flags = ${env:STM32F103RE_maple.build_flags} -DDEBUG_LEVEL=0 -DSS_TIMER=4 debug_tool = stlink upload_protocol = stlink [env:STM32F103RE_btt_USB_maple] extends = env:STM32F103RE_btt_maple build_flags = ${env:STM32F103RE_btt_maple.build_flags} -DUSE_USB_COMPOSITE -lib_deps = ${STM32F1_maple.lib_deps} +lib_deps = ${env:STM32F103RE_btt_maple.lib_deps} USBComposite for STM32F1@0.91 # @@ -238,7 +238,6 @@ board_build.ldscript = mks_robin_pro.ld # [env:trigorilla_pro_maple] extends = env:mks_robin_maple -extra_scripts = ${STM32F1_maple.extra_scripts} # # MKS Robin E3D (STM32F103RCT6) and diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini index aa3b1dfc7c..e9b9a956de 100644 --- a/ini/stm32f4.ini +++ b/ini/stm32f4.ini @@ -726,12 +726,10 @@ upload_command = dfu-util -a 0 -s 0x08000000:leave -D "$SOURCE" # STM32F446ZET6 ARM Cortex-M4 # [env:STM32F446_tronxy] -platform = ${common_stm32.platform} extends = stm32_variant board = marlin_STM32F446ZET_tronxy board_build.offset = 0x10000 board_build.rename = fmw_tronxy.bin -build_src_filter = ${common_stm32.build_src_filter} build_flags = ${stm32_variant.build_flags} -DSTM32F4xx build_unflags = ${stm32_variant.build_unflags} -fno-rtti diff --git a/platformio.ini b/platformio.ini index d31f23abec..f8a8988ef8 100644 --- a/platformio.ini +++ b/platformio.ini @@ -224,6 +224,7 @@ default_src_filter = + - - + - - - + - - - - - - @@ -251,7 +252,6 @@ default_src_filter = + - - + - - - - - - - - - - - From ec91d5a1efb56377ed784a48377521332c0a7e3e Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 24 Mar 2023 03:01:15 -0500 Subject: [PATCH 071/225] =?UTF-8?q?=F0=9F=8E=A8=20Misc.=20fixes,=20cleanup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Martin Turski --- Marlin/Marlin.ino | 2 +- Marlin/src/HAL/ESP32/ota.cpp | 2 +- Marlin/src/core/serial_base.h | 2 ++ Marlin/src/lcd/tft_io/tft_orientation.h | 7 +++---- Marlin/src/libs/numtostr.cpp | 2 +- Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h | 4 ++-- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Marlin/Marlin.ino b/Marlin/Marlin.ino index 57c825445f..744e98c2e3 100644 --- a/Marlin/Marlin.ino +++ b/Marlin/Marlin.ino @@ -27,7 +27,7 @@ Configuration - https://github.com/MarlinFirmware/Configurations Example configurations for several printer models. - - https://www.youtube.com/watch?v=3gwWVFtdg-4 + - https://youtu.be/3gwWVFtdg-4 A good 20-minute overview of Marlin configuration by Tom Sanladerer. (Applies to Marlin 1.0.x, so Jerk and Acceleration should be halved.) Also... https://www.google.com/search?tbs=vid%3A1&q=configure+marlin diff --git a/Marlin/src/HAL/ESP32/ota.cpp b/Marlin/src/HAL/ESP32/ota.cpp index 69a3e25e56..f31a78c2c5 100644 --- a/Marlin/src/HAL/ESP32/ota.cpp +++ b/Marlin/src/HAL/ESP32/ota.cpp @@ -50,7 +50,7 @@ void OTA_init() { }) .onError([](ota_error_t error) { Serial.printf("Error[%u]: ", error); - char *str; + const char *str = "unknown"; switch (error) { case OTA_AUTH_ERROR: str = "Auth Failed"; break; case OTA_BEGIN_ERROR: str = "Begin Failed"; break; diff --git a/Marlin/src/core/serial_base.h b/Marlin/src/core/serial_base.h index a5abd67d87..059b424284 100644 --- a/Marlin/src/core/serial_base.h +++ b/Marlin/src/core/serial_base.h @@ -23,6 +23,8 @@ #include "../inc/MarlinConfigPre.h" +#include // for size_t + #if ENABLED(EMERGENCY_PARSER) #include "../feature/e_parser.h" #endif diff --git a/Marlin/src/lcd/tft_io/tft_orientation.h b/Marlin/src/lcd/tft_io/tft_orientation.h index 7822fc6b04..c2c86435b2 100644 --- a/Marlin/src/lcd/tft_io/tft_orientation.h +++ b/Marlin/src/lcd/tft_io/tft_orientation.h @@ -59,9 +59,9 @@ #define TFT_COLOR_BGR _BV32(4) // Each TFT Driver is responsible for its default color mode. -// #ifndef TFT_COLOR -// #define TFT_COLOR TFT_COLOR_RGB -// #endif +//#ifndef TFT_COLOR +// #define TFT_COLOR TFT_COLOR_RGB +//#endif #define TOUCH_ORIENTATION_NONE 0 #define TOUCH_LANDSCAPE 1 @@ -82,4 +82,3 @@ #ifndef TOUCH_ORIENTATION #define TOUCH_ORIENTATION TOUCH_LANDSCAPE #endif - diff --git a/Marlin/src/libs/numtostr.cpp b/Marlin/src/libs/numtostr.cpp index c28d1246d6..4cc40a96d1 100644 --- a/Marlin/src/libs/numtostr.cpp +++ b/Marlin/src/libs/numtostr.cpp @@ -28,7 +28,7 @@ char conv[9] = { 0 }; #define DIGIT(n) ('0' + (n)) -#define DIGIMOD(n, f) DIGIT((n)/(f) % 10) +#define DIGIMOD(n, f) DIGIT(((n)/(f)) % 10) #define RJDIGIT(n, f) ((n) >= (f) ? DIGIMOD(n, f) : ' ') #define MINUSOR(n, alt) (n >= 0 ? (alt) : (n = -n, '-')) #define INTFLOAT(V,N) (((V) * 10 * pow(10, N) + ((V) < 0 ? -5: 5)) / 10) // pow10? diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h index 0df70d7292..9c5836dc74 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h @@ -93,7 +93,7 @@ #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability - #define TMC_BAUD_RATE 19200 + #define TMC_BAUD_RATE 19200 #endif // @@ -214,7 +214,7 @@ #define FORCE_SOFT_SPI // SPI MODE3 - #define LED_PIN EXP1_06_PIN // red pwm + #define LED_PIN EXP1_06_PIN // red pwm //#define LED_PIN EXP1_07_PIN // green //#define LED_PIN EXP1_08_PIN // blue From d74e65362f738baa746c54053c2e8fe9454beb0b Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 24 Mar 2023 18:43:53 -0500 Subject: [PATCH 072/225] =?UTF-8?q?=F0=9F=A9=B9=20Update=20TRONXY=5FV10=20?= =?UTF-8?q?SPI=5FFLASH=20pins?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/stm32f4/pins_TRONXY_V10.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Marlin/src/pins/stm32f4/pins_TRONXY_V10.h b/Marlin/src/pins/stm32f4/pins_TRONXY_V10.h index e3b9f7ef6e..475dc42266 100644 --- a/Marlin/src/pins/stm32f4/pins_TRONXY_V10.h +++ b/Marlin/src/pins/stm32f4/pins_TRONXY_V10.h @@ -72,10 +72,10 @@ //#define SPI_FLASH #if ENABLED(SPI_FLASH) #define SPI_FLASH_SIZE 0x200000 // 2MB - #define W25QXX_CS_PIN PG15 // SPI2 - #define W25QXX_MOSI_PIN PB5 - #define W25QXX_MISO_PIN PB4 - #define W25QXX_SCK_PIN PB3 + #define SPI_FLASH_CS_PIN PG15 // SPI2 + #define SPI_FLASH_MOSI_PIN PB5 + #define SPI_FLASH_MISO_PIN PB4 + #define SPI_FLASH_SCK_PIN PB3 #endif // From aba42052c3c85ffbe02718a49cdec9e6053b9c03 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sat, 25 Mar 2023 00:20:40 +0000 Subject: [PATCH 073/225] [cron] Bump distribution date (2023-03-25) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 62330c57c7..bb46cc9519 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-03-24" +//#define STRING_DISTRIBUTION_DATE "2023-03-25" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index d8245208b4..d2b1ff06e9 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-03-24" + #define STRING_DISTRIBUTION_DATE "2023-03-25" #endif /** From 1b72729698085afa85e427c0578f5ba811fd05e9 Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Sat, 25 Mar 2023 17:14:21 +1300 Subject: [PATCH 074/225] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20Chitu3D=20V6=20def?= =?UTF-8?q?ault=20probe=20pin=20(#25552)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/stm32f1/pins_CHITU3D_V6.h | 51 +++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/Marlin/src/pins/stm32f1/pins_CHITU3D_V6.h b/Marlin/src/pins/stm32f1/pins_CHITU3D_V6.h index 89e07d6a21..02daab3e63 100644 --- a/Marlin/src/pins/stm32f1/pins_CHITU3D_V6.h +++ b/Marlin/src/pins/stm32f1/pins_CHITU3D_V6.h @@ -33,4 +33,55 @@ #define FIL_RUNOUT2_PIN PF13 #endif +#ifndef Z_MIN_PROBE_PIN + #define Z_MIN_PROBE_PIN PG9 +#endif + #include "pins_CHITU3D_common.h" + +/* + * Circuit diagram https://github.com/MarlinFirmware/Marlin/files/3401484/x5sa-main_board-2.pdf + * + * Details on the 30 pin ribbon pins. From: https://3dtoday.ru/blogs/artem-sr/tronxy-x5sa-pro-ustanovka-bfp-touch-na-board-chitu3d-v6-cxy-v6-191017 + * + * JP2 Ribbon 30 on CXY-V6-191017 + * ---------------------------------------------- + * | 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30| + * | 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29| + * ---------------------- ---------------------- + * + * -------------------------------------------------------------------------------------- + * | Pin | Label | Function & Notes | + * -------------------------------------------------------------------------------------- + * | 1 | Hotend | Hotend driver Q6 HY1403 via MCU Pin127 PG12 | + * | 2 | Hotend | Hotend driver Q6 HY1403 via MCU Pin127 PG12 | + * | 3 | Hotend | Hotend driver Q6 HY1403 via MCU Pin127 PG12 | + * | 4 | Hotend | Hotend driver Q6 HY1403 via MCU Pin127 PG12 | + * | 5 | +24v | Hotend +24v | + * | 6 | +24v | Hotend +24v | + * | 7 | +24v | Hotend +24v | + * | 8 | +24v | Hotend +24v | + * | 9 | F_2 | Extruder Fan2 driver Q8 AO3400A X07S via MCU Pin129 PG14 | + * | 10 | +24v | Extruder cooling Fan2 +24v | + * | 11 | F_1 | Part Fan1 driver Q7 AO3400A X07S via MCU Pin128 PG13 | + * | 12 | +24v | Part cooling Fanl +24v | + * | 13 | 1B | X-MOTOR Winding Drive | + * | 14 | 1A | X-MOTOR Winding Drive | + * | 15 | 2B | X-MOTOR Winding Drive | + * | 16 | 2A | X-MOTOR Winding Drive | + * | 17 | lA | El-Motor Winding Drive | + * | 18 | 1B | El-Motor Winding Drive | + * | 19 | 2B | El-Motor Winding Drive | + * | 20 | 2A | El-Motor Winding Drive | + * | 21 | PROXIMITY | 10kΩ Pullup to +5V and 100nF to GND, then 20kΩ to MCU Pin124 PG9 | + * | 22 | +24v | Proximity sensor +24v | + * | 23 | +5V | Filament sensor +5V XSTOP sensor +5V | + * | 24 | GND | Proximity sensor GND | + * | 25 | FILAMENT1 | 10kΩ Pullup to +5V and 100nF to GND, then 47kΩ to MCU Pin110 PA15| + * | 26 | GND | Filament Sensor GND | + * | 27 | XSTOP | 10kΩ Pullup to +5V and 100nF to GND, then 47kΩ to MCU Pin125 PG10| + * | 28 | GND | XSTOP sensor GND | + * | 29 | GND | Extruder temperature NTC sensor return GND | + * | 30 | ETEMP | 4k7Ω Pullup to +3V3 and 100nF to GND, then 4k7Ω to MCU Pin35 PA1 | + * -------------------------------------------------------------------------------------- + */ From de4452fda6b3f1a0d74865bc364fb362ccc38ff4 Mon Sep 17 00:00:00 2001 From: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Fri, 24 Mar 2023 21:15:33 -0700 Subject: [PATCH 075/225] =?UTF-8?q?=F0=9F=94=A7=20Remove=20TVPM=20warning?= =?UTF-8?q?=20(#25551)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/Warnings.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Marlin/src/inc/Warnings.cpp b/Marlin/src/inc/Warnings.cpp index 01246596c3..405e7a351e 100644 --- a/Marlin/src/inc/Warnings.cpp +++ b/Marlin/src/inc/Warnings.cpp @@ -63,11 +63,6 @@ #warning "Warning! Don't use dummy thermistors (998/999) for final build!" #endif -#if ANY(THERMAL_PROTECTION_HOTENDS, THERMAL_PROTECTION_BED, THERMAL_PROTECTION_CHAMBER, THERMAL_PROTECTION_COOLER) \ - && NONE(THERMAL_PROTECTION_VARIANCE_MONITOR, NO_VARIANCE_MONITOR_WARNING) - #warning "THERMAL_PROTECTION_VARIANCE_MONITOR is recommended. See Configuration_adv.h for details. (Define NO_VARIANCE_MONITOR_WARNING to suppress this.)" -#endif - #if NONE(HAS_RESUME_CONTINUE, HOST_PROMPT_SUPPORT) #warning "Your Configuration provides no method to acquire user feedback!" #endif From 8d3142911c017b542f1b55e9d2c09b68beacadd9 Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Sat, 25 Mar 2023 17:17:47 +1300 Subject: [PATCH 076/225] =?UTF-8?q?=F0=9F=90=9B=20Fix=20MKS=20Gen=20L=202.?= =?UTF-8?q?1=20MOSFET=20pins=20(#25542)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/ramps/pins_MKS_GEN_L_V21.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Marlin/src/pins/ramps/pins_MKS_GEN_L_V21.h b/Marlin/src/pins/ramps/pins_MKS_GEN_L_V21.h index c2ab34c825..d2c3c37f07 100644 --- a/Marlin/src/pins/ramps/pins_MKS_GEN_L_V21.h +++ b/Marlin/src/pins/ramps/pins_MKS_GEN_L_V21.h @@ -38,7 +38,8 @@ // Heaters / Fans // // Power outputs EFBF or EFBE -#define MOSFET_D_PIN 7 +#define MOSFET_B_PIN 7 +#define FAN_PIN 9 // // CS Pins wired to avoid conflict with the LCD From 01296788dcde14b29ebdf2c7b2e4895be66d75f3 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 25 Mar 2023 17:35:32 -0500 Subject: [PATCH 077/225] =?UTF-8?q?=F0=9F=A9=B9=20Refine=20MKS=20boards=20?= =?UTF-8?q?with=20a=20dedicated=20FAN=20port=20(#25567)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h | 39 +++++++++----------- Marlin/src/pins/ramps/pins_BIQU_KFB_2.h | 3 +- Marlin/src/pins/ramps/pins_FELIX2.h | 1 - Marlin/src/pins/ramps/pins_MKS_BASE_14.h | 5 --- Marlin/src/pins/ramps/pins_MKS_BASE_common.h | 13 +++---- Marlin/src/pins/ramps/pins_MKS_GEN_13.h | 2 - Marlin/src/pins/ramps/pins_MKS_GEN_L.h | 11 ++---- Marlin/src/pins/ramps/pins_MKS_GEN_L_V2.h | 4 +- Marlin/src/pins/ramps/pins_MKS_GEN_L_V21.h | 1 - Marlin/src/pins/ramps/pins_RAMPS_CREALITY.h | 2 +- Marlin/src/pins/ramps/pins_ZRIB_V52.h | 2 - 11 files changed, 30 insertions(+), 53 deletions(-) diff --git a/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h b/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h index 56f92f8b25..221f5124ae 100644 --- a/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h +++ b/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h @@ -146,39 +146,34 @@ //#define TEMP_1_MOSI_PIN TEMP_0_MOSI_PIN // -// FET Pin Mapping - FET 1 is closest to the input power connector +// FET Pin Mapping - FET A is closest to the input power connector // -#define MOSFET_1_PIN 6 // Plug EX1 Pin 1-2 -> PH3 #15 -> Logical 06 -#define MOSFET_2_PIN 7 // Plug EX1 Pin 3-4 -> PH4 #16 -> Logical 07 -#define MOSFET_3_PIN 11 // Plug EX2 1-2 -> PB5 #24 -> Logical 11 -#define MOSFET_4_PIN 12 // Plug EX2 3-4 -> PB6 #25 -> Logical 12 -#define MOSFET_5_PIN 45 // Plug HBD 1-2 -> PL4 #39 -> Logical 45 -#define MOSFET_6_PIN 44 // Plug Extra 1-2 -> PL5 #40 -> Logical 44 (FET not soldered in all boards) +#define MOSFET_A_PIN 6 // Plug EX1 Pin 1-2 -> PH3 #15 -> Logical 06 +#define MOSFET_B_PIN 11 // Plug EX2 1-2 -> PB5 #24 -> Logical 11 +#define MOSFET_C_PIN 45 // Plug HBD 1-2 -> PL4 #39 -> Logical 45 +#define MOSFET_D_PIN 7 // Plug EX1 Pin 3-4 -> PH4 #16 -> Logical 07 +#define MOSFET_E_PIN 12 // Plug EX2 3-4 -> PB6 #25 -> Logical 12 +#define MOSFET_F_PIN 44 // Plug Extra 1-2 -> PL5 #40 -> Logical 44 (FET not soldered in all boards) // // Heaters / Fans (24V) // -#define HEATER_0_PIN MOSFET_1_PIN // EX1 -#define HEATER_1_PIN MOSFET_3_PIN // EX2 -#define HEATER_BED_PIN MOSFET_5_PIN // HBP +#define HEATER_0_PIN MOSFET_A_PIN // EX1 +#define HEATER_1_PIN MOSFET_B_PIN // EX2 +#define HEATER_BED_PIN MOSFET_C_PIN // HBP -// EX1 FAN (Automatic Fans are disabled by default in Configuration_adv.h - comment that out for auto fans) #ifndef E0_AUTO_FAN_PIN - #define E0_AUTO_FAN_PIN MOSFET_2_PIN -#else - #ifndef FAN_PIN - #define FAN_PIN MOSFET_2_PIN - #endif + #define E0_AUTO_FAN_PIN MOSFET_D_PIN +#elif !defined(FAN_PIN) + #define FAN_PIN MOSFET_D_PIN #endif -// EX2 FAN (Automatic Fans are disabled by default in Configuration_adv.h - comment that out for auto fans) + #ifndef E1_AUTO_FAN_PIN - #define E1_AUTO_FAN_PIN MOSFET_4_PIN -#else - #ifndef FAN1_PIN - #define FAN1_PIN MOSFET_4_PIN - #endif + #define E1_AUTO_FAN_PIN MOSFET_E_PIN +#elif !defined(FAN1_PIN) + #define FAN1_PIN MOSFET_E_PIN #endif // diff --git a/Marlin/src/pins/ramps/pins_BIQU_KFB_2.h b/Marlin/src/pins/ramps/pins_BIQU_KFB_2.h index 6155e9842a..aab66f0fea 100644 --- a/Marlin/src/pins/ramps/pins_BIQU_KFB_2.h +++ b/Marlin/src/pins/ramps/pins_BIQU_KFB_2.h @@ -35,7 +35,6 @@ // // Heaters / Fans // -// Power outputs BEEF or BEFF -#define MOSFET_D_PIN 7 +#define MOSFET_D_PIN 7 #include "pins_RAMPS.h" diff --git a/Marlin/src/pins/ramps/pins_FELIX2.h b/Marlin/src/pins/ramps/pins_FELIX2.h index 48ef896e96..f88923e0c9 100644 --- a/Marlin/src/pins/ramps/pins_FELIX2.h +++ b/Marlin/src/pins/ramps/pins_FELIX2.h @@ -35,7 +35,6 @@ // // Heaters / Fans // -// Power outputs EFBF or EFBE #define MOSFET_D_PIN 7 #include "pins_RAMPS.h" diff --git a/Marlin/src/pins/ramps/pins_MKS_BASE_14.h b/Marlin/src/pins/ramps/pins_MKS_BASE_14.h index d302def795..9877877ffd 100644 --- a/Marlin/src/pins/ramps/pins_MKS_BASE_14.h +++ b/Marlin/src/pins/ramps/pins_MKS_BASE_14.h @@ -33,11 +33,6 @@ #define BOARD_INFO_NAME "MKS BASE 1.4" #define MKS_BASE_VERSION 14 -// -// Heaters / Fans -// -#define FAN_PIN 9 // PH6 ** Pin18 ** PWM9 - // Other Mods #define SERVO3_PIN 12 // PB6 ** Pin25 ** D12 diff --git a/Marlin/src/pins/ramps/pins_MKS_BASE_common.h b/Marlin/src/pins/ramps/pins_MKS_BASE_common.h index 7608745a4b..4d3b9844c8 100644 --- a/Marlin/src/pins/ramps/pins_MKS_BASE_common.h +++ b/Marlin/src/pins/ramps/pins_MKS_BASE_common.h @@ -34,8 +34,8 @@ // // Heaters / Fans // - // Power outputs EFBF or EFBE - #define MOSFET_D_PIN 7 + #define MOSFET_B_PIN 7 + #define FAN_PIN 9 // // M3/M4/M5 - Spindle/Laser Control @@ -50,12 +50,9 @@ #define CASE_LIGHT_PIN 2 #endif -#endif - -// -// Microstepping pins -// -#if MKS_BASE_VERSION >= 14 // |===== 1.4 =====|===== 1.5+ =====| + // + // Microstepping pins + // |===== 1.4 =====|===== 1.5+ =====| #define X_MS1_PIN 5 // PE3 | Pin 5 | PWM5 | | D3 | SERVO2_PIN #define X_MS2_PIN 6 // PH3 | Pin 15 | PWM6 | Pin 14 | D6 | SERVO1_PIN #define Y_MS1_PIN 59 // PF5 | Pin 92 | A5 | | | diff --git a/Marlin/src/pins/ramps/pins_MKS_GEN_13.h b/Marlin/src/pins/ramps/pins_MKS_GEN_13.h index 5c13288f85..3020dc8c31 100644 --- a/Marlin/src/pins/ramps/pins_MKS_GEN_13.h +++ b/Marlin/src/pins/ramps/pins_MKS_GEN_13.h @@ -42,8 +42,6 @@ // // Heaters / Fans // -// Power outputs EFBF or EFBE -// #define MOSFET_B_PIN 7 #define FAN_PIN 9 diff --git a/Marlin/src/pins/ramps/pins_MKS_GEN_L.h b/Marlin/src/pins/ramps/pins_MKS_GEN_L.h index c610fc6206..9c84c18300 100644 --- a/Marlin/src/pins/ramps/pins_MKS_GEN_L.h +++ b/Marlin/src/pins/ramps/pins_MKS_GEN_L.h @@ -37,14 +37,11 @@ // // Heaters / Fans // -// Power outputs EFBF or EFBE -#define MOSFET_D_PIN 7 -// Hotend, Hotend, Bed + Fan on D9 -#if FET_ORDER_EEB - #define MOSFET_B_PIN 7 - #define FAN_PIN 9 -#endif +#define MOSFET_A_PIN 9 // HE0 +#define MOSFET_B_PIN 8 // HE1 +#define MOSFET_C_PIN 10 // HBED +#define FAN_PIN 7 // // CS Pins wired to avoid conflict with the LCD diff --git a/Marlin/src/pins/ramps/pins_MKS_GEN_L_V2.h b/Marlin/src/pins/ramps/pins_MKS_GEN_L_V2.h index d82c4353fd..543210b117 100644 --- a/Marlin/src/pins/ramps/pins_MKS_GEN_L_V2.h +++ b/Marlin/src/pins/ramps/pins_MKS_GEN_L_V2.h @@ -37,8 +37,8 @@ // // Heaters / Fans // -// Power outputs EFBF or EFBE -#define MOSFET_D_PIN 7 +#define MOSFET_B_PIN 7 +#define FAN_PIN 9 // // CS Pins wired to avoid conflict with the LCD diff --git a/Marlin/src/pins/ramps/pins_MKS_GEN_L_V21.h b/Marlin/src/pins/ramps/pins_MKS_GEN_L_V21.h index d2c3c37f07..d1a1b30995 100644 --- a/Marlin/src/pins/ramps/pins_MKS_GEN_L_V21.h +++ b/Marlin/src/pins/ramps/pins_MKS_GEN_L_V21.h @@ -37,7 +37,6 @@ // // Heaters / Fans // -// Power outputs EFBF or EFBE #define MOSFET_B_PIN 7 #define FAN_PIN 9 diff --git a/Marlin/src/pins/ramps/pins_RAMPS_CREALITY.h b/Marlin/src/pins/ramps/pins_RAMPS_CREALITY.h index 5e4366e259..4d150946c2 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS_CREALITY.h +++ b/Marlin/src/pins/ramps/pins_RAMPS_CREALITY.h @@ -32,7 +32,7 @@ // // Heaters / Fans // -#define MOSFET_B_PIN 7 // For HEATER_1_PIN ("EEF" or "EEB") +#define MOSFET_B_PIN 7 #define FAN_PIN 9 #define FIL_RUNOUT_PIN 2 diff --git a/Marlin/src/pins/ramps/pins_ZRIB_V52.h b/Marlin/src/pins/ramps/pins_ZRIB_V52.h index 34eee07c95..5eada31c9c 100644 --- a/Marlin/src/pins/ramps/pins_ZRIB_V52.h +++ b/Marlin/src/pins/ramps/pins_ZRIB_V52.h @@ -39,8 +39,6 @@ // // Heaters / Fans // -#define HEATER_1_PIN 7 -#define FAN_PIN 9 // PH6 ** Pin18 ** PWM9 #define FAN1_PIN 6 // From 2e4bf0ab9b2b4db545665bf976d2e0738c237b80 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 25 Mar 2023 18:20:14 -0500 Subject: [PATCH 078/225] =?UTF-8?q?=F0=9F=8E=A8=20Rename=20FAN=5FPIN=20to?= =?UTF-8?q?=20FAN0=5FPIN=20(#25568)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/AVR/fastio.h | 78 ------------------- Marlin/src/HAL/AVR/inc/SanityCheck.h | 4 +- Marlin/src/HAL/STM32/inc/SanityCheck.h | 2 +- Marlin/src/HAL/STM32F1/timers.h | 2 +- Marlin/src/inc/Conditionals_post.h | 14 ++-- Marlin/src/inc/SanityCheck.h | 34 ++++---- Marlin/src/module/temperature.cpp | 2 +- Marlin/src/pins/esp32/pins_E4D.h | 2 +- Marlin/src/pins/esp32/pins_ENWI_ESPNP.h | 2 +- Marlin/src/pins/esp32/pins_ESP32.h | 2 +- Marlin/src/pins/esp32/pins_ESPA_common.h | 2 +- Marlin/src/pins/esp32/pins_MKS_TINYBEE.h | 2 +- Marlin/src/pins/esp32/pins_MRR_ESPE.h | 2 +- Marlin/src/pins/esp32/pins_PANDA_common.h | 2 +- Marlin/src/pins/linux/pins_RAMPS_LINUX.h | 14 ++-- Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h | 4 +- Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h | 6 +- Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h | 6 +- Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h | 4 +- Marlin/src/pins/lpc1768/pins_EMOTRONIC.h | 2 +- Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h | 2 +- Marlin/src/pins/lpc1768/pins_MKS_SBASE.h | 4 +- Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h | 4 +- Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h | 10 +-- Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h | 4 +- Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h | 4 +- Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h | 4 +- .../src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h | 2 +- .../src/pins/lpc1769/pins_COHESION3D_MINI.h | 6 +- .../src/pins/lpc1769/pins_COHESION3D_REMIX.h | 6 +- Marlin/src/pins/lpc1769/pins_FLY_CDY.h | 4 +- Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h | 4 +- Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h | 4 +- Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h | 4 +- Marlin/src/pins/mega/pins_CHEAPTRONICv2.h | 4 +- Marlin/src/pins/mega/pins_CNCONTROLS_11.h | 4 +- Marlin/src/pins/mega/pins_CNCONTROLS_12.h | 4 +- Marlin/src/pins/mega/pins_CNCONTROLS_15.h | 2 +- Marlin/src/pins/mega/pins_EINSTART-S.h | 2 +- Marlin/src/pins/mega/pins_ELEFU_3.h | 4 +- Marlin/src/pins/mega/pins_GT2560_REV_A.h | 4 +- Marlin/src/pins/mega/pins_GT2560_V3.h | 2 +- Marlin/src/pins/mega/pins_HJC2560C_REV2.h | 4 +- Marlin/src/pins/mega/pins_INTAMSYS40.h | 2 +- Marlin/src/pins/mega/pins_LEAPFROG.h | 2 +- Marlin/src/pins/mega/pins_LEAPFROG_XEED2015.h | 2 +- Marlin/src/pins/mega/pins_MALYAN_M180.h | 4 +- Marlin/src/pins/mega/pins_MEGACONTROLLER.h | 4 +- Marlin/src/pins/mega/pins_MEGATRONICS.h | 4 +- Marlin/src/pins/mega/pins_MEGATRONICS_2.h | 4 +- Marlin/src/pins/mega/pins_MEGATRONICS_3.h | 4 +- Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h | 4 +- Marlin/src/pins/mega/pins_MINITRONICS.h | 4 +- Marlin/src/pins/mega/pins_OVERLORD.h | 2 +- Marlin/src/pins/mega/pins_PICA.h | 4 +- Marlin/src/pins/mega/pins_PICAOLD.h | 2 +- Marlin/src/pins/mega/pins_SILVER_GATE.h | 4 +- Marlin/src/pins/mega/pins_WANHAO_ONEPLUS.h | 2 +- Marlin/src/pins/mega/pins_WEEDO_62A.h | 2 +- Marlin/src/pins/pinsDebug_list.h | 4 +- Marlin/src/pins/pins_postprocess.h | 5 +- Marlin/src/pins/rambo/pins_EINSY_RAMBO.h | 6 +- Marlin/src/pins/rambo/pins_EINSY_RETRO.h | 4 +- Marlin/src/pins/rambo/pins_MINIRAMBO.h | 4 +- Marlin/src/pins/rambo/pins_RAMBO.h | 4 +- Marlin/src/pins/rambo/pins_SCOOVO_X9H.h | 4 +- Marlin/src/pins/ramps/pins_AZTEEG_X3_PRO.h | 4 +- .../src/pins/ramps/pins_DUPLICATOR_I3_PLUS.h | 2 +- Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h | 4 +- Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR2.h | 2 +- .../src/pins/ramps/pins_FORMBOT_TREX2PLUS.h | 2 +- Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h | 2 +- Marlin/src/pins/ramps/pins_FYSETC_F6_13.h | 2 +- Marlin/src/pins/ramps/pins_K8600.h | 2 +- Marlin/src/pins/ramps/pins_K8800.h | 2 +- Marlin/src/pins/ramps/pins_MKS_BASE_common.h | 2 +- Marlin/src/pins/ramps/pins_MKS_GEN_13.h | 2 +- Marlin/src/pins/ramps/pins_MKS_GEN_L.h | 2 +- Marlin/src/pins/ramps/pins_MKS_GEN_L_V2.h | 2 +- Marlin/src/pins/ramps/pins_MKS_GEN_L_V21.h | 2 +- Marlin/src/pins/ramps/pins_RAMPS.h | 10 +-- Marlin/src/pins/ramps/pins_RAMPS_CREALITY.h | 2 +- Marlin/src/pins/ramps/pins_RAMPS_ENDER_4.h | 2 +- Marlin/src/pins/ramps/pins_RAMPS_OLD.h | 8 +- Marlin/src/pins/ramps/pins_RAMPS_S_12.h | 4 +- Marlin/src/pins/ramps/pins_RIGIDBOARD.h | 4 +- Marlin/src/pins/ramps/pins_RUMBA.h | 4 +- Marlin/src/pins/ramps/pins_TANGO.h | 2 +- Marlin/src/pins/ramps/pins_TENLOG_D3_HERO.h | 2 +- Marlin/src/pins/ramps/pins_TENLOG_MB1_V23.h | 2 +- Marlin/src/pins/ramps/pins_TRIGORILLA_14.h | 2 +- Marlin/src/pins/ramps/pins_TT_OSCAR.h | 2 +- Marlin/src/pins/ramps/pins_ULTIMAIN_2.h | 4 +- Marlin/src/pins/ramps/pins_ULTIMAKER.h | 4 +- Marlin/src/pins/ramps/pins_VORON.h | 4 +- Marlin/src/pins/ramps/pins_ZRIB_V53.h | 2 +- Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h | 2 +- Marlin/src/pins/sam/pins_ADSK.h | 2 +- Marlin/src/pins/sam/pins_ALLIGATOR_R2.h | 4 +- Marlin/src/pins/sam/pins_ARCHIM1.h | 4 +- Marlin/src/pins/sam/pins_ARCHIM2.h | 4 +- Marlin/src/pins/sam/pins_CNCONTROLS_15D.h | 2 +- Marlin/src/pins/sam/pins_DUE3DOM.h | 4 +- Marlin/src/pins/sam/pins_DUE3DOM_MINI.h | 4 +- Marlin/src/pins/sam/pins_KRATOS32.h | 4 +- Marlin/src/pins/sam/pins_PRINTRBOARD_G2.h | 4 +- Marlin/src/pins/sam/pins_RADDS.h | 4 +- Marlin/src/pins/sam/pins_RAMPS_FD_V1.h | 4 +- Marlin/src/pins/sam/pins_RURAMPS4D_11.h | 4 +- Marlin/src/pins/sam/pins_RURAMPS4D_13.h | 2 +- Marlin/src/pins/sam/pins_ULTRATRONICS_PRO.h | 4 +- .../src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h | 2 +- Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h | 2 +- Marlin/src/pins/samd/pins_MINITRONICS20.h | 2 +- Marlin/src/pins/samd/pins_RAMPS_144.h | 2 +- Marlin/src/pins/sanguino/pins_ANET_10.h | 4 +- Marlin/src/pins/sanguino/pins_AZTEEG_X1.h | 2 +- Marlin/src/pins/sanguino/pins_GEN7_12.h | 4 +- Marlin/src/pins/sanguino/pins_MELZI.h | 4 +- .../src/pins/sanguino/pins_MELZI_CREALITY.h | 2 +- Marlin/src/pins/sanguino/pins_OMCA.h | 4 +- Marlin/src/pins/sanguino/pins_OMCA_A.h | 4 +- .../src/pins/sanguino/pins_SANGUINOLOLU_11.h | 4 +- .../src/pins/sanguino/pins_SANGUINOLOLU_12.h | 4 +- Marlin/src/pins/sanguino/pins_SETHI.h | 9 +-- Marlin/src/pins/sanguino/pins_STB_11.h | 4 +- Marlin/src/pins/sanguino/pins_ZMIB_V2.h | 4 +- Marlin/src/pins/sensitive_pins.h | 4 +- Marlin/src/pins/stm32f1/pins_BEAST.h | 4 +- Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h | 2 +- Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h | 2 +- .../pins/stm32f1/pins_BTT_SKR_MINI_E3_V2_0.h | 2 +- .../stm32f1/pins_BTT_SKR_MINI_E3_common.h | 4 +- .../src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h | 2 +- .../src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h | 2 +- Marlin/src/pins/stm32f1/pins_CHITU3D.h | 4 +- Marlin/src/pins/stm32f1/pins_CHITU3D_common.h | 2 +- .../pins/stm32f1/pins_CREALITY_V24S1_301.h | 2 +- Marlin/src/pins/stm32f1/pins_CREALITY_V25S1.h | 2 +- Marlin/src/pins/stm32f1/pins_CREALITY_V4.h | 4 +- Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h | 2 +- Marlin/src/pins/stm32f1/pins_CREALITY_V425.h | 2 +- Marlin/src/pins/stm32f1/pins_CREALITY_V452.h | 2 +- Marlin/src/pins/stm32f1/pins_CREALITY_V453.h | 2 +- Marlin/src/pins/stm32f1/pins_CREALITY_V521.h | 2 +- .../src/pins/stm32f1/pins_ERYONE_ERY32_MINI.h | 10 +-- Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h | 2 +- Marlin/src/pins/stm32f1/pins_FLY_MINI.h | 4 +- Marlin/src/pins/stm32f1/pins_FYSETC_AIO_II.h | 4 +- Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h | 4 +- Marlin/src/pins/stm32f1/pins_GTM32_MINI.h | 2 +- Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h | 2 +- Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h | 2 +- Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h | 2 +- .../src/pins/stm32f1/pins_JGAURORA_A5S_A1.h | 2 +- Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h | 4 +- .../pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h | 2 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h | 2 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h | 2 +- .../pins/stm32f1/pins_MKS_ROBIN_E3_common.h | 2 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h | 2 +- .../src/pins/stm32f1/pins_MKS_ROBIN_LITE3.h | 2 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h | 2 +- .../src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h | 2 +- .../pins/stm32f1/pins_MKS_ROBIN_NANO_common.h | 4 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h | 2 +- Marlin/src/pins/stm32f1/pins_MORPHEUS.h | 2 +- Marlin/src/pins/stm32f1/pins_PANDA_PI_V29.h | 2 +- Marlin/src/pins/stm32f1/pins_SOVOL_V131.h | 4 +- Marlin/src/pins/stm32f1/pins_STM3R_MINI.h | 4 +- Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h | 2 +- Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h | 4 +- Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h | 2 +- Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h | 2 +- Marlin/src/pins/stm32f4/pins_ANET_ET4.h | 2 +- Marlin/src/pins/stm32f4/pins_ARMED.h | 2 +- Marlin/src/pins/stm32f4/pins_ARTILLERY_RUBY.h | 4 +- .../src/pins/stm32f4/pins_BLACK_STM32F407VE.h | 2 +- .../src/pins/stm32f4/pins_BTT_BTT002_V1_0.h | 6 +- Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h | 2 +- Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h | 2 +- .../pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h | 2 +- .../stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h | 2 +- .../pins/stm32f4/pins_BTT_SKR_PRO_common.h | 2 +- .../pins/stm32f4/pins_BTT_SKR_V2_0_common.h | 4 +- Marlin/src/pins/stm32f4/pins_FLYF407ZG.h | 4 +- .../pins/stm32f4/pins_FYSETC_CHEETAH_V20.h | 4 +- Marlin/src/pins/stm32f4/pins_FYSETC_S6.h | 4 +- .../pins/stm32f4/pins_FYSETC_SPIDER_V2_2.h | 2 +- Marlin/src/pins/stm32f4/pins_LERDGE_K.h | 4 +- Marlin/src/pins/stm32f4/pins_LERDGE_S.h | 2 +- Marlin/src/pins/stm32f4/pins_LERDGE_X.h | 4 +- .../pins/stm32f4/pins_MKS_MONSTER8_common.h | 2 +- Marlin/src/pins/stm32f4/pins_MKS_ROBIN2.h | 2 +- .../stm32f4/pins_MKS_ROBIN_NANO_V3_common.h | 2 +- .../src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h | 2 +- Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h | 2 +- .../src/pins/stm32f4/pins_OPULO_LUMEN_REV3.h | 2 +- .../src/pins/stm32f4/pins_OPULO_LUMEN_REV4.h | 2 +- Marlin/src/pins/stm32f4/pins_RUMBA32_common.h | 2 +- .../src/pins/stm32f4/pins_TH3D_EZBOARD_V2.h | 4 +- Marlin/src/pins/stm32f4/pins_TRONXY_V10.h | 2 +- Marlin/src/pins/stm32f4/pins_VAKE403D.h | 4 +- Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h | 4 +- Marlin/src/pins/stm32f7/pins_REMRAM_V1.h | 4 +- Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h | 2 +- .../pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h | 2 +- .../pins/stm32g0/pins_BTT_MANTA_M4P_V1_0.h | 2 +- .../pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h | 2 +- .../pins/stm32g0/pins_BTT_MANTA_M8P_common.h | 2 +- .../pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h | 2 +- .../pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h | 2 +- .../pins/stm32h7/pins_BTT_SKR_SE_BX_common.h | 2 +- .../pins/stm32h7/pins_BTT_SKR_V3_0_common.h | 4 +- Marlin/src/pins/teensy2/pins_5DPRINT.h | 4 +- Marlin/src/pins/teensy2/pins_BRAINWAVE.h | 4 +- Marlin/src/pins/teensy2/pins_BRAINWAVE_PRO.h | 4 +- Marlin/src/pins/teensy2/pins_PRINTRBOARD.h | 4 +- .../src/pins/teensy2/pins_PRINTRBOARD_REVF.h | 4 +- Marlin/src/pins/teensy2/pins_SAV_MKI.h | 4 +- Marlin/src/pins/teensy2/pins_TEENSY2.h | 4 +- Marlin/src/pins/teensy2/pins_TEENSYLU.h | 4 +- Marlin/src/pins/teensy3/pins_TEENSY31_32.h | 4 +- Marlin/src/pins/teensy3/pins_TEENSY35_36.h | 6 +- Marlin/src/pins/teensy4/pins_TEENSY41.h | 8 +- .../PeripheralPins.c | 2 +- 226 files changed, 380 insertions(+), 466 deletions(-) diff --git a/Marlin/src/HAL/AVR/fastio.h b/Marlin/src/HAL/AVR/fastio.h index 8a5e4650f4..4516d9cd54 100644 --- a/Marlin/src/HAL/AVR/fastio.h +++ b/Marlin/src/HAL/AVR/fastio.h @@ -255,84 +255,6 @@ enum ClockSource2 : uint8_t { #define SET_FOCB(T,V) SET_FOC(T,B,V) #define SET_FOCC(T,V) SET_FOC(T,C,V) -#if 0 - -/** - * PWM availability macros - */ - -// Determine which hardware PWMs are already in use -#define _PWM_CHK_FAN_B(P) (P == E0_AUTO_FAN_PIN || P == E1_AUTO_FAN_PIN || P == E2_AUTO_FAN_PIN || P == E3_AUTO_FAN_PIN || P == E4_AUTO_FAN_PIN || P == E5_AUTO_FAN_PIN || P == E6_AUTO_FAN_PIN || P == E7_AUTO_FAN_PIN || P == CHAMBER_AUTO_FAN_PIN || P == COOLER_AUTO_FAN_PIN) -#if PIN_EXISTS(CONTROLLER_FAN) - #define PWM_CHK_FAN_B(P) (_PWM_CHK_FAN_B(P) || P == CONTROLLER_FAN_PIN) -#else - #define PWM_CHK_FAN_B(P) _PWM_CHK_FAN_B(P) -#endif - -#if ANY_PIN(FAN, FAN1, FAN2, FAN3, FAN4, FAN5, FAN6, FAN7) - #if PIN_EXISTS(FAN7) - #define PWM_CHK_FAN_A(P) (P == FAN0_PIN || P == FAN1_PIN || P == FAN2_PIN || P == FAN3_PIN || P == FAN4_PIN || P == FAN5_PIN || P == FAN6_PIN || P == FAN7_PIN) - #elif PIN_EXISTS(FAN6) - #define PWM_CHK_FAN_A(P) (P == FAN0_PIN || P == FAN1_PIN || P == FAN2_PIN || P == FAN3_PIN || P == FAN4_PIN || P == FAN5_PIN || P == FAN6_PIN) - #elif PIN_EXISTS(FAN5) - #define PWM_CHK_FAN_A(P) (P == FAN0_PIN || P == FAN1_PIN || P == FAN2_PIN || P == FAN3_PIN || P == FAN4_PIN || P == FAN5_PIN) - #elif PIN_EXISTS(FAN4) - #define PWM_CHK_FAN_A(P) (P == FAN0_PIN || P == FAN1_PIN || P == FAN2_PIN || P == FAN3_PIN || P == FAN4_PIN) - #elif PIN_EXISTS(FAN3) - #define PWM_CHK_FAN_A(P) (P == FAN0_PIN || P == FAN1_PIN || P == FAN2_PIN || P == FAN3_PIN) - #elif PIN_EXISTS(FAN2) - #define PWM_CHK_FAN_A(P) (P == FAN0_PIN || P == FAN1_PIN || P == FAN2_PIN) - #elif PIN_EXISTS(FAN1) - #define PWM_CHK_FAN_A(P) (P == FAN0_PIN || P == FAN1_PIN) - #else - #define PWM_CHK_FAN_A(P) (P == FAN0_PIN) - #endif -#else - #define PWM_CHK_FAN_A(P) false -#endif - -#if HAS_MOTOR_CURRENT_PWM - #if PIN_EXISTS(MOTOR_CURRENT_PWM_XY) - #define PWM_CHK_MOTOR_CURRENT(P) (P == MOTOR_CURRENT_PWM_E_PIN || P == MOTOR_CURRENT_PWM_E0_PIN || P == MOTOR_CURRENT_PWM_E1_PIN || P == MOTOR_CURRENT_PWM_Z_PIN || P == MOTOR_CURRENT_PWM_XY_PIN) - #elif PIN_EXISTS(MOTOR_CURRENT_PWM_Z) - #define PWM_CHK_MOTOR_CURRENT(P) (P == MOTOR_CURRENT_PWM_E_PIN || P == MOTOR_CURRENT_PWM_E0_PIN || P == MOTOR_CURRENT_PWM_E1_PIN || P == MOTOR_CURRENT_PWM_Z_PIN) - #else - #define PWM_CHK_MOTOR_CURRENT(P) (P == MOTOR_CURRENT_PWM_E_PIN || P == MOTOR_CURRENT_PWM_E0_PIN || P == MOTOR_CURRENT_PWM_E1_PIN) - #endif -#else - #define PWM_CHK_MOTOR_CURRENT(P) false -#endif - -#ifdef NUM_SERVOS - #if AVR_ATmega2560_FAMILY - #define PWM_CHK_SERVO(P) (P == 5 || (NUM_SERVOS > 12 && P == 6) || (NUM_SERVOS > 24 && P == 46)) // PWMS 3A, 4A & 5A - #elif AVR_ATmega2561_FAMILY - #define PWM_CHK_SERVO(P) (P == 5) // PWM3A - #elif AVR_ATmega1284_FAMILY - #define PWM_CHK_SERVO(P) false - #elif AVR_AT90USB1286_FAMILY - #define PWM_CHK_SERVO(P) (P == 16) // PWM3A - #elif AVR_ATmega328_FAMILY - #define PWM_CHK_SERVO(P) false - #endif -#else - #define PWM_CHK_SERVO(P) false -#endif - -#if ENABLED(BARICUDA) - #if HAS_HEATER_1 && HAS_HEATER_2 - #define PWM_CHK_HEATER(P) (P == HEATER_1_PIN || P == HEATER_2_PIN) - #elif HAS_HEATER_1 - #define PWM_CHK_HEATER(P) (P == HEATER_1_PIN) - #endif -#else - #define PWM_CHK_HEATER(P) false -#endif - -#define PWM_CHK(P) (PWM_CHK_HEATER(P) || PWM_CHK_SERVO(P) || PWM_CHK_MOTOR_CURRENT(P) || PWM_CHK_FAN_A(P) || PWM_CHK_FAN_B(P)) - -#endif // PWM_CHK is not used in Marlin - // define which hardware PWMs are available for the current CPU // all timer 1 PWMS deleted from this list because they are never available #if AVR_ATmega2560_FAMILY diff --git a/Marlin/src/HAL/AVR/inc/SanityCheck.h b/Marlin/src/HAL/AVR/inc/SanityCheck.h index ff1610f741..45aa3a50b9 100644 --- a/Marlin/src/HAL/AVR/inc/SanityCheck.h +++ b/Marlin/src/HAL/AVR/inc/SanityCheck.h @@ -69,8 +69,8 @@ /** * Checks for SOFT PWM */ -#if HAS_FAN0 && FAN_PIN == 9 && DISABLED(FAN_SOFT_PWM) && ENABLED(SPEAKER) - #error "FAN_PIN 9 Hardware PWM uses Timer 2 which conflicts with Arduino AVR Tone Timer (for SPEAKER)." +#if HAS_FAN0 && FAN0_PIN == 9 && DISABLED(FAN_SOFT_PWM) && ENABLED(SPEAKER) + #error "FAN0_PIN 9 Hardware PWM uses Timer 2 which conflicts with Arduino AVR Tone Timer (for SPEAKER)." #error "Disable SPEAKER or enable FAN_SOFT_PWM." #endif diff --git a/Marlin/src/HAL/STM32/inc/SanityCheck.h b/Marlin/src/HAL/STM32/inc/SanityCheck.h index e8ddfa1720..eaad8db4d3 100644 --- a/Marlin/src/HAL/STM32/inc/SanityCheck.h +++ b/Marlin/src/HAL/STM32/inc/SanityCheck.h @@ -55,7 +55,7 @@ * Check for common serial pin conflicts */ #define _CHECK_SERIAL_PIN(N) (( \ - BTN_EN1 == N || DOGLCD_CS == N || HEATER_BED_PIN == N || FAN_PIN == N || \ + BTN_EN1 == N || DOGLCD_CS == N || HEATER_BED_PIN == N || FAN0_PIN == N || \ SDIO_D2_PIN == N || SDIO_D3_PIN == N || SDIO_CK_PIN == N || SDIO_CMD_PIN == N \ )) #define CHECK_SERIAL_PIN(T,N) defined(UART##N##_##T##_PIN) && _CHECK_SERIAL_PIN(UART##N##_##T##_PIN) diff --git a/Marlin/src/HAL/STM32F1/timers.h b/Marlin/src/HAL/STM32F1/timers.h index 0cd807fc84..557522f336 100644 --- a/Marlin/src/HAL/STM32F1/timers.h +++ b/Marlin/src/HAL/STM32F1/timers.h @@ -81,7 +81,7 @@ typedef uint16_t hal_timer_t; #endif #if MB(BTT_SKR_MINI_E3_V1_0, BTT_SKR_E3_DIP, BTT_SKR_MINI_E3_V1_2, MKS_ROBIN_LITE, MKS_ROBIN_E3D, MKS_ROBIN_E3) - // SKR Mini E3 boards use PA8 as FAN_PIN, so TIMER 1 is used for Fan PWM. + // SKR Mini E3 boards use PA8 as FAN0_PIN, so TIMER 1 is used for Fan PWM. #ifdef STM32_HIGH_DENSITY #define MF_TIMER_SERVO0 8 // tone.cpp uses Timer 4 #else diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 1377c8e73f..f137d48859 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -2631,16 +2631,12 @@ #define _NOT_E_AUTO(N,F) (E##N##_AUTO_FAN_PIN != FAN##F##_PIN) #define _HAS_FAN(F) (PIN_EXISTS(FAN##F) \ && CONTROLLER_FAN_PIN != FAN##F##_PIN \ - && _NOT_E_AUTO(0,F) \ - && _NOT_E_AUTO(1,F) \ - && _NOT_E_AUTO(2,F) \ - && _NOT_E_AUTO(3,F) \ - && _NOT_E_AUTO(4,F) \ - && _NOT_E_AUTO(5,F) \ - && _NOT_E_AUTO(6,F) \ - && _NOT_E_AUTO(7,F) \ + && _NOT_E_AUTO(0,F) && _NOT_E_AUTO(1,F) \ + && _NOT_E_AUTO(2,F) && _NOT_E_AUTO(3,F) \ + && _NOT_E_AUTO(4,F) && _NOT_E_AUTO(5,F) \ + && _NOT_E_AUTO(6,F) && _NOT_E_AUTO(7,F) \ && F < MAX_FANS) -#if PIN_EXISTS(FAN) +#if _HAS_FAN(0) #define HAS_FAN0 1 #endif #if _HAS_FAN(1) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index feb01e533a..6052fcb70c 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -682,6 +682,8 @@ #error "PROBE_PT_[123]_[XY] is now defined using PROBE_PT_[123] with an array { x, y }." #elif defined(SQUARE_WAVE_STEPPING) #error "SQUARE_WAVE_STEPPING is now EDGE_STEPPING." +#elif defined(FAN_PIN) + #error "FAN_PIN is now FAN0_PIN." #endif // L64xx stepper drivers have been removed @@ -2371,21 +2373,21 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS */ #if HAS_AUTO_FAN #if HAS_FAN0 - #if PIN_EXISTS(E0_AUTO_FAN) && E0_AUTO_FAN_PIN == FAN_PIN - #error "You cannot set E0_AUTO_FAN_PIN equal to FAN_PIN." - #elif PIN_EXISTS(E1_AUTO_FAN) && E1_AUTO_FAN_PIN == FAN_PIN - #error "You cannot set E1_AUTO_FAN_PIN equal to FAN_PIN." - #elif PIN_EXISTS(E2_AUTO_FAN) && E2_AUTO_FAN_PIN == FAN_PIN - #error "You cannot set E2_AUTO_FAN_PIN equal to FAN_PIN." - #elif PIN_EXISTS(E3_AUTO_FAN) && E3_AUTO_FAN_PIN == FAN_PIN - #error "You cannot set E3_AUTO_FAN_PIN equal to FAN_PIN." + #if PIN_EXISTS(E0_AUTO_FAN) && E0_AUTO_FAN_PIN == FAN0_PIN + #error "You cannot set E0_AUTO_FAN_PIN equal to FAN0_PIN." + #elif PIN_EXISTS(E1_AUTO_FAN) && E1_AUTO_FAN_PIN == FAN0_PIN + #error "You cannot set E1_AUTO_FAN_PIN equal to FAN0_PIN." + #elif PIN_EXISTS(E2_AUTO_FAN) && E2_AUTO_FAN_PIN == FAN0_PIN + #error "You cannot set E2_AUTO_FAN_PIN equal to FAN0_PIN." + #elif PIN_EXISTS(E3_AUTO_FAN) && E3_AUTO_FAN_PIN == FAN0_PIN + #error "You cannot set E3_AUTO_FAN_PIN equal to FAN0_PIN." #endif #endif #endif #if HAS_FAN0 - #if CONTROLLER_FAN_PIN == FAN_PIN - #error "You cannot set CONTROLLER_FAN_PIN equal to FAN_PIN." + #if CONTROLLER_FAN_PIN == FAN0_PIN + #error "You cannot set CONTROLLER_FAN_PIN equal to FAN0_PIN." #elif ENABLED(FAN_SOFT_PWM_REQUIRED) && DISABLED(FAN_SOFT_PWM) #error "FAN_SOFT_PWM is required for your board. Enable it to continue." #endif @@ -2427,8 +2429,8 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #if NEED_CASE_LIGHT_PIN #if !PIN_EXISTS(CASE_LIGHT) #error "CASE_LIGHT_ENABLE requires CASE_LIGHT_PIN, CASE_LIGHT_USE_NEOPIXEL, or CASE_LIGHT_USE_RGB_LED." - #elif CASE_LIGHT_PIN == FAN_PIN - #error "CASE_LIGHT_PIN conflicts with FAN_PIN. Resolve before continuing." + #elif CASE_LIGHT_PIN == FAN0_PIN + #error "CASE_LIGHT_PIN conflicts with FAN0_PIN. Resolve before continuing." #endif #endif @@ -4191,11 +4193,11 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive."); #elif !(defined(SPEED_POWER_MIN) && defined(SPEED_POWER_MAX) && defined(SPEED_POWER_STARTUP)) #error "SPINDLE_LASER_USE_PWM equation constant(s) missing." #elif _PIN_CONFLICT(X_MIN) - #error "SPINDLE_LASER_USE_PWM pin conflicts with X_MIN_PIN." + #error "SPINDLE_LASER_PWM_PIN conflicts with X_MIN_PIN." #elif _PIN_CONFLICT(X_MAX) - #error "SPINDLE_LASER_USE_PWM pin conflicts with X_MAX_PIN." + #error "SPINDLE_LASER_PWM_PIN conflicts with X_MAX_PIN." #elif _PIN_CONFLICT(Z_STEP) - #error "SPINDLE_LASER_USE_PWM pin conflicts with Z_STEP_PIN." + #error "SPINDLE_LASER_PWM_PIN conflicts with Z_STEP_PIN." #elif _PIN_CONFLICT(CASE_LIGHT) #error "SPINDLE_LASER_PWM_PIN conflicts with CASE_LIGHT_PIN." #elif _PIN_CONFLICT(E0_AUTO_FAN) @@ -4215,7 +4217,7 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive."); #elif _PIN_CONFLICT(E7_AUTO_FAN) #error "SPINDLE_LASER_PWM_PIN conflicts with E7_AUTO_FAN_PIN." #elif _PIN_CONFLICT(FAN) - #error "SPINDLE_LASER_PWM_PIN conflicts with FAN_PIN." + #error "SPINDLE_LASER_PWM_PIN conflicts with FAN0_PIN." #elif _PIN_CONFLICT(FAN1) #error "SPINDLE_LASER_PWM_PIN conflicts with FAN1_PIN." #elif _PIN_CONFLICT(FAN2) diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index ba2563ccdc..ad467070d1 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -2677,7 +2677,7 @@ void Temperature::init() { #endif #if HAS_FAN0 - INIT_FAN_PIN(FAN_PIN); + INIT_FAN_PIN(FAN0_PIN); #endif #if HAS_FAN1 INIT_FAN_PIN(FAN1_PIN); diff --git a/Marlin/src/pins/esp32/pins_E4D.h b/Marlin/src/pins/esp32/pins_E4D.h index d12b5276b7..15b697a85b 100644 --- a/Marlin/src/pins/esp32/pins_E4D.h +++ b/Marlin/src/pins/esp32/pins_E4D.h @@ -90,7 +90,7 @@ // Heaters / Fans // #define HEATER_0_PIN 2 -#define FAN_PIN 0 +#define FAN0_PIN 0 #define HEATER_BED_PIN 15 // diff --git a/Marlin/src/pins/esp32/pins_ENWI_ESPNP.h b/Marlin/src/pins/esp32/pins_ENWI_ESPNP.h index 80923d972d..e911900b1d 100644 --- a/Marlin/src/pins/esp32/pins_ENWI_ESPNP.h +++ b/Marlin/src/pins/esp32/pins_ENWI_ESPNP.h @@ -101,7 +101,7 @@ // General use mosfets, useful for things like pumps and solenoids // Shift register pins 128, 129, 130 and 131 are broken out and can be used -#define FAN_PIN 132 +#define FAN0_PIN 132 #define FAN1_PIN 134 #define FAN2_PIN 135 #define FAN3_PIN 136 diff --git a/Marlin/src/pins/esp32/pins_ESP32.h b/Marlin/src/pins/esp32/pins_ESP32.h index 266de7e9f6..1c01be8a88 100644 --- a/Marlin/src/pins/esp32/pins_ESP32.h +++ b/Marlin/src/pins/esp32/pins_ESP32.h @@ -79,7 +79,7 @@ // Heaters / Fans // #define HEATER_0_PIN 2 -#define FAN_PIN 13 +#define FAN0_PIN 13 #define HEATER_BED_PIN 4 // SPI diff --git a/Marlin/src/pins/esp32/pins_ESPA_common.h b/Marlin/src/pins/esp32/pins_ESPA_common.h index ca949cdf97..36068150f7 100644 --- a/Marlin/src/pins/esp32/pins_ESPA_common.h +++ b/Marlin/src/pins/esp32/pins_ESPA_common.h @@ -68,7 +68,7 @@ // Heaters / Fans // #define HEATER_0_PIN 2 -#define FAN_PIN 13 +#define FAN0_PIN 13 #define HEATER_BED_PIN 4 // diff --git a/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h b/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h index 37ce4ee94e..791ddcab41 100644 --- a/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h +++ b/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h @@ -104,7 +104,7 @@ // #define HEATER_0_PIN 145 #define HEATER_1_PIN 146 -#define FAN_PIN 147 +#define FAN0_PIN 147 #define FAN1_PIN 148 #define HEATER_BED_PIN 144 diff --git a/Marlin/src/pins/esp32/pins_MRR_ESPE.h b/Marlin/src/pins/esp32/pins_MRR_ESPE.h index f372de9e01..b95e54841e 100644 --- a/Marlin/src/pins/esp32/pins_MRR_ESPE.h +++ b/Marlin/src/pins/esp32/pins_MRR_ESPE.h @@ -102,7 +102,7 @@ // Heaters / Fans // #define HEATER_0_PIN 145 // 2 -#define FAN_PIN 146 // 15 +#define FAN0_PIN 146 // 15 #define HEATER_BED_PIN 144 // 4 #define CONTROLLER_FAN_PIN 147 diff --git a/Marlin/src/pins/esp32/pins_PANDA_common.h b/Marlin/src/pins/esp32/pins_PANDA_common.h index afc9a78aec..2325805676 100644 --- a/Marlin/src/pins/esp32/pins_PANDA_common.h +++ b/Marlin/src/pins/esp32/pins_PANDA_common.h @@ -74,7 +74,7 @@ // #define HEATER_0_PIN 108 #define HEATER_BED_PIN 109 -#define FAN_PIN 118 // FAN0 +#define FAN0_PIN 118 // FAN0 #define FAN1_PIN 119 // FAN1 #ifndef E0_AUTO_FAN_PIN diff --git a/Marlin/src/pins/linux/pins_RAMPS_LINUX.h b/Marlin/src/pins/linux/pins_RAMPS_LINUX.h index 3e8814c3ee..bfef46c945 100644 --- a/Marlin/src/pins/linux/pins_RAMPS_LINUX.h +++ b/Marlin/src/pins/linux/pins_RAMPS_LINUX.h @@ -161,21 +161,21 @@ #define HEATER_0_PIN MOSFET_A_PIN #if FET_ORDER_EFB // Hotend, Fan, Bed - #define FAN_PIN MOSFET_B_PIN + #define FAN0_PIN MOSFET_B_PIN #define HEATER_BED_PIN MOSFET_C_PIN #elif FET_ORDER_EEF // Hotend, Hotend, Fan #define HEATER_1_PIN MOSFET_B_PIN - #define FAN_PIN MOSFET_C_PIN + #define FAN0_PIN MOSFET_C_PIN #elif FET_ORDER_EEB // Hotend, Hotend, Bed #define HEATER_1_PIN MOSFET_B_PIN #define HEATER_BED_PIN MOSFET_C_PIN #elif FET_ORDER_EFF // Hotend, Fan, Fan - #define FAN_PIN MOSFET_B_PIN + #define FAN0_PIN MOSFET_B_PIN #define FAN1_PIN MOSFET_C_PIN #elif FET_ORDER_SF // Spindle, Fan - #define FAN_PIN MOSFET_C_PIN + #define FAN0_PIN MOSFET_C_PIN #else // Non-specific are "EFB" (i.e., "EFBF" or "EFBE") - #define FAN_PIN MOSFET_B_PIN + #define FAN0_PIN MOSFET_B_PIN #define HEATER_BED_PIN MOSFET_C_PIN #if HOTENDS == 1 && DISABLED(HEATERS_PARALLEL) #define FAN1_PIN MOSFET_D_PIN @@ -184,8 +184,8 @@ #endif #endif -#ifndef FAN_PIN - #define FAN_PIN 4 // IO pin. Buffer needed +#ifndef FAN0_PIN + #define FAN0_PIN 4 // IO pin. Buffer needed #endif // diff --git a/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h b/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h index 657eb8a046..ca8010493b 100644 --- a/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h +++ b/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h @@ -82,8 +82,8 @@ // EFB #define HEATER_0_PIN P2_04 #define HEATER_BED_PIN P2_05 -#ifndef FAN_PIN - #define FAN_PIN P2_07 +#ifndef FAN0_PIN + #define FAN0_PIN P2_07 #endif #define FAN1_PIN P0_26 diff --git a/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h b/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h index 7215150d0b..7115cea0bd 100644 --- a/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h +++ b/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h @@ -97,8 +97,8 @@ // #define HEATER_0_PIN P2_07 #define HEATER_BED_PIN P2_05 -#ifndef FAN_PIN - #define FAN_PIN P2_04 +#ifndef FAN0_PIN + #define FAN0_PIN P2_04 #endif // @@ -168,7 +168,7 @@ * PWM1.4 P1_23 * PWM1.4 P2_3 E0_STEP_PIN * PWM1.5 P1_24 X_MIN_PIN - * PWM1.5 P2_4 FAN_PIN + * PWM1.5 P2_4 FAN0_PIN * PWM1.6 P1_26 Y_MIN_PIN * PWM1.6 P2_5 HEATER_BED_PIN */ diff --git a/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h b/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h index 2c0d52ef9a..d5f1d0a296 100644 --- a/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h +++ b/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h @@ -74,8 +74,8 @@ // #define HEATER_0_PIN P2_07 #define HEATER_BED_PIN P2_05 -#ifndef FAN_PIN - #define FAN_PIN P2_04 +#ifndef FAN0_PIN + #define FAN0_PIN P2_04 #endif // @@ -147,7 +147,7 @@ * PWM1.4 P1_23 * PWM1.4 P2_3 E0_STEP_PIN * PWM1.5 P1_24 X_MIN_PIN - * PWM1.5 P2_4 FAN_PIN + * PWM1.5 P2_4 FAN0_PIN * PWM1.6 P1_26 Y_MIN_PIN * PWM1.6 P2_5 HEATER_BED_PIN */ diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h index ec74cc640e..2b01b4ce6f 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h @@ -101,8 +101,8 @@ #define HEATER_1_PIN P2_04 #endif #endif -#ifndef FAN_PIN - #define FAN_PIN P2_03 +#ifndef FAN0_PIN + #define FAN0_PIN P2_03 #endif #ifndef HEATER_BED_PIN #define HEATER_BED_PIN P2_05 diff --git a/Marlin/src/pins/lpc1768/pins_EMOTRONIC.h b/Marlin/src/pins/lpc1768/pins_EMOTRONIC.h index 9e62be8edb..43a9b786eb 100644 --- a/Marlin/src/pins/lpc1768/pins_EMOTRONIC.h +++ b/Marlin/src/pins/lpc1768/pins_EMOTRONIC.h @@ -87,7 +87,7 @@ #define HEATER_0_PIN P2_06 // (H2: 10A shared) #define HEATER_1_PIN P2_07 // (H3: 10A shared) -#define FAN_PIN P2_11 // (FAN0: 1A) +#define FAN0_PIN P2_11 // (FAN0: 1A) #define FAN1_PIN P2_13 // (FAN1: 1A) // diff --git a/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h b/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h index aedbd7be60..63760d962b 100644 --- a/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h +++ b/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h @@ -123,7 +123,7 @@ // #define HEATER_BED_PIN P1_19 // Not a PWM pin, software PWM required #define HEATER_0_PIN P3_26 // PWM1[3] -#define FAN_PIN P3_25 // Part cooling fan - connected to PWM1[2] +#define FAN0_PIN P3_25 // Part cooling fan - connected to PWM1[2] #define E0_AUTO_FAN_PIN P0_27 // Extruder cooling fan // diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h index 9f67a01c4e..9218bb168d 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h @@ -101,8 +101,8 @@ #define HEATER_BED_PIN P2_05 #define HEATER_0_PIN P2_07 #define HEATER_1_PIN P2_06 -#ifndef FAN_PIN - #define FAN_PIN P2_04 +#ifndef FAN0_PIN + #define FAN0_PIN P2_04 #endif // diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h index 1235e44ec9..155d53c780 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h @@ -209,8 +209,8 @@ #define HEATER_1_PIN P2_06 #endif #endif -#ifndef FAN_PIN - #define FAN_PIN P2_04 +#ifndef FAN0_PIN + #define FAN0_PIN P2_04 #endif // diff --git a/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h b/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h index 893a8a755b..b9edef8678 100644 --- a/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h +++ b/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h @@ -203,15 +203,15 @@ #endif #endif -#ifndef FAN_PIN +#ifndef FAN0_PIN #if EITHER(FET_ORDER_EFB, FET_ORDER_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan - #define FAN_PIN MOSFET_B_PIN + #define FAN0_PIN MOSFET_B_PIN #elif EITHER(FET_ORDER_EEF, FET_ORDER_SF) // Hotend, Hotend, Fan or Spindle, Fan - #define FAN_PIN MOSFET_C_PIN + #define FAN0_PIN MOSFET_C_PIN #elif FET_ORDER_EEB // Hotend, Hotend, Bed - #define FAN_PIN P1_18 // (4) IO pin. Buffer needed + #define FAN0_PIN P1_18 // (4) IO pin. Buffer needed #else // Non-specific are "EFB" (i.e., "EFBF" or "EFBE") - #define FAN_PIN MOSFET_B_PIN + #define FAN0_PIN MOSFET_B_PIN #endif #endif diff --git a/Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h b/Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h index 30cd76b9a2..996cb52c6c 100644 --- a/Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h +++ b/Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h @@ -87,8 +87,8 @@ #define HEATER_BED2_PIN P2_04 #define HEATER_0_PIN P2_07 #define HEATER_1_PIN P2_06 -#ifndef FAN_PIN - #define FAN_PIN P1_24 +#ifndef FAN0_PIN + #define FAN0_PIN P1_24 #endif #define FAN1_PIN P1_26 diff --git a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h index a9c61cb8c9..9dfb80772f 100644 --- a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h +++ b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h @@ -100,8 +100,8 @@ #define HEATER_BED_PIN P2_07 #define HEATER_0_PIN P2_04 #define HEATER_1_PIN P2_05 -#ifndef FAN_PIN - #define FAN_PIN P0_26 +#ifndef FAN0_PIN + #define FAN0_PIN P0_26 #endif #define FAN1_PIN P1_22 diff --git a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h index eabb338504..2d96194db5 100644 --- a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h +++ b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h @@ -104,8 +104,8 @@ // #define HEATER_BED_PIN P2_07 #define HEATER_0_PIN P2_05 -#ifndef FAN_PIN - #define FAN_PIN P0_26 +#ifndef FAN0_PIN + #define FAN0_PIN P0_26 #endif #define FAN1_PIN P1_25 diff --git a/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h b/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h index f62818dd9f..70f7f748c0 100644 --- a/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h +++ b/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h @@ -179,7 +179,7 @@ #define HEATER_0_PIN P2_03 // EXTRUDER 0 #define HEATER_1_PIN P2_04 // EXTRUDER 1 #define HEATER_BED_PIN P2_05 // BED -#define FAN_PIN P2_01 +#define FAN0_PIN P2_01 #define FAN1_PIN P2_02 #ifndef CONTROLLER_FAN_PIN diff --git a/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h b/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h index 5c9355de29..fa389f4924 100644 --- a/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h +++ b/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h @@ -94,8 +94,8 @@ // #define HEATER_BED_PIN P2_05 #define HEATER_0_PIN P2_07 // FET 1 -#ifndef FAN_PIN - #define FAN_PIN P2_06 // FET 3 +#ifndef FAN0_PIN + #define FAN0_PIN P2_06 // FET 3 #endif // @@ -125,7 +125,7 @@ #define SPINDLE_LASER_ENA_PIN P2_07 // FET 1 #undef HEATER_BED_PIN #define SPINDLE_LASER_PWM_PIN P2_05 // Bed FET - #undef FAN_PIN + #undef FAN0_PIN #define SPINDLE_DIR_PIN P2_06 // FET 3 #endif diff --git a/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h b/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h index 5083a0ed48..2d44a3859b 100644 --- a/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h +++ b/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h @@ -119,8 +119,8 @@ #define HEATER_0_PIN P2_07 // FET 1 #define HEATER_1_PIN P1_23 // FET 2 #define HEATER_2_PIN P1_22 // FET 3 -#ifndef FAN_PIN - #define FAN_PIN P2_06 // FET 4 +#ifndef FAN0_PIN + #define FAN0_PIN P2_06 // FET 4 #endif // @@ -152,7 +152,7 @@ #if HAS_CUTTER #undef HEATER_0_PIN #undef HEATER_BED_PIN - #undef FAN_PIN + #undef FAN0_PIN #define SPINDLE_LASER_ENA_PIN P2_07 // FET 1 #define SPINDLE_LASER_PWM_PIN P2_05 // Bed FET #define SPINDLE_DIR_PIN P2_06 // FET 4 diff --git a/Marlin/src/pins/lpc1769/pins_FLY_CDY.h b/Marlin/src/pins/lpc1769/pins_FLY_CDY.h index ed0ce30eb3..796df12e75 100644 --- a/Marlin/src/pins/lpc1769/pins_FLY_CDY.h +++ b/Marlin/src/pins/lpc1769/pins_FLY_CDY.h @@ -144,8 +144,8 @@ #define HEATER_0_PIN P3_25 #define HEATER_1_PIN P1_20 #define HEATER_2_PIN P1_23 -#ifndef FAN_PIN - #define FAN_PIN P1_18 +#ifndef FAN0_PIN + #define FAN0_PIN P1_18 #endif #define FAN1_PIN P1_21 #define FAN2_PIN P1_24 diff --git a/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h b/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h index 54b771d318..f49aae0c45 100644 --- a/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h +++ b/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h @@ -229,8 +229,8 @@ #define FAN2_PIN P2_06 // HE1 for FAN3 #endif #endif -#ifndef FAN_PIN - #define FAN_PIN P2_04 // FAN1 +#ifndef FAN0_PIN + #define FAN0_PIN P2_04 // FAN1 #endif #ifndef FAN1_PIN #define FAN1_PIN P1_04 // FAN2 diff --git a/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h b/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h index 124c8f63c2..c8526611d0 100644 --- a/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h +++ b/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h @@ -85,8 +85,8 @@ #define HEATER_BED_PIN P2_05 #define HEATER_0_PIN P2_07 #define HEATER_1_PIN P1_23 -#ifndef FAN_PIN - #define FAN_PIN P2_06 +#ifndef FAN0_PIN + #define FAN0_PIN P2_06 #endif #define FAN1_PIN P2_04 diff --git a/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h b/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h index 12a7934a3e..8ad3cd2821 100644 --- a/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h +++ b/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h @@ -119,8 +119,8 @@ // #define HEATER_BED_PIN P2_05 #define HEATER_0_PIN P2_07 -#ifndef FAN_PIN - #define FAN_PIN P2_06 +#ifndef FAN0_PIN + #define FAN0_PIN P2_06 #endif #define FAN1_PIN P1_22 diff --git a/Marlin/src/pins/mega/pins_CHEAPTRONICv2.h b/Marlin/src/pins/mega/pins_CHEAPTRONICv2.h index e81295a653..92c5a6f123 100644 --- a/Marlin/src/pins/mega/pins_CHEAPTRONICv2.h +++ b/Marlin/src/pins/mega/pins_CHEAPTRONICv2.h @@ -86,8 +86,8 @@ #define HEATER_1_PIN 7 #define HEATER_2_PIN 8 #define HEATER_BED_PIN 9 -#ifndef FAN_PIN - #define FAN_PIN 3 +#ifndef FAN0_PIN + #define FAN0_PIN 3 #endif #define FAN2_PIN 58 // additional fan or light control output diff --git a/Marlin/src/pins/mega/pins_CNCONTROLS_11.h b/Marlin/src/pins/mega/pins_CNCONTROLS_11.h index d996635c8c..60d68a8607 100644 --- a/Marlin/src/pins/mega/pins_CNCONTROLS_11.h +++ b/Marlin/src/pins/mega/pins_CNCONTROLS_11.h @@ -93,8 +93,8 @@ #define HEATER_3_PIN 46 #define HEATER_BED_PIN 2 -#ifndef FAN_PIN - //#define FAN_PIN 7 // common PWM pin for all tools +#ifndef FAN0_PIN + //#define FAN0_PIN 7 // common PWM pin for all tools #endif // diff --git a/Marlin/src/pins/mega/pins_CNCONTROLS_12.h b/Marlin/src/pins/mega/pins_CNCONTROLS_12.h index ea82fe429c..5c92f92e29 100644 --- a/Marlin/src/pins/mega/pins_CNCONTROLS_12.h +++ b/Marlin/src/pins/mega/pins_CNCONTROLS_12.h @@ -93,8 +93,8 @@ #define HEATER_3_PIN 3 #define HEATER_BED_PIN 24 -#ifndef FAN_PIN - #define FAN_PIN 5 // 5 is PWMtool3 -> 7 is common PWM pin for all tools +#ifndef FAN0_PIN + #define FAN0_PIN 5 // 5 is PWMtool3 -> 7 is common PWM pin for all tools #endif // diff --git a/Marlin/src/pins/mega/pins_CNCONTROLS_15.h b/Marlin/src/pins/mega/pins_CNCONTROLS_15.h index c77e711f9c..bbb0385844 100644 --- a/Marlin/src/pins/mega/pins_CNCONTROLS_15.h +++ b/Marlin/src/pins/mega/pins_CNCONTROLS_15.h @@ -87,7 +87,7 @@ // // Fans // -#define FAN_PIN 8 +#define FAN0_PIN 8 // // Auto fans diff --git a/Marlin/src/pins/mega/pins_EINSTART-S.h b/Marlin/src/pins/mega/pins_EINSTART-S.h index 274684f337..813cbf7dc4 100644 --- a/Marlin/src/pins/mega/pins_EINSTART-S.h +++ b/Marlin/src/pins/mega/pins_EINSTART-S.h @@ -70,7 +70,7 @@ #define HEATER_0_PIN 83 #define HEATER_BED_PIN 38 -#define FAN_PIN 82 +#define FAN0_PIN 82 // // Misc. Functions diff --git a/Marlin/src/pins/mega/pins_ELEFU_3.h b/Marlin/src/pins/mega/pins_ELEFU_3.h index 6cf9e1b4e1..71797a30ff 100644 --- a/Marlin/src/pins/mega/pins_ELEFU_3.h +++ b/Marlin/src/pins/mega/pins_ELEFU_3.h @@ -92,8 +92,8 @@ #define HEATER_2_PIN 17 // 12V PWM3 #define HEATER_BED_PIN 44 // DOUBLE 12V PWM -#ifndef FAN_PIN - #define FAN_PIN 16 // 5V PWM +#ifndef FAN0_PIN + #define FAN0_PIN 16 // 5V PWM #endif // diff --git a/Marlin/src/pins/mega/pins_GT2560_REV_A.h b/Marlin/src/pins/mega/pins_GT2560_REV_A.h index bb251dfb4e..99e2031706 100644 --- a/Marlin/src/pins/mega/pins_GT2560_REV_A.h +++ b/Marlin/src/pins/mega/pins_GT2560_REV_A.h @@ -95,8 +95,8 @@ #define HEATER_0_PIN 2 #define HEATER_1_PIN 3 #define HEATER_BED_PIN 4 -#ifndef FAN_PIN - #define FAN_PIN 7 +#ifndef FAN0_PIN + #define FAN0_PIN 7 #endif // diff --git a/Marlin/src/pins/mega/pins_GT2560_V3.h b/Marlin/src/pins/mega/pins_GT2560_V3.h index 5d2436b684..e4e51c30b3 100644 --- a/Marlin/src/pins/mega/pins_GT2560_V3.h +++ b/Marlin/src/pins/mega/pins_GT2560_V3.h @@ -138,7 +138,7 @@ #define HEATER_1_PIN 3 #define HEATER_2_PIN 2 #define HEATER_BED_PIN 4 -#define FAN_PIN 9 +#define FAN0_PIN 9 #define FAN1_PIN 8 #define FAN2_PIN 7 diff --git a/Marlin/src/pins/mega/pins_HJC2560C_REV2.h b/Marlin/src/pins/mega/pins_HJC2560C_REV2.h index 1b3b7b29af..ea197e50db 100644 --- a/Marlin/src/pins/mega/pins_HJC2560C_REV2.h +++ b/Marlin/src/pins/mega/pins_HJC2560C_REV2.h @@ -92,8 +92,8 @@ #define HEATER_1_PIN 3 #define HEATER_BED_PIN 4 -#ifndef FAN_PIN - #define FAN_PIN 7 //默认不使用PWM_FAN冷却喷嘴,如果需要,则取消注释 +#ifndef FAN0_PIN + #define FAN0_PIN 7 //默认不使用PWM_FAN冷却喷嘴,如果需要,则取消注释 #endif // diff --git a/Marlin/src/pins/mega/pins_INTAMSYS40.h b/Marlin/src/pins/mega/pins_INTAMSYS40.h index ec466fb09f..903849a140 100644 --- a/Marlin/src/pins/mega/pins_INTAMSYS40.h +++ b/Marlin/src/pins/mega/pins_INTAMSYS40.h @@ -99,7 +99,7 @@ #define HEATER_0_PIN 2 // PWM #define HEATER_BED_PIN 4 // PWM #define HEATER_CHAMBER_PIN 3 // PWM -#define FAN_PIN 7 // PWM +#define FAN0_PIN 7 // PWM // // Misc. Functions diff --git a/Marlin/src/pins/mega/pins_LEAPFROG.h b/Marlin/src/pins/mega/pins_LEAPFROG.h index 3762ea98f0..d986728e72 100644 --- a/Marlin/src/pins/mega/pins_LEAPFROG.h +++ b/Marlin/src/pins/mega/pins_LEAPFROG.h @@ -79,7 +79,7 @@ #define HEATER_2_PIN 11 // 13 #define HEATER_BED_PIN 10 // 14/15 -#define FAN_PIN 7 +#define FAN0_PIN 7 // // Misc. Functions diff --git a/Marlin/src/pins/mega/pins_LEAPFROG_XEED2015.h b/Marlin/src/pins/mega/pins_LEAPFROG_XEED2015.h index 7be96c5def..7b3cb2b723 100644 --- a/Marlin/src/pins/mega/pins_LEAPFROG_XEED2015.h +++ b/Marlin/src/pins/mega/pins_LEAPFROG_XEED2015.h @@ -104,7 +104,7 @@ #define HEATER_1_PIN 9 // Misc Connector, pins 5 and 6 (Out3) #define HEATER_BED_PIN 6 // Misc Connector, pins 9(-) and 10(+) (OutA) -#define FAN_PIN 10 // Misc Connector, pins 7(-) and 8 (+) (Out4) +#define FAN0_PIN 10 // Misc Connector, pins 7(-) and 8 (+) (Out4) #define LED_PIN 13 diff --git a/Marlin/src/pins/mega/pins_MALYAN_M180.h b/Marlin/src/pins/mega/pins_MALYAN_M180.h index 3ef606de77..4eb7928825 100644 --- a/Marlin/src/pins/mega/pins_MALYAN_M180.h +++ b/Marlin/src/pins/mega/pins_MALYAN_M180.h @@ -93,8 +93,8 @@ #define HEATER_1_PIN 11 #define HEATER_BED_PIN 45 -#ifndef FAN_PIN - #define FAN_PIN 7 // M106 Sxxx command supported and tested. M107 as well. +#ifndef FAN0_PIN + #define FAN0_PIN 7 // M106 Sxxx command supported and tested. M107 as well. #endif #ifndef FAN_PIN1 diff --git a/Marlin/src/pins/mega/pins_MEGACONTROLLER.h b/Marlin/src/pins/mega/pins_MEGACONTROLLER.h index f45da25f62..19808817c9 100644 --- a/Marlin/src/pins/mega/pins_MEGACONTROLLER.h +++ b/Marlin/src/pins/mega/pins_MEGACONTROLLER.h @@ -114,8 +114,8 @@ #define HEATER_1_PIN 34 #define HEATER_BED_PIN 28 -#ifndef FAN_PIN - #define FAN_PIN 39 +#ifndef FAN0_PIN + #define FAN0_PIN 39 #endif #define FAN1_PIN 35 #define FAN2_PIN 36 diff --git a/Marlin/src/pins/mega/pins_MEGATRONICS.h b/Marlin/src/pins/mega/pins_MEGATRONICS.h index a51615e3d9..b038c9935c 100644 --- a/Marlin/src/pins/mega/pins_MEGATRONICS.h +++ b/Marlin/src/pins/mega/pins_MEGATRONICS.h @@ -89,8 +89,8 @@ #define HEATER_1_PIN 8 #define HEATER_BED_PIN 10 -#ifndef FAN_PIN - #define FAN_PIN 7 // IO pin. Buffer needed +#ifndef FAN0_PIN + #define FAN0_PIN 7 // IO pin. Buffer needed #endif // diff --git a/Marlin/src/pins/mega/pins_MEGATRONICS_2.h b/Marlin/src/pins/mega/pins_MEGATRONICS_2.h index 3f7afe562b..5ebcbefe08 100644 --- a/Marlin/src/pins/mega/pins_MEGATRONICS_2.h +++ b/Marlin/src/pins/mega/pins_MEGATRONICS_2.h @@ -103,8 +103,8 @@ #define HEATER_1_PIN 8 #define HEATER_BED_PIN 10 -#ifndef FAN_PIN - #define FAN_PIN 7 +#ifndef FAN0_PIN + #define FAN0_PIN 7 #endif #define FAN1_PIN 6 diff --git a/Marlin/src/pins/mega/pins_MEGATRONICS_3.h b/Marlin/src/pins/mega/pins_MEGATRONICS_3.h index b194c31b5d..b3edfc5e17 100644 --- a/Marlin/src/pins/mega/pins_MEGATRONICS_3.h +++ b/Marlin/src/pins/mega/pins_MEGATRONICS_3.h @@ -127,8 +127,8 @@ #define HEATER_2_PIN 8 #define HEATER_BED_PIN 10 -#ifndef FAN_PIN - #define FAN_PIN 6 +#ifndef FAN0_PIN + #define FAN0_PIN 6 #endif #define FAN1_PIN 7 diff --git a/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h b/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h index 221f5124ae..0a1553c64e 100644 --- a/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h +++ b/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h @@ -166,8 +166,8 @@ #ifndef E0_AUTO_FAN_PIN #define E0_AUTO_FAN_PIN MOSFET_D_PIN -#elif !defined(FAN_PIN) - #define FAN_PIN MOSFET_D_PIN +#elif !defined(FAN0_PIN) + #define FAN0_PIN MOSFET_D_PIN #endif #ifndef E1_AUTO_FAN_PIN diff --git a/Marlin/src/pins/mega/pins_MINITRONICS.h b/Marlin/src/pins/mega/pins_MINITRONICS.h index ddf6d2047d..5145cb496d 100644 --- a/Marlin/src/pins/mega/pins_MINITRONICS.h +++ b/Marlin/src/pins/mega/pins_MINITRONICS.h @@ -90,8 +90,8 @@ #define HEATER_1_PIN 8 // EXTRUDER 2 #define HEATER_BED_PIN 3 // BED -#ifndef FAN_PIN - #define FAN_PIN 9 +#ifndef FAN0_PIN + #define FAN0_PIN 9 #endif // diff --git a/Marlin/src/pins/mega/pins_OVERLORD.h b/Marlin/src/pins/mega/pins_OVERLORD.h index 01c02dafe2..3bccbbc741 100644 --- a/Marlin/src/pins/mega/pins_OVERLORD.h +++ b/Marlin/src/pins/mega/pins_OVERLORD.h @@ -95,7 +95,7 @@ #define HEATER_1_PIN 3 #define HEATER_BED_PIN 4 -#define FAN_PIN 7 // material cooling fan +#define FAN0_PIN 7 // material cooling fan // // SD Card diff --git a/Marlin/src/pins/mega/pins_PICA.h b/Marlin/src/pins/mega/pins_PICA.h index 109859388c..3926978e6d 100644 --- a/Marlin/src/pins/mega/pins_PICA.h +++ b/Marlin/src/pins/mega/pins_PICA.h @@ -108,8 +108,8 @@ #endif #define HEATER_BED_PIN 8 // HEAT-BED -#ifndef FAN_PIN - #define FAN_PIN 9 +#ifndef FAN0_PIN + #define FAN0_PIN 9 #endif #ifndef FAN_2_PIN #define FAN_2_PIN 7 diff --git a/Marlin/src/pins/mega/pins_PICAOLD.h b/Marlin/src/pins/mega/pins_PICAOLD.h index 961462fc52..e15b4637b7 100644 --- a/Marlin/src/pins/mega/pins_PICAOLD.h +++ b/Marlin/src/pins/mega/pins_PICAOLD.h @@ -27,7 +27,7 @@ #define HEATER_0_PIN 9 // E0 #define HEATER_1_PIN 10 // E1 -#define FAN_PIN 11 +#define FAN0_PIN 11 #define FAN2_PIN 12 #include "pins_PICA.h" diff --git a/Marlin/src/pins/mega/pins_SILVER_GATE.h b/Marlin/src/pins/mega/pins_SILVER_GATE.h index 6dc0c3963f..dd26a2714c 100644 --- a/Marlin/src/pins/mega/pins_SILVER_GATE.h +++ b/Marlin/src/pins/mega/pins_SILVER_GATE.h @@ -57,8 +57,8 @@ #define FIL_RUNOUT_PIN 34 // X_MAX unless overridden #endif -#ifndef FAN_PIN - #define FAN_PIN 5 +#ifndef FAN0_PIN + #define FAN0_PIN 5 #endif #define HEATER_0_PIN 7 diff --git a/Marlin/src/pins/mega/pins_WANHAO_ONEPLUS.h b/Marlin/src/pins/mega/pins_WANHAO_ONEPLUS.h index 6ab6c4ceb9..e224e06178 100644 --- a/Marlin/src/pins/mega/pins_WANHAO_ONEPLUS.h +++ b/Marlin/src/pins/mega/pins_WANHAO_ONEPLUS.h @@ -76,7 +76,7 @@ // #define HEATER_0_PIN 4 #define HEATER_BED_PIN 44 -#define FAN_PIN 12 // IO pin. Buffer needed +#define FAN0_PIN 12 // IO pin. Buffer needed // // SD Card diff --git a/Marlin/src/pins/mega/pins_WEEDO_62A.h b/Marlin/src/pins/mega/pins_WEEDO_62A.h index 4165d9e234..7b417c19a1 100644 --- a/Marlin/src/pins/mega/pins_WEEDO_62A.h +++ b/Marlin/src/pins/mega/pins_WEEDO_62A.h @@ -74,7 +74,7 @@ // #define HEATER_0_PIN 10 // EXTRUDER 1 #define HEATER_BED_PIN 8 // BED -#define FAN_PIN 4 // IO pin. Buffer needed +#define FAN0_PIN 4 // IO pin. Buffer needed // // Misc. Functions diff --git a/Marlin/src/pins/pinsDebug_list.h b/Marlin/src/pins/pinsDebug_list.h index 27f20b92f7..16dd2a0c45 100644 --- a/Marlin/src/pins/pinsDebug_list.h +++ b/Marlin/src/pins/pinsDebug_list.h @@ -739,8 +739,8 @@ // // Fans // -#if PIN_EXISTS(FAN) - REPORT_NAME_DIGITAL(__LINE__, FAN_PIN) +#if PIN_EXISTS(FAN0) + REPORT_NAME_DIGITAL(__LINE__, FAN0_PIN) #endif #if PIN_EXISTS(FAN1) REPORT_NAME_DIGITAL(__LINE__, FAN1_PIN) diff --git a/Marlin/src/pins/pins_postprocess.h b/Marlin/src/pins/pins_postprocess.h index 8906c3cafb..708eb7f8e6 100644 --- a/Marlin/src/pins/pins_postprocess.h +++ b/Marlin/src/pins/pins_postprocess.h @@ -377,10 +377,9 @@ #undef W_SERIAL_RX_PIN #endif -#ifndef FAN_PIN - #define FAN_PIN -1 +#ifndef FAN0_PIN + #define FAN0_PIN -1 #endif -#define FAN0_PIN FAN_PIN #ifndef FAN1_PIN #define FAN1_PIN -1 #endif diff --git a/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h b/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h index c28fbd059c..be1af14bb1 100644 --- a/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h +++ b/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h @@ -128,11 +128,11 @@ #define HEATER_0_PIN 3 #define HEATER_BED_PIN 4 -#ifndef FAN_PIN +#ifndef FAN0_PIN #ifdef MK3_FAN_PINS - #define FAN_PIN 6 + #define FAN0_PIN 6 #else - #define FAN_PIN 8 + #define FAN0_PIN 8 #endif #endif diff --git a/Marlin/src/pins/rambo/pins_EINSY_RETRO.h b/Marlin/src/pins/rambo/pins_EINSY_RETRO.h index dc91c47e9a..315a17ee03 100644 --- a/Marlin/src/pins/rambo/pins_EINSY_RETRO.h +++ b/Marlin/src/pins/rambo/pins_EINSY_RETRO.h @@ -135,8 +135,8 @@ #define HEATER_0_PIN 3 #define HEATER_BED_PIN 4 -#ifndef FAN_PIN - #define FAN_PIN 8 +#ifndef FAN0_PIN + #define FAN0_PIN 8 #endif #define FAN1_PIN 6 diff --git a/Marlin/src/pins/rambo/pins_MINIRAMBO.h b/Marlin/src/pins/rambo/pins_MINIRAMBO.h index 353fbd6641..da55c1ec07 100644 --- a/Marlin/src/pins/rambo/pins_MINIRAMBO.h +++ b/Marlin/src/pins/rambo/pins_MINIRAMBO.h @@ -109,8 +109,8 @@ #endif #define HEATER_BED_PIN 4 -#ifndef FAN_PIN - #define FAN_PIN 8 +#ifndef FAN0_PIN + #define FAN0_PIN 8 #endif #define FAN1_PIN 6 diff --git a/Marlin/src/pins/rambo/pins_RAMBO.h b/Marlin/src/pins/rambo/pins_RAMBO.h index 3a26811538..7c70c7c753 100644 --- a/Marlin/src/pins/rambo/pins_RAMBO.h +++ b/Marlin/src/pins/rambo/pins_RAMBO.h @@ -140,8 +140,8 @@ #define HEATER_2_PIN 6 #define HEATER_BED_PIN 3 -#ifndef FAN_PIN - #define FAN_PIN 8 +#ifndef FAN0_PIN + #define FAN0_PIN 8 #endif #ifndef FAN1_PIN #define FAN1_PIN 6 diff --git a/Marlin/src/pins/rambo/pins_SCOOVO_X9H.h b/Marlin/src/pins/rambo/pins_SCOOVO_X9H.h index ca073f5ab9..2230eaa35b 100644 --- a/Marlin/src/pins/rambo/pins_SCOOVO_X9H.h +++ b/Marlin/src/pins/rambo/pins_SCOOVO_X9H.h @@ -105,8 +105,8 @@ #define HEATER_1_PIN 7 #define HEATER_BED_PIN 3 -#ifndef FAN_PIN - #define FAN_PIN 8 +#ifndef FAN0_PIN + #define FAN0_PIN 8 #endif #define FAN1_PIN 6 #define FAN2_PIN 2 diff --git a/Marlin/src/pins/ramps/pins_AZTEEG_X3_PRO.h b/Marlin/src/pins/ramps/pins_AZTEEG_X3_PRO.h index 2c666a6f16..b0eee92c72 100644 --- a/Marlin/src/pins/ramps/pins_AZTEEG_X3_PRO.h +++ b/Marlin/src/pins/ramps/pins_AZTEEG_X3_PRO.h @@ -56,8 +56,8 @@ #define Y_STOP_PIN 14 #define Z_STOP_PIN 18 -#ifndef FAN_PIN - #define FAN_PIN 6 +#ifndef FAN0_PIN + #define FAN0_PIN 6 #endif #if ENABLED(CASE_LIGHT_ENABLE) && !PIN_EXISTS(CASE_LIGHT) diff --git a/Marlin/src/pins/ramps/pins_DUPLICATOR_I3_PLUS.h b/Marlin/src/pins/ramps/pins_DUPLICATOR_I3_PLUS.h index 7e370a398b..a147eba9fd 100644 --- a/Marlin/src/pins/ramps/pins_DUPLICATOR_I3_PLUS.h +++ b/Marlin/src/pins/ramps/pins_DUPLICATOR_I3_PLUS.h @@ -72,7 +72,7 @@ #define HEATER_0_PIN 4 // PG5 / PWM4 #define HEATER_BED_PIN 3 // PE5 / PWM3 -#define FAN_PIN 5 // PE3 / PWM5 +#define FAN0_PIN 5 // PE3 / PWM5 // // Misc. Functions diff --git a/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h b/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h index 7bed4c0884..f9e4517a11 100644 --- a/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h +++ b/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h @@ -129,8 +129,8 @@ #define HEATER_1_PIN 7 #define HEATER_BED_PIN 8 -#ifndef FAN_PIN - #define FAN_PIN 9 +#ifndef FAN0_PIN + #define FAN0_PIN 9 #endif #ifndef FIL_RUNOUT_PIN diff --git a/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR2.h b/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR2.h index f0e86ac4a7..d79eb8041c 100644 --- a/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR2.h +++ b/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR2.h @@ -29,7 +29,7 @@ #define BOARD_INFO_NAME "Formbot Raptor2" #define DEFAULT_MACHINE_NAME BOARD_INFO_NAME -#define FAN_PIN 6 +#define FAN0_PIN 6 #ifndef FIL_RUNOUT_PIN #define FIL_RUNOUT_PIN 22 diff --git a/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h b/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h index a5ca7e8607..e671184a53 100644 --- a/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h +++ b/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h @@ -126,7 +126,7 @@ #define HEATER_1_PIN 7 #define HEATER_BED_PIN 58 -#define FAN_PIN 9 +#define FAN0_PIN 9 #if HAS_FILAMENT_SENSOR #define FIL_RUNOUT_PIN 4 diff --git a/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h b/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h index 2fa3d60f67..3babc257b4 100644 --- a/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h +++ b/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h @@ -132,7 +132,7 @@ #define HEATER_1_PIN 7 #define HEATER_BED_PIN 8 -#define FAN_PIN 9 +#define FAN0_PIN 9 #define FAN1_PIN 12 #define FIL_RUNOUT_PIN 22 diff --git a/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h b/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h index 9f23647c42..9cae3797c3 100644 --- a/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h +++ b/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h @@ -185,7 +185,7 @@ #define HEATER_2_PIN 7 #define HEATER_BED_PIN 8 -#define FAN_PIN 44 +#define FAN0_PIN 44 #define FAN1_PIN 45 #define FAN2_PIN 46 diff --git a/Marlin/src/pins/ramps/pins_K8600.h b/Marlin/src/pins/ramps/pins_K8600.h index 3081b04361..2ffa8c6b10 100644 --- a/Marlin/src/pins/ramps/pins_K8600.h +++ b/Marlin/src/pins/ramps/pins_K8600.h @@ -49,7 +49,7 @@ // Heaters / Fans // #define HEATER_BED_PIN -1 -#define FAN_PIN 8 +#define FAN0_PIN 8 // // Misc. Functions diff --git a/Marlin/src/pins/ramps/pins_K8800.h b/Marlin/src/pins/ramps/pins_K8800.h index a9669764ce..6c4fa1cc7c 100644 --- a/Marlin/src/pins/ramps/pins_K8800.h +++ b/Marlin/src/pins/ramps/pins_K8800.h @@ -74,7 +74,7 @@ // Heaters / Fans // #define HEATER_0_PIN 10 -#define FAN_PIN 8 +#define FAN0_PIN 8 #define CONTROLLER_FAN_PIN 9 // diff --git a/Marlin/src/pins/ramps/pins_MKS_BASE_common.h b/Marlin/src/pins/ramps/pins_MKS_BASE_common.h index 4d3b9844c8..b0f0866bc6 100644 --- a/Marlin/src/pins/ramps/pins_MKS_BASE_common.h +++ b/Marlin/src/pins/ramps/pins_MKS_BASE_common.h @@ -35,7 +35,7 @@ // Heaters / Fans // #define MOSFET_B_PIN 7 - #define FAN_PIN 9 + #define FAN0_PIN 9 // // M3/M4/M5 - Spindle/Laser Control diff --git a/Marlin/src/pins/ramps/pins_MKS_GEN_13.h b/Marlin/src/pins/ramps/pins_MKS_GEN_13.h index 3020dc8c31..4cf66ed2cd 100644 --- a/Marlin/src/pins/ramps/pins_MKS_GEN_13.h +++ b/Marlin/src/pins/ramps/pins_MKS_GEN_13.h @@ -43,7 +43,7 @@ // Heaters / Fans // #define MOSFET_B_PIN 7 -#define FAN_PIN 9 +#define FAN0_PIN 9 // // PSU / SERVO diff --git a/Marlin/src/pins/ramps/pins_MKS_GEN_L.h b/Marlin/src/pins/ramps/pins_MKS_GEN_L.h index 9c84c18300..5d1136e4ef 100644 --- a/Marlin/src/pins/ramps/pins_MKS_GEN_L.h +++ b/Marlin/src/pins/ramps/pins_MKS_GEN_L.h @@ -41,7 +41,7 @@ #define MOSFET_A_PIN 9 // HE0 #define MOSFET_B_PIN 8 // HE1 #define MOSFET_C_PIN 10 // HBED -#define FAN_PIN 7 +#define FAN0_PIN 7 // // CS Pins wired to avoid conflict with the LCD diff --git a/Marlin/src/pins/ramps/pins_MKS_GEN_L_V2.h b/Marlin/src/pins/ramps/pins_MKS_GEN_L_V2.h index 543210b117..931843de7c 100644 --- a/Marlin/src/pins/ramps/pins_MKS_GEN_L_V2.h +++ b/Marlin/src/pins/ramps/pins_MKS_GEN_L_V2.h @@ -38,7 +38,7 @@ // Heaters / Fans // #define MOSFET_B_PIN 7 -#define FAN_PIN 9 +#define FAN0_PIN 9 // // CS Pins wired to avoid conflict with the LCD diff --git a/Marlin/src/pins/ramps/pins_MKS_GEN_L_V21.h b/Marlin/src/pins/ramps/pins_MKS_GEN_L_V21.h index d1a1b30995..6cea92c15b 100644 --- a/Marlin/src/pins/ramps/pins_MKS_GEN_L_V21.h +++ b/Marlin/src/pins/ramps/pins_MKS_GEN_L_V21.h @@ -38,7 +38,7 @@ // Heaters / Fans // #define MOSFET_B_PIN 7 -#define FAN_PIN 9 +#define FAN0_PIN 9 // // CS Pins wired to avoid conflict with the LCD diff --git a/Marlin/src/pins/ramps/pins_RAMPS.h b/Marlin/src/pins/ramps/pins_RAMPS.h index 08d6475c5e..58b9b78648 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS.h +++ b/Marlin/src/pins/ramps/pins_RAMPS.h @@ -257,15 +257,15 @@ #endif #endif -#ifndef FAN_PIN +#ifndef FAN0_PIN #if EITHER(FET_ORDER_EFB, FET_ORDER_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan - #define FAN_PIN MOSFET_B_PIN + #define FAN0_PIN MOSFET_B_PIN #elif EITHER(FET_ORDER_EEF, FET_ORDER_SF) // Hotend, Hotend, Fan or Spindle, Fan - #define FAN_PIN MOSFET_C_PIN + #define FAN0_PIN MOSFET_C_PIN #elif FET_ORDER_EEB // Hotend, Hotend, Bed - #define FAN_PIN 4 // IO pin. Buffer needed + #define FAN0_PIN 4 // IO pin. Buffer needed #else // Non-specific are "EFB" (i.e., "EFBF" or "EFBE") - #define FAN_PIN MOSFET_B_PIN + #define FAN0_PIN MOSFET_B_PIN #endif #endif diff --git a/Marlin/src/pins/ramps/pins_RAMPS_CREALITY.h b/Marlin/src/pins/ramps/pins_RAMPS_CREALITY.h index 4d150946c2..8c65b2e0b4 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS_CREALITY.h +++ b/Marlin/src/pins/ramps/pins_RAMPS_CREALITY.h @@ -33,7 +33,7 @@ // Heaters / Fans // #define MOSFET_B_PIN 7 -#define FAN_PIN 9 +#define FAN0_PIN 9 #define FIL_RUNOUT_PIN 2 #if NUM_RUNOUT_SENSORS >= 2 diff --git a/Marlin/src/pins/ramps/pins_RAMPS_ENDER_4.h b/Marlin/src/pins/ramps/pins_RAMPS_ENDER_4.h index 3ffa940c48..ece072b509 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS_ENDER_4.h +++ b/Marlin/src/pins/ramps/pins_RAMPS_ENDER_4.h @@ -36,7 +36,7 @@ // band (case light). Thus the hotend and controller fans are always-on. #if ENABLED(CASE_LIGHT_ENABLE) - #undef FAN_PIN + #undef FAN0_PIN #ifndef CASE_LIGHT_PIN #define CASE_LIGHT_PIN MOSFET_B_PIN #endif diff --git a/Marlin/src/pins/ramps/pins_RAMPS_OLD.h b/Marlin/src/pins/ramps/pins_RAMPS_OLD.h index 526045c155..663c6e4792 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS_OLD.h +++ b/Marlin/src/pins/ramps/pins_RAMPS_OLD.h @@ -88,14 +88,14 @@ #if ENABLED(RAMPS_V_1_0) #define HEATER_0_PIN 12 #define HEATER_BED_PIN -1 - #ifndef FAN_PIN - #define FAN_PIN 11 + #ifndef FAN0_PIN + #define FAN0_PIN 11 #endif #else // RAMPS_V_1_1 or RAMPS_V_1_2 #define HEATER_0_PIN 10 #define HEATER_BED_PIN 8 - #ifndef FAN_PIN - #define FAN_PIN 9 + #ifndef FAN0_PIN + #define FAN0_PIN 9 #endif #endif diff --git a/Marlin/src/pins/ramps/pins_RAMPS_S_12.h b/Marlin/src/pins/ramps/pins_RAMPS_S_12.h index e74480a0d4..bb1e276416 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS_S_12.h +++ b/Marlin/src/pins/ramps/pins_RAMPS_S_12.h @@ -172,12 +172,12 @@ #if MB(RAMPS_S_12_EEFB) // Hotend0, Hotend1, Fan, Bed #define HEATER_1_PIN RAMPS_S_HE_1 - #define FAN_PIN RAMPS_S_HE_2 + #define FAN0_PIN RAMPS_S_HE_2 #elif MB(RAMPS_S_12_EEEB) // Hotend0, Hotend1, Hotend2, Bed #define HEATER_1_PIN RAMPS_S_HE_1 #define HEATER_2_PIN RAMPS_S_HE_2 #elif MB(RAMPS_S_12_EFFB) // Hotend, Fan0, Fan1, Bed - #define FAN_PIN RAMPS_S_HE_1 + #define FAN0_PIN RAMPS_S_HE_1 #define FAN1_PIN RAMPS_S_HE_2 #endif diff --git a/Marlin/src/pins/ramps/pins_RIGIDBOARD.h b/Marlin/src/pins/ramps/pins_RIGIDBOARD.h index d1824d3813..8eab6c7d9b 100644 --- a/Marlin/src/pins/ramps/pins_RIGIDBOARD.h +++ b/Marlin/src/pins/ramps/pins_RIGIDBOARD.h @@ -84,8 +84,8 @@ #undef HEATER_BED_PIN #define HEATER_BED_PIN 10 -#ifndef FAN_PIN - #define FAN_PIN 8 // Same as RAMPS_13_EEF +#ifndef FAN0_PIN + #define FAN0_PIN 8 // Same as RAMPS_13_EEF #endif // diff --git a/Marlin/src/pins/ramps/pins_RUMBA.h b/Marlin/src/pins/ramps/pins_RUMBA.h index 6b1f4c5691..3c6873e765 100644 --- a/Marlin/src/pins/ramps/pins_RUMBA.h +++ b/Marlin/src/pins/ramps/pins_RUMBA.h @@ -159,8 +159,8 @@ #define HEATER_3_PIN 8 #define HEATER_BED_PIN 9 -#ifndef FAN_PIN - #define FAN_PIN 7 +#ifndef FAN0_PIN + #define FAN0_PIN 7 #endif #ifndef FAN1_PIN #define FAN1_PIN 8 diff --git a/Marlin/src/pins/ramps/pins_TANGO.h b/Marlin/src/pins/ramps/pins_TANGO.h index 936751e9eb..54dd443399 100644 --- a/Marlin/src/pins/ramps/pins_TANGO.h +++ b/Marlin/src/pins/ramps/pins_TANGO.h @@ -30,7 +30,7 @@ #define BOARD_INFO_NAME "Tango" -#define FAN_PIN 8 +#define FAN0_PIN 8 #define FAN1_PIN -1 #ifndef E0_AUTO_FAN_PIN diff --git a/Marlin/src/pins/ramps/pins_TENLOG_D3_HERO.h b/Marlin/src/pins/ramps/pins_TENLOG_D3_HERO.h index dd6fb2fa70..a00720b576 100644 --- a/Marlin/src/pins/ramps/pins_TENLOG_D3_HERO.h +++ b/Marlin/src/pins/ramps/pins_TENLOG_D3_HERO.h @@ -138,7 +138,7 @@ #define HEATER_1_PIN 11 #define HEATER_BED_PIN 8 -#define FAN_PIN 9 +#define FAN0_PIN 9 #define FAN1_PIN 5 // Normally this would be a servo pin // XXX Runout support unknown? diff --git a/Marlin/src/pins/ramps/pins_TENLOG_MB1_V23.h b/Marlin/src/pins/ramps/pins_TENLOG_MB1_V23.h index 780ab8daa4..0cf6e3b18b 100644 --- a/Marlin/src/pins/ramps/pins_TENLOG_MB1_V23.h +++ b/Marlin/src/pins/ramps/pins_TENLOG_MB1_V23.h @@ -95,7 +95,7 @@ #define HEATER_1_PIN 10 #define HEATER_BED_PIN 8 -#define FAN_PIN 9 +#define FAN0_PIN 9 #define FAN2_PIN 5 // Normally this would be a servo pin //#define NUM_RUNOUT_SENSORS 0 diff --git a/Marlin/src/pins/ramps/pins_TRIGORILLA_14.h b/Marlin/src/pins/ramps/pins_TRIGORILLA_14.h index f9856e04f5..0e6e8ee41d 100644 --- a/Marlin/src/pins/ramps/pins_TRIGORILLA_14.h +++ b/Marlin/src/pins/ramps/pins_TRIGORILLA_14.h @@ -46,7 +46,7 @@ // // Heaters / Fans // -#define FAN_PIN 9 // FAN0 +#define FAN0_PIN 9 // FAN0 #define FAN1_PIN 7 // FAN1 #define FAN2_PIN 44 // FAN2 #ifndef E0_AUTO_FAN_PIN diff --git a/Marlin/src/pins/ramps/pins_TT_OSCAR.h b/Marlin/src/pins/ramps/pins_TT_OSCAR.h index c0247c7b47..5150ad55b6 100644 --- a/Marlin/src/pins/ramps/pins_TT_OSCAR.h +++ b/Marlin/src/pins/ramps/pins_TT_OSCAR.h @@ -192,7 +192,7 @@ #define HEATER_2_PIN 44 #define HEATER_BED_PIN 8 -#define FAN_PIN 9 +#define FAN0_PIN 9 #if EXTRUDERS >= 5 #define HEATER_4_PIN 6 diff --git a/Marlin/src/pins/ramps/pins_ULTIMAIN_2.h b/Marlin/src/pins/ramps/pins_ULTIMAIN_2.h index 4ee0a6950d..16400be059 100644 --- a/Marlin/src/pins/ramps/pins_ULTIMAIN_2.h +++ b/Marlin/src/pins/ramps/pins_ULTIMAIN_2.h @@ -112,8 +112,8 @@ #define HEATER_1_PIN 3 #define HEATER_BED_PIN 4 -#ifndef FAN_PIN - #define FAN_PIN 7 +#ifndef FAN0_PIN + #define FAN0_PIN 7 #endif #ifndef E0_AUTO_FAN_PIN diff --git a/Marlin/src/pins/ramps/pins_ULTIMAKER.h b/Marlin/src/pins/ramps/pins_ULTIMAKER.h index e3e91428df..c29318c372 100644 --- a/Marlin/src/pins/ramps/pins_ULTIMAKER.h +++ b/Marlin/src/pins/ramps/pins_ULTIMAKER.h @@ -99,8 +99,8 @@ #define HEATER_1_PIN 3 #define HEATER_BED_PIN 4 -#ifndef FAN_PIN - #define FAN_PIN 7 +#ifndef FAN0_PIN + #define FAN0_PIN 7 #endif // diff --git a/Marlin/src/pins/ramps/pins_VORON.h b/Marlin/src/pins/ramps/pins_VORON.h index f56b0cb8fc..c928a1fb65 100644 --- a/Marlin/src/pins/ramps/pins_VORON.h +++ b/Marlin/src/pins/ramps/pins_VORON.h @@ -36,8 +36,8 @@ // // Heaters / Fans // -#undef FAN_PIN -#define FAN_PIN 5 // Using the pin for the controller fan since controller fan is always on. +#undef FAN0_PIN +#define FAN0_PIN 5 // Using the pin for the controller fan since controller fan is always on. #define CONTROLLER_FAN_PIN 8 // diff --git a/Marlin/src/pins/ramps/pins_ZRIB_V53.h b/Marlin/src/pins/ramps/pins_ZRIB_V53.h index 050516791e..74188190fe 100644 --- a/Marlin/src/pins/ramps/pins_ZRIB_V53.h +++ b/Marlin/src/pins/ramps/pins_ZRIB_V53.h @@ -164,7 +164,7 @@ #define HEATER_0_PIN 10 #define HEATER_1_PIN 7 -#define FAN_PIN 9 +#define FAN0_PIN 9 #define HEATER_BED_PIN 8 #define FAN1_PIN 6 diff --git a/Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h b/Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h index 1c67903a21..e4603591d1 100644 --- a/Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h +++ b/Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h @@ -136,7 +136,7 @@ #define HEATER_3_PIN 5 #define HEATER_BED_PIN 8 -#define FAN_PIN 9 +#define FAN0_PIN 9 // // Misc. Functions diff --git a/Marlin/src/pins/sam/pins_ADSK.h b/Marlin/src/pins/sam/pins_ADSK.h index 425d6d45af..7e47f122f6 100644 --- a/Marlin/src/pins/sam/pins_ADSK.h +++ b/Marlin/src/pins/sam/pins_ADSK.h @@ -116,7 +116,7 @@ A stepper for E0 extruder // #define HEATER_0_PIN 55 // "Hold": Analog pin 1, Digital pin 55 #define HEATER_BED_PIN 57 // "CoolEn": Analog pin 3, Digital pin 57 -#define FAN_PIN 54 // "Abort": Analog pin 0, Digital pin 54 +#define FAN0_PIN 54 // "Abort": Analog pin 0, Digital pin 54 #undef E0_AUTO_FAN_PIN #define E0_AUTO_FAN_PIN 56 // "Resume": Analog pin 2, Digital pin 56 diff --git a/Marlin/src/pins/sam/pins_ALLIGATOR_R2.h b/Marlin/src/pins/sam/pins_ALLIGATOR_R2.h index 76431937a7..bdbea60150 100644 --- a/Marlin/src/pins/sam/pins_ALLIGATOR_R2.h +++ b/Marlin/src/pins/sam/pins_ALLIGATOR_R2.h @@ -113,8 +113,8 @@ #define HEATER_3_PIN 97 // PC20 on piggy #define HEATER_BED_PIN 69 // PA0 -#ifndef FAN_PIN - #define FAN_PIN 92 // PA5 +#ifndef FAN0_PIN + #define FAN0_PIN 92 // PA5 #endif #define FAN1_PIN 31 // PA7 diff --git a/Marlin/src/pins/sam/pins_ARCHIM1.h b/Marlin/src/pins/sam/pins_ARCHIM1.h index d9f1dcbf94..e01b93a018 100644 --- a/Marlin/src/pins/sam/pins_ARCHIM1.h +++ b/Marlin/src/pins/sam/pins_ARCHIM1.h @@ -153,8 +153,8 @@ #define HEATER_2_PIN 8 // D8 PC22 FET_PWM5 #define HEATER_BED_PIN 9 // D9 PC21 BED_PWM -#ifndef FAN_PIN - #define FAN_PIN 4 // D4 PC26 FET_PWM1 +#ifndef FAN0_PIN + #define FAN0_PIN 4 // D4 PC26 FET_PWM1 #endif #define FAN1_PIN 5 // D5 PC25 FET_PWM2 diff --git a/Marlin/src/pins/sam/pins_ARCHIM2.h b/Marlin/src/pins/sam/pins_ARCHIM2.h index 503b29f15b..de06a72809 100644 --- a/Marlin/src/pins/sam/pins_ARCHIM2.h +++ b/Marlin/src/pins/sam/pins_ARCHIM2.h @@ -174,8 +174,8 @@ #define HEATER_2_PIN 8 // D8 PC22 FET_PWM5 #define HEATER_BED_PIN 9 // D9 PC21 BED_PWM -#ifndef FAN_PIN - #define FAN_PIN 4 // D4 PC26 FET_PWM1 +#ifndef FAN0_PIN + #define FAN0_PIN 4 // D4 PC26 FET_PWM1 #endif #define FAN1_PIN 5 // D5 PC25 FET_PWM2 diff --git a/Marlin/src/pins/sam/pins_CNCONTROLS_15D.h b/Marlin/src/pins/sam/pins_CNCONTROLS_15D.h index d44f6490da..3d15f37e47 100644 --- a/Marlin/src/pins/sam/pins_CNCONTROLS_15D.h +++ b/Marlin/src/pins/sam/pins_CNCONTROLS_15D.h @@ -91,7 +91,7 @@ // // Fans // -//#define FAN_PIN 8 +//#define FAN0_PIN 8 // // Auto fans diff --git a/Marlin/src/pins/sam/pins_DUE3DOM.h b/Marlin/src/pins/sam/pins_DUE3DOM.h index 81eca3e4b1..5d47f28aba 100644 --- a/Marlin/src/pins/sam/pins_DUE3DOM.h +++ b/Marlin/src/pins/sam/pins_DUE3DOM.h @@ -96,8 +96,8 @@ #define HEATER_1_PIN 8 // HOTEND1 MOSFET #define HEATER_BED_PIN 39 // BED MOSFET -#ifndef FAN_PIN - #define FAN_PIN 11 // FAN1 header on board - PRINT FAN +#ifndef FAN0_PIN + #define FAN0_PIN 11 // FAN1 header on board - PRINT FAN #endif #define FAN1_PIN 9 // FAN2 header on board - CONTROLLER FAN #define FAN2_PIN 12 // FAN3 header on board - EXTRUDER0 FAN diff --git a/Marlin/src/pins/sam/pins_DUE3DOM_MINI.h b/Marlin/src/pins/sam/pins_DUE3DOM_MINI.h index 7754fa9329..9d56d36264 100644 --- a/Marlin/src/pins/sam/pins_DUE3DOM_MINI.h +++ b/Marlin/src/pins/sam/pins_DUE3DOM_MINI.h @@ -84,8 +84,8 @@ #define HEATER_0_PIN 13 // HOTEND0 MOSFET #define HEATER_BED_PIN 7 // BED MOSFET -#ifndef FAN_PIN - #define FAN_PIN 11 // FAN1 header on board - PRINT FAN +#ifndef FAN0_PIN + #define FAN0_PIN 11 // FAN1 header on board - PRINT FAN #endif #define FAN1_PIN 12 // FAN2 header on board - CONTROLLER FAN #define FAN2_PIN 9 // FAN3 header on board - EXTRUDER0 FAN diff --git a/Marlin/src/pins/sam/pins_KRATOS32.h b/Marlin/src/pins/sam/pins_KRATOS32.h index f7867f9b26..97449c2d83 100644 --- a/Marlin/src/pins/sam/pins_KRATOS32.h +++ b/Marlin/src/pins/sam/pins_KRATOS32.h @@ -126,8 +126,8 @@ #define HEATER_3_PIN 10 #define HEATER_BED_PIN 7 // BED -#ifndef FAN_PIN - #define FAN_PIN 9 +#ifndef FAN0_PIN + #define FAN0_PIN 9 #endif #define FAN1_PIN 8 diff --git a/Marlin/src/pins/sam/pins_PRINTRBOARD_G2.h b/Marlin/src/pins/sam/pins_PRINTRBOARD_G2.h index aa01a9227f..8fd1843ab5 100644 --- a/Marlin/src/pins/sam/pins_PRINTRBOARD_G2.h +++ b/Marlin/src/pins/sam/pins_PRINTRBOARD_G2.h @@ -138,8 +138,8 @@ #define HEATER_0_PIN 40 // PA5 #define HEATER_BED_PIN 41 // PB24 -#ifndef FAN_PIN - #define FAN_PIN 13 // PB27 Fan1A +#ifndef FAN0_PIN + #define FAN0_PIN 13 // PB27 Fan1A #endif #define FAN1_PIN 58 // PA6 Fan1B diff --git a/Marlin/src/pins/sam/pins_RADDS.h b/Marlin/src/pins/sam/pins_RADDS.h index af24014614..e3de444278 100644 --- a/Marlin/src/pins/sam/pins_RADDS.h +++ b/Marlin/src/pins/sam/pins_RADDS.h @@ -196,8 +196,8 @@ #define HEATER_BED_PIN 7 // BED #endif -#ifndef FAN_PIN - #define FAN_PIN 9 +#ifndef FAN0_PIN + #define FAN0_PIN 9 #endif #define FAN1_PIN 8 diff --git a/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h b/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h index 00eba994a8..75d758439c 100644 --- a/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h +++ b/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h @@ -124,8 +124,8 @@ #define HEATER_2_PIN 11 #define HEATER_BED_PIN 8 -#ifndef FAN_PIN - #define FAN_PIN 12 +#ifndef FAN0_PIN + #define FAN0_PIN 12 #endif // diff --git a/Marlin/src/pins/sam/pins_RURAMPS4D_11.h b/Marlin/src/pins/sam/pins_RURAMPS4D_11.h index f8ea65a369..fb14c5a81f 100644 --- a/Marlin/src/pins/sam/pins_RURAMPS4D_11.h +++ b/Marlin/src/pins/sam/pins_RURAMPS4D_11.h @@ -122,8 +122,8 @@ #define HEATER_2_PIN 11 #define HEATER_BED_PIN 7 // BED H1 -#ifndef FAN_PIN - #define FAN_PIN 9 +#ifndef FAN0_PIN + #define FAN0_PIN 9 #endif #define FAN1_PIN 8 #define CONTROLLER_FAN_PIN -1 diff --git a/Marlin/src/pins/sam/pins_RURAMPS4D_13.h b/Marlin/src/pins/sam/pins_RURAMPS4D_13.h index 58cb3f7a75..c65e6e24cb 100644 --- a/Marlin/src/pins/sam/pins_RURAMPS4D_13.h +++ b/Marlin/src/pins/sam/pins_RURAMPS4D_13.h @@ -114,7 +114,7 @@ #define HEATER_2_PIN 11 #define HEATER_BED_PIN 7 // BED H1 -#define FAN_PIN 9 +#define FAN0_PIN 9 #define FAN1_PIN 8 #define CONTROLLER_FAN_PIN -1 diff --git a/Marlin/src/pins/sam/pins_ULTRATRONICS_PRO.h b/Marlin/src/pins/sam/pins_ULTRATRONICS_PRO.h index fd30c2b69a..4445cf24e8 100644 --- a/Marlin/src/pins/sam/pins_ULTRATRONICS_PRO.h +++ b/Marlin/src/pins/sam/pins_ULTRATRONICS_PRO.h @@ -120,8 +120,8 @@ #define HEATER_3_PIN 9 #define HEATER_BED_PIN 2 -#ifndef FAN_PIN - #define FAN_PIN 6 +#ifndef FAN0_PIN + #define FAN0_PIN 6 #endif #define FAN2_PIN 5 diff --git a/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h b/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h index 2a84d964ea..5cd2584104 100644 --- a/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h +++ b/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h @@ -102,7 +102,7 @@ // #define HEATER_0_PIN 6 #define HEATER_BED_PIN 7 -#define FAN_PIN 8 +#define FAN0_PIN 8 #define FAN1_PIN 9 // diff --git a/Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h b/Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h index 2343dbcf82..13434fffeb 100644 --- a/Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h +++ b/Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h @@ -152,7 +152,7 @@ #define HEATER_BED_PIN 7 // The board has 4 PWM fans, use and configure as desired -#define FAN_PIN 8 +#define FAN0_PIN 8 #define FAN1_PIN 9 #define FAN2_PIN 30 #define FAN3_PIN 31 diff --git a/Marlin/src/pins/samd/pins_MINITRONICS20.h b/Marlin/src/pins/samd/pins_MINITRONICS20.h index da1919cd2b..12438fe57e 100644 --- a/Marlin/src/pins/samd/pins_MINITRONICS20.h +++ b/Marlin/src/pins/samd/pins_MINITRONICS20.h @@ -149,7 +149,7 @@ #define SPINDLE_LASER_PWM_PIN 6 // The board has 4 PWM fans, use and configure as desired -#define FAN_PIN 24 +#define FAN0_PIN 24 // // LCD / Controller diff --git a/Marlin/src/pins/samd/pins_RAMPS_144.h b/Marlin/src/pins/samd/pins_RAMPS_144.h index e5091e5cdc..ed10c4d284 100644 --- a/Marlin/src/pins/samd/pins_RAMPS_144.h +++ b/Marlin/src/pins/samd/pins_RAMPS_144.h @@ -123,7 +123,7 @@ #else #define HEATER_1_PIN 8 #endif -#define FAN_PIN 9 +#define FAN0_PIN 9 #define FAN1_PIN 7 #define FAN2_PIN 12 diff --git a/Marlin/src/pins/sanguino/pins_ANET_10.h b/Marlin/src/pins/sanguino/pins_ANET_10.h index f6816bfb95..176bb2be12 100644 --- a/Marlin/src/pins/sanguino/pins_ANET_10.h +++ b/Marlin/src/pins/sanguino/pins_ANET_10.h @@ -148,8 +148,8 @@ #define HEATER_0_PIN 13 // (extruder) #define HEATER_BED_PIN 12 // (bed) -#ifndef FAN_PIN - #define FAN_PIN 4 +#ifndef FAN0_PIN + #define FAN0_PIN 4 #endif // diff --git a/Marlin/src/pins/sanguino/pins_AZTEEG_X1.h b/Marlin/src/pins/sanguino/pins_AZTEEG_X1.h index 76d53c6021..5767bc993b 100644 --- a/Marlin/src/pins/sanguino/pins_AZTEEG_X1.h +++ b/Marlin/src/pins/sanguino/pins_AZTEEG_X1.h @@ -29,6 +29,6 @@ #define BOARD_INFO_NAME "Azteeg X1" -#define FAN_PIN 4 +#define FAN0_PIN 4 #include "pins_SANGUINOLOLU_12.h" // ... SANGUINOLOLU_11 diff --git a/Marlin/src/pins/sanguino/pins_GEN7_12.h b/Marlin/src/pins/sanguino/pins_GEN7_12.h index ade59fd807..0bf65c37cd 100644 --- a/Marlin/src/pins/sanguino/pins_GEN7_12.h +++ b/Marlin/src/pins/sanguino/pins_GEN7_12.h @@ -117,8 +117,8 @@ #define HEATER_0_PIN 4 #define HEATER_BED_PIN 3 -#if !defined(FAN_PIN) && GEN7_VERSION < 13 // Gen7 v1.3 removed the fan pin - #define FAN_PIN 31 +#if !defined(FAN0_PIN) && GEN7_VERSION < 13 // Gen7 v1.3 removed the fan pin + #define FAN0_PIN 31 #endif // diff --git a/Marlin/src/pins/sanguino/pins_MELZI.h b/Marlin/src/pins/sanguino/pins_MELZI.h index be1b7934c8..a0c7050a91 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI.h +++ b/Marlin/src/pins/sanguino/pins_MELZI.h @@ -33,8 +33,8 @@ #define IS_MELZI 1 -#ifndef FAN_PIN - #define FAN_PIN 4 +#ifndef FAN0_PIN + #define FAN0_PIN 4 #endif // Alter timing for graphical display diff --git a/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h b/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h index a61692c9f1..7984e64b5f 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h +++ b/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h @@ -99,7 +99,7 @@ PIN: 2 Port: B2 Z_DIR_PIN protected PIN: 3 Port: B3 Z_STEP_PIN protected PIN: 4 Port: B4 AVR_SS_PIN protected - . FAN_PIN protected + . FAN0_PIN protected . SD_SS_PIN protected PIN: 5 Port: B5 AVR_MOSI_PIN Output = 1 . SD_MOSI_PIN Output = 1 diff --git a/Marlin/src/pins/sanguino/pins_OMCA.h b/Marlin/src/pins/sanguino/pins_OMCA.h index 7f18283d1c..65f9006adb 100644 --- a/Marlin/src/pins/sanguino/pins_OMCA.h +++ b/Marlin/src/pins/sanguino/pins_OMCA.h @@ -128,8 +128,8 @@ #define HEATER_0_PIN 3 // DONE PWM on RIGHT connector #define HEATER_BED_PIN 4 -#ifndef FAN_PIN - #define FAN_PIN 14 // PWM on MIDDLE connector +#ifndef FAN0_PIN + #define FAN0_PIN 14 // PWM on MIDDLE connector #endif // diff --git a/Marlin/src/pins/sanguino/pins_OMCA_A.h b/Marlin/src/pins/sanguino/pins_OMCA_A.h index a3ceb76a0d..aa7f79d602 100644 --- a/Marlin/src/pins/sanguino/pins_OMCA_A.h +++ b/Marlin/src/pins/sanguino/pins_OMCA_A.h @@ -123,8 +123,8 @@ // #define HEATER_0_PIN 4 -#ifndef FAN_PIN - #define FAN_PIN 3 +#ifndef FAN0_PIN + #define FAN0_PIN 3 #endif // diff --git a/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h b/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h index a8475fb326..1459eab646 100644 --- a/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h +++ b/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h @@ -100,8 +100,8 @@ // #define HEATER_0_PIN 13 // (extruder) -#ifndef FAN_PIN - #define FAN_PIN 4 // Works for Panelolu2 too +#ifndef FAN0_PIN + #define FAN0_PIN 4 // Works for Panelolu2 too #endif #if DISABLED(SANGUINOLOLU_V_1_2) diff --git a/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_12.h b/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_12.h index 2209569261..37d1e7030b 100644 --- a/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_12.h +++ b/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_12.h @@ -52,8 +52,8 @@ #endif #define E0_ENABLE_PIN 14 -#if !defined(FAN_PIN) && ENABLED(LCD_I2C_PANELOLU2) - #define FAN_PIN 4 // Uses Transistor1 (PWM) on Panelolu2's Sanguino Adapter Board to drive the fan +#if !defined(FAN0_PIN) && ENABLED(LCD_I2C_PANELOLU2) + #define FAN0_PIN 4 // Uses Transistor1 (PWM) on Panelolu2's Sanguino Adapter Board to drive the fan #endif #define SANGUINOLOLU_V_1_2 diff --git a/Marlin/src/pins/sanguino/pins_SETHI.h b/Marlin/src/pins/sanguino/pins_SETHI.h index a2240b385b..31d5585cc8 100644 --- a/Marlin/src/pins/sanguino/pins_SETHI.h +++ b/Marlin/src/pins/sanguino/pins_SETHI.h @@ -97,13 +97,8 @@ #define HEATER_0_PIN 4 #define HEATER_BED_PIN 3 -#ifndef FAN_PIN - #if GEN7_VERSION >= 13 - // Gen7 v1.3 removed the fan pin - #define FAN_PIN -1 - #else - #define FAN_PIN 31 - #endif +#if !defined(FAN0_PIN) && GEN7_VERSION < 13 // Gen7 v1.3 removed the fan pin + #define FAN0_PIN 31 #endif // diff --git a/Marlin/src/pins/sanguino/pins_STB_11.h b/Marlin/src/pins/sanguino/pins_STB_11.h index 1bda25b3d4..5c6c5d4f82 100644 --- a/Marlin/src/pins/sanguino/pins_STB_11.h +++ b/Marlin/src/pins/sanguino/pins_STB_11.h @@ -28,8 +28,8 @@ #define BOARD_INFO_NAME "STB V1.1" -#ifndef FAN_PIN - #define FAN_PIN 4 // Works for Panelolu2 too +#ifndef FAN0_PIN + #define FAN0_PIN 4 // Works for Panelolu2 too #endif #include "pins_SANGUINOLOLU_12.h" // ... SANGUINOLOLU_11 diff --git a/Marlin/src/pins/sanguino/pins_ZMIB_V2.h b/Marlin/src/pins/sanguino/pins_ZMIB_V2.h index bd9230c32a..5b0b996d18 100644 --- a/Marlin/src/pins/sanguino/pins_ZMIB_V2.h +++ b/Marlin/src/pins/sanguino/pins_ZMIB_V2.h @@ -79,7 +79,7 @@ * PIN: 25 Port: A6 FIL_RUNOUT_PIN * PIN: 26 Port: A5 E0_DIR_PIN * PIN: 27 Port: A4 E0_STEP_PIN - * PIN: 28 Port: A3 FAN_PIN + * PIN: 28 Port: A3 FAN0_PIN * PIN: 29 Port: A2 EXP1_3(BTN_ENC) * ADC_KEY_PIN * PIN: 30 Port: A1 TEMP_0_PIN @@ -144,7 +144,7 @@ // #define HEATER_0_PIN 0 #define HEATER_BED_PIN 1 -#define FAN_PIN 28 +#define FAN0_PIN 28 #define FAN1_PIN -1 // diff --git a/Marlin/src/pins/sensitive_pins.h b/Marlin/src/pins/sensitive_pins.h index 288bcc904e..abccac9dad 100644 --- a/Marlin/src/pins/sensitive_pins.h +++ b/Marlin/src/pins/sensitive_pins.h @@ -899,8 +899,8 @@ #define _Z_PROBE #endif -#if PIN_EXISTS(FAN) - #define _FAN0 FAN_PIN, +#if PIN_EXISTS(FAN0) + #define _FAN0 FAN0_PIN, #else #define _FAN0 #endif diff --git a/Marlin/src/pins/stm32f1/pins_BEAST.h b/Marlin/src/pins/stm32f1/pins_BEAST.h index 4dafe2f273..80967bad07 100644 --- a/Marlin/src/pins/stm32f1/pins_BEAST.h +++ b/Marlin/src/pins/stm32f1/pins_BEAST.h @@ -89,8 +89,8 @@ #define HEATER_BED_PIN PB9 // BED -#ifndef FAN_PIN - #define FAN_PIN PB10 +#ifndef FAN0_PIN + #define FAN0_PIN PB10 #endif #define FAN_SOFT_PWM_REQUIRED diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h index e3e91ff35a..00dc0613f2 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h @@ -112,7 +112,7 @@ #define HEATER_0_PIN PC8 // HEATER1 #define HEATER_BED_PIN PC9 // HOT BED -#define FAN_PIN PC6 // FAN +#define FAN0_PIN PC6 // FAN #define FAN_SOFT_PWM_REQUIRED #define CONTROLLER_FAN_PIN PC7 diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h index 5007de25da..8fb194c27f 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h @@ -145,7 +145,7 @@ // #define HEATER_0_PIN PC8 // "HE" #define HEATER_BED_PIN PC9 // "HB" -#define FAN_PIN PA8 // "FAN0" +#define FAN0_PIN PA8 // "FAN0" // // USB connect control diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V2_0.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V2_0.h index c0428279f0..7e6798deaf 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V2_0.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V2_0.h @@ -37,7 +37,7 @@ #undef NO_EEPROM_SELECTED #endif -#define FAN_PIN PC6 +#define FAN0_PIN PC6 // // USB connect control diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h index 5770f4a5ba..9d85e211f7 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h @@ -100,8 +100,8 @@ #define HEATER_0_PIN PC8 // "HE" #define HEATER_BED_PIN PC9 // "HB" -#ifndef FAN_PIN - #define FAN_PIN PA8 // "FAN0" +#ifndef FAN0_PIN + #define FAN0_PIN PA8 // "FAN0" #endif // diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h index 9c5836dc74..c45e7fb282 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h @@ -100,7 +100,7 @@ // Heaters / Fans // #define HEATER_0_PIN PA8 -#define FAN_PIN PC8 +#define FAN0_PIN PC8 #define HEATER_BED_PIN PC9 // diff --git a/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h b/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h index ec4535982e..a75825658c 100644 --- a/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h +++ b/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h @@ -114,7 +114,7 @@ #define HEATER_0_PIN PC8 // HEATER0 #define HEATER_BED_PIN PC9 // HOT BED -#define FAN_PIN PA7 // FAN (fan2 on board) model cool fan +#define FAN0_PIN PA7 // FAN (fan2 on board) model cool fan #define FAN1_PIN PA8 // FAN (fan0 on board) e0 cool fan #define FAN2_PIN PB9 // FAN (fan1 on board) controller cool fan diff --git a/Marlin/src/pins/stm32f1/pins_CHITU3D.h b/Marlin/src/pins/stm32f1/pins_CHITU3D.h index 3b66096a27..32894bb72c 100644 --- a/Marlin/src/pins/stm32f1/pins_CHITU3D.h +++ b/Marlin/src/pins/stm32f1/pins_CHITU3D.h @@ -83,8 +83,8 @@ #define HEATER_0_PIN PD12 // HOT-END #define HEATER_BED_PIN PG11 // HOT-BED -#ifndef FAN_PIN - #define FAN_PIN PG14 // MAIN BOARD FAN +#ifndef FAN0_PIN + #define FAN0_PIN PG14 // MAIN BOARD FAN #endif #define FAN_SOFT_PWM_REQUIRED diff --git a/Marlin/src/pins/stm32f1/pins_CHITU3D_common.h b/Marlin/src/pins/stm32f1/pins_CHITU3D_common.h index f5dd4a42b0..9f8de25ff1 100644 --- a/Marlin/src/pins/stm32f1/pins_CHITU3D_common.h +++ b/Marlin/src/pins/stm32f1/pins_CHITU3D_common.h @@ -99,7 +99,7 @@ // Fans // #define CONTROLLER_FAN_PIN PD6 // BOARD FAN -#define FAN_PIN PG13 // FAN +#define FAN0_PIN PG13 // FAN #define FAN2_PIN PG14 // diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1_301.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1_301.h index 53953f9ebc..7a8f3189aa 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1_301.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1_301.h @@ -84,7 +84,7 @@ #if HAS_CUTTER //#define HEATER_0_PIN -1 //#define HEATER_BED_PIN -1 - #define FAN_PIN -1 + #define FAN0_PIN -1 #define SPINDLE_LASER_ENA_PIN PC0 // FET 1 #define SPINDLE_LASER_PWM_PIN PC0 // Bed FET #define SPINDLE_DIR_PIN PC0 // FET 4 diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V25S1.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V25S1.h index b6316c01c6..9e422e62b0 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V25S1.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V25S1.h @@ -114,7 +114,7 @@ #define HEATER_0_PIN PB14 // HEATER1 #define HEATER_BED_PIN PB13 // HOT BED -#define FAN_PIN PB15 // FAN +#define FAN0_PIN PB15 // FAN #ifndef E0_AUTO_FAN_PIN #define E0_AUTO_FAN_PIN PC13 // FAN #endif diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h index 7c4df3520c..e71fec0181 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h @@ -149,8 +149,8 @@ #ifndef HEATER_BED_PIN #define HEATER_BED_PIN PA2 // HOT BED #endif -#ifndef FAN_PIN - #define FAN_PIN PA0 // FAN +#ifndef FAN0_PIN + #define FAN0_PIN PA0 // FAN #endif #define FAN_SOFT_PWM_REQUIRED diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h index f3b7e4f308..d85758981f 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h @@ -130,7 +130,7 @@ #define HEATER_0_PIN PA0 // HEATER1 #define HEATER_BED_PIN PA1 // HOT BED -#define FAN_PIN PA2 // FAN +#define FAN0_PIN PA2 // FAN #define FAN_SOFT_PWM_REQUIRED // diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V425.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V425.h index 1c62d19a99..2d9b9f38f5 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V425.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V425.h @@ -72,6 +72,6 @@ // #define HEATER_0_PIN PA0 // HEATER1 #define HEATER_BED_PIN PA1 // HOT BED -#define FAN_PIN PA2 // FAN +#define FAN0_PIN PA2 // FAN #include "pins_CREALITY_V4.h" diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V452.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V452.h index 4f57f8a805..2f89402607 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V452.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V452.h @@ -33,7 +33,7 @@ #define HEATER_0_PIN PA1 // HEATER1 #define HEATER_BED_PIN PA2 // HOT BED -#define FAN_PIN PA0 // FAN +#define FAN0_PIN PA0 // FAN #if ENABLED(PROBE_ACTIVATION_SWITCH) #ifndef PROBE_ACTIVATION_SWITCH_PIN diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V453.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V453.h index 6a0fa4f418..25b5d6c0ac 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V453.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V453.h @@ -33,7 +33,7 @@ #define HEATER_0_PIN PB14 // HEATER1 #define HEATER_BED_PIN PB13 // HOT BED -#define FAN_PIN PB15 // FAN +#define FAN0_PIN PB15 // FAN #if ENABLED(PROBE_ACTIVATION_SWITCH) #ifndef PROBE_ACTIVATION_SWITCH_PIN diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V521.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V521.h index d3d3685531..c90d76d17d 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V521.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V521.h @@ -133,7 +133,7 @@ #define HEATER_1_PIN PA0 // HEATER1 #define HEATER_BED_PIN PA2 // HOT BED -#define FAN_PIN PB14 // FAN +#define FAN0_PIN PB14 // FAN #define FAN1_PIN PB12 // FAN #define FAN_SOFT_PWM diff --git a/Marlin/src/pins/stm32f1/pins_ERYONE_ERY32_MINI.h b/Marlin/src/pins/stm32f1/pins_ERYONE_ERY32_MINI.h index 08c9500fc5..f5a285170e 100644 --- a/Marlin/src/pins/stm32f1/pins_ERYONE_ERY32_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_ERYONE_ERY32_MINI.h @@ -105,15 +105,15 @@ #endif #endif -#ifndef FAN_PIN +#ifndef FAN0_PIN #if EITHER(FET_ORDER_EFB, FET_ORDER_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan - #define FAN_PIN PB5 + #define FAN0_PIN PB5 #elif EITHER(FET_ORDER_EEF, FET_ORDER_SF) // Hotend, Hotend, Fan or Spindle, Fan - #define FAN_PIN PD12 + #define FAN0_PIN PD12 #elif ENABLED(FET_ORDER_EEB) // Hotend, Hotend, Bed - #define FAN_PIN -1 // IO pin. Buffer needed + #define FAN0_PIN -1 // IO pin. Buffer needed #else // Non-specific are "EFB" (i.e., "EFBF" or "EFBE") - #define FAN_PIN PB5 + #define FAN0_PIN PB5 #endif #endif diff --git a/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h b/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h index ff588f9488..f784c07c21 100644 --- a/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h +++ b/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h @@ -189,7 +189,7 @@ #define HEATER_0_PIN PC3 // HEATER_E0 #define HEATER_BED_PIN PA0 // HEATER_BED-WKUP -#define FAN_PIN PB1 // E_FAN +#define FAN0_PIN PB1 // E_FAN // // Misc. Functions diff --git a/Marlin/src/pins/stm32f1/pins_FLY_MINI.h b/Marlin/src/pins/stm32f1/pins_FLY_MINI.h index c139b4943c..c7a6a7639d 100644 --- a/Marlin/src/pins/stm32f1/pins_FLY_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_FLY_MINI.h @@ -109,8 +109,8 @@ // #define HEATER_0_PIN PC6 #define HEATER_BED_PIN PC7 -#ifndef FAN_PIN - #define FAN_PIN PC8 +#ifndef FAN0_PIN + #define FAN0_PIN PC8 #endif #define FAN1_PIN PC9 diff --git a/Marlin/src/pins/stm32f1/pins_FYSETC_AIO_II.h b/Marlin/src/pins/stm32f1/pins_FYSETC_AIO_II.h index 9250ee1127..1c62c461f9 100644 --- a/Marlin/src/pins/stm32f1/pins_FYSETC_AIO_II.h +++ b/Marlin/src/pins/stm32f1/pins_FYSETC_AIO_II.h @@ -134,8 +134,8 @@ // #define HEATER_0_PIN PC7 #define HEATER_BED_PIN PC6 -#ifndef FAN_PIN - #define FAN_PIN PC8 +#ifndef FAN0_PIN + #define FAN0_PIN PC8 #endif // diff --git a/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h b/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h index e59e8aef59..9bc10a26bc 100644 --- a/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h +++ b/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h @@ -104,8 +104,8 @@ // #define HEATER_0_PIN PC6 #define HEATER_BED_PIN PC7 -#ifndef FAN_PIN - #define FAN_PIN PC8 +#ifndef FAN0_PIN + #define FAN0_PIN PC8 #endif // diff --git a/Marlin/src/pins/stm32f1/pins_GTM32_MINI.h b/Marlin/src/pins/stm32f1/pins_GTM32_MINI.h index 5515132c78..4030edbeb2 100644 --- a/Marlin/src/pins/stm32f1/pins_GTM32_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_GTM32_MINI.h @@ -110,7 +110,7 @@ // // These are FAN PWM pins on EXT0..EXT2 connectors. // -//#define FAN_PIN PB9 // EXT0 port +//#define FAN0_PIN PB9 // EXT0 port #define FAN1_PIN PB8 // EXT1 port #define FAN2_PIN PB7 // EXT2 port diff --git a/Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h b/Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h index dc23680b8c..040f44e0cf 100644 --- a/Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h +++ b/Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h @@ -110,7 +110,7 @@ // // These are FAN PWM pins on EXT0..EXT2 connectors. // -//#define FAN_PIN PB9 // EXT0 port +//#define FAN0_PIN PB9 // EXT0 port #define FAN1_PIN PB8 // EXT1 port #define FAN2_PIN PB7 // EXT2 port diff --git a/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h b/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h index 646638dae2..313b693ec5 100644 --- a/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h +++ b/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h @@ -115,7 +115,7 @@ // // These are FAN PWM pins on EXT0..EXT2 connectors. // -//#define FAN_PIN PB9 // EXT0 port +//#define FAN0_PIN PB9 // EXT0 port #define FAN1_PIN PB8 // EXT1 port #define FAN2_PIN PB7 // EXT2 port diff --git a/Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h b/Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h index 968d9cb6bd..35b952f79b 100644 --- a/Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h +++ b/Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h @@ -110,7 +110,7 @@ // // These are FAN PWM pins on EXT0..EXT2 connectors. // -//#define FAN_PIN PB9 // EXT0 port +//#define FAN0_PIN PB9 // EXT0 port #define FAN1_PIN PB8 // EXT1 port #define FAN2_PIN PB7 // EXT2 port diff --git a/Marlin/src/pins/stm32f1/pins_JGAURORA_A5S_A1.h b/Marlin/src/pins/stm32f1/pins_JGAURORA_A5S_A1.h index d3cf3e5cf5..c4638cd9a9 100644 --- a/Marlin/src/pins/stm32f1/pins_JGAURORA_A5S_A1.h +++ b/Marlin/src/pins/stm32f1/pins_JGAURORA_A5S_A1.h @@ -104,7 +104,7 @@ #define HEATER_0_PIN PA2 #define HEATER_BED_PIN PA3 -#define FAN_PIN PA1 +#define FAN0_PIN PA1 #define FIL_RUNOUT_PIN PC7 diff --git a/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h b/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h index ad6b84b057..bd39632cc5 100644 --- a/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h +++ b/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h @@ -88,7 +88,7 @@ #define HEATER_0_PIN PD3 // pin 84 (Nozzle Heat Mosfet) #define HEATER_BED_PIN PA8 // pin 67 (Hot Bed Mosfet) -#define FAN_PIN PA15 // pin 77 (4cm Fan) +#define FAN0_PIN PA15 // pin 77 (4cm Fan) #if TERN(MAPLE_STM32F1, ENABLED(FAN_SOFT_PWM), ENABLED(FAST_PWM_FAN)) && FAN_MIN_PWM < 5 // Required to avoid issues with heating or STLink #error "FAN_MIN_PWM must be 5 or higher." // Fan will not start in 1-30 range @@ -116,7 +116,7 @@ #define BOARD_PREINIT() { \ OUT_WRITE_OD(HEATER_0_PIN, 0); \ OUT_WRITE_OD(HEATER_BED_PIN, 0); \ - OUT_WRITE_OD(FAN_PIN, 0); \ + OUT_WRITE_OD(FAN0_PIN, 0); \ } // diff --git a/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h b/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h index 9ed3c11560..c4d0276578 100644 --- a/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h @@ -111,7 +111,7 @@ #define HEATER_0_PIN PB0 #define HEATER_BED_PIN PB1 -#define FAN_PIN PA0 // FAN +#define FAN0_PIN PA0 // FAN // // SD Card diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h index be5f6c7404..25b372a889 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h @@ -116,7 +116,7 @@ // // Fan // -#define FAN_PIN PA7 // FAN +#define FAN0_PIN PA7 // FAN // // Thermocouples diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h index 7994089619..b14b17d0b9 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h @@ -171,7 +171,7 @@ #define HEATER_0_PIN PC3 // HEATER1 #define HEATER_BED_PIN PA0 // HOT BED -#define FAN_PIN PB1 // FAN +#define FAN0_PIN PB1 // FAN // // Misc. Functions diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h index 74780562b6..c7aacc4bab 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h @@ -119,7 +119,7 @@ // Heaters 0,1 / Fans / Bed // #define HEATER_0_PIN PC9 -#define FAN_PIN PA8 +#define FAN0_PIN PA8 #define HEATER_BED_PIN PC8 // diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h index 7ead6aa288..e2d4cf5646 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h @@ -68,7 +68,7 @@ // Heaters / Fans // #define HEATER_0_PIN PC9 -#define FAN_PIN PA8 +#define FAN0_PIN PA8 #define HEATER_BED_PIN PC8 // diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE3.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE3.h index b1aaa53c94..161ff658a6 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE3.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE3.h @@ -82,7 +82,7 @@ // #define HEATER_0_PIN PC9 #define HEATER_1_PIN PC7 -#define FAN_PIN PA8 +#define FAN0_PIN PA8 #define HEATER_BED_PIN PC8 // diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h index cd4989d73d..11597109c8 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h @@ -111,7 +111,7 @@ #define HEATER_0_PIN PC3 #define HEATER_BED_PIN PA0 -#define FAN_PIN PB1 // FAN +#define FAN0_PIN PB1 // FAN // // Misc. Functions diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h index bfa6f45120..9176ec0ae1 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h @@ -180,7 +180,7 @@ #define HEATER_1_PIN PB0 // HEATER2 #define HEATER_BED_PIN PA0 // HOT BED -#define FAN_PIN PB1 // FAN +#define FAN0_PIN PB1 // FAN // // Thermocouples diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_common.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_common.h index 858dabb8b9..616d1f1d3f 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_common.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_common.h @@ -105,8 +105,8 @@ #ifndef HEATER_0_PIN #define HEATER_0_PIN PC3 #endif -#ifndef FAN_PIN - #define FAN_PIN PB1 // FAN +#ifndef FAN0_PIN + #define FAN0_PIN PB1 // FAN #endif #ifndef HEATER_BED_PIN #define HEATER_BED_PIN PA0 diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h index 7373d0d7b5..63b7b9e286 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h @@ -165,7 +165,7 @@ #define HEATER_1_PIN PB0 // +HE1- #define HEATER_2_PIN PF9 // +HE2- #define HEATER_BED_PIN PA0 // +HOT-BED- -#define FAN_PIN PB1 // +FAN- +#define FAN0_PIN PB1 // +FAN- /** * Note: MKS Robin Pro board is using SPI2 interface. Make sure your stm32duino library is configured accordingly diff --git a/Marlin/src/pins/stm32f1/pins_MORPHEUS.h b/Marlin/src/pins/stm32f1/pins_MORPHEUS.h index 87919c12f4..08e5455b30 100644 --- a/Marlin/src/pins/stm32f1/pins_MORPHEUS.h +++ b/Marlin/src/pins/stm32f1/pins_MORPHEUS.h @@ -82,7 +82,7 @@ #define HEATER_0_PIN PA2 // HOTEND MOSFET #define HEATER_BED_PIN PA0 // BED MOSFET -#define FAN_PIN PA1 // FAN1 header on board - PRINT FAN +#define FAN0_PIN PA1 // FAN1 header on board - PRINT FAN // // Misc. diff --git a/Marlin/src/pins/stm32f1/pins_PANDA_PI_V29.h b/Marlin/src/pins/stm32f1/pins_PANDA_PI_V29.h index 56200d5096..7c8906e599 100644 --- a/Marlin/src/pins/stm32f1/pins_PANDA_PI_V29.h +++ b/Marlin/src/pins/stm32f1/pins_PANDA_PI_V29.h @@ -140,7 +140,7 @@ // #define HEATER_0_PIN PB12 // "HE" #define HEATER_BED_PIN PB13 // "HB" -#define FAN_PIN PA8 // "FAN0" +#define FAN0_PIN PA8 // "FAN0" #define HEATER_1_PIN PA12 // diff --git a/Marlin/src/pins/stm32f1/pins_SOVOL_V131.h b/Marlin/src/pins/stm32f1/pins_SOVOL_V131.h index 67b2944f45..ba8a563f39 100644 --- a/Marlin/src/pins/stm32f1/pins_SOVOL_V131.h +++ b/Marlin/src/pins/stm32f1/pins_SOVOL_V131.h @@ -175,8 +175,8 @@ #ifndef HEATER_BED_PIN #define HEATER_BED_PIN PA2 // HOT BED #endif -#ifndef FAN_PIN - #define FAN_PIN PA0 // FAN +#ifndef FAN0_PIN + #define FAN0_PIN PA0 // FAN #endif #define FAN_SOFT_PWM_REQUIRED diff --git a/Marlin/src/pins/stm32f1/pins_STM3R_MINI.h b/Marlin/src/pins/stm32f1/pins_STM3R_MINI.h index eee7dbf316..61cb563575 100644 --- a/Marlin/src/pins/stm32f1/pins_STM3R_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_STM3R_MINI.h @@ -86,8 +86,8 @@ //#define HEATER_BED2_PIN -1 // BED2 //#define HEATER_BED3_PIN -1 // BED3 -#ifndef FAN_PIN - #define FAN_PIN PD14 +#ifndef FAN0_PIN + #define FAN0_PIN PD14 #endif #define FAN1_PIN PD13 diff --git a/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h b/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h index 73f61c1aca..410e39bccf 100644 --- a/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h +++ b/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h @@ -117,7 +117,7 @@ // Fans // #define CONTROLLER_FAN_PIN PD6 // FAN -#define FAN_PIN PG13 // FAN +#define FAN0_PIN PG13 // FAN #define FAN1_PIN PG14 // FAN // diff --git a/Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h b/Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h index 1347a14678..fe4fa49f8f 100644 --- a/Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h +++ b/Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h @@ -39,7 +39,7 @@ // Zonestar ZM3E2 V1.0 (STM32F103RCT6) board pin assignments //============================================================================= // PA0 PWR_HOLD | PB0 BEEP | PC0 HEATER_0 -// PA1 FAN_PIN | PB1 KILL | PC1 HEATER_BED +// PA1 FAN0_PIN | PB1 KILL | PC1 HEATER_BED // PA2 TX2 | PB2 LCD_SDA | PC2 TEMP_BED // PA3 RX2 | PB3 E1_EN | PC3 TEMP_E0 // PA4 SD_CS | PB4 Z_STOP | PC4 SD_DETECT @@ -149,7 +149,7 @@ #define HEATER_BED_PIN PC1 // BED #define FAN1_PIN PC6 -#define FAN_PIN PA1 +#define FAN0_PIN PA1 // // Temperature Sensors diff --git a/Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h b/Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h index 9618b3ad1a..c6192191e1 100644 --- a/Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h +++ b/Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h @@ -249,7 +249,7 @@ #define HEATER_1_PIN PB0 // HEATER1 #endif -#define FAN_PIN PB1 // FAN1 +#define FAN0_PIN PB1 // FAN1 #define FAN1_PIN PB8 // FAN2 // diff --git a/Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h b/Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h index d1d8a4c68f..b8d72061df 100644 --- a/Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h +++ b/Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h @@ -249,7 +249,7 @@ // // Fans // -#define FAN_PIN PB1 // FAN1 +#define FAN0_PIN PB1 // FAN1 #define FAN1_PIN PB8 // FAN2 // diff --git a/Marlin/src/pins/stm32f4/pins_ANET_ET4.h b/Marlin/src/pins/stm32f4/pins_ANET_ET4.h index 7c6eaca812..347ef8451d 100644 --- a/Marlin/src/pins/stm32f4/pins_ANET_ET4.h +++ b/Marlin/src/pins/stm32f4/pins_ANET_ET4.h @@ -123,7 +123,7 @@ // // Fans // -#define FAN_PIN PE3 // Layer fan +#define FAN0_PIN PE3 // Layer fan #define FAN1_PIN PE1 // Hotend fan #ifndef E0_AUTO_FAN_PIN diff --git a/Marlin/src/pins/stm32f4/pins_ARMED.h b/Marlin/src/pins/stm32f4/pins_ARMED.h index 2abcc21da5..6ae2674488 100644 --- a/Marlin/src/pins/stm32f4/pins_ARMED.h +++ b/Marlin/src/pins/stm32f4/pins_ARMED.h @@ -128,7 +128,7 @@ #define HEATER_1_PIN PA2 // Hardware PWM #define HEATER_BED_PIN PA0 // Hardware PWM -#define FAN_PIN PC6 // Hardware PWM, Part cooling fan +#define FAN0_PIN PC6 // Hardware PWM, Part cooling fan #define FAN1_PIN PC7 // Hardware PWM, Extruder fan #define FAN2_PIN PC8 // Hardware PWM, Controller fan diff --git a/Marlin/src/pins/stm32f4/pins_ARTILLERY_RUBY.h b/Marlin/src/pins/stm32f4/pins_ARTILLERY_RUBY.h index 7413b9b064..4c0b7d54b7 100644 --- a/Marlin/src/pins/stm32f4/pins_ARTILLERY_RUBY.h +++ b/Marlin/src/pins/stm32f4/pins_ARTILLERY_RUBY.h @@ -100,8 +100,8 @@ #ifndef HEATER_BED_PIN #define HEATER_BED_PIN PA8 // Hotbed #endif -#ifndef FAN_PIN - #define FAN_PIN PC8 // Fan0 +#ifndef FAN0_PIN + #define FAN0_PIN PC8 // Fan0 #endif #ifndef FAN1_PIN #define FAN1_PIN PC7 // Fan1 diff --git a/Marlin/src/pins/stm32f4/pins_BLACK_STM32F407VE.h b/Marlin/src/pins/stm32f4/pins_BLACK_STM32F407VE.h index c49abca9ef..b42bcf5de3 100644 --- a/Marlin/src/pins/stm32f4/pins_BLACK_STM32F407VE.h +++ b/Marlin/src/pins/stm32f4/pins_BLACK_STM32F407VE.h @@ -101,7 +101,7 @@ #define HEATER_1_PIN PA3 // Heater1 #define HEATER_BED_PIN PA1 // Hotbed -#define FAN_PIN PE9 // Fan0 +#define FAN0_PIN PE9 // Fan0 #define FAN1_PIN PE11 // Fan1 #define FAN2_PIN PE13 // Fan2 #define FAN3_PIN PE14 // Fan3 diff --git a/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h b/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h index d31885e73d..fdd56b5c9e 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h @@ -170,11 +170,11 @@ #define HEATER_0_PIN PE6 // Heater0 #define HEATER_BED_PIN PE5 // Hotbed -#ifndef FAN_PIN +#ifndef FAN0_PIN #ifdef MK3_FAN_PINS - #define FAN_PIN PB8 // Fan1 + #define FAN0_PIN PB8 // Fan1 #else - #define FAN_PIN PB9 // Fan0 + #define FAN0_PIN PB9 // Fan0 #endif #endif diff --git a/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h b/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h index c29949e814..383f15f2a3 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h @@ -159,7 +159,7 @@ #define HEATER_1_PIN FPC16_PIN // "HE1" #endif -#define FAN_PIN PB5 // "FAN0" +#define FAN0_PIN PB5 // "FAN0" #ifndef CONTROLLER_FAN_PIN #define CONTROLLER_FAN_PIN PB6 // "FAN1" diff --git a/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h b/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h index fe0e1e52f3..a21eaefee8 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h @@ -323,7 +323,7 @@ #define HEATER_BED_PIN PA2 // Hotbed -#define FAN_PIN PE5 // Fan0 +#define FAN0_PIN PE5 // Fan0 #define FAN1_PIN PE6 // Fan1 #define FAN2_PIN PC8 // Fan2 diff --git a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h index a3bffbce01..4bc75089d1 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h @@ -241,7 +241,7 @@ #define HEATER_2_PIN PB10 // Heater2 #define HEATER_3_PIN PB11 // Heater3 -#define FAN_PIN PA8 // Fan0 +#define FAN0_PIN PA8 // Fan0 #define FAN1_PIN PE5 // Fan1 #define FAN2_PIN PD12 // Fan2 #define FAN3_PIN PD13 // Fan3 diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h index 31551f6ff6..d3a04b9d07 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h @@ -146,7 +146,7 @@ // #define HEATER_0_PIN PA15 // "HE" #define HEATER_BED_PIN PB3 // "HB" -#define FAN_PIN PC9 // "FAN0" +#define FAN0_PIN PC9 // "FAN0" #define FAN1_PIN PA8 // "FAN1" #define FAN2_PIN PC8 // "FAN2" diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h index c535edfc1e..2121b078db 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h @@ -289,7 +289,7 @@ // // Fans // -#define FAN_PIN PC8 // Fan0 +#define FAN0_PIN PC8 // Fan0 #define FAN1_PIN PE5 // Fan1 #ifndef E0_AUTO_FAN_PIN diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h index 76d06380b4..ef85caa170 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h @@ -251,8 +251,8 @@ #ifndef HEATER_BED_PIN #define HEATER_BED_PIN PD7 // Hotbed #endif -#ifndef FAN_PIN - #define FAN_PIN PB7 // Fan0 +#ifndef FAN0_PIN + #define FAN0_PIN PB7 // Fan0 #endif #if HAS_CUTTER diff --git a/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h b/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h index 8d31130d89..24419cfd1b 100644 --- a/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h +++ b/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h @@ -166,8 +166,8 @@ #define HEATER_5_PIN PE3 #define HEATER_BED_PIN PE2 -#ifndef FAN_PIN - #define FAN_PIN PF8 +#ifndef FAN0_PIN + #define FAN0_PIN PF8 #endif #define FAN1_PIN PF9 #define FAN2_PIN PA2 diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h b/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h index e650f2840e..a7b7c079c3 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h @@ -112,8 +112,8 @@ // #define HEATER_0_PIN PC6 #define HEATER_BED_PIN PC7 -#ifndef FAN_PIN - #define FAN_PIN PA14 +#ifndef FAN0_PIN + #define FAN0_PIN PA14 #endif #define FAN1_PIN PA13 #define FAN2_PIN PA1 diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h b/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h index fca181c1f4..49aab671c5 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h @@ -182,8 +182,8 @@ #define HEATER_BED_PIN PC8 #endif -#ifndef FAN_PIN - #define FAN_PIN PB0 +#ifndef FAN0_PIN + #define FAN0_PIN PB0 #endif #ifndef FAN1_PIN #define FAN1_PIN PB1 diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER_V2_2.h b/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER_V2_2.h index 50a19fa3d3..6ef86117e7 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER_V2_2.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER_V2_2.h @@ -28,7 +28,7 @@ #define TEMP_4_PIN PB1 #define TEMP_BED_PIN PB0 -#define FAN_PIN PA13 +#define FAN0_PIN PA13 #define FAN1_PIN PA14 #include "pins_FYSETC_SPIDER.h" diff --git a/Marlin/src/pins/stm32f4/pins_LERDGE_K.h b/Marlin/src/pins/stm32f4/pins_LERDGE_K.h index 0ea7255c17..5471613679 100644 --- a/Marlin/src/pins/stm32f4/pins_LERDGE_K.h +++ b/Marlin/src/pins/stm32f4/pins_LERDGE_K.h @@ -182,8 +182,8 @@ #define HEATER_1_PIN PA0 #define HEATER_BED_PIN PA2 -#ifndef FAN_PIN - #define FAN_PIN PF7 +#ifndef FAN0_PIN + #define FAN0_PIN PF7 #endif #define FAN1_PIN PF6 diff --git a/Marlin/src/pins/stm32f4/pins_LERDGE_S.h b/Marlin/src/pins/stm32f4/pins_LERDGE_S.h index 376c2f3f27..180235019a 100644 --- a/Marlin/src/pins/stm32f4/pins_LERDGE_S.h +++ b/Marlin/src/pins/stm32f4/pins_LERDGE_S.h @@ -122,7 +122,7 @@ #define HEATER_1_PIN PA1 #define HEATER_BED_PIN PA3 -#define FAN_PIN PA15 // heater 0 fan 1 +#define FAN0_PIN PA15 // heater 0 fan 1 #define FAN1_PIN PB10 // heater 1 fan 2 #define FAN2_PIN PF5 // heater 0 fan 2 and heater 1 fan 1 (two sockets, switched together) diff --git a/Marlin/src/pins/stm32f4/pins_LERDGE_X.h b/Marlin/src/pins/stm32f4/pins_LERDGE_X.h index 6325697655..20985f263c 100644 --- a/Marlin/src/pins/stm32f4/pins_LERDGE_X.h +++ b/Marlin/src/pins/stm32f4/pins_LERDGE_X.h @@ -98,8 +98,8 @@ #define HEATER_1_PIN -1 #define HEATER_BED_PIN PA2 -//#ifndef FAN_PIN -// #define FAN_PIN PC15 +//#ifndef FAN0_PIN +// #define FAN0_PIN PC15 //#endif #define FAN1_PIN PC15 #define FAN2_PIN PA0 diff --git a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_common.h b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_common.h index c8a5b428dc..1a72722221 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_common.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_common.h @@ -194,7 +194,7 @@ #define HEATER_2_PIN PA3 // HE2 #define HEATER_BED_PIN PB10 // H-BED -#define FAN_PIN PA2 // FAN0 +#define FAN0_PIN PA2 // FAN0 #define FAN1_PIN PA1 // FAN1 #define FAN2_PIN PA0 // FAN2 diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN2.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN2.h index 2274d0c0df..15314c9ca6 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN2.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN2.h @@ -90,7 +90,7 @@ #define HEATER_0_PIN PF3 // Heater0 #define HEATER_1_PIN PF2 // Heater1 #define HEATER_BED_PIN PF4 // Hotbed -#define FAN_PIN PA7 // Fan0 +#define FAN0_PIN PA7 // Fan0 // // Misc. Functions diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h index 42b252d320..a687cb9c9d 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h @@ -133,7 +133,7 @@ #define HEATER_1_PIN PB0 // HEATER2 #define HEATER_BED_PIN PA0 // HOT BED -#define FAN_PIN PC14 // FAN +#define FAN0_PIN PC14 // FAN #define FAN1_PIN PB1 // FAN1 // diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h index daafe8dee4..8fdb417805 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h @@ -177,7 +177,7 @@ #define HEATER_1_PIN PB0 // HEATER2 #define HEATER_BED_PIN PA0 // HOT BED -#define FAN_PIN PB1 // FAN +#define FAN0_PIN PB1 // FAN // // Thermocouples diff --git a/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h b/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h index ac0b7679c3..b03fc5419e 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h @@ -186,7 +186,7 @@ #define HEATER_1_PIN PB0 // Heater1 #define HEATER_2_PIN PA3 // Heater2 -#define FAN_PIN PA2 // Fan0 +#define FAN0_PIN PA2 // Fan0 #define FAN1_PIN PA1 // Fan1 #define FAN2_PIN PA0 // Fan2 diff --git a/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV3.h b/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV3.h index cf4720a20c..eb6edb765e 100644 --- a/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV3.h +++ b/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV3.h @@ -151,7 +151,7 @@ // // Heaters / Fans // -#define FAN_PIN PE2 +#define FAN0_PIN PE2 #define FAN1_PIN PE3 #define FAN2_PIN PE4 #define FAN3_PIN PE5 diff --git a/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV4.h b/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV4.h index c8da0af894..b44061a491 100644 --- a/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV4.h +++ b/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV4.h @@ -148,7 +148,7 @@ // // Heaters / Fans // -#define FAN_PIN PE2 +#define FAN0_PIN PE2 #define FAN1_PIN PE3 #define FAN2_PIN PE4 #define FAN3_PIN PE5 diff --git a/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h b/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h index 264bb91af4..ed4ba34266 100644 --- a/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h +++ b/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h @@ -118,7 +118,7 @@ #define HEATER_2_PIN PC8 #define HEATER_BED_PIN PA1 -#define FAN_PIN PC9 +#define FAN0_PIN PC9 #define FAN1_PIN PA8 // diff --git a/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_V2.h b/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_V2.h index 4fb57985b9..b2fec3b834 100644 --- a/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_V2.h +++ b/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_V2.h @@ -162,8 +162,8 @@ // #define HEATER_BED_PIN PC9 #define HEATER_0_PIN PC8 -#ifndef FAN_PIN - #define FAN_PIN PC6 +#ifndef FAN0_PIN + #define FAN0_PIN PC6 #endif #define FAN1_PIN PC7 diff --git a/Marlin/src/pins/stm32f4/pins_TRONXY_V10.h b/Marlin/src/pins/stm32f4/pins_TRONXY_V10.h index 475dc42266..21158f7af9 100644 --- a/Marlin/src/pins/stm32f4/pins_TRONXY_V10.h +++ b/Marlin/src/pins/stm32f4/pins_TRONXY_V10.h @@ -152,7 +152,7 @@ #define HEATER_BED_PIN PE2 // HOT BED //#define HEATER_BED_INVERTING true -#define FAN_PIN PG0 // FAN0 +#define FAN0_PIN PG0 // FAN0 #define FAN1_PIN PB6 // FAN1 #define FAN2_PIN PG9 // FAN2 #define FAN3_PIN PF10 // FAN3 diff --git a/Marlin/src/pins/stm32f4/pins_VAKE403D.h b/Marlin/src/pins/stm32f4/pins_VAKE403D.h index 21ab9d0e70..eba63c5a5b 100644 --- a/Marlin/src/pins/stm32f4/pins_VAKE403D.h +++ b/Marlin/src/pins/stm32f4/pins_VAKE403D.h @@ -129,8 +129,8 @@ #define HEATER_1_PIN PD14 #define HEATER_BED_PIN PD12 -#ifndef FAN_PIN - #define FAN_PIN PD13 +#ifndef FAN0_PIN + #define FAN0_PIN PD13 #endif #define FAN1_PIN PB5 // PA0 #define FAN2_PIN PB4 // PA1 diff --git a/Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h b/Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h index 48f986e2ca..6f5c179d1c 100644 --- a/Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h +++ b/Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h @@ -154,8 +154,8 @@ #define HEATER_0_PIN PA15 // PWM Capable, TIM2_CH1 #define HEATER_BED_PIN PB3 // PWM Capable, TIM2_CH2 -#ifndef FAN_PIN - #define FAN_PIN PB10 // PWM Capable, TIM2_CH3 +#ifndef FAN0_PIN + #define FAN0_PIN PB10 // PWM Capable, TIM2_CH3 #endif #define FAN1_PIN PB11 // PWM Capable, TIM2_CH4 diff --git a/Marlin/src/pins/stm32f7/pins_REMRAM_V1.h b/Marlin/src/pins/stm32f7/pins_REMRAM_V1.h index c4feba692f..f13eba8ef3 100644 --- a/Marlin/src/pins/stm32f7/pins_REMRAM_V1.h +++ b/Marlin/src/pins/stm32f7/pins_REMRAM_V1.h @@ -95,8 +95,8 @@ #define HEATER_0_PIN 33 #define HEATER_BED_PIN 31 -#ifndef FAN_PIN - #define FAN_PIN 30 // "FAN1" +#ifndef FAN0_PIN + #define FAN0_PIN 30 // "FAN1" #endif #define FAN1_PIN 32 // "FAN2" diff --git a/Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h b/Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h index 138397fa11..c79f8ab084 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h @@ -135,7 +135,7 @@ // Heaters / Fans // #define HEATER_0_PIN PA2 // "HE" -#define FAN_PIN PA0 // "FAN0" +#define FAN0_PIN PA0 // "FAN0" #define FAN1_PIN PA1 // "FAN1" // diff --git a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h index 84bf758777..57e257a7ba 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h @@ -189,7 +189,7 @@ #define HEATER_1_PIN PB10 // "HE1" #define HEATER_BED_PIN PB2 // "HB" -#define FAN_PIN PA8 // "FAN0" +#define FAN0_PIN PA8 // "FAN0" #define FAN1_PIN PB15 // "FAN1" #define FAN2_PIN PB14 // "FAN2" diff --git a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V1_0.h b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V1_0.h index 7096cfbfbd..276c951143 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V1_0.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V1_0.h @@ -153,7 +153,7 @@ #define HEATER_0_PIN PC8 // "HE" #define HEATER_BED_PIN PD8 // "HB" -#define FAN_PIN PD2 // "FAN0" +#define FAN0_PIN PD2 // "FAN0" #define FAN1_PIN PD3 // "FAN1" #define FAN2_PIN PD4 // "FAN2" diff --git a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h index 59c2b0f97c..737330d351 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h @@ -175,7 +175,7 @@ #define HEATER_1_PIN PA7 // "HE1" #define HEATER_BED_PIN PA5 // "HB" -#define FAN_PIN PA4 // "FAN0" +#define FAN0_PIN PA4 // "FAN0" #define FAN1_PIN PA3 // "FAN1" // diff --git a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h index 631b50d0f2..2c778f8732 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h @@ -229,7 +229,7 @@ #define HEATER_2_PIN PB6 // HE2 #define HEATER_3_PIN PE1 // HE3 -#define FAN_PIN PE6 // FAN0 +#define FAN0_PIN PE6 // FAN0 #define FAN1_PIN PE0 // FAN1 #define FAN2_PIN PC12 // FAN2 #define FAN3_PIN PE5 // FAN3 diff --git a/Marlin/src/pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h b/Marlin/src/pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h index f71b7b40eb..9be2357043 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h @@ -136,7 +136,7 @@ // #define HEATER_0_PIN PC8 // "HE" #define HEATER_BED_PIN PC9 // "HB" -#define FAN_PIN PC6 // "FAN0" +#define FAN0_PIN PC6 // "FAN0" #define FAN1_PIN PC7 // "FAN1" #define FAN2_PIN PB15 // "FAN2" diff --git a/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h b/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h index 9ddd46d6cd..c414ac619b 100644 --- a/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h +++ b/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h @@ -253,7 +253,7 @@ #define HEATER_2_PIN PF9 // Heater2 #define HEATER_3_PIN PF7 // Heater3 -#define FAN_PIN PA6 // Fan0 +#define FAN0_PIN PA6 // Fan0 #define FAN1_PIN PA5 // Fan1 #define FAN2_PIN PA4 // Fan2 #define FAN3_PIN PA3 // Fan3 diff --git a/Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX_common.h b/Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX_common.h index 245567c27c..7f5f5269d1 100644 --- a/Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX_common.h +++ b/Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX_common.h @@ -158,7 +158,7 @@ #define HEATER_1_PIN PC5 #define HEATER_BED_PIN PA4 -#define FAN_PIN PA5 // "FAN0" +#define FAN0_PIN PA5 // "FAN0" #define FAN1_PIN PA6 // "FAN1" #define FAN2_PIN PA7 // "FAN2" diff --git a/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h b/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h index c05ae971cf..cafd30bf63 100644 --- a/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h +++ b/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h @@ -239,8 +239,8 @@ #ifndef HEATER_BED_PIN #define HEATER_BED_PIN PD7 // Hotbed #endif -#ifndef FAN_PIN - #define FAN_PIN PB7 // Fan0 +#ifndef FAN0_PIN + #define FAN0_PIN PB7 // Fan0 #endif #if HAS_CUTTER diff --git a/Marlin/src/pins/teensy2/pins_5DPRINT.h b/Marlin/src/pins/teensy2/pins_5DPRINT.h index 9eb1da36f4..798f98dae5 100644 --- a/Marlin/src/pins/teensy2/pins_5DPRINT.h +++ b/Marlin/src/pins/teensy2/pins_5DPRINT.h @@ -133,8 +133,8 @@ #define HEATER_0_PIN 15 // C5 #define HEATER_BED_PIN 14 // C4 -#ifndef FAN_PIN - #define FAN_PIN 16 // C6 PWM3A +#ifndef FAN0_PIN + #define FAN0_PIN 16 // C6 PWM3A #endif // diff --git a/Marlin/src/pins/teensy2/pins_BRAINWAVE.h b/Marlin/src/pins/teensy2/pins_BRAINWAVE.h index bbda3730ee..900eae6dd4 100644 --- a/Marlin/src/pins/teensy2/pins_BRAINWAVE.h +++ b/Marlin/src/pins/teensy2/pins_BRAINWAVE.h @@ -120,8 +120,8 @@ #define HEATER_0_PIN 32 // A4 Extruder #define HEATER_BED_PIN 18 // E6 Bed -#ifndef FAN_PIN - #define FAN_PIN 31 // A3 Fan +#ifndef FAN0_PIN + #define FAN0_PIN 31 // A3 Fan #endif // diff --git a/Marlin/src/pins/teensy2/pins_BRAINWAVE_PRO.h b/Marlin/src/pins/teensy2/pins_BRAINWAVE_PRO.h index 969ec84558..a1ef48e524 100644 --- a/Marlin/src/pins/teensy2/pins_BRAINWAVE_PRO.h +++ b/Marlin/src/pins/teensy2/pins_BRAINWAVE_PRO.h @@ -126,8 +126,8 @@ // #define HEATER_0_PIN 27 // B7 #define HEATER_BED_PIN 26 // B6 Bed -#ifndef FAN_PIN - #define FAN_PIN 16 // C6 Fan, PWM3A +#ifndef FAN0_PIN + #define FAN0_PIN 16 // C6 Fan, PWM3A #endif // diff --git a/Marlin/src/pins/teensy2/pins_PRINTRBOARD.h b/Marlin/src/pins/teensy2/pins_PRINTRBOARD.h index 1fb7387d16..f80576b509 100644 --- a/Marlin/src/pins/teensy2/pins_PRINTRBOARD.h +++ b/Marlin/src/pins/teensy2/pins_PRINTRBOARD.h @@ -118,8 +118,8 @@ #define HEATER_2_PIN 45 // F7 #define HEATER_BED_PIN 14 // C4 PWM3C -#ifndef FAN_PIN - #define FAN_PIN 16 // C6 PWM3A +#ifndef FAN0_PIN + #define FAN0_PIN 16 // C6 PWM3A #endif // diff --git a/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h b/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h index 5ce106b485..06496abdcd 100644 --- a/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h +++ b/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h @@ -203,8 +203,8 @@ #endif #endif -#ifndef FAN_PIN - #define FAN_PIN 16 // C6 PWM3A +#ifndef FAN0_PIN + #define FAN0_PIN 16 // C6 PWM3A #endif // diff --git a/Marlin/src/pins/teensy2/pins_SAV_MKI.h b/Marlin/src/pins/teensy2/pins_SAV_MKI.h index a469bba59b..5044af75d3 100644 --- a/Marlin/src/pins/teensy2/pins_SAV_MKI.h +++ b/Marlin/src/pins/teensy2/pins_SAV_MKI.h @@ -116,8 +116,8 @@ #define HEATER_0_PIN 15 // C5 PWM3B - Extruder #define HEATER_BED_PIN 14 // C4 PWM3C - Bed -#ifndef FAN_PIN - #define FAN_PIN 16 // C6 PWM3A +#ifndef FAN0_PIN + #define FAN0_PIN 16 // C6 PWM3A #endif // diff --git a/Marlin/src/pins/teensy2/pins_TEENSY2.h b/Marlin/src/pins/teensy2/pins_TEENSY2.h index b95e9cae48..b31c173869 100644 --- a/Marlin/src/pins/teensy2/pins_TEENSY2.h +++ b/Marlin/src/pins/teensy2/pins_TEENSY2.h @@ -149,8 +149,8 @@ // #define HEATER_0_PIN 15 // C5 PWM3B Extruder #define HEATER_BED_PIN 14 // C4 PWM3C -#ifndef FAN_PIN - #define FAN_PIN 16 // C6 PWM3A Fan +#ifndef FAN0_PIN + #define FAN0_PIN 16 // C6 PWM3A Fan #endif // diff --git a/Marlin/src/pins/teensy2/pins_TEENSYLU.h b/Marlin/src/pins/teensy2/pins_TEENSYLU.h index 294a289cdb..81bb56349f 100644 --- a/Marlin/src/pins/teensy2/pins_TEENSYLU.h +++ b/Marlin/src/pins/teensy2/pins_TEENSYLU.h @@ -133,8 +133,8 @@ #define HEATER_0_PIN 15 // C5 PWM3B - Extruder #define HEATER_BED_PIN 14 // C4 PWM3C -#ifndef FAN_PIN - #define FAN_PIN 16 // C6 PWM3A +#ifndef FAN0_PIN + #define FAN0_PIN 16 // C6 PWM3A #endif // diff --git a/Marlin/src/pins/teensy3/pins_TEENSY31_32.h b/Marlin/src/pins/teensy3/pins_TEENSY31_32.h index 0edb5cb19d..ee5466b54d 100644 --- a/Marlin/src/pins/teensy3/pins_TEENSY31_32.h +++ b/Marlin/src/pins/teensy3/pins_TEENSY31_32.h @@ -71,8 +71,8 @@ #define HEATER_0_PIN 20 //#define HEATER_1_PIN 36 #define HEATER_BED_PIN 21 -#ifndef FAN_PIN - #define FAN_PIN 22 +#ifndef FAN0_PIN + #define FAN0_PIN 22 #endif // diff --git a/Marlin/src/pins/teensy3/pins_TEENSY35_36.h b/Marlin/src/pins/teensy3/pins_TEENSY35_36.h index 71c348536a..289a8acb1c 100644 --- a/Marlin/src/pins/teensy3/pins_TEENSY35_36.h +++ b/Marlin/src/pins/teensy3/pins_TEENSY35_36.h @@ -57,7 +57,7 @@ * 3.3V | | GND * Z_STOP_PIN 24 | 40 * * 53 | A22 DAC1 * AUX2 25 | 41 * * 52 | A21 DAC0 - * AUX2 FAN_PIN SCL2 TX1 26 | 42 * * 51 | 39 A20 MISO0 SDSS + * AUX2 FAN0_PIN SCL2 TX1 26 | 42 * * 51 | 39 A20 MISO0 SDSS * AUX2 Z-PROBE PWR SCK0 RX1 27 | * * * * * | 38 A19 PWM SDA1 * AUX2 SOL1_PIN MOSI0 28 | 43 * * 50 | 37 A18 PWM SCL1 * D10 CONTROLLER_FAN_PIN CAN0TX PWM 29 | 44 * * 49 | 36 A17 PWM @@ -109,8 +109,8 @@ #define HEATER_0_PIN 30 #define HEATER_1_PIN 36 #define HEATER_BED_PIN 31 -#ifndef FAN_PIN - #define FAN_PIN 2 +#ifndef FAN0_PIN + #define FAN0_PIN 2 #endif #define TEMP_0_PIN 2 // Extruder / Analog pin numbering: 2 => A2 diff --git a/Marlin/src/pins/teensy4/pins_TEENSY41.h b/Marlin/src/pins/teensy4/pins_TEENSY41.h index 21a1ff675f..263d9e8f8b 100644 --- a/Marlin/src/pins/teensy4/pins_TEENSY41.h +++ b/Marlin/src/pins/teensy4/pins_TEENSY41.h @@ -53,10 +53,10 @@ * 3.3V | | GND * Z_STOP_PIN PWM 24 | | 41 A17 * E0_ENABLE_PIN PWM 25 | | 40 A16 - * FAN_PIN MOSI1 26 | | 39 A15 MISO1 X_STOP_PIN + * FAN0_PIN MOSI1 26 | | 39 A15 MISO1 X_STOP_PIN * Z-PROBE PWR SCK1 27 | * * * * * | 38 A14 Y_STOP_PIN * SOL1_PIN RX7 PWM 28 | | 37 PWM HEATER_0_PIN - * FAN_PIN TX7 PWM 29 | | 36 PWM HEATER_BED_PIN + * FAN0_PIN TX7 PWM 29 | | 36 PWM HEATER_BED_PIN * X_CS_PIN 30 | | 35 TX8 E1_ENABLE_PIN * y_CS_PIN 31 | SDCARD | 34 RX8 E1_DIR_PIN * Z_CS_PIN 32 |_______________| 33 PWM E1_STEP_PIN @@ -107,8 +107,8 @@ #define HEATER_0_PIN 37 #define HEATER_1_PIN 18 #define HEATER_BED_PIN 36 -#ifndef FAN_PIN - #define FAN_PIN 29 +#ifndef FAN0_PIN + #define FAN0_PIN 29 #endif // diff --git a/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_SPIDER_KING407/PeripheralPins.c b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_SPIDER_KING407/PeripheralPins.c index 5c7c301f82..4c0a7e4fa1 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_SPIDER_KING407/PeripheralPins.c +++ b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_SPIDER_KING407/PeripheralPins.c @@ -191,7 +191,7 @@ WEAK const PinMap PinMap_PWM[] = { {PD_15, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4 FAN2_PIN //{PE_5, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 1, 0)}, // TIM9_CH1 //{PE_6, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 2, 0)}, // TIM9_CH2 - {PE_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N FAN_PIN + {PE_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N FAN0_PIN {PE_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1 FAN1_PIN {PE_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N HEATER_BED_PIN //{PE_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 0)}, // TIM1_CH2 From aeb8eabfccd8f3bc8449d23d675f02ffeb1561fb Mon Sep 17 00:00:00 2001 From: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Sun, 26 Mar 2023 00:34:56 +0100 Subject: [PATCH 079/225] =?UTF-8?q?=F0=9F=93=9D=20Fix=20spelling=20(#25563?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration_adv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 9b4c58be6f..eb04f473b7 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -388,7 +388,7 @@ * * A very stable heater might produce a false positive and halt the printer. In this case, try increasing * the corresponding THERMAL_PROTECTION_*_PERIOD constant a bit. Keep in mind that uncontrolled heating - * shouldn't be allowed to persist for more than a minite or two. + * shouldn't be allowed to persist for more than a minute or two. * * Be careful to distinguish false positives from real sensor issues before disabling this feature. If the * heater's temperature appears even slightly higher than expected after restarting, you may have a real From b4b2b3e61c6b0d1f2d43591460430e1ac8fc817d Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sun, 26 Mar 2023 00:24:07 +0000 Subject: [PATCH 080/225] [cron] Bump distribution date (2023-03-26) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index bb46cc9519..baa481f8f0 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-03-25" +//#define STRING_DISTRIBUTION_DATE "2023-03-26" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index d2b1ff06e9..e5489d990f 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-03-25" + #define STRING_DISTRIBUTION_DATE "2023-03-26" #endif /** From cb0a8f2fe2414cc4ab5180c3bc86cd7c320862d5 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 25 Mar 2023 20:17:54 -0500 Subject: [PATCH 081/225] =?UTF-8?q?=F0=9F=8E=A8=20Timer=20tweaks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/AVR/timers.h | 8 ++++---- Marlin/src/HAL/ESP32/timers.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Marlin/src/HAL/AVR/timers.h b/Marlin/src/HAL/AVR/timers.h index 33c3880b6b..d9cdfc4f01 100644 --- a/Marlin/src/HAL/AVR/timers.h +++ b/Marlin/src/HAL/AVR/timers.h @@ -44,14 +44,14 @@ typedef uint16_t hal_timer_t; #define MF_TIMER_TEMP 0 #endif -#define TEMP_TIMER_FREQUENCY ((F_CPU) / 64.0 / 256.0) +#define TEMP_TIMER_FREQUENCY (((F_CPU) + 0x2000) / 0x4000) #define STEPPER_TIMER_RATE HAL_TIMER_RATE #define STEPPER_TIMER_PRESCALE 8 -#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) // Cannot be of type double +#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) -#define PULSE_TIMER_RATE STEPPER_TIMER_RATE // frequency of pulse timer -#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE +#define PULSE_TIMER_RATE STEPPER_TIMER_RATE +#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE #define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US #define ENABLE_STEPPER_DRIVER_INTERRUPT() SBI(TIMSK1, OCIE1A) diff --git a/Marlin/src/HAL/ESP32/timers.cpp b/Marlin/src/HAL/ESP32/timers.cpp index c37ad2430c..a6893150b6 100644 --- a/Marlin/src/HAL/ESP32/timers.cpp +++ b/Marlin/src/HAL/ESP32/timers.cpp @@ -111,12 +111,12 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) { /** * Set the upper value of the timer, when the timer reaches this upper value the * interrupt should be triggered and the counter reset - * @param timer_num timer number to set the count to - * @param count threshold at which the interrupt is triggered + * @param timer_num timer number to set the compare value to + * @param compare threshold at which the interrupt is triggered */ -void HAL_timer_set_compare(const uint8_t timer_num, hal_timer_t count) { +void HAL_timer_set_compare(const uint8_t timer_num, const hal_timer_t compare) { const tTimerConfig timer = timer_config[timer_num]; - timer_set_alarm_value(timer.group, timer.idx, count); + timer_set_alarm_value(timer.group, timer.idx, compare); } /** From ea5d7e2eee641122ddf56705f6c9060d84a20df3 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 26 Mar 2023 04:00:12 -0500 Subject: [PATCH 082/225] =?UTF-8?q?=F0=9F=94=A7=20Refactor=20endstop=20sta?= =?UTF-8?q?te=20config=20(#25574)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration.h | 43 +- Marlin/src/gcode/config/M43.cpp | 42 +- Marlin/src/inc/Conditionals_LCD.h | 38 +- Marlin/src/inc/Conditionals_post.h | 180 ++++---- Marlin/src/inc/SanityCheck.h | 426 +++++++++--------- Marlin/src/lcd/e3v2/proui/endstop_diag.cpp | 2 +- .../generic/endstop_state_screen.cpp | 16 +- Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp | 2 +- Marlin/src/lcd/extui/nextion/nextion_tft.cpp | 18 +- Marlin/src/module/endstops.cpp | 286 ++---------- Marlin/src/module/probe.h | 4 +- buildroot/tests/FYSETC_F6 | 4 +- buildroot/tests/mega1280 | 4 +- buildroot/tests/teensy35 | 2 +- buildroot/tests/teensy41 | 2 +- 15 files changed, 445 insertions(+), 624 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 9544ac5566..becad3f2f0 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -1165,26 +1165,29 @@ //#define ENDSTOPPULLDOWN_ZMIN_PROBE #endif -// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). -#define X_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop. -#define Y_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop. -#define Z_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop. -#define I_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop. -#define J_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop. -#define K_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop. -#define U_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop. -#define V_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop. -#define W_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop. -#define X_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop. -#define Y_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop. -#define Z_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop. -#define I_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop. -#define J_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop. -#define K_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop. -#define U_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop. -#define V_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop. -#define W_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop. -#define Z_MIN_PROBE_ENDSTOP_INVERTING false // Set to true to invert the logic of the probe. +/** + * Endstop "Hit" State + * Set to the state (HIGH or LOW) that applies to each endstop. + */ +#define X_MIN_ENDSTOP_HIT_STATE HIGH +#define X_MAX_ENDSTOP_HIT_STATE HIGH +#define Y_MIN_ENDSTOP_HIT_STATE HIGH +#define Y_MAX_ENDSTOP_HIT_STATE HIGH +#define Z_MIN_ENDSTOP_HIT_STATE HIGH +#define Z_MAX_ENDSTOP_HIT_STATE HIGH +#define I_MIN_ENDSTOP_HIT_STATE HIGH +#define I_MAX_ENDSTOP_HIT_STATE HIGH +#define J_MIN_ENDSTOP_HIT_STATE HIGH +#define J_MAX_ENDSTOP_HIT_STATE HIGH +#define K_MIN_ENDSTOP_HIT_STATE HIGH +#define K_MAX_ENDSTOP_HIT_STATE HIGH +#define U_MIN_ENDSTOP_HIT_STATE HIGH +#define U_MAX_ENDSTOP_HIT_STATE HIGH +#define V_MIN_ENDSTOP_HIT_STATE HIGH +#define V_MAX_ENDSTOP_HIT_STATE HIGH +#define W_MIN_ENDSTOP_HIT_STATE HIGH +#define W_MAX_ENDSTOP_HIT_STATE HIGH +#define Z_MIN_PROBE_ENDSTOP_HIT_STATE HIGH // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. diff --git a/Marlin/src/gcode/config/M43.cpp b/Marlin/src/gcode/config/M43.cpp index 5807844012..d408ded3ac 100644 --- a/Marlin/src/gcode/config/M43.cpp +++ b/Marlin/src/gcode/config/M43.cpp @@ -139,24 +139,17 @@ inline void servo_probe_test() { bool deploy_state = false, stow_state; #if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) - + constexpr bool probe_hit_state = Z_MIN_ENDSTOP_HIT_STATE; #define PROBE_TEST_PIN Z_MIN_PIN - constexpr bool probe_inverting = Z_MIN_ENDSTOP_INVERTING; - - SERIAL_ECHOLNPGM(". Probe Z_MIN_PIN: ", PROBE_TEST_PIN); - SERIAL_ECHOPGM(". Z_MIN_ENDSTOP_INVERTING: "); - + #define _PROBE_PREF "Z_MIN" #else - + constexpr bool probe_hit_state = Z_MIN_PROBE_ENDSTOP_HIT_STATE; #define PROBE_TEST_PIN Z_MIN_PROBE_PIN - constexpr bool probe_inverting = Z_MIN_PROBE_ENDSTOP_INVERTING; - - SERIAL_ECHOLNPGM(". Probe Z_MIN_PROBE_PIN: ", PROBE_TEST_PIN); - SERIAL_ECHOPGM( ". Z_MIN_PROBE_ENDSTOP_INVERTING: "); - + #define _PROBE_PREF "Z_MIN_PROBE" #endif - serialprint_truefalse(probe_inverting); + SERIAL_ECHOLNPGM(". Probe " _PROBE_PREF "_PIN: ", PROBE_TEST_PIN); + serial_ternary(probe_hit_state, F(". " _PROBE_PREF "_ENDSTOP_HIT_STATE: "), F("HIGH"), F("LOW")); SERIAL_EOL(); SET_INPUT_PULLUP(PROBE_TEST_PIN); @@ -173,11 +166,11 @@ inline void servo_probe_test() { SERIAL_ECHOLNPGM(". Check for BLTOUCH"); bltouch._reset(); bltouch._stow(); - if (probe_inverting == READ(PROBE_TEST_PIN)) { + if (READ(PROBE_TEST_PIN) != probe_hit_state) { bltouch._set_SW_mode(); - if (probe_inverting != READ(PROBE_TEST_PIN)) { + if (READ(PROBE_TEST_PIN) == probe_hit_state) { bltouch._deploy(); - if (probe_inverting == READ(PROBE_TEST_PIN)) { + if (READ(PROBE_TEST_PIN) != probe_hit_state) { bltouch._stow(); SERIAL_ECHOLNPGM("= BLTouch Classic 1.2, 1.3, Smart 1.0, 2.0, 2.2, 3.0, 3.1 detected."); // Check for a 3.1 by letting the user trigger it, later @@ -195,31 +188,30 @@ inline void servo_probe_test() { if (!blt) { // DEPLOY and STOW 4 times and see if the signal follows // Then it is a mechanical switch - uint8_t i = 0; SERIAL_ECHOLNPGM(". Deploy & stow 4 times"); - do { + LOOP_L_N(i, 4) { servo[probe_index].move(servo_angles[Z_PROBE_SERVO_NR][0]); // Deploy safe_delay(500); deploy_state = READ(PROBE_TEST_PIN); servo[probe_index].move(servo_angles[Z_PROBE_SERVO_NR][1]); // Stow safe_delay(500); stow_state = READ(PROBE_TEST_PIN); - } while (++i < 4); + } - if (probe_inverting != deploy_state) SERIAL_ECHOLNPGM("WARNING: INVERTING setting probably backwards."); + if (probe_hit_state == deploy_state) SERIAL_ECHOLNPGM("WARNING: " _PROBE_PREF "_ENDSTOP_HIT_STATE is probably wrong."); if (deploy_state != stow_state) { SERIAL_ECHOLNPGM("= Mechanical Switch detected"); if (deploy_state) { - SERIAL_ECHOLNPGM(" DEPLOYED state: HIGH (logic 1)", - " STOWED (triggered) state: LOW (logic 0)"); + SERIAL_ECHOLNPGM(". DEPLOYED state: HIGH (logic 1)\n" + ". STOWED (triggered) state: LOW (logic 0)"); } else { - SERIAL_ECHOLNPGM(" DEPLOYED state: LOW (logic 0)", - " STOWED (triggered) state: HIGH (logic 1)"); + SERIAL_ECHOLNPGM(". DEPLOYED state: LOW (logic 0)\n" + ". STOWED (triggered) state: HIGH (logic 1)"); } #if ENABLED(BLTOUCH) - SERIAL_ECHOLNPGM("FAIL: BLTOUCH enabled - Set up this device as a Servo Probe with INVERTING set to 'true'."); + SERIAL_ECHOLNPGM("FAIL: Can't enable BLTOUCH. Check your settings."); #endif return; } diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index ecaeee86e7..3c821e5306 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -794,8 +794,8 @@ #undef AVOID_OBSTACLES #undef ENDSTOPPULLUP_YMIN #undef ENDSTOPPULLUP_YMAX - #undef Y_MIN_ENDSTOP_INVERTING - #undef Y_MAX_ENDSTOP_INVERTING + #undef Y_MIN_ENDSTOP_HIT_STATE + #undef Y_MAX_ENDSTOP_HIT_STATE #undef Y2_DRIVER_TYPE #undef Y_ENABLE_ON #undef DISABLE_Y @@ -821,8 +821,8 @@ #else #undef ENDSTOPPULLUP_ZMIN #undef ENDSTOPPULLUP_ZMAX - #undef Z_MIN_ENDSTOP_INVERTING - #undef Z_MAX_ENDSTOP_INVERTING + #undef Z_MIN_ENDSTOP_HIT_STATE + #undef Z_MAX_ENDSTOP_HIT_STATE #undef Z2_DRIVER_TYPE #undef Z3_DRIVER_TYPE #undef Z4_DRIVER_TYPE @@ -841,8 +841,8 @@ #if !HAS_I_AXIS #undef ENDSTOPPULLUP_IMIN #undef ENDSTOPPULLUP_IMAX - #undef I_MIN_ENDSTOP_INVERTING - #undef I_MAX_ENDSTOP_INVERTING + #undef I_MIN_ENDSTOP_HIT_STATE + #undef I_MAX_ENDSTOP_HIT_STATE #undef I_ENABLE_ON #undef DISABLE_I #undef INVERT_I_DIR @@ -857,8 +857,8 @@ #if !HAS_J_AXIS #undef ENDSTOPPULLUP_JMIN #undef ENDSTOPPULLUP_JMAX - #undef J_MIN_ENDSTOP_INVERTING - #undef J_MAX_ENDSTOP_INVERTING + #undef J_MIN_ENDSTOP_HIT_STATE + #undef J_MAX_ENDSTOP_HIT_STATE #undef J_ENABLE_ON #undef DISABLE_J #undef INVERT_J_DIR @@ -873,8 +873,8 @@ #if !HAS_K_AXIS #undef ENDSTOPPULLUP_KMIN #undef ENDSTOPPULLUP_KMAX - #undef K_MIN_ENDSTOP_INVERTING - #undef K_MAX_ENDSTOP_INVERTING + #undef K_MIN_ENDSTOP_HIT_STATE + #undef K_MAX_ENDSTOP_HIT_STATE #undef K_ENABLE_ON #undef DISABLE_K #undef INVERT_K_DIR @@ -889,8 +889,8 @@ #if !HAS_U_AXIS #undef ENDSTOPPULLUP_UMIN #undef ENDSTOPPULLUP_UMAX - #undef U_MIN_ENDSTOP_INVERTING - #undef U_MAX_ENDSTOP_INVERTING + #undef U_MIN_ENDSTOP_HIT_STATE + #undef U_MAX_ENDSTOP_HIT_STATE #undef U_ENABLE_ON #undef DISABLE_U #undef INVERT_U_DIR @@ -905,8 +905,8 @@ #if !HAS_V_AXIS #undef ENDSTOPPULLUP_VMIN #undef ENDSTOPPULLUP_VMAX - #undef V_MIN_ENDSTOP_INVERTING - #undef V_MAX_ENDSTOP_INVERTING + #undef V_MIN_ENDSTOP_HIT_STATE + #undef V_MAX_ENDSTOP_HIT_STATE #undef V_ENABLE_ON #undef DISABLE_V #undef INVERT_V_DIR @@ -921,8 +921,8 @@ #if !HAS_W_AXIS #undef ENDSTOPPULLUP_WMIN #undef ENDSTOPPULLUP_WMAX - #undef W_MIN_ENDSTOP_INVERTING - #undef W_MAX_ENDSTOP_INVERTING + #undef W_MIN_ENDSTOP_HIT_STATE + #undef W_MAX_ENDSTOP_HIT_STATE #undef W_ENABLE_ON #undef DISABLE_W #undef INVERT_W_DIR @@ -1081,10 +1081,8 @@ * The BLTouch Probe emulates a servo probe * and uses "special" angles for its state. */ -#if ENABLED(BLTOUCH) - #ifndef Z_PROBE_SERVO_NR - #define Z_PROBE_SERVO_NR 0 - #endif +#if ENABLED(BLTOUCH) && !defined(Z_PROBE_SERVO_NR) + #define Z_PROBE_SERVO_NR 0 #endif /** diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index f137d48859..6e0c6c95a8 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -914,19 +914,19 @@ */ #if ENABLED(X_DUAL_ENDSTOPS) #if X_HOME_TO_MAX - #ifndef X2_MAX_ENDSTOP_INVERTING + #ifndef X2_MAX_ENDSTOP_HIT_STATE #if X2_USE_ENDSTOP == _XMIN_ - #define X2_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING + #define X2_MAX_ENDSTOP_HIT_STATE X_MIN_ENDSTOP_HIT_STATE #elif X2_USE_ENDSTOP == _XMAX_ - #define X2_MAX_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING + #define X2_MAX_ENDSTOP_HIT_STATE X_MAX_ENDSTOP_HIT_STATE #elif X2_USE_ENDSTOP == _YMIN_ - #define X2_MAX_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING + #define X2_MAX_ENDSTOP_HIT_STATE Y_MIN_ENDSTOP_HIT_STATE #elif X2_USE_ENDSTOP == _YMAX_ - #define X2_MAX_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING + #define X2_MAX_ENDSTOP_HIT_STATE Y_MAX_ENDSTOP_HIT_STATE #elif X2_USE_ENDSTOP == _ZMIN_ - #define X2_MAX_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING + #define X2_MAX_ENDSTOP_HIT_STATE Z_MIN_ENDSTOP_HIT_STATE #elif X2_USE_ENDSTOP == _ZMAX_ - #define X2_MAX_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING + #define X2_MAX_ENDSTOP_HIT_STATE Z_MAX_ENDSTOP_HIT_STATE #endif #endif #if !PIN_EXISTS(X2_MAX) @@ -936,19 +936,19 @@ #endif #endif #else - #ifndef X2_MIN_ENDSTOP_INVERTING + #ifndef X2_MIN_ENDSTOP_HIT_STATE #if X2_USE_ENDSTOP == _XMIN_ - #define X2_MIN_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING + #define X2_MIN_ENDSTOP_HIT_STATE X_MIN_ENDSTOP_HIT_STATE #elif X2_USE_ENDSTOP == _XMAX_ - #define X2_MIN_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING + #define X2_MIN_ENDSTOP_HIT_STATE X_MAX_ENDSTOP_HIT_STATE #elif X2_USE_ENDSTOP == _YMIN_ - #define X2_MIN_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING + #define X2_MIN_ENDSTOP_HIT_STATE Y_MIN_ENDSTOP_HIT_STATE #elif X2_USE_ENDSTOP == _YMAX_ - #define X2_MIN_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING + #define X2_MIN_ENDSTOP_HIT_STATE Y_MAX_ENDSTOP_HIT_STATE #elif X2_USE_ENDSTOP == _ZMIN_ - #define X2_MIN_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING + #define X2_MIN_ENDSTOP_HIT_STATE Z_MIN_ENDSTOP_HIT_STATE #elif X2_USE_ENDSTOP == _ZMAX_ - #define X2_MIN_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING + #define X2_MIN_ENDSTOP_HIT_STATE Z_MAX_ENDSTOP_HIT_STATE #endif #endif #if !PIN_EXISTS(X2_MIN) @@ -958,11 +958,11 @@ #endif #endif #endif - #ifndef X2_MAX_ENDSTOP_INVERTING - #define X2_MAX_ENDSTOP_INVERTING false + #ifndef X2_MAX_ENDSTOP_HIT_STATE + #define X2_MAX_ENDSTOP_HIT_STATE HIGH #endif - #ifndef X2_MIN_ENDSTOP_INVERTING - #define X2_MIN_ENDSTOP_INVERTING false + #ifndef X2_MIN_ENDSTOP_HIT_STATE + #define X2_MIN_ENDSTOP_HIT_STATE HIGH #endif #endif @@ -971,19 +971,19 @@ */ #if ENABLED(Y_DUAL_ENDSTOPS) #if Y_HOME_TO_MAX - #ifndef Y2_MAX_ENDSTOP_INVERTING + #ifndef Y2_MAX_ENDSTOP_HIT_STATE #if Y2_USE_ENDSTOP == _XMIN_ - #define Y2_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING + #define Y2_MAX_ENDSTOP_HIT_STATE X_MIN_ENDSTOP_HIT_STATE #elif Y2_USE_ENDSTOP == _XMAX_ - #define Y2_MAX_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING + #define Y2_MAX_ENDSTOP_HIT_STATE X_MAX_ENDSTOP_HIT_STATE #elif Y2_USE_ENDSTOP == _YMIN_ - #define Y2_MAX_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING + #define Y2_MAX_ENDSTOP_HIT_STATE Y_MIN_ENDSTOP_HIT_STATE #elif Y2_USE_ENDSTOP == _YMAX_ - #define Y2_MAX_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING + #define Y2_MAX_ENDSTOP_HIT_STATE Y_MAX_ENDSTOP_HIT_STATE #elif Y2_USE_ENDSTOP == _ZMIN_ - #define Y2_MAX_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING + #define Y2_MAX_ENDSTOP_HIT_STATE Z_MIN_ENDSTOP_HIT_STATE #elif Y2_USE_ENDSTOP == _ZMAX_ - #define Y2_MAX_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING + #define Y2_MAX_ENDSTOP_HIT_STATE Z_MAX_ENDSTOP_HIT_STATE #endif #endif #if !PIN_EXISTS(Y2_MAX) @@ -993,19 +993,19 @@ #endif #endif #else - #ifndef Y2_MIN_ENDSTOP_INVERTING + #ifndef Y2_MIN_ENDSTOP_HIT_STATE #if Y2_USE_ENDSTOP == _XMIN_ - #define Y2_MIN_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING + #define Y2_MIN_ENDSTOP_HIT_STATE X_MIN_ENDSTOP_HIT_STATE #elif Y2_USE_ENDSTOP == _XMAX_ - #define Y2_MIN_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING + #define Y2_MIN_ENDSTOP_HIT_STATE X_MAX_ENDSTOP_HIT_STATE #elif Y2_USE_ENDSTOP == _YMIN_ - #define Y2_MIN_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING + #define Y2_MIN_ENDSTOP_HIT_STATE Y_MIN_ENDSTOP_HIT_STATE #elif Y2_USE_ENDSTOP == _YMAX_ - #define Y2_MIN_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING + #define Y2_MIN_ENDSTOP_HIT_STATE Y_MAX_ENDSTOP_HIT_STATE #elif Y2_USE_ENDSTOP == _ZMIN_ - #define Y2_MIN_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING + #define Y2_MIN_ENDSTOP_HIT_STATE Z_MIN_ENDSTOP_HIT_STATE #elif Y2_USE_ENDSTOP == _ZMAX_ - #define Y2_MIN_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING + #define Y2_MIN_ENDSTOP_HIT_STATE Z_MAX_ENDSTOP_HIT_STATE #endif #endif #if !PIN_EXISTS(Y2_MIN) @@ -1015,11 +1015,11 @@ #endif #endif #endif - #ifndef Y2_MAX_ENDSTOP_INVERTING - #define Y2_MAX_ENDSTOP_INVERTING false + #ifndef Y2_MAX_ENDSTOP_HIT_STATE + #define Y2_MAX_ENDSTOP_HIT_STATE HIGH #endif - #ifndef Y2_MIN_ENDSTOP_INVERTING - #define Y2_MIN_ENDSTOP_INVERTING false + #ifndef Y2_MIN_ENDSTOP_HIT_STATE + #define Y2_MIN_ENDSTOP_HIT_STATE HIGH #endif #endif @@ -1029,19 +1029,19 @@ #if ENABLED(Z_MULTI_ENDSTOPS) #if Z_HOME_TO_MAX - #ifndef Z2_MAX_ENDSTOP_INVERTING + #ifndef Z2_MAX_ENDSTOP_HIT_STATE #if Z2_USE_ENDSTOP == _XMIN_ - #define Z2_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING + #define Z2_MAX_ENDSTOP_HIT_STATE X_MIN_ENDSTOP_HIT_STATE #elif Z2_USE_ENDSTOP == _XMAX_ - #define Z2_MAX_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING + #define Z2_MAX_ENDSTOP_HIT_STATE X_MAX_ENDSTOP_HIT_STATE #elif Z2_USE_ENDSTOP == _YMIN_ - #define Z2_MAX_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING + #define Z2_MAX_ENDSTOP_HIT_STATE Y_MIN_ENDSTOP_HIT_STATE #elif Z2_USE_ENDSTOP == _YMAX_ - #define Z2_MAX_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING + #define Z2_MAX_ENDSTOP_HIT_STATE Y_MAX_ENDSTOP_HIT_STATE #elif Z2_USE_ENDSTOP == _ZMIN_ - #define Z2_MAX_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING + #define Z2_MAX_ENDSTOP_HIT_STATE Z_MIN_ENDSTOP_HIT_STATE #elif Z2_USE_ENDSTOP == _ZMAX_ - #define Z2_MAX_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING + #define Z2_MAX_ENDSTOP_HIT_STATE Z_MAX_ENDSTOP_HIT_STATE #endif #endif #if !PIN_EXISTS(Z2_MAX) @@ -1051,19 +1051,19 @@ #endif #endif #else - #ifndef Z2_MIN_ENDSTOP_INVERTING + #ifndef Z2_MIN_ENDSTOP_HIT_STATE #if Z2_USE_ENDSTOP == _XMIN_ - #define Z2_MIN_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING + #define Z2_MIN_ENDSTOP_HIT_STATE X_MIN_ENDSTOP_HIT_STATE #elif Z2_USE_ENDSTOP == _XMAX_ - #define Z2_MIN_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING + #define Z2_MIN_ENDSTOP_HIT_STATE X_MAX_ENDSTOP_HIT_STATE #elif Z2_USE_ENDSTOP == _YMIN_ - #define Z2_MIN_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING + #define Z2_MIN_ENDSTOP_HIT_STATE Y_MIN_ENDSTOP_HIT_STATE #elif Z2_USE_ENDSTOP == _YMAX_ - #define Z2_MIN_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING + #define Z2_MIN_ENDSTOP_HIT_STATE Y_MAX_ENDSTOP_HIT_STATE #elif Z2_USE_ENDSTOP == _ZMIN_ - #define Z2_MIN_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING + #define Z2_MIN_ENDSTOP_HIT_STATE Z_MIN_ENDSTOP_HIT_STATE #elif Z2_USE_ENDSTOP == _ZMAX_ - #define Z2_MIN_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING + #define Z2_MIN_ENDSTOP_HIT_STATE Z_MAX_ENDSTOP_HIT_STATE #endif #endif #if !PIN_EXISTS(Z2_MIN) @@ -1073,28 +1073,28 @@ #endif #endif #endif - #ifndef Z2_MAX_ENDSTOP_INVERTING - #define Z2_MAX_ENDSTOP_INVERTING false + #ifndef Z2_MAX_ENDSTOP_HIT_STATE + #define Z2_MAX_ENDSTOP_HIT_STATE HIGH #endif - #ifndef Z2_MIN_ENDSTOP_INVERTING - #define Z2_MIN_ENDSTOP_INVERTING false + #ifndef Z2_MIN_ENDSTOP_HIT_STATE + #define Z2_MIN_ENDSTOP_HIT_STATE HIGH #endif #if NUM_Z_STEPPERS >= 3 #if Z_HOME_TO_MAX - #ifndef Z3_MAX_ENDSTOP_INVERTING + #ifndef Z3_MAX_ENDSTOP_HIT_STATE #if Z3_USE_ENDSTOP == _XMIN_ - #define Z3_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING + #define Z3_MAX_ENDSTOP_HIT_STATE X_MIN_ENDSTOP_HIT_STATE #elif Z3_USE_ENDSTOP == _XMAX_ - #define Z3_MAX_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING + #define Z3_MAX_ENDSTOP_HIT_STATE X_MAX_ENDSTOP_HIT_STATE #elif Z3_USE_ENDSTOP == _YMIN_ - #define Z3_MAX_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING + #define Z3_MAX_ENDSTOP_HIT_STATE Y_MIN_ENDSTOP_HIT_STATE #elif Z3_USE_ENDSTOP == _YMAX_ - #define Z3_MAX_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING + #define Z3_MAX_ENDSTOP_HIT_STATE Y_MAX_ENDSTOP_HIT_STATE #elif Z3_USE_ENDSTOP == _ZMIN_ - #define Z3_MAX_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING + #define Z3_MAX_ENDSTOP_HIT_STATE Z_MIN_ENDSTOP_HIT_STATE #elif Z3_USE_ENDSTOP == _ZMAX_ - #define Z3_MAX_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING + #define Z3_MAX_ENDSTOP_HIT_STATE Z_MAX_ENDSTOP_HIT_STATE #endif #endif #if !PIN_EXISTS(Z3_MAX) @@ -1104,19 +1104,19 @@ #endif #endif #else - #ifndef Z3_MIN_ENDSTOP_INVERTING + #ifndef Z3_MIN_ENDSTOP_HIT_STATE #if Z3_USE_ENDSTOP == _XMIN_ - #define Z3_MIN_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING + #define Z3_MIN_ENDSTOP_HIT_STATE X_MIN_ENDSTOP_HIT_STATE #elif Z3_USE_ENDSTOP == _XMAX_ - #define Z3_MIN_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING + #define Z3_MIN_ENDSTOP_HIT_STATE X_MAX_ENDSTOP_HIT_STATE #elif Z3_USE_ENDSTOP == _YMIN_ - #define Z3_MIN_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING + #define Z3_MIN_ENDSTOP_HIT_STATE Y_MIN_ENDSTOP_HIT_STATE #elif Z3_USE_ENDSTOP == _YMAX_ - #define Z3_MIN_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING + #define Z3_MIN_ENDSTOP_HIT_STATE Y_MAX_ENDSTOP_HIT_STATE #elif Z3_USE_ENDSTOP == _ZMIN_ - #define Z3_MIN_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING + #define Z3_MIN_ENDSTOP_HIT_STATE Z_MIN_ENDSTOP_HIT_STATE #elif Z3_USE_ENDSTOP == _ZMAX_ - #define Z3_MIN_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING + #define Z3_MIN_ENDSTOP_HIT_STATE Z_MAX_ENDSTOP_HIT_STATE #endif #endif #if !PIN_EXISTS(Z3_MIN) @@ -1126,29 +1126,29 @@ #endif #endif #endif - #ifndef Z3_MAX_ENDSTOP_INVERTING - #define Z3_MAX_ENDSTOP_INVERTING false + #ifndef Z3_MAX_ENDSTOP_HIT_STATE + #define Z3_MAX_ENDSTOP_HIT_STATE HIGH #endif - #ifndef Z3_MIN_ENDSTOP_INVERTING - #define Z3_MIN_ENDSTOP_INVERTING false + #ifndef Z3_MIN_ENDSTOP_HIT_STATE + #define Z3_MIN_ENDSTOP_HIT_STATE HIGH #endif #endif #if NUM_Z_STEPPERS >= 4 #if Z_HOME_TO_MAX - #ifndef Z4_MAX_ENDSTOP_INVERTING + #ifndef Z4_MAX_ENDSTOP_HIT_STATE #if Z4_USE_ENDSTOP == _XMIN_ - #define Z4_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING + #define Z4_MAX_ENDSTOP_HIT_STATE X_MIN_ENDSTOP_HIT_STATE #elif Z4_USE_ENDSTOP == _XMAX_ - #define Z4_MAX_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING + #define Z4_MAX_ENDSTOP_HIT_STATE X_MAX_ENDSTOP_HIT_STATE #elif Z4_USE_ENDSTOP == _YMIN_ - #define Z4_MAX_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING + #define Z4_MAX_ENDSTOP_HIT_STATE Y_MIN_ENDSTOP_HIT_STATE #elif Z4_USE_ENDSTOP == _YMAX_ - #define Z4_MAX_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING + #define Z4_MAX_ENDSTOP_HIT_STATE Y_MAX_ENDSTOP_HIT_STATE #elif Z4_USE_ENDSTOP == _ZMIN_ - #define Z4_MAX_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING + #define Z4_MAX_ENDSTOP_HIT_STATE Z_MIN_ENDSTOP_HIT_STATE #elif Z4_USE_ENDSTOP == _ZMAX_ - #define Z4_MAX_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING + #define Z4_MAX_ENDSTOP_HIT_STATE Z_MAX_ENDSTOP_HIT_STATE #endif #endif #if !PIN_EXISTS(Z4_MAX) @@ -1158,19 +1158,19 @@ #endif #endif #else - #ifndef Z4_MIN_ENDSTOP_INVERTING + #ifndef Z4_MIN_ENDSTOP_HIT_STATE #if Z4_USE_ENDSTOP == _XMIN_ - #define Z4_MIN_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING + #define Z4_MIN_ENDSTOP_HIT_STATE X_MIN_ENDSTOP_HIT_STATE #elif Z4_USE_ENDSTOP == _XMAX_ - #define Z4_MIN_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING + #define Z4_MIN_ENDSTOP_HIT_STATE X_MAX_ENDSTOP_HIT_STATE #elif Z4_USE_ENDSTOP == _YMIN_ - #define Z4_MIN_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING + #define Z4_MIN_ENDSTOP_HIT_STATE Y_MIN_ENDSTOP_HIT_STATE #elif Z4_USE_ENDSTOP == _YMAX_ - #define Z4_MIN_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING + #define Z4_MIN_ENDSTOP_HIT_STATE Y_MAX_ENDSTOP_HIT_STATE #elif Z4_USE_ENDSTOP == _ZMIN_ - #define Z4_MIN_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING + #define Z4_MIN_ENDSTOP_HIT_STATE Z_MIN_ENDSTOP_HIT_STATE #elif Z4_USE_ENDSTOP == _ZMAX_ - #define Z4_MIN_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING + #define Z4_MIN_ENDSTOP_HIT_STATE Z_MAX_ENDSTOP_HIT_STATE #endif #endif #if !PIN_EXISTS(Z4_MIN) @@ -1180,11 +1180,11 @@ #endif #endif #endif - #ifndef Z4_MAX_ENDSTOP_INVERTING - #define Z4_MAX_ENDSTOP_INVERTING false + #ifndef Z4_MAX_ENDSTOP_HIT_STATE + #define Z4_MAX_ENDSTOP_HIT_STATE HIGH #endif - #ifndef Z4_MIN_ENDSTOP_INVERTING - #define Z4_MIN_ENDSTOP_INVERTING false + #ifndef Z4_MIN_ENDSTOP_HIT_STATE + #define Z4_MIN_ENDSTOP_HIT_STATE HIGH #endif #endif diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 6052fcb70c..1f43d01bb8 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -1876,19 +1876,19 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #endif #if ENABLED(INVERTED_PROBE_STATE) - #if !Z_MIN_PROBE_ENDSTOP_INVERTING - #error "BLTOUCH requires Z_MIN_PROBE_ENDSTOP_INVERTING set to true." + #if Z_MIN_PROBE_ENDSTOP_HIT_STATE != LOW + #error "BLTOUCH requires Z_MIN_PROBE_ENDSTOP_HIT_STATE LOW." #endif - #elif Z_MIN_PROBE_ENDSTOP_INVERTING - #error "BLTOUCH requires Z_MIN_PROBE_ENDSTOP_INVERTING set to false." + #elif Z_MIN_PROBE_ENDSTOP_HIT_STATE != HIGH + #error "BLTOUCH requires Z_MIN_PROBE_ENDSTOP_HIT_STATE HIGH." #endif #if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) #if ENABLED(INVERTED_PROBE_STATE) - #if !Z_MIN_ENDSTOP_INVERTING - #error "BLTOUCH requires Z_MIN_ENDSTOP_INVERTING set to true." + #if Z_MIN_ENDSTOP_HIT_STATE != LOW + #error "BLTOUCH requires Z_MIN_ENDSTOP_HIT_STATE LOW." #endif - #elif Z_MIN_ENDSTOP_INVERTING - #error "BLTOUCH requires Z_MIN_ENDSTOP_INVERTING set to false." + #elif Z_MIN_ENDSTOP_HIT_STATE != HIGH + #error "BLTOUCH requires Z_MIN_ENDSTOP_HIT_STATE HIGH." #endif #endif @@ -1916,19 +1916,19 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #error "TOUCH_MI_PROBE currently requires an LCD controller or EMERGENCY_PARSER." #endif #if ENABLED(INVERTED_PROBE_STATE) - #if !Z_MIN_PROBE_ENDSTOP_INVERTING - #error "TOUCH_MI_PROBE requires Z_MIN_PROBE_ENDSTOP_INVERTING set to true." + #if Z_MIN_PROBE_ENDSTOP_HIT_STATE != LOW + #error "TOUCH_MI_PROBE requires Z_MIN_PROBE_ENDSTOP_HIT_STATE LOW." #endif - #elif Z_MIN_PROBE_ENDSTOP_INVERTING - #error "TOUCH_MI_PROBE requires Z_MIN_PROBE_ENDSTOP_INVERTING set to false." + #elif Z_MIN_PROBE_ENDSTOP_HIT_STATE != HIGH + #error "TOUCH_MI_PROBE requires Z_MIN_PROBE_ENDSTOP_HIT_STATE HIGH." #endif #if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) #if ENABLED(INVERTED_PROBE_STATE) - #if !Z_MIN_ENDSTOP_INVERTING - #error "TOUCH_MI_PROBE requires Z_MIN_ENDSTOP_INVERTING set to true." + #if Z_MIN_ENDSTOP_HIT_STATE != LOW + #error "TOUCH_MI_PROBE requires Z_MIN_ENDSTOP_HIT_STATE LOW." #endif - #elif Z_MIN_ENDSTOP_INVERTING - #error "TOUCH_MI_PROBE requires Z_MIN_ENDSTOP_INVERTING set to false." + #elif Z_MIN_ENDSTOP_HIT_STATE != HIGH + #error "TOUCH_MI_PROBE requires Z_MIN_ENDSTOP_HIT_STATE HIGH." #endif #endif #endif // TOUCH_MI_PROBE @@ -1967,8 +1967,8 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #error "Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN requires USE_ZMIN_PLUG to be enabled." #elif !HAS_Z_MIN #error "Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN requires the Z_MIN_PIN to be defined." - #elif Z_MIN_PROBE_ENDSTOP_INVERTING != Z_MIN_ENDSTOP_INVERTING - #error "Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN requires Z_MIN_ENDSTOP_INVERTING to match Z_MIN_PROBE_ENDSTOP_INVERTING." + #elif Z_MIN_PROBE_ENDSTOP_HIT_STATE != Z_MIN_ENDSTOP_HIT_STATE + #error "Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN requires Z_MIN_ENDSTOP_HIT_STATE to match Z_MIN_PROBE_ENDSTOP_HIT_STATE." #endif #elif !HAS_Z_MIN_PROBE_PIN #error "Z_MIN_PROBE_PIN must be defined if Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN is not enabled." @@ -3449,17 +3449,17 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #error "TMC2208 or TMC2209 on E6 requires E6_HARDWARE_SERIAL or E6_SERIAL_(RX|TX)_PIN." #elif INVALID_TMC_UART(E7) #error "TMC2208 or TMC2209 on E7 requires E7_HARDWARE_SERIAL or E7_SERIAL_(RX|TX)_PIN." -#elif HAS_I_AXIS && INVALID_TMC_UART(I) +#elif INVALID_TMC_UART(I) #error "TMC2208 or TMC2209 on I requires I_HARDWARE_SERIAL or I_SERIAL_(RX|TX)_PIN." -#elif HAS_J_AXIS && INVALID_TMC_UART(J) +#elif INVALID_TMC_UART(J) #error "TMC2208 or TMC2209 on J requires J_HARDWARE_SERIAL or J_SERIAL_(RX|TX)_PIN." -#elif HAS_K_AXIS && INVALID_TMC_UART(K) +#elif INVALID_TMC_UART(K) #error "TMC2208 or TMC2209 on K requires K_HARDWARE_SERIAL or K_SERIAL_(RX|TX)_PIN." -#elif HAS_U_AXIS && INVALID_TMC_UART(U) +#elif INVALID_TMC_UART(U) #error "TMC2208 or TMC2209 on U requires U_HARDWARE_SERIAL or U_SERIAL_(RX|TX)_PIN." -#elif HAS_V_AXIS && INVALID_TMC_UART(V) +#elif INVALID_TMC_UART(V) #error "TMC2208 or TMC2209 on V requires V_HARDWARE_SERIAL or V_SERIAL_(RX|TX)_PIN." -#elif HAS_W_AXIS && INVALID_TMC_UART(W) +#elif INVALID_TMC_UART(W) #error "TMC2208 or TMC2209 on W requires W_HARDWARE_SERIAL or W_SERIAL_(RX|TX)_PIN." #endif @@ -3552,17 +3552,17 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS INVALID_TMC_MS(E6) #elif !TMC_MICROSTEP_IS_VALID(E7) INVALID_TMC_MS(E7) -#elif HAS_I_AXIS && !TMC_MICROSTEP_IS_VALID(I) +#elif !TMC_MICROSTEP_IS_VALID(I) INVALID_TMC_MS(I) -#elif HAS_J_AXIS && !TMC_MICROSTEP_IS_VALID(J) +#elif !TMC_MICROSTEP_IS_VALID(J) INVALID_TMC_MS(J) -#elif HAS_K_AXIS && !TMC_MICROSTEP_IS_VALID(K) +#elif !TMC_MICROSTEP_IS_VALID(K) INVALID_TMC_MS(K) -#elif HAS_U_AXIS && !TMC_MICROSTEP_IS_VALID(U) +#elif !TMC_MICROSTEP_IS_VALID(U) INVALID_TMC_MS(U) -#elif HAS_V_AXIS && !TMC_MICROSTEP_IS_VALID(V) +#elif !TMC_MICROSTEP_IS_VALID(V) INVALID_TMC_MS(V) -#elif HAS_W_AXIS && !TMC_MICROSTEP_IS_VALID(W) +#elif !TMC_MICROSTEP_IS_VALID(W) INVALID_TMC_MS(W) #endif #undef INVALID_TMC_MS @@ -3579,67 +3579,43 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS // towers to +Z and the individual homing of each tower. This restriction can be removed once a means of // clearing the stallGuard activated status is found. - // Stall detection DIAG = HIGH : TMC2209 - // Stall detection DIAG = LOW : TMC2130/TMC2160/TMC2660/TMC5130/TMC5160 - #define X_ENDSTOP_INVERTING !AXIS_DRIVER_TYPE(X,TMC2209) - #define Y_ENDSTOP_INVERTING !AXIS_DRIVER_TYPE(Y,TMC2209) - #define Z_ENDSTOP_INVERTING !AXIS_DRIVER_TYPE(Z,TMC2209) - #if HAS_I_AXIS - #define I_ENDSTOP_INVERTING !AXIS_DRIVER_TYPE(I,TMC2209) - #endif - #if HAS_J_AXIS - #define J_ENDSTOP_INVERTING !AXIS_DRIVER_TYPE(J,TMC2209) - #endif - #if HAS_K_AXIS - #define K_ENDSTOP_INVERTING !AXIS_DRIVER_TYPE(K,TMC2209) - #endif - #if HAS_U_AXIS - #define U_ENDSTOP_INVERTING !AXIS_DRIVER_TYPE(U,TMC2209) - #endif - #if HAS_V_AXIS - #define V_ENDSTOP_INVERTING !AXIS_DRIVER_TYPE(V,TMC2209) - #endif - #if HAS_W_AXIS - #define W_ENDSTOP_INVERTING !AXIS_DRIVER_TYPE(W,TMC2209) - #endif - #if NONE(SPI_ENDSTOPS, ONBOARD_ENDSTOPPULLUPS, ENDSTOPPULLUPS) #if X_SENSORLESS && X_HOME_TO_MIN && DISABLED(ENDSTOPPULLUP_XMIN) - #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_XMIN (or ENDSTOPPULLUPS) when homing to X_MIN." + #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_XMIN (or ENDSTOPPULLUPS) for X_MIN homing." #elif X_SENSORLESS && X_HOME_TO_MAX && DISABLED(ENDSTOPPULLUP_XMAX) - #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_XMAX (or ENDSTOPPULLUPS) when homing to X_MAX." + #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_XMAX (or ENDSTOPPULLUPS) for X_MAX homing." #elif Y_SENSORLESS && Y_HOME_TO_MIN && DISABLED(ENDSTOPPULLUP_YMIN) - #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_YMIN (or ENDSTOPPULLUPS) when homing to Y_MIN." + #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_YMIN (or ENDSTOPPULLUPS) for Y_MIN homing." #elif Y_SENSORLESS && Y_HOME_TO_MAX && DISABLED(ENDSTOPPULLUP_YMAX) - #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_YMAX (or ENDSTOPPULLUPS) when homing to Y_MAX." + #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_YMAX (or ENDSTOPPULLUPS) for Y_MAX homing." #elif Z_SENSORLESS && Z_HOME_TO_MIN && DISABLED(ENDSTOPPULLUP_ZMIN) - #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_ZMIN (or ENDSTOPPULLUPS) when homing to Z_MIN." + #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_ZMIN (or ENDSTOPPULLUPS) for Z_MIN homing." #elif Z_SENSORLESS && Z_HOME_TO_MAX && DISABLED(ENDSTOPPULLUP_ZMAX) - #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_ZMAX (or ENDSTOPPULLUPS) when homing to Z_MAX." - #elif ALL(HAS_I_AXIS, I_SENSORLESS, I_HOME_TO_MIN) && DISABLED(ENDSTOPPULLUP_IMIN) - #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_IMIN (or ENDSTOPPULLUPS) when homing to I_MIN." - #elif ALL(HAS_I_AXIS, I_SENSORLESS, I_HOME_TO_MAX) && DISABLED(ENDSTOPPULLUP_IMAX) - #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_IMAX (or ENDSTOPPULLUPS) when homing to I_MAX." - #elif ALL(HAS_J_AXIS, J_SENSORLESS, J_HOME_TO_MIN) && DISABLED(ENDSTOPPULLUP_JMIN) - #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_JMIN (or ENDSTOPPULLUPS) when homing to J_MIN." - #elif ALL(HAS_J_AXIS, J_SENSORLESS, J_HOME_TO_MAX) && DISABLED(ENDSTOPPULLUP_JMAX) - #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_JMAX (or ENDSTOPPULLUPS) when homing to J_MAX." - #elif ALL(HAS_K_AXIS, K_SENSORLESS, K_HOME_TO_MIN) && DISABLED(ENDSTOPPULLUP_KMIN) - #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_KMIN (or ENDSTOPPULLUPS) when homing to K_MIN." - #elif ALL(HAS_K_AXIS, K_SENSORLESS, K_HOME_TO_MAX) && DISABLED(ENDSTOPPULLUP_KMAX) - #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_KMAX (or ENDSTOPPULLUPS) when homing to K_MAX." - #elif HAS_U_AXIS && U_SENSORLESS && U_HOME_TO_MIN && DISABLED(ENDSTOPPULLUP_UMIN) - #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_UMIN (or ENDSTOPPULLUPS) when homing to U_MIN." - #elif HAS_U_AXIS && U_SENSORLESS && U_HOME_TO_MAX && DISABLED(ENDSTOPPULLUP_UMAX) - #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_UMAX (or ENDSTOPPULLUPS) when homing to U_MAX." - #elif HAS_V_AXIS && V_SENSORLESS && V_HOME_TO_MIN && DISABLED(ENDSTOPPULLUP_VMIN) - #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_VMIN (or ENDSTOPPULLUPS) when homing to V_MIN." - #elif HAS_V_AXIS && V_SENSORLESS && V_HOME_TO_MAX && DISABLED(ENDSTOPPULLUP_VMAX) - #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_VMAX (or ENDSTOPPULLUPS) when homing to V_MAX." - #elif HAS_W_AXIS && W_SENSORLESS && W_HOME_TO_MIN && DISABLED(ENDSTOPPULLUP_WMIN) - #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_WMIN (or ENDSTOPPULLUPS) when homing to W_MIN." - #elif HAS_W_AXIS && W_SENSORLESS && W_HOME_TO_MAX && DISABLED(ENDSTOPPULLUP_WMAX) - #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_WMAX (or ENDSTOPPULLUPS) when homing to W_MAX." + #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_ZMAX (or ENDSTOPPULLUPS) for Z_MAX homing." + #elif I_SENSORLESS && I_HOME_TO_MIN && DISABLED(ENDSTOPPULLUP_IMIN) + #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_IMIN (or ENDSTOPPULLUPS) for I_MIN homing." + #elif I_SENSORLESS && I_HOME_TO_MAX && DISABLED(ENDSTOPPULLUP_IMAX) + #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_IMAX (or ENDSTOPPULLUPS) for I_MAX homing." + #elif J_SENSORLESS && J_HOME_TO_MIN && DISABLED(ENDSTOPPULLUP_JMIN) + #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_JMIN (or ENDSTOPPULLUPS) for J_MIN homing." + #elif J_SENSORLESS && J_HOME_TO_MAX && DISABLED(ENDSTOPPULLUP_JMAX) + #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_JMAX (or ENDSTOPPULLUPS) for J_MAX homing." + #elif K_SENSORLESS && K_HOME_TO_MIN && DISABLED(ENDSTOPPULLUP_KMIN) + #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_KMIN (or ENDSTOPPULLUPS) for K_MIN homing." + #elif K_SENSORLESS && K_HOME_TO_MAX && DISABLED(ENDSTOPPULLUP_KMAX) + #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_KMAX (or ENDSTOPPULLUPS) for K_MAX homing." + #elif U_SENSORLESS && U_HOME_TO_MIN && DISABLED(ENDSTOPPULLUP_UMIN) + #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_UMIN (or ENDSTOPPULLUPS) for U_MIN homing." + #elif U_SENSORLESS && U_HOME_TO_MAX && DISABLED(ENDSTOPPULLUP_UMAX) + #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_UMAX (or ENDSTOPPULLUPS) for U_MAX homing." + #elif V_SENSORLESS && V_HOME_TO_MIN && DISABLED(ENDSTOPPULLUP_VMIN) + #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_VMIN (or ENDSTOPPULLUPS) for V_MIN homing." + #elif V_SENSORLESS && V_HOME_TO_MAX && DISABLED(ENDSTOPPULLUP_VMAX) + #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_VMAX (or ENDSTOPPULLUPS) for V_MAX homing." + #elif W_SENSORLESS && W_HOME_TO_MIN && DISABLED(ENDSTOPPULLUP_WMIN) + #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_WMIN (or ENDSTOPPULLUPS) for W_MIN homing." + #elif W_SENSORLESS && W_HOME_TO_MAX && DISABLED(ENDSTOPPULLUP_WMAX) + #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_WMAX (or ENDSTOPPULLUPS) for W_MAX homing." #endif #endif @@ -3648,117 +3624,172 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #if ENABLED(QUICK_HOME) #warning "SPI_ENDSTOPS may be unreliable with QUICK_HOME. Adjust back-offs for better results." #endif - #else - #if X_SENSORLESS && X_HOME_TO_MIN && X_MIN_ENDSTOP_INVERTING != X_ENDSTOP_INVERTING - #if X_ENDSTOP_INVERTING - #error "SENSORLESS_HOMING requires X_MIN_ENDSTOP_INVERTING = true when homing to X_MIN." - #else - #error "SENSORLESS_HOMING requires X_MIN_ENDSTOP_INVERTING = false when homing TMC2209 to X_MIN." - #endif - #elif X_SENSORLESS && X_HOME_TO_MAX && X_MAX_ENDSTOP_INVERTING != X_ENDSTOP_INVERTING - #if X_ENDSTOP_INVERTING - #error "SENSORLESS_HOMING requires X_MAX_ENDSTOP_INVERTING = true when homing to X_MAX." - #else - #error "SENSORLESS_HOMING requires X_MAX_ENDSTOP_INVERTING = false when homing TMC2209 to X_MAX." - #endif - #elif Y_SENSORLESS && Y_HOME_TO_MIN && Y_MIN_ENDSTOP_INVERTING != Y_ENDSTOP_INVERTING - #if Y_ENDSTOP_INVERTING - #error "SENSORLESS_HOMING requires Y_MIN_ENDSTOP_INVERTING = true when homing to Y_MIN." - #else - #error "SENSORLESS_HOMING requires Y_MIN_ENDSTOP_INVERTING = false when homing TMC2209 to Y_MIN." - #endif - #elif Y_SENSORLESS && Y_HOME_TO_MAX && Y_MAX_ENDSTOP_INVERTING != Y_ENDSTOP_INVERTING - #if Y_ENDSTOP_INVERTING - #error "SENSORLESS_HOMING requires Y_MAX_ENDSTOP_INVERTING = true when homing to Y_MAX." - #else - #error "SENSORLESS_HOMING requires Y_MAX_ENDSTOP_INVERTING = false when homing TMC2209 to Y_MAX." - #endif - #elif Z_SENSORLESS && Z_HOME_TO_MIN && Z_MIN_ENDSTOP_INVERTING != Z_ENDSTOP_INVERTING - #if Z_ENDSTOP_INVERTING - #error "SENSORLESS_HOMING requires Z_MIN_ENDSTOP_INVERTING = true when homing to Z_MIN." - #else - #error "SENSORLESS_HOMING requires Z_MIN_ENDSTOP_INVERTING = false when homing TMC2209 to Z_MIN." - #endif - #elif Z_SENSORLESS && Z_HOME_TO_MAX && Z_MAX_ENDSTOP_INVERTING != Z_ENDSTOP_INVERTING - #if Z_ENDSTOP_INVERTING - #error "SENSORLESS_HOMING requires Z_MAX_ENDSTOP_INVERTING = true when homing to Z_MAX." - #else - #error "SENSORLESS_HOMING requires Z_MAX_ENDSTOP_INVERTING = false when homing TMC2209 to Z_MAX." - #endif - #elif ALL(HAS_I_AXIS, I_SENSORLESS, I_HOME_TO_MIN) && I_MIN_ENDSTOP_INVERTING != I_ENDSTOP_INVERTING - #if I_ENDSTOP_INVERTING - #error "SENSORLESS_HOMING requires I_MIN_ENDSTOP_INVERTING = true when homing to I_MIN." - #else - #error "SENSORLESS_HOMING requires I_MIN_ENDSTOP_INVERTING = false when homing TMC2209 to I_MIN." - #endif - #elif ALL(HAS_I_AXIS, I_SENSORLESS, I_HOME_TO_MAX) && I_MAX_ENDSTOP_INVERTING != I_ENDSTOP_INVERTING - #if I_ENDSTOP_INVERTING - #error "SENSORLESS_HOMING requires I_MAX_ENDSTOP_INVERTING = true when homing to I_MAX." - #else - #error "SENSORLESS_HOMING requires I_MAX_ENDSTOP_INVERTING = false when homing TMC2209 to I_MAX." - #endif - #elif ALL(HAS_J_AXIS, J_SENSORLESS, J_HOME_TO_MIN) && J_MIN_ENDSTOP_INVERTING != J_ENDSTOP_INVERTING - #if J_ENDSTOP_INVERTING - #error "SENSORLESS_HOMING requires J_MIN_ENDSTOP_INVERTING = true when homing to J_MIN." - #else - #error "SENSORLESS_HOMING requires J_MIN_ENDSTOP_INVERTING = false when homing TMC2209 to J_MIN." - #endif - #elif ALL(HAS_J_AXIS, J_SENSORLESS, J_HOME_TO_MAX) && J_MAX_ENDSTOP_INVERTING != J_ENDSTOP_INVERTING - #if J_ENDSTOP_INVERTING - #error "SENSORLESS_HOMING requires J_MAX_ENDSTOP_INVERTING = true when homing to J_MAX." - #else - #error "SENSORLESS_HOMING requires J_MAX_ENDSTOP_INVERTING = false when homing TMC2209 to J_MAX." - #endif - #elif ALL(HAS_K_AXIS, K_SENSORLESS, K_HOME_TO_MIN) && K_MIN_ENDSTOP_INVERTING != K_ENDSTOP_INVERTING - #if K_ENDSTOP_INVERTING - #error "SENSORLESS_HOMING requires K_MIN_ENDSTOP_INVERTING = true when homing to K_MIN." - #else - #error "SENSORLESS_HOMING requires K_MIN_ENDSTOP_INVERTING = false when homing TMC2209 to K_MIN." - #endif - #elif ALL(HAS_K_AXIS, K_SENSORLESS, K_HOME_TO_MAX) && K_MAX_ENDSTOP_INVERTING != K_ENDSTOP_INVERTING - #if K_ENDSTOP_INVERTING - #error "SENSORLESS_HOMING requires K_MAX_ENDSTOP_INVERTING = true when homing to K_MAX." - #else - #error "SENSORLESS_HOMING requires K_MAX_ENDSTOP_INVERTING = false when homing TMC2209 to K_MAX." - #endif - #elif ALL(HAS_U_AXIS, U_SENSORLESS, U_HOME_TO_MIN) && U_MIN_ENDSTOP_INVERTING != U_ENDSTOP_INVERTING - #if U_ENDSTOP_INVERTING - #error "SENSORLESS_HOMING requires U_MIN_ENDSTOP_INVERTING = true when homing to U_MIN." - #else - #error "SENSORLESS_HOMING requires U_MIN_ENDSTOP_INVERTING = false when homing TMC2209 to U_MIN." - #endif - #elif ALL(HAS_U_AXIS, U_SENSORLESS, U_HOME_TO_MAX) && U_MAX_ENDSTOP_INVERTING != U_ENDSTOP_INVERTING - #if U_ENDSTOP_INVERTING - #error "SENSORLESS_HOMING requires U_MAX_ENDSTOP_INVERTING = true when homing to U_MAX." - #else - #error "SENSORLESS_HOMING requires U_MAX_ENDSTOP_INVERTING = false when homing TMC2209 to U_MAX." - #endif - #elif ALL(HAS_V_AXIS, V_SENSORLESS, V_HOME_TO_MIN) && V_MIN_ENDSTOP_INVERTING != V_ENDSTOP_INVERTING - #if V_ENDSTOP_INVERTING - #error "SENSORLESS_HOMING requires V_MIN_ENDSTOP_INVERTING = true when homing to V_MIN." - #else - #error "SENSORLESS_HOMING requires V_MIN_ENDSTOP_INVERTING = false when homing TMC2209 to V_MIN." - #endif - #elif ALL(HAS_V_AXIS, V_SENSORLESS, V_HOME_TO_MAX) && V_MAX_ENDSTOP_INVERTING != V_ENDSTOP_INVERTING - #if V_ENDSTOP_INVERTING - #error "SENSORLESS_HOMING requires V_MAX_ENDSTOP_INVERTING = true when homing to V_MAX." - #else - #error "SENSORLESS_HOMING requires V_MAX_ENDSTOP_INVERTING = false when homing TMC2209 to V_MAX." - #endif - #elif ALL(HAS_W_AXIS, W_SENSORLESS, W_HOME_TO_MIN) && W_MIN_ENDSTOP_INVERTING != W_ENDSTOP_INVERTING - #if W_ENDSTOP_INVERTING - #error "SENSORLESS_HOMING requires W_MIN_ENDSTOP_INVERTING = true when homing to W_MIN." - #else - #error "SENSORLESS_HOMING requires W_MIN_ENDSTOP_INVERTING = false when homing TMC2209 to W_MIN." - #endif - #elif ALL(HAS_W_AXIS, W_SENSORLESS, W_HOME_TO_MAX0) && W_MAX_ENDSTOP_INVERTING != W_ENDSTOP_INVERTING - #if W_ENDSTOP_INVERTING - #error "SENSORLESS_HOMING requires W_MAX_ENDSTOP_INVERTING = true when homing to W_MAX." - #else - #error "SENSORLESS_HOMING requires W_MAX_ENDSTOP_INVERTING = false when homing TMC2209 to W_MAX." + #else // !SPI_ENDSTOPS + // Stall detection DIAG = HIGH : TMC2209 + // Stall detection DIAG = LOW : TMC2130/TMC2160/TMC2660/TMC5130/TMC5160 + #if X_SENSORLESS + #define _HIT_STATE AXIS_DRIVER_TYPE(X,TMC2209) + #if X_HOME_TO_MIN && X_MIN_ENDSTOP_HIT_STATE != _HIT_STATE + #if _HIT_STATE + #error "SENSORLESS_HOMING requires X_MIN_ENDSTOP_HIT_STATE LOW for X_MIN homing." + #else + #error "SENSORLESS_HOMING requires X_MIN_ENDSTOP_HIT_STATE HIGH for X_MIN homing with TMC2209." + #endif + #elif X_HOME_TO_MAX && X_MAX_ENDSTOP_HIT_STATE != _HIT_STATE + #if _HIT_STATE + #error "SENSORLESS_HOMING requires X_MAX_ENDSTOP_HIT_STATE LOW for X_MAX homing." + #else + #error "SENSORLESS_HOMING requires X_MAX_ENDSTOP_HIT_STATE HIGH for X_MAX homing with TMC2209." + #endif #endif + #undef _HIT_STATE #endif - #endif + + #if Y_SENSORLESS + #define _HIT_STATE AXIS_DRIVER_TYPE(Y,TMC2209) + #if Y_HOME_TO_MIN && Y_MIN_ENDSTOP_HIT_STATE != _HIT_STATE + #if _HIT_STATE + #error "SENSORLESS_HOMING requires Y_MIN_ENDSTOP_HIT_STATE LOW for Y_MIN homing." + #else + #error "SENSORLESS_HOMING requires Y_MIN_ENDSTOP_HIT_STATE HIGH for Y_MIN homing with TMC2209." + #endif + #elif Y_HOME_TO_MAX && Y_MAX_ENDSTOP_HIT_STATE != _HIT_STATE + #if _HIT_STATE + #error "SENSORLESS_HOMING requires Y_MAY_ENDSTOP_HIT_STATE LOW for Y_MAX homing." + #else + #error "SENSORLESS_HOMING requires Y_MAY_ENDSTOP_HIT_STATE HIGH for Y_MAX homing with TMC2209." + #endif + #endif + #undef _HIT_STATE + #endif + + #if Z_SENSORLESS + #define _HIT_STATE AXIS_DRIVER_TYPE(Z,TMC2209) + #if Z_HOME_TO_MIN && Z_MIN_ENDSTOP_HIT_STATE != _HIT_STATE + #if _HIT_STATE + #error "SENSORLESS_HOMING requires Z_MIN_ENDSTOP_HIT_STATE LOW for Z_MIN homing." + #else + #error "SENSORLESS_HOMING requires Z_MIN_ENDSTOP_HIT_STATE HIGH for Z_MIN homing with TMC2209." + #endif + #elif Z_HOME_TO_MAX && Z_MAX_ENDSTOP_HIT_STATE != _HIT_STATE + #if _HIT_STATE + #error "SENSORLESS_HOMING requires Z_MAZ_ENDSTOP_HIT_STATE LOW for Z_MAX homing." + #else + #error "SENSORLESS_HOMING requires Z_MAZ_ENDSTOP_HIT_STATE HIGH for Z_MAX homing with TMC2209." + #endif + #endif + #undef _HIT_STATE + #endif + + #if I_SENSORLESS + #define _HIT_STATE AXIS_DRIVER_TYPE(I,TMC2209) + #if I_HOME_TO_MIN && I_MIN_ENDSTOP_HIT_STATE != _HIT_STATE + #if _HIT_STATE + #error "SENSORLESS_HOMING requires I_MIN_ENDSTOP_HIT_STATE LOW for I_MIN homing." + #else + #error "SENSORLESS_HOMING requires I_MIN_ENDSTOP_HIT_STATE HIGH for I_MIN homing with TMC2209." + #endif + #elif I_HOME_TO_MAX && I_MAX_ENDSTOP_HIT_STATE != _HIT_STATE + #if _HIT_STATE + #error "SENSORLESS_HOMING requires I_MAI_ENDSTOP_HIT_STATE LOW for I_MAX homing." + #else + #error "SENSORLESS_HOMING requires I_MAI_ENDSTOP_HIT_STATE HIGH for I_MAX homing with TMC2209." + #endif + #endif + #undef _HIT_STATE + #endif + + #if J_SENSORLESS + #define _HIT_STATE AXIS_DRIVER_TYPE(J,TMC2209) + #if J_HOME_TO_MIN && J_MIN_ENDSTOP_HIT_STATE != _HIT_STATE + #if _HIT_STATE + #error "SENSORLESS_HOMING requires J_MIN_ENDSTOP_HIT_STATE LOW for J_MIN homing." + #else + #error "SENSORLESS_HOMING requires J_MIN_ENDSTOP_HIT_STATE HIGH for J_MIN homing with TMC2209." + #endif + #elif J_HOME_TO_MAX && J_MAX_ENDSTOP_HIT_STATE != _HIT_STATE + #if _HIT_STATE + #error "SENSORLESS_HOMING requires J_MAJ_ENDSTOP_HIT_STATE LOW for J_MAX homing." + #else + #error "SENSORLESS_HOMING requires J_MAJ_ENDSTOP_HIT_STATE HIGH for J_MAX homing with TMC2209." + #endif + #endif + #undef _HIT_STATE + #endif + + #if K_SENSORLESS + #define _HIT_STATE AXIS_DRIVER_TYPE(K,TMC2209) + #if K_HOME_TO_MIN && K_MIN_ENDSTOP_HIT_STATE != _HIT_STATE + #if _HIT_STATE + #error "SENSORLESS_HOMING requires K_MIN_ENDSTOP_HIT_STATE LOW for K_MIN homing." + #else + #error "SENSORLESS_HOMING requires K_MIN_ENDSTOP_HIT_STATE HIGH for K_MIN homing with TMC2209." + #endif + #elif K_HOME_TO_MAX && K_MAX_ENDSTOP_HIT_STATE != _HIT_STATE + #if _HIT_STATE + #error "SENSORLESS_HOMING requires K_MAK_ENDSTOP_HIT_STATE LOW for K_MAX homing." + #else + #error "SENSORLESS_HOMING requires K_MAK_ENDSTOP_HIT_STATE HIGH for K_MAX homing with TMC2209." + #endif + #endif + #undef _HIT_STATE + #endif + + #if U_SENSORLESS + #define _HIT_STATE AXIS_DRIVER_TYPE(U,TMC2209) + #if U_HOME_TO_MIN && U_MIN_ENDSTOP_HIT_STATE != _HIT_STATE + #if _HIT_STATE + #error "SENSORLESS_HOMING requires U_MIN_ENDSTOP_HIT_STATE LOW for U_MIN homing." + #else + #error "SENSORLESS_HOMING requires U_MIN_ENDSTOP_HIT_STATE HIGH for U_MIN homing with TMC2209." + #endif + #elif U_HOME_TO_MAX && U_MAX_ENDSTOP_HIT_STATE != _HIT_STATE + #if _HIT_STATE + #error "SENSORLESS_HOMING requires U_MAU_ENDSTOP_HIT_STATE LOW for U_MAX homing." + #else + #error "SENSORLESS_HOMING requires U_MAU_ENDSTOP_HIT_STATE HIGH for U_MAX homing with TMC2209." + #endif + #endif + #undef _HIT_STATE + #endif + + #if V_SENSORLESS + #define _HIT_STATE AXIS_DRIVER_TYPE(V,TMC2209) + #if V_HOME_TO_MIN && V_MIN_ENDSTOP_HIT_STATE != _HIT_STATE + #if _HIT_STATE + #error "SENSORLESS_HOMING requires V_MIN_ENDSTOP_HIT_STATE LOW for V_MIN homing." + #else + #error "SENSORLESS_HOMING requires V_MIN_ENDSTOP_HIT_STATE HIGH for V_MIN homing with TMC2209." + #endif + #elif V_HOME_TO_MAX && V_MAX_ENDSTOP_HIT_STATE != _HIT_STATE + #if _HIT_STATE + #error "SENSORLESS_HOMING requires V_MAV_ENDSTOP_HIT_STATE LOW for V_MAX homing." + #else + #error "SENSORLESS_HOMING requires V_MAV_ENDSTOP_HIT_STATE HIGH for V_MAX homing with TMC2209." + #endif + #endif + #undef _HIT_STATE + #endif + + #if W_SENSORLESS + #define _HIT_STATE AXIS_DRIVER_TYPE(W,TMC2209) + #if W_HOME_TO_MIN && W_MIN_ENDSTOP_HIT_STATE != _HIT_STATE + #if _HIT_STATE + #error "SENSORLESS_HOMING requires W_MIN_ENDSTOP_HIT_STATE LOW for W_MIN homing." + #else + #error "SENSORLESS_HOMING requires W_MIN_ENDSTOP_HIT_STATE HIGH for W_MIN homing with TMC2209." + #endif + #elif W_HOME_TO_MAX && W_MAX_ENDSTOP_HIT_STATE != _HIT_STATE + #if _HIT_STATE + #error "SENSORLESS_HOMING requires W_MAW_ENDSTOP_HIT_STATE LOW for W_MAX homing." + #else + #error "SENSORLESS_HOMING requires W_MAW_ENDSTOP_HIT_STATE HIGH for W_MAX homing with TMC2209." + #endif + #endif + #undef _HIT_STATE + #endif + + #endif // !SPI_ENDSTOPS #if ENABLED(DELTA) && !BOTH(STEALTHCHOP_XY, STEALTHCHOP_Z) #error "SENSORLESS_HOMING on DELTA currently requires STEALTHCHOP_XY and STEALTHCHOP_Z." @@ -3768,15 +3799,6 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #error "SENSORLESS_HOMING requires a TMC stepper driver with StallGuard on X, Y, Z, I, J, K, U, V, or W axes." #endif - #undef X_ENDSTOP_INVERTING - #undef Y_ENDSTOP_INVERTING - #undef Z_ENDSTOP_INVERTING - #undef I_ENDSTOP_INVERTING - #undef J_ENDSTOP_INVERTING - #undef K_ENDSTOP_INVERTING - #undef U_ENDSTOP_INVERTING - #undef V_ENDSTOP_INVERTING - #undef W_ENDSTOP_INVERTING #endif // Sensorless probing requirements diff --git a/Marlin/src/lcd/e3v2/proui/endstop_diag.cpp b/Marlin/src/lcd/e3v2/proui/endstop_diag.cpp index 0945d69778..c3edba53df 100644 --- a/Marlin/src/lcd/e3v2/proui/endstop_diag.cpp +++ b/Marlin/src/lcd/e3v2/proui/endstop_diag.cpp @@ -89,7 +89,7 @@ void ESDiagClass::Draw() { void ESDiagClass::Update() { DWINUI::cursor.y = 80; - #define ES_REPORT(S) draw_es_state(READ(S##_PIN) != S##_ENDSTOP_INVERTING) + #define ES_REPORT(S) draw_es_state(READ(S##_PIN) == S##_ENDSTOP_HIT_STATE) #if HAS_X_MIN ES_REPORT(X_MIN); #endif diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/endstop_state_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/endstop_state_screen.cpp index f7e57cf0b9..b52904fe8f 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/endstop_state_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/endstop_state_screen.cpp @@ -41,7 +41,7 @@ void EndstopStatesScreen::onExit() { #define GRID_ROWS 7 #define PIN_BTN(X,Y,PIN,LABEL) button(BTN_POS(X,Y), BTN_SIZE(2,1), LABEL) -#define PIN_ENABLED(X,Y,LABEL,PIN,INV) cmd.enabled(1).colors(READ(PIN##_PIN) != INV ? action_btn : normal_btn).PIN_BTN(X,Y,PIN,LABEL); +#define PIN_ENABLED(X,Y,LABEL,PIN,ST) cmd.enabled(1).colors(READ(PIN##_PIN) == ST ? action_btn : normal_btn).PIN_BTN(X,Y,PIN,LABEL); #define PIN_DISABLED(X,Y,LABEL,PIN) cmd.enabled(0).PIN_BTN(X,Y,PIN,LABEL); void EndstopStatesScreen::onRedraw(draw_mode_t) { @@ -55,32 +55,32 @@ void EndstopStatesScreen::onRedraw(draw_mode_t) { .text(BTN_POS(1,1), BTN_SIZE(6,1), GET_TEXT_F(MSG_LCD_ENDSTOPS)) .font(font_tiny); #if HAS_X_MAX - PIN_ENABLED (1, 2, PSTR(STR_X_MAX), X_MAX, X_MAX_ENDSTOP_INVERTING) + PIN_ENABLED (1, 2, PSTR(STR_X_MAX), X_MAX, X_MAX_ENDSTOP_HIT_STATE) #else PIN_DISABLED(1, 2, PSTR(STR_X_MAX), X_MAX) #endif #if HAS_Y_MAX - PIN_ENABLED (3, 2, PSTR(STR_Y_MAX), Y_MAX, Y_MAX_ENDSTOP_INVERTING) + PIN_ENABLED (3, 2, PSTR(STR_Y_MAX), Y_MAX, Y_MAX_ENDSTOP_HIT_STATE) #else PIN_DISABLED(3, 2, PSTR(STR_Y_MAX), Y_MAX) #endif #if HAS_Z_MAX - PIN_ENABLED (5, 2, PSTR(STR_Z_MAX), Z_MAX, Z_MAX_ENDSTOP_INVERTING) + PIN_ENABLED (5, 2, PSTR(STR_Z_MAX), Z_MAX, Z_MAX_ENDSTOP_HIT_STATE) #else PIN_DISABLED(5, 2, PSTR(STR_Z_MAX), Z_MAX) #endif #if HAS_X_MIN - PIN_ENABLED (1, 3, PSTR(STR_X_MIN), X_MIN, X_MIN_ENDSTOP_INVERTING) + PIN_ENABLED (1, 3, PSTR(STR_X_MIN), X_MIN, X_MIN_ENDSTOP_HIT_STATE) #else PIN_DISABLED(1, 3, PSTR(STR_X_MIN), X_MIN) #endif #if HAS_Y_MIN - PIN_ENABLED (3, 3, PSTR(STR_Y_MIN), Y_MIN, Y_MIN_ENDSTOP_INVERTING) + PIN_ENABLED (3, 3, PSTR(STR_Y_MIN), Y_MIN, Y_MIN_ENDSTOP_HIT_STATE) #else PIN_DISABLED(3, 3, PSTR(STR_Y_MIN), Y_MIN) #endif #if HAS_Z_MIN - PIN_ENABLED (5, 3, PSTR(STR_Z_MIN), Z_MIN, Z_MIN_ENDSTOP_INVERTING) + PIN_ENABLED (5, 3, PSTR(STR_Z_MIN), Z_MIN, Z_MIN_ENDSTOP_HIT_STATE) #else PIN_DISABLED(5, 3, PSTR(STR_Z_MIN), Z_MIN) #endif @@ -95,7 +95,7 @@ void EndstopStatesScreen::onRedraw(draw_mode_t) { PIN_DISABLED(3, 4, GET_TEXT_F(MSG_RUNOUT_2), FIL_RUNOUT2) #endif #if PIN_EXISTS(Z_MIN_PROBE) - PIN_ENABLED (5, 4, PSTR(STR_Z_PROBE), Z_MIN_PROBE, Z_MIN_PROBE_ENDSTOP_INVERTING) + PIN_ENABLED (5, 4, PSTR(STR_Z_PROBE), Z_MIN_PROBE, Z_MIN_PROBE_ENDSTOP_HIT_STATE) #else PIN_DISABLED(5, 4, PSTR(STR_Z_PROBE), Z_MIN_PROBE) #endif diff --git a/Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp b/Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp index 86b5e6eb4c..d1679d402f 100644 --- a/Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp +++ b/Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp @@ -76,7 +76,7 @@ constexpr static bool endstopz2_sta = true; #endif - #define ESTATE(S) (READ(S##_PIN) != S##_ENDSTOP_INVERTING) + #define ESTATE(S) (READ(S##_PIN) == S##_ENDSTOP_HIT_STATE) void test_gpio_readlevel_L() { WRITE(WIFI_IO0_PIN, HIGH); diff --git a/Marlin/src/lcd/extui/nextion/nextion_tft.cpp b/Marlin/src/lcd/extui/nextion/nextion_tft.cpp index 63c25177a6..8b7b36e9ce 100644 --- a/Marlin/src/lcd/extui/nextion/nextion_tft.cpp +++ b/Marlin/src/lcd/extui/nextion/nextion_tft.cpp @@ -431,27 +431,27 @@ void NextionTFT::PanelInfo(uint8_t req) { case 36: // Endstop Info #if X_HOME_TO_MIN - SEND_VALasTXT("x1", READ(X_MIN_PIN) != X_MIN_ENDSTOP_INVERTING ? "triggered" : "open"); + SEND_VALasTXT("x1", READ(X_MIN_PIN) == X_MIN_ENDSTOP_HIT_STATE ? "triggered" : "open"); #elif X_HOME_TO_MAX - SEND_VALasTXT("x2", READ(X_MAX_PIN) != X_MAX_ENDSTOP_INVERTING ? "triggered" : "open"); + SEND_VALasTXT("x2", READ(X_MAX_PIN) == X_MAX_ENDSTOP_HIT_STATE ? "triggered" : "open"); #endif #if Y_HOME_TO_MIN - SEND_VALasTXT("y1", READ(Y_MIN_PIN) != Y_MIN_ENDSTOP_INVERTING ? "triggered" : "open"); + SEND_VALasTXT("y1", READ(Y_MIN_PIN) == Y_MIN_ENDSTOP_HIT_STATE ? "triggered" : "open"); #elif Y_HOME_TO_MAX - SEND_VALasTXT("y2", READ(X_MAX_PIN) != Y_MAX_ENDSTOP_INVERTING ? "triggered" : "open"); + SEND_VALasTXT("y2", READ(X_MAX_PIN) == Y_MAX_ENDSTOP_HIT_STATE ? "triggered" : "open"); #endif #if Z_HOME_TO_MIN - SEND_VALasTXT("z1", READ(Z_MIN_PIN) != Z_MIN_ENDSTOP_INVERTING ? "triggered" : "open"); + SEND_VALasTXT("z1", READ(Z_MIN_PIN) == Z_MIN_ENDSTOP_HIT_STATE ? "triggered" : "open"); #elif Z_HOME_TO_MAX - SEND_VALasTXT("z2", READ(Z_MAX_PIN) != Z_MAX_ENDSTOP_INVERTING ? "triggered" : "open"); + SEND_VALasTXT("z2", READ(Z_MAX_PIN) == Z_MAX_ENDSTOP_HIT_STATE ? "triggered" : "open"); #endif #if HAS_Z2_MIN - SEND_VALasTXT("z2", READ(Z2_MIN_PIN) != Z2_MIN_ENDSTOP_INVERTING ? "triggered" : "open"); + SEND_VALasTXT("z2", READ(Z2_MIN_PIN) == Z2_MIN_ENDSTOP_HIT_STATE ? "triggered" : "open"); #elif HAS_Z2_MAX - SEND_VALasTXT("z2", READ(Z2_MAX_PIN) != Z2_MAX_ENDSTOP_INVERTING ? "triggered" : "open"); + SEND_VALasTXT("z2", READ(Z2_MAX_PIN) == Z2_MAX_ENDSTOP_HIT_STATE ? "triggered" : "open"); #endif #if HAS_BED_PROBE - //SEND_VALasTXT("bltouch", READ(Z_MIN_PROBE_PIN) != Z_MIN_PROBE_ENDSTOP_INVERTING ? "triggered" : "open"); + //SEND_VALasTXT("bltouch", READ(Z_MIN_PROBE_PIN) == Z_MIN_PROBE_ENDSTOP_HIT_STATE ? "triggered" : "open"); #else SEND_NA("bltouch"); #endif diff --git a/Marlin/src/module/endstops.cpp b/Marlin/src/module/endstops.cpp index ef5f5d06e1..9d73210025 100644 --- a/Marlin/src/module/endstops.cpp +++ b/Marlin/src/module/endstops.cpp @@ -109,284 +109,90 @@ Endstops::endstop_mask_t Endstops::live_state = 0; void Endstops::init() { + #define _INIT_ENDSTOP(T,A,N) TERN(ENDSTOPPULLUP_##A##T, SET_INPUT_PULLUP, TERN(ENDSTOPPULLDOWN_##A##T, SET_INPUT_PULLDOWN, SET_INPUT))(A##N##_##T##_PIN) #if HAS_X_MIN - #if ENABLED(ENDSTOPPULLUP_XMIN) - SET_INPUT_PULLUP(X_MIN_PIN); - #elif ENABLED(ENDSTOPPULLDOWN_XMIN) - SET_INPUT_PULLDOWN(X_MIN_PIN); - #else - SET_INPUT(X_MIN_PIN); - #endif + _INIT_ENDSTOP(MIN,X,); #endif - - #if HAS_X2_MIN - #if ENABLED(ENDSTOPPULLUP_XMIN) - SET_INPUT_PULLUP(X2_MIN_PIN); - #elif ENABLED(ENDSTOPPULLDOWN_XMIN) - SET_INPUT_PULLDOWN(X2_MIN_PIN); - #else - SET_INPUT(X2_MIN_PIN); - #endif - #endif - - #if HAS_Y_MIN - #if ENABLED(ENDSTOPPULLUP_YMIN) - SET_INPUT_PULLUP(Y_MIN_PIN); - #elif ENABLED(ENDSTOPPULLDOWN_YMIN) - SET_INPUT_PULLDOWN(Y_MIN_PIN); - #else - SET_INPUT(Y_MIN_PIN); - #endif - #endif - - #if HAS_Y2_MIN - #if ENABLED(ENDSTOPPULLUP_YMIN) - SET_INPUT_PULLUP(Y2_MIN_PIN); - #elif ENABLED(ENDSTOPPULLDOWN_YMIN) - SET_INPUT_PULLDOWN(Y2_MIN_PIN); - #else - SET_INPUT(Y2_MIN_PIN); - #endif - #endif - - #if HAS_Z_MIN - #if ENABLED(ENDSTOPPULLUP_ZMIN) - SET_INPUT_PULLUP(Z_MIN_PIN); - #elif ENABLED(ENDSTOPPULLDOWN_ZMIN) - SET_INPUT_PULLDOWN(Z_MIN_PIN); - #else - SET_INPUT(Z_MIN_PIN); - #endif - #endif - - #if HAS_Z2_MIN - #if ENABLED(ENDSTOPPULLUP_ZMIN) - SET_INPUT_PULLUP(Z2_MIN_PIN); - #elif ENABLED(ENDSTOPPULLDOWN_ZMIN) - SET_INPUT_PULLDOWN(Z2_MIN_PIN); - #else - SET_INPUT(Z2_MIN_PIN); - #endif - #endif - - #if HAS_Z3_MIN - #if ENABLED(ENDSTOPPULLUP_ZMIN) - SET_INPUT_PULLUP(Z3_MIN_PIN); - #elif ENABLED(ENDSTOPPULLDOWN_ZMIN) - SET_INPUT_PULLDOWN(Z3_MIN_PIN); - #else - SET_INPUT(Z3_MIN_PIN); - #endif - #endif - - #if HAS_Z4_MIN - #if ENABLED(ENDSTOPPULLUP_ZMIN) - SET_INPUT_PULLUP(Z4_MIN_PIN); - #elif ENABLED(ENDSTOPPULLDOWN_ZMIN) - SET_INPUT_PULLDOWN(Z4_MIN_PIN); - #else - SET_INPUT(Z4_MIN_PIN); - #endif - #endif - #if HAS_X_MAX - #if ENABLED(ENDSTOPPULLUP_XMAX) - SET_INPUT_PULLUP(X_MAX_PIN); - #elif ENABLED(ENDSTOPPULLDOWN_XMAX) - SET_INPUT_PULLDOWN(X_MAX_PIN); - #else - SET_INPUT(X_MAX_PIN); - #endif + _INIT_ENDSTOP(MAX,X,); + #endif + #if HAS_X2_MIN + _INIT_ENDSTOP(MIN,X,2); #endif - #if HAS_X2_MAX - #if ENABLED(ENDSTOPPULLUP_XMAX) - SET_INPUT_PULLUP(X2_MAX_PIN); - #elif ENABLED(ENDSTOPPULLDOWN_XMAX) - SET_INPUT_PULLDOWN(X2_MAX_PIN); - #else - SET_INPUT(X2_MAX_PIN); - #endif + _INIT_ENDSTOP(MAX,X,2); + #endif + #if HAS_Y_MIN + _INIT_ENDSTOP(MIN,Y,); #endif - #if HAS_Y_MAX - #if ENABLED(ENDSTOPPULLUP_YMAX) - SET_INPUT_PULLUP(Y_MAX_PIN); - #elif ENABLED(ENDSTOPPULLDOWN_YMAX) - SET_INPUT_PULLDOWN(Y_MAX_PIN); - #else - SET_INPUT(Y_MAX_PIN); - #endif + _INIT_ENDSTOP(MAX,Y,); + #endif + #if HAS_Y2_MIN + _INIT_ENDSTOP(MIN,Y,2); #endif - #if HAS_Y2_MAX - #if ENABLED(ENDSTOPPULLUP_YMAX) - SET_INPUT_PULLUP(Y2_MAX_PIN); - #elif ENABLED(ENDSTOPPULLDOWN_YMAX) - SET_INPUT_PULLDOWN(Y2_MAX_PIN); - #else - SET_INPUT(Y2_MAX_PIN); - #endif + _INIT_ENDSTOP(MAX,Y,2); + #endif + #if HAS_Z_MIN + _INIT_ENDSTOP(MIN,Z,); #endif - #if HAS_Z_MAX - #if ENABLED(ENDSTOPPULLUP_ZMAX) - SET_INPUT_PULLUP(Z_MAX_PIN); - #elif ENABLED(ENDSTOPPULLDOWN_ZMAX) - SET_INPUT_PULLDOWN(Z_MAX_PIN); - #else - SET_INPUT(Z_MAX_PIN); - #endif + _INIT_ENDSTOP(MAX,Z,); + #endif + #if HAS_Z2_MIN + _INIT_ENDSTOP(MIN,Z,2); #endif - #if HAS_Z2_MAX - #if ENABLED(ENDSTOPPULLUP_ZMAX) - SET_INPUT_PULLUP(Z2_MAX_PIN); - #elif ENABLED(ENDSTOPPULLDOWN_ZMAX) - SET_INPUT_PULLDOWN(Z2_MAX_PIN); - #else - SET_INPUT(Z2_MAX_PIN); - #endif + _INIT_ENDSTOP(MAX,Z,2); + #endif + #if HAS_Z3_MIN + _INIT_ENDSTOP(MIN,Z,3); #endif - #if HAS_Z3_MAX - #if ENABLED(ENDSTOPPULLUP_ZMAX) - SET_INPUT_PULLUP(Z3_MAX_PIN); - #elif ENABLED(ENDSTOPPULLDOWN_ZMAX) - SET_INPUT_PULLDOWN(Z3_MAX_PIN); - #else - SET_INPUT(Z3_MAX_PIN); - #endif + _INIT_ENDSTOP(MAX,Z,3); + #endif + #if HAS_Z4_MIN + _INIT_ENDSTOP(MIN,Z,4); #endif - #if HAS_Z4_MAX - #if ENABLED(ENDSTOPPULLUP_ZMAX) - SET_INPUT_PULLUP(Z4_MAX_PIN); - #elif ENABLED(ENDSTOPPULLDOWN_ZMAX) - SET_INPUT_PULLDOWN(Z4_MAX_PIN); - #else - SET_INPUT(Z4_MAX_PIN); - #endif + _INIT_ENDSTOP(MAX,Z,4); #endif - #if HAS_I_MIN - #if ENABLED(ENDSTOPPULLUP_IMIN) - SET_INPUT_PULLUP(I_MIN_PIN); - #elif ENABLED(ENDSTOPPULLDOWN_IMIN) - SET_INPUT_PULLDOWN(I_MIN_PIN); - #else - SET_INPUT(I_MIN_PIN); - #endif + _INIT_ENDSTOP(MIN,I,); #endif - #if HAS_I_MAX - #if ENABLED(ENDSTOPPULLUP_IMAX) - SET_INPUT_PULLUP(I_MAX_PIN); - #elif ENABLED(ENDSTOPPULLDOWN_IMAX) - SET_INPUT_PULLDOWN(I_MAX_PIN); - #else - SET_INPUT(I_MAX_PIN); - #endif + _INIT_ENDSTOP(MAX,I,); #endif - #if HAS_J_MIN - #if ENABLED(ENDSTOPPULLUP_JMIN) - SET_INPUT_PULLUP(J_MIN_PIN); - #elif ENABLED(ENDSTOPPULLDOWN_IMIN) - SET_INPUT_PULLDOWN(J_MIN_PIN); - #else - SET_INPUT(J_MIN_PIN); - #endif + _INIT_ENDSTOP(MIN,J,); #endif - #if HAS_J_MAX - #if ENABLED(ENDSTOPPULLUP_JMAX) - SET_INPUT_PULLUP(J_MAX_PIN); - #elif ENABLED(ENDSTOPPULLDOWN_JMAX) - SET_INPUT_PULLDOWN(J_MAX_PIN); - #else - SET_INPUT(J_MAX_PIN); - #endif + _INIT_ENDSTOP(MAX,J,); #endif - #if HAS_K_MIN - #if ENABLED(ENDSTOPPULLUP_KMIN) - SET_INPUT_PULLUP(K_MIN_PIN); - #elif ENABLED(ENDSTOPPULLDOWN_KMIN) - SET_INPUT_PULLDOWN(K_MIN_PIN); - #else - SET_INPUT(K_MIN_PIN); - #endif + _INIT_ENDSTOP(MIN,K,); #endif - #if HAS_K_MAX - #if ENABLED(ENDSTOPPULLUP_KMAX) - SET_INPUT_PULLUP(K_MAX_PIN); - #elif ENABLED(ENDSTOPPULLDOWN_KMIN) - SET_INPUT_PULLDOWN(K_MAX_PIN); - #else - SET_INPUT(K_MAX_PIN); - #endif + _INIT_ENDSTOP(MAX,K,); #endif - #if HAS_U_MIN - #if ENABLED(ENDSTOPPULLUP_UMIN) - SET_INPUT_PULLUP(U_MIN_PIN); - #elif ENABLED(ENDSTOPPULLDOWN_UMIN) - SET_INPUT_PULLDOWN(U_MIN_PIN); - #else - SET_INPUT(U_MIN_PIN); - #endif + _INIT_ENDSTOP(MIN,U,); #endif - #if HAS_U_MAX - #if ENABLED(ENDSTOPPULLUP_UMAX) - SET_INPUT_PULLUP(U_MAX_PIN); - #elif ENABLED(ENDSTOPPULLDOWN_UMIN) - SET_INPUT_PULLDOWN(U_MAX_PIN); - #else - SET_INPUT(U_MAX_PIN); - #endif + _INIT_ENDSTOP(MAX,U,); #endif - #if HAS_V_MIN - #if ENABLED(ENDSTOPPULLUP_VMIN) - SET_INPUT_PULLUP(V_MIN_PIN); - #elif ENABLED(ENDSTOPPULLDOWN_VMIN) - SET_INPUT_PULLDOWN(V_MIN_PIN); - #else - SET_INPUT(V_MIN_PIN); - #endif + _INIT_ENDSTOP(MIN,V,); #endif - #if HAS_V_MAX - #if ENABLED(ENDSTOPPULLUP_VMAX) - SET_INPUT_PULLUP(V_MAX_PIN); - #elif ENABLED(ENDSTOPPULLDOWN_VMIN) - SET_INPUT_PULLDOWN(V_MAX_PIN); - #else - SET_INPUT(V_MAX_PIN); - #endif + _INIT_ENDSTOP(MAX,V,); #endif - #if HAS_W_MIN - #if ENABLED(ENDSTOPPULLUP_WMIN) - SET_INPUT_PULLUP(W_MIN_PIN); - #elif ENABLED(ENDSTOPPULLDOWN_WMIN) - SET_INPUT_PULLDOWN(W_MIN_PIN); - #else - SET_INPUT(W_MIN_PIN); - #endif + _INIT_ENDSTOP(MIN,W,); #endif - #if HAS_W_MAX - #if ENABLED(ENDSTOPPULLUP_WMAX) - SET_INPUT_PULLUP(W_MAX_PIN); - #elif ENABLED(ENDSTOPPULLDOWN_WMIN) - SET_INPUT_PULLDOWN(W_MAX_PIN); - #else - SET_INPUT(W_MAX_PIN); - #endif + _INIT_ENDSTOP(MAX,W,); #endif #if PIN_EXISTS(CALIBRATION) @@ -577,7 +383,7 @@ static void print_es_state(const bool is_hit, FSTR_P const flabel=nullptr) { void __O2 Endstops::report_states() { TERN_(BLTOUCH, bltouch._set_SW_mode()); SERIAL_ECHOLNPGM(STR_M119_REPORT); - #define ES_REPORT(S) print_es_state(READ_ENDSTOP(S##_PIN) != S##_ENDSTOP_INVERTING, F(STR_##S)) + #define ES_REPORT(S) print_es_state(READ_ENDSTOP(S##_PIN) == S##_ENDSTOP_HIT_STATE, F(STR_##S)) #if HAS_X_MIN ES_REPORT(X_MIN); #endif @@ -693,7 +499,7 @@ void __O2 Endstops::report_states() { #define __ENDSTOP(AXIS, MINMAX) AXIS ##_## MINMAX #define _ENDSTOP_PIN(AXIS, MINMAX) AXIS ##_## MINMAX ##_PIN -#define _ENDSTOP_INVERTING(AXIS, MINMAX) AXIS ##_## MINMAX ##_ENDSTOP_INVERTING +#define _ENDSTOP_HIT_STATE(AXIS, MINMAX) AXIS ##_## MINMAX ##_ENDSTOP_HIT_STATE #define _ENDSTOP(AXIS, MINMAX) __ENDSTOP(AXIS, MINMAX) /** @@ -708,7 +514,7 @@ void Endstops::update() { #endif // Macros to update / copy the live_state - #define UPDATE_ENDSTOP_BIT(AXIS, MINMAX) SET_BIT_TO(live_state, _ENDSTOP(AXIS, MINMAX), (READ_ENDSTOP(_ENDSTOP_PIN(AXIS, MINMAX)) != _ENDSTOP_INVERTING(AXIS, MINMAX))) + #define UPDATE_ENDSTOP_BIT(AXIS, MINMAX) SET_BIT_TO(live_state, _ENDSTOP(AXIS, MINMAX), (READ_ENDSTOP(_ENDSTOP_PIN(AXIS, MINMAX)) == _ENDSTOP_HIT_STATE(AXIS, MINMAX))) #define COPY_LIVE_STATE(SRC_BIT, DST_BIT) SET_BIT_TO(live_state, DST_BIT, TEST(live_state, SRC_BIT)) #if ENABLED(G38_PROBE_TARGET) && NONE(CORE_IS_XY, CORE_IS_XZ, MARKFORGED_XY, MARKFORGED_YX) diff --git a/Marlin/src/module/probe.h b/Marlin/src/module/probe.h index 770ca81ef4..90dccf7a7b 100644 --- a/Marlin/src/module/probe.h +++ b/Marlin/src/module/probe.h @@ -44,9 +44,9 @@ #endif #if USES_Z_MIN_PROBE_PIN - #define PROBE_TRIGGERED() (READ(Z_MIN_PROBE_PIN) != Z_MIN_PROBE_ENDSTOP_INVERTING) + #define PROBE_TRIGGERED() (READ(Z_MIN_PROBE_PIN) == Z_MIN_PROBE_ENDSTOP_HIT_STATE) #else - #define PROBE_TRIGGERED() (READ(Z_MIN_PIN) != Z_MIN_ENDSTOP_INVERTING) + #define PROBE_TRIGGERED() (READ(Z_MIN_PIN) == Z_MIN_ENDSTOP_HIT_STATE) #endif #if ALL(DWIN_LCD_PROUI, INDIVIDUAL_AXIS_HOMING_SUBMENU, MESH_BED_LEVELING) diff --git a/buildroot/tests/FYSETC_F6 b/buildroot/tests/FYSETC_F6 index f4f05ceea7..0c5f25a155 100755 --- a/buildroot/tests/FYSETC_F6 +++ b/buildroot/tests/FYSETC_F6 @@ -39,7 +39,7 @@ restore_configs opt_set MOTHERBOARD BOARD_FYSETC_F6_13 \ LCD_LANGUAGE vi LCD_LANGUAGE_2 fr \ X_DRIVER_TYPE TMC2160 Y_DRIVER_TYPE TMC5160 Z_DRIVER_TYPE TMC2208_STANDALONE E0_DRIVER_TYPE TMC2130 \ - X_MIN_ENDSTOP_INVERTING true Y_MIN_ENDSTOP_INVERTING true + X_MIN_ENDSTOP_HIT_STATE LOW Y_MIN_ENDSTOP_HIT_STATE LOW opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER \ MARLIN_BRICKOUT MARLIN_INVADERS MARLIN_SNAKE \ MONITOR_DRIVER_STATUS STEALTHCHOP_XY STEALTHCHOP_Z STEALTHCHOP_E HYBRID_THRESHOLD \ @@ -59,7 +59,7 @@ exec_test $1 $2 "RAMPS 1.3 | DELTA | FLSUN AC Config" "$3" use_example_configs SCARA/Morgan opt_set MOTHERBOARD BOARD_FYSETC_F6_13 \ LCD_LANGUAGE es \ - X_MAX_ENDSTOP_INVERTING false \ + X_MAX_ENDSTOP_HIT_STATE HIGH \ X_DRIVER_TYPE TMC2209 Y_DRIVER_TYPE TMC2130 Z_DRIVER_TYPE TMC2130_STANDALONE E0_DRIVER_TYPE TMC2660 \ X_HARDWARE_SERIAL Serial2 opt_enable USE_ZMIN_PLUG FIX_MOUNTED_PROBE AUTO_BED_LEVELING_BILINEAR PAUSE_BEFORE_DEPLOY_STOW \ diff --git a/buildroot/tests/mega1280 b/buildroot/tests/mega1280 index 5bf37289ba..d948623f48 100755 --- a/buildroot/tests/mega1280 +++ b/buildroot/tests/mega1280 @@ -55,8 +55,8 @@ exec_test $1 $2 "RAMPS | DELTA | RRD LCD | DELTA_AUTO_CALIBRATION | DELTA_CALIBR # use_example_configs delta/generic opt_set LCD_LANGUAGE cz \ - Z_MIN_PROBE_ENDSTOP_INVERTING false \ - Z_MIN_ENDSTOP_INVERTING false + Z_MIN_PROBE_ENDSTOP_HIT_STATE HIGH \ + Z_MIN_ENDSTOP_HIT_STATE HIGH opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER DELTA_CALIBRATION_MENU AUTO_BED_LEVELING_BILINEAR BLTOUCH exec_test $1 $2 "DELTA | RRD LCD | ABL Bilinear | BLTOUCH" "$3" diff --git a/buildroot/tests/teensy35 b/buildroot/tests/teensy35 index ec12082909..d9e7839da8 100755 --- a/buildroot/tests/teensy35 +++ b/buildroot/tests/teensy35 @@ -85,7 +85,7 @@ exec_test $1 $2 "Mixing Extruder" "$3" restore_configs opt_set MOTHERBOARD BOARD_TEENSY35_36 \ X_DRIVER_TYPE TMC5160 Y_DRIVER_TYPE TMC5160 \ - X_MIN_ENDSTOP_INVERTING true Y_MIN_ENDSTOP_INVERTING true \ + X_MIN_ENDSTOP_HIT_STATE LOW Y_MIN_ENDSTOP_HIT_STATE LOW \ X_CS_PIN 46 Y_CS_PIN 47 opt_enable COREXY USE_ZMIN_PLUG MONITOR_DRIVER_STATUS SENSORLESS_HOMING exec_test $1 $2 "Teensy 3.5/3.6 COREXY" "$3" diff --git a/buildroot/tests/teensy41 b/buildroot/tests/teensy41 index 56bd5043c7..f852474ac0 100755 --- a/buildroot/tests/teensy41 +++ b/buildroot/tests/teensy41 @@ -88,7 +88,7 @@ exec_test $1 $2 "Mixing Extruder" "$3" restore_configs opt_set MOTHERBOARD BOARD_TEENSY41 \ X_DRIVER_TYPE TMC5160 Y_DRIVER_TYPE TMC5160 \ - X_MIN_ENDSTOP_INVERTING true Y_MIN_ENDSTOP_INVERTING true \ + X_MIN_ENDSTOP_HIT_STATE LOW Y_MIN_ENDSTOP_HIT_STATE LOW \ X_CS_PIN 46 Y_CS_PIN 47 opt_enable COREXY USE_ZMIN_PLUG MONITOR_DRIVER_STATUS SENSORLESS_HOMING exec_test $1 $2 "Teensy 4.0/4.1 COREXY" "$3" From 0021a58943721a81b1ef23fa5e7366cfd80a3d28 Mon Sep 17 00:00:00 2001 From: Bob Kuhn Date: Sun, 26 Mar 2023 04:07:25 -0500 Subject: [PATCH 083/225] =?UTF-8?q?=E2=9C=A8=20AnyCubic=20Vyper=20/=20Vype?= =?UTF-8?q?r=20LCD=20(#25405)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration.h | 16 +- Marlin/Configuration_adv.h | 2 +- Marlin/src/HAL/LPC1768/HAL.h | 4 +- Marlin/src/core/boards.h | 1 + Marlin/src/feature/bedlevel/abl/bbl.cpp | 33 +- Marlin/src/feature/bedlevel/abl/bbl.h | 8 +- Marlin/src/feature/powerloss.cpp | 2 +- Marlin/src/gcode/queue.cpp | 18 + Marlin/src/gcode/queue.h | 6 + Marlin/src/gcode/temp/M303.cpp | 3 + Marlin/src/inc/Conditionals_LCD.h | 4 +- Marlin/src/inc/SanityCheck.h | 10 +- Marlin/src/inc/Warnings.cpp | 4 +- .../lcd/extui/anycubic_chiron/chiron_tft.cpp | 8 - .../lcd/extui/anycubic_chiron/chiron_tft.h | 1 - .../anycubic_i3mega/anycubic_i3mega_lcd.cpp | 2 + .../extui/anycubic_vyper/FileNavigator.cpp | 161 + .../lcd/extui/anycubic_vyper/FileNavigator.h | 57 + Marlin/src/lcd/extui/anycubic_vyper/Tunes.cpp | 58 + Marlin/src/lcd/extui/anycubic_vyper/Tunes.h | 220 ++ .../src/lcd/extui/anycubic_vyper/dgus_tft.cpp | 3305 +++++++++++++++++ .../src/lcd/extui/anycubic_vyper/dgus_tft.h | 479 +++ .../lcd/extui/anycubic_vyper/dgus_tft_defs.h | 157 + .../lcd/extui/anycubic_vyper/vyper_extui.cpp | 152 + .../lcd/extui/ia_creality/creality_extui.cpp | 2 +- Marlin/src/lcd/extui/ui_api.cpp | 13 +- Marlin/src/lcd/extui/ui_api.h | 2 + Marlin/src/lcd/tft/ui_320x240.cpp | 2 +- Marlin/src/libs/buzzer.h | 4 +- Marlin/src/libs/numtostr.cpp | 31 + Marlin/src/libs/numtostr.h | 6 + Marlin/src/pins/gd32f1/env_validate.h | 32 + Marlin/src/pins/gd32f1/pins_TRIGORILLA_V006.h | 152 + Marlin/src/pins/pins.h | 2 + Marlin/src/sd/cardreader.cpp | 34 + Marlin/src/sd/cardreader.h | 1 + ini/features.ini | 1 + ini/stm32f1.ini | 10 + platformio.ini | 1 + 39 files changed, 4951 insertions(+), 53 deletions(-) create mode 100644 Marlin/src/lcd/extui/anycubic_vyper/FileNavigator.cpp create mode 100644 Marlin/src/lcd/extui/anycubic_vyper/FileNavigator.h create mode 100644 Marlin/src/lcd/extui/anycubic_vyper/Tunes.cpp create mode 100644 Marlin/src/lcd/extui/anycubic_vyper/Tunes.h create mode 100644 Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp create mode 100644 Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.h create mode 100644 Marlin/src/lcd/extui/anycubic_vyper/dgus_tft_defs.h create mode 100644 Marlin/src/lcd/extui/anycubic_vyper/vyper_extui.cpp create mode 100644 Marlin/src/pins/gd32f1/env_validate.h create mode 100644 Marlin/src/pins/gd32f1/pins_TRIGORILLA_V006.h diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index becad3f2f0..7f6e7daed5 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -3132,15 +3132,23 @@ //#define TOUCH_UI_FTDI_EVE // -// Touch-screen LCD for Anycubic printers +// Touch-screen LCD for Anycubic Chiron +// +//#define ANYCUBIC_LCD_CHIRON + +// +// Touch-screen LCD for Anycubic i3 Mega // //#define ANYCUBIC_LCD_I3MEGA -//#define ANYCUBIC_LCD_CHIRON -#if EITHER(ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON) - //#define ANYCUBIC_LCD_DEBUG +#if ENABLED(ANYCUBIC_LCD_I3MEGA) //#define ANYCUBIC_LCD_GCODE_EXT // Add ".gcode" to menu entries for DGUS clone compatibility #endif +// +// Touch-screen LCD for Anycubic Vyper +// +//#define ANYCUBIC_LCD_VYPER + // // 320x240 Nextion 2.8" serial TFT Resistive Touch Screen NX3224T028 // diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index eb04f473b7..e8fc947d3e 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -1957,7 +1957,7 @@ // // Specify additional languages for the UI. Default specified by LCD_LANGUAGE. // -#if ANY(DOGLCD, TFT_COLOR_UI, TOUCH_UI_FTDI_EVE, IS_DWIN_MARLINUI) +#if ANY(DOGLCD, TFT_COLOR_UI, TOUCH_UI_FTDI_EVE, IS_DWIN_MARLINUI, ANYCUBIC_LCD_VYPER) //#define LCD_LANGUAGE_2 fr //#define LCD_LANGUAGE_3 de //#define LCD_LANGUAGE_4 es diff --git a/Marlin/src/HAL/LPC1768/HAL.h b/Marlin/src/HAL/LPC1768/HAL.h index 63bec2b720..15d61d30d1 100644 --- a/Marlin/src/HAL/LPC1768/HAL.h +++ b/Marlin/src/HAL/LPC1768/HAL.h @@ -249,9 +249,9 @@ public: static bool adc_ready() { return LPC176x::adc_hardware.done(LPC176x::pin_get_adc_channel(adc_pin)); } // The current value of the ADC register - static uint16_t adc_value() { + static uint16_t adc_value() { adc_result = FilteredADC::read(adc_pin) >> (16 - HAL_ADC_RESOLUTION); // returns 16bit value, reduce to required bits - return uint16_t(adc_result); + return uint16_t(adc_result); } /** diff --git a/Marlin/src/core/boards.h b/Marlin/src/core/boards.h index 8a1cec714e..0ca26d2ab2 100644 --- a/Marlin/src/core/boards.h +++ b/Marlin/src/core/boards.h @@ -382,6 +382,7 @@ #define BOARD_ERYONE_ERY32_MINI 5065 // Eryone Ery32 mini (STM32F103VE) #define BOARD_PANDA_PI_V29 5066 // Panda Pi V2.9 - Standalone (STM32F103RC) #define BOARD_SOVOL_V131 5067 // Sovol V1.3.1 (GD32F103RET6) +#define BOARD_TRIGORILLA_V006 5068 // Trigorilla V0.0.6 (GD32F103RE) // // ARM Cortex-M4F diff --git a/Marlin/src/feature/bedlevel/abl/bbl.cpp b/Marlin/src/feature/bedlevel/abl/bbl.cpp index d0044303c7..6ef3945fa5 100644 --- a/Marlin/src/feature/bedlevel/abl/bbl.cpp +++ b/Marlin/src/feature/bedlevel/abl/bbl.cpp @@ -175,13 +175,13 @@ void LevelingBilinear::print_leveling_grid(const bed_mesh_t* _z_values/*=nullptr xy_float_t LevelingBilinear::grid_factor_virt; #define LINEAR_EXTRAPOLATION(E, I) ((E) * 2 - (I)) - float LevelingBilinear::bed_level_virt_coord(const uint8_t x, const uint8_t y) { + float LevelingBilinear::virt_coord(const uint8_t x, const uint8_t y) { uint8_t ep = 0, ip = 1; if (x > (GRID_MAX_POINTS_X) + 1 || y > (GRID_MAX_POINTS_Y) + 1) { // The requested point requires extrapolating two points beyond the mesh. // These values are only requested for the edges of the mesh, which are always an actual mesh point, // and do not require interpolation. When interpolation is not needed, this "Mesh + 2" point is - // cancelled out in bed_level_virt_cmr and does not impact the result. Return 0.0 rather than + // cancelled out in virt_cmr and does not impact the result. Return 0.0 rather than // making this function more complex by extrapolating two points. return 0.0; } @@ -197,8 +197,8 @@ void LevelingBilinear::print_leveling_grid(const bed_mesh_t* _z_values/*=nullptr ); else return LINEAR_EXTRAPOLATION( - bed_level_virt_coord(ep + 1, y), - bed_level_virt_coord(ip + 1, y) + virt_coord(ep + 1, y), + virt_coord(ip + 1, y) ); } if (!y || y == ABL_TEMP_POINTS_Y - 1) { @@ -213,14 +213,14 @@ void LevelingBilinear::print_leveling_grid(const bed_mesh_t* _z_values/*=nullptr ); else return LINEAR_EXTRAPOLATION( - bed_level_virt_coord(x, ep + 1), - bed_level_virt_coord(x, ip + 1) + virt_coord(x, ep + 1), + virt_coord(x, ip + 1) ); } return z_values[x - 1][y - 1]; } - float LevelingBilinear::bed_level_virt_cmr(const float p[4], const uint8_t i, const float t) { + float LevelingBilinear::virt_cmr(const float p[4], const uint8_t i, const float t) { return ( p[i-1] * -t * sq(1 - t) + p[i] * (2 - 5 * sq(t) + 3 * t * sq(t)) @@ -229,18 +229,18 @@ void LevelingBilinear::print_leveling_grid(const bed_mesh_t* _z_values/*=nullptr ) * 0.5f; } - float LevelingBilinear::bed_level_virt_2cmr(const uint8_t x, const uint8_t y, const_float_t tx, const_float_t ty) { + float LevelingBilinear::virt_2cmr(const uint8_t x, const uint8_t y, const_float_t tx, const_float_t ty) { float row[4], column[4]; LOOP_L_N(i, 4) { LOOP_L_N(j, 4) { - column[j] = bed_level_virt_coord(i + x - 1, j + y - 1); + column[j] = virt_coord(i + x - 1, j + y - 1); } - row[i] = bed_level_virt_cmr(column, 1, ty); + row[i] = virt_cmr(column, 1, ty); } - return bed_level_virt_cmr(row, 1, tx); + return virt_cmr(row, 1, tx); } - void LevelingBilinear::bed_level_virt_interpolate() { + void LevelingBilinear::subdivide_mesh() { grid_spacing_virt = grid_spacing / (BILINEAR_SUBDIVISIONS); grid_factor_virt = grid_spacing_virt.reciprocal(); LOOP_L_N(y, GRID_MAX_POINTS_Y) @@ -250,12 +250,7 @@ void LevelingBilinear::print_leveling_grid(const bed_mesh_t* _z_values/*=nullptr if ((ty && y == (GRID_MAX_POINTS_Y) - 1) || (tx && x == (GRID_MAX_POINTS_X) - 1)) continue; z_values_virt[x * (BILINEAR_SUBDIVISIONS) + tx][y * (BILINEAR_SUBDIVISIONS) + ty] = - bed_level_virt_2cmr( - x + 1, - y + 1, - (float)tx / (BILINEAR_SUBDIVISIONS), - (float)ty / (BILINEAR_SUBDIVISIONS) - ); + virt_2cmr(x + 1, y + 1, (float)tx / (BILINEAR_SUBDIVISIONS), (float)ty / (BILINEAR_SUBDIVISIONS)); } } @@ -263,7 +258,7 @@ void LevelingBilinear::print_leveling_grid(const bed_mesh_t* _z_values/*=nullptr // Refresh after other values have been updated void LevelingBilinear::refresh_bed_level() { - TERN_(ABL_BILINEAR_SUBDIVISION, bed_level_virt_interpolate()); + TERN_(ABL_BILINEAR_SUBDIVISION, subdivide_mesh()); cached_rel.x = cached_rel.y = -999.999; cached_g.x = cached_g.y = -99; } diff --git a/Marlin/src/feature/bedlevel/abl/bbl.h b/Marlin/src/feature/bedlevel/abl/bbl.h index 60dde9060f..ca2e96593f 100644 --- a/Marlin/src/feature/bedlevel/abl/bbl.h +++ b/Marlin/src/feature/bedlevel/abl/bbl.h @@ -43,10 +43,10 @@ private: static xy_pos_t grid_spacing_virt; static xy_float_t grid_factor_virt; - static float bed_level_virt_coord(const uint8_t x, const uint8_t y); - static float bed_level_virt_cmr(const float p[4], const uint8_t i, const float t); - static float bed_level_virt_2cmr(const uint8_t x, const uint8_t y, const_float_t tx, const_float_t ty); - static void bed_level_virt_interpolate(); + static float virt_coord(const uint8_t x, const uint8_t y); + static float virt_cmr(const float p[4], const uint8_t i, const float t); + static float virt_2cmr(const uint8_t x, const uint8_t y, const_float_t tx, const_float_t ty); + static void subdivide_mesh(); #endif public: diff --git a/Marlin/src/feature/powerloss.cpp b/Marlin/src/feature/powerloss.cpp index dd20d04278..29c4695ca4 100644 --- a/Marlin/src/feature/powerloss.cpp +++ b/Marlin/src/feature/powerloss.cpp @@ -113,7 +113,7 @@ void PrintJobRecovery::changed() { purge(); else if (IS_SD_PRINTING()) save(true); - TERN_(EXTENSIBLE_UI, ExtUI::onSetPowerLoss(onoff)); + TERN_(EXTENSIBLE_UI, ExtUI::onSetPowerLoss(enabled)); } /** diff --git a/Marlin/src/gcode/queue.cpp b/Marlin/src/gcode/queue.cpp index c951fc6333..edf0ddfdbf 100644 --- a/Marlin/src/gcode/queue.cpp +++ b/Marlin/src/gcode/queue.cpp @@ -303,6 +303,24 @@ static bool serial_data_available(serial_index_t index) { inline int read_serial(const serial_index_t index) { return SERIAL_IMPL.read(index); } +#if (defined(ARDUINO_ARCH_STM32F4) || defined(ARDUINO_ARCH_STM32)) && defined(USBCON) + + /** + * arduinoststm32's USB receive buffer is not well behaved when the buffer overflows + * + * This can happen when the host programs (such as Pronterface) automatically + * send M105 temperature requests. + */ + void GCodeQueue::flush_rx() { + // Flush receive buffer + LOOP_L_N(p, NUM_SERIAL) { + if (!serial_data_available(p)) continue; // No data for this port? Skip. + while (SERIAL_IMPL.available(p)) (void)read_serial(p); + } + } + +#endif // (ARDUINO_ARCH_STM32F4 || ARDUINO_ARCH_STM32) && USBCON + void GCodeQueue::gcode_line_error(FSTR_P const ferr, const serial_index_t serial_ind) { PORT_REDIRECT(SERIAL_PORTMASK(serial_ind)); // Reply to the serial port that sent the command SERIAL_ERROR_START(); diff --git a/Marlin/src/gcode/queue.h b/Marlin/src/gcode/queue.h index 1422830080..19fb359e15 100644 --- a/Marlin/src/gcode/queue.h +++ b/Marlin/src/gcode/queue.h @@ -201,6 +201,12 @@ public: */ static void flush_and_request_resend(const serial_index_t serial_ind); + #if (defined(ARDUINO_ARCH_STM32F4) || defined(ARDUINO_ARCH_STM32)) && defined(USBCON) + static void flush_rx(); + #else + static void flush_rx() {} + #endif + /** * (Re)Set the current line number for the last received command */ diff --git a/Marlin/src/gcode/temp/M303.cpp b/Marlin/src/gcode/temp/M303.cpp index e0ad26027e..48eebaa0e4 100644 --- a/Marlin/src/gcode/temp/M303.cpp +++ b/Marlin/src/gcode/temp/M303.cpp @@ -25,6 +25,7 @@ #if HAS_PID_HEATING #include "../gcode.h" +#include "../queue.h" // for flush_tx #include "../../lcd/marlinui.h" #include "../../module/temperature.h" @@ -85,6 +86,8 @@ void GcodeSuite::M303() { LCD_MESSAGE(MSG_PID_AUTOTUNE); thermalManager.PID_autotune(temp, hid, c, u); ui.reset_status(); + + queue.flush_rx(); } #endif // HAS_PID_HEATING diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 3c821e5306..403db47e42 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -477,7 +477,7 @@ #endif // Aliases for LCD features -#if !DGUS_UI_IS(NONE) +#if !DGUS_UI_IS(NONE) || ENABLED(ANYCUBIC_LCD_VYPER) #define HAS_DGUS_LCD 1 #if DGUS_UI_IS(ORIGIN, FYSETC, HIPRECY, MKS) #define HAS_DGUS_LCD_CLASSIC 1 @@ -485,7 +485,7 @@ #endif // Extensible UI serial touch screens. (See src/lcd/extui) -#if ANY(HAS_DGUS_LCD, MALYAN_LCD, TOUCH_UI_FTDI_EVE, ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, NEXTION_TFT) +#if ANY(HAS_DGUS_LCD, MALYAN_LCD, TOUCH_UI_FTDI_EVE, ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, ANYCUBIC_LCD_VYPER, NEXTION_TFT) #define IS_EXTUI 1 #define EXTENSIBLE_UI #endif diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 1f43d01bb8..e67a4c9e49 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -3140,7 +3140,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS + (ENABLED(EXTENSIBLE_UI) && DISABLED(IS_EXTUI)) \ + (DISABLED(IS_LEGACY_TFT) && ENABLED(TFT_GENERIC)) \ + (ENABLED(IS_LEGACY_TFT) && COUNT_ENABLED(TFT_320x240, TFT_320x240_SPI, TFT_480x320, TFT_480x320_SPI)) \ - + COUNT_ENABLED(ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, ANYCUBIC_TFT35) \ + + COUNT_ENABLED(ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, ANYCUBIC_TFT35, ANYCUBIC_LCD_VYPER) \ + DGUS_UI_IS(ORIGIN) + DGUS_UI_IS(FYSETC) + DGUS_UI_IS(HIPRECY) + DGUS_UI_IS(MKS) + DGUS_UI_IS(RELOADED) + DGUS_UI_IS(IA_CREALITY) \ + COUNT_ENABLED(ENDER2_STOCKDISPLAY, CR10_STOCKDISPLAY) \ + COUNT_ENABLED(DWIN_CREALITY_LCD, DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI, DWIN_MARLINUI_PORTRAIT, DWIN_MARLINUI_LANDSCAPE) \ @@ -3254,6 +3254,10 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #endif #endif +#if ENABLED(ANYCUBIC_LCD_VYPER) + static_assert(strcmp(STRINGIFY(LCD_LANGUAGE_2), "zh_CN") == 0, "LCD_LANGUAGE_2 must be set to zh_CN for ANYCUBIC_LCD_VYPER."); +#endif + #if EITHER(MKS_TS35_V2_0, BTT_TFT35_SPI_V1_0) && SD_CONNECTION_IS(LCD) #error "SDCARD_CONNECTION cannot be set to LCD for the enabled TFT. No available SD card reader." #endif @@ -3353,8 +3357,8 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #else #if HAS_DGUS_LCD #error "The DGUS LCD requires LCD_SERIAL_PORT to be defined." - #elif EITHER(ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON) - #error "The ANYCUBIC LCD requires LCD_SERIAL_PORT to be defined." + #elif ANY(ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, ANYCUBIC_LCD_VYPER) + #error "ANYCUBIC_LCD_* requires LCD_SERIAL_PORT to be defined." #elif ENABLED(MALYAN_LCD) #error "MALYAN_LCD requires LCD_SERIAL_PORT to be defined." #elif ENABLED(NEXTION_LCD) diff --git a/Marlin/src/inc/Warnings.cpp b/Marlin/src/inc/Warnings.cpp index 405e7a351e..3b9bc17b6f 100644 --- a/Marlin/src/inc/Warnings.cpp +++ b/Marlin/src/inc/Warnings.cpp @@ -780,8 +780,8 @@ /** * GD32 is not exactly like STM32 */ -#if MB(SOVOL_V131) - #warning "GD32 based controllers may not be fully compatible with Maple Generic STM32F103RE. Please report any issues." +#if MB(SOVOL_V131, TRIGORILLA_V006) + #warning "GD32 based controllers may not be fully compatible with STM32 platforms. Please report any issues." #endif /** diff --git a/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.cpp b/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.cpp index 285729cc15..dce503776b 100644 --- a/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.cpp +++ b/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.cpp @@ -72,14 +72,6 @@ void ChironTFT::Startup() { live_Zoffset = 0.0; file_menu = AC_menu_file; - // Setup pins for powerloss detection - // Two IO pins are connected on the Trigorilla Board - // On a power interruption the OUTAGECON_PIN goes low. - - #if ENABLED(POWER_LOSS_RECOVERY) - OUT_WRITE(OUTAGECON_PIN, HIGH); - #endif - // Filament runout is handled by Marlin settings in Configuration.h // opt_set FIL_RUNOUT_STATE HIGH // Pin state indicating that filament is NOT present. // opt_enable FIL_RUNOUT_PULLUP diff --git a/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.h b/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.h index c9a32e584d..e0517ec640 100644 --- a/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.h +++ b/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.h @@ -76,7 +76,6 @@ class ChironTFT { static void CheckHeaters(); static void SendFileList(int8_t); static void SelectFile(); - static void InjectCommandandWait(PGM_P); static void ProcessPanelRequest(); static void PanelInfo(uint8_t); static void PanelAction(uint8_t); diff --git a/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp b/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp index 774ba55e43..1bc52bfcaf 100644 --- a/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp +++ b/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp @@ -23,6 +23,8 @@ #if ENABLED(ANYCUBIC_LCD_I3MEGA) +//#define ANYCUBIC_LCD_DEBUG + #include "anycubic_i3mega_lcd.h" #include "../ui_api.h" diff --git a/Marlin/src/lcd/extui/anycubic_vyper/FileNavigator.cpp b/Marlin/src/lcd/extui/anycubic_vyper/FileNavigator.cpp new file mode 100644 index 0000000000..38603f5679 --- /dev/null +++ b/Marlin/src/lcd/extui/anycubic_vyper/FileNavigator.cpp @@ -0,0 +1,161 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2023 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 . + * + */ + +/** + * lcd/extui/anycubic_vyper/FileNavigator.cpp + */ + +/*************************************************************************** + * The AC panel wants files in block of 4 and can only display a flat list * + * This library allows full folder traversal. * + ***************************************************************************/ + +#include "../../../inc/MarlinConfigPre.h" + +#if ENABLED(ANYCUBIC_LCD_VYPER) + +#include "FileNavigator.h" +#include "dgus_tft.h" + +using namespace ExtUI; + +namespace Anycubic { + + FileList FileNavigator::filelist; // Instance of the Marlin file API + char FileNavigator::currentfoldername[MAX_PATH_LEN]; // Current folder path + uint16_t FileNavigator::lastindex; + uint8_t FileNavigator::folderdepth; + uint16_t FileNavigator::currentindex; // override the panel request + + FileNavigator filenavigator; + + FileNavigator::FileNavigator() { reset(); } + + void FileNavigator::reset() { + currentfoldername[0] = '\0'; + folderdepth = 0; + currentindex = 0; + lastindex = 0; + // Start at root folder + while (!filelist.isAtRootDir()) filelist.upDir(); + refresh(); + } + + void FileNavigator::refresh() { filelist.refresh(); } + + void FileNavigator::getFiles(uint16_t index) { + uint8_t files = 5; + if (index == 0) currentindex = 0; + + // Each time we change folder we reset the file index to 0 and keep track + // of the current position as the TFT panel isnt aware of folders trees. + if (index > 0) { + //--currentindex; // go back a file to take account off the .. we added to the root. + if (index > lastindex) + currentindex += files; + else + currentindex = currentindex < 5 ? 0 : currentindex - files; + } + lastindex = index; + + #if ACDEBUG(AC_FILE) + SERIAL_ECHOLNPGM("index=", index, " currentindex=", currentindex, " lastindex=", lastindex); + #endif + + uint8_t file_num = 0; + for (uint16_t _seek = currentindex; _seek < currentindex + files; _seek++) { + + #if ACDEBUG(AC_FILE) + SERIAL_ECHOLNPGM("_seek: ", _seek, " currentindex: ", currentindex, " files: ", files); + #endif + + if (filelist.seek(_seek)) { + //sendFile(); + + DgusTFT::SendTxtToTFT(filelist.longFilename(), TXT_FILE_0 + file_num*0x30); + + #if ACDEBUG(AC_FILE) + SERIAL_ECHOLNPGM("seek: ", _seek, " '", filelist.longFilename(), "' '", currentfoldername, "", filelist.shortFilename(), "'\n"); + #endif + } + else { + #if ACDEBUG(AC_FILE) + SERIAL_ECHOLNPGM("over seek: ", _seek); + #endif + + DgusTFT::SendTxtToTFT("\0", TXT_FILE_0 + file_num*0x30); + } + + file_num++; + } + } + + void FileNavigator::sendFile() { + // Send the file and folder info to the panel. + // This info will be returned when the file is selected. + // Permitted special characters in file name: -_*#~ + // Panel can display 22 characters per line. + if (!filelist.isDir()) + DgusTFT::SendTxtToTFT(filelist.longFilename(), TXT_FILE_0); + } + + void FileNavigator::changeDIR(char *folder) { + #if ACDEBUG(AC_FILE) + SERIAL_ECHOLNPGM("currentfolder: ", currentfoldername, " New: ", folder); + #endif + if (folderdepth >= MAX_FOLDER_DEPTH) return; // limit the folder depth + strcat(currentfoldername, folder); + strcat(currentfoldername, "/"); + filelist.changeDir(folder); + refresh(); + folderdepth++; + currentindex = 0; + } + + void FileNavigator::upDIR() { + filelist.upDir(); + refresh(); + folderdepth--; + currentindex = 0; + // Remove the last child folder from the stored path + if (folderdepth == 0) { + currentfoldername[0] = '\0'; + reset(); + } + else { + char *pos = nullptr; + for (uint8_t f = 0; f < folderdepth; f++) + pos = strchr(currentfoldername, '/'); + + *(pos + 1) = '\0'; + } + #if ACDEBUG(AC_FILE) + SERIAL_ECHOLNPGM("depth: ", folderdepth, " currentfoldername: ", currentfoldername); + #endif + } + + char* FileNavigator::getCurrentFolderName() { return currentfoldername; } + + uint16_t FileNavigator::getFileNum() { return filelist.count(); } +} + +#endif // ANYCUBIC_LCD_VYPER diff --git a/Marlin/src/lcd/extui/anycubic_vyper/FileNavigator.h b/Marlin/src/lcd/extui/anycubic_vyper/FileNavigator.h new file mode 100644 index 0000000000..c39e66b63e --- /dev/null +++ b/Marlin/src/lcd/extui/anycubic_vyper/FileNavigator.h @@ -0,0 +1,57 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2023 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 + +/** + * lcd/extui/anycubic_vyper/FileNavigator.h + */ + +#include "dgus_tft_defs.h" +#include "../ui_api.h" + +using namespace ExtUI; + +namespace Anycubic { + class FileNavigator { + public: + FileNavigator(); + + static FileList filelist; + + void reset(); + void getFiles(uint16_t); + void upDIR(); + void changeDIR(char *); + void sendFile(); + void refresh(); + char * getCurrentFolderName(); + uint16_t getFileNum(); + + private: + + static char currentfoldername[MAX_PATH_LEN]; + static uint16_t lastindex; + static uint8_t folderdepth; + static uint16_t currentindex; + }; + extern FileNavigator filenavigator; +} diff --git a/Marlin/src/lcd/extui/anycubic_vyper/Tunes.cpp b/Marlin/src/lcd/extui/anycubic_vyper/Tunes.cpp new file mode 100644 index 0000000000..d7f0e4b6d4 --- /dev/null +++ b/Marlin/src/lcd/extui/anycubic_vyper/Tunes.cpp @@ -0,0 +1,58 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2023 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 . + * + */ + +/** + * lcd/extui/anycubic_vyper/Tunes.cpp + */ + +/*********************************************************************** + * A Utility to play tunes using the buzzer in the printer controller. * + * See Tunes.h for note and tune definitions. * + ***********************************************************************/ + +#include "../../../inc/MarlinConfigPre.h" + +#if ENABLED(ANYCUBIC_LCD_VYPER) + +#include "Tunes.h" +#include "../ui_api.h" + +namespace Anycubic { + + void PlayTune(const uint8_t beeperPin, const uint16_t *tune, const uint8_t speed=1) { + uint8_t pos = 1; + uint16_t wholenotelen = tune[0] / speed; + do { + uint16_t freq = tune[pos]; + uint16_t notelen = wholenotelen / tune[pos + 1]; + + ::tone(beeperPin, freq, notelen); + ExtUI::delay_ms(notelen); + pos += 2; + + if (pos >= MAX_TUNE_LENGTH) break; + } while (tune[pos] != n_END); + } + +} + +#endif // ANYCUBIC_LCD_VYPER diff --git a/Marlin/src/lcd/extui/anycubic_vyper/Tunes.h b/Marlin/src/lcd/extui/anycubic_vyper/Tunes.h new file mode 100644 index 0000000000..9a06768ac6 --- /dev/null +++ b/Marlin/src/lcd/extui/anycubic_vyper/Tunes.h @@ -0,0 +1,220 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2023 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 + +/** + * lcd/extui/anycubic_vyper/Tunes.h + */ + +/************************************************************************** + * Notes definition from https://pages.mtu.edu/~suits/NoteFreqCalcs.html * + * * + * The format of a tune is: * + * {,,, ,, ... } * + * * + * 1) The first value is the length of a whole note in milliseconds * + * 2) Then a sequence of pitch and duration pairs * + * 3) Finally the END marker so your tunes can be any length up to * + * MAX_TUNE_LEN * + *************************************************************************/ + +#include + +#define MAX_TUNE_LENGTH 128 + +// Special notes! +#define n_P 0 // silence or pause +#define n_END 10000 // end of tune marker + +// Note duration divisors +#define l_T1 1 +#define l_T2 2 +#define l_T3 3 +#define l_T4 4 +#define l_T8 8 +#define l_T16 16 + +// Note Frequency +#define n_C0 16 +#define n_CS0 17 +#define n_D0 18 +#define n_DS0 19 +#define n_E0 21 +#define n_F0 22 +#define n_FS0 23 +#define n_G0 25 +#define n_GS0 26 +#define n_A0 28 +#define n_AS0 29 +#define n_B0 31 +#define n_C1 33 +#define n_CS1 35 +#define n_D1 37 +#define n_DS1 39 +#define n_E1 41 +#define n_F1 44 +#define n_FS1 46 +#define n_G1 49 +#define n_GS1 52 +#define n_A1 55 +#define n_AS1 58 +#define n_B1 62 +#define n_C2 65 +#define n_CS2 69 +#define n_D2 73 +#define n_DS2 78 +#define n_E2 82 +#define n_F2 87 +#define n_FS2 93 +#define n_G2 98 +#define n_GS2 104 +#define n_A2 110 +#define n_AS2 117 +#define n_B2 123 +#define n_C3 131 +#define n_CS3 139 +#define n_D3 147 +#define n_DS3 156 +#define n_E3 165 +#define n_F3 175 +#define n_FS3 185 +#define n_G3 196 +#define n_GS3 208 +#define n_A3 220 +#define n_AS3 233 +#define n_B3 247 +#define n_C4 262 +#define n_CS4 277 +#define n_D4 294 +#define n_DS4 311 +#define n_E4 330 +#define n_F4 349 +#define n_FS4 370 +#define n_G4 392 +#define n_GS4 415 +#define n_A4 440 +#define n_AS4 466 +#define n_B4 494 +#define n_C5 523 +#define n_CS5 554 +#define n_D5 587 +#define n_DS5 622 +#define n_E5 659 +#define n_F5 698 +#define n_FS5 740 +#define n_G5 784 +#define n_GS5 831 +#define n_A5 880 +#define n_AS5 932 +#define n_B5 988 +#define n_C6 1047 +#define n_CS6 1109 +#define n_D6 1175 +#define n_DS6 1245 +#define n_E6 1319 +#define n_F6 1397 +#define n_FS6 1480 +#define n_G6 1568 +#define n_GS6 1661 +#define n_A6 1760 +#define n_AS6 1865 +#define n_B6 1976 +#define n_C7 2093 +#define n_CS7 2217 +#define n_D7 2349 +#define n_DS7 2489 +#define n_E7 2637 +#define n_F7 2794 +#define n_FS7 2960 +#define n_G7 3136 +#define n_GS7 3322 +#define n_A7 3520 +#define n_AS7 3729 +#define n_B7 3951 +#define n_C8 4186 +#define n_CS8 4435 +#define n_D8 4699 +#define n_DS8 4978 +#define n_E8 5274 +#define n_F8 5587 +#define n_FS8 5920 +#define n_G8 6272 +#define n_GS8 6645 +#define n_A8 7040 +#define n_AS8 7459 +#define n_B8 7902 + +namespace Anycubic { + + void PlayTune(const uint8_t beeperPin, const uint16_t *tune, const uint8_t speed); + + // Only uncomment the tunes you are using to save memory + // This will help you write tunes! + // https://www.apronus.com/music/flashpiano.htm + + const uint16_t SOS[] = { + 250, + n_G6,l_T3, n_P,l_T3, n_G6,l_T3, n_P,l_T3, n_G6,l_T3, n_P,l_T1, + n_G6,l_T1, n_P,l_T3, n_G6,l_T1, n_P,l_T3, n_G6,l_T1, n_P,l_T1, + n_G6,l_T3, n_P,l_T3, n_G6,l_T3, n_P,l_T3, n_G6,l_T3, n_P,l_T1, + n_END + }; + + const uint16_t BeepBeep[] = { + 500, + n_C7,l_T8, n_P,l_T16, n_C7,l_T8, n_P,l_T8, + n_END + }; + + const uint16_t BeepBeepBeeep[] = { + 1000, + n_G7,l_T4, n_P,l_T16, n_G7,l_T4, n_P,l_T8, n_G7,l_T2, + n_END + }; + + const uint16_t Anycubic_PowerOn[] = { + 1000, + n_F7,l_T8, n_P,l_T8, n_C7,l_T8, n_P,l_T8, n_D7,l_T8, n_P,l_T8, + n_E7,l_T8, n_P,l_T8, n_D7,l_T4, n_P,l_T4, n_G7,l_T4, n_P,l_T4, + n_A7,l_T2, n_P,l_T1, + n_END + }; + + const uint16_t GB_PowerOn[] = { + 500, + n_C6,l_T4, n_P,l_T16, n_C7,l_T2, n_P,l_T8, + n_END + }; + + const uint16_t Heater_Timedout[] = { + 1000, + n_C6,l_T1, + n_END + }; + + const uint16_t FilamentOut[] = { + 1000, + n_AS7,l_T4, n_P,l_T16, n_FS7,l_T2, + n_END + }; + +} diff --git a/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp b/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp new file mode 100644 index 0000000000..9487f22e89 --- /dev/null +++ b/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp @@ -0,0 +1,3305 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2023 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 . + * + */ + +/** + * lcd/extui/anycubic_vyper/dgus_tft.cpp + */ + +#include "../../../inc/MarlinConfigPre.h" + +#if ENABLED(ANYCUBIC_LCD_VYPER) + +#include "dgus_tft.h" +#include "Tunes.h" +#include "FileNavigator.h" + +#include "../../../gcode/queue.h" +#include "../../../sd/cardreader.h" +#include "../../../libs/numtostr.h" +#include "../../../MarlinCore.h" +#include "../../../core/serial.h" +#include "../../../module/stepper.h" +#include "../../../module/probe.h" + +#if ENABLED(POWER_LOSS_RECOVERY) + #include "../../../feature/powerloss.h" +#endif + +#define DEBUG_OUT ACDEBUGLEVEL +#include "../../../core/debug_out.h" + +#include + +namespace Anycubic { + + const char MESSAGE_charu[] = {0xB4, 0xE6, 0xB4, 0xA2, 0xBF, 0xA8, 0xD2, 0xD1, 0xB2, 0xE5, 0xC8, 0xEB, 0x00}; // '忙'垄驴篓脪脩虏氓脠毛 + const char MESSAGE_bachu[] = {0xB4, 0xE6, 0xB4, 0xA2, 0xBF, 0xA8, 0xD2, 0xD1, 0xB0, 0xCE, 0xB3, 0xF6, 0x00}; + const char MESSAGE_wuka[] = {0xCE, 0xDE, 0xB4, 0xE6, 0xB4, 0xA2, 0xBF, 0xA8, 0x00}; + const char MESSAGE_lianji[] = {0xC1, 0xAA, 0xBB, 0xFA, 0xD6, 0xD0, 0x00}; + const char MESSAGE_tuoji[] = {0xCD, 0xD1, 0xBB, 0xFA, 0xB4, 0xF2, 0xD3, 0xA1, 0xD6, 0xD0, 0x00}; + const char MESSAGE_zanting[] = {0xB4, 0xF2, 0xD3, 0xA1, 0xD4, 0xDD, 0xCD, 0xA3, 0xD6, 0xD0, 0x00}; + const char MESSAGE_tingzhi[] = {0xCD, 0xA3, 0xD6, 0xB9, 0xB4, 0xF2, 0xD3, 0xA1, 0x00}; + const char MESSAGE_wancheng[] = {0xCD, 0xEA, 0xB3, 0xC9, 0xB4, 0xF2, 0xD3, 0xA1, 0x00}; + const char MESSAGE_hotend_heating[] = {0xB4, 0xF2, 0xD3, 0xA1, 0xCD, 0xB7, 0xD5, 0xFD, 0xD4, 0xDA, 0xBC, 0xD3, 0xC8, 0xC8, 0x00}; + const char MESSAGE_hotend_over[] = {0xB4, 0xF2, 0xD3, 0xA1, 0xCD, 0xB7, 0xBC, 0xD3, 0xC8, 0xC8, 0xCD, 0xEA, 0xB3, 0xC9, 0x00}; + const char MESSAGE_bed_heating[] = {0xC8, 0xC8, 0xB4, 0xB2, 0xD5, 0xFD, 0xD4, 0xDA, 0xBC, 0xD3, 0xC8, 0xC8, 0x00}; + const char MESSAGE_bed_over[] = {0xC8, 0xC8, 0xB4, 0xB2, 0xBC, 0xD3, 0xC8, 0xC8, 0xCD, 0xEA, 0xB3, 0xC9, 0x00}; + const char MESSAGE_ready[] = {0xD7, 0xBC, 0xB1, 0xB8, 0xBE, 0xCD, 0xD0, 0xF7, 0x00}; + const char MESSAGE_cold[] = {0xB4, 0xF2, 0xD3, 0xA1, 0xCD, 0xB7, 0xCE, 0xC2, 0xB6, 0xC8, 0xB9, 0xFD, 0xB5, 0xCD, 0x00}; + + const char *p_mesage[] = { MESSAGE_charu, MESSAGE_bachu, MESSAGE_wuka, MESSAGE_lianji, MESSAGE_tuoji, MESSAGE_zanting, + MESSAGE_tingzhi, MESSAGE_wancheng, MESSAGE_hotend_heating, MESSAGE_hotend_over, MESSAGE_bed_heating, + MESSAGE_bed_over, MESSAGE_ready, MESSAGE_cold }; + + DgusTFT::p_fun fun_array[] = { + DgusTFT::page1, DgusTFT::page2, DgusTFT::page3, DgusTFT::page4, DgusTFT::page5, DgusTFT::page6, + DgusTFT::page7, DgusTFT::page8, DgusTFT::page9, DgusTFT::page10, DgusTFT::page11, DgusTFT::page12, + DgusTFT::page13, DgusTFT::page14, DgusTFT::page15, DgusTFT::page16, DgusTFT::page17, DgusTFT::page18, + DgusTFT::page19, DgusTFT::page20, DgusTFT::page21, DgusTFT::page22, DgusTFT::page23, DgusTFT::page24, + DgusTFT::page25, DgusTFT::page26, DgusTFT::page27, DgusTFT::page28, DgusTFT::page29, DgusTFT::page30, + DgusTFT::page31, DgusTFT::page32 + #if HAS_LEVELING + , DgusTFT::page33 , DgusTFT::page34 + #endif + }; + + printer_state_t DgusTFT::printer_state; + paused_state_t DgusTFT::pause_state; + #if HAS_HOTEND + heater_state_t DgusTFT::hotend_state; + #endif + #if HAS_HEATED_BED + heater_state_t DgusTFT::hotbed_state; + #endif + char DgusTFT::selectedfile[MAX_PATH_LEN]; + char DgusTFT::panel_command[MAX_CMND_LEN]; + uint8_t DgusTFT::command_len; + file_menu_t DgusTFT::file_menu; + + bool DgusTFT::data_received; + uint8_t DgusTFT::data_buf[DATA_BUF_SIZE]; + uint8_t DgusTFT::data_index; + uint16_t DgusTFT::page_index_now, DgusTFT::page_index_last, DgusTFT::page_index_last_2; + uint8_t DgusTFT::message_index; + uint8_t DgusTFT::pop_up_index; + uint32_t DgusTFT::key_value; + uint8_t DgusTFT::lcd_txtbox_index; + uint8_t DgusTFT::lcd_txtbox_page; + int16_t DgusTFT::feedrate_back; + lcd_info_t DgusTFT::lcd_info, DgusTFT::lcd_info_back; + language_t DgusTFT::ui_language; + uint16_t page_index_saved; // flags to keep from bombing the host display + uint8_t pop_up_index_saved; + uint32_t key_value_saved; + + void DEBUG_PRINT_PAUSED_STATE(FSTR_P const msg, paused_state_t state); + void DEBUG_PRINT_PRINTER_STATE(FSTR_P const msg, printer_state_t state); + void DEBUG_PRINT_TIMER_EVENT(FSTR_P const msg, timer_event_t event); + void DEBUG_PRINT_MEDIA_EVENT(FSTR_P const msg, media_event_t event); + + DgusTFT Dgus; + + DgusTFT::DgusTFT() { + data_buf[0] = '\0'; + message_index = 100; + pop_up_index = 100; + page_index_now = page_index_last = page_index_last_2 = 1; + lcd_txtbox_index = 0; + feedrate_back = -1; + } + + void DgusTFT::Startup() { + #if ACDEBUG(AC_MARLIN) + DEBUG_ECHOLNPGM("DgusTFT::Startup()"); + #endif + selectedfile[0] = '\0'; + panel_command[0] = '\0'; + command_len = 0; + printer_state = AC_printer_idle; + pause_state = AC_paused_idle; + TERN_(HAS_HOTEND, hotend_state = AC_heater_off); + TERN_(HAS_HEATED_BED, hotbed_state = AC_heater_off); + file_menu = AC_menu_file; + set_language(ui_language); // use language stored in EEPROM + + // Filament runout is handled by Marlin settings in Configuration.h + // opt_set FIL_RUNOUT_STATE HIGH // Pin state indicating that filament is NOT present. + // opt_enable FIL_RUNOUT_PULLUP + + TFTSer.begin(115200); + + // Signal Board has reset + SendtoTFTLN(AC_msg_main_board_has_reset); + + // Enable levelling and Disable end stops during print + // as Z home places nozzle above the bed so we need to allow it past the end stops + injectCommands_P(AC_cmnd_enable_levelling); + + // Startup tunes are defined in Tunes.h + //PlayTune(BEEPER_PIN, Anycubic_PowerOn, 1); + //PlayTune(BEEPER_PIN, GB_PowerOn, 1); + #if ACDEBUGLEVEL + DEBUG_ECHOLNPGM("Startup AC Debug Level ", ACDEBUGLEVEL); + #endif + SendtoTFTLN(AC_msg_ready); + } + + void DgusTFT::ParamInit() { + + #if ACDEBUG(AC_MARLIN) + DEBUG_ECHOLNPGM("DgusTFT::ParamInit()"); + #endif + + if (lcd_info.language == CHS) + page_index_now = 1; + else if (lcd_info.language == ENG) + page_index_now = 121; + + LcdAudioSet(lcd_info.audio_on); + + #if ACDEBUG(AC_MARLIN) + if (lcd_info.language == CHS) + DEBUG_ECHOLNPGM("ParamInit lcd language: CHS"); + else if (lcd_info.language == ENG) + DEBUG_ECHOLNPGM("ParamInit lcd language: ENG"); + + if (lcd_info.audio_on) + DEBUG_ECHOLNPGM("ParamInit lcd audio: ON"); + else + DEBUG_ECHOLNPGM("ParamInit lcd audio: OFF"); + #endif + + RequestValueFromTFT(0x14); // get page ID + } + + void DgusTFT::IdleLoop() { + if (ReadTFTCommand()) { + ProcessPanelRequest(); + command_len = 0; + } + + #if ACDEBUG(AC_MARLIN) + if (key_value) { + DEBUG_ECHOLNPGM("IdleLoop page: ", page_index_now); + DEBUG_ECHOLNPGM("key: ", key_value); + } + #endif + + switch (page_index_now) { + case 115: page115(); break; + case 117: page117(); break; + //case 124: page124(); break; + //case 125: page125(); break; + case 170: page170(); break; + + #if ENABLED(POWER_LOSS_RECOVERY) + case 171: page171(); break; + case 173: page173(); break; + #endif + + #if HAS_LEVELING + case 175: page175(); break; + case 176: page176(); break; + #endif + + case 177 ... 198: { + #if 0 // ACDEBUG(AC_MARLIN) + DEBUG_ECHOLNPGM("line: ", __LINE__); + DEBUG_ECHOLNPGM("func: ", page_index_now); + #endif + //page177_to_198(); + } break; + + case 199 ... 200: { + #if 0 // ACDEBUG(AC_MARLIN) + DEBUG_ECHOLNPGM("line: ", __LINE__); + DEBUG_ECHOLNPGM("func: ", page_index_now); + #endif + page199_to_200(); + } break; + + case 201: case 204: page201(); break; + case 202: case 205: page202(); break; + case 203: case 206: page203(); break; + + default: + if (lcd_info.language == CHS) { + if (WITHIN(page_index_now, 1, 1 + COUNT(fun_array))) { + fun_array[page_index_now - 1](); + } + else { + #if ACDEBUG(AC_MARLIN) + DEBUG_ECHOLNPGM("line: ", __LINE__); + DEBUG_ECHOLNPGM("fun doesn't exist: ", page_index_now); + #endif + } + } + else if (lcd_info.language == ENG) { + if (WITHIN(page_index_now, 121, 121 + COUNT(fun_array))) { + fun_array[page_index_now - 121](); // ENG page_index is 120 more than CHS + } + else { + SERIAL_ECHOLNPGM("lcd function doesn't exist"); + SERIAL_ECHOLNPGM("page_index_last: ", page_index_last); + SERIAL_ECHOLNPGM("page_index_last_2: ", page_index_last_2); + } + } + break; + } + + pop_up_manager(); + key_value = 0; + + CheckHeaters(); + } + + uint8_t FSHlength(FSTR_P FSHinput) { + PGM_P FSHinputPointer = reinterpret_cast(FSHinput); + uint8_t stringLength = 0; + while (pgm_read_byte(FSHinputPointer++)) stringLength++; + return stringLength; + } + + void DgusTFT::PrinterKilled(FSTR_P error_p, FSTR_P component_p) { + + // copy string in FLASH to RAM for strcmp_P + + uint8_t textLength = FSHlength(error_p); + char error[FSHlength(error_p) + 1]; + memcpy_P(error, error_p, textLength + 1); // +1 for the null terminator + + textLength = FSHlength(component_p); + char component[FSHlength(component_p) + 1]; + memcpy_P(component, component_p, textLength + 1); // +1 for the null terminator + + SendtoTFTLN(AC_msg_kill_lcd); + #if ACDEBUG(AC_MARLIN) + DEBUG_ECHOLNPGM("PrinterKilled()\nerror: ", error, "\ncomponent: ", component); + #endif + + if (strcmp_P(error, PSTR("Heating Failed")) == 0) { + + if (strcmp_P(component, PSTR("Bed")) == 0) { + ChangePageOfTFT(PAGE_CHS_ABNORMAL_BED_HEATER); + SERIAL_ECHOLNPGM("Check Bed heater"); + } + else if (strcmp_P(component, PSTR("E1")) == 0) { + ChangePageOfTFT(PAGE_CHS_ABNORMAL_HOTEND_HEATER); + SERIAL_ECHOLNPGM("Check E1 heater"); + } + + } + else if (strcmp_P(error, PSTR("Err: MINTEMP")) == 0) { + + if (strcmp_P(component, PSTR("Bed")) == 0) { + ChangePageOfTFT(PAGE_CHS_ABNORMAL_BED_NTC); + SERIAL_ECHOLNPGM("Check Bed thermistor"); + } + else if (strcmp_P(component, PSTR("E1")) == 0) { + ChangePageOfTFT(PAGE_CHS_ABNORMAL_HOTEND_NTC); + SERIAL_ECHOLNPGM("Check E1 thermistor"); + } + + } + else if (strcmp_P(error, PSTR("Err: MAXTEMP")) == 0) { + + if (strcmp_P(component, PSTR("Bed")) == 0) { + ChangePageOfTFT(PAGE_CHS_ABNORMAL_BED_NTC); + SERIAL_ECHOLNPGM("Check Bed thermistor"); + } + else if (strcmp_P(component, PSTR("E1")) == 0) { + ChangePageOfTFT(PAGE_CHS_ABNORMAL_HOTEND_NTC); + SERIAL_ECHOLNPGM("Check E1 thermistor"); + } + + } + else if (strcmp_P(error, PSTR("THERMAL RUNAWAY")) == 0) { + + if (strcmp_P(component, PSTR("Bed")) == 0) { + ChangePageOfTFT(PAGE_CHS_ABNORMAL_BED_HEATER); + SERIAL_ECHOLNPGM("Check Bed thermal runaway"); + } + else if (strcmp_P(component, PSTR("E1")) == 0) { + ChangePageOfTFT(PAGE_CHS_ABNORMAL_HOTEND_HEATER); + SERIAL_ECHOLNPGM("Check E1 thermal runaway"); + } + + } + else if (strcmp_P(error, PSTR("Homing Failed")) == 0) { + + if (strcmp_P(component, PSTR("X")) == 0) { + ChangePageOfTFT(PAGE_CHS_ABNORMAL_X_ENDSTOP); + SERIAL_ECHOLNPGM("Check X endstop"); + } + else if (strcmp_P(component, PSTR("Y")) == 0) { + ChangePageOfTFT(PAGE_CHS_ABNORMAL_Y_ENDSTOP); + SERIAL_ECHOLNPGM("Check Y endstop"); + } + else if (strcmp_P(component, PSTR("Z")) == 0) { + ChangePageOfTFT(PAGE_CHS_ABNORMAL_Z_ENDSTOP); + SERIAL_ECHOLNPGM("Check Z endstop"); + } + + } + + } + + void DgusTFT::set_descript_color(const uint16_t color, const uint8_t index/*=lcd_txtbox_index*/) { + SendColorToTFT(color, TXT_DESCRIPT_0 + 0x30 * (index - 1)); + } + + void DgusTFT::MediaEvent(media_event_t event) { + #if ACDEBUG(AC_MARLIN) + DEBUG_PRINT_MEDIA_EVENT(F("ProcessMediaStatus() "), event); + #endif + switch (event) { + case AC_media_inserted: + + filenavigator.reset(); + + lcd_txtbox_page = 0; + if (lcd_txtbox_index) { + set_descript_color(COLOR_BLUE); + lcd_txtbox_index = 0; + } + + SendFileList(lcd_txtbox_index); + + break; + + case AC_media_removed: + SendtoTFTLN(AC_msg_sd_card_removed); + + filenavigator.reset(); + + lcd_txtbox_page = 0; + if (lcd_txtbox_index) { + set_descript_color(COLOR_BLUE); + lcd_txtbox_index = 0; + } + + SendFileList(lcd_txtbox_index); + break; + + case AC_media_error: + SendtoTFTLN(AC_msg_no_sd_card); + break; + } + } + + void DgusTFT::TimerEvent(timer_event_t event) { + + #if ACDEBUG(AC_MARLIN) + DEBUG_PRINT_TIMER_EVENT(F("TimerEvent() "), event); + DEBUG_PRINT_PRINTER_STATE(F("Printer State: "), printer_state); + #endif + + switch (event) { + case AC_timer_started: + setSoftEndstopState(false); // disable endstops to print + printer_state = AC_printer_printing; + SendtoTFTLN(AC_msg_print_from_sd_card); + break; + + case AC_timer_paused: + //printer_state = AC_printer_paused; + //pause_state = AC_paused_idle; + SendtoTFTLN(AC_msg_paused); + break; + + case AC_timer_stopped: + if (printer_state != AC_printer_idle) { + if (printer_state == AC_printer_stopping_from_media_remove) { + ChangePageOfTFT(PAGE_NO_SD); + } + else { + printer_state = AC_printer_stopping; + + // Get Printing Time + uint32_t time = getProgress_seconds_elapsed() / 60; + char str_buf[20]; + sprintf(str_buf, "%s H ", utostr3(time / 60)); + sprintf(str_buf + strlen(str_buf), "%s M", utostr3(time % 60)); + SendTxtToTFT(str_buf, TXT_FINISH_TIME); + ChangePageOfTFT(PAGE_PRINT_FINISH); + SendtoTFTLN(AC_msg_print_complete); + pop_up_index = 100; + } + } + setSoftEndstopState(true); // enable endstops + break; + } + } + + #if ENABLED(FILAMENT_RUNOUT_SENSOR) + + void DgusTFT::FilamentRunout() { + #if ACDEBUG(AC_MARLIN) + DEBUG_PRINT_PRINTER_STATE(F("FilamentRunout() printer_state "), printer_state); + + // 1 Signal filament out + SendtoTFTLN(isPrintingFromMedia() ? AC_msg_filament_out_alert : AC_msg_filament_out_block); + //printer_state = AC_printer_filament_out; + + DEBUG_ECHOLNPGM("getFilamentRunoutState: ", getFilamentRunoutState()); + #endif + + pop_up_index = 15; // show filament lack. + + if (READ(FIL_RUNOUT_PIN) == FIL_RUNOUT_STATE) { + PlayTune(BEEPER_PIN, FilamentOut, 1); + + feedrate_back = getFeedrate_percent(); + + if (isPrintingFromMedia()) { + pausePrint(); + printer_state = AC_printer_pausing; + pause_state = AC_paused_filament_lack; + } + } + } + + #endif // FILAMENT_RUNOUT_SENSOR + + void DgusTFT::ConfirmationRequest(const char * const msg) { + // M108 continue + #if ACDEBUG(AC_MARLIN) + DEBUG_ECHOLNPGM("HomingComplete, line: ", __LINE__); + DEBUG_ECHOLNPGM("ConfirmationRequest() ", msg); + DEBUG_PRINT_PRINTER_STATE(F("printer_state: " ), printer_state); + DEBUG_PRINT_PAUSED_STATE(F("pause_state: "), pause_state); + #endif + + switch (printer_state) { + case AC_printer_pausing: { + if (strcmp_P(msg, MARLIN_msg_print_paused) == 0 || strcmp_P(msg, MARLIN_msg_nozzle_parked) == 0) { + if (pause_state != AC_paused_filament_lack) + ChangePageOfTFT(PAGE_STATUS1); // enable continue button + printer_state = AC_printer_paused; + } + } + break; + + #if ENABLED(POWER_LOSS_RECOVERY) + case AC_printer_resuming_from_power_outage: + #endif + case AC_printer_printing: + case AC_printer_paused: + // Heater timout, send acknowledgement + if (strcmp_P(msg, MARLIN_msg_heater_timeout) == 0) { + pause_state = AC_paused_heater_timed_out; + SendtoTFTLN(AC_msg_paused); // enable continue button + PlayTune(BEEPER_PIN, Heater_Timedout, 1); + } + // Reheat finished, send acknowledgement + else if (strcmp_P(msg, MARLIN_msg_reheat_done) == 0) { + #if ACDEBUG(AC_MARLIN) + DEBUG_ECHOLNPGM("send M108 ", __LINE__); + #endif + injectCommands(F("M108")); + + if (pause_state != AC_paused_filament_lack) + pause_state = AC_paused_idle; + + SendtoTFTLN(AC_msg_paused); // enable continue button + } + // Filament Purging, send acknowledgement enter run mode + else if (strcmp_P(msg, MARLIN_msg_filament_purging) == 0) { + pause_state = AC_paused_purging_filament; + SendtoTFTLN(AC_msg_paused); // enable continue button + } + else if (strcmp_P(msg, MARLIN_msg_nozzle_parked) == 0) { + #if ACDEBUG(AC_MARLIN) + DEBUG_ECHOLNPGM("send M108 ", __LINE__); + #endif + injectCommands(F("M108")); + + if (pause_state != AC_paused_filament_lack) + pause_state = AC_paused_idle; + } + + break; + + default: break; + } + } + + void DgusTFT::StatusChange(const char * const msg) { + #if ACDEBUG(AC_MARLIN) + DEBUG_ECHOLNPGM("StatusChange() ", msg); + DEBUG_PRINT_PRINTER_STATE(F("printer_state: "), printer_state); + DEBUG_PRINT_PAUSED_STATE(F("pause_state: "), pause_state); + #endif + bool msg_matched = false; + + #if HAS_LEVELING + static uint8_t probe_cnt = 0; + #endif + + // The only way to get printer status is to parse messages + // Use the state to minimise the work we do here. + switch (printer_state) { + #if HAS_LEVELING + case AC_printer_probing: + + if (strncmp_P(msg, MARLIN_msg_probing_point, strlen_P(MARLIN_msg_probing_point)) == 0) + probe_cnt++; + + // If probing completes ok save the mesh and park + // Ignore the custom machine name + if (strcmp_P(msg + strlen(MACHINE_NAME), MARLIN_msg_ready) == 0) { + if (probe_cnt == GRID_MAX_POINTS_X * GRID_MAX_POINTS_Y) { + probe_cnt = 0; + injectCommands(F("M500")); // G27 park nozzle + //ChangePageOfTFT(PAGE_PreLEVEL); + FakeChangePageOfTFT(PAGE_PreLEVEL); // Prevent UI refreshing too quickly when probing is done + printer_state = AC_printer_idle; + msg_matched = true; + } + } + + // If probing fails don't save the mesh raise the probe above the bad point + if (strcmp_P(msg, MARLIN_msg_probing_failed) == 0) { + PlayTune(BEEPER_PIN, BeepBeepBeeep, 1); + injectCommands(F("G1 Z50 F500")); + ChangePageOfTFT(PAGE_CHS_ABNORMAL_LEVELING_SENSOR); + SendtoTFTLN(AC_msg_probing_complete); + printer_state = AC_printer_idle; + msg_matched = true; + } + + if (strcmp_P(msg, MARLIN_msg_probe_preheat_start) == 0) + ChangePageOfTFT(PAGE_CHS_PROBE_PREHEATING); + + if (strcmp_P(msg, MARLIN_msg_probe_preheat_stop) == 0) + ChangePageOfTFT(PAGE_LEVELING); + + break; + #endif + + case AC_printer_printing: + if (strcmp_P(msg, MARLIN_msg_reheating) == 0) { + SendtoTFTLN(AC_msg_paused); // enable continue button + ChangePageOfTFT(PAGE_STATUS2); + msg_matched = true; + } + else if (strcmp_P(msg, MARLIN_msg_media_removed) == 0) { + msg_matched = true; + printer_state = AC_printer_stopping_from_media_remove; + } + else { + #if ENABLED(FILAMENT_RUNOUT_SENSOR) + #if ACDEBUG(AC_MARLIN) + DEBUG_ECHOLNPGM("setFilamentRunoutState: ", __LINE__); + #endif + setFilamentRunoutState(false); + #endif + } + break; + + case AC_printer_pausing: + if (strcmp_P(msg, MARLIN_msg_print_paused) == 0) { + if (pause_state != AC_paused_filament_lack) { + ChangePageOfTFT(PAGE_STATUS1); // show resume + pause_state = AC_paused_idle; + } + + printer_state = AC_printer_paused; + msg_matched = true; + } + break; + + case AC_printer_paused: + if (strcmp_P(msg, MARLIN_msg_print_paused) == 0) { + if (pause_state != AC_paused_filament_lack) { + ChangePageOfTFT(PAGE_STATUS1); // show resume + pause_state = AC_paused_idle; + } + + printer_state = AC_printer_paused; + msg_matched = true; + } + break; + + case AC_printer_stopping: + if (strcmp_P(msg, MARLIN_msg_print_aborted) == 0) { + ChangePageOfTFT(PAGE_MAIN); + printer_state = AC_printer_idle; + msg_matched = true; + } + break; + + default: break; + } + + // If not matched earlier see if this was a heater message + if (!msg_matched) { + #if HAS_HOTEND + if (strcmp_P(msg, MARLIN_msg_extruder_heating) == 0) { + SendtoTFTLN(AC_msg_nozzle_heating); + hotend_state = AC_heater_temp_set; + return; + } + #endif + #if HAS_HEATED_BED + if (strcmp_P(msg, MARLIN_msg_bed_heating) == 0) { + SendtoTFTLN(AC_msg_bed_heating); + hotbed_state = AC_heater_temp_set; + } + #endif + } + } + + #if ENABLED(POWER_LOSS_RECOVERY) + + void DgusTFT::PowerLoss() { + // On: 5A A5 05 82 00 82 00 00 + // Off: 5A A5 05 82 00 82 00 64 + uint8_t data[] = { 0x5A, 0xA5, 0x05, 0x82, 0x00, 0x82, 0x00, uint8_t(recovery.enabled ? 0x00 : 0x64) }; + LOOP_L_N(i, COUNT(data)) TFTSer.write(data[i]); + } + + void DgusTFT::PowerLossRecovery() { + printer_state = AC_printer_resuming_from_power_outage; // Play tune to notify user we can recover. + } + + #endif // POWER_LOSS_RECOVERY + + void DgusTFT::HomingStart() { + if (!isPrintingFromMedia()) + ChangePageOfTFT(PAGE_CHS_HOMING); + } + + void DgusTFT::HomingComplete() { + if (lcd_info.language == ENG && page_index_last > 120) + page_index_last -= 120; + + #if ACDEBUG(AC_MARLIN) + DEBUG_ECHOLNPGM("HomingComplete, line: ", __LINE__); + DEBUG_ECHOLNPGM("page_index_last: ", page_index_last); + #endif + + if (!isPrintingFromMedia()) + ChangePageOfTFT(page_index_last); + } + + void DgusTFT::SendtoTFT(FSTR_P const fstr/*=nullptr*/) { // A helper to print PROGMEM string to the panel + #if ACDEBUG(AC_SOME) + DEBUG_ECHOF(fstr); + #endif + PGM_P str = FTOP(fstr); + while (const char c = pgm_read_byte(str++)) TFTSer.write(c); + } + + void DgusTFT::SendtoTFTLN(FSTR_P const fstr/*=nullptr*/) { + if (fstr) { + #if ACDEBUG(AC_SOME) + DEBUG_ECHOPGM("> "); + #endif + SendtoTFT(fstr); + #if ACDEBUG(AC_SOME) + SERIAL_EOL(); + #endif + } + TFTSer.println(); + } + + void DgusTFT::SendValueToTFT(const uint16_t value, const uint16_t address) { + uint8_t data[] = { 0x5A, 0xA5, 0x05, 0x82, uint8_t(address >> 8), uint8_t(address & 0xFF), uint8_t(value >> 8), uint8_t(value & 0xFF) }; + LOOP_L_N(i, COUNT(data)) TFTSer.write(data[i]); + } + + void DgusTFT::RequestValueFromTFT(const uint16_t address) { + uint8_t data[] = { 0x5A, 0xA5, 0x04, 0x83, uint8_t(address >> 8), uint8_t(address & 0xFF), 0x01 }; + LOOP_L_N(i, COUNT(data)) TFTSer.write(data[i]); + } + + void DgusTFT::SendTxtToTFT(const char *pdata, const uint16_t address) { + uint8_t data_len = strlen(pdata); + uint8_t data[] = { 0x5A, 0xA5, uint8_t(data_len + 5), 0x82, uint8_t(address >> 8), uint8_t(address & 0xFF) }; + LOOP_L_N(i, COUNT(data)) TFTSer.write(data[i]); + LOOP_L_N(i, data_len) TFTSer.write(pdata[i]); + TFTSer.write(0xFF); TFTSer.write(0xFF); + } + + void DgusTFT::SendColorToTFT(const uint16_t color, const uint16_t address) { + uint8_t data[] = { 0x5A, 0xA5, 0x05, 0x82, uint8_t(address >> 8), uint8_t(address & 0xFF), uint8_t(color >> 8), uint8_t(color & 0xFF) }; + LOOP_L_N(i, COUNT(data)) TFTSer.write(data[i]); + } + + void DgusTFT::SendReadNumOfTxtToTFT(const uint8_t number, const uint16_t address) { + uint8_t data[] = { 0x5A, 0xA5, 0x04, 0x83, uint8_t(address >> 8), uint8_t(address & 0xFF), number }; + LOOP_L_N(i, COUNT(data)) TFTSer.write(data[i]); + } + + void DgusTFT::ChangePageOfTFT(const uint16_t page_index, const bool no_send/*=false*/) { + #if ACDEBUG(AC_MARLIN) + DEBUG_ECHOLNPGM("ChangePageOfTFT: ", page_index); + #endif + + uint32_t data_temp = 0; + + if (lcd_info.language == CHS) { + data_temp = page_index; + } + else if (lcd_info.language == ENG) { + switch (page_index) { + case PAGE_OUTAGE_RECOVERY: + data_temp = PAGE_ENG_OUTAGE_RECOVERY; break; + case PAGE_CHS_PROBE_PREHEATING: + data_temp = PAGE_ENG_PROBE_PREHEATING; break; + case PAGE_CHS_HOMING ... PAGE_ENG_HOMING: + data_temp = page_index + 12; break; + case PAGE_CHS_PROBE_PRECHECK ... PAGE_CHS_PROBE_PRECHECK_FAILED: + data_temp = page_index + 3; break; + default: + data_temp = page_index + 120; break; + } + } + + if (!no_send) { + uint8_t data[] = { 0x5A, 0xA5, 0x07, 0x82, 0x00, 0x84, 0x5A, 0x01, uint8_t(data_temp >> 8), uint8_t(data_temp & 0xFF) }; + LOOP_L_N(i, COUNT(data)) TFTSer.write(data[i]); + } + + page_index_last_2 = page_index_last; + page_index_last = page_index_now; + page_index_now = data_temp; + + #if ACDEBUG(AC_MARLIN) + DEBUG_ECHOLNPGM("page_index_last_2: ", page_index_last_2); + DEBUG_ECHOLNPGM("page_index_last: ", page_index_last); + DEBUG_ECHOLNPGM("page_index_now: ", page_index_now); + #endif + } + + void DgusTFT::FakeChangePageOfTFT(const uint16_t page_index) { + #if ACDEBUG(AC_MARLIN) + if (page_index_saved != page_index_now) + DEBUG_ECHOLNPGM("FakeChangePageOfTFT: ", page_index); + #endif + ChangePageOfTFT(page_index, true); + } + + void DgusTFT::LcdAudioSet(const bool audio_on) { + // On: 5A A5 07 82 00 80 5A 00 00 1A + // Off: 5A A5 07 82 00 80 5A 00 00 12 + uint8_t data[] = { 0x5A, 0xA5, 0x07, 0x82, 0x00, 0x80, 0x5A, 0x00, 0x00, uint8_t(audio_on ? 0x1A : 0x12) }; + LOOP_L_N(i, 10) TFTSer.write(data[i]); + } + + bool DgusTFT::ReadTFTCommand() { + static uint8_t length = 0, cnt = 0, tft_receive_steps = 0; + uint8_t data; + + if (0 == TFTSer.available() || data_received) return false; + + data = TFTSer.read(); + + if (tft_receive_steps == 0) { + if (data != 0x5A) { + cnt = 0; + length = 0; + data_index = 0; + data_received = false; + return false; + } + + while (!TFTSer.available()) TERN_(USE_WATCHDOG, hal.watchdog_refresh()); + + data = TFTSer.read(); + // MYSERIAL.write(data ); + if (data == 0xA5) tft_receive_steps = 2; + } + else if (tft_receive_steps == 2) { + length = data; + tft_receive_steps = 3; + data_index = 0; + cnt = 0; + } + else if (tft_receive_steps == 3) { + if (data_index >= (DATA_BUF_SIZE -1)) { + #if ACDEBUG(AC_MARLIN) + DEBUG_ECHOLNPGM("lcd uart buff overflow: ", data_index); + #endif + data_index = 0; + data_received = false; + return false; + } + data_buf[data_index++] = data; + cnt++; + if (cnt >= length) { // Receive complete + tft_receive_steps = 0; + cnt = 0; + data_index = 0; + data_received = true; + return true; + } + } + + return false; + } + + #if 0 + { + //SERIAL_ECHOLNPGM("ReadTFTCommand: ", millis()); + //return -1; + + bool command_ready = false; + uint8_t data = 0; + + while (TFTSer.available() > 0 && command_len < MAX_CMND_LEN) { + data = TFTSer.read(); + if (0 == command_len) { + // if + } + + panel_command[command_len] = + if (panel_command[command_len] == '\n') { + command_ready = true; + break; + } + command_len++; + } + + if (command_ready) { + panel_command[command_len] = 0x00; + #if ACDEBUG(AC_ALL) + DEBUG_ECHOLNPGM("< panel_command ", panel_command); + #endif + #if ACDEBUG(AC_SOME) + // Ignore status request commands + uint8_t req = atoi(&panel_command[1]); + if (req > 7 && req != 20) { + DEBUG_ECHOLNPGM("> ", panel_command); + DEBUG_PRINT_PRINTER_STATE(F("printer_state: "), printer_state); + } + #endif + } + return command_ready; + } + #endif + + int8_t DgusTFT::Findcmndpos(const char * buff, const char q) { + for (int8_t pos = 0; pos < MAX_CMND_LEN; ++pos) + if (buff[pos] == q) return pos; + return -1; + } + + void DgusTFT::CheckHeaters() { + static uint32_t time_last = 0; + if (PENDING(millis(), time_last)) return; + time_last = millis() + 500; + + float temp = 0; + + #if HAS_HOTEND + // If the hotend temp is abnormal, confirm state before signalling panel + static uint8_t faultE0Duration = 0; + temp = getActualTemp_celsius(E0); + if (!WITHIN(temp, HEATER_0_MINTEMP, HEATER_0_MAXTEMP)) { + faultE0Duration++; + if (faultE0Duration >= AC_HEATER_FAULT_VALIDATION_TIME) { + SendtoTFTLN(AC_msg_nozzle_temp_abnormal); + #if ACDEBUG(AC_MARLIN) + DEBUG_ECHOLNPGM("Extruder temp abnormal! : ", temp); + #endif + faultE0Duration = 0; + } + } + #endif + + #if HAS_HEATED_BED + static uint8_t faultBedDuration = 0; + temp = getActualTemp_celsius(BED); + if (!WITHIN(temp, BED_MINTEMP, BED_MAXTEMP)) { + faultBedDuration++; + if (faultBedDuration >= AC_HEATER_FAULT_VALIDATION_TIME) { + SendtoTFTLN(AC_msg_bed_temp_abnormal); + #if ACDEBUG(AC_MARLIN) + DEBUG_ECHOLNPGM("Bed temp abnormal! : ", temp); + #endif + faultBedDuration = 0; + } + } + #endif + + #if 0 + // Update panel with hotend heater status + if (hotend_state != AC_heater_temp_reached) { + if (WITHIN(getActualTemp_celsius(E0) - getTargetTemp_celsius(E0), -1, 1)) { + SendtoTFTLN(AC_msg_nozzle_heating_done); + hotend_state = AC_heater_temp_reached; + } + } + + // Update panel with bed heater status + if (hotbed_state != AC_heater_temp_reached) { + if (WITHIN(getActualTemp_celsius(BED) - getTargetTemp_celsius(BED), -0.5, 0.5)) { + SendtoTFTLN(AC_msg_bed_heating_done); + hotbed_state = AC_heater_temp_reached; + } + } + #endif + } + + void DgusTFT::SendFileList(int8_t startindex) { + // Respond to panel request for 4 files starting at index + #if ACDEBUG(AC_INFO) + DEBUG_ECHOLNPGM("## SendFileList ## ", startindex); + #endif + filenavigator.getFiles(startindex); + } + + void DgusTFT::SelectFile() { + strncpy(selectedfile, panel_command + 4, command_len - 4); + selectedfile[command_len - 5] = '\0'; + #if ACDEBUG(AC_FILE) + DEBUG_ECHOLNPGM(" Selected File: ", selectedfile); + #endif + switch (selectedfile[0]) { + case '/': // Valid file selected + SendtoTFTLN(AC_msg_sd_file_open_success); + break; + case '<': // .. (go up folder level) + filenavigator.upDIR(); + SendtoTFTLN(AC_msg_sd_file_open_failed); + SendFileList(0); + break; + default: // enter sub folder + filenavigator.changeDIR(selectedfile); + SendtoTFTLN(AC_msg_sd_file_open_failed); + SendFileList(0); + break; + } + } + + void DgusTFT::ProcessPanelRequest() { + uint16_t control_index = 0; + uint32_t control_value; + uint16_t temp; + char str_buf[20]; + + if (data_received) { + data_received = false; + + if (0x83 == data_buf[0]) { + control_index = uint16_t(data_buf[1] << 8) | uint16_t(data_buf[2]); + if (control_index == KEY_ADDRESS) { // is KEY + //key_index = control_index; + key_value = (uint16_t(data_buf[4]) << 8) | uint16_t(data_buf[5]); + } + + #if HAS_HOTEND + else if (control_index == TXT_HOTEND_TARGET || control_index == TXT_ADJUST_HOTEND) { // hotend target temp + control_value = (uint16_t(data_buf[4]) << 8) | uint16_t(data_buf[5]); + temp = constrain(uint16_t(control_value), 0, HEATER_0_MAXTEMP); + setTargetTemp_celsius(temp, E0); + //sprintf(str_buf,"%u/%u", (uint16_t)thermalManager.degHotend(0), uint16_t(control_value)); + //SendTxtToTFT(str_buf, TXT_PRINT_HOTEND); + } + #endif + + #if HAS_HEATED_BED + else if (control_index == TXT_BED_TARGET || control_index == TXT_ADJUST_BED) {// bed target temp + control_value = (uint16_t(data_buf[4]) << 8) | uint16_t(data_buf[5]); + temp = constrain(uint16_t(control_value), 0, BED_MAXTEMP); + setTargetTemp_celsius(temp, BED); + //sprintf(str_buf,"%u/%u", uint16_t(thermalManager.degBed()), uint16_t(control_value)); + //SendTxtToTFT(str_buf, TXT_PRINT_BED); + } + #endif + + #if HAS_FAN + else if (control_index == TXT_FAN_SPEED_TARGET) { // fan speed + control_value = (uint16_t(data_buf[4]) << 8) | uint16_t(data_buf[5]); + temp = constrain(uint16_t(control_value), 0, 100); + SendValueToTFT(temp, TXT_FAN_SPEED_NOW); + SendValueToTFT(temp, TXT_FAN_SPEED_TARGET); + setTargetFan_percent(temp, FAN0); + } + #endif + + else if (control_index == TXT_PRINT_SPEED_TARGET || control_index == TXT_ADJUST_SPEED) { // print speed + control_value = (uint16_t(data_buf[4]) << 8) | uint16_t(data_buf[5]); + const uint16_t feedrate = constrain(uint16_t(control_value), 40, 999); + //feedrate_percentage=constrain(control_value,40,999); + sprintf(str_buf, "%u", feedrate); + SendTxtToTFT(str_buf, TXT_PRINT_SPEED); + SendValueToTFT(feedrate, TXT_PRINT_SPEED_NOW); + SendValueToTFT(feedrate, TXT_PRINT_SPEED_TARGET); + setFeedrate_percent(feedrate); + } + + else if (control_index == REG_LCD_READY) { + control_value = (uint32_t(data_buf[3]) << 16) | (uint32_t(data_buf[4]) << 8) | uint32_t(data_buf[5]); + if (control_value == 0x010072) { // startup last gif + LcdAudioSet(lcd_info.audio_on); + + SendValueToTFT(2, ADDRESS_MOVE_DISTANCE); + + #if ENABLED(CASE_LIGHT_ENABLE) + SendValueToTFT(getCaseLightState(), ADDRESS_SYSTEM_LED_STATUS); + SendValueToTFT(getCaseLightState(), ADDRESS_PRINT_SETTING_LED_STATUS); + #endif + + #if ENABLED(POWER_LOSS_RECOVERY) + const bool is_outage = AC_printer_resuming_from_power_outage == printer_state; + if (is_outage) { + ChangePageOfTFT(PAGE_OUTAGE_RECOVERY); + #if ENABLED(LONG_FILENAME_HOST_SUPPORT) + char filename[64] = { '\0' }; + card.getLongPath(filename, recovery.info.sd_filename); + SendTxtToTFT(filename, TXT_OUTAGE_RECOVERY_FILE); + #else + SendTxtToTFT(recovery.info.sd_filename, TXT_OUTAGE_RECOVERY_FILE); + #endif + PlayTune(BEEPER_PIN, SOS, 1); + } + #else + constexpr bool is_outage = false; + #endif + + if (!is_outage) ChangePageOfTFT(PAGE_MAIN); + + } + else if (control_value == 0x010000) { // startup first gif + PlayTune(BEEPER_PIN, Anycubic_PowerOn, 1); // takes 3500 ms + } + } + + /* + else if ((control_index & 0xF000) == 0x2000) { // is TXT ADDRESS + tft_txt_index = control_index; + j = 0; + for (i = 4; ;i++) { + tft_txt_buf[j] = data_buf[i]; + if (tft_txt_buf[j] == 0xFF) { + tft_txt_buf[j] = 0; + break; + } + j++; + } + } + */ + } + else if (data_buf[0] == 0x82) { + // send_cmd_to_pc(cmd ,start ); + } + } + } + + #if 0 + { + // Break these up into logical blocks // as its easier to navigate than one huge switch case! + int8_t req = atoi(&panel_command[1]); + + // Information requests A0 - A8 and A33 + if (req <= 8 || req == 33) PanelInfo(req); + + // Simple Actions A9 - A28 + else if (req <= 28) PanelAction(req); + + // Process Initiation + else if (req <= 34) PanelProcess(req); + + else SendtoTFTLN(); + } + #endif + + void DgusTFT::set_language(language_t language) { + lcd_info.language = ui_language = lcd_info_back.language = language; + } + + void DgusTFT::toggle_language() { + lcd_info.language = ui_language = (lcd_info.language == CHS ? ENG : CHS); + } + + void DgusTFT::goto_system_page() { + ChangePageOfTFT(lcd_info.language == CHS + ? (lcd_info.audio_on ? PAGE_SYSTEM_CHS_AUDIO_ON : PAGE_SYSTEM_CHS_AUDIO_OFF) + : (lcd_info.audio_on ? 11 : 50) // PAGE_SYSTEM_ENG_AUDIO_ON/OFF - 120 + ); + } + + void DgusTFT::toggle_audio() { + lcd_info.audio_on = !lcd_info.audio_on; + goto_system_page(); + LcdAudioSet(lcd_info.audio_on); + } + + void DgusTFT::store_changes() { + if (lcd_info_back.language != lcd_info.language || lcd_info_back.audio_on != lcd_info.audio_on) { + lcd_info_back = lcd_info; + injectCommands(F("M500")); + } + } + + #if HAS_HOTEND + void DgusTFT::send_temperature_hotend(uint32_t addr) { + char str_buf[16]; + sprintf(str_buf, "%u/%u", uint16_t(getActualTemp_celsius(E0)), uint16_t(getTargetTemp_celsius(E0))); + SendTxtToTFT(str_buf, addr); + } + #endif + + #if HAS_HEATED_BED + void DgusTFT::send_temperature_bed(uint32_t addr) { + char str_buf[16]; + sprintf(str_buf, "%u/%u", uint16_t(getActualTemp_celsius(BED)), uint16_t(getTargetTemp_celsius(BED))); + SendTxtToTFT(str_buf, addr); + } + #endif + + void DgusTFT::page1() { + #if ACDEBUG(AC_ALL) + if (page_index_saved != page_index_now || key_value_saved != key_value) { + DEBUG_ECHOLNPGM("page1 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now, " key: ", key_value); + page_index_saved = page_index_now; + key_value_saved = key_value; + } + #endif + + switch (key_value) { + case 0: break; + + case 1: { // main page, print + lcd_txtbox_page = 0; + if (lcd_txtbox_index) { + set_descript_color(COLOR_BLUE); + lcd_txtbox_index = 0; + } + ChangePageOfTFT(PAGE_FILE); + SendFileList(0); + } break; + + case 2: { // tool + ChangePageOfTFT(PAGE_TOOL); + #if ENABLED(CASE_LIGHT_ENABLE) + SendValueToTFT(getCaseLightState(), ADDRESS_SYSTEM_LED_STATUS); + #endif + } break; + + case 3: // prepare + ChangePageOfTFT(PAGE_PREPARE); + break; + + case 4: // system + goto_system_page(); + break; + } + + #if 0 + if (message_index < 30) { + SendTxtToTFT(p_mesage[message_index], TXT_MAIN_MESSAGE); + message_index = 30; + } + #endif + + #if HAS_HOTEND || HAS_HEATED_BED + static millis_t flash_time = 0; + const millis_t ms = millis(); + if (PENDING(ms, flash_time)) return; + flash_time = ms + 1500; + + TERN_(HAS_HOTEND, send_temperature_hotend(TXT_PREHEAT_HOTEND)); + TERN_(HAS_HEATED_BED, send_temperature_bed(TXT_PREHEAT_BED)); + #endif + } + + void DgusTFT::page2() { + #if ACDEBUG(AC_ALL) + if ((page_index_saved != page_index_now) || (key_value_saved != key_value)) { + DEBUG_ECHOLNPGM("page2 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now, " key: ", key_value); + page_index_saved = page_index_now; + key_value_saved = key_value; + } + #endif + char file_index = 0; + + switch (key_value) { + case 0: break; + + case 1: // return + ChangePageOfTFT(PAGE_MAIN); + set_descript_color(COLOR_BLUE); + break; + + case 2: // page up + if (lcd_txtbox_page > 0) { + lcd_txtbox_page--; + + set_descript_color(COLOR_BLUE); + lcd_txtbox_index = 0; + + SendFileList(lcd_txtbox_page * 5); + } + break; + + case 3: // page down + if ((lcd_txtbox_page + 1) * 5 < filenavigator.getFileNum()) { + lcd_txtbox_page++; + + set_descript_color(COLOR_BLUE); + lcd_txtbox_index = 0; + + SendFileList(lcd_txtbox_page * 5); + } + break; + + case 4: // page refresh + if (!isMediaInserted()) safe_delay(500); + + filenavigator.reset(); + + lcd_txtbox_page = 0; + if (lcd_txtbox_index) { + set_descript_color(COLOR_BLUE); + lcd_txtbox_index = 0; + } + SendFileList(lcd_txtbox_index); + break; + + case 5: // resume of outage(last power off) + #if ACDEBUG(AC_MARLIN) + DEBUG_PRINT_PRINTER_STATE(F("printer_state: "), printer_state); + #endif + if (lcd_txtbox_index > 0 && lcd_txtbox_index < 6) { // 1~5 + + if (filenavigator.filelist.seek(lcd_txtbox_page * 5 + (lcd_txtbox_index - 1))) { + + set_descript_color(COLOR_BLUE); + + TERN_(CASE_LIGHT_ENABLE, setCaseLightState(true)); + + char str_buf[20]; + strncpy_P(str_buf, filenavigator.filelist.longFilename(), 17); + str_buf[17] = '\0'; + SendTxtToTFT(str_buf, TXT_PRINT_NAME); + + #if ENABLED(POWER_LOSS_RECOVERY) + if (printer_state == AC_printer_resuming_from_power_outage) { + // Need to home here to restore the Z position + //injectCommands_P(AC_cmnd_power_loss_recovery); + //SERIAL_ECHOLNPGM("start resuming from power outage: ", AC_cmnd_power_loss_recovery); + ChangePageOfTFT(PAGE_STATUS2); // show pause + injectCommands(F("M1000")); // home and start recovery + } + #endif + } + } + break; + + case 6: // start print + if (lcd_txtbox_index > 0 && lcd_txtbox_index < 6) { // 1~5 + + if (filenavigator.filelist.seek(lcd_txtbox_page * 5 + lcd_txtbox_index - 1)) { + #if 0 + SERIAL_ECHOLNPGM("start print: ", lcd_txtbox_page * 5 + (lcd_txtbox_index - 1)); + SERIAL_ECHOLNPGM("start print: ", filenavigator.filelist.shortFilename()); + SERIAL_ECHOLNPGM("start print: ", filenavigator.filelist.longFilename()); + #endif + + set_descript_color(COLOR_BLUE); + + // Allows printer to restart the job if we don't want to recover + if (printer_state == AC_printer_resuming_from_power_outage) { + injectCommands(F("M1000 C")); // Cancel recovery + printer_state = AC_printer_idle; + } + + TERN_(CASE_LIGHT_ENABLE, setCaseLightState(true)); + printFile(filenavigator.filelist.shortFilename()); + + char str_buf[20]; + strncpy_P(str_buf, filenavigator.filelist.longFilename(), 17); + str_buf[17] = '\0'; + SendTxtToTFT(str_buf, TXT_PRINT_NAME); + + sprintf(str_buf, "%5.2f", getFeedrate_percent()); + SendTxtToTFT(str_buf, TXT_PRINT_SPEED); + + sprintf(str_buf, "%u", uint16_t(getProgress_percent())); + SendTxtToTFT(str_buf, TXT_PRINT_PROGRESS); + + uint32_t time = 0; + sprintf(str_buf, "%s H ", utostr3(time / 60)); + sprintf(str_buf + strlen(str_buf), "%s M", utostr3(time % 60)); + SendTxtToTFT(str_buf, TXT_PRINT_TIME); + + ChangePageOfTFT(PAGE_STATUS2); + } + } + break; + + case 7: // txtbox 1 click + case 8: // txtbox 2 click + case 9: // txtbox 3 click + case 10: // txtbox 4 click + + case 11: { // txtbox 5 click + static uint8_t lcd_txtbox_index_last = 0; + + lcd_txtbox_index = key_value - 6; + + // lcd_txtbox_page 0~... + // lcd_txtbox_index 1~5 + file_index = lcd_txtbox_page * 5 + (lcd_txtbox_index - 1); + if (file_index < filenavigator.getFileNum()) { + + set_descript_color(COLOR_RED); + + if (lcd_txtbox_index_last && lcd_txtbox_index_last != lcd_txtbox_index) // 1~5 + set_descript_color(COLOR_BLUE, lcd_txtbox_index_last); + lcd_txtbox_index_last = lcd_txtbox_index; + } + } break; + } + } + + void DgusTFT::page3() { + #if ACDEBUG(AC_ALL) + if ((page_index_saved != page_index_now) || (key_value_saved != key_value)) { + DEBUG_ECHOLNPGM("page3 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now, " key: ", key_value); + page_index_saved = page_index_now; + key_value_saved = key_value; + } + #endif + + static millis_t flash_time = 0; + const millis_t ms = millis(); + char str_buf[20]; + static uint8_t progress_last = 0; + + switch (key_value) { + case 0: break; + + case 1: // return + if (!isPrintingFromMedia()) // only idle status can return + ChangePageOfTFT(PAGE_FILE); + break; + + case 2: // resume print + #if ACDEBUG(AC_MARLIN) + DEBUG_PRINT_PRINTER_STATE(F("printer_state: "), printer_state); + DEBUG_PRINT_PAUSED_STATE(F("pause_state :"), pause_state); + #endif + if ( pause_state == AC_paused_idle + || pause_state == AC_paused_filament_lack + || printer_state == AC_printer_resuming_from_power_outage + ) { + printer_state = AC_printer_idle; + pause_state = AC_paused_idle; + resumePrint(); + ChangePageOfTFT(PAGE_STATUS2); // show pause print + flash_time = ms + 1500; + } + else + setUserConfirmed(); + break; + + case 3: // print stop + if (isPrintingFromMedia()) + ChangePageOfTFT(PAGE_STOP_CONF); + break; + + case 4: // print change param + ChangePageOfTFT(PAGE_ADJUST); + TERN_(CASE_LIGHT_ENABLE, SendValueToTFT(getCaseLightState(), ADDRESS_PRINT_SETTING_LED_STATUS)); + TERN_(HAS_HOTEND, SendValueToTFT(uint16_t(getTargetTemp_celsius(E0)), TXT_ADJUST_HOTEND)); + TERN_(HAS_HEATED_BED, SendValueToTFT(uint16_t(getTargetTemp_celsius(BED)), TXT_ADJUST_BED)); + feedrate_back = getFeedrate_percent(); + SendValueToTFT(uint16_t(feedrate_back), TXT_ADJUST_SPEED); + flash_time = ms + 1500; + break; + } + + if (PENDING(ms, flash_time)) return; + flash_time = ms + 1500; + + if (feedrate_back != getFeedrate_percent()) { + if (getFeedrate_percent() != 0) + sprintf(str_buf, "%5.2f", getFeedrate_percent()); + else + sprintf(str_buf, "%d", feedrate_back); + + #if ACDEBUG(AC_MARLIN) + DEBUG_ECHOLNPGM("print speed: ", str_buf); + DEBUG_ECHOLNPGM("feedrate_back: ", feedrate_back); + #endif + SendTxtToTFT(str_buf, TXT_PRINT_SPEED); + feedrate_back = getFeedrate_percent(); + } + + if (progress_last != getProgress_percent()) { + sprintf(str_buf, "%u", getProgress_percent()); + SendTxtToTFT(str_buf, TXT_PRINT_PROGRESS); + progress_last = getProgress_percent(); + } + + // Get Printing Time + uint32_t time = getProgress_seconds_elapsed() / 60; + sprintf(str_buf, "%s H ", utostr3(time / 60)); + sprintf(str_buf + strlen(str_buf), "%s M", utostr3(time % 60)); + SendTxtToTFT(str_buf, TXT_PRINT_TIME); + + TERN_(HAS_HOTEND, send_temperature_hotend(TXT_PRINT_HOTEND)); + TERN_(HAS_HEATED_BED, send_temperature_bed(TXT_PRINT_BED)); + } + + void DgusTFT::page4() { + #if ACDEBUG(AC_ALL) + if ((page_index_saved != page_index_now) || (key_value_saved != key_value)) { + DEBUG_ECHOLNPGM("page4 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now, " key: ", key_value); + page_index_saved = page_index_now; + key_value_saved = key_value; + } + #endif + + char str_buf[20]; + static uint8_t progress_last = 0; + + switch (key_value) { + case 0: break; + + case 1: // return + if (!isPrintingFromMedia()) // only is idle status can return + ChangePageOfTFT(PAGE_FILE); + break; + + case 2: // print pause + if (isPrintingFromMedia()) { + pausePrint(); + printer_state = AC_printer_pausing; + pause_state = AC_paused_idle; + ChangePageOfTFT(PAGE_WAIT_PAUSE); + //injectCommands(F("M108")); // stop waiting temperature M109 + } + break; + + case 3: // print stop + if (isPrintingFromMedia()) + ChangePageOfTFT(PAGE_STOP_CONF); + break; + + case 4: // print settings + ChangePageOfTFT(PAGE_ADJUST); + TERN_(CASE_LIGHT_ENABLE, SendValueToTFT(getCaseLightState(), ADDRESS_PRINT_SETTING_LED_STATUS)); + TERN_(HAS_HOTEND, SendValueToTFT(uint16_t(getTargetTemp_celsius(E0)), TXT_ADJUST_HOTEND)); + TERN_(HAS_HEATED_BED, SendValueToTFT(uint16_t(getTargetTemp_celsius(BED)), TXT_ADJUST_BED)); + feedrate_back = getFeedrate_percent(); + SendValueToTFT((uint16_t)feedrate_back, TXT_ADJUST_SPEED); + TERN_(HAS_FAN, SendValueToTFT(uint16_t(getActualFan_percent(FAN0)), TXT_FAN_SPEED_TARGET)); + str_buf[0] = 0; + strcat(str_buf, ftostr52sprj(getZOffset_mm()) + 3); + SendTxtToTFT(str_buf, TXT_LEVEL_OFFSET); + //SendTxtToTFT(ftostr52sprj(getZOffset_mm()), TXT_LEVEL_OFFSET); + RequestValueFromTFT(TXT_ADJUST_SPEED); // attempt to make feedrate visible on visit to this page + break; + } + + static millis_t flash_time = 0; + const millis_t ms = millis(); + if (PENDING(ms, flash_time)) return; + flash_time = ms + 1500; + + if (feedrate_back != getFeedrate_percent()) { + if (getFeedrate_percent() != 0) + sprintf(str_buf, "%5.2f", getFeedrate_percent()); + else + sprintf(str_buf, "%d", feedrate_back); + + SendTxtToTFT(str_buf, TXT_PRINT_SPEED); + feedrate_back = getFeedrate_percent(); + } + + if (progress_last != getProgress_percent()) { + sprintf(str_buf, "%u", getProgress_percent()); + SendTxtToTFT(str_buf, TXT_PRINT_PROGRESS); + progress_last = getProgress_percent(); + } + + uint32_t time = getProgress_seconds_elapsed() / 60; + sprintf(str_buf, "%s H ", utostr3(time / 60)); + sprintf(str_buf + strlen(str_buf), "%s M", utostr3(time % 60)); + SendTxtToTFT(str_buf, TXT_PRINT_TIME); + + TERN_(HAS_HOTEND, send_temperature_hotend(TXT_PRINT_HOTEND)); + TERN_(HAS_HEATED_BED, send_temperature_bed(TXT_PRINT_BED)); + } + + void DgusTFT::page5() { // print settings + #if ACDEBUG(AC_ALL) + if ((page_index_saved != page_index_now) || (key_value_saved != key_value)) { + DEBUG_ECHOLNPGM("page5 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now, " key: ", key_value); + page_index_saved = page_index_now; + key_value_saved = key_value; + } + #endif + static bool z_change = false; + + switch (key_value) { + case 0: break; + + case 1: // return + if (AC_printer_printing == printer_state) + ChangePageOfTFT(PAGE_STATUS2); // show pause + else if (AC_printer_paused == printer_state) + ChangePageOfTFT(PAGE_STATUS1); // show print + break; + + #if ENABLED(MESH_EDIT_MENU) + + case 2: { // - + float z_off = getZOffset_mm(); + //SERIAL_ECHOLNPGM("z_off: ", z_off); + //setSoftEndstopState(false); + if (z_off <= -5) return; + z_off -= 0.05f; + setZOffset_mm(z_off); + + char str_buf[10]; + str_buf[0] = 0; + strcat(str_buf, ftostr52sprj(getZOffset_mm()) + 2); + SendTxtToTFT(str_buf, TXT_LEVEL_OFFSET); + //SendTxtToTFT(ftostr52sprj(getZOffset_mm()), TXT_LEVEL_OFFSET); + + //if (isAxisPositionKnown(Z)) { // Move Z axis + // SERIAL_ECHOLNPGM("Z now:", getAxisPosition_mm(Z)); + // const float currZpos = getAxisPosition_mm(Z); + // setAxisPosition_mm(currZpos-0.05, Z); + // SERIAL_ECHOLNPGM("Z now:", getAxisPosition_mm(Z)); + //} + + #if ENABLED(BABYSTEPPING) + int16_t steps = mmToWholeSteps(-0.05, Z); + babystepAxis_steps(steps, Z); + #endif + + GRID_LOOP(x, y) { + const xy_uint8_t pos { x, y }; + const float currval = getMeshPoint(pos); + #if ACDEBUG(AC_MARLIN) + DEBUG_ECHOLNPGM("x: ", x, " y: ", y, " z: ", currval); + #endif + setMeshPoint(pos, constrain(currval - 0.05f, AC_LOWEST_MESHPOINT_VAL, 5)); + } + + z_change = true; + + //setSoftEndstopState(true); + } break; + + case 3: { // + + float z_off = getZOffset_mm(); + //SERIAL_ECHOLNPGM("z_off: ", z_off); + //setSoftEndstopState(false); + + if (z_off >= 5) return; + z_off += 0.05f; + setZOffset_mm(z_off); + + char str_buf[10]; + str_buf[0] = '\0'; + strcat(str_buf, ftostr52sprj(getZOffset_mm()) + 2); + SendTxtToTFT(str_buf, TXT_LEVEL_OFFSET); + //SendTxtToTFT(ftostr52sprj(getZOffset_mm()), TXT_LEVEL_OFFSET); + + //int16_t steps = mmToWholeSteps(constrain(Zshift,-0.05,0.05), Z); + + /* + if (isAxisPositionKnown(Z)) { // Move Z axis + SERIAL_ECHOLNPGM("Z now:", getAxisPosition_mm(Z)); + const float currZpos = getAxisPosition_mm(Z); + setAxisPosition_mm(currZpos-0.05, Z); + SERIAL_ECHOLNPGM("Z now:", getAxisPosition_mm(Z)); + } + */ + + #if ENABLED(BABYSTEPPING) + int16_t steps = mmToWholeSteps(0.05, Z); + babystepAxis_steps(steps, Z); + #endif + + GRID_LOOP(x, y) { + const xy_uint8_t pos { x, y }; + const float currval = getMeshPoint(pos); + //SERIAL_ECHOLNPGM("x: ", x, " y: ", y, " z: ", currval); + setMeshPoint(pos, constrain(currval + 0.05f, AC_LOWEST_MESHPOINT_VAL, 5)); + } + + z_change = true; + + //setSoftEndstopState(true); + } break; + + #endif // MESH_EDIT_MENU + + #if ENABLED(CASE_LIGHT_ENABLE) + case 4: { // light control + const bool cls = !getCaseLightState(); + SendValueToTFT(cls, ADDRESS_PRINT_SETTING_LED_STATUS); + setCaseLightState(cls); + } break; + #endif + + case 5: + ChangePageOfTFT(PAGE_DONE); + break; + + case 6: break; + + case 7: + TERN_(HAS_HEATED_BED, RequestValueFromTFT(TXT_ADJUST_BED)); + RequestValueFromTFT(TXT_ADJUST_SPEED); + TERN_(HAS_HOTEND, RequestValueFromTFT(TXT_ADJUST_HOTEND)); + TERN_(HAS_FAN, RequestValueFromTFT(TXT_FAN_SPEED_TARGET)); + + if (z_change == true) { + injectCommands(F("M500")); + z_change = false; + } + + if (AC_printer_printing == printer_state) + ChangePageOfTFT(PAGE_STATUS2); // show pause + else if (AC_printer_paused == printer_state) + ChangePageOfTFT(PAGE_STATUS1); // show print + + break; + } + } + + void DgusTFT::page6() { + #if ACDEBUG(AC_ALL) + if ((page_index_saved != page_index_now) || (key_value_saved != key_value)) { + DEBUG_ECHOLNPGM("page6 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now, " key: ", key_value); + page_index_saved = page_index_now; + key_value_saved = key_value; + } + #endif + switch (key_value) { + case 0: break; + case 1: break; + } + } + + void DgusTFT::page7() { // tools + #if ACDEBUG(AC_ALL) + if ((page_index_saved != page_index_now) || (key_value_saved != key_value)) { + DEBUG_ECHOLNPGM("page7 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now, " key: ", key_value); + page_index_saved = page_index_now; + key_value_saved = key_value; + } + #endif + switch (key_value) { + case 0: break; + + case 1: // return + ChangePageOfTFT(PAGE_MAIN); + break; + + case 2: + ChangePageOfTFT(PAGE_MOVE); + break; + + case 3: // set temperature + ChangePageOfTFT(PAGE_TEMP); + #if HAS_HOTEND + SendValueToTFT(uint16_t(getActualTemp_celsius(E0)), TXT_HOTEND_NOW); + SendValueToTFT(uint16_t(getTargetTemp_celsius(E0)), TXT_HOTEND_TARGET); + #endif + #if HAS_HEATED_BED + SendValueToTFT(uint16_t(getActualTemp_celsius(BED)), TXT_BED_NOW); + SendValueToTFT(uint16_t(getTargetTemp_celsius(BED)), TXT_BED_TARGET); + #endif + break; + + case 4: + ChangePageOfTFT(PAGE_SPEED); + #if HAS_FAN + SendValueToTFT(uint16_t(getActualFan_percent(FAN0)), TXT_FAN_SPEED_NOW); + SendValueToTFT(uint16_t(getTargetFan_percent(FAN0)), TXT_FAN_SPEED_TARGET); + #endif + SendValueToTFT(uint16_t(getFeedrate_percent()), TXT_PRINT_SPEED_NOW); + SendValueToTFT(uint16_t(getFeedrate_percent()), TXT_PRINT_SPEED_TARGET); + break; + + case 5: // turn off the xyz motor + if (!isMoving()) + stepper.disable_all_steppers(); + break; + + #if ENABLED(CASE_LIGHT_ENABLE) + case 6: { // light control + const bool cls = !getCaseLightState(); + SendValueToTFT(cls, ADDRESS_SYSTEM_LED_STATUS); + setCaseLightState(cls); + } break; + #endif + } + } + + void DgusTFT::page8() { + #if ACDEBUG(AC_ALL) + if ((page_index_saved != page_index_now) || (key_value_saved != key_value)) { + DEBUG_ECHOLNPGM("page8 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now, " key: ", key_value); + page_index_saved = page_index_now; + key_value_saved = key_value; + } + #endif + //static uint16_t movespeed = 50; + static float move_dis = 1.0f; + + if (key_value == 2 || key_value == 4 + || key_value == 6 || key_value == 8 + || key_value == 10 || (key_value == 12 && !isMoving()) + ) { + if (getAxisPosition_mm(Z) < 0) setAxisPosition_mm(0, Z, 8); + } + + // if (!planner.movesplanned())return; + switch (key_value) { + case 0: + break; + + case 1: // return + ChangePageOfTFT(PAGE_TOOL); + break; + + case 5: + if (!isMoving()) + injectCommands(F("G28 X")); + break; + + case 9: + if (!isMoving()) + injectCommands(F("G28 Y")); + break; + + case 13: + if (!isMoving()) + injectCommands(F("G28 Z")); + break; + + case 17: + if (!isMoving()) + injectCommands(F("G28")); + break; + + case 2: // X- + if (!isMoving()) + setAxisPosition_mm(getAxisPosition_mm(X) - move_dis, X, 50); + break; + + case 4: // X+ + if (!isMoving()) + setAxisPosition_mm(getAxisPosition_mm(X) + move_dis, X, 50); + break; + + case 6: // Y+ + if (!isMoving()) + setAxisPosition_mm(getAxisPosition_mm(Y) - move_dis, Y, 50); + break; + + case 8: // Y- + if (!isMoving()) + setAxisPosition_mm(getAxisPosition_mm(Y) + move_dis, Y, 50); + break; + + case 10: // Z- + if (!isMoving()) + setAxisPosition_mm(getAxisPosition_mm(Z) - move_dis, Z, 8); + break; + + case 12: // Z+ + if (!isMoving()) + setAxisPosition_mm(getAxisPosition_mm(Z) + move_dis, Z, 8); + break; + + case 3: + move_dis = 0.1f; + SendValueToTFT(1, ADDRESS_MOVE_DISTANCE); + break; + + case 7: + move_dis = 1.0f; + SendValueToTFT(2, ADDRESS_MOVE_DISTANCE); + break; + + case 11: + move_dis = 10.0f; + SendValueToTFT(3, ADDRESS_MOVE_DISTANCE); + break; + + //case 14: + // movespeed = 3000; //SERIAL_ECHOLN(movespeed); + // break; + // + //case 15: + // movespeed = 2000; //SERIAL_ECHOLN(movespeed); + // break; + // + //case 16: + // movespeed = 1000; //SERIAL_ECHOLN(movespeed); + // break; + } + } + + void DgusTFT::page9() { + #if ACDEBUG(AC_ALL) + if ((page_index_saved != page_index_now) || (key_value_saved != key_value)) { + DEBUG_ECHOLNPGM("page9 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now, " key: ", key_value); + page_index_saved = page_index_now; + key_value_saved = key_value; + } + #endif + + switch (key_value) { + case 0: break; + + case 1: // return + ChangePageOfTFT(PAGE_TOOL); + break; + + case 2: break; + case 3: break; + case 4: break; + case 5: break; + + case 6: // cooling + setTargetTemp_celsius(0, E0); + setTargetTemp_celsius(0, BED); + ChangePageOfTFT(PAGE_TOOL); + break; + + case 7: // send target temp + RequestValueFromTFT(TXT_HOTEND_TARGET); + RequestValueFromTFT(TXT_BED_TARGET); + ChangePageOfTFT(PAGE_TOOL); + break; + } + + static millis_t flash_time = 0; + const millis_t ms = millis(); + if (PENDING(ms, flash_time)) return; + flash_time = ms + 1500; + + SendValueToTFT(uint16_t(getActualTemp_celsius(E0)), TXT_HOTEND_NOW); + SendValueToTFT(uint16_t(getActualTemp_celsius(BED)), TXT_BED_NOW); + } + + void DgusTFT::page10() { + #if ACDEBUG(AC_ALL) + if ((page_index_saved != page_index_now) || (key_value_saved != key_value)) { + DEBUG_ECHOLNPGM("page10 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now, " key: ", key_value); + page_index_saved = page_index_now; + key_value_saved = key_value; + } + #endif + + switch (key_value) { + case 0: break; + case 1: // return + ChangePageOfTFT(PAGE_TOOL); + break; + + case 2: break; + case 3: break; + case 4: break; + case 5: break; + + case 6: // ok + RequestValueFromTFT(TXT_FAN_SPEED_TARGET); + RequestValueFromTFT(TXT_PRINT_SPEED_TARGET); + ChangePageOfTFT(PAGE_TOOL); + break; + } + + static millis_t flash_time = 0; + const millis_t ms = millis(); + if (PENDING(ms, flash_time)) return; + flash_time = ms + 1500; + + SendValueToTFT(uint16_t(getActualFan_percent(FAN0)), TXT_FAN_SPEED_NOW); + SendValueToTFT(uint16_t(getFeedrate_percent()), TXT_PRINT_SPEED_NOW); + } + + void DgusTFT::page11() { + #if ACDEBUG(AC_ALL) + if ((page_index_saved != page_index_now) || (key_value_saved != key_value)) { + DEBUG_ECHOLNPGM("page11 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now, " key: ", key_value); + page_index_saved = page_index_now; + key_value_saved = key_value; + } + #endif + switch (key_value) { + case 0: break; + + case 1: // return + ChangePageOfTFT(PAGE_MAIN); + store_changes(); + break; + + case 2: // language + toggle_language(); + goto_system_page(); + break; + + case 3: break; + + case 4: // audio + toggle_audio(); + break; + + case 5: { // about + char str_ver[32]; + //sprintf(str_ver, "%04d-%02d-%02d %02d:%02d:%02d\n", BUILD_YEAR, BUILD_MONTH, BUILD_DAY, BUILD_HOUR, BUILD_MIN, BUILD_SEC); + sprintf(str_ver, MAIN_BOARD_FIRMWARE_VER); + SendTxtToTFT(str_ver, TXT_VERSION); + ChangePageOfTFT(PAGE_ABOUT); + } break; + + case 6: + ChangePageOfTFT(PAGE_RECORD); + break; + } + } + + void DgusTFT::page12() { + #if ACDEBUG(AC_ALL) + if ((page_index_saved != page_index_now) || (key_value_saved != key_value)) { + DEBUG_ECHOLNPGM("page12 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now, " key: ", key_value); + page_index_saved = page_index_now; + key_value_saved = key_value; + } + #endif + switch (key_value) { + case 0: break; + case 1: // return + ChangePageOfTFT(PAGE_SYSTEM_CHS_AUDIO_ON); + break; + } + } + + void DgusTFT::page13() { + #if ACDEBUG(AC_ALL) + if ((page_index_saved != page_index_now) || (key_value_saved != key_value)) { + DEBUG_ECHOLNPGM("page13 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now, " key: ", key_value); + page_index_saved = page_index_now; + key_value_saved = key_value; + } + #endif + switch (key_value) { + case 0: break; + + case 1: // return + goto_system_page(); + break; + + case 2: break; + } + } + + void DgusTFT::page14() { + #if ACDEBUG(AC_ALL) + if ((page_index_saved != page_index_now) || (key_value_saved != key_value)) { + DEBUG_ECHOLNPGM("page14 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now, " key: ", key_value); + page_index_saved = page_index_now; + key_value_saved = key_value; + } + #endif + switch (key_value) { + case 0: break; + case 1: break; // return + case 2: break; + case 3: break; + case 4: break; + } + } + + void DgusTFT::page15() { + #if ACDEBUG(AC_ALL) + if ((page_index_saved != page_index_now) || (key_value_saved != key_value)) { + DEBUG_ECHOLNPGM("page15 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now, " key: ", key_value); + page_index_saved = page_index_now; + key_value_saved = key_value; + } + #endif + + switch (key_value) { + case 0: break; + + case 1: // return + ChangePageOfTFT(PAGE_MAIN); + break; + + case 2: + ChangePageOfTFT(PAGE_PreLEVEL); + break; + + #if HAS_HOTEND || HAS_HEATED_BED + case 3: { + ChangePageOfTFT(PAGE_PREHEAT); + TERN_(HAS_HOTEND, send_temperature_hotend(TXT_PREHEAT_HOTEND)); + TERN_(HAS_HEATED_BED, send_temperature_bed(TXT_PREHEAT_BED)); + } break; + #endif + + #if HAS_EXTRUDERS + case 4: { + send_temperature_hotend(TXT_FILAMENT_TEMP); + ChangePageOfTFT(PAGE_FILAMENT); + } break; + #endif + } + } + + void DgusTFT::page16() { // AUTO LEVELING + #if ACDEBUG(AC_ALL) + if ((page_index_saved != page_index_now) || (key_value_saved != key_value)) { + DEBUG_ECHOLNPGM("page16 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now, " key: ", key_value); + page_index_saved = page_index_now; + key_value_saved = key_value; + } + #endif + switch (key_value) { + case 0: break; + case 1: // return + ChangePageOfTFT(PAGE_PREPARE); + break; + + case 2: + if (!isPrinting()) { + //ChangePageOfTFT(PAGE_LEVEL_ENSURE); + ChangePageOfTFT(PAGE_CHS_PROBE_PRECHECK); + } + break; + + case 3: { + char str_buf[10]; + str_buf[0] = '\0'; + strcat(str_buf, ftostr52sprj(getZOffset_mm()) + 2); + SendTxtToTFT(str_buf, TXT_LEVEL_OFFSET); + //SendTxtToTFT(ftostr52sprj(getZOffset_mm()), TXT_LEVEL_OFFSET); + ChangePageOfTFT(PAGE_LEVEL_ADVANCE); + } break; + + case 4: + ChangePageOfTFT(PAGE_AUTO_OFFSET); + break; + } + } + + void DgusTFT::page17() { + #if ACDEBUG(AC_ALL) + if ((page_index_saved != page_index_now) || (key_value_saved != key_value)) { + DEBUG_ECHOLNPGM("page17 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now, " key: ", key_value); + page_index_saved = page_index_now; + key_value_saved = key_value; + } + #endif + float z_off; + switch (key_value) { + case 0: break; + + case 1: // return + ChangePageOfTFT(PAGE_PreLEVEL); + break; + + case 2: { + setSoftEndstopState(false); + if (getZOffset_mm() <= -5) return; + z_off = getZOffset_mm() - 0.01f; + setZOffset_mm(z_off); + + char str_buf[10]; + strcat(str_buf, ftostr52sprj(getZOffset_mm()) + 2); + SendTxtToTFT(str_buf, TXT_LEVEL_OFFSET); + //SendTxtToTFT(ftostr52sprj(getZOffset_mm()), TXT_LEVEL_OFFSET); + + if (isAxisPositionKnown(Z)) { + const float currZpos = getAxisPosition_mm(Z); + setAxisPosition_mm(currZpos - 0.01f, Z); + } + + setSoftEndstopState(true); + } break; + + case 3: { + setSoftEndstopState(false); + if (getZOffset_mm() >= 5) return; + z_off = getZOffset_mm() + 0.01f; + setZOffset_mm(z_off); + + char str_buf[10]; + strcat(str_buf, ftostr52sprj(getZOffset_mm()) + 2); + SendTxtToTFT(str_buf, TXT_LEVEL_OFFSET); + //SendTxtToTFT(ftostr52sprj(getZOffset_mm()), TXT_LEVEL_OFFSET); + + if (isAxisPositionKnown(Z)) { // Move Z axis + const float currZpos = getAxisPosition_mm(Z); + setAxisPosition_mm(currZpos + 0.01f, Z); + } + + setSoftEndstopState(true); + } break; + + case 4: + #if ACDEBUG(AC_MARLIN) + DEBUG_ECHOLNPGM("z off: ", ftostr52sprj(getZOffset_mm())); + #endif + #if HAS_LEVELING + GRID_LOOP(x, y) { + const xy_uint8_t pos { x, y }; + const float currval = getMeshPoint(pos); + setMeshPoint(pos, constrain(currval + getZOffset_mm(), AC_LOWEST_MESHPOINT_VAL, 5)); + } + injectCommands(F("M500")); + #endif + ChangePageOfTFT(PAGE_PREPARE); + break; + } + } + + #if HAS_HOTEND || HAS_HEATED_BED + + void DgusTFT::page18() { // preheat + #if ACDEBUG(AC_ALL) + if ((page_index_saved != page_index_now) || (key_value_saved != key_value)) { + DEBUG_ECHOLNPGM("page18 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now, " key: ", key_value); + page_index_saved = page_index_now; + key_value_saved = key_value; + } + #endif + + switch (key_value) { + case 0: break; + + case 1: // return + ChangePageOfTFT(PAGE_PREPARE); + break; + + case 2: // PLA + TERN_(HAS_HOTEND, setTargetTemp_celsius(190, E0)); + TERN_(HAS_HEATED_BED, setTargetTemp_celsius(60, BED)); + ChangePageOfTFT(PAGE_PREHEAT); + break; + + case 3: // ABS + TERN_(HAS_HOTEND, setTargetTemp_celsius(240, E0)); + TERN_(HAS_HEATED_BED, setTargetTemp_celsius(100, BED)); + ChangePageOfTFT(PAGE_PREHEAT); + break; + } + + static millis_t flash_time = 0; + const millis_t ms = millis(); + if (PENDING(ms, flash_time)) return; + flash_time = ms + 1500; + + TERN_(HAS_HOTEND, send_temperature_hotend(TXT_PREHEAT_HOTEND)); + TERN_(HAS_HEATED_BED, send_temperature_bed(TXT_PREHEAT_BED)); + } + + #endif // HAS_HOTEND || HAS_HEATED_BED + + #if HAS_EXTRUDERS + + void DgusTFT::page19() { // Filament + #if ACDEBUG(AC_ALL) + if ((page_index_saved != page_index_now) || (key_value_saved != key_value)) { + DEBUG_ECHOLNPGM("page19 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now, " key: ", key_value); + page_index_saved = page_index_now; + key_value_saved = key_value; + } + #endif + static char filament_status = 0; + static millis_t flash_time = 0; + switch (key_value) { + case 0: break; + + case 1: // return + filament_status = 0; + injectCommands(F("G90")); + ChangePageOfTFT(PAGE_PREPARE); + break; + + case 2: // Filament in + if (getActualTemp_celsius(E0) < 220) { + filament_status = 0; + ChangePageOfTFT(PAGE_FILAMENT_HEAT); + } + else { + filament_status = 1; + injectCommands(F("G91")); + } + break; + + case 3: // filament out + if (getActualTemp_celsius(E0) < 220) { + filament_status = 0; + ChangePageOfTFT(PAGE_FILAMENT_HEAT); + } + else { + filament_status = 2; + injectCommands(F("G91")); + } + break; + + case 4: // stop + filament_status = 0; + break; + + } + + const millis_t ms = millis(); + if (PENDING(ms, flash_time)) return; + flash_time = ms + 1500; + + send_temperature_hotend(TXT_FILAMENT_TEMP); + + if (!isPrinting()) { + if (filament_status == 1) { + if (canMove(E0) && !commandsInQueue()) + injectCommands_P(AC_cmnd_manual_load_filament); + } + else if (filament_status == 2) { + if (canMove(E0) && !commandsInQueue()) + injectCommands_P(AC_cmnd_manual_unload_filament); + } + } + } + + #endif // HAS_EXTRUDERS + + void DgusTFT::page20() { // confirm + #if ACDEBUG(AC_ALL) + if ((page_index_saved != page_index_now) || (key_value_saved != key_value)) { + DEBUG_ECHOLNPGM("page20 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now, " key: ", key_value); + page_index_saved = page_index_now; + key_value_saved = key_value; + } + #endif + + switch (key_value) { + case 0: break; + case 1: // return + ChangePageOfTFT(page_index_last); + break; + } + + static millis_t flash_time = 0; + const millis_t ms = millis(); + if (PENDING(ms, flash_time)) return; + flash_time = ms + 1000; + } + + void DgusTFT::page21() { + #if ACDEBUG(AC_ALL) + if ((page_index_saved != page_index_now) || (key_value_saved != key_value)) { + DEBUG_ECHOLNPGM("page21 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now, " key: ", key_value); + page_index_saved = page_index_now; + key_value_saved = key_value; + } + #endif + + switch (key_value) { + case 0: break; + + case 1: // return + ChangePageOfTFT(page_index_last); + break; + + case 2: break; + } + + static millis_t flash_time = 0; + const millis_t ms = millis(); + if (PENDING(ms, flash_time)) return; + flash_time = ms + 1000; + } + + void DgusTFT::page22() { // print finish + #if ACDEBUG(AC_ALL) + if ((page_index_saved != page_index_now) || (key_value_saved != key_value)) { + DEBUG_ECHOLNPGM("page22 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now, " key: ", key_value); + page_index_saved = page_index_now; + key_value_saved = key_value; + } + #endif + + switch (key_value) { + case 0: break; + + case 1: // OK to finish + TERN_(CASE_LIGHT_ENABLE, setCaseLightState(false)); + ChangePageOfTFT(PAGE_MAIN); + break; + + case 2: break; + } + + static millis_t flash_time = 0; + const millis_t ms = millis(); + if (PENDING(ms, flash_time)) return; + flash_time = ms + 1000; + } + + void DgusTFT::page23() { + #if ACDEBUG(AC_ALL) + if ((page_index_saved != page_index_now) || (key_value_saved != key_value)) { + DEBUG_ECHOLNPGM("page23 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now, " key: ", key_value); + page_index_saved = page_index_now; + key_value_saved = key_value; + } + #endif + + switch (key_value) { + case 0: break; + case 1: ChangePageOfTFT(page_index_last); break; // return + case 2: ChangePageOfTFT(page_index_last); break; + } + + static millis_t flash_time = 0; + const millis_t ms = millis(); + if (PENDING(ms, flash_time)) return; + flash_time = ms + 1000; + } + + void DgusTFT::page24() { + #if ACDEBUG(AC_ALL) + if ((page_index_saved != page_index_now) || (key_value_saved != key_value)) { + DEBUG_ECHOLNPGM("page24 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now, " key: ", key_value); + page_index_saved = page_index_now; + key_value_saved = key_value; + } + #endif + + switch (key_value) { + case 0: break; + case 1: ChangePageOfTFT(page_index_last); break; // return + case 2: ChangePageOfTFT(page_index_last); break; + } + + static millis_t flash_time = 0; + const millis_t ms = millis(); + if (PENDING(ms, flash_time)) return; + flash_time = ms + 1000; + } + + void DgusTFT::page25() { // lack filament + #if ACDEBUG(AC_ALL) + if ((page_index_saved != page_index_now) || (key_value_saved != key_value)) { + DEBUG_ECHOLNPGM("page25 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now, " key: ", key_value); + page_index_saved = page_index_now; + key_value_saved = key_value; + } + #endif + + switch (key_value) { + case 0: break; + + case 1: // return + #if ACDEBUG(AC_MARLIN) + DEBUG_PRINT_PRINTER_STATE(F("printer_state: "), printer_state); + DEBUG_PRINT_PAUSED_STATE(F("pause_state: "), pause_state); + #endif + if (AC_printer_printing == printer_state) + ChangePageOfTFT(PAGE_STATUS2); // show pause + else if (AC_printer_paused == printer_state) { + //injectCommands(F("M108")); + ChangePageOfTFT(PAGE_STATUS1); // show resume + } + break; + } + + static millis_t flash_time = 0; + const millis_t ms = millis(); + if (PENDING(ms, flash_time)) return; + flash_time = ms + 1000; + } + + void DgusTFT::page26() { + #if ACDEBUG(AC_ALL) + if ((page_index_saved != page_index_now) || (key_value_saved != key_value)) { + DEBUG_ECHOLNPGM("page26 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now, " key: ", key_value); + page_index_saved = page_index_now; + key_value_saved = key_value; + } + #endif + + switch (key_value) { + case 0: break; + case 1: ChangePageOfTFT(page_index_last); break; // return + case 2: break; + } + + static millis_t flash_time = 0; + const millis_t ms = millis(); + if (PENDING(ms, flash_time)) return; + flash_time = ms + 1000; + } + + void DgusTFT::page27() { + #if ACDEBUG(AC_ALL) + if ((page_index_saved != page_index_now) || (key_value_saved != key_value)) { + DEBUG_ECHOLNPGM("page27 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now, " key: ", key_value); + page_index_saved = page_index_now; + key_value_saved = key_value; + } + #endif + + switch (key_value) { + case 0: break; + + case 1: // print stop confirmed + if (isPrintingFromMedia()) { + printer_state = AC_printer_stopping; + stopPrint(); + message_index = 6; + ChangePageOfTFT(PAGE_MAIN); + } + else { + if (printer_state == AC_printer_resuming_from_power_outage) + injectCommands(F("M1000 C")); // Cancel recovery + printer_state = AC_printer_idle; + } + break; + + case 2: // return + if (AC_printer_printing == printer_state) + ChangePageOfTFT(PAGE_STATUS2); // show pause + else if (AC_printer_paused == printer_state) + ChangePageOfTFT(PAGE_STATUS1); // show print + break; + } + + static millis_t flash_time = 0; + const millis_t ms = millis(); + if (PENDING(ms, flash_time)) return; + flash_time = ms + 1000; + } + + void DgusTFT::page28() { + #if ACDEBUG(AC_ALL) + if ((page_index_saved != page_index_now) || (key_value_saved != key_value)) { + DEBUG_ECHOLNPGM("page28 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now, " key: ", key_value); + page_index_saved = page_index_now; + key_value_saved = key_value; + } + #endif + + switch (key_value) { + case 0: break; + case 1: ChangePageOfTFT(page_index_last); break; // return + case 2: break; + } + + static millis_t flash_time = 0; + const millis_t ms = millis(); + if (PENDING(ms, flash_time)) return; + flash_time = ms + 1000; + } + + void DgusTFT::page29() { + #if ACDEBUG(AC_ALL) + if ((page_index_saved != page_index_now) || (key_value_saved != key_value)) { + DEBUG_ECHOLNPGM("page29 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now, " key: ", key_value); + page_index_saved = page_index_now; + key_value_saved = key_value; + } + #endif + + switch (key_value) { + case 0: break; + + case 1: // return + TERN_(CASE_LIGHT_ENABLE, setCaseLightState(false)); + ChangePageOfTFT(PAGE_MAIN); + break; + + case 2: break; + } + + static millis_t flash_time = 0; + const millis_t ms = millis(); + if (PENDING(ms, flash_time)) return; + flash_time = ms + 1000; + } + + void DgusTFT::page30() { // Auto heat filament + #if ACDEBUG(AC_ALL) + if ((page_index_saved != page_index_now) || (key_value_saved != key_value)) { + DEBUG_ECHOLNPGM("page30 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now, " key: ", key_value); + page_index_saved = page_index_now; + key_value_saved = key_value; + } + #endif + + switch (key_value) { + case 0: break; + + case 1: // return + setTargetTemp_celsius(230, E0); + ChangePageOfTFT(PAGE_FILAMENT); + break; + } + + static millis_t flash_time = 0; + const millis_t ms = millis(); + if (PENDING(ms, flash_time)) return; + flash_time = ms + 1000; + } + + void DgusTFT::page31() { + #if ACDEBUG(AC_ALL) + if ((page_index_saved != page_index_now) || (key_value_saved != key_value)) { + DEBUG_ECHOLNPGM("page31 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now, " key: ", key_value); + page_index_saved = page_index_now; + key_value_saved = key_value; + } + #endif + + switch (key_value) { + case 0: break; + case 1: break; // return + case 2: break; + } + + static millis_t flash_time = 0; + const millis_t ms = millis(); + if (PENDING(ms, flash_time)) return; + flash_time = ms + 1000; + } + + void DgusTFT::page32() { + #if ACDEBUG(AC_ALL) + if ((page_index_saved != page_index_now) || (key_value_saved != key_value)) { + DEBUG_ECHOLNPGM("page32 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now); + page_index_saved = page_index_now; + key_value_saved = key_value; + } + #endif + + static millis_t flash_time = 0; + const millis_t ms = millis(); + if (PENDING(ms, flash_time)) return; + flash_time = ms + 1000; + } + + #if HAS_LEVELING + + void DgusTFT::page33() { + #if ACDEBUG(AC_ALL) + if (page_index_saved != page_index_now) { + DEBUG_ECHOLNPGM("page33 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now, " key: ", key_value); + page_index_saved = page_index_now; + } + #endif + + switch (key_value) { + case 0: break; + + case 1: // auto leveling start + injectCommands(F("G28\nG29")); + printer_state = AC_printer_probing; + + // this will cause leveling->preheating->leveling + #if 0 + #if ENABLED(PREHEAT_BEFORE_LEVELING) + if (getTargetTemp_celsius(E0) < LEVELING_NOZZLE_TEMP + || getTargetTemp_celsius(BED) < LEVELING_BED_TEMP + ) { + setTargetTemp_celsius(LEVELING_NOZZLE_TEMP, E0); + setTargetTemp_celsius(LEVELING_BED_TEMP, BED); + ChangePageOfTFT(PAGE_CHS_PROBE_PREHEATING); + } + else + ChangePageOfTFT(PAGE_LEVELING); + + #else + ChangePageOfTFT(PAGE_LEVELING); + #endif + #endif + + ChangePageOfTFT(PAGE_LEVELING); + break; + + case 2: + ChangePageOfTFT(PAGE_PreLEVEL); + break; + } + + static millis_t flash_time = 0; + const millis_t ms = millis(); + if (PENDING(ms, flash_time)) return; + flash_time = ms + 1500; + } + + void DgusTFT::page34() { + #if ACDEBUG(AC_ALL) + if ((page_index_saved != page_index_now) || (key_value_saved != key_value)) { + DEBUG_ECHOLNPGM("page34 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now); + page_index_saved = page_index_now; + key_value_saved = key_value; + } + #endif + + #if HAS_HOTEND || HAS_HEATED_BED + static millis_t flash_time = 0; + const millis_t ms = millis(); + if (PENDING(ms, flash_time)) return; + flash_time = ms + 1500; + + TERN_(HAS_HOTEND, send_temperature_hotend(TXT_MAIN_HOTEND)); + TERN_(HAS_HEATED_BED, send_temperature_bed(TXT_MAIN_BED)); + #endif + + if (pop_up_index == 25) { + pop_up_index = 100; + ChangePageOfTFT(PAGE_PreLEVEL); + } + } + + #endif // HAS_LEVELING + + void DgusTFT::page115() { + #if ACDEBUG(AC_ALL) + if ((page_index_saved != page_index_now) || (key_value_saved != key_value)) { + DEBUG_ECHOLNPGM("page115 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now, " key: ", key_value); + page_index_saved = page_index_now; + key_value_saved = key_value; + } + #endif + + switch (key_value) { + + case 0: break; + case 1: ChangePageOfTFT(PAGE_PreLEVEL); break; + + case 2: { + injectCommands(F("M1024 S3")); // -1 + //char value[20] + //sprintf_P(value, PSTR("G1 Z%iF%i")); enqueue_and_echo_command_now(value); } + } break; + + case 3: injectCommands(F("M1024 S4")); break; // 1 + case 4: injectCommands(F("M1024 S1")); break; // -0.1 + case 5: injectCommands(F("M1024 S2")); break; // 0.1 + case 6: injectCommands(F("M1024 S0")); break; // prepare, move x y to center + case 7: injectCommands(F("M1024 S5")); break; // 0.1 + } + + static millis_t flash_time = 0; + const millis_t ms = millis(); + if (PENDING(ms, flash_time)) return; + flash_time = ms + 1000; + } + + void DgusTFT::page117() { // Page CHS Mute handler + #if ACDEBUG(AC_ALL) + if ((page_index_saved != page_index_now) || (key_value_saved != key_value)) { + DEBUG_ECHOLNPGM("page117 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now, " key: ", key_value); + page_index_saved = page_index_now; + key_value_saved = key_value; + } + #endif + switch (key_value) { + case 0: break; + + case 1: + ChangePageOfTFT(PAGE_MAIN); + store_changes(); + break; + + case 2: // language + toggle_language(); + goto_system_page(); + break; + + case 3: break; + + case 4: // audio + toggle_audio(); + break; + + case 5: // about + char str_ver[32]; + //sprintf(str_ver, "%04d-%02d-%02d %02d:%02d:%02d\n", BUILD_YEAR, BUILD_MONTH, BUILD_DAY, BUILD_HOUR, BUILD_MIN, BUILD_SEC); + sprintf(str_ver, MAIN_BOARD_FIRMWARE_VER); + SendTxtToTFT(str_ver, TXT_VERSION); + ChangePageOfTFT(PAGE_ABOUT); + break; + + case 6: + ChangePageOfTFT(PAGE_RECORD); + break; + } + } + + void DgusTFT::page124() { // first time into page 124 the feedrate percent is not set + #if ACDEBUG(AC_ALL) + if ((page_index_saved != page_index_now) || (key_value_saved != key_value)) { + DEBUG_ECHOLNPGM("page124 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now); + page_index_saved = page_index_now; + key_value_saved = key_value; + //DEBUG_ECHOLNPGM("update feedrate percent"); + } + #endif + SendValueToTFT(uint16_t(getFeedrate_percent()), TXT_PRINT_SPEED_NOW); + } + + void DgusTFT::page125() { // first time into page 125 the feedrate percent is not set + #if ACDEBUG(AC_ALL) + if ((page_index_saved != page_index_now) || (key_value_saved != key_value)) { + DEBUG_ECHOLNPGM("page125 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now); + page_index_saved = page_index_now; + key_value_saved = key_value; + //DEBUG_ECHOLNPGM("update feedrate percent"); + } + #endif + SendValueToTFT(uint16_t(getFeedrate_percent()), TXT_PRINT_SPEED_NOW); + } + + void DgusTFT::page170() { // ENG Mute handler + #if ACDEBUG(AC_ALL) + if ((page_index_saved != page_index_now) || (key_value_saved != key_value)) { + DEBUG_ECHOLNPGM("page170 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now, " key: ", key_value); + page_index_saved = page_index_now; + key_value_saved = key_value; + } + #endif + switch (key_value) { + case 0: break; + + case 1: + ChangePageOfTFT(PAGE_MAIN); + store_changes(); + break; + + case 2: // language + toggle_language(); + goto_system_page(); + break; + + case 3: break; + + case 4: // audio + toggle_audio(); + break; + + case 5: // about + char str_ver[32]; + //sprintf(str_ver, "%04d-%02d-%02d %02d:%02d:%02d\n", BUILD_YEAR, BUILD_MONTH, BUILD_DAY, BUILD_HOUR, BUILD_MIN, BUILD_SEC); + sprintf(str_ver, MAIN_BOARD_FIRMWARE_VER); + SendTxtToTFT(str_ver, TXT_VERSION); + ChangePageOfTFT(PAGE_ABOUT); + break; + + case 6: + ChangePageOfTFT(PAGE_RECORD); + break; + } + } + + #if ENABLED(POWER_LOSS_RECOVERY) + + void DgusTFT::page171() { // CHS power outage resume handler + #if ACDEBUG(AC_ALL) + if (page_index_saved != page_index_now) { + DEBUG_ECHOLNPGM("page171 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now, " key: ", key_value); + page_index_saved = page_index_now; + } + #endif + #if ENABLED(LONG_FILENAME_HOST_SUPPORT) + char filename[64] = { '\0' }; + #endif + + switch (key_value) { + case 0: break; + + case 1: { // resume + ChangePageOfTFT(PAGE_OUTAGE_RECOVERY); + #if ENABLED(LONG_FILENAME_HOST_SUPPORT) + card.getLongPath(filename, recovery.info.sd_filename); + filename[17] = '\0'; + SendTxtToTFT(filename, TXT_OUTAGE_RECOVERY_FILE); + #else + SendTxtToTFT(recovery.info.sd_filename, TXT_OUTAGE_RECOVERY_FILE); + #endif + + char str_buf[20] = { '\0' }; + sprintf(str_buf, "%u", uint16_t(getFeedrate_percent())); + SendTxtToTFT(str_buf, TXT_PRINT_SPEED); + + sprintf(str_buf, "%u", uint16_t(getProgress_percent())); + SendTxtToTFT(str_buf, TXT_PRINT_PROGRESS); + + ChangePageOfTFT(PAGE_STATUS2); // show pause + injectCommands(F("M355 S1\nM1000")); // case light on, home and start recovery + } break; + + case 2: // cancel + printer_state = AC_printer_idle; + ChangePageOfTFT(PAGE_MAIN); + injectCommands(F("M355 S0\nM1000 C")); // cancel recovery + break; + } + } + + void DgusTFT::page173() { // ENG power outage resume handler + #if ACDEBUG(AC_ALL) + if (page_index_saved != page_index_now) { + DEBUG_ECHOLNPGM("page173 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now, " key: ", key_value); + page_index_saved = page_index_now; + } + #endif + #if ENABLED(LONG_FILENAME_HOST_SUPPORT) + char filename[64] = { '\0' }; + #endif + + switch (key_value) { + case 0: break; + + case 1: { // resume + ChangePageOfTFT(PAGE_OUTAGE_RECOVERY); + #if ENABLED(LONG_FILENAME_HOST_SUPPORT) + card.getLongPath(filename, recovery.info.sd_filename); + filename[17] = '\0'; + SendTxtToTFT(filename, TXT_OUTAGE_RECOVERY_FILE); + #else + SendTxtToTFT(recovery.info.sd_filename, TXT_OUTAGE_RECOVERY_FILE); + #endif + + char str_buf[20] = { '\0' }; + sprintf(str_buf, "%u", uint16_t(getFeedrate_percent())); + SendTxtToTFT(str_buf, TXT_PRINT_SPEED); + + sprintf(str_buf, "%u", uint16_t(getProgress_percent())); + SendTxtToTFT(str_buf, TXT_PRINT_PROGRESS); + + ChangePageOfTFT(PAGE_STATUS2); // show pause + injectCommands(F("M355 S1\nM1000")); // case light on, home and start recovery + } break; + + case 2: // cancel + printer_state = AC_printer_idle; + ChangePageOfTFT(PAGE_MAIN); + injectCommands(F("M355 S0\nM1000 C")); // cancel recovery + break; + } + } + + #endif // POWER_LOSS_RECOVERY + + #if HAS_LEVELING + + void DgusTFT::page175() { // CHS probe preheating handler + #if ACDEBUG(AC_ALL) + if (page_index_saved != page_index_now) { + DEBUG_ECHOLNPGM("page175 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now); + page_index_saved = page_index_now; + } + #endif + + #if HAS_HOTEND || HAS_HEATED_BED + static millis_t flash_time = 0; + const millis_t ms = millis(); + if (PENDING(ms, flash_time)) return; + flash_time = ms + 1500; + + TERN_(HAS_HOTEND, send_temperature_hotend(TXT_MAIN_HOTEND)); + TERN_(HAS_HEATED_BED, send_temperature_bed(TXT_MAIN_BED)); + #endif + } + + void DgusTFT::page176() { // ENG probe preheating handler + #if ACDEBUG(AC_ALL) + if (page_index_saved != page_index_now) { + DEBUG_ECHOLNPGM("page176 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now); + page_index_saved = page_index_now; + } + #endif + + #if HAS_HOTEND || HAS_HEATED_BED + static millis_t flash_time = 0; + const millis_t ms = millis(); + if (PENDING(ms, flash_time)) return; + flash_time = ms + 1500; + + TERN_(HAS_HOTEND, send_temperature_hotend(TXT_MAIN_HOTEND)); + TERN_(HAS_HEATED_BED, send_temperature_bed(TXT_MAIN_BED)); + #endif + } + + #endif // HAS_LEVELING + + void DgusTFT::page177_to_198() { + #if ACDEBUG(AC_ALL) + if ((page_index_saved != page_index_now) || (key_value_saved != key_value)) { + DEBUG_ECHOLNPGM("page177_to_198 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now, " key: ", key_value); + page_index_saved = page_index_now; + key_value_saved = key_value; + } + #endif + switch (key_value) { + case 1: // return + #if ACDEBUG(AC_MARLIN) + //DEBUG_ECHOLNPGM("page_index_now: ", page_index_now); + //DEBUG_ECHOLNPGM("page_index_last: ", page_index_last); + //DEBUG_ECHOLNPGM("page_index_last_2: ", page_index_last_2); + #endif + + if ((WITHIN(page_index_now, PAGE_CHS_ABNORMAL_X_ENDSTOP, PAGE_CHS_ABNORMAL_Z_ENDSTOP)) + || (WITHIN(page_index_now, PAGE_ENG_ABNORMAL_X_ENDSTOP, PAGE_ENG_ABNORMAL_Z_ENDSTOP)) + ) { + if (lcd_info.language == ENG) { + if (page_index_last_2 > 120) page_index_last_2 -= 120; + if (page_index_last > 120) page_index_last -= 120; + } + + if (PAGE_STATUS1 == page_index_last_2 || PAGE_STATUS2 == page_index_last_2 || PAGE_PRINT_FINISH == page_index_last) + ChangePageOfTFT(PAGE_MAIN); + else + ChangePageOfTFT(page_index_last_2); + } + else { + if (lcd_info.language == ENG && page_index_last > 120) + page_index_last -= 120; + ChangePageOfTFT(page_index_last); + } + + onSurviveInKilled(); + stepper.disable_all_steppers(); + break; + + default: break; + } + } + + #if 0 + void DgusTFT::page178_to_181_190_to_193() { // temperature abnormal + #if ACDEBUG(AC_ALL) + if ((page_index_saved != page_index_now) || (key_value_saved != key_value)) { + DEBUG_ECHOLNPGM("page178_to_181_190_to_193 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now, " key: ", key_value); + page_index_saved = page_index_now; + key_value_saved = key_value; + } + #endif + switch (key_value) { + case 1: // return + SERIAL_ECHOLNPGM("page_index_now: ", page_index_now); + SERIAL_ECHOLNPGM("page_index_last: ", page_index_last); + SERIAL_ECHOLNPGM("page_index_last_2: ", page_index_last_2); + + if (isPrinting() || isPrintingPaused() || isPrintingFromMedia()) { + printer_state = AC_printer_stopping; + stopPrint(); + ChangePageOfTFT(PAGE_MAIN); + } + else + ChangePageOfTFT(page_index_last); + + onSurviveInKilled(); + break; + + default: break; + } + } + #endif + + void DgusTFT::page199_to_200() { + #if ACDEBUG(AC_ALL) + if ((page_index_saved != page_index_now) || (key_value_saved != key_value)) { + DEBUG_ECHOLNPGM("page199_to_200 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now, " key: ", key_value); + page_index_saved = page_index_now; + key_value_saved = key_value; + } + #endif + switch (key_value) { + case 1: // return + #if ACDEBUG(AC_MARLIN) + //DEBUG_ECHOLNPGM("page_index_now: ", page_index_now); + //DEBUG_ECHOLNPGM("page_index_last: ", page_index_last); + //DEBUG_ECHOLNPGM("page_index_last_2: ", page_index_last_2); + #endif + onSurviveInKilled(); + ChangePageOfTFT(PAGE_PreLEVEL); + break; + + default: break; + } + } + + inline void ProbeTare() { + #if PIN_EXISTS(AUTO_LEVEL_TX) + OUT_WRITE(AUTO_LEVEL_TX_PIN, LOW); + delay(300); + OUT_WRITE(AUTO_LEVEL_TX_PIN, HIGH); + delay(100); + #endif + } + + inline bool getProbeState() { return PROBE_TRIGGERED(); } + + void DgusTFT::page201() { // probe precheck + #if ACDEBUG(AC_ALL) + if ((page_index_saved != page_index_now) || (key_value_saved != key_value)) { + DEBUG_ECHOLNPGM("page201 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now); + page_index_saved = page_index_now; + key_value_saved = key_value; + } + #endif + static millis_t probe_check_time = 0; + static millis_t temperature_time = 0; + static uint8_t probe_check_counter = 0; + static uint8_t probe_state_last = 0; + static bool probe_tare_flag = 0; + + if (!probe_tare_flag) { + ProbeTare(); + + delay(100); + + if (getProbeState()) { // triggered too early + probe_check_counter = 0; + probe_tare_flag = 0; + ChangePageOfTFT(PAGE_CHS_PROBE_PRECHECK_FAILED); + } + probe_tare_flag = 1; + } + + switch (key_value) { + case 1: // cancel + probe_check_counter = 0; + probe_tare_flag = 0; + ChangePageOfTFT(PAGE_PreLEVEL); + break; + + default: break; + } + + if (ELAPSED(millis(), probe_check_time)) { + probe_check_time = millis() + 300; + + if (!probe_state_last && getProbeState()) { + probe_check_counter = 0; + probe_tare_flag = 0; + ChangePageOfTFT(PAGE_CHS_PROBE_PRECHECK_OK); + } + + probe_state_last = getProbeState(); + + if (probe_check_counter++ >= 200) { // waiting for 1 min + probe_check_counter = 0; + probe_tare_flag = 0; + ChangePageOfTFT(PAGE_CHS_PROBE_PRECHECK_FAILED); + } + } + + if (ELAPSED(millis(), temperature_time)) { + temperature_time = millis() + 1500; + TERN_(HAS_HOTEND, send_temperature_hotend(TXT_MAIN_HOTEND)); + TERN_(HAS_HEATED_BED, send_temperature_bed(TXT_MAIN_BED)); + } + } + + void DgusTFT::page202() { // probe precheck ok + #if ACDEBUG(AC_ALL) + if ((page_index_saved != page_index_now) || (key_value_saved != key_value)) { + DEBUG_ECHOLNPGM("page202 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now); + page_index_saved = page_index_now; + key_value_saved = key_value; + } + #endif + + //static millis_t flash_time = 0; + //static millis_t probe_check_counter = 0; + //static uint8_t probe_state_last = 0; + + delay(3000); + + injectCommands(F("G28\nG29")); + printer_state = AC_printer_probing; + ChangePageOfTFT(PAGE_LEVELING); + } + + void DgusTFT::page203() { // probe precheck failed + #if ACDEBUG(AC_ALL) + if ((page_index_saved != page_index_now) || (key_value_saved != key_value)) { + DEBUG_ECHOLNPGM("page203 page_index_last_2: ", page_index_last_2, " page_index_last: ", page_index_last, " page_index_now: ", page_index_now); + page_index_saved = page_index_now; + key_value_saved = key_value; + } + #endif + //static millis_t probe_check_counter = 0; + //static uint8_t probe_state_last = 0; + + #if HAS_HOTEND || HAS_HEATED_BED + static millis_t flash_time = 0; + const millis_t ms = millis(); + if (PENDING(ms, flash_time)) return; + flash_time = ms + 1500; + + TERN_(HAS_HOTEND, send_temperature_hotend(TXT_MAIN_HOTEND)); + TERN_(HAS_HEATED_BED, send_temperature_bed(TXT_MAIN_BED)); + #endif + } + + void DgusTFT::pop_up_manager() { + #if ACDEBUG(AC_ALL) + if (pop_up_index_saved != pop_up_index) { + DEBUG_ECHOLNPGM("pop_up_manager pop_up_index: ", pop_up_index); + pop_up_index_saved = pop_up_index; + } + #endif + + switch (pop_up_index) { + case 10: // T0 error + if (page_index_now != PAGE_ABNORMAL) + ChangePageOfTFT(PAGE_ABNORMAL); + pop_up_index = 100; + break; + + case 15: // filament lack + if (page_index_now != PAGE_FILAMENT_LACK) + ChangePageOfTFT(PAGE_FILAMENT_LACK); + pop_up_index = 100; + break; + + case 16: // stop wait + ChangePageOfTFT(PAGE_WAIT_STOP); + pop_up_index = 100; + break; + + case 18: + ChangePageOfTFT(PAGE_STATUS1); + pop_up_index = 100; + break; + + case 23: // + if (page_index_now != PAGE_FILAMENT_LACK) + ChangePageOfTFT(PAGE_FILAMENT_LACK); + pop_up_index = 100; + break; + + case 24: { // + uint32_t time = getProgress_seconds_elapsed() / 60; + char str_buf[20]; + sprintf(str_buf, "%s H ", utostr3(time / 60)); + sprintf(str_buf + strlen(str_buf), "%s M", utostr3(time % 60)); + SendTxtToTFT(str_buf, TXT_FINISH_TIME); + ChangePageOfTFT(PAGE_PRINT_FINISH); + //SendtoTFTLN(AC_msg_print_complete); // no idea why this causes a compile error + pop_up_index = 100; + } break; + + case 25: // LEVEL DONE + ChangePageOfTFT(PAGE_PreLEVEL); + pop_up_index = 100; + break; + } + } + + void DEBUG_PRINT_PAUSED_STATE(FSTR_P const msg, paused_state_t state) { + DEBUG_ECHOPGM(msg, state); + switch (state) { + case AC_paused_heater_timed_out: + DEBUG_ECHOLNPGM(" AC_paused_heater_timed_out"); + break; + case AC_paused_filament_lack: + DEBUG_ECHOLNPGM(" AC_paused_filament_lack"); + break; + case AC_paused_purging_filament: + DEBUG_ECHOLNPGM(" AC_paused_purging_filament"); + break; + case AC_paused_idle: + DEBUG_ECHOLNPGM(" AC_paused_idle"); + break; + } + } + +// routines to make the debug outputs human readable + + void DEBUG_PRINT_PRINTER_STATE(FSTR_P const msg, printer_state_t state) { + DEBUG_ECHOPGM(msg, state); + switch (state) { + case AC_printer_idle: + DEBUG_ECHOLNPGM(" AC_printer_idle"); + break; + case AC_printer_probing: + DEBUG_ECHOLNPGM(" AC_printer_probing"); + break; + case AC_printer_printing: + DEBUG_ECHOLNPGM(" AC_printer_printing"); + break; + case AC_printer_pausing: + DEBUG_ECHOLNPGM(" AC_printer_pausing"); + break; + case AC_printer_paused: + DEBUG_ECHOLNPGM(" AC_printer_paused"); + break; + case AC_printer_stopping: + DEBUG_ECHOLNPGM(" AC_printer_stopping"); + break; + case AC_printer_stopping_from_media_remove: + DEBUG_ECHOLNPGM(" AC_printer_stopping_from_media_remove"); + break; + case AC_printer_resuming_from_power_outage: + DEBUG_ECHOLNPGM(" AC_printer_resuming_from_power_outage"); + break; + } + } + + void DEBUG_PRINT_TIMER_EVENT(FSTR_P const msg, timer_event_t event) { + DEBUG_ECHOPGM(msg, event); + switch (event) { + case AC_timer_started: + DEBUG_ECHOLNPGM(" AC_timer_started"); + break; + case AC_timer_paused: + DEBUG_ECHOLNPGM(" AC_timer_paused"); + break; + case AC_timer_stopped: + DEBUG_ECHOLNPGM(" AC_timer_stopped"); + break; + } + } + + void DEBUG_PRINT_MEDIA_EVENT(FSTR_P const msg, media_event_t event) { + DEBUG_ECHOPGM(msg, event); + switch (event) { + case AC_media_inserted: + DEBUG_ECHOLNPGM(" AC_media_inserted"); + break; + case AC_media_removed: + DEBUG_ECHOLNPGM(" AC_media_removed"); + break; + case AC_media_error: + DEBUG_ECHOLNPGM(" AC_media_error"); + break; + } + } + +} // namespace + +#endif // ANYCUBIC_LCD_VYPER diff --git a/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.h b/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.h new file mode 100644 index 0000000000..1903fa1183 --- /dev/null +++ b/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.h @@ -0,0 +1,479 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2023 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 + +/** + * lcd/extui/anycubic_vyper/dgus_tft.h + */ + +#include "dgus_tft_defs.h" +#include "../../../inc/MarlinConfigPre.h" +#include "../ui_api.h" + +#define MAIN_BOARD_FIRMWARE_VER "V2.4.5" + +#define DATA_BUF_SIZE 64 + +/****************** PAGE INDEX***********************/ +#define PAGE_OFFSET 0 +#define PAGE_MAIN (1+PAGE_OFFSET) +#define PAGE_FILE (2+PAGE_OFFSET) +#define PAGE_STATUS1 (3+PAGE_OFFSET) // show resume +#define PAGE_STATUS2 (4+PAGE_OFFSET) // show pause +#define PAGE_ADJUST (5+PAGE_OFFSET) +#define PAGE_KEYBPARD (6+PAGE_OFFSET) +#define PAGE_TOOL (7+PAGE_OFFSET) +#define PAGE_MOVE (8+PAGE_OFFSET) +#define PAGE_TEMP (9+PAGE_OFFSET) +#define PAGE_SPEED (10+PAGE_OFFSET) +#define PAGE_SYSTEM_CHS_AUDIO_ON (11+PAGE_OFFSET) +#define PAGE_WIFI (12+PAGE_OFFSET) +#define PAGE_ABOUT (13+PAGE_OFFSET) +#define PAGE_RECORD (14+PAGE_OFFSET) +#define PAGE_PREPARE (15+PAGE_OFFSET) +#define PAGE_PreLEVEL (16+PAGE_OFFSET) +#define PAGE_LEVEL_ADVANCE (17+PAGE_OFFSET) +#define PAGE_PREHEAT (18+PAGE_OFFSET) +#define PAGE_FILAMENT (19+PAGE_OFFSET) + +#define PAGE_DONE (20+PAGE_OFFSET) +#define PAGE_ABNORMAL (21+PAGE_OFFSET) +#define PAGE_PRINT_FINISH (22+PAGE_OFFSET) +#define PAGE_WAIT_STOP (23+PAGE_OFFSET) +#define PAGE_FILAMENT_LACK (25+PAGE_OFFSET) +#define PAGE_FORBIT (26+PAGE_OFFSET) +#define PAGE_STOP_CONF (27+PAGE_OFFSET) +#define PAGE_NO_SD (29+PAGE_OFFSET) +#define PAGE_FILAMENT_HEAT (30+PAGE_OFFSET) +#define PAGE_WAIT_PAUSE (32+PAGE_OFFSET) + +#define PAGE_LEVEL_ENSURE (33+PAGE_OFFSET) +#define PAGE_LEVELING (34+PAGE_OFFSET) + +#define PAGE_AUTO_OFFSET (115+PAGE_OFFSET) + +#define PAGE_SYSTEM_CHS_AUDIO_OFF (117+PAGE_OFFSET) + +#define PAGE_SYSTEM_ENG_AUDIO_ON (131+PAGE_OFFSET) +#define PAGE_SYSTEM_ENG_AUDIO_OFF (170+PAGE_OFFSET) + +#define PAGE_OUTAGE_RECOVERY (171+PAGE_OFFSET) +#define PAGE_ENG_OUTAGE_RECOVERY (173+PAGE_OFFSET) + +#define PAGE_CHS_PROBE_PREHEATING (176+PAGE_OFFSET) +#define PAGE_ENG_PROBE_PREHEATING (175+PAGE_OFFSET) + +#define PAGE_CHS_HOMING (177+PAGE_OFFSET) +#define PAGE_CHS_ABNORMAL_BED_HEATER (178+PAGE_OFFSET) +#define PAGE_CHS_ABNORMAL_BED_NTC (179+PAGE_OFFSET) +#define PAGE_CHS_ABNORMAL_HOTEND_HEATER (180+PAGE_OFFSET) +#define PAGE_CHS_ABNORMAL_HOTEND_NTC (181+PAGE_OFFSET) +#define PAGE_CHS_ABNORMAL_ENDSTOP (182+PAGE_OFFSET) +#define PAGE_CHS_ABNORMAL_X_ENDSTOP (182+PAGE_OFFSET) +#define PAGE_CHS_ABNORMAL_Y_ENDSTOP (183+PAGE_OFFSET) +#define PAGE_CHS_ABNORMAL_Z_ENDSTOP (184+PAGE_OFFSET) +#define PAGE_CHS_ABNORMAL_ZL_ENDSTOP (185+PAGE_OFFSET) +#define PAGE_CHS_ABNORMAL_ZR_ENDSTOP (186+PAGE_OFFSET) +#define PAGE_CHS_ABNORMAL_LEVELING_SENSOR (187+PAGE_OFFSET) +#define PAGE_CHS_LEVELING_FAILED (188+PAGE_OFFSET) + +#define PAGE_ENG_HOMING (189+PAGE_OFFSET) +#define PAGE_ENG_ABNORMAL_BED_HEATER (190+PAGE_OFFSET) +#define PAGE_ENG_ABNORMAL_BED_NTC (191+PAGE_OFFSET) +#define PAGE_ENG_ABNORMAL_HOTEND_HEATER (192+PAGE_OFFSET) +#define PAGE_ENG_ABNORMAL_HOTEND_NTC (193+PAGE_OFFSET) +#define PAGE_ENG_ABNORMAL_ENDSTOP (194+PAGE_OFFSET) +#define PAGE_ENG_ABNORMAL_X_ENDSTOP (194+PAGE_OFFSET) +#define PAGE_ENG_ABNORMAL_Y_ENDSTOP (195+PAGE_OFFSET) +#define PAGE_ENG_ABNORMAL_Z_ENDSTOP (196+PAGE_OFFSET) +#define PAGE_ENG_ABNORMAL_ZL_ENDSTOP (197+PAGE_OFFSET) +#define PAGE_ENG_ABNORMAL_ZR_ENDSTOP (198+PAGE_OFFSET) +#define PAGE_ENG_ABNORMAL_LEVELING_SENSOR (199+PAGE_OFFSET) +#define PAGE_ENG_LEVELING_FAILED (200+PAGE_OFFSET) + +#define PAGE_CHS_PROBE_PRECHECK (201+PAGE_OFFSET) +#define PAGE_CHS_PROBE_PRECHECK_OK (202+PAGE_OFFSET) +#define PAGE_CHS_PROBE_PRECHECK_FAILED (203+PAGE_OFFSET) + +#define PAGE_ENG_PROBE_PRECHECK (204+PAGE_OFFSET) +#define PAGE_ENG_PROBE_PRECHECK_OK (205+PAGE_OFFSET) +#define PAGE_ENG_PROBE_PRECHECK_FAILED (206+PAGE_OFFSET) + +/****************** Lcd control **************************/ +#define REG_LCD_READY 0x0014 + +/****************** TXT **************************/ + +// MAIN PAGE TXT +#define TXT_MAIN_BED 0x2000 +#define TXT_MAIN_HOTEND 0x2030 +#define TXT_MAIN_MESSAGE 0x2060 + +// FILE TXT +#define TXT_FILE_0 (0x2000+3*0x30) +#define TXT_DESCRIPT_0 0x5000 // DESCRIBE ADDRESS +#define TXT_FILE_1 (0x2000+4*0x30) +#define TXT_DESCRIPT_1 0x5030 +#define TXT_FILE_2 (0x2000+5*0x30) +#define TXT_DESCRIPT_2 0x5060 +#define TXT_FILE_3 (0x2000+6*0x30) +#define TXT_DESCRIPT_3 0x5090 +#define TXT_FILE_4 (0x2000+7*0x30) +#define TXT_DESCRIPT_4 0x50C0 + +// PRINT TXT +#define TXT_PRINT_NAME 0x2000+8*0x30 +#define TXT_PRINT_SPEED 0x2000+9*0x30 +#define TXT_PRINT_TIME 0x2000+10*0x30 +#define TXT_PRINT_PROGRESS 0x2000+11*0x30 +#define TXT_PRINT_HOTEND 0x2000+12*0x30 +#define TXT_PRINT_BED 0x2000+13*0x30 + +// PRINT ADJUST TXT + +#define TXT_ADJUST_HOTEND (0x2000+14*0x30) +#define TXT_ADJUST_BED (0x2000+15*0x30) +#define TXT_ADJUST_SPEED (0x2000+16*0x30) + +// TEMP SET TXT + +#define TXT_BED_NOW (0x2000+17*0x30) +#define TXT_BED_TARGET (0x2000+18*0x30) +#define TXT_HOTEND_NOW (0x2000+19*0x30) +#define TXT_HOTEND_TARGET (0x2000+20*0x30) + +// SPEED SET TXT +#define TXT_FAN_SPEED_NOW (0x2000+21*0x30) +#define TXT_FAN_SPEED_TARGET (0x2000+22*0x30) +#define TXT_PRINT_SPEED_NOW (0x2000+23*0x30) +#define TXT_PRINT_SPEED_TARGET (0x2000+24*0x30) + +// ABOUT TXT +#define TXT_ABOUT (0x2000+25*0x30) + +// RECORT TXT +#define TXT_RECORT_0 (0x2000+26*0x30) +#define TXT_RECORT_1 (0x2000+27*0x30) +#define TXT_RECORT_2 (0x2000+28*0x30) +#define TXT_RECORT_3 (0x2000+29*0x30) +#define TXT_RECORT_4 (0x2000+30*0x30) +#define TXT_RECORT_5 (0x2000+31*0x30) + +// ADVANCE LEVEL TXT +#define TXT_LEVEL_OFFSET (0x2000+32*0x30) + +// FILAMENT TXT +#define TXT_FILAMENT_TEMP (0x2000+33*0x30) + +#define TXT_FINISH_TIME (0x2000+34*0x30) +#define TXT_VERSION (0x2000+35*0x30) +#define TXT_PREHEAT_HOTEND (0x2000+36*0x30) +#define TXT_PREHEAT_BED (0x2000+37*0x30) + +#define TXT_OUTAGE_RECOVERY_FILE 0x2180 + +#define ADDRESS_SYSTEM_AUDIO 0x0080 + +#define ADDRESS_MOVE_DISTANCE 0x4300 +#define ADDRESS_SYSTEM_LED_STATUS 0x4500 +#define ADDRESS_PRINT_SETTING_LED_STATUS 0x4550 + +/*********************** KEY VALUE **************************/ +#define KEY_ADDRESS 0x1000 + +// MAIN PAGE KEY + +#define KEY_MAIN_TO_FILE 1 +#define KEY_MAIN_TO_TOOL 2 +#define KEY_MAIN_TO_PREPARE 3 +#define KEY_MAIN_TO_SYSTEM 4 + +// FILE PAGE KEY + +#define KEY_FILE_TO_MAIN 1 +#define KEY_PRINT 6 +#define KEY_RESUME 5 +#define KEY_PgUp 2 +#define KEY_pgDn 3 +#define KEY_FLASH 4 +#define KEY_FILE0 7 +#define KEY_FILE1 8 +#define KEY_FILE2 9 +#define KEY_FILE3 10 +#define KEY_FILE4 11 + +#define KEY_CONTINUE 2 +#define KEY_PAUSE 2 +#define KEY_STOP 3 +#define KEY_TO_ADJUST 4 +#define KEY_ADJUST_TO_PRINT 1 +#define KEY_ADJUST_ENSURE 7 +#define KEY_CHECK_DOOR 2 +#define KEY_DONE_OFF 3 + +// TOOL PAGE KEY + +#define KEY_TOOL_TO_MAIN 1 +#define KEY_TOOL_TO_MOVE 2 +#define KEY_TOOL_TO_TEMP 3 +#define KEY_TOOL_TO_SPEED 4 +#define KEY_TOOL_LIGHT 5 + +#define KEY_MOVE_TO_TOLL 1// move page +#define KEY_MOVE_X 2 +#define KEY_01 3 +#define KEY_MOVE_NX 4 +#define KEY_HOME_X 5 +#define KEY_MOVE_Y 6 +#define KEY_1 7 +#define KEY_MOVE_NY 8 +#define KEY_HOME_Y 9 +#define KEY_MOVE_Z 10 +#define KEY_10 11 +#define KEY_MOVE_NZ 12 +#define KEY_HOME_Z 13 +#define KEY_SPEED_LOW 14 +#define KEY_SPEED_MIDDLE 15 +#define KEY_SPEED_HIGHT 16 +#define KEY_HOME_ALL 17 + +#define KEY_TEMP_TO_TOOL 1 //Temperature setting page +#define KEY_BED_ADD 2 +#define KEY_BED_DEC 3 +#define KEY_HOTEND_ADD 4 +#define KEY_HOTEND_DEC 5 +#define KEY_COOL 6 +#define KEY_TEMP_ENSURE 7 + +#define KEY_SPEED_TO_TOOL 1 //speed setting page +#define KEY_FAN_SPEED_ADD 2 +#define KEY_FAN_SPEED_DEC 3 +#define KEY_PRINT_SPEED_ADD 4 +#define KEY_PRINT_SPEED_DEC 5 +#define KEY_SPEED_ENSURE 6 + +#define KEY_PREPARE_TO_MAIN 1 //PREPARE PAGE TO MAIN +#define KEY_PREPARE_TO_PreLEVE 2 +#define KEY_PreLEVE_TO_PREPARE 1 +#define KEY_PreLEVE_TO_LEVELING 2 +#define KEY_PreLEVE_TO_ADVANCE 3 +#define KEY_ADVANCE_TO_PreLEVE 1 +#define KEY_LEVEL_ADD 3 +#define KEY_LEVEL_DEC 2 +#define KEY_LEVEL_ENSURE 4 + + +#define KEY_PREPARE_TO_PREHEAT 3 +#define KEY_PREHEAT_TO_PREPARE 1 +#define KEY_PREHEAT_PLA 2 +#define KEY_PREHEAT_ABS 3 + +#define KEY_PREPARE_TO_FILAMENT 4 +#define KEY_FILAMENT_TO_PREPARE 1 +#define KEY_RETREAT 3 +#define KEY_FORWARD 2 +#define KEY_FILAMENT_STOP 4 + +// SYSTEM PAGE KEY + +#define KEY_SYS_TO_MAIN 1 +#define KEY_LANGUAGE 2 +#define KEY_SYS_TO_WIFI 3 +#define KEY_WIFI_TO_SYS 1 + +#define KEY_BEEP 4 +#define KEY_SYS_TO_ABOUT 5 +#define KEY_ABOUT_TO_SYS 1 + +#define KEY_SYS_TO_RECORD 6 +#define KEY_RECORD_TO_SYS 1 +#define KEY_RECORD_PaUp 2 +#define KEY_RECORD_PaDn 3 +#define KEY_RECORD_FLASH 4 + +#define COLOR_RED 0xF800 +#define COLOR_BLUE 0x0210 + +namespace Anycubic { + + enum language_t : uint8_t { ENG, CHS }; + + class DgusTFT; + extern DgusTFT ui; + + typedef struct _lcd_info_t { + language_t language; + bool audio_on; + } lcd_info_t; + + class DgusTFT { + static printer_state_t printer_state; + static paused_state_t pause_state; + #if HAS_HOTEND + static heater_state_t hotend_state; + #endif + #if HAS_HEATED_BED + static heater_state_t hotbed_state; + #endif + static char panel_command[MAX_CMND_LEN]; + static uint8_t command_len; + static char selectedfile[MAX_PATH_LEN]; + static file_menu_t file_menu; + static bool data_received; + static uint8_t data_buf[DATA_BUF_SIZE]; + static uint8_t data_index; + static uint16_t page_index_last, page_index_last_2; + static uint8_t message_index; + static uint8_t pop_up_index; + static uint32_t key_value; + static uint8_t lcd_txtbox_index; + static uint8_t lcd_txtbox_page; + static int16_t feedrate_back; + static language_t ui_language; + + public: + DgusTFT(); + + static lcd_info_t lcd_info, lcd_info_back; + static uint16_t page_index_now; + + static void Startup(); + static void ParamInit(); + static void IdleLoop(); + static void PrinterKilled(FSTR_P,FSTR_P); + static void MediaEvent(media_event_t); + static void TimerEvent(timer_event_t); + static void FilamentRunout(); + static void ConfirmationRequest(const char * const); + static void StatusChange(const char * const); + static void PowerLoss(); + static void PowerLossRecovery(); + static void HomingStart(); + static void HomingComplete(); + + static void set_descript_color(const uint16_t color, const uint8_t index=lcd_txtbox_index); + static void set_language(language_t); + static void toggle_language(); + static void goto_system_page(); + static void toggle_audio(); + static void store_changes(); + + #if HAS_HOTEND + static void send_temperature_hotend(uint32_t addr); + #endif + #if HAS_HEATED_BED + static void send_temperature_bed(uint32_t addr); + #endif + + typedef void (*p_fun)(); + static void page1(); + static void page2(); + static void page3(); + static void page4(); + static void page5(); + static void page6(); + static void page7(); // tool + static void page8(); + static void page9(); + static void page10(); // fan and print speed + static void page11(); // system + static void page12(); + static void page13(); + static void page14(); + static void page15(); + static void page16(); + static void page17(); + static void page18(); + static void page19(); + static void page20(); + static void page21(); + static void page22(); + static void page23(); + static void page24(); + static void page25(); + static void page26(); + static void page27(); + static void page28(); + static void page29(); + static void page30(); + static void page31(); + static void page32(); + + #if HAS_LEVELING + static void page33(); + #endif + static void page34(); + static void page115(); + static void page117(); // CHS Mute handler + static void page124(); + static void page125(); + static void page170(); // ENG Mute handler + + #if ENABLED(POWER_LOSS_RECOVERY) + static void page171(); // CHS power outage resume handler + static void page173(); // ENG power outage resume handler + #endif + #if HAS_LEVELING + static void page175(); // ENG probe preheating handler + static void page176(); // CHS probe preheating handler + #endif + + static void page177_to_198(); + //static void page178_to_181_190_to_193(); + static void page199_to_200(); + + static void page201(); + static void page202(); + static void page203(); + static void page204(); + static void page205(); + static void page206(); + + static void pop_up_manager(); + + static void SendtoTFT(FSTR_P const=nullptr); + static void SendtoTFTLN(FSTR_P const=nullptr); + static bool ReadTFTCommand(); + static int8_t Findcmndpos(const char *, const char); + static void CheckHeaters(); + static void SendFileList(int8_t); + static void SelectFile(); + static void ProcessPanelRequest(); + static void PanelInfo(uint8_t); + static void PanelAction(uint8_t); + static void PanelProcess(uint8_t); + + static void SendValueToTFT(const uint16_t value, const uint16_t address); + static void RequestValueFromTFT(const uint16_t address); + static void SendTxtToTFT(const char *pdata, const uint16_t address); + static void SendColorToTFT(const uint16_t color, const uint16_t address); + static void SendReadNumOfTxtToTFT(const uint8_t number, const uint16_t address); + static void ChangePageOfTFT(const uint16_t page_index, const bool no_send=false); + static void FakeChangePageOfTFT(const uint16_t page_index); + static void LcdAudioSet(const bool audio_on); + + private: + + }; + + extern DgusTFT Dgus; +} diff --git a/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft_defs.h b/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft_defs.h new file mode 100644 index 0000000000..dc187690e3 --- /dev/null +++ b/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft_defs.h @@ -0,0 +1,157 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2023 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 . + * + */ + +/** + * lcd/extui/anycubic_vyper/dgus_defs.h + */ + +#pragma once +#include "../../../inc/MarlinConfigPre.h" + +#define ACDEBUGLEVEL 0 // 0: off, 255: all levels enabled + +#if ACDEBUGLEVEL + // Bit-masks for selective debug: + enum ACDebugMask : uint8_t { + AC_INFO = 1, + AC_ACTION = 2, + AC_FILE = 4, + AC_PANEL = 8, + AC_MARLIN = 16, + AC_SOME = 32, + AC_ALL = 64 + }; + #define ACDEBUG(mask) ( ((mask) & ACDEBUGLEVEL) == mask ) // Debug flag macro +#else + #define ACDEBUG(mask) false +#endif + +#define TFTSer LCD_SERIAL // Serial interface for TFT panel now uses marlinserial +#define MAX_FOLDER_DEPTH 4 // Limit folder depth TFT has a limit for the file path +#define MAX_CMND_LEN 16 * MAX_FOLDER_DEPTH // Maximum Length for a Panel command +#define MAX_PATH_LEN 16 * MAX_FOLDER_DEPTH // Maximum number of characters in a SD file path + +#define AC_HEATER_FAULT_VALIDATION_TIME 5 // number of 1/2 second loops before signalling a heater fault +#define AC_LOWEST_MESHPOINT_VAL Z_PROBE_LOW_POINT // The lowest value you can set for a single mesh point offset + + // TFT panel commands +#define AC_msg_sd_card_inserted F("J00") +#define AC_msg_sd_card_removed F("J01") +#define AC_msg_no_sd_card F("J02") +#define AC_msg_usb_connected F("J03") +#define AC_msg_print_from_sd_card F("J04") +#define AC_msg_pause F("J05") +#define AC_msg_nozzle_heating F("J06") +#define AC_msg_nozzle_heating_done F("J07") +#define AC_msg_bed_heating F("J08") +#define AC_msg_bed_heating_done F("J09") +#define AC_msg_nozzle_temp_abnormal F("J10") +#define AC_msg_kill_lcd F("J11") +#define AC_msg_ready F("J12") +#define AC_msg_low_nozzle_temp F("J13") +#define AC_msg_print_complete F("J14") +#define AC_msg_filament_out_alert F("J15") +#define AC_msg_stop F("J16") +#define AC_msg_main_board_has_reset F("J17") +#define AC_msg_paused F("J18") +#define AC_msg_j19_unknown F("J19") +#define AC_msg_sd_file_open_success F("J20") +#define AC_msg_sd_file_open_failed F("J21") +#define AC_msg_level_monitor_finished F("J22") +#define AC_msg_filament_out_block F("J23") +#define AC_msg_probing_not_allowed F("J24") +#define AC_msg_probing_complete F("J25") +#define AC_msg_start_probing F("J26") +#define AC_msg_version F("J27") +#define AC_msg_bed_temp_abnormal F("J28") + +#define MARLIN_msg_probing_point PSTR("Probing Point ") +#define MARLIN_msg_start_probing PSTR("Probing Point 1/25") +#define MARLIN_msg_probing_failed PSTR("Probing Failed") +#define MARLIN_msg_ready PSTR(" Ready.") +#define MARLIN_msg_print_paused PSTR("Print Paused") +#define MARLIN_msg_print_aborted PSTR("Print Aborted") +#define MARLIN_msg_extruder_heating PSTR("E Heating...") +#define MARLIN_msg_bed_heating PSTR("Bed Heating...") + +#define MARLIN_msg_probe_preheat_start PSTR("Probe preheat start") +#define MARLIN_msg_probe_preheat_stop PSTR("Probe preheat stop") + + +#define MARLIN_msg_nozzle_parked PSTR("Nozzle Parked") +#define MARLIN_msg_heater_timeout PSTR("Heater Timeout") +#define MARLIN_msg_reheating PSTR("Reheating...") +#define MARLIN_msg_reheat_done PSTR("Reheat finished.") +#define MARLIN_msg_filament_purging PSTR("Filament Purging...") +#define MARLIN_msg_media_removed PSTR("Media Removed") +#define MARLIN_msg_special_pause PSTR("PB") +#define AC_cmnd_auto_unload_filament PSTR("M701") // Use Marlin unload routine +#define AC_cmnd_auto_load_filament PSTR("M702 M0 PB") // Use Marlin load routing then pause for user to clean nozzle + +#define AC_cmnd_manual_load_filament PSTR("M83\nG1 E50 F700\nM82") // replace the manual panel commands with something a little faster +#define AC_cmnd_manual_unload_filament PSTR("M83\nG1 E-50 F1200\nM82") +#define AC_cmnd_enable_levelling PSTR("M420 S1 V1") +#define AC_cmnd_power_loss_recovery PSTR("G28 R5 X Y\nG28 Z") // Lift, home X and Y then home Z when in 'safe' position + +namespace Anycubic { + enum heater_state_t : uint8_t { + AC_heater_off, + AC_heater_temp_set, + AC_heater_temp_reached + }; + + enum paused_state_t : uint8_t { + AC_paused_heater_timed_out, + AC_paused_filament_lack, + AC_paused_purging_filament, + AC_paused_idle + }; + + enum printer_state_t : uint8_t { + AC_printer_idle, + AC_printer_probing, + AC_printer_printing, + AC_printer_pausing, + AC_printer_paused, + AC_printer_stopping, + AC_printer_stopping_from_media_remove, + AC_printer_resuming_from_power_outage + }; + + enum timer_event_t : uint8_t { + AC_timer_started, + AC_timer_paused, + AC_timer_stopped + }; + + enum media_event_t : uint8_t { + AC_media_inserted, + AC_media_removed, + AC_media_error + }; + enum file_menu_t : uint8_t { + AC_menu_file, + AC_menu_command, + AC_menu_change_to_file, + AC_menu_change_to_command + }; +} diff --git a/Marlin/src/lcd/extui/anycubic_vyper/vyper_extui.cpp b/Marlin/src/lcd/extui/anycubic_vyper/vyper_extui.cpp new file mode 100644 index 0000000000..142f438861 --- /dev/null +++ b/Marlin/src/lcd/extui/anycubic_vyper/vyper_extui.cpp @@ -0,0 +1,152 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2023 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 . + * + */ + +/** + * lcd/extui/anycubic_vyper/vyper_extui.cpp + * + * Anycubic Dgus TFT support for Marlin + */ + +#include "../../../inc/MarlinConfigPre.h" + +#if ENABLED(ANYCUBIC_LCD_VYPER) + +#include "../ui_api.h" +#include "dgus_tft.h" + +using namespace Anycubic; + +namespace ExtUI { + + void onStartup() { Dgus.Startup(); } + + void onIdle() { Dgus.IdleLoop(); } + + void onPrinterKilled(FSTR_P const error, FSTR_P const component) { + Dgus.PrinterKilled(error, component); + } + + void onMediaInserted() { Dgus.MediaEvent(AC_media_inserted); } + void onMediaError() { Dgus.MediaEvent(AC_media_error); } + void onMediaRemoved() { Dgus.MediaEvent(AC_media_removed); } + + void onPlayTone(const uint16_t frequency, const uint16_t duration) { + #if ENABLED(SPEAKER) + ::tone(BEEPER_PIN, frequency, duration); + #endif + } + + void onPrintTimerStarted() { Dgus.TimerEvent(AC_timer_started); } + void onPrintTimerPaused() { Dgus.TimerEvent(AC_timer_paused); } + void onPrintTimerStopped() { Dgus.TimerEvent(AC_timer_stopped); } + void onPrintDone() {} + + void onFilamentRunout(const extruder_t) { Dgus.FilamentRunout(); } + + void onUserConfirmRequired(const char * const msg) { Dgus.ConfirmationRequest(msg); } + void onStatusChanged(const char * const msg) { Dgus.StatusChange(msg); } + + void onHomingStart() { Dgus.HomingStart(); } + void onHomingDone() { Dgus.HomingComplete(); } + + void onFactoryReset() { + Dgus.page_index_now = 121; + Dgus.lcd_info.audio_on = DISABLED(SPEAKER); + } + + void onStoreSettings(char *buff) { + // Called when saving to EEPROM (i.e. M500). If the ExtUI needs + // permanent data to be stored, it can write up to eeprom_data_size bytes + // into buff. + + static_assert(sizeof(Dgus.lcd_info) <= ExtUI::eeprom_data_size); + memcpy(buff, &Dgus.lcd_info, sizeof(Dgus.lcd_info)); + } + + void onLoadSettings(const char *buff) { + // Called while loading settings from EEPROM. If the ExtUI + // needs to retrieve data, it should copy up to eeprom_data_size bytes + // from buff + + static_assert(sizeof(Dgus.lcd_info) <= ExtUI::eeprom_data_size); + memcpy(&Dgus.lcd_info, buff, sizeof(Dgus.lcd_info)); + memcpy(&Dgus.lcd_info_back, buff, sizeof(Dgus.lcd_info_back)); + } + + void onPostprocessSettings() { + // Called after loading or resetting stored settings + Dgus.ParamInit(); + Dgus.PowerLoss(); + } + + void onSettingsStored(const bool success) { + // Called after the entire EEPROM has been written, + // whether successful or not. + } + + void onSettingsLoaded(const bool success) { + // Called after the entire EEPROM has been read, + // whether successful or not. + } + + #if HAS_MESH + void onLevelingStart() {} + void onLevelingDone() {} + + void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) { + // Called when any mesh points are updated + //SERIAL_ECHOLNPGM("onMeshUpdate() x:", xpos, " y:", ypos, " z:", zval); + } + + void onMeshUpdate(const int8_t xpos, const int8_t ypos, const probe_state_t state) { + // Called to indicate a special condition + //SERIAL_ECHOLNPGM("onMeshUpdate() x:", xpos, " y:", ypos, " state:", state); + } + #endif + + #if ENABLED(POWER_LOSS_RECOVERY) + // Called when power-loss is enabled/disabled + void onSetPowerLoss(const bool) { Dgus.PowerLoss(); } + // Called when power-loss state is detected + void onPowerLoss() { /* handled internally */ } + // Called on resume from power-loss + void onPowerLossResume() { Dgus.PowerLossRecovery(); } + #endif + + #if HAS_PID_HEATING + void onPidTuning(const result_t rst) { + // Called for temperature PID tuning result + switch (rst) { + case PID_STARTED: break; + case PID_BAD_HEATER_ID: break; + case PID_TEMP_TOO_HIGH: break; + case PID_TUNING_TIMEOUT: break; + case PID_DONE: break; + } + } + #endif + + void onSteppersDisabled() {} + void onSteppersEnabled() {} +} + +#endif // ANYCUBIC_LCD_VYPER diff --git a/Marlin/src/lcd/extui/ia_creality/creality_extui.cpp b/Marlin/src/lcd/extui/ia_creality/creality_extui.cpp index d92517578f..1f40f2a037 100644 --- a/Marlin/src/lcd/extui/ia_creality/creality_extui.cpp +++ b/Marlin/src/lcd/extui/ia_creality/creality_extui.cpp @@ -1580,7 +1580,7 @@ namespace ExtUI { else if (recdat.data[0] == 4) { // Page Up injectCommands(F("M22\nM21")); } - else if (recdat.data[0] == 0) { // return to main page + else if (recdat.data[0] == 0) { // return to main page InforShowStatus = true; TPShowStatus = false; } diff --git a/Marlin/src/lcd/extui/ui_api.cpp b/Marlin/src/lcd/extui/ui_api.cpp index 1075816c43..5c27b345c4 100644 --- a/Marlin/src/lcd/extui/ui_api.cpp +++ b/Marlin/src/lcd/extui/ui_api.cpp @@ -112,9 +112,9 @@ namespace ExtUI { static struct { - uint8_t printer_killed : 1; + bool printer_killed : 1; #if ENABLED(JOYSTICK) - uint8_t jogging : 1; + bool jogging : 1; #endif } flags; @@ -926,7 +926,7 @@ namespace ExtUI { void setMeshPoint(const xy_uint8_t &pos, const_float_t zoff) { if (WITHIN(pos.x, 0, (GRID_MAX_POINTS_X) - 1) && WITHIN(pos.y, 0, (GRID_MAX_POINTS_Y) - 1)) { bedlevel.z_values[pos.x][pos.y] = zoff; - TERN_(ABL_BILINEAR_SUBDIVISION, bed_level_virt_interpolate()); + TERN_(ABL_BILINEAR_SUBDIVISION, bedlevel.refresh_bed_level()); } } @@ -1127,6 +1127,13 @@ namespace ExtUI { #endif } + void onSurviveInKilled() { + thermalManager.disable_all_heaters(); + flags.printer_killed = 0; + marlin_state = MF_RUNNING; + //SERIAL_ECHOLNPGM("survived at: ", millis()); + } + FileList::FileList() { refresh(); } void FileList::refresh() { num_files = 0xFFFF; } diff --git a/Marlin/src/lcd/extui/ui_api.h b/Marlin/src/lcd/extui/ui_api.h index 98441ccdd9..d9594bace6 100644 --- a/Marlin/src/lcd/extui/ui_api.h +++ b/Marlin/src/lcd/extui/ui_api.h @@ -45,6 +45,7 @@ #include "../../inc/MarlinConfig.h" #include "../marlinui.h" #include "../../gcode/gcode.h" + #if M600_PURGE_MORE_RESUMABLE #include "../../feature/pause.h" #endif @@ -406,6 +407,7 @@ namespace ExtUI { void onMediaRemoved(); void onPlayTone(const uint16_t frequency, const uint16_t duration); void onPrinterKilled(FSTR_P const error, FSTR_P const component); + void onSurviveInKilled(); void onPrintTimerStarted(); void onPrintTimerPaused(); void onPrintTimerStopped(); diff --git a/Marlin/src/lcd/tft/ui_320x240.cpp b/Marlin/src/lcd/tft/ui_320x240.cpp index e8bec7e1a7..11e4730239 100644 --- a/Marlin/src/lcd/tft/ui_320x240.cpp +++ b/Marlin/src/lcd/tft/ui_320x240.cpp @@ -446,7 +446,7 @@ void MarlinUI::draw_status_screen() { #else 256, 130 #endif - , menu_main, imgSettings + , menu_main, imgSettings ); #if ENABLED(SDSUPPORT) const bool cm = card.isMounted(), pa = printingIsActive(); diff --git a/Marlin/src/libs/buzzer.h b/Marlin/src/libs/buzzer.h index cd8e17d004..aa4d48ae5d 100644 --- a/Marlin/src/libs/buzzer.h +++ b/Marlin/src/libs/buzzer.h @@ -27,7 +27,9 @@ #include "circularqueue.h" - #define TONE_QUEUE_LENGTH 4 + #ifndef TONE_QUEUE_LENGTH + #define TONE_QUEUE_LENGTH 4 + #endif /** * @brief Tone structure diff --git a/Marlin/src/libs/numtostr.cpp b/Marlin/src/libs/numtostr.cpp index 4cc40a96d1..2938229a7a 100644 --- a/Marlin/src/libs/numtostr.cpp +++ b/Marlin/src/libs/numtostr.cpp @@ -423,3 +423,34 @@ const char* ftostr52sp(const_float_t f) { } return &conv[1]; } + +// Convert unsigned 16bit int to string 1, 12, 123 format, capped at 999 +const char* utostr3(const uint16_t x) { + return i16tostr3left(_MIN(x, 999U)); +} + +// Convert signed float to space-padded string with 1.23, 12.34, 123.45 format +const char* ftostr52sprj(const_float_t f) { + long i = INTFLOAT(f, 2); + LIMIT(i, -99999, 99999); // cap to -999.99 - 999.99 range + if (WITHIN(i, -999, 999)) { // -9.99 - 9.99 range + conv[1] = conv[2] = ' '; // default to ' ' for smaller numbers + conv[3] = MINUSOR(i, ' '); + } + else if (WITHIN(i, -9999, 9999)) { // -99.99 - 99.99 range + conv[1] = ' '; + conv[2] = MINUSOR(i, ' '); + conv[3] = DIGIMOD(i, 1000); + } + else { // -999.99 - 999.99 range + conv[1] = MINUSOR(i, ' '); + conv[2] = DIGIMOD(i, 10000); + conv[3] = DIGIMOD(i, 1000); + } + conv[4] = DIGIMOD(i, 100); // always convert last 3 digits + conv[5] = '.'; + conv[6] = DIGIMOD(i, 10); + conv[7] = DIGIMOD(i, 1); + + return &conv[1]; +} diff --git a/Marlin/src/libs/numtostr.h b/Marlin/src/libs/numtostr.h index 0c8ce0f79a..31e8db0048 100644 --- a/Marlin/src/libs/numtostr.h +++ b/Marlin/src/libs/numtostr.h @@ -129,3 +129,9 @@ FORCE_INLINE const char* ftostr3(const_float_t x) { return i16tostr3rj(int16_t(x // Convert float to rj string with 1234, _123, -123, __12, _-12, ___1, or __-1 format FORCE_INLINE const char* ftostr4sign(const_float_t x) { return i16tostr4signrj(int16_t(x + (x < 0 ? -0.5f : 0.5f))); } #endif + +// Convert unsigned int to string 1, 12, 123 format, capped at 999 +const char* utostr3(const uint16_t x); + +// Convert signed float to space-padded string with 1.23, 12.34, 123.45 format +const char* ftostr52sprj(const_float_t f); diff --git a/Marlin/src/pins/gd32f1/env_validate.h b/Marlin/src/pins/gd32f1/env_validate.h new file mode 100644 index 0000000000..4b07cce4e5 --- /dev/null +++ b/Marlin/src/pins/gd32f1/env_validate.h @@ -0,0 +1,32 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2023 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 + +#if NOT_TARGET(__STM32F1__, STM32F1) + #if DISABLED(ALLOW_STM32F4) + #error "Oops! Select an STM32F1 board in 'Tools > Board.'" + #elif NOT_TARGET(STM32F4) + #error "Oops! Select an STM32F4 board in 'Tools > Board.'" + #endif +#endif + +#undef ALLOW_STM32F4 diff --git a/Marlin/src/pins/gd32f1/pins_TRIGORILLA_V006.h b/Marlin/src/pins/gd32f1/pins_TRIGORILLA_V006.h new file mode 100644 index 0000000000..7b8c412bed --- /dev/null +++ b/Marlin/src/pins/gd32f1/pins_TRIGORILLA_V006.h @@ -0,0 +1,152 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2023 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 + +#include "env_validate.h" + +#define BOARD_INFO_NAME "TRIGORILLA_V006" +#define DEFAULT_MACHINE_NAME "GD32F103" + +#define BOARD_NO_NATIVE_USB + +// Release PA13 from SWD for CASE_LIGHT_PIN +#define DISABLE_DEBUG +#define DISABLE_JTAG + +// +// EEPROM +// +#define FLASH_EEPROM_EMULATION +#define MARLIN_EEPROM_SIZE 0x1000 // 4KB + +// +// Limit Switches +// +#define X_MIN_PIN PA7 +#define X_MAX_PIN PC6 +#define Y_MIN_PIN PC5 +#define Y_MAX_PIN -1 +#define Z_MIN_PIN PB2 +#define Z_MAX_PIN -1 + +// +// Steppers +// +#define X_ENABLE_PIN PC3 +#define X_STEP_PIN PC2 +#define X_DIR_PIN PB9 + +#define Y_ENABLE_PIN PC13 +#define Y_STEP_PIN PB8 +#define Y_DIR_PIN PB7 + +#define Z_ENABLE_PIN PC14 +#define Z_STEP_PIN PB6 +#define Z_DIR_PIN PB5 + +#define E0_ENABLE_PIN PA15 +#define E0_STEP_PIN PB4 +#define E0_DIR_PIN PB3 + +#define E1_ENABLE_PIN PC15 +#define E1_STEP_PIN PC0 +#define E1_DIR_PIN PC1 + +// +// Temperature Sensors +// +#define TEMP_0_PIN PC4 // T0 +#define TEMP_1_PIN -1 // T1 PA6 used for power loss +#define TEMP_BED_PIN PB0 // TB + +// +// Heaters +// +#define HEATER_0_PIN PA1 // H0 +#define HEATER_1_PIN PA8 // H1 +#define HEATER_BED_PIN PA4 // HB + +// +// Fans +// +#define FAN_PIN PA0 // FAN +#define FAN1_PIN PA14 // Connected to +24V +#define FAN2_PIN -1 // PB1, auto fan for E0 +#define CONTROLLER_FAN_PIN FAN1_PIN + +// +// Misc +// +#define BEEPER_PIN PB15 +#define LED_PIN -1 +#define POWER_LOSS_PIN PA6 +#define FIL_RUNOUT_PIN PA5 +#define CASE_LIGHT_PIN PA13 +#define POWER_MONITOR_VOLTAGE_PIN PA6 + +#define AUTO_LEVEL_TX_PIN PB13 +#define AUTO_LEVEL_RX_PIN PB12 + +#ifndef Z_MIN_PROBE_PIN + #define Z_MIN_PROBE_PIN AUTO_LEVEL_RX_PIN +#endif + +// +// SD Card +// +#define SD_DETECT_PIN PC7 + +#ifndef SDIO_SUPPORT + #define SDIO_SUPPORT +#endif +#if ENABLED(SDIO_SUPPORT) + // + // SPI + // + #define SPI_DEVICE -1 + #define SCK_PIN -1 + #define MISO_PIN -1 + #define MOSI_PIN -1 + #define SS_PIN -1 + + // + // SDIO + // + #define SDIO_READ_RETRIES 16 + #define SDIO_D0_PIN PC8 + #define SDIO_D1_PIN PC9 + #define SDIO_D2_PIN PC10 + #define SDIO_D3_PIN PC11 + #define SDIO_CK_PIN PC12 + #define SDIO_CMD_PIN PD2 + +#else + + #undef SDSS + #define SDSS PC11 // SDIO_D3_PIN + #define SS_PIN SDSS + #define SCK_PIN PC12 // SDIO_CK_PIN + #define MISO_PIN PC8 // SDIO_D0_PIN + #define MOSI_PIN PD2 // SDIO_CMD_PIN + #define SOFTWARE_SPI + +#endif diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index 62ddba06f5..bead9d1f06 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -629,6 +629,8 @@ #include "stm32f1/pins_PANDA_PI_V29.h" // STM32F103RCT6 env:PANDA_PI_V29 #elif MB(SOVOL_V131) #include "stm32f1/pins_SOVOL_V131.h" // GD32F1 env:GD32F103RET6_sovol_maple +#elif MB(TRIGORILLA_V006) + #include "gd32f1/pins_TRIGORILLA_V006.h" // GD32F103 env:trigorilla_v006 // // ARM Cortex-M4F diff --git a/Marlin/src/sd/cardreader.cpp b/Marlin/src/sd/cardreader.cpp index fb2721a2b2..8a4fa743d4 100644 --- a/Marlin/src/sd/cardreader.cpp +++ b/Marlin/src/sd/cardreader.cpp @@ -420,6 +420,40 @@ void CardReader::ls(const uint8_t lsflags) { SERIAL_EOL(); } + void CardReader::getLongPath(char * const pathLong, char * const pathShort) { + + int i, pathLen = strlen(pathShort); + char bufShort[FILENAME_LENGTH] = { '\0' }; + strcpy_P(bufShort, pathShort); + + // Zero out slashes to make segments + for (i = 0; i < pathLen; i++) if (bufShort[i] == '/') bufShort[i] = '\0'; + + SdFile diveDir = root; // start from the root for segment 1 + for (i = 0; i < pathLen;) { + + if (bufShort[i] == '\0') i++; // move past a single nul + + char *segment = &bufShort[i]; // The segment after most slashes + + // If a segment is empty (extra-slash) then exit + if (!*segment) break; + + //SERIAL_ECHOLNPGM("Looking for segment: ", segment); + + // Find the item, setting the long filename + diveDir.rewind(); + selectByName(diveDir, segment); + diveDir.close(); + + if (longFilename[0]) { + strncpy_P(pathLong, longFilename, 63); + pathLong[63] = '\0'; + break; + } + } + } + #endif // LONG_FILENAME_HOST_SUPPORT // diff --git a/Marlin/src/sd/cardreader.h b/Marlin/src/sd/cardreader.h index 86acb1b862..47e3c66e47 100644 --- a/Marlin/src/sd/cardreader.h +++ b/Marlin/src/sd/cardreader.h @@ -146,6 +146,7 @@ public: static char* longest_filename() { return longFilename[0] ? longFilename : filename; } #if ENABLED(LONG_FILENAME_HOST_SUPPORT) static void printLongPath(char * const path); // Used by M33 + static void getLongPath(char * const pathLong, char * const pathShort); // Used by anycubic_vyper #endif // Working Directory for SD card menu diff --git a/ini/features.ini b/ini/features.ini index 35b6959fd9..11ffca6ba6 100644 --- a/ini/features.ini +++ b/ini/features.ini @@ -81,6 +81,7 @@ HAS_MENU_TOUCH_SCREEN = src_filter=+ HAS_MENU_UBL = src_filter=+ ANYCUBIC_LCD_CHIRON = src_filter=+ +ANYCUBIC_LCD_VYPER = src_filter=+ ANYCUBIC_LCD_I3MEGA = src_filter=+ HAS_DGUS_LCD_CLASSIC = src_filter=+ DGUS_LCD_UI_RELOADED = src_filter=+ diff --git a/ini/stm32f1.ini b/ini/stm32f1.ini index 1adc83a8f9..783d05fab4 100644 --- a/ini/stm32f1.ini +++ b/ini/stm32f1.ini @@ -134,6 +134,16 @@ monitor_speed = 115200 debug_tool = jlink upload_protocol = jlink +# +# Trigorilla V0.0.6 (GD32F103) +# modified version of env:STM32F103RE_creality +# +[env:trigorilla_v006] +extends = STM32F103Rx_creality +board = genericSTM32F103RE +board_build.offset = 0x8000 +board_upload.offset_address = 0x08008000 + # # Creality (STM32F103Rx) # With custom upload to SD via Marlin with binary protocol. diff --git a/platformio.ini b/platformio.ini index f8a8988ef8..9fbc589d2e 100644 --- a/platformio.ini +++ b/platformio.ini @@ -81,6 +81,7 @@ default_src_filter = + - - + - - - + - - - - - - - - From 48b7c7911340300905940ad490678514a18492fe Mon Sep 17 00:00:00 2001 From: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Sun, 26 Mar 2023 02:09:27 -0700 Subject: [PATCH 084/225] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20Touch=20Calibratio?= =?UTF-8?q?n=20first=20point=20(#25298)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp | 3 ++- Marlin/src/lcd/tft/touch.cpp | 2 +- Marlin/src/lcd/tft_io/touch_calibration.cpp | 9 +++++---- Marlin/src/lcd/tft_io/touch_calibration.h | 6 ++++-- Marlin/src/lcd/touch/touch_buttons.cpp | 2 +- 5 files changed, 13 insertions(+), 9 deletions(-) diff --git a/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp b/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp index 2248ef334f..08db5ae7ad 100644 --- a/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp +++ b/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp @@ -492,6 +492,7 @@ void lv_encoder_pin_init() { } #if 1 // HAS_ENCODER_ACTION + void lv_update_encoder() { static uint32_t encoder_time1; uint32_t tmpTime, diffTime = 0; @@ -552,7 +553,7 @@ void lv_encoder_pin_init() { #endif // HAS_ENCODER_WHEEL - } // next_button_update_ms + } // encoder_time1 } #endif // HAS_ENCODER_ACTION diff --git a/Marlin/src/lcd/tft/touch.cpp b/Marlin/src/lcd/tft/touch.cpp index b73f67e744..9482c85a47 100644 --- a/Marlin/src/lcd/tft/touch.cpp +++ b/Marlin/src/lcd/tft/touch.cpp @@ -152,7 +152,7 @@ void Touch::touch(touch_control_t *control) { case CALIBRATE: if (touch_calibration.handleTouch(x, y)) ui.refresh(); break; - #endif // TOUCH_SCREEN_CALIBRATION + #endif case MENU_SCREEN: ui.goto_screen((screenFunc_t)control->data); break; case BACK: ui.goto_previous_screen(); break; diff --git a/Marlin/src/lcd/tft_io/touch_calibration.cpp b/Marlin/src/lcd/tft_io/touch_calibration.cpp index b1ef17df17..c239a94b41 100644 --- a/Marlin/src/lcd/tft_io/touch_calibration.cpp +++ b/Marlin/src/lcd/tft_io/touch_calibration.cpp @@ -41,6 +41,7 @@ touch_calibration_t TouchCalibration::calibration; calibrationState TouchCalibration::calibration_state = CALIBRATION_NONE; touch_calibration_point_t TouchCalibration::calibration_points[4]; uint8_t TouchCalibration::failed_count; +millis_t TouchCalibration::next_touch_update_ms; // = 0; void TouchCalibration::validate_calibration() { #define VALIDATE_PRECISION(XY, A, B) validate_precision_##XY(CALIBRATION_##A, CALIBRATION_##B) @@ -89,11 +90,11 @@ void TouchCalibration::validate_calibration() { } } -bool TouchCalibration::handleTouch(uint16_t x, uint16_t y) { - static millis_t next_button_update_ms = 0; +bool TouchCalibration::handleTouch(const uint16_t x, const uint16_t y) { const millis_t now = millis(); - if (PENDING(now, next_button_update_ms)) return false; - next_button_update_ms = now + BUTTON_DELAY_MENU; + + if (next_touch_update_ms && PENDING(now, next_touch_update_ms)) return false; + next_touch_update_ms = now + BUTTON_DELAY_MENU; if (calibration_state < CALIBRATION_SUCCESS) { calibration_points[calibration_state].raw_x = x; diff --git a/Marlin/src/lcd/tft_io/touch_calibration.h b/Marlin/src/lcd/tft_io/touch_calibration.h index abd5667700..030b4977db 100644 --- a/Marlin/src/lcd/tft_io/touch_calibration.h +++ b/Marlin/src/lcd/tft_io/touch_calibration.h @@ -57,6 +57,7 @@ class TouchCalibration { public: static calibrationState calibration_state; static touch_calibration_point_t calibration_points[4]; + static millis_t next_touch_update_ms; static bool validate_precision(int32_t a, int32_t b) { return (a > b ? (100 * b) / a : (100 * a) / b) > TOUCH_SCREEN_CALIBRATION_PRECISION; } static bool validate_precision_x(uint8_t a, uint8_t b) { return validate_precision(calibration_points[a].raw_x, calibration_points[b].raw_x); } @@ -64,11 +65,12 @@ public: static void validate_calibration(); static touch_calibration_t calibration; - static uint8_t failed_count; + static uint8_t failed_count; static void calibration_reset() { calibration = { TOUCH_CALIBRATION_X, TOUCH_CALIBRATION_Y, TOUCH_OFFSET_X, TOUCH_OFFSET_Y, TOUCH_ORIENTATION }; } static bool need_calibration() { return !calibration.offset_x && !calibration.offset_y && !calibration.x && !calibration.y; } static calibrationState calibration_start() { + next_touch_update_ms = millis() + 750UL; calibration = { 0, 0, 0, 0, TOUCH_ORIENTATION_NONE }; calibration_state = CALIBRATION_TOP_LEFT; calibration_points[CALIBRATION_TOP_LEFT].x = 30; @@ -89,7 +91,7 @@ public: return !need_calibration(); } - static bool handleTouch(uint16_t x, uint16_t y); + static bool handleTouch(const uint16_t x, const uint16_t y); }; extern TouchCalibration touch_calibration; diff --git a/Marlin/src/lcd/touch/touch_buttons.cpp b/Marlin/src/lcd/touch/touch_buttons.cpp index d641dd3b1c..08554de0d3 100644 --- a/Marlin/src/lcd/touch/touch_buttons.cpp +++ b/Marlin/src/lcd/touch/touch_buttons.cpp @@ -91,7 +91,7 @@ uint8_t TouchButtons::read_buttons() { y = uint16_t((uint32_t(y) * TOUCH_CALIBRATION_Y) >> 16) + TOUCH_OFFSET_Y; #endif #elif ENABLED(TFT_TOUCH_DEVICE_GT911) - bool is_touched = (TOUCH_ORIENTATION == TOUCH_PORTRAIT ? touchIO.getPoint(&y, &x) : touchIO.getPoint(&x, &y)); + const bool is_touched = (TOUCH_ORIENTATION == TOUCH_PORTRAIT ? touchIO.getPoint(&y, &x) : touchIO.getPoint(&x, &y)); if (!is_touched) return 0; #endif From 24a9a66f0a238cb59cc6bfc7ff235713eefc3614 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 26 Mar 2023 04:36:12 -0500 Subject: [PATCH 085/225] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Aut?= =?UTF-8?q?o=20Fan=20/=20Cooler=20Fan=20updates=20(#25554)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/Conditionals_post.h | 22 +++++- Marlin/src/inc/SanityCheck.h | 21 +---- Marlin/src/module/temperature.cpp | 123 +++++++++++++++-------------- 3 files changed, 84 insertions(+), 82 deletions(-) diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 6e0c6c95a8..edd3edf246 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -2572,10 +2572,21 @@ #if ANY(HAS_AUTO_FAN_0, HAS_AUTO_FAN_1, HAS_AUTO_FAN_2, HAS_AUTO_FAN_3, HAS_AUTO_FAN_4, HAS_AUTO_FAN_5, HAS_AUTO_FAN_6, HAS_AUTO_FAN_7, HAS_AUTO_CHAMBER_FAN, HAS_AUTO_COOLER_FAN) #define HAS_AUTO_FAN 1 -#endif -#define _FANOVERLAP(A,B) (A##_AUTO_FAN_PIN == E##B##_AUTO_FAN_PIN) -#if HAS_AUTO_FAN && (_FANOVERLAP(CHAMBER,0) || _FANOVERLAP(CHAMBER,1) || _FANOVERLAP(CHAMBER,2) || _FANOVERLAP(CHAMBER,3) || _FANOVERLAP(CHAMBER,4) || _FANOVERLAP(CHAMBER,5) || _FANOVERLAP(CHAMBER,6) || _FANOVERLAP(CHAMBER,7)) - #define AUTO_CHAMBER_IS_E 1 + #define _FANOVERLAP(I,T) (T##_AUTO_FAN_PIN == E##I##_AUTO_FAN_PIN) + #if HAS_AUTO_CHAMBER_FAN + #define _CHFANOVERLAP(I) || _FANOVERLAP(I,CHAMBER) + #if (0 REPEAT(8, _CHFANOVERLAP)) + #define AUTO_CHAMBER_IS_E 1 + #endif + #undef _CHFANOVERLAP + #endif + #if HAS_AUTO_COOLER_FAN + #define _COFANOVERLAP(I) || _FANOVERLAP(I,COOLER) + #if (0 REPEAT(8, _COFANOVERLAP)) + #define AUTO_COOLER_IS_E 1 + #endif + #undef _COFANOVERLAP + #endif #endif // Fans check @@ -2620,6 +2631,9 @@ #if !HAS_AUTO_CHAMBER_FAN || AUTO_CHAMBER_IS_E #undef AUTO_POWER_CHAMBER_FAN #endif +#if !HAS_AUTO_COOLER_FAN || AUTO_COOLER_IS_E + #undef AUTO_POWER_COOLER_FAN +#endif // Print Cooling fans (limit) #ifdef NUM_M106_FANS diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index e67a4c9e49..6946db3911 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -3043,24 +3043,9 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS * Auto Fan check for PWM pins */ #if HAS_AUTO_FAN && EXTRUDER_AUTO_FAN_SPEED != 255 - #define AF_ERR_SUFF "_AUTO_FAN_PIN is not a PWM pin. Set EXTRUDER_AUTO_FAN_SPEED to 255." - #if HAS_AUTO_FAN_0 - static_assert(_TEST_PWM(E0_AUTO_FAN_PIN), "E0" AF_ERR_SUFF); - #elif HAS_AUTO_FAN_1 - static_assert(_TEST_PWM(E1_AUTO_FAN_PIN), "E1" AF_ERR_SUFF); - #elif HAS_AUTO_FAN_2 - static_assert(_TEST_PWM(E2_AUTO_FAN_PIN), "E2" AF_ERR_SUFF); - #elif HAS_AUTO_FAN_3 - static_assert(_TEST_PWM(E3_AUTO_FAN_PIN), "E3" AF_ERR_SUFF); - #elif HAS_AUTO_FAN_4 - static_assert(_TEST_PWM(E4_AUTO_FAN_PIN), "E4" AF_ERR_SUFF); - #elif HAS_AUTO_FAN_5 - static_assert(_TEST_PWM(E5_AUTO_FAN_PIN), "E5" AF_ERR_SUFF); - #elif HAS_AUTO_FAN_6 - static_assert(_TEST_PWM(E6_AUTO_FAN_PIN), "E6" AF_ERR_SUFF); - #elif HAS_AUTO_FAN_7 - static_assert(_TEST_PWM(E7_AUTO_FAN_PIN), "E7" AF_ERR_SUFF); - #endif + #define AF_ASSERT(N) OPTCODE(HAS_AUTO_FAN_##N, static_assert(_TEST_PWM(E##N##_AUTO_FAN_PIN), "E" STRINGIFY(N) "_AUTO_FAN_PIN is not a PWM pin. Set EXTRUDER_AUTO_FAN_SPEED to 255.")) + REPEAT(8, AF_ASSERT) + #undef AF_ASSERT #endif /** diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index ad467070d1..180dbbc5ad 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -1194,44 +1194,55 @@ int16_t Temperature::getHeaterPower(const heater_id_t heater_id) { } } -#define _EFANOVERLAP(A,B) _FANOVERLAP(E##A,B) - #if HAS_AUTO_FAN + #define _EFANOVERLAP(I,N) ((I != N) && _FANOVERLAP(I,E##N)) + #if EXTRUDER_AUTO_FAN_SPEED != 255 - #define INIT_E_AUTO_FAN_PIN(P) do{ if (P == FAN1_PIN || P == FAN2_PIN) { SET_PWM(P); SET_FAST_PWM_FREQ(P); } else SET_OUTPUT(P); }while(0) + #define INIT_E_AUTO_FAN_PIN(P) do{ if (PWM_PIN(P)) { SET_PWM(P); SET_FAST_PWM_FREQ(P); } else SET_OUTPUT(P); }while(0) #else #define INIT_E_AUTO_FAN_PIN(P) SET_OUTPUT(P) #endif #if CHAMBER_AUTO_FAN_SPEED != 255 - #define INIT_CHAMBER_AUTO_FAN_PIN(P) do{ if (P == FAN1_PIN || P == FAN2_PIN) { SET_PWM(P); SET_FAST_PWM_FREQ(P); } else SET_OUTPUT(P); }while(0) + #define INIT_CHAMBER_AUTO_FAN_PIN(P) do{ if (PWM_PIN(P)) { SET_PWM(P); SET_FAST_PWM_FREQ(P); } else SET_OUTPUT(P); }while(0) #else #define INIT_CHAMBER_AUTO_FAN_PIN(P) SET_OUTPUT(P) #endif + #if COOLER_AUTO_FAN_SPEED != 255 + #define INIT_COOLER_AUTO_FAN_PIN(P) do{ if (PWM_PIN(P)) { SET_PWM(P); SET_FAST_PWM_FREQ(P); } else SET_OUTPUT(P); }while(0) + #else + #define INIT_COOLER_AUTO_FAN_PIN(P) SET_OUTPUT(P) + #endif #ifndef CHAMBER_FAN_INDEX #define CHAMBER_FAN_INDEX HOTENDS #endif void Temperature::update_autofans() { - #define _EFAN(B,A) _EFANOVERLAP(A,B) ? B : + #define _EFAN(I,N) _EFANOVERLAP(I,N) ? I : static const uint8_t fanBit[] PROGMEM = { 0 #if HAS_MULTI_HOTEND #define _NEXT_FAN(N) , REPEAT2(N,_EFAN,N) N RREPEAT_S(1, HOTENDS, _NEXT_FAN) #endif + #define _NFAN HOTENDS #if HAS_AUTO_CHAMBER_FAN - #define _CFAN(B) _FANOVERLAP(CHAMBER,B) ? B : - , REPEAT(HOTENDS,_CFAN) (HOTENDS) + #define _CHFAN(I) _FANOVERLAP(I,CHAMBER) ? I : + , (REPEAT(HOTENDS,_CHFAN) (_NFAN)) + #undef _NFAN + #define _NFAN INCREMENT(HOTENDS) + #endif + #if HAS_AUTO_COOLER_FAN + #define _COFAN(I) _FANOVERLAP(I,COOLER) ? I : + , (REPEAT(HOTENDS,_COFAN) (_NFAN)) #endif }; uint8_t fanState = 0; HOTEND_LOOP() { - if (temp_hotend[e].celsius >= EXTRUDER_AUTO_FAN_TEMPERATURE) { + if (temp_hotend[e].celsius >= EXTRUDER_AUTO_FAN_TEMPERATURE) SBI(fanState, pgm_read_byte(&fanBit[e])); - } } #if HAS_AUTO_CHAMBER_FAN @@ -1262,6 +1273,11 @@ int16_t Temperature::getHeaterPower(const heater_id_t heater_id) { chamberfan_speed = fan_on ? CHAMBER_AUTO_FAN_SPEED : 0; break; #endif + #if ENABLED(AUTO_POWER_COOLER_FAN) + case COOLER_FAN_INDEX: + coolerfan_speed = fan_on ? COOLER_AUTO_FAN_SPEED : 0; + break; + #endif default: #if EITHER(AUTO_POWER_E_FANS, HAS_FANCHECK) autofan_speed[realFan] = fan_on ? EXTRUDER_AUTO_FAN_SPEED : 0; @@ -1275,35 +1291,16 @@ int16_t Temperature::getHeaterPower(const heater_id_t heater_id) { #define _AUTOFAN_SPEED() EXTRUDER_AUTO_FAN_SPEED #endif #define _AUTOFAN_CASE(N) case N: _UPDATE_AUTO_FAN(E##N, fan_on, _AUTOFAN_SPEED()); break + #define AUTOFAN_CASE(N) OPTCODE(HAS_AUTO_FAN_##N, _AUTOFAN_CASE(N)) switch (f) { - #if HAS_AUTO_FAN_0 - _AUTOFAN_CASE(0); - #endif - #if HAS_AUTO_FAN_1 - _AUTOFAN_CASE(1); - #endif - #if HAS_AUTO_FAN_2 - _AUTOFAN_CASE(2); - #endif - #if HAS_AUTO_FAN_3 - _AUTOFAN_CASE(3); - #endif - #if HAS_AUTO_FAN_4 - _AUTOFAN_CASE(4); - #endif - #if HAS_AUTO_FAN_5 - _AUTOFAN_CASE(5); - #endif - #if HAS_AUTO_FAN_6 - _AUTOFAN_CASE(6); - #endif - #if HAS_AUTO_FAN_7 - _AUTOFAN_CASE(7); - #endif + REPEAT(8, AUTOFAN_CASE) #if HAS_AUTO_CHAMBER_FAN && !AUTO_CHAMBER_IS_E case CHAMBER_FAN_INDEX: _UPDATE_AUTO_FAN(CHAMBER, fan_on, CHAMBER_AUTO_FAN_SPEED); break; #endif + #if HAS_AUTO_COOLER_FAN && !AUTO_COOLER_IS_E + case COOLER_FAN_INDEX: _UPDATE_AUTO_FAN(COOLER, fan_on, COOLER_AUTO_FAN_SPEED); break; + #endif } SBI(fanDone, realFan); } @@ -2737,33 +2734,39 @@ void Temperature::init() { HAL_timer_start(MF_TIMER_TEMP, TEMP_TIMER_FREQUENCY); ENABLE_TEMPERATURE_INTERRUPT(); - #if HAS_AUTO_FAN_0 - INIT_E_AUTO_FAN_PIN(E0_AUTO_FAN_PIN); - #endif - #if HAS_AUTO_FAN_1 && !_EFANOVERLAP(1,0) - INIT_E_AUTO_FAN_PIN(E1_AUTO_FAN_PIN); - #endif - #if HAS_AUTO_FAN_2 && !(_EFANOVERLAP(2,0) || _EFANOVERLAP(2,1)) - INIT_E_AUTO_FAN_PIN(E2_AUTO_FAN_PIN); - #endif - #if HAS_AUTO_FAN_3 && !(_EFANOVERLAP(3,0) || _EFANOVERLAP(3,1) || _EFANOVERLAP(3,2)) - INIT_E_AUTO_FAN_PIN(E3_AUTO_FAN_PIN); - #endif - #if HAS_AUTO_FAN_4 && !(_EFANOVERLAP(4,0) || _EFANOVERLAP(4,1) || _EFANOVERLAP(4,2) || _EFANOVERLAP(4,3)) - INIT_E_AUTO_FAN_PIN(E4_AUTO_FAN_PIN); - #endif - #if HAS_AUTO_FAN_5 && !(_EFANOVERLAP(5,0) || _EFANOVERLAP(5,1) || _EFANOVERLAP(5,2) || _EFANOVERLAP(5,3) || _EFANOVERLAP(5,4)) - INIT_E_AUTO_FAN_PIN(E5_AUTO_FAN_PIN); - #endif - #if HAS_AUTO_FAN_6 && !(_EFANOVERLAP(6,0) || _EFANOVERLAP(6,1) || _EFANOVERLAP(6,2) || _EFANOVERLAP(6,3) || _EFANOVERLAP(6,4) || _EFANOVERLAP(6,5)) - INIT_E_AUTO_FAN_PIN(E6_AUTO_FAN_PIN); - #endif - #if HAS_AUTO_FAN_7 && !(_EFANOVERLAP(7,0) || _EFANOVERLAP(7,1) || _EFANOVERLAP(7,2) || _EFANOVERLAP(7,3) || _EFANOVERLAP(7,4) || _EFANOVERLAP(7,5) || _EFANOVERLAP(7,6)) - INIT_E_AUTO_FAN_PIN(E7_AUTO_FAN_PIN); - #endif - #if HAS_AUTO_CHAMBER_FAN && !AUTO_CHAMBER_IS_E - INIT_CHAMBER_AUTO_FAN_PIN(CHAMBER_AUTO_FAN_PIN); - #endif + #if HAS_AUTO_FAN + #define _OREFAN(I,N) || _EFANOVERLAP(I,N) + #if HAS_AUTO_FAN_0 + INIT_E_AUTO_FAN_PIN(E0_AUTO_FAN_PIN); + #endif + #if HAS_AUTO_FAN_1 && !_EFANOVERLAP(0,1) + INIT_E_AUTO_FAN_PIN(E1_AUTO_FAN_PIN); + #endif + #if HAS_AUTO_FAN_2 && !(0 REPEAT2(2, _OREFAN, 2)) + INIT_E_AUTO_FAN_PIN(E2_AUTO_FAN_PIN); + #endif + #if HAS_AUTO_FAN_3 && !(0 REPEAT2(3, _OREFAN, 3)) + INIT_E_AUTO_FAN_PIN(E3_AUTO_FAN_PIN); + #endif + #if HAS_AUTO_FAN_4 && !(0 REPEAT2(4, _OREFAN, 4)) + INIT_E_AUTO_FAN_PIN(E4_AUTO_FAN_PIN); + #endif + #if HAS_AUTO_FAN_5 && !(0 REPEAT2(5, _OREFAN, 5)) + INIT_E_AUTO_FAN_PIN(E5_AUTO_FAN_PIN); + #endif + #if HAS_AUTO_FAN_6 && !(0 REPEAT2(6, _OREFAN, 6)) + INIT_E_AUTO_FAN_PIN(E6_AUTO_FAN_PIN); + #endif + #if HAS_AUTO_FAN_7 && !(0 REPEAT2(7, _OREFAN, 7)) + INIT_E_AUTO_FAN_PIN(E7_AUTO_FAN_PIN); + #endif + #if HAS_AUTO_CHAMBER_FAN && !AUTO_CHAMBER_IS_E + INIT_CHAMBER_AUTO_FAN_PIN(CHAMBER_AUTO_FAN_PIN); + #endif + #if HAS_AUTO_COOLER_FAN && !AUTO_COOLER_IS_E + INIT_COOLER_AUTO_FAN_PIN(COOLER_AUTO_FAN_PIN); + #endif + #endif // HAS_AUTO_FAN #if HAS_HOTEND #define _TEMP_MIN_E(NR) do{ \ From 241c06218822d63e47710acfa6885351fe495bc5 Mon Sep 17 00:00:00 2001 From: tombrazier <68918209+tombrazier@users.noreply.github.com> Date: Sun, 26 Mar 2023 10:46:55 +0100 Subject: [PATCH 086/225] =?UTF-8?q?=F0=9F=90=9B=20Prevent=20divide-by-zero?= =?UTF-8?q?=20in=20calc=5Ftimer=5Finterval=20(#25557)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/module/stepper.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index 5c0034a5f9..f7436e51d5 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -2094,7 +2094,8 @@ hal_timer_t Stepper::calc_timer_interval(uint32_t step_rate) { #ifdef CPU_32_BIT - return uint32_t(STEPPER_TIMER_RATE) / step_rate; // A fast processor can just do integer division + // A fast processor can just do integer division + return step_rate ? uint32_t(STEPPER_TIMER_RATE) / step_rate : HAL_TIMER_TYPE_MAX; #else From 39652d93ab09ee95059b1c08969b11b12db1e5a3 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 26 Mar 2023 17:14:51 -0500 Subject: [PATCH 087/225] =?UTF-8?q?=F0=9F=94=A7=20Sanity-check=20for=20end?= =?UTF-8?q?stop=20inverting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to #25574 --- Marlin/src/inc/SanityCheck.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 6946db3911..70dcd590fd 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -684,6 +684,14 @@ #error "SQUARE_WAVE_STEPPING is now EDGE_STEPPING." #elif defined(FAN_PIN) #error "FAN_PIN is now FAN0_PIN." +#elif defined(X_MIN_ENDSTOP_INVERTING) || defined(Y_MIN_ENDSTOP_INVERTING) || defined(Z_MIN_ENDSTOP_INVERTING) \ + || defined(I_MIN_ENDSTOP_INVERTING) || defined(J_MIN_ENDSTOP_INVERTING) || defined(K_MIN_ENDSTOP_INVERTING) \ + || defined(U_MIN_ENDSTOP_INVERTING) || defined(V_MIN_ENDSTOP_INVERTING) || defined(W_MIN_ENDSTOP_INVERTING) \ + || defined(X_MAX_ENDSTOP_INVERTING) || defined(Y_MAX_ENDSTOP_INVERTING) || defined(Z_MAX_ENDSTOP_INVERTING) \ + || defined(I_MAX_ENDSTOP_INVERTING) || defined(J_MAX_ENDSTOP_INVERTING) || defined(K_MAX_ENDSTOP_INVERTING) \ + || defined(U_MAX_ENDSTOP_INVERTING) || defined(V_MAX_ENDSTOP_INVERTING) || defined(W_MAX_ENDSTOP_INVERTING) \ + || defined(Z_MIN_PROBE_ENDSTOP_INVERTING) + #error "*_ENDSTOP_INVERTING false/true is now set with *_ENDSTOP_HIT_STATE HIGH/LOW." #endif // L64xx stepper drivers have been removed From 61f22f34d32ca33d99233eb5b242e52c23aabb23 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 26 Mar 2023 17:24:40 -0500 Subject: [PATCH 088/225] =?UTF-8?q?=F0=9F=94=A7=20Clarify=20axis=20disable?= =?UTF-8?q?=20/=20timeout=20(#25571)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration.h | 4 +- Marlin/Configuration_adv.h | 25 +++++------ Marlin/config.ini | 12 +++--- Marlin/src/MarlinCore.cpp | 22 +++++----- Marlin/src/gcode/control/M17_M18_M84.cpp | 2 +- Marlin/src/gcode/gcode.cpp | 4 +- Marlin/src/gcode/gcode.h | 2 +- Marlin/src/inc/Conditionals_LCD.h | 13 +++++- Marlin/src/inc/Conditionals_adv.h | 54 ++++++++++++++++++++---- Marlin/src/inc/Conditionals_post.h | 37 ---------------- Marlin/src/inc/SanityCheck.h | 22 ++++++---- Marlin/src/module/planner.cpp | 34 ++++++++------- Marlin/src/module/planner.h | 4 +- buildroot/tests/mega2560 | 2 +- buildroot/tests/rambo | 2 +- buildroot/tests/teensy35 | 2 +- buildroot/tests/teensy41 | 2 +- 17 files changed, 130 insertions(+), 113 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 7f6e7daed5..2f4b18a210 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -1710,8 +1710,8 @@ // @section extruder -//#define DISABLE_E // Disable the extruder when not stepping -#define DISABLE_INACTIVE_EXTRUDER // Keep only the active extruder enabled +//#define DISABLE_E // Disable the extruder when not stepping +#define DISABLE_OTHER_EXTRUDERS // Keep only the active extruder enabled // @section motion diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index e8fc947d3e..416caf22fc 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -1146,19 +1146,20 @@ /** * Idle Stepper Shutdown - * Enable DISABLE_INACTIVE_* to shut down axis steppers after an idle period. - * The Deactive Time can be overridden with M18 and M84. Set to 0 for No Timeout. + * Enable DISABLE_IDLE_* to shut down axis steppers after an idle period. + * The default timeout duration can be overridden with M18 and M84. Set to 0 for No Timeout. */ -#define DEFAULT_STEPPER_DEACTIVE_TIME 120 -#define DISABLE_INACTIVE_X -#define DISABLE_INACTIVE_Y -#define DISABLE_INACTIVE_Z // Disable if the nozzle could fall onto your printed part! -//#define DISABLE_INACTIVE_I -//#define DISABLE_INACTIVE_J -//#define DISABLE_INACTIVE_K -//#define DISABLE_INACTIVE_U -//#define DISABLE_INACTIVE_V -//#define DISABLE_INACTIVE_W +#define DEFAULT_STEPPER_TIMEOUT_SEC 120 +#define DISABLE_IDLE_X +#define DISABLE_IDLE_Y +#define DISABLE_IDLE_Z // Disable if the nozzle could fall onto your printed part! +//#define DISABLE_IDLE_I +//#define DISABLE_IDLE_J +//#define DISABLE_IDLE_K +//#define DISABLE_IDLE_U +//#define DISABLE_IDLE_V +//#define DISABLE_IDLE_W +#define DISABLE_IDLE_E // Shut down all idle extruders // Default Minimum Feedrates for printing and travel moves #define DEFAULT_MINIMUMFEEDRATE 0.0 // (mm/s. °/s for rotational-only moves) Minimum feedrate. Set with M205 S. diff --git a/Marlin/config.ini b/Marlin/config.ini index 65058a500d..0ac8187179 100644 --- a/Marlin/config.ini +++ b/Marlin/config.ini @@ -127,7 +127,7 @@ busy_while_heating = on default_ejerk = 5.0 default_keepalive_interval = 2 default_leveling_fade_height = 0.0 -disable_inactive_extruder = on +disable_other_extruders = on display_charset_hd44780 = JAPANESE eeprom_boot_silent = on eeprom_chitchat = on @@ -176,12 +176,12 @@ auto_report_temperatures = on autotemp = on autotemp_oldweight = 0.98 bed_check_interval = 5000 -default_stepper_deactive_time = 120 +default_stepper_timeout_sec = 120 default_volumetric_extruder_limit = 0.00 -disable_inactive_extruder = true -disable_inactive_x = true -disable_inactive_y = true -disable_inactive_z = true +disable_idle_x = on +disable_idle_y = on +disable_idle_z = on +disable_idle_e = on e0_auto_fan_pin = -1 encoder_100x_steps_per_sec = 80 encoder_10x_steps_per_sec = 30 diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index 342f8812d8..3ab01b0348 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -429,7 +429,7 @@ inline void manage_inactivity(const bool no_stepper_sleep=false) { if (has_blocks) gcode.reset_stepper_timeout(ms); // Reset timeout for M18/M84, M85 max 'kill', and laser. // M18 / M84 : Handle steppers inactive time timeout - #if HAS_DISABLE_INACTIVE_AXIS + #if HAS_DISABLE_IDLE_AXES if (gcode.stepper_inactive_time) { static bool already_shutdown_steppers; // = false @@ -439,16 +439,16 @@ inline void manage_inactivity(const bool no_stepper_sleep=false) { already_shutdown_steppers = true; // Individual axes will be disabled if configured - TERN_(DISABLE_INACTIVE_X, stepper.disable_axis(X_AXIS)); - TERN_(DISABLE_INACTIVE_Y, stepper.disable_axis(Y_AXIS)); - TERN_(DISABLE_INACTIVE_Z, stepper.disable_axis(Z_AXIS)); - TERN_(DISABLE_INACTIVE_I, stepper.disable_axis(I_AXIS)); - TERN_(DISABLE_INACTIVE_J, stepper.disable_axis(J_AXIS)); - TERN_(DISABLE_INACTIVE_K, stepper.disable_axis(K_AXIS)); - TERN_(DISABLE_INACTIVE_U, stepper.disable_axis(U_AXIS)); - TERN_(DISABLE_INACTIVE_V, stepper.disable_axis(V_AXIS)); - TERN_(DISABLE_INACTIVE_W, stepper.disable_axis(W_AXIS)); - TERN_(DISABLE_INACTIVE_EXTRUDER, stepper.disable_e_steppers()); + TERN_(DISABLE_IDLE_X, stepper.disable_axis(X_AXIS)); + TERN_(DISABLE_IDLE_Y, stepper.disable_axis(Y_AXIS)); + TERN_(DISABLE_IDLE_Z, stepper.disable_axis(Z_AXIS)); + TERN_(DISABLE_IDLE_I, stepper.disable_axis(I_AXIS)); + TERN_(DISABLE_IDLE_J, stepper.disable_axis(J_AXIS)); + TERN_(DISABLE_IDLE_K, stepper.disable_axis(K_AXIS)); + TERN_(DISABLE_IDLE_U, stepper.disable_axis(U_AXIS)); + TERN_(DISABLE_IDLE_V, stepper.disable_axis(V_AXIS)); + TERN_(DISABLE_IDLE_W, stepper.disable_axis(W_AXIS)); + TERN_(DISABLE_IDLE_E, stepper.disable_e_steppers()); TERN_(AUTO_BED_LEVELING_UBL, bedlevel.steppers_were_disabled()); } diff --git a/Marlin/src/gcode/control/M17_M18_M84.cpp b/Marlin/src/gcode/control/M17_M18_M84.cpp index 4ff48568fa..76fc335e25 100644 --- a/Marlin/src/gcode/control/M17_M18_M84.cpp +++ b/Marlin/src/gcode/control/M17_M18_M84.cpp @@ -212,7 +212,7 @@ void try_to_disable(const stepper_flags_t to_disable) { void GcodeSuite::M18_M84() { if (parser.seenval('S')) { reset_stepper_timeout(); - #if HAS_DISABLE_INACTIVE_AXIS + #if HAS_DISABLE_IDLE_AXES const millis_t ms = parser.value_millis_from_seconds(); #if LASER_SAFETY_TIMEOUT_MS > 0 if (ms && ms <= LASER_SAFETY_TIMEOUT_MS) { diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index f08ade8c38..1eaf4dcd39 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -75,8 +75,8 @@ GcodeSuite gcode; millis_t GcodeSuite::previous_move_ms = 0, GcodeSuite::max_inactive_time = 0; -#if HAS_DISABLE_INACTIVE_AXIS - millis_t GcodeSuite::stepper_inactive_time = SEC_TO_MS(DEFAULT_STEPPER_DEACTIVE_TIME); +#if HAS_DISABLE_IDLE_AXES + millis_t GcodeSuite::stepper_inactive_time = SEC_TO_MS(DEFAULT_STEPPER_TIMEOUT_SEC); #endif // Relative motion mode for each logical axis diff --git a/Marlin/src/gcode/gcode.h b/Marlin/src/gcode/gcode.h index 9bb45d9a43..48e6fd2da8 100644 --- a/Marlin/src/gcode/gcode.h +++ b/Marlin/src/gcode/gcode.h @@ -403,7 +403,7 @@ public: } FORCE_INLINE static void reset_stepper_timeout(const millis_t ms=millis()) { previous_move_ms = ms; } - #if HAS_DISABLE_INACTIVE_AXIS + #if HAS_DISABLE_IDLE_AXES static millis_t stepper_inactive_time; FORCE_INLINE static bool stepper_inactive_timeout(const millis_t ms=millis()) { return ELAPSED(ms, previous_move_ms + stepper_inactive_time); diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 403db47e42..60bc653560 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -624,7 +624,7 @@ #undef PREVENT_LENGTHY_EXTRUDE #undef FILAMENT_RUNOUT_SENSOR #undef FILAMENT_RUNOUT_DISTANCE_MM - #undef DISABLE_INACTIVE_EXTRUDER + #undef DISABLE_OTHER_EXTRUDERS #endif #define E_OPTARG(N) OPTARG(HAS_MULTI_EXTRUDER, N) @@ -678,7 +678,7 @@ // No inactive extruders with SWITCHING_NOZZLE or Průša MMU1 #if HAS_SWITCHING_NOZZLE || HAS_PRUSA_MMU1 - #undef DISABLE_INACTIVE_EXTRUDER + #undef DISABLE_OTHER_EXTRUDERS #endif // Průša MMU1, MMU(S) 2.0 and EXTENDABLE_EMU_MMU2(S) force SINGLENOZZLE @@ -934,6 +934,15 @@ #undef MAX_SOFTWARE_ENDSTOP_W #endif +#define _OR_HAS_DA(A) ENABLED(DISABLE_##A) || +#if MAP(_OR_HAS_DA, X, Y, Z, I, J, K, U, V, W) 0 + #define HAS_DISABLE_MAIN_AXES 1 +#endif +#if HAS_DISABLE_MAIN_AXES || ENABLED(DISABLE_E) + #define HAS_DISABLE_AXES 1 +#endif +#undef _OR_HAS_DA + #ifdef X2_DRIVER_TYPE #define HAS_X2_STEPPER 1 // Dual X Carriage isn't known yet. TODO: Consider moving it to Configuration.h. diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h index 5079a93c1d..c3f244b6bb 100644 --- a/Marlin/src/inc/Conditionals_adv.h +++ b/Marlin/src/inc/Conditionals_adv.h @@ -93,7 +93,7 @@ #undef ARC_SUPPORT #undef CALIBRATION_MEASURE_YMAX #undef CALIBRATION_MEASURE_YMIN - #undef DISABLE_INACTIVE_Y + #undef DISABLE_IDLE_Y #undef HOME_Y_BEFORE_X #undef INPUT_SHAPING_Y #undef QUICK_HOME @@ -108,7 +108,7 @@ #undef CALIBRATION_MEASURE_ZMAX #undef CALIBRATION_MEASURE_ZMIN #undef CNC_WORKSPACE_PLANES - #undef DISABLE_INACTIVE_Z + #undef DISABLE_IDLE_Z #undef ENABLE_LEVELING_FADE_HEIGHT #undef HOME_Z_FIRST #undef HOMING_Z_WITH_PROBE @@ -124,7 +124,7 @@ #if !HAS_I_AXIS #undef CALIBRATION_MEASURE_IMAX #undef CALIBRATION_MEASURE_IMIN - #undef DISABLE_INACTIVE_I + #undef DISABLE_IDLE_I #undef SAFE_BED_LEVELING_START_I #undef STEALTHCHOP_I #undef STEP_STATE_I @@ -133,7 +133,7 @@ #if !HAS_J_AXIS #undef CALIBRATION_MEASURE_JMAX #undef CALIBRATION_MEASURE_JMIN - #undef DISABLE_INACTIVE_J + #undef DISABLE_IDLE_J #undef SAFE_BED_LEVELING_START_J #undef STEALTHCHOP_J #undef STEP_STATE_J @@ -142,7 +142,7 @@ #if !HAS_K_AXIS #undef CALIBRATION_MEASURE_KMAX #undef CALIBRATION_MEASURE_KMIN - #undef DISABLE_INACTIVE_K + #undef DISABLE_IDLE_K #undef SAFE_BED_LEVELING_START_K #undef STEALTHCHOP_K #undef STEP_STATE_K @@ -151,7 +151,7 @@ #if !HAS_U_AXIS #undef CALIBRATION_MEASURE_UMAX #undef CALIBRATION_MEASURE_UMIN - #undef DISABLE_INACTIVE_U + #undef DISABLE_IDLE_U #undef SAFE_BED_LEVELING_START_U #undef STEALTHCHOP_U #undef STEP_STATE_U @@ -160,7 +160,7 @@ #if !HAS_V_AXIS #undef CALIBRATION_MEASURE_VMAX #undef CALIBRATION_MEASURE_VMIN - #undef DISABLE_INACTIVE_V + #undef DISABLE_IDLE_V #undef SAFE_BED_LEVELING_START_V #undef STEALTHCHOP_V #undef STEP_STATE_V @@ -169,7 +169,7 @@ #if !HAS_W_AXIS #undef CALIBRATION_MEASURE_WMAX #undef CALIBRATION_MEASURE_WMIN - #undef DISABLE_INACTIVE_W + #undef DISABLE_IDLE_W #undef SAFE_BED_LEVELING_START_W #undef STEALTHCHOP_W #undef STEP_STATE_W @@ -180,6 +180,7 @@ #define NO_VOLUMETRICS #undef ADVANCED_PAUSE_FEATURE #undef AUTOTEMP + #undef DISABLE_IDLE_E #undef EXTRUDER_RUNOUT_PREVENT #undef FILAMENT_LOAD_UNLOAD_GCODES #undef FWRETRACT @@ -194,6 +195,43 @@ #undef WATCH_TEMP_PERIOD #endif +#if ENABLED(DISABLE_X) && !defined(DISABLE_IDLE_X) + #define DISABLE_IDLE_X +#endif +#if ENABLED(DISABLE_Y) && !defined(DISABLE_IDLE_Y) + #define DISABLE_IDLE_Y +#endif +#if ENABLED(DISABLE_Z) && !defined(DISABLE_IDLE_Z) + #define DISABLE_IDLE_Z +#endif +#if ENABLED(DISABLE_I) && !defined(DISABLE_IDLE_I) + #define DISABLE_IDLE_I +#endif +#if ENABLED(DISABLE_J) && !defined(DISABLE_IDLE_J) + #define DISABLE_IDLE_J +#endif +#if ENABLED(DISABLE_K) && !defined(DISABLE_IDLE_K) + #define DISABLE_IDLE_K +#endif +#if ENABLED(DISABLE_U) && !defined(DISABLE_IDLE_U) + #define DISABLE_IDLE_U +#endif +#if ENABLED(DISABLE_V) && !defined(DISABLE_IDLE_V) + #define DISABLE_IDLE_V +#endif +#if ENABLED(DISABLE_W) && !defined(DISABLE_IDLE_W) + #define DISABLE_IDLE_W +#endif +#if ENABLED(DISABLE_E) && !defined(DISABLE_IDLE_E) + #define DISABLE_IDLE_E +#endif + +#define _OR_HAS_DI(A) || BOTH(HAS_##A##_AXIS, DISABLE_IDLE_##A) +#if BOTH(HAS_EXTRUDERS, DISABLE_IDLE_E) MAP(_OR_HAS_DI, X, Y, Z, I, J, K, U, V, W) + #define HAS_DISABLE_IDLE_AXES 1 +#endif +#undef _OR_HAS_DI + #if HOTENDS <= 7 #undef E7_AUTO_FAN_PIN #if HOTENDS <= 6 diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index edd3edf246..bf9ede65dc 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -1487,43 +1487,6 @@ #endif #endif -#if !defined(DISABLE_INACTIVE_X) && ENABLED(DISABLE_X) - #define DISABLE_INACTIVE_X -#endif -#if !defined(DISABLE_INACTIVE_Y) && ENABLED(DISABLE_Y) - #define DISABLE_INACTIVE_Y -#endif -#if !defined(DISABLE_INACTIVE_Z) && ENABLED(DISABLE_Z) - #define DISABLE_INACTIVE_Z -#endif -#if !defined(DISABLE_INACTIVE_I) && ENABLED(DISABLE_I) - #define DISABLE_INACTIVE_I -#endif -#if !defined(DISABLE_INACTIVE_J) && ENABLED(DISABLE_J) - #define DISABLE_INACTIVE_J -#endif -#if !defined(DISABLE_INACTIVE_K) && ENABLED(DISABLE_K) - #define DISABLE_INACTIVE_K -#endif -#if !defined(DISABLE_INACTIVE_U) && ENABLED(DISABLE_U) - #define DISABLE_INACTIVE_U -#endif -#if !defined(DISABLE_INACTIVE_V) && ENABLED(DISABLE_V) - #define DISABLE_INACTIVE_V -#endif -#if !defined(DISABLE_INACTIVE_W) && ENABLED(DISABLE_W) - #define DISABLE_INACTIVE_W -#endif -#if !defined(DISABLE_INACTIVE_EXTRUDER) && ENABLED(DISABLE_E) - #define DISABLE_INACTIVE_EXTRUDER -#endif -#if ANY(DISABLE_INACTIVE_X, DISABLE_INACTIVE_Y, DISABLE_INACTIVE_Z, DISABLE_INACTIVE_I, DISABLE_INACTIVE_J, DISABLE_INACTIVE_K, DISABLE_INACTIVE_U, DISABLE_INACTIVE_V, DISABLE_INACTIVE_W, DISABLE_INACTIVE_EXTRUDER) - #define HAS_DISABLE_INACTIVE_AXIS 1 -#endif -#if ANY(DISABLE_X, DISABLE_Y, DISABLE_Z, DISABLE_I, DISABLE_J, DISABLE_K, DISABLE_U, DISABLE_V, DISABLE_W, DISABLE_E) - #define HAS_DISABLE_AXIS 1 -#endif - // Extruder steppers and solenoids #if HAS_EXTRUDERS diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 70dcd590fd..88dd13a054 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -674,8 +674,8 @@ #error "EXPERIMENTAL_SCURVE is no longer needed and should be removed." #elif defined(BABYSTEP_ZPROBE_GFX_OVERLAY) #error "BABYSTEP_ZPROBE_GFX_OVERLAY is now BABYSTEP_GFX_OVERLAY." -#elif defined(DISABLE_INACTIVE_E) - #error "DISABLE_INACTIVE_E is now set with DISABLE_INACTIVE_EXTRUDER." +#elif defined(DISABLE_INACTIVE_EXTRUDER) + #error "DISABLE_INACTIVE_EXTRUDER is now DISABLE_OTHER_EXTRUDERS." #elif defined(INVERT_X_STEP_PIN) || defined(INVERT_Y_STEP_PIN) || defined(INVERT_Z_STEP_PIN) || defined(INVERT_I_STEP_PIN) || defined(INVERT_J_STEP_PIN) || defined(INVERT_K_STEP_PIN) || defined(INVERT_U_STEP_PIN) || defined(INVERT_V_STEP_PIN) || defined(INVERT_W_STEP_PIN) || defined(INVERT_E_STEP_PIN) #error "INVERT_*_STEP_PIN true is now STEP_STATE_* LOW, and INVERT_*_STEP_PIN false is now STEP_STATE_* HIGH." #elif defined(PROBE_PT_1_X) || defined(PROBE_PT_1_Y) || defined(PROBE_PT_2_X) || defined(PROBE_PT_2_Y) || defined(PROBE_PT_3_X) || defined(PROBE_PT_3_Y) @@ -692,6 +692,12 @@ || defined(U_MAX_ENDSTOP_INVERTING) || defined(V_MAX_ENDSTOP_INVERTING) || defined(W_MAX_ENDSTOP_INVERTING) \ || defined(Z_MIN_PROBE_ENDSTOP_INVERTING) #error "*_ENDSTOP_INVERTING false/true is now set with *_ENDSTOP_HIT_STATE HIGH/LOW." +#elif defined(DISABLE_INACTIVE_X) || defined(DISABLE_INACTIVE_Y) || defined(DISABLE_INACTIVE_Z) \ + || defined(DISABLE_INACTIVE_I) || defined(DISABLE_INACTIVE_J) || defined(DISABLE_INACTIVE_K) \ + || defined(DISABLE_INACTIVE_U) || defined(DISABLE_INACTIVE_V) || defined(DISABLE_INACTIVE_W) || defined(DISABLE_INACTIVE_E) + #error "DISABLE_INACTIVE_[XYZIJKUVWE] is now DISABLE_IDLE_[XYZIJKUVWE]." +#elif defined(DEFAULT_STEPPER_DEACTIVE_TIME) + #error "DEFAULT_STEPPER_DEACTIVE_TIME is now DEFAULT_STEPPER_TIMEOUT_SEC." #endif // L64xx stepper drivers have been removed @@ -1398,8 +1404,8 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #error "MIXING_EXTRUDER is incompatible with (MECHANICAL_)SWITCHING_EXTRUDER." #elif ENABLED(SINGLENOZZLE) #error "MIXING_EXTRUDER is incompatible with SINGLENOZZLE." - #elif ENABLED(DISABLE_INACTIVE_EXTRUDER) - #error "MIXING_EXTRUDER is incompatible with DISABLE_INACTIVE_EXTRUDER." + #elif ENABLED(DISABLE_OTHER_EXTRUDERS) + #error "MIXING_EXTRUDER is incompatible with DISABLE_OTHER_EXTRUDERS." #elif HAS_FILAMENT_RUNOUT_DISTANCE #error "MIXING_EXTRUDER is incompatible with FILAMENT_RUNOUT_DISTANCE_MM." #endif @@ -2286,10 +2292,8 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS /** * Make sure DISABLE_[XYZ] compatible with selected homing options */ -#if ANY(DISABLE_X, DISABLE_Y, DISABLE_Z, DISABLE_I, DISABLE_J, DISABLE_K, DISABLE_U, DISABLE_V, DISABLE_W) - #if EITHER(HOME_AFTER_DEACTIVATE, Z_SAFE_HOMING) - #error "DISABLE_[XYZIJKUVW] is not compatible with HOME_AFTER_DEACTIVATE or Z_SAFE_HOMING." - #endif +#if HAS_DISABLE_MAIN_AXES && EITHER(HOME_AFTER_DEACTIVATE, Z_SAFE_HOMING) + #error "DISABLE_[XYZIJKUVW] is not compatible with HOME_AFTER_DEACTIVATE or Z_SAFE_HOMING." #endif /** @@ -4264,7 +4268,7 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive."); #undef _PIN_CONFLICT #ifdef LASER_SAFETY_TIMEOUT_MS - static_assert(LASER_SAFETY_TIMEOUT_MS < (DEFAULT_STEPPER_DEACTIVE_TIME) * 1000UL, "LASER_SAFETY_TIMEOUT_MS must be less than DEFAULT_STEPPER_DEACTIVE_TIME (" STRINGIFY(DEFAULT_STEPPER_DEACTIVE_TIME) " seconds)"); + static_assert(LASER_SAFETY_TIMEOUT_MS < (DEFAULT_STEPPER_TIMEOUT_SEC) * 1000UL, "LASER_SAFETY_TIMEOUT_MS must be less than DEFAULT_STEPPER_TIMEOUT_SEC (" STRINGIFY(DEFAULT_STEPPER_TIMEOUT_SEC) " seconds)"); #endif #endif diff --git a/Marlin/src/module/planner.cpp b/Marlin/src/module/planner.cpp index 12e879af96..8e77a7c979 100644 --- a/Marlin/src/module/planner.cpp +++ b/Marlin/src/module/planner.cpp @@ -215,7 +215,7 @@ uint32_t Planner::acceleration_long_cutoff; xyze_float_t Planner::previous_speed; float Planner::previous_nominal_speed; -#if ENABLED(DISABLE_INACTIVE_EXTRUDER) +#if ENABLED(DISABLE_OTHER_EXTRUDERS) last_move_t Planner::extruder_last_move[E_STEPPERS] = { 0 }; #endif @@ -1320,7 +1320,7 @@ void Planner::recalculate(TERN_(HINTS_SAFE_EXIT_SPEED, const_float_t safe_exit_s */ void Planner::check_axes_activity() { - #if HAS_DISABLE_AXIS + #if HAS_DISABLE_AXES xyze_bool_t axis_active = { false }; #endif @@ -1360,7 +1360,7 @@ void Planner::check_axes_activity() { TERN_(HAS_HEATER_2, tail_e_to_p_pressure = block->e_to_p_pressure); #endif - #if HAS_DISABLE_AXIS + #if HAS_DISABLE_AXES for (uint8_t b = block_buffer_tail; b != block_buffer_head; b = next_block_index(b)) { block_t * const bnext = &block_buffer[b]; LOGICAL_AXIS_CODE( @@ -1401,18 +1401,20 @@ void Planner::check_axes_activity() { // // Disable inactive axes // - LOGICAL_AXIS_CODE( - if (TERN0(DISABLE_E, !axis_active.e)) stepper.disable_e_steppers(), - if (TERN0(DISABLE_X, !axis_active.x)) stepper.disable_axis(X_AXIS), - if (TERN0(DISABLE_Y, !axis_active.y)) stepper.disable_axis(Y_AXIS), - if (TERN0(DISABLE_Z, !axis_active.z)) stepper.disable_axis(Z_AXIS), - if (TERN0(DISABLE_I, !axis_active.i)) stepper.disable_axis(I_AXIS), - if (TERN0(DISABLE_J, !axis_active.j)) stepper.disable_axis(J_AXIS), - if (TERN0(DISABLE_K, !axis_active.k)) stepper.disable_axis(K_AXIS), - if (TERN0(DISABLE_U, !axis_active.u)) stepper.disable_axis(U_AXIS), - if (TERN0(DISABLE_V, !axis_active.v)) stepper.disable_axis(V_AXIS), - if (TERN0(DISABLE_W, !axis_active.w)) stepper.disable_axis(W_AXIS) - ); + #if HAS_DISABLE_AXES + LOGICAL_AXIS_CODE( + if (TERN0(DISABLE_E, !axis_active.e)) stepper.disable_e_steppers(), + if (TERN0(DISABLE_X, !axis_active.x)) stepper.disable_axis(X_AXIS), + if (TERN0(DISABLE_Y, !axis_active.y)) stepper.disable_axis(Y_AXIS), + if (TERN0(DISABLE_Z, !axis_active.z)) stepper.disable_axis(Z_AXIS), + if (TERN0(DISABLE_I, !axis_active.i)) stepper.disable_axis(I_AXIS), + if (TERN0(DISABLE_J, !axis_active.j)) stepper.disable_axis(J_AXIS), + if (TERN0(DISABLE_K, !axis_active.k)) stepper.disable_axis(K_AXIS), + if (TERN0(DISABLE_U, !axis_active.u)) stepper.disable_axis(U_AXIS), + if (TERN0(DISABLE_V, !axis_active.v)) stepper.disable_axis(V_AXIS), + if (TERN0(DISABLE_W, !axis_active.w)) stepper.disable_axis(W_AXIS) + ); + #endif // // Update Fan speeds @@ -2276,7 +2278,7 @@ bool Planner::_populate_block( if (esteps) { TERN_(AUTO_POWER_CONTROL, powerManager.power_on()); - #if ENABLED(DISABLE_INACTIVE_EXTRUDER) // Enable only the selected extruder + #if ENABLED(DISABLE_OTHER_EXTRUDERS) // Enable only the selected extruder // Count down all steppers that were recently moved LOOP_L_N(i, E_STEPPERS) diff --git a/Marlin/src/module/planner.h b/Marlin/src/module/planner.h index 9497912d2f..ccf6ba08d3 100644 --- a/Marlin/src/module/planner.h +++ b/Marlin/src/module/planner.h @@ -352,7 +352,7 @@ typedef struct { } skew_factor_t; #endif -#if ENABLED(DISABLE_INACTIVE_EXTRUDER) +#if ENABLED(DISABLE_OTHER_EXTRUDERS) typedef uvalue_t(BLOCK_BUFFER_SIZE * 2) last_move_t; #endif @@ -533,7 +533,7 @@ class Planner { static float last_fade_z; #endif - #if ENABLED(DISABLE_INACTIVE_EXTRUDER) + #if ENABLED(DISABLE_OTHER_EXTRUDERS) // Counters to manage disabling inactive extruder steppers static last_move_t extruder_last_move[E_STEPPERS]; #endif diff --git a/buildroot/tests/mega2560 b/buildroot/tests/mega2560 index ae3d1c45f8..c2a3452e67 100755 --- a/buildroot/tests/mega2560 +++ b/buildroot/tests/mega2560 @@ -82,7 +82,7 @@ opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO MIXING_STEPPERS 5 LCD_LANGUAGE ru \ opt_enable MIXING_EXTRUDER GRADIENT_MIX GRADIENT_VTOOL CR10_STOCKDISPLAY \ USE_CONTROLLER_FAN CONTROLLER_FAN_EDITABLE CONTROLLER_FAN_IGNORE_Z \ FILAMENT_RUNOUT_SENSOR ADVANCED_PAUSE_FEATURE NOZZLE_PARK_FEATURE INPUT_SHAPING_X INPUT_SHAPING_Y -opt_disable DISABLE_INACTIVE_EXTRUDER +opt_disable DISABLE_OTHER_EXTRUDERS exec_test $1 $2 "Azteeg X3 | Mixing Extruder (x5) | Gradient Mix | Input Shaping | Greek" "$3" # diff --git a/buildroot/tests/rambo b/buildroot/tests/rambo index 7e6f71364c..ca6aae471f 100755 --- a/buildroot/tests/rambo +++ b/buildroot/tests/rambo @@ -125,7 +125,7 @@ opt_enable COREYX USE_XMAX_PLUG MIXING_EXTRUDER GRADIENT_MIX \ SD_ABORT_ON_ENDSTOP_HIT HOST_ACTION_COMMANDS HOST_PROMPT_SUPPORT HOST_PAUSE_M76 ADVANCED_OK M114_DETAIL \ VOLUMETRIC_DEFAULT_ON NO_WORKSPACE_OFFSETS EXTRA_FAN_SPEED FWRETRACT \ USE_CONTROLLER_FAN CONTROLLER_FAN_EDITABLE CONTROLLER_FAN_USE_Z_ONLY -opt_disable DISABLE_INACTIVE_EXTRUDER +opt_disable DISABLE_OTHER_EXTRUDERS exec_test $1 $2 "Rambo | CoreXY, Gradient Mix | Endstop Int. | Home Y > X | FW Retract ..." "$3" # clean up diff --git a/buildroot/tests/teensy35 b/buildroot/tests/teensy35 index d9e7839da8..fd6ae86387 100755 --- a/buildroot/tests/teensy35 +++ b/buildroot/tests/teensy35 @@ -68,7 +68,7 @@ exec_test $1 $2 "PARKING_EXTRUDER with LCD" "$3" restore_configs opt_set MOTHERBOARD BOARD_TEENSY35_36 MIXING_STEPPERS 2 opt_enable MIXING_EXTRUDER DIRECT_MIXING_IN_G1 GRADIENT_MIX GRADIENT_VTOOL REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER -opt_disable DISABLE_INACTIVE_EXTRUDER +opt_disable DISABLE_OTHER_EXTRUDERS exec_test $1 $2 "Mixing Extruder" "$3" # diff --git a/buildroot/tests/teensy41 b/buildroot/tests/teensy41 index f852474ac0..11b5e34025 100755 --- a/buildroot/tests/teensy41 +++ b/buildroot/tests/teensy41 @@ -71,7 +71,7 @@ exec_test $1 $2 "Ethernet, EEPROM, Magnetic Parking Extruder, No LCD" "$3" restore_configs opt_set MOTHERBOARD BOARD_TEENSY41 MIXING_STEPPERS 2 opt_enable MIXING_EXTRUDER DIRECT_MIXING_IN_G1 GRADIENT_MIX GRADIENT_VTOOL -opt_disable DISABLE_INACTIVE_EXTRUDER +opt_disable DISABLE_OTHER_EXTRUDERS exec_test $1 $2 "Mixing Extruder" "$3" # From 1adf76dd23269101439976a2873b96cc6a82f676 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Mon, 27 Mar 2023 00:21:15 +0000 Subject: [PATCH 089/225] [cron] Bump distribution date (2023-03-27) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index baa481f8f0..73ec99f61d 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-03-26" +//#define STRING_DISTRIBUTION_DATE "2023-03-27" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index e5489d990f..c169ec5129 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-03-26" + #define STRING_DISTRIBUTION_DATE "2023-03-27" #endif /** From c2decc3e2e30c7cb0f517b7e40d8138a8c1d4a81 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 26 Mar 2023 17:49:51 -0500 Subject: [PATCH 090/225] =?UTF-8?q?=F0=9F=94=A8=20Fix=20thread-unsafe=20de?= =?UTF-8?q?que=20iteration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buildroot/share/PlatformIO/scripts/marlin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/buildroot/share/PlatformIO/scripts/marlin.py b/buildroot/share/PlatformIO/scripts/marlin.py index 169dd9d3c3..8d8dbb5b63 100644 --- a/buildroot/share/PlatformIO/scripts/marlin.py +++ b/buildroot/share/PlatformIO/scripts/marlin.py @@ -16,7 +16,8 @@ def copytree(src, dst, symlinks=False, ignore=None): shutil.copy2(item, dst / item.name) def replace_define(field, value): - for define in env['CPPDEFINES']: + envdefs = env['CPPDEFINES'].copy() + for define in envdefs: if define[0] == field: env['CPPDEFINES'].remove(define) env['CPPDEFINES'].append((field, value)) From 08675612d5425d6a3824d0113b2a5c4072193a4d Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 26 Mar 2023 21:36:40 -0500 Subject: [PATCH 091/225] =?UTF-8?q?=F0=9F=90=9B=20Fix=20AnyCubic=20Vyper?= =?UTF-8?q?=20ProcessPanelRequest?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to #25405 --- Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp b/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp index 9487f22e89..e9e80101f6 100644 --- a/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp +++ b/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp @@ -1004,7 +1004,7 @@ namespace Anycubic { if (0x83 == data_buf[0]) { control_index = uint16_t(data_buf[1] << 8) | uint16_t(data_buf[2]); - if (control_index == KEY_ADDRESS) { // is KEY + if ((control_index & 0xF000) == KEY_ADDRESS) { // is KEY //key_index = control_index; key_value = (uint16_t(data_buf[4]) << 8) | uint16_t(data_buf[5]); } @@ -1102,7 +1102,7 @@ namespace Anycubic { } */ } - else if (data_buf[0] == 0x82) { + else if (0x82 == data_buf[0]) { // send_cmd_to_pc(cmd ,start ); } } From 41487bc9e73457021a544a17bc2d8b61cb3223c9 Mon Sep 17 00:00:00 2001 From: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Mon, 27 Mar 2023 04:57:56 +0200 Subject: [PATCH 092/225] =?UTF-8?q?=F0=9F=8E=A8=20Suppress=20a=20type=20wa?= =?UTF-8?q?rning=20(#25575)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/module/probe.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Marlin/src/module/probe.h b/Marlin/src/module/probe.h index 90dccf7a7b..90ef42b643 100644 --- a/Marlin/src/module/probe.h +++ b/Marlin/src/module/probe.h @@ -310,9 +310,9 @@ public: points[1] = xy_float_t({ (X_CENTER) + probe_radius() * COS120, (Y_CENTER) + probe_radius() * SIN120 }); points[2] = xy_float_t({ (X_CENTER) + probe_radius() * COS240, (Y_CENTER) + probe_radius() * SIN240 }); #elif ENABLED(AUTO_BED_LEVELING_UBL) - points[0] = xy_float_t({ _MAX(MESH_MIN_X, min_x()), _MAX(MESH_MIN_Y, min_y()) }); - points[1] = xy_float_t({ _MIN(MESH_MAX_X, max_x()), _MAX(MESH_MIN_Y, min_y()) }); - points[2] = xy_float_t({ (_MAX(MESH_MIN_X, min_x()) + _MIN(MESH_MAX_X, max_x())) / 2, _MIN(MESH_MAX_Y, max_y()) }); + points[0] = xy_float_t({ _MAX(float(MESH_MIN_X), min_x()), _MAX(float(MESH_MIN_Y), min_y()) }); + points[1] = xy_float_t({ _MIN(float(MESH_MAX_X), max_x()), _MAX(float(MESH_MIN_Y), min_y()) }); + points[2] = xy_float_t({ (_MAX(float(MESH_MIN_X), min_x()) + _MIN(float(MESH_MAX_X), max_x())) / 2, _MIN(float(MESH_MAX_Y), max_y()) }); #else points[0] = xy_float_t({ min_x(), min_y() }); points[1] = xy_float_t({ max_x(), min_y() }); From e0132f7a1ec256ffe07d44c181fe1f2a799fd109 Mon Sep 17 00:00:00 2001 From: Alexander Gavrilenko Date: Mon, 27 Mar 2023 21:17:02 +0300 Subject: [PATCH 093/225] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20Improve=20TFT=20DM?= =?UTF-8?q?A=20for=20STM32=20(#25359)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration.h | 4 +- Marlin/src/HAL/LPC1768/tft/tft_spi.cpp | 2 +- Marlin/src/HAL/STM32/tft/tft_fsmc.cpp | 8 +- Marlin/src/HAL/STM32/tft/tft_spi.cpp | 3 +- Marlin/src/HAL/STM32F1/tft/tft_fsmc.cpp | 2 + Marlin/src/HAL/STM32F1/tft/tft_fsmc.h | 7 + Marlin/src/HAL/STM32F1/tft/tft_spi.cpp | 2 +- Marlin/src/inc/SanityCheck.h | 2 + Marlin/src/lcd/tft_io/ili9328.h | 2 +- Marlin/src/lcd/tft_io/ili9341.h | 39 +-- Marlin/src/lcd/tft_io/ili9488.h | 232 ++++++++++-------- Marlin/src/lcd/tft_io/r65105.h | 2 +- Marlin/src/lcd/tft_io/st7789v.h | 26 +- Marlin/src/lcd/tft_io/st7796s.h | 12 +- Marlin/src/pins/stm32f1/pins_CHITU3D_common.h | 2 - Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h | 2 - .../src/pins/stm32f1/pins_JGAURORA_A5S_A1.h | 2 - Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h | 2 - .../pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h | 2 - Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h | 2 - Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h | 2 - .../pins/stm32f1/pins_MKS_ROBIN_NANO_common.h | 2 - Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h | 2 - Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h | 2 - Marlin/src/pins/stm32f4/pins_TRONXY_V10.h | 2 - 25 files changed, 198 insertions(+), 167 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 2f4b18a210..475f662ca5 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -3292,11 +3292,11 @@ */ #define TFT_FONT NOTOSANS - //#define TFT_SHARED_SPI // SPI is shared between TFT display and other devices. Disable async data transfer + //#define TFT_SHARED_IO // I/O is shared between TFT display and other devices. Disable async data transfer. #endif #if ENABLED(TFT_LVGL_UI) - //#define MKS_WIFI_MODULE // MKS WiFi module + //#define MKS_WIFI_MODULE // MKS WiFi module #endif /** diff --git a/Marlin/src/HAL/LPC1768/tft/tft_spi.cpp b/Marlin/src/HAL/LPC1768/tft/tft_spi.cpp index 804fc85e79..abf1cf5e43 100644 --- a/Marlin/src/HAL/LPC1768/tft/tft_spi.cpp +++ b/Marlin/src/HAL/LPC1768/tft/tft_spi.cpp @@ -139,7 +139,7 @@ void TFT_SPI::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Coun DataTransferBegin(DATASIZE_16BIT); SPIx.dmaSendAsync(Data, Count, MemoryIncrease); - TERN_(TFT_SHARED_SPI, while (isBusy())); + TERN_(TFT_SHARED_IO, while (isBusy())); } #endif // HAS_SPI_TFT diff --git a/Marlin/src/HAL/STM32/tft/tft_fsmc.cpp b/Marlin/src/HAL/STM32/tft/tft_fsmc.cpp index cf9e569336..fa43a7ad27 100644 --- a/Marlin/src/HAL/STM32/tft/tft_fsmc.cpp +++ b/Marlin/src/HAL/STM32/tft/tft_fsmc.cpp @@ -100,11 +100,11 @@ void TFT_FSMC::Init() { HAL_SRAM_Init(&SRAMx, &Timing, &ExtTiming); - __HAL_RCC_DMA2_CLK_ENABLE(); - #ifdef STM32F1xx - DMAtx.Instance = DMA2_Channel1; + __HAL_RCC_DMA1_CLK_ENABLE(); + DMAtx.Instance = DMA1_Channel1; #elif defined(STM32F4xx) + __HAL_RCC_DMA2_CLK_ENABLE(); DMAtx.Instance = DMA2_Stream0; DMAtx.Init.Channel = DMA_CHANNEL_0; DMAtx.Init.FIFOMode = DMA_FIFOMODE_ENABLE; @@ -174,6 +174,8 @@ void TFT_FSMC::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Cou DMAtx.Init.PeriphInc = MemoryIncrease; HAL_DMA_Init(&DMAtx); HAL_DMA_Start(&DMAtx, (uint32_t)Data, (uint32_t)&(LCD->RAM), Count); + + TERN_(TFT_SHARED_IO, while (isBusy())); } void TFT_FSMC::Transmit(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Count) { diff --git a/Marlin/src/HAL/STM32/tft/tft_spi.cpp b/Marlin/src/HAL/STM32/tft/tft_spi.cpp index 5e79f156d2..6ee4dc3364 100644 --- a/Marlin/src/HAL/STM32/tft/tft_spi.cpp +++ b/Marlin/src/HAL/STM32/tft/tft_spi.cpp @@ -242,7 +242,7 @@ void TFT_SPI::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Coun SET_BIT(SPIx.Instance->CR2, SPI_CR2_TXDMAEN); // Enable Tx DMA Request - TERN_(TFT_SHARED_SPI, while (isBusy())); + TERN_(TFT_SHARED_IO, while (isBusy())); } @@ -261,6 +261,7 @@ void TFT_SPI::Transmit(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Count) SET_BIT(SPIx.Instance->CR2, SPI_CR2_TXDMAEN); // Enable Tx DMA Request HAL_DMA_PollForTransfer(&DMAtx, HAL_DMA_FULL_TRANSFER, HAL_MAX_DELAY); + while ( __HAL_SPI_GET_FLAG(&SPIx, SPI_FLAG_BSY)) {} Abort(); } diff --git a/Marlin/src/HAL/STM32F1/tft/tft_fsmc.cpp b/Marlin/src/HAL/STM32F1/tft/tft_fsmc.cpp index 512e70cf3f..3fd92ed02b 100644 --- a/Marlin/src/HAL/STM32F1/tft/tft_fsmc.cpp +++ b/Marlin/src/HAL/STM32F1/tft/tft_fsmc.cpp @@ -245,6 +245,8 @@ void TFT_FSMC::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Cou dma_set_num_transfers(FSMC_DMA_DEV, FSMC_DMA_CHANNEL, Count); dma_clear_isr_bits(FSMC_DMA_DEV, FSMC_DMA_CHANNEL); dma_enable(FSMC_DMA_DEV, FSMC_DMA_CHANNEL); + + TERN_(TFT_SHARED_IO, while (isBusy())); } void TFT_FSMC::Transmit(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Count) { diff --git a/Marlin/src/HAL/STM32F1/tft/tft_fsmc.h b/Marlin/src/HAL/STM32F1/tft/tft_fsmc.h index 8d26f6eac0..ab98334f57 100644 --- a/Marlin/src/HAL/STM32F1/tft/tft_fsmc.h +++ b/Marlin/src/HAL/STM32F1/tft/tft_fsmc.h @@ -30,6 +30,13 @@ #include +#ifndef FSMC_DMA_DEV + #define FSMC_DMA_DEV DMA2 +#endif +#ifndef FSMC_DMA_CHANNEL + #define FSMC_DMA_CHANNEL DMA_CH5 +#endif + #define DATASIZE_8BIT DMA_SIZE_8BITS #define DATASIZE_16BIT DMA_SIZE_16BITS #define TFT_IO_DRIVER TFT_FSMC diff --git a/Marlin/src/HAL/STM32F1/tft/tft_spi.cpp b/Marlin/src/HAL/STM32F1/tft/tft_spi.cpp index bb495d5f58..9129cfdf1f 100644 --- a/Marlin/src/HAL/STM32F1/tft/tft_spi.cpp +++ b/Marlin/src/HAL/STM32F1/tft/tft_spi.cpp @@ -154,7 +154,7 @@ void TFT_SPI::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Coun DataTransferBegin(); SPIx.dmaSendAsync(Data, Count, MemoryIncrease == DMA_MINC_ENABLE); - TERN_(TFT_SHARED_SPI, while (isBusy())); + TERN_(TFT_SHARED_IO, while (isBusy())); } void TFT_SPI::Transmit(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Count) { diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 88dd13a054..8fbc0c4541 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -698,6 +698,8 @@ #error "DISABLE_INACTIVE_[XYZIJKUVWE] is now DISABLE_IDLE_[XYZIJKUVWE]." #elif defined(DEFAULT_STEPPER_DEACTIVE_TIME) #error "DEFAULT_STEPPER_DEACTIVE_TIME is now DEFAULT_STEPPER_TIMEOUT_SEC." +#elif defined(TFT_SHARED_SPI) + #error "TFT_SHARED_SPI is now TFT_SHARED_IO." #endif // L64xx stepper drivers have been removed diff --git a/Marlin/src/lcd/tft_io/ili9328.h b/Marlin/src/lcd/tft_io/ili9328.h index b50517adfe..823835f448 100644 --- a/Marlin/src/lcd/tft_io/ili9328.h +++ b/Marlin/src/lcd/tft_io/ili9328.h @@ -39,7 +39,7 @@ #define ILI9328_ETMOD_ID0 0x0010 // 0 - Horizontal Decrement / 1 - Horizontal Increment #define ILI9328_ETMOD_AM 0x0008 // 0 - Horizontal / 1 - Vertical -// MKS Robin TFT v1.1 - 320x240 ; Cable on the left side +// MKS Robin TFT v1.1 - 320x240 ; FPC cable on the left side #if TFT_ROTATION == TFT_ROTATE_180 #define ILI9328_DRVCTL_DATA 0x0000 diff --git a/Marlin/src/lcd/tft_io/ili9341.h b/Marlin/src/lcd/tft_io/ili9341.h index dda326df6d..4488287430 100644 --- a/Marlin/src/lcd/tft_io/ili9341.h +++ b/Marlin/src/lcd/tft_io/ili9341.h @@ -33,10 +33,10 @@ #define ILI9341_MADCTL_RGB 0x00 #define ILI9341_MADCTL_MH 0x04 // Horizontal Refresh Order -#define ILI9341_ORIENTATION_UP ILI9341_MADCTL_MY // 240x320 ; Cable on the upper side -#define ILI9341_ORIENTATION_RIGHT ILI9341_MADCTL_MV // 320x240 ; Cable on the right side -#define ILI9341_ORIENTATION_LEFT ILI9341_MADCTL_MY | ILI9341_MADCTL_MX | ILI9341_MADCTL_MV // 320x240 ; Cable on the left side -#define ILI9341_ORIENTATION_DOWN ILI9341_MADCTL_MX // 240x320 ; Cable on the upper side +#define ILI9341_ORIENTATION_TOP ILI9341_MADCTL_MY // 240x320 ; FPC cable on the top side +#define ILI9341_ORIENTATION_RIGHT ILI9341_MADCTL_MV // 320x240 ; FPC cable on the right side +#define ILI9341_ORIENTATION_LEFT ILI9341_MADCTL_MY | ILI9341_MADCTL_MX | ILI9341_MADCTL_MV // 320x240 ; FPC cable on the left side +#define ILI9341_ORIENTATION_BOTTOM ILI9341_MADCTL_MX // 240x320 ; FPC cable on the bottom side #define ILI9341_ORIENTATION IF_0((TFT_ORIENTATION) & TFT_EXCHANGE_XY, ILI9341_MADCTL_MV) | \ IF_0((TFT_ORIENTATION) & TFT_INVERT_X, ILI9341_MADCTL_MX) | \ @@ -52,7 +52,7 @@ #define ILI9341_NOP 0x00 // No Operation #define ILI9341_SWRESET 0x01 // Software Reset -#define ILI9341_RDDIDIF 0x04 // Read display identification information +#define ILI9341_RDDIDIF 0x04 // Read Display Identification Information #define ILI9341_RDDST 0x09 // Read Display Status #define ILI9341_RDDPM 0x0A // Read Display Power Mode #define ILI9341_RDDMADCTL 0x0B // Read Display MADCTL @@ -141,20 +141,21 @@ static const uint16_t ili9341_init[] = { DATASIZE_8BIT, ESC_REG(ILI9341_SWRESET), ESC_DELAY(100), ESC_REG(ILI9341_SLPOUT), ESC_DELAY(20), -/* - ESC_REG(ILI9341_PWCTRLA), 0x0039, 0x002C, 0x0000, 0x0034, 0x0002, // Power control A - ESC_REG(ILI9341_PWCTRLB), 0x0000, 0x00C1, 0x0030, // Power control B - ESC_REG(ILI9341_DRVTCTLA1), 0x0085, 0x0000, 0x0078, // Driver timing control A - ESC_REG(ILI9341_DRVTCTLB), 0x0000, 0x0000, // Driver timing control B - ESC_REG(ILI9341_PONSEQCTL), 0x0064, 0x0003, 0x0012, 0x0081, // Power on sequence control - ESC_REG(ILI9341_DISCTRL), 0x0008, 0x0082, 0x0027, // Display Function Control - ESC_REG(ILI9341_PUMPRCTL), 0x0020, // Pump ratio control - ESC_REG(ILI9341_VMCTRL1), 0x003E, 0x0028, // VCOM Control 1 - ESC_REG(ILI9341_VMCTRL2), 0x0086, // VCOM Control 2 - ESC_REG(ILI9341_FRMCTR1), 0x0000, 0x0018, // Frame Rate Control (In Normal Mode/Full Colors) - ESC_REG(ILI9341_PWCTRL1), 0x0023, // Power Control 1 - ESC_REG(ILI9341_PWCTRL2), 0x0010, // Power Control 2 -*/ + + ESC_REG(ILI9341_PWCTRLA), 0x0039, 0x002C, 0x0000, 0x0034, 0x0002, + ESC_REG(ILI9341_PWCTRLB), 0x0000, 0x00C1, 0x0030, + ESC_REG(ILI9341_DRVTCTLA1), 0x0085, 0x0000, 0x0078, + ESC_REG(ILI9341_DRVTCTLB), 0x0000, 0x0000, + ESC_REG(ILI9341_PONSEQCTL), 0x0064, 0x0003, 0x0012, 0x0081, + ESC_REG(ILI9341_DISCTRL), 0x0008, 0x0082, 0x0027, // Source Output Scan Direction: 0, Gate Output Scan Direction: 0 + ESC_REG(ILI9341_DINVOFF), + ESC_REG(ILI9341_PUMPRCTL), 0x0020, + ESC_REG(ILI9341_VMCTRL1), 0x003E, 0x0028, + ESC_REG(ILI9341_VMCTRL2), 0x0086, + ESC_REG(ILI9341_FRMCTR1), 0x0000, 0x0018, + ESC_REG(ILI9341_PWCTRL1), 0x0023, + ESC_REG(ILI9341_PWCTRL2), 0x0010, + ESC_REG(ILI9341_MADCTL), ILI9341_MADCTL_DATA, ESC_REG(ILI9341_PIXSET), 0x0055, diff --git a/Marlin/src/lcd/tft_io/ili9488.h b/Marlin/src/lcd/tft_io/ili9488.h index e71c0d16d7..fc2add662d 100644 --- a/Marlin/src/lcd/tft_io/ili9488.h +++ b/Marlin/src/lcd/tft_io/ili9488.h @@ -25,18 +25,18 @@ #include "../../inc/MarlinConfig.h" -#define ILI9488_MADCTL_MY 0x80 // Row Address Order -#define ILI9488_MADCTL_MX 0x40 // Column Address Order -#define ILI9488_MADCTL_MV 0x20 // Row/Column Exchange -#define ILI9488_MADCTL_ML 0x10 // Vertical Refresh Order -#define ILI9488_MADCTL_BGR 0x08 // RGB-BGR ORDER -#define ILI9488_MADCTL_RGB 0x00 -#define ILI9488_MADCTL_MH 0x04 // Horizontal Refresh Order +#define ILI9488_MADCTL_MY 0x80 // Row Address Order +#define ILI9488_MADCTL_MX 0x40 // Column Address Order +#define ILI9488_MADCTL_MV 0x20 // Row/Column Exchange +#define ILI9488_MADCTL_ML 0x10 // Vertical Refresh Order +#define ILI9488_MADCTL_BGR 0x08 // RGB-BGR ORDER +#define ILI9488_MADCTL_RGB 0x00 +#define ILI9488_MADCTL_MH 0x04 // Horizontal Refresh Order -#define ILI9488_ORIENTATION_UP ILI9488_MADCTL_MY // 320x480 ; Cable on the upper side -#define ILI9488_ORIENTATION_RIGHT ILI9488_MADCTL_MV // 480x320 ; Cable on the right side -#define ILI9488_ORIENTATION_LEFT ILI9488_MADCTL_MY | ILI9488_MADCTL_MX | ILI9488_MADCTL_MV // 480x320 ; Cable on the left side -#define ILI9488_ORIENTATION_DOWN ILI9488_MADCTL_MX // 320x480 ; Cable on the upper side +#define ILI9488_ORIENTATION_TOP ILI9488_MADCTL_MY // 320x480 ; FPC cable on the top side +#define ILI9488_ORIENTATION_RIGHT ILI9488_MADCTL_MV // 480x320 ; FPC cable on the right side +#define ILI9488_ORIENTATION_LEFT ILI9488_MADCTL_MY | ILI9488_MADCTL_MX | ILI9488_MADCTL_MV // 480x320 ; FPC cable on the left side +#define ILI9488_ORIENTATION_BOTTOM ILI9488_MADCTL_MX // 320x480 ; FPC cable on the bottom side #define ILI9488_ORIENTATION IF_0((TFT_ORIENTATION) & TFT_EXCHANGE_XY, ILI9488_MADCTL_MV) | \ IF_0((TFT_ORIENTATION) & TFT_INVERT_X, ILI9488_MADCTL_MX) | \ @@ -48,103 +48,113 @@ #define ILI9488_COLOR ILI9488_MADCTL_RGB #endif -#define ILI9488_MADCTL_DATA (ILI9488_ORIENTATION) | (ILI9488_COLOR) +#define ILI9488_MADCTL_DATA (ILI9488_ORIENTATION) | (ILI9488_COLOR) -#define ILI9488_NOP 0x00 // No Operation -#define ILI9488_SWRESET 0x01 // Software Reset -#define ILI9488_RDDIDIF 0x04 // Read Display Identification Information -#define ILI9488_RDNUMED 0x05 // Read Number of the Errors on DSI -#define ILI9488_RDDST 0x09 // Read Display Status -#define ILI9488_RDDPM 0x0A // Read Display Power Mode -#define ILI9488_RDDMADCTL 0x0B // Read Display MADCTL -#define ILI9488_RDDCOLMOD 0x0C // Read Display COLMOD -#define ILI9488_RDDIM 0x0D // Read Display Image Mode -#define ILI9488_RDDSM 0x0E // Read Display Signal Mode -#define ILI9488_RDDSDR 0x0F // Read Display Self-Diagnostic Result -#define ILI9488_SLPIN 0x10 // Sleep IN -#define ILI9488_SLPOUT 0x11 // Sleep OUT -#define ILI9488_PTLON 0x12 // Partial Mode ON -#define ILI9488_NORON 0x13 // Normal Display Mode ON -#define ILI9488_INVOFF 0x20 // Display Inversion OFF -#define ILI9488_INVON 0x21 // Display Inversion ON -#define ILI9488_ALLPOFF 0x22 // All Pixels OFF -#define ILI9488_ALLPON 0x23 // All Pixels ON -#define ILI9488_DISOFF 0x28 // Display OFF -#define ILI9488_DISON 0x29 // Display ON -#define ILI9488_CASET 0x2A // Column Address Set -#define ILI9488_PASET 0x2B // Page Address Set -#define ILI9488_RAMWR 0x2C // Memory Write -#define ILI9488_RAMRD 0x2E // Memory Read -#define ILI9488_PLTAR 0x30 // Partial Area -#define ILI9488_VSCRDEF 0x33 // Vertical Scrolling Definition -#define ILI9488_TEOFF 0x34 // Tearing Effect Line OFF -#define ILI9488_TEON 0x35 // Tearing Effect Line ON -#define ILI9488_MADCTL 0x36 // Memory Access Control -#define ILI9488_VSCRSADD 0x37 // Vertical Scrolling Start Address -#define ILI9488_IDMOFF 0x38 // Idle Mode OFF -#define ILI9488_IDMON 0x39 // Idle Mode ON -#define ILI9488_COLMOD 0x3A // Interface Pixel Format -#define ILI9488_RAMWRC 0x3C // Memory Write Continue -#define ILI9488_RAMRDRC 0x3E // Memory Read Continue -#define ILI9488_TESLWR 0x44 // Write Tear Scan Line -#define ILI9488_TESLRD 0x45 // Read Scan Line -#define ILI9488_WRDISBV 0x51 // Write Display Brightness Value -#define ILI9488_RDDISBV 0x52 // Read Display Brightness Value -#define ILI9488_WRCTRLD 0x53 // Write Control Display Value -#define ILI9488_RDCTRLD 0x54 // Read Control Display Value -#define ILI9488_WRCABC 0x55 // Write Content Adaptive Brightness Control Value -#define ILI9488_RDCABC 0x56 // Read Content Adaptive Brightness Control Value -#define ILI9488_WRCABCMB 0x5E // Write CABC Minimum Brightness -#define ILI9488_RDCABCMB 0x5F // Read CABC Minimum Brightness -#define ILI9488_RDABCSDR 0x68 // Read Automatic Brightness Control Self-diagnostic Result -#define ILI9488_RDID1 0xDA // Read ID1 -#define ILI9488_RDID2 0xDB // Read ID2 -#define ILI9488_RDID3 0xDC // Read ID3 +#define ILI9488_NOP 0x00 // No Operation +#define ILI9488_SWRESET 0x01 // Software Reset +#define ILI9488_RDDIDIF 0x04 // Read Display Identification Information +#define ILI9488_RDNUMED 0x05 // Read Number of the Errors on DSI +#define ILI9488_RDDST 0x09 // Read Display Status +#define ILI9488_RDDPM 0x0A // Read Display Power Mode +#define ILI9488_RDDMADCTL 0x0B // Read Display MADCTL +#define ILI9488_RDDCOLMOD 0x0C // Read Display COLMOD +#define ILI9488_RDDIM 0x0D // Read Display Image Mode +#define ILI9488_RDDSM 0x0E // Read Display Signal Mode +#define ILI9488_RDDSDR 0x0F // Read Display Self-Diagnostic Result +#define ILI9488_SLPIN 0x10 // Sleep IN +#define ILI9488_SLPOUT 0x11 // Sleep OUT +#define ILI9488_PTLON 0x12 // Partial Mode ON +#define ILI9488_NORON 0x13 // Normal Display Mode ON +#define ILI9488_INVOFF 0x20 // Display Inversion OFF +#define ILI9488_INVON 0x21 // Display Inversion ON +#define ILI9488_ALLPOFF 0x22 // All Pixels OFF +#define ILI9488_ALLPON 0x23 // All Pixels ON +#define ILI9488_DISOFF 0x28 // Display OFF +#define ILI9488_DISON 0x29 // Display ON +#define ILI9488_CASET 0x2A // Column Address Set +#define ILI9488_PASET 0x2B // Page Address Set +#define ILI9488_RAMWR 0x2C // Memory Write +#define ILI9488_RAMRD 0x2E // Memory Read +#define ILI9488_PLTAR 0x30 // Partial Area +#define ILI9488_VSCRDEF 0x33 // Vertical Scrolling Definition +#define ILI9488_TEOFF 0x34 // Tearing Effect Line OFF +#define ILI9488_TEON 0x35 // Tearing Effect Line ON +#define ILI9488_MADCTL 0x36 // Memory Access Control +#define ILI9488_VSCRSADD 0x37 // Vertical Scrolling Start Address +#define ILI9488_IDMOFF 0x38 // Idle Mode OFF +#define ILI9488_IDMON 0x39 // Idle Mode ON +#define ILI9488_COLMOD 0x3A // Interface Pixel Format +#define ILI9488_RAMWRC 0x3C // Memory Write Continue +#define ILI9488_RAMRDRC 0x3E // Memory Read Continue +#define ILI9488_TESLWR 0x44 // Write Tear Scan Line +#define ILI9488_TESLRD 0x45 // Read Scan Line +#define ILI9488_WRDISBV 0x51 // Write Display Brightness Value +#define ILI9488_RDDISBV 0x52 // Read Display Brightness Value +#define ILI9488_WRCTRLD 0x53 // Write Control Display Value +#define ILI9488_RDCTRLD 0x54 // Read Control Display Value +#define ILI9488_WRCABC 0x55 // Write Content Adaptive Brightness Control Value +#define ILI9488_RDCABC 0x56 // Read Content Adaptive Brightness Control Value +#define ILI9488_WRCABCMB 0x5E // Write CABC Minimum Brightness +#define ILI9488_RDCABCMB 0x5F // Read CABC Minimum Brightness +#define ILI9488_RDABCSDR 0x68 // Read Automatic Brightness Control Self-diagnostic Result +#define ILI9488_RDID1 0xDA // Read ID1 +#define ILI9488_RDID2 0xDB // Read ID2 +#define ILI9488_RDID3 0xDC // Read ID3 -#define ILI9488_IFMODE 0xB0 // Interface Mode Control -#define ILI9488_FRMCTR1 0xB1 // Frame Rate Control (In Normal Mode/Full Colors) -#define ILI9488_FRMCTR2 0xB2 // Frame Rate Control (In Idle Mode/8 Colors) -#define ILI9488_FRMCTR3 0xB3 // Frame Rate Control (In Partial Mode/Full Colors) -#define ILI9488_INVTR 0xB4 // Display Inversion Control -#define ILI9488_PRCTR 0xB5 // Blanking Porch Control -#define ILI9488_DISCTRL 0xB6 // Display Function Control -#define ILI9488_ETMOD 0xB7 // Entry Mode Set -#define ILI9488_CECTRL1 0xB9 // Color Enhancement Control 1 -#define ILI9488_CECTRL2 0xBA // Color Enhancement Control 2 -#define ILI9488_HSLCTRL 0xBE // HS Lanes Control -#define ILI9488_PWCTRL1 0xC0 // Power Control 1 -#define ILI9488_PWCTRL2 0xC1 // Power Control 2 -#define ILI9488_PWCTRL3 0xC2 // Power Control 3 (For Normal Mode) -#define ILI9488_PWCTRL4 0xC3 // Power Control 4 (For Idle Mode) -#define ILI9488_PWCTRL5 0xC4 // Power Control 5 (For Partial Mode) -#define ILI9488_VMCTRL 0xC5 // VCOM Control -#define ILI9488_CABCCTRL1 0xC6 // CABC Control 1 -#define ILI9488_CABCCTRL2 0xC8 // CABC Control 2 -#define ILI9488_CABCCTRL3 0xC9 // CABC Control 3 -#define ILI9488_CABCCTRL4 0xCA // CABC Control 4 -#define ILI9488_CABCCTRL5 0xCB // CABC Control 5 -#define ILI9488_CABCCTRL6 0xCC // CABC Control 6 -#define ILI9488_CABCCTRL7 0xCD // CABC Control 7 -#define ILI9488_CABCCTRL8 0xCE // CABC Control 8 -#define ILI9488_CABCCTRL9 0xCF // CABC Control 9 -#define ILI9488_NVMWR 0xD0 // NV Memory Write -#define ILI9488_NVMPKEY 0xD1 // NV Memory Protection Key -#define ILI9488_RDNVM 0xD2 // NV Memory Status Read -#define ILI9488_RDID4 0xD3 // Read ID4 - 0x009488 -#define ILI9488_ADJCTL1 0xD7 // Adjust Control 1 -#define ILI9488_RDIDV 0xD8 // Read ID Version -#define ILI9488_PGAMCTRL 0xE0 // Positive Gamma Control -#define ILI9488_NGAMCTRL 0xE1 // Negative Gamma Control -#define ILI9488_DGAMCTRL1 0xE2 // Ditigal Gamma Control 1 -#define ILI9488_DGAMCTRL2 0xE3 // Ditigal Gamma Control 2 -#define ILI9488_SETIMAGE 0xE9 // Set Image Function -#define ILI9488_ADJCTL2 0xF2 // Adjust Control 2 -#define ILI9488_ADJCTL3 0xF7 // Adjust Control 3 -#define ILI9488_ADJCTL4 0xF8 // Adjust Control 4 -#define ILI9488_ADJCTL5 0xF9 // Adjust Control 5 -#define ILI9488_RDEXTC 0xFB // Read EXTC command is SPI mode -#define ILI9488_ADJCTL6 0xFC // Adjust Control 6 -#define ILI9488_ADJCTL7 0xFF // Adjust Control 7 +#define ILI9488_IFMODE 0xB0 // Interface Mode Control +#define ILI9488_FRMCTR1 0xB1 // Frame Rate Control (In Normal Mode/Full Colors) +#define ILI9488_FRMCTR2 0xB2 // Frame Rate Control (In Idle Mode/8 Colors) +#define ILI9488_FRMCTR3 0xB3 // Frame Rate Control (In Partial Mode/Full Colors) +#define ILI9488_INVTR 0xB4 // Display Inversion Control +#define ILI9488_PRCTR 0xB5 // Blanking Porch Control +#define ILI9488_DISCTRL 0xB6 // Display Function Control +#define ILI9488_ETMOD 0xB7 // Entry Mode Set +#define ILI9488_CECTRL1 0xB9 // Color Enhancement Control 1 +#define ILI9488_CECTRL2 0xBA // Color Enhancement Control 2 +#define ILI9488_HSLCTRL 0xBE // HS Lanes Control +#define ILI9488_PWCTRL1 0xC0 // Power Control 1 +#define ILI9488_PWCTRL2 0xC1 // Power Control 2 +#define ILI9488_PWCTRL3 0xC2 // Power Control 3 (For Normal Mode) +#define ILI9488_PWCTRL4 0xC3 // Power Control 4 (For Idle Mode) +#define ILI9488_PWCTRL5 0xC4 // Power Control 5 (For Partial Mode) +#define ILI9488_VMCTRL 0xC5 // VCOM Control +#define ILI9488_CABCCTRL1 0xC6 // CABC Control 1 +#define ILI9488_CABCCTRL2 0xC8 // CABC Control 2 +#define ILI9488_CABCCTRL3 0xC9 // CABC Control 3 +#define ILI9488_CABCCTRL4 0xCA // CABC Control 4 +#define ILI9488_CABCCTRL5 0xCB // CABC Control 5 +#define ILI9488_CABCCTRL6 0xCC // CABC Control 6 +#define ILI9488_CABCCTRL7 0xCD // CABC Control 7 +#define ILI9488_CABCCTRL8 0xCE // CABC Control 8 +#define ILI9488_CABCCTRL9 0xCF // CABC Control 9 +#define ILI9488_NVMWR 0xD0 // NV Memory Write +#define ILI9488_NVMPKEY 0xD1 // NV Memory Protection Key +#define ILI9488_RDNVM 0xD2 // NV Memory Status Read +#define ILI9488_RDID4 0xD3 // Read ID4 - 0x009488 +#define ILI9488_ADJCTL1 0xD7 // Adjust Control 1 +#define ILI9488_RDIDV 0xD8 // Read ID Version +#define ILI9488_PGAMCTRL 0xE0 // Positive Gamma Control +#define ILI9488_NGAMCTRL 0xE1 // Negative Gamma Control +#define ILI9488_DGAMCTRL1 0xE2 // Ditigal Gamma Control 1 +#define ILI9488_DGAMCTRL2 0xE3 // Ditigal Gamma Control 2 +#define ILI9488_SETIMAGE 0xE9 // Set Image Function +#define ILI9488_ADJCTL2 0xF2 // Adjust Control 2 +#define ILI9488_ADJCTL3 0xF7 // Adjust Control 3 +#define ILI9488_ADJCTL4 0xF8 // Adjust Control 4 +#define ILI9488_ADJCTL5 0xF9 // Adjust Control 5 +#define ILI9488_RDEXTC 0xFB // Read EXTC command is SPI mode +#define ILI9488_ADJCTL6 0xFC // Adjust Control 6 +#define ILI9488_ADJCTL7 0xFF // Adjust Control 7 + +#if 0 + // https://forum.mikroe.com/viewtopic.php?t=74586 + #if ANY(MKS_ROBIN_TFT35, TFT_TRONXY_X5SA, ANYCUBIC_TFT35) // ILI9488 + #define TFT_DRIVER ILI9488 + #define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_X | TFT_INVERT_Y) + #define TFT_RES_480x320 + #define TFT_INTERFACE_FSMC + #endif +#endif static const uint16_t ili9488_init[] = { DATASIZE_8BIT, @@ -154,10 +164,20 @@ static const uint16_t ili9488_init[] = { ESC_REG(ILI9488_MADCTL), ILI9488_MADCTL_DATA, ESC_REG(ILI9488_COLMOD), 0x0055, + ESC_REG(ILI9488_FRMCTR1), 0x00A0, + ESC_REG(ILI9488_INVTR), 0x0002, + ESC_REG(ILI9488_DISCTRL), 0x0002, 0x0002, // Gate Scan sequence: 0, Source Scan sequence: 0 + ESC_REG(ILI9488_PWCTRL1), 0x0015, 0x0017, + ESC_REG(ILI9488_PWCTRL2), 0x0041, + ESC_REG(ILI9488_VMCTRL), 0x0000, 0x0012, 0x0080, + ESC_REG(ILI9488_SETIMAGE), 0x0000, + ESC_REG(ILI9488_ADJCTL3), 0x00A9, 0x0051, 0x002C, 0x0082, + /* Gamma Correction. */ ESC_REG(ILI9488_PGAMCTRL), 0x0000, 0x0003, 0x0009, 0x0008, 0x0016, 0x000A, 0x003F, 0x0078, 0x004C, 0x0009, 0x000A, 0x0008, 0x0016, 0x001A, 0x000F, ESC_REG(ILI9488_NGAMCTRL), 0x0000, 0x0016, 0x0019, 0x0003, 0x000F, 0x0005, 0x0032, 0x0045, 0x0046, 0x0004, 0x000E, 0x000D, 0x0035, 0x0037, 0x000F, + ESC_REG(TERN(ILI9488_INVERTED, ILI9488_INVON, ILI9488_INVOFF)), // Display inversion ESC_REG(ILI9488_NORON), ESC_REG(ILI9488_DISON), ESC_END diff --git a/Marlin/src/lcd/tft_io/r65105.h b/Marlin/src/lcd/tft_io/r65105.h index 8be2afe442..4cc8c99942 100644 --- a/Marlin/src/lcd/tft_io/r65105.h +++ b/Marlin/src/lcd/tft_io/r65105.h @@ -41,7 +41,7 @@ #define R61505_DRVCTRL_GS 0x8000 // Gate Scan direction -// MKS Robin TFT v1.1 - 320x240 ; Cable on the left side +// MKS Robin TFT v1.1 - 320x240 ; FPC cable on the left side #if TFT_ROTATION == TFT_ROTATE_180 #define R61505_DRVCTL_DATA 0x0000 diff --git a/Marlin/src/lcd/tft_io/st7789v.h b/Marlin/src/lcd/tft_io/st7789v.h index d0cf969c66..a7048e0578 100644 --- a/Marlin/src/lcd/tft_io/st7789v.h +++ b/Marlin/src/lcd/tft_io/st7789v.h @@ -33,10 +33,11 @@ #define ST7789V_MADCTL_RGB 0x00 #define ST7789V_MADCTL_MH 0x04 // Horizontal Refresh Order -#define ST7789V_ORIENTATION_UP ST7789V_MADCTL_MX | ST7789V_MADCTL_MY // 240x320 ; Cable on the upper side -#define ST7789V_ORIENTATION_RIGHT ST7789V_MADCTL_MX | ST7789V_MADCTL_MV // 320x240 ; Cable on the right side -#define ST7789V_ORIENTATION_LEFT ST7789V_MADCTL_MY | ST7789V_MADCTL_MV // 320x240 ; Cable on the left side -#define ST7789V_ORIENTATION_DOWN 0 // 240x320 ; Cable on the lower side +// ST7789V-specific: "MX Inversion" is enabled by default in LCM Control register. +#define ST7789V_ORIENTATION_TOP ST7789V_MADCTL_MX | ST7789V_MADCTL_MY // 240x320 ; PFC cable on the top side +#define ST7789V_ORIENTATION_RIGHT ST7789V_MADCTL_MX | ST7789V_MADCTL_MV // 320x240 ; PFC cable on the right side +#define ST7789V_ORIENTATION_LEFT ST7789V_MADCTL_MY | ST7789V_MADCTL_MV // 320x240 ; PFC cable on the left side +#define ST7789V_ORIENTATION_BOTTOM 0 // 240x320 ; PFC cable on the bottom side #define ST7789V_ORIENTATION IF_0((TFT_ORIENTATION) & TFT_EXCHANGE_XY, ST7789V_MADCTL_MV) | \ IF_0((TFT_ORIENTATION) & TFT_INVERT_X, ST7789V_MADCTL_MX) | \ @@ -141,7 +142,22 @@ static const uint16_t st7789v_init[] = { ESC_REG(ST7789V_PORCTRL), 0x000C, 0x000C, 0x0000, 0x0033, 0x0033, ESC_REG(ST7789V_GCTRL), 0x0035, ESC_REG(ST7789V_VCOMS), 0x001F, - ESC_REG(ST7789V_LCMCTRL), 0x002C, + + /** + * LCM Control + * + * Default Power-on Value: 0x2C / 00101100b + * MY Inversion: 0 + * RGB/BGR Inversion: 1 + * Display Inversion: 0 + * MX Inversion: 1 + * MH (Source Output) Inversion: 1 + * MV Inversion: 0 + * Gate Scan Inversion: 0 + */ + ESC_REG(ST7789V_LCMCTRL), 0x002C, // Default Power-on Value + ESC_REG(ST7789V_GATECTRL), 0x0027, 0x0000, 0x0010, // Gate Scan Direction: 0 + ESC_REG(ST7789V_VDVVRHEN), 0x0001, 0x00C3, ESC_REG(ST7789V_VDVS), 0x0020, ESC_REG(ST7789V_FRCTRL2), 0x000F, diff --git a/Marlin/src/lcd/tft_io/st7796s.h b/Marlin/src/lcd/tft_io/st7796s.h index 6d79dd882a..bca8d602ef 100644 --- a/Marlin/src/lcd/tft_io/st7796s.h +++ b/Marlin/src/lcd/tft_io/st7796s.h @@ -33,6 +33,11 @@ #define ST7796S_MADCTL_RGB 0x00 #define ST7796S_MADCTL_MH 0x04 // Horizontal Refresh Order +#define ST7796S_ORIENTATION_TOP ST7796S_MADCTL_MX // 320x480 ; FPC cable on the top side +#define ST7796S_ORIENTATION_RIGHT ST7796S_MADCTL_MV // 480x320 ; FPC cable on the right side +#define ST7796S_ORIENTATION_LEFT ST7796S_MADCTL_MY | ST7796S_MADCTL_MX | ST7796S_MADCTL_MV // 480x320 ; FPC cable on the left side +#define ST7796S_ORIENTATION_BOTTOM ST7796S_MADCTL_MY // 320x480 ; FPC cable on the bottom side + #define ST7796S_ORIENTATION IF_0((TFT_ORIENTATION) & TFT_EXCHANGE_XY, ST7796S_MADCTL_MV) | \ IF_0((TFT_ORIENTATION) & TFT_INVERT_X, ST7796S_MADCTL_MX) | \ IF_0((TFT_ORIENTATION) & TFT_INVERT_Y, ST7796S_MADCTL_MY) @@ -132,6 +137,7 @@ static const uint16_t st7796s_init[] = { ESC_REG(ST7796S_COLMOD), 0x0055, ESC_REG(ST7796S_DIC), 0x0001, // 1-dot inversion + ESC_REG(ST7796S_DFC), 0x0080, 0x0002, 0x003B, // Source Output Scan Direction: 0, Gate Output Scan Direction: 0 ESC_REG(ST7796S_EM), 0x00C6, ESC_REG(ST7796S_PWR2), 0x0015, @@ -144,11 +150,7 @@ static const uint16_t st7796s_init[] = { ESC_REG(ST7796S_PGC), 0x00F0, 0x0004, 0x0008, 0x0009, 0x0008, 0x0015, 0x002F, 0x0042, 0x0046, 0x0028, 0x0015, 0x0016, 0x0029, 0x002D, ESC_REG(ST7796S_NGC), 0x00F0, 0x0004, 0x0009, 0x0009, 0x0008, 0x0015, 0x002E, 0x0046, 0x0046, 0x0028, 0x0015, 0x0015, 0x0029, 0x002D, - #if ENABLED(ST7796S_INVERTED) - ESC_REG(ST7796S_INVON), // Display inversion ON - #else - ESC_REG(ST7796S_NORON), - #endif + ESC_REG(TERN(ST7796S_INVERTED, ST7796S_INVON, ST7796S_NORON)), // Display inversion ESC_REG(ST7796S_WRCTRLD), 0x0024, ESC_REG(ST7796S_CSCON), 0x003C, // disable command 2 part I ESC_REG(ST7796S_CSCON), 0x0069, // disable command 2 part II diff --git a/Marlin/src/pins/stm32f1/pins_CHITU3D_common.h b/Marlin/src/pins/stm32f1/pins_CHITU3D_common.h index 9f8de25ff1..c85c107bd9 100644 --- a/Marlin/src/pins/stm32f1/pins_CHITU3D_common.h +++ b/Marlin/src/pins/stm32f1/pins_CHITU3D_common.h @@ -140,8 +140,6 @@ #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT #define FSMC_CS_PIN PD7 #define FSMC_RS_PIN PD11 - #define FSMC_DMA_DEV DMA2 - #define FSMC_DMA_CHANNEL DMA_CH5 #define TFT_CS_PIN FSMC_CS_PIN #define TFT_RS_PIN FSMC_RS_PIN diff --git a/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h b/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h index f784c07c21..0811ab1f1b 100644 --- a/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h +++ b/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h @@ -293,8 +293,6 @@ #define TFT_BACKLIGHT_PIN PD13 #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT - #define FSMC_DMA_DEV DMA2 - #define FSMC_DMA_CHANNEL DMA_CH5 #define FSMC_CS_PIN PD7 // NE4 #define FSMC_RS_PIN PD11 // A0 diff --git a/Marlin/src/pins/stm32f1/pins_JGAURORA_A5S_A1.h b/Marlin/src/pins/stm32f1/pins_JGAURORA_A5S_A1.h index c4638cd9a9..21ac51e279 100644 --- a/Marlin/src/pins/stm32f1/pins_JGAURORA_A5S_A1.h +++ b/Marlin/src/pins/stm32f1/pins_JGAURORA_A5S_A1.h @@ -117,8 +117,6 @@ #define FSMC_RS_PIN PG0 #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT - #define FSMC_DMA_DEV DMA2 - #define FSMC_DMA_CHANNEL DMA_CH5 #define TFT_CS_PIN FSMC_CS_PIN #define TFT_RS_PIN FSMC_RS_PIN diff --git a/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h b/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h index bd39632cc5..b1498d13b9 100644 --- a/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h +++ b/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h @@ -138,8 +138,6 @@ #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT #define FSMC_CS_PIN PD7 // pin 88 = FSMC_NE1 #define FSMC_RS_PIN PD11 // pin 58 A16 Register. Only one address needed - #define FSMC_DMA_DEV DMA2 - #define FSMC_DMA_CHANNEL DMA_CH5 #define TFT_CS_PIN FSMC_CS_PIN #define TFT_RS_PIN FSMC_RS_PIN diff --git a/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h b/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h index c4d0276578..cc26942002 100644 --- a/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h @@ -143,8 +143,6 @@ #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT #define FSMC_CS_PIN PD7 // NE4 #define FSMC_RS_PIN PG0 // A0 - #define FSMC_DMA_DEV DMA2 - #define FSMC_DMA_CHANNEL DMA_CH5 #define TFT_CS_PIN FSMC_CS_PIN #define TFT_RS_PIN FSMC_RS_PIN diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h index 25b372a889..5f290d153d 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h @@ -176,8 +176,6 @@ #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT #define FSMC_CS_PIN PG12 // NE4 #define FSMC_RS_PIN PF0 // A0 - #define FSMC_DMA_DEV DMA2 - #define FSMC_DMA_CHANNEL DMA_CH5 #define TFT_CS_PIN FSMC_CS_PIN #define TFT_RS_PIN FSMC_RS_PIN diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h index 11597109c8..46c2fa8065 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h @@ -160,8 +160,6 @@ #define FSMC_RS_PIN TFT_RS_PIN // A0 #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT - #define FSMC_DMA_DEV DMA2 - #define FSMC_DMA_CHANNEL DMA_CH5 #if NEED_TOUCH_PINS #define TOUCH_CS_PIN PC2 // SPI2_NSS diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_common.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_common.h index 616d1f1d3f..28dd19938b 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_common.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_common.h @@ -196,8 +196,6 @@ #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT #define FSMC_CS_PIN PD7 #define FSMC_RS_PIN PD11 - #define FSMC_DMA_DEV DMA2 - #define FSMC_DMA_CHANNEL DMA_CH5 #define TFT_CS_PIN FSMC_CS_PIN #define TFT_RS_PIN FSMC_RS_PIN diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h index 63b7b9e286..8a213090b1 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h @@ -231,8 +231,6 @@ #define FSMC_CS_PIN PD7 // NE4 #define FSMC_RS_PIN PD11 // A0 - #define FSMC_DMA_DEV DMA2 - #define FSMC_DMA_CHANNEL DMA_CH5 #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT #define TFT_CS_PIN FSMC_CS_PIN #define TFT_RS_PIN FSMC_RS_PIN diff --git a/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h b/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h index 410e39bccf..d2f3645d94 100644 --- a/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h +++ b/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h @@ -153,8 +153,6 @@ #define TFT_RS_PIN FSMC_RS_PIN #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT - #define FSMC_DMA_DEV DMA2 - #define FSMC_DMA_CHANNEL DMA_CH5 #define ANYCUBIC_TFT35 #else diff --git a/Marlin/src/pins/stm32f4/pins_TRONXY_V10.h b/Marlin/src/pins/stm32f4/pins_TRONXY_V10.h index 21158f7af9..8d2584fe10 100644 --- a/Marlin/src/pins/stm32f4/pins_TRONXY_V10.h +++ b/Marlin/src/pins/stm32f4/pins_TRONXY_V10.h @@ -200,8 +200,6 @@ #define TFT_BACKLIGHT_PIN PG8 #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT - #define FSMC_DMA_DEV DMA2 - #define FSMC_DMA_CHANNEL DMA_CH5 #define TFT_CS_PIN PG12 #define TFT_RS_PIN PG2 From a3ab435acf27034e14cc1f94ab5e3de3936052cf Mon Sep 17 00:00:00 2001 From: Eduard Sukharev Date: Mon, 27 Mar 2023 21:55:56 +0300 Subject: [PATCH 094/225] =?UTF-8?q?=F0=9F=90=9B=20Fix=20M23=20long=20filen?= =?UTF-8?q?ame=20support=20(#25540)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/sd/SdBaseFile.cpp | 87 +++++++++++++++++++++--------------- Marlin/src/sd/SdBaseFile.h | 10 +++-- 2 files changed, 57 insertions(+), 40 deletions(-) diff --git a/Marlin/src/sd/SdBaseFile.cpp b/Marlin/src/sd/SdBaseFile.cpp index b8b49b7ba0..72cdcb9268 100644 --- a/Marlin/src/sd/SdBaseFile.cpp +++ b/Marlin/src/sd/SdBaseFile.cpp @@ -703,7 +703,10 @@ bool SdBaseFile::open(SdBaseFile *dirFile, const uint8_t dname[11] // Get VFat dir entry pvFat = (vfat_t *) p; // Get checksum from the last entry of the sequence - if (pvFat->sequenceNumber & 0x40) lfnChecksum = pvFat->checksum; + if (pvFat->sequenceNumber & 0x40) { + lfnChecksum = pvFat->checksum; + ZERO(lfnName); + } // Get LFN sequence number lfnSequenceNumber = pvFat->sequenceNumber & 0x1F; if WITHIN(lfnSequenceNumber, 1, reqEntriesNum) { @@ -711,6 +714,7 @@ bool SdBaseFile::open(SdBaseFile *dirFile, const uint8_t dname[11] if (lfnChecksum == pvFat->checksum) { // Set chunk of LFN from VFAT entry into lfnName getLFNName(pvFat, (char *)lfnName, lfnSequenceNumber); + TERN_(UTF_FILENAME_SUPPORT, convertUtf16ToUtf8((char *)lfnName)); // LFN found? if (!strncasecmp((char*)dlname, (char*)lfnName, lfnNameLength)) lfnFileFound = true; } @@ -1132,13 +1136,13 @@ bool SdBaseFile::openNext(SdBaseFile *dirFile, uint8_t oflag) { * Get the LFN filename block from a dir. Get the block in lname at startOffset */ void SdBaseFile::getLFNName(vfat_t *pFatDir, char *lname, uint8_t sequenceNumber) { - uint8_t startOffset = (sequenceNumber - 1) * FILENAME_LENGTH; + const uint8_t startOffset = (sequenceNumber - 1) * FILENAME_LENGTH; LOOP_L_N(i, FILENAME_LENGTH) { const uint16_t utf16_ch = (i >= 11) ? pFatDir->name3[i - 11] : (i >= 5) ? pFatDir->name2[i - 5] : pFatDir->name1[i]; #if ENABLED(UTF_FILENAME_SUPPORT) // We can't reconvert to UTF-8 here as UTF-8 is variable-size encoding, but joining LFN blocks // needs static bytes addressing. So here just store full UTF-16LE words to re-convert later. - uint16_t idx = (startOffset + i) * 2; // This is fixed as FAT LFN always contain UTF-16LE encoding + const uint16_t idx = (startOffset + i) * 2; // This is fixed as FAT LFN always contain UTF-16LE encoding lname[idx] = utf16_ch & 0xFF; lname[idx + 1] = (utf16_ch >> 8) & 0xFF; #else @@ -1152,8 +1156,8 @@ bool SdBaseFile::openNext(SdBaseFile *dirFile, uint8_t oflag) { * Set the LFN filename block lname to a dir. Put the block based on sequence number */ void SdBaseFile::setLFNName(vfat_t *pFatDir, char *lname, uint8_t sequenceNumber) { - uint8_t startOffset = (sequenceNumber - 1) * FILENAME_LENGTH; - uint8_t nameLength = strlen(lname); + const uint8_t startOffset = (sequenceNumber - 1) * FILENAME_LENGTH, + nameLength = strlen(lname); LOOP_L_N(i, FILENAME_LENGTH) { uint16_t ch = 0; if ((startOffset + i) < nameLength) @@ -1424,7 +1428,7 @@ int16_t SdBaseFile::read(void *buf, uint16_t nbyte) { * readDir() called before a directory has been opened, this is not * a directory file or an I/O error occurred. */ -int8_t SdBaseFile::readDir(dir_t *dir, char *longFilename) { +int8_t SdBaseFile::readDir(dir_t *dir, char * const longFilename) { int16_t n; // if not a directory file or miss-positioned return an error if (!isDir() || (0x1F & curPosition_)) return -1; @@ -1506,44 +1510,55 @@ int8_t SdBaseFile::readDir(dir_t *dir, char *longFilename) { // Post-process normal file or subdirectory longname, if any if (DIR_IS_FILE_OR_SUBDIR(dir)) { #if ENABLED(UTF_FILENAME_SUPPORT) - #if LONG_FILENAME_CHARSIZE > 2 - // Add warning for developers for unsupported 3-byte cases. - // (Converting 2-byte codepoints to 3-byte in-place would break the rest of filename.) - #error "Currently filename re-encoding is done in-place. It may break the remaining chars to use 3-byte codepoints." - #endif - // Is there a long filename to decode? if (longFilename) { - // Reset n to the start of the long name - n = 0; - for (uint16_t idx = 0; idx < (LONG_FILENAME_LENGTH); idx += 2) { // idx is fixed since FAT LFN always contains UTF-16LE encoding - const uint16_t utf16_ch = longFilename[idx] | (longFilename[idx + 1] << 8); - if (0xD800 == (utf16_ch & 0xF800)) // Surrogate pair - encode as '_' - longFilename[n++] = '_'; - else if (0 == (utf16_ch & 0xFF80)) // Encode as 1-byte UTF-8 char - longFilename[n++] = utf16_ch & 0x007F; - else if (0 == (utf16_ch & 0xF800)) { // Encode as 2-byte UTF-8 char - longFilename[n++] = 0xC0 | ((utf16_ch >> 6) & 0x1F); - longFilename[n++] = 0x80 | ( utf16_ch & 0x3F); - } - else { - #if LONG_FILENAME_CHARSIZE > 2 // Encode as 3-byte UTF-8 char - longFilename[n++] = 0xE0 | ((utf16_ch >> 12) & 0x0F); - longFilename[n++] = 0xC0 | ((utf16_ch >> 6) & 0x3F); - longFilename[n++] = 0xC0 | ( utf16_ch & 0x3F); - #else // Encode as '_' - longFilename[n++] = '_'; - #endif - } - if (0 == utf16_ch) break; // End of filename - } // idx - } // longFilename + n = convertUtf16ToUtf8(longFilename); + } #endif return n; } // DIR_IS_FILE_OR_SUBDIR } } +#if ENABLED(UTF_FILENAME_SUPPORT) + + uint8_t SdBaseFile::convertUtf16ToUtf8(char * const longFilename) { + #if LONG_FILENAME_CHARSIZE > 2 + // Add warning for developers for unsupported 3-byte cases. + // (Converting 2-byte codepoints to 3-byte in-place would break the rest of filename.) + #error "Currently filename re-encoding is done in-place. It may break the remaining chars to use 3-byte codepoints." + #endif + + int16_t n; + // Reset n to the start of the long name + n = 0; + for (uint16_t idx = 0; idx < (LONG_FILENAME_LENGTH); idx += 2) { // idx is fixed since FAT LFN always contains UTF-16LE encoding + const uint16_t utf16_ch = longFilename[idx] | (longFilename[idx + 1] << 8); + if (0xD800 == (utf16_ch & 0xF800)) // Surrogate pair - encode as '_' + longFilename[n++] = '_'; + else if (0 == (utf16_ch & 0xFF80)) // Encode as 1-byte UTF-8 char + longFilename[n++] = utf16_ch & 0x007F; + else if (0 == (utf16_ch & 0xF800)) { // Encode as 2-byte UTF-8 char + longFilename[n++] = 0xC0 | ((utf16_ch >> 6) & 0x1F); + longFilename[n++] = 0x80 | ( utf16_ch & 0x3F); + } + else { + #if LONG_FILENAME_CHARSIZE > 2 // Encode as 3-byte UTF-8 char + longFilename[n++] = 0xE0 | ((utf16_ch >> 12) & 0x0F); + longFilename[n++] = 0xC0 | ((utf16_ch >> 6) & 0x3F); + longFilename[n++] = 0xC0 | ( utf16_ch & 0x3F); + #else // Encode as '_' + longFilename[n++] = '_'; + #endif + } + if (0 == utf16_ch) break; // End of filename + } // idx + + return n; + } + +#endif // UTF_FILENAME_SUPPORT + // Read next directory entry into the cache // Assumes file is correctly positioned dir_t* SdBaseFile::readDirCache() { diff --git a/Marlin/src/sd/SdBaseFile.h b/Marlin/src/sd/SdBaseFile.h index dd8e2aff4b..19225170f9 100644 --- a/Marlin/src/sd/SdBaseFile.h +++ b/Marlin/src/sd/SdBaseFile.h @@ -298,7 +298,7 @@ class SdBaseFile { bool printName(); int16_t read(); int16_t read(void *buf, uint16_t nbyte); - int8_t readDir(dir_t *dir, char *longFilename); + int8_t readDir(dir_t *dir, char * const longFilename); static bool remove(SdBaseFile *dirFile, const char *path); bool remove(); @@ -392,14 +392,16 @@ class SdBaseFile { bool openCachedEntry(uint8_t cacheIndex, uint8_t oflags); dir_t* readDirCache(); + #if ENABLED(UTF_FILENAME_SUPPORT) + uint8_t convertUtf16ToUtf8(char * const longFilename); + #endif + // Long Filename create/write support #if ENABLED(LONG_FILENAME_WRITE_SUPPORT) static bool isDirLFN(const dir_t* dir); static bool isDirNameLFN(const char *dirname); static bool parsePath(const char *str, uint8_t *name, uint8_t *lname, const char **ptr); - /** - * Return the number of entries needed in the FAT for this LFN - */ + // Return the number of entries needed in the FAT for this LFN static inline uint8_t getLFNEntriesNum(const char *lname) { return (strlen(lname) + 12) / 13; } static void getLFNName(vfat_t *vFatDir, char *lname, uint8_t startOffset); static void setLFNName(vfat_t *vFatDir, char *lname, uint8_t lfnSequenceNumber); From 70063fb6520f4d42976ef9f4ea58cde6506bb96f Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Tue, 28 Mar 2023 00:21:53 +0000 Subject: [PATCH 095/225] [cron] Bump distribution date (2023-03-28) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 73ec99f61d..69cf291f62 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-03-27" +//#define STRING_DISTRIBUTION_DATE "2023-03-28" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index c169ec5129..6c08c374ce 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-03-27" + #define STRING_DISTRIBUTION_DATE "2023-03-28" #endif /** From de0cd660705668f2e9f1e0cb8fff80b40be0f4e6 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 28 Mar 2023 05:39:35 -0500 Subject: [PATCH 096/225] =?UTF-8?q?=F0=9F=8E=A8=20Misc.=20cleanup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/LPC1768/tft/tft_spi.h | 2 +- Marlin/src/HAL/NATIVE_SIM/tft/tft_spi.h | 2 +- Marlin/src/HAL/STM32/tft/tft_fsmc.cpp | 2 +- Marlin/src/HAL/STM32/tft/tft_fsmc.h | 8 ++++++-- Marlin/src/HAL/STM32/tft/tft_ltdc.h | 2 +- Marlin/src/HAL/STM32/tft/tft_spi.h | 2 +- Marlin/src/HAL/STM32F1/MarlinSerial.cpp | 4 ++-- Marlin/src/HAL/STM32F1/sdio.cpp | 9 +++++++-- Marlin/src/HAL/STM32F1/tft/tft_fsmc.cpp | 4 ++++ Marlin/src/HAL/STM32F1/tft/tft_fsmc.h | 2 +- Marlin/src/HAL/STM32F1/tft/tft_spi.cpp | 4 ++++ Marlin/src/HAL/STM32F1/tft/tft_spi.h | 2 +- Marlin/src/HAL/STM32F1/tft/xpt2046.cpp | 6 +++++- Marlin/src/feature/mmu/mmu2-serial-protocol.md | 1 - Marlin/src/lcd/tft_io/st7789v.h | 2 +- Marlin/src/lcd/tft_io/tft_io.h | 2 +- Marlin/src/module/endstops.cpp | 4 ++-- Marlin/src/module/endstops.h | 2 +- Marlin/src/module/tool_change.cpp | 1 - Marlin/src/pins/ramps/pins_VORON.h | 8 +++----- 20 files changed, 43 insertions(+), 26 deletions(-) diff --git a/Marlin/src/HAL/LPC1768/tft/tft_spi.h b/Marlin/src/HAL/LPC1768/tft/tft_spi.h index dad393981e..4817a5aae3 100644 --- a/Marlin/src/HAL/LPC1768/tft/tft_spi.h +++ b/Marlin/src/HAL/LPC1768/tft/tft_spi.h @@ -69,7 +69,7 @@ public: static bool isBusy(); static void Abort(); - static void DataTransferBegin(uint16_t DataWidth = DATASIZE_16BIT); + static void DataTransferBegin(uint16_t DataWidth=DATASIZE_16BIT); static void DataTransferEnd() { WRITE(TFT_CS_PIN, HIGH); SSP_Cmd(LPC_SSPx, DISABLE); }; static void DataTransferAbort(); diff --git a/Marlin/src/HAL/NATIVE_SIM/tft/tft_spi.h b/Marlin/src/HAL/NATIVE_SIM/tft/tft_spi.h index f412e09e11..f3b64c4cca 100644 --- a/Marlin/src/HAL/NATIVE_SIM/tft/tft_spi.h +++ b/Marlin/src/HAL/NATIVE_SIM/tft/tft_spi.h @@ -52,7 +52,7 @@ public: static bool isBusy(); static void Abort(); - static void DataTransferBegin(uint16_t DataWidth = DATASIZE_16BIT); + static void DataTransferBegin(uint16_t DataWidth=DATASIZE_16BIT); static void DataTransferEnd(); static void DataTransferAbort(); diff --git a/Marlin/src/HAL/STM32/tft/tft_fsmc.cpp b/Marlin/src/HAL/STM32/tft/tft_fsmc.cpp index fa43a7ad27..6ac3549b41 100644 --- a/Marlin/src/HAL/STM32/tft/tft_fsmc.cpp +++ b/Marlin/src/HAL/STM32/tft/tft_fsmc.cpp @@ -71,7 +71,7 @@ void TFT_FSMC::Init() { Timing.DataLatency = 17; Timing.AccessMode = FSMC_ACCESS_MODE_A; // Write Timing - // Can be decreases from 8-15-8 to 0-0-1 with risk of stability loss + // Can be decreased from 8-15-8 to 0-0-1 with risk of stability loss ExtTiming.AddressSetupTime = 8; ExtTiming.AddressHoldTime = 15; ExtTiming.DataSetupTime = 8; diff --git a/Marlin/src/HAL/STM32/tft/tft_fsmc.h b/Marlin/src/HAL/STM32/tft/tft_fsmc.h index 41ff8c9a83..8eb41d717d 100644 --- a/Marlin/src/HAL/STM32/tft/tft_fsmc.h +++ b/Marlin/src/HAL/STM32/tft/tft_fsmc.h @@ -31,6 +31,10 @@ #error "FSMC TFT is currently only supported on STM32F1 and STM32F4 hardware." #endif +#ifndef HAL_SRAM_MODULE_ENABLED + #error "SRAM module disabled for the STM32 framework (HAL_SRAM_MODULE_ENABLED)! Please consult the development team." +#endif + #ifndef LCD_READ_ID #define LCD_READ_ID 0x04 // Read display identification information (0xD3 on ILI9341) #endif @@ -69,8 +73,8 @@ class TFT_FSMC { static bool isBusy(); static void Abort(); - static void DataTransferBegin(uint16_t DataWidth = TFT_DATASIZE) {} - static void DataTransferEnd() {}; + static void DataTransferBegin(uint16_t DataWidth=TFT_DATASIZE) {} + static void DataTransferEnd() {} static void WriteData(uint16_t Data) { Transmit(tft_data_t(Data)); } static void WriteReg(uint16_t Reg) { LCD->REG = tft_data_t(Reg); __DSB(); } diff --git a/Marlin/src/HAL/STM32/tft/tft_ltdc.h b/Marlin/src/HAL/STM32/tft/tft_ltdc.h index 8d83839bb3..ee65561011 100644 --- a/Marlin/src/HAL/STM32/tft/tft_ltdc.h +++ b/Marlin/src/HAL/STM32/tft/tft_ltdc.h @@ -58,7 +58,7 @@ class TFT_LTDC { static bool isBusy(); static void Abort() { /*__HAL_DMA_DISABLE(&DMAtx);*/ } - static void DataTransferBegin(uint16_t DataWidth = TFT_DATASIZE) {} + static void DataTransferBegin(uint16_t DataWidth=TFT_DATASIZE) {} static void DataTransferEnd() {}; static void WriteData(uint16_t Data); diff --git a/Marlin/src/HAL/STM32/tft/tft_spi.h b/Marlin/src/HAL/STM32/tft/tft_spi.h index 6b8613e3f8..4825b65c68 100644 --- a/Marlin/src/HAL/STM32/tft/tft_spi.h +++ b/Marlin/src/HAL/STM32/tft/tft_spi.h @@ -60,7 +60,7 @@ public: static bool isBusy(); static void Abort(); - static void DataTransferBegin(uint16_t DataWidth = DATASIZE_16BIT); + static void DataTransferBegin(uint16_t DataWidth=DATASIZE_16BIT); static void DataTransferEnd() { WRITE(TFT_CS_PIN, HIGH); __HAL_SPI_DISABLE(&SPIx); }; static void DataTransferAbort(); diff --git a/Marlin/src/HAL/STM32F1/MarlinSerial.cpp b/Marlin/src/HAL/STM32F1/MarlinSerial.cpp index 6dabcde51e..7898e9f2bc 100644 --- a/Marlin/src/HAL/STM32F1/MarlinSerial.cpp +++ b/Marlin/src/HAL/STM32F1/MarlinSerial.cpp @@ -77,7 +77,7 @@ static inline __always_inline void my_usart_irq(ring_buffer *rb, ring_buffer *wb // Not every MarlinSerial port should handle emergency parsing. // It would not make sense to parse GCode from TMC responses, for example. constexpr bool serial_handles_emergency(int port) { - return false + return (false #ifdef SERIAL_PORT || (SERIAL_PORT) == port #endif @@ -87,7 +87,7 @@ constexpr bool serial_handles_emergency(int port) { #ifdef LCD_SERIAL_PORT || (LCD_SERIAL_PORT) == port #endif - ; + ); } #define DEFINE_HWSERIAL_MARLIN(name, n) \ diff --git a/Marlin/src/HAL/STM32F1/sdio.cpp b/Marlin/src/HAL/STM32F1/sdio.cpp index 6e41d2cbf1..b00be30217 100644 --- a/Marlin/src/HAL/STM32F1/sdio.cpp +++ b/Marlin/src/HAL/STM32F1/sdio.cpp @@ -136,8 +136,13 @@ bool SDIO_ReadBlock_DMA(uint32_t blockAddress, uint8_t *data) { } bool SDIO_ReadBlock(uint32_t blockAddress, uint8_t *data) { - uint32_t retries = SDIO_READ_RETRIES; - while (retries--) if (SDIO_ReadBlock_DMA(blockAddress, data)) return true; + uint8_t retries = SDIO_READ_RETRIES; + while (retries--) { + if (SDIO_ReadBlock_DMA(blockAddress, data)) return true; + #if SD_RETRY_DELAY_MS + delay(SD_RETRY_DELAY_MS); + #endif + } return false; } diff --git a/Marlin/src/HAL/STM32F1/tft/tft_fsmc.cpp b/Marlin/src/HAL/STM32F1/tft/tft_fsmc.cpp index 3fd92ed02b..1e4dfec8a6 100644 --- a/Marlin/src/HAL/STM32F1/tft/tft_fsmc.cpp +++ b/Marlin/src/HAL/STM32F1/tft/tft_fsmc.cpp @@ -20,6 +20,8 @@ * */ +#ifdef __STM32F1__ + #include "../../../inc/MarlinConfig.h" #if HAS_FSMC_TFT @@ -262,3 +264,5 @@ void TFT_FSMC::Transmit(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Count) } #endif // HAS_FSMC_TFT + +#endif // __STM32F1__ diff --git a/Marlin/src/HAL/STM32F1/tft/tft_fsmc.h b/Marlin/src/HAL/STM32F1/tft/tft_fsmc.h index ab98334f57..0db7f559b6 100644 --- a/Marlin/src/HAL/STM32F1/tft/tft_fsmc.h +++ b/Marlin/src/HAL/STM32F1/tft/tft_fsmc.h @@ -65,7 +65,7 @@ class TFT_FSMC { static bool isBusy(); static void Abort(); - static void DataTransferBegin(uint16_t DataWidth = DATASIZE_16BIT) {}; + static void DataTransferBegin(uint16_t DataWidth=DATASIZE_16BIT) {}; static void DataTransferEnd() {}; static void WriteData(uint16_t Data) { Transmit(Data); } diff --git a/Marlin/src/HAL/STM32F1/tft/tft_spi.cpp b/Marlin/src/HAL/STM32F1/tft/tft_spi.cpp index 9129cfdf1f..eed52f4e8a 100644 --- a/Marlin/src/HAL/STM32F1/tft/tft_spi.cpp +++ b/Marlin/src/HAL/STM32F1/tft/tft_spi.cpp @@ -20,6 +20,8 @@ * */ +#ifdef __STM32F1__ + #include "../../../inc/MarlinConfig.h" #if HAS_SPI_TFT @@ -165,3 +167,5 @@ void TFT_SPI::Transmit(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Count) } #endif // HAS_SPI_TFT + +#endif // __STM32F1__ diff --git a/Marlin/src/HAL/STM32F1/tft/tft_spi.h b/Marlin/src/HAL/STM32F1/tft/tft_spi.h index 2bda8c21f7..573077d21d 100644 --- a/Marlin/src/HAL/STM32F1/tft/tft_spi.h +++ b/Marlin/src/HAL/STM32F1/tft/tft_spi.h @@ -76,7 +76,7 @@ public: static bool isBusy(); static void Abort(); - static void DataTransferBegin(uint16_t DataWidth = DATA_SIZE_16BIT); + static void DataTransferBegin(uint16_t DataWidth=DATA_SIZE_16BIT); static void DataTransferEnd() { WRITE(TFT_CS_PIN, HIGH); SPIx.end(); }; static void DataTransferAbort(); diff --git a/Marlin/src/HAL/STM32F1/tft/xpt2046.cpp b/Marlin/src/HAL/STM32F1/tft/xpt2046.cpp index ac9ad072aa..bf57ba0034 100644 --- a/Marlin/src/HAL/STM32F1/tft/xpt2046.cpp +++ b/Marlin/src/HAL/STM32F1/tft/xpt2046.cpp @@ -20,6 +20,8 @@ * */ +#ifdef __STM32F1__ + #include "../../../inc/MarlinConfig.h" #if HAS_TFT_XPT2046 || HAS_RES_TOUCH_BUTTONS @@ -141,4 +143,6 @@ uint16_t XPT2046::SoftwareIO(uint16_t data) { return result; } -#endif // HAS_TFT_XPT2046 +#endif // HAS_TFT_XPT2046 || HAS_RES_TOUCH_BUTTONS + +#endif // __STM32F1__ diff --git a/Marlin/src/feature/mmu/mmu2-serial-protocol.md b/Marlin/src/feature/mmu/mmu2-serial-protocol.md index 93135e406f..42f30e418d 100644 --- a/Marlin/src/feature/mmu/mmu2-serial-protocol.md +++ b/Marlin/src/feature/mmu/mmu2-serial-protocol.md @@ -91,4 +91,3 @@ Eject filament - MMU <= 'E*Filament index*\n' - MMU => 'ok\n' - diff --git a/Marlin/src/lcd/tft_io/st7789v.h b/Marlin/src/lcd/tft_io/st7789v.h index a7048e0578..690e530717 100644 --- a/Marlin/src/lcd/tft_io/st7789v.h +++ b/Marlin/src/lcd/tft_io/st7789v.h @@ -145,7 +145,7 @@ static const uint16_t st7789v_init[] = { /** * LCM Control - * + * * Default Power-on Value: 0x2C / 00101100b * MY Inversion: 0 * RGB/BGR Inversion: 1 diff --git a/Marlin/src/lcd/tft_io/tft_io.h b/Marlin/src/lcd/tft_io/tft_io.h index 9cfb2137df..7dd973ef70 100644 --- a/Marlin/src/lcd/tft_io/tft_io.h +++ b/Marlin/src/lcd/tft_io/tft_io.h @@ -62,7 +62,7 @@ public: inline static void Abort() { io.Abort(); } inline static uint32_t GetID() { return io.GetID(); } - inline static void DataTransferBegin(uint16_t DataWidth = DATASIZE_16BIT) { io.DataTransferBegin(DataWidth); } + inline static void DataTransferBegin(uint16_t DataWidth=DATASIZE_16BIT) { io.DataTransferBegin(DataWidth); } inline static void DataTransferEnd() { io.DataTransferEnd(); } inline static void WriteData(uint16_t Data) { io.WriteData(Data); } diff --git a/Marlin/src/module/endstops.cpp b/Marlin/src/module/endstops.cpp index 9d73210025..6719925f15 100644 --- a/Marlin/src/module/endstops.cpp +++ b/Marlin/src/module/endstops.cpp @@ -1143,7 +1143,7 @@ void Endstops::update() { #endif )) { SBI(live_state, X_ENDSTOP); hit = true; } #if ENABLED(X_DUAL_ENDSTOPS) - if (tmc_spi_homing.x && stepperX2.test_stall_status()) { SBI(live_state, X2_ENDSTOP); hit = true; } + if (tmc_spi_homing.x && stepperX2.test_stall_status()) { SBI(live_state, X2_ENDSTOP); hit = true; } #endif #endif #if Y_SPI_SENSORLESS @@ -1155,7 +1155,7 @@ void Endstops::update() { #endif )) { SBI(live_state, Y_ENDSTOP); hit = true; } #if ENABLED(Y_DUAL_ENDSTOPS) - if (tmc_spi_homing.y && stepperY2.test_stall_status()) { SBI(live_state, Y2_ENDSTOP); hit = true; } + if (tmc_spi_homing.y && stepperY2.test_stall_status()) { SBI(live_state, Y2_ENDSTOP); hit = true; } #endif #endif #if Z_SPI_SENSORLESS diff --git a/Marlin/src/module/endstops.h b/Marlin/src/module/endstops.h index 36cd002c8f..76c8d454d7 100644 --- a/Marlin/src/module/endstops.h +++ b/Marlin/src/module/endstops.h @@ -86,7 +86,7 @@ enum EndstopEnum : char { #if HAS_X_MIN || HAS_X_MAX , X_ENDSTOP = TERN(X_HOME_TO_MAX, X_MAX, X_MIN) #if ENABLED(X_DUAL_ENDSTOPS) - , X2_ENDSTOP = TERN(X_HOME_TO_MAX, X2_MAX, X2_MIN) + , X2_ENDSTOP = TERN(X_HOME_TO_MAX, X2_MAX, X2_MIN) #endif #endif #if HAS_Y_MIN || HAS_Y_MAX diff --git a/Marlin/src/module/tool_change.cpp b/Marlin/src/module/tool_change.cpp index 9955a0f1b0..43a50505ef 100644 --- a/Marlin/src/module/tool_change.cpp +++ b/Marlin/src/module/tool_change.cpp @@ -435,7 +435,6 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0. } } - #endif // TOOL_SENSOR #if ENABLED(SWITCHING_TOOLHEAD) diff --git a/Marlin/src/pins/ramps/pins_VORON.h b/Marlin/src/pins/ramps/pins_VORON.h index c928a1fb65..4aee2ab142 100644 --- a/Marlin/src/pins/ramps/pins_VORON.h +++ b/Marlin/src/pins/ramps/pins_VORON.h @@ -29,14 +29,10 @@ #define BOARD_INFO_NAME "VORON Design v2" -#define MOSFET_C_PIN 11 - -#include "pins_RAMPS.h" - // // Heaters / Fans // -#undef FAN0_PIN +#define MOSFET_C_PIN 11 #define FAN0_PIN 5 // Using the pin for the controller fan since controller fan is always on. #define CONTROLLER_FAN_PIN 8 @@ -50,6 +46,8 @@ #define E1_AUTO_FAN_PIN 6 // Servo pin 6 for E3D Fan (same pin for both extruders since it's the same fan) #endif +#include "pins_RAMPS.h" + // // LCDs and Controllers // From 9911104036a515967029286775db0d0e7c4aec3a Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 28 Mar 2023 16:14:37 -0500 Subject: [PATCH 097/225] =?UTF-8?q?=F0=9F=94=A7=20Fix=20up=20WiFi=20option?= =?UTF-8?q?s=20(#25586)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/ESP32/HAL.h | 14 +++--- Marlin/src/HAL/shared/esp_wifi.cpp | 5 ++ Marlin/src/MarlinCore.cpp | 8 +++- Marlin/src/inc/SanityCheck.h | 10 ++-- Marlin/src/pins/sam/pins_RURAMPS4D_11.h | 12 +++-- Marlin/src/pins/sam/pins_RURAMPS4D_13.h | 12 +++-- Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h | 44 +++++++++--------- Marlin/src/pins/stm32f1/pins_GTM32_MINI.h | 15 +++--- Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h | 15 +++--- Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h | 15 +++--- Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h | 15 +++--- Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h | 19 ++++---- .../pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h | 46 ++++++++++--------- .../pins/stm32f4/pins_BTT_SKR_PRO_common.h | 38 +++++++-------- .../pins/stm32f4/pins_BTT_SKR_V2_0_common.h | 44 +++++++++--------- .../pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h | 44 +++++++++--------- .../pins/stm32h7/pins_BTT_SKR_V3_0_common.h | 44 +++++++++--------- 17 files changed, 217 insertions(+), 183 deletions(-) diff --git a/Marlin/src/HAL/ESP32/HAL.h b/Marlin/src/HAL/ESP32/HAL.h index ddfedf92ee..5dc9b2cfe2 100644 --- a/Marlin/src/HAL/ESP32/HAL.h +++ b/Marlin/src/HAL/ESP32/HAL.h @@ -50,14 +50,12 @@ #define MYSERIAL1 flushableSerial -#if EITHER(WIFISUPPORT, ESP3D_WIFISUPPORT) - #if ENABLED(ESP3D_WIFISUPPORT) - typedef ForwardSerial1Class< decltype(Serial2Socket) > DefaultSerial1; - extern DefaultSerial1 MSerial0; - #define MYSERIAL2 MSerial0 - #else - #define MYSERIAL2 webSocketSerial - #endif +#if ENABLED(ESP3D_WIFISUPPORT) + typedef ForwardSerial1Class< decltype(Serial2Socket) > DefaultSerial1; + extern DefaultSerial1 MSerial0; + #define MYSERIAL2 MSerial0 +#elif ENABLED(WIFISUPPORT) + #define MYSERIAL2 webSocketSerial #endif #define CRITICAL_SECTION_START() portENTER_CRITICAL(&hal.spinlock) diff --git a/Marlin/src/HAL/shared/esp_wifi.cpp b/Marlin/src/HAL/shared/esp_wifi.cpp index a55f5ca39f..8a6ac2dfa9 100644 --- a/Marlin/src/HAL/shared/esp_wifi.cpp +++ b/Marlin/src/HAL/shared/esp_wifi.cpp @@ -21,6 +21,9 @@ */ #include "../../inc/MarlinConfig.h" + +#if ENABLED(WIFISUPPORT) + #include "Delay.h" void esp_wifi_init(void) { // init ESP01 WIFI module pins @@ -41,3 +44,5 @@ void esp_wifi_init(void) { // init ESP01 WIFI module pi OUT_WRITE(ESP_WIFI_MODULE_ENABLE_PIN, HIGH); #endif } + +#endif // WIFISUPPORT diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index 3ab01b0348..213cbebc26 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -34,6 +34,10 @@ #include "HAL/shared/esp_wifi.h" #include "HAL/shared/cpu_exception/exception_hook.h" +#if ENABLED(WIFISUPPORT) + #include "HAL/shared/esp_wifi.h" +#endif + #ifdef ARDUINO #include #endif @@ -1270,7 +1274,9 @@ void setup() { SETUP_RUN(hal.init_board()); - SETUP_RUN(esp_wifi_init()); + #if ENABLED(WIFISUPPORT) + SETUP_RUN(esp_wifi_init()); + #endif // Report Reset Reason if (mcu & RST_POWER_ON) SERIAL_ECHOLNPGM(STR_POWERUP); diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 8fbc0c4541..c92cc64c65 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -4307,10 +4307,14 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive."); #endif /** - * Sanity check for WIFI + * Sanity check WiFi options */ -#if EITHER(ESP3D_WIFISUPPORT, WIFISUPPORT) && DISABLED(ARDUINO_ARCH_ESP32) - #error "ESP3D_WIFISUPPORT or WIFISUPPORT requires an ESP32 MOTHERBOARD." +#if ENABLED(ESP3D_WIFISUPPORT) && DISABLED(ARDUINO_ARCH_ESP32) + #error "ESP3D_WIFISUPPORT requires an ESP32 MOTHERBOARD." +#elif ENABLED(WEBSUPPORT) && NONE(ARDUINO_ARCH_ESP32, WIFISUPPORT) + #error "WEBSUPPORT requires WIFISUPPORT and an ESP32 MOTHERBOARD." +#elif BOTH(ESP3D_WIFISUPPORT, WIFISUPPORT) + #error "Enable only one of ESP3D_WIFISUPPORT or WIFISUPPORT." #endif /** diff --git a/Marlin/src/pins/sam/pins_RURAMPS4D_11.h b/Marlin/src/pins/sam/pins_RURAMPS4D_11.h index fb14c5a81f..2ae1f48277 100644 --- a/Marlin/src/pins/sam/pins_RURAMPS4D_11.h +++ b/Marlin/src/pins/sam/pins_RURAMPS4D_11.h @@ -163,11 +163,13 @@ #define TFT_LCD_MODULE_COM 1 #define TFT_LCD_MODULE_BAUDRATE 115600 -// ESP WiFi Use internal USART-2 -#define ESP_WIFI_MODULE_COM 2 -#define ESP_WIFI_MODULE_BAUDRATE 115600 -#define ESP_WIFI_MODULE_RESET_PIN -1 -#define PIGGY_GPIO_PIN -1 +#if ENABLED(WIFISUPPORT) + // ESP WiFi Use internal USART-2 + #define ESP_WIFI_MODULE_COM 2 + #define ESP_WIFI_MODULE_BAUDRATE 115600 + #define ESP_WIFI_MODULE_RESET_PIN -1 + #define PIGGY_GPIO_PIN -1 +#endif // // EEPROM diff --git a/Marlin/src/pins/sam/pins_RURAMPS4D_13.h b/Marlin/src/pins/sam/pins_RURAMPS4D_13.h index c65e6e24cb..6034a0e82a 100644 --- a/Marlin/src/pins/sam/pins_RURAMPS4D_13.h +++ b/Marlin/src/pins/sam/pins_RURAMPS4D_13.h @@ -153,11 +153,13 @@ #define TFT_LCD_MODULE_COM 1 #define TFT_LCD_MODULE_BAUDRATE 115200 -// ESP WiFi Use internal USART-2 -#define ESP_WIFI_MODULE_COM 2 -#define ESP_WIFI_MODULE_BAUDRATE 115200 -#define ESP_WIFI_MODULE_RESET_PIN -1 -#define PIGGY_GPIO_PIN -1 +#if ENABLED(WIFISUPPORT) + // ESP WiFi Use internal USART-2 + #define ESP_WIFI_MODULE_COM 2 + #define ESP_WIFI_MODULE_BAUDRATE 115200 + #define ESP_WIFI_MODULE_RESET_PIN -1 + #define PIGGY_GPIO_PIN -1 +#endif // // EEPROM diff --git a/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h b/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h index 0811ab1f1b..4978f84abe 100644 --- a/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h +++ b/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h @@ -138,27 +138,29 @@ #define DEFAULT_PWM_MOTOR_CURRENT { 800, 800, 800 } #endif - /** - * MKS Robin_Wifi or another ESP8266 module - * - * __ESP(M1)__ -J1- - * GND| 15 | | 08 |+3v3 (22) RXD1 (PA10) - * | 16 | | 07 |MOSI (21) TXD1 (PA9) Active LOW, probably OK to leave floating - * IO2| 17 | | 06 |MISO (19) IO1 (PC7) Leave as unused (ESP3D software configures this with a pullup so OK to leave as floating) - * IO0| 18 | | 05 |CLK (18) IO0 (PA8) Must be HIGH (ESP3D software configures this with a pullup so OK to leave as floating) - * IO1| 19 | | 03 |EN (03) WIFI_EN Must be HIGH for module to run - * | nc | | nc | (01) WIFI_CTRL (PA5) - * RX| 21 | | nc | - * TX| 22 | | 01 |RST - *  ̄ ̄ AE ̄ ̄ - */ - // Module ESP-WIFI - #define ESP_WIFI_MODULE_COM 2 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this - #define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2 - #define ESP_WIFI_MODULE_RESET_PIN PA5 // WIFI CTRL/RST - #define ESP_WIFI_MODULE_ENABLE_PIN -1 - #define ESP_WIFI_MODULE_TXD_PIN PA9 // MKS or ESP WIFI RX PIN - #define ESP_WIFI_MODULE_RXD_PIN PA10 // MKS or ESP WIFI TX PIN + #if ENABLED(WIFISUPPORT) + /** + * MKS Robin_Wifi or another ESP8266 module + * + * __ESP(M1)__ -J1- + * GND| 15 | | 08 |+3v3 (22) RXD1 (PA10) + * | 16 | | 07 |MOSI (21) TXD1 (PA9) Active LOW, probably OK to leave floating + * IO2| 17 | | 06 |MISO (19) IO1 (PC7) Leave as unused (ESP3D software configures this with a pullup so OK to leave as floating) + * IO0| 18 | | 05 |CLK (18) IO0 (PA8) Must be HIGH (ESP3D software configures this with a pullup so OK to leave as floating) + * IO1| 19 | | 03 |EN (03) WIFI_EN Must be HIGH for module to run + * | nc | | nc | (01) WIFI_CTRL (PA5) + * RX| 21 | | nc | + * TX| 22 | | 01 |RST + *  ̄ ̄ AE ̄ ̄ + */ + // Module ESP-WIFI + #define ESP_WIFI_MODULE_COM 2 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this + #define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2 + #define ESP_WIFI_MODULE_RESET_PIN PA5 // WIFI CTRL/RST + #define ESP_WIFI_MODULE_ENABLE_PIN -1 + #define ESP_WIFI_MODULE_TXD_PIN PA9 // MKS or ESP WIFI RX PIN + #define ESP_WIFI_MODULE_RXD_PIN PA10 // MKS or ESP WIFI TX PIN + #endif #endif // diff --git a/Marlin/src/pins/stm32f1/pins_GTM32_MINI.h b/Marlin/src/pins/stm32f1/pins_GTM32_MINI.h index 4030edbeb2..c41e20c2ed 100644 --- a/Marlin/src/pins/stm32f1/pins_GTM32_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_GTM32_MINI.h @@ -226,10 +226,11 @@ #define SDSS SD_SS_PIN -// -// ESP WiFi can be soldered to J9 connector which is wired to USART2. -// Must define WIFISUPPORT in Configuration.h for the printer. -// -#define ESP_WIFI_MODULE_COM 2 -#define ESP_WIFI_MODULE_BAUDRATE 115200 -#define ESP_WIFI_MODULE_RESET_PIN -1 +#if ENABLED(WIFISUPPORT) + // + // ESP WiFi can be soldered to J9 connector which is wired to USART2. + // + #define ESP_WIFI_MODULE_COM 2 + #define ESP_WIFI_MODULE_BAUDRATE 115200 + #define ESP_WIFI_MODULE_RESET_PIN -1 +#endif diff --git a/Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h b/Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h index 040f44e0cf..7b144f7118 100644 --- a/Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h +++ b/Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h @@ -220,10 +220,11 @@ #define SDSS SD_SS_PIN -// -// ESP WiFi can be soldered to J9 connector which is wired to USART2. -// Must define WIFISUPPORT in Configuration.h for the printer. -// -#define ESP_WIFI_MODULE_COM 2 -#define ESP_WIFI_MODULE_BAUDRATE 115200 -#define ESP_WIFI_MODULE_RESET_PIN -1 +#if ENABLED(WIFISUPPORT) + // + // ESP WiFi can be soldered to J9 connector which is wired to USART2. + // + #define ESP_WIFI_MODULE_COM 2 + #define ESP_WIFI_MODULE_BAUDRATE 115200 + #define ESP_WIFI_MODULE_RESET_PIN -1 +#endif diff --git a/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h b/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h index 313b693ec5..633b782e02 100644 --- a/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h +++ b/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h @@ -231,10 +231,11 @@ #define SDSS SD_SS_PIN -// -// ESP WiFi can be soldered to J9 connector which is wired to USART2. -// Must define WIFISUPPORT in Configuration.h for the printer. -// -#define ESP_WIFI_MODULE_COM 2 -#define ESP_WIFI_MODULE_BAUDRATE 115200 -#define ESP_WIFI_MODULE_RESET_PIN -1 +#if ENABLED(WIFISUPPORT) + // + // ESP WiFi can be soldered to J9 connector which is wired to USART2. + // + #define ESP_WIFI_MODULE_COM 2 + #define ESP_WIFI_MODULE_BAUDRATE 115200 + #define ESP_WIFI_MODULE_RESET_PIN -1 +#endif diff --git a/Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h b/Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h index 35b952f79b..2316d9d3b6 100644 --- a/Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h +++ b/Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h @@ -223,10 +223,11 @@ #define SDSS SD_SS_PIN -// -// ESP WiFi can be soldered to J9 connector which is wired to USART2. -// Must define WIFISUPPORT in Configuration.h for the printer. -// -#define ESP_WIFI_MODULE_COM 2 -#define ESP_WIFI_MODULE_BAUDRATE 115200 -#define ESP_WIFI_MODULE_RESET_PIN -1 +#if ENABLED(WIFISUPPORT) + // + // ESP WiFi can be soldered to J9 connector which is wired to USART2. + // + #define ESP_WIFI_MODULE_COM 2 + #define ESP_WIFI_MODULE_BAUDRATE 115200 + #define ESP_WIFI_MODULE_RESET_PIN -1 +#endif diff --git a/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h b/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h index 383f15f2a3..73f943c3fa 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h @@ -390,15 +390,16 @@ #error "SD CUSTOM_CABLE is not compatible with BTT E3 RRF." #endif -// -// WIFI -// - -#define ESP_WIFI_MODULE_COM 3 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this -#define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2 -#define ESP_WIFI_MODULE_RESET_PIN PA4 -#define ESP_WIFI_MODULE_ENABLE_PIN PA5 -#define ESP_WIFI_MODULE_GPIO0_PIN PA6 +#if ENABLED(WIFISUPPORT) + // + // WIFI + // + #define ESP_WIFI_MODULE_COM 3 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this + #define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2 + #define ESP_WIFI_MODULE_RESET_PIN PA4 + #define ESP_WIFI_MODULE_ENABLE_PIN PA5 + #define ESP_WIFI_MODULE_GPIO0_PIN PA6 +#endif #if ENABLED(BTT_E3_RRF_IDEX_BOARD) #define FPC2_PIN PB11 diff --git a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h index 4bc75089d1..78766b5c98 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h @@ -542,26 +542,28 @@ #define NEOPIXEL_PIN PB0 #endif -// -// WIFI -// +#if ENABLED(WIFISUPPORT) + // + // WIFI + // -/** - * ------- - * GND | 9 | | 8 | 3.3V - * (ESP-CS) PB12 | 10 | | 7 | PB15 (ESP-MOSI) - * 3.3V | 11 | | 6 | PB14 (ESP-MISO) - * (ESP-IO0) PD7 | 12 | | 5 | PB13 (ESP-CLK) - * (ESP-IO4) PD10 | 13 | | 4 | -- - * -- | 14 | | 3 | PE15 (ESP-EN) - * (ESP-RX) PD8 | 15 | | 2 | -- - * (ESP-TX) PD9 | 16 | | 1 | PE14 (ESP-RST) - * ------- - * WIFI - */ -#define ESP_WIFI_MODULE_COM 3 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this -#define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2 -#define ESP_WIFI_MODULE_RESET_PIN PG7 -#define ESP_WIFI_MODULE_ENABLE_PIN PG8 -#define ESP_WIFI_MODULE_GPIO0_PIN PD7 -#define ESP_WIFI_MODULE_GPIO4_PIN PD10 + /** + * ------- + * GND | 9 | | 8 | 3.3V + * (ESP-CS) PB12 | 10 | | 7 | PB15 (ESP-MOSI) + * 3.3V | 11 | | 6 | PB14 (ESP-MISO) + * (ESP-IO0) PD7 | 12 | | 5 | PB13 (ESP-CLK) + * (ESP-IO4) PD10 | 13 | | 4 | -- + * -- | 14 | | 3 | PE15 (ESP-EN) + * (ESP-RX) PD8 | 15 | | 2 | -- + * (ESP-TX) PD9 | 16 | | 1 | PE14 (ESP-RST) + * ------- + * WIFI + */ + #define ESP_WIFI_MODULE_COM 3 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this + #define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2 + #define ESP_WIFI_MODULE_RESET_PIN PG7 + #define ESP_WIFI_MODULE_ENABLE_PIN PG8 + #define ESP_WIFI_MODULE_GPIO0_PIN PD7 + #define ESP_WIFI_MODULE_GPIO4_PIN PD10 +#endif diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h index 2121b078db..0cdd34aaee 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h @@ -545,22 +545,24 @@ #endif #endif -// -// WIFI -// +#if ENABLED(WIFISUPPORT) + // + // WIFI + // -/** - * ------ - * RX | 8 7 | 3.3V GPIO0 PF14 ... Leave as unused (ESP3D software configures this with a pullup so OK to leave as floating) - * GPIO0 | 6 5 | Reset GPIO2 PF15 ... must be high (ESP3D software configures this with a pullup so OK to leave as floating) - * GPIO2 | 4 3 | Enable Reset PG0 ... active low, probably OK to leave floating - * GND | 2 1 | TX Enable PG1 ... Must be high for module to run - * ------ - * W1 - */ -#define ESP_WIFI_MODULE_COM 6 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this -#define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2 -#define ESP_WIFI_MODULE_RESET_PIN PG0 -#define ESP_WIFI_MODULE_ENABLE_PIN PG1 -#define ESP_WIFI_MODULE_GPIO0_PIN PF14 -#define ESP_WIFI_MODULE_GPIO2_PIN PF15 + /** + * ------ + * RX | 8 7 | 3.3V GPIO0 PF14 ... Leave as unused (ESP3D software configures this with a pullup so OK to leave as floating) + * GPIO0 | 6 5 | Reset GPIO2 PF15 ... must be high (ESP3D software configures this with a pullup so OK to leave as floating) + * GPIO2 | 4 3 | Enable Reset PG0 ... active low, probably OK to leave floating + * GND | 2 1 | TX Enable PG1 ... Must be high for module to run + * ------ + * W1 + */ + #define ESP_WIFI_MODULE_COM 6 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this + #define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2 + #define ESP_WIFI_MODULE_RESET_PIN PG0 + #define ESP_WIFI_MODULE_ENABLE_PIN PG1 + #define ESP_WIFI_MODULE_GPIO0_PIN PF14 + #define ESP_WIFI_MODULE_GPIO2_PIN PF15 +#endif diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h index ef85caa170..95b20c105d 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h @@ -554,25 +554,27 @@ #define NEOPIXEL_PIN PE6 #endif -// -// WIFI -// +#if ENABLED(WIFISUPPORT) + // + // WIFI + // -/** - * ------- - * GND | 9 | | 8 | 3.3V - * (ESP-CS) PB12 | 10 | | 7 | PB15 (ESP-MOSI) - * 3.3V | 11 | | 6 | PB14 (ESP-MISO) - * (ESP-IO0) PB10 | 12 | | 5 | PB13 (ESP-CLK) - * (ESP-IO4) PB11 | 13 | | 4 | -- - * -- | 14 | | 3 | 3.3V (ESP-EN) - * (ESP-RX) PD8 | 15 | | 2 | -- - * (ESP-TX) PD9 | 16 | | 1 | PC14 (ESP-RST) - * ------- - * WIFI - */ -#define ESP_WIFI_MODULE_COM 3 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this -#define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2 -#define ESP_WIFI_MODULE_RESET_PIN PC14 -#define ESP_WIFI_MODULE_GPIO0_PIN PB10 -#define ESP_WIFI_MODULE_GPIO4_PIN PB11 + /** + * ------- + * GND | 9 | | 8 | 3.3V + * (ESP-CS) PB12 | 10 | | 7 | PB15 (ESP-MOSI) + * 3.3V | 11 | | 6 | PB14 (ESP-MISO) + * (ESP-IO0) PB10 | 12 | | 5 | PB13 (ESP-CLK) + * (ESP-IO4) PB11 | 13 | | 4 | -- + * -- | 14 | | 3 | 3.3V (ESP-EN) + * (ESP-RX) PD8 | 15 | | 2 | -- + * (ESP-TX) PD9 | 16 | | 1 | PC14 (ESP-RST) + * ------- + * WIFI + */ + #define ESP_WIFI_MODULE_COM 3 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this + #define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2 + #define ESP_WIFI_MODULE_RESET_PIN PC14 + #define ESP_WIFI_MODULE_GPIO0_PIN PB10 + #define ESP_WIFI_MODULE_GPIO4_PIN PB11 +#endif diff --git a/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h b/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h index c414ac619b..cc2dab0e16 100644 --- a/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h +++ b/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h @@ -519,25 +519,27 @@ #define NEOPIXEL2_PIN PE9 #endif -// -// WIFI -// +#if ENABLED(WIFISUPPORT) + // + // WIFI + // -/** - * ------- - * GND | 9 | | 8 | 3.3V - * (ESP-CS) PG1 | 10 | | 7 | PB15 (ESP-MOSI) - * 3.3V | 11 | | 6 | PB14 (ESP-MISO) - * (ESP-IO0) PG0 | 12 | | 5 | PB13 (ESP-CLK) - * (ESP-IO4) PF15 | 13 | | 4 | -- - * -- | 14 | | 3 | 3.3V (ESP-EN) - * (ESP-RX) PE7 | 15 | | 2 | -- - * (ESP-TX) PE8 | 16 | | 1 | PB2 (ESP-RST) - * ------- - * WIFI - */ -#define ESP_WIFI_MODULE_COM 7 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this -#define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2 -#define ESP_WIFI_MODULE_RESET_PIN PB2 -#define ESP_WIFI_MODULE_GPIO0_PIN PG0 -#define ESP_WIFI_MODULE_GPIO4_PIN PF15 + /** + * ------- + * GND | 9 | | 8 | 3.3V + * (ESP-CS) PG1 | 10 | | 7 | PB15 (ESP-MOSI) + * 3.3V | 11 | | 6 | PB14 (ESP-MISO) + * (ESP-IO0) PG0 | 12 | | 5 | PB13 (ESP-CLK) + * (ESP-IO4) PF15 | 13 | | 4 | -- + * -- | 14 | | 3 | 3.3V (ESP-EN) + * (ESP-RX) PE7 | 15 | | 2 | -- + * (ESP-TX) PE8 | 16 | | 1 | PB2 (ESP-RST) + * ------- + * WIFI + */ + #define ESP_WIFI_MODULE_COM 7 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this + #define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2 + #define ESP_WIFI_MODULE_RESET_PIN PB2 + #define ESP_WIFI_MODULE_GPIO0_PIN PG0 + #define ESP_WIFI_MODULE_GPIO4_PIN PF15 +#endif diff --git a/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h b/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h index cafd30bf63..97ac32479e 100644 --- a/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h +++ b/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h @@ -541,25 +541,27 @@ #define NEOPIXEL_PIN PE6 #endif -// -// WIFI -// +#if ENABLED(WIFISUPPORT) + // + // WIFI + // -/** - * ------- - * GND | 9 | | 8 | 3.3V - * (ESP-CS) PB12 | 10 | | 7 | PB15 (ESP-MOSI) - * 3.3V | 11 | | 6 | PB14 (ESP-MISO) - * (ESP-IO0) PB10 | 12 | | 5 | PB13 (ESP-CLK) - * (ESP-IO4) PB11 | 13 | | 4 | -- - * -- | 14 | | 3 | 3.3V (ESP-EN) - * (ESP-RX) PD8 | 15 | | 2 | -- - * (ESP-TX) PD9 | 16 | | 1 | PC14 (ESP-RST) - * ------- - * WIFI - */ -#define ESP_WIFI_MODULE_COM 3 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this -#define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2 -#define ESP_WIFI_MODULE_RESET_PIN PC14 -#define ESP_WIFI_MODULE_GPIO0_PIN PB10 -#define ESP_WIFI_MODULE_GPIO4_PIN PB11 + /** + * ------- + * GND | 9 | | 8 | 3.3V + * (ESP-CS) PB12 | 10 | | 7 | PB15 (ESP-MOSI) + * 3.3V | 11 | | 6 | PB14 (ESP-MISO) + * (ESP-IO0) PB10 | 12 | | 5 | PB13 (ESP-CLK) + * (ESP-IO4) PB11 | 13 | | 4 | -- + * -- | 14 | | 3 | 3.3V (ESP-EN) + * (ESP-RX) PD8 | 15 | | 2 | -- + * (ESP-TX) PD9 | 16 | | 1 | PC14 (ESP-RST) + * ------- + * WIFI + */ + #define ESP_WIFI_MODULE_COM 3 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this + #define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2 + #define ESP_WIFI_MODULE_RESET_PIN PC14 + #define ESP_WIFI_MODULE_GPIO0_PIN PB10 + #define ESP_WIFI_MODULE_GPIO4_PIN PB11 +#endif From 83da21089f789033d2a8d5de6433c5fc7cf58b98 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 28 Mar 2023 16:38:56 -0500 Subject: [PATCH 098/225] =?UTF-8?q?=F0=9F=94=A8=20Update=20config.ini=20en?= =?UTF-8?q?dstop=20states?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to #25574 --- Marlin/config.ini | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Marlin/config.ini b/Marlin/config.ini index 0ac8187179..c4fe7597f8 100644 --- a/Marlin/config.ini +++ b/Marlin/config.ini @@ -73,9 +73,9 @@ use_xmin_plug = on use_ymin_plug = on use_zmin_plug = on -x_min_endstop_inverting = false -y_min_endstop_inverting = false -z_min_endstop_inverting = false +x_min_endstop_hit_state = HIGH +y_min_endstop_hit_state = HIGH +z_min_endstop_hit_state = HIGH default_axis_steps_per_unit = { 80, 80, 400, 500 } axis_relative_modes = { false, false, false, false } From 7185b34fd759bc378c2fcdf3b84f9533cf171110 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Wed, 29 Mar 2023 00:24:23 +0000 Subject: [PATCH 099/225] [cron] Bump distribution date (2023-03-29) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 69cf291f62..bdcccd204d 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-03-28" +//#define STRING_DISTRIBUTION_DATE "2023-03-29" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 6c08c374ce..4443753e79 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-03-28" + #define STRING_DISTRIBUTION_DATE "2023-03-29" #endif /** From 2c6aff5c79310c1b8222f0c2a26994ac728516f8 Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Wed, 29 Mar 2023 15:36:05 +1300 Subject: [PATCH 100/225] =?UTF-8?q?=F0=9F=94=A7=20Impose=20Hephestos=202?= =?UTF-8?q?=20Bed=20Kit=20requirements=20(#25585)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration_adv.h | 2 - Marlin/src/inc/Conditionals_post.h | 65 ++++----------------- Marlin/src/inc/SanityCheck.h | 11 ++++ Marlin/src/module/temperature.cpp | 26 ++++----- Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h | 3 +- 5 files changed, 37 insertions(+), 70 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 416caf22fc..070309d5aa 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -194,8 +194,6 @@ */ //#define HEPHESTOS2_HEATED_BED_KIT #if ENABLED(HEPHESTOS2_HEATED_BED_KIT) - #undef TEMP_SENSOR_BED - #define TEMP_SENSOR_BED 70 #define HEATER_BED_INVERTING true #endif diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index bf9ede65dc..4e36b726c8 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -2799,54 +2799,24 @@ #define HAS_MICROSTEPS 1 #endif -/** - * Heater signal inversion defaults - */ - -#if HAS_HEATER_0 && !defined(HEATER_0_INVERTING) - #define HEATER_0_INVERTING false -#endif -#if HAS_HEATER_1 && !defined(HEATER_1_INVERTING) - #define HEATER_1_INVERTING false -#endif -#if HAS_HEATER_2 && !defined(HEATER_2_INVERTING) - #define HEATER_2_INVERTING false -#endif -#if HAS_HEATER_3 && !defined(HEATER_3_INVERTING) - #define HEATER_3_INVERTING false -#endif -#if HAS_HEATER_4 && !defined(HEATER_4_INVERTING) - #define HEATER_4_INVERTING false -#endif -#if HAS_HEATER_5 && !defined(HEATER_5_INVERTING) - #define HEATER_5_INVERTING false -#endif -#if HAS_HEATER_6 && !defined(HEATER_6_INVERTING) - #define HEATER_6_INVERTING false -#endif -#if HAS_HEATER_7 && !defined(HEATER_7_INVERTING) - #define HEATER_7_INVERTING false -#endif - /** * Helper Macros for heaters and extruder fan */ - -#define WRITE_HEATER_0P(v) WRITE(HEATER_0_PIN, (v) ^ HEATER_0_INVERTING) +#define WRITE_HEATER_0P(v) WRITE(HEATER_0_PIN, (v) ^ ENABLED(HEATER_0_INVERTING)) #if EITHER(HAS_MULTI_HOTEND, HEATERS_PARALLEL) - #define WRITE_HEATER_1(v) WRITE(HEATER_1_PIN, (v) ^ HEATER_1_INVERTING) + #define WRITE_HEATER_1(v) WRITE(HEATER_1_PIN, (v) ^ ENABLED(HEATER_1_INVERTING)) #if HOTENDS > 2 - #define WRITE_HEATER_2(v) WRITE(HEATER_2_PIN, (v) ^ HEATER_2_INVERTING) + #define WRITE_HEATER_2(v) WRITE(HEATER_2_PIN, (v) ^ ENABLED(HEATER_2_INVERTING)) #if HOTENDS > 3 - #define WRITE_HEATER_3(v) WRITE(HEATER_3_PIN, (v) ^ HEATER_3_INVERTING) + #define WRITE_HEATER_3(v) WRITE(HEATER_3_PIN, (v) ^ ENABLED(HEATER_3_INVERTING)) #if HOTENDS > 4 - #define WRITE_HEATER_4(v) WRITE(HEATER_4_PIN, (v) ^ HEATER_4_INVERTING) + #define WRITE_HEATER_4(v) WRITE(HEATER_4_PIN, (v) ^ ENABLED(HEATER_4_INVERTING)) #if HOTENDS > 5 - #define WRITE_HEATER_5(v) WRITE(HEATER_5_PIN, (v) ^ HEATER_5_INVERTING) + #define WRITE_HEATER_5(v) WRITE(HEATER_5_PIN, (v) ^ ENABLED(HEATER_5_INVERTING)) #if HOTENDS > 6 - #define WRITE_HEATER_6(v) WRITE(HEATER_6_PIN, (v) ^ HEATER_6_INVERTING) + #define WRITE_HEATER_6(v) WRITE(HEATER_6_PIN, (v) ^ ENABLED(HEATER_6_INVERTING)) #if HOTENDS > 7 - #define WRITE_HEATER_7(v) WRITE(HEATER_7_PIN, (v) ^ HEATER_7_INVERTING) + #define WRITE_HEATER_7(v) WRITE(HEATER_7_PIN, (v) ^ ENABLED(HEATER_7_INVERTING)) #endif // HOTENDS > 7 #endif // HOTENDS > 6 #endif // HOTENDS > 5 @@ -2860,10 +2830,6 @@ #define WRITE_HEATER_0(v) WRITE_HEATER_0P(v) #endif -#ifndef MIN_POWER - #define MIN_POWER 0 -#endif - /** * Heated bed requires settings */ @@ -2874,10 +2840,7 @@ #ifndef MAX_BED_POWER #define MAX_BED_POWER 255 #endif - #ifndef HEATER_BED_INVERTING - #define HEATER_BED_INVERTING false - #endif - #define WRITE_HEATER_BED(v) WRITE(HEATER_BED_PIN, (v) ^ HEATER_BED_INVERTING) + #define WRITE_HEATER_BED(v) WRITE(HEATER_BED_PIN, (v) ^ ENABLED(HEATER_BED_INVERTING)) #endif /** @@ -2890,10 +2853,7 @@ #ifndef MAX_CHAMBER_POWER #define MAX_CHAMBER_POWER 255 #endif - #ifndef HEATER_CHAMBER_INVERTING - #define HEATER_CHAMBER_INVERTING false - #endif - #define WRITE_HEATER_CHAMBER(v) WRITE(HEATER_CHAMBER_PIN, (v) ^ HEATER_CHAMBER_INVERTING) + #define WRITE_HEATER_CHAMBER(v) WRITE(HEATER_CHAMBER_PIN, (v) ^ ENABLED(HEATER_CHAMBER_INVERTING)) #endif /** @@ -2903,10 +2863,7 @@ #ifndef MAX_COOLER_POWER #define MAX_COOLER_POWER 255 #endif - #ifndef COOLER_INVERTING - #define COOLER_INVERTING true - #endif - #define WRITE_HEATER_COOLER(v) WRITE(COOLER_PIN, (v) ^ COOLER_INVERTING) + #define WRITE_HEATER_COOLER(v) WRITE(COOLER_PIN, (v) ^ ENABLED(COOLER_INVERTING)) #endif #if HAS_HOTEND || HAS_HEATED_BED || HAS_HEATED_CHAMBER || HAS_COOLER diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index c92cc64c65..a18ced531e 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -736,6 +736,17 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L #undef _ISMAX_1 #undef _ISSNS_1 +/** + * Hephestos 2 Heated Bed Kit requirements + */ +#if ENABLED(HEPHESTOS2_HEATED_BED_KIT) + #if TEMP_SENSOR_BED != 70 + #error "HEPHESTOS2_HEATED_BED_KIT requires TEMP_SENSOR_BED 70." + #elif DISABLED(HEATER_BED_INVERTING) + #error "HEPHESTOS2_HEATED_BED_KIT requires HEATER_BED_INVERTING." + #endif +#endif + /** * Probe temp compensation requirements */ diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 180dbbc5ad..29c3a787c5 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -2630,47 +2630,47 @@ void Temperature::init() { #if HAS_HEATER_0 #ifdef BOARD_OPENDRAIN_MOSFETS - OUT_WRITE_OD(HEATER_0_PIN, HEATER_0_INVERTING); + OUT_WRITE_OD(HEATER_0_PIN, ENABLED(HEATER_0_INVERTING)); #else - OUT_WRITE(HEATER_0_PIN, HEATER_0_INVERTING); + OUT_WRITE(HEATER_0_PIN, ENABLED(HEATER_0_INVERTING)); #endif #endif #if HAS_HEATER_1 - OUT_WRITE(HEATER_1_PIN, HEATER_1_INVERTING); + OUT_WRITE(HEATER_1_PIN, ENABLED(HEATER_1_INVERTING)); #endif #if HAS_HEATER_2 - OUT_WRITE(HEATER_2_PIN, HEATER_2_INVERTING); + OUT_WRITE(HEATER_2_PIN, ENABLED(HEATER_2_INVERTING)); #endif #if HAS_HEATER_3 - OUT_WRITE(HEATER_3_PIN, HEATER_3_INVERTING); + OUT_WRITE(HEATER_3_PIN, ENABLED(HEATER_3_INVERTING)); #endif #if HAS_HEATER_4 - OUT_WRITE(HEATER_4_PIN, HEATER_4_INVERTING); + OUT_WRITE(HEATER_4_PIN, ENABLED(HEATER_4_INVERTING)); #endif #if HAS_HEATER_5 - OUT_WRITE(HEATER_5_PIN, HEATER_5_INVERTING); + OUT_WRITE(HEATER_5_PIN, ENABLED(HEATER_5_INVERTING)); #endif #if HAS_HEATER_6 - OUT_WRITE(HEATER_6_PIN, HEATER_6_INVERTING); + OUT_WRITE(HEATER_6_PIN, ENABLED(HEATER_6_INVERTING)); #endif #if HAS_HEATER_7 - OUT_WRITE(HEATER_7_PIN, HEATER_7_INVERTING); + OUT_WRITE(HEATER_7_PIN, ENABLED(HEATER_7_INVERTING)); #endif #if HAS_HEATED_BED #ifdef BOARD_OPENDRAIN_MOSFETS - OUT_WRITE_OD(HEATER_BED_PIN, HEATER_BED_INVERTING); + OUT_WRITE_OD(HEATER_BED_PIN, ENABLED(HEATER_BED_INVERTING)); #else - OUT_WRITE(HEATER_BED_PIN, HEATER_BED_INVERTING); + OUT_WRITE(HEATER_BED_PIN, ENABLED(HEATER_BED_INVERTING)); #endif #endif #if HAS_HEATED_CHAMBER - OUT_WRITE(HEATER_CHAMBER_PIN, HEATER_CHAMBER_INVERTING); + OUT_WRITE(HEATER_CHAMBER_PIN, ENABLED(HEATER_CHAMBER_INVERTING)); #endif #if HAS_COOLER - OUT_WRITE(COOLER_PIN, COOLER_INVERTING); + OUT_WRITE(COOLER_PIN, ENABLED(COOLER_INVERTING)); #endif #if HAS_FAN0 diff --git a/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h b/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h index cd3ada25bf..efedb8ffaf 100644 --- a/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h +++ b/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h @@ -121,9 +121,10 @@ #include "pins_RAMPS_13.h" // ... RAMPS // -// Used by the Hephestos 2 heated bed upgrade kit +// Hephestos 2 heated bed upgrade kit uses pin 8 // #if ENABLED(HEPHESTOS2_HEATED_BED_KIT) #undef HEATER_BED_PIN #define HEATER_BED_PIN 8 + #define HEATER_BED_INVERTING true #endif From 93eeee2230c5b0fb238f63931c55b0b47547a8e5 Mon Sep 17 00:00:00 2001 From: Andrew <18502096+classicrocker883@users.noreply.github.com> Date: Wed, 29 Mar 2023 00:20:52 -0400 Subject: [PATCH 101/225] =?UTF-8?q?=F0=9F=8E=A8=20Remove=20unused=20ProUI?= =?UTF-8?q?=20:=20UBLValidMesh=20(#25591)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/e3v2/proui/dwin.h | 1 - 1 file changed, 1 deletion(-) diff --git a/Marlin/src/lcd/e3v2/proui/dwin.h b/Marlin/src/lcd/e3v2/proui/dwin.h index 4197da4390..26b77da5fb 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.h +++ b/Marlin/src/lcd/e3v2/proui/dwin.h @@ -229,7 +229,6 @@ void ParkHead(); #endif #if ENABLED(AUTO_BED_LEVELING_UBL) void UBLMeshTilt(); - bool UBLValidMesh(); void UBLMeshSave(); void UBLMeshLoad(); #endif From 54e29d75d72671c535324f9e4fc5cc1b0a31b298 Mon Sep 17 00:00:00 2001 From: John Unland Date: Tue, 28 Mar 2023 23:23:27 -0500 Subject: [PATCH 102/225] =?UTF-8?q?=F0=9F=94=A8=20Improve=20Docker=20local?= =?UTF-8?q?=20tests=20support=20(#25583)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 42 +++++++++++++++---------------------- Makefile | 21 ++++++++++++------- docker-compose.yml | 19 ----------------- docker/Dockerfile | 23 +++++++++++++++++--- get_test_targets.py | 12 ----------- scripts/get_test_targets.py | 15 +++++++++++++ 6 files changed, 66 insertions(+), 66 deletions(-) delete mode 100644 docker-compose.yml delete mode 100755 get_test_targets.py create mode 100644 scripts/get_test_targets.py diff --git a/.gitignore b/.gitignore index 555bde8622..a7f8a091aa 100755 --- a/.gitignore +++ b/.gitignore @@ -28,29 +28,11 @@ mczip.h *.gen *.sublime-workspace -# # OS -# applet/ .DS_Store -# -# Misc -# -*~ -*.orig -*.rej -*.bak -*.idea -*.i -*.ii -*.swp -tags - -# -# C++ -# -# Compiled Object files +# Compiled C++ Object files *.slo *.lo *.o @@ -81,10 +63,7 @@ tags *.out *.app -# -# C -# -# Object files +# Compiled C Object files *.o *.ko *.obj @@ -144,13 +123,13 @@ vc-fileutils.settings .vscode/* !.vscode/extensions.json -#Simulation +# Simulation files imgui.ini eeprom.dat spi_flash.bin fs.img -#cmake +# CMake CMakeLists.txt src/CMakeLists.txt CMakeListsPrivate.txt @@ -171,3 +150,16 @@ __pycache__ # IOLogger logs *_log.csv + +# Misc. +*~ +*.orig +*.rej +*.bak +*.idea +*.i +*.ii +*.swp +tags +*.logs +*.bak diff --git a/Makefile b/Makefile index d0495dc7d8..ad5c320c20 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,16 @@ +SCRIPTS_DIR := scripts +CONTAINER_RT_BIN := docker +CONTAINER_RT_OPTS := --rm -v $(PWD):/code -v platformio-cache:/root/.platformio +CONTAINER_IMAGE := marlin-dev + help: @echo "Tasks for local development:" @echo "* tests-single-ci: Run a single test from inside the CI" @echo "* tests-single-local: Run a single test locally" - @echo "* tests-single-local-docker: Run a single test locally, using docker-compose" + @echo "* tests-single-local-docker: Run a single test locally, using docker" @echo "* tests-all-local: Run all tests locally" - @echo "* tests-all-local-docker: Run all tests locally, using docker-compose" - @echo "* setup-local-docker: Setup local docker-compose" + @echo "* tests-all-local-docker: Run all tests locally, using docker" + @echo "* setup-local-docker: Build the local docker image" @echo "" @echo "Options for testing:" @echo " TEST_TARGET Set when running tests-single-*, to select the" @@ -34,19 +39,21 @@ tests-single-local: tests-single-local-docker: @if ! test -n "$(TEST_TARGET)" ; then echo "***ERROR*** Set TEST_TARGET= or use make tests-all-local-docker" ; return 1; fi - docker-compose run --rm marlin $(MAKE) tests-single-local TEST_TARGET=$(TEST_TARGET) VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) GIT_RESET_HARD=$(GIT_RESET_HARD) ONLY_TEST="$(ONLY_TEST)" + @if ! $(CONTAINER_RT_BIN) images -q $(CONTAINER_IMAGE) > /dev/null ; then $(MAKE) setup-local-docker ; fi + $(CONTAINER_RT_BIN) run $(CONTAINER_RT_OPTS) $(CONTAINER_IMAGE) $(MAKE) tests-single-local TEST_TARGET=$(TEST_TARGET) VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) GIT_RESET_HARD=$(GIT_RESET_HARD) ONLY_TEST="$(ONLY_TEST)" .PHONY: tests-single-local-docker tests-all-local: export PATH="./buildroot/bin/:./buildroot/tests/:${PATH}" \ && export VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) \ - && for TEST_TARGET in $$(./get_test_targets.py) ; do echo "Running tests for $$TEST_TARGET" ; run_tests . $$TEST_TARGET ; done + && for TEST_TARGET in $$($(SCRIPTS_DIR)/get_test_targets.py) ; do echo "Running tests for $$TEST_TARGET" ; run_tests . $$TEST_TARGET ; done .PHONY: tests-all-local tests-all-local-docker: - docker-compose run --rm marlin $(MAKE) tests-all-local VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) GIT_RESET_HARD=$(GIT_RESET_HARD) + @if ! $(CONTAINER_RT_BIN) images -q $(CONTAINER_IMAGE) > /dev/null ; then $(MAKE) setup-local-docker ; fi + $(CONTAINER_RT_BIN) run $(CONTAINER_RT_OPTS) $(CONTAINER_IMAGE) $(MAKE) tests-all-local VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) GIT_RESET_HARD=$(GIT_RESET_HARD) .PHONY: tests-all-local-docker setup-local-docker: - docker-compose build + $(CONTAINER_RT_BIN) build -t $(CONTAINER_IMAGE) -f docker/Dockerfile . .PHONY: setup-local-docker diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index a85e0f8315..0000000000 --- a/docker-compose.yml +++ /dev/null @@ -1,19 +0,0 @@ -version: "3.8" -services: - # The main image: this doesn't run any particular command, but is mainly used - # for running tests locally - marlin: - image: marlin-dev - build: - dockerfile: Dockerfile - context: docker - working_dir: /code - volumes: - - .:/code - - platformio-cache:/root/.platformio - -volumes: - # This volume holds installed libraries for PlatformIO. If this is deleted you - # will have to download all the dependencies again, which can be a very slow - # process - platformio-cache: diff --git a/docker/Dockerfile b/docker/Dockerfile index 7d32f9c637..c01ca76ebb 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,7 +1,24 @@ FROM python:3.9.0-buster -RUN pip install -U platformio +# Disable warnings about not having a TTY +ARG DEBIAN_FRONTEND=noninteractive + +# Disable debconf warnings +ARG DEBCONF_NOWARNINGS="yes" + +# Upgrade pip +RUN pip install --upgrade pip + +# Install platformio toolchain / framework and pyyaml +RUN pip install -U platformio PyYaml + +# Upgrade platformio using development version / branch RUN pio upgrade --dev -# To get the test platforms -RUN pip install PyYaml + +# Set working directory +WORKDIR /code + +# Set volumes / mount points that we are using +VOLUME /code /root/.platformio + #ENV PATH /code/buildroot/bin/:/code/buildroot/tests/:${PATH} diff --git a/get_test_targets.py b/get_test_targets.py deleted file mode 100755 index a38e3a594a..0000000000 --- a/get_test_targets.py +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env python -""" -Extract the builds used in Github CI, so that we can run them locally -""" -import yaml - - -with open('.github/workflows/test-builds.yml') as f: - github_configuration = yaml.safe_load(f) -test_platforms = github_configuration\ - ['jobs']['test_builds']['strategy']['matrix']['test-platform'] -print(' '.join(test_platforms)) diff --git a/scripts/get_test_targets.py b/scripts/get_test_targets.py new file mode 100644 index 0000000000..f51951ae12 --- /dev/null +++ b/scripts/get_test_targets.py @@ -0,0 +1,15 @@ +#!/usr/bin/env python +""" +Extract the builds used in Github CI, so that we can run them locally +""" +import yaml + +# Set the yaml file to parse +yaml_file = '.github/workflows/test-builds.yml' + +# Parse the yaml file, and load it into a dictionary (github_configuration) +with open(yaml_file) as f: + github_configuration = yaml.safe_load(f) + +# Print out the test platforms +print(' '.join(github_configuration['jobs']['test_builds']['strategy']['matrix']['test-platform'])) From 3b425d9a3860e959ede1f841112819a6ef09f7d5 Mon Sep 17 00:00:00 2001 From: Chris Pepper Date: Wed, 29 Mar 2023 05:45:22 +0100 Subject: [PATCH 103/225] =?UTF-8?q?=F0=9F=94=A8=20MarlinSimUI=20updates=20?= =?UTF-8?q?(#25589)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/core/boards.h | 2 +- Marlin/src/inc/SanityCheck.h | 2 +- Marlin/src/pins/pins.h | 6 +++++- buildroot/tests/linux_native | 2 +- ini/native.ini | 2 +- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Marlin/src/core/boards.h b/Marlin/src/core/boards.h index 0ca26d2ab2..147080542d 100644 --- a/Marlin/src/core/boards.h +++ b/Marlin/src/core/boards.h @@ -495,7 +495,7 @@ // Simulations // -#define BOARD_LINUX_RAMPS 9999 +#define BOARD_SIMULATED 9999 #define _MB_1(B) (defined(BOARD_##B) && MOTHERBOARD==BOARD_##B) #define MB(V...) DO(MB,||,V) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index a18ced531e..59b64e9ae9 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -4312,7 +4312,7 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive."); /** * Touch Screen Calibration */ -#if !MB(LINUX_RAMPS) && ENABLED(TFT_TOUCH_DEVICE_XPT2046) && DISABLED(TOUCH_SCREEN_CALIBRATION) \ +#if !MB(SIMULATED) && ENABLED(TFT_TOUCH_DEVICE_XPT2046) && DISABLED(TOUCH_SCREEN_CALIBRATION) \ && !(defined(TOUCH_CALIBRATION_X) && defined(TOUCH_CALIBRATION_Y) && defined(TOUCH_OFFSET_X) && defined(TOUCH_OFFSET_Y)) #error "TOUCH_CALIBRATION_[XY] and TOUCH_OFFSET_[XY] are required for resistive touch screens with TOUCH_SCREEN_CALIBRATION disabled." #endif diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index bead9d1f06..124c940422 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -809,7 +809,7 @@ // Linux Native Debug board // -#elif MB(LINUX_RAMPS) +#elif MB(SIMULATED) #include "linux/pins_RAMPS_LINUX.h" // Native or Simulation lin:linux_native mac:simulator_macos_debug mac:simulator_macos_release win:simulator_windows lin:simulator_linux_debug lin:simulator_linux_release #else @@ -845,6 +845,7 @@ #define BOARD_TH3D_EZBOARD_LITE_V2 99923 #define BOARD_BTT_SKR_SE_BX 99924 #define BOARD_MKS_MONSTER8 99925 + #define BOARD_LINUX_RAMPS 99926 #if MB(MKS_13) #error "BOARD_MKS_13 has been renamed BOARD_MKS_GEN_13. Please update your configuration." @@ -900,6 +901,8 @@ #error "BOARD_BTT_SKR_SE_BX is now BOARD_BTT_SKR_SE_BX_V2 or BOARD_BTT_SKR_SE_BX_V3. Please update your configuration." #elif MB(MKS_MONSTER8) #error "BOARD_MKS_MONSTER8 is now BOARD_MKS_MONSTER8_V1 or BOARD_MKS_MONSTER8_V2. Please update your configuration." + #elif MB(LINUX_RAMPS) + #error "BOARD_LINUX_RAMPS is now BOARD_SIMULATED. Please update your configuration." #elif defined(MOTHERBOARD) #error "Unknown MOTHERBOARD value set in Configuration.h." #else @@ -933,6 +936,7 @@ #undef BOARD_TH3D_EZBOARD_LITE_V2 #undef BOARD_BTT_SKR_SE_BX #undef BOARD_MKS_MONSTER8 + #undef BOARD_LINUX_RAMPS #endif diff --git a/buildroot/tests/linux_native b/buildroot/tests/linux_native index 0153687eac..268de8fd2b 100755 --- a/buildroot/tests/linux_native +++ b/buildroot/tests/linux_native @@ -10,7 +10,7 @@ set -e # Build with the default configurations # restore_configs -opt_set MOTHERBOARD BOARD_LINUX_RAMPS TEMP_SENSOR_BED 1 +opt_set MOTHERBOARD BOARD_SIMULATED TEMP_SENSOR_BED 1 opt_enable PIDTEMPBED EEPROM_SETTINGS BAUD_RATE_GCODE exec_test $1 $2 "Linux with EEPROM" "$3" diff --git a/ini/native.ini b/ini/native.ini index 6a0cce38e8..481dac1777 100644 --- a/ini/native.ini +++ b/ini/native.ini @@ -43,7 +43,7 @@ debug_build_flags = -fstack-protector-strong -g -g3 -ggdb lib_compat_mode = off build_src_filter = ${common.default_src_filter} + lib_deps = ${common.lib_deps} - MarlinSimUI=https://github.com/p3p/MarlinSimUI/archive/refs/heads/bugfix-2.0.x.zip + MarlinSimUI=https://github.com/p3p/MarlinSimUI/archive/refs/heads/bugfix-2.1.x.zip Adafruit NeoPixel=https://github.com/p3p/Adafruit_NeoPixel/archive/marlin_sim_native.zip LiquidCrystal=https://github.com/p3p/LiquidCrystal/archive/master.zip extra_scripts = ${common.extra_scripts} From 6f5fd425113817fb72a38faf330b7719d63a77c4 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Thu, 30 Mar 2023 00:21:52 +0000 Subject: [PATCH 104/225] [cron] Bump distribution date (2023-03-30) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index bdcccd204d..40d817f7f0 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-03-29" +//#define STRING_DISTRIBUTION_DATE "2023-03-30" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 4443753e79..30c78dc3cc 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-03-29" + #define STRING_DISTRIBUTION_DATE "2023-03-30" #endif /** From e60df9d0af373b8ea34de7bfdbc9113eb97a1b22 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 29 Mar 2023 21:59:26 -0500 Subject: [PATCH 105/225] =?UTF-8?q?=F0=9F=A9=B9=20Update=20Trigorilla=20V0?= =?UTF-8?q?06=20fan=20pin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to #25568 --- Marlin/src/pins/gd32f1/pins_TRIGORILLA_V006.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/pins/gd32f1/pins_TRIGORILLA_V006.h b/Marlin/src/pins/gd32f1/pins_TRIGORILLA_V006.h index 7b8c412bed..f09f633220 100644 --- a/Marlin/src/pins/gd32f1/pins_TRIGORILLA_V006.h +++ b/Marlin/src/pins/gd32f1/pins_TRIGORILLA_V006.h @@ -88,7 +88,7 @@ // // Fans // -#define FAN_PIN PA0 // FAN +#define FAN0_PIN PA0 // FAN #define FAN1_PIN PA14 // Connected to +24V #define FAN2_PIN -1 // PB1, auto fan for E0 #define CONTROLLER_FAN_PIN FAN1_PIN From 6a8ebdcd5093a8fb393356dc0c1ee2a894576fdb Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 29 Mar 2023 21:50:04 -0500 Subject: [PATCH 106/225] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20Ender-3=20V2=20wit?= =?UTF-8?q?h=20no=20fan?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/e3v2/jyersui/dwin.cpp | 4 +- .../lcd/e3v2/marlinui/ui_status_480x272.cpp | 39 ++++++++++--------- 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/Marlin/src/lcd/e3v2/jyersui/dwin.cpp b/Marlin/src/lcd/e3v2/jyersui/dwin.cpp index 3f13fe8b3b..d90e4df5af 100644 --- a/Marlin/src/lcd/e3v2/jyersui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/jyersui/dwin.cpp @@ -3862,7 +3862,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ Draw_Menu_Item(row, ICON_Back, F("Cancel")); else { thermalManager.setTargetHotend(0, 0); - thermalManager.set_fan_speed(0, 0); + TERN_(HAS_FAN, thermalManager.set_fan_speed(0, 0)); Redraw_Menu(false, true, true); } break; @@ -4474,7 +4474,7 @@ void CrealityDWINClass::Popup_Control() { case ETemp: if (selection == 0) { thermalManager.setTargetHotend(EXTRUDE_MINTEMP, 0); - thermalManager.set_fan_speed(0, MAX_FAN_SPEED); + TERN_(HAS_FAN, thermalManager.set_fan_speed(0, MAX_FAN_SPEED)); Draw_Menu(PreheatHotend); } else diff --git a/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp b/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp index d0a04a3c4b..680173bd12 100644 --- a/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp +++ b/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp @@ -143,25 +143,27 @@ void _draw_axis_value(const AxisEnum axis, const char *value, const bool blink, #endif // LCD_SHOW_E_TOTAL -// -// Fan Icon and Percentage -// -FORCE_INLINE void _draw_fan_status(const uint16_t x, const uint16_t y) { - const uint16_t fanx = (4 * STATUS_CHR_WIDTH - STATUS_FAN_WIDTH) / 2; - const bool fan_on = !!thermalManager.scaledFanSpeed(0); - if (fan_on) { - DWIN_ICON_Animation(0, fan_on, ICON, ICON_Fan0, ICON_Fan3, x + fanx, y, 25); - dwin_string.set(i8tostr3rj(thermalManager.scaledFanSpeedPercent(0))); - dwin_string.add('%'); - DWIN_Draw_String(true, font14x28, Color_White, Color_Bg_Black, x, y + STATUS_FAN_HEIGHT, S(dwin_string.string())); +#if HAS_FAN + // + // Fan Icon and Percentage + // + FORCE_INLINE void _draw_fan_status(const uint16_t x, const uint16_t y) { + const uint16_t fanx = (4 * STATUS_CHR_WIDTH - STATUS_FAN_WIDTH) / 2; + const bool fan_on = !!thermalManager.scaledFanSpeed(0); + if (fan_on) { + DWIN_ICON_Animation(0, fan_on, ICON, ICON_Fan0, ICON_Fan3, x + fanx, y, 25); + dwin_string.set(i8tostr3rj(thermalManager.scaledFanSpeedPercent(0))); + dwin_string.add('%'); + DWIN_Draw_String(true, font14x28, Color_White, Color_Bg_Black, x, y + STATUS_FAN_HEIGHT, S(dwin_string.string())); + } + else { + DWIN_ICON_AnimationControl(0x0000); // disable all icon animations (this is the only one) + DWIN_ICON_Show(ICON, ICON_Fan0, x + fanx, y); + dwin_string.set(F(" ")); + DWIN_Draw_String(true, font14x28, Color_White, Color_Bg_Black, x, y + STATUS_FAN_HEIGHT, S(dwin_string.string())); + } } - else { - DWIN_ICON_AnimationControl(0x0000); // disable all icon animations (this is the only one) - DWIN_ICON_Show(ICON, ICON_Fan0, x + fanx, y); - dwin_string.set(F(" ")); - DWIN_Draw_String(true, font14x28, Color_White, Color_Bg_Black, x, y + STATUS_FAN_HEIGHT, S(dwin_string.string())); - } -} +#endif /** * Draw a single heater icon with current and target temperature, at the given XY @@ -300,7 +302,6 @@ void MarlinUI::draw_status_screen() { #if HAS_HEATED_BED _draw_heater_status(H_BED, hx, STATUS_HEATERS_Y); #endif - #if HAS_FAN _draw_fan_status(LCD_PIXEL_WIDTH - STATUS_CHR_WIDTH * 5, STATUS_FAN_Y); #endif From a8ac83bbca1b6aed52e6cfa9a7b219cadd8c20b7 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 29 Mar 2023 22:34:07 -0500 Subject: [PATCH 107/225] =?UTF-8?q?=F0=9F=90=9B=20Fix=20=5FHAS=5FFAN=20for?= =?UTF-8?q?=20fan=20on=20Pin=200?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/Conditionals_post.h | 13 ++++++------- Marlin/src/lcd/e3v2/jyersui/dwin.cpp | 1 - 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 4e36b726c8..ad8d9d36fd 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -2605,14 +2605,13 @@ #define MAX_FANS 8 // Max supported fans #endif -#define _NOT_E_AUTO(N,F) (E##N##_AUTO_FAN_PIN != FAN##F##_PIN) -#define _HAS_FAN(F) (PIN_EXISTS(FAN##F) \ +#define _IS_E_AUTO(N,F) (PIN_EXISTS(E##N##_AUTO_FAN) && E##N##_AUTO_FAN_PIN == FAN##F##_PIN) +#define _HAS_FAN(F) (F < MAX_FANS && PIN_EXISTS(FAN##F) \ && CONTROLLER_FAN_PIN != FAN##F##_PIN \ - && _NOT_E_AUTO(0,F) && _NOT_E_AUTO(1,F) \ - && _NOT_E_AUTO(2,F) && _NOT_E_AUTO(3,F) \ - && _NOT_E_AUTO(4,F) && _NOT_E_AUTO(5,F) \ - && _NOT_E_AUTO(6,F) && _NOT_E_AUTO(7,F) \ - && F < MAX_FANS) + && !_IS_E_AUTO(0,F) && !_IS_E_AUTO(1,F) \ + && !_IS_E_AUTO(2,F) && !_IS_E_AUTO(3,F) \ + && !_IS_E_AUTO(4,F) && !_IS_E_AUTO(5,F) \ + && !_IS_E_AUTO(6,F) && !_IS_E_AUTO(7,F)) #if _HAS_FAN(0) #define HAS_FAN0 1 #endif diff --git a/Marlin/src/lcd/e3v2/jyersui/dwin.cpp b/Marlin/src/lcd/e3v2/jyersui/dwin.cpp index d90e4df5af..d4b4280671 100644 --- a/Marlin/src/lcd/e3v2/jyersui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/jyersui/dwin.cpp @@ -38,7 +38,6 @@ #include "../../../module/planner.h" #include "../../../module/settings.h" #include "../../../libs/buzzer.h" -#include "../../../inc/Conditionals_post.h" //#define DEBUG_OUT 1 #include "../../../core/debug_out.h" From 49f1cc8efe0fcb8df79581c0b71eedef250e83f7 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 29 Mar 2023 22:55:36 -0500 Subject: [PATCH 108/225] =?UTF-8?q?=F0=9F=8E=A8=20Refine=20probe,=20more?= =?UTF-8?q?=20debug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/gcode/calibrate/G34_M422.cpp | 9 ++--- Marlin/src/gcode/calibrate/G76_M871.cpp | 1 - Marlin/src/module/motion.cpp | 11 ++++-- Marlin/src/module/probe.cpp | 46 ++++++++++++++++--------- Marlin/src/module/probe.h | 6 ++-- 5 files changed, 44 insertions(+), 29 deletions(-) diff --git a/Marlin/src/gcode/calibrate/G34_M422.cpp b/Marlin/src/gcode/calibrate/G34_M422.cpp index 6d5ca8bf19..816e455b84 100644 --- a/Marlin/src/gcode/calibrate/G34_M422.cpp +++ b/Marlin/src/gcode/calibrate/G34_M422.cpp @@ -147,18 +147,13 @@ void GcodeSuite::G34() { TERN_(HAS_DUPLICATION_MODE, set_duplication_enabled(false)); - // In BLTOUCH HS mode, the probe travels in a deployed state. - // Users of G34 might have a badly misaligned bed, so raise Z by the - // length of the deployed pin (BLTOUCH stroke < 7mm) - #define Z_BASIC_CLEARANCE (Z_CLEARANCE_BETWEEN_PROBES + TERN0(BLTOUCH, bltouch.z_extra_clearance())) - // Compute a worst-case clearance height to probe from. After the first // iteration this will be re-calculated based on the actual bed position auto magnitude2 = [&](const uint8_t i, const uint8_t j) { const xy_pos_t diff = z_stepper_align.xy[i] - z_stepper_align.xy[j]; return HYPOT2(diff.x, diff.y); }; - float z_probe = Z_BASIC_CLEARANCE + (G34_MAX_GRADE) * 0.01f * SQRT(_MAX(0, magnitude2(0, 1) + float z_probe = Z_PROBE_SAFE_CLEARANCE + (G34_MAX_GRADE) * 0.01f * SQRT(_MAX(0, magnitude2(0, 1) #if TRIPLE_Z , magnitude2(2, 1), magnitude2(2, 0) #if QUAD_Z @@ -253,7 +248,7 @@ void GcodeSuite::G34() { // Adapt the next probe clearance height based on the new measurements. // Safe_height = lowest distance to bed (= highest measurement) plus highest measured misalignment. z_maxdiff = z_measured_max - z_measured_min; - z_probe = Z_BASIC_CLEARANCE + z_measured_max + z_maxdiff; + z_probe = Z_PROBE_SAFE_CLEARANCE + z_measured_max + z_maxdiff; #if HAS_Z_STEPPER_ALIGN_STEPPER_XY // Replace the initial values in z_measured with calculated heights at diff --git a/Marlin/src/gcode/calibrate/G76_M871.cpp b/Marlin/src/gcode/calibrate/G76_M871.cpp index 9bea0a0b86..f25c848f2f 100644 --- a/Marlin/src/gcode/calibrate/G76_M871.cpp +++ b/Marlin/src/gcode/calibrate/G76_M871.cpp @@ -34,7 +34,6 @@ #include "../../module/probe.h" #include "../../feature/bedlevel/bedlevel.h" #include "../../module/temperature.h" -#include "../../module/probe.h" #include "../../feature/probe_temp_comp.h" #include "../../lcd/marlinui.h" diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp index 9d43db48c7..61cbef068e 100644 --- a/Marlin/src/module/motion.cpp +++ b/Marlin/src/module/motion.cpp @@ -672,6 +672,7 @@ void do_blocking_move_to(const xyze_pos_t &raw, const_feedRate_t fr_mm_s/*=0.0f* do_blocking_move_to(NUM_AXIS_ELEM(raw), fr_mm_s); } void do_blocking_move_to_x(const_float_t rx, const_feedRate_t fr_mm_s/*=0.0*/) { + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("do_blocking_move_to_x(", rx, ", ", fr_mm_s, ")"); do_blocking_move_to( NUM_AXIS_LIST(rx, current_position.y, current_position.z, current_position.i, current_position.j, current_position.k, current_position.u, current_position.v, current_position.w), @@ -681,6 +682,7 @@ void do_blocking_move_to_x(const_float_t rx, const_feedRate_t fr_mm_s/*=0.0*/) { #if HAS_Y_AXIS void do_blocking_move_to_y(const_float_t ry, const_feedRate_t fr_mm_s/*=0.0*/) { + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("do_blocking_move_to_y(", ry, ", ", fr_mm_s, ")"); do_blocking_move_to( NUM_AXIS_LIST(current_position.x, ry, current_position.z, current_position.i, current_position.j, current_position.k, current_position.u, current_position.v, current_position.w), @@ -691,6 +693,7 @@ void do_blocking_move_to_x(const_float_t rx, const_feedRate_t fr_mm_s/*=0.0*/) { #if HAS_Z_AXIS void do_blocking_move_to_z(const_float_t rz, const_feedRate_t fr_mm_s/*=0.0*/) { + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("do_blocking_move_to_z(", rz, ", ", fr_mm_s, ")"); do_blocking_move_to_xy_z(current_position, rz, fr_mm_s); } #endif @@ -769,6 +772,7 @@ void do_blocking_move_to_x(const_float_t rx, const_feedRate_t fr_mm_s/*=0.0*/) { #if HAS_Y_AXIS void do_blocking_move_to_xy(const_float_t rx, const_float_t ry, const_feedRate_t fr_mm_s/*=0.0*/) { + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("do_blocking_move_to_xy(", rx, ", ", ry, ", ", fr_mm_s, ")"); do_blocking_move_to( NUM_AXIS_LIST(rx, ry, current_position.z, current_position.i, current_position.j, current_position.k, current_position.u, current_position.v, current_position.w), @@ -789,9 +793,10 @@ void do_blocking_move_to_x(const_float_t rx, const_feedRate_t fr_mm_s/*=0.0*/) { ); } void do_z_clearance(const_float_t zclear, const bool lower_allowed/*=false*/) { - float zdest = zclear; - if (!lower_allowed) NOLESS(zdest, current_position.z); - do_blocking_move_to_z(_MIN(zdest, Z_MAX_POS), TERN(HAS_BED_PROBE, z_probe_fast_mm_s, homing_feedrate(Z_AXIS))); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("do_z_clearance(", zclear, ", ", lower_allowed, ")"); + const float zdest = _MIN(zclear, Z_MAX_POS); + if (zdest == current_position.z || (!lower_allowed && zdest < current_position.z)) return; + do_blocking_move_to_z(zdest, TERN(HAS_BED_PROBE, z_probe_fast_mm_s, homing_feedrate(Z_AXIS))); } #endif diff --git a/Marlin/src/module/probe.cpp b/Marlin/src/module/probe.cpp index 25581922f6..230fc30db1 100644 --- a/Marlin/src/module/probe.cpp +++ b/Marlin/src/module/probe.cpp @@ -361,6 +361,7 @@ void Probe::do_z_raise(const float z_raise) { } FORCE_INLINE void probe_specific_action(const bool deploy) { + DEBUG_SECTION(log_psa, "Probe::probe_specific_action", DEBUGGING(LEVELING)); #if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) do { #if ENABLED(PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED) @@ -505,7 +506,6 @@ void Probe::probe_error_stop() { * Return TRUE if the probe could not be deployed/stowed */ bool Probe::set_deployed(const bool deploy, const bool no_return/*=false*/) { - if (DEBUGGING(LEVELING)) { DEBUG_POS("Probe::set_deployed", current_position); DEBUG_ECHOLNPGM("deploy=", deploy, " no_return=", no_return); @@ -688,12 +688,12 @@ bool Probe::probe_down_to_z(const_float_t z, const_feedRate_t fr_mm_s) { bool Probe::tare() { #if BOTH(PROBE_ACTIVATION_SWITCH, PROBE_TARE_ONLY_WHILE_INACTIVE) if (endstops.probe_switch_activated()) { - SERIAL_ECHOLNPGM("Cannot tare an active probe"); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Cannot tare an active probe"); return true; } #endif - SERIAL_ECHOLNPGM("Taring probe"); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Taring probe"); WRITE(PROBE_TARE_PIN, PROBE_TARE_STATE); delay(PROBE_TARE_TIME); WRITE(PROBE_TARE_PIN, !PROBE_TARE_STATE); @@ -718,6 +718,8 @@ float Probe::run_z_probe(const bool sanity_check/*=true*/) { const float zoffs = SUM_TERN(HAS_HOTEND_OFFSET, -offset.z, hotend_offset[active_extruder].z); auto try_to_probe = [&](PGM_P const plbl, const_float_t z_probe_low_point, const feedRate_t fr_mm_s, const bool scheck, const float clearance) -> bool { + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("try_to_probe(..., ", z_probe_low_point, ", ", fr_mm_s, ", ", scheck, ", ", clearance); + // Tare the probe, if supported if (TERN0(PROBE_TARE, tare())) return true; @@ -742,6 +744,8 @@ float Probe::run_z_probe(const bool sanity_check/*=true*/) { // If Z isn't known then probe to -10mm. const float z_probe_low_point = axis_is_trusted(Z_AXIS) ? zoffs + Z_PROBE_LOW_POINT : -10.0f; + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Probe Low Point: ", z_probe_low_point); + // Double-probing does a fast probe followed by a slow probe #if TOTAL_PROBING == 2 @@ -749,6 +753,7 @@ float Probe::run_z_probe(const bool sanity_check/*=true*/) { if (TERN0(PROBE_TARE, tare())) return NAN; // Do a first probe at the fast speed + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Fast Probe:"); if (try_to_probe(PSTR("FAST"), z_probe_low_point, z_probe_fast_mm_s, sanity_check, Z_CLEARANCE_BETWEEN_PROBES) ) return NAN; @@ -756,17 +761,17 @@ float Probe::run_z_probe(const bool sanity_check/*=true*/) { if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("1st Probe Z:", first_probe_z); // Raise to give the probe clearance - do_z_clearance(current_position.z + Z_CLEARANCE_MULTI_PROBE); + do_z_clearance(Z_CLEARANCE_MULTI_PROBE); #elif Z_PROBE_FEEDRATE_FAST != Z_PROBE_FEEDRATE_SLOW // If the nozzle is well over the travel height then // move down quickly before doing the slow probe - const float z = Z_CLEARANCE_DEPLOY_PROBE + 5.0f + (zoffs > 0 ? zoffs : 0); + const float z = Z_CLEARANCE_DEPLOY_PROBE + 5.0f + _MAX(zoffs, 0.0f); if (current_position.z > z) { // Probe down fast. If the probe never triggered, raise for probe clearance if (!probe_down_to_z(z, z_probe_fast_mm_s)) - do_z_clearance(current_position.z + Z_CLEARANCE_BETWEEN_PROBES); + do_z_clearance(Z_CLEARANCE_BETWEEN_PROBES); } #endif @@ -789,6 +794,7 @@ float Probe::run_z_probe(const bool sanity_check/*=true*/) { if (TERN0(PROBE_TARE, tare())) return true; // Probe downward slowly to find the bed + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Slow Probe:"); if (try_to_probe(PSTR("SLOW"), z_probe_low_point, MMM_TO_MMS(Z_PROBE_FEEDRATE_SLOW), sanity_check, Z_CLEARANCE_MULTI_PROBE) ) return NAN; @@ -798,7 +804,7 @@ float Probe::run_z_probe(const bool sanity_check/*=true*/) { #if EXTRA_PROBING > 0 // Insert Z measurement into probes[]. Keep it sorted ascending. - LOOP_LE_N(i, p) { // Iterate the saved Zs to insert the new Z + LOOP_LE_N(i, p) { // Iterate the saved Zs to insert the new Z if (i == p || probes[i] > z) { // Last index or new Z is smaller than this Z for (int8_t m = p; --m >= i;) probes[m + 1] = probes[m]; // Shift items down after the insertion point probes[i] = z; // Insert the new Z measurement @@ -817,7 +823,7 @@ float Probe::run_z_probe(const bool sanity_check/*=true*/) { #if EXTRA_PROBING > 0 < TOTAL_PROBING - 1 #endif - ) do_z_clearance(z + Z_CLEARANCE_MULTI_PROBE); + ) do_z_clearance(Z_CLEARANCE_MULTI_PROBE); #endif } @@ -919,7 +925,7 @@ float Probe::probe_at_point(const_float_t rx, const_float_t ry, const ProbePtRai #endif // Use a safe Z height for the XY move - const float safe_z = _MAX(current_position.z, SUM_TERN(BLTOUCH, Z_CLEARANCE_BETWEEN_PROBES, bltouch.z_extra_clearance())); + const float safe_z = _MAX(current_position.z, Z_PROBE_SAFE_CLEARANCE); // On delta keep Z below clip height or do_blocking_move_to will abort xyz_pos_t npos = NUM_AXIS_ARRAY( @@ -928,12 +934,16 @@ float Probe::probe_at_point(const_float_t rx, const_float_t ry, const ProbePtRai current_position.u, current_position.v, current_position.w ); if (!can_reach(npos, probe_relative)) { - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Position Not Reachable"); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Not Reachable"); return NAN; } - if (probe_relative) // Get the nozzle position, adjust for active hotend if not 0 + if (DEBUGGING(LEVELING)) DEBUG_ECHOPGM("Move to probe"); + if (probe_relative) { // Get the nozzle position, adjust for active hotend if not 0 + if (DEBUGGING(LEVELING)) DEBUG_ECHOPGM("-relative"); npos -= DIFF_TERN(HAS_HOTEND_OFFSET, offset_xy, xy_pos_t(hotend_offset[active_extruder])); + } + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM(" point"); // Move the probe to the starting XYZ do_blocking_move_to(npos, feedRate_t(XY_PROBE_FEEDRATE_MM_S)); @@ -953,11 +963,15 @@ float Probe::probe_at_point(const_float_t rx, const_float_t ry, const ProbePtRai // Raise and/or stow the probe depending on 'raise_after' and settings. if (!isnan(measured_z)) { const ProbePtRaise raise_type = (TERN0(BLTOUCH, !bltouch.high_speed_mode) && raise_after == PROBE_PT_RAISE) ? PROBE_PT_STOW : raise_after; - const bool big_raise = raise_type == PROBE_PT_BIG_RAISE; - if (big_raise || raise_type == PROBE_PT_RAISE) - do_z_clearance(current_position.z + (big_raise ? 25 : Z_CLEARANCE_BETWEEN_PROBES)); - else if (raise_type == PROBE_PT_STOW || raise_type == PROBE_PT_LAST_STOW) - if (stow()) measured_z = NAN; // Error on stow? + switch (raise_type) { + default: break; + case PROBE_PT_RAISE: + do_z_clearance(Z_CLEARANCE_BETWEEN_PROBES); + break; + case PROBE_PT_STOW: case PROBE_PT_LAST_STOW: + if (stow()) measured_z = NAN; // Error on stow? + break; + } if (verbose_level > 2) SERIAL_ECHOLNPGM("Bed X: ", LOGICAL_X_POSITION(rx), " Y: ", LOGICAL_Y_POSITION(ry), " Z: ", measured_z); diff --git a/Marlin/src/module/probe.h b/Marlin/src/module/probe.h index 90ef42b643..069e505ea0 100644 --- a/Marlin/src/module/probe.h +++ b/Marlin/src/module/probe.h @@ -38,8 +38,7 @@ PROBE_PT_NONE, // No raise or stow after run_z_probe PROBE_PT_STOW, // Do a complete stow after run_z_probe PROBE_PT_LAST_STOW, // Stow for sure, even in BLTouch HS mode - PROBE_PT_RAISE, // Raise to "between" clearance after run_z_probe - PROBE_PT_BIG_RAISE // Raise to big clearance after run_z_probe + PROBE_PT_RAISE // Raise to "between" clearance after run_z_probe }; #endif @@ -59,6 +58,9 @@ #define Z_POST_CLEARANCE 10 #endif +// In BLTOUCH HS mode, the probe travels in a deployed state. +#define Z_PROBE_SAFE_CLEARANCE SUM_TERN(BLTOUCH, Z_CLEARANCE_BETWEEN_PROBES, bltouch.z_extra_clearance()) + #if ENABLED(PREHEAT_BEFORE_LEVELING) #ifndef LEVELING_NOZZLE_TEMP #define LEVELING_NOZZLE_TEMP 0 From c91f3a78845853b83d583db75faee09031f6c608 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 16 Aug 2021 13:44:00 -0500 Subject: [PATCH 109/225] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20displayed=20mix=20?= =?UTF-8?q?percentages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/feature/mixing.cpp | 2 -- Marlin/src/feature/mixing.h | 3 +-- Marlin/src/lcd/menu/menu_mixer.cpp | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Marlin/src/feature/mixing.cpp b/Marlin/src/feature/mixing.cpp index b1a069e320..cf88b806f5 100644 --- a/Marlin/src/feature/mixing.cpp +++ b/Marlin/src/feature/mixing.cpp @@ -24,8 +24,6 @@ #if ENABLED(MIXING_EXTRUDER) -//#define MIXER_NORMALIZER_DEBUG - #include "mixing.h" Mixer mixer; diff --git a/Marlin/src/feature/mixing.h b/Marlin/src/feature/mixing.h index 85d52d69c8..3a14fdad59 100644 --- a/Marlin/src/feature/mixing.h +++ b/Marlin/src/feature/mixing.h @@ -148,8 +148,7 @@ class Mixer { static void update_mix_from_vtool(const uint8_t j=selected_vtool) { float ctot = 0; MIXER_STEPPER_LOOP(i) ctot += color[j][i]; - //MIXER_STEPPER_LOOP(i) mix[i] = 100.0f * color[j][i] / ctot; - MIXER_STEPPER_LOOP(i) mix[i] = mixer_perc_t(100.0f * color[j][i] / ctot); + MIXER_STEPPER_LOOP(i) mix[i] = mixer_perc_t(100.0f * color[j][i] / ctot + 0.5f); #ifdef MIXER_NORMALIZER_DEBUG SERIAL_ECHOPGM("V-tool ", j, " [ "); diff --git a/Marlin/src/lcd/menu/menu_mixer.cpp b/Marlin/src/lcd/menu/menu_mixer.cpp index f18c5bbfeb..f787d47d0f 100644 --- a/Marlin/src/lcd/menu/menu_mixer.cpp +++ b/Marlin/src/lcd/menu/menu_mixer.cpp @@ -112,7 +112,7 @@ static uint8_t v_index; #if HAS_DUAL_MIXING void _lcd_draw_mix(const uint8_t y) { char tmp[20]; // "100%_100%" - sprintf_P(tmp, PSTR("%3d%% %3d%%"), int(mixer.mix[0]), int(mixer.mix[1])); + sprintf_P(tmp, PSTR("%3d%% %3d%% "), int(mixer.mix[0]), int(mixer.mix[1])); SETCURSOR(2, y); lcd_put_u8str(GET_TEXT_F(MSG_MIX)); SETCURSOR_RJ(10, y); lcd_put_u8str(tmp); } From b1398cf3ab3c2a9fa1a34866f21dbf248d7e983f Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Fri, 31 Mar 2023 00:21:31 +0000 Subject: [PATCH 110/225] [cron] Bump distribution date (2023-03-31) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 40d817f7f0..b046ce572e 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-03-30" +//#define STRING_DISTRIBUTION_DATE "2023-03-31" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 30c78dc3cc..b81da76b55 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-03-30" + #define STRING_DISTRIBUTION_DATE "2023-03-31" #endif /** From 20e23050117287dafa6e5b16b6253b3d7629020d Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 31 Mar 2023 00:33:31 -0500 Subject: [PATCH 111/225] =?UTF-8?q?=F0=9F=94=A7=20=20DGUS=5FLCD=5FUI=20sel?= =?UTF-8?q?ectable=20options?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 475f662ca5..d36ceab491 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -3111,6 +3111,8 @@ * - Download files as specified for your type of display. * - Plug the microSD card into the back of the display. * - Boot the display and wait for the update to complete. + * + * :[ 'ORIGIN', 'FYSETC', 'HYPRECY', 'MKS', 'RELOADED', 'IA_CREALITY' ] */ //#define DGUS_LCD_UI ORIGIN #if DGUS_UI_IS(MKS) From 16bd900a56498361d88514a831eed983af9301aa Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Fri, 31 Mar 2023 19:04:40 +1300 Subject: [PATCH 112/225] =?UTF-8?q?=F0=9F=94=A7=20Fix=20SENSORLESS=20hit?= =?UTF-8?q?=20state=20error=20(#25604)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/SanityCheck.h | 72 ++++++++++++++++++------------------ 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 59b64e9ae9..6adf3c9d88 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -3645,15 +3645,15 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #define _HIT_STATE AXIS_DRIVER_TYPE(X,TMC2209) #if X_HOME_TO_MIN && X_MIN_ENDSTOP_HIT_STATE != _HIT_STATE #if _HIT_STATE - #error "SENSORLESS_HOMING requires X_MIN_ENDSTOP_HIT_STATE LOW for X_MIN homing." - #else #error "SENSORLESS_HOMING requires X_MIN_ENDSTOP_HIT_STATE HIGH for X_MIN homing with TMC2209." + #else + #error "SENSORLESS_HOMING requires X_MIN_ENDSTOP_HIT_STATE LOW for X_MIN homing." #endif #elif X_HOME_TO_MAX && X_MAX_ENDSTOP_HIT_STATE != _HIT_STATE #if _HIT_STATE - #error "SENSORLESS_HOMING requires X_MAX_ENDSTOP_HIT_STATE LOW for X_MAX homing." - #else #error "SENSORLESS_HOMING requires X_MAX_ENDSTOP_HIT_STATE HIGH for X_MAX homing with TMC2209." + #else + #error "SENSORLESS_HOMING requires X_MAX_ENDSTOP_HIT_STATE LOW for X_MAX homing." #endif #endif #undef _HIT_STATE @@ -3663,15 +3663,15 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #define _HIT_STATE AXIS_DRIVER_TYPE(Y,TMC2209) #if Y_HOME_TO_MIN && Y_MIN_ENDSTOP_HIT_STATE != _HIT_STATE #if _HIT_STATE - #error "SENSORLESS_HOMING requires Y_MIN_ENDSTOP_HIT_STATE LOW for Y_MIN homing." - #else #error "SENSORLESS_HOMING requires Y_MIN_ENDSTOP_HIT_STATE HIGH for Y_MIN homing with TMC2209." + #else + #error "SENSORLESS_HOMING requires Y_MIN_ENDSTOP_HIT_STATE LOW for Y_MIN homing." #endif #elif Y_HOME_TO_MAX && Y_MAX_ENDSTOP_HIT_STATE != _HIT_STATE #if _HIT_STATE - #error "SENSORLESS_HOMING requires Y_MAY_ENDSTOP_HIT_STATE LOW for Y_MAX homing." - #else #error "SENSORLESS_HOMING requires Y_MAY_ENDSTOP_HIT_STATE HIGH for Y_MAX homing with TMC2209." + #else + #error "SENSORLESS_HOMING requires Y_MAY_ENDSTOP_HIT_STATE LOW for Y_MAX homing." #endif #endif #undef _HIT_STATE @@ -3681,15 +3681,15 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #define _HIT_STATE AXIS_DRIVER_TYPE(Z,TMC2209) #if Z_HOME_TO_MIN && Z_MIN_ENDSTOP_HIT_STATE != _HIT_STATE #if _HIT_STATE - #error "SENSORLESS_HOMING requires Z_MIN_ENDSTOP_HIT_STATE LOW for Z_MIN homing." - #else #error "SENSORLESS_HOMING requires Z_MIN_ENDSTOP_HIT_STATE HIGH for Z_MIN homing with TMC2209." + #else + #error "SENSORLESS_HOMING requires Z_MIN_ENDSTOP_HIT_STATE LOW for Z_MIN homing." #endif #elif Z_HOME_TO_MAX && Z_MAX_ENDSTOP_HIT_STATE != _HIT_STATE #if _HIT_STATE - #error "SENSORLESS_HOMING requires Z_MAZ_ENDSTOP_HIT_STATE LOW for Z_MAX homing." - #else #error "SENSORLESS_HOMING requires Z_MAZ_ENDSTOP_HIT_STATE HIGH for Z_MAX homing with TMC2209." + #else + #error "SENSORLESS_HOMING requires Z_MAZ_ENDSTOP_HIT_STATE LOW for Z_MAX homing." #endif #endif #undef _HIT_STATE @@ -3699,15 +3699,15 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #define _HIT_STATE AXIS_DRIVER_TYPE(I,TMC2209) #if I_HOME_TO_MIN && I_MIN_ENDSTOP_HIT_STATE != _HIT_STATE #if _HIT_STATE - #error "SENSORLESS_HOMING requires I_MIN_ENDSTOP_HIT_STATE LOW for I_MIN homing." - #else #error "SENSORLESS_HOMING requires I_MIN_ENDSTOP_HIT_STATE HIGH for I_MIN homing with TMC2209." + #else + #error "SENSORLESS_HOMING requires I_MIN_ENDSTOP_HIT_STATE LOW for I_MIN homing." #endif #elif I_HOME_TO_MAX && I_MAX_ENDSTOP_HIT_STATE != _HIT_STATE #if _HIT_STATE - #error "SENSORLESS_HOMING requires I_MAI_ENDSTOP_HIT_STATE LOW for I_MAX homing." - #else #error "SENSORLESS_HOMING requires I_MAI_ENDSTOP_HIT_STATE HIGH for I_MAX homing with TMC2209." + #else + #error "SENSORLESS_HOMING requires I_MAI_ENDSTOP_HIT_STATE LOW for I_MAX homing." #endif #endif #undef _HIT_STATE @@ -3717,15 +3717,15 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #define _HIT_STATE AXIS_DRIVER_TYPE(J,TMC2209) #if J_HOME_TO_MIN && J_MIN_ENDSTOP_HIT_STATE != _HIT_STATE #if _HIT_STATE - #error "SENSORLESS_HOMING requires J_MIN_ENDSTOP_HIT_STATE LOW for J_MIN homing." - #else #error "SENSORLESS_HOMING requires J_MIN_ENDSTOP_HIT_STATE HIGH for J_MIN homing with TMC2209." + #else + #error "SENSORLESS_HOMING requires J_MIN_ENDSTOP_HIT_STATE LOW for J_MIN homing." #endif #elif J_HOME_TO_MAX && J_MAX_ENDSTOP_HIT_STATE != _HIT_STATE #if _HIT_STATE - #error "SENSORLESS_HOMING requires J_MAJ_ENDSTOP_HIT_STATE LOW for J_MAX homing." - #else #error "SENSORLESS_HOMING requires J_MAJ_ENDSTOP_HIT_STATE HIGH for J_MAX homing with TMC2209." + #else + #error "SENSORLESS_HOMING requires J_MAJ_ENDSTOP_HIT_STATE LOW for J_MAX homing." #endif #endif #undef _HIT_STATE @@ -3735,15 +3735,15 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #define _HIT_STATE AXIS_DRIVER_TYPE(K,TMC2209) #if K_HOME_TO_MIN && K_MIN_ENDSTOP_HIT_STATE != _HIT_STATE #if _HIT_STATE - #error "SENSORLESS_HOMING requires K_MIN_ENDSTOP_HIT_STATE LOW for K_MIN homing." - #else #error "SENSORLESS_HOMING requires K_MIN_ENDSTOP_HIT_STATE HIGH for K_MIN homing with TMC2209." + #else + #error "SENSORLESS_HOMING requires K_MIN_ENDSTOP_HIT_STATE LOW for K_MIN homing." #endif #elif K_HOME_TO_MAX && K_MAX_ENDSTOP_HIT_STATE != _HIT_STATE #if _HIT_STATE - #error "SENSORLESS_HOMING requires K_MAK_ENDSTOP_HIT_STATE LOW for K_MAX homing." - #else #error "SENSORLESS_HOMING requires K_MAK_ENDSTOP_HIT_STATE HIGH for K_MAX homing with TMC2209." + #else + #error "SENSORLESS_HOMING requires K_MAK_ENDSTOP_HIT_STATE LOW for K_MAX homing." #endif #endif #undef _HIT_STATE @@ -3753,15 +3753,15 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #define _HIT_STATE AXIS_DRIVER_TYPE(U,TMC2209) #if U_HOME_TO_MIN && U_MIN_ENDSTOP_HIT_STATE != _HIT_STATE #if _HIT_STATE - #error "SENSORLESS_HOMING requires U_MIN_ENDSTOP_HIT_STATE LOW for U_MIN homing." - #else #error "SENSORLESS_HOMING requires U_MIN_ENDSTOP_HIT_STATE HIGH for U_MIN homing with TMC2209." + #else + #error "SENSORLESS_HOMING requires U_MIN_ENDSTOP_HIT_STATE LOW for U_MIN homing." #endif #elif U_HOME_TO_MAX && U_MAX_ENDSTOP_HIT_STATE != _HIT_STATE #if _HIT_STATE - #error "SENSORLESS_HOMING requires U_MAU_ENDSTOP_HIT_STATE LOW for U_MAX homing." - #else #error "SENSORLESS_HOMING requires U_MAU_ENDSTOP_HIT_STATE HIGH for U_MAX homing with TMC2209." + #else + #error "SENSORLESS_HOMING requires U_MAU_ENDSTOP_HIT_STATE LOW for U_MAX homing." #endif #endif #undef _HIT_STATE @@ -3771,15 +3771,15 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #define _HIT_STATE AXIS_DRIVER_TYPE(V,TMC2209) #if V_HOME_TO_MIN && V_MIN_ENDSTOP_HIT_STATE != _HIT_STATE #if _HIT_STATE - #error "SENSORLESS_HOMING requires V_MIN_ENDSTOP_HIT_STATE LOW for V_MIN homing." - #else #error "SENSORLESS_HOMING requires V_MIN_ENDSTOP_HIT_STATE HIGH for V_MIN homing with TMC2209." + #else + #error "SENSORLESS_HOMING requires V_MIN_ENDSTOP_HIT_STATE LOW for V_MIN homing." #endif #elif V_HOME_TO_MAX && V_MAX_ENDSTOP_HIT_STATE != _HIT_STATE #if _HIT_STATE - #error "SENSORLESS_HOMING requires V_MAV_ENDSTOP_HIT_STATE LOW for V_MAX homing." - #else #error "SENSORLESS_HOMING requires V_MAV_ENDSTOP_HIT_STATE HIGH for V_MAX homing with TMC2209." + #else + #error "SENSORLESS_HOMING requires V_MAV_ENDSTOP_HIT_STATE LOW for V_MAX homing." #endif #endif #undef _HIT_STATE @@ -3789,15 +3789,15 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #define _HIT_STATE AXIS_DRIVER_TYPE(W,TMC2209) #if W_HOME_TO_MIN && W_MIN_ENDSTOP_HIT_STATE != _HIT_STATE #if _HIT_STATE - #error "SENSORLESS_HOMING requires W_MIN_ENDSTOP_HIT_STATE LOW for W_MIN homing." - #else #error "SENSORLESS_HOMING requires W_MIN_ENDSTOP_HIT_STATE HIGH for W_MIN homing with TMC2209." + #else + #error "SENSORLESS_HOMING requires W_MIN_ENDSTOP_HIT_STATE LOW for W_MIN homing." #endif #elif W_HOME_TO_MAX && W_MAX_ENDSTOP_HIT_STATE != _HIT_STATE #if _HIT_STATE - #error "SENSORLESS_HOMING requires W_MAW_ENDSTOP_HIT_STATE LOW for W_MAX homing." - #else #error "SENSORLESS_HOMING requires W_MAW_ENDSTOP_HIT_STATE HIGH for W_MAX homing with TMC2209." + #else + #error "SENSORLESS_HOMING requires W_MAW_ENDSTOP_HIT_STATE LOW for W_MAX homing." #endif #endif #undef _HIT_STATE From 06e5273d24776219253a9229621c034ab263cba7 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 31 Mar 2023 18:18:25 -0500 Subject: [PATCH 113/225] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Car?= =?UTF-8?q?dReader=20adjustments=20(#25611)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/feature/easythreed_ui.cpp | 17 ++--- Marlin/src/inc/Conditionals_post.h | 23 +++--- Marlin/src/inc/SanityCheck.h | 15 ++-- Marlin/src/inc/Warnings.cpp | 7 ++ Marlin/src/lcd/e3v2/creality/dwin.cpp | 10 +-- Marlin/src/lcd/e3v2/jyersui/dwin.cpp | 10 +-- Marlin/src/lcd/e3v2/proui/dwin.cpp | 8 +-- Marlin/src/lcd/extui/malyan/malyan.cpp | 4 +- .../src/lcd/extui/mks_ui/draw_print_file.cpp | 6 +- Marlin/src/lcd/extui/mks_ui/wifi_module.cpp | 6 +- Marlin/src/lcd/extui/ui_api.cpp | 18 ++--- Marlin/src/lcd/extui/ui_api.h | 3 - Marlin/src/lcd/menu/menu_media.cpp | 10 +-- Marlin/src/sd/cardreader.cpp | 72 ++++++++----------- Marlin/src/sd/cardreader.h | 27 +++---- 15 files changed, 106 insertions(+), 130 deletions(-) diff --git a/Marlin/src/feature/easythreed_ui.cpp b/Marlin/src/feature/easythreed_ui.cpp index b15daffc09..39248bfc7d 100644 --- a/Marlin/src/feature/easythreed_ui.cpp +++ b/Marlin/src/feature/easythreed_ui.cpp @@ -190,31 +190,28 @@ void EasythreedUI::printButton() { print_key_flag = PF_PAUSE; // The "Print" button now pauses the print card.mount(); // Force SD card to mount - now! if (!card.isMounted) { // Failed to mount? - blink_interval_ms = LED_OFF; // Turn off LED - print_key_flag = PF_START; - return; // Bail out + blink_interval_ms = LED_OFF; // Turn off LED + print_key_flag = PF_START; + return; // Bail out } card.ls(); // List all files to serial output - const uint16_t filecnt = card.countFilesInWorkDir(); // Count printable files in cwd + const int16_t filecnt = card.get_num_items(); // Count printable files in cwd if (filecnt == 0) return; // None are printable? card.selectFileByIndex(filecnt); // Select the last file according to current sort options card.openAndPrintFile(card.filename); // Start printing it - break; - } + } break; case PF_PAUSE: { // Pause printing (not currently firing) if (!printingIsActive()) break; blink_interval_ms = LED_ON; // Set indicator to steady ON queue.inject(F("M25")); // Queue Pause print_key_flag = PF_RESUME; // The "Print" button now resumes the print - break; - } + } break; case PF_RESUME: { // Resume printing if (printingIsActive()) break; blink_interval_ms = LED_BLINK_2; // Blink the indicator LED at 1 second intervals queue.inject(F("M24")); // Queue resume print_key_flag = PF_PAUSE; // The "Print" button now pauses the print - break; - } + } break; } } else { // Register a longer press diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index ad8d9d36fd..d45abc558a 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -3262,9 +3262,9 @@ // Number of VFAT entries used. Each entry has 13 UTF-16 characters #if ANY(SCROLL_LONG_FILENAMES, HAS_DWIN_E3V2, TFT_COLOR_UI) - #define MAX_VFAT_ENTRIES (5) + #define MAX_VFAT_ENTRIES 5 #else - #define MAX_VFAT_ENTRIES (2) + #define MAX_VFAT_ENTRIES 2 #endif // Nozzle park for Delta @@ -3279,14 +3279,17 @@ #if defined(TARGET_LPC1768) && IS_RRD_FG_SC && (SD_SCK_PIN == LCD_PINS_D4) #define SDCARD_SORT_ALPHA // Keep one directory level in RAM. Changing directory levels // may still glitch the screen, but LCD updates clean it up. - #undef SDSORT_LIMIT - #undef SDSORT_USES_RAM - #undef SDSORT_USES_STACK - #undef SDSORT_CACHE_NAMES - #define SDSORT_LIMIT 64 - #define SDSORT_USES_RAM true - #define SDSORT_USES_STACK false - #define SDSORT_CACHE_NAMES true + #if SDSORT_LIMIT > 64 || !SDSORT_USES_RAM || SDSORT_USES_STACK || !SDSORT_CACHE_NAMES + #undef SDSORT_LIMIT + #undef SDSORT_USES_RAM + #undef SDSORT_USES_STACK + #undef SDSORT_CACHE_NAMES + #define SDSORT_LIMIT 64 + #define SDSORT_USES_RAM true + #define SDSORT_USES_STACK false + #define SDSORT_CACHE_NAMES true + #define SDSORT_CACHE_LPC1768_WARNING 1 + #endif #ifndef FOLDER_SORTING #define FOLDER_SORTING -1 #endif diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 6adf3c9d88..c25be192e2 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -1031,7 +1031,9 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS * SD File Sorting */ #if ENABLED(SDCARD_SORT_ALPHA) - #if SDSORT_LIMIT > 256 + #if NONE(EXTENSIBLE_UI, HAS_MARLINUI_MENU, DWIN_CREALITY_LCD, DWIN_CREALITY_LCD_JYERSUI, DWIN_LCD_PROUI) + #error "SDCARD_SORT_ALPHA requires an LCD that supports it. (It doesn't apply to M20, etc.)" + #elif SDSORT_LIMIT > 256 #error "SDSORT_LIMIT must be 256 or smaller." #elif SDSORT_LIMIT < 10 #error "SDSORT_LIMIT should be greater than 9 to be useful." @@ -1049,7 +1051,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #elif SDSORT_CACHE_VFATS > MAX_VFAT_ENTRIES #undef SDSORT_CACHE_VFATS #define SDSORT_CACHE_VFATS MAX_VFAT_ENTRIES - #warning "SDSORT_CACHE_VFATS was reduced to MAX_VFAT_ENTRIES!" + #define SDSORT_CACHE_VFATS_WARNING 1 #endif #endif #endif @@ -3117,14 +3119,13 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS /** * Make sure features that need to write to the SD card can */ -#if ENABLED(SDCARD_READONLY) && ANY(POWER_LOSS_RECOVERY, BINARY_FILE_TRANSFER, SDCARD_EEPROM_EMULATION) - #undef SDCARD_READONLY +#if ENABLED(SDCARD_READONLY) #if ENABLED(POWER_LOSS_RECOVERY) - #warning "Either disable SDCARD_READONLY or disable POWER_LOSS_RECOVERY." + #error "Either disable SDCARD_READONLY or disable POWER_LOSS_RECOVERY." #elif ENABLED(BINARY_FILE_TRANSFER) - #warning "Either disable SDCARD_READONLY or disable BINARY_FILE_TRANSFER." + #error "Either disable SDCARD_READONLY or disable BINARY_FILE_TRANSFER." #elif ENABLED(SDCARD_EEPROM_EMULATION) - #warning "Either disable SDCARD_READONLY or disable SDCARD_EEPROM_EMULATION." + #error "Either disable SDCARD_READONLY or disable SDCARD_EEPROM_EMULATION." #endif #endif diff --git a/Marlin/src/inc/Warnings.cpp b/Marlin/src/inc/Warnings.cpp index 3b9bc17b6f..e9d3f42388 100644 --- a/Marlin/src/inc/Warnings.cpp +++ b/Marlin/src/inc/Warnings.cpp @@ -808,3 +808,10 @@ #if MULTISTEPPING_LIMIT_WARNING #warning "MULTISTEPPING_LIMIT has been automatically set to 128. Use a lower value if the machine is slow to respond." #endif + +#if SDSORT_CACHE_VFATS_WARNING + #warning "SDSORT_CACHE_VFATS has been reduced to MAX_VFAT_ENTRIES." +#endif +#if SDSORT_CACHE_LPC1768_WARNING + #warning "SDCARD_SORT_ALPHA sub-options overridden for LPC1768 with DOGM LCD SCK overlap." +#endif diff --git a/Marlin/src/lcd/e3v2/creality/dwin.cpp b/Marlin/src/lcd/e3v2/creality/dwin.cpp index 08d928684a..459b00ae1b 100644 --- a/Marlin/src/lcd/e3v2/creality/dwin.cpp +++ b/Marlin/src/lcd/e3v2/creality/dwin.cpp @@ -411,7 +411,7 @@ void Scroll_Menu(const uint8_t dir) { } inline uint16_t nr_sd_menu_items() { - return card.get_num_Files() + !card.flag.workDirIsRoot; + return card.get_num_items() + !card.flag.workDirIsRoot; } void Erase_Menu_Text(const uint8_t line) { @@ -1830,9 +1830,9 @@ void MarlinUI::refresh() { /* Nothing to see here */ } void Init_Shift_Name() { const bool is_subdir = !card.flag.workDirIsRoot; const int8_t filenum = select_file.now - 1 - is_subdir; // Skip "Back" and ".." - const uint16_t fileCnt = card.get_num_Files(); + const int16_t fileCnt = card.get_num_items(); if (WITHIN(filenum, 0, fileCnt - 1)) { - card.getfilename_sorted(SD_ORDER(filenum, fileCnt)); + card.selectFileByIndexSorted(filenum); char * const name = card.longest_filename(); make_name_without_ext(shift_name, name, 100); } @@ -1857,7 +1857,7 @@ void Draw_SDItem(const uint16_t item, int16_t row=-1) { return; } - card.getfilename_sorted(SD_ORDER(item - is_subdir, card.get_num_Files())); + card.selectFileByIndexSorted(item - is_subdir); char * const name = card.longest_filename(); #if ENABLED(SCROLL_LONG_FILENAMES) @@ -2223,7 +2223,7 @@ void HMI_SelectFile() { } else { const uint16_t filenum = select_file.now - 1 - hasUpDir; - card.getfilename_sorted(SD_ORDER(filenum, card.get_num_Files())); + card.selectFileByIndexSorted(filenum); // Enter that folder! if (card.flag.filenameIsDir) { diff --git a/Marlin/src/lcd/e3v2/jyersui/dwin.cpp b/Marlin/src/lcd/e3v2/jyersui/dwin.cpp index d4b4280671..285723e278 100644 --- a/Marlin/src/lcd/e3v2/jyersui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/jyersui/dwin.cpp @@ -807,7 +807,7 @@ void CrealityDWINClass::Draw_SD_Item(uint8_t item, uint8_t row) { if (item == 0) Draw_Menu_Item(0, ICON_Back, card.flag.workDirIsRoot ? F("Back") : F("..")); else { - card.getfilename_sorted(SD_ORDER(item - 1, card.get_num_Files())); + card.selectFileByIndexSorted(item - 1); char * const filename = card.longest_filename(); size_t max = MENU_CHAR_LIMIT; size_t pos = strlen(filename), len = pos; @@ -831,7 +831,7 @@ void CrealityDWINClass::Draw_SD_List(bool removed/*=false*/) { scrollpos = 0; process = File; if (card.isMounted() && !removed) { - LOOP_L_N(i, _MIN(card.get_num_Files() + 1, TROWS)) + LOOP_L_N(i, _MIN(card.get_num_items() + 1, TROWS)) Draw_SD_Item(i, i); } else { @@ -4281,7 +4281,7 @@ void CrealityDWINClass::File_Control() { EncoderState encoder_diffState = Encoder_ReceiveAnalyze(); if (encoder_diffState == ENCODER_DIFF_NO) { if (selection > 0) { - card.getfilename_sorted(SD_ORDER(selection - 1, card.get_num_Files())); + card.selectFileByIndexSorted(selection - 1); char * const filename = card.longest_filename(); size_t len = strlen(filename); size_t pos = len; @@ -4300,7 +4300,7 @@ void CrealityDWINClass::File_Control() { } return; } - if (encoder_diffState == ENCODER_DIFF_CW && selection < card.get_num_Files()) { + if (encoder_diffState == ENCODER_DIFF_CW && selection < card.get_num_items()) { DWIN_Draw_Rectangle(1, Color_Bg_Black, 0, MBASE(selection - scrollpos) - 18, 14, MBASE(selection - scrollpos) + 33); if (selection > 0) { DWIN_Draw_Rectangle(1, Color_Bg_Black, LBLX, MBASE(selection - scrollpos) - 14, 271, MBASE(selection - scrollpos) + 28); @@ -4340,7 +4340,7 @@ void CrealityDWINClass::File_Control() { } } else { - card.getfilename_sorted(SD_ORDER(selection - 1, card.get_num_Files())); + card.selectFileByIndexSorted(selection - 1); if (card.flag.filenameIsDir) { card.cd(card.filename); Draw_SD_List(); diff --git a/Marlin/src/lcd/e3v2/proui/dwin.cpp b/Marlin/src/lcd/e3v2/proui/dwin.cpp index b0d1fb3ff6..adc6fca72a 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/proui/dwin.cpp @@ -844,7 +844,7 @@ void SetMediaAutoMount() { } inline uint16_t nr_sd_menu_items() { - return _MIN(card.get_num_Files() + !card.flag.workDirIsRoot, MENU_MAX_ITEMS); + return _MIN(card.get_num_items() + !card.flag.workDirIsRoot, MENU_MAX_ITEMS); } void make_name_without_ext(char *dst, char *src, size_t maxlen=MENU_CHAR_LIMIT) { @@ -891,7 +891,7 @@ void onClickSDItem() { if (hasUpDir && CurrentMenu->selected == 1) return SDCard_Up(); else { const uint16_t filenum = CurrentMenu->selected - 1 - hasUpDir; - card.getfilename_sorted(SD_ORDER(filenum, card.get_num_Files())); + card.selectFileByIndexSorted(filenum); // Enter that folder! if (card.flag.filenameIsDir) return SDCard_Folder(card.filename); @@ -934,7 +934,7 @@ void onClickSDItem() { last_itemselected = selected; if (selected >= 1 + hasUpDir) { const int8_t filenum = selected - 1 - hasUpDir; // Skip "Back" and ".." - card.getfilename_sorted(SD_ORDER(filenum, card.get_num_Files())); + card.selectFileByIndexSorted(filenum); make_name_without_ext(shift_name, card.longest_filename(), LONG_FILENAME_LENGTH); shift_len = strlen(shift_name); shift_amt = 0; @@ -959,7 +959,7 @@ void onDrawFileName(MenuItemClass* menuitem, int8_t line) { } else { uint8_t icon; - card.getfilename_sorted(SD_ORDER(menuitem->pos - is_subdir - 1, card.get_num_Files())); + card.selectFileByIndexSorted(menuitem->pos - is_subdir - 1); make_name_without_ext(shift_name, card.longest_filename()); icon = card.flag.filenameIsDir ? ICON_Folder : card.fileIsBinary() ? ICON_Binary : ICON_File; Draw_Menu_Line(line, icon, shift_name); diff --git a/Marlin/src/lcd/extui/malyan/malyan.cpp b/Marlin/src/lcd/extui/malyan/malyan.cpp index 06c9886f01..66c52878cc 100644 --- a/Marlin/src/lcd/extui/malyan/malyan.cpp +++ b/Marlin/src/lcd/extui/malyan/malyan.cpp @@ -326,8 +326,8 @@ void process_lcd_s_command(const char *command) { // select a file for printing during a print, there's // little reason not to do it this way. char message_buffer[MAX_CURLY_COMMAND]; - uint16_t file_count = card.get_num_Files(); - for (uint16_t i = 0; i < file_count; i++) { + int16_t file_count = card.get_num_items(); + for (int16_t i = 0; i < file_count; i++) { card.selectFileByIndex(i); sprintf_P(message_buffer, card.flag.filenameIsDir ? PSTR("{DIR:%s}") : PSTR("{FILE:%s}"), card.longest_filename()); write_to_lcd(message_buffer); diff --git a/Marlin/src/lcd/extui/mks_ui/draw_print_file.cpp b/Marlin/src/lcd/extui/mks_ui/draw_print_file.cpp index 0199bc1f55..6b41981fb8 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_print_file.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_print_file.cpp @@ -72,11 +72,11 @@ uint8_t sel_id = 0; else card.cdroot(); - const uint16_t fileCnt = card.get_num_Files(); + const int16_t fileCnt = card.get_num_items(); - for (uint16_t i = 0; i < fileCnt; i++) { + for (int16_t i = 0; i < fileCnt; i++) { if (list_file.Sd_file_cnt == list_file.Sd_file_offset) { - card.getfilename_sorted(SD_ORDER(i, fileCnt)); + card.selectFileByIndexSorted(i); list_file.IsFolder[valid_name_cnt] = card.flag.filenameIsDir; strcpy(list_file.file_name[valid_name_cnt], list_file.curDirPath); diff --git a/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp b/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp index b389109975..d6d2ce3945 100644 --- a/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp +++ b/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp @@ -823,12 +823,12 @@ uint8_t Explore_Disk(const char * const path, const uint8_t recu_level, const bo if (!path) return 0; - const uint8_t fileCnt = card.get_num_Files(); + const int16_t fileCnt = card.get_num_items(); MediaFile file; MediaFile *diveDir; - for (uint8_t i = 0; i < fileCnt; i++) { - card.getfilename_sorted(SD_ORDER(i, fileCnt)); + for (int16_t i = 0; i < fileCnt; i++) { + card.selectFileByIndexSorted(i); ZERO(Fstream); strcpy(Fstream, card.filename); diff --git a/Marlin/src/lcd/extui/ui_api.cpp b/Marlin/src/lcd/extui/ui_api.cpp index 5c27b345c4..7e47bef9c1 100644 --- a/Marlin/src/lcd/extui/ui_api.cpp +++ b/Marlin/src/lcd/extui/ui_api.cpp @@ -1136,12 +1136,12 @@ namespace ExtUI { FileList::FileList() { refresh(); } - void FileList::refresh() { num_files = 0xFFFF; } + void FileList::refresh() { } bool FileList::seek(const uint16_t pos, const bool skip_range_check) { #if ENABLED(SDSUPPORT) if (!skip_range_check && (pos + 1) > count()) return false; - card.getfilename_sorted(SD_ORDER(pos, count())); + card.selectFileByIndexSorted(pos); return card.filename[0] != '\0'; #else UNUSED(pos); @@ -1167,7 +1167,7 @@ namespace ExtUI { } uint16_t FileList::count() { - return TERN0(SDSUPPORT, (num_files = (num_files == 0xFFFF ? card.get_num_Files() : num_files))); + return TERN0(SDSUPPORT, card.get_num_items()); } bool FileList::isAtRootDir() { @@ -1175,19 +1175,11 @@ namespace ExtUI { } void FileList::upDir() { - #if ENABLED(SDSUPPORT) - card.cdup(); - num_files = 0xFFFF; - #endif + TERN_(SDSUPPORT, card.cdup()); } void FileList::changeDir(const char * const dirname) { - #if ENABLED(SDSUPPORT) - card.cd(dirname); - num_files = 0xFFFF; - #else - UNUSED(dirname); - #endif + TERN(SDSUPPORT, card.cd(dirname), UNUSED(dirname)); } } // namespace ExtUI diff --git a/Marlin/src/lcd/extui/ui_api.h b/Marlin/src/lcd/extui/ui_api.h index d9594bace6..209635ea09 100644 --- a/Marlin/src/lcd/extui/ui_api.h +++ b/Marlin/src/lcd/extui/ui_api.h @@ -376,9 +376,6 @@ namespace ExtUI { void resumePrint(); class FileList { - private: - uint16_t num_files; - public: FileList(); void refresh(); diff --git a/Marlin/src/lcd/menu/menu_media.cpp b/Marlin/src/lcd/menu/menu_media.cpp index 20ef6e3d19..d43053da62 100644 --- a/Marlin/src/lcd/menu/menu_media.cpp +++ b/Marlin/src/lcd/menu/menu_media.cpp @@ -109,10 +109,10 @@ void menu_media_filelist() { ui.encoder_direction_menus(); #if HAS_MARLINUI_U8GLIB - static uint16_t fileCnt; - if (ui.first_page) fileCnt = card.get_num_Files(); + static int16_t fileCnt; + if (ui.first_page) fileCnt = card.get_num_items(); #else - const uint16_t fileCnt = card.get_num_Files(); + const int16_t fileCnt = card.get_num_items(); #endif START_MENU(); @@ -129,9 +129,9 @@ void menu_media_filelist() { else if (card.isMounted()) ACTION_ITEM_F(F(LCD_STR_FOLDER " .."), lcd_sd_updir); - if (ui.should_draw()) for (uint16_t i = 0; i < fileCnt; i++) { + if (ui.should_draw()) for (int16_t i = 0; i < fileCnt; i++) { if (_menuLineNr == _thisItemNr) { - card.getfilename_sorted(SD_ORDER(i, fileCnt)); + card.selectFileByIndexSorted(i); if (card.flag.filenameIsDir) MENU_ITEM(sdfolder, MSG_MEDIA_MENU, card); else diff --git a/Marlin/src/sd/cardreader.cpp b/Marlin/src/sd/cardreader.cpp index 8a4fa743d4..3a377d694d 100644 --- a/Marlin/src/sd/cardreader.cpp +++ b/Marlin/src/sd/cardreader.cpp @@ -81,10 +81,11 @@ IF_DISABLED(NO_SD_AUTOSTART, uint8_t CardReader::autofile_index); // = 0 MediaFile CardReader::root, CardReader::workDir, CardReader::workDirParents[MAX_DIR_DEPTH]; uint8_t CardReader::workDirDepth; +int16_t CardReader::nrItems = -1; #if ENABLED(SDCARD_SORT_ALPHA) - uint16_t CardReader::sort_count; + int16_t CardReader::sort_count; #if ENABLED(SDSORT_GCODE) bool CardReader::sort_alpha; int CardReader::sort_folders; @@ -100,7 +101,6 @@ uint8_t CardReader::workDirDepth; #if ENABLED(SDSORT_USES_RAM) #if ENABLED(SDSORT_CACHE_NAMES) - uint16_t CardReader::nrFiles; // Cached total file count #if ENABLED(SDSORT_DYNAMIC_RAM) char **CardReader::sortshort, **CardReader::sortnames; #else @@ -228,25 +228,20 @@ bool CardReader::is_visible_entity(const dir_t &p OPTARG(CUSTOM_FIRMWARE_UPLOAD, // // Get the number of (compliant) items in the folder // -int CardReader::countItems(MediaFile dir) { +int16_t CardReader::countVisibleItems(MediaFile dir) { dir_t p; - int c = 0; - while (dir.readDir(&p, longFilename) > 0) - c += is_visible_entity(p); - - #if ALL(SDCARD_SORT_ALPHA, SDSORT_USES_RAM, SDSORT_CACHE_NAMES) - nrFiles = c; - #endif - + int16_t c = 0; + dir.rewind(); + while (dir.readDir(&p, longFilename) > 0) c += is_visible_entity(p); return c; } // // Get file/folder info for an item by index // -void CardReader::selectByIndex(MediaFile dir, const uint8_t index) { +void CardReader::selectByIndex(MediaFile dir, const int16_t index) { dir_t p; - for (uint8_t cnt = 0; dir.readDir(&p, longFilename) > 0;) { + for (int16_t cnt = 0; dir.readDir(&p, longFilename) > 0;) { if (is_visible_entity(p)) { if (cnt == index) { createFilename(filename, p); @@ -480,6 +475,7 @@ void CardReader::printSelectedFilename() { void CardReader::mount() { flag.mounted = false; + nrItems = -1; if (root.isOpen()) root.close(); if (!driver->init(SD_SPI_SPEED, SDSS) @@ -578,9 +574,7 @@ void CardReader::release() { flag.mounted = false; flag.workDirIsRoot = true; - #if ALL(SDCARD_SORT_ALPHA, SDSORT_USES_RAM, SDSORT_CACHE_NAMES) - nrFiles = 0; - #endif + nrItems = -1; SERIAL_ECHO_MSG(STR_SD_CARD_RELEASED); } @@ -909,7 +903,7 @@ void CardReader::closefile(const bool store_location/*=false*/) { // // Get info for a file in the working directory by index // -void CardReader::selectFileByIndex(const uint16_t nr) { +void CardReader::selectFileByIndex(const int16_t nr) { #if ENABLED(SDSORT_CACHE_NAMES) if (nr < sort_count) { strcpy(filename, sortshort[nr]); @@ -928,7 +922,7 @@ void CardReader::selectFileByIndex(const uint16_t nr) { // void CardReader::selectFileByName(const char * const match) { #if ENABLED(SDSORT_CACHE_NAMES) - for (uint16_t nr = 0; nr < sort_count; nr++) + for (int16_t nr = 0; nr < sort_count; nr++) if (strcasecmp(match, sortshort[nr]) == 0) { strcpy(filename, sortshort[nr]); strcpy(longFilename, sortnames[nr]); @@ -941,11 +935,6 @@ void CardReader::selectFileByName(const char * const match) { selectByName(workDir, match); } -uint16_t CardReader::countFilesInWorkDir() { - workDir.rewind(); - return countItems(workDir); -} - /** * Dive to the given DOS 8.3 file path, with optional echo of the dive paths. * @@ -1058,6 +1047,7 @@ void CardReader::cd(const char * relpath) { flag.workDirIsRoot = false; if (workDirDepth < MAX_DIR_DEPTH) workDirParents[workDirDepth++] = workDir; + nrItems = -1; TERN_(SDCARD_SORT_ALPHA, presort()); } else @@ -1066,6 +1056,7 @@ void CardReader::cd(const char * relpath) { int8_t CardReader::cdup() { if (workDirDepth > 0) { // At least 1 dir has been saved + nrItems = -1; workDir = --workDirDepth ? workDirParents[workDirDepth - 1] : root; // Use parent, or root if none TERN_(SDCARD_SORT_ALPHA, presort()); } @@ -1077,6 +1068,7 @@ void CardReader::cdroot() { workDir = root; flag.workDirIsRoot = true; workDirDepth = 0; + nrItems = -1; TERN_(SDCARD_SORT_ALPHA, presort()); } @@ -1085,9 +1077,8 @@ void CardReader::cdroot() { /** * Get the name of a file in the working directory by sort-index */ - void CardReader::getfilename_sorted(const uint16_t nr) { - selectFileByIndex(TERN1(SDSORT_GCODE, sort_alpha) && (nr < sort_count) - ? sort_order[nr] : nr); + void CardReader::selectFileByIndexSorted(const int16_t nr) { + selectFileByIndex(TERN1(SDSORT_GCODE, sort_alpha) && (nr < sort_count) ? sort_order[nr] : nr); } #if ENABLED(SDSORT_USES_RAM) @@ -1128,20 +1119,20 @@ void CardReader::cdroot() { * - Most RAM: Buffer the directory and return filenames from RAM */ void CardReader::presort() { - // Throw away old sort index flush_presort(); + int16_t fileCnt = get_num_items(); + // Sorting may be turned off if (TERN0(SDSORT_GCODE, !sort_alpha)) return; // If there are files, sort up to the limit - uint16_t fileCnt = countFilesInWorkDir(); if (fileCnt > 0) { // Never sort more than the max allowed // If you use folders to organize, 20 may be enough - NOMORE(fileCnt, uint16_t(SDSORT_LIMIT)); + NOMORE(fileCnt, int16_t(SDSORT_LIMIT)); // Sort order is always needed. May be static or dynamic. TERN_(SDSORT_DYNAMIC_RAM, sort_order = new uint8_t[fileCnt]); @@ -1181,7 +1172,7 @@ void CardReader::cdroot() { if (fileCnt > 1) { // Init sort order. - for (uint16_t i = 0; i < fileCnt; i++) { + for (int16_t i = 0; i < fileCnt; i++) { sort_order[i] = i; // If using RAM then read all filenames now. #if ENABLED(SDSORT_USES_RAM) @@ -1200,9 +1191,9 @@ void CardReader::cdroot() { } // Bubble Sort - for (uint16_t i = fileCnt; --i;) { + for (int16_t i = fileCnt; --i;) { bool didSwap = false; - uint8_t o1 = sort_order[0]; + int16_t o1 = sort_order[0]; #if DISABLED(SDSORT_USES_RAM) selectFileByIndex(o1); // Pre-fetch the first entry and save it strcpy(name1, longest_filename()); // so the loop only needs one fetch @@ -1211,8 +1202,8 @@ void CardReader::cdroot() { #endif #endif - for (uint16_t j = 0; j < i; ++j) { - const uint16_t o2 = sort_order[j + 1]; + for (int16_t j = 0; j < i; ++j) { + const int16_t o2 = sort_order[j + 1]; // Compare names from the array or just the two buffered names #if ENABLED(SDSORT_USES_RAM) @@ -1270,7 +1261,7 @@ void CardReader::cdroot() { // Using RAM but not keeping names around #if ENABLED(SDSORT_USES_RAM) && DISABLED(SDSORT_CACHE_NAMES) #if ENABLED(SDSORT_DYNAMIC_RAM) - for (uint16_t i = 0; i < fileCnt; ++i) free(sortnames[i]); + for (int16_t i = 0; i < fileCnt; ++i) free(sortnames[i]); TERN_(HAS_FOLDER_SORTING, delete [] isDir); #endif #endif @@ -1313,15 +1304,10 @@ void CardReader::cdroot() { #endif // SDCARD_SORT_ALPHA -uint16_t CardReader::get_num_Files() { +int16_t CardReader::get_num_items() { if (!isMounted()) return 0; - return ( - #if ALL(SDCARD_SORT_ALPHA, SDSORT_USES_RAM, SDSORT_CACHE_NAMES) - nrFiles // no need to access the SD card for filenames - #else - countFilesInWorkDir() - #endif - ); + if (nrItems < 0) nrItems = countVisibleItems(workDir); + return nrItems; } // diff --git a/Marlin/src/sd/cardreader.h b/Marlin/src/sd/cardreader.h index 47e3c66e47..d5eca9c915 100644 --- a/Marlin/src/sd/cardreader.h +++ b/Marlin/src/sd/cardreader.h @@ -36,12 +36,6 @@ extern const char M23_STR[], M24_STR[]; #endif #endif -#if ENABLED(SDCARD_RATHERRECENTFIRST) && DISABLED(SDCARD_SORT_ALPHA) - #define SD_ORDER(N,C) ((C) - 1 - (N)) -#else - #define SD_ORDER(N,C) N -#endif - #define MAX_DIR_DEPTH 10 // Maximum folder depth #define MAXDIRNAMELENGTH 8 // DOS folder name size #define MAXPATHNAMELENGTH (1 + (MAXDIRNAMELENGTH + 1) * (MAX_DIR_DEPTH) + 1 + FILENAME_LENGTH) // "/" + N * ("ADIRNAME/") + "filename.ext" @@ -110,8 +104,6 @@ public: #endif #endif - // // // Methods // // // - CardReader(); static void changeMedia(DiskIODriver *_driver) { driver = _driver; } @@ -153,11 +145,10 @@ public: static void cdroot(); static void cd(const char *relpath); static int8_t cdup(); - static uint16_t countFilesInWorkDir(); - static uint16_t get_num_Files(); + static int16_t get_num_items(); // Select a file - static void selectFileByIndex(const uint16_t nr); + static void selectFileByIndex(const int16_t nr); static void selectFileByName(const char * const match); // (working directory only) // Print job @@ -200,14 +191,16 @@ public: #if ENABLED(SDCARD_SORT_ALPHA) static void presort(); - static void getfilename_sorted(const uint16_t nr); + static void selectFileByIndexSorted(const int16_t nr); #if ENABLED(SDSORT_GCODE) FORCE_INLINE static void setSortOn(bool b) { sort_alpha = b; presort(); } FORCE_INLINE static void setSortFolders(int i) { sort_folders = i; presort(); } //FORCE_INLINE static void setSortReverse(bool b) { sort_reverse = b; } #endif #else - FORCE_INLINE static void getfilename_sorted(const uint16_t nr) { selectFileByIndex(nr); } + FORCE_INLINE static void selectFileByIndexSorted(const int16_t nr) { + selectFileByIndex(TERN(SDCARD_RATHERRECENTFIRST, get_num_items() - 1 - nr, (nr))); + } #endif static void ls(const uint8_t lsflags); @@ -265,12 +258,13 @@ private: // static MediaFile root, workDir, workDirParents[MAX_DIR_DEPTH]; static uint8_t workDirDepth; + static int16_t nrItems; // Cache the total count // // Alphabetical file and folder sorting // #if ENABLED(SDCARD_SORT_ALPHA) - static uint16_t sort_count; // Count of sorted items in the current directory + static int16_t sort_count; // Count of sorted items in the current directory #if ENABLED(SDSORT_GCODE) static bool sort_alpha; // Flag to enable / disable the feature static int sort_folders; // Folder sorting before/none/after @@ -297,7 +291,6 @@ private: // If using dynamic ram for names, allocate on the heap. #if ENABLED(SDSORT_CACHE_NAMES) - static uint16_t nrFiles; // Cache the total count #if ENABLED(SDSORT_DYNAMIC_RAM) static char **sortshort, **sortnames; #else @@ -342,8 +335,8 @@ private: // Directory items // static bool is_visible_entity(const dir_t &p OPTARG(CUSTOM_FIRMWARE_UPLOAD, const bool onlyBin=false)); - static int countItems(MediaFile dir); - static void selectByIndex(MediaFile dir, const uint8_t index); + static int16_t countVisibleItems(MediaFile dir); + static void selectByIndex(MediaFile dir, const int16_t index); static void selectByName(MediaFile dir, const char * const match); static void printListing( MediaFile parent, const char * const prepend, const uint8_t lsflags From afb9ed73ac5d2a25ff742e9515bd4e3b71a319e0 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sat, 1 Apr 2023 00:27:45 +0000 Subject: [PATCH 114/225] [cron] Bump distribution date (2023-04-01) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index b046ce572e..d6abcc4aa6 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-03-31" +//#define STRING_DISTRIBUTION_DATE "2023-04-01" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index b81da76b55..2140a73690 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-03-31" + #define STRING_DISTRIBUTION_DATE "2023-04-01" #endif /** From 8cdf43f8fdf8900ad903d094d1aeb5dc651b324b Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 31 Mar 2023 20:26:49 -0500 Subject: [PATCH 115/225] =?UTF-8?q?=F0=9F=8E=A8=20=20HAS=5FSHAPING=20=3D>?= =?UTF-8?q?=20HAS=5FZV=5FSHAPING?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/gcode/feature/input_shaping/M593.cpp | 2 +- Marlin/src/gcode/gcode.cpp | 2 +- Marlin/src/gcode/gcode.h | 2 +- Marlin/src/inc/Conditionals_adv.h | 2 +- Marlin/src/inc/SanityCheck.h | 2 +- Marlin/src/inc/Warnings.cpp | 2 +- Marlin/src/module/planner.cpp | 2 +- Marlin/src/module/settings.cpp | 6 +++--- Marlin/src/module/stepper.cpp | 18 +++++++++--------- Marlin/src/module/stepper.h | 18 +++++++++--------- ini/features.ini | 2 +- 11 files changed, 29 insertions(+), 29 deletions(-) diff --git a/Marlin/src/gcode/feature/input_shaping/M593.cpp b/Marlin/src/gcode/feature/input_shaping/M593.cpp index a4b3cd3fee..1b6a43f9dd 100644 --- a/Marlin/src/gcode/feature/input_shaping/M593.cpp +++ b/Marlin/src/gcode/feature/input_shaping/M593.cpp @@ -22,7 +22,7 @@ #include "../../../inc/MarlinConfig.h" -#if HAS_SHAPING +#if HAS_ZV_SHAPING #include "../../gcode.h" #include "../../../module/stepper.h" diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index 1eaf4dcd39..1752ae8a18 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -933,7 +933,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { case 575: M575(); break; // M575: Set serial baudrate #endif - #if HAS_SHAPING + #if HAS_ZV_SHAPING case 593: M593(); break; // M593: Set Input Shaping parameters #endif diff --git a/Marlin/src/gcode/gcode.h b/Marlin/src/gcode/gcode.h index 48e6fd2da8..cc3f221a82 100644 --- a/Marlin/src/gcode/gcode.h +++ b/Marlin/src/gcode/gcode.h @@ -1084,7 +1084,7 @@ private: static void M575(); #endif - #if HAS_SHAPING + #if HAS_ZV_SHAPING static void M593(); static void M593_report(const bool forReplay=true); #endif diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h index c3f244b6bb..3295626722 100644 --- a/Marlin/src/inc/Conditionals_adv.h +++ b/Marlin/src/inc/Conditionals_adv.h @@ -1248,7 +1248,7 @@ // Input shaping #if EITHER(INPUT_SHAPING_X, INPUT_SHAPING_Y) - #define HAS_SHAPING 1 + #define HAS_ZV_SHAPING 1 #endif // Toolchange Event G-code diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index c25be192e2..f718846bff 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -4513,7 +4513,7 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive."); /** * Input Shaping requirements */ -#if HAS_SHAPING +#if HAS_ZV_SHAPING #if ENABLED(DELTA) #error "Input Shaping is not compatible with DELTA kinematics." #elif ENABLED(SCARA) diff --git a/Marlin/src/inc/Warnings.cpp b/Marlin/src/inc/Warnings.cpp index e9d3f42388..0204c3fab0 100644 --- a/Marlin/src/inc/Warnings.cpp +++ b/Marlin/src/inc/Warnings.cpp @@ -801,7 +801,7 @@ /** * Input Shaping */ -#if HAS_SHAPING && ANY(CORE_IS_XY, MARKFORGED_XY, MARKFORGED_YX) +#if HAS_ZV_SHAPING && ANY(CORE_IS_XY, MARKFORGED_XY, MARKFORGED_YX) #warning "Input Shaping for CORE / MARKFORGED kinematic axes is still experimental." #endif diff --git a/Marlin/src/module/planner.cpp b/Marlin/src/module/planner.cpp index 8e77a7c979..552d212e2e 100644 --- a/Marlin/src/module/planner.cpp +++ b/Marlin/src/module/planner.cpp @@ -1728,7 +1728,7 @@ float Planner::triggered_position_mm(const AxisEnum axis) { bool Planner::busy() { return (has_blocks_queued() || cleaning_buffer_counter || TERN0(EXTERNAL_CLOSED_LOOP_CONTROLLER, CLOSED_LOOP_WAITING()) - || TERN0(HAS_SHAPING, stepper.input_shaping_busy()) + || TERN0(HAS_ZV_SHAPING, stepper.input_shaping_busy()) ); } diff --git a/Marlin/src/module/settings.cpp b/Marlin/src/module/settings.cpp index 8b615f2faf..0be7f965a4 100644 --- a/Marlin/src/module/settings.cpp +++ b/Marlin/src/module/settings.cpp @@ -1638,7 +1638,7 @@ void MarlinSettings::postprocess() { // // Input Shaping /// - #if HAS_SHAPING + #if HAS_ZV_SHAPING #if ENABLED(INPUT_SHAPING_X) EEPROM_WRITE(stepper.get_shaping_frequency(X_AXIS)); EEPROM_WRITE(stepper.get_shaping_damping_ratio(X_AXIS)); @@ -3429,7 +3429,7 @@ void MarlinSettings::reset() { // // Input Shaping // - #if HAS_SHAPING + #if HAS_ZV_SHAPING #if ENABLED(INPUT_SHAPING_X) stepper.set_shaping_frequency(X_AXIS, SHAPING_FREQ_X); stepper.set_shaping_damping_ratio(X_AXIS, SHAPING_ZETA_X); @@ -3690,7 +3690,7 @@ void MarlinSettings::reset() { // // Input Shaping // - TERN_(HAS_SHAPING, gcode.M593_report(forReplay)); + TERN_(HAS_ZV_SHAPING, gcode.M593_report(forReplay)); // // Linear Advance diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index f7436e51d5..34a5ca28a3 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -240,7 +240,7 @@ uint32_t Stepper::advance_divisor = 0, bool Stepper::la_active = false; #endif -#if HAS_SHAPING +#if HAS_ZV_SHAPING shaping_time_t ShapingQueue::now = 0; shaping_time_t ShapingQueue::times[shaping_echoes]; shaping_echo_axis_t ShapingQueue::echo_axes[shaping_echoes]; @@ -1494,7 +1494,7 @@ void Stepper::isr() { // Enable ISRs to reduce USART processing latency hal.isr_on(); - TERN_(HAS_SHAPING, shaping_isr()); // Do Shaper stepping, if needed + TERN_(HAS_ZV_SHAPING, shaping_isr()); // Do Shaper stepping, if needed if (!nextMainISR) pulse_phase_isr(); // 0 = Do coordinated axes Stepper pulses @@ -1542,7 +1542,7 @@ void Stepper::isr() { // nextMainISR -= interval; - TERN_(HAS_SHAPING, ShapingQueue::decrement_delays(interval)); + TERN_(HAS_ZV_SHAPING, ShapingQueue::decrement_delays(interval)); TERN_(LIN_ADVANCE, if (nextAdvanceISR != LA_ADV_NEVER) nextAdvanceISR -= interval); TERN_(INTEGRATED_BABYSTEPPING, if (nextBabystepISR != BABYSTEP_NEVER) nextBabystepISR -= interval); @@ -1663,7 +1663,7 @@ void Stepper::pulse_phase_isr() { abort_current_block = false; if (current_block) { discard_current_block(); - #if HAS_SHAPING + #if HAS_ZV_SHAPING ShapingQueue::purge(); #if ENABLED(INPUT_SHAPING_X) shaping_x.delta_error = 0; @@ -1921,7 +1921,7 @@ void Stepper::pulse_phase_isr() { #endif #endif - #if HAS_SHAPING + #if HAS_ZV_SHAPING // record an echo if a step is needed in the primary bresenham const bool x_step = TERN0(INPUT_SHAPING_X, step_needed.x && shaping_x.enabled), y_step = TERN0(INPUT_SHAPING_Y, step_needed.y && shaping_y.enabled); @@ -2035,7 +2035,7 @@ void Stepper::pulse_phase_isr() { } while (--events_to_do); } -#if HAS_SHAPING +#if HAS_ZV_SHAPING void Stepper::shaping_isr() { AxisFlags step_needed{0}; @@ -2087,7 +2087,7 @@ void Stepper::pulse_phase_isr() { } } -#endif // HAS_SHAPING +#endif // HAS_ZV_SHAPING // Calculate timer interval, with all limits applied. hal_timer_t Stepper::calc_timer_interval(uint32_t step_rate) { @@ -3108,7 +3108,7 @@ void Stepper::init() { #endif } -#if HAS_SHAPING +#if HAS_ZV_SHAPING /** * Calculate a fixed point factor to apply to the signal and its echo @@ -3179,7 +3179,7 @@ void Stepper::init() { return -1; } -#endif // HAS_SHAPING +#endif // HAS_ZV_SHAPING /** * Set the stepper positions directly in steps diff --git a/Marlin/src/module/stepper.h b/Marlin/src/module/stepper.h index 704805464c..4adbb01991 100644 --- a/Marlin/src/module/stepper.h +++ b/Marlin/src/module/stepper.h @@ -94,7 +94,7 @@ #endif // Input shaping base time - #if HAS_SHAPING + #if HAS_ZV_SHAPING #define ISR_SHAPING_BASE_CYCLES 180UL #else #define ISR_SHAPING_BASE_CYCLES 0UL @@ -128,7 +128,7 @@ #endif // Input shaping base time - #if HAS_SHAPING + #if HAS_ZV_SHAPING #define ISR_SHAPING_BASE_CYCLES 290UL #else #define ISR_SHAPING_BASE_CYCLES 0UL @@ -217,7 +217,7 @@ #define ISR_LOOP_CYCLES(R) ((ISR_LOOP_BASE_CYCLES + MIN_ISR_LOOP_CYCLES + MIN_STEPPER_PULSE_CYCLES) * ((1UL << R) - 1) + _MAX(MIN_ISR_LOOP_CYCLES, MIN_STEPPER_PULSE_CYCLES)) // Model input shaping as an extra loop call -#define ISR_SHAPING_LOOP_CYCLES(R) (TERN0(HAS_SHAPING, (ISR_LOOP_BASE_CYCLES + TERN0(INPUT_SHAPING_X, ISR_X_STEPPER_CYCLES) + TERN0(INPUT_SHAPING_Y, ISR_Y_STEPPER_CYCLES)) << R)) +#define ISR_SHAPING_LOOP_CYCLES(R) (TERN0(HAS_ZV_SHAPING, (ISR_LOOP_BASE_CYCLES + TERN0(INPUT_SHAPING_X, ISR_X_STEPPER_CYCLES) + TERN0(INPUT_SHAPING_Y, ISR_Y_STEPPER_CYCLES)) << R)) // If linear advance is enabled, then it is handled separately #if ENABLED(LIN_ADVANCE) @@ -315,7 +315,7 @@ constexpr ena_mask_t enable_overlap[] = { //static_assert(!any_enable_overlap(), "There is some overlap."); -#if HAS_SHAPING +#if HAS_ZV_SHAPING #ifdef SHAPING_MAX_STEPRATE constexpr float max_step_rate = SHAPING_MAX_STEPRATE; @@ -463,7 +463,7 @@ constexpr ena_mask_t enable_overlap[] = { int32_t last_block_end_pos = 0; }; -#endif // HAS_SHAPING +#endif // HAS_ZV_SHAPING // // Stepper class definition @@ -577,7 +577,7 @@ class Stepper { static bool bezier_2nd_half; // If Bézier curve has been initialized or not #endif - #if HAS_SHAPING + #if HAS_ZV_SHAPING #if ENABLED(INPUT_SHAPING_X) static ShapeParams shaping_x; #endif @@ -646,7 +646,7 @@ class Stepper { // The stepper block processing ISR phase static hal_timer_t block_phase_isr(); - #if HAS_SHAPING + #if HAS_ZV_SHAPING static void shaping_isr(); #endif @@ -669,7 +669,7 @@ class Stepper { // Check if the given block is busy or not - Must not be called from ISR contexts static bool is_block_busy(const block_t * const block); - #if HAS_SHAPING + #if HAS_ZV_SHAPING // Check whether the stepper is processing any input shaping echoes static bool input_shaping_busy() { const bool was_on = hal.isr_state(); @@ -817,7 +817,7 @@ class Stepper { set_directions(); } - #if HAS_SHAPING + #if HAS_ZV_SHAPING static void set_shaping_damping_ratio(const AxisEnum axis, const_float_t zeta); static float get_shaping_damping_ratio(const AxisEnum axis); static void set_shaping_frequency(const AxisEnum axis, const_float_t freq); diff --git a/ini/features.ini b/ini/features.ini index 11ffca6ba6..4e378a8eaf 100644 --- a/ini/features.ini +++ b/ini/features.ini @@ -189,7 +189,7 @@ HAS_DUPLICATION_MODE = src_filter=+ PHOTO_GCODE = src_filter=+ CONTROLLER_FAN_EDITABLE = src_filter=+ -HAS_SHAPING = src_filter=+ +HAS_ZV_SHAPING = src_filter=+ GCODE_MACROS = src_filter=+ GRADIENT_MIX = src_filter=+ HAS_SAVED_POSITIONS = src_filter=+ + From c37fa3cc9097a9aa7fad5f168e335caabf23278e Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 31 Mar 2023 21:18:37 -0500 Subject: [PATCH 116/225] =?UTF-8?q?=E2=9C=A8=20Fixed-Time=20Motion=20with?= =?UTF-8?q?=20Input=20Shaping=20by=20Ulendo=20(#25394)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ulendo Alex --- Marlin/Configuration_adv.h | 48 +- Marlin/src/MarlinCore.cpp | 7 + Marlin/src/gcode/feature/ft_motion/M493.cpp | 282 ++++++ Marlin/src/gcode/gcode.cpp | 6 +- Marlin/src/gcode/gcode.h | 4 + Marlin/src/module/ft_motion.cpp | 924 ++++++++++++++++++++ Marlin/src/module/ft_motion.h | 170 ++++ Marlin/src/module/ft_types.h | 59 ++ Marlin/src/module/planner.cpp | 22 +- Marlin/src/module/planner.h | 4 + Marlin/src/module/stepper.cpp | 275 +++++- Marlin/src/module/stepper.h | 15 + buildroot/tests/STM32F103RC_btt | 4 +- ini/features.ini | 1 + platformio.ini | 1 + 15 files changed, 1772 insertions(+), 50 deletions(-) create mode 100644 Marlin/src/gcode/feature/ft_motion/M493.cpp create mode 100644 Marlin/src/module/ft_motion.cpp create mode 100644 Marlin/src/module/ft_motion.h create mode 100644 Marlin/src/module/ft_types.h diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 070309d5aa..18e5d9e647 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index 213cbebc26..19aaedf7c6 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -50,6 +50,9 @@ #include "module/settings.h" #include "module/stepper.h" #include "module/temperature.h" +#if ENABLED(FT_MOTION) + #include "module/ft_motion.h" +#endif #include "gcode/gcode.h" #include "gcode/parser.h" @@ -885,8 +888,12 @@ void idle(bool no_stepper_sleep/*=false*/) { // Update the LVGL interface TERN_(HAS_TFT_LVGL_UI, LV_TASK_HANDLER()); + // Manage Fixed-time Motion Control + TERN_(FT_MOTION, fxdTiCtrl.loop()); + IDLE_DONE: TERN_(MARLIN_DEV_MODE, idle_depth--); + return; } diff --git a/Marlin/src/gcode/feature/ft_motion/M493.cpp b/Marlin/src/gcode/feature/ft_motion/M493.cpp new file mode 100644 index 0000000000..31e16a194d --- /dev/null +++ b/Marlin/src/gcode/feature/ft_motion/M493.cpp @@ -0,0 +1,282 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2023 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 . + * + */ + +#include "../../../inc/MarlinConfig.h" + +#if ENABLED(FT_MOTION) + +#include "../../gcode.h" +#include "../../../module/ft_motion.h" + +void say_shaping() { + SERIAL_ECHO_TERNARY(fxdTiCtrl.cfg_mode, "Fixed time controller ", "en", "dis", "abled"); + if (fxdTiCtrl.cfg_mode == ftMotionMode_DISABLED || fxdTiCtrl.cfg_mode == ftMotionMode_ENABLED) { + SERIAL_ECHOLNPGM("."); + return; + } + #if HAS_X_AXIS + SERIAL_ECHOPGM(" with "); + switch (fxdTiCtrl.cfg_mode) { + default: break; + //case ftMotionMode_ULENDO_FBS: SERIAL_ECHOLNPGM("Ulendo FBS."); return; + case ftMotionMode_ZV: SERIAL_ECHOLNPGM("ZV"); break; + case ftMotionMode_ZVD: SERIAL_ECHOLNPGM("ZVD"); break; + case ftMotionMode_EI: SERIAL_ECHOLNPGM("EI"); break; + case ftMotionMode_2HEI: SERIAL_ECHOLNPGM("2 Hump EI"); break; + case ftMotionMode_3HEI: SERIAL_ECHOLNPGM("3 Hump EI"); break; + case ftMotionMode_MZV: SERIAL_ECHOLNPGM("MZV"); break; + //case ftMotionMode_DISCTF: SERIAL_ECHOLNPGM("discrete transfer functions"); break; + } + SERIAL_ECHOLNPGM(" shaping."); + #endif +} + +/** + * M493: Set Fixed-time Motion Control parameters + * + * S Set the motion / shaping mode. Shaping requires an X axis, at the minimum. + * 0: NORMAL + * 1: FIXED-TIME + * 10: ZV + * 11: ZVD + * 12: EI + * 13: 2HEI + * 14: 3HEI + * 15: MZV + * + * P Enable (1) or Disable (0) Linear Advance pressure control + * + * K Set Linear Advance gain + * + * D Set Dynamic Frequency mode + * 0: DISABLED + * 1: Z-based (Requires a Z axis) + * 2: Mass-based (Requires X and E axes) + * + * A Set static/base frequency for the X axis + * F Set frequency scaling for the X axis + * + * B Set static/base frequency for the Y axis + * H Set frequency scaling for the Y axis + */ +void GcodeSuite::M493() { + // Parse 'S' mode parameter. + if (parser.seenval('S')) { + const ftMotionMode_t val = (ftMotionMode_t)parser.value_byte(); + switch (val) { + case ftMotionMode_DISABLED: + case ftMotionMode_ENABLED: + #if HAS_X_AXIS + case ftMotionMode_ZVD: + case ftMotionMode_2HEI: + case ftMotionMode_3HEI: + case ftMotionMode_MZV: + //case ftMotionMode_ULENDO_FBS: + //case ftMotionMode_DISCTF: + fxdTiCtrl.cfg_mode = val; + say_shaping(); + break; + #endif + default: + SERIAL_ECHOLNPGM("?Invalid control mode [M] value."); + return; + } + + switch (val) { + case ftMotionMode_ENABLED: fxdTiCtrl.reset(); break; + #if HAS_X_AXIS + case ftMotionMode_ZV: + case ftMotionMode_ZVD: + case ftMotionMode_EI: + case ftMotionMode_2HEI: + case ftMotionMode_3HEI: + case ftMotionMode_MZV: + fxdTiCtrl.updateShapingN(fxdTiCtrl.cfg_baseFreq[0] OPTARG(HAS_Y_AXIS, fxdTiCtrl.cfg_baseFreq[1])); + fxdTiCtrl.updateShapingA(); + fxdTiCtrl.reset(); + break; + //case ftMotionMode_ULENDO_FBS: + //case ftMotionMode_DISCTF: + #endif + default: break; + } + } + + #if HAS_EXTRUDERS + + // Pressure control (linear advance) parameter. + if (parser.seen('P')) { + const bool val = parser.value_bool(); + fxdTiCtrl.cfg_linearAdvEna = val; + SERIAL_ECHO_TERNARY(val, "Pressure control: Linear Advance ", "en", "dis", "abled.\n"); + } + + // Pressure control (linear advance) gain parameter. + if (parser.seenval('K')) { + const float val = parser.value_float(); + if (val >= 0.0f) { + fxdTiCtrl.cfg_linearAdvK = val; + SERIAL_ECHOPGM("Pressure control: Linear Advance gain set to: "); + SERIAL_ECHO_F(val, 5); + SERIAL_ECHOLNPGM("."); + } + else { // Value out of range. + SERIAL_ECHOLNPGM("Pressure control: Linear Advance gain out of range."); + } + } + + #endif // HAS_EXTRUDERS + + #if HAS_Z_AXIS || HAS_EXTRUDERS + + // Dynamic frequency mode parameter. + if (parser.seenval('D')) { + if (WITHIN(fxdTiCtrl.cfg_mode, 10U, 19U)) { + const dynFreqMode_t val = dynFreqMode_t(parser.value_byte()); + switch (val) { + case dynFreqMode_DISABLED: + fxdTiCtrl.cfg_dynFreqMode = val; + SERIAL_ECHOLNPGM("Dynamic frequency mode disabled."); + break; + #if HAS_Z_AXIS + case dynFreqMode_Z_BASED: + fxdTiCtrl.cfg_dynFreqMode = val; + SERIAL_ECHOLNPGM("Z-based Dynamic Frequency Mode."); + break; + #endif + #if HAS_EXTRUDERS + case dynFreqMode_MASS_BASED: + fxdTiCtrl.cfg_dynFreqMode = val; + SERIAL_ECHOLNPGM("Mass-based Dynamic Frequency Mode."); + break; + #endif + default: + SERIAL_ECHOLNPGM("?Invalid Dynamic Frequency Mode [D] value."); + break; + } + } + else { + SERIAL_ECHOLNPGM("Incompatible shaper for [D] Dynamic Frequency mode."); + } + } + + #endif // HAS_Z_AXIS || HAS_EXTRUDERS + + #if HAS_X_AXIS + + // Parse frequency parameter (X axis). + if (parser.seenval('A')) { + if (WITHIN(fxdTiCtrl.cfg_mode, 10U, 19U)) { + const float val = parser.value_float(); + const bool frequencyInRange = WITHIN(val, FTM_MIN_SHAPE_FREQ, (FTM_FS) / 2); + // TODO: Frequency minimum is dependent on the shaper used; the above check isn't always correct. + if (frequencyInRange) { + fxdTiCtrl.cfg_baseFreq[0] = val; + fxdTiCtrl.updateShapingN(fxdTiCtrl.cfg_baseFreq[0] OPTARG(HAS_Y_AXIS, fxdTiCtrl.cfg_baseFreq[1])); + fxdTiCtrl.reset(); + if (fxdTiCtrl.cfg_dynFreqMode) { SERIAL_ECHOPGM("Compensator base dynamic frequency (X/A axis) set to:"); } + else { SERIAL_ECHOPGM("Compensator static frequency (X/A axis) set to: "); } + SERIAL_ECHO_F( fxdTiCtrl.cfg_baseFreq[0], 2 ); + SERIAL_ECHOLNPGM("."); + } + else { // Frequency out of range. + SERIAL_ECHOLNPGM("Invalid [A] frequency value."); + } + } + else { // Mode doesn't use frequency. + SERIAL_ECHOLNPGM("Incompatible mode for [A] frequency."); + } + } + + #if HAS_Z_AXIS || HAS_EXTRUDERS + // Parse frequency scaling parameter (X axis). + if (parser.seenval('F')) { + const bool modeUsesDynFreq = ( + TERN0(HAS_Z_AXIS, fxdTiCtrl.cfg_dynFreqMode == dynFreqMode_Z_BASED) + || TERN0(HAS_EXTRUDERS, fxdTiCtrl.cfg_dynFreqMode == dynFreqMode_MASS_BASED) + ); + + if (modeUsesDynFreq) { + const float val = parser.value_float(); + fxdTiCtrl.cfg_dynFreqK[0] = val; + SERIAL_ECHOPGM("Frequency scaling (X/A axis) set to: "); + SERIAL_ECHO_F(fxdTiCtrl.cfg_dynFreqK[0], 8); + SERIAL_ECHOLNPGM("."); + } + else { + SERIAL_ECHOLNPGM("Incompatible mode for [F] frequency scaling."); + } + } + #endif // HAS_Z_AXIS || HAS_EXTRUDERS + + #endif // HAS_X_AXIS + + #if HAS_Y_AXIS + + // Parse frequency parameter (Y axis). + if (parser.seenval('B')) { + if (WITHIN(fxdTiCtrl.cfg_mode, 10U, 19U)) { + const float val = parser.value_float(); + const bool frequencyInRange = WITHIN(val, FTM_MIN_SHAPE_FREQ, (FTM_FS) / 2); + if (frequencyInRange) { + fxdTiCtrl.cfg_baseFreq[1] = val; + fxdTiCtrl.updateShapingN(fxdTiCtrl.cfg_baseFreq[0] OPTARG(HAS_Y_AXIS, fxdTiCtrl.cfg_baseFreq[1])); + fxdTiCtrl.reset(); + if (fxdTiCtrl.cfg_dynFreqMode) { SERIAL_ECHOPGM("Compensator base dynamic frequency (Y/B axis) set to:"); } + else { SERIAL_ECHOPGM("Compensator static frequency (Y/B axis) set to: "); } + SERIAL_ECHO_F( fxdTiCtrl.cfg_baseFreq[1], 2 ); + SERIAL_ECHOLNPGM("."); + } + else { // Frequency out of range. + SERIAL_ECHOLNPGM("Invalid frequency [B] value."); + } + } + else { // Mode doesn't use frequency. + SERIAL_ECHOLNPGM("Incompatible mode for [B] frequency."); + } + } + + #if HAS_Z_AXIS || HAS_EXTRUDERS + // Parse frequency scaling parameter (Y axis). + if (parser.seenval('H')) { + const bool modeUsesDynFreq = ( + TERN0(HAS_Z_AXIS, fxdTiCtrl.cfg_dynFreqMode == dynFreqMode_Z_BASED) + || TERN0(HAS_EXTRUDERS, fxdTiCtrl.cfg_dynFreqMode == dynFreqMode_MASS_BASED) + ); + + if (modeUsesDynFreq) { + const float val = parser.value_float(); + fxdTiCtrl.cfg_dynFreqK[1] = val; + SERIAL_ECHOPGM("Frequency scaling (Y/B axis) set to: "); + SERIAL_ECHO_F(val, 8); + SERIAL_ECHOLNPGM("."); + } + else { + SERIAL_ECHOLNPGM("Incompatible mode for [H] frequency scaling."); + } + } + #endif // HAS_Z_AXIS || HAS_EXTRUDERS + + #endif // HAS_Y_AXIS +} + +#endif // FT_MOTION diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index 1752ae8a18..0711d39204 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -895,6 +895,10 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { case 486: M486(); break; // M486: Identify and cancel objects #endif + #if ENABLED(FT_MOTION) + case 493: M493(); break; // M493: Fixed-Time Motion control + #endif + case 500: M500(); break; // M500: Store settings in EEPROM case 501: M501(); break; // M501: Read settings from EEPROM case 502: M502(); break; // M502: Revert to default settings @@ -934,7 +938,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { #endif #if HAS_ZV_SHAPING - case 593: M593(); break; // M593: Set Input Shaping parameters + case 593: M593(); break; // M593: Input Shaping control #endif #if ENABLED(ADVANCED_PAUSE_FEATURE) diff --git a/Marlin/src/gcode/gcode.h b/Marlin/src/gcode/gcode.h index cc3f221a82..8493d7f291 100644 --- a/Marlin/src/gcode/gcode.h +++ b/Marlin/src/gcode/gcode.h @@ -1038,6 +1038,10 @@ private: static void M486(); #endif + #if ENABLED(FT_MOTION) + static void M493(); + #endif + static void M500(); static void M501(); static void M502(); diff --git a/Marlin/src/module/ft_motion.cpp b/Marlin/src/module/ft_motion.cpp new file mode 100644 index 0000000000..dfef961c79 --- /dev/null +++ b/Marlin/src/module/ft_motion.cpp @@ -0,0 +1,924 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2023 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 . + * + */ + +#include "../inc/MarlinConfig.h" + +#if ENABLED(FT_MOTION) + +#include "ft_motion.h" +#include "stepper.h" // Access stepper block queue function and abort status. + +FxdTiCtrl fxdTiCtrl; + +//-----------------------------------------------------------------// +// Variables. +//-----------------------------------------------------------------// + +// Public variables. +ftMotionMode_t FxdTiCtrl::cfg_mode = FTM_DEFAULT_MODE; // Mode / active compensation mode configuration. + +#if HAS_EXTRUDERS + bool FxdTiCtrl::cfg_linearAdvEna = FTM_LINEAR_ADV_DEFAULT_ENA; // Linear advance enable configuration. + float FxdTiCtrl::cfg_linearAdvK = FTM_LINEAR_ADV_DEFAULT_K; // Linear advance gain. +#endif + +dynFreqMode_t FxdTiCtrl::cfg_dynFreqMode = FTM_DEFAULT_DYNFREQ_MODE; // Dynamic frequency mode configuration. +#if !HAS_Z_AXIS + static_assert(FTM_DEFAULT_DYNFREQ_MODE != dynFreqMode_Z_BASED, "dynFreqMode_Z_BASED requires a Z axis."); +#endif +#if !(HAS_X_AXIS && HAS_EXTRUDERS) + static_assert(FTM_DEFAULT_DYNFREQ_MODE != dynFreqMode_MASS_BASED, "dynFreqMode_MASS_BASED requires an X axis and an extruder."); +#endif + +#if HAS_X_AXIS + float FxdTiCtrl::cfg_baseFreq[] = { FTM_SHAPING_DEFAULT_X_FREQ // Base frequency. [Hz] + OPTARG(HAS_Y_AXIS, FTM_SHAPING_DEFAULT_Y_FREQ) }; + float FxdTiCtrl::cfg_dynFreqK[] = { 0.0f OPTARG(HAS_Y_AXIS, 0.0f) }; // Scaling / gain for dynamic frequency. [Hz/mm] or [Hz/g] +#endif + +ft_command_t FxdTiCtrl::stepperCmdBuff[FTM_STEPPERCMD_BUFF_SIZE] = {0U}; // Buffer of stepper commands. +hal_timer_t FxdTiCtrl::stepperCmdBuff_StepRelativeTi[FTM_STEPPERCMD_BUFF_SIZE] = {0U}; // Buffer of the stepper command timing. +uint8_t FxdTiCtrl::stepperCmdBuff_ApplyDir[FTM_STEPPERCMD_DIR_SIZE] = {0U}; // Buffer of whether DIR needs to be updated. +uint32_t FxdTiCtrl::stepperCmdBuff_produceIdx = 0, // Index of next stepper command write to the buffer. + FxdTiCtrl::stepperCmdBuff_consumeIdx = 0; // Index of next stepper command read from the buffer. + +bool FxdTiCtrl::sts_stepperBusy = false; // The stepper buffer has items and is in use. + +// Private variables. +// NOTE: These are sized for Ulendo FBS use. +#if HAS_X_AXIS + float FxdTiCtrl::xd[2 * (FTM_BATCH_SIZE)], // = {0.0f} Storage for fixed-time-based trajectory. + FxdTiCtrl::xm[FTM_BATCH_SIZE]; // = {0.0f} Storage for modified fixed-time-based trajectory. +#endif +#if HAS_Y_AXIS + float FxdTiCtrl::yd[2 * (FTM_BATCH_SIZE)], FxdTiCtrl::ym[FTM_BATCH_SIZE]; +#endif +#if HAS_Z_AXIS + float FxdTiCtrl::zd[2 * (FTM_BATCH_SIZE)], FxdTiCtrl::zm[FTM_BATCH_SIZE]; +#endif +#if HAS_EXTRUDERS + float FxdTiCtrl::ed[2 * (FTM_BATCH_SIZE)], FxdTiCtrl::em[FTM_BATCH_SIZE]; +#endif + +block_t* FxdTiCtrl::current_block_cpy = nullptr; // Pointer to current block being processed. +bool FxdTiCtrl::blockProcRdy = false, // Indicates a block is ready to be processed. + FxdTiCtrl::blockProcRdy_z1 = false, // Storage for the previous indicator. + FxdTiCtrl::blockProcDn = false; // Indicates current block is done being processed. +bool FxdTiCtrl::batchRdy = false; // Indicates a batch of the fixed time trajectory + // has been generated, is now available in the upper - + // half of xd, yd, zd, ed vectors, and is ready to be + // post processed, if applicable, then interpolated. +bool FxdTiCtrl::batchRdyForInterp = false; // Indicates the batch is done being post processed, + // if applicable, and is ready to be converted to step commands. +bool FxdTiCtrl::runoutEna = false; // True if runout of the block hasn't been done and is allowed. + +// Trapezoid data variables. +#if HAS_X_AXIS + float FxdTiCtrl::x_startPosn, // (mm) Start position of block + FxdTiCtrl::x_endPosn_prevBlock = 0.0f, // (mm) Start position of block + FxdTiCtrl::x_Ratio; // (ratio) Axis move ratio of block +#endif +#if HAS_Y_AXIS + float FxdTiCtrl::y_startPosn, + FxdTiCtrl::y_endPosn_prevBlock = 0.0f, + FxdTiCtrl::y_Ratio; +#endif +#if HAS_Z_AXIS + float FxdTiCtrl::z_startPosn, + FxdTiCtrl::z_endPosn_prevBlock = 0.0f, + FxdTiCtrl::z_Ratio; +#endif +#if HAS_EXTRUDERS + float FxdTiCtrl::e_startPosn, + FxdTiCtrl::e_endPosn_prevBlock = 0.0f, + FxdTiCtrl::e_Ratio; +#endif +float FxdTiCtrl::accel_P, // Acceleration prime of block. [mm/sec/sec] + FxdTiCtrl::decel_P, // Deceleration prime of block. [mm/sec/sec] + FxdTiCtrl::F_P, // Feedrate prime of block. [mm/sec] + FxdTiCtrl::f_s, // Starting feedrate of block. [mm/sec] + FxdTiCtrl::s_1e, // Position after acceleration phase of block. + FxdTiCtrl::s_2e; // Position after acceleration and coasting phase of block. + +uint32_t FxdTiCtrl::N1, // Number of data points in the acceleration phase. + FxdTiCtrl::N2, // Number of data points in the coasting phase. + FxdTiCtrl::N3; // Number of data points in the deceleration phase. + +uint32_t FxdTiCtrl::max_intervals; // Total number of data points that will be generated from block. + +// Make vector variables. +uint32_t FxdTiCtrl::makeVector_idx = 0, // Index of fixed time trajectory generation of the overall block. + FxdTiCtrl::makeVector_idx_z1 = 0, // Storage for the previously calculated index above. + FxdTiCtrl::makeVector_batchIdx = FTM_BATCH_SIZE; // Index of fixed time trajectory generation within the batch. + +// Interpolation variables. +#if HAS_X_AXIS + int32_t FxdTiCtrl::x_steps = 0; // Step count accumulator. + stepDirState_t FxdTiCtrl::x_dirState = stepDirState_NOT_SET; // Memory of the currently set step direction of the axis. +#endif +#if HAS_Y_AXIS + int32_t FxdTiCtrl::y_steps = 0; + stepDirState_t FxdTiCtrl::y_dirState = stepDirState_NOT_SET; +#endif +#if HAS_Z_AXIS + int32_t FxdTiCtrl::z_steps = 0; + stepDirState_t FxdTiCtrl::z_dirState = stepDirState_NOT_SET; +#endif +#if HAS_EXTRUDERS + int32_t FxdTiCtrl::e_steps = 0; + stepDirState_t FxdTiCtrl::e_dirState = stepDirState_NOT_SET; +#endif + +uint32_t FxdTiCtrl::interpIdx = 0, // Index of current data point being interpolated. + FxdTiCtrl::interpIdx_z1 = 0; // Storage for the previously calculated index above. +hal_timer_t FxdTiCtrl::nextStepTicks = FTM_MIN_TICKS; // Accumulator for the next step time (in ticks). + +// Shaping variables. +#if HAS_X_AXIS + uint32_t FxdTiCtrl::xy_zi_idx = 0, // Index of storage in the data point delay vectors. + FxdTiCtrl::xy_max_i = 0; // Vector length for the selected shaper. + float FxdTiCtrl::xd_zi[FTM_ZMAX] = { 0.0f }; // Data point delay vector. + float FxdTiCtrl::x_Ai[5]; // Shaping gain vector. + uint32_t FxdTiCtrl::x_Ni[5]; // Shaping time index vector. +#endif +#if HAS_Y_AXIS + float FxdTiCtrl::yd_zi[FTM_ZMAX] = { 0.0f }; + float FxdTiCtrl::y_Ai[5]; + uint32_t FxdTiCtrl::y_Ni[5]; +#endif + +#if HAS_EXTRUDERS + // Linear advance variables. + float FxdTiCtrl::e_raw_z1 = 0.0f; // (ms) Unit delay of raw extruder position. + float FxdTiCtrl::e_advanced_z1 = 0.0f; // (ms) Unit delay of advanced extruder position. +#endif + +//-----------------------------------------------------------------// +// Function definitions. +//-----------------------------------------------------------------// + +// Public functions. + +// Sets controller states to begin processing a block. +void FxdTiCtrl::startBlockProc(block_t * const current_block) { + current_block_cpy = current_block; + blockProcRdy = true; + blockProcDn = false; + runoutEna = true; +} + +// Moves any free data points to the stepper buffer even if a full batch isn't ready. +void FxdTiCtrl::runoutBlock() { + + if (runoutEna && !batchRdy) { // If the window is full already (block intervals was a multiple of + // the batch size), or runout is not enabled, no runout is needed. + // Fill out the trajectory window with the last position calculated. + if (makeVector_batchIdx > FTM_BATCH_SIZE) { + for (uint32_t i = makeVector_batchIdx; i < 2 * (FTM_BATCH_SIZE); i++) { + xd[i] = xd[makeVector_batchIdx - 1]; + TERN_(HAS_Y_AXIS, yd[i] = yd[makeVector_batchIdx - 1]); + TERN_(HAS_Y_AXIS, zd[i] = zd[makeVector_batchIdx - 1]); + TERN_(HAS_EXTRUDERS, ed[i] = ed[makeVector_batchIdx - 1]); + } + } + makeVector_batchIdx = FTM_BATCH_SIZE; + batchRdy = true; + } + runoutEna = false; +} + +// Controller main, to be invoked from non-isr task. +void FxdTiCtrl::loop() { + + if (!cfg_mode) return; + + static bool initd = false; + if (!initd) { init(); initd = true; } + + // Handle block abort with the following sequence: + // 1. Zero out commands in stepper ISR. + // 2. Drain the motion buffer, stop processing until they are emptied. + // 3. Reset all the states / memory. + // 4. Signal ready for new block. + if (stepper.abort_current_block) { + if (sts_stepperBusy) return; // Wait until motion buffers are emptied + reset(); + blockProcDn = true; // Set queueing to look for next block. + runoutEna = false; // Disabling running out this block, since we want to halt the motion. + stepper.abort_current_block = false; // Abort finished. + } + + // Planner processing and block conversion. + if (!blockProcRdy) stepper.fxdTiCtrl_BlockQueueUpdate(); + + if (blockProcRdy) { + if (!blockProcRdy_z1) loadBlockData(current_block_cpy); // One-shot. + while (!blockProcDn && !batchRdy && (makeVector_idx - makeVector_idx_z1 < (FTM_POINTS_PER_LOOP))) + makeVector(); + } + + // FBS / post processing. + if (batchRdy && !batchRdyForInterp) { + + // Call Ulendo FBS here. + + memcpy(xm, &xd[FTM_BATCH_SIZE], sizeof(xm)); + TERN_(HAS_Y_AXIS, memcpy(ym, &yd[FTM_BATCH_SIZE], sizeof(ym))); + + // Done compensating ... + + // Copy the uncompensated vectors. + TERN_(HAS_Z_AXIS, memcpy(zm, &zd[FTM_BATCH_SIZE], sizeof(zm))); + TERN_(HAS_EXTRUDERS, memcpy(em, &ed[FTM_BATCH_SIZE], sizeof(em))); + + // Shift the time series back in the window. + memcpy(xd, &xd[FTM_BATCH_SIZE], sizeof(xd) / 2); + TERN_(HAS_Y_AXIS, memcpy(yd, &yd[FTM_BATCH_SIZE], sizeof(yd) / 2)); + // Disabled by comment as these are uncompensated, the lower half is not used. + //TERN_(HAS_Z_AXIS, memcpy(zd, &zd[FTM_BATCH_SIZE], (sizeof(zd) / 2))); + //TERN_(HAS_EXTRUDERS, memcpy(ed, &ed[FTM_BATCH_SIZE], (sizeof(ed) / 2))); + + // ... data is ready in xm, ym, zm, em. + batchRdyForInterp = true; + + batchRdy = false; // Clear so that makeVector() may resume generating points. + + } // if (batchRdy && !batchRdyForInterp) + + // Interpolation. + while ( batchRdyForInterp + && ( stepperCmdBuffItems() < ((FTM_STEPPERCMD_BUFF_SIZE) - (FTM_STEPS_PER_UNIT_TIME)) ) + && ( (interpIdx - interpIdx_z1) < (FTM_STEPS_PER_LOOP) ) + ) { + convertToSteps(interpIdx); + + if (++interpIdx == FTM_BATCH_SIZE) { + batchRdyForInterp = false; + interpIdx = 0; + } + } + + // Report busy status to planner. + planner.fxdTiCtrl_busy = (sts_stepperBusy || ((!blockProcDn && blockProcRdy) || batchRdy || batchRdyForInterp || runoutEna)); + + blockProcRdy_z1 = blockProcRdy; + makeVector_idx_z1 = makeVector_idx; + interpIdx_z1 = interpIdx; +} + +#if HAS_X_AXIS + + // Refresh the gains used by shaping functions. + // To be called on init or mode or zeta change. + void FxdTiCtrl::updateShapingA(const_float_t zeta/*=FTM_SHAPING_ZETA*/, const_float_t vtol/*=FTM_SHAPING_V_TOL*/) { + + const float K = exp( -zeta * PI / sqrt(1.0f - sq(zeta)) ), + K2 = sq(K); + + switch (cfg_mode) { + + case ftMotionMode_ZV: + xy_max_i = 1U; + x_Ai[0] = 1.0f / (1.0f + K); + x_Ai[1] = x_Ai[0] * K; + break; + + case ftMotionMode_ZVD: + xy_max_i = 2U; + x_Ai[0] = 1.0f / ( 1.0f + 2.0f * K + K2 ); + x_Ai[1] = x_Ai[0] * 2.0f * K; + x_Ai[2] = x_Ai[0] * K2; + break; + + case ftMotionMode_EI: { + xy_max_i = 2U; + x_Ai[0] = 0.25f * (1.0f + vtol); + x_Ai[1] = 0.50f * (1.0f - vtol) * K; + x_Ai[2] = x_Ai[0] * K2; + const float A_adj = 1.0f / (x_Ai[0] + x_Ai[1] + x_Ai[2]); + for (uint32_t i = 0U; i < 3U; i++) { x_Ai[i] *= A_adj; } + } break; + + case ftMotionMode_2HEI: { + xy_max_i = 3U; + const float vtol2 = sq(vtol); + const float X = pow(vtol2 * (sqrt(1.0f - vtol2) + 1.0f), 1.0f / 3.0f); + x_Ai[0] = ( 3.0f * sq(X) + 2.0f * X + 3.0f * vtol2 ) / (16.0f * X); + x_Ai[1] = ( 0.5f - x_Ai[0] ) * K; + x_Ai[2] = x_Ai[1] * K; + x_Ai[3] = x_Ai[0] * cu(K); + const float A_adj = 1.0f / (x_Ai[0] + x_Ai[1] + x_Ai[2] + x_Ai[3]); + for (uint32_t i = 0U; i < 4U; i++) { x_Ai[i] *= A_adj; } + } break; + + case ftMotionMode_3HEI: { + xy_max_i = 4U; + x_Ai[0] = 0.0625f * ( 1.0f + 3.0f * vtol + 2.0f * sqrt( 2.0f * ( vtol + 1.0f ) * vtol ) ); + x_Ai[1] = 0.25f * ( 1.0f - vtol ) * K; + x_Ai[2] = ( 0.5f * ( 1.0f + vtol ) - 2.0f * x_Ai[0] ) * K2; + x_Ai[3] = x_Ai[1] * K2; + x_Ai[4] = x_Ai[0] * sq(K2); + const float A_adj = 1.0f / (x_Ai[0] + x_Ai[1] + x_Ai[2] + x_Ai[3] + x_Ai[4]); + for (uint32_t i = 0U; i < 5U; i++) { x_Ai[i] *= A_adj; } + } break; + + case ftMotionMode_MZV: { + xy_max_i = 2U; + const float B = 1.4142135623730950488016887242097f * K; + x_Ai[0] = 1.0f / (1.0f + B + K2); + x_Ai[1] = x_Ai[0] * B; + x_Ai[2] = x_Ai[0] * K2; + } break; + + default: + for (uint32_t i = 0U; i < 5U; i++) x_Ai[i] = 0.0f; + xy_max_i = 0; + } + #if HAS_Y_AXIS + memcpy(y_Ai, x_Ai, sizeof(x_Ai)); // For now, zeta and vtol are shared across x and y. + #endif + } + + // Refresh the indices used by shaping functions. + // To be called when frequencies change. + void FxdTiCtrl::updateShapingN(const_float_t xf OPTARG(HAS_Y_AXIS, const_float_t yf), const_float_t zeta/*=FTM_SHAPING_ZETA*/) { + + // Protections omitted for DBZ and for index exceeding array length. + + const float df = sqrt(1.0f - sq(zeta)); + + switch (cfg_mode) { + case ftMotionMode_ZV: + x_Ni[1] = round((0.5f / xf / df) * (FTM_FS)); + #if HAS_Y_AXIS + y_Ni[1] = round((0.5f / yf / df) * (FTM_FS)); + #endif + break; + case ftMotionMode_ZVD: + case ftMotionMode_EI: + x_Ni[1] = round((0.5f / xf / df) * (FTM_FS)); + x_Ni[2] = 2 * x_Ni[1]; + #if HAS_Y_AXIS + y_Ni[1] = round((0.5f / yf / df) * (FTM_FS)); + y_Ni[2] = 2 * y_Ni[1]; + #endif + break; + case ftMotionMode_2HEI: + x_Ni[1] = round((0.5f / xf / df) * (FTM_FS)); + x_Ni[2] = 2 * x_Ni[1]; + x_Ni[3] = 3 * x_Ni[1]; + #if HAS_Y_AXIS + y_Ni[1] = round((0.5f / yf / df) * (FTM_FS)); + y_Ni[2] = 2 * y_Ni[1]; + y_Ni[3] = 3 * y_Ni[1]; + #endif + break; + case ftMotionMode_3HEI: + x_Ni[1] = round((0.5f / xf / df) * (FTM_FS)); + x_Ni[2] = 2 * x_Ni[1]; + x_Ni[3] = 3 * x_Ni[1]; + x_Ni[4] = 4 * x_Ni[1]; + #if HAS_Y_AXIS + y_Ni[1] = round((0.5f / yf / df) * (FTM_FS)); + y_Ni[2] = 2 * y_Ni[1]; + y_Ni[3] = 3 * y_Ni[1]; + y_Ni[4] = 4 * y_Ni[1]; + #endif + break; + case ftMotionMode_MZV: + x_Ni[1] = round((0.375f / xf / df) * (FTM_FS)); + x_Ni[2] = 2 * x_Ni[1]; + #if HAS_Y_AXIS + y_Ni[1] = round((0.375f / yf / df) * (FTM_FS)); + y_Ni[2] = 2 * y_Ni[1]; + #endif + break; + default: + for (uint32_t i = 0U; i < 5U; i++) { x_Ni[i] = 0; TERN_(HAS_Y_AXIS, y_Ni[i] = 0); } + } + } + +#endif // HAS_X_AXIS + +// Reset all trajectory processing variables. +void FxdTiCtrl::reset() { + + stepperCmdBuff_produceIdx = stepperCmdBuff_consumeIdx = 0; + + for (uint32_t i = 0U; i < (FTM_BATCH_SIZE); i++) { // Reset trajectory history + TERN_(HAS_X_AXIS, xd[i] = 0.0f); + TERN_(HAS_Y_AXIS, yd[i] = 0.0f); + TERN_(HAS_Z_AXIS, zd[i] = 0.0f); + TERN_(HAS_EXTRUDERS, ed[i] = 0.0f); + } + + blockProcRdy = blockProcRdy_z1 = blockProcDn = false; + batchRdy = batchRdyForInterp = false; + runoutEna = false; + + TERN_(HAS_X_AXIS, x_endPosn_prevBlock = 0.0f); + TERN_(HAS_Y_AXIS, y_endPosn_prevBlock = 0.0f); + TERN_(HAS_Z_AXIS, z_endPosn_prevBlock = 0.0f); + TERN_(HAS_EXTRUDERS, e_endPosn_prevBlock = 0.0f); + + makeVector_idx = makeVector_idx_z1 = 0; + makeVector_batchIdx = FTM_BATCH_SIZE; + + TERN_(HAS_X_AXIS, x_steps = 0); + TERN_(HAS_Y_AXIS, y_steps = 0); + TERN_(HAS_Z_AXIS, z_steps = 0); + TERN_(HAS_EXTRUDERS, e_steps = 0); + interpIdx = interpIdx_z1 = 0; + TERN_(HAS_X_AXIS, x_dirState = stepDirState_NOT_SET); + TERN_(HAS_Y_AXIS, y_dirState = stepDirState_NOT_SET); + TERN_(HAS_Z_AXIS, z_dirState = stepDirState_NOT_SET); + TERN_(HAS_EXTRUDERS, e_dirState = stepDirState_NOT_SET); + nextStepTicks = FTM_MIN_TICKS; + + #if HAS_X_AXIS + for (uint32_t i = 0U; i < (FTM_ZMAX); i++) { xd_zi[i] = 0.0f; TERN_(HAS_Y_AXIS, yd_zi[i] = 0.0f); } + xy_zi_idx = 0; + #endif + + TERN_(HAS_EXTRUDERS, e_raw_z1 = e_advanced_z1 = 0.0f); +} + +// Private functions. +// Auxiliary function to get number of step commands in the buffer. +uint32_t FxdTiCtrl::stepperCmdBuffItems() { + const uint32_t udiff = stepperCmdBuff_produceIdx - stepperCmdBuff_consumeIdx; + return stepperCmdBuff_produceIdx < stepperCmdBuff_consumeIdx ? (FTM_STEPPERCMD_BUFF_SIZE) + udiff : udiff; +} + +// Initializes storage variables before startup. +void FxdTiCtrl::init() { + #if HAS_X_AXIS + updateShapingN(cfg_baseFreq[0] OPTARG(HAS_Y_AXIS, cfg_baseFreq[1])); + updateShapingA(FTM_SHAPING_ZETA, FTM_SHAPING_V_TOL); + #endif + reset(); // Precautionary. +} + +// Loads / converts block data from planner to fixed-time control variables. +void FxdTiCtrl::loadBlockData(block_t * const current_block) { + + const float totalLength = current_block->millimeters, + oneOverLength = 1.0f / totalLength; + + const axis_bits_t direction = current_block->direction_bits; + + #if HAS_X_AXIS + x_startPosn = x_endPosn_prevBlock; + float x_moveDist = current_block->steps.a / planner.settings.axis_steps_per_mm[X_AXIS]; + if (TEST(direction, X_AXIS)) x_moveDist *= -1.0f; + x_Ratio = x_moveDist * oneOverLength; + #endif + + #if HAS_Y_AXIS + y_startPosn = y_endPosn_prevBlock; + float y_moveDist = current_block->steps.b / planner.settings.axis_steps_per_mm[Y_AXIS]; + if (TEST(direction, Y_AXIS)) y_moveDist *= -1.0f; + y_Ratio = y_moveDist * oneOverLength; + #endif + + #if HAS_Z_AXIS + z_startPosn = z_endPosn_prevBlock; + float z_moveDist = current_block->steps.c / planner.settings.axis_steps_per_mm[Z_AXIS]; + if (TEST(direction, Z_AXIS)) z_moveDist *= -1.0f; + z_Ratio = z_moveDist * oneOverLength; + #endif + + #if HAS_EXTRUDERS + e_startPosn = e_endPosn_prevBlock; + float extrusion = current_block->steps.e / planner.settings.axis_steps_per_mm[E_AXIS_N(current_block->extruder)]; + if (TEST(direction, E_AXIS_N(current_block->extruder))) extrusion *= -1.0f; + e_Ratio = extrusion * oneOverLength; + #endif + + const float spm = totalLength / current_block->step_event_count; // (steps/mm) Distance for each step + f_s = spm * current_block->initial_rate; // (steps/s) Start feedrate + const float f_e = spm * current_block->final_rate; // (steps/s) End feedrate + + const float a = current_block->acceleration, // (mm/s^2) Same magnitude for acceleration or deceleration + oneby2a = 1.0f / (2.0f * a), // (s/mm) Time to accelerate or decelerate one mm (i.e., oneby2a * 2 + oneby2d = -oneby2a; // (s/mm) Time to accelerate or decelerate one mm (i.e., oneby2a * 2 + const float fsSqByTwoA = sq(f_s) * oneby2a, // (mm) Distance to accelerate from start speed to nominal speed + feSqByTwoD = sq(f_e) * oneby2d; // (mm) Distance to decelerate from nominal speed to end speed + + float F_n = current_block->nominal_speed; // (mm/s) Speed we hope to achieve, if possible + const float fdiff = feSqByTwoD - fsSqByTwoA, // (mm) Coasting distance if nominal speed is reached + odiff = oneby2a - oneby2d, // (i.e., oneby2a * 2) (mm/s) Change in speed for one second of acceleration + ldiff = totalLength - fdiff; // (mm) Distance to travel if nominal speed is reached + float T2 = (1.0f / F_n) * (ldiff - odiff * sq(F_n)); // (s) Coasting duration after nominal speed reached + if (T2 < 0.0f) { + T2 = 0.0f; + F_n = SQRT(ldiff / odiff); // Clip by intersection if nominal speed can't be reached. + } + + const float T1 = (F_n - f_s) / a, // (s) Accel Time = difference in feedrate over acceleration + T3 = (F_n - f_e) / a; // (s) Decel Time = difference in feedrate over acceleration + + N1 = ceil(T1 * (FTM_FS)); // Accel datapoints based on Hz frequency + N2 = ceil(T2 * (FTM_FS)); // Coast + N3 = ceil(T3 * (FTM_FS)); // Decel + + const float T1_P = N1 * (FTM_TS), // (s) Accel datapoints x timestep resolution + T2_P = N2 * (FTM_TS), // (s) Coast + T3_P = N3 * (FTM_TS); // (s) Decel + + // Calculate the reachable feedrate at the end of the accel phase + // totalLength is the total distance to travel in mm + // f_s is the starting feedrate in mm/s + // f_e is the ending feedrate in mm/s + // T1_P is the time spent accelerating in seconds + // T2_P is the time spent coasting in seconds + // T3_P is the time spent decelerating in seconds + // f_s * T1_P is the distance traveled during the accel phase + // f_e * T3_P is the distance traveled during the decel phase + // + F_P = (2.0f * totalLength - f_s * T1_P - f_e * T3_P) / (T1_P + 2.0f * T2_P + T3_P); // (mm/s) Feedrate at the end of the accel phase + + // Calculate the acceleration and deceleration rates + accel_P = N1 ? ((F_P - f_s) / T1_P) : 0.0f; + + decel_P = (f_e - F_P) / T3_P; + + // Calculate the distance traveled during the accel phase + s_1e = f_s * T1_P + 0.5f * accel_P * sq(T1_P); + + // Calculate the distance traveled during the decel phase + s_2e = s_1e + F_P * T2_P; + + // One less than (Accel + Coasting + Decel) datapoints + max_intervals = N1 + N2 + N3 - 1U; + + TERN_(HAS_X_AXIS, x_endPosn_prevBlock += x_moveDist); + TERN_(HAS_Y_AXIS, y_endPosn_prevBlock += y_moveDist); + TERN_(HAS_Z_AXIS, z_endPosn_prevBlock += z_moveDist); + TERN_(HAS_EXTRUDERS, e_endPosn_prevBlock += extrusion); +} + +// Generate data points of the trajectory. +void FxdTiCtrl::makeVector() { + float accel_k = 0.0f; // (mm/s^2) Acceleration K factor + float tau = (makeVector_idx + 1) * (FTM_TS); // (s) Time since start of block + float dist = 0.0f; // (mm) Distance traveled + + if (makeVector_idx < N1) { + // Acceleration phase + dist = (f_s * tau) + (0.5f * accel_P * sq(tau)); // (mm) Distance traveled for acceleration phase + accel_k = accel_P; // (mm/s^2) Acceleration K factor from Accel phase + } + else if (makeVector_idx >= N1 && makeVector_idx < (N1 + N2)) { + // Coasting phase + dist = s_1e + F_P * (tau - N1 * (FTM_TS)); // (mm) Distance traveled for coasting phase + //accel_k = 0.0f; + } + else { + // Deceleration phase + const float tau_ = tau - (N1 + N2) * (FTM_TS); // (s) Time since start of decel phase + dist = s_2e + F_P * tau_ + 0.5f * decel_P * sq(tau_); // (mm) Distance traveled for deceleration phase + accel_k = decel_P; // (mm/s^2) Acceleration K factor from Decel phase + } + + TERN_(HAS_X_AXIS, xd[makeVector_batchIdx] = x_startPosn + x_Ratio * dist); // (mm) X position for this datapoint + TERN_(HAS_Y_AXIS, yd[makeVector_batchIdx] = y_startPosn + y_Ratio * dist); // (mm) Y + TERN_(HAS_Z_AXIS, zd[makeVector_batchIdx] = z_startPosn + z_Ratio * dist); // (mm) Z + + #if HAS_EXTRUDERS + const float new_raw_z1 = e_startPosn + e_Ratio * dist; + if (cfg_linearAdvEna) { + float dedt_adj = (new_raw_z1 - e_raw_z1) * (FTM_FS); + if (e_Ratio > 0.0f) dedt_adj += accel_k * cfg_linearAdvK; + + e_advanced_z1 += dedt_adj * (FTM_TS); + ed[makeVector_batchIdx] = e_advanced_z1; + + e_raw_z1 = new_raw_z1; + } + else { + ed[makeVector_batchIdx] = new_raw_z1; + // Alternatively: coordArray_e[makeVector_batchIdx] = e_startDist + extrusion / (N1 + N2 + N3); + } + #endif + + // Update shaping parameters if needed. + #if HAS_Z_AXIS + static float zd_z1 = 0.0f; + #endif + switch (cfg_dynFreqMode) { + + #if HAS_Z_AXIS + case dynFreqMode_Z_BASED: + if (zd[makeVector_batchIdx] != zd_z1) { // Only update if Z changed. + const float xf = cfg_baseFreq[0] + cfg_dynFreqK[0] * zd[makeVector_batchIdx], + yf = cfg_baseFreq[1] + cfg_dynFreqK[1] * zd[makeVector_batchIdx]; + updateShapingN(_MAX(xf, FTM_MIN_SHAPE_FREQ), _MAX(yf, FTM_MIN_SHAPE_FREQ)); + zd_z1 = zd[makeVector_batchIdx]; + } + break; + #endif + + #if HAS_X_AXIS && HAS_EXTRUDERS + case dynFreqMode_MASS_BASED: + // Update constantly. The optimization done for Z value makes + // less sense for E, as E is expected to constantly change. + updateShapingN( cfg_baseFreq[0] + cfg_dynFreqK[0] * ed[makeVector_batchIdx] + OPTARG(HAS_Y_AXIS, cfg_baseFreq[1] + cfg_dynFreqK[1] * ed[makeVector_batchIdx]) ); + break; + #endif + + default: break; + } + + // Apply shaping if in mode. + #if HAS_X_AXIS + if (WITHIN(cfg_mode, 10U, 19U)) { + xd_zi[xy_zi_idx] = xd[makeVector_batchIdx]; + xd[makeVector_batchIdx] *= x_Ai[0]; + #if HAS_Y_AXIS + yd_zi[xy_zi_idx] = yd[makeVector_batchIdx]; + yd[makeVector_batchIdx] *= y_Ai[0]; + #endif + for (uint32_t i = 1U; i <= xy_max_i; i++) { + const uint32_t udiffx = xy_zi_idx - x_Ni[i]; + xd[makeVector_batchIdx] += x_Ai[i] * xd_zi[x_Ni[i] > xy_zi_idx ? (FTM_ZMAX) + udiffx : udiffx]; + #if HAS_Y_AXIS + const uint32_t udiffy = xy_zi_idx - y_Ni[i]; + yd[makeVector_batchIdx] += y_Ai[i] * yd_zi[y_Ni[i] > xy_zi_idx ? (FTM_ZMAX) + udiffy : udiffy]; + #endif + } + if (++xy_zi_idx == (FTM_ZMAX)) xy_zi_idx = 0; + } + #endif + + // Filled up the queue with regular and shaped steps + if (++makeVector_batchIdx == 2 * (FTM_BATCH_SIZE)) { + makeVector_batchIdx = FTM_BATCH_SIZE; + batchRdy = true; + } + + if (makeVector_idx == max_intervals) { + blockProcDn = true; + blockProcRdy = false; + makeVector_idx = 0; + } + else + makeVector_idx++; +} + +// Interpolates single data point to stepper commands. +void FxdTiCtrl::convertToSteps(const uint32_t idx) { + #if HAS_X_AXIS + int32_t x_err_P = 0; + #endif + #if HAS_Y_AXIS + int32_t y_err_P = 0; + #endif + #if HAS_Z_AXIS + int32_t z_err_P = 0; + #endif + #if HAS_EXTRUDERS + int32_t e_err_P = 0; + #endif + + //#define STEPS_ROUNDING + #if ENABLED(STEPS_ROUNDING) + #if HAS_X_AXIS + const float x_steps_tar = xm[idx] * planner.settings.axis_steps_per_mm[X_AXIS] + (xm[idx] < 0.0f ? -0.5f : 0.5f); // May be eliminated if guaranteed positive. + const int32_t x_delta = int32_t(x_steps_tar) - x_steps; + #endif + #if HAS_Y_AXIS + const float y_steps_tar = ym[idx] * planner.settings.axis_steps_per_mm[Y_AXIS] + (ym[idx] < 0.0f ? -0.5f : 0.5f); + const int32_t y_delta = int32_t(y_steps_tar) - y_steps; + #endif + #if HAS_Z_AXIS + const float z_steps_tar = zm[idx] * planner.settings.axis_steps_per_mm[Z_AXIS] + (zm[idx] < 0.0f ? -0.5f : 0.5f); + const int32_t z_delta = int32_t(z_steps_tar) - z_steps; + #endif + #if HAS_EXTRUDERS + const float e_steps_tar = em[idx] * planner.settings.axis_steps_per_mm[E_AXIS] + (em[idx] < 0.0f ? -0.5f : 0.5f); + const int32_t e_delta = int32_t(e_steps_tar) - e_steps; + #endif + #else + #if HAS_X_AXIS + const int32_t x_delta = int32_t(xm[idx] * planner.settings.axis_steps_per_mm[X_AXIS]) - x_steps; + #endif + #if HAS_Y_AXIS + const int32_t y_delta = int32_t(ym[idx] * planner.settings.axis_steps_per_mm[Y_AXIS]) - y_steps; + #endif + #if HAS_Z_AXIS + const int32_t z_delta = int32_t(zm[idx] * planner.settings.axis_steps_per_mm[Z_AXIS]) - z_steps; + #endif + #if HAS_EXTRUDERS + const int32_t e_delta = int32_t(em[idx] * planner.settings.axis_steps_per_mm[E_AXIS]) - e_steps; + #endif + #endif + + bool any_dirChange = (false + || TERN0(HAS_X_AXIS, (x_delta > 0 && x_dirState != stepDirState_POS) || (x_delta < 0 && x_dirState != stepDirState_NEG)) + || TERN0(HAS_Y_AXIS, (y_delta > 0 && y_dirState != stepDirState_POS) || (y_delta < 0 && y_dirState != stepDirState_NEG)) + || TERN0(HAS_Z_AXIS, (z_delta > 0 && z_dirState != stepDirState_POS) || (z_delta < 0 && z_dirState != stepDirState_NEG)) + || TERN0(HAS_EXTRUDERS, (e_delta > 0 && e_dirState != stepDirState_POS) || (e_delta < 0 && e_dirState != stepDirState_NEG)) + ); + + for (uint32_t i = 0U; i < (FTM_STEPS_PER_UNIT_TIME); i++) { + + // TODO: (?) Since the *delta variables will not change, + // the comparison may be done once before iterating at + // expense of storage and lines of code. + + bool anyStep = false; + + stepperCmdBuff[stepperCmdBuff_produceIdx] = 0; + + // Commands are written in the format: + // |X_step|X_direction|Y_step|Y_direction|Z_step|Z_direction|E_step|E_direction| + #if HAS_X_AXIS + if (x_delta >= 0) { + if ((x_err_P + x_delta) < (FTM_CTS_COMPARE_VAL)) { + x_err_P += x_delta; + } + else { + x_steps++; + stepperCmdBuff[stepperCmdBuff_produceIdx] |= _BV(FT_BIT_DIR_X) | _BV(FT_BIT_STEP_X); + x_err_P += x_delta - (FTM_STEPS_PER_UNIT_TIME); + anyStep = true; + } + } + else { + if ((x_err_P + x_delta) > -(FTM_CTS_COMPARE_VAL)) { + x_err_P += x_delta; + } + else { + x_steps--; + stepperCmdBuff[stepperCmdBuff_produceIdx] |= _BV(FT_BIT_STEP_X); + x_err_P += x_delta + (FTM_STEPS_PER_UNIT_TIME); + anyStep = true; + } + } + #endif // HAS_X_AXIS + + #if HAS_Y_AXIS + if (y_delta >= 0) { + if ((y_err_P + y_delta) < (FTM_CTS_COMPARE_VAL)) { + y_err_P += y_delta; + } + else { + y_steps++; + stepperCmdBuff[stepperCmdBuff_produceIdx] |= _BV(FT_BIT_DIR_Y) | _BV(FT_BIT_STEP_Y); + y_err_P += y_delta - (FTM_STEPS_PER_UNIT_TIME); + anyStep = true; + } + } + else { + if ((y_err_P + y_delta) > -(FTM_CTS_COMPARE_VAL)) { + y_err_P += y_delta; + } + else { + y_steps--; + stepperCmdBuff[stepperCmdBuff_produceIdx] |= _BV(FT_BIT_STEP_Y); + y_err_P += y_delta + (FTM_STEPS_PER_UNIT_TIME); + anyStep = true; + } + } + #endif // HAS_Y_AXIS + + #if HAS_Z_AXIS + if (z_delta >= 0) { + if ((z_err_P + z_delta) < (FTM_CTS_COMPARE_VAL)) { + z_err_P += z_delta; + } + else { + z_steps++; + stepperCmdBuff[stepperCmdBuff_produceIdx] |= _BV(FT_BIT_DIR_Z) | _BV(FT_BIT_STEP_Z); + z_err_P += z_delta - (FTM_STEPS_PER_UNIT_TIME); + anyStep = true; + } + } + else { + if ((z_err_P + z_delta) > -(FTM_CTS_COMPARE_VAL)) { + z_err_P += z_delta; + } + else { + z_steps--; + stepperCmdBuff[stepperCmdBuff_produceIdx] |= _BV(FT_BIT_STEP_Z); + z_err_P += z_delta + (FTM_STEPS_PER_UNIT_TIME); + anyStep = true; + } + } + #endif // HAS_Z_AXIS + + #if HAS_EXTRUDERS + if (e_delta >= 0) { + if ((e_err_P + e_delta) < (FTM_CTS_COMPARE_VAL)) { + e_err_P += e_delta; + } + else { + e_steps++; + stepperCmdBuff[stepperCmdBuff_produceIdx] |= _BV(FT_BIT_DIR_E) | _BV(FT_BIT_STEP_E); + e_err_P += e_delta - (FTM_STEPS_PER_UNIT_TIME); + anyStep = true; + } + } + else { + if ((e_err_P + e_delta) > -(FTM_CTS_COMPARE_VAL)) { + e_err_P += e_delta; + } + else { + e_steps--; + stepperCmdBuff[stepperCmdBuff_produceIdx] |= _BV(FT_BIT_STEP_E); + e_err_P += e_delta + (FTM_STEPS_PER_UNIT_TIME); + anyStep = true; + } + } + #endif // HAS_EXTRUDERS + + if (!anyStep) { + nextStepTicks += (FTM_MIN_TICKS); + } + else { + stepperCmdBuff_StepRelativeTi[stepperCmdBuff_produceIdx] = nextStepTicks; + + const uint8_t dir_index = stepperCmdBuff_produceIdx >> 3, + dir_bit = stepperCmdBuff_produceIdx & 0x7; + if (any_dirChange) { + SBI(stepperCmdBuff_ApplyDir[dir_index], dir_bit); + #if HAS_X_AXIS + if (x_delta > 0) { + stepperCmdBuff[stepperCmdBuff_produceIdx] |= _BV(FT_BIT_DIR_X); + x_dirState = stepDirState_POS; + } + else { + x_dirState = stepDirState_NEG; + } + #endif + + #if HAS_Y_AXIS + if (y_delta > 0) { + stepperCmdBuff[stepperCmdBuff_produceIdx] |= _BV(FT_BIT_DIR_Y); + y_dirState = stepDirState_POS; + } + else { + y_dirState = stepDirState_NEG; + } + #endif + + #if HAS_Z_AXIS + if (z_delta > 0) { + stepperCmdBuff[stepperCmdBuff_produceIdx] |= _BV(FT_BIT_DIR_Z); + z_dirState = stepDirState_POS; + } + else { + z_dirState = stepDirState_NEG; + } + #endif + + #if HAS_EXTRUDERS + if (e_delta > 0) { + stepperCmdBuff[stepperCmdBuff_produceIdx] |= _BV(FT_BIT_DIR_E); + e_dirState = stepDirState_POS; + } + else { + e_dirState = stepDirState_NEG; + } + #endif + + any_dirChange = false; + } + else { // ...no direction change. + CBI(stepperCmdBuff_ApplyDir[dir_index], dir_bit); + } + + if (stepperCmdBuff_produceIdx == (FTM_STEPPERCMD_BUFF_SIZE) - 1) { + stepperCmdBuff_produceIdx = 0; + } + else { + stepperCmdBuff_produceIdx++; + } + + nextStepTicks = FTM_MIN_TICKS; + } + } // FTM_STEPS_PER_UNIT_TIME loop +} + +#endif // FT_MOTION diff --git a/Marlin/src/module/ft_motion.h b/Marlin/src/module/ft_motion.h new file mode 100644 index 0000000000..2794608bf9 --- /dev/null +++ b/Marlin/src/module/ft_motion.h @@ -0,0 +1,170 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2023 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 + +#include "../inc/MarlinConfigPre.h" // Access the top level configurations. +#include "../module/planner.h" // Access block type from planner. + +#include "ft_types.h" + +#define FTM_STEPPERCMD_DIR_SIZE ((FTM_STEPPERCMD_BUFF_SIZE + 7) / 8) + +class FxdTiCtrl { + + public: + + // Public variables + static ftMotionMode_t cfg_mode; // Mode / active compensation mode configuration. + static bool cfg_linearAdvEna; // Linear advance enable configuration. + static float cfg_linearAdvK; // Linear advance gain. + static dynFreqMode_t cfg_dynFreqMode; // Dynamic frequency mode configuration. + + #if HAS_X_AXIS + static float cfg_baseFreq[1 + ENABLED(HAS_Y_AXIS)]; // Base frequency. [Hz] + static float cfg_dynFreqK[1 + ENABLED(HAS_Y_AXIS)]; // Scaling / gain for dynamic frequency. [Hz/mm] or [Hz/g] + #endif + + static uint8_t stepperCmdBuff[FTM_STEPPERCMD_BUFF_SIZE]; // Buffer of stepper commands. + static hal_timer_t stepperCmdBuff_StepRelativeTi[FTM_STEPPERCMD_BUFF_SIZE]; // Buffer of the stepper command timing. + static uint8_t stepperCmdBuff_ApplyDir[FTM_STEPPERCMD_DIR_SIZE]; // Buffer of whether DIR needs to be updated. + static uint32_t stepperCmdBuff_produceIdx, // Index of next stepper command write to the buffer. + stepperCmdBuff_consumeIdx; // Index of next stepper command read from the buffer. + + static bool sts_stepperBusy; // The stepper buffer has items and is in use. + + + // Public methods + static void startBlockProc(block_t * const current_block); // Set controller states to begin processing a block. + static bool getBlockProcDn() { return blockProcDn; } // Return true if the controller no longer needs the current block. + static void runoutBlock(); // Move any free data points to the stepper buffer even if a full batch isn't ready. + static void loop(); // Controller main, to be invoked from non-isr task. + + + #if HAS_X_AXIS + // Refresh the gains used by shaping functions. + // To be called on init or mode or zeta change. + static void updateShapingA(const_float_t zeta=FTM_SHAPING_ZETA, const_float_t vtol=FTM_SHAPING_V_TOL); + + // Refresh the indices used by shaping functions. + // To be called when frequencies change. + static void updateShapingN(const_float_t xf OPTARG(HAS_Y_AXIS, const_float_t yf), const_float_t zeta=FTM_SHAPING_ZETA); + #endif + + static void reset(); // Resets all states of the fixed time conversion to defaults. + + private: + + #if HAS_X_AXIS + static float xd[2 * (FTM_BATCH_SIZE)], xm[FTM_BATCH_SIZE]; + #endif + #if HAS_Y_AXIS + static float yd[2 * (FTM_BATCH_SIZE)], ym[FTM_BATCH_SIZE]; + #endif + #if HAS_Z_AXIS + static float zd[2 * (FTM_BATCH_SIZE)], zm[FTM_BATCH_SIZE]; + #endif + #if HAS_EXTRUDERS + static float ed[2 * (FTM_BATCH_SIZE)], em[FTM_BATCH_SIZE]; + #endif + + static block_t *current_block_cpy; + static bool blockProcRdy, blockProcRdy_z1, blockProcDn; + static bool batchRdy, batchRdyForInterp; + static bool runoutEna; + + // Trapezoid data variables. + #if HAS_X_AXIS + static float x_startPosn, x_endPosn_prevBlock, x_Ratio; + #endif + #if HAS_Y_AXIS + static float y_startPosn, y_endPosn_prevBlock, y_Ratio; + #endif + #if HAS_Z_AXIS + static float z_startPosn, z_endPosn_prevBlock, z_Ratio; + #endif + #if HAS_EXTRUDERS + static float e_startPosn, e_endPosn_prevBlock, e_Ratio; + #endif + static float accel_P, decel_P, + F_P, + f_s, + s_1e, + s_2e; + + static uint32_t N1, N2, N3; + static uint32_t max_intervals; + + // Make vector variables. + static uint32_t makeVector_idx, + makeVector_idx_z1, + makeVector_batchIdx; + + // Interpolation variables. + static uint32_t interpIdx, + interpIdx_z1; + #if HAS_X_AXIS + static int32_t x_steps; + static stepDirState_t x_dirState; + #endif + #if HAS_Y_AXIS + static int32_t y_steps; + static stepDirState_t y_dirState; + #endif + #if HAS_Z_AXIS + static int32_t z_steps; + static stepDirState_t z_dirState; + #endif + #if HAS_EXTRUDERS + static int32_t e_steps; + static stepDirState_t e_dirState; + #endif + + static hal_timer_t nextStepTicks; + + // Shaping variables. + #if HAS_X_AXIS + static uint32_t xy_zi_idx, xy_max_i; + static float xd_zi[FTM_ZMAX]; + static float x_Ai[5]; + static uint32_t x_Ni[5]; + #endif + #if HAS_Y_AXIS + static float yd_zi[FTM_ZMAX]; + static float y_Ai[5]; + static uint32_t y_Ni[5]; + #endif + + // Linear advance variables. + #if HAS_EXTRUDERS + static float e_raw_z1, e_advanced_z1; + #endif + + // Private methods + static uint32_t stepperCmdBuffItems(); + static void init(); + static void loadBlockData(block_t * const current_block); + static void makeVector(); + static void convertToSteps(const uint32_t idx); + +}; // class fxdTiCtrl + +extern FxdTiCtrl fxdTiCtrl; diff --git a/Marlin/src/module/ft_types.h b/Marlin/src/module/ft_types.h new file mode 100644 index 0000000000..613e177a39 --- /dev/null +++ b/Marlin/src/module/ft_types.h @@ -0,0 +1,59 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2023 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 + +#include "../core/types.h" + +typedef enum FXDTICtrlMode : uint8_t { + ftMotionMode_DISABLED = 0U, + ftMotionMode_ENABLED = 1U, + ftMotionMode_ULENDO_FBS = 2U, + ftMotionMode_ZV = 10U, + ftMotionMode_ZVD = 11U, + ftMotionMode_EI = 12U, + ftMotionMode_2HEI = 13U, + ftMotionMode_3HEI = 14U, + ftMotionMode_MZV = 15U, + ftMotionMode_DISCTF = 20U +} ftMotionMode_t; + +enum dynFreqMode_t : uint8_t { + dynFreqMode_DISABLED = 0U, + dynFreqMode_Z_BASED = 1U, + dynFreqMode_MASS_BASED = 2U +}; + +enum stepDirState_t { + stepDirState_NOT_SET = 0U, + stepDirState_POS = 1U, + stepDirState_NEG = 2U +}; + +enum { + FT_BIT_DIR_E, FT_BIT_STEP_E, + FT_BIT_DIR_Z, FT_BIT_STEP_Z, + FT_BIT_DIR_Y, FT_BIT_STEP_Y, + FT_BIT_DIR_X, FT_BIT_STEP_X, + FT_BIT_COUNT +}; + +typedef bits_t(FT_BIT_COUNT) ft_command_t; diff --git a/Marlin/src/module/planner.cpp b/Marlin/src/module/planner.cpp index 552d212e2e..dadb22fbde 100644 --- a/Marlin/src/module/planner.cpp +++ b/Marlin/src/module/planner.cpp @@ -69,6 +69,9 @@ #include "stepper.h" #include "motion.h" #include "temperature.h" +#if ENABLED(FT_MOTION) + #include "ft_motion.h" +#endif #include "../lcd/marlinui.h" #include "../gcode/parser.h" @@ -112,7 +115,8 @@ // Delay for delivery of first block to the stepper ISR, if the queue contains 2 or // fewer movements. The delay is measured in milliseconds, and must be less than 250ms -#define BLOCK_DELAY_FOR_1ST_MOVE 100 +#define BLOCK_DELAY_NONE 0U +#define BLOCK_DELAY_FOR_1ST_MOVE 100U Planner planner; @@ -127,7 +131,7 @@ volatile uint8_t Planner::block_buffer_head, // Index of the next block to be Planner::block_buffer_planned, // Index of the optimally planned block Planner::block_buffer_tail; // Index of the busy block, if any uint16_t Planner::cleaning_buffer_counter; // A counter to disable queuing of blocks -uint8_t Planner::delay_before_delivering; // This counter delays delivery of blocks when queue becomes empty to allow the opportunity of merging blocks +uint8_t Planner::delay_before_delivering; // Delay block delivery so initial blocks in an empty queue may merge planner_settings_t Planner::settings; // Initialized by settings.load() @@ -225,6 +229,10 @@ float Planner::previous_nominal_speed; int32_t Planner::xy_freq_min_interval_us = LROUND(1000000.0f / (XY_FREQUENCY_LIMIT)); #endif +#if ENABLED(FT_MOTION) + bool Planner::fxdTiCtrl_busy = false; +#endif + #if ENABLED(LIN_ADVANCE) float Planner::extruder_advance_K[DISTINCT_E]; // Initialized by settings.load() #endif @@ -1683,7 +1691,8 @@ void Planner::quick_stop() { // Restart the block delay for the first movement - As the queue was // forced to empty, there's no risk the ISR will touch this. - delay_before_delivering = BLOCK_DELAY_FOR_1ST_MOVE; + + delay_before_delivering = TERN_(FT_MOTION, fxdTiCtrl.cfg_mode ? BLOCK_DELAY_NONE :) BLOCK_DELAY_FOR_1ST_MOVE; TERN_(HAS_WIRED_LCD, clear_block_buffer_runtime()); // Clear the accumulated runtime @@ -1729,6 +1738,7 @@ bool Planner::busy() { return (has_blocks_queued() || cleaning_buffer_counter || TERN0(EXTERNAL_CLOSED_LOOP_CONTROLLER, CLOSED_LOOP_WAITING()) || TERN0(HAS_ZV_SHAPING, stepper.input_shaping_busy()) + || TERN0(FT_MOTION, fxdTiCtrl_busy) ); } @@ -1841,7 +1851,7 @@ bool Planner::_buffer_steps(const xyze_long_t &target // As there are no queued movements, the Stepper ISR will not touch this // variable, so there is no risk setting this here (but it MUST be done // before the following line!!) - delay_before_delivering = BLOCK_DELAY_FOR_1ST_MOVE; + delay_before_delivering = TERN_(FT_MOTION, fxdTiCtrl.cfg_mode ? BLOCK_DELAY_NONE :) BLOCK_DELAY_FOR_1ST_MOVE; } // Move buffer head @@ -2945,7 +2955,7 @@ void Planner::buffer_sync_block(const BlockFlagBit sync_flag/*=BLOCK_BIT_SYNC_PO // As there are no queued movements, the Stepper ISR will not touch this // variable, so there is no risk setting this here (but it MUST be done // before the following line!!) - delay_before_delivering = BLOCK_DELAY_FOR_1ST_MOVE; + delay_before_delivering = TERN_(FT_MOTION, fxdTiCtrl.cfg_mode ? BLOCK_DELAY_NONE :) BLOCK_DELAY_FOR_1ST_MOVE; } block_buffer_head = next_buffer_head; @@ -3243,7 +3253,7 @@ bool Planner::buffer_line(const xyze_pos_t &cart, const_feedRate_t fr_mm_s // As there are no queued movements, the Stepper ISR will not touch this // variable, so there is no risk setting this here (but it MUST be done // before the following line!!) - delay_before_delivering = BLOCK_DELAY_FOR_1ST_MOVE; + delay_before_delivering = TERN_(FT_MOTION, fxdTiCtrl.cfg_mode ? BLOCK_DELAY_NONE :) BLOCK_DELAY_FOR_1ST_MOVE; } // Move buffer head diff --git a/Marlin/src/module/planner.h b/Marlin/src/module/planner.h index ccf6ba08d3..e2d1d6739c 100644 --- a/Marlin/src/module/planner.h +++ b/Marlin/src/module/planner.h @@ -512,6 +512,10 @@ class Planner { } #endif + #if ENABLED(FT_MOTION) + static bool fxdTiCtrl_busy; + #endif + private: /** diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index 34a5ca28a3..1062a778d8 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -91,6 +91,10 @@ Stepper stepper; // Singleton #include "planner.h" #include "motion.h" +#if ENABLED(FT_MOTION) + #include "ft_motion.h" +#endif + #include "../lcd/marlinui.h" #include "../gcode/queue.h" #include "../sd/cardreader.h" @@ -1488,63 +1492,133 @@ void Stepper::isr() { // Limit the amount of iterations uint8_t max_loops = 10; + #if ENABLED(FT_MOTION) + static bool fxdTiCtrl_stepCmdRdy = false; // Indicates a step command was loaded from the + // buffers and is ready to be output. + static bool fxdTiCtrl_applyDir = false; // Indicates the DIR output should be set. + static ft_command_t fxdTiCtrl_stepCmd = 0U; // Storage for the step command to be output. + static uint32_t fxdTiCtrl_nextAuxISR = 0U; // Storage for the next ISR of the auxilliary tasks. + #endif + // We need this variable here to be able to use it in the following loop hal_timer_t min_ticks; do { // Enable ISRs to reduce USART processing latency hal.isr_on(); - TERN_(HAS_ZV_SHAPING, shaping_isr()); // Do Shaper stepping, if needed + hal_timer_t interval; - if (!nextMainISR) pulse_phase_isr(); // 0 = Do coordinated axes Stepper pulses + #if ENABLED(FT_MOTION) - #if ENABLED(LIN_ADVANCE) - if (!nextAdvanceISR) { // 0 = Do Linear Advance E Stepper pulses - advance_isr(); - nextAdvanceISR = la_interval; + // NOTE STEPPER_TIMER_RATE is equal to 2000000, not what VSCode shows + const bool using_fxtictrl = fxdTiCtrl.cfg_mode; + if (using_fxtictrl) { + if (!nextMainISR) { + if (abort_current_block) { + fxdTiCtrl_stepCmdRdy = false; // If a command was ready, cancel it. + fxdTiCtrl.sts_stepperBusy = false; // Set busy false to allow a reset. + nextMainISR = 0.01f * (STEPPER_TIMER_RATE); // Come back in 10 msec. + } + else { // !(abort_current_block) + if (fxdTiCtrl_stepCmdRdy) { + fxdTiCtrl_stepper(fxdTiCtrl_applyDir, fxdTiCtrl_stepCmd); + fxdTiCtrl_stepCmdRdy = false; + } + // Check if there is data in the buffers. + if (fxdTiCtrl.stepperCmdBuff_produceIdx != fxdTiCtrl.stepperCmdBuff_consumeIdx) { + + fxdTiCtrl.sts_stepperBusy = true; + + // "Pop" one command from the command buffer. + fxdTiCtrl_stepCmd = fxdTiCtrl.stepperCmdBuff[fxdTiCtrl.stepperCmdBuff_consumeIdx]; + const uint8_t dir_index = fxdTiCtrl.stepperCmdBuff_consumeIdx >> 3, + dir_bit = fxdTiCtrl.stepperCmdBuff_consumeIdx & 0x7; + fxdTiCtrl_applyDir = TEST(fxdTiCtrl.stepperCmdBuff_ApplyDir[dir_index], dir_bit); + nextMainISR = fxdTiCtrl.stepperCmdBuff_StepRelativeTi[fxdTiCtrl.stepperCmdBuff_consumeIdx]; + fxdTiCtrl_stepCmdRdy = true; + + if (++fxdTiCtrl.stepperCmdBuff_consumeIdx == (FTM_STEPPERCMD_BUFF_SIZE)) + fxdTiCtrl.stepperCmdBuff_consumeIdx = 0; + + } + else { // Buffer empty. + fxdTiCtrl.sts_stepperBusy = false; + nextMainISR = 0.01f * (STEPPER_TIMER_RATE); // Come back in 10 msec. + } + } // !(abort_current_block) + } // if (!nextMainISR) + + // Define 2.5 msec task for auxilliary functions. + if (!fxdTiCtrl_nextAuxISR) { + endstops.update(); + TERN_(INTEGRATED_BABYSTEPPING, if (babystep.has_steps()) babystepping_isr()); + fxdTiCtrl_refreshAxisDidMove(); + fxdTiCtrl_nextAuxISR = 0.0025f * (STEPPER_TIMER_RATE); + } + + interval = _MIN(nextMainISR, fxdTiCtrl_nextAuxISR); + nextMainISR -= interval; + fxdTiCtrl_nextAuxISR -= interval; } - else if (nextAdvanceISR == LA_ADV_NEVER) // Start LA steps if necessary - nextAdvanceISR = la_interval; + + #else + + constexpr bool using_fxtictrl = false; + #endif - #if ENABLED(INTEGRATED_BABYSTEPPING) - const bool is_babystep = (nextBabystepISR == 0); // 0 = Do Babystepping (XY)Z pulses - if (is_babystep) nextBabystepISR = babystepping_isr(); - #endif + if (!using_fxtictrl) { - // ^== Time critical. NOTHING besides pulse generation should be above here!!! + TERN_(HAS_ZV_SHAPING, shaping_isr()); // Do Shaper stepping, if needed - if (!nextMainISR) nextMainISR = block_phase_isr(); // Manage acc/deceleration, get next block + if (!nextMainISR) pulse_phase_isr(); // 0 = Do coordinated axes Stepper pulses - #if ENABLED(INTEGRATED_BABYSTEPPING) - if (is_babystep) // Avoid ANY stepping too soon after baby-stepping - NOLESS(nextMainISR, (BABYSTEP_TICKS) / 8); // FULL STOP for 125µs after a baby-step + #if ENABLED(LIN_ADVANCE) + if (!nextAdvanceISR) { // 0 = Do Linear Advance E Stepper pulses + advance_isr(); + nextAdvanceISR = la_interval; + } + else if (nextAdvanceISR == LA_ADV_NEVER) // Start LA steps if necessary + nextAdvanceISR = la_interval; + #endif - if (nextBabystepISR != BABYSTEP_NEVER) // Avoid baby-stepping too close to axis Stepping - NOLESS(nextBabystepISR, nextMainISR / 2); // TODO: Only look at axes enabled for baby-stepping - #endif + #if ENABLED(INTEGRATED_BABYSTEPPING) + const bool is_babystep = (nextBabystepISR == 0); // 0 = Do Babystepping (XY)Z pulses + if (is_babystep) nextBabystepISR = babystepping_isr(); + #endif - // Get the interval to the next ISR call - const hal_timer_t interval = _MIN( - hal_timer_t(HAL_TIMER_TYPE_MAX), // Come back in a very long time - nextMainISR // Time until the next Pulse / Block phase - OPTARG(INPUT_SHAPING_X, ShapingQueue::peek_x()) // Time until next input shaping echo for X - OPTARG(INPUT_SHAPING_Y, ShapingQueue::peek_y()) // Time until next input shaping echo for Y - OPTARG(LIN_ADVANCE, nextAdvanceISR) // Come back early for Linear Advance? - OPTARG(INTEGRATED_BABYSTEPPING, nextBabystepISR) // Come back early for Babystepping? - ); + // ^== Time critical. NOTHING besides pulse generation should be above here!!! - // - // Compute remaining time for each ISR phase - // NEVER : The phase is idle - // Zero : The phase will occur on the next ISR call - // Non-zero : The phase will occur on a future ISR call - // + if (!nextMainISR) nextMainISR = block_phase_isr(); // Manage acc/deceleration, get next block - nextMainISR -= interval; - TERN_(HAS_ZV_SHAPING, ShapingQueue::decrement_delays(interval)); - TERN_(LIN_ADVANCE, if (nextAdvanceISR != LA_ADV_NEVER) nextAdvanceISR -= interval); - TERN_(INTEGRATED_BABYSTEPPING, if (nextBabystepISR != BABYSTEP_NEVER) nextBabystepISR -= interval); + #if ENABLED(INTEGRATED_BABYSTEPPING) + if (is_babystep) // Avoid ANY stepping too soon after baby-stepping + NOLESS(nextMainISR, (BABYSTEP_TICKS) / 8); // FULL STOP for 125µs after a baby-step + + if (nextBabystepISR != BABYSTEP_NEVER) // Avoid baby-stepping too close to axis Stepping + NOLESS(nextBabystepISR, nextMainISR / 2); // TODO: Only look at axes enabled for baby-stepping + #endif + + // Get the interval to the next ISR call + interval = _MIN(nextMainISR, uint32_t(HAL_TIMER_TYPE_MAX)); // Time until the next Pulse / Block phase + TERN_(INPUT_SHAPING_X, NOMORE(interval, ShapingQueue::peek_x())); // Time until next input shaping echo for X + TERN_(INPUT_SHAPING_Y, NOMORE(interval, ShapingQueue::peek_y())); // Time until next input shaping echo for Y + TERN_(LIN_ADVANCE, NOMORE(interval, nextAdvanceISR)); // Come back early for Linear Advance? + TERN_(INTEGRATED_BABYSTEPPING, NOMORE(interval, nextBabystepISR)); // Come back early for Babystepping? + + // + // Compute remaining time for each ISR phase + // NEVER : The phase is idle + // Zero : The phase will occur on the next ISR call + // Non-zero : The phase will occur on a future ISR call + // + + nextMainISR -= interval; + TERN_(HAS_ZV_SHAPING, ShapingQueue::decrement_delays(interval)); + TERN_(LIN_ADVANCE, if (nextAdvanceISR != LA_ADV_NEVER) nextAdvanceISR -= interval); + TERN_(INTEGRATED_BABYSTEPPING, if (nextBabystepISR != BABYSTEP_NEVER) nextBabystepISR -= interval); + + } // standard motion control /** * This needs to avoid a race-condition caused by interleaving @@ -1978,7 +2052,7 @@ void Stepper::pulse_phase_isr() { #if ENABLED(MIXING_EXTRUDER) if (step_needed.e) { - count_position[E_AXIS] += count_direction[E_AXIS]; + count_position.e += count_direction.e; E_STEP_WRITE(mixer.get_next_stepper(), STEP_STATE_E); } #elif HAS_E0_STEP @@ -3381,6 +3455,127 @@ void Stepper::report_positions() { report_a_position(pos); } +#if ENABLED(FT_MOTION) + + // Set stepper I/O for fixed time controller. + void Stepper::fxdTiCtrl_stepper(const bool applyDir, const ft_command_t command) { + + USING_TIMED_PULSE(); + + #if HAS_Z_AXIS + // Z is handled differently to update the stepper + // counts (needed by Marlin for bed level probing). + const bool z_dir = !TEST(command, FT_BIT_DIR_Z), + z_step = TEST(command, FT_BIT_STEP_Z); + #endif + + if (applyDir) { + X_DIR_WRITE(TEST(command, FT_BIT_DIR_X)); + TERN_(HAS_Y_AXIS, Y_DIR_WRITE(TEST(command, FT_BIT_DIR_Y))); + TERN_(HAS_Z_AXIS, Z_DIR_WRITE(z_dir)); + TERN_(HAS_EXTRUDERS, E0_DIR_WRITE(TEST(command, FT_BIT_DIR_E))); + DIR_WAIT_AFTER(); + } + + X_STEP_WRITE(TEST(command, FT_BIT_STEP_X)); + TERN_(HAS_Y_AXIS, Y_STEP_WRITE(TEST(command, FT_BIT_STEP_Y))); + TERN_(HAS_Z_AXIS, Z_STEP_WRITE(z_step)); + TERN_(HAS_EXTRUDERS, E0_STEP_WRITE(TEST(command, FT_BIT_STEP_E))); + + START_TIMED_PULSE(); + + #if HAS_Z_AXIS + // Update step counts + if (z_step) count_position.z += z_dir ? -1 : 1; + #endif + + AWAIT_HIGH_PULSE(); + + X_STEP_WRITE(0); + TERN_(HAS_Y_AXIS, Y_STEP_WRITE(0)); + TERN_(HAS_Z_AXIS, Z_STEP_WRITE(0)); + TERN_(HAS_EXTRUDERS, E0_STEP_WRITE(0)); + + } // Stepper::fxdTiCtrl_stepper + + void Stepper::fxdTiCtrl_BlockQueueUpdate() { + + if (current_block) { + // If the current block is not done processing, return right away + if (!fxdTiCtrl.getBlockProcDn()) return; + + axis_did_move = 0; + current_block = nullptr; + discard_current_block(); + } + + if (!current_block) { // No current block + + // Check the buffer for a new block + current_block = planner.get_current_block(); + + if (current_block) { + // Sync block? Sync the stepper counts and return + while (current_block->is_sync()) { + if (!(current_block->is_fan_sync() || current_block->is_pwr_sync())) _set_position(current_block->position); + discard_current_block(); + + // Try to get a new block + if (!(current_block = planner.get_current_block())) + return; // No more queued movements!image.png + } + + // this is needed by motor_direction() and subsequently bed leveling (somehow) + // update it here, even though it will may be out of sync with step commands + last_direction_bits = current_block->direction_bits; + + fxdTiCtrl.startBlockProc(current_block); + + } + else { + fxdTiCtrl.runoutBlock(); + return; // No queued blocks + } + + } // if (!current_block) + + } // Stepper::fxdTiCtrl_BlockQueueUpdate() + + // Debounces the axis move indication to account for potential + // delay between the block information and the stepper commands + void Stepper::fxdTiCtrl_refreshAxisDidMove() { + + // Set the debounce time in seconds. + #define AXIS_DID_MOVE_DEB 5 // TODO: The debounce time should be calculated if possible, + // or the set conditions should be changed from the block to + // the motion trajectory or motor commands. + + uint8_t axis_bits = 0U; + + static uint32_t a_debounce = 0U; + if (!!current_block->steps.a) a_debounce = (AXIS_DID_MOVE_DEB) * 400; // divide by 0.0025f + if (a_debounce) { SBI(axis_bits, A_AXIS); a_debounce--; } + #if HAS_Y_AXIS + static uint32_t b_debounce = 0U; + if (!!current_block->steps.b) b_debounce = (AXIS_DID_MOVE_DEB) * 400; + if (b_debounce) { SBI(axis_bits, B_AXIS); b_debounce--; } + #endif + #if HAS_Z_AXIS + static uint32_t c_debounce = 0U; + if (!!current_block->steps.c) c_debounce = (AXIS_DID_MOVE_DEB) * 400; + if (c_debounce) { SBI(axis_bits, C_AXIS); c_debounce--; } + #endif + #if HAS_EXTRUDERS + static uint32_t e_debounce = 0U; + if (!!current_block->steps.e) e_debounce = (AXIS_DID_MOVE_DEB) * 400; + if (e_debounce) { SBI(axis_bits, E_AXIS); e_debounce--; } + #endif + + axis_did_move = axis_bits; + } + +#endif // FT_MOTION + #if ENABLED(BABYSTEPPING) #define _ENABLE_AXIS(A) enable_axis(_AXIS(A)) diff --git a/Marlin/src/module/stepper.h b/Marlin/src/module/stepper.h index 4adbb01991..4c54a5dbf9 100644 --- a/Marlin/src/module/stepper.h +++ b/Marlin/src/module/stepper.h @@ -49,6 +49,10 @@ #include "stepper/speed_lookuptable.h" #endif +#if ENABLED(FT_MOTION) + #include "ft_types.h" +#endif + // // Estimate the amount of time the Stepper ISR will take to execute // @@ -470,6 +474,7 @@ constexpr ena_mask_t enable_overlap[] = { // class Stepper { friend class Max7219; + friend class FxdTiCtrl; friend void stepperTask(void *); public: @@ -817,6 +822,11 @@ class Stepper { set_directions(); } + #if ENABLED(FT_MOTION) + // Manage the planner + static void fxdTiCtrl_BlockQueueUpdate(); + #endif + #if HAS_ZV_SHAPING static void set_shaping_damping_ratio(const AxisEnum axis, const_float_t zeta); static float get_shaping_damping_ratio(const AxisEnum axis); @@ -848,6 +858,11 @@ class Stepper { static void microstep_init(); #endif + #if ENABLED(FT_MOTION) + static void fxdTiCtrl_stepper(const bool applyDir, const ft_command_t command); + static void fxdTiCtrl_refreshAxisDidMove(); + #endif + }; extern Stepper stepper; diff --git a/buildroot/tests/STM32F103RC_btt b/buildroot/tests/STM32F103RC_btt index 16419cbfa2..95a18c615f 100755 --- a/buildroot/tests/STM32F103RC_btt +++ b/buildroot/tests/STM32F103RC_btt @@ -12,8 +12,8 @@ set -e restore_configs opt_set MOTHERBOARD BOARD_BTT_SKR_MINI_E3_V1_0 SERIAL_PORT 1 SERIAL_PORT_2 -1 \ X_DRIVER_TYPE TMC2209 Y_DRIVER_TYPE TMC2209 Z_DRIVER_TYPE TMC2209 E0_DRIVER_TYPE TMC2209 -opt_enable PINS_DEBUGGING Z_IDLE_HEIGHT -exec_test $1 $2 "BigTreeTech SKR Mini E3 1.0 - Basic Config with TMC2209 HW Serial" "$3" +opt_enable PINS_DEBUGGING Z_IDLE_HEIGHT FT_MOTION +exec_test $1 $2 "BigTreeTech SKR Mini E3 1.0 - TMC2209 HW Serial, FT_MOTION" "$3" # clean up restore_configs diff --git a/ini/features.ini b/ini/features.ini index 4e378a8eaf..d8ba74f2db 100644 --- a/ini/features.ini +++ b/ini/features.ini @@ -186,6 +186,7 @@ AIR_EVACUATION = src_filter=+ SERVO_DETACH_GCODE = src_filter=+ HAS_DUPLICATION_MODE = src_filter=+ +FT_MOTION = src_filter=+ + LIN_ADVANCE = src_filter=+ PHOTO_GCODE = src_filter=+ CONTROLLER_FAN_EDITABLE = src_filter=+ diff --git a/platformio.ini b/platformio.ini index 9fbc589d2e..3478dcc1fb 100644 --- a/platformio.ini +++ b/platformio.ini @@ -192,6 +192,7 @@ default_src_filter = + - - + - - - + - - - - - From 06d9a2ff8f4364c13dc12e36b91399de54136097 Mon Sep 17 00:00:00 2001 From: Eduard Sukharev Date: Sat, 1 Apr 2023 05:45:53 +0300 Subject: [PATCH 117/225] =?UTF-8?q?=F0=9F=90=9B=20Fix=20Long=20FIlename=20?= =?UTF-8?q?lookup=20(#25598)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/Conditionals_post.h | 5 +++-- Marlin/src/inc/SanityCheck.h | 4 ++-- Marlin/src/inc/Warnings.cpp | 2 +- Marlin/src/sd/SdBaseFile.cpp | 7 ++++--- Marlin/src/sd/SdFatConfig.h | 2 +- 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index d45abc558a..4bbb43a216 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -3262,10 +3262,11 @@ // Number of VFAT entries used. Each entry has 13 UTF-16 characters #if ANY(SCROLL_LONG_FILENAMES, HAS_DWIN_E3V2, TFT_COLOR_UI) - #define MAX_VFAT_ENTRIES 5 + #define VFAT_ENTRIES_LIMIT 5 #else - #define MAX_VFAT_ENTRIES 2 + #define VFAT_ENTRIES_LIMIT 2 #endif +#define MAX_VFAT_ENTRIES 20 // by VFAT specs to fit LFN of length 255 // Nozzle park for Delta #if BOTH(NOZZLE_PARK_FEATURE, DELTA) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index f718846bff..ce657f24a6 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -1048,9 +1048,9 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #if ENABLED(SDSORT_CACHE_NAMES) && DISABLED(SDSORT_DYNAMIC_RAM) #if SDSORT_CACHE_VFATS < 2 #error "SDSORT_CACHE_VFATS must be 2 or greater!" - #elif SDSORT_CACHE_VFATS > MAX_VFAT_ENTRIES + #elif SDSORT_CACHE_VFATS > VFAT_ENTRIES_LIMIT #undef SDSORT_CACHE_VFATS - #define SDSORT_CACHE_VFATS MAX_VFAT_ENTRIES + #define SDSORT_CACHE_VFATS VFAT_ENTRIES_LIMIT #define SDSORT_CACHE_VFATS_WARNING 1 #endif #endif diff --git a/Marlin/src/inc/Warnings.cpp b/Marlin/src/inc/Warnings.cpp index 0204c3fab0..82aadf7d77 100644 --- a/Marlin/src/inc/Warnings.cpp +++ b/Marlin/src/inc/Warnings.cpp @@ -810,7 +810,7 @@ #endif #if SDSORT_CACHE_VFATS_WARNING - #warning "SDSORT_CACHE_VFATS has been reduced to MAX_VFAT_ENTRIES." + #warning "SDSORT_CACHE_VFATS has been reduced to VFAT_ENTRIES_LIMIT." #endif #if SDSORT_CACHE_LPC1768_WARNING #warning "SDCARD_SORT_ALPHA sub-options overridden for LPC1768 with DOGM LCD SCK overlap." diff --git a/Marlin/src/sd/SdBaseFile.cpp b/Marlin/src/sd/SdBaseFile.cpp index 72cdcb9268..818f0dcb37 100644 --- a/Marlin/src/sd/SdBaseFile.cpp +++ b/Marlin/src/sd/SdBaseFile.cpp @@ -1003,7 +1003,8 @@ bool SdBaseFile::openNext(SdBaseFile *dirFile, uint8_t oflag) { bool SdBaseFile::isDirLFN(const dir_t* dir) { if (DIR_IS_LONG_NAME(dir)) { vfat_t *VFAT = (vfat_t*)dir; - // Sanity-check the VFAT entry. The first cluster is always set to zero. And the sequence number should be higher than 0 + // Sanity-check the VFAT entry. The first cluster is always set to zero. + // The sequence number should be higher than 0 and lower than maximum allowed by VFAT spec if ((VFAT->firstClusterLow == 0) && WITHIN((VFAT->sequenceNumber & 0x1F), 1, MAX_VFAT_ENTRIES)) return true; } return false; @@ -1463,7 +1464,7 @@ int8_t SdBaseFile::readDir(dir_t *dir, char * const longFilename) { // Sanity-check the VFAT entry. The first cluster is always set to zero. And the sequence number should be higher than 0 if (VFAT->firstClusterLow == 0) { const uint8_t seq = VFAT->sequenceNumber & 0x1F; - if (WITHIN(seq, 1, MAX_VFAT_ENTRIES)) { + if (WITHIN(seq, 1, VFAT_ENTRIES_LIMIT)) { if (seq == 1) { checksum = VFAT->checksum; checksum_error = 0; @@ -1627,7 +1628,7 @@ bool SdBaseFile::remove() { // Check if the entry has a LFN bool lastEntry = false; // loop back to search for any LFN entries related to this file - LOOP_S_LE_N(sequenceNumber, 1, MAX_VFAT_ENTRIES) { + LOOP_S_LE_N(sequenceNumber, 1, VFAT_ENTRIES_LIMIT) { dirIndex_ = (dirIndex_ - 1) & 0xF; if (dirBlock_ == 0) break; if (dirIndex_ == 0xF) dirBlock_--; diff --git a/Marlin/src/sd/SdFatConfig.h b/Marlin/src/sd/SdFatConfig.h index dfba641295..0979a592a3 100644 --- a/Marlin/src/sd/SdFatConfig.h +++ b/Marlin/src/sd/SdFatConfig.h @@ -109,4 +109,4 @@ #define LONG_FILENAME_CHARSIZE TERN(UTF_FILENAME_SUPPORT, 2, 1) // Total bytes needed to store a single long filename -#define LONG_FILENAME_LENGTH (FILENAME_LENGTH * LONG_FILENAME_CHARSIZE * MAX_VFAT_ENTRIES + 1) +#define LONG_FILENAME_LENGTH (FILENAME_LENGTH * LONG_FILENAME_CHARSIZE * VFAT_ENTRIES_LIMIT + 1) From 1be2a7e4c17b8e19fade64ed32e101a65f9e8c32 Mon Sep 17 00:00:00 2001 From: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Sat, 1 Apr 2023 06:19:48 +0200 Subject: [PATCH 118/225] =?UTF-8?q?=F0=9F=8C=90=20Update=20Italian=20langu?= =?UTF-8?q?age=20(#25587)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/language/language_it.h | 30 ++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/Marlin/src/lcd/language/language_it.h b/Marlin/src/lcd/language/language_it.h index ad6668112f..fb9178c67e 100644 --- a/Marlin/src/lcd/language/language_it.h +++ b/Marlin/src/lcd/language/language_it.h @@ -371,7 +371,7 @@ namespace Language_it { LSTR MSG_MPC_MEASURING_AMBIENT = _UxGT("Verif.perdita calore"); LSTR MSG_MPC_HEATING_PAST_200 = _UxGT("Riscalda a >200C"); LSTR MSG_MPC_COOLING_TO_AMBIENT = _UxGT("Raffredda a amb."); - LSTR MSG_MPC_AUTOTUNE = _UxGT("MPC Autotune"); + LSTR MSG_MPC_AUTOTUNE = _UxGT("Calibra MPC"); LSTR MSG_MPC_EDIT = _UxGT("Modif.MPC *"); LSTR MSG_MPC_POWER = _UxGT("Potenza riscald."); LSTR MSG_MPC_POWER_E = _UxGT("Potenza *"); @@ -610,9 +610,9 @@ namespace Language_it { LSTR MSG_HALTED = _UxGT("STAMPANTE FERMATA"); LSTR MSG_PLEASE_WAIT = _UxGT("Attendere prego..."); LSTR MSG_PLEASE_RESET = _UxGT("Riavviare prego"); - LSTR MSG_PREHEATING = _UxGT("Preriscaldam..."); + LSTR MSG_PREHEATING = _UxGT("Preriscaldamento..."); LSTR MSG_HEATING = _UxGT("Riscaldamento..."); - LSTR MSG_COOLING = _UxGT("Raffreddamento.."); + LSTR MSG_COOLING = _UxGT("Raffreddamento..."); LSTR MSG_BED_HEATING = _UxGT("Risc. piatto..."); LSTR MSG_BED_COOLING = _UxGT("Raffr. piatto..."); LSTR MSG_PROBE_HEATING = _UxGT("Risc. sonda..."); @@ -849,4 +849,28 @@ namespace Language_it { LSTR MSG_USB_DISK = _UxGT("Disco USB"); LSTR MSG_HOST_SHUTDOWN = _UxGT("Arresta host"); + +// DGUS-Specific message strings, not used elsewhere + LSTR DGUS_MSG_NOT_WHILE_PRINTING = _UxGT("Non ammesso durante la stampa"); + LSTR DGUS_MSG_NOT_WHILE_IDLE = _UxGT("Non ammesso mentre è in riposo"); + LSTR DGUS_MSG_NO_FILE_SELECTED = _UxGT("Nessun file selezionato"); + LSTR DGUS_MSG_TEMP_TOO_LOW = _UxGT("Temperatura troppo bassa"); + LSTR DGUS_MSG_EXECUTING_COMMAND = _UxGT("Esecuzione del comando..."); + LSTR DGUS_MSG_BED_PID_DISABLED = _UxGT("PID letto disabilitato"); + LSTR DGUS_MSG_PID_DISABLED = _UxGT("PID disabilitato"); + LSTR DGUS_MSG_PID_AUTOTUNING = _UxGT("Calibrazione PID..."); + LSTR DGUS_MSG_INVALID_RECOVERY_DATA = _UxGT("Dati di recupero non validi"); + + LSTR DGUS_MSG_HOMING_REQUIRED = _UxGT("Azzeramento richiesto"); + LSTR DGUS_MSG_BUSY = _UxGT("Occupato"); + LSTR DGUS_MSG_HOMING = _UxGT("Azzeramento..."); + LSTR DGUS_MSG_FW_OUTDATED = _UxGT("Richiesto aggiornamento DWIN GUI/OS"); + LSTR DGUS_MSG_ABL_REQUIRED = _UxGT("Richiesto autolivellamento letto"); + LSTR DGUS_MSG_PROBING_FAILED = _UxGT("Sondaggio fallito"); + LSTR DGUS_MSG_PROBING_SUCCESS = _UxGT("Sondaggio effettuato"); + LSTR DGUS_MSG_RESET_EEPROM = _UxGT("Reset EEPROM"); + LSTR DGUS_MSG_WRITE_EEPROM_FAILED = _UxGT("Scrittura EEPROM fallita"); + LSTR DGUS_MSG_READ_EEPROM_FAILED = _UxGT("Lettura EEPROM fallita"); + LSTR DGUS_MSG_FILAMENT_RUNOUT = _UxGT("Filament runout E%d"); + } From c47189a9d94508d78ebf22b0d96a311a1dde8690 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 1 Apr 2023 02:16:48 -0500 Subject: [PATCH 119/225] =?UTF-8?q?=F0=9F=94=A8=20Move=20Docker=20local=20?= =?UTF-8?q?test=20script?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to #25583 --- Makefile | 2 +- {scripts => buildroot/share/scripts}/get_test_targets.py | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename {scripts => buildroot/share/scripts}/get_test_targets.py (100%) diff --git a/Makefile b/Makefile index ad5c320c20..2a18c0b4e8 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -SCRIPTS_DIR := scripts +SCRIPTS_DIR := buildroot/share/scripts CONTAINER_RT_BIN := docker CONTAINER_RT_OPTS := --rm -v $(PWD):/code -v platformio-cache:/root/.platformio CONTAINER_IMAGE := marlin-dev diff --git a/scripts/get_test_targets.py b/buildroot/share/scripts/get_test_targets.py similarity index 100% rename from scripts/get_test_targets.py rename to buildroot/share/scripts/get_test_targets.py From c25a6737c6845c75474891203447101c06bace81 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 1 Apr 2023 16:51:15 -0500 Subject: [PATCH 120/225] =?UTF-8?q?=F0=9F=A9=B9=20FT=5FMOTION=20Followup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/STM32/pinsDebug.h | 4 +++- Marlin/src/module/ft_motion.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Marlin/src/HAL/STM32/pinsDebug.h b/Marlin/src/HAL/STM32/pinsDebug.h index 29a4e003f9..b12d621e98 100644 --- a/Marlin/src/HAL/STM32/pinsDebug.h +++ b/Marlin/src/HAL/STM32/pinsDebug.h @@ -111,7 +111,9 @@ const XrefInfo pin_xref[] PROGMEM = { #if NUM_ANALOG_FIRST >= NUM_DIGITAL_PINS #define HAS_HIGH_ANALOG_PINS 1 #endif -#define NUM_ANALOG_LAST ((NUM_ANALOG_FIRST) + (NUM_ANALOG_INPUTS) - 1) +#ifndef NUM_ANALOG_LAST + #define NUM_ANALOG_LAST ((NUM_ANALOG_FIRST) + (NUM_ANALOG_INPUTS) - 1) +#endif #define NUMBER_PINS_TOTAL ((NUM_DIGITAL_PINS) + TERN0(HAS_HIGH_ANALOG_PINS, NUM_ANALOG_INPUTS)) #define VALID_PIN(P) (WITHIN(P, 0, (NUM_DIGITAL_PINS) - 1) || TERN0(HAS_HIGH_ANALOG_PINS, WITHIN(P, NUM_ANALOG_FIRST, NUM_ANALOG_LAST))) #define digitalRead_mod(Ard_num) extDigitalRead(Ard_num) // must use Arduino pin numbers when doing reads diff --git a/Marlin/src/module/ft_motion.h b/Marlin/src/module/ft_motion.h index 2794608bf9..6c5b6bf03b 100644 --- a/Marlin/src/module/ft_motion.h +++ b/Marlin/src/module/ft_motion.h @@ -43,7 +43,7 @@ class FxdTiCtrl { static float cfg_dynFreqK[1 + ENABLED(HAS_Y_AXIS)]; // Scaling / gain for dynamic frequency. [Hz/mm] or [Hz/g] #endif - static uint8_t stepperCmdBuff[FTM_STEPPERCMD_BUFF_SIZE]; // Buffer of stepper commands. + static ft_command_t stepperCmdBuff[FTM_STEPPERCMD_BUFF_SIZE]; // Buffer of stepper commands. static hal_timer_t stepperCmdBuff_StepRelativeTi[FTM_STEPPERCMD_BUFF_SIZE]; // Buffer of the stepper command timing. static uint8_t stepperCmdBuff_ApplyDir[FTM_STEPPERCMD_DIR_SIZE]; // Buffer of whether DIR needs to be updated. static uint32_t stepperCmdBuff_produceIdx, // Index of next stepper command write to the buffer. From 80839cf020b32971b4cb63f96a803c4fe19ce828 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 4 Apr 2023 20:46:46 -0500 Subject: [PATCH 121/225] =?UTF-8?q?=F0=9F=90=9B=20Ensure=20root=20for=20'M?= =?UTF-8?q?503=20C'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/gcode/eeprom/M500-M504.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/src/gcode/eeprom/M500-M504.cpp b/Marlin/src/gcode/eeprom/M500-M504.cpp index 412d003355..6da1d1cbd7 100644 --- a/Marlin/src/gcode/eeprom/M500-M504.cpp +++ b/Marlin/src/gcode/eeprom/M500-M504.cpp @@ -26,7 +26,7 @@ #include "../../inc/MarlinConfig.h" #if ENABLED(CONFIGURATION_EMBEDDING) - #include "../../sd/SdBaseFile.h" + #include "../../sd/cardreader.h" #include "../../mczip.h" #endif @@ -69,7 +69,7 @@ void GcodeSuite::M502() { SdBaseFile file; const uint16_t size = sizeof(mc_zip); // Need to create the config size on the SD card - if (file.open("mc.zip", O_WRITE|O_CREAT) && file.write(pgm_read_ptr(mc_zip), size) != -1 && file.close()) + if (file.open(card.getroot(), "mc.zip", O_WRITE|O_CREAT) && file.write(pgm_read_ptr(mc_zip), size) != -1 && file.close()) SERIAL_ECHO_MSG("Configuration saved as 'mc.zip'"); } #endif From e687490f41036e85d604618bf4c6246526759b54 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 4 Apr 2023 21:52:26 -0500 Subject: [PATCH 122/225] =?UTF-8?q?=F0=9F=90=9B=20Clean=20up=20DELTA=20bab?= =?UTF-8?q?ystep=20Z?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/module/stepper.cpp | 72 ----------------------------------- 1 file changed, 72 deletions(-) diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index 1062a778d8..f40afc6191 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -3732,24 +3732,6 @@ void Stepper::report_positions() { #ifdef Z_DIR_WRITE Z_DIR_WRITE(ENABLED(INVERT_Z_DIR) ^ z_direction); #endif - #ifdef I_DIR_WRITE - I_DIR_WRITE(ENABLED(INVERT_I_DIR) ^ z_direction); - #endif - #ifdef J_DIR_WRITE - J_DIR_WRITE(ENABLED(INVERT_J_DIR) ^ z_direction); - #endif - #ifdef K_DIR_WRITE - K_DIR_WRITE(ENABLED(INVERT_K_DIR) ^ z_direction); - #endif - #ifdef U_DIR_WRITE - U_DIR_WRITE(ENABLED(INVERT_U_DIR) ^ z_direction); - #endif - #ifdef V_DIR_WRITE - V_DIR_WRITE(ENABLED(INVERT_V_DIR) ^ z_direction); - #endif - #ifdef W_DIR_WRITE - W_DIR_WRITE(ENABLED(INVERT_W_DIR) ^ z_direction); - #endif DIR_WAIT_AFTER(); @@ -3762,24 +3744,6 @@ void Stepper::report_positions() { #ifdef Z_STEP_WRITE Z_STEP_WRITE(STEP_STATE_Z); #endif - #ifdef I_STEP_WRITE - I_STEP_WRITE(STEP_STATE_I); - #endif - #ifdef J_STEP_WRITE - J_STEP_WRITE(STEP_STATE_J); - #endif - #ifdef K_STEP_WRITE - K_STEP_WRITE(STEP_STATE_K); - #endif - #ifdef U_STEP_WRITE - U_STEP_WRITE(STEP_STATE_U); - #endif - #ifdef V_STEP_WRITE - V_STEP_WRITE(STEP_STATE_V); - #endif - #ifdef W_STEP_WRITE - W_STEP_WRITE(STEP_STATE_W); - #endif _PULSE_WAIT(); @@ -3790,24 +3754,6 @@ void Stepper::report_positions() { #ifdef Z_STEP_WRITE Z_STEP_WRITE(!STEP_STATE_Z); #endif - #ifdef I_STEP_WRITE - I_STEP_WRITE(!STEP_STATE_I); - #endif - #ifdef J_STEP_WRITE - J_STEP_WRITE(!STEP_STATE_J); - #endif - #ifdef K_STEP_WRITE - K_STEP_WRITE(!STEP_STATE_K); - #endif - #ifdef U_STEP_WRITE - U_STEP_WRITE(!STEP_STATE_U); - #endif - #ifdef V_STEP_WRITE - V_STEP_WRITE(!STEP_STATE_V); - #endif - #ifdef W_STEP_WRITE - W_STEP_WRITE(!STEP_STATE_W); - #endif // Restore direction bits EXTRA_DIR_WAIT_BEFORE(); @@ -3819,24 +3765,6 @@ void Stepper::report_positions() { #ifdef Z_DIR_WRITE Z_DIR_WRITE(old_dir.z); #endif - #ifdef I_DIR_WRITE - I_DIR_WRITE(old_dir.i); - #endif - #ifdef J_DIR_WRITE - J_DIR_WRITE(old_dir.j); - #endif - #ifdef K_DIR_WRITE - K_DIR_WRITE(old_dir.k); - #endif - #ifdef U_DIR_WRITE - U_DIR_WRITE(old_dir.u); - #endif - #ifdef V_DIR_WRITE - V_DIR_WRITE(old_dir.v); - #endif - #ifdef W_DIR_WRITE - W_DIR_WRITE(old_dir.w); - #endif EXTRA_DIR_WAIT_AFTER(); From 4aec74f2465a14b2660a2c28e1da39f1013cb521 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 5 Apr 2023 11:58:24 -0500 Subject: [PATCH 123/225] =?UTF-8?q?=F0=9F=90=9B=20INVERT=5F*=5FDIR=20for?= =?UTF-8?q?=20FT=5FMOTION=20(#25637)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/feature/bedlevel/bdl/bdl.cpp | 2 +- Marlin/src/module/motion.cpp | 36 ++-- Marlin/src/module/stepper.cpp | 73 ++++---- Marlin/src/module/stepper/indirection.h | 210 ++++++++++-------------- 4 files changed, 150 insertions(+), 171 deletions(-) diff --git a/Marlin/src/feature/bedlevel/bdl/bdl.cpp b/Marlin/src/feature/bedlevel/bdl/bdl.cpp index 1a27011a4b..e729022f21 100644 --- a/Marlin/src/feature/bedlevel/bdl/bdl.cpp +++ b/Marlin/src/feature/bedlevel/bdl/bdl.cpp @@ -109,7 +109,7 @@ void BDS_Leveling::process() { #endif } else { - babystep.set_mm(Z_AXIS, 0); //if (old_cur_z <= cur_z) Z_DIR_WRITE(!INVERT_Z_DIR); + babystep.set_mm(Z_AXIS, 0); //if (old_cur_z <= cur_z) Z_DIR_WRITE(INVERT_DIR(Z, HIGH)); stepper.set_directions(); } #endif diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp index 61cbef068e..4e4c174bd8 100644 --- a/Marlin/src/module/motion.cpp +++ b/Marlin/src/module/motion.cpp @@ -1952,72 +1952,72 @@ void prepare_line_to_destination() { case X_AXIS: phasePerUStep = PHASE_PER_MICROSTEP(X); phaseCurrent = stepperX.get_microstep_counter(); - effectorBackoutDir = -X_HOME_DIR; - stepperBackoutDir = IF_DISABLED(INVERT_X_DIR, -)effectorBackoutDir; + effectorBackoutDir = -(X_HOME_DIR); + stepperBackoutDir = TERN_(INVERT_X_DIR, -)(-effectorBackoutDir); break; #endif #ifdef Y_MICROSTEPS case Y_AXIS: phasePerUStep = PHASE_PER_MICROSTEP(Y); phaseCurrent = stepperY.get_microstep_counter(); - effectorBackoutDir = -Y_HOME_DIR; - stepperBackoutDir = IF_DISABLED(INVERT_Y_DIR, -)effectorBackoutDir; + effectorBackoutDir = -(Y_HOME_DIR); + stepperBackoutDir = TERN_(INVERT_Y_DIR, -)(-effectorBackoutDir); break; #endif #ifdef Z_MICROSTEPS case Z_AXIS: phasePerUStep = PHASE_PER_MICROSTEP(Z); phaseCurrent = stepperZ.get_microstep_counter(); - effectorBackoutDir = -Z_HOME_DIR; - stepperBackoutDir = IF_DISABLED(INVERT_Z_DIR, -)effectorBackoutDir; + effectorBackoutDir = -(Z_HOME_DIR); + stepperBackoutDir = TERN_(INVERT_Z_DIR, -)(-effectorBackoutDir); break; #endif #ifdef I_MICROSTEPS case I_AXIS: phasePerUStep = PHASE_PER_MICROSTEP(I); phaseCurrent = stepperI.get_microstep_counter(); - effectorBackoutDir = -I_HOME_DIR; - stepperBackoutDir = IF_DISABLED(INVERT_I_DIR, -)effectorBackoutDir; + effectorBackoutDir = -(I_HOME_DIR); + stepperBackoutDir = TERN_(INVERT_I_DIR, -)(-effectorBackoutDir); break; #endif #ifdef J_MICROSTEPS case J_AXIS: phasePerUStep = PHASE_PER_MICROSTEP(J); phaseCurrent = stepperJ.get_microstep_counter(); - effectorBackoutDir = -J_HOME_DIR; - stepperBackoutDir = IF_DISABLED(INVERT_J_DIR, -)effectorBackoutDir; + effectorBackoutDir = -(J_HOME_DIR); + stepperBackoutDir = TERN_(INVERT_J_DIR, -)(-effectorBackoutDir); break; #endif #ifdef K_MICROSTEPS case K_AXIS: phasePerUStep = PHASE_PER_MICROSTEP(K); phaseCurrent = stepperK.get_microstep_counter(); - effectorBackoutDir = -K_HOME_DIR; - stepperBackoutDir = IF_DISABLED(INVERT_K_DIR, -)effectorBackoutDir; + effectorBackoutDir = -(K_HOME_DIR); + stepperBackoutDir = TERN_(INVERT_K_DIR, -)(-effectorBackoutDir); break; #endif #ifdef U_MICROSTEPS case U_AXIS: phasePerUStep = PHASE_PER_MICROSTEP(U); phaseCurrent = stepperU.get_microstep_counter(); - effectorBackoutDir = -U_HOME_DIR; - stepperBackoutDir = IF_DISABLED(INVERT_U_DIR, -)effectorBackoutDir; + effectorBackoutDir = -(U_HOME_DIR); + stepperBackoutDir = TERN_(INVERT_U_DIR, -)(-effectorBackoutDir); break; #endif #ifdef V_MICROSTEPS case V_AXIS: phasePerUStep = PHASE_PER_MICROSTEP(V); phaseCurrent = stepperV.get_microstep_counter(); - effectorBackoutDir = -V_HOME_DIR; - stepperBackoutDir = IF_DISABLED(INVERT_V_DIR, -)effectorBackoutDir; + effectorBackoutDir = -(V_HOME_DIR); + stepperBackoutDir = TERN_(INVERT_V_DIR, -)(-effectorBackoutDir); break; #endif #ifdef W_MICROSTEPS case W_AXIS: phasePerUStep = PHASE_PER_MICROSTEP(W); phaseCurrent = stepperW.get_microstep_counter(); - effectorBackoutDir = -W_HOME_DIR; - stepperBackoutDir = IF_DISABLED(INVERT_W_DIR, -)effectorBackoutDir; + effectorBackoutDir = -(W_HOME_DIR); + stepperBackoutDir = TERN_(INVERT_W_DIR, -)(-effectorBackoutDir); break; #endif default: return; diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index f40afc6191..cc353b42e2 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -382,7 +382,7 @@ xyze_int8_t Stepper::count_direction{0}; } #if HAS_DUAL_X_STEPPERS - #define X_APPLY_DIR(v,Q) do{ X_DIR_WRITE(v); X2_DIR_WRITE((v) ^ ENABLED(INVERT_X2_VS_X_DIR)); }while(0) + #define X_APPLY_DIR(v,Q) do{ X_DIR_WRITE(v); X2_DIR_WRITE(INVERT_DIR(X2_VS_X, v)); }while(0) #if ENABLED(X_DUAL_ENDSTOPS) #define X_APPLY_STEP(v,Q) DUAL_ENDSTOP_APPLY_STEP(X,v) #else @@ -403,7 +403,7 @@ xyze_int8_t Stepper::count_direction{0}; #endif #if HAS_DUAL_Y_STEPPERS - #define Y_APPLY_DIR(v,Q) do{ Y_DIR_WRITE(v); Y2_DIR_WRITE((v) ^ ENABLED(INVERT_Y2_VS_Y_DIR)); }while(0) + #define Y_APPLY_DIR(v,Q) do{ Y_DIR_WRITE(v); Y2_DIR_WRITE(INVERT_DIR(Y2_VS_Y, v)); }while(0) #if ENABLED(Y_DUAL_ENDSTOPS) #define Y_APPLY_STEP(v,Q) DUAL_ENDSTOP_APPLY_STEP(Y,v) #else @@ -416,8 +416,8 @@ xyze_int8_t Stepper::count_direction{0}; #if NUM_Z_STEPPERS == 4 #define Z_APPLY_DIR(v,Q) do{ \ - Z_DIR_WRITE(v); Z2_DIR_WRITE((v) ^ ENABLED(INVERT_Z2_VS_Z_DIR)); \ - Z3_DIR_WRITE((v) ^ ENABLED(INVERT_Z3_VS_Z_DIR)); Z4_DIR_WRITE((v) ^ ENABLED(INVERT_Z4_VS_Z_DIR)); \ + Z_DIR_WRITE(v); Z2_DIR_WRITE(INVERT_DIR(Z2_VS_Z, v)); \ + Z3_DIR_WRITE(INVERT_DIR(Z3_VS_Z, v)); Z4_DIR_WRITE(INVERT_DIR(Z4_VS_Z, v)); \ }while(0) #if ENABLED(Z_MULTI_ENDSTOPS) #define Z_APPLY_STEP(v,Q) QUAD_ENDSTOP_APPLY_STEP(Z,v) @@ -428,7 +428,7 @@ xyze_int8_t Stepper::count_direction{0}; #endif #elif NUM_Z_STEPPERS == 3 #define Z_APPLY_DIR(v,Q) do{ \ - Z_DIR_WRITE(v); Z2_DIR_WRITE((v) ^ ENABLED(INVERT_Z2_VS_Z_DIR)); Z3_DIR_WRITE((v) ^ ENABLED(INVERT_Z3_VS_Z_DIR)); \ + Z_DIR_WRITE(v); Z2_DIR_WRITE(INVERT_DIR(Z2_VS_Z, v)); Z3_DIR_WRITE(INVERT_DIR(Z3_VS_Z, v)); \ }while(0) #if ENABLED(Z_MULTI_ENDSTOPS) #define Z_APPLY_STEP(v,Q) TRIPLE_ENDSTOP_APPLY_STEP(Z,v) @@ -438,7 +438,7 @@ xyze_int8_t Stepper::count_direction{0}; #define Z_APPLY_STEP(v,Q) do{ Z_STEP_WRITE(v); Z2_STEP_WRITE(v); Z3_STEP_WRITE(v); }while(0) #endif #elif NUM_Z_STEPPERS == 2 - #define Z_APPLY_DIR(v,Q) do{ Z_DIR_WRITE(v); Z2_DIR_WRITE((v) ^ ENABLED(INVERT_Z2_VS_Z_DIR)); }while(0) + #define Z_APPLY_DIR(v,Q) do{ Z_DIR_WRITE(v); Z2_DIR_WRITE(INVERT_DIR(Z2_VS_Z, v)); }while(0) #if ENABLED(Z_MULTI_ENDSTOPS) #define Z_APPLY_STEP(v,Q) DUAL_ENDSTOP_APPLY_STEP(Z,v) #elif ENABLED(Z_STEPPER_AUTO_ALIGN) @@ -3470,14 +3470,14 @@ void Stepper::report_positions() { #endif if (applyDir) { - X_DIR_WRITE(TEST(command, FT_BIT_DIR_X)); - TERN_(HAS_Y_AXIS, Y_DIR_WRITE(TEST(command, FT_BIT_DIR_Y))); - TERN_(HAS_Z_AXIS, Z_DIR_WRITE(z_dir)); - TERN_(HAS_EXTRUDERS, E0_DIR_WRITE(TEST(command, FT_BIT_DIR_E))); + TERN_(HAS_X_AXIS, X_DIR_WRITE(INVERT_DIR(X, TEST(command, FT_BIT_DIR_X)))); + TERN_(HAS_Y_AXIS, Y_DIR_WRITE(INVERT_DIR(Y, TEST(command, FT_BIT_DIR_Y)))); + TERN_(HAS_Z_AXIS, Z_DIR_WRITE(INVERT_DIR(Z, z_dir))); + TERN_(HAS_EXTRUDERS, E0_DIR_WRITE(INVERT_DIR(E0, TEST(command, FT_BIT_DIR_E)))); DIR_WAIT_AFTER(); } - X_STEP_WRITE(TEST(command, FT_BIT_STEP_X)); + TERN_(HAS_X_AXIS, X_STEP_WRITE(TEST(command, FT_BIT_STEP_X))); TERN_(HAS_Y_AXIS, Y_STEP_WRITE(TEST(command, FT_BIT_STEP_Y))); TERN_(HAS_Z_AXIS, Z_STEP_WRITE(z_step)); TERN_(HAS_EXTRUDERS, E0_STEP_WRITE(TEST(command, FT_BIT_STEP_E))); @@ -3580,7 +3580,6 @@ void Stepper::report_positions() { #define _ENABLE_AXIS(A) enable_axis(_AXIS(A)) #define _READ_DIR(AXIS) AXIS ##_DIR_READ() - #define _INVERT_DIR(AXIS) ENABLED(INVERT_## AXIS ##_DIR) #define _APPLY_DIR(AXIS, INVERT) AXIS ##_APPLY_DIR(INVERT, true) #if MINIMUM_STEPPER_PULSE @@ -3627,19 +3626,19 @@ void Stepper::report_positions() { #if DISABLED(DELTA) - #define BABYSTEP_AXIS(AXIS, INV, DIR) do{ \ - const uint8_t old_dir = _READ_DIR(AXIS); \ - _ENABLE_AXIS(AXIS); \ - DIR_WAIT_BEFORE(); \ - _APPLY_DIR(AXIS, _INVERT_DIR(AXIS)^DIR^INV); \ - DIR_WAIT_AFTER(); \ - _SAVE_START(); \ - _APPLY_STEP(AXIS, _STEP_STATE(AXIS), true); \ - _PULSE_WAIT(); \ - _APPLY_STEP(AXIS, !_STEP_STATE(AXIS), true); \ - EXTRA_DIR_WAIT_BEFORE(); \ - _APPLY_DIR(AXIS, old_dir); \ - EXTRA_DIR_WAIT_AFTER(); \ + #define BABYSTEP_AXIS(AXIS, INV, DIR) do{ \ + const uint8_t old_dir = _READ_DIR(AXIS); \ + _ENABLE_AXIS(AXIS); \ + DIR_WAIT_BEFORE(); \ + _APPLY_DIR(AXIS, INVERT_DIR(AXIS, (DIR)^(INV))); \ + DIR_WAIT_AFTER(); \ + _SAVE_START(); \ + _APPLY_STEP(AXIS, _STEP_STATE(AXIS), true); \ + _PULSE_WAIT(); \ + _APPLY_STEP(AXIS, !_STEP_STATE(AXIS), true); \ + EXTRA_DIR_WAIT_BEFORE(); \ + _APPLY_DIR(AXIS, old_dir); \ + EXTRA_DIR_WAIT_AFTER(); \ }while(0) #endif @@ -3650,8 +3649,8 @@ void Stepper::report_positions() { const xy_byte_t old_dir = { _READ_DIR(A), _READ_DIR(B) }; \ _ENABLE_AXIS(A); _ENABLE_AXIS(B); \ DIR_WAIT_BEFORE(); \ - _APPLY_DIR(A, _INVERT_DIR(A)^DIR^INV); \ - _APPLY_DIR(B, _INVERT_DIR(B)^DIR^INV^ALT); \ + _APPLY_DIR(A, INVERT_DIR(A, (DIR)^(INV)); \ + _APPLY_DIR(B, INVERT_DIR(B, (DIR)^(INV)^(ALT)); \ DIR_WAIT_AFTER(); \ _SAVE_START(); \ _APPLY_STEP(A, _STEP_STATE(A), true); \ @@ -3725,19 +3724,23 @@ void Stepper::report_positions() { U_DIR_READ(), V_DIR_READ(), W_DIR_READ() ); - X_DIR_WRITE(ENABLED(INVERT_X_DIR) ^ z_direction); + #ifdef X_DIR_WRITE + X_DIR_WRITE(INVERT_DIR(X, z_direction)); + #endif #ifdef Y_DIR_WRITE - Y_DIR_WRITE(ENABLED(INVERT_Y_DIR) ^ z_direction); + Y_DIR_WRITE(INVERT_DIR(Y, z_direction)); #endif #ifdef Z_DIR_WRITE - Z_DIR_WRITE(ENABLED(INVERT_Z_DIR) ^ z_direction); + Z_DIR_WRITE(INVERT_DIR(Z, z_direction)); #endif DIR_WAIT_AFTER(); _SAVE_START(); - X_STEP_WRITE(STEP_STATE_X); + #ifdef X_STEP_WRITE + X_STEP_WRITE(STEP_STATE_X); + #endif #ifdef Y_STEP_WRITE Y_STEP_WRITE(STEP_STATE_Y); #endif @@ -3747,7 +3750,9 @@ void Stepper::report_positions() { _PULSE_WAIT(); - X_STEP_WRITE(!STEP_STATE_X); + #ifdef X_STEP_WRITE + X_STEP_WRITE(!STEP_STATE_X); + #endif #ifdef Y_STEP_WRITE Y_STEP_WRITE(!STEP_STATE_Y); #endif @@ -3758,7 +3763,9 @@ void Stepper::report_positions() { // Restore direction bits EXTRA_DIR_WAIT_BEFORE(); - X_DIR_WRITE(old_dir.x); + #ifdef X_DIR_WRITE + X_DIR_WRITE(old_dir.x); + #endif #ifdef Y_DIR_WRITE Y_DIR_WRITE(old_dir.y); #endif diff --git a/Marlin/src/module/stepper/indirection.h b/Marlin/src/module/stepper/indirection.h index 81a1377cef..806826b7fc 100644 --- a/Marlin/src/module/stepper/indirection.h +++ b/Marlin/src/module/stepper/indirection.h @@ -451,6 +451,8 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #endif #define E7_STEP_READ() bool(READ(E7_STEP_PIN)) +#define INVERT_DIR(AXIS, D) (TERN_(INVERT_## AXIS ##_DIR, !)(D)) + /** * Extruder indirection for the single E axis */ @@ -458,91 +460,91 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #if EXTRUDERS > 7 #define E_STEP_WRITE(E,V) do{ if (E < 2) { E0_STEP_WRITE(V); } else if (E < 4) { E1_STEP_WRITE(V); } else if (E < 6) { E2_STEP_WRITE(V); } else { E3_STEP_WRITE(V); } }while(0) #define NORM_E_DIR(E) do{ switch (E) { \ - case 0: E0_DIR_WRITE(DISABLED(INVERT_E0_DIR)); break; case 1: E0_DIR_WRITE( ENABLED(INVERT_E0_DIR)); break; \ - case 2: E1_DIR_WRITE(DISABLED(INVERT_E1_DIR)); break; case 3: E1_DIR_WRITE( ENABLED(INVERT_E1_DIR)); break; \ - case 4: E2_DIR_WRITE(DISABLED(INVERT_E2_DIR)); break; case 5: E2_DIR_WRITE( ENABLED(INVERT_E2_DIR)); break; \ - case 6: E3_DIR_WRITE( ENABLED(INVERT_E3_DIR)); break; case 7: E3_DIR_WRITE( ENABLED(INVERT_E3_DIR)); break; \ + case 0: E0_DIR_WRITE(INVERT_DIR(E0, HIGH)); break; case 1: E0_DIR_WRITE(INVERT_DIR(E0, LOW )); break; \ + case 2: E1_DIR_WRITE(INVERT_DIR(E1, HIGH)); break; case 3: E1_DIR_WRITE(INVERT_DIR(E1, LOW )); break; \ + case 4: E2_DIR_WRITE(INVERT_DIR(E2, HIGH)); break; case 5: E2_DIR_WRITE(INVERT_DIR(E2, LOW )); break; \ + case 6: E3_DIR_WRITE(INVERT_DIR(E3, HIGH)); break; case 7: E3_DIR_WRITE(INVERT_DIR(E3, LOW )); break; \ } }while(0) #define REV_E_DIR(E) do{ switch (E) { \ - case 0: E0_DIR_WRITE( ENABLED(INVERT_E0_DIR)); break; case 1: E0_DIR_WRITE(DISABLED(INVERT_E0_DIR)); break; \ - case 2: E1_DIR_WRITE( ENABLED(INVERT_E1_DIR)); break; case 3: E1_DIR_WRITE(DISABLED(INVERT_E1_DIR)); break; \ - case 4: E2_DIR_WRITE( ENABLED(INVERT_E2_DIR)); break; case 5: E2_DIR_WRITE(DISABLED(INVERT_E2_DIR)); break; \ - case 6: E3_DIR_WRITE(DISABLED(INVERT_E3_DIR)); break; case 7: E3_DIR_WRITE(DISABLED(INVERT_E3_DIR)); break; \ + case 0: E0_DIR_WRITE(INVERT_DIR(E0, LOW )); break; case 1: E0_DIR_WRITE(INVERT_DIR(E0, HIGH)); break; \ + case 2: E1_DIR_WRITE(INVERT_DIR(E1, LOW )); break; case 3: E1_DIR_WRITE(INVERT_DIR(E1, HIGH)); break; \ + case 4: E2_DIR_WRITE(INVERT_DIR(E2, LOW )); break; case 5: E2_DIR_WRITE(INVERT_DIR(E2, HIGH)); break; \ + case 6: E3_DIR_WRITE(INVERT_DIR(E3, LOW )); break; case 7: E3_DIR_WRITE(INVERT_DIR(E3, HIGH)); break; \ } }while(0) #elif EXTRUDERS > 6 #define E_STEP_WRITE(E,V) do{ if (E < 2) { E0_STEP_WRITE(V); } else if (E < 4) { E1_STEP_WRITE(V); } else if (E < 6) { E2_STEP_WRITE(V); } else { E3_STEP_WRITE(V); } }while(0) #define NORM_E_DIR(E) do{ switch (E) { \ - case 0: E0_DIR_WRITE(DISABLED(INVERT_E0_DIR)); break; case 1: E0_DIR_WRITE( ENABLED(INVERT_E0_DIR)); break; \ - case 2: E1_DIR_WRITE(DISABLED(INVERT_E1_DIR)); break; case 3: E1_DIR_WRITE( ENABLED(INVERT_E1_DIR)); break; \ - case 4: E2_DIR_WRITE(DISABLED(INVERT_E2_DIR)); break; case 5: E2_DIR_WRITE( ENABLED(INVERT_E2_DIR)); break; \ - case 6: E3_DIR_WRITE( ENABLED(INVERT_E3_DIR)); break; \ + case 0: E0_DIR_WRITE(INVERT_DIR(E0, HIGH)); break; case 1: E0_DIR_WRITE(INVERT_DIR(E0, LOW )); break; \ + case 2: E1_DIR_WRITE(INVERT_DIR(E1, HIGH)); break; case 3: E1_DIR_WRITE(INVERT_DIR(E1, LOW )); break; \ + case 4: E2_DIR_WRITE(INVERT_DIR(E2, HIGH)); break; case 5: E2_DIR_WRITE(INVERT_DIR(E2, LOW )); break; \ + case 6: E3_DIR_WRITE(INVERT_DIR(E3, HIGH)); break; \ } }while(0) #define REV_E_DIR(E) do{ switch (E) { \ - case 0: E0_DIR_WRITE( ENABLED(INVERT_E0_DIR)); break; case 1: E0_DIR_WRITE(DISABLED(INVERT_E0_DIR)); break; \ - case 2: E1_DIR_WRITE( ENABLED(INVERT_E1_DIR)); break; case 3: E1_DIR_WRITE(DISABLED(INVERT_E1_DIR)); break; \ - case 4: E2_DIR_WRITE( ENABLED(INVERT_E2_DIR)); break; case 5: E2_DIR_WRITE(DISABLED(INVERT_E2_DIR)); break; \ - case 6: E3_DIR_WRITE(DISABLED(INVERT_E3_DIR)); } }while(0) + case 0: E0_DIR_WRITE(INVERT_DIR(E0, LOW )); break; case 1: E0_DIR_WRITE(INVERT_DIR(E0, HIGH)); break; \ + case 2: E1_DIR_WRITE(INVERT_DIR(E1, LOW )); break; case 3: E1_DIR_WRITE(INVERT_DIR(E1, HIGH)); break; \ + case 4: E2_DIR_WRITE(INVERT_DIR(E2, LOW )); break; case 5: E2_DIR_WRITE(INVERT_DIR(E2, HIGH)); break; \ + case 6: E3_DIR_WRITE(INVERT_DIR(E3, LOW )); } }while(0) #elif EXTRUDERS > 5 #define E_STEP_WRITE(E,V) do{ if (E < 2) { E0_STEP_WRITE(V); } else if (E < 4) { E1_STEP_WRITE(V); } else { E2_STEP_WRITE(V); } }while(0) #define NORM_E_DIR(E) do{ switch (E) { \ - case 0: E0_DIR_WRITE(DISABLED(INVERT_E0_DIR)); break; case 1: E0_DIR_WRITE( ENABLED(INVERT_E0_DIR)); break; \ - case 2: E1_DIR_WRITE(DISABLED(INVERT_E1_DIR)); break; case 3: E1_DIR_WRITE( ENABLED(INVERT_E1_DIR)); break; \ - case 4: E2_DIR_WRITE(DISABLED(INVERT_E2_DIR)); break; case 5: E2_DIR_WRITE( ENABLED(INVERT_E2_DIR)); break; \ + case 0: E0_DIR_WRITE(INVERT_DIR(E0, HIGH)); break; case 1: E0_DIR_WRITE(INVERT_DIR(E0, LOW )); break; \ + case 2: E1_DIR_WRITE(INVERT_DIR(E1, HIGH)); break; case 3: E1_DIR_WRITE(INVERT_DIR(E1, LOW )); break; \ + case 4: E2_DIR_WRITE(INVERT_DIR(E2, HIGH)); break; case 5: E2_DIR_WRITE(INVERT_DIR(E2, LOW )); break; \ } }while(0) #define REV_E_DIR(E) do{ switch (E) { \ - case 0: E0_DIR_WRITE( ENABLED(INVERT_E0_DIR)); break; case 1: E0_DIR_WRITE(DISABLED(INVERT_E0_DIR)); break; \ - case 2: E1_DIR_WRITE( ENABLED(INVERT_E1_DIR)); break; case 3: E1_DIR_WRITE(DISABLED(INVERT_E1_DIR)); break; \ - case 4: E2_DIR_WRITE( ENABLED(INVERT_E2_DIR)); break; case 5: E2_DIR_WRITE(DISABLED(INVERT_E2_DIR)); break; \ + case 0: E0_DIR_WRITE(INVERT_DIR(E0, LOW )); break; case 1: E0_DIR_WRITE(INVERT_DIR(E0, HIGH)); break; \ + case 2: E1_DIR_WRITE(INVERT_DIR(E1, LOW )); break; case 3: E1_DIR_WRITE(INVERT_DIR(E1, HIGH)); break; \ + case 4: E2_DIR_WRITE(INVERT_DIR(E2, LOW )); break; case 5: E2_DIR_WRITE(INVERT_DIR(E2, HIGH)); break; \ } }while(0) #elif EXTRUDERS > 4 #define E_STEP_WRITE(E,V) do{ if (E < 2) { E0_STEP_WRITE(V); } else if (E < 4) { E1_STEP_WRITE(V); } else { E2_STEP_WRITE(V); } }while(0) #define NORM_E_DIR(E) do{ switch (E) { \ - case 0: E0_DIR_WRITE(DISABLED(INVERT_E0_DIR)); break; case 1: E0_DIR_WRITE( ENABLED(INVERT_E0_DIR)); break; \ - case 2: E1_DIR_WRITE(DISABLED(INVERT_E1_DIR)); break; case 3: E1_DIR_WRITE( ENABLED(INVERT_E1_DIR)); break; \ - case 4: E2_DIR_WRITE(DISABLED(INVERT_E2_DIR)); break; \ + case 0: E0_DIR_WRITE(INVERT_DIR(E0, HIGH)); break; case 1: E0_DIR_WRITE(INVERT_DIR(E0, LOW )); break; \ + case 2: E1_DIR_WRITE(INVERT_DIR(E1, HIGH)); break; case 3: E1_DIR_WRITE(INVERT_DIR(E1, LOW )); break; \ + case 4: E2_DIR_WRITE(INVERT_DIR(E2, HIGH)); break; \ } }while(0) #define REV_E_DIR(E) do{ switch (E) { \ - case 0: E0_DIR_WRITE( ENABLED(INVERT_E0_DIR)); break; case 1: E0_DIR_WRITE(DISABLED(INVERT_E0_DIR)); break; \ - case 2: E1_DIR_WRITE( ENABLED(INVERT_E1_DIR)); break; case 3: E1_DIR_WRITE(DISABLED(INVERT_E1_DIR)); break; \ - case 4: E2_DIR_WRITE( ENABLED(INVERT_E2_DIR)); break; \ + case 0: E0_DIR_WRITE(INVERT_DIR(E0, LOW )); break; case 1: E0_DIR_WRITE(INVERT_DIR(E0, HIGH)); break; \ + case 2: E1_DIR_WRITE(INVERT_DIR(E1, LOW )); break; case 3: E1_DIR_WRITE(INVERT_DIR(E1, HIGH)); break; \ + case 4: E2_DIR_WRITE(INVERT_DIR(E2, LOW )); break; \ } }while(0) #elif EXTRUDERS > 3 #define E_STEP_WRITE(E,V) do{ if (E < 2) { E0_STEP_WRITE(V); } else { E1_STEP_WRITE(V); } }while(0) #define NORM_E_DIR(E) do{ switch (E) { \ - case 0: E0_DIR_WRITE(DISABLED(INVERT_E0_DIR)); break; case 1: E0_DIR_WRITE( ENABLED(INVERT_E0_DIR)); break; \ - case 2: E1_DIR_WRITE(DISABLED(INVERT_E1_DIR)); break; case 3: E1_DIR_WRITE( ENABLED(INVERT_E1_DIR)); break; \ + case 0: E0_DIR_WRITE(INVERT_DIR(E0, HIGH)); break; case 1: E0_DIR_WRITE(INVERT_DIR(E0, LOW )); break; \ + case 2: E1_DIR_WRITE(INVERT_DIR(E1, HIGH)); break; case 3: E1_DIR_WRITE(INVERT_DIR(E1, LOW )); break; \ } }while(0) #define REV_E_DIR(E) do{ switch (E) { \ - case 0: E0_DIR_WRITE( ENABLED(INVERT_E0_DIR)); break; case 1: E0_DIR_WRITE(DISABLED(INVERT_E0_DIR)); break; \ - case 2: E1_DIR_WRITE( ENABLED(INVERT_E1_DIR)); break; case 3: E1_DIR_WRITE(DISABLED(INVERT_E1_DIR)); break; \ + case 0: E0_DIR_WRITE(INVERT_DIR(E0, LOW )); break; case 1: E0_DIR_WRITE(INVERT_DIR(E0, HIGH)); break; \ + case 2: E1_DIR_WRITE(INVERT_DIR(E1, LOW )); break; case 3: E1_DIR_WRITE(INVERT_DIR(E1, HIGH)); break; \ } }while(0) #elif EXTRUDERS > 2 #define E_STEP_WRITE(E,V) do{ if (E < 2) { E0_STEP_WRITE(V); } else { E1_STEP_WRITE(V); } }while(0) #define NORM_E_DIR(E) do{ switch (E) { \ - case 0: E0_DIR_WRITE(DISABLED(INVERT_E0_DIR)); break; case 1: E0_DIR_WRITE( ENABLED(INVERT_E0_DIR)); break; \ - case 2: E1_DIR_WRITE(DISABLED(INVERT_E1_DIR)); break; \ + case 0: E0_DIR_WRITE(INVERT_DIR(E0, HIGH)); break; case 1: E0_DIR_WRITE(INVERT_DIR(E0, LOW )); break; \ + case 2: E1_DIR_WRITE(INVERT_DIR(E1, HIGH)); break; \ } }while(0) #define REV_E_DIR(E) do{ switch (E) { \ - case 0: E0_DIR_WRITE( ENABLED(INVERT_E0_DIR)); break; case 1: E0_DIR_WRITE(DISABLED(INVERT_E0_DIR)); break; \ - case 2: E1_DIR_WRITE( ENABLED(INVERT_E1_DIR)); break; \ + case 0: E0_DIR_WRITE(INVERT_DIR(E0, LOW )); break; case 1: E0_DIR_WRITE(INVERT_DIR(E0, HIGH)); break; \ + case 2: E1_DIR_WRITE(INVERT_DIR(E1, LOW )); break; \ } }while(0) #else #define E_STEP_WRITE(E,V) E0_STEP_WRITE(V) - #define NORM_E_DIR(E) do{ E0_DIR_WRITE(E ? ENABLED(INVERT_E0_DIR) : DISABLED(INVERT_E0_DIR)); }while(0) - #define REV_E_DIR(E) do{ E0_DIR_WRITE(E ? DISABLED(INVERT_E0_DIR) : ENABLED(INVERT_E0_DIR)); }while(0) + #define NORM_E_DIR(E) do{ E0_DIR_WRITE(INVERT_DIR(E0, (E) ? LOW : HIGH)); }while(0) + #define REV_E_DIR(E) do{ E0_DIR_WRITE(INVERT_DIR(E0, (E) ? HIGH : LOW )); }while(0) #endif #elif HAS_PRUSA_MMU2 // One multiplexed stepper driver #define E_STEP_WRITE(E,V) E0_STEP_WRITE(V) - #define NORM_E_DIR(E) E0_DIR_WRITE(DISABLED(INVERT_E0_DIR)) - #define REV_E_DIR(E) E0_DIR_WRITE( ENABLED(INVERT_E0_DIR)) + #define NORM_E_DIR(E) E0_DIR_WRITE(INVERT_DIR(E0, HIGH)) + #define REV_E_DIR(E) E0_DIR_WRITE(INVERT_DIR(E0, LOW )) #elif HAS_PRUSA_MMU1 // One multiplexed stepper driver, reversed on odd index #define E_STEP_WRITE(E,V) E0_STEP_WRITE(V) - #define NORM_E_DIR(E) do{ E0_DIR_WRITE(TEST(E, 0) ? DISABLED(INVERT_E0_DIR): ENABLED(INVERT_E0_DIR)); }while(0) - #define REV_E_DIR(E) do{ E0_DIR_WRITE(TEST(E, 0) ? ENABLED(INVERT_E0_DIR): DISABLED(INVERT_E0_DIR)); }while(0) + #define NORM_E_DIR(E) do{ E0_DIR_WRITE(INVERT_DIR(E0, TEST(E, 0) ? HIGH : LOW )); }while(0) + #define REV_E_DIR(E) do{ E0_DIR_WRITE(INVERT_DIR(E0, TEST(E, 0) ? LOW : HIGH)); }while(0) #elif E_STEPPERS > 1 @@ -553,16 +555,16 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset case 4: E4_STEP_WRITE(V); break; case 5: E5_STEP_WRITE(V); break; case 6: E6_STEP_WRITE(V); break; case 7: E7_STEP_WRITE(V); break; \ } }while(0) #define _NORM_E_DIR(E) do{ switch (E) { \ - case 0: E0_DIR_WRITE(DISABLED(INVERT_E0_DIR)); break; case 1: E1_DIR_WRITE(DISABLED(INVERT_E1_DIR)); break; \ - case 2: E2_DIR_WRITE(DISABLED(INVERT_E2_DIR)); break; case 3: E3_DIR_WRITE(DISABLED(INVERT_E3_DIR)); break; \ - case 4: E4_DIR_WRITE(DISABLED(INVERT_E4_DIR)); break; case 5: E5_DIR_WRITE(DISABLED(INVERT_E5_DIR)); break; \ - case 6: E6_DIR_WRITE(DISABLED(INVERT_E6_DIR)); break; case 7: E7_DIR_WRITE(DISABLED(INVERT_E7_DIR)); break; \ + case 0: E0_DIR_WRITE(INVERT_DIR(E0, HIGH)); break; case 1: E1_DIR_WRITE(INVERT_DIR(E1, HIGH)); break; \ + case 2: E2_DIR_WRITE(INVERT_DIR(E2, HIGH)); break; case 3: E3_DIR_WRITE(INVERT_DIR(E3, HIGH)); break; \ + case 4: E4_DIR_WRITE(INVERT_DIR(E4, HIGH)); break; case 5: E5_DIR_WRITE(INVERT_DIR(E5, HIGH)); break; \ + case 6: E6_DIR_WRITE(INVERT_DIR(E6, HIGH)); break; case 7: E7_DIR_WRITE(INVERT_DIR(E7, HIGH)); break; \ } }while(0) #define _REV_E_DIR(E) do{ switch (E) { \ - case 0: E0_DIR_WRITE( ENABLED(INVERT_E0_DIR)); break; case 1: E1_DIR_WRITE( ENABLED(INVERT_E1_DIR)); break; \ - case 2: E2_DIR_WRITE( ENABLED(INVERT_E2_DIR)); break; case 3: E3_DIR_WRITE( ENABLED(INVERT_E3_DIR)); break; \ - case 4: E4_DIR_WRITE( ENABLED(INVERT_E4_DIR)); break; case 5: E5_DIR_WRITE( ENABLED(INVERT_E5_DIR)); break; \ - case 6: E6_DIR_WRITE( ENABLED(INVERT_E6_DIR)); break; case 7: E7_DIR_WRITE( ENABLED(INVERT_E7_DIR)); break; \ + case 0: E0_DIR_WRITE(INVERT_DIR(E0, LOW )); break; case 1: E1_DIR_WRITE(INVERT_DIR(E1, LOW )); break; \ + case 2: E2_DIR_WRITE(INVERT_DIR(E2, LOW )); break; case 3: E3_DIR_WRITE(INVERT_DIR(E3, LOW )); break; \ + case 4: E4_DIR_WRITE(INVERT_DIR(E4, LOW )); break; case 5: E5_DIR_WRITE(INVERT_DIR(E5, LOW )); break; \ + case 6: E6_DIR_WRITE(INVERT_DIR(E6, LOW )); break; case 7: E7_DIR_WRITE(INVERT_DIR(E7, LOW )); break; \ } }while(0) #elif E_STEPPERS > 6 @@ -572,16 +574,16 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset case 4: E4_STEP_WRITE(V); break; case 5: E5_STEP_WRITE(V); break; case 6: E6_STEP_WRITE(V); break; \ } }while(0) #define _NORM_E_DIR(E) do{ switch (E) { \ - case 0: E0_DIR_WRITE(DISABLED(INVERT_E0_DIR)); break; case 1: E1_DIR_WRITE(DISABLED(INVERT_E1_DIR)); break; \ - case 2: E2_DIR_WRITE(DISABLED(INVERT_E2_DIR)); break; case 3: E3_DIR_WRITE(DISABLED(INVERT_E3_DIR)); break; \ - case 4: E4_DIR_WRITE(DISABLED(INVERT_E4_DIR)); break; case 5: E5_DIR_WRITE(DISABLED(INVERT_E5_DIR)); break; \ - case 6: E6_DIR_WRITE(DISABLED(INVERT_E6_DIR)); break; \ + case 0: E0_DIR_WRITE(INVERT_DIR(E0, HIGH)); break; case 1: E1_DIR_WRITE(INVERT_DIR(E1, HIGH)); break; \ + case 2: E2_DIR_WRITE(INVERT_DIR(E2, HIGH)); break; case 3: E3_DIR_WRITE(INVERT_DIR(E3, HIGH)); break; \ + case 4: E4_DIR_WRITE(INVERT_DIR(E4, HIGH)); break; case 5: E5_DIR_WRITE(INVERT_DIR(E5, HIGH)); break; \ + case 6: E6_DIR_WRITE(INVERT_DIR(E6, HIGH)); break; \ } }while(0) #define _REV_E_DIR(E) do{ switch (E) { \ - case 0: E0_DIR_WRITE( ENABLED(INVERT_E0_DIR)); break; case 1: E1_DIR_WRITE( ENABLED(INVERT_E1_DIR)); break; \ - case 2: E2_DIR_WRITE( ENABLED(INVERT_E2_DIR)); break; case 3: E3_DIR_WRITE( ENABLED(INVERT_E3_DIR)); break; \ - case 4: E4_DIR_WRITE( ENABLED(INVERT_E4_DIR)); break; case 5: E5_DIR_WRITE( ENABLED(INVERT_E5_DIR)); break; \ - case 6: E6_DIR_WRITE( ENABLED(INVERT_E6_DIR)); break; \ + case 0: E0_DIR_WRITE(INVERT_DIR(E0, LOW )); break; case 1: E1_DIR_WRITE(INVERT_DIR(E1, LOW )); break; \ + case 2: E2_DIR_WRITE(INVERT_DIR(E2, LOW )); break; case 3: E3_DIR_WRITE(INVERT_DIR(E3, LOW )); break; \ + case 4: E4_DIR_WRITE(INVERT_DIR(E4, LOW )); break; case 5: E5_DIR_WRITE(INVERT_DIR(E5, LOW )); break; \ + case 6: E6_DIR_WRITE(INVERT_DIR(E6, LOW )); break; \ } }while(0) #elif E_STEPPERS > 5 @@ -591,14 +593,14 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset case 4: E4_STEP_WRITE(V); break; case 5: E5_STEP_WRITE(V); break; \ } }while(0) #define _NORM_E_DIR(E) do{ switch (E) { \ - case 0: E0_DIR_WRITE(DISABLED(INVERT_E0_DIR)); break; case 1: E1_DIR_WRITE(DISABLED(INVERT_E1_DIR)); break; \ - case 2: E2_DIR_WRITE(DISABLED(INVERT_E2_DIR)); break; case 3: E3_DIR_WRITE(DISABLED(INVERT_E3_DIR)); break; \ - case 4: E4_DIR_WRITE(DISABLED(INVERT_E4_DIR)); break; case 5: E5_DIR_WRITE(DISABLED(INVERT_E5_DIR)); break; \ + case 0: E0_DIR_WRITE(INVERT_DIR(E0, HIGH)); break; case 1: E1_DIR_WRITE(INVERT_DIR(E1, HIGH)); break; \ + case 2: E2_DIR_WRITE(INVERT_DIR(E2, HIGH)); break; case 3: E3_DIR_WRITE(INVERT_DIR(E3, HIGH)); break; \ + case 4: E4_DIR_WRITE(INVERT_DIR(E4, HIGH)); break; case 5: E5_DIR_WRITE(INVERT_DIR(E5, HIGH)); break; \ } }while(0) #define _REV_E_DIR(E) do{ switch (E) { \ - case 0: E0_DIR_WRITE( ENABLED(INVERT_E0_DIR)); break; case 1: E1_DIR_WRITE( ENABLED(INVERT_E1_DIR)); break; \ - case 2: E2_DIR_WRITE( ENABLED(INVERT_E2_DIR)); break; case 3: E3_DIR_WRITE( ENABLED(INVERT_E3_DIR)); break; \ - case 4: E4_DIR_WRITE( ENABLED(INVERT_E4_DIR)); break; case 5: E5_DIR_WRITE( ENABLED(INVERT_E5_DIR)); break; \ + case 0: E0_DIR_WRITE(INVERT_DIR(E0, LOW )); break; case 1: E1_DIR_WRITE(INVERT_DIR(E1, LOW )); break; \ + case 2: E2_DIR_WRITE(INVERT_DIR(E2, LOW )); break; case 3: E3_DIR_WRITE(INVERT_DIR(E3, LOW )); break; \ + case 4: E4_DIR_WRITE(INVERT_DIR(E4, LOW )); break; case 5: E5_DIR_WRITE(INVERT_DIR(E5, LOW )); break; \ } }while(0) #elif E_STEPPERS > 4 @@ -608,14 +610,14 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset case 4: E4_STEP_WRITE(V); break; \ } }while(0) #define _NORM_E_DIR(E) do{ switch (E) { \ - case 0: E0_DIR_WRITE(DISABLED(INVERT_E0_DIR)); break; case 1: E1_DIR_WRITE(DISABLED(INVERT_E1_DIR)); break; \ - case 2: E2_DIR_WRITE(DISABLED(INVERT_E2_DIR)); break; case 3: E3_DIR_WRITE(DISABLED(INVERT_E3_DIR)); break; \ - case 4: E4_DIR_WRITE(DISABLED(INVERT_E4_DIR)); break; \ + case 0: E0_DIR_WRITE(INVERT_DIR(E0, HIGH)); break; case 1: E1_DIR_WRITE(INVERT_DIR(E1, HIGH)); break; \ + case 2: E2_DIR_WRITE(INVERT_DIR(E2, HIGH)); break; case 3: E3_DIR_WRITE(INVERT_DIR(E3, HIGH)); break; \ + case 4: E4_DIR_WRITE(INVERT_DIR(E4, HIGH)); break; \ } }while(0) #define _REV_E_DIR(E) do{ switch (E) { \ - case 0: E0_DIR_WRITE( ENABLED(INVERT_E0_DIR)); break; case 1: E1_DIR_WRITE( ENABLED(INVERT_E1_DIR)); break; \ - case 2: E2_DIR_WRITE( ENABLED(INVERT_E2_DIR)); break; case 3: E3_DIR_WRITE( ENABLED(INVERT_E3_DIR)); break; \ - case 4: E4_DIR_WRITE( ENABLED(INVERT_E4_DIR)); break; \ + case 0: E0_DIR_WRITE(INVERT_DIR(E0, LOW )); break; case 1: E1_DIR_WRITE(INVERT_DIR(E1, LOW )); break; \ + case 2: E2_DIR_WRITE(INVERT_DIR(E2, LOW )); break; case 3: E3_DIR_WRITE(INVERT_DIR(E3, LOW )); break; \ + case 4: E4_DIR_WRITE(INVERT_DIR(E4, LOW )); break; \ } }while(0) #elif E_STEPPERS > 3 @@ -624,71 +626,41 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset case 0: E0_STEP_WRITE(V); break; case 1: E1_STEP_WRITE(V); break; case 2: E2_STEP_WRITE(V); break; case 3: E3_STEP_WRITE(V); break; \ } }while(0) #define _NORM_E_DIR(E) do{ switch (E) { \ - case 0: E0_DIR_WRITE(DISABLED(INVERT_E0_DIR)); break; case 1: E1_DIR_WRITE(DISABLED(INVERT_E1_DIR)); break; \ - case 2: E2_DIR_WRITE(DISABLED(INVERT_E2_DIR)); break; case 3: E3_DIR_WRITE(DISABLED(INVERT_E3_DIR)); break; \ + case 0: E0_DIR_WRITE(INVERT_DIR(E0, HIGH)); break; case 1: E1_DIR_WRITE(INVERT_DIR(E1, HIGH)); break; \ + case 2: E2_DIR_WRITE(INVERT_DIR(E2, HIGH)); break; case 3: E3_DIR_WRITE(INVERT_DIR(E3, HIGH)); break; \ } }while(0) #define _REV_E_DIR(E) do{ switch (E) { \ - case 0: E0_DIR_WRITE( ENABLED(INVERT_E0_DIR)); break; case 1: E1_DIR_WRITE( ENABLED(INVERT_E1_DIR)); break; \ - case 2: E2_DIR_WRITE( ENABLED(INVERT_E2_DIR)); break; case 3: E3_DIR_WRITE( ENABLED(INVERT_E3_DIR)); break; \ + case 0: E0_DIR_WRITE(INVERT_DIR(E0, LOW )); break; case 1: E1_DIR_WRITE(INVERT_DIR(E1, LOW )); break; \ + case 2: E2_DIR_WRITE(INVERT_DIR(E2, LOW )); break; case 3: E3_DIR_WRITE(INVERT_DIR(E3, LOW )); break; \ } }while(0) #elif E_STEPPERS > 2 #define _E_STEP_WRITE(E,V) do{ switch (E) { case 0: E0_STEP_WRITE(V); break; case 1: E1_STEP_WRITE(V); break; case 2: E2_STEP_WRITE(V); } }while(0) - #define _NORM_E_DIR(E) do{ switch (E) { case 0: E0_DIR_WRITE(DISABLED(INVERT_E0_DIR)); break; case 1: E1_DIR_WRITE(DISABLED(INVERT_E1_DIR)); break; case 2: E2_DIR_WRITE(DISABLED(INVERT_E2_DIR)); } }while(0) - #define _REV_E_DIR(E) do{ switch (E) { case 0: E0_DIR_WRITE( ENABLED(INVERT_E0_DIR)); break; case 1: E1_DIR_WRITE( ENABLED(INVERT_E1_DIR)); break; case 2: E2_DIR_WRITE( ENABLED(INVERT_E2_DIR)); } }while(0) + #define _NORM_E_DIR(E) do{ switch (E) { case 0: E0_DIR_WRITE(INVERT_DIR(E0, HIGH)); break; case 1: E1_DIR_WRITE(INVERT_DIR(E1, HIGH)); break; case 2: E2_DIR_WRITE(INVERT_DIR(E2, HIGH)); } }while(0) + #define _REV_E_DIR(E) do{ switch (E) { case 0: E0_DIR_WRITE(INVERT_DIR(E0, LOW )); break; case 1: E1_DIR_WRITE(INVERT_DIR(E1, LOW )); break; case 2: E2_DIR_WRITE(INVERT_DIR(E2, LOW )); } }while(0) #else #define _E_STEP_WRITE(E,V) do{ if (E == 0) { E0_STEP_WRITE(V); } else { E1_STEP_WRITE(V); } }while(0) - #define _NORM_E_DIR(E) do{ if (E == 0) { E0_DIR_WRITE(DISABLED(INVERT_E0_DIR)); } else { E1_DIR_WRITE(DISABLED(INVERT_E1_DIR)); } }while(0) - #define _REV_E_DIR(E) do{ if (E == 0) { E0_DIR_WRITE( ENABLED(INVERT_E0_DIR)); } else { E1_DIR_WRITE( ENABLED(INVERT_E1_DIR)); } }while(0) + #define _NORM_E_DIR(E) do{ if (E == 0) { E0_DIR_WRITE(INVERT_DIR(E0, HIGH)); } else { E1_DIR_WRITE(INVERT_DIR(E1, HIGH)); } }while(0) + #define _REV_E_DIR(E) do{ if (E == 0) { E0_DIR_WRITE(INVERT_DIR(E0, LOW )); } else { E1_DIR_WRITE(INVERT_DIR(E1, LOW )); } }while(0) #endif #if HAS_DUPLICATION_MODE #if ENABLED(MULTI_NOZZLE_DUPLICATION) - #define _DUPE(N,T,V) do{ if (TEST(duplication_e_mask, N)) E##N##_##T##_WRITE(V); }while(0) + #define DUPE(N,T,V) do{ if (TEST(duplication_e_mask, N)) E##N##_##T##_WRITE(V); }while(0); #else - #define _DUPE(N,T,V) E##N##_##T##_WRITE(V) + #define DUPE(N,T,V) E##N##_##T##_WRITE(V); #endif - #define NDIR(N) _DUPE(N,DIR,DISABLED(INVERT_E##N##_DIR)) - #define RDIR(N) _DUPE(N,DIR, ENABLED(INVERT_E##N##_DIR)) + #define NDIR(N) DUPE(N,DIR,INVERT_DIR(E, HIGH)); + #define RDIR(N) DUPE(N,DIR,INVERT_DIR(E, LOW )); - #define E_STEP_WRITE(E,V) do{ if (extruder_duplication_enabled) { DUPE(STEP,V); } else _E_STEP_WRITE(E,V); }while(0) - - #if E_STEPPERS > 2 - #if E_STEPPERS > 7 - #define DUPE(T,V) do{ _DUPE(0,T,V); _DUPE(1,T,V); _DUPE(2,T,V); _DUPE(3,T,V); _DUPE(4,T,V); _DUPE(5,T,V); _DUPE(6,T,V); _DUPE(7,T,V); }while(0) - #define NORM_E_DIR(E) do{ if (extruder_duplication_enabled) { NDIR(0); NDIR(1); NDIR(2); NDIR(3); NDIR(4); NDIR(5); NDIR(6); NDIR(7); } else _NORM_E_DIR(E); }while(0) - #define REV_E_DIR(E) do{ if (extruder_duplication_enabled) { RDIR(0); RDIR(1); RDIR(2); RDIR(3); RDIR(4); RDIR(5); RDIR(6); RDIR(7); } else _REV_E_DIR(E); }while(0) - #elif E_STEPPERS > 6 - #define DUPE(T,V) do{ _DUPE(0,T,V); _DUPE(1,T,V); _DUPE(2,T,V); _DUPE(3,T,V); _DUPE(4,T,V); _DUPE(5,T,V); _DUPE(6,T,V); }while(0) - #define NORM_E_DIR(E) do{ if (extruder_duplication_enabled) { NDIR(0); NDIR(1); NDIR(2); NDIR(3); NDIR(4); NDIR(5); NDIR(6); } else _NORM_E_DIR(E); }while(0) - #define REV_E_DIR(E) do{ if (extruder_duplication_enabled) { RDIR(0); RDIR(1); RDIR(2); RDIR(3); RDIR(4); RDIR(5); RDIR(6); } else _REV_E_DIR(E); }while(0) - #elif E_STEPPERS > 5 - #define DUPE(T,V) do{ _DUPE(0,T,V); _DUPE(1,T,V); _DUPE(2,T,V); _DUPE(3,T,V); _DUPE(4,T,V); _DUPE(5,T,V); }while(0) - #define NORM_E_DIR(E) do{ if (extruder_duplication_enabled) { NDIR(0); NDIR(1); NDIR(2); NDIR(3); NDIR(4); NDIR(5); } else _NORM_E_DIR(E); }while(0) - #define REV_E_DIR(E) do{ if (extruder_duplication_enabled) { RDIR(0); RDIR(1); RDIR(2); RDIR(3); RDIR(4); RDIR(5); } else _REV_E_DIR(E); }while(0) - #elif E_STEPPERS > 4 - #define DUPE(T,V) do{ _DUPE(0,T,V); _DUPE(1,T,V); _DUPE(2,T,V); _DUPE(3,T,V); _DUPE(4,T,V); }while(0) - #define NORM_E_DIR(E) do{ if (extruder_duplication_enabled) { NDIR(0); NDIR(1); NDIR(2); NDIR(3); NDIR(4); } else _NORM_E_DIR(E); }while(0) - #define REV_E_DIR(E) do{ if (extruder_duplication_enabled) { RDIR(0); RDIR(1); RDIR(2); RDIR(3); RDIR(4); } else _REV_E_DIR(E); }while(0) - #elif E_STEPPERS > 3 - #define DUPE(T,V) do{ _DUPE(0,T,V); _DUPE(1,T,V); _DUPE(2,T,V); _DUPE(3,T,V); }while(0) - #define NORM_E_DIR(E) do{ if (extruder_duplication_enabled) { NDIR(0); NDIR(1); NDIR(2); NDIR(3); } else _NORM_E_DIR(E); }while(0) - #define REV_E_DIR(E) do{ if (extruder_duplication_enabled) { RDIR(0); RDIR(1); RDIR(2); RDIR(3); } else _REV_E_DIR(E); }while(0) - #else - #define DUPE(T,V) do{ _DUPE(0,T,V); _DUPE(1,T,V); _DUPE(2,T,V); }while(0) - #define NORM_E_DIR(E) do{ if (extruder_duplication_enabled) { NDIR(0); NDIR(1); NDIR(2); } else _NORM_E_DIR(E); }while(0) - #define REV_E_DIR(E) do{ if (extruder_duplication_enabled) { RDIR(0); RDIR(1); RDIR(2); } else _REV_E_DIR(E); }while(0) - #endif - #else - #define DUPE(T,V) do{ _DUPE(0,T,V); _DUPE(1,T,V); }while(0) - #define NORM_E_DIR(E) do{ if (extruder_duplication_enabled) { NDIR(0); NDIR(1); } else _NORM_E_DIR(E); }while(0) - #define REV_E_DIR(E) do{ if (extruder_duplication_enabled) { RDIR(0); RDIR(1); } else _REV_E_DIR(E); }while(0) - #endif + #define E_STEP_WRITE(E,V) do{ if (extruder_duplication_enabled) { REPEAT2(E_STEPPERS, DUPE, STEP, V); } else _E_STEP_WRITE(E,V); }while(0) + #define NORM_E_DIR(E) do{ if (extruder_duplication_enabled) { REPEAT(E_STEPPERS, NDIR); } else _NORM_E_DIR(E); }while(0) + #define REV_E_DIR(E) do{ if (extruder_duplication_enabled) { REPEAT(E_STEPPERS, RDIR); } else _REV_E_DIR(E); }while(0) #else @@ -700,13 +672,13 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #elif ENABLED(E_DUAL_STEPPER_DRIVERS) #define E_STEP_WRITE(E,V) do{ E0_STEP_WRITE(V); E1_STEP_WRITE(V); }while(0) - #define NORM_E_DIR(E) do{ E0_DIR_WRITE(DISABLED(INVERT_E0_DIR)); E1_DIR_WRITE(DISABLED(INVERT_E0_DIR) ^ ENABLED(INVERT_E1_VS_E0_DIR)); }while(0) - #define REV_E_DIR(E) do{ E0_DIR_WRITE( ENABLED(INVERT_E0_DIR)); E1_DIR_WRITE( ENABLED(INVERT_E0_DIR) ^ ENABLED(INVERT_E1_VS_E0_DIR)); }while(0) + #define NORM_E_DIR(E) do{ constexpr bool d = INVERT_DIR(E0, HIGH); E0_DIR_WRITE(d); E1_DIR_WRITE(INVERT_DIR(E1_VS_E0, d)); }while(0) + #define REV_E_DIR(E) do{ constexpr bool d = INVERT_DIR(E0, LOW ); E0_DIR_WRITE(d); E1_DIR_WRITE(INVERT_DIR(E1_VS_E0, d)); }while(0) #elif E_STEPPERS #define E_STEP_WRITE(E,V) E0_STEP_WRITE(V) - #define NORM_E_DIR(E) E0_DIR_WRITE(DISABLED(INVERT_E0_DIR)) - #define REV_E_DIR(E) E0_DIR_WRITE( ENABLED(INVERT_E0_DIR)) + #define NORM_E_DIR(E) E0_DIR_WRITE(INVERT_DIR(E0, HIGH)) + #define REV_E_DIR(E) E0_DIR_WRITE(INVERT_DIR(E0, LOW )) #else #define E_STEP_WRITE(E,V) NOOP From 7e700c13948506ab0fc57719c7c1bd35f0cb33c4 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 5 Apr 2023 13:54:09 -0500 Subject: [PATCH 124/225] =?UTF-8?q?=F0=9F=94=A7=20Move=20DOGLCD=20options?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration.h | 20 ----------- Marlin/Configuration_adv.h | 33 ++++++++++++++----- .../stm32f4/pins_MKS_ROBIN_NANO_V3_common.h | 1 - .../src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h | 1 - 4 files changed, 25 insertions(+), 30 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index d36ceab491..4fa07c0871 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -63,26 +63,6 @@ #define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. //#define CUSTOM_VERSION_FILE Version.h // Path from the root directory (no quotes) -/** - * *** VENDORS PLEASE READ *** - * - * Marlin allows you to add a custom boot image for Graphical LCDs. - * With this option Marlin will first show your custom screen followed - * by the standard Marlin logo with version number and web URL. - * - * We encourage you to take advantage of this new feature and we also - * respectfully request that you retain the unmodified Marlin boot screen. - */ - -// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** -#define SHOW_BOOTSCREEN - -// Show the bitmap in Marlin/_Bootscreen.h on startup. -//#define SHOW_CUSTOM_BOOTSCREEN - -// Show the bitmap in Marlin/_Statusscreen.h on the status screen. -//#define CUSTOM_STATUS_SCREEN_IMAGE - // @section machine // Choose the name from boards.h that matches your setup diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 18e5d9e647..cbc85283a3 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -989,7 +989,7 @@ #endif // BLTOUCH -// @section extras +// @section calibration /** * Z Steppers Auto-Alignment @@ -1508,19 +1508,36 @@ #endif // HAS_MARLINUI_MENU #if HAS_DISPLAY + /** + * *** VENDORS PLEASE READ *** + * + * Marlin allows you to add a custom boot image for Graphical LCDs. + * With this option Marlin will first show your custom screen followed + * by the standard Marlin logo with version number and web URL. + * + * We encourage you to take advantage of this new feature and we also + * respectfully request that you retain the unmodified Marlin boot screen. + */ + #if ANY(HAS_MARLINUI_U8GLIB, TOUCH_UI_FTDI_EVE, IS_DWIN_MARLINUI) + #define SHOW_BOOTSCREEN // Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION ** + #if ENABLED(SHOW_BOOTSCREEN) + #define BOOTSCREEN_TIMEOUT 4000 // (ms) Total Duration to display the boot screen(s) + #if EITHER(HAS_MARLINUI_U8GLIB, TFT_COLOR_UI) + #define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving lots of flash) + #endif + //#define SHOW_CUSTOM_BOOTSCREEN // Show the bitmap in Marlin/_Bootscreen.h on startup. + #endif + #if HAS_MARLINUI_U8GLIB + //#define CUSTOM_STATUS_SCREEN_IMAGE // Show the bitmap in Marlin/_Statusscreen.h on the status screen. + #endif + #endif + //#define SOUND_MENU_ITEM // Add a mute option to the LCD menu #define SOUND_ON_DEFAULT // Buzzer/speaker default enabled state // The timeout to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 // (ms) - #if ENABLED(SHOW_BOOTSCREEN) - #define BOOTSCREEN_TIMEOUT 4000 // (ms) Total Duration to display the boot screen(s) - #if EITHER(HAS_MARLINUI_U8GLIB, TFT_COLOR_UI) - #define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving lots of flash) - #endif - #endif - // Scroll a longer status message into view //#define STATUS_MESSAGE_SCROLLING diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h index a687cb9c9d..fed0dc9fa5 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h @@ -342,7 +342,6 @@ // Required for MKS_MINI_12864 with this board //#define MKS_LCD12864B - //#undef SHOW_BOOTSCREEN #elif ENABLED(FYSETC_MINI_12864_2_1) #define LCD_PINS_DC EXP1_04_PIN diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h index 8fdb417805..82c52ad984 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h @@ -356,7 +356,6 @@ // Required for MKS_MINI_12864 with this board //#define MKS_LCD12864B - //#undef SHOW_BOOTSCREEN #else // !MKS_MINI_12864 From 42a5ae8716072d16badadd62fee38368909ae412 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 6 Apr 2023 16:58:12 -0500 Subject: [PATCH 125/225] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Upd?= =?UTF-8?q?ate=20pinsformat.js?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buildroot/share/scripts/pinsformat.js | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/buildroot/share/scripts/pinsformat.js b/buildroot/share/scripts/pinsformat.js index a82c2f2659..1ce0d75d9a 100755 --- a/buildroot/share/scripts/pinsformat.js +++ b/buildroot/share/scripts/pinsformat.js @@ -27,9 +27,9 @@ String.prototype.rpad = function(len, chr) { return s; }; -const mpatt = [ '-?\\d+', 'P[A-I]\\d+', 'P\\d_\\d+' ], - definePatt = new RegExp(`^\\s*(//)?#define\\s+[A-Z_][A-Z0-9_]+\\s+(${mpatt[0]}|${mpatt[1]}|${mpatt[2]})\\s*(//.*)?$`, 'gm'), - ppad = [ 3, 4, 5 ], +const mpatt = [ '-?\\d{1,3}', 'P[A-I]\\d+', 'P\\d_\\d+', 'Pin[A-Z]\\d\\b' ], + definePatt = new RegExp(`^\\s*(//)?#define\\s+[A-Z_][A-Z0-9_]+\\s+(${mpatt[0]}|${mpatt[1]}|${mpatt[2]}|${mpatt[3]})\\s*(//.*)?$`, 'gm'), + ppad = [ 3, 4, 5, 5 ], col_comment = 50, col_value_rj = col_comment - 3; @@ -55,7 +55,7 @@ else // Find the pin pattern so non-pin defines can be skipped function get_pin_pattern(txt) { - var r, m = 0, match_count = [ 0, 0, 0 ]; + var r, m = 0, match_count = [ 0, 0, 0, 0 ]; definePatt.lastIndex = 0; while ((r = definePatt.exec(txt)) !== null) { let ind = -1; @@ -65,7 +65,7 @@ function get_pin_pattern(txt) { return r[2].match(p); }) ) { const m = ++match_count[ind]; - if (m >= 10) { + if (m >= 5) { return { match: mpatt[ind], pad:ppad[ind] }; } } @@ -79,7 +79,8 @@ function process_text(txt) { if (!patt) return txt; const pindefPatt = new RegExp(`^(\\s*(//)?#define)\\s+([A-Z_][A-Z0-9_]+)\\s+(${patt.match})\\s*(//.*)?$`), noPinPatt = new RegExp(`^(\\s*(//)?#define)\\s+([A-Z_][A-Z0-9_]+)\\s+(-1)\\s*(//.*)?$`), - skipPatt = new RegExp('^(\\s*(//)?#define)\\s+(AT90USB|USBCON|BOARD_.+|.+_MACHINE_NAME|.+_SERIAL)\\s+(.+)\\s*(//.*)?$'), + skipPatt1 = new RegExp('^(\\s*(//)?#define)\\s+(AT90USB|USBCON|(BOARD|DAC|FLASH|HAS|IS|USE)_.+|.+_(ADDRESS|AVAILABLE|BAUDRATE|CLOCK|CONNECTION|DEFAULT|FREQ|ITEM|MODULE|NAME|ONLY|PERIOD|RANGE|RATE|SERIAL|SIZE|SPI|STATE|STEP|TIMER))\\s+(.+)\\s*(//.*)?$'), + skipPatt2 = new RegExp('^(\\s*(//)?#define)\\s+([A-Z_][A-Z0-9_]+)\\s+(0x[0-9A-Fa-f]+|\d+|.+[a-z].+)\\s*(//.*)?$'), aliasPatt = new RegExp('^(\\s*(//)?#define)\\s+([A-Z_][A-Z0-9_]+)\\s+([A-Z_][A-Z0-9_()]+)\\s*(//.*)?$'), switchPatt = new RegExp('^(\\s*(//)?#define)\\s+([A-Z_][A-Z0-9_]+)\\s*(//.*)?$'), undefPatt = new RegExp('^(\\s*(//)?#undef)\\s+([A-Z_][A-Z0-9_]+)\\s*(//.*)?$'), @@ -96,6 +97,12 @@ function process_text(txt) { // Comments in column 45 line = ''.rpad(col_comment) + r[1]; + else if (skipPatt1.exec(line) !== null) { + // + // #define SKIP_ME + // + if (do_log) console.log("skip:", line); + } else if ((r = pindefPatt.exec(line)) !== null) { // // #define MY_PIN [pin] @@ -115,7 +122,7 @@ function process_text(txt) { line = line.rpad(col_value_lj) + '-1'; if (r[5]) line = line.rpad(col_comment) + r[5]; } - else if ((r = skipPatt.exec(line)) !== null) { + else if (skipPatt2.exec(line) !== null) { // // #define SKIP_ME // From 5b1f087c5b79fa7797aca5acc22a72570a36b64a Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 6 Apr 2023 17:24:32 -0500 Subject: [PATCH 126/225] =?UTF-8?q?=F0=9F=93=9D=20Update=20Ender=20#=20lab?= =?UTF-8?q?els?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- Marlin/src/inc/SanityCheck.h | 2 +- Marlin/src/lcd/e3v2/README.md | 4 ++-- Marlin/src/lcd/e3v2/creality/dwin.cpp | 2 +- Marlin/src/lcd/e3v2/jyersui/README.md | 4 ++-- Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp | 2 +- Marlin/src/lcd/e3v2/proui/base64.hpp | 2 +- Marlin/src/libs/BL24CXX.h | 2 +- Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h | 2 +- Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h | 6 +++--- Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h | 6 +++--- Marlin/src/pins/samd/pins_MINITRONICS20.h | 6 +++--- Marlin/src/pins/stm32f1/pins_CREALITY_V24S1.h | 2 +- Marlin/src/pins/stm32f1/pins_CREALITY_V24S1_301.h | 4 ++-- Marlin/src/pins/stm32f1/pins_CREALITY_V4.h | 2 +- Marlin/src/pins/stm32f4/pins_CREALITY_V24S1_301F4.h | 2 +- buildroot/share/dwin/bin/README.md | 2 +- buildroot/tests/STM32F103RE_creality | 4 ++-- buildroot/tests/STM32F401RC_creality | 2 +- buildroot/tests/melzi_optiboot | 4 ++-- 20 files changed, 31 insertions(+), 31 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index efc5972325..b40d881a75 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -100,7 +100,7 @@ body: - type: input attributes: label: Printer model - description: Creality Ender 3, Prusa mini, or Kossel Delta? + description: Creality Ender-3, Prusa mini, or Kossel Delta? - type: input attributes: diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index ce657f24a6..5a0168e845 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -3274,7 +3274,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #endif /** - * Ender 3 V2 controller has some limitations + * Ender-3 V2 controller has some limitations */ #if ENABLED(DWIN_CREALITY_LCD) #if DISABLED(SDSUPPORT) diff --git a/Marlin/src/lcd/e3v2/README.md b/Marlin/src/lcd/e3v2/README.md index 91f25e2433..09055d03a4 100644 --- a/Marlin/src/lcd/e3v2/README.md +++ b/Marlin/src/lcd/e3v2/README.md @@ -1,6 +1,6 @@ -# DWIN for Creality Ender 3 v2 +# DWIN for Creality Ender-3 v2 -Marlin's Ender 3 v2 support requires the `DWIN_SET` included with the Ender 3 V2 [example configuration](https://github.com/MarlinFirmware/Configurations/tree/bugfix-2.1.x/config/examples/Creality/Ender-3%20V2). +Marlin's Ender-3 v2 support requires the `DWIN_SET` included with the Ender-3 V2 [example configuration](https://github.com/MarlinFirmware/Configurations/tree/bugfix-2.1.x/config/examples/Creality/Ender-3%20V2). ## Easy Install diff --git a/Marlin/src/lcd/e3v2/creality/dwin.cpp b/Marlin/src/lcd/e3v2/creality/dwin.cpp index 459b00ae1b..02bfa624fa 100644 --- a/Marlin/src/lcd/e3v2/creality/dwin.cpp +++ b/Marlin/src/lcd/e3v2/creality/dwin.cpp @@ -2243,7 +2243,7 @@ void HMI_SelectFile() { card.openAndPrintFile(card.filename); #if HAS_FAN - // All fans on for Ender 3 v2 ? + // All fans on for Ender-3 v2 ? // The slicer should manage this for us. //for (uint8_t i = 0; i < FAN_COUNT; i++) // thermalManager.fan_speed[i] = 255; diff --git a/Marlin/src/lcd/e3v2/jyersui/README.md b/Marlin/src/lcd/e3v2/jyersui/README.md index 91f25e2433..09055d03a4 100644 --- a/Marlin/src/lcd/e3v2/jyersui/README.md +++ b/Marlin/src/lcd/e3v2/jyersui/README.md @@ -1,6 +1,6 @@ -# DWIN for Creality Ender 3 v2 +# DWIN for Creality Ender-3 v2 -Marlin's Ender 3 v2 support requires the `DWIN_SET` included with the Ender 3 V2 [example configuration](https://github.com/MarlinFirmware/Configurations/tree/bugfix-2.1.x/config/examples/Creality/Ender-3%20V2). +Marlin's Ender-3 v2 support requires the `DWIN_SET` included with the Ender-3 V2 [example configuration](https://github.com/MarlinFirmware/Configurations/tree/bugfix-2.1.x/config/examples/Creality/Ender-3%20V2). ## Easy Install diff --git a/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp b/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp index 680173bd12..5ec94b853f 100644 --- a/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp +++ b/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp @@ -262,7 +262,7 @@ FORCE_INLINE void _draw_feedrate_status(const char *value, uint16_t x, uint16_t } /** - * Draw the MarlinUI Status Screen for Ender 3 V2 + * Draw the MarlinUI Status Screen for Ender-3 V2 */ void MarlinUI::draw_status_screen() { const bool blink = get_blink(); diff --git a/Marlin/src/lcd/e3v2/proui/base64.hpp b/Marlin/src/lcd/e3v2/proui/base64.hpp index d82d0b27e8..a51cca7c52 100644 --- a/Marlin/src/lcd/e3v2/proui/base64.hpp +++ b/Marlin/src/lcd/e3v2/proui/base64.hpp @@ -5,7 +5,7 @@ * Author: Densaugeo * Maintainer: Densaugeo * Version: 1.2.1.1 - * Changed unsigned int to uint16_t for use in the professional Ender 3V2/S1 firmware + * Changed unsigned int to uint16_t for use in the professional Ender-3V2/S1 firmware * Url: https://www.arduino.cc/reference/en/libraries/base64/ */ diff --git a/Marlin/src/libs/BL24CXX.h b/Marlin/src/libs/BL24CXX.h index b069c196c0..654ceffc3e 100644 --- a/Marlin/src/libs/BL24CXX.h +++ b/Marlin/src/libs/BL24CXX.h @@ -23,7 +23,7 @@ /******************************************************************************** * @file BL24CXX.h - * @brief i2c EEPROM for Ender 3 v2 board (4.2.2) + * @brief i2c EEPROM for Ender-3 v2 board (4.2.2) ********************************************************************************/ /******************** IIC ********************/ diff --git a/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h b/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h index 70f7f748c0..f8187babd3 100644 --- a/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h +++ b/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h @@ -211,7 +211,7 @@ #endif /** - * Ender 3 V2 display SKR E3 Turbo (EXP1) Ender 3 V2 display --> SKR E3 Turbo + * Ender-3 V2 display SKR E3 Turbo (EXP1) Ender-3 V2 display --> SKR E3 Turbo * ------ ------ RX 3 --> 5 P0_15 * -- | 1 2 | -- (BEEPER) P2_08 |10 9 | P0_16 (BTN_ENC) TX 4 --> 9 P0_16 * (SKR_TX1) RX | 3 4 | TX (SKR_RX1) (BTN_EN1) P0_19 | 8 7 | RESET BEEPER 6 --> 10 P2_08 diff --git a/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h b/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h index 5cd2584104..662cccacfc 100644 --- a/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h +++ b/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h @@ -203,10 +203,10 @@ * This section starts with the pins_RAMPS_144.h as example, after if you need any new * display, you could use normal duponts and connect it with with the scheme showed before. * Tested: - * - Ender 3 Old display (Character LCD) - * - Ender 3 New Serial DWING Display + * - Ender-3 Old display (Character LCD) + * - Ender-3 New Serial DWING Display * - Reprap Display - * - Ender 5 New Serial Display + * - Ender-5 New Serial Display * - Any Reprap character display like */ diff --git a/Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h b/Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h index 13434fffeb..b70db129a7 100644 --- a/Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h +++ b/Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h @@ -255,10 +255,10 @@ * This sections starts with the pins_RAMPS_144.h as example, after if you need any new * display, you could use normal duponts and connect it with with the scheme showed before. * Tested: - * - Ender 3 Old display (Character LCD) - * - Ender 3 New Serial DWING Display + * - Ender-3 Old display (Character LCD) + * - Ender-3 New Serial DWING Display * - Reprap Display - * - Ender 5 New Serial Display + * - Ender-5 New Serial Display * - Any Reprap character display like */ diff --git a/Marlin/src/pins/samd/pins_MINITRONICS20.h b/Marlin/src/pins/samd/pins_MINITRONICS20.h index 12438fe57e..d2a2a27d7c 100644 --- a/Marlin/src/pins/samd/pins_MINITRONICS20.h +++ b/Marlin/src/pins/samd/pins_MINITRONICS20.h @@ -174,10 +174,10 @@ * This sections starts with the pins_RAMPS_144.h as example, after if you need any new * display, you could use normal duponts and connect it with with the scheme showed before. * Tested: - * - Ender 3 Old display (Character LCD) - * - Ender 3 New Serial DWING Display + * - Ender-3 Old display (Character LCD) + * - Ender-3 New Serial DWING Display * - Reprap Display - * - Ender 5 New Serial Display + * - Ender-5 New Serial Display * - Any Reprap character display like */ diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1.h index 0d2ad835d3..f7a73de284 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 + * 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_V24S1_301.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1_301.h index 7a8f3189aa..4276db5e9f 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1_301.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1_301.h @@ -22,7 +22,7 @@ #pragma once /** - * Creality V24S1_301 (STM32F103RE / STM32F103RC) board pin assignments as found on Ender 3 S1. + * Creality V24S1_301 (STM32F103RE / STM32F103RC) board pin assignments as found on Ender-3 S1. * Also supports the STM32F4 version of the board with identical pin mapping. */ @@ -40,7 +40,7 @@ #define BOARD_INFO_NAME "Creality V24S1-301" #endif #ifndef DEFAULT_MACHINE_NAME - #define DEFAULT_MACHINE_NAME "Ender 3 S1" + #define DEFAULT_MACHINE_NAME "Ender-3 S1" #endif // diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h index e71fec0181..00de57ff58 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h @@ -35,7 +35,7 @@ #define BOARD_INFO_NAME "Creality V4" #endif #ifndef DEFAULT_MACHINE_NAME - #define DEFAULT_MACHINE_NAME "Ender 3 V2" + #define DEFAULT_MACHINE_NAME "Ender-3 V2" #endif #define BOARD_NO_NATIVE_USB diff --git a/Marlin/src/pins/stm32f4/pins_CREALITY_V24S1_301F4.h b/Marlin/src/pins/stm32f4/pins_CREALITY_V24S1_301F4.h index 883640d577..32f70a3715 100644 --- a/Marlin/src/pins/stm32f4/pins_CREALITY_V24S1_301F4.h +++ b/Marlin/src/pins/stm32f4/pins_CREALITY_V24S1_301F4.h @@ -22,7 +22,7 @@ #pragma once /** - * Creality V24S1_301F4 (STM32F401RC) board pin assignments as found on Ender 3 S1. + * Creality V24S1_301F4 (STM32F401RC) board pin assignments as found on Ender-3 S1. */ #ifndef BOARD_INFO_NAME diff --git a/buildroot/share/dwin/bin/README.md b/buildroot/share/dwin/bin/README.md index 9d513bc0c8..4a9b4687ab 100644 --- a/buildroot/share/dwin/bin/README.md +++ b/buildroot/share/dwin/bin/README.md @@ -4,7 +4,7 @@ Tools for processing `.ICO` files used by DWIN displays. ## Introduction -The DWIN LCDs that come with the Creality Ender 3 v2 and other 3D printers contain image and container files stored on them which are used to draw various the UI elements. +The DWIN LCDs that come with the Creality Ender-3 v2 and other 3D printers contain image and container files stored on them which are used to draw various the UI elements. Standard `.JPG` files can be installed for things like the boot screen, and `.ICO` files can contain several images within a structured file format. diff --git a/buildroot/tests/STM32F103RE_creality b/buildroot/tests/STM32F103RE_creality index a05f1d96be..6677559720 100755 --- a/buildroot/tests/STM32F103RE_creality +++ b/buildroot/tests/STM32F103RE_creality @@ -11,12 +11,12 @@ set -e # use_example_configs "Creality/Ender-3 V2/CrealityV422/CrealityUI" opt_enable MARLIN_DEV_MODE BUFFER_MONITORING BLTOUCH AUTO_BED_LEVELING_BILINEAR Z_SAFE_HOMING -exec_test $1 $2 "Ender 3 v2 with CrealityUI" "$3" +exec_test $1 $2 "Ender-3 v2 with CrealityUI" "$3" use_example_configs "Creality/Ender-3 V2/CrealityV422/CrealityUI" opt_disable DWIN_CREALITY_LCD opt_enable DWIN_CREALITY_LCD_JYERSUI AUTO_BED_LEVELING_BILINEAR PROBE_MANUALLY -exec_test $1 $2 "Ender 3 v2 with JyersUI" "$3" +exec_test $1 $2 "Ender-3 v2 with JyersUI" "$3" use_example_configs "Creality/Ender-3 S1/STM32F1" opt_disable DWIN_CREALITY_LCD Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN AUTO_BED_LEVELING_BILINEAR CONFIGURATION_EMBEDDING CANCEL_OBJECTS FWRETRACT diff --git a/buildroot/tests/STM32F401RC_creality b/buildroot/tests/STM32F401RC_creality index 380711d061..fbc5194d60 100755 --- a/buildroot/tests/STM32F401RC_creality +++ b/buildroot/tests/STM32F401RC_creality @@ -9,7 +9,7 @@ set -e use_example_configs "Creality/Ender-3 V2/CrealityV422/MarlinUI" opt_add SDCARD_EEPROM_EMULATION AUTO_BED_LEVELING_BILINEAR Z_SAFE_HOMING opt_set MOTHERBOARD BOARD_CREALITY_V24S1_301F4 -exec_test $1 $2 "Ender 3 v2 with MarlinUI" "$3" +exec_test $1 $2 "Ender-3 v2 with MarlinUI" "$3" # clean up restore_configs diff --git a/buildroot/tests/melzi_optiboot b/buildroot/tests/melzi_optiboot index f31c69cdcb..086fcc9169 100755 --- a/buildroot/tests/melzi_optiboot +++ b/buildroot/tests/melzi_optiboot @@ -7,10 +7,10 @@ set -e # -# Ender 2 +# Ender-2 # use_example_configs Creality/Ender-2 -exec_test $1 $2 "Ender 2" "$3" +exec_test $1 $2 "Ender-2" "$3" # clean up restore_configs From 2fa4a77584180524c526c3e13af5bc57100c62a8 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Fri, 7 Apr 2023 06:06:14 +0000 Subject: [PATCH 127/225] [cron] Bump distribution date (2023-04-07) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index d6abcc4aa6..7e27512e97 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-04-01" +//#define STRING_DISTRIBUTION_DATE "2023-04-07" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 2140a73690..5b28b7c96f 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-04-01" + #define STRING_DISTRIBUTION_DATE "2023-04-07" #endif /** From 74b205c7abfa5cf9bc487edcd6a26a75a6c9a0cb Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Fri, 7 Apr 2023 18:32:25 +1200 Subject: [PATCH 128/225] =?UTF-8?q?=F0=9F=9A=B8=20Support=20CoreXY=20witho?= =?UTF-8?q?ut=20Z=20(#25630)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/module/planner.cpp | 6 +++--- Marlin/src/module/stepper.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Marlin/src/module/planner.cpp b/Marlin/src/module/planner.cpp index dadb22fbde..ccf27a502a 100644 --- a/Marlin/src/module/planner.cpp +++ b/Marlin/src/module/planner.cpp @@ -1972,7 +1972,7 @@ bool Planner::_populate_block( #if ANY(CORE_IS_XY, MARKFORGED_XY, MARKFORGED_YX) if (da < 0) SBI(dm, X_HEAD); // Save the toolhead's true direction in X if (db < 0) SBI(dm, Y_HEAD); // ...and Y - if (dc < 0) SBI(dm, Z_AXIS); + TERN_(HAS_Z_AXIS, if (dc < 0) SBI(dm, Z_AXIS)); #endif #if IS_CORE #if CORE_IS_XY @@ -2096,7 +2096,7 @@ bool Planner::_populate_block( #if ANY(CORE_IS_XY, MARKFORGED_XY, MARKFORGED_YX) steps_dist_mm.head.x = da * mm_per_step[A_AXIS]; steps_dist_mm.head.y = db * mm_per_step[B_AXIS]; - steps_dist_mm.z = dc * mm_per_step[Z_AXIS]; + TERN_(HAS_Z_AXIS, steps_dist_mm.z = dc * mm_per_step[Z_AXIS]); #endif #if IS_CORE #if CORE_IS_XY @@ -2244,7 +2244,7 @@ bool Planner::_populate_block( stepper.enable_axis(X_AXIS); stepper.enable_axis(Y_AXIS); } - #if DISABLED(Z_LATE_ENABLE) + #if HAS_Z_AXIS && DISABLED(Z_LATE_ENABLE) if (block->steps.z) stepper.enable_axis(Z_AXIS); #endif #elif CORE_IS_XZ diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index cc353b42e2..7bf50e557f 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -3276,7 +3276,7 @@ void Stepper::_set_position(const abce_long_t &spos) { #if CORE_IS_XY // corexy positioning // these equations follow the form of the dA and dB equations on https://www.corexy.com/theory.html - count_position.set(spos.a + spos.b, CORESIGN(spos.a - spos.b), spos.c); + count_position.set(spos.a + spos.b, CORESIGN(spos.a - spos.b) OPTARG(HAS_Z_AXIS, spos.c)); #elif CORE_IS_XZ // corexz planning count_position.set(spos.a + spos.c, spos.b, CORESIGN(spos.a - spos.c)); From 27b828891db155f8b372e4efb9891bdc91bf6d33 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 7 Apr 2023 01:33:03 -0500 Subject: [PATCH 129/225] =?UTF-8?q?=F0=9F=8E=A8=20Apply=20const=20(#25643)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/MarlinCore.cpp | 2 +- Marlin/src/MarlinCore.h | 2 +- .../src/lcd/extui/mks_ui/SPIFlashStorage.cpp | 18 ++-- Marlin/src/lcd/extui/mks_ui/SPIFlashStorage.h | 14 +-- Marlin/src/sd/Sd2Card.cpp | 16 ++-- Marlin/src/sd/Sd2Card.h | 20 ++--- Marlin/src/sd/SdBaseFile.cpp | 67 +++++++------- Marlin/src/sd/SdBaseFile.h | 87 +++++++++---------- Marlin/src/sd/SdFile.cpp | 12 +-- Marlin/src/sd/SdFile.h | 12 +-- Marlin/src/sd/SdVolume.cpp | 12 +-- Marlin/src/sd/SdVolume.h | 36 ++++---- Marlin/src/sd/disk_io_driver.h | 8 +- 13 files changed, 152 insertions(+), 154 deletions(-) diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index 19aaedf7c6..d2a9f395b7 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -782,7 +782,7 @@ inline void manage_inactivity(const bool no_stepper_sleep=false) { * - Update the Průša MMU2 * - Handle Joystick jogging */ -void idle(bool no_stepper_sleep/*=false*/) { +void idle(const bool no_stepper_sleep/*=false*/) { #ifdef MAX7219_DEBUG_PROFILE CodeProfiler idle_profiler; #endif diff --git a/Marlin/src/MarlinCore.h b/Marlin/src/MarlinCore.h index f80405a302..e9c63bb31f 100644 --- a/Marlin/src/MarlinCore.h +++ b/Marlin/src/MarlinCore.h @@ -30,7 +30,7 @@ void stop(); // Pass true to keep steppers from timing out -void idle(bool no_stepper_sleep=false); +void idle(const bool no_stepper_sleep=false); inline void idle_no_sleep() { idle(true); } #if ENABLED(G38_PROBE_TARGET) diff --git a/Marlin/src/lcd/extui/mks_ui/SPIFlashStorage.cpp b/Marlin/src/lcd/extui/mks_ui/SPIFlashStorage.cpp index 6508f6f024..43149dc60c 100644 --- a/Marlin/src/lcd/extui/mks_ui/SPIFlashStorage.cpp +++ b/Marlin/src/lcd/extui/mks_ui/SPIFlashStorage.cpp @@ -148,7 +148,7 @@ uint32_t SPIFlashStorage::m_startAddress; #endif // HAS_SPI_FLASH_COMPRESSION -void SPIFlashStorage::beginWrite(uint32_t startAddress) { +void SPIFlashStorage::beginWrite(const uint32_t startAddress) { m_pageDataUsed = 0; m_currentPage = 0; m_startAddress = startAddress; @@ -171,7 +171,7 @@ void SPIFlashStorage::endWrite() { #endif } -void SPIFlashStorage::savePage(uint8_t *buffer) { +void SPIFlashStorage::savePage(uint8_t * const buffer) { W25QXX.SPI_FLASH_BufferWrite(buffer, m_startAddress + (SPI_FLASH_PageSize * m_currentPage), SPI_FLASH_PageSize); // Test env // char fname[256]; @@ -181,7 +181,7 @@ void SPIFlashStorage::savePage(uint8_t *buffer) { // fclose(fp); } -void SPIFlashStorage::loadPage(uint8_t *buffer) { +void SPIFlashStorage::loadPage(uint8_t * const buffer) { W25QXX.SPI_FLASH_BufferRead(buffer, m_startAddress + (SPI_FLASH_PageSize * m_currentPage), SPI_FLASH_PageSize); // Test env // char fname[256]; @@ -260,7 +260,7 @@ void SPIFlashStorage::readPage() { #endif } -uint16_t SPIFlashStorage::inData(uint8_t *data, uint16_t size) { +uint16_t SPIFlashStorage::inData(const uint8_t * const data, uint16_t size) { // Don't write more than we can NOMORE(size, pageDataFree()); memcpy(m_pageData + m_pageDataUsed, data, size); @@ -268,12 +268,12 @@ uint16_t SPIFlashStorage::inData(uint8_t *data, uint16_t size) { return size; } -void SPIFlashStorage::writeData(uint8_t *data, uint16_t size) { +void SPIFlashStorage::writeData(const uint8_t *data, uint16_t size) { // Flush a page if needed if (pageDataFree() == 0) flushPage(); while (size > 0) { - uint16_t written = inData(data, size); + const uint16_t written = inData(data, size); size -= written; // Need to write more? Flush page and continue! if (size > 0) { @@ -283,7 +283,7 @@ void SPIFlashStorage::writeData(uint8_t *data, uint16_t size) { } } -void SPIFlashStorage::beginRead(uint32_t startAddress) { +void SPIFlashStorage::beginRead(const uint32_t startAddress) { m_startAddress = startAddress; m_currentPage = 0; // Nothing in memory now @@ -293,7 +293,7 @@ void SPIFlashStorage::beginRead(uint32_t startAddress) { #endif } -uint16_t SPIFlashStorage::outData(uint8_t *data, uint16_t size) { +uint16_t SPIFlashStorage::outData(uint8_t * const data, uint16_t size) { // Don't read more than we have NOMORE(size, pageDataFree()); memcpy(data, m_pageData + m_pageDataUsed, size); @@ -306,7 +306,7 @@ void SPIFlashStorage::readData(uint8_t *data, uint16_t size) { if (pageDataFree() == 0) readPage(); while (size > 0) { - uint16_t read = outData(data, size); + const uint16_t read = outData(data, size); size -= read; // Need to write more? Flush page and continue! if (size > 0) { diff --git a/Marlin/src/lcd/extui/mks_ui/SPIFlashStorage.h b/Marlin/src/lcd/extui/mks_ui/SPIFlashStorage.h index 72394286ac..bd7109b7ac 100644 --- a/Marlin/src/lcd/extui/mks_ui/SPIFlashStorage.h +++ b/Marlin/src/lcd/extui/mks_ui/SPIFlashStorage.h @@ -75,23 +75,23 @@ class SPIFlashStorage { public: // Write operation - static void beginWrite(uint32_t startAddress); + static void beginWrite(const uint32_t startAddress); static void endWrite(); - static void writeData(uint8_t *data, uint16_t size); + static void writeData(const uint8_t *data, uint16_t size); // Read operation - static void beginRead(uint32_t startAddress); + static void beginRead(const uint32_t startAddress); static void readData(uint8_t *data, uint16_t size); static uint32_t getCurrentPage() { return m_currentPage; } private: static void flushPage(); - static void savePage(uint8_t *buffer); - static void loadPage(uint8_t *buffer); + static void savePage(uint8_t * const buffer); + static void loadPage(uint8_t * const buffer); static void readPage(); - static uint16_t inData(uint8_t *data, uint16_t size); - static uint16_t outData(uint8_t *data, uint16_t size); + static uint16_t inData(const uint8_t * const data, uint16_t size); + static uint16_t outData(uint8_t * const data, uint16_t size); static uint8_t m_pageData[SPI_FLASH_PageSize]; static uint32_t m_currentPage; diff --git a/Marlin/src/sd/Sd2Card.cpp b/Marlin/src/sd/Sd2Card.cpp index 2d84c95a3d..81cc032304 100644 --- a/Marlin/src/sd/Sd2Card.cpp +++ b/Marlin/src/sd/Sd2Card.cpp @@ -345,7 +345,7 @@ bool DiskIODriver_SPI_SD::init(const uint8_t sckRateID, const pin_t chipSelectPi * \param[out] dst Pointer to the location that will receive the data. * \return true for success, false for failure. */ -bool DiskIODriver_SPI_SD::readBlock(uint32_t blockNumber, uint8_t *dst) { +bool DiskIODriver_SPI_SD::readBlock(uint32_t blockNumber, uint8_t * const dst) { #if IS_TEENSY_35_36 || IS_TEENSY_40_41 return 0 == SDHC_CardReadBlock(dst, blockNumber); #endif @@ -385,7 +385,7 @@ bool DiskIODriver_SPI_SD::readBlock(uint32_t blockNumber, uint8_t *dst) { * * \return true for success, false for failure. */ -bool DiskIODriver_SPI_SD::readData(uint8_t *dst) { +bool DiskIODriver_SPI_SD::readData(uint8_t * const dst) { chipSelect(); return readData(dst, 512); } @@ -455,7 +455,7 @@ bool DiskIODriver_SPI_SD::readData(uint8_t *dst) { #endif // SD_CHECK_AND_RETRY -bool DiskIODriver_SPI_SD::readData(uint8_t *dst, const uint16_t count) { +bool DiskIODriver_SPI_SD::readData(uint8_t * const dst, const uint16_t count) { bool success = false; const millis_t read_timeout = millis() + SD_READ_TIMEOUT; @@ -487,8 +487,8 @@ bool DiskIODriver_SPI_SD::readData(uint8_t *dst, const uint16_t count) { } /** read CID or CSR register */ -bool DiskIODriver_SPI_SD::readRegister(const uint8_t cmd, void *buf) { - uint8_t *dst = reinterpret_cast(buf); +bool DiskIODriver_SPI_SD::readRegister(const uint8_t cmd, void * const buf) { + uint8_t * const dst = reinterpret_cast(buf); if (cardCommand(cmd, 0)) { error(SD_CARD_ERROR_READ_REG); chipDeselect(); @@ -567,7 +567,7 @@ void DiskIODriver_SPI_SD::error(const uint8_t code) { errorCode_ = code; } * \param[in] src Pointer to the location of the data to be written. * \return true for success, false for failure. */ -bool DiskIODriver_SPI_SD::writeBlock(uint32_t blockNumber, const uint8_t *src) { +bool DiskIODriver_SPI_SD::writeBlock(uint32_t blockNumber, const uint8_t * const src) { if (ENABLED(SDCARD_READONLY)) return false; #if IS_TEENSY_35_36 || IS_TEENSY_40_41 @@ -598,7 +598,7 @@ bool DiskIODriver_SPI_SD::writeBlock(uint32_t blockNumber, const uint8_t *src) { * \param[in] src Pointer to the location of the data to be written. * \return true for success, false for failure. */ -bool DiskIODriver_SPI_SD::writeData(const uint8_t *src) { +bool DiskIODriver_SPI_SD::writeData(const uint8_t * const src) { if (ENABLED(SDCARD_READONLY)) return false; bool success = true; @@ -613,7 +613,7 @@ bool DiskIODriver_SPI_SD::writeData(const uint8_t *src) { } // Send one block of data for write block or write multiple blocks -bool DiskIODriver_SPI_SD::writeData(const uint8_t token, const uint8_t *src) { +bool DiskIODriver_SPI_SD::writeData(const uint8_t token, const uint8_t * const src) { if (ENABLED(SDCARD_READONLY)) return false; const uint16_t crc = TERN(SD_CHECK_AND_RETRY, CRC_CCITT(src, 512), 0xFFFF); diff --git a/Marlin/src/sd/Sd2Card.h b/Marlin/src/sd/Sd2Card.h index e0dce02a02..23677b24fa 100644 --- a/Marlin/src/sd/Sd2Card.h +++ b/Marlin/src/sd/Sd2Card.h @@ -143,7 +143,7 @@ public: * * \return true for success or false for failure. */ - bool readCID(cid_t *cid) { return readRegister(CMD10, cid); } + bool readCID(cid_t * const cid) { return readRegister(CMD10, cid); } /** * Read a card's CSD register. The CSD contains Card-Specific Data that @@ -153,18 +153,18 @@ public: * * \return true for success or false for failure. */ - inline bool readCSD(csd_t *csd) override { return readRegister(CMD9, csd); } + inline bool readCSD(csd_t * const csd) override { return readRegister(CMD9, csd); } - bool readData(uint8_t *dst) override; + bool readData(uint8_t * const dst) override; bool readStart(uint32_t blockNumber) override; bool readStop() override; - bool writeData(const uint8_t *src) override; - bool writeStart(const uint32_t blockNumber, const uint32_t eraseCount) override; + bool writeData(const uint8_t * const src) override; + bool writeStart(uint32_t blockNumber, const uint32_t eraseCount) override; bool writeStop() override; - bool readBlock(uint32_t block, uint8_t *dst) override; - bool writeBlock(uint32_t blockNumber, const uint8_t *src) override; + bool readBlock(uint32_t blockNumber, uint8_t * const dst) override; + bool writeBlock(uint32_t blockNumber, const uint8_t * const src) override; uint32_t cardSize() override; @@ -187,11 +187,11 @@ private: } uint8_t cardCommand(const uint8_t cmd, const uint32_t arg); - bool readData(uint8_t *dst, const uint16_t count); - bool readRegister(const uint8_t cmd, void *buf); + bool readData(uint8_t * const dst, const uint16_t count); + bool readRegister(const uint8_t cmd, void * const buf); void chipDeselect(); void chipSelect(); inline void type(const uint8_t value) { type_ = value; } bool waitNotBusy(const millis_t timeout_ms); - bool writeData(const uint8_t token, const uint8_t *src); + bool writeData(const uint8_t token, const uint8_t * const src); }; diff --git a/Marlin/src/sd/SdBaseFile.cpp b/Marlin/src/sd/SdBaseFile.cpp index 818f0dcb37..4f4a8e9fa9 100644 --- a/Marlin/src/sd/SdBaseFile.cpp +++ b/Marlin/src/sd/SdBaseFile.cpp @@ -91,7 +91,7 @@ bool SdBaseFile::addDirCluster() { // cache a file's directory entry // cache the current "dirBlock_" and return the entry at index "dirIndex_" // return pointer to cached entry or null for failure -dir_t* SdBaseFile::cacheDirEntry(uint8_t action) { +dir_t* SdBaseFile::cacheDirEntry(const uint8_t action) { if (!vol_->cacheRawBlock(dirBlock_, action)) return nullptr; return vol_->cache()->dir + dirIndex_; } @@ -119,7 +119,7 @@ bool SdBaseFile::close() { * Reasons for failure include file is not contiguous, file has zero length * or an I/O error occurred. */ -bool SdBaseFile::contiguousRange(uint32_t *bgnBlock, uint32_t *endBlock) { +bool SdBaseFile::contiguousRange(uint32_t * const bgnBlock, uint32_t * const endBlock) { // error if no blocks if (firstCluster_ == 0) return false; @@ -156,7 +156,7 @@ bool SdBaseFile::contiguousRange(uint32_t *bgnBlock, uint32_t *endBlock) { * a file is already open, the file already exists, the root * directory is full or an I/O error. */ -bool SdBaseFile::createContiguous(SdBaseFile *dirFile, const char *path, uint32_t size) { +bool SdBaseFile::createContiguous(SdBaseFile * const dirFile, const char * const path, const uint32_t size) { if (ENABLED(SDCARD_READONLY)) return false; uint32_t count; @@ -301,7 +301,7 @@ bool SdBaseFile::getDosName(char * const name) { return true; } -void SdBaseFile::getpos(filepos_t *pos) { +void SdBaseFile::getpos(filepos_t * const pos) { pos->position = curPosition_; pos->cluster = curCluster_; } @@ -337,7 +337,7 @@ void SdBaseFile::ls(uint8_t flags, uint8_t indent) { // saves 32 bytes on stack for ls recursion // return 0 - EOF, 1 - normal file, or 2 - directory -int8_t SdBaseFile::lsPrintNext(uint8_t flags, uint8_t indent) { +int8_t SdBaseFile::lsPrintNext(const uint8_t flags, const uint8_t indent) { dir_t dir; uint8_t w = 0; @@ -400,7 +400,7 @@ uint8_t lfn_checksum(const uint8_t *name) { } // Format directory name field from a 8.3 name string -bool SdBaseFile::make83Name(const char *str, uint8_t *name, const char **ptr) { +bool SdBaseFile::make83Name(const char *str, uint8_t * const name, const char **ptr) { uint8_t n = 7, // Max index until a dot is found i = 11; while (i) name[--i] = ' '; // Set whole FILENAME.EXT to spaces @@ -437,13 +437,11 @@ bool SdBaseFile::make83Name(const char *str, uint8_t *name, const char **ptr) { * Reasons for failure include this file is already open, \a parent is not a * directory, \a path is invalid or already exists in \a parent. */ -bool SdBaseFile::mkdir(SdBaseFile *parent, const char *path, bool pFlag) { +bool SdBaseFile::mkdir(SdBaseFile *parent, const char *path, const bool pFlag/*=true*/) { if (ENABLED(SDCARD_READONLY)) return false; - uint8_t dname[11]; - SdBaseFile dir1, dir2; - SdBaseFile *sub = &dir1; - SdBaseFile *start = parent; + SdBaseFile dir1, dir2, *sub = &dir1; + SdBaseFile * const start = parent; #if ENABLED(LONG_FILENAME_WRITE_SUPPORT) uint8_t dlname[LONG_FILENAME_LENGTH]; @@ -459,6 +457,7 @@ bool SdBaseFile::mkdir(SdBaseFile *parent, const char *path, bool pFlag) { } } + uint8_t dname[11]; for (;;) { if (!TERN(LONG_FILENAME_WRITE_SUPPORT, parsePath(path, dname, dlname, &path), make83Name(path, dname, &path))) return false; while (*path == '/') path++; @@ -474,7 +473,7 @@ bool SdBaseFile::mkdir(SdBaseFile *parent, const char *path, bool pFlag) { return mkdir(parent, dname OPTARG(LONG_FILENAME_WRITE_SUPPORT, dlname)); } -bool SdBaseFile::mkdir(SdBaseFile *parent, const uint8_t dname[11] +bool SdBaseFile::mkdir(SdBaseFile * const parent, const uint8_t dname[11] OPTARG(LONG_FILENAME_WRITE_SUPPORT, const uint8_t dlname[LONG_FILENAME_LENGTH]) ) { if (ENABLED(SDCARD_READONLY)) return false; @@ -541,7 +540,7 @@ bool SdBaseFile::mkdir(SdBaseFile *parent, const uint8_t dname[11] * * \return true for success, false for failure. */ -bool SdBaseFile::open(const char *path, uint8_t oflag) { +bool SdBaseFile::open(const char * const path, const uint8_t oflag) { return open(cwd_, path, oflag); } @@ -595,7 +594,7 @@ bool SdBaseFile::open(const char *path, uint8_t oflag) { * a directory, \a path is invalid, the file does not exist * or can't be opened in the access mode specified by oflag. */ -bool SdBaseFile::open(SdBaseFile *dirFile, const char *path, uint8_t oflag) { +bool SdBaseFile::open(SdBaseFile * const dirFile, const char *path, const uint8_t oflag) { uint8_t dname[11]; SdBaseFile dir1, dir2; SdBaseFile *parent = dirFile, *sub = &dir1; @@ -627,9 +626,9 @@ bool SdBaseFile::open(SdBaseFile *dirFile, const char *path, uint8_t oflag) { } // open with filename in dname and long filename in dlname -bool SdBaseFile::open(SdBaseFile *dirFile, const uint8_t dname[11] +bool SdBaseFile::open(SdBaseFile * const dirFile, const uint8_t dname[11] OPTARG(LONG_FILENAME_WRITE_SUPPORT, const uint8_t dlname[LONG_FILENAME_LENGTH]) - , uint8_t oflag + , const uint8_t oflag ) { bool emptyFound = false, fileFound = false; uint8_t index = 0; @@ -876,7 +875,7 @@ bool SdBaseFile::open(SdBaseFile *dirFile, const uint8_t dname[11] * See open() by path for definition of flags. * \return true for success or false for failure. */ -bool SdBaseFile::open(SdBaseFile *dirFile, uint16_t index, uint8_t oflag) { +bool SdBaseFile::open(SdBaseFile *dirFile, uint16_t index, const uint8_t oflag) { vol_ = dirFile->vol_; // error if already open @@ -902,7 +901,7 @@ bool SdBaseFile::open(SdBaseFile *dirFile, uint16_t index, uint8_t oflag) { } // open a cached directory entry. Assumes vol_ is initialized -bool SdBaseFile::openCachedEntry(uint8_t dirIndex, uint8_t oflag) { +bool SdBaseFile::openCachedEntry(const uint8_t dirIndex, const uint8_t oflag) { dir_t *p; #if ENABLED(SDCARD_READONLY) @@ -962,7 +961,7 @@ bool SdBaseFile::openCachedEntry(uint8_t dirIndex, uint8_t oflag) { * See open() by path for definition of flags. * \return true for success or false for failure. */ -bool SdBaseFile::openNext(SdBaseFile *dirFile, uint8_t oflag) { +bool SdBaseFile::openNext(SdBaseFile *dirFile, const uint8_t oflag) { if (!dirFile) return false; // error if already open @@ -1017,7 +1016,7 @@ bool SdBaseFile::openNext(SdBaseFile *dirFile, uint8_t oflag) { * \return true if the dirname is a long file name (LFN) * \return false if the dirname is a short file name 8.3 (SFN) */ - bool SdBaseFile::isDirNameLFN(const char *dirname) { + bool SdBaseFile::isDirNameLFN(const char * const dirname) { uint8_t length = strlen(dirname), idx = length; bool dotFound = false; if (idx > 12) return true; // LFN due to filename length > 12 ("filename.ext") @@ -1048,7 +1047,7 @@ bool SdBaseFile::openNext(SdBaseFile *dirFile, uint8_t oflag) { * The SFN is without dot ("FILENAMEEXT") * The LFN is complete ("Filename.ext") */ - bool SdBaseFile::parsePath(const char *path, uint8_t *name, uint8_t *lname, const char **ptrNextPath) { + bool SdBaseFile::parsePath(const char *path, uint8_t * const name, uint8_t * const lname, const char **ptrNextPath) { // Init randomizer for SFN generation randomSeed(millis()); // Parse the LFN @@ -1136,7 +1135,7 @@ bool SdBaseFile::openNext(SdBaseFile *dirFile, uint8_t oflag) { /** * Get the LFN filename block from a dir. Get the block in lname at startOffset */ - void SdBaseFile::getLFNName(vfat_t *pFatDir, char *lname, uint8_t sequenceNumber) { + void SdBaseFile::getLFNName(vfat_t *pFatDir, char *lname, const uint8_t sequenceNumber) { const uint8_t startOffset = (sequenceNumber - 1) * FILENAME_LENGTH; LOOP_L_N(i, FILENAME_LENGTH) { const uint16_t utf16_ch = (i >= 11) ? pFatDir->name3[i - 11] : (i >= 5) ? pFatDir->name2[i - 5] : pFatDir->name1[i]; @@ -1156,7 +1155,7 @@ bool SdBaseFile::openNext(SdBaseFile *dirFile, uint8_t oflag) { /** * Set the LFN filename block lname to a dir. Put the block based on sequence number */ - void SdBaseFile::setLFNName(vfat_t *pFatDir, char *lname, uint8_t sequenceNumber) { + void SdBaseFile::setLFNName(vfat_t *pFatDir, char *lname, const uint8_t sequenceNumber) { const uint8_t startOffset = (sequenceNumber - 1) * FILENAME_LENGTH, nameLength = strlen(lname); LOOP_L_N(i, FILENAME_LENGTH) { @@ -1305,7 +1304,7 @@ static void print2u(const uint8_t v) { * \param[in] pr Print stream for output. * \param[in] fatDate The date field from a directory entry. */ -void SdBaseFile::printFatDate(uint16_t fatDate) { +void SdBaseFile::printFatDate(const uint16_t fatDate) { SERIAL_ECHO(FAT_YEAR(fatDate)); SERIAL_CHAR('-'); print2u(FAT_MONTH(fatDate)); @@ -1322,7 +1321,7 @@ void SdBaseFile::printFatDate(uint16_t fatDate) { * \param[in] pr Print stream for output. * \param[in] fatTime The time field from a directory entry. */ -void SdBaseFile::printFatTime(uint16_t fatTime) { +void SdBaseFile::printFatTime(const uint16_t fatTime) { print2u(FAT_HOUR(fatTime)); SERIAL_CHAR(':'); print2u(FAT_MINUTE(fatTime)); @@ -1367,7 +1366,7 @@ int16_t SdBaseFile::read() { * read() called before a file has been opened, corrupt file system * or an I/O error occurred. */ -int16_t SdBaseFile::read(void *buf, uint16_t nbyte) { +int16_t SdBaseFile::read(void * const buf, uint16_t nbyte) { uint8_t *dst = reinterpret_cast(buf); uint16_t offset, toRead; uint32_t block; // raw device block number @@ -1429,7 +1428,7 @@ int16_t SdBaseFile::read(void *buf, uint16_t nbyte) { * readDir() called before a directory has been opened, this is not * a directory file or an I/O error occurred. */ -int8_t SdBaseFile::readDir(dir_t *dir, char * const longFilename) { +int8_t SdBaseFile::readDir(dir_t * const dir, char * const longFilename) { int16_t n; // if not a directory file or miss-positioned return an error if (!isDir() || (0x1F & curPosition_)) return -1; @@ -1676,7 +1675,7 @@ bool SdBaseFile::remove() { * \a dirFile is not a directory, \a path is not found * or an I/O error occurred. */ -bool SdBaseFile::remove(SdBaseFile *dirFile, const char *path) { +bool SdBaseFile::remove(SdBaseFile * const dirFile, const char * const path) { if (ENABLED(SDCARD_READONLY)) return false; SdBaseFile file; @@ -1715,7 +1714,7 @@ bool SdBaseFile::hide(const bool hidden) { * Reasons for failure include \a dirFile is not open or is not a directory * file, newPath is invalid or already exists, or an I/O error occurs. */ -bool SdBaseFile::rename(SdBaseFile *dirFile, const char *newPath) { +bool SdBaseFile::rename(SdBaseFile * const dirFile, const char * const newPath) { if (ENABLED(SDCARD_READONLY)) return false; uint32_t dirCluster = 0; @@ -1900,7 +1899,7 @@ bool SdBaseFile::rmRfStar() { * \param[in] oflag Values for \a oflag are constructed by a bitwise-inclusive * OR of open flags. see SdBaseFile::open(SdBaseFile*, const char*, uint8_t). */ -SdBaseFile::SdBaseFile(const char *path, uint8_t oflag) { +SdBaseFile::SdBaseFile(const char * const path, const uint8_t oflag) { type_ = FAT_FILE_TYPE_CLOSED; writeError = false; open(path, oflag); @@ -1943,7 +1942,7 @@ bool SdBaseFile::seekSet(const uint32_t pos) { return true; } -void SdBaseFile::setpos(filepos_t *pos) { +void SdBaseFile::setpos(filepos_t * const pos) { curPosition_ = pos->position; curCluster_ = pos->cluster; } @@ -1998,7 +1997,7 @@ bool SdBaseFile::sync() { * * \return true for success, false for failure. */ -bool SdBaseFile::timestamp(SdBaseFile *file) { +bool SdBaseFile::timestamp(SdBaseFile * const file) { dir_t dir; // get timestamps @@ -2055,8 +2054,8 @@ bool SdBaseFile::timestamp(SdBaseFile *file) { * * \return true for success, false for failure. */ -bool SdBaseFile::timestamp(uint8_t flags, uint16_t year, uint8_t month, - uint8_t day, uint8_t hour, uint8_t minute, uint8_t second) { +bool SdBaseFile::timestamp(const uint8_t flags, const uint16_t year, const uint8_t month, + const uint8_t day, const uint8_t hour, const uint8_t minute, const uint8_t second) { if (ENABLED(SDCARD_READONLY)) return false; uint16_t dirDate, dirTime; diff --git a/Marlin/src/sd/SdBaseFile.h b/Marlin/src/sd/SdBaseFile.h index 19225170f9..046c2447cb 100644 --- a/Marlin/src/sd/SdBaseFile.h +++ b/Marlin/src/sd/SdBaseFile.h @@ -89,7 +89,7 @@ uint8_t const FAT_FILE_TYPE_CLOSED = 0, // This file h * * \return Packed date for dir_t entry. */ -static inline uint16_t FAT_DATE(uint16_t year, uint8_t month, uint8_t day) { return (year - 1980) << 9 | month << 5 | day; } +static inline uint16_t FAT_DATE(const uint16_t year, const uint8_t month, const uint8_t day) { return (year - 1980) << 9 | month << 5 | day; } /** * year part of FAT directory date field @@ -97,7 +97,7 @@ static inline uint16_t FAT_DATE(uint16_t year, uint8_t month, uint8_t day) { ret * * \return Extracted year [1980,2107] */ -static inline uint16_t FAT_YEAR(uint16_t fatDate) { return 1980 + (fatDate >> 9); } +static inline uint16_t FAT_YEAR(const uint16_t fatDate) { return 1980 + (fatDate >> 9); } /** * month part of FAT directory date field @@ -105,7 +105,7 @@ static inline uint16_t FAT_YEAR(uint16_t fatDate) { return 1980 + (fatDate >> 9) * * \return Extracted month [1,12] */ -static inline uint8_t FAT_MONTH(uint16_t fatDate) { return (fatDate >> 5) & 0xF; } +static inline uint8_t FAT_MONTH(const uint16_t fatDate) { return (fatDate >> 5) & 0xF; } /** * day part of FAT directory date field @@ -113,7 +113,7 @@ static inline uint8_t FAT_MONTH(uint16_t fatDate) { return (fatDate >> 5) & 0xF; * * \return Extracted day [1,31] */ -static inline uint8_t FAT_DAY(uint16_t fatDate) { return fatDate & 0x1F; } +static inline uint8_t FAT_DAY(const uint16_t fatDate) { return fatDate & 0x1F; } /** * time field for FAT directory entry @@ -123,7 +123,7 @@ static inline uint8_t FAT_DAY(uint16_t fatDate) { return fatDate & 0x1F; } * * \return Packed time for dir_t entry. */ -static inline uint16_t FAT_TIME(uint8_t hour, uint8_t minute, uint8_t second) { return hour << 11 | minute << 5 | second >> 1; } +static inline uint16_t FAT_TIME(const uint8_t hour, const uint8_t minute, const uint8_t second) { return hour << 11 | minute << 5 | second >> 1; } /** * hour part of FAT directory time field @@ -131,7 +131,7 @@ static inline uint16_t FAT_TIME(uint8_t hour, uint8_t minute, uint8_t second) { * * \return Extracted hour [0,23] */ -static inline uint8_t FAT_HOUR(uint16_t fatTime) { return fatTime >> 11; } +static inline uint8_t FAT_HOUR(const uint16_t fatTime) { return fatTime >> 11; } /** * minute part of FAT directory time field @@ -139,7 +139,7 @@ static inline uint8_t FAT_HOUR(uint16_t fatTime) { return fatTime >> 11; } * * \return Extracted minute [0,59] */ -static inline uint8_t FAT_MINUTE(uint16_t fatTime) { return (fatTime >> 5) & 0x3F; } +static inline uint8_t FAT_MINUTE(const uint16_t fatTime) { return (fatTime >> 5) & 0x3F; } /** * second part of FAT directory time field @@ -149,7 +149,7 @@ static inline uint8_t FAT_MINUTE(uint16_t fatTime) { return (fatTime >> 5) & 0x3 * * \return Extracted second [0,58] */ -static inline uint8_t FAT_SECOND(uint16_t fatTime) { return 2 * (fatTime & 0x1F); } +static inline uint8_t FAT_SECOND(const uint16_t fatTime) { return 2 * (fatTime & 0x1F); } // Default date for file timestamps is 1 Jan 2000 uint16_t const FAT_DEFAULT_DATE = ((2000 - 1980) << 9) | (1 << 5) | 1; @@ -163,7 +163,7 @@ uint16_t const FAT_DEFAULT_TIME = (1 << 11); class SdBaseFile { public: SdBaseFile() : writeError(false), type_(FAT_FILE_TYPE_CLOSED) {} - SdBaseFile(const char *path, uint8_t oflag); + SdBaseFile(const char * const path, const uint8_t oflag); ~SdBaseFile() { if (isOpen()) close(); } /** @@ -179,18 +179,17 @@ class SdBaseFile { * get position for streams * \param[out] pos struct to receive position */ - void getpos(filepos_t *pos); + void getpos(filepos_t * const pos); /** * set position for streams * \param[out] pos struct with value for new position */ - void setpos(filepos_t *pos); + void setpos(filepos_t * const pos); bool close(); - bool contiguousRange(uint32_t *bgnBlock, uint32_t *endBlock); - bool createContiguous(SdBaseFile *dirFile, - const char *path, uint32_t size); + bool contiguousRange(uint32_t * const bgnBlock, uint32_t * const endBlock); + bool createContiguous(SdBaseFile * const dirFile, const char * const path, const uint32_t size); /** * \return The current cluster number for a file or directory. */ @@ -235,7 +234,7 @@ class SdBaseFile { * See the timestamp() function. */ static void dateTimeCallback( - void (*dateTime)(uint16_t *date, uint16_t *time)) { + void (*dateTime)(uint16_t * const date, uint16_t * const time)) { dateTime_ = dateTime; } @@ -246,7 +245,7 @@ class SdBaseFile { bool dirEntry(dir_t *dir); static void dirName(const dir_t& dir, char *name); bool exists(const char *name); - int16_t fgets(char *str, int16_t num, char *delim = 0); + int16_t fgets(char *str, int16_t num, char *delim=0); /** * \return The total number of bytes in a file or directory. @@ -284,29 +283,29 @@ class SdBaseFile { bool isRoot() const { return type_ == FAT_FILE_TYPE_ROOT_FIXED || type_ == FAT_FILE_TYPE_ROOT32; } bool getDosName(char * const name); - void ls(uint8_t flags = 0, uint8_t indent = 0); + void ls(uint8_t flags=0, uint8_t indent=0); - bool mkdir(SdBaseFile *dir, const char *path, bool pFlag = true); - bool open(SdBaseFile *dirFile, uint16_t index, uint8_t oflag); - bool open(SdBaseFile *dirFile, const char *path, uint8_t oflag); - bool open(const char *path, uint8_t oflag = O_READ); - bool openNext(SdBaseFile *dirFile, uint8_t oflag); - bool openRoot(SdVolume *vol); + bool mkdir(SdBaseFile *parent, const char *path, const bool pFlag=true); + bool open(SdBaseFile * const dirFile, uint16_t index, const uint8_t oflag); + bool open(SdBaseFile * const dirFile, const char *path, const uint8_t oflag); + bool open(const char * const path, const uint8_t oflag=O_READ); + bool openNext(SdBaseFile * const dirFile, const uint8_t oflag); + bool openRoot(SdVolume * const vol); int peek(); - static void printFatDate(uint16_t fatDate); - static void printFatTime(uint16_t fatTime); + static void printFatDate(const uint16_t fatDate); + static void printFatTime(const uint16_t fatTime); bool printName(); int16_t read(); - int16_t read(void *buf, uint16_t nbyte); - int8_t readDir(dir_t *dir, char * const longFilename); - static bool remove(SdBaseFile *dirFile, const char *path); + int16_t read(void * const buf, uint16_t nbyte); + int8_t readDir(dir_t * const dir, char * const longFilename); + static bool remove(SdBaseFile * const dirFile, const char * const path); bool remove(); /** * Set the file's current position to zero. */ void rewind() { seekSet(0); } - bool rename(SdBaseFile *dirFile, const char *newPath); + bool rename(SdBaseFile * const dirFile, const char * const newPath); bool rmdir(); bool rmRfStar(); @@ -327,12 +326,12 @@ class SdBaseFile { * \param[in] offset The new position in bytes from end-of-file. * \return true for success or false for failure. */ - bool seekEnd(const int32_t offset = 0) { return seekSet(fileSize_ + offset); } + bool seekEnd(const int32_t offset=0) { return seekSet(fileSize_ + offset); } bool seekSet(const uint32_t pos); bool sync(); - bool timestamp(SdBaseFile *file); - bool timestamp(uint8_t flag, uint16_t year, uint8_t month, uint8_t day, - uint8_t hour, uint8_t minute, uint8_t second); + bool timestamp(SdBaseFile * const file); + bool timestamp(const uint8_t flag, const uint16_t year, const uint8_t month, const uint8_t day, + const uint8_t hour, const uint8_t minute, const uint8_t second); /** * Type of file. Use isFile() or isDir() instead of type() if possible. @@ -379,17 +378,17 @@ class SdBaseFile { // private functions bool addCluster(); bool addDirCluster(); - dir_t* cacheDirEntry(uint8_t action); - int8_t lsPrintNext(uint8_t flags, uint8_t indent); - static bool make83Name(const char *str, uint8_t *name, const char **ptr); - bool mkdir(SdBaseFile *parent, const uint8_t dname[11] + dir_t* cacheDirEntry(const uint8_t action); + int8_t lsPrintNext(const uint8_t flags, const uint8_t indent); + static bool make83Name(const char *str, uint8_t * const name, const char **ptr); + bool mkdir(SdBaseFile * const parent, const uint8_t dname[11] OPTARG(LONG_FILENAME_WRITE_SUPPORT, const uint8_t dlname[LONG_FILENAME_LENGTH]) ); bool open(SdBaseFile *dirFile, const uint8_t dname[11] OPTARG(LONG_FILENAME_WRITE_SUPPORT, const uint8_t dlname[LONG_FILENAME_LENGTH]) - , uint8_t oflag + , const uint8_t oflag ); - bool openCachedEntry(uint8_t cacheIndex, uint8_t oflags); + bool openCachedEntry(const uint8_t dirIndex, const uint8_t oflags); dir_t* readDirCache(); #if ENABLED(UTF_FILENAME_SUPPORT) @@ -399,11 +398,11 @@ class SdBaseFile { // Long Filename create/write support #if ENABLED(LONG_FILENAME_WRITE_SUPPORT) static bool isDirLFN(const dir_t* dir); - static bool isDirNameLFN(const char *dirname); - static bool parsePath(const char *str, uint8_t *name, uint8_t *lname, const char **ptr); + static bool isDirNameLFN(const char * const dirname); + static bool parsePath(const char *str, uint8_t * const name, uint8_t * const lname, const char **ptr); // Return the number of entries needed in the FAT for this LFN - static inline uint8_t getLFNEntriesNum(const char *lname) { return (strlen(lname) + 12) / 13; } - static void getLFNName(vfat_t *vFatDir, char *lname, uint8_t startOffset); - static void setLFNName(vfat_t *vFatDir, char *lname, uint8_t lfnSequenceNumber); + static uint8_t getLFNEntriesNum(const char * const lname) { return (strlen(lname) + 12) / 13; } + static void getLFNName(vfat_t *vFatDir, char *lname, const uint8_t sequenceNumber); + static void setLFNName(vfat_t *vFatDir, char *lname, const uint8_t sequenceNumber); #endif }; diff --git a/Marlin/src/sd/SdFile.cpp b/Marlin/src/sd/SdFile.cpp index bce96ef02d..ac5f6f9234 100644 --- a/Marlin/src/sd/SdFile.cpp +++ b/Marlin/src/sd/SdFile.cpp @@ -43,7 +43,7 @@ * \param[in] oflag Values for \a oflag are constructed by a bitwise-inclusive * OR of open flags. see SdBaseFile::open(SdBaseFile*, const char*, uint8_t). */ -SdFile::SdFile(const char *path, uint8_t oflag) : SdBaseFile(path, oflag) { } +SdFile::SdFile(const char * const path, const uint8_t oflag) : SdBaseFile(path, oflag) { } /** * Write data to an open file. @@ -60,7 +60,7 @@ SdFile::SdFile(const char *path, uint8_t oflag) : SdBaseFile(path, oflag) { } * include write() is called before a file has been opened, write is called * for a read-only file, device is full, a corrupt file system or an I/O error. */ -int16_t SdFile::write(const void *buf, uint16_t nbyte) { return SdBaseFile::write(buf, nbyte); } +int16_t SdFile::write(const void * const buf, const uint16_t nbyte) { return SdBaseFile::write(buf, nbyte); } /** * Write a byte to a file. Required by the Arduino Print class. @@ -68,9 +68,9 @@ int16_t SdFile::write(const void *buf, uint16_t nbyte) { return SdBaseFile::writ * Use writeError to check for errors. */ #if ARDUINO >= 100 - size_t SdFile::write(uint8_t b) { return SdBaseFile::write(&b, 1); } + size_t SdFile::write(const uint8_t b) { return SdBaseFile::write(&b, 1); } #else - void SdFile::write(uint8_t b) { SdBaseFile::write(&b, 1); } + void SdFile::write(const uint8_t b) { SdBaseFile::write(&b, 1); } #endif /** @@ -78,7 +78,7 @@ int16_t SdFile::write(const void *buf, uint16_t nbyte) { return SdBaseFile::writ * \param[in] str Pointer to the string. * Use writeError to check for errors. */ -void SdFile::write(const char *str) { SdBaseFile::write(str, strlen(str)); } +void SdFile::write(const char * const str) { SdBaseFile::write(str, strlen(str)); } /** * Write a PROGMEM string to a file. @@ -94,7 +94,7 @@ void SdFile::write_P(PGM_P str) { * \param[in] str Pointer to the PROGMEM string. * Use writeError to check for errors. */ -void SdFile::writeln_P(PGM_P str) { +void SdFile::writeln_P(PGM_P const str) { write_P(str); write_P(PSTR("\r\n")); } diff --git a/Marlin/src/sd/SdFile.h b/Marlin/src/sd/SdFile.h index 81eeadf5b5..b075239ebb 100644 --- a/Marlin/src/sd/SdFile.h +++ b/Marlin/src/sd/SdFile.h @@ -41,17 +41,17 @@ class SdFile : public SdBaseFile { public: SdFile() {} - SdFile(const char *name, uint8_t oflag); + SdFile(const char * const name, const uint8_t oflag); #if ARDUINO >= 100 - size_t write(uint8_t b); + size_t write(const uint8_t b); #else - void write(uint8_t b); + void write(const uint8_t b); #endif - int16_t write(const void *buf, uint16_t nbyte); - void write(const char *str); + int16_t write(const void * const buf, const uint16_t nbyte); + void write(const char * const str); void write_P(PGM_P str); - void writeln_P(PGM_P str); + void writeln_P(PGM_P const str); }; using MediaFile = SdFile; diff --git a/Marlin/src/sd/SdVolume.cpp b/Marlin/src/sd/SdVolume.cpp index 1b1fdc5a7c..8c06c74537 100644 --- a/Marlin/src/sd/SdVolume.cpp +++ b/Marlin/src/sd/SdVolume.cpp @@ -47,7 +47,7 @@ #endif // find a contiguous group of clusters -bool SdVolume::allocContiguous(uint32_t count, uint32_t *curCluster) { +bool SdVolume::allocContiguous(const uint32_t count, uint32_t * const curCluster) { if (ENABLED(SDCARD_READONLY)) return false; // start of group @@ -138,7 +138,7 @@ bool SdVolume::cacheFlush() { return true; } -bool SdVolume::cacheRawBlock(uint32_t blockNumber, bool dirty) { +bool SdVolume::cacheRawBlock(const uint32_t blockNumber, const bool dirty) { if (cacheBlockNumber_ != blockNumber) { if (!cacheFlush()) return false; if (!sdCard_->readBlock(blockNumber, cacheBuffer_.data)) return false; @@ -149,7 +149,7 @@ bool SdVolume::cacheRawBlock(uint32_t blockNumber, bool dirty) { } // return the size in bytes of a cluster chain -bool SdVolume::chainSize(uint32_t cluster, uint32_t *size) { +bool SdVolume::chainSize(uint32_t cluster, uint32_t * const size) { uint32_t s = 0; do { if (!fatGet(cluster, &cluster)) return false; @@ -160,7 +160,7 @@ bool SdVolume::chainSize(uint32_t cluster, uint32_t *size) { } // Fetch a FAT entry -bool SdVolume::fatGet(uint32_t cluster, uint32_t *value) { +bool SdVolume::fatGet(const uint32_t cluster, uint32_t * const value) { uint32_t lba; if (cluster > (clusterCount_ + 1)) return false; if (FAT12_SUPPORT && fatType_ == 12) { @@ -195,7 +195,7 @@ bool SdVolume::fatGet(uint32_t cluster, uint32_t *value) { } // Store a FAT entry -bool SdVolume::fatPut(uint32_t cluster, uint32_t value) { +bool SdVolume::fatPut(const uint32_t cluster, const uint32_t value) { if (ENABLED(SDCARD_READONLY)) return false; uint32_t lba; @@ -326,7 +326,7 @@ int32_t SdVolume::freeClusterCount() { * Reasons for failure include not finding a valid partition, not finding a valid * FAT file system in the specified partition or an I/O error. */ -bool SdVolume::init(DiskIODriver* dev, uint8_t part) { +bool SdVolume::init(DiskIODriver * const dev, const uint8_t part) { uint32_t totalBlocks, volumeStartBlock = 0; fat32_boot_t *fbs; diff --git a/Marlin/src/sd/SdVolume.h b/Marlin/src/sd/SdVolume.h index 3097773030..ccf595a593 100644 --- a/Marlin/src/sd/SdVolume.h +++ b/Marlin/src/sd/SdVolume.h @@ -93,8 +93,8 @@ class SdVolume { * Reasons for failure include not finding a valid partition, not finding * a valid FAT file system or an I/O error. */ - bool init(DiskIODriver *dev) { return init(dev, 1) || init(dev, 0); } - bool init(DiskIODriver *dev, uint8_t part); + bool init(DiskIODriver * const dev) { return init(dev, 1) || init(dev, 0); } + bool init(DiskIODriver * const dev, const uint8_t part); // inline functions that return volume info uint8_t blocksPerCluster() const { return blocksPerCluster_; } //> \return The volume's cluster size in blocks. @@ -127,7 +127,7 @@ class SdVolume { * \param[out] v value of entry * \return true for success or false for failure */ - bool dbgFat(uint32_t n, uint32_t *v) { return fatGet(n, v); } + bool dbgFat(const uint32_t n, uint32_t * const v) { return fatGet(n, v); } private: // Allow SdBaseFile access to SdVolume private data. @@ -164,20 +164,20 @@ class SdVolume { uint16_t rootDirEntryCount_; // number of entries in FAT16 root dir uint32_t rootDirStart_; // root start block for FAT16, cluster for FAT32 - bool allocContiguous(uint32_t count, uint32_t *curCluster); - uint8_t blockOfCluster(uint32_t position) const { return (position >> 9) & (blocksPerCluster_ - 1); } - uint32_t clusterStartBlock(uint32_t cluster) const { return dataStartBlock_ + ((cluster - 2) << clusterSizeShift_); } - uint32_t blockNumber(uint32_t cluster, uint32_t position) const { return clusterStartBlock(cluster) + blockOfCluster(position); } + bool allocContiguous(const uint32_t count, uint32_t * const curCluster); + uint8_t blockOfCluster(const uint32_t position) const { return (position >> 9) & (blocksPerCluster_ - 1); } + uint32_t clusterStartBlock(const uint32_t cluster) const { return dataStartBlock_ + ((cluster - 2) << clusterSizeShift_); } + uint32_t blockNumber(const uint32_t cluster, const uint32_t position) const { return clusterStartBlock(cluster) + blockOfCluster(position); } cache_t* cache() { return &cacheBuffer_; } uint32_t cacheBlockNumber() const { return cacheBlockNumber_; } #if USE_MULTIPLE_CARDS bool cacheFlush(); - bool cacheRawBlock(uint32_t blockNumber, bool dirty); + bool cacheRawBlock(const uint32_t blockNumber, const bool dirty); #else static bool cacheFlush(); - static bool cacheRawBlock(uint32_t blockNumber, bool dirty); + static bool cacheRawBlock(const uint32_t blockNumber, const bool dirty); #endif // used by SdBaseFile write to assign cache to SD location @@ -186,18 +186,18 @@ class SdVolume { cacheBlockNumber_ = blockNumber; } void cacheSetDirty() { cacheDirty_ |= CACHE_FOR_WRITE; } - bool chainSize(uint32_t beginCluster, uint32_t *size); - bool fatGet(uint32_t cluster, uint32_t *value); - bool fatPut(uint32_t cluster, uint32_t value); - bool fatPutEOC(uint32_t cluster) { return fatPut(cluster, 0x0FFFFFFF); } + bool chainSize(uint32_t cluster, uint32_t * const size); + bool fatGet(const uint32_t cluster, uint32_t * const value); + bool fatPut(const uint32_t cluster, const uint32_t value); + bool fatPutEOC(const uint32_t cluster) { return fatPut(cluster, 0x0FFFFFFF); } bool freeChain(uint32_t cluster); - bool isEOC(uint32_t cluster) const { - if (FAT12_SUPPORT && fatType_ == 12) return cluster >= FAT12EOC_MIN; + bool isEOC(const uint32_t cluster) const { + if (FAT12_SUPPORT && fatType_ == 12) return cluster >= FAT12EOC_MIN; if (fatType_ == 16) return cluster >= FAT16EOC_MIN; - return cluster >= FAT32EOC_MIN; + return cluster >= FAT32EOC_MIN; } - bool readBlock(uint32_t block, uint8_t *dst) { return sdCard_->readBlock(block, dst); } - bool writeBlock(uint32_t block, const uint8_t *dst) { return sdCard_->writeBlock(block, dst); } + bool readBlock(const uint32_t block, uint8_t * const dst) { return sdCard_->readBlock(block, dst); } + bool writeBlock(const uint32_t block, const uint8_t * const dst) { return sdCard_->writeBlock(block, dst); } }; using MarlinVolume = SdVolume; diff --git a/Marlin/src/sd/disk_io_driver.h b/Marlin/src/sd/disk_io_driver.h index 3e2d688aea..f1f49cf85f 100644 --- a/Marlin/src/sd/disk_io_driver.h +++ b/Marlin/src/sd/disk_io_driver.h @@ -47,18 +47,18 @@ public: * * \return true for success or false for failure. */ - virtual bool readCSD(csd_t* csd) = 0; + virtual bool readCSD(csd_t * const csd) = 0; virtual bool readStart(const uint32_t block) = 0; - virtual bool readData(uint8_t* dst) = 0; + virtual bool readData(uint8_t * const dst) = 0; virtual bool readStop() = 0; virtual bool writeStart(const uint32_t block, const uint32_t) = 0; virtual bool writeData(const uint8_t* src) = 0; virtual bool writeStop() = 0; - virtual bool readBlock(uint32_t block, uint8_t* dst) = 0; - virtual bool writeBlock(uint32_t blockNumber, const uint8_t* src) = 0; + virtual bool readBlock(const uint32_t block, uint8_t * const dst) = 0; + virtual bool writeBlock(const uint32_t blockNumber, const uint8_t * const src) = 0; virtual uint32_t cardSize() = 0; From 836c8ce5e57ffd7d4cb2b0b7364917088d7ca7d5 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 7 Apr 2023 01:49:27 -0500 Subject: [PATCH 130/225] =?UTF-8?q?=F0=9F=8E=A8=20Detab=20some=20build=20f?= =?UTF-8?q?iles?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../boards/marlin_FYSETC_CHEETAH_V20.json | 2 +- .../variants/MARLIN_ARCHIM/variant.h | 39 +- .../variants/MARLIN_ARTILLERY_RUBY/variant.h | 1 + .../variants/MARLIN_BIGTREE_BTT002/variant.h | 1 + .../variants/MARLIN_BIGTREE_E3_RRF/variant.h | 1 + .../variants/MARLIN_BIGTREE_GTR_V1/variant.h | 1 + .../MARLIN_BIGTREE_SKR_PRO_11/variant.h | 1 + .../variants/MARLIN_BTT_SKR_SE_BX/variant.h | 1 + .../MARLIN_CREALITY_STM32F401RC/variant.h | 1 + .../variants/MARLIN_F103Rx/variant.h | 1 + .../variants/MARLIN_F103VE_LONGER/variant.h | 1 + .../variants/MARLIN_F103Vx/ldscript.ld | 14 +- .../variants/MARLIN_F103Vx/variant.h | 1 + .../variants/MARLIN_F103Zx/ldscript.ld | 13 +- .../variants/MARLIN_F103Zx/variant.h | 1 + .../variants/MARLIN_F401RC/ldscript.ld | 6 +- .../variants/MARLIN_F407VE/variant.h | 1 + .../variants/MARLIN_F446VE/variant.h | 1 + .../variants/MARLIN_F4x7Vx/variant.h | 1 + .../variants/MARLIN_FLY_F407ZG/variant.h | 230 +- .../MARLIN_FYSETC_CHEETAH_V20/variant.h | 1 + .../PeripheralPins.c | 4 +- .../MARLIN_FYSETC_SPIDER_KING407/variant.h | 233 +- .../variants/MARLIN_LERDGE/variant.h | 1 + .../MARLIN_MEGA_EXTENDED/pins_arduino.h | 606 +- .../variants/MARLIN_MKS_SKIPR_V1/variant.h | 1 + .../variants/MARLIN_TH3D_EZBOARD_V2/variant.h | 1 + buildroot/share/cmake/CMakeLists.txt | 8 +- buildroot/share/dwin/bin/README.md | 46 +- buildroot/share/vscode/avrdude_linux.conf | 22874 ++++++++-------- buildroot/share/vscode/avrdude_macOS.conf | 22874 ++++++++-------- buildroot/tests/mks_tinybee | 8 +- buildroot/web-ui/data/www/webmarlin.js | 2 +- 33 files changed, 23496 insertions(+), 23481 deletions(-) diff --git a/buildroot/share/PlatformIO/boards/marlin_FYSETC_CHEETAH_V20.json b/buildroot/share/PlatformIO/boards/marlin_FYSETC_CHEETAH_V20.json index 6c2e093c3b..7dd7542c6d 100644 --- a/buildroot/share/PlatformIO/boards/marlin_FYSETC_CHEETAH_V20.json +++ b/buildroot/share/PlatformIO/boards/marlin_FYSETC_CHEETAH_V20.json @@ -55,7 +55,7 @@ "dfu", "jlink" ], - "offset_address": "0x8008000", + "offset_address": "0x8008000", "require_upload_port": true, "use_1200bps_touch": false, "wait_for_upload_port": false diff --git a/buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/variant.h index 11f8f63bfb..c073e9bbdd 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/variant.h @@ -24,10 +24,10 @@ *----------------------------------------------------------------------------*/ /** Frequency of the board main oscillator */ -#define VARIANT_MAINOSC 12000000 +#define VARIANT_MAINOSC 12000000 /** Master clock frequency */ -#define VARIANT_MCK 84000000 +#define VARIANT_MCK 84000000 /*---------------------------------------------------------------------------- * Headers @@ -119,13 +119,13 @@ extern "C"{ #define BOARD_SPI_DEFAULT_SS BOARD_SPI_SS3 #define BOARD_PIN_TO_SPI_PIN(x) \ - (x==BOARD_SPI_SS0 ? PIN_SPI_SS0 : \ - (x==BOARD_SPI_SS1 ? PIN_SPI_SS1 : \ - (x==BOARD_SPI_SS2 ? PIN_SPI_SS2 : PIN_SPI_SS3 ))) + (x==BOARD_SPI_SS0 ? PIN_SPI_SS0 : \ + (x==BOARD_SPI_SS1 ? PIN_SPI_SS1 : \ + (x==BOARD_SPI_SS2 ? PIN_SPI_SS2 : PIN_SPI_SS3 ))) #define BOARD_PIN_TO_SPI_CHANNEL(x) \ - (x==BOARD_SPI_SS0 ? 0 : \ - (x==BOARD_SPI_SS1 ? 1 : \ - (x==BOARD_SPI_SS2 ? 2 : 3))) + (x==BOARD_SPI_SS0 ? 0 : \ + (x==BOARD_SPI_SS1 ? 1 : \ + (x==BOARD_SPI_SS2 ? 2 : 3))) static const uint8_t SS = BOARD_SPI_SS0; static const uint8_t SS1 = BOARD_SPI_SS1; @@ -195,7 +195,7 @@ static const uint8_t DAC0 = 66; static const uint8_t DAC1 = 67; static const uint8_t CANRX = 68; static const uint8_t CANTX = 69; -#define ADC_RESOLUTION 12 +#define ADC_RESOLUTION 12 /* * Complementary CAN pins @@ -212,21 +212,21 @@ static const uint8_t CAN1TX = 89; /* * DACC */ -#define DACC_INTERFACE DACC -#define DACC_INTERFACE_ID ID_DACC -#define DACC_RESOLUTION 12 +#define DACC_INTERFACE DACC +#define DACC_INTERFACE_ID ID_DACC +#define DACC_RESOLUTION 12 #define DACC_ISR_HANDLER DACC_Handler #define DACC_ISR_ID DACC_IRQn /* * PWM */ -#define PWM_INTERFACE PWM -#define PWM_INTERFACE_ID ID_PWM -#define PWM_FREQUENCY 31000 -#define PWM_MAX_DUTY_CYCLE 255 -#define PWM_MIN_DUTY_CYCLE 0 -#define PWM_RESOLUTION 8 +#define PWM_INTERFACE PWM +#define PWM_INTERFACE_ID ID_PWM +#define PWM_FREQUENCY 31000 +#define PWM_MAX_DUTY_CYCLE 255 +#define PWM_MIN_DUTY_CYCLE 0 +#define PWM_RESOLUTION 8 /* * TC @@ -236,7 +236,7 @@ static const uint8_t CAN1TX = 89; #define TC_FREQUENCY 100000 #define TC_MAX_DUTY_CYCLE 255 #define TC_MIN_DUTY_CYCLE 0 -#define TC_RESOLUTION 8 +#define TC_RESOLUTION 8 #ifdef __cplusplus } @@ -281,4 +281,3 @@ extern USARTClass Serial3; #define SERIAL_PORT_HARDWARE3 Serial3 #endif /* _VARIANT_ARDUINO_DUE_X_ */ - diff --git a/buildroot/share/PlatformIO/variants/MARLIN_ARTILLERY_RUBY/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_ARTILLERY_RUBY/variant.h index ca7a53d782..f32ff3c28d 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_ARTILLERY_RUBY/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_ARTILLERY_RUBY/variant.h @@ -121,6 +121,7 @@ extern "C" { #ifdef __cplusplus } // extern "C" #endif + /*---------------------------------------------------------------------------- * Arduino objects - C++ only *----------------------------------------------------------------------------*/ diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/variant.h index 068d0b9ee5..88b6e45292 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/variant.h @@ -272,6 +272,7 @@ extern "C" { #ifdef __cplusplus } // extern "C" #endif + /*---------------------------------------------------------------------------- * Arduino objects - C++ only *----------------------------------------------------------------------------*/ diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/variant.h index edc1c91c53..90e9998d10 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/variant.h @@ -267,6 +267,7 @@ extern "C" { #ifdef __cplusplus } // extern "C" #endif + /*---------------------------------------------------------------------------- * Arduino objects - C++ only *----------------------------------------------------------------------------*/ diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/variant.h index d39e665d53..01f19a7933 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/variant.h @@ -295,6 +295,7 @@ extern "C" { #ifdef __cplusplus } // extern "C" #endif + /*---------------------------------------------------------------------------- * Arduino objects - C++ only *----------------------------------------------------------------------------*/ diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/variant.h index c30d7ecc77..56bc3bdd9e 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/variant.h @@ -295,6 +295,7 @@ extern "C" { #ifdef __cplusplus } // extern "C" #endif + /*---------------------------------------------------------------------------- * Arduino objects - C++ only *----------------------------------------------------------------------------*/ diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/variant.h index 285ad662e0..f03ba32637 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/variant.h @@ -195,6 +195,7 @@ extern "C" { #ifdef __cplusplus } // extern "C" #endif + /*---------------------------------------------------------------------------- * Arduino objects - C++ only *----------------------------------------------------------------------------*/ diff --git a/buildroot/share/PlatformIO/variants/MARLIN_CREALITY_STM32F401RC/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_CREALITY_STM32F401RC/variant.h index 595601aae0..722a29d00d 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_CREALITY_STM32F401RC/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_CREALITY_STM32F401RC/variant.h @@ -123,6 +123,7 @@ extern "C" { #ifdef __cplusplus } // extern "C" #endif + /*---------------------------------------------------------------------------- * Arduino objects - C++ only *----------------------------------------------------------------------------*/ diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/variant.h index 8f17d052bb..4a0245e7e9 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/variant.h @@ -148,6 +148,7 @@ extern "C" { #ifdef __cplusplus } // extern "C" #endif + /*---------------------------------------------------------------------------- * Arduino objects - C++ only *----------------------------------------------------------------------------*/ diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/variant.h index 8e4f248c2e..3fac64958c 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/variant.h @@ -148,6 +148,7 @@ extern "C" { #ifdef __cplusplus } // extern "C" #endif + /*---------------------------------------------------------------------------- * Arduino objects - C++ only *----------------------------------------------------------------------------*/ diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/ldscript.ld index 3013b09607..ac7ac2e904 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/ldscript.ld +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/ldscript.ld @@ -4,7 +4,7 @@ ** File : LinkerScript.ld ** -** Author : Auto-generated by STM32CubeIDE +** Author : Auto-generated by STM32CubeIDE ** ** Abstract : Linker script for STM32F103V(8/B/C/E/F/GTx Device from STM32F1 series ** 64/128/256/512/768/1024Kbytes FLASH @@ -54,15 +54,15 @@ ENTRY(Reset_Handler) /* Highest address of the user mode stack */ -_estack = 0x20000000 + LD_MAX_DATA_SIZE; /* end of "RAM" Ram type memory */ +_estack = 0x20000000 + LD_MAX_DATA_SIZE; /* end of "RAM" Ram type memory */ _Min_Heap_Size = 0x200; /* required amount of heap */ _Min_Stack_Size = 0x400; /* required amount of stack */ /* Memories definition */ MEMORY { - RAM (xrw) : ORIGIN = 0x20000000, LENGTH = LD_MAX_DATA_SIZE - FLASH (rx) : ORIGIN = 0x8000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET + RAM (xrw) : ORIGIN = 0x20000000, LENGTH = LD_MAX_DATA_SIZE + FLASH (rx) : ORIGIN = 0x8000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET } /* Sections */ @@ -103,9 +103,9 @@ SECTIONS } >FLASH .ARM.extab : { - . = ALIGN(4); - *(.ARM.extab* .gnu.linkonce.armextab.*) - . = ALIGN(4); + . = ALIGN(4); + *(.ARM.extab* .gnu.linkonce.armextab.*) + . = ALIGN(4); } >FLASH .ARM : { . = ALIGN(4); diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/variant.h index e01d67fd59..4061db4e26 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/variant.h @@ -158,6 +158,7 @@ extern "C" { #ifdef __cplusplus } // extern "C" #endif + /*---------------------------------------------------------------------------- * Arduino objects - C++ only *----------------------------------------------------------------------------*/ diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/ldscript.ld index cac12da5c2..d995458f95 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/ldscript.ld +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/ldscript.ld @@ -1,10 +1,9 @@ /* ****************************************************************************** ** - ** File : LinkerScript.ld ** -** Author : Auto-generated by STM32CubeIDE +** Author : Auto-generated by STM32CubeIDE ** ** Abstract : Linker script for STM32F103Z(C/D/E/G/GTx Device from STM32F1 series ** 256/386/512K/786/1024bytes FLASH @@ -54,7 +53,7 @@ ENTRY(Reset_Handler) /* Highest address of the user mode stack */ -_estack = 0x20000000 + LD_MAX_DATA_SIZE; /* end of "RAM" Ram type memory */ +_estack = 0x20000000 + LD_MAX_DATA_SIZE; /* end of "RAM" Ram type memory */ _Min_Heap_Size = 0x200; /* required amount of heap */ _Min_Stack_Size = 0x400; /* required amount of stack */ @@ -62,7 +61,7 @@ _Min_Stack_Size = 0x400; /* required amount of stack */ MEMORY { RAM (xrw) : ORIGIN = 0x20000000, LENGTH = LD_MAX_DATA_SIZE - FLASH (rx) : ORIGIN = 0x8000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET + FLASH (rx) : ORIGIN = 0x8000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET } /* Sections */ @@ -103,9 +102,9 @@ SECTIONS } >FLASH .ARM.extab : { - . = ALIGN(4); - *(.ARM.extab* .gnu.linkonce.armextab.*) - . = ALIGN(4); + . = ALIGN(4); + *(.ARM.extab* .gnu.linkonce.armextab.*) + . = ALIGN(4); } >FLASH .ARM : { . = ALIGN(4); diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/variant.h index 330a7efbf8..8de1e062f9 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/variant.h @@ -205,6 +205,7 @@ extern "C" { #ifdef __cplusplus } // extern "C" #endif + /*---------------------------------------------------------------------------- * Arduino objects - C++ only *----------------------------------------------------------------------------*/ diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F401RC/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_F401RC/ldscript.ld index c7e67d311e..d028dfc000 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F401RC/ldscript.ld +++ b/buildroot/share/PlatformIO/variants/MARLIN_F401RC/ldscript.ld @@ -28,10 +28,10 @@ ENTRY(Reset_Handler) /* Highest address of the user mode stack */ -_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */ +_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */ -_Min_Heap_Size = 0x200; /* required amount of heap */ -_Min_Stack_Size = 0x400; /* required amount of stack */ +_Min_Heap_Size = 0x200; /* required amount of heap */ +_Min_Stack_Size = 0x400; /* required amount of stack */ /* Memories definition */ MEMORY diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F407VE/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_F407VE/variant.h index df8bf064fc..df45a5dbbb 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F407VE/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_F407VE/variant.h @@ -326,6 +326,7 @@ extern "C" { #ifdef __cplusplus } // extern "C" #endif + /*---------------------------------------------------------------------------- * Arduino objects - C++ only *----------------------------------------------------------------------------*/ diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F446VE/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_F446VE/variant.h index 855616f66b..b2111d04f2 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F446VE/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_F446VE/variant.h @@ -159,6 +159,7 @@ extern "C" { #ifdef __cplusplus } // extern "C" #endif + /*---------------------------------------------------------------------------- * Arduino objects - C++ only *----------------------------------------------------------------------------*/ diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/variant.h index 0b78be627f..d6f8e9fe83 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/variant.h @@ -176,6 +176,7 @@ extern "C" { #ifdef __cplusplus } // extern "C" #endif + /*---------------------------------------------------------------------------- * Arduino objects - C++ only *----------------------------------------------------------------------------*/ diff --git a/buildroot/share/PlatformIO/variants/MARLIN_FLY_F407ZG/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_FLY_F407ZG/variant.h index 2bfce85e21..80d5d3e009 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_FLY_F407ZG/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_FLY_F407ZG/variant.h @@ -37,121 +37,120 @@ extern "C" { * Pins *----------------------------------------------------------------------------*/ - -#define PA1 0 -#define PA2 1 -#define PA3 2 -#define PA4 3 -#define PA5 4 -#define PA6 5 -#define PA7 6 -#define PA8 7 -#define PA9 8 -#define PA10 9 -#define PA11 10 -#define PA12 11 -#define PA13 12 -#define PA14 13 -#define PA15 14 -#define PB0 15 -#define PB1 16 -#define PB2 17 -#define PB3 18 -#define PB4 19 -#define PB5 20 -#define PB6 21 -#define PB7 22 -#define PB8 23 -#define PB9 24 -#define PB10 25 -#define PB11 26 -#define PB12 27 -#define PB13 28 -#define PB14 29 -#define PB15 30 -#define PC2 31 -#define PC3 32 -#define PC4 33 -#define PC5 34 -#define PC6 35 -#define PC7 36 -#define PC8 37 -#define PC9 38 -#define PC10 39 -#define PC11 40 -#define PC12 41 -#define PC13 42 -#define PC14 43 -#define PC15 44 -#define PD0 45 -#define PD1 46 -#define PD2 47 -#define PD3 48 -#define PD4 49 -#define PD5 50 -#define PD6 51 -#define PD7 52 -#define PD8 53 -#define PD9 54 -#define PD10 55 -#define PD11 56 -#define PD12 57 -#define PD13 58 -#define PD14 59 -#define PD15 60 -#define PE0 61 -#define PE1 62 -#define PE11 63 -#define PE3 64 -#define PE4 65 -#define PE5 66 -#define PE6 67 -#define PE7 68 -#define PE8 69 -#define PE9 70 -#define PE10 71 +#define PA1 0 +#define PA2 1 +#define PA3 2 +#define PA4 3 +#define PA5 4 +#define PA6 5 +#define PA7 6 +#define PA8 7 +#define PA9 8 +#define PA10 9 +#define PA11 10 +#define PA12 11 +#define PA13 12 +#define PA14 13 +#define PA15 14 +#define PB0 15 +#define PB1 16 +#define PB2 17 +#define PB3 18 +#define PB4 19 +#define PB5 20 +#define PB6 21 +#define PB7 22 +#define PB8 23 +#define PB9 24 +#define PB10 25 +#define PB11 26 +#define PB12 27 +#define PB13 28 +#define PB14 29 +#define PB15 30 +#define PC2 31 +#define PC3 32 +#define PC4 33 +#define PC5 34 +#define PC6 35 +#define PC7 36 +#define PC8 37 +#define PC9 38 +#define PC10 39 +#define PC11 40 +#define PC12 41 +#define PC13 42 +#define PC14 43 +#define PC15 44 +#define PD0 45 +#define PD1 46 +#define PD2 47 +#define PD3 48 +#define PD4 49 +#define PD5 50 +#define PD6 51 +#define PD7 52 +#define PD8 53 +#define PD9 54 +#define PD10 55 +#define PD11 56 +#define PD12 57 +#define PD13 58 +#define PD14 59 +#define PD15 60 +#define PE0 61 +#define PE1 62 +#define PE11 63 +#define PE3 64 +#define PE4 65 +#define PE5 66 +#define PE6 67 +#define PE7 68 +#define PE8 69 +#define PE9 70 +#define PE10 71 #define PE2 72 -#define PE12 73 -#define PE13 74 -#define PE14 75 -#define PE15 76 -#define PF0 77 -#define PF1 78 -#define PF2 79 -#define PF6 80 -#define PF7 81 -#define PF8 82 -#define PF9 83 -#define PF11 84 -#define PF12 85 -#define PF13 86 -#define PF14 87 -#define PF15 88 -#define PG0 89 -#define PG1 90 -#define PG2 91 -#define PG3 92 -#define PG4 93 -#define PG5 94 -#define PG6 95 -#define PG7 96 -#define PG8 97 -#define PG9 98 -#define PG10 99 -#define PG11 100 -#define PG12 101 -#define PG13 102 -#define PG14 103 -#define PG15 104 -#define PH0 105 -#define PH1 106 -#define PA0 107 -#define PC1 108 -#define PC0 109 -#define PF10 110 -#define PF5 111 -#define PF4 112 -#define PF3 113 +#define PE12 73 +#define PE13 74 +#define PE14 75 +#define PE15 76 +#define PF0 77 +#define PF1 78 +#define PF2 79 +#define PF6 80 +#define PF7 81 +#define PF8 82 +#define PF9 83 +#define PF11 84 +#define PF12 85 +#define PF13 86 +#define PF14 87 +#define PF15 88 +#define PG0 89 +#define PG1 90 +#define PG2 91 +#define PG3 92 +#define PG4 93 +#define PG5 94 +#define PG6 95 +#define PG7 96 +#define PG8 97 +#define PG9 98 +#define PG10 99 +#define PG11 100 +#define PG12 101 +#define PG13 102 +#define PG14 103 +#define PG15 104 +#define PH0 105 +#define PH1 106 +#define PA0 107 +#define PC1 108 +#define PC0 109 +#define PF10 110 +#define PF5 111 +#define PF4 112 +#define PF3 113 // This must be a literal #define NUM_DIGITAL_PINS 114 @@ -212,6 +211,7 @@ extern "C" { #ifdef __cplusplus } // extern "C" #endif + /*---------------------------------------------------------------------------- * Arduino objects - C++ only *----------------------------------------------------------------------------*/ @@ -234,5 +234,5 @@ extern "C" { // pins are NOT connected to anything by default. #define SERIAL_PORT_MONITOR Serial #define SERIAL_PORT_HARDWARE Serial1 -#endif +#endif diff --git a/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/variant.h index 041c43b55f..ca3664daa1 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/variant.h @@ -121,6 +121,7 @@ extern "C" { #ifdef __cplusplus } // extern "C" #endif + /*---------------------------------------------------------------------------- * Arduino objects - C++ only *----------------------------------------------------------------------------*/ diff --git a/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_SPIDER_KING407/PeripheralPins.c b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_SPIDER_KING407/PeripheralPins.c index 4c0a7e4fa1..f8ec838146 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_SPIDER_KING407/PeripheralPins.c +++ b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_SPIDER_KING407/PeripheralPins.c @@ -47,10 +47,10 @@ WEAK const PinMap PinMap_ADC[] = { //{PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC1_IN1 //{PA_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC2_IN1 //{PA_1, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC3_IN1 - {PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC1_IN2 LCD RX + {PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC1_IN2 LCD RX //{PA_2, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC2_IN2 //{PA_2, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC3_IN2 - {PA_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC1_IN3 LCD TX + {PA_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC1_IN3 LCD TX //{PA_3, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC2_IN3 //{PA_3, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC3_IN3 //{PA_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC1_IN4 diff --git a/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_SPIDER_KING407/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_SPIDER_KING407/variant.h index c3a0c16811..abcbba8595 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_SPIDER_KING407/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_SPIDER_KING407/variant.h @@ -37,121 +37,120 @@ extern "C" { * Pins *----------------------------------------------------------------------------*/ - -#define PA1 0 -#define PA2 1 -#define PA3 2 -#define PA4 3 -#define PA5 4 -#define PA6 5 -#define PA7 6 -#define PA8 7 -#define PA9 8 -#define PA10 9 -#define PA11 10 -#define PA12 11 -#define PA13 12 -#define PA14 13 -#define PA15 14 -#define PB0 15 -#define PB1 16 -#define PB2 17 -#define PB3 18 -#define PB4 19 -#define PB5 20 -#define PB6 21 -#define PB7 22 -#define PB8 23 -#define PB9 24 -#define PB10 25 -#define PB11 26 -#define PB12 27 -#define PB13 28 -#define PB14 29 -#define PB15 30 -#define PC2 31 -#define PC3 32 -#define PC4 33 -#define PC5 34 -#define PC6 35 -#define PC7 36 -#define PC8 37 -#define PC9 38 -#define PC10 39 -#define PC11 40 -#define PC12 41 -#define PC13 42 -#define PC14 43 -#define PC15 44 -#define PD0 45 -#define PD1 46 -#define PD2 47 -#define PD3 48 -#define PD4 49 -#define PD5 50 -#define PD6 51 -#define PD7 52 -#define PD8 53 -#define PD9 54 -#define PD10 55 -#define PD11 56 -#define PD12 57 -#define PD13 58 -#define PD14 59 -#define PD15 60 -#define PE0 61 -#define PE1 62 -#define PE11 63 -#define PE3 64 -#define PE4 65 -#define PE5 66 -#define PE6 67 -#define PE7 68 -#define PE8 69 -#define PE9 70 -#define PE10 71 +#define PA1 0 +#define PA2 1 +#define PA3 2 +#define PA4 3 +#define PA5 4 +#define PA6 5 +#define PA7 6 +#define PA8 7 +#define PA9 8 +#define PA10 9 +#define PA11 10 +#define PA12 11 +#define PA13 12 +#define PA14 13 +#define PA15 14 +#define PB0 15 +#define PB1 16 +#define PB2 17 +#define PB3 18 +#define PB4 19 +#define PB5 20 +#define PB6 21 +#define PB7 22 +#define PB8 23 +#define PB9 24 +#define PB10 25 +#define PB11 26 +#define PB12 27 +#define PB13 28 +#define PB14 29 +#define PB15 30 +#define PC2 31 +#define PC3 32 +#define PC4 33 +#define PC5 34 +#define PC6 35 +#define PC7 36 +#define PC8 37 +#define PC9 38 +#define PC10 39 +#define PC11 40 +#define PC12 41 +#define PC13 42 +#define PC14 43 +#define PC15 44 +#define PD0 45 +#define PD1 46 +#define PD2 47 +#define PD3 48 +#define PD4 49 +#define PD5 50 +#define PD6 51 +#define PD7 52 +#define PD8 53 +#define PD9 54 +#define PD10 55 +#define PD11 56 +#define PD12 57 +#define PD13 58 +#define PD14 59 +#define PD15 60 +#define PE0 61 +#define PE1 62 +#define PE11 63 +#define PE3 64 +#define PE4 65 +#define PE5 66 +#define PE6 67 +#define PE7 68 +#define PE8 69 +#define PE9 70 +#define PE10 71 #define PE2 72 -#define PE12 73 -#define PE13 74 -#define PE14 75 -#define PE15 76 -#define PF0 77 -#define PF1 78 -#define PF2 79 -#define PF6 80 -#define PF7 81 -#define PF8 82 -#define PF9 83 -#define PF11 84 -#define PF12 85 -#define PF13 86 -#define PF14 87 -#define PF15 88 -#define PG0 89 -#define PG1 90 -#define PG2 91 -#define PG3 92 -#define PG4 93 -#define PG5 94 -#define PG6 95 -#define PG7 96 -#define PG8 97 -#define PG9 98 -#define PG10 99 -#define PG11 100 -#define PG12 101 -#define PG13 102 -#define PG14 103 -#define PG15 104 -#define PH0 105 -#define PH1 106 -#define PA0 107 -#define PC1 108 -#define PC0 109 -#define PF10 110 -#define PF5 111 -#define PF4 112 -#define PF3 113 +#define PE12 73 +#define PE13 74 +#define PE14 75 +#define PE15 76 +#define PF0 77 +#define PF1 78 +#define PF2 79 +#define PF6 80 +#define PF7 81 +#define PF8 82 +#define PF9 83 +#define PF11 84 +#define PF12 85 +#define PF13 86 +#define PF14 87 +#define PF15 88 +#define PG0 89 +#define PG1 90 +#define PG2 91 +#define PG3 92 +#define PG4 93 +#define PG5 94 +#define PG6 95 +#define PG7 96 +#define PG8 97 +#define PG9 98 +#define PG10 99 +#define PG11 100 +#define PG12 101 +#define PG13 102 +#define PG14 103 +#define PG15 104 +#define PH0 105 +#define PH1 106 +#define PA0 107 +#define PC1 108 +#define PC0 109 +#define PF10 110 +#define PF5 111 +#define PF4 112 +#define PF3 113 // This must be a literal #define NUM_DIGITAL_PINS 114 @@ -210,6 +209,7 @@ extern "C" { #ifdef __cplusplus } // extern "C" #endif + /*---------------------------------------------------------------------------- * Arduino objects - C++ only *----------------------------------------------------------------------------*/ @@ -230,8 +230,7 @@ extern "C" { // // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX // pins are NOT connected to anything by default. -#define SERIAL_PORT_MONITOR Serial -#define SERIAL_PORT_HARDWARE Serial1 +#define SERIAL_PORT_MONITOR Serial +#define SERIAL_PORT_HARDWARE Serial1 #define SERIAL_PORT_HARDWARE_OPEN Serial2 #endif - diff --git a/buildroot/share/PlatformIO/variants/MARLIN_LERDGE/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_LERDGE/variant.h index e7bc7c0bc1..e71bb1c5c8 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_LERDGE/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_LERDGE/variant.h @@ -218,6 +218,7 @@ extern "C" { #ifdef __cplusplus } // extern "C" #endif + /*---------------------------------------------------------------------------- * Arduino objects - C++ only *----------------------------------------------------------------------------*/ diff --git a/buildroot/share/PlatformIO/variants/MARLIN_MEGA_EXTENDED/pins_arduino.h b/buildroot/share/PlatformIO/variants/MARLIN_MEGA_EXTENDED/pins_arduino.h index 1129f8edae..f6bc62d57b 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_MEGA_EXTENDED/pins_arduino.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_MEGA_EXTENDED/pins_arduino.h @@ -118,324 +118,324 @@ static const uint8_t A15 = PIN_A15; #ifdef ARDUINO_MAIN const uint16_t PROGMEM port_to_mode_PGM[] = { - NOT_A_PORT, - (uint16_t) &DDRA, - (uint16_t) &DDRB, - (uint16_t) &DDRC, - (uint16_t) &DDRD, - (uint16_t) &DDRE, - (uint16_t) &DDRF, - (uint16_t) &DDRG, - (uint16_t) &DDRH, - NOT_A_PORT, - (uint16_t) &DDRJ, - (uint16_t) &DDRK, - (uint16_t) &DDRL, + NOT_A_PORT, + (uint16_t) &DDRA, + (uint16_t) &DDRB, + (uint16_t) &DDRC, + (uint16_t) &DDRD, + (uint16_t) &DDRE, + (uint16_t) &DDRF, + (uint16_t) &DDRG, + (uint16_t) &DDRH, + NOT_A_PORT, + (uint16_t) &DDRJ, + (uint16_t) &DDRK, + (uint16_t) &DDRL, }; const uint16_t PROGMEM port_to_output_PGM[] = { - NOT_A_PORT, - (uint16_t) &PORTA, - (uint16_t) &PORTB, - (uint16_t) &PORTC, - (uint16_t) &PORTD, - (uint16_t) &PORTE, - (uint16_t) &PORTF, - (uint16_t) &PORTG, - (uint16_t) &PORTH, - NOT_A_PORT, - (uint16_t) &PORTJ, - (uint16_t) &PORTK, - (uint16_t) &PORTL, + NOT_A_PORT, + (uint16_t) &PORTA, + (uint16_t) &PORTB, + (uint16_t) &PORTC, + (uint16_t) &PORTD, + (uint16_t) &PORTE, + (uint16_t) &PORTF, + (uint16_t) &PORTG, + (uint16_t) &PORTH, + NOT_A_PORT, + (uint16_t) &PORTJ, + (uint16_t) &PORTK, + (uint16_t) &PORTL, }; const uint16_t PROGMEM port_to_input_PGM[] = { - NOT_A_PIN, - (uint16_t) &PINA, - (uint16_t) &PINB, - (uint16_t) &PINC, - (uint16_t) &PIND, - (uint16_t) &PINE, - (uint16_t) &PINF, - (uint16_t) &PING, - (uint16_t) &PINH, - NOT_A_PIN, - (uint16_t) &PINJ, - (uint16_t) &PINK, - (uint16_t) &PINL, + NOT_A_PIN, + (uint16_t) &PINA, + (uint16_t) &PINB, + (uint16_t) &PINC, + (uint16_t) &PIND, + (uint16_t) &PINE, + (uint16_t) &PINF, + (uint16_t) &PING, + (uint16_t) &PINH, + NOT_A_PIN, + (uint16_t) &PINJ, + (uint16_t) &PINK, + (uint16_t) &PINL, }; const uint8_t PROGMEM digital_pin_to_port_PGM[] = { - // PORTLIST - // ------------------------------------------- - PE , // PE 0 ** 0 ** USART0_RX - PE , // PE 1 ** 1 ** USART0_TX - PE , // PE 4 ** 2 ** PWM2 - PE , // PE 5 ** 3 ** PWM3 - PG , // PG 5 ** 4 ** PWM4 - PE , // PE 3 ** 5 ** PWM5 - PH , // PH 3 ** 6 ** PWM6 - PH , // PH 4 ** 7 ** PWM7 - PH , // PH 5 ** 8 ** PWM8 - PH , // PH 6 ** 9 ** PWM9 - PB , // PB 4 ** 10 ** PWM10 - PB , // PB 5 ** 11 ** PWM11 - PB , // PB 6 ** 12 ** PWM12 - PB , // PB 7 ** 13 ** PWM13 - PJ , // PJ 1 ** 14 ** USART3_TX - PJ , // PJ 0 ** 15 ** USART3_RX - PH , // PH 1 ** 16 ** USART2_TX - PH , // PH 0 ** 17 ** USART2_RX - PD , // PD 3 ** 18 ** USART1_TX - PD , // PD 2 ** 19 ** USART1_RX - PD , // PD 1 ** 20 ** I2C_SDA - PD , // PD 0 ** 21 ** I2C_SCL - PA , // PA 0 ** 22 ** D22 - PA , // PA 1 ** 23 ** D23 - PA , // PA 2 ** 24 ** D24 - PA , // PA 3 ** 25 ** D25 - PA , // PA 4 ** 26 ** D26 - PA , // PA 5 ** 27 ** D27 - PA , // PA 6 ** 28 ** D28 - PA , // PA 7 ** 29 ** D29 - PC , // PC 7 ** 30 ** D30 - PC , // PC 6 ** 31 ** D31 - PC , // PC 5 ** 32 ** D32 - PC , // PC 4 ** 33 ** D33 - PC , // PC 3 ** 34 ** D34 - PC , // PC 2 ** 35 ** D35 - PC , // PC 1 ** 36 ** D36 - PC , // PC 0 ** 37 ** D37 - PD , // PD 7 ** 38 ** D38 - PG , // PG 2 ** 39 ** D39 - PG , // PG 1 ** 40 ** D40 - PG , // PG 0 ** 41 ** D41 - PL , // PL 7 ** 42 ** D42 - PL , // PL 6 ** 43 ** D43 - PL , // PL 5 ** 44 ** D44 - PL , // PL 4 ** 45 ** D45 - PL , // PL 3 ** 46 ** D46 - PL , // PL 2 ** 47 ** D47 - PL , // PL 1 ** 48 ** D48 - PL , // PL 0 ** 49 ** D49 - PB , // PB 3 ** 50 ** SPI_MISO - PB , // PB 2 ** 51 ** SPI_MOSI - PB , // PB 1 ** 52 ** SPI_SCK - PB , // PB 0 ** 53 ** SPI_SS - PF , // PF 0 ** 54 ** A0 - PF , // PF 1 ** 55 ** A1 - PF , // PF 2 ** 56 ** A2 - PF , // PF 3 ** 57 ** A3 - PF , // PF 4 ** 58 ** A4 - PF , // PF 5 ** 59 ** A5 - PF , // PF 6 ** 60 ** A6 - PF , // PF 7 ** 61 ** A7 - PK , // PK 0 ** 62 ** A8 - PK , // PK 1 ** 63 ** A9 - PK , // PK 2 ** 64 ** A10 - PK , // PK 3 ** 65 ** A11 - PK , // PK 4 ** 66 ** A12 - PK , // PK 5 ** 67 ** A13 - PK , // PK 6 ** 68 ** A14 - PK , // PK 7 ** 69 ** A15 - PG , // PG 4 ** 70 ** D70 - PG , // PG 3 ** 71 ** D71 - PJ , // PJ 2 ** 72 ** D72 - PJ , // PJ 3 ** 73 ** D73 - PJ , // PJ 7 ** 74 ** D74 - PJ , // PJ 4 ** 75 ** D75 - PJ , // PJ 5 ** 76 ** D76 - PJ , // PJ 6 ** 77 ** D77 - PE , // PE 2 ** 78 ** D78 - PE , // PE 6 ** 79 ** D79 - PE , // PE 7 ** 80 ** D80 - PD , // PD 4 ** 81 ** D81 - PD , // PD 5 ** 82 ** D82 - PD , // PD 6 ** 83 ** D83 - PH , // PH 2 ** 84 ** D84 - PH , // PH 7 ** 85 ** D85 + // PORTLIST + // ------------------------------------------- + PE , // PE 0 ** 0 ** USART0_RX + PE , // PE 1 ** 1 ** USART0_TX + PE , // PE 4 ** 2 ** PWM2 + PE , // PE 5 ** 3 ** PWM3 + PG , // PG 5 ** 4 ** PWM4 + PE , // PE 3 ** 5 ** PWM5 + PH , // PH 3 ** 6 ** PWM6 + PH , // PH 4 ** 7 ** PWM7 + PH , // PH 5 ** 8 ** PWM8 + PH , // PH 6 ** 9 ** PWM9 + PB , // PB 4 ** 10 ** PWM10 + PB , // PB 5 ** 11 ** PWM11 + PB , // PB 6 ** 12 ** PWM12 + PB , // PB 7 ** 13 ** PWM13 + PJ , // PJ 1 ** 14 ** USART3_TX + PJ , // PJ 0 ** 15 ** USART3_RX + PH , // PH 1 ** 16 ** USART2_TX + PH , // PH 0 ** 17 ** USART2_RX + PD , // PD 3 ** 18 ** USART1_TX + PD , // PD 2 ** 19 ** USART1_RX + PD , // PD 1 ** 20 ** I2C_SDA + PD , // PD 0 ** 21 ** I2C_SCL + PA , // PA 0 ** 22 ** D22 + PA , // PA 1 ** 23 ** D23 + PA , // PA 2 ** 24 ** D24 + PA , // PA 3 ** 25 ** D25 + PA , // PA 4 ** 26 ** D26 + PA , // PA 5 ** 27 ** D27 + PA , // PA 6 ** 28 ** D28 + PA , // PA 7 ** 29 ** D29 + PC , // PC 7 ** 30 ** D30 + PC , // PC 6 ** 31 ** D31 + PC , // PC 5 ** 32 ** D32 + PC , // PC 4 ** 33 ** D33 + PC , // PC 3 ** 34 ** D34 + PC , // PC 2 ** 35 ** D35 + PC , // PC 1 ** 36 ** D36 + PC , // PC 0 ** 37 ** D37 + PD , // PD 7 ** 38 ** D38 + PG , // PG 2 ** 39 ** D39 + PG , // PG 1 ** 40 ** D40 + PG , // PG 0 ** 41 ** D41 + PL , // PL 7 ** 42 ** D42 + PL , // PL 6 ** 43 ** D43 + PL , // PL 5 ** 44 ** D44 + PL , // PL 4 ** 45 ** D45 + PL , // PL 3 ** 46 ** D46 + PL , // PL 2 ** 47 ** D47 + PL , // PL 1 ** 48 ** D48 + PL , // PL 0 ** 49 ** D49 + PB , // PB 3 ** 50 ** SPI_MISO + PB , // PB 2 ** 51 ** SPI_MOSI + PB , // PB 1 ** 52 ** SPI_SCK + PB , // PB 0 ** 53 ** SPI_SS + PF , // PF 0 ** 54 ** A0 + PF , // PF 1 ** 55 ** A1 + PF , // PF 2 ** 56 ** A2 + PF , // PF 3 ** 57 ** A3 + PF , // PF 4 ** 58 ** A4 + PF , // PF 5 ** 59 ** A5 + PF , // PF 6 ** 60 ** A6 + PF , // PF 7 ** 61 ** A7 + PK , // PK 0 ** 62 ** A8 + PK , // PK 1 ** 63 ** A9 + PK , // PK 2 ** 64 ** A10 + PK , // PK 3 ** 65 ** A11 + PK , // PK 4 ** 66 ** A12 + PK , // PK 5 ** 67 ** A13 + PK , // PK 6 ** 68 ** A14 + PK , // PK 7 ** 69 ** A15 + PG , // PG 4 ** 70 ** D70 + PG , // PG 3 ** 71 ** D71 + PJ , // PJ 2 ** 72 ** D72 + PJ , // PJ 3 ** 73 ** D73 + PJ , // PJ 7 ** 74 ** D74 + PJ , // PJ 4 ** 75 ** D75 + PJ , // PJ 5 ** 76 ** D76 + PJ , // PJ 6 ** 77 ** D77 + PE , // PE 2 ** 78 ** D78 + PE , // PE 6 ** 79 ** D79 + PE , // PE 7 ** 80 ** D80 + PD , // PD 4 ** 81 ** D81 + PD , // PD 5 ** 82 ** D82 + PD , // PD 6 ** 83 ** D83 + PH , // PH 2 ** 84 ** D84 + PH , // PH 7 ** 85 ** D85 }; const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = { - // PIN IN PORT - // ------------------------------------------- - _BV( 0 ) , // PE 0 ** 0 ** USART0_RX - _BV( 1 ) , // PE 1 ** 1 ** USART0_TX - _BV( 4 ) , // PE 4 ** 2 ** PWM2 - _BV( 5 ) , // PE 5 ** 3 ** PWM3 - _BV( 5 ) , // PG 5 ** 4 ** PWM4 - _BV( 3 ) , // PE 3 ** 5 ** PWM5 - _BV( 3 ) , // PH 3 ** 6 ** PWM6 - _BV( 4 ) , // PH 4 ** 7 ** PWM7 - _BV( 5 ) , // PH 5 ** 8 ** PWM8 - _BV( 6 ) , // PH 6 ** 9 ** PWM9 - _BV( 4 ) , // PB 4 ** 10 ** PWM10 - _BV( 5 ) , // PB 5 ** 11 ** PWM11 - _BV( 6 ) , // PB 6 ** 12 ** PWM12 - _BV( 7 ) , // PB 7 ** 13 ** PWM13 - _BV( 1 ) , // PJ 1 ** 14 ** USART3_TX - _BV( 0 ) , // PJ 0 ** 15 ** USART3_RX - _BV( 1 ) , // PH 1 ** 16 ** USART2_TX - _BV( 0 ) , // PH 0 ** 17 ** USART2_RX - _BV( 3 ) , // PD 3 ** 18 ** USART1_TX - _BV( 2 ) , // PD 2 ** 19 ** USART1_RX - _BV( 1 ) , // PD 1 ** 20 ** I2C_SDA - _BV( 0 ) , // PD 0 ** 21 ** I2C_SCL - _BV( 0 ) , // PA 0 ** 22 ** D22 - _BV( 1 ) , // PA 1 ** 23 ** D23 - _BV( 2 ) , // PA 2 ** 24 ** D24 - _BV( 3 ) , // PA 3 ** 25 ** D25 - _BV( 4 ) , // PA 4 ** 26 ** D26 - _BV( 5 ) , // PA 5 ** 27 ** D27 - _BV( 6 ) , // PA 6 ** 28 ** D28 - _BV( 7 ) , // PA 7 ** 29 ** D29 - _BV( 7 ) , // PC 7 ** 30 ** D30 - _BV( 6 ) , // PC 6 ** 31 ** D31 - _BV( 5 ) , // PC 5 ** 32 ** D32 - _BV( 4 ) , // PC 4 ** 33 ** D33 - _BV( 3 ) , // PC 3 ** 34 ** D34 - _BV( 2 ) , // PC 2 ** 35 ** D35 - _BV( 1 ) , // PC 1 ** 36 ** D36 - _BV( 0 ) , // PC 0 ** 37 ** D37 - _BV( 7 ) , // PD 7 ** 38 ** D38 - _BV( 2 ) , // PG 2 ** 39 ** D39 - _BV( 1 ) , // PG 1 ** 40 ** D40 - _BV( 0 ) , // PG 0 ** 41 ** D41 - _BV( 7 ) , // PL 7 ** 42 ** D42 - _BV( 6 ) , // PL 6 ** 43 ** D43 - _BV( 5 ) , // PL 5 ** 44 ** D44 - _BV( 4 ) , // PL 4 ** 45 ** D45 - _BV( 3 ) , // PL 3 ** 46 ** D46 - _BV( 2 ) , // PL 2 ** 47 ** D47 - _BV( 1 ) , // PL 1 ** 48 ** D48 - _BV( 0 ) , // PL 0 ** 49 ** D49 - _BV( 3 ) , // PB 3 ** 50 ** SPI_MISO - _BV( 2 ) , // PB 2 ** 51 ** SPI_MOSI - _BV( 1 ) , // PB 1 ** 52 ** SPI_SCK - _BV( 0 ) , // PB 0 ** 53 ** SPI_SS - _BV( 0 ) , // PF 0 ** 54 ** A0 - _BV( 1 ) , // PF 1 ** 55 ** A1 - _BV( 2 ) , // PF 2 ** 56 ** A2 - _BV( 3 ) , // PF 3 ** 57 ** A3 - _BV( 4 ) , // PF 4 ** 58 ** A4 - _BV( 5 ) , // PF 5 ** 59 ** A5 - _BV( 6 ) , // PF 6 ** 60 ** A6 - _BV( 7 ) , // PF 7 ** 61 ** A7 - _BV( 0 ) , // PK 0 ** 62 ** A8 - _BV( 1 ) , // PK 1 ** 63 ** A9 - _BV( 2 ) , // PK 2 ** 64 ** A10 - _BV( 3 ) , // PK 3 ** 65 ** A11 - _BV( 4 ) , // PK 4 ** 66 ** A12 - _BV( 5 ) , // PK 5 ** 67 ** A13 - _BV( 6 ) , // PK 6 ** 68 ** A14 - _BV( 7 ) , // PK 7 ** 69 ** A15 - _BV( 4 ) , // PG 4 ** 70 ** D70 - _BV( 3 ) , // PG 3 ** 71 ** D71 - _BV( 2 ) , // PJ 2 ** 72 ** D72 - _BV( 3 ) , // PJ 3 ** 73 ** D73 - _BV( 7 ) , // PJ 7 ** 74 ** D74 - _BV( 4 ) , // PJ 4 ** 75 ** D75 - _BV( 5 ) , // PJ 5 ** 76 ** D76 - _BV( 6 ) , // PJ 6 ** 77 ** D77 - _BV( 2 ) , // PE 2 ** 78 ** D78 - _BV( 6 ) , // PE 6 ** 79 ** D79 - _BV( 7 ) , // PE 7 ** 80 ** D80 - _BV( 4 ) , // PD 4 ** 81 ** D81 - _BV( 5 ) , // PD 5 ** 82 ** D82 - _BV( 6 ) , // PD 6 ** 83 ** D83 - _BV( 2 ) , // PH 2 ** 84 ** D84 - _BV( 7 ) , // PH 7 ** 85 ** D85 + // PIN IN PORT + // ------------------------------------------- + _BV( 0 ) , // PE 0 ** 0 ** USART0_RX + _BV( 1 ) , // PE 1 ** 1 ** USART0_TX + _BV( 4 ) , // PE 4 ** 2 ** PWM2 + _BV( 5 ) , // PE 5 ** 3 ** PWM3 + _BV( 5 ) , // PG 5 ** 4 ** PWM4 + _BV( 3 ) , // PE 3 ** 5 ** PWM5 + _BV( 3 ) , // PH 3 ** 6 ** PWM6 + _BV( 4 ) , // PH 4 ** 7 ** PWM7 + _BV( 5 ) , // PH 5 ** 8 ** PWM8 + _BV( 6 ) , // PH 6 ** 9 ** PWM9 + _BV( 4 ) , // PB 4 ** 10 ** PWM10 + _BV( 5 ) , // PB 5 ** 11 ** PWM11 + _BV( 6 ) , // PB 6 ** 12 ** PWM12 + _BV( 7 ) , // PB 7 ** 13 ** PWM13 + _BV( 1 ) , // PJ 1 ** 14 ** USART3_TX + _BV( 0 ) , // PJ 0 ** 15 ** USART3_RX + _BV( 1 ) , // PH 1 ** 16 ** USART2_TX + _BV( 0 ) , // PH 0 ** 17 ** USART2_RX + _BV( 3 ) , // PD 3 ** 18 ** USART1_TX + _BV( 2 ) , // PD 2 ** 19 ** USART1_RX + _BV( 1 ) , // PD 1 ** 20 ** I2C_SDA + _BV( 0 ) , // PD 0 ** 21 ** I2C_SCL + _BV( 0 ) , // PA 0 ** 22 ** D22 + _BV( 1 ) , // PA 1 ** 23 ** D23 + _BV( 2 ) , // PA 2 ** 24 ** D24 + _BV( 3 ) , // PA 3 ** 25 ** D25 + _BV( 4 ) , // PA 4 ** 26 ** D26 + _BV( 5 ) , // PA 5 ** 27 ** D27 + _BV( 6 ) , // PA 6 ** 28 ** D28 + _BV( 7 ) , // PA 7 ** 29 ** D29 + _BV( 7 ) , // PC 7 ** 30 ** D30 + _BV( 6 ) , // PC 6 ** 31 ** D31 + _BV( 5 ) , // PC 5 ** 32 ** D32 + _BV( 4 ) , // PC 4 ** 33 ** D33 + _BV( 3 ) , // PC 3 ** 34 ** D34 + _BV( 2 ) , // PC 2 ** 35 ** D35 + _BV( 1 ) , // PC 1 ** 36 ** D36 + _BV( 0 ) , // PC 0 ** 37 ** D37 + _BV( 7 ) , // PD 7 ** 38 ** D38 + _BV( 2 ) , // PG 2 ** 39 ** D39 + _BV( 1 ) , // PG 1 ** 40 ** D40 + _BV( 0 ) , // PG 0 ** 41 ** D41 + _BV( 7 ) , // PL 7 ** 42 ** D42 + _BV( 6 ) , // PL 6 ** 43 ** D43 + _BV( 5 ) , // PL 5 ** 44 ** D44 + _BV( 4 ) , // PL 4 ** 45 ** D45 + _BV( 3 ) , // PL 3 ** 46 ** D46 + _BV( 2 ) , // PL 2 ** 47 ** D47 + _BV( 1 ) , // PL 1 ** 48 ** D48 + _BV( 0 ) , // PL 0 ** 49 ** D49 + _BV( 3 ) , // PB 3 ** 50 ** SPI_MISO + _BV( 2 ) , // PB 2 ** 51 ** SPI_MOSI + _BV( 1 ) , // PB 1 ** 52 ** SPI_SCK + _BV( 0 ) , // PB 0 ** 53 ** SPI_SS + _BV( 0 ) , // PF 0 ** 54 ** A0 + _BV( 1 ) , // PF 1 ** 55 ** A1 + _BV( 2 ) , // PF 2 ** 56 ** A2 + _BV( 3 ) , // PF 3 ** 57 ** A3 + _BV( 4 ) , // PF 4 ** 58 ** A4 + _BV( 5 ) , // PF 5 ** 59 ** A5 + _BV( 6 ) , // PF 6 ** 60 ** A6 + _BV( 7 ) , // PF 7 ** 61 ** A7 + _BV( 0 ) , // PK 0 ** 62 ** A8 + _BV( 1 ) , // PK 1 ** 63 ** A9 + _BV( 2 ) , // PK 2 ** 64 ** A10 + _BV( 3 ) , // PK 3 ** 65 ** A11 + _BV( 4 ) , // PK 4 ** 66 ** A12 + _BV( 5 ) , // PK 5 ** 67 ** A13 + _BV( 6 ) , // PK 6 ** 68 ** A14 + _BV( 7 ) , // PK 7 ** 69 ** A15 + _BV( 4 ) , // PG 4 ** 70 ** D70 + _BV( 3 ) , // PG 3 ** 71 ** D71 + _BV( 2 ) , // PJ 2 ** 72 ** D72 + _BV( 3 ) , // PJ 3 ** 73 ** D73 + _BV( 7 ) , // PJ 7 ** 74 ** D74 + _BV( 4 ) , // PJ 4 ** 75 ** D75 + _BV( 5 ) , // PJ 5 ** 76 ** D76 + _BV( 6 ) , // PJ 6 ** 77 ** D77 + _BV( 2 ) , // PE 2 ** 78 ** D78 + _BV( 6 ) , // PE 6 ** 79 ** D79 + _BV( 7 ) , // PE 7 ** 80 ** D80 + _BV( 4 ) , // PD 4 ** 81 ** D81 + _BV( 5 ) , // PD 5 ** 82 ** D82 + _BV( 6 ) , // PD 6 ** 83 ** D83 + _BV( 2 ) , // PH 2 ** 84 ** D84 + _BV( 7 ) , // PH 7 ** 85 ** D85 }; const uint8_t PROGMEM digital_pin_to_timer_PGM[] = { - // TIMERS - // ------------------------------------------- - NOT_ON_TIMER , // PE 0 ** 0 ** USART0_RX - NOT_ON_TIMER , // PE 1 ** 1 ** USART0_TX - TIMER3B , // PE 4 ** 2 ** PWM2 - TIMER3C , // PE 5 ** 3 ** PWM3 - TIMER0B , // PG 5 ** 4 ** PWM4 - TIMER3A , // PE 3 ** 5 ** PWM5 - TIMER4A , // PH 3 ** 6 ** PWM6 - TIMER4B , // PH 4 ** 7 ** PWM7 - TIMER4C , // PH 5 ** 8 ** PWM8 - TIMER2B , // PH 6 ** 9 ** PWM9 - TIMER2A , // PB 4 ** 10 ** PWM10 - TIMER1A , // PB 5 ** 11 ** PWM11 - TIMER1B , // PB 6 ** 12 ** PWM12 - TIMER0A , // PB 7 ** 13 ** PWM13 - NOT_ON_TIMER , // PJ 1 ** 14 ** USART3_TX - NOT_ON_TIMER , // PJ 0 ** 15 ** USART3_RX - NOT_ON_TIMER , // PH 1 ** 16 ** USART2_TX - NOT_ON_TIMER , // PH 0 ** 17 ** USART2_RX - NOT_ON_TIMER , // PD 3 ** 18 ** USART1_TX - NOT_ON_TIMER , // PD 2 ** 19 ** USART1_RX - NOT_ON_TIMER , // PD 1 ** 20 ** I2C_SDA - NOT_ON_TIMER , // PD 0 ** 21 ** I2C_SCL - NOT_ON_TIMER , // PA 0 ** 22 ** D22 - NOT_ON_TIMER , // PA 1 ** 23 ** D23 - NOT_ON_TIMER , // PA 2 ** 24 ** D24 - NOT_ON_TIMER , // PA 3 ** 25 ** D25 - NOT_ON_TIMER , // PA 4 ** 26 ** D26 - NOT_ON_TIMER , // PA 5 ** 27 ** D27 - NOT_ON_TIMER , // PA 6 ** 28 ** D28 - NOT_ON_TIMER , // PA 7 ** 29 ** D29 - NOT_ON_TIMER , // PC 7 ** 30 ** D30 - NOT_ON_TIMER , // PC 6 ** 31 ** D31 - NOT_ON_TIMER , // PC 5 ** 32 ** D32 - NOT_ON_TIMER , // PC 4 ** 33 ** D33 - NOT_ON_TIMER , // PC 3 ** 34 ** D34 - NOT_ON_TIMER , // PC 2 ** 35 ** D35 - NOT_ON_TIMER , // PC 1 ** 36 ** D36 - NOT_ON_TIMER , // PC 0 ** 37 ** D37 - NOT_ON_TIMER , // PD 7 ** 38 ** D38 - NOT_ON_TIMER , // PG 2 ** 39 ** D39 - NOT_ON_TIMER , // PG 1 ** 40 ** D40 - NOT_ON_TIMER , // PG 0 ** 41 ** D41 - NOT_ON_TIMER , // PL 7 ** 42 ** D42 - NOT_ON_TIMER , // PL 6 ** 43 ** D43 - TIMER5C , // PL 5 ** 44 ** D44 - TIMER5B , // PL 4 ** 45 ** D45 - TIMER5A , // PL 3 ** 46 ** D46 - NOT_ON_TIMER , // PL 2 ** 47 ** D47 - NOT_ON_TIMER , // PL 1 ** 48 ** D48 - NOT_ON_TIMER , // PL 0 ** 49 ** D49 - NOT_ON_TIMER , // PB 3 ** 50 ** SPI_MISO - NOT_ON_TIMER , // PB 2 ** 51 ** SPI_MOSI - NOT_ON_TIMER , // PB 1 ** 52 ** SPI_SCK - NOT_ON_TIMER , // PB 0 ** 53 ** SPI_SS - NOT_ON_TIMER , // PF 0 ** 54 ** A0 - NOT_ON_TIMER , // PF 1 ** 55 ** A1 - NOT_ON_TIMER , // PF 2 ** 56 ** A2 - NOT_ON_TIMER , // PF 3 ** 57 ** A3 - NOT_ON_TIMER , // PF 4 ** 58 ** A4 - NOT_ON_TIMER , // PF 5 ** 59 ** A5 - NOT_ON_TIMER , // PF 6 ** 60 ** A6 - NOT_ON_TIMER , // PF 7 ** 61 ** A7 - NOT_ON_TIMER , // PK 0 ** 62 ** A8 - NOT_ON_TIMER , // PK 1 ** 63 ** A9 - NOT_ON_TIMER , // PK 2 ** 64 ** A10 - NOT_ON_TIMER , // PK 3 ** 65 ** A11 - NOT_ON_TIMER , // PK 4 ** 66 ** A12 - NOT_ON_TIMER , // PK 5 ** 67 ** A13 - NOT_ON_TIMER , // PK 6 ** 68 ** A14 - NOT_ON_TIMER , // PK 7 ** 69 ** A15 - NOT_ON_TIMER , // PG 4 ** 70 ** D70 - NOT_ON_TIMER , // PG 3 ** 71 ** D71 - NOT_ON_TIMER , // PJ 2 ** 72 ** D72 - NOT_ON_TIMER , // PJ 3 ** 73 ** D73 - NOT_ON_TIMER , // PJ 7 ** 74 ** D74 - NOT_ON_TIMER , // PJ 4 ** 75 ** D75 - NOT_ON_TIMER , // PJ 5 ** 76 ** D76 - NOT_ON_TIMER , // PJ 6 ** 77 ** D77 - NOT_ON_TIMER , // PE 2 ** 78 ** D78 - NOT_ON_TIMER , // PE 6 ** 79 ** D79 - NOT_ON_TIMER , // PE 7 ** 80 ** D80 - NOT_ON_TIMER , // PD 4 ** 81 ** D81 - NOT_ON_TIMER , // PD 5 ** 82 ** D82 - NOT_ON_TIMER , // PD 6 ** 83 ** D83 - NOT_ON_TIMER , // PH 2 ** 84 ** D84 - NOT_ON_TIMER , // PH 7 ** 85 ** D85 + // TIMERS + // ------------------------------------------- + NOT_ON_TIMER , // PE 0 ** 0 ** USART0_RX + NOT_ON_TIMER , // PE 1 ** 1 ** USART0_TX + TIMER3B , // PE 4 ** 2 ** PWM2 + TIMER3C , // PE 5 ** 3 ** PWM3 + TIMER0B , // PG 5 ** 4 ** PWM4 + TIMER3A , // PE 3 ** 5 ** PWM5 + TIMER4A , // PH 3 ** 6 ** PWM6 + TIMER4B , // PH 4 ** 7 ** PWM7 + TIMER4C , // PH 5 ** 8 ** PWM8 + TIMER2B , // PH 6 ** 9 ** PWM9 + TIMER2A , // PB 4 ** 10 ** PWM10 + TIMER1A , // PB 5 ** 11 ** PWM11 + TIMER1B , // PB 6 ** 12 ** PWM12 + TIMER0A , // PB 7 ** 13 ** PWM13 + NOT_ON_TIMER , // PJ 1 ** 14 ** USART3_TX + NOT_ON_TIMER , // PJ 0 ** 15 ** USART3_RX + NOT_ON_TIMER , // PH 1 ** 16 ** USART2_TX + NOT_ON_TIMER , // PH 0 ** 17 ** USART2_RX + NOT_ON_TIMER , // PD 3 ** 18 ** USART1_TX + NOT_ON_TIMER , // PD 2 ** 19 ** USART1_RX + NOT_ON_TIMER , // PD 1 ** 20 ** I2C_SDA + NOT_ON_TIMER , // PD 0 ** 21 ** I2C_SCL + NOT_ON_TIMER , // PA 0 ** 22 ** D22 + NOT_ON_TIMER , // PA 1 ** 23 ** D23 + NOT_ON_TIMER , // PA 2 ** 24 ** D24 + NOT_ON_TIMER , // PA 3 ** 25 ** D25 + NOT_ON_TIMER , // PA 4 ** 26 ** D26 + NOT_ON_TIMER , // PA 5 ** 27 ** D27 + NOT_ON_TIMER , // PA 6 ** 28 ** D28 + NOT_ON_TIMER , // PA 7 ** 29 ** D29 + NOT_ON_TIMER , // PC 7 ** 30 ** D30 + NOT_ON_TIMER , // PC 6 ** 31 ** D31 + NOT_ON_TIMER , // PC 5 ** 32 ** D32 + NOT_ON_TIMER , // PC 4 ** 33 ** D33 + NOT_ON_TIMER , // PC 3 ** 34 ** D34 + NOT_ON_TIMER , // PC 2 ** 35 ** D35 + NOT_ON_TIMER , // PC 1 ** 36 ** D36 + NOT_ON_TIMER , // PC 0 ** 37 ** D37 + NOT_ON_TIMER , // PD 7 ** 38 ** D38 + NOT_ON_TIMER , // PG 2 ** 39 ** D39 + NOT_ON_TIMER , // PG 1 ** 40 ** D40 + NOT_ON_TIMER , // PG 0 ** 41 ** D41 + NOT_ON_TIMER , // PL 7 ** 42 ** D42 + NOT_ON_TIMER , // PL 6 ** 43 ** D43 + TIMER5C , // PL 5 ** 44 ** D44 + TIMER5B , // PL 4 ** 45 ** D45 + TIMER5A , // PL 3 ** 46 ** D46 + NOT_ON_TIMER , // PL 2 ** 47 ** D47 + NOT_ON_TIMER , // PL 1 ** 48 ** D48 + NOT_ON_TIMER , // PL 0 ** 49 ** D49 + NOT_ON_TIMER , // PB 3 ** 50 ** SPI_MISO + NOT_ON_TIMER , // PB 2 ** 51 ** SPI_MOSI + NOT_ON_TIMER , // PB 1 ** 52 ** SPI_SCK + NOT_ON_TIMER , // PB 0 ** 53 ** SPI_SS + NOT_ON_TIMER , // PF 0 ** 54 ** A0 + NOT_ON_TIMER , // PF 1 ** 55 ** A1 + NOT_ON_TIMER , // PF 2 ** 56 ** A2 + NOT_ON_TIMER , // PF 3 ** 57 ** A3 + NOT_ON_TIMER , // PF 4 ** 58 ** A4 + NOT_ON_TIMER , // PF 5 ** 59 ** A5 + NOT_ON_TIMER , // PF 6 ** 60 ** A6 + NOT_ON_TIMER , // PF 7 ** 61 ** A7 + NOT_ON_TIMER , // PK 0 ** 62 ** A8 + NOT_ON_TIMER , // PK 1 ** 63 ** A9 + NOT_ON_TIMER , // PK 2 ** 64 ** A10 + NOT_ON_TIMER , // PK 3 ** 65 ** A11 + NOT_ON_TIMER , // PK 4 ** 66 ** A12 + NOT_ON_TIMER , // PK 5 ** 67 ** A13 + NOT_ON_TIMER , // PK 6 ** 68 ** A14 + NOT_ON_TIMER , // PK 7 ** 69 ** A15 + NOT_ON_TIMER , // PG 4 ** 70 ** D70 + NOT_ON_TIMER , // PG 3 ** 71 ** D71 + NOT_ON_TIMER , // PJ 2 ** 72 ** D72 + NOT_ON_TIMER , // PJ 3 ** 73 ** D73 + NOT_ON_TIMER , // PJ 7 ** 74 ** D74 + NOT_ON_TIMER , // PJ 4 ** 75 ** D75 + NOT_ON_TIMER , // PJ 5 ** 76 ** D76 + NOT_ON_TIMER , // PJ 6 ** 77 ** D77 + NOT_ON_TIMER , // PE 2 ** 78 ** D78 + NOT_ON_TIMER , // PE 6 ** 79 ** D79 + NOT_ON_TIMER , // PE 7 ** 80 ** D80 + NOT_ON_TIMER , // PD 4 ** 81 ** D81 + NOT_ON_TIMER , // PD 5 ** 82 ** D82 + NOT_ON_TIMER , // PD 6 ** 83 ** D83 + NOT_ON_TIMER , // PH 2 ** 84 ** D84 + NOT_ON_TIMER , // PH 7 ** 85 ** D85 }; #endif diff --git a/buildroot/share/PlatformIO/variants/MARLIN_MKS_SKIPR_V1/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_MKS_SKIPR_V1/variant.h index 51a9e92286..0b6e6142ba 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_MKS_SKIPR_V1/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_MKS_SKIPR_V1/variant.h @@ -167,6 +167,7 @@ extern "C" { #ifdef __cplusplus } // extern "C" #endif + /*---------------------------------------------------------------------------- * Arduino objects - C++ only *----------------------------------------------------------------------------*/ diff --git a/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_V2/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_V2/variant.h index 30c3d95349..5232a1eaf2 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_V2/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_V2/variant.h @@ -121,6 +121,7 @@ extern "C" { #ifdef __cplusplus } // extern "C" #endif + /*---------------------------------------------------------------------------- * Arduino objects - C++ only *----------------------------------------------------------------------------*/ diff --git a/buildroot/share/cmake/CMakeLists.txt b/buildroot/share/cmake/CMakeLists.txt index 9d3f24f990..1ed9091e01 100644 --- a/buildroot/share/cmake/CMakeLists.txt +++ b/buildroot/share/cmake/CMakeLists.txt @@ -25,7 +25,7 @@ set(SCRIPT_BRANCH 1.0.2) #Set to wanted marlin-cmake release tag or branch if(NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/marlin-cmake) file(DOWNLOAD https://github.com/tohara/marlin-cmake/archive/${SCRIPT_BRANCH}.tar.gz - ${CMAKE_CURRENT_LIST_DIR}/marlin-cmake-src.tar.gz SHOW_PROGRESS) + ${CMAKE_CURRENT_LIST_DIR}/marlin-cmake-src.tar.gz SHOW_PROGRESS) execute_process(COMMAND ${CMAKE_COMMAND} -E tar -xvf ${CMAKE_CURRENT_LIST_DIR}/marlin-cmake-src.tar.gz WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}) @@ -36,7 +36,7 @@ if(NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/marlin-cmake) endif() if(WIN32 AND NOT EXISTS ${CMAKE_BINARY_DIR}/make.exe) - file(COPY ${CMAKE_CURRENT_LIST_DIR}/marlin-cmake/resources/make.exe DESTINATION ${CMAKE_BINARY_DIR}/) + file(COPY ${CMAKE_CURRENT_LIST_DIR}/marlin-cmake/resources/make.exe DESTINATION ${CMAKE_BINARY_DIR}/) endif() set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_LIST_DIR}/marlin-cmake/modules) @@ -105,9 +105,9 @@ set(${PROJECT_NAME}_SRCS "${SOURCES};../../../Marlin/Marlin.ino") # cmake .. -DUPLOAD_PORT=/dev/ttyACM0 # #====================================================================# if(UPLOAD_PORT) - set(${PROJECT_NAME}_PORT ${UPLOAD_PORT}) + set(${PROJECT_NAME}_PORT ${UPLOAD_PORT}) else() - set(${PROJECT_NAME}_PORT /dev/ttyACM0) + set(${PROJECT_NAME}_PORT /dev/ttyACM0) endif() #====================================================================# diff --git a/buildroot/share/dwin/bin/README.md b/buildroot/share/dwin/bin/README.md index 4a9b4687ab..a00d679bf8 100644 --- a/buildroot/share/dwin/bin/README.md +++ b/buildroot/share/dwin/bin/README.md @@ -42,15 +42,15 @@ These tools must be run from a terminal with access to an installed Python 3 and Pillow is most easily installed with pip: - python3 -m pip install pillow + python3 -m pip install pillow ## Examples These tools process an `.ICO` file that you specify. The safest method is to create a folder and copy your `.ICO` file there. For example: - $ mkdir hackicons - $ cp 9.ICO hackicons - $ cd hackicons + $ mkdir hackicons + $ cp 9.ICO hackicons + $ cd hackicons The following explanations will refer back to this layout. @@ -64,19 +64,19 @@ If you want to edit the individual icons stored in an ICO file (or add more imag In this example we're extracting the constituent JPEG files from `9.ICO` and storing them in a folder named `icons`. As each file is extracted the script reports its index number, byte offset, size, dimensions, and filename: - $ cd buildroot/share/dwin - $ ./bin/splitIco.py 9.ICO icons-9 - Splitting 9.ICO into dir icons - Splitting Entry Data... - 00: offset: 0x001000 len: 0x10a2 width: 130 height: 17 - Wrote 4258 bytes to icons/000-ICON_LOGO.jpg - 01: offset: 0x0020a2 len: 0x0eac width: 110 height: 100 - Wrote 3756 bytes to icons/001-ICON_Print_0.jpg - 02: offset: 0x002f4e len: 0x0eaa width: 110 height: 100 - Wrote 3754 bytes to icons/002-ICON_Print_1.jpg - ... - 91: offset: 0x0345fc len: 0x0d89 width: 110 height: 100 - Wrote 3465 bytes to icons/091-ICON_Info_1.jpg + $ cd buildroot/share/dwin + $ ./bin/splitIco.py 9.ICO icons-9 + Splitting 9.ICO into dir icons + Splitting Entry Data... + 00: offset: 0x001000 len: 0x10a2 width: 130 height: 17 + Wrote 4258 bytes to icons/000-ICON_LOGO.jpg + 01: offset: 0x0020a2 len: 0x0eac width: 110 height: 100 + Wrote 3756 bytes to icons/001-ICON_Print_0.jpg + 02: offset: 0x002f4e len: 0x0eaa width: 110 height: 100 + Wrote 3754 bytes to icons/002-ICON_Print_1.jpg + ... + 91: offset: 0x0345fc len: 0x0d89 width: 110 height: 100 + Wrote 3465 bytes to icons/091-ICON_Info_1.jpg Once the individual JPEG files have been saved they can be edited using common graphics applications like Photoshop. JPEG files are inherently lossy and will usually contain ugly artifacts, so cleanup may be needed before they are re-exported. Keep the limits of bank size in mind when exporting images and try to find the best balance between compressed size and image quality. @@ -84,9 +84,9 @@ Once the individual JPEG files have been saved they can be edited using common g After editing images you'll create a new `9.ICO` archive with `makeIco.py` like so: - $ cd buildroot/share/dwin - $ ./bin/makeIco.py icons-3 3.ICO - Making .ico file '3.ICO' from contents of 'icons-3' - Scanning icon directory icons-3 - ...Scanned 16 icon files - Scanning done. 16 icons included. + $ cd buildroot/share/dwin + $ ./bin/makeIco.py icons-3 3.ICO + Making .ico file '3.ICO' from contents of 'icons-3' + Scanning icon directory icons-3 + ...Scanned 16 icon files + Scanning done. 16 icons included. diff --git a/buildroot/share/vscode/avrdude_linux.conf b/buildroot/share/vscode/avrdude_linux.conf index ff429a028c..f889e3e142 100644 --- a/buildroot/share/vscode/avrdude_linux.conf +++ b/buildroot/share/vscode/avrdude_linux.conf @@ -240,8 +240,8 @@ #define AT86RF401 0xD0 #define AT89START 0xE0 -#define AT89S51 0xE0 -#define AT89S52 0xE1 +#define AT89S51 0xE0 +#define AT89S52 0xE1 # The following table lists the devices in the original AVR910 # appnote: @@ -293,15 +293,15 @@ # in the Internet. These add the following codes (only devices that # actually exist are listed): -# ATmega8515 0x3A -# ATmega128 0x43 -# ATmega64 0x45 -# ATtiny26 0x5E -# ATmega8535 0x69 -# ATmega32 0x72 -# ATmega16 0x74 -# ATmega8 0x76 -# ATmega169 0x78 +# ATmega8515 0x3A +# ATmega128 0x43 +# ATmega64 0x45 +# ATtiny26 0x5E +# ATmega8535 0x69 +# ATmega32 0x72 +# ATmega16 0x74 +# ATmega8 0x76 +# ATmega169 0x78 # # Overall avrdude defaults @@ -894,63 +894,63 @@ programmer # This is an HVSP-only device. part - id = "t11"; - desc = "ATtiny11"; - stk500_devcode = 0x11; - signature = 0x1e 0x90 0x04; - chip_erase_delay = 20000; + id = "t11"; + desc = "ATtiny11"; + stk500_devcode = 0x11; + signature = 0x1e 0x90 0x04; + chip_erase_delay = 20000; - timeout = 200; - hvsp_controlstack = - 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x00, - 0x68, 0x78, 0x68, 0x68, 0x00, 0x00, 0x68, 0x78, - 0x78, 0x00, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10, - 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - hvspcmdexedelay = 0; - synchcycles = 6; - latchcycles = 1; - togglevtg = 1; - poweroffdelay = 25; - resetdelayms = 0; - resetdelayus = 50; - hvleavestabdelay = 100; - resetdelay = 25; - chiperasepolltimeout = 40; - chiperasetime = 0; - programfusepolltimeout = 25; - programlockpolltimeout = 25; + timeout = 200; + hvsp_controlstack = + 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x00, + 0x68, 0x78, 0x68, 0x68, 0x00, 0x00, 0x68, 0x78, + 0x78, 0x00, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10, + 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + hvspcmdexedelay = 0; + synchcycles = 6; + latchcycles = 1; + togglevtg = 1; + poweroffdelay = 25; + resetdelayms = 0; + resetdelayus = 50; + hvleavestabdelay = 100; + resetdelay = 25; + chiperasepolltimeout = 40; + chiperasetime = 0; + programfusepolltimeout = 25; + programlockpolltimeout = 25; - memory "eeprom" - size = 64; - blocksize = 64; - readsize = 256; - delay = 5; - ; + memory "eeprom" + size = 64; + blocksize = 64; + readsize = 256; + delay = 5; + ; - memory "flash" - size = 1024; - blocksize = 128; - readsize = 256; - delay = 3; - ; + memory "flash" + size = 1024; + blocksize = 128; + readsize = 256; + delay = 3; + ; - memory "signature" - size = 3; - ; + memory "signature" + size = 3; + ; - memory "lock" - size = 1; - ; + memory "lock" + size = 1; + ; - memory "calibration" - size = 1; - ; + memory "calibration" + size = 1; + ; - memory "fuse" - size = 1; - ; + memory "fuse" + size = 1; + ; ; #------------------------------------------------------------ @@ -958,132 +958,132 @@ part #------------------------------------------------------------ part - id = "t12"; - desc = "ATtiny12"; - stk500_devcode = 0x12; - avr910_devcode = 0x55; - signature = 0x1e 0x90 0x05; - chip_erase_delay = 20000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "t12"; + desc = "ATtiny12"; + stk500_devcode = 0x12; + avr910_devcode = 0x55; + signature = 0x1e 0x90 0x05; + chip_erase_delay = 20000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - hvsp_controlstack = - 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x00, - 0x68, 0x78, 0x68, 0x68, 0x00, 0x00, 0x68, 0x78, - 0x78, 0x00, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10, - 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00; - hventerstabdelay = 100; - hvspcmdexedelay = 0; - synchcycles = 6; - latchcycles = 1; - togglevtg = 1; - poweroffdelay = 25; - resetdelayms = 0; - resetdelayus = 50; - hvleavestabdelay = 100; - resetdelay = 25; - chiperasepolltimeout = 40; - chiperasetime = 0; - programfusepolltimeout = 25; - programlockpolltimeout = 25; + hvsp_controlstack = + 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x00, + 0x68, 0x78, 0x68, 0x68, 0x00, 0x00, 0x68, 0x78, + 0x78, 0x00, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10, + 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00; + hventerstabdelay = 100; + hvspcmdexedelay = 0; + synchcycles = 6; + latchcycles = 1; + togglevtg = 1; + poweroffdelay = 25; + resetdelayms = 0; + resetdelayus = 50; + hvleavestabdelay = 100; + resetdelay = 25; + chiperasepolltimeout = 40; + chiperasetime = 0; + programfusepolltimeout = 25; + programlockpolltimeout = 25; - memory "eeprom" - size = 64; - min_write_delay = 9000; - max_write_delay = 20000; - readback_p1 = 0xff; - readback_p2 = 0xff; - read = "1 0 1 0 0 0 0 0 x x x x x x x x", - "x x a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 64; + min_write_delay = 9000; + max_write_delay = 20000; + readback_p1 = 0xff; + readback_p2 = 0xff; + read = "1 0 1 0 0 0 0 0 x x x x x x x x", + "x x a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = "1 1 0 0 0 0 0 0 x x x x x x x x", - "x x a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = "1 1 0 0 0 0 0 0 x x x x x x x x", + "x x a5 a4 a3 a2 a1 a0 i i i i i i i i"; - mode = 0x04; - delay = 8; - blocksize = 64; - readsize = 256; - ; + mode = 0x04; + delay = 8; + blocksize = 64; + readsize = 256; + ; - memory "flash" - size = 1024; - min_write_delay = 4500; - max_write_delay = 20000; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " x x x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + size = 1024; + min_write_delay = 4500; + max_write_delay = 20000; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " x x x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " x x x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " x x x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - write_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - mode = 0x04; - delay = 5; - blocksize = 128; - readsize = 256; - ; + mode = 0x04; + delay = 5; + blocksize = 128; + readsize = 256; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 a1 a0 o o o o o o o o"; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 x x x x x x x x", - "x x x x x x x x x x x x x o o x"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 x x x x x x x x", + "x x x x x x x x x x x x x o o x"; - write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1", - "x x x x x x x x x x x x x x x x"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1", + "x x x x x x x x x x x x x x x x"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; - memory "fuse" - size = 1; - read = "0 1 0 1 0 0 0 0 x x x x x x x x", - "x x x x x x x x o o o o o o o o"; + memory "fuse" + size = 1; + read = "0 1 0 1 0 0 0 0 x x x x x x x x", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 x x x x x", - "x x x x x x x x i i i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 x x x x x", + "x x x x x x x x i i i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; ; #------------------------------------------------------------ @@ -1091,170 +1091,170 @@ part #------------------------------------------------------------ part - id = "t13"; - desc = "ATtiny13"; - has_debugwire = yes; - flash_instr = 0xB4, 0x0E, 0x1E; - eeprom_instr = 0xBB, 0xFE, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, - 0xBC, 0x0E, 0xB4, 0x0E, 0xBA, 0x0D, 0xBB, 0xBC, - 0x99, 0xE1, 0xBB, 0xAC; - stk500_devcode = 0x14; - signature = 0x1e 0x90 0x07; - chip_erase_delay = 4000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "t13"; + desc = "ATtiny13"; + has_debugwire = yes; + flash_instr = 0xB4, 0x0E, 0x1E; + eeprom_instr = 0xBB, 0xFE, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, + 0xBC, 0x0E, 0xB4, 0x0E, 0xBA, 0x0D, 0xBB, 0xBC, + 0x99, 0xE1, 0xBB, 0xAC; + stk500_devcode = 0x14; + signature = 0x1e 0x90 0x07; + chip_erase_delay = 4000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - hvsp_controlstack = + hvsp_controlstack = 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66, - 0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78, - 0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10, - 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - hvspcmdexedelay = 0; - synchcycles = 6; - latchcycles = 1; - togglevtg = 1; - poweroffdelay = 25; - resetdelayms = 0; - resetdelayus = 90; - hvleavestabdelay = 100; - resetdelay = 25; - chiperasepolltimeout = 40; - chiperasetime = 0; - programfusepolltimeout = 25; - programlockpolltimeout = 25; + 0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78, + 0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10, + 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + hvspcmdexedelay = 0; + synchcycles = 6; + latchcycles = 1; + togglevtg = 1; + poweroffdelay = 25; + resetdelayms = 0; + resetdelayus = 90; + hvleavestabdelay = 100; + resetdelay = 25; + chiperasepolltimeout = 40; + chiperasetime = 0; + programfusepolltimeout = 25; + programlockpolltimeout = 25; - memory "eeprom" - size = 64; - page_size = 4; - min_write_delay = 4000; - max_write_delay = 4000; - readback_p1 = 0xff; - readback_p2 = 0xff; - read = "1 0 1 0 0 0 0 0 0 0 0 x x x x x", - "x x a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 64; + page_size = 4; + min_write_delay = 4000; + max_write_delay = 4000; + readback_p1 = 0xff; + readback_p2 = 0xff; + read = "1 0 1 0 0 0 0 0 0 0 0 x x x x x", + "x x a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = "1 1 0 0 0 0 0 0 0 0 0 x x x x x", - "x x a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = "1 1 0 0 0 0 0 0 0 0 0 x x x x x", + "x x a5 a4 a3 a2 a1 a0 i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x x x", " x x a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 5; - blocksize = 4; - readsize = 256; - ; + mode = 0x41; + delay = 5; + blocksize = 4; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 1024; - page_size = 32; - num_pages = 32; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 0 0 0 0 0 0 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 1024; + page_size = 32; + num_pages = 32; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 0 0 0 0 0 0 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 0 0 0 0 0 0 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 0 0 0 0 0 0 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 x x x x x", - " x x x x a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 x x x x x", + " x x x x a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 x x x x x", - " x x x x a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 x x x x x", + " x x x x a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 0 0 0 0 0 0 a8", - " a7 a6 a5 a4 x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 0 0 0 0 0 0 a8", + " a7 a6 a5 a4 x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 32; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 32; + readsize = 256; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; - memory "lock" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; + memory "lock" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + ; - memory "calibration" - size = 2; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 a0 o o o o o o o o"; - ; + memory "calibration" + size = 2; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 a0 o o o o o o o o"; + ; - memory "lfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; + memory "lfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + ; - memory "hfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; + memory "hfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + ; ; @@ -1264,132 +1264,132 @@ part #------------------------------------------------------------ part - id = "t15"; - desc = "ATtiny15"; - stk500_devcode = 0x13; - avr910_devcode = 0x56; - signature = 0x1e 0x90 0x06; - chip_erase_delay = 8200; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "t15"; + desc = "ATtiny15"; + stk500_devcode = 0x13; + avr910_devcode = 0x56; + signature = 0x1e 0x90 0x06; + chip_erase_delay = 8200; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - hvsp_controlstack = - 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x00, - 0x68, 0x78, 0x68, 0x68, 0x00, 0x00, 0x68, 0x78, - 0x78, 0x00, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10, - 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00; - hventerstabdelay = 100; - hvspcmdexedelay = 5; - synchcycles = 6; - latchcycles = 16; - togglevtg = 1; - poweroffdelay = 25; - resetdelayms = 0; - resetdelayus = 50; - hvleavestabdelay = 100; - resetdelay = 25; - chiperasepolltimeout = 40; - chiperasetime = 0; - programfusepolltimeout = 25; - programlockpolltimeout = 25; + hvsp_controlstack = + 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x00, + 0x68, 0x78, 0x68, 0x68, 0x00, 0x00, 0x68, 0x78, + 0x78, 0x00, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10, + 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00; + hventerstabdelay = 100; + hvspcmdexedelay = 5; + synchcycles = 6; + latchcycles = 16; + togglevtg = 1; + poweroffdelay = 25; + resetdelayms = 0; + resetdelayus = 50; + hvleavestabdelay = 100; + resetdelay = 25; + chiperasepolltimeout = 40; + chiperasetime = 0; + programfusepolltimeout = 25; + programlockpolltimeout = 25; - memory "eeprom" - size = 64; - min_write_delay = 8200; - max_write_delay = 8200; - readback_p1 = 0xff; - readback_p2 = 0xff; - read = "1 0 1 0 0 0 0 0 x x x x x x x x", - "x x a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 64; + min_write_delay = 8200; + max_write_delay = 8200; + readback_p1 = 0xff; + readback_p2 = 0xff; + read = "1 0 1 0 0 0 0 0 x x x x x x x x", + "x x a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = "1 1 0 0 0 0 0 0 x x x x x x x x", - "x x a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = "1 1 0 0 0 0 0 0 x x x x x x x x", + "x x a5 a4 a3 a2 a1 a0 i i i i i i i i"; - mode = 0x04; - delay = 10; - blocksize = 64; - readsize = 256; - ; + mode = 0x04; + delay = 10; + blocksize = 64; + readsize = 256; + ; - memory "flash" - size = 1024; - min_write_delay = 4100; - max_write_delay = 4100; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " x x x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + size = 1024; + min_write_delay = 4100; + max_write_delay = 4100; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " x x x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " x x x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " x x x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - write_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - mode = 0x04; - delay = 5; - blocksize = 128; - readsize = 256; - ; + mode = 0x04; + delay = 5; + blocksize = 128; + readsize = 256; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 a1 a0 o o o o o o o o"; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 x x x x x x x x", - "x x x x x x x x x x x x x o o x"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 x x x x x x x x", + "x x x x x x x x x x x x x o o x"; - write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1", - "x x x x x x x x x x x x x x x x"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1", + "x x x x x x x x x x x x x x x x"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; - memory "fuse" - size = 1; - read = "0 1 0 1 0 0 0 0 x x x x x x x x", - "x x x x x x x x o o o o x x o o"; + memory "fuse" + size = 1; + read = "0 1 0 1 0 0 0 0 x x x x x x x x", + "x x x x x x x x o o o o x x o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 x x x x x", - "x x x x x x x x i i i i 1 1 i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 x x x x x", + "x x x x x x x x i i i i 1 1 i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; ; #------------------------------------------------------------ @@ -1397,114 +1397,114 @@ part #------------------------------------------------------------ part - id = "1200"; - desc = "AT90S1200"; - stk500_devcode = 0x33; - avr910_devcode = 0x13; - signature = 0x1e 0x90 0x01; - pagel = 0xd7; - bs2 = 0xa0; - chip_erase_delay = 20000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "1200"; + desc = "AT90S1200"; + stk500_devcode = 0x33; + avr910_devcode = 0x13; + signature = 0x1e 0x90 0x01; + pagel = 0xd7; + bs2 = 0xa0; + chip_erase_delay = 20000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 1; - bytedelay = 0; - pollindex = 0; - pollvalue = 0xFF; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 1; + bytedelay = 0; + pollindex = 0; + pollvalue = 0xFF; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 0; - togglevtg = 0; - poweroffdelay = 0; - resetdelayms = 0; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 15; - chiperasepolltimeout = 0; - programfusepulsewidth = 2; - programfusepolltimeout = 0; - programlockpulsewidth = 0; - programlockpolltimeout = 1; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 0; + togglevtg = 0; + poweroffdelay = 0; + resetdelayms = 0; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 15; + chiperasepolltimeout = 0; + programfusepulsewidth = 2; + programfusepolltimeout = 0; + programlockpulsewidth = 0; + programlockpolltimeout = 1; - memory "eeprom" - size = 64; - min_write_delay = 4000; - max_write_delay = 9000; - readback_p1 = 0x00; - readback_p2 = 0xff; - read = "1 0 1 0 0 0 0 0 x x x x x x x x", - "x x a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 64; + min_write_delay = 4000; + max_write_delay = 9000; + readback_p1 = 0x00; + readback_p2 = 0xff; + read = "1 0 1 0 0 0 0 0 x x x x x x x x", + "x x a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = "1 1 0 0 0 0 0 0 x x x x x x x x", - "x x a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = "1 1 0 0 0 0 0 0 x x x x x x x x", + "x x a5 a4 a3 a2 a1 a0 i i i i i i i i"; - mode = 0x04; - delay = 20; - blocksize = 32; - readsize = 256; - ; - memory "flash" - size = 1024; - min_write_delay = 4000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " x x x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x04; + delay = 20; + blocksize = 32; + readsize = 256; + ; + memory "flash" + size = 1024; + min_write_delay = 4000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " x x x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " x x x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " x x x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - write_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - mode = 0x02; - delay = 15; - blocksize = 128; - readsize = 256; - ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; - memory "fuse" - size = 1; - ; - memory "lock" - size = 1; - min_write_delay = 9000; - max_write_delay = 20000; - write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1", - "x x x x x x x x x x x x x x x x"; - ; + mode = 0x02; + delay = 15; + blocksize = 128; + readsize = 256; + ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; + memory "fuse" + size = 1; + ; + memory "lock" + size = 1; + min_write_delay = 9000; + max_write_delay = 20000; + write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1", + "x x x x x x x x x x x x x x x x"; + ; ; #------------------------------------------------------------ @@ -1512,112 +1512,112 @@ part #------------------------------------------------------------ part - id = "4414"; - desc = "AT90S4414"; - stk500_devcode = 0x50; - avr910_devcode = 0x28; - signature = 0x1e 0x92 0x01; - chip_erase_delay = 20000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "4414"; + desc = "AT90S4414"; + stk500_devcode = 0x50; + avr910_devcode = 0x28; + signature = 0x1e 0x92 0x01; + chip_erase_delay = 20000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 0; - togglevtg = 0; - poweroffdelay = 0; - resetdelayms = 0; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 15; - chiperasepolltimeout = 0; - programfusepulsewidth = 2; - programfusepolltimeout = 0; - programlockpulsewidth = 0; - programlockpolltimeout = 1; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 0; + togglevtg = 0; + poweroffdelay = 0; + resetdelayms = 0; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 15; + chiperasepolltimeout = 0; + programfusepulsewidth = 2; + programfusepolltimeout = 0; + programlockpulsewidth = 0; + programlockpolltimeout = 1; - memory "eeprom" - size = 256; - min_write_delay = 9000; - max_write_delay = 20000; - readback_p1 = 0x80; - readback_p2 = 0x7f; - read = " 1 0 1 0 0 0 0 0 x x x x x x x a8", - "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 256; + min_write_delay = 9000; + max_write_delay = 20000; + readback_p1 = 0x80; + readback_p2 = 0x7f; + read = " 1 0 1 0 0 0 0 0 x x x x x x x a8", + "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0 x x x x x x x a8", - "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0 x x x x x x x a8", + "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; - mode = 0x04; - delay = 12; - blocksize = 64; - readsize = 256; - ; - memory "flash" - size = 4096; - min_write_delay = 9000; - max_write_delay = 20000; - readback_p1 = 0x7f; - readback_p2 = 0x7f; - read_lo = " 0 0 1 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x04; + delay = 12; + blocksize = 64; + readsize = 256; + ; + memory "flash" + size = 4096; + min_write_delay = 9000; + max_write_delay = 20000; + readback_p1 = 0x7f; + readback_p2 = 0x7f; + read_lo = " 0 0 1 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write_lo = " 0 1 0 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write_lo = " 0 1 0 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - write_hi = " 0 1 0 0 1 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write_hi = " 0 1 0 0 1 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - mode = 0x04; - delay = 12; - blocksize = 64; - readsize = 256; - ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; - memory "fuse" - size = 1; - ; - memory "lock" - size = 1; - write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1", + mode = 0x04; + delay = 12; + blocksize = 64; + readsize = 256; + ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; + memory "fuse" + size = 1; + ; + memory "lock" + size = 1; + write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1", "x x x x x x x x x x x x x x x x"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + min_write_delay = 9000; + max_write_delay = 9000; + ; ; #------------------------------------------------------------ @@ -1625,112 +1625,112 @@ part #------------------------------------------------------------ part - id = "2313"; - desc = "AT90S2313"; - stk500_devcode = 0x40; - avr910_devcode = 0x20; - signature = 0x1e 0x91 0x01; - chip_erase_delay = 20000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "2313"; + desc = "AT90S2313"; + stk500_devcode = 0x40; + avr910_devcode = 0x20; + signature = 0x1e 0x91 0x01; + chip_erase_delay = 20000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 0; - togglevtg = 0; - poweroffdelay = 0; - resetdelayms = 0; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 15; - chiperasepolltimeout = 0; - programfusepulsewidth = 2; - programfusepolltimeout = 0; - programlockpulsewidth = 0; - programlockpolltimeout = 1; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 0; + togglevtg = 0; + poweroffdelay = 0; + resetdelayms = 0; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 15; + chiperasepolltimeout = 0; + programfusepulsewidth = 2; + programfusepolltimeout = 0; + programlockpulsewidth = 0; + programlockpolltimeout = 1; - memory "eeprom" - size = 128; - min_write_delay = 4000; - max_write_delay = 9000; - readback_p1 = 0x80; - readback_p2 = 0x7f; - read = "1 0 1 0 0 0 0 0 x x x x x x x x", - "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 128; + min_write_delay = 4000; + max_write_delay = 9000; + readback_p1 = 0x80; + readback_p2 = 0x7f; + read = "1 0 1 0 0 0 0 0 x x x x x x x x", + "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = "1 1 0 0 0 0 0 0 x x x x x x x x", - "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = "1 1 0 0 0 0 0 0 x x x x x x x x", + "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; - mode = 0x04; - delay = 12; - blocksize = 64; - readsize = 256; - ; - memory "flash" - size = 2048; - min_write_delay = 4000; - max_write_delay = 9000; - readback_p1 = 0x7f; - readback_p2 = 0x7f; - read_lo = " 0 0 1 0 0 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x04; + delay = 12; + blocksize = 64; + readsize = 256; + ; + memory "flash" + size = 2048; + min_write_delay = 4000; + max_write_delay = 9000; + readback_p1 = 0x7f; + readback_p2 = 0x7f; + read_lo = " 0 0 1 0 0 0 0 0", + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - write_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - mode = 0x04; - delay = 12; - blocksize = 128; - readsize = 256; - ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; - memory "fuse" - size = 1; - ; - memory "lock" - size = 1; - write = "1 0 1 0 1 1 0 0 1 1 1 x x i i x", - "x x x x x x x x x x x x x x x x"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + mode = 0x04; + delay = 12; + blocksize = 128; + readsize = 256; + ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; + memory "fuse" + size = 1; + ; + memory "lock" + size = 1; + write = "1 0 1 0 1 1 0 0 1 1 1 x x i i x", + "x x x x x x x x x x x x x x x x"; + min_write_delay = 9000; + max_write_delay = 9000; + ; ; #------------------------------------------------------------ @@ -1738,126 +1738,126 @@ part #------------------------------------------------------------ part - id = "2333"; + id = "2333"; ##### WARNING: No XML file for device 'AT90S2333'! ##### - desc = "AT90S2333"; - stk500_devcode = 0x42; - avr910_devcode = 0x34; - signature = 0x1e 0x91 0x05; - chip_erase_delay = 20000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + desc = "AT90S2333"; + stk500_devcode = 0x42; + avr910_devcode = 0x34; + signature = 0x1e 0x91 0x05; + chip_erase_delay = 20000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 0; - togglevtg = 0; - poweroffdelay = 0; - resetdelayms = 0; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 15; - chiperasepolltimeout = 0; - programfusepulsewidth = 2; - programfusepolltimeout = 0; - programlockpulsewidth = 0; - programlockpolltimeout = 1; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 0; + togglevtg = 0; + poweroffdelay = 0; + resetdelayms = 0; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 15; + chiperasepolltimeout = 0; + programfusepulsewidth = 2; + programfusepolltimeout = 0; + programlockpulsewidth = 0; + programlockpolltimeout = 1; - memory "eeprom" - size = 128; - min_write_delay = 9000; - max_write_delay = 20000; - readback_p1 = 0x00; - readback_p2 = 0xff; - read = "1 0 1 0 0 0 0 0 x x x x x x x x", - "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 128; + min_write_delay = 9000; + max_write_delay = 20000; + readback_p1 = 0x00; + readback_p2 = 0xff; + read = "1 0 1 0 0 0 0 0 x x x x x x x x", + "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = "1 1 0 0 0 0 0 0 x x x x x x x x", - "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = "1 1 0 0 0 0 0 0 x x x x x x x x", + "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; - mode = 0x04; - delay = 12; - blocksize = 128; - readsize = 256; - ; + mode = 0x04; + delay = 12; + blocksize = 128; + readsize = 256; + ; - memory "flash" - size = 2048; - min_write_delay = 9000; - max_write_delay = 20000; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + size = 2048; + min_write_delay = 9000; + max_write_delay = 20000; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - write_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - mode = 0x04; - delay = 12; - blocksize = 128; - readsize = 256; - ; + mode = 0x04; + delay = 12; + blocksize = 128; + readsize = 256; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; - memory "fuse" - size = 1; - min_write_delay = 9000; - max_write_delay = 20000; - pwroff_after_write = yes; - read = "0 1 0 1 0 0 0 0 x x x x x x x x", - "x x x x x x x x x x o o o o o o"; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; + memory "fuse" + size = 1; + min_write_delay = 9000; + max_write_delay = 20000; + pwroff_after_write = yes; + read = "0 1 0 1 0 0 0 0 x x x x x x x x", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 i i i i i", - "x x x x x x x x x x x x x x x x"; - ; - memory "lock" - size = 1; - min_write_delay = 9000; - max_write_delay = 20000; - read = "0 1 0 1 1 0 0 0 x x x x x x x x", - "x x x x x x x x x x x x x o o x"; + write = "1 0 1 0 1 1 0 0 1 0 1 i i i i i", + "x x x x x x x x x x x x x x x x"; + ; + memory "lock" + size = 1; + min_write_delay = 9000; + max_write_delay = 20000; + read = "0 1 0 1 1 0 0 0 x x x x x x x x", + "x x x x x x x x x x x x x o o x"; - write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1", - "x x x x x x x x x x x x x x x x"; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1", + "x x x x x x x x x x x x x x x x"; + ; ; @@ -1866,122 +1866,122 @@ part #------------------------------------------------------------ part - id = "2343"; - desc = "AT90S2343"; - stk500_devcode = 0x43; - avr910_devcode = 0x4c; - signature = 0x1e 0x91 0x03; - chip_erase_delay = 18000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "2343"; + desc = "AT90S2343"; + stk500_devcode = 0x43; + avr910_devcode = 0x4c; + signature = 0x1e 0x91 0x03; + chip_erase_delay = 18000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - hvsp_controlstack = - 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x00, - 0x68, 0x78, 0x68, 0x68, 0x00, 0x00, 0x68, 0x78, - 0x78, 0x00, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10, - 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00; - hventerstabdelay = 100; - hvspcmdexedelay = 0; - synchcycles = 6; - latchcycles = 1; - togglevtg = 0; - poweroffdelay = 25; - resetdelayms = 0; - resetdelayus = 50; - hvleavestabdelay = 100; - resetdelay = 25; - chiperasepolltimeout = 40; - chiperasetime = 0; - programfusepolltimeout = 25; - programlockpolltimeout = 25; + hvsp_controlstack = + 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x00, + 0x68, 0x78, 0x68, 0x68, 0x00, 0x00, 0x68, 0x78, + 0x78, 0x00, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10, + 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00; + hventerstabdelay = 100; + hvspcmdexedelay = 0; + synchcycles = 6; + latchcycles = 1; + togglevtg = 0; + poweroffdelay = 25; + resetdelayms = 0; + resetdelayus = 50; + hvleavestabdelay = 100; + resetdelay = 25; + chiperasepolltimeout = 40; + chiperasetime = 0; + programfusepolltimeout = 25; + programlockpolltimeout = 25; - memory "eeprom" - size = 128; - min_write_delay = 9000; - max_write_delay = 20000; - readback_p1 = 0x00; - readback_p2 = 0xff; - read = "1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0", - "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 128; + min_write_delay = 9000; + max_write_delay = 20000; + readback_p1 = 0x00; + readback_p2 = 0xff; + read = "1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0", + "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = "1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0", - "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = "1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0", + "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; - mode = 0x04; - delay = 12; - blocksize = 64; - readsize = 256; - ; - memory "flash" - size = 2048; - min_write_delay = 9000; - max_write_delay = 20000; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x04; + delay = 12; + blocksize = 64; + readsize = 256; + ; + memory "flash" + size = 2048; + min_write_delay = 9000; + max_write_delay = 20000; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - write_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - mode = 0x04; - delay = 12; - blocksize = 128; - readsize = 128; - ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; - memory "fuse" - size = 1; - min_write_delay = 9000; - max_write_delay = 20000; - read = "0 1 0 1 1 0 0 0 x x x x x x x x", - "x x x x x x x x o o o x x x x o"; + mode = 0x04; + delay = 12; + blocksize = 128; + readsize = 128; + ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; + memory "fuse" + size = 1; + min_write_delay = 9000; + max_write_delay = 20000; + read = "0 1 0 1 1 0 0 0 x x x x x x x x", + "x x x x x x x x o o o x x x x o"; - write = "1 0 1 0 1 1 0 0 1 0 1 1 1 1 1 i", - "x x x x x x x x x x x x x x x x"; - ; - memory "lock" - size = 1; - min_write_delay = 9000; - max_write_delay = 20000; - read = "0 1 0 1 1 0 0 0 x x x x x x x x", - "x x x x x x x x o o o x x x x o"; + write = "1 0 1 0 1 1 0 0 1 0 1 1 1 1 1 i", + "x x x x x x x x x x x x x x x x"; + ; + memory "lock" + size = 1; + min_write_delay = 9000; + max_write_delay = 20000; + read = "0 1 0 1 1 0 0 0 x x x x x x x x", + "x x x x x x x x o o o x x x x o"; - write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1", - "x x x x x x x x x x x x x x x x"; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1", + "x x x x x x x x x x x x x x x x"; + ; ; @@ -1990,123 +1990,123 @@ part #------------------------------------------------------------ part - id = "4433"; - desc = "AT90S4433"; - stk500_devcode = 0x51; - avr910_devcode = 0x30; - signature = 0x1e 0x92 0x03; - chip_erase_delay = 20000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "4433"; + desc = "AT90S4433"; + stk500_devcode = 0x51; + avr910_devcode = 0x30; + signature = 0x1e 0x92 0x03; + chip_erase_delay = 20000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 0; - togglevtg = 0; - poweroffdelay = 0; - resetdelayms = 0; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 15; - chiperasepolltimeout = 0; - programfusepulsewidth = 2; - programfusepolltimeout = 0; - programlockpulsewidth = 0; - programlockpolltimeout = 1; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 0; + togglevtg = 0; + poweroffdelay = 0; + resetdelayms = 0; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 15; + chiperasepolltimeout = 0; + programfusepulsewidth = 2; + programfusepolltimeout = 0; + programlockpulsewidth = 0; + programlockpolltimeout = 1; - memory "eeprom" - size = 256; - min_write_delay = 9000; - max_write_delay = 20000; - readback_p1 = 0x00; - readback_p2 = 0xff; - read = " 1 0 1 0 0 0 0 0 x x x x x x x x", - "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 256; + min_write_delay = 9000; + max_write_delay = 20000; + readback_p1 = 0x00; + readback_p2 = 0xff; + read = " 1 0 1 0 0 0 0 0 x x x x x x x x", + "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0 x x x x x x x x", - "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0 x x x x x x x x", + "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; - mode = 0x04; - delay = 12; - blocksize = 128; - readsize = 256; - ; - memory "flash" - size = 4096; - min_write_delay = 9000; - max_write_delay = 20000; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " x x x x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x04; + delay = 12; + blocksize = 128; + readsize = 256; + ; + memory "flash" + size = 4096; + min_write_delay = 9000; + max_write_delay = 20000; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " x x x x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " x x x x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " x x x x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write_lo = " 0 1 0 0 0 0 0 0", - " x x x x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write_lo = " 0 1 0 0 0 0 0 0", + " x x x x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - write_hi = " 0 1 0 0 1 0 0 0", - " x x x x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write_hi = " 0 1 0 0 1 0 0 0", + " x x x x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - mode = 0x04; - delay = 12; - blocksize = 128; - readsize = 256; - ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; - memory "fuse" - size = 1; - min_write_delay = 9000; - max_write_delay = 20000; - pwroff_after_write = yes; - read = "0 1 0 1 0 0 0 0 x x x x x x x x", - "x x x x x x x x x x o o o o o o"; + mode = 0x04; + delay = 12; + blocksize = 128; + readsize = 256; + ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; + memory "fuse" + size = 1; + min_write_delay = 9000; + max_write_delay = 20000; + pwroff_after_write = yes; + read = "0 1 0 1 0 0 0 0 x x x x x x x x", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 i i i i i", - "x x x x x x x x x x x x x x x x"; - ; - memory "lock" - size = 1; - min_write_delay = 9000; - max_write_delay = 20000; - read = "0 1 0 1 1 0 0 0 x x x x x x x x", - "x x x x x x x x x x x x x o o x"; + write = "1 0 1 0 1 1 0 0 1 0 1 i i i i i", + "x x x x x x x x x x x x x x x x"; + ; + memory "lock" + size = 1; + min_write_delay = 9000; + max_write_delay = 20000; + read = "0 1 0 1 1 0 0 0 x x x x x x x x", + "x x x x x x x x x x x x x o o x"; - write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1", - "x x x x x x x x x x x x x x x x"; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1", + "x x x x x x x x x x x x x x x x"; + ; ; #------------------------------------------------------------ @@ -2114,82 +2114,82 @@ part #------------------------------------------------------------ part - id = "4434"; + id = "4434"; ##### WARNING: No XML file for device 'AT90S4434'! ##### - desc = "AT90S4434"; - stk500_devcode = 0x52; - avr910_devcode = 0x6c; - signature = 0x1e 0x92 0x02; - chip_erase_delay = 20000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + desc = "AT90S4434"; + stk500_devcode = 0x52; + avr910_devcode = 0x6c; + signature = 0x1e 0x92 0x02; + chip_erase_delay = 20000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; - memory "eeprom" - size = 256; - min_write_delay = 9000; - max_write_delay = 20000; - readback_p1 = 0x00; - readback_p2 = 0xff; - read = " 1 0 1 0 0 0 0 0 x x x x x x x x", - "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 256; + min_write_delay = 9000; + max_write_delay = 20000; + readback_p1 = 0x00; + readback_p2 = 0xff; + read = " 1 0 1 0 0 0 0 0 x x x x x x x x", + "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0 x x x x x x x x", - "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; - ; - memory "flash" - size = 4096; - min_write_delay = 9000; - max_write_delay = 20000; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " x x x x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + write = " 1 1 0 0 0 0 0 0 x x x x x x x x", + "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; + ; + memory "flash" + size = 4096; + min_write_delay = 9000; + max_write_delay = 20000; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " x x x x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " x x x x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " x x x x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write_lo = " 0 1 0 0 0 0 0 0", - " x x x x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write_lo = " 0 1 0 0 0 0 0 0", + " x x x x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - write_hi = " 0 1 0 0 1 0 0 0", - " x x x x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; - ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; - memory "fuse" - size = 1; - min_write_delay = 9000; - max_write_delay = 20000; - read = "0 1 0 1 0 0 0 0 x x x x x x x x", - "x x x x x x x x x x o o o o o o"; + write_hi = " 0 1 0 0 1 0 0 0", + " x x x x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; + ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; + memory "fuse" + size = 1; + min_write_delay = 9000; + max_write_delay = 20000; + read = "0 1 0 1 0 0 0 0 x x x x x x x x", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 i i i i i", - "x x x x x x x x x x x x x x x x"; - ; - memory "lock" - size = 1; - min_write_delay = 9000; - max_write_delay = 20000; - read = "0 1 0 1 1 0 0 0 x x x x x x x x", - "x x x x x x x x x x x x x o o x"; + write = "1 0 1 0 1 1 0 0 1 0 1 i i i i i", + "x x x x x x x x x x x x x x x x"; + ; + memory "lock" + size = 1; + min_write_delay = 9000; + max_write_delay = 20000; + read = "0 1 0 1 1 0 0 0 x x x x x x x x", + "x x x x x x x x x x x x x o o x"; - write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1", - "x x x x x x x x x x x x x x x x"; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1", + "x x x x x x x x x x x x x x x x"; + ; ; #------------------------------------------------------------ @@ -2197,113 +2197,113 @@ part #------------------------------------------------------------ part - id = "8515"; - desc = "AT90S8515"; - stk500_devcode = 0x60; - avr910_devcode = 0x38; - signature = 0x1e 0x93 0x01; - chip_erase_delay = 20000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "8515"; + desc = "AT90S8515"; + stk500_devcode = 0x60; + avr910_devcode = 0x38; + signature = 0x1e 0x93 0x01; + chip_erase_delay = 20000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = + pp_controlstack = 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 0; - togglevtg = 0; - poweroffdelay = 0; - resetdelayms = 0; - resetdelayus = 0; - hvleavestabdelay = 15; - resetdelay = 15; - chiperasepulsewidth = 15; - chiperasepolltimeout = 0; - programfusepulsewidth = 2; - programfusepolltimeout = 0; - programlockpulsewidth = 0; - programlockpolltimeout = 1; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 0; + togglevtg = 0; + poweroffdelay = 0; + resetdelayms = 0; + resetdelayus = 0; + hvleavestabdelay = 15; + resetdelay = 15; + chiperasepulsewidth = 15; + chiperasepolltimeout = 0; + programfusepulsewidth = 2; + programfusepolltimeout = 0; + programlockpulsewidth = 0; + programlockpolltimeout = 1; - memory "eeprom" - size = 512; - min_write_delay = 4000; - max_write_delay = 9000; - readback_p1 = 0x80; - readback_p2 = 0x7f; - read = " 1 0 1 0 0 0 0 0 x x x x x x x a8", - "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 512; + min_write_delay = 4000; + max_write_delay = 9000; + readback_p1 = 0x80; + readback_p2 = 0x7f; + read = " 1 0 1 0 0 0 0 0 x x x x x x x a8", + "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0 x x x x x x x a8", - "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0 x x x x x x x a8", + "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; - mode = 0x04; - delay = 12; - blocksize = 128; - readsize = 256; - ; - memory "flash" - size = 8192; - min_write_delay = 4000; - max_write_delay = 9000; - readback_p1 = 0x7f; - readback_p2 = 0x7f; - read_lo = " 0 0 1 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x04; + delay = 12; + blocksize = 128; + readsize = 256; + ; + memory "flash" + size = 8192; + min_write_delay = 4000; + max_write_delay = 9000; + readback_p1 = 0x7f; + readback_p2 = 0x7f; + read_lo = " 0 0 1 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write_lo = " 0 1 0 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write_lo = " 0 1 0 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - write_hi = " 0 1 0 0 1 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write_hi = " 0 1 0 0 1 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - mode = 0x04; - delay = 12; - blocksize = 128; - readsize = 256; - ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; - memory "fuse" - size = 1; - ; - memory "lock" - size = 1; - write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1", + mode = 0x04; + delay = 12; + blocksize = 128; + readsize = 256; + ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; + memory "fuse" + size = 1; + ; + memory "lock" + size = 1; + write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1", "x x x x x x x x x x x x x x x x"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + min_write_delay = 9000; + max_write_delay = 9000; + ; ; #------------------------------------------------------------ @@ -2311,120 +2311,120 @@ part #------------------------------------------------------------ part - id = "8535"; - desc = "AT90S8535"; - stk500_devcode = 0x61; - avr910_devcode = 0x68; - signature = 0x1e 0x93 0x03; - chip_erase_delay = 20000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "8535"; + desc = "AT90S8535"; + stk500_devcode = 0x61; + avr910_devcode = 0x68; + signature = 0x1e 0x93 0x03; + chip_erase_delay = 20000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 0; - togglevtg = 0; - poweroffdelay = 0; - resetdelayms = 0; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 15; - chiperasepolltimeout = 0; - programfusepulsewidth = 2; - programfusepolltimeout = 0; - programlockpulsewidth = 0; - programlockpolltimeout = 1; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 0; + togglevtg = 0; + poweroffdelay = 0; + resetdelayms = 0; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 15; + chiperasepolltimeout = 0; + programfusepulsewidth = 2; + programfusepolltimeout = 0; + programlockpulsewidth = 0; + programlockpolltimeout = 1; - memory "eeprom" - size = 512; - min_write_delay = 9000; - max_write_delay = 20000; - readback_p1 = 0x00; - readback_p2 = 0xff; - read = " 1 0 1 0 0 0 0 0 x x x x x x x a8", - "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 512; + min_write_delay = 9000; + max_write_delay = 20000; + readback_p1 = 0x00; + readback_p2 = 0xff; + read = " 1 0 1 0 0 0 0 0 x x x x x x x a8", + "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0 x x x x x x x a8", - "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0 x x x x x x x a8", + "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; - mode = 0x04; - delay = 12; - blocksize = 128; - readsize = 256; - ; - memory "flash" - size = 8192; - min_write_delay = 9000; - max_write_delay = 20000; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x04; + delay = 12; + blocksize = 128; + readsize = 256; + ; + memory "flash" + size = 8192; + min_write_delay = 9000; + max_write_delay = 20000; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write_lo = " 0 1 0 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write_lo = " 0 1 0 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - write_hi = " 0 1 0 0 1 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write_hi = " 0 1 0 0 1 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - mode = 0x04; - delay = 12; - blocksize = 128; - readsize = 256; - ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; - memory "fuse" - size = 1; - read = "0 1 0 1 1 0 0 0 x x x x x x x x", + mode = 0x04; + delay = 12; + blocksize = 128; + readsize = 256; + ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; + memory "fuse" + size = 1; + read = "0 1 0 1 1 0 0 0 x x x x x x x x", "x x x x x x x x x x x x x x x o"; - write = "1 0 1 0 1 1 0 0 1 0 1 1 1 1 1 i", + write = "1 0 1 0 1 1 0 0 1 0 1 1 1 1 1 i", "x x x x x x x x x x x x x x x x"; - min_write_delay = 9000; - max_write_delay = 9000; - ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 x x x x x x x x", + min_write_delay = 9000; + max_write_delay = 9000; + ; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 x x x x x x x x", "x x x x x x x x o o x x x x x x"; - write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1", + write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1", "x x x x x x x x x x x x x x x x"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + min_write_delay = 9000; + max_write_delay = 9000; + ; ; #------------------------------------------------------------ @@ -2432,138 +2432,138 @@ part #------------------------------------------------------------ part - id = "m103"; - desc = "ATMEGA103"; - stk500_devcode = 0xB1; - avr910_devcode = 0x41; - signature = 0x1e 0x97 0x01; - chip_erase_delay = 112000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "m103"; + desc = "ATMEGA103"; + stk500_devcode = 0xB1; + avr910_devcode = 0x41; + signature = 0x1e 0x97 0x01; + chip_erase_delay = 112000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = - 0x0E, 0x1E, 0x8E, 0x9E, 0x2E, 0x3E, 0xAE, 0xBE, - 0x4E, 0x5E, 0xCE, 0xDE, 0x6E, 0x7E, 0xEE, 0xDE, - 0x66, 0x76, 0xE6, 0xF6, 0x6A, 0x7A, 0xEA, 0x7A, - 0x7F, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 0; - togglevtg = 0; - poweroffdelay = 0; - resetdelayms = 0; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 15; - chiperasepolltimeout = 0; - programfusepulsewidth = 2; - programfusepolltimeout = 0; - programlockpulsewidth = 0; - programlockpolltimeout = 10; + pp_controlstack = + 0x0E, 0x1E, 0x8E, 0x9E, 0x2E, 0x3E, 0xAE, 0xBE, + 0x4E, 0x5E, 0xCE, 0xDE, 0x6E, 0x7E, 0xEE, 0xDE, + 0x66, 0x76, 0xE6, 0xF6, 0x6A, 0x7A, 0xEA, 0x7A, + 0x7F, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 0; + togglevtg = 0; + poweroffdelay = 0; + resetdelayms = 0; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 15; + chiperasepolltimeout = 0; + programfusepulsewidth = 2; + programfusepolltimeout = 0; + programlockpulsewidth = 0; + programlockpolltimeout = 10; - memory "eeprom" - size = 4096; - min_write_delay = 4000; - max_write_delay = 9000; - readback_p1 = 0x80; - readback_p2 = 0x7f; + memory "eeprom" + size = 4096; + min_write_delay = 4000; + max_write_delay = 9000; + readback_p1 = 0x80; + readback_p2 = 0x7f; read = " 1 0 1 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - mode = 0x04; - delay = 12; - blocksize = 64; - readsize = 256; - ; + mode = 0x04; + delay = 12; + blocksize = 64; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 131072; - page_size = 256; - num_pages = 512; - min_write_delay = 22000; - max_write_delay = 56000; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 131072; + page_size = 256; + num_pages = 512; + min_write_delay = 22000; + max_write_delay = 56000; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 x x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 x x x x x x x", + " x x x x x x x x"; - mode = 0x11; - delay = 70; - blocksize = 256; - readsize = 256; - ; + mode = 0x11; + delay = 70; + blocksize = 256; + readsize = 256; + ; - memory "fuse" - size = 1; - read = "0 1 0 1 0 0 0 0 x x x x x x x x", - "x x x x x x x x x x o x o 1 o o"; + memory "fuse" + size = 1; + read = "0 1 0 1 0 0 0 0 x x x x x x x x", + "x x x x x x x x x x o x o 1 o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 1 i 1 i i", - "x x x x x x x x x x x x x x x x"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 1 i 1 i i", + "x x x x x x x x x x x x x x x x"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 x x x x x x x x", - "x x x x x x x x x x x x x o o x"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 x x x x x x x x", + "x x x x x x x x x x x x x o o x"; - write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1", - "x x x x x x x x x x x x x x x x"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1", + "x x x x x x x x x x x x x x x x"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; @@ -2572,177 +2572,177 @@ part #------------------------------------------------------------ part - id = "m64"; - desc = "ATMEGA64"; - has_jtag = yes; - stk500_devcode = 0xA0; - avr910_devcode = 0x45; - signature = 0x1e 0x96 0x02; - chip_erase_delay = 9000; - pagel = 0xD7; - bs2 = 0xA0; - reset = dedicated; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "m64"; + desc = "ATMEGA64"; + has_jtag = yes; + stk500_devcode = 0xA0; + avr910_devcode = 0x45; + signature = 0x1e 0x96 0x02; + chip_erase_delay = 9000; + pagel = 0xD7; + bs2 = 0xA0; + reset = dedicated; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 6; - togglevtg = 0; - poweroffdelay = 0; - resetdelayms = 0; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 6; + togglevtg = 0; + poweroffdelay = 0; + resetdelayms = 0; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x22; - spmcr = 0x68; - allowfullpagebitstream = yes; + idr = 0x22; + spmcr = 0x68; + allowfullpagebitstream = yes; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 8; /* for parallel programming */ - size = 2048; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; - read = " 1 0 1 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 8; /* for parallel programming */ + size = 2048; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; + read = " 1 0 1 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - mode = 0x04; - delay = 20; - blocksize = 64; - readsize = 256; - ; + mode = 0x04; + delay = 20; + blocksize = 64; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 65536; - page_size = 256; - num_pages = 256; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " x a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 65536; + page_size = 256; + num_pages = 256; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " x a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " x a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " x a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " x a14 a13 a12 a11 a10 a9 a8", - " a7 x x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " x a14 a13 a12 a11 a10 a9 a8", + " a7 x x x x x x x", + " x x x x x x x x"; - mode = 0x21; - delay = 6; - blocksize = 128; - readsize = 256; - ; + mode = 0x21; + delay = 6; + blocksize = 128; + readsize = 256; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x x i i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x x i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 4; - read = "0 0 1 1 1 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 a1 a0 o o o o o o o o"; - ; + memory "calibration" + size = 4; + read = "0 0 1 1 1 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 a1 a0 o o o o o o o o"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; @@ -2753,177 +2753,177 @@ part #------------------------------------------------------------ part - id = "m128"; - desc = "ATMEGA128"; - has_jtag = yes; - stk500_devcode = 0xB2; - avr910_devcode = 0x43; - signature = 0x1e 0x97 0x02; - chip_erase_delay = 9000; - pagel = 0xD7; - bs2 = 0xA0; - reset = dedicated; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "m128"; + desc = "ATMEGA128"; + has_jtag = yes; + stk500_devcode = 0xB2; + avr910_devcode = 0x43; + signature = 0x1e 0x97 0x02; + chip_erase_delay = 9000; + pagel = 0xD7; + bs2 = 0xA0; + reset = dedicated; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 6; - togglevtg = 0; - poweroffdelay = 0; - resetdelayms = 0; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 6; + togglevtg = 0; + poweroffdelay = 0; + resetdelayms = 0; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x22; - spmcr = 0x68; - rampz = 0x3b; - allowfullpagebitstream = yes; + idr = 0x22; + spmcr = 0x68; + rampz = 0x3b; + allowfullpagebitstream = yes; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 8; /* for parallel programming */ - size = 4096; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; - read = " 1 0 1 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 8; /* for parallel programming */ + size = 4096; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; + read = " 1 0 1 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - mode = 0x04; - delay = 12; - blocksize = 64; - readsize = 256; - ; + mode = 0x04; + delay = 12; + blocksize = 64; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 131072; - page_size = 256; - num_pages = 512; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 131072; + page_size = 256; + num_pages = 512; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 x x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 x x x x x x x", + " x x x x x x x x"; - mode = 0x21; - delay = 6; - blocksize = 128; - readsize = 256; - ; + mode = 0x21; + delay = 6; + blocksize = 128; + readsize = 256; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x x i i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x x i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 4; - read = "0 0 1 1 1 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 a1 a0 o o o o o o o o"; - ; + memory "calibration" + size = 4; + read = "0 0 1 1 1 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 a1 a0 o o o o o o o o"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -2931,189 +2931,189 @@ part #------------------------------------------------------------ part - id = "c128"; - desc = "AT90CAN128"; - has_jtag = yes; - stk500_devcode = 0xB3; + id = "c128"; + desc = "AT90CAN128"; + has_jtag = yes; + stk500_devcode = 0xB3; # avr910_devcode = 0x43; - signature = 0x1e 0x97 0x81; - chip_erase_delay = 9000; - pagel = 0xD7; - bs2 = 0xA0; - reset = dedicated; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + signature = 0x1e 0x97 0x81; + chip_erase_delay = 9000; + pagel = 0xD7; + bs2 = 0xA0; + reset = dedicated; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 6; - togglevtg = 0; - poweroffdelay = 0; - resetdelayms = 0; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 6; + togglevtg = 0; + poweroffdelay = 0; + resetdelayms = 0; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - rampz = 0x3b; - eecr = 0x3f; - allowfullpagebitstream = no; + idr = 0x31; + spmcr = 0x57; + rampz = 0x3b; + eecr = 0x3f; + allowfullpagebitstream = no; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 8; /* for parallel programming */ - size = 4096; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 8; /* for parallel programming */ + size = 4096; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " 0 0 0 x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " 0 0 0 x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " 0 0 0 x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " 0 0 0 x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 a2 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x a11 a10 a9 a8", " a7 a6 a5 a4 a3 0 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 20; - blocksize = 8; - readsize = 256; - ; + mode = 0x41; + delay = 20; + blocksize = 8; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 131072; - page_size = 256; - num_pages = 512; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 131072; + page_size = 256; + num_pages = 512; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 x x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 x x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 256; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 256; + readsize = 256; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x i i i i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -3121,189 +3121,189 @@ part #------------------------------------------------------------ part - id = "c64"; - desc = "AT90CAN64"; - has_jtag = yes; - stk500_devcode = 0xB3; + id = "c64"; + desc = "AT90CAN64"; + has_jtag = yes; + stk500_devcode = 0xB3; # avr910_devcode = 0x43; - signature = 0x1e 0x96 0x81; - chip_erase_delay = 9000; - pagel = 0xD7; - bs2 = 0xA0; - reset = dedicated; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + signature = 0x1e 0x96 0x81; + chip_erase_delay = 9000; + pagel = 0xD7; + bs2 = 0xA0; + reset = dedicated; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 6; - togglevtg = 0; - poweroffdelay = 0; - resetdelayms = 0; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 6; + togglevtg = 0; + poweroffdelay = 0; + resetdelayms = 0; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - rampz = 0x3b; - eecr = 0x3f; - allowfullpagebitstream = no; + idr = 0x31; + spmcr = 0x57; + rampz = 0x3b; + eecr = 0x3f; + allowfullpagebitstream = no; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 8; /* for parallel programming */ - size = 2048; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 8; /* for parallel programming */ + size = 2048; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " 0 0 0 x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " 0 0 0 x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " 0 0 0 x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " 0 0 0 x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 a2 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x a10 a9 a8", " a7 a6 a5 a4 a3 0 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 20; - blocksize = 8; - readsize = 256; - ; + mode = 0x41; + delay = 20; + blocksize = 8; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 65536; - page_size = 256; - num_pages = 256; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 65536; + page_size = 256; + num_pages = 256; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 x x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 x x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 256; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 256; + readsize = 256; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x i i i i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -3311,189 +3311,189 @@ part #------------------------------------------------------------ part - id = "c32"; - desc = "AT90CAN32"; - has_jtag = yes; - stk500_devcode = 0xB3; + id = "c32"; + desc = "AT90CAN32"; + has_jtag = yes; + stk500_devcode = 0xB3; # avr910_devcode = 0x43; - signature = 0x1e 0x95 0x81; - chip_erase_delay = 9000; - pagel = 0xD7; - bs2 = 0xA0; - reset = dedicated; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + signature = 0x1e 0x95 0x81; + chip_erase_delay = 9000; + pagel = 0xD7; + bs2 = 0xA0; + reset = dedicated; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 6; - togglevtg = 0; - poweroffdelay = 0; - resetdelayms = 0; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 6; + togglevtg = 0; + poweroffdelay = 0; + resetdelayms = 0; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - rampz = 0x3b; - eecr = 0x3f; - allowfullpagebitstream = no; + idr = 0x31; + spmcr = 0x57; + rampz = 0x3b; + eecr = 0x3f; + allowfullpagebitstream = no; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 8; /* for parallel programming */ - size = 1024; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 8; /* for parallel programming */ + size = 1024; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " 0 0 0 x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " 0 0 0 x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " 0 0 0 x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " 0 0 0 x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 a2 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x a9 a8", " a7 a6 a5 a4 a3 0 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 20; - blocksize = 8; - readsize = 256; - ; + mode = 0x41; + delay = 20; + blocksize = 8; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 32768; - page_size = 256; - num_pages = 128; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 32768; + page_size = 256; + num_pages = 128; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 x x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 x x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 256; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 256; + readsize = 256; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x i i i i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; @@ -3502,174 +3502,174 @@ part #------------------------------------------------------------ part - id = "m16"; - desc = "ATMEGA16"; - has_jtag = yes; - stk500_devcode = 0x82; - avr910_devcode = 0x74; - signature = 0x1e 0x94 0x03; - pagel = 0xd7; - bs2 = 0xa0; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "m16"; + desc = "ATMEGA16"; + has_jtag = yes; + stk500_devcode = 0x82; + avr910_devcode = 0x74; + signature = 0x1e 0x94 0x03; + pagel = 0xd7; + bs2 = 0xa0; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = + pp_controlstack = 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 100; - latchcycles = 6; - togglevtg = 0; - poweroffdelay = 0; - resetdelayms = 0; - resetdelayus = 0; - hvleavestabdelay = 15; - resetdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + hventerstabdelay = 100; + progmodedelay = 100; + latchcycles = 6; + togglevtg = 0; + poweroffdelay = 0; + resetdelayms = 0; + resetdelayus = 0; + hvleavestabdelay = 15; + resetdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - allowfullpagebitstream = yes; + idr = 0x31; + spmcr = 0x57; + allowfullpagebitstream = yes; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 4; /* for parallel programming */ - size = 512; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 4; /* for parallel programming */ + size = 512; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " 0 0 x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " 0 0 x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " 0 0 x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " 0 0 x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x a9 a8", " a7 a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x04; - delay = 10; - blocksize = 128; - readsize = 256; - ; + mode = 0x04; + delay = 10; + blocksize = 128; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 16384; - page_size = 128; - num_pages = 128; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 0 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 16384; + page_size = 128; + num_pages = 128; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 0 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 0 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 0 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 0 a13 a12 a11 a10 a9 a8", - " a7 a6 x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 0 a13 a12 a11 a10 a9 a8", + " a7 a6 x x x x x x", + " x x x x x x x x"; - mode = 0x21; - delay = 6; - blocksize = 128; - readsize = 256; - ; + mode = 0x21; + delay = 6; + blocksize = 128; + readsize = 256; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lfuse" - size = 1; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "lfuse" + size = 1; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "hfuse" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; - memory "calibration" - size = 4; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; + memory "calibration" + size = 4; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 a1 a0 o o o o o o o o"; - ; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 a1 a0 o o o o o o o o"; + ; ; @@ -3680,187 +3680,187 @@ part # close to ATmega16 part - id = "m164p"; - desc = "ATMEGA164P"; - has_jtag = yes; - stk500_devcode = 0x82; # no STK500v1 support, use the ATmega16 one - avr910_devcode = 0x74; - signature = 0x1e 0x94 0x0a; - pagel = 0xd7; - bs2 = 0xa0; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "m164p"; + desc = "ATMEGA164P"; + has_jtag = yes; + stk500_devcode = 0x82; # no STK500v1 support, use the ATmega16 one + avr910_devcode = 0x74; + signature = 0x1e 0x94 0x0a; + pagel = 0xd7; + bs2 = 0xa0; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - allowfullpagebitstream = no; + idr = 0x31; + spmcr = 0x57; + allowfullpagebitstream = no; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 4; /* for parallel programming */ - size = 512; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 4; /* for parallel programming */ + size = 512; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " 0 0 x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " 0 0 x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " 0 0 x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " 0 0 x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x a9 a8", " a7 a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 128; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 128; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 16384; - page_size = 128; - num_pages = 128; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 0 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 16384; + page_size = 128; + num_pages = 128; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 0 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 0 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 0 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 0 a13 a12 a11 a10 a9 a8", - " a7 a6 x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 0 a13 a12 a11 a10 a9 a8", + " a7 a6 x x x x x x", + " x x x x x x x x"; - mode = 0x21; - delay = 6; - blocksize = 128; - readsize = 256; - ; + mode = 0x21; + delay = 6; + blocksize = 128; + readsize = 256; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lfuse" - size = 1; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "lfuse" + size = 1; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "hfuse" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; + memory "efuse" + size = 1; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x 1 1 1 1 1 i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x 1 1 1 1 1 i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; - memory "calibration" - size = 1; + memory "calibration" + size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; @@ -3871,187 +3871,187 @@ part # similar to ATmega164P part - id = "m324p"; - desc = "ATMEGA324P"; - has_jtag = yes; - stk500_devcode = 0x82; # no STK500v1 support, use the ATmega16 one - avr910_devcode = 0x74; - signature = 0x1e 0x95 0x08; - pagel = 0xd7; - bs2 = 0xa0; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "m324p"; + desc = "ATMEGA324P"; + has_jtag = yes; + stk500_devcode = 0x82; # no STK500v1 support, use the ATmega16 one + avr910_devcode = 0x74; + signature = 0x1e 0x95 0x08; + pagel = 0xd7; + bs2 = 0xa0; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - allowfullpagebitstream = no; + idr = 0x31; + spmcr = 0x57; + allowfullpagebitstream = no; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 4; /* for parallel programming */ - size = 1024; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 4; /* for parallel programming */ + size = 1024; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " 0 0 x x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " 0 0 x x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " 0 0 x x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " 0 0 x x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x a10 a9 a8", " a7 a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 128; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 128; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 32768; - page_size = 128; - num_pages = 256; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 32768; + page_size = 128; + num_pages = 256; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 x x x x x x", + " x x x x x x x x"; - mode = 0x21; - delay = 6; - blocksize = 256; - readsize = 256; - ; + mode = 0x21; + delay = 6; + blocksize = 256; + readsize = 256; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lfuse" - size = 1; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "lfuse" + size = 1; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "hfuse" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; + memory "efuse" + size = 1; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x 1 1 1 1 1 i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x 1 1 1 1 1 i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; - memory "calibration" - size = 1; + memory "calibration" + size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; @@ -4062,187 +4062,187 @@ part # similar to ATmega164 part - id = "m644"; - desc = "ATMEGA644"; - has_jtag = yes; - stk500_devcode = 0x82; # no STK500v1 support, use the ATmega16 one - avr910_devcode = 0x74; - signature = 0x1e 0x96 0x09; - pagel = 0xd7; - bs2 = 0xa0; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "m644"; + desc = "ATMEGA644"; + has_jtag = yes; + stk500_devcode = 0x82; # no STK500v1 support, use the ATmega16 one + avr910_devcode = 0x74; + signature = 0x1e 0x96 0x09; + pagel = 0xd7; + bs2 = 0xa0; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 6; - togglevtg = 0; - poweroffdelay = 0; - resetdelayms = 0; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 6; + togglevtg = 0; + poweroffdelay = 0; + resetdelayms = 0; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - allowfullpagebitstream = no; + idr = 0x31; + spmcr = 0x57; + allowfullpagebitstream = no; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 8; /* for parallel programming */ - size = 2048; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 8; /* for parallel programming */ + size = 2048; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " 0 0 x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " 0 0 x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " 0 0 x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " 0 0 x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 a2 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x a11 a10 a9 a8", " a7 a6 a5 a4 a3 0 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 128; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 128; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 65536; - page_size = 256; - num_pages = 256; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 65536; + page_size = 256; + num_pages = 256; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 x x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 x x x x x x x", + " x x x x x x x x"; - mode = 0x21; - delay = 6; - blocksize = 256; - readsize = 256; - ; + mode = 0x21; + delay = 6; + blocksize = 256; + readsize = 256; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lfuse" - size = 1; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "lfuse" + size = 1; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "hfuse" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; + memory "efuse" + size = 1; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x 1 1 1 1 1 i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x 1 1 1 1 1 i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; - memory "calibration" - size = 1; + memory "calibration" + size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -4252,187 +4252,187 @@ part # similar to ATmega164p part - id = "m644p"; - desc = "ATMEGA644P"; - has_jtag = yes; - stk500_devcode = 0x82; # no STK500v1 support, use the ATmega16 one - avr910_devcode = 0x74; - signature = 0x1e 0x96 0x0a; - pagel = 0xd7; - bs2 = 0xa0; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "m644p"; + desc = "ATMEGA644P"; + has_jtag = yes; + stk500_devcode = 0x82; # no STK500v1 support, use the ATmega16 one + avr910_devcode = 0x74; + signature = 0x1e 0x96 0x0a; + pagel = 0xd7; + bs2 = 0xa0; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 6; - togglevtg = 0; - poweroffdelay = 0; - resetdelayms = 0; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 6; + togglevtg = 0; + poweroffdelay = 0; + resetdelayms = 0; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - allowfullpagebitstream = no; + idr = 0x31; + spmcr = 0x57; + allowfullpagebitstream = no; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 8; /* for parallel programming */ - size = 2048; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 8; /* for parallel programming */ + size = 2048; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " 0 0 x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " 0 0 x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " 0 0 x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " 0 0 x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 a2 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x a11 a10 a9 a8", " a7 a6 a5 a4 a3 0 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 128; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 128; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 65536; - page_size = 256; - num_pages = 256; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 65536; + page_size = 256; + num_pages = 256; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 x x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 x x x x x x x", + " x x x x x x x x"; - mode = 0x21; - delay = 6; - blocksize = 256; - readsize = 256; - ; + mode = 0x21; + delay = 6; + blocksize = 256; + readsize = 256; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lfuse" - size = 1; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "lfuse" + size = 1; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "hfuse" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; + memory "efuse" + size = 1; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x 1 1 1 1 1 i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x 1 1 1 1 1 i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; - memory "calibration" - size = 1; + memory "calibration" + size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; @@ -4444,187 +4444,187 @@ part # similar to ATmega164p part - id = "m1284p"; - desc = "ATMEGA1284P"; - has_jtag = yes; - stk500_devcode = 0x82; # no STK500v1 support, use the ATmega16 one - avr910_devcode = 0x74; - signature = 0x1e 0x97 0x05; - pagel = 0xd7; - bs2 = 0xa0; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "m1284p"; + desc = "ATMEGA1284P"; + has_jtag = yes; + stk500_devcode = 0x82; # no STK500v1 support, use the ATmega16 one + avr910_devcode = 0x74; + signature = 0x1e 0x97 0x05; + pagel = 0xd7; + bs2 = 0xa0; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 6; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 6; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - allowfullpagebitstream = no; + idr = 0x31; + spmcr = 0x57; + allowfullpagebitstream = no; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 8; /* for parallel programming */ - size = 4096; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 8; /* for parallel programming */ + size = 4096; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " 0 0 x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " 0 0 x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " 0 0 x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " 0 0 x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 a2 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x a11 a10 a9 a8", " a7 a6 a5 a4 a3 0 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 128; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 128; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 131072; - page_size = 256; - num_pages = 512; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 131072; + page_size = 256; + num_pages = 512; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 x x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 x x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 256; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 256; + readsize = 256; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lfuse" - size = 1; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "lfuse" + size = 1; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "hfuse" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; + memory "efuse" + size = 1; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x 1 1 1 1 1 i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x 1 1 1 1 1 i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; - memory "calibration" - size = 1; + memory "calibration" + size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; @@ -4634,193 +4634,193 @@ part #------------------------------------------------------------ part - id = "m162"; - desc = "ATMEGA162"; - has_jtag = yes; - stk500_devcode = 0x83; - avr910_devcode = 0x63; - signature = 0x1e 0x94 0x04; - chip_erase_delay = 9000; - pagel = 0xd7; - bs2 = 0xa0; + id = "m162"; + desc = "ATMEGA162"; + has_jtag = yes; + stk500_devcode = 0x83; + avr910_devcode = 0x63; + signature = 0x1e 0x94 0x04; + chip_erase_delay = 9000; + pagel = 0xd7; + bs2 = 0xa0; - idr = 0x04; - spmcr = 0x57; - allowfullpagebitstream = yes; + idr = 0x04; + spmcr = 0x57; + allowfullpagebitstream = yes; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - memory "flash" - paged = yes; - size = 16384; - page_size = 128; - num_pages = 128; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; + memory "flash" + paged = yes; + size = 16384; + page_size = 128; + num_pages = 128; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 0 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 0 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 0 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 0 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 0 a13 a12 a11 a10 a9 a8", - " a7 a6 x x x x x x", - " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 128; - readsize = 256; + writepage = " 0 1 0 0 1 1 0 0", + " 0 0 a13 a12 a11 a10 a9 a8", + " a7 a6 x x x x x x", + " x x x x x x x x"; + mode = 0x41; + delay = 10; + blocksize = 128; + readsize = 256; - ; + ; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 6; - togglevtg = 0; - poweroffdelay = 0; - resetdelayms = 0; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 6; + togglevtg = 0; + poweroffdelay = 0; + resetdelayms = 0; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 4; /* for parallel programming */ - size = 512; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 4; /* for parallel programming */ + size = 512; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; - read = " 1 0 1 0 0 0 0 0", - " 0 0 x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read = " 1 0 1 0 0 0 0 0", + " 0 0 x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0", - " 0 0 x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0", + " 0 0 x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x a9 a8", " a7 a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 20; - blocksize = 4; - readsize = 256; - ; + mode = 0x41; + delay = 20; + blocksize = 4; + readsize = 256; + ; - memory "lfuse" - size = 1; - min_write_delay = 16000; - max_write_delay = 16000; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "lfuse" + size = 1; + min_write_delay = 16000; + max_write_delay = 16000; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "hfuse" - size = 1; - min_write_delay = 16000; - max_write_delay = 16000; + memory "hfuse" + size = 1; + min_write_delay = 16000; + max_write_delay = 16000; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "efuse" - size = 1; - min_write_delay = 16000; - max_write_delay = 16000; + memory "efuse" + size = 1; + min_write_delay = 16000; + max_write_delay = 16000; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x 1 1 1 1 1 i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x 1 1 1 1 1 i i i"; + ; - memory "lock" - size = 1; - min_write_delay = 16000; - max_write_delay = 16000; + memory "lock" + size = 1; + min_write_delay = 16000; + max_write_delay = 16000; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + ; - memory "signature" - size = 3; + memory "signature" + size = 3; - read = "0 0 1 1 0 0 0 0 0 0 x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + read = "0 0 1 1 0 0 0 0 0 0 x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; - memory "calibration" - size = 1; + memory "calibration" + size = 1; - read = "0 0 1 1 1 0 0 0 0 0 x x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + read = "0 0 1 1 1 0 0 0 0 0 x x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; @@ -4830,157 +4830,157 @@ part #------------------------------------------------------------ part - id = "m163"; - desc = "ATMEGA163"; - stk500_devcode = 0x81; - avr910_devcode = 0x64; - signature = 0x1e 0x94 0x02; - chip_erase_delay = 32000; - pagel = 0xd7; - bs2 = 0xa0; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "m163"; + desc = "ATMEGA163"; + stk500_devcode = 0x81; + avr910_devcode = 0x64; + signature = 0x1e 0x94 0x02; + chip_erase_delay = 32000; + pagel = 0xd7; + bs2 = 0xa0; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 0; - togglevtg = 0; - poweroffdelay = 0; - resetdelayms = 0; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 30; - programfusepulsewidth = 0; - programfusepolltimeout = 2; - programlockpulsewidth = 0; - programlockpolltimeout = 2; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 0; + togglevtg = 0; + poweroffdelay = 0; + resetdelayms = 0; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 30; + programfusepulsewidth = 0; + programfusepolltimeout = 2; + programlockpulsewidth = 0; + programlockpolltimeout = 2; memory "eeprom" - size = 512; - min_write_delay = 4000; - max_write_delay = 4000; - readback_p1 = 0xff; - readback_p2 = 0xff; + size = 512; + min_write_delay = 4000; + max_write_delay = 4000; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " x x x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " x x x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " x x x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; - mode = 0x41; - delay = 20; - blocksize = 4; - readsize = 256; - ; + " x x x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; + mode = 0x41; + delay = 20; + blocksize = 4; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 16384; - page_size = 128; - num_pages = 128; - min_write_delay = 16000; - max_write_delay = 16000; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " x x x a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 16384; + page_size = 128; + num_pages = 128; + min_write_delay = 16000; + max_write_delay = 16000; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " x x x a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " x x x a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " x x x a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " x x x a12 a11 a10 a9 a8", - " a7 a6 x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " x x x a12 a11 a10 a9 a8", + " a7 a6 x x x x x x", + " x x x x x x x x"; - mode = 0x11; - delay = 20; - blocksize = 128; - readsize = 256; - ; + mode = 0x11; + delay = 20; + blocksize = 128; + readsize = 256; + ; - memory "lfuse" - size = 1; - min_write_delay = 2000; - max_write_delay = 2000; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o x x o o o o"; + memory "lfuse" + size = 1; + min_write_delay = 2000; + max_write_delay = 2000; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o x x o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i 1 1 i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i 1 1 i i i i"; + ; - memory "hfuse" - size = 1; - min_write_delay = 2000; - max_write_delay = 2000; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x x x x x 1 o o o"; + memory "hfuse" + size = 1; + min_write_delay = 2000; + max_write_delay = 2000; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x x x x x 1 o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x 1 1 1 1 1 i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x 1 1 1 1 1 i i i"; + ; - memory "lock" - size = 1; - min_write_delay = 2000; - max_write_delay = 2000; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x 0 x x x x x o o o o o o"; + memory "lock" + size = 1; + min_write_delay = 2000; + max_write_delay = 2000; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x 0 x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -4988,179 +4988,179 @@ part #------------------------------------------------------------ part - id = "m169"; - desc = "ATMEGA169"; - has_jtag = yes; - stk500_devcode = 0x85; - avr910_devcode = 0x78; - signature = 0x1e 0x94 0x05; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "m169"; + desc = "ATMEGA169"; + has_jtag = yes; + stk500_devcode = 0x85; + avr910_devcode = 0x78; + signature = 0x1e 0x94 0x05; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; + idr = 0x31; + spmcr = 0x57; memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 4; /* for parallel programming */ - size = 512; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; + paged = no; /* leave this "no" */ + page_size = 4; /* for parallel programming */ + size = 512; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " x x x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " x x x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " x x x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " x x x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x x a8", " a7 a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 20; - blocksize = 4; - readsize = 256; - ; + mode = 0x41; + delay = 20; + blocksize = 4; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 16384; - page_size = 128; - num_pages = 128; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " x x x a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 16384; + page_size = 128; + num_pages = 128; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " x x x a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " x x x a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " x x x a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " x x x a12 a11 a10 a9 a8", - " a7 a6 x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " x x x a12 a11 a10 a9 a8", + " a7 a6 x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 128; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 128; + readsize = 256; + ; - memory "lfuse" - size = 1; - min_write_delay = 2000; - max_write_delay = 2000; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "lfuse" + size = 1; + min_write_delay = 2000; + max_write_delay = 2000; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "hfuse" - size = 1; - min_write_delay = 2000; - max_write_delay = 2000; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "hfuse" + size = 1; + min_write_delay = 2000; + max_write_delay = 2000; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x i i i i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + ; - memory "lock" - size = 1; - min_write_delay = 2000; - max_write_delay = 2000; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + min_write_delay = 2000; + max_write_delay = 2000; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -5168,182 +5168,182 @@ part #------------------------------------------------------------ part - id = "m329"; - desc = "ATMEGA329"; - has_jtag = yes; + id = "m329"; + desc = "ATMEGA329"; + has_jtag = yes; # stk500_devcode = 0x85; # no STK500 support, only STK500v2 # avr910_devcode = 0x?; # try the ATmega169 one: - avr910_devcode = 0x75; - signature = 0x1e 0x95 0x03; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + avr910_devcode = 0x75; + signature = 0x1e 0x95 0x03; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; + idr = 0x31; + spmcr = 0x57; memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 4; /* for parallel programming */ - size = 1024; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; + paged = no; /* leave this "no" */ + page_size = 4; /* for parallel programming */ + size = 1024; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x a9 a8", " a7 a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 20; - blocksize = 8; - readsize = 256; - ; + mode = 0x41; + delay = 20; + blocksize = 8; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 32768; - page_size = 128; - num_pages = 256; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " x a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 32768; + page_size = 128; + num_pages = 256; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " x a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " x a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " x a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " x x x a12 a11 a10 a9 a8", - " a7 a6 x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " x x x a12 a11 a10 a9 a8", + " a7 a6 x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 256; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 256; + readsize = 256; + ; - memory "lfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "lfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "hfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "hfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "efuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "efuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x i i i"; + ; - memory "lock" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -5352,182 +5352,182 @@ part # Identical to ATmega329 except of the signature part - id = "m329p"; - desc = "ATMEGA329P"; - has_jtag = yes; + id = "m329p"; + desc = "ATMEGA329P"; + has_jtag = yes; # stk500_devcode = 0x85; # no STK500 support, only STK500v2 # avr910_devcode = 0x?; # try the ATmega169 one: - avr910_devcode = 0x75; - signature = 0x1e 0x95 0x0b; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + avr910_devcode = 0x75; + signature = 0x1e 0x95 0x0b; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; + idr = 0x31; + spmcr = 0x57; memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 4; /* for parallel programming */ - size = 1024; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; + paged = no; /* leave this "no" */ + page_size = 4; /* for parallel programming */ + size = 1024; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x a9 a8", " a7 a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 20; - blocksize = 8; - readsize = 256; - ; + mode = 0x41; + delay = 20; + blocksize = 8; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 32768; - page_size = 128; - num_pages = 256; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " x a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 32768; + page_size = 128; + num_pages = 256; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " x a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " x a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " x a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " x x x a12 a11 a10 a9 a8", - " a7 a6 x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " x x x a12 a11 a10 a9 a8", + " a7 a6 x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 256; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 256; + readsize = 256; + ; - memory "lfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "lfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "hfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "hfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "efuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "efuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x i i i"; + ; - memory "lock" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -5537,182 +5537,182 @@ part # identical to ATmega329 part - id = "m3290"; - desc = "ATMEGA3290"; - has_jtag = yes; + id = "m3290"; + desc = "ATMEGA3290"; + has_jtag = yes; # stk500_devcode = 0x85; # no STK500 support, only STK500v2 # avr910_devcode = 0x?; # try the ATmega169 one: - avr910_devcode = 0x75; - signature = 0x1e 0x95 0x04; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + avr910_devcode = 0x75; + signature = 0x1e 0x95 0x04; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; + idr = 0x31; + spmcr = 0x57; memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 4; /* for parallel programming */ - size = 1024; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; + paged = no; /* leave this "no" */ + page_size = 4; /* for parallel programming */ + size = 1024; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x a9 a8", " a7 a6 a5 a4 a3 a3 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 20; - blocksize = 8; - readsize = 256; - ; + mode = 0x41; + delay = 20; + blocksize = 8; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 32768; - page_size = 128; - num_pages = 256; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " x a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 32768; + page_size = 128; + num_pages = 256; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " x a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " x a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " x a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " x x x a12 a11 a10 a9 a8", - " a7 a6 x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " x x x a12 a11 a10 a9 a8", + " a7 a6 x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 256; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 256; + readsize = 256; + ; - memory "lfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "lfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "hfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "hfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "efuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "efuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x i i i"; + ; - memory "lock" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -5722,182 +5722,182 @@ part # identical to ATmega3290 except of the signature part - id = "m3290p"; - desc = "ATMEGA3290P"; - has_jtag = yes; + id = "m3290p"; + desc = "ATMEGA3290P"; + has_jtag = yes; # stk500_devcode = 0x85; # no STK500 support, only STK500v2 # avr910_devcode = 0x?; # try the ATmega169 one: - avr910_devcode = 0x75; - signature = 0x1e 0x95 0x0c; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + avr910_devcode = 0x75; + signature = 0x1e 0x95 0x0c; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; + idr = 0x31; + spmcr = 0x57; memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 4; /* for parallel programming */ - size = 1024; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; + paged = no; /* leave this "no" */ + page_size = 4; /* for parallel programming */ + size = 1024; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x a9 a8", " a7 a6 a5 a4 a3 a3 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 20; - blocksize = 8; - readsize = 256; - ; + mode = 0x41; + delay = 20; + blocksize = 8; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 32768; - page_size = 128; - num_pages = 256; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " x a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 32768; + page_size = 128; + num_pages = 256; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " x a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " x a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " x a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " x x x a12 a11 a10 a9 a8", - " a7 a6 x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " x x x a12 a11 a10 a9 a8", + " a7 a6 x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 256; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 256; + readsize = 256; + ; - memory "lfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "lfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "hfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "hfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "efuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "efuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x i i i"; + ; - memory "lock" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -5905,182 +5905,182 @@ part #------------------------------------------------------------ part - id = "m649"; - desc = "ATMEGA649"; - has_jtag = yes; + id = "m649"; + desc = "ATMEGA649"; + has_jtag = yes; # stk500_devcode = 0x85; # no STK500 support, only STK500v2 # avr910_devcode = 0x?; # try the ATmega169 one: - avr910_devcode = 0x75; - signature = 0x1e 0x96 0x03; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + avr910_devcode = 0x75; + signature = 0x1e 0x96 0x03; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; + idr = 0x31; + spmcr = 0x57; memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 8; /* for parallel programming */ - size = 2048; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; + paged = no; /* leave this "no" */ + page_size = 8; /* for parallel programming */ + size = 2048; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " x x x x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " x x x x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " x x x x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " x x x x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 a2 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x a10 a9 a8", " a7 a6 a5 a4 a3 0 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 20; - blocksize = 8; - readsize = 256; - ; + mode = 0x41; + delay = 20; + blocksize = 8; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 65536; - page_size = 256; - num_pages = 256; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 65536; + page_size = 256; + num_pages = 256; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " x x x a12 a11 a10 a9 a8", - " a7 x x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " x x x a12 a11 a10 a9 a8", + " a7 x x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 256; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 256; + readsize = 256; + ; - memory "lfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "lfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "hfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "hfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "efuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "efuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x i i i"; + ; - memory "lock" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -6090,192 +6090,192 @@ part # identical to ATmega649 part - id = "m6490"; - desc = "ATMEGA6490"; - has_jtag = yes; + id = "m6490"; + desc = "ATMEGA6490"; + has_jtag = yes; # stk500_devcode = 0x85; # no STK500 support, only STK500v2 # avr910_devcode = 0x?; # try the ATmega169 one: - avr910_devcode = 0x75; - signature = 0x1e 0x96 0x04; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + avr910_devcode = 0x75; + signature = 0x1e 0x96 0x04; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; + idr = 0x31; + spmcr = 0x57; memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 8; /* for parallel programming */ - size = 2048; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; + paged = no; /* leave this "no" */ + page_size = 8; /* for parallel programming */ + size = 2048; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " x x x x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " x x x x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " x x x x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " x x x x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 a2 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x x a8", " a7 a6 a5 a4 a3 0 0 0", " x x x x x x x x"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 a2 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x a10 a9 a8", " a7 a6 a5 a4 a3 0 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 20; - blocksize = 8; - readsize = 256; - ; + mode = 0x41; + delay = 20; + blocksize = 8; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 65536; - page_size = 256; - num_pages = 256; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 65536; + page_size = 256; + num_pages = 256; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " x x x a12 a11 a10 a9 a8", - " a7 x x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " x x x a12 a11 a10 a9 a8", + " a7 x x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 256; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 256; + readsize = 256; + ; - memory "lfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "lfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "hfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "hfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "efuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "efuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x i i i"; + ; - memory "lock" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -6283,174 +6283,174 @@ part #------------------------------------------------------------ part - id = "m32"; - desc = "ATMEGA32"; - has_jtag = yes; - stk500_devcode = 0x91; - avr910_devcode = 0x72; - signature = 0x1e 0x95 0x02; - chip_erase_delay = 9000; - pagel = 0xd7; - bs2 = 0xa0; - reset = dedicated; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "m32"; + desc = "ATMEGA32"; + has_jtag = yes; + stk500_devcode = 0x91; + avr910_devcode = 0x72; + signature = 0x1e 0x95 0x02; + chip_erase_delay = 9000; + pagel = 0xd7; + bs2 = 0xa0; + reset = dedicated; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 6; - togglevtg = 0; - poweroffdelay = 0; - resetdelayms = 0; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 6; + togglevtg = 0; + poweroffdelay = 0; + resetdelayms = 0; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - allowfullpagebitstream = yes; + idr = 0x31; + spmcr = 0x57; + allowfullpagebitstream = yes; memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 4; /* for parallel programming */ - size = 1024; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; - read = " 1 0 1 0 0 0 0 0", - " 0 0 x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + paged = no; /* leave this "no" */ + page_size = 4; /* for parallel programming */ + size = 1024; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; + read = " 1 0 1 0 0 0 0 0", + " 0 0 x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0", - " 0 0 x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0", + " 0 0 x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x a9 a8", " a7 a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x04; - delay = 10; - blocksize = 64; - readsize = 256; - ; + mode = 0x04; + delay = 10; + blocksize = 64; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 32768; - page_size = 128; - num_pages = 256; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 0 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 32768; + page_size = 128; + num_pages = 256; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 0 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 0 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 0 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 0 a13 a12 a11 a10 a9 a8", - " a7 a6 x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 0 a13 a12 a11 a10 a9 a8", + " a7 a6 x x x x x x", + " x x x x x x x x"; - mode = 0x21; - delay = 6; - blocksize = 64; - readsize = 256; - ; + mode = 0x21; + delay = 6; + blocksize = 64; + readsize = 256; + ; - memory "lfuse" - size = 1; - min_write_delay = 2000; - max_write_delay = 2000; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "lfuse" + size = 1; + min_write_delay = 2000; + max_write_delay = 2000; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "hfuse" - size = 1; - min_write_delay = 2000; - max_write_delay = 2000; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "hfuse" + size = 1; + min_write_delay = 2000; + max_write_delay = 2000; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "lock" - size = 1; - min_write_delay = 2000; - max_write_delay = 2000; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + min_write_delay = 2000; + max_write_delay = 2000; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; - memory "calibration" - size = 4; - read = "0 0 1 1 1 0 0 0 0 0 x x x x x x", - "0 0 0 0 0 0 a1 a0 o o o o o o o o"; - ; + memory "calibration" + size = 4; + read = "0 0 1 1 1 0 0 0 0 0 x x x x x x", + "0 0 0 0 0 0 a1 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -6458,138 +6458,138 @@ part #------------------------------------------------------------ part - id = "m161"; - desc = "ATMEGA161"; - stk500_devcode = 0x80; - avr910_devcode = 0x60; - signature = 0x1e 0x94 0x01; - chip_erase_delay = 28000; - pagel = 0xd7; - bs2 = 0xa0; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "m161"; + desc = "ATMEGA161"; + stk500_devcode = 0x80; + avr910_devcode = 0x60; + signature = 0x1e 0x94 0x01; + chip_erase_delay = 28000; + pagel = 0xd7; + bs2 = 0xa0; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 0; - togglevtg = 0; - poweroffdelay = 0; - resetdelayms = 0; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 30; - programfusepulsewidth = 0; - programfusepolltimeout = 2; - programlockpulsewidth = 0; - programlockpolltimeout = 2; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 0; + togglevtg = 0; + poweroffdelay = 0; + resetdelayms = 0; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 30; + programfusepulsewidth = 0; + programfusepolltimeout = 2; + programlockpulsewidth = 0; + programlockpolltimeout = 2; memory "eeprom" - size = 512; - min_write_delay = 3400; - max_write_delay = 3400; - readback_p1 = 0xff; - readback_p2 = 0xff; + size = 512; + min_write_delay = 3400; + max_write_delay = 3400; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " x x x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " x x x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " x x x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " x x x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - mode = 0x04; - delay = 5; - blocksize = 128; - readsize = 256; - ; + mode = 0x04; + delay = 5; + blocksize = 128; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 16384; - page_size = 128; - num_pages = 128; - min_write_delay = 14000; - max_write_delay = 14000; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " x x x a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 16384; + page_size = 128; + num_pages = 128; + min_write_delay = 14000; + max_write_delay = 14000; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " x x x a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " x x x a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " x x x a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " x x x a12 a11 a10 a9 a8", - " a7 a6 x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " x x x a12 a11 a10 a9 a8", + " a7 a6 x x x x x x", + " x x x x x x x x"; - mode = 0x21; - delay = 16; - blocksize = 128; - readsize = 256; - ; + mode = 0x21; + delay = 16; + blocksize = 128; + readsize = 256; + ; - memory "fuse" - size = 1; - min_write_delay = 2000; - max_write_delay = 2000; - read = "0 1 0 1 0 0 0 0 x x x x x x x x", - "x x x x x x x x x o x o o o o o"; + memory "fuse" + size = 1; + min_write_delay = 2000; + max_write_delay = 2000; + read = "0 1 0 1 0 0 0 0 x x x x x x x x", + "x x x x x x x x x o x o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 x x x x x", - "x x x x x x x x 1 i 1 i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 x x x x x", + "x x x x x x x x 1 i 1 i i i i i"; + ; - memory "lock" - size = 1; - min_write_delay = 2000; - max_write_delay = 2000; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + min_write_delay = 2000; + max_write_delay = 2000; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; @@ -6598,158 +6598,158 @@ part #------------------------------------------------------------ part - id = "m8"; - desc = "ATMEGA8"; - stk500_devcode = 0x70; - avr910_devcode = 0x76; - signature = 0x1e 0x93 0x07; - pagel = 0xd7; - bs2 = 0xc2; - chip_erase_delay = 10000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "m8"; + desc = "ATMEGA8"; + stk500_devcode = 0x70; + avr910_devcode = 0x76; + signature = 0x1e 0x93 0x07; + pagel = 0xd7; + bs2 = 0xc2; + chip_erase_delay = 10000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = + pp_controlstack = 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 2; - resetdelayus = 0; - hvleavestabdelay = 15; - resetdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 2; + resetdelayus = 0; + hvleavestabdelay = 15; + resetdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - memory "eeprom" - size = 512; - page_size = 4; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; + memory "eeprom" + size = 512; + page_size = 4; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " 0 0 x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " 0 0 x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " 0 0 x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " 0 0 x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - mode = 0x04; - delay = 20; - blocksize = 128; - readsize = 256; - ; - memory "flash" - paged = yes; - size = 8192; - page_size = 64; - num_pages = 128; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0x00; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x04; + delay = 20; + blocksize = 128; + readsize = 256; + ; + memory "flash" + paged = yes; + size = 8192; + page_size = 64; + num_pages = 128; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0x00; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 0 x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 0 x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 0 x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 0 x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 x x x x x", + " x x x x x x x x"; - mode = 0x21; - delay = 10; - blocksize = 64; - readsize = 256; - ; + mode = 0x21; + delay = 10; + blocksize = 64; + readsize = 256; + ; - memory "lfuse" - size = 1; - min_write_delay = 2000; - max_write_delay = 2000; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "lfuse" + size = 1; + min_write_delay = 2000; + max_write_delay = 2000; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "hfuse" - size = 1; - min_write_delay = 2000; - max_write_delay = 2000; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "hfuse" + size = 1; + min_write_delay = 2000; + max_write_delay = 2000; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "lock" - size = 1; - min_write_delay = 2000; - max_write_delay = 2000; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + min_write_delay = 2000; + max_write_delay = 2000; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + ; - memory "calibration" - size = 4; - read = "0 0 1 1 1 0 0 0 0 0 x x x x x x", - "0 0 0 0 0 0 a1 a0 o o o o o o o o"; - ; + memory "calibration" + size = 4; + read = "0 0 1 1 1 0 0 0 0 0 x x x x x x", + "0 0 0 0 0 0 a1 a0 o o o o o o o o"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; @@ -6759,154 +6759,154 @@ part #------------------------------------------------------------ part - id = "m8515"; - desc = "ATMEGA8515"; - stk500_devcode = 0x63; - avr910_devcode = 0x3A; - signature = 0x1e 0x93 0x06; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "m8515"; + desc = "ATMEGA8515"; + stk500_devcode = 0x63; + avr910_devcode = 0x3A; + signature = 0x1e 0x93 0x06; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 6; - togglevtg = 0; - poweroffdelay = 0; - resetdelayms = 0; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 6; + togglevtg = 0; + poweroffdelay = 0; + resetdelayms = 0; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - memory "eeprom" - size = 512; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; + memory "eeprom" + size = 512; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " 0 0 x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " 0 0 x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " 0 0 x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " 0 0 x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - mode = 0x04; - delay = 10; - blocksize = 128; - readsize = 256; - ; - memory "flash" - paged = yes; - size = 8192; - page_size = 64; - num_pages = 128; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x04; + delay = 10; + blocksize = 128; + readsize = 256; + ; + memory "flash" + paged = yes; + size = 8192; + page_size = 64; + num_pages = 128; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 0 x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 0 x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 0 x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 0 x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 x x x x x", + " x x x x x x x x"; - mode = 0x21; - delay = 6; - blocksize = 64; - readsize = 256; - ; + mode = 0x21; + delay = 6; + blocksize = 64; + readsize = 256; + ; - memory "lfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "lfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "hfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "hfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "lock" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + ; - memory "calibration" - size = 4; - read = "0 0 1 1 1 0 0 0 0 0 x x x x x x", - "0 0 0 0 0 0 a1 a0 o o o o o o o o"; - ; + memory "calibration" + size = 4; + read = "0 0 1 1 1 0 0 0 0 0 x x x x x x", + "0 0 0 0 0 0 a1 a0 o o o o o o o o"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; @@ -6917,156 +6917,156 @@ part #------------------------------------------------------------ part - id = "m8535"; - desc = "ATMEGA8535"; - stk500_devcode = 0x64; - avr910_devcode = 0x69; - signature = 0x1e 0x93 0x08; - pagel = 0xd7; - bs2 = 0xa0; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "m8535"; + desc = "ATMEGA8535"; + stk500_devcode = 0x64; + avr910_devcode = 0x69; + signature = 0x1e 0x93 0x08; + pagel = 0xd7; + bs2 = 0xa0; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 6; - togglevtg = 0; - poweroffdelay = 0; - resetdelayms = 0; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 6; + togglevtg = 0; + poweroffdelay = 0; + resetdelayms = 0; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - memory "eeprom" - size = 512; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; + memory "eeprom" + size = 512; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " 0 0 x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " 0 0 x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " 0 0 x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " 0 0 x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - mode = 0x04; - delay = 10; - blocksize = 128; - readsize = 256; - ; - memory "flash" - paged = yes; - size = 8192; - page_size = 64; - num_pages = 128; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x04; + delay = 10; + blocksize = 128; + readsize = 256; + ; + memory "flash" + paged = yes; + size = 8192; + page_size = 64; + num_pages = 128; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 0 x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 0 x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 0 x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 0 x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 x x x x x", + " x x x x x x x x"; - mode = 0x21; - delay = 6; - blocksize = 64; - readsize = 256; - ; + mode = 0x21; + delay = 6; + blocksize = 64; + readsize = 256; + ; - memory "lfuse" - size = 1; - min_write_delay = 2000; - max_write_delay = 2000; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "lfuse" + size = 1; + min_write_delay = 2000; + max_write_delay = 2000; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "hfuse" - size = 1; - min_write_delay = 2000; - max_write_delay = 2000; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "hfuse" + size = 1; + min_write_delay = 2000; + max_write_delay = 2000; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "lock" - size = 1; - min_write_delay = 2000; - max_write_delay = 2000; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + min_write_delay = 2000; + max_write_delay = 2000; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + ; - memory "calibration" - size = 4; - read = "0 0 1 1 1 0 0 0 0 0 x x x x x x", - "0 0 0 0 0 0 a1 a0 o o o o o o o o"; - ; + memory "calibration" + size = 4; + read = "0 0 1 1 1 0 0 0 0 0 x x x x x x", + "0 0 0 0 0 0 a1 a0 o o o o o o o o"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; @@ -7075,153 +7075,153 @@ part #------------------------------------------------------------ part - id = "t26"; - desc = "ATTINY26"; - stk500_devcode = 0x21; - avr910_devcode = 0x5e; - signature = 0x1e 0x91 0x09; - pagel = 0xb3; - bs2 = 0xb2; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "t26"; + desc = "ATTINY26"; + stk500_devcode = 0x21; + avr910_devcode = 0x5e; + signature = 0x1e 0x91 0x09; + pagel = 0xb3; + bs2 = 0xb2; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = - 0xC4, 0xE4, 0xC4, 0xE4, 0xCC, 0xEC, 0xCC, 0xEC, - 0xD4, 0xF4, 0xD4, 0xF4, 0xDC, 0xFC, 0xDC, 0xFC, - 0xC8, 0xE8, 0xD8, 0xF8, 0x4C, 0x6C, 0x5C, 0x7C, - 0xEC, 0xBC, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 2; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0xC4, 0xE4, 0xC4, 0xE4, 0xCC, 0xEC, 0xCC, 0xEC, + 0xD4, 0xF4, 0xD4, 0xF4, 0xDC, 0xFC, 0xDC, 0xFC, + 0xC8, 0xE8, 0xD8, 0xF8, 0x4C, 0x6C, 0x5C, 0x7C, + 0xEC, 0xBC, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 2; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - memory "eeprom" - size = 128; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; - read = "1 0 1 0 0 0 0 0 x x x x x x x x", - "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 128; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; + read = "1 0 1 0 0 0 0 0 x x x x x x x x", + "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = "1 1 0 0 0 0 0 0 x x x x x x x x", - "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = "1 1 0 0 0 0 0 0 x x x x x x x x", + "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; - mode = 0x04; - delay = 10; - blocksize = 64; - readsize = 256; - ; + mode = 0x04; + delay = 10; + blocksize = 64; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 2048; - page_size = 32; - num_pages = 64; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 2048; + page_size = 32; + num_pages = 64; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x x x x a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x x x x a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x x x x a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x x x x a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " x x x x x x a9 a8", + " a7 a6 a5 a4 x x x x", + " x x x x x x x x"; - mode = 0x21; - delay = 6; - blocksize = 16; - readsize = 256; - ; + mode = 0x21; + delay = 6; + blocksize = 16; + readsize = 256; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 a1 a0 o o o o o o o o"; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 x x x x x x x x", - "x x x x x x x x x x x x x x o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 x x x x x x x x", + "x x x x x x x x x x x x x x o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 1 1 1 i i", - "x x x x x x x x x x x x x x x x"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 1 1 1 i i", + "x x x x x x x x x x x x x x x x"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x x x x i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x x x x i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x x x x o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x x x x o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 4; - read = "0 0 1 1 1 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 a1 a0 o o o o o o o o"; - ; + memory "calibration" + size = 4; + read = "0 0 1 1 1 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 a1 a0 o o o o o o o o"; + ; ; @@ -7232,185 +7232,185 @@ part # Close to ATtiny26 part - id = "t261"; - desc = "ATTINY261"; - has_debugwire = yes; - flash_instr = 0xB4, 0x00, 0x10; - eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, - 0xBC, 0x00, 0xB4, 0x00, 0xBA, 0x0D, 0xBB, 0xBC, - 0x99, 0xE1, 0xBB, 0xAC; + id = "t261"; + desc = "ATTINY261"; + has_debugwire = yes; + flash_instr = 0xB4, 0x00, 0x10; + eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, + 0xBC, 0x00, 0xB4, 0x00, 0xBA, 0x0D, 0xBB, 0xBC, + 0x99, 0xE1, 0xBB, 0xAC; # stk500_devcode = 0x21; # avr910_devcode = 0x5e; - signature = 0x1e 0x91 0x0c; - pagel = 0xb3; - bs2 = 0xb2; - chip_erase_delay = 4000; + signature = 0x1e 0x91 0x0c; + pagel = 0xb3; + bs2 = 0xb2; + chip_erase_delay = 4000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = - 0xC4, 0xE4, 0xC4, 0xE4, 0xCC, 0xEC, 0xCC, 0xEC, - 0xD4, 0xF4, 0xD4, 0xF4, 0xDC, 0xFC, 0xDC, 0xFC, - 0xC8, 0xE8, 0xD8, 0xF8, 0x4C, 0x6C, 0x5C, 0x7C, - 0xEC, 0xBC, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 2; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0xC4, 0xE4, 0xC4, 0xE4, 0xCC, 0xEC, 0xCC, 0xEC, + 0xD4, 0xF4, 0xD4, 0xF4, 0xDC, 0xFC, 0xDC, 0xFC, + 0xC8, 0xE8, 0xD8, 0xF8, 0x4C, 0x6C, 0x5C, 0x7C, + 0xEC, 0xBC, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 2; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - memory "eeprom" - paged = no; - size = 128; - page_size = 4; - num_pages = 32; - min_write_delay = 4000; - max_write_delay = 4000; - readback_p1 = 0xff; - readback_p2 = 0xff; + memory "eeprom" + paged = no; + size = 128; + page_size = 4; + num_pages = 32; + min_write_delay = 4000; + max_write_delay = 4000; + readback_p1 = 0xff; + readback_p2 = 0xff; - read = "1 0 1 0 0 0 0 0 x x x x x x x x", - "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; + read = "1 0 1 0 0 0 0 0 x x x x x x x x", + "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = "1 1 0 0 0 0 0 0 x x x x x x x x", - "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = "1 1 0 0 0 0 0 0 x x x x x x x x", + "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x x x", " x a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 4; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 4; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 2048; - page_size = 32; - num_pages = 64; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; + memory "flash" + paged = yes; + size = 2048; + page_size = 32; + num_pages = 64; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_lo = " 0 0 1 0 0 0 0 0", + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x x x x a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x x x x a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x x x x a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x x x x a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " x x x x x x a9 a8", + " a7 a6 a5 a4 x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 32; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 32; + readsize = 256; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 a1 a0 o o o o o o o o"; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 x x x x x x x x", - "x x x x x x x x x x x x x x o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 x x x x x x x x", + "x x x x x x x x x x x x x x o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 1 1 1 i i", - "x x x x x x x x x x x x x x x x"; - min_write_delay = 4500; - max_write_delay = 4500; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 1 1 1 i i", + "x x x x x x x x x x x x x x x x"; + min_write_delay = 4500; + max_write_delay = 4500; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 4500; - max_write_delay = 4500; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 4500; + max_write_delay = 4500; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 4500; - max_write_delay = 4500; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 4500; + max_write_delay = 4500; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x x x i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x x x i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x x x x x x x x o"; - min_write_delay = 4500; - max_write_delay = 4500; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x x x x x x x x o"; + min_write_delay = 4500; + max_write_delay = 4500; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; @@ -7421,185 +7421,185 @@ part # Close to ATtiny261 part - id = "t461"; - desc = "ATTINY461"; - has_debugwire = yes; - flash_instr = 0xB4, 0x00, 0x10; - eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, - 0xBC, 0x00, 0xB4, 0x00, 0xBA, 0x0D, 0xBB, 0xBC, - 0x99, 0xE1, 0xBB, 0xAC; + id = "t461"; + desc = "ATTINY461"; + has_debugwire = yes; + flash_instr = 0xB4, 0x00, 0x10; + eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, + 0xBC, 0x00, 0xB4, 0x00, 0xBA, 0x0D, 0xBB, 0xBC, + 0x99, 0xE1, 0xBB, 0xAC; # stk500_devcode = 0x21; # avr910_devcode = 0x5e; - signature = 0x1e 0x92 0x08; - pagel = 0xb3; - bs2 = 0xb2; - chip_erase_delay = 4000; + signature = 0x1e 0x92 0x08; + pagel = 0xb3; + bs2 = 0xb2; + chip_erase_delay = 4000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = - 0xC4, 0xE4, 0xC4, 0xE4, 0xCC, 0xEC, 0xCC, 0xEC, - 0xD4, 0xF4, 0xD4, 0xF4, 0xDC, 0xFC, 0xDC, 0xFC, - 0xC8, 0xE8, 0xD8, 0xF8, 0x4C, 0x6C, 0x5C, 0x7C, - 0xEC, 0xBC, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 2; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0xC4, 0xE4, 0xC4, 0xE4, 0xCC, 0xEC, 0xCC, 0xEC, + 0xD4, 0xF4, 0xD4, 0xF4, 0xDC, 0xFC, 0xDC, 0xFC, + 0xC8, 0xE8, 0xD8, 0xF8, 0x4C, 0x6C, 0x5C, 0x7C, + 0xEC, 0xBC, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 2; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - memory "eeprom" - paged = no; - size = 256; - page_size = 4; - num_pages = 64; - min_write_delay = 4000; - max_write_delay = 4000; - readback_p1 = 0xff; - readback_p2 = 0xff; + memory "eeprom" + paged = no; + size = 256; + page_size = 4; + num_pages = 64; + min_write_delay = 4000; + max_write_delay = 4000; + readback_p1 = 0xff; + readback_p2 = 0xff; - read = " 1 0 1 0 0 0 0 0 x x x x x x x x", - "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; + read = " 1 0 1 0 0 0 0 0 x x x x x x x x", + "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0 x x x x x x x x", - "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0 x x x x x x x x", + "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x x x", " a7 a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 4; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 4; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 4096; - page_size = 64; - num_pages = 64; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; + memory "flash" + paged = yes; + size = 4096; + page_size = 64; + num_pages = 64; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " x x x x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_lo = " 0 0 1 0 0 0 0 0", + " x x x x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " x x x x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " x x x x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " x x x x x a10 a9 a8", - " a7 a6 a5 x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " x x x x x a10 a9 a8", + " a7 a6 a5 x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 64; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 64; + readsize = 256; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 a1 a0 o o o o o o o o"; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 x x x x x x x x", - "x x x x x x x x x x x x x x o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 x x x x x x x x", + "x x x x x x x x x x x x x x o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 1 1 1 i i", - "x x x x x x x x x x x x x x x x"; - min_write_delay = 4500; - max_write_delay = 4500; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 1 1 1 i i", + "x x x x x x x x x x x x x x x x"; + min_write_delay = 4500; + max_write_delay = 4500; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 4500; - max_write_delay = 4500; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 4500; + max_write_delay = 4500; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 4500; - max_write_delay = 4500; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 4500; + max_write_delay = 4500; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x x x i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x x x i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x x x x x x x x o"; - min_write_delay = 4500; - max_write_delay = 4500; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x x x x x x x x o"; + min_write_delay = 4500; + max_write_delay = 4500; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; @@ -7610,185 +7610,185 @@ part # Close to ATtiny461 part - id = "t861"; - desc = "ATTINY861"; - has_debugwire = yes; - flash_instr = 0xB4, 0x00, 0x10; - eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, - 0xBC, 0x00, 0xB4, 0x00, 0xBA, 0x0D, 0xBB, 0xBC, - 0x99, 0xE1, 0xBB, 0xAC; + id = "t861"; + desc = "ATTINY861"; + has_debugwire = yes; + flash_instr = 0xB4, 0x00, 0x10; + eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, + 0xBC, 0x00, 0xB4, 0x00, 0xBA, 0x0D, 0xBB, 0xBC, + 0x99, 0xE1, 0xBB, 0xAC; # stk500_devcode = 0x21; # avr910_devcode = 0x5e; - signature = 0x1e 0x93 0x0d; - pagel = 0xb3; - bs2 = 0xb2; - chip_erase_delay = 4000; + signature = 0x1e 0x93 0x0d; + pagel = 0xb3; + bs2 = 0xb2; + chip_erase_delay = 4000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = - 0xC4, 0xE4, 0xC4, 0xE4, 0xCC, 0xEC, 0xCC, 0xEC, - 0xD4, 0xF4, 0xD4, 0xF4, 0xDC, 0xFC, 0xDC, 0xFC, - 0xC8, 0xE8, 0xD8, 0xF8, 0x4C, 0x6C, 0x5C, 0x7C, - 0xEC, 0xBC, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 2; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0xC4, 0xE4, 0xC4, 0xE4, 0xCC, 0xEC, 0xCC, 0xEC, + 0xD4, 0xF4, 0xD4, 0xF4, 0xDC, 0xFC, 0xDC, 0xFC, + 0xC8, 0xE8, 0xD8, 0xF8, 0x4C, 0x6C, 0x5C, 0x7C, + 0xEC, 0xBC, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 2; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - memory "eeprom" - paged = no; - size = 512; - num_pages = 128; - page_size = 4; - min_write_delay = 4000; - max_write_delay = 4000; - readback_p1 = 0xff; - readback_p2 = 0xff; + memory "eeprom" + paged = no; + size = 512; + num_pages = 128; + page_size = 4; + min_write_delay = 4000; + max_write_delay = 4000; + readback_p1 = 0xff; + readback_p2 = 0xff; - read = " 1 0 1 0 0 0 0 0 x x x x x x x a8", - "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; + read = " 1 0 1 0 0 0 0 0 x x x x x x x a8", + "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0 x x x x x x x a8", - "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0 x x x x x x x a8", + "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x x a8", " a7 a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 4; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 4; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 8192; - page_size = 64; - num_pages = 128; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; + memory "flash" + paged = yes; + size = 8192; + page_size = 64; + num_pages = 128; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_lo = " 0 0 1 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 64; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 64; + readsize = 256; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 a1 a0 o o o o o o o o"; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 x x x x x x x x", - "x x x x x x x x x x x x x x o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 x x x x x x x x", + "x x x x x x x x x x x x x x o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 1 1 1 i i", - "x x x x x x x x x x x x x x x x"; - min_write_delay = 4500; - max_write_delay = 4500; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 1 1 1 i i", + "x x x x x x x x x x x x x x x x"; + min_write_delay = 4500; + max_write_delay = 4500; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 4500; - max_write_delay = 4500; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 4500; + max_write_delay = 4500; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 4500; - max_write_delay = 4500; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 4500; + max_write_delay = 4500; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x x x i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x x x i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x x x x x x x x o"; - min_write_delay = 4500; - max_write_delay = 4500; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x x x x x x x x o"; + min_write_delay = 4500; + max_write_delay = 4500; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; @@ -7798,185 +7798,185 @@ part #------------------------------------------------------------ part - id = "m48"; - desc = "ATMEGA48"; - has_debugwire = yes; - flash_instr = 0xB6, 0x01, 0x11; - eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00, - 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF, - 0x99, 0xF9, 0xBB, 0xAF; - stk500_devcode = 0x59; + id = "m48"; + desc = "ATMEGA48"; + has_debugwire = yes; + flash_instr = 0xB6, 0x01, 0x11; + eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00, + 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF, + 0x99, 0xF9, 0xBB, 0xAF; + stk500_devcode = 0x59; # avr910_devcode = 0x; - signature = 0x1e 0x92 0x05; - pagel = 0xd7; - bs2 = 0xc2; - chip_erase_delay = 45000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + signature = 0x1e 0x92 0x05; + pagel = 0xd7; + bs2 = 0xc2; + chip_erase_delay = 45000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = + pp_controlstack = 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - resetdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + resetdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - memory "eeprom" - paged = no; - page_size = 4; - size = 256; - min_write_delay = 3600; - max_write_delay = 3600; - readback_p1 = 0xff; - readback_p2 = 0xff; + memory "eeprom" + paged = no; + page_size = 4; + size = 256; + min_write_delay = 3600; + max_write_delay = 3600; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " 0 0 0 x x x x x", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " 0 0 0 x x x x x", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " 0 0 0 x x x x x", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " 0 0 0 x x x x x", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x x x", " a7 a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 5; - blocksize = 4; - readsize = 256; - ; - memory "flash" - paged = yes; - size = 4096; - page_size = 64; - num_pages = 64; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0x00; - readback_p2 = 0x00; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 0 0 0 0 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x41; + delay = 5; + blocksize = 4; + readsize = 256; + ; + memory "flash" + paged = yes; + size = 4096; + page_size = 64; + num_pages = 64; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0x00; + readback_p2 = 0x00; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 0 0 0 0 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 0 0 0 0 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 0 0 0 0 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 0 0 0 0 a10 a9 a8", - " a7 a6 a5 x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 0 0 0 0 a10 a9 a8", + " a7 a6 a5 x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 64; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 64; + readsize = 256; + ; - memory "lfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "lfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "hfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "hfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "efuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x x x x x x x x o"; + memory "efuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x x x x x x x x o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x x x i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x x x i"; + ; - memory "lock" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; @@ -7985,185 +7985,185 @@ part #------------------------------------------------------------ part - id = "m88"; - desc = "ATMEGA88"; - has_debugwire = yes; - flash_instr = 0xB6, 0x01, 0x11; - eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00, - 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF, - 0x99, 0xF9, 0xBB, 0xAF; - stk500_devcode = 0x73; + id = "m88"; + desc = "ATMEGA88"; + has_debugwire = yes; + flash_instr = 0xB6, 0x01, 0x11; + eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00, + 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF, + 0x99, 0xF9, 0xBB, 0xAF; + stk500_devcode = 0x73; # avr910_devcode = 0x; - signature = 0x1e 0x93 0x0a; - pagel = 0xd7; - bs2 = 0xc2; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + signature = 0x1e 0x93 0x0a; + pagel = 0xd7; + bs2 = 0xc2; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = + pp_controlstack = 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - resetdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + resetdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - memory "eeprom" - paged = no; - page_size = 4; - size = 512; - min_write_delay = 3600; - max_write_delay = 3600; - readback_p1 = 0xff; - readback_p2 = 0xff; + memory "eeprom" + paged = no; + page_size = 4; + size = 512; + min_write_delay = 3600; + max_write_delay = 3600; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " 0 0 0 x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " 0 0 0 x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " 0 0 0 x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " 0 0 0 x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x x a8", " a7 a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 5; - blocksize = 4; - readsize = 256; - ; - memory "flash" - paged = yes; - size = 8192; - page_size = 64; - num_pages = 128; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x41; + delay = 5; + blocksize = 4; + readsize = 256; + ; + memory "flash" + paged = yes; + size = 8192; + page_size = 64; + num_pages = 128; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 64; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 64; + readsize = 256; + ; - memory "lfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "lfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "hfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "hfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "efuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x x x x x x o o o"; + memory "efuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x x x x x x o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x i i i"; + ; - memory "lock" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -8171,187 +8171,187 @@ part #------------------------------------------------------------ part - id = "m168"; - desc = "ATMEGA168"; - has_debugwire = yes; - flash_instr = 0xB6, 0x01, 0x11; - eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00, - 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF, - 0x99, 0xF9, 0xBB, 0xAF; - stk500_devcode = 0x86; - # avr910_devcode = 0x; - signature = 0x1e 0x94 0x06; - pagel = 0xd7; - bs2 = 0xc2; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "m168"; + desc = "ATMEGA168"; + has_debugwire = yes; + flash_instr = 0xB6, 0x01, 0x11; + eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00, + 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF, + 0x99, 0xF9, 0xBB, 0xAF; + stk500_devcode = 0x86; + # avr910_devcode = 0x; + signature = 0x1e 0x94 0x06; + pagel = 0xd7; + bs2 = 0xc2; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = + pp_controlstack = 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - resetdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + resetdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - memory "eeprom" - paged = no; - page_size = 4; - size = 512; - min_write_delay = 3600; - max_write_delay = 3600; - readback_p1 = 0xff; - readback_p2 = 0xff; - read = " 1 0 1 0 0 0 0 0", - " 0 0 0 x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "eeprom" + paged = no; + page_size = 4; + size = 512; + min_write_delay = 3600; + max_write_delay = 3600; + readback_p1 = 0xff; + readback_p2 = 0xff; + read = " 1 0 1 0 0 0 0 0", + " 0 0 0 x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0", - " 0 0 0 x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0", + " 0 0 0 x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x x a8", " a7 a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 5; - blocksize = 4; - readsize = 256; - ; + mode = 0x41; + delay = 5; + blocksize = 4; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 16384; - page_size = 128; - num_pages = 128; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 0 0 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 16384; + page_size = 128; + num_pages = 128; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 0 0 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 0 0 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 0 0 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 0 0 a12 a11 a10 a9 a8", - " a7 a6 x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 0 0 a12 a11 a10 a9 a8", + " a7 a6 x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 128; - readsize = 256; + mode = 0x41; + delay = 6; + blocksize = 128; + readsize = 256; - ; + ; - memory "lfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "lfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "hfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "hfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "efuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x x x x x x o o o"; + memory "efuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x x x x x x o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x i i i"; + ; - memory "lock" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -8359,185 +8359,185 @@ part #------------------------------------------------------------ part - id = "t88"; - desc = "attiny88"; - has_debugwire = yes; - flash_instr = 0xB6, 0x01, 0x11; - eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00, - 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF, - 0x99, 0xF9, 0xBB, 0xAF; - stk500_devcode = 0x73; + id = "t88"; + desc = "attiny88"; + has_debugwire = yes; + flash_instr = 0xB6, 0x01, 0x11; + eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00, + 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF, + 0x99, 0xF9, 0xBB, 0xAF; + stk500_devcode = 0x73; # avr910_devcode = 0x; - signature = 0x1e 0x93 0x11; - pagel = 0xd7; - bs2 = 0xc2; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + signature = 0x1e 0x93 0x11; + pagel = 0xd7; + bs2 = 0xc2; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = + pp_controlstack = 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - resetdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + resetdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - memory "eeprom" - paged = no; - page_size = 4; - size = 64; - min_write_delay = 3600; - max_write_delay = 3600; - readback_p1 = 0xff; - readback_p2 = 0xff; + memory "eeprom" + paged = no; + page_size = 4; + size = 64; + min_write_delay = 3600; + max_write_delay = 3600; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " 0 0 0 x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " 0 0 0 x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " 0 0 0 x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " 0 0 0 x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x x x", " x a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 5; - blocksize = 4; - readsize = 64; - ; - memory "flash" - paged = yes; - size = 8192; - page_size = 64; - num_pages = 128; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x41; + delay = 5; + blocksize = 4; + readsize = 64; + ; + memory "flash" + paged = yes; + size = 8192; + page_size = 64; + num_pages = 128; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 64; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 64; + readsize = 256; + ; - memory "lfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "lfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "hfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "hfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "efuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x x x x x x o o o"; + memory "efuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x x x x x x o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x x x i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x x x i"; + ; - memory "lock" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -8545,100 +8545,100 @@ part #------------------------------------------------------------ part - id = "m328p"; - desc = "ATMEGA328P"; - has_debugwire = yes; - flash_instr = 0xB6, 0x01, 0x11; - eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00, + id = "m328p"; + desc = "ATMEGA328P"; + has_debugwire = yes; + flash_instr = 0xB6, 0x01, 0x11; + eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00, 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF, 0x99, 0xF9, 0xBB, 0xAF; - stk500_devcode = 0x86; - # avr910_devcode = 0x; - signature = 0x1e 0x95 0x0F; - pagel = 0xd7; - bs2 = 0xc2; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + stk500_devcode = 0x86; + # avr910_devcode = 0x; + signature = 0x1e 0x95 0x0F; + pagel = 0xd7; + bs2 = 0xc2; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = + pp_controlstack = 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - resetdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + resetdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - memory "eeprom" - paged = no; - page_size = 4; - size = 1024; + memory "eeprom" + paged = no; + page_size = 4; + size = 1024; min_write_delay = 3600; max_write_delay = 3600; - readback_p1 = 0xff; - readback_p2 = 0xff; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " 0 0 0 x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " 0 0 0 x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " 0 0 0 x x x a9 a8", + " 0 0 0 x x x a9 a8", " a7 a6 a5 a4 a3 a2 a1 a0", " i i i i i i i i"; loadpage_lo = " 1 1 0 0 0 0 0 1", - " 0 0 0 0 0 0 0 0", - " 0 0 0 0 0 0 a1 a0", - " i i i i i i i i"; + " 0 0 0 0 0 0 0 0", + " 0 0 0 0 0 0 a1 a0", + " i i i i i i i i"; writepage = " 1 1 0 0 0 0 1 0", - " 0 0 x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 0 0", - " x x x x x x x x"; + " 0 0 x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 0 0", + " x x x x x x x x"; - mode = 0x41; - delay = 5; - blocksize = 4; - readsize = 256; - ; + mode = 0x41; + delay = 5; + blocksize = 4; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 32768; - page_size = 128; - num_pages = 256; + memory "flash" + paged = yes; + size = 32768; + page_size = 128; + num_pages = 256; min_write_delay = 4500; max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; + readback_p1 = 0xff; + readback_p2 = 0xff; read_lo = " 0 0 1 0 0 0 0 0", " 0 0 a13 a12 a11 a10 a9 a8", " a7 a6 a5 a4 a3 a2 a1 a0", @@ -8650,82 +8650,82 @@ part " o o o o o o o o"; loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " 0 0 0 x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " 0 0 0 x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; writepage = " 0 1 0 0 1 1 0 0", - " 0 0 a13 a12 a11 a10 a9 a8", - " a7 a6 x x x x x x", - " x x x x x x x x"; + " 0 0 a13 a12 a11 a10 a9 a8", + " a7 a6 x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 128; - readsize = 256; + mode = 0x41; + delay = 6; + blocksize = 128; + readsize = 256; - ; + ; - memory "lfuse" + memory "lfuse" size = 1; min_write_delay = 4500; max_write_delay = 4500; read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; + "x x x x x x x x o o o o o o o o"; write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + "x x x x x x x x i i i i i i i i"; + ; - memory "hfuse" + memory "hfuse" size = 1; min_write_delay = 4500; max_write_delay = 4500; read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + "x x x x x x x x o o o o o o o o"; write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + "x x x x x x x x i i i i i i i i"; + ; - memory "efuse" + memory "efuse" size = 1; min_write_delay = 4500; max_write_delay = 4500; read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x x x x x x o o o"; + "x x x x x x x x x x x x x o o o"; write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x i i i"; - ; + "x x x x x x x x x x x x x i i i"; + ; - memory "lock" + memory "lock" size = 1; min_write_delay = 4500; max_write_delay = 4500; read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + "x x x x x x x x x x o o o o o o"; write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - ; + "x x x x x x x x 1 1 i i i i i i"; + ; - memory "calibration" + memory "calibration" size = 1; read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; - memory "signature" + memory "signature" size = 3; read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + "x x x x x x a1 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -8733,186 +8733,186 @@ part #------------------------------------------------------------ part - id = "t2313"; - desc = "ATtiny2313"; - has_debugwire = yes; - flash_instr = 0xB2, 0x0F, 0x1F; - eeprom_instr = 0xBB, 0xFE, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, - 0xBA, 0x0F, 0xB2, 0x0F, 0xBA, 0x0D, 0xBB, 0xBC, - 0x99, 0xE1, 0xBB, 0xAC; - stk500_devcode = 0x23; + id = "t2313"; + desc = "ATtiny2313"; + has_debugwire = yes; + flash_instr = 0xB2, 0x0F, 0x1F; + eeprom_instr = 0xBB, 0xFE, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, + 0xBA, 0x0F, 0xB2, 0x0F, 0xBA, 0x0D, 0xBB, 0xBC, + 0x99, 0xE1, 0xBB, 0xAC; + stk500_devcode = 0x23; ## Use the ATtiny26 devcode: - avr910_devcode = 0x5e; - signature = 0x1e 0x91 0x0a; - pagel = 0xD4; - bs2 = 0xD6; - reset = io; - chip_erase_delay = 9000; + avr910_devcode = 0x5e; + signature = 0x1e 0x91 0x0a; + pagel = 0xD4; + bs2 = 0xD6; + reset = io; + chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0E, 0x1E, 0x2E, 0x3E, 0x2E, 0x3E, - 0x4E, 0x5E, 0x4E, 0x5E, 0x6E, 0x7E, 0x6E, 0x7E, - 0x26, 0x36, 0x66, 0x76, 0x2A, 0x3A, 0x6A, 0x7A, - 0x2E, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0E, 0x1E, 0x2E, 0x3E, 0x2E, 0x3E, + 0x4E, 0x5E, 0x4E, 0x5E, 0x6E, 0x7E, 0x6E, 0x7E, + 0x26, 0x36, 0x66, 0x76, 0x2A, 0x3A, 0x6A, 0x7A, + 0x2E, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - memory "eeprom" - size = 128; - paged = no; - page_size = 4; - min_write_delay = 4000; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read = "1 0 1 0 0 0 0 0 0 0 0 x x x x x", - "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 128; + paged = no; + page_size = 4; + min_write_delay = 4000; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read = "1 0 1 0 0 0 0 0 0 0 0 x x x x x", + "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = "1 1 0 0 0 0 0 0 0 0 0 x x x x x", - "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = "1 1 0 0 0 0 0 0 0 0 0 x x x x x", + "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x x x", " x a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 4; - readsize = 256; - ; - memory "flash" - paged = yes; - size = 2048; - page_size = 32; - num_pages = 64; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 0 0 0 0 0 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x41; + delay = 6; + blocksize = 4; + readsize = 256; + ; + memory "flash" + paged = yes; + size = 2048; + page_size = 32; + num_pages = 64; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 0 0 0 0 0 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 0 0 0 0 0 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 0 0 0 0 0 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; # The information in the data sheet of April/2004 is wrong, this works: - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 x x x x x", - " x x x x a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 x x x x x", + " x x x x a3 a2 a1 a0", + " i i i i i i i i"; # The information in the data sheet of April/2004 is wrong, this works: - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 x x x x x", - " x x x x a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 x x x x x", + " x x x x a3 a2 a1 a0", + " i i i i i i i i"; # The information in the data sheet of April/2004 is wrong, this works: - writepage = " 0 1 0 0 1 1 0 0", - " 0 0 0 0 0 0 a9 a8", - " a7 a6 a5 a4 x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 0 0 0 0 0 a9 a8", + " a7 a6 a5 a4 x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 32; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 32; + readsize = 256; + ; # ATtiny2313 has Signature Bytes: 0x1E 0x91 0x0A. - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; - memory "lock" - size = 1; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; + memory "lock" + size = 1; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x x x i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x x x i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; # The Tiny2313 has calibration data for both 4 MHz and 8 MHz. # The information in the data sheet of April/2004 is wrong, this works: - memory "calibration" - size = 2; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 a0 o o o o o o o o"; - ; + memory "calibration" + size = 2; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -8920,181 +8920,181 @@ part #------------------------------------------------------------ part - id = "pwm2"; - desc = "AT90PWM2"; - has_debugwire = yes; - flash_instr = 0xB6, 0x01, 0x11; - eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00, - 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF, - 0x99, 0xF9, 0xBB, 0xAF; - stk500_devcode = 0x65; + id = "pwm2"; + desc = "AT90PWM2"; + has_debugwire = yes; + flash_instr = 0xB6, 0x01, 0x11; + eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00, + 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF, + 0x99, 0xF9, 0xBB, 0xAF; + stk500_devcode = 0x65; ## avr910_devcode = ?; - signature = 0x1e 0x93 0x81; - pagel = 0xD8; - bs2 = 0xE2; - reset = io; - chip_erase_delay = 9000; + signature = 0x1e 0x93 0x81; + pagel = 0xD8; + bs2 = 0xE2; + reset = io; + chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - memory "eeprom" - size = 512; - paged = no; - page_size = 4; - min_write_delay = 4000; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read = "1 0 1 0 0 0 0 0 0 0 0 x x x x a8", - "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 512; + paged = no; + page_size = 4; + min_write_delay = 4000; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read = "1 0 1 0 0 0 0 0 0 0 0 x x x x a8", + "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = "1 1 0 0 0 0 0 0 0 0 0 x x x x a8", - "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = "1 1 0 0 0 0 0 0 0 0 0 x x x x a8", + "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x x x", " a7 a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 4; - readsize = 256; - ; - memory "flash" - paged = yes; - size = 8192; - page_size = 64; - num_pages = 128; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x41; + delay = 6; + blocksize = 4; + readsize = 256; + ; + memory "flash" + paged = yes; + size = 8192; + page_size = 64; + num_pages = 128; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 64; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 64; + readsize = 256; + ; # AT90PWM2 has Signature Bytes: 0x1E 0x93 0x81. - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; - memory "lock" - size = 1; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; + memory "lock" + size = 1; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x x x i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x x x i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -9104,181 +9104,181 @@ part # Completely identical to AT90PWM2 (including the signature!) part - id = "pwm3"; - desc = "AT90PWM3"; - has_debugwire = yes; - flash_instr = 0xB6, 0x01, 0x11; - eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00, - 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF, - 0x99, 0xF9, 0xBB, 0xAF; - stk500_devcode = 0x65; + id = "pwm3"; + desc = "AT90PWM3"; + has_debugwire = yes; + flash_instr = 0xB6, 0x01, 0x11; + eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00, + 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF, + 0x99, 0xF9, 0xBB, 0xAF; + stk500_devcode = 0x65; ## avr910_devcode = ?; - signature = 0x1e 0x93 0x81; - pagel = 0xD8; - bs2 = 0xE2; - reset = io; - chip_erase_delay = 9000; + signature = 0x1e 0x93 0x81; + pagel = 0xD8; + bs2 = 0xE2; + reset = io; + chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - memory "eeprom" - size = 512; - paged = no; - page_size = 4; - min_write_delay = 4000; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read = "1 0 1 0 0 0 0 0 0 0 0 x x x x a8", - "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 512; + paged = no; + page_size = 4; + min_write_delay = 4000; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read = "1 0 1 0 0 0 0 0 0 0 0 x x x x a8", + "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = "1 1 0 0 0 0 0 0 0 0 0 x x x x a8", - "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = "1 1 0 0 0 0 0 0 0 0 0 x x x x a8", + "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x x x", " a7 a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 4; - readsize = 256; - ; - memory "flash" - paged = yes; - size = 8192; - page_size = 64; - num_pages = 128; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x41; + delay = 6; + blocksize = 4; + readsize = 256; + ; + memory "flash" + paged = yes; + size = 8192; + page_size = 64; + num_pages = 128; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 64; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 64; + readsize = 256; + ; # AT90PWM2 has Signature Bytes: 0x1E 0x93 0x81. - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; - memory "lock" - size = 1; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; + memory "lock" + size = 1; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x x x i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x x x i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -9287,180 +9287,180 @@ part # Same as AT90PWM2 but different signature. part - id = "pwm2b"; - desc = "AT90PWM2B"; - has_debugwire = yes; - flash_instr = 0xB6, 0x01, 0x11; - eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00, - 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF, - 0x99, 0xF9, 0xBB, 0xAF; - stk500_devcode = 0x65; + id = "pwm2b"; + desc = "AT90PWM2B"; + has_debugwire = yes; + flash_instr = 0xB6, 0x01, 0x11; + eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00, + 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF, + 0x99, 0xF9, 0xBB, 0xAF; + stk500_devcode = 0x65; ## avr910_devcode = ?; - signature = 0x1e 0x93 0x83; - pagel = 0xD8; - bs2 = 0xE2; - reset = io; - chip_erase_delay = 9000; + signature = 0x1e 0x93 0x83; + pagel = 0xD8; + bs2 = 0xE2; + reset = io; + chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - memory "eeprom" - size = 512; - paged = no; - page_size = 4; - min_write_delay = 4000; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read = "1 0 1 0 0 0 0 0 0 0 0 x x x x a8", - "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 512; + paged = no; + page_size = 4; + min_write_delay = 4000; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read = "1 0 1 0 0 0 0 0 0 0 0 x x x x a8", + "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = "1 1 0 0 0 0 0 0 0 0 0 x x x x a8", - "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = "1 1 0 0 0 0 0 0 0 0 0 x x x x a8", + "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x x x", " a7 a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 4; - readsize = 256; - ; - memory "flash" - paged = yes; - size = 8192; - page_size = 64; - num_pages = 128; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x41; + delay = 6; + blocksize = 4; + readsize = 256; + ; + memory "flash" + paged = yes; + size = 8192; + page_size = 64; + num_pages = 128; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 64; - readsize = 256; - ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; - memory "lock" - size = 1; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; + mode = 0x41; + delay = 6; + blocksize = 64; + readsize = 256; + ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; + memory "lock" + size = 1; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x x x i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x x x i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -9470,180 +9470,180 @@ part # Completely identical to AT90PWM2B (including the signature!) part - id = "pwm3b"; - desc = "AT90PWM3B"; - has_debugwire = yes; - flash_instr = 0xB6, 0x01, 0x11; - eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00, - 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF, - 0x99, 0xF9, 0xBB, 0xAF; - stk500_devcode = 0x65; + id = "pwm3b"; + desc = "AT90PWM3B"; + has_debugwire = yes; + flash_instr = 0xB6, 0x01, 0x11; + eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00, + 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF, + 0x99, 0xF9, 0xBB, 0xAF; + stk500_devcode = 0x65; ## avr910_devcode = ?; - signature = 0x1e 0x93 0x83; - pagel = 0xD8; - bs2 = 0xE2; - reset = io; - chip_erase_delay = 9000; + signature = 0x1e 0x93 0x83; + pagel = 0xD8; + bs2 = 0xE2; + reset = io; + chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - memory "eeprom" - size = 512; - paged = no; - page_size = 4; - min_write_delay = 4000; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read = "1 0 1 0 0 0 0 0 0 0 0 x x x x a8", - "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 512; + paged = no; + page_size = 4; + min_write_delay = 4000; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read = "1 0 1 0 0 0 0 0 0 0 0 x x x x a8", + "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = "1 1 0 0 0 0 0 0 0 0 0 x x x x a8", - "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = "1 1 0 0 0 0 0 0 0 0 0 x x x x a8", + "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x x x", " a7 a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 4; - readsize = 256; - ; - memory "flash" - paged = yes; - size = 8192; - page_size = 64; - num_pages = 128; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x41; + delay = 6; + blocksize = 4; + readsize = 256; + ; + memory "flash" + paged = yes; + size = 8192; + page_size = 64; + num_pages = 128; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 64; - readsize = 256; - ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; - memory "lock" - size = 1; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; + mode = 0x41; + delay = 6; + blocksize = 64; + readsize = 256; + ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; + memory "lock" + size = 1; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x x x i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x x x i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -9651,179 +9651,179 @@ part #------------------------------------------------------------ part - id = "t25"; - desc = "ATtiny25"; - has_debugwire = yes; - flash_instr = 0xB4, 0x02, 0x12; - eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, - 0xBC, 0x02, 0xB4, 0x02, 0xBA, 0x0D, 0xBB, 0xBC, - 0x99, 0xE1, 0xBB, 0xAC; + id = "t25"; + desc = "ATtiny25"; + has_debugwire = yes; + flash_instr = 0xB4, 0x02, 0x12; + eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, + 0xBC, 0x02, 0xB4, 0x02, 0xBA, 0x0D, 0xBB, 0xBC, + 0x99, 0xE1, 0xBB, 0xAC; ## no STK500 devcode in XML file, use the ATtiny45 one - stk500_devcode = 0x14; + stk500_devcode = 0x14; ## avr910_devcode = ?; ## Try the AT90S2313 devcode: - avr910_devcode = 0x20; - signature = 0x1e 0x91 0x08; - reset = io; - chip_erase_delay = 4500; + avr910_devcode = 0x20; + signature = 0x1e 0x91 0x08; + reset = io; + chip_erase_delay = 4500; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - hvsp_controlstack = - 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66, - 0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78, - 0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10, - 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00; - hventerstabdelay = 100; - hvspcmdexedelay = 0; - synchcycles = 6; - latchcycles = 1; - togglevtg = 1; - poweroffdelay = 25; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 100; - resetdelay = 25; - chiperasepolltimeout = 40; - chiperasetime = 0; - programfusepolltimeout = 25; - programlockpolltimeout = 25; + hvsp_controlstack = + 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66, + 0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78, + 0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10, + 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00; + hventerstabdelay = 100; + hvspcmdexedelay = 0; + synchcycles = 6; + latchcycles = 1; + togglevtg = 1; + poweroffdelay = 25; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 100; + resetdelay = 25; + chiperasepolltimeout = 40; + chiperasetime = 0; + programfusepolltimeout = 25; + programlockpolltimeout = 25; - memory "eeprom" - size = 128; - paged = no; - page_size = 4; - min_write_delay = 4000; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read = "1 0 1 0 0 0 0 0 0 0 0 x x x x x", - "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 128; + paged = no; + page_size = 4; + min_write_delay = 4000; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read = "1 0 1 0 0 0 0 0 0 0 0 x x x x x", + "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = "1 1 0 0 0 0 0 0 0 0 0 x x x x x", - "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = "1 1 0 0 0 0 0 0 0 0 0 x x x x x", + "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x x x", " x a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 4; - readsize = 256; - ; - memory "flash" - paged = yes; - size = 2048; - page_size = 32; - num_pages = 64; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 0 0 0 0 0 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x41; + delay = 6; + blocksize = 4; + readsize = 256; + ; + memory "flash" + paged = yes; + size = 2048; + page_size = 32; + num_pages = 64; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 0 0 0 0 0 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 0 0 0 0 0 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 0 0 0 0 0 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 x x x x x", - " x x x x a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 x x x x x", + " x x x x a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 x x x x x", - " x x x x a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 x x x x x", + " x x x x a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 0 0 0 0 0 a9 a8", - " a7 a6 a5 a4 x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 0 0 0 0 0 a9 a8", + " a7 a6 a5 a4 x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 32; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 32; + readsize = 256; + ; # ATtiny25 has Signature Bytes: 0x1E 0x91 0x08. - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; - memory "lock" - size = 1; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; + memory "lock" + size = 1; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x x x i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x x x i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 2; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 a0 o o o o o o o o"; - ; + memory "calibration" + size = 2; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -9831,178 +9831,178 @@ part #------------------------------------------------------------ part - id = "t45"; - desc = "ATtiny45"; - has_debugwire = yes; - flash_instr = 0xB4, 0x02, 0x12; - eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, - 0xBC, 0x02, 0xB4, 0x02, 0xBA, 0x0D, 0xBB, 0xBC, - 0x99, 0xE1, 0xBB, 0xAC; - stk500_devcode = 0x14; + id = "t45"; + desc = "ATtiny45"; + has_debugwire = yes; + flash_instr = 0xB4, 0x02, 0x12; + eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, + 0xBC, 0x02, 0xB4, 0x02, 0xBA, 0x0D, 0xBB, 0xBC, + 0x99, 0xE1, 0xBB, 0xAC; + stk500_devcode = 0x14; ## avr910_devcode = ?; ## Try the AT90S2313 devcode: - avr910_devcode = 0x20; - signature = 0x1e 0x92 0x06; - reset = io; - chip_erase_delay = 4500; + avr910_devcode = 0x20; + signature = 0x1e 0x92 0x06; + reset = io; + chip_erase_delay = 4500; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - hvsp_controlstack = + hvsp_controlstack = 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66, - 0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78, - 0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10, - 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - hvspcmdexedelay = 0; - synchcycles = 6; - latchcycles = 1; - togglevtg = 1; - poweroffdelay = 25; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 100; - resetdelay = 25; - chiperasepolltimeout = 40; - chiperasetime = 0; - programfusepolltimeout = 25; - programlockpolltimeout = 25; + 0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78, + 0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10, + 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + hvspcmdexedelay = 0; + synchcycles = 6; + latchcycles = 1; + togglevtg = 1; + poweroffdelay = 25; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 100; + resetdelay = 25; + chiperasepolltimeout = 40; + chiperasetime = 0; + programfusepolltimeout = 25; + programlockpolltimeout = 25; - memory "eeprom" - size = 256; - page_size = 4; - min_write_delay = 4000; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read = "1 0 1 0 0 0 0 0 0 0 0 x x x x x", - "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 256; + page_size = 4; + min_write_delay = 4000; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read = "1 0 1 0 0 0 0 0 0 0 0 x x x x x", + "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = "1 1 0 0 0 0 0 0 0 0 0 x x x x x", - "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = "1 1 0 0 0 0 0 0 0 0 0 x x x x x", + "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x x x", " a7 a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 4; - readsize = 256; - ; - memory "flash" - paged = yes; - size = 4096; - page_size = 64; - num_pages = 64; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 0 0 0 0 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x41; + delay = 6; + blocksize = 4; + readsize = 256; + ; + memory "flash" + paged = yes; + size = 4096; + page_size = 64; + num_pages = 64; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 0 0 0 0 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 0 0 0 0 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 0 0 0 0 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 0 0 0 0 a10 a9 a8", - " a7 a6 a5 x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 0 0 0 0 a10 a9 a8", + " a7 a6 a5 x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 32; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 32; + readsize = 256; + ; # ATtiny45 has Signature Bytes: 0x1E 0x92 0x08. (Data sheet 2586C-AVR-06/05 (doc2586.pdf) indicates otherwise!) - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; - memory "lock" - size = 1; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; + memory "lock" + size = 1; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x x x i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x x x i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 2; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 a0 o o o o o o o o"; - ; + memory "calibration" + size = 2; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -10010,179 +10010,179 @@ part #------------------------------------------------------------ part - id = "t85"; - desc = "ATtiny85"; - has_debugwire = yes; - flash_instr = 0xB4, 0x02, 0x12; - eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, - 0xBC, 0x02, 0xB4, 0x02, 0xBA, 0x0D, 0xBB, 0xBC, - 0x99, 0xE1, 0xBB, 0xAC; + id = "t85"; + desc = "ATtiny85"; + has_debugwire = yes; + flash_instr = 0xB4, 0x02, 0x12; + eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, + 0xBC, 0x02, 0xB4, 0x02, 0xBA, 0x0D, 0xBB, 0xBC, + 0x99, 0xE1, 0xBB, 0xAC; ## no STK500 devcode in XML file, use the ATtiny45 one - stk500_devcode = 0x14; + stk500_devcode = 0x14; ## avr910_devcode = ?; ## Try the AT90S2313 devcode: - avr910_devcode = 0x20; - signature = 0x1e 0x93 0x0b; - reset = io; - chip_erase_delay = 4500; + avr910_devcode = 0x20; + signature = 0x1e 0x93 0x0b; + reset = io; + chip_erase_delay = 4500; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - hvsp_controlstack = - 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66, - 0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78, - 0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10, - 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00; - hventerstabdelay = 100; - hvspcmdexedelay = 0; - synchcycles = 6; - latchcycles = 1; - togglevtg = 1; - poweroffdelay = 25; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 100; - resetdelay = 25; - chiperasepolltimeout = 40; - chiperasetime = 0; - programfusepolltimeout = 25; - programlockpolltimeout = 25; + hvsp_controlstack = + 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66, + 0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78, + 0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10, + 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00; + hventerstabdelay = 100; + hvspcmdexedelay = 0; + synchcycles = 6; + latchcycles = 1; + togglevtg = 1; + poweroffdelay = 25; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 100; + resetdelay = 25; + chiperasepolltimeout = 40; + chiperasetime = 0; + programfusepolltimeout = 25; + programlockpolltimeout = 25; - memory "eeprom" - size = 512; - paged = no; - page_size = 4; - min_write_delay = 4000; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read = "1 0 1 0 0 0 0 0 0 0 0 x x x x a8", - "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 512; + paged = no; + page_size = 4; + min_write_delay = 4000; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read = "1 0 1 0 0 0 0 0 0 0 0 x x x x a8", + "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = "1 1 0 0 0 0 0 0 0 0 0 x x x x a8", - "a8 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = "1 1 0 0 0 0 0 0 0 0 0 x x x x a8", + "a8 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x x a8", " a7 a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 4; - readsize = 256; - ; - memory "flash" - paged = yes; - size = 8192; - page_size = 64; - num_pages = 128; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x41; + delay = 6; + blocksize = 4; + readsize = 256; + ; + memory "flash" + paged = yes; + size = 8192; + page_size = 64; + num_pages = 128; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 32; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 32; + readsize = 256; + ; # ATtiny85 has Signature Bytes: 0x1E 0x93 0x08. - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; - memory "lock" - size = 1; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; + memory "lock" + size = 1; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x x x i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x x x i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 2; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 a0 o o o o o o o o"; - ; + memory "calibration" + size = 2; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -10191,187 +10191,187 @@ part # Almost same as ATmega1280, except for different memory sizes part - id = "m640"; - desc = "ATMEGA640"; - signature = 0x1e 0x96 0x08; - has_jtag = yes; + id = "m640"; + desc = "ATMEGA640"; + signature = 0x1e 0x96 0x08; + has_jtag = yes; # stk500_devcode = 0xB2; # avr910_devcode = 0x43; - chip_erase_delay = 9000; - pagel = 0xD7; - bs2 = 0xA0; - reset = dedicated; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + chip_erase_delay = 9000; + pagel = 0xD7; + bs2 = 0xA0; + reset = dedicated; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - rampz = 0x3b; - allowfullpagebitstream = no; + idr = 0x31; + spmcr = 0x57; + rampz = 0x3b; + allowfullpagebitstream = no; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 8; /* for parallel programming */ - size = 4096; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0x00; - readback_p2 = 0x00; - read = " 1 0 1 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 8; /* for parallel programming */ + size = 4096; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0x00; + readback_p2 = 0x00; + read = " 1 0 1 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 a2 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x a11 a10 a9 a8", " a7 a6 a5 a4 a3 0 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 8; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 8; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 65536; - page_size = 256; - num_pages = 256; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0x00; - readback_p2 = 0x00; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 65536; + page_size = 256; + num_pages = 256; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0x00; + readback_p2 = 0x00; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 a14 a13 a12 a11 a10 a9 a8", - " a7 x x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 a14 a13 a12 a11 a10 a9 a8", + " a7 x x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 256; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 256; + readsize = 256; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x i i i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -10379,187 +10379,187 @@ part #------------------------------------------------------------ part - id = "m1280"; - desc = "ATMEGA1280"; - signature = 0x1e 0x97 0x03; - has_jtag = yes; + id = "m1280"; + desc = "ATMEGA1280"; + signature = 0x1e 0x97 0x03; + has_jtag = yes; # stk500_devcode = 0xB2; # avr910_devcode = 0x43; - chip_erase_delay = 9000; - pagel = 0xD7; - bs2 = 0xA0; - reset = dedicated; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + chip_erase_delay = 9000; + pagel = 0xD7; + bs2 = 0xA0; + reset = dedicated; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - rampz = 0x3b; - allowfullpagebitstream = no; + idr = 0x31; + spmcr = 0x57; + rampz = 0x3b; + allowfullpagebitstream = no; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 8; /* for parallel programming */ - size = 4096; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0x00; - readback_p2 = 0x00; - read = " 1 0 1 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 8; /* for parallel programming */ + size = 4096; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0x00; + readback_p2 = 0x00; + read = " 1 0 1 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 a2 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x a11 a10 a9 a8", " a7 a6 a5 a4 a3 0 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 8; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 8; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 131072; - page_size = 256; - num_pages = 512; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0x00; - readback_p2 = 0x00; - read_lo = " 0 0 1 0 0 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 131072; + page_size = 256; + num_pages = 512; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0x00; + readback_p2 = 0x00; + read_lo = " 0 0 1 0 0 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 x x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 x x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 256; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 256; + readsize = 256; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x i i i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -10568,187 +10568,187 @@ part # Identical to ATmega1280 part - id = "m1281"; - desc = "ATMEGA1281"; - signature = 0x1e 0x97 0x04; - has_jtag = yes; + id = "m1281"; + desc = "ATMEGA1281"; + signature = 0x1e 0x97 0x04; + has_jtag = yes; # stk500_devcode = 0xB2; # avr910_devcode = 0x43; - chip_erase_delay = 9000; - pagel = 0xD7; - bs2 = 0xA0; - reset = dedicated; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + chip_erase_delay = 9000; + pagel = 0xD7; + bs2 = 0xA0; + reset = dedicated; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - rampz = 0x3b; - allowfullpagebitstream = no; + idr = 0x31; + spmcr = 0x57; + rampz = 0x3b; + allowfullpagebitstream = no; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 8; /* for parallel programming */ - size = 4096; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0x00; - readback_p2 = 0x00; - read = " 1 0 1 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 8; /* for parallel programming */ + size = 4096; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0x00; + readback_p2 = 0x00; + read = " 1 0 1 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 a2 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x a11 a10 a9 a8", " a7 a6 a5 a4 a3 0 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 8; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 8; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 131072; - page_size = 256; - num_pages = 512; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0x00; - readback_p2 = 0x00; - read_lo = " 0 0 1 0 0 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 131072; + page_size = 256; + num_pages = 512; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0x00; + readback_p2 = 0x00; + read_lo = " 0 0 1 0 0 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 x x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 x x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 256; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 256; + readsize = 256; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x i i i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -10756,192 +10756,192 @@ part #------------------------------------------------------------ part - id = "m2560"; - desc = "ATMEGA2560"; - signature = 0x1e 0x98 0x01; - has_jtag = yes; + id = "m2560"; + desc = "ATMEGA2560"; + signature = 0x1e 0x98 0x01; + has_jtag = yes; # stk500_devcode = 0xB2; # avr910_devcode = 0x43; - chip_erase_delay = 9000; - pagel = 0xD7; - bs2 = 0xA0; - reset = dedicated; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + chip_erase_delay = 9000; + pagel = 0xD7; + bs2 = 0xA0; + reset = dedicated; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - rampz = 0x3b; - allowfullpagebitstream = no; + idr = 0x31; + spmcr = 0x57; + rampz = 0x3b; + allowfullpagebitstream = no; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 8; /* for parallel programming */ - size = 4096; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0x00; - readback_p2 = 0x00; - read = " 1 0 1 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 8; /* for parallel programming */ + size = 4096; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0x00; + readback_p2 = 0x00; + read = " 1 0 1 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 a2 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x a11 a10 a9 a8", " a7 a6 a5 a4 a3 0 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 8; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 8; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 262144; - page_size = 256; - num_pages = 1024; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0x00; - readback_p2 = 0x00; - read_lo = " 0 0 1 0 0 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 262144; + page_size = 256; + num_pages = 1024; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0x00; + readback_p2 = 0x00; + read_lo = " 0 0 1 0 0 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 x x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 x x x x x x x", + " x x x x x x x x"; - load_ext_addr = " 0 1 0 0 1 1 0 1", - " 0 0 0 0 0 0 0 0", - " 0 0 0 0 0 0 0 a16", - " 0 0 0 0 0 0 0 0"; + load_ext_addr = " 0 1 0 0 1 1 0 1", + " 0 0 0 0 0 0 0 0", + " 0 0 0 0 0 0 0 a16", + " 0 0 0 0 0 0 0 0"; - mode = 0x41; - delay = 10; - blocksize = 256; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 256; + readsize = 256; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x i i i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -10949,192 +10949,192 @@ part #------------------------------------------------------------ part - id = "m2561"; - desc = "ATMEGA2561"; - signature = 0x1e 0x98 0x02; - has_jtag = yes; + id = "m2561"; + desc = "ATMEGA2561"; + signature = 0x1e 0x98 0x02; + has_jtag = yes; # stk500_devcode = 0xB2; # avr910_devcode = 0x43; - chip_erase_delay = 9000; - pagel = 0xD7; - bs2 = 0xA0; - reset = dedicated; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + chip_erase_delay = 9000; + pagel = 0xD7; + bs2 = 0xA0; + reset = dedicated; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - rampz = 0x3b; - allowfullpagebitstream = no; + idr = 0x31; + spmcr = 0x57; + rampz = 0x3b; + allowfullpagebitstream = no; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 8; /* for parallel programming */ - size = 4096; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0x00; - readback_p2 = 0x00; - read = " 1 0 1 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 8; /* for parallel programming */ + size = 4096; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0x00; + readback_p2 = 0x00; + read = " 1 0 1 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 a2 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x a11 a10 a9 a8", " a7 a6 a5 a4 a3 0 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 8; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 8; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 262144; - page_size = 256; - num_pages = 1024; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0x00; - readback_p2 = 0x00; - read_lo = " 0 0 1 0 0 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 262144; + page_size = 256; + num_pages = 1024; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0x00; + readback_p2 = 0x00; + read_lo = " 0 0 1 0 0 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 x x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 x x x x x x x", + " x x x x x x x x"; - load_ext_addr = " 0 1 0 0 1 1 0 1", - " 0 0 0 0 0 0 0 0", - " 0 0 0 0 0 0 0 a16", - " 0 0 0 0 0 0 0 0"; + load_ext_addr = " 0 1 0 0 1 1 0 1", + " 0 0 0 0 0 0 0 0", + " 0 0 0 0 0 0 0 a16", + " 0 0 0 0 0 0 0 0"; - mode = 0x41; - delay = 10; - blocksize = 256; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 256; + readsize = 256; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x i i i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -11143,187 +11143,187 @@ part # Identical to ATmega2561 but half the ROM part - id = "m128rfa1"; - desc = "ATMEGA128RFA1"; - signature = 0x1e 0xa7 0x01; - has_jtag = yes; + id = "m128rfa1"; + desc = "ATMEGA128RFA1"; + signature = 0x1e 0xa7 0x01; + has_jtag = yes; # stk500_devcode = 0xB2; # avr910_devcode = 0x43; - chip_erase_delay = 9000; - pagel = 0xD7; - bs2 = 0xE2; - reset = dedicated; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + chip_erase_delay = 9000; + pagel = 0xD7; + bs2 = 0xE2; + reset = dedicated; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - rampz = 0x3b; - allowfullpagebitstream = no; + idr = 0x31; + spmcr = 0x57; + rampz = 0x3b; + allowfullpagebitstream = no; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 8; /* for parallel programming */ - size = 4096; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0x00; - readback_p2 = 0x00; - read = " 1 0 1 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 8; /* for parallel programming */ + size = 4096; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0x00; + readback_p2 = 0x00; + read = " 1 0 1 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 a2 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x a11 a10 a9 a8", " a7 a6 a5 a4 a3 0 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 8; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 8; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 131072; - page_size = 256; - num_pages = 512; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0x00; - readback_p2 = 0x00; - read_lo = " 0 0 1 0 0 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 131072; + page_size = 256; + num_pages = 512; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0x00; + readback_p2 = 0x00; + read_lo = " 0 0 1 0 0 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 x x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 x x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 256; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 256; + readsize = 256; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x i i i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -11331,181 +11331,181 @@ part #------------------------------------------------------------ part - id = "t24"; - desc = "ATtiny24"; - has_debugwire = yes; - flash_instr = 0xB4, 0x07, 0x17; - eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, - 0xBC, 0x07, 0xB4, 0x07, 0xBA, 0x0D, 0xBB, 0xBC, - 0x99, 0xE1, 0xBB, 0xAC; + id = "t24"; + desc = "ATtiny24"; + has_debugwire = yes; + flash_instr = 0xB4, 0x07, 0x17; + eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, + 0xBC, 0x07, 0xB4, 0x07, 0xBA, 0x0D, 0xBB, 0xBC, + 0x99, 0xE1, 0xBB, 0xAC; ## no STK500 devcode in XML file, use the ATtiny45 one - stk500_devcode = 0x14; + stk500_devcode = 0x14; ## avr910_devcode = ?; ## Try the AT90S2313 devcode: - avr910_devcode = 0x20; - signature = 0x1e 0x91 0x0b; - reset = io; - chip_erase_delay = 4500; + avr910_devcode = 0x20; + signature = 0x1e 0x91 0x0b; + reset = io; + chip_erase_delay = 4500; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - hvsp_controlstack = - 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66, - 0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78, - 0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10, - 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x0F; - hventerstabdelay = 100; - hvspcmdexedelay = 0; - synchcycles = 6; - latchcycles = 1; - togglevtg = 1; - poweroffdelay = 25; - resetdelayms = 0; - resetdelayus = 70; - hvleavestabdelay = 100; - resetdelay = 25; - chiperasepolltimeout = 40; - chiperasetime = 0; - programfusepolltimeout = 25; - programlockpolltimeout = 25; + hvsp_controlstack = + 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66, + 0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78, + 0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10, + 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x0F; + hventerstabdelay = 100; + hvspcmdexedelay = 0; + synchcycles = 6; + latchcycles = 1; + togglevtg = 1; + poweroffdelay = 25; + resetdelayms = 0; + resetdelayus = 70; + hvleavestabdelay = 100; + resetdelay = 25; + chiperasepolltimeout = 40; + chiperasetime = 0; + programfusepolltimeout = 25; + programlockpolltimeout = 25; - memory "eeprom" - size = 128; - paged = no; - page_size = 4; - min_write_delay = 4000; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read = "1 0 1 0 0 0 0 0 0 0 0 x x x x x", - "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 128; + paged = no; + page_size = 4; + min_write_delay = 4000; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read = "1 0 1 0 0 0 0 0 0 0 0 x x x x x", + "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = "1 1 0 0 0 0 0 0 0 0 0 x x x x x", - "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = "1 1 0 0 0 0 0 0 0 0 0 x x x x x", + "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x x x", " x a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 4; - readsize = 256; - ; - memory "flash" - paged = yes; - size = 2048; - page_size = 32; - num_pages = 64; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 0 0 0 0 0 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x41; + delay = 6; + blocksize = 4; + readsize = 256; + ; + memory "flash" + paged = yes; + size = 2048; + page_size = 32; + num_pages = 64; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 0 0 0 0 0 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 0 0 0 0 0 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 0 0 0 0 0 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 x x x x x", - " x x x x a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 x x x x x", + " x x x x a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 x x x x x", - " x x x x a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 x x x x x", + " x x x x a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 0 0 0 0 0 a9 a8", - " a7 a6 a5 a4 x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 0 0 0 0 0 a9 a8", + " a7 a6 a5 a4 x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 32; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 32; + readsize = 256; + ; # ATtiny24 has Signature Bytes: 0x1E 0x91 0x0B. - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; - memory "lock" - size = 1; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x x x x x x x i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; + memory "lock" + size = 1; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x x x x x x x i i"; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x x x i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x x x i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 a0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -11513,181 +11513,181 @@ part #------------------------------------------------------------ part - id = "t44"; - desc = "ATtiny44"; - has_debugwire = yes; - flash_instr = 0xB4, 0x07, 0x17; - eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, - 0xBC, 0x07, 0xB4, 0x07, 0xBA, 0x0D, 0xBB, 0xBC, - 0x99, 0xE1, 0xBB, 0xAC; + id = "t44"; + desc = "ATtiny44"; + has_debugwire = yes; + flash_instr = 0xB4, 0x07, 0x17; + eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, + 0xBC, 0x07, 0xB4, 0x07, 0xBA, 0x0D, 0xBB, 0xBC, + 0x99, 0xE1, 0xBB, 0xAC; ## no STK500 devcode in XML file, use the ATtiny45 one - stk500_devcode = 0x14; + stk500_devcode = 0x14; ## avr910_devcode = ?; ## Try the AT90S2313 devcode: - avr910_devcode = 0x20; - signature = 0x1e 0x92 0x07; - reset = io; - chip_erase_delay = 4500; + avr910_devcode = 0x20; + signature = 0x1e 0x92 0x07; + reset = io; + chip_erase_delay = 4500; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - hvsp_controlstack = - 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66, - 0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78, - 0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10, - 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x0F; - hventerstabdelay = 100; - hvspcmdexedelay = 0; - synchcycles = 6; - latchcycles = 1; - togglevtg = 1; - poweroffdelay = 25; - resetdelayms = 0; - resetdelayus = 70; - hvleavestabdelay = 100; - resetdelay = 25; - chiperasepolltimeout = 40; - chiperasetime = 0; - programfusepolltimeout = 25; - programlockpolltimeout = 25; + hvsp_controlstack = + 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66, + 0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78, + 0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10, + 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x0F; + hventerstabdelay = 100; + hvspcmdexedelay = 0; + synchcycles = 6; + latchcycles = 1; + togglevtg = 1; + poweroffdelay = 25; + resetdelayms = 0; + resetdelayus = 70; + hvleavestabdelay = 100; + resetdelay = 25; + chiperasepolltimeout = 40; + chiperasetime = 0; + programfusepolltimeout = 25; + programlockpolltimeout = 25; - memory "eeprom" - size = 256; - paged = no; - page_size = 4; - min_write_delay = 4000; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read = "1 0 1 0 0 0 0 0 0 0 0 x x x x x", - "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 256; + paged = no; + page_size = 4; + min_write_delay = 4000; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read = "1 0 1 0 0 0 0 0 0 0 0 x x x x x", + "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = "1 1 0 0 0 0 0 0 0 0 0 x x x x x", - "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = "1 1 0 0 0 0 0 0 0 0 0 x x x x x", + "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x x x", " x a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 4; - readsize = 256; - ; - memory "flash" - paged = yes; - size = 4096; - page_size = 64; - num_pages = 64; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 0 0 0 0 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x41; + delay = 6; + blocksize = 4; + readsize = 256; + ; + memory "flash" + paged = yes; + size = 4096; + page_size = 64; + num_pages = 64; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 0 0 0 0 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 0 0 0 0 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 0 0 0 0 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 0 0 0 0 a10 a9 a8", - " a7 a6 a5 x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 0 0 0 0 a10 a9 a8", + " a7 a6 a5 x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 32; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 32; + readsize = 256; + ; # ATtiny44 has Signature Bytes: 0x1E 0x92 0x07. - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; - memory "lock" - size = 1; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x x x x x x x i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; + memory "lock" + size = 1; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x x x x x x x i i"; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x x x i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x x x i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 a0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -11695,182 +11695,182 @@ part #------------------------------------------------------------ part - id = "t84"; - desc = "ATtiny84"; - has_debugwire = yes; - flash_instr = 0xB4, 0x07, 0x17; - eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, - 0xBC, 0x07, 0xB4, 0x07, 0xBA, 0x0D, 0xBB, 0xBC, - 0x99, 0xE1, 0xBB, 0xAC; + id = "t84"; + desc = "ATtiny84"; + has_debugwire = yes; + flash_instr = 0xB4, 0x07, 0x17; + eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, + 0xBC, 0x07, 0xB4, 0x07, 0xBA, 0x0D, 0xBB, 0xBC, + 0x99, 0xE1, 0xBB, 0xAC; ## no STK500 devcode in XML file, use the ATtiny45 one - stk500_devcode = 0x14; + stk500_devcode = 0x14; ## avr910_devcode = ?; ## Try the AT90S2313 devcode: - avr910_devcode = 0x20; - signature = 0x1e 0x93 0x0c; - reset = io; - chip_erase_delay = 4500; + avr910_devcode = 0x20; + signature = 0x1e 0x93 0x0c; + reset = io; + chip_erase_delay = 4500; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - hvsp_controlstack = - 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66, - 0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78, - 0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10, - 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x0F; - hventerstabdelay = 100; - hvspcmdexedelay = 0; - synchcycles = 6; - latchcycles = 1; - togglevtg = 1; - poweroffdelay = 25; - resetdelayms = 0; - resetdelayus = 70; - hvleavestabdelay = 100; - resetdelay = 25; - chiperasepolltimeout = 40; - chiperasetime = 0; - programfusepolltimeout = 25; - programlockpolltimeout = 25; + hvsp_controlstack = + 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66, + 0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78, + 0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10, + 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x0F; + hventerstabdelay = 100; + hvspcmdexedelay = 0; + synchcycles = 6; + latchcycles = 1; + togglevtg = 1; + poweroffdelay = 25; + resetdelayms = 0; + resetdelayus = 70; + hvleavestabdelay = 100; + resetdelay = 25; + chiperasepolltimeout = 40; + chiperasetime = 0; + programfusepolltimeout = 25; + programlockpolltimeout = 25; - memory "eeprom" - size = 512; - paged = no; - page_size = 4; - min_write_delay = 4000; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read = "1 0 1 0 0 0 0 0 0 0 0 x x x x a8", - "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 512; + paged = no; + page_size = 4; + min_write_delay = 4000; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read = "1 0 1 0 0 0 0 0 0 0 0 x x x x a8", + "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = "1 1 0 0 0 0 0 0 0 0 0 x x x x a8", - "a8 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = "1 1 0 0 0 0 0 0 0 0 0 x x x x a8", + "a8 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x x x", " x a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 4; - readsize = 256; - ; - memory "flash" - paged = yes; - size = 8192; - page_size = 64; - num_pages = 128; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x41; + delay = 6; + blocksize = 4; + readsize = 256; + ; + memory "flash" + paged = yes; + size = 8192; + page_size = 64; + num_pages = 128; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 32; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 32; + readsize = 256; + ; # ATtiny84 has Signature Bytes: 0x1E 0x93 0x0C. - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; - memory "lock" - size = 1; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x x x x x x x i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + memory "lock" + size = 1; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x x x x x x x i i"; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x x x i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x x x i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 a0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -11878,187 +11878,187 @@ part #------------------------------------------------------------ part - id = "m32u4"; - desc = "ATmega32U4"; - signature = 0x1e 0x95 0x87; - has_jtag = yes; + id = "m32u4"; + desc = "ATmega32U4"; + signature = 0x1e 0x95 0x87; + has_jtag = yes; # stk500_devcode = 0xB2; # avr910_devcode = 0x43; - chip_erase_delay = 9000; - pagel = 0xD7; - bs2 = 0xA0; - reset = dedicated; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + chip_erase_delay = 9000; + pagel = 0xD7; + bs2 = 0xA0; + reset = dedicated; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - rampz = 0x3b; - allowfullpagebitstream = no; + idr = 0x31; + spmcr = 0x57; + rampz = 0x3b; + allowfullpagebitstream = no; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 8; /* for parallel programming */ - size = 1024; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0x00; - readback_p2 = 0x00; - read = " 1 0 1 0 0 0 0 0", - " x x x x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 8; /* for parallel programming */ + size = 1024; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0x00; + readback_p2 = 0x00; + read = " 1 0 1 0 0 0 0 0", + " x x x x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0", - " x x x x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0", + " x x x x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 a2 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x a10 a9 a8", " a7 a6 a5 a4 a3 0 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 8; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 8; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 32768; - page_size = 128; - num_pages = 256; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0x00; - readback_p2 = 0x00; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 32768; + page_size = 128; + num_pages = 256; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0x00; + readback_p2 = 0x00; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 128; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 128; + readsize = 256; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x i i i i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -12066,187 +12066,187 @@ part #------------------------------------------------------------ part - id = "usb646"; - desc = "AT90USB646"; - signature = 0x1e 0x96 0x82; - has_jtag = yes; + id = "usb646"; + desc = "AT90USB646"; + signature = 0x1e 0x96 0x82; + has_jtag = yes; # stk500_devcode = 0xB2; # avr910_devcode = 0x43; - chip_erase_delay = 9000; - pagel = 0xD7; - bs2 = 0xA0; - reset = dedicated; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + chip_erase_delay = 9000; + pagel = 0xD7; + bs2 = 0xA0; + reset = dedicated; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - rampz = 0x3b; - allowfullpagebitstream = no; + idr = 0x31; + spmcr = 0x57; + rampz = 0x3b; + allowfullpagebitstream = no; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 8; /* for parallel programming */ - size = 2048; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0x00; - readback_p2 = 0x00; - read = " 1 0 1 0 0 0 0 0", - " x x x x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 8; /* for parallel programming */ + size = 2048; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0x00; + readback_p2 = 0x00; + read = " 1 0 1 0 0 0 0 0", + " x x x x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0", - " x x x x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0", + " x x x x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 a2 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x a10 a9 a8", " a7 a6 a5 a4 a3 0 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 8; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 8; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 65536; - page_size = 256; - num_pages = 256; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0x00; - readback_p2 = 0x00; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 65536; + page_size = 256; + num_pages = 256; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0x00; + readback_p2 = 0x00; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 a14 a13 a12 a11 a10 a9 a8", - " a7 x x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 a14 a13 a12 a11 a10 a9 a8", + " a7 x x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 256; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 256; + readsize = 256; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x i i i i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -12255,187 +12255,187 @@ part # identical to AT90USB646 part - id = "usb647"; - desc = "AT90USB647"; - signature = 0x1e 0x96 0x82; - has_jtag = yes; + id = "usb647"; + desc = "AT90USB647"; + signature = 0x1e 0x96 0x82; + has_jtag = yes; # stk500_devcode = 0xB2; # avr910_devcode = 0x43; - chip_erase_delay = 9000; - pagel = 0xD7; - bs2 = 0xA0; - reset = dedicated; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + chip_erase_delay = 9000; + pagel = 0xD7; + bs2 = 0xA0; + reset = dedicated; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - rampz = 0x3b; - allowfullpagebitstream = no; + idr = 0x31; + spmcr = 0x57; + rampz = 0x3b; + allowfullpagebitstream = no; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 8; /* for parallel programming */ - size = 2048; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0x00; - readback_p2 = 0x00; - read = " 1 0 1 0 0 0 0 0", - " x x x x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 8; /* for parallel programming */ + size = 2048; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0x00; + readback_p2 = 0x00; + read = " 1 0 1 0 0 0 0 0", + " x x x x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0", - " x x x x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0", + " x x x x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 a2 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x a10 a9 a8", " a7 a6 a5 a4 a3 0 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 8; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 8; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 65536; - page_size = 256; - num_pages = 256; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0x00; - readback_p2 = 0x00; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 65536; + page_size = 256; + num_pages = 256; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0x00; + readback_p2 = 0x00; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 a14 a13 a12 a11 a10 a9 a8", - " a7 x x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 a14 a13 a12 a11 a10 a9 a8", + " a7 x x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 256; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 256; + readsize = 256; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x i i i i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -12443,187 +12443,187 @@ part #------------------------------------------------------------ part - id = "usb1286"; - desc = "AT90USB1286"; - signature = 0x1e 0x97 0x82; - has_jtag = yes; + id = "usb1286"; + desc = "AT90USB1286"; + signature = 0x1e 0x97 0x82; + has_jtag = yes; # stk500_devcode = 0xB2; # avr910_devcode = 0x43; - chip_erase_delay = 9000; - pagel = 0xD7; - bs2 = 0xA0; - reset = dedicated; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + chip_erase_delay = 9000; + pagel = 0xD7; + bs2 = 0xA0; + reset = dedicated; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - rampz = 0x3b; - allowfullpagebitstream = no; + idr = 0x31; + spmcr = 0x57; + rampz = 0x3b; + allowfullpagebitstream = no; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 8; /* for parallel programming */ - size = 4096; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0x00; - readback_p2 = 0x00; - read = " 1 0 1 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 8; /* for parallel programming */ + size = 4096; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0x00; + readback_p2 = 0x00; + read = " 1 0 1 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 a2 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x a10 a9 a8", " a7 a6 a5 a4 a3 0 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 8; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 8; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 131072; - page_size = 256; - num_pages = 512; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0x00; - readback_p2 = 0x00; - read_lo = " 0 0 1 0 0 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 131072; + page_size = 256; + num_pages = 512; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0x00; + readback_p2 = 0x00; + read_lo = " 0 0 1 0 0 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 x x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 x x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 256; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 256; + readsize = 256; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x i i i i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -12632,187 +12632,187 @@ part # identical to AT90USB1286 part - id = "usb1287"; - desc = "AT90USB1287"; - signature = 0x1e 0x97 0x82; - has_jtag = yes; + id = "usb1287"; + desc = "AT90USB1287"; + signature = 0x1e 0x97 0x82; + has_jtag = yes; # stk500_devcode = 0xB2; # avr910_devcode = 0x43; - chip_erase_delay = 9000; - pagel = 0xD7; - bs2 = 0xA0; - reset = dedicated; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + chip_erase_delay = 9000; + pagel = 0xD7; + bs2 = 0xA0; + reset = dedicated; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - rampz = 0x3b; - allowfullpagebitstream = no; + idr = 0x31; + spmcr = 0x57; + rampz = 0x3b; + allowfullpagebitstream = no; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 8; /* for parallel programming */ - size = 4096; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0x00; - readback_p2 = 0x00; - read = " 1 0 1 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 8; /* for parallel programming */ + size = 4096; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0x00; + readback_p2 = 0x00; + read = " 1 0 1 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 a2 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x a10 a9 a8", " a7 a6 a5 a4 a3 0 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 8; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 8; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 131072; - page_size = 256; - num_pages = 512; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0x00; - readback_p2 = 0x00; - read_lo = " 0 0 1 0 0 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 131072; + page_size = 256; + num_pages = 512; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0x00; + readback_p2 = 0x00; + read_lo = " 0 0 1 0 0 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 x x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 x x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 256; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 256; + readsize = 256; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x i i i i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; @@ -12821,179 +12821,179 @@ part #------------------------------------------------------------ part - id = "usb162"; - desc = "AT90USB162"; - has_jtag = no; - has_debugwire = yes; - signature = 0x1e 0x94 0x82; - chip_erase_delay = 9000; - reset = io; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; - pagel = 0xD7; - bs2 = 0xC6; + id = "usb162"; + desc = "AT90USB162"; + has_jtag = no; + has_debugwire = yes; + signature = 0x1e 0x94 0x82; + chip_erase_delay = 9000; + reset = io; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; + pagel = 0xD7; + bs2 = 0xC6; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 4; /* for parallel programming */ - size = 512; - num_pages = 128; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0x00; - readback_p2 = 0x00; - read = " 1 0 1 0 0 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 4; /* for parallel programming */ + size = 512; + num_pages = 128; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0x00; + readback_p2 = 0x00; + read = " 1 0 1 0 0 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 0 0", + writepage = " 1 1 0 0 0 0 1 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 20; - blocksize = 4; - readsize = 256; - ; + mode = 0x41; + delay = 20; + blocksize = 4; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 16384; - page_size = 128; - num_pages = 128; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0x00; - readback_p2 = 0x00; - read_lo = " 0 0 1 0 0 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 16384; + page_size = 128; + num_pages = 128; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0x00; + readback_p2 = 0x00; + read_lo = " 0 0 1 0 0 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 128; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 128; + readsize = 256; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x i i i i i i i i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -13005,179 +13005,179 @@ part # num_pages = 64; part - id = "usb82"; - desc = "AT90USB82"; - has_jtag = no; - has_debugwire = yes; - signature = 0x1e 0x93 0x82; - chip_erase_delay = 9000; - reset = io; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; - pagel = 0xD7; - bs2 = 0xC6; + id = "usb82"; + desc = "AT90USB82"; + has_jtag = no; + has_debugwire = yes; + signature = 0x1e 0x93 0x82; + chip_erase_delay = 9000; + reset = io; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; + pagel = 0xD7; + bs2 = 0xC6; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 4; /* for parallel programming */ - size = 512; - num_pages = 128; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0x00; - readback_p2 = 0x00; - read = " 1 0 1 0 0 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 4; /* for parallel programming */ + size = 512; + num_pages = 128; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0x00; + readback_p2 = 0x00; + read = " 1 0 1 0 0 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 0 0", + writepage = " 1 1 0 0 0 0 1 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 20; - blocksize = 4; - readsize = 256; - ; + mode = 0x41; + delay = 20; + blocksize = 4; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 8192; - page_size = 128; - num_pages = 64; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0x00; - readback_p2 = 0x00; - read_lo = " 0 0 1 0 0 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 8192; + page_size = 128; + num_pages = 64; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0x00; + readback_p2 = 0x00; + read_lo = " 0 0 1 0 0 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 128; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 128; + readsize = 256; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x i i i i i i i i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -13185,188 +13185,188 @@ part #------------------------------------------------------------ part - id = "m325"; - desc = "ATMEGA325"; - signature = 0x1e 0x95 0x05; - has_jtag = yes; + id = "m325"; + desc = "ATMEGA325"; + signature = 0x1e 0x95 0x05; + has_jtag = yes; # stk500_devcode = 0x??; # No STK500v1 support? # avr910_devcode = 0x??; # Try the ATmega16 one - avr910_devcode = 0x74; - pagel = 0xd7; - bs2 = 0xa0; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"; + avr910_devcode = 0x74; + pagel = 0xd7; + bs2 = 0xa0; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - allowfullpagebitstream = no; + idr = 0x31; + spmcr = 0x57; + allowfullpagebitstream = no; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 4; /* for parallel programming */ - size = 1024; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; - read = " 1 0 1 0 0 0 0 0", - " 0 0 0 0 0 0 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 4; /* for parallel programming */ + size = 1024; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; + read = " 1 0 1 0 0 0 0 0", + " 0 0 0 0 0 0 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0", - " 0 0 0 0 0 0 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0", + " 0 0 0 0 0 0 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", - " 0 0 0 0 0 0 0 0", - " 0 0 0 0 0 0 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 1 1 0 0 0 0 0 1", + " 0 0 0 0 0 0 0 0", + " 0 0 0 0 0 0 a1 a0", + " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", - " 0 0 0 0 0 0 a9 a8", - " a7 a6 a5 a4 a3 a2 0 0", - " x x x x x x x x"; + writepage = " 1 1 0 0 0 0 1 0", + " 0 0 0 0 0 0 a9 a8", + " a7 a6 a5 a4 a3 a2 0 0", + " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 4; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 4; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 32768; - page_size = 128; - num_pages = 256; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 32768; + page_size = 128; + num_pages = 256; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 0 0 0 0 0", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 0 0 0 0 0", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 0 0 0 0 0", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 0 0 0 0 0", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 128; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 128; + readsize = 256; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 0 0 0 0 0", - "0 0 0 0 0 0 0 0 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 0 0 0 0 0", + "0 0 0 0 0 0 0 0 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lfuse" - size = 1; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "0 0 0 0 0 0 0 0 o o o o o o o o"; + memory "lfuse" + size = 1; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "0 0 0 0 0 0 0 0 o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "0 0 0 0 0 0 0 0 i i i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "0 0 0 0 0 0 0 0 i i i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "0 0 0 0 0 0 0 0 o o o o o o o o"; + memory "hfuse" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "0 0 0 0 0 0 0 0 o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "0 0 0 0 0 0 0 0 i i i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "0 0 0 0 0 0 0 0 i i i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; + memory "efuse" + size = 1; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "0 0 0 0 0 0 0 0 o o o o o o o o"; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "0 0 0 0 0 0 0 0 o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "0 0 0 0 0 0 0 0 1 1 1 1 1 i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "0 0 0 0 0 0 0 0 1 1 1 1 1 i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0", - "0 0 0 0 0 0 a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0", + "0 0 0 0 0 0 a1 a0 o o o o o o o o"; + ; - memory "calibration" - size = 1; + memory "calibration" + size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + read = "0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -13374,188 +13374,188 @@ part #------------------------------------------------------------ part - id = "m645"; - desc = "ATMEGA645"; - signature = 0x1E 0x96 0x05; - has_jtag = yes; + id = "m645"; + desc = "ATMEGA645"; + signature = 0x1E 0x96 0x05; + has_jtag = yes; # stk500_devcode = 0x??; # No STK500v1 support? # avr910_devcode = 0x??; # Try the ATmega16 one - avr910_devcode = 0x74; - pagel = 0xd7; - bs2 = 0xa0; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"; + avr910_devcode = 0x74; + pagel = 0xd7; + bs2 = 0xa0; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - allowfullpagebitstream = no; + idr = 0x31; + spmcr = 0x57; + allowfullpagebitstream = no; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 8; /* for parallel programming */ - size = 2048; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; - read = " 1 0 1 0 0 0 0 0", - " 0 0 0 0 0 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 8; /* for parallel programming */ + size = 2048; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; + read = " 1 0 1 0 0 0 0 0", + " 0 0 0 0 0 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0", - " 0 0 0 0 0 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0", + " 0 0 0 0 0 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", - " 0 0 0 0 0 0 0 0", - " 0 0 0 0 0 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 1 1 0 0 0 0 0 1", + " 0 0 0 0 0 0 0 0", + " 0 0 0 0 0 a2 a1 a0", + " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", - " 0 0 0 0 0 a10 a9 a8", - " a7 a6 a5 a4 a3 0 0 0", - " x x x x x x x x"; + writepage = " 1 1 0 0 0 0 1 0", + " 0 0 0 0 0 a10 a9 a8", + " a7 a6 a5 a4 a3 0 0 0", + " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 8; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 8; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 65536; - page_size = 256; - num_pages = 256; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 65536; + page_size = 256; + num_pages = 256; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 0 0 0 0 0", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 0 0 0 0 0", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 0 0 0 0 0", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 0 0 0 0 0", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " 0 0 0 0 0 0 0 0"; + writepage = " 0 1 0 0 1 1 0 0", + " a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " 0 0 0 0 0 0 0 0"; - mode = 0x41; - delay = 10; - blocksize = 128; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 128; + readsize = 256; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 0 0 0 0 0", - "0 0 0 0 0 0 0 0 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 0 0 0 0 0", + "0 0 0 0 0 0 0 0 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lfuse" - size = 1; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "0 0 0 0 0 0 0 0 o o o o o o o o"; + memory "lfuse" + size = 1; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "0 0 0 0 0 0 0 0 o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "0 0 0 0 0 0 0 0 i i i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "0 0 0 0 0 0 0 0 i i i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "0 0 0 0 0 0 0 0 o o o o o o o o"; + memory "hfuse" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "0 0 0 0 0 0 0 0 o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "0 0 0 0 0 0 0 0 i i i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "0 0 0 0 0 0 0 0 i i i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; + memory "efuse" + size = 1; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "0 0 0 0 0 0 0 0 o o o o o o o o"; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "0 0 0 0 0 0 0 0 o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "0 0 0 0 0 0 0 0 1 1 1 1 1 i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "0 0 0 0 0 0 0 0 1 1 1 1 1 i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0", - "0 0 0 0 0 0 a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0", + "0 0 0 0 0 0 a1 a0 o o o o o o o o"; + ; - memory "calibration" - size = 1; + memory "calibration" + size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + read = "0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -13563,188 +13563,188 @@ part #------------------------------------------------------------ part - id = "m3250"; - desc = "ATMEGA3250"; - signature = 0x1E 0x95 0x06; - has_jtag = yes; + id = "m3250"; + desc = "ATMEGA3250"; + signature = 0x1E 0x95 0x06; + has_jtag = yes; # stk500_devcode = 0x??; # No STK500v1 support? # avr910_devcode = 0x??; # Try the ATmega16 one - avr910_devcode = 0x74; - pagel = 0xd7; - bs2 = 0xa0; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"; + avr910_devcode = 0x74; + pagel = 0xd7; + bs2 = 0xa0; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - allowfullpagebitstream = no; + idr = 0x31; + spmcr = 0x57; + allowfullpagebitstream = no; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 4; /* for parallel programming */ - size = 1024; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; - read = " 1 0 1 0 0 0 0 0", - " 0 0 0 0 0 0 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 4; /* for parallel programming */ + size = 1024; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; + read = " 1 0 1 0 0 0 0 0", + " 0 0 0 0 0 0 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0", - " 0 0 0 0 0 0 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0", + " 0 0 0 0 0 0 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", - " 0 0 0 0 0 0 0 0", - " 0 0 0 0 0 0 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 1 1 0 0 0 0 0 1", + " 0 0 0 0 0 0 0 0", + " 0 0 0 0 0 0 a1 a0", + " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", - " 0 0 0 0 0 0 a9 a8", - " a7 a6 a5 a4 a3 a2 0 0", - " x x x x x x x x"; + writepage = " 1 1 0 0 0 0 1 0", + " 0 0 0 0 0 0 a9 a8", + " a7 a6 a5 a4 a3 a2 0 0", + " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 4; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 4; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 32768; - page_size = 128; - num_pages = 256; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 32768; + page_size = 128; + num_pages = 256; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 0 0 0 0 0", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 0 0 0 0 0", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 0 0 0 0 0", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 0 0 0 0 0", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 128; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 128; + readsize = 256; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 0 0 0 0 0", - "0 0 0 0 0 0 0 0 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 0 0 0 0 0", + "0 0 0 0 0 0 0 0 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lfuse" - size = 1; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "0 0 0 0 0 0 0 0 o o o o o o o o"; + memory "lfuse" + size = 1; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "0 0 0 0 0 0 0 0 o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "0 0 0 0 0 0 0 0 i i i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "0 0 0 0 0 0 0 0 i i i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "0 0 0 0 0 0 0 0 o o o o o o o o"; + memory "hfuse" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "0 0 0 0 0 0 0 0 o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "0 0 0 0 0 0 0 0 i i i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "0 0 0 0 0 0 0 0 i i i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; + memory "efuse" + size = 1; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "0 0 0 0 0 0 0 0 o o o o o o o o"; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "0 0 0 0 0 0 0 0 o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "0 0 0 0 0 0 0 0 1 1 1 1 1 i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "0 0 0 0 0 0 0 0 1 1 1 1 1 i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0", - "0 0 0 0 0 0 a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0", + "0 0 0 0 0 0 a1 a0 o o o o o o o o"; + ; - memory "calibration" - size = 1; + memory "calibration" + size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + read = "0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -13752,188 +13752,188 @@ part #------------------------------------------------------------ part - id = "m6450"; - desc = "ATMEGA6450"; - signature = 0x1E 0x96 0x06; - has_jtag = yes; + id = "m6450"; + desc = "ATMEGA6450"; + signature = 0x1E 0x96 0x06; + has_jtag = yes; # stk500_devcode = 0x??; # No STK500v1 support? # avr910_devcode = 0x??; # Try the ATmega16 one - avr910_devcode = 0x74; - pagel = 0xd7; - bs2 = 0xa0; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"; + avr910_devcode = 0x74; + pagel = 0xd7; + bs2 = 0xa0; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - allowfullpagebitstream = no; + idr = 0x31; + spmcr = 0x57; + allowfullpagebitstream = no; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 8; /* for parallel programming */ - size = 2048; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; - read = " 1 0 1 0 0 0 0 0", - " 0 0 0 0 0 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 8; /* for parallel programming */ + size = 2048; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; + read = " 1 0 1 0 0 0 0 0", + " 0 0 0 0 0 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0", - " 0 0 0 0 0 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0", + " 0 0 0 0 0 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", - " 0 0 0 0 0 0 0 0", - " 0 0 0 0 0 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 1 1 0 0 0 0 0 1", + " 0 0 0 0 0 0 0 0", + " 0 0 0 0 0 a2 a1 a0", + " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", - " 0 0 0 0 0 a10 a9 a8", - " a7 a6 a5 a4 a3 0 0 0", - " x x x x x x x x"; + writepage = " 1 1 0 0 0 0 1 0", + " 0 0 0 0 0 a10 a9 a8", + " a7 a6 a5 a4 a3 0 0 0", + " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 4; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 4; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 65536; - page_size = 256; - num_pages = 256; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 65536; + page_size = 256; + num_pages = 256; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 0 0 0 0 0", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 0 0 0 0 0", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 0 0 0 0 0", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 0 0 0 0 0", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " 0 0 0 0 0 0 0 0"; + writepage = " 0 1 0 0 1 1 0 0", + " a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " 0 0 0 0 0 0 0 0"; - mode = 0x41; - delay = 10; - blocksize = 128; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 128; + readsize = 256; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 0 0 0 0 0", - "0 0 0 0 0 0 0 0 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 0 0 0 0 0", + "0 0 0 0 0 0 0 0 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lfuse" - size = 1; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "0 0 0 0 0 0 0 0 o o o o o o o o"; + memory "lfuse" + size = 1; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "0 0 0 0 0 0 0 0 o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "0 0 0 0 0 0 0 0 i i i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "0 0 0 0 0 0 0 0 i i i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "0 0 0 0 0 0 0 0 o o o o o o o o"; + memory "hfuse" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "0 0 0 0 0 0 0 0 o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "0 0 0 0 0 0 0 0 i i i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "0 0 0 0 0 0 0 0 i i i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; + memory "efuse" + size = 1; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "0 0 0 0 0 0 0 0 o o o o o o o o"; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "0 0 0 0 0 0 0 0 o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "0 0 0 0 0 0 0 0 1 1 1 1 1 i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "0 0 0 0 0 0 0 0 1 1 1 1 1 i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0", - "0 0 0 0 0 0 a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0", + "0 0 0 0 0 0 a1 a0 o o o o o o o o"; + ; - memory "calibration" - size = 1; + memory "calibration" + size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + read = "0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -13941,96 +13941,96 @@ part #------------------------------------------------------------ part - id = "x64a1"; - desc = "ATXMEGA64A1"; - signature = 0x1e 0x96 0x4e; - has_jtag = yes; - has_pdi = yes; - nvm_base = 0x01c0; + id = "x64a1"; + desc = "ATXMEGA64A1"; + signature = 0x1e 0x96 0x4e; + has_jtag = yes; + has_pdi = yes; + nvm_base = 0x01c0; - memory "eeprom" - size = 0x0800; - offset = 0x08c0000; - page_size = 0x20; - readsize = 0x100; - ; + memory "eeprom" + size = 0x0800; + offset = 0x08c0000; + page_size = 0x20; + readsize = 0x100; + ; - memory "application" - size = 0x00010000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "application" + size = 0x00010000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "apptable" - size = 0x00001000; - offset = 0x0080f000; - page_size = 0x100; - readsize = 0x100; - ; + memory "apptable" + size = 0x00001000; + offset = 0x0080f000; + page_size = 0x100; + readsize = 0x100; + ; - memory "boot" - size = 0x00001000; - offset = 0x00810000; - page_size = 0x100; - readsize = 0x100; - ; + memory "boot" + size = 0x00001000; + offset = 0x00810000; + page_size = 0x100; + readsize = 0x100; + ; - memory "flash" - size = 0x00011000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "flash" + size = 0x00011000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "prodsig" - size = 0x200; - offset = 0x8e0200; - page_size = 0x100; - readsize = 0x100; - ; + memory "prodsig" + size = 0x200; + offset = 0x8e0200; + page_size = 0x100; + readsize = 0x100; + ; - memory "usersig" - size = 0x200; - offset = 0x8e0400; - page_size = 0x100; - readsize = 0x100; - ; + memory "usersig" + size = 0x200; + offset = 0x8e0400; + page_size = 0x100; + readsize = 0x100; + ; - memory "signature" - size = 3; - offset = 0x1000090; - ; + memory "signature" + size = 3; + offset = 0x1000090; + ; - memory "fuse0" - size = 1; - offset = 0x8f0020; - ; + memory "fuse0" + size = 1; + offset = 0x8f0020; + ; - memory "fuse1" - size = 1; - offset = 0x8f0021; - ; + memory "fuse1" + size = 1; + offset = 0x8f0021; + ; - memory "fuse2" - size = 1; - offset = 0x8f0022; - ; + memory "fuse2" + size = 1; + offset = 0x8f0022; + ; - memory "fuse4" - size = 1; - offset = 0x8f0024; - ; + memory "fuse4" + size = 1; + offset = 0x8f0024; + ; - memory "fuse5" - size = 1; - offset = 0x8f0025; - ; + memory "fuse5" + size = 1; + offset = 0x8f0025; + ; - memory "lock" - size = 1; - offset = 0x8f0027; - ; + memory "lock" + size = 1; + offset = 0x8f0027; + ; ; #------------------------------------------------------------ @@ -14038,96 +14038,96 @@ part #------------------------------------------------------------ part - id = "x128a1"; - desc = "ATXMEGA128A1"; - signature = 0x1e 0x97 0x4c; - has_jtag = yes; - has_pdi = yes; - nvm_base = 0x01c0; + id = "x128a1"; + desc = "ATXMEGA128A1"; + signature = 0x1e 0x97 0x4c; + has_jtag = yes; + has_pdi = yes; + nvm_base = 0x01c0; - memory "eeprom" - size = 0x0800; - offset = 0x08c0000; - page_size = 0x20; - readsize = 0x100; - ; + memory "eeprom" + size = 0x0800; + offset = 0x08c0000; + page_size = 0x20; + readsize = 0x100; + ; - memory "application" - size = 0x00020000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "application" + size = 0x00020000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "apptable" - size = 0x00002000; - offset = 0x0081e000; - page_size = 0x100; - readsize = 0x100; - ; + memory "apptable" + size = 0x00002000; + offset = 0x0081e000; + page_size = 0x100; + readsize = 0x100; + ; - memory "boot" - size = 0x00002000; - offset = 0x00820000; - page_size = 0x100; - readsize = 0x100; - ; + memory "boot" + size = 0x00002000; + offset = 0x00820000; + page_size = 0x100; + readsize = 0x100; + ; - memory "flash" - size = 0x00022000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "flash" + size = 0x00022000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "prodsig" - size = 0x200; - offset = 0x8e0200; - page_size = 0x100; - readsize = 0x100; - ; + memory "prodsig" + size = 0x200; + offset = 0x8e0200; + page_size = 0x100; + readsize = 0x100; + ; - memory "usersig" - size = 0x200; - offset = 0x8e0400; - page_size = 0x100; - readsize = 0x100; - ; + memory "usersig" + size = 0x200; + offset = 0x8e0400; + page_size = 0x100; + readsize = 0x100; + ; - memory "signature" - size = 3; - offset = 0x1000090; - ; + memory "signature" + size = 3; + offset = 0x1000090; + ; - memory "fuse0" - size = 1; - offset = 0x8f0020; - ; + memory "fuse0" + size = 1; + offset = 0x8f0020; + ; - memory "fuse1" - size = 1; - offset = 0x8f0021; - ; + memory "fuse1" + size = 1; + offset = 0x8f0021; + ; - memory "fuse2" - size = 1; - offset = 0x8f0022; - ; + memory "fuse2" + size = 1; + offset = 0x8f0022; + ; - memory "fuse4" - size = 1; - offset = 0x8f0024; - ; + memory "fuse4" + size = 1; + offset = 0x8f0024; + ; - memory "fuse5" - size = 1; - offset = 0x8f0025; - ; + memory "fuse5" + size = 1; + offset = 0x8f0025; + ; - memory "lock" - size = 1; - offset = 0x8f0027; - ; + memory "lock" + size = 1; + offset = 0x8f0027; + ; ; #------------------------------------------------------------ @@ -14135,96 +14135,96 @@ part #------------------------------------------------------------ part - id = "x128a1d"; - desc = "ATXMEGA128A1REVD"; - signature = 0x1e 0x97 0x41; - has_jtag = yes; - has_pdi = yes; - nvm_base = 0x01c0; + id = "x128a1d"; + desc = "ATXMEGA128A1REVD"; + signature = 0x1e 0x97 0x41; + has_jtag = yes; + has_pdi = yes; + nvm_base = 0x01c0; - memory "eeprom" - size = 0x0800; - offset = 0x08c0000; - page_size = 0x20; - readsize = 0x100; - ; + memory "eeprom" + size = 0x0800; + offset = 0x08c0000; + page_size = 0x20; + readsize = 0x100; + ; - memory "application" - size = 0x00020000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "application" + size = 0x00020000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "apptable" - size = 0x00002000; - offset = 0x0081e000; - page_size = 0x100; - readsize = 0x100; - ; + memory "apptable" + size = 0x00002000; + offset = 0x0081e000; + page_size = 0x100; + readsize = 0x100; + ; - memory "boot" - size = 0x00002000; - offset = 0x00820000; - page_size = 0x100; - readsize = 0x100; - ; + memory "boot" + size = 0x00002000; + offset = 0x00820000; + page_size = 0x100; + readsize = 0x100; + ; - memory "flash" - size = 0x00022000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "flash" + size = 0x00022000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "prodsig" - size = 0x200; - offset = 0x8e0200; - page_size = 0x100; - readsize = 0x100; - ; + memory "prodsig" + size = 0x200; + offset = 0x8e0200; + page_size = 0x100; + readsize = 0x100; + ; - memory "usersig" - size = 0x200; - offset = 0x8e0400; - page_size = 0x100; - readsize = 0x100; - ; + memory "usersig" + size = 0x200; + offset = 0x8e0400; + page_size = 0x100; + readsize = 0x100; + ; - memory "signature" - size = 3; - offset = 0x1000090; - ; + memory "signature" + size = 3; + offset = 0x1000090; + ; - memory "fuse0" - size = 1; - offset = 0x8f0020; - ; + memory "fuse0" + size = 1; + offset = 0x8f0020; + ; - memory "fuse1" - size = 1; - offset = 0x8f0021; - ; + memory "fuse1" + size = 1; + offset = 0x8f0021; + ; - memory "fuse2" - size = 1; - offset = 0x8f0022; - ; + memory "fuse2" + size = 1; + offset = 0x8f0022; + ; - memory "fuse4" - size = 1; - offset = 0x8f0024; - ; + memory "fuse4" + size = 1; + offset = 0x8f0024; + ; - memory "fuse5" - size = 1; - offset = 0x8f0025; - ; + memory "fuse5" + size = 1; + offset = 0x8f0025; + ; - memory "lock" - size = 1; - offset = 0x8f0027; - ; + memory "lock" + size = 1; + offset = 0x8f0027; + ; ; #------------------------------------------------------------ @@ -14232,96 +14232,96 @@ part #------------------------------------------------------------ part - id = "x192a1"; - desc = "ATXMEGA192A1"; - signature = 0x1e 0x97 0x4e; - has_jtag = yes; - has_pdi = yes; - nvm_base = 0x01c0; + id = "x192a1"; + desc = "ATXMEGA192A1"; + signature = 0x1e 0x97 0x4e; + has_jtag = yes; + has_pdi = yes; + nvm_base = 0x01c0; - memory "eeprom" - size = 0x0800; - offset = 0x08c0000; - page_size = 0x20; - readsize = 0x100; - ; + memory "eeprom" + size = 0x0800; + offset = 0x08c0000; + page_size = 0x20; + readsize = 0x100; + ; - memory "application" - size = 0x00030000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "application" + size = 0x00030000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "apptable" - size = 0x00002000; - offset = 0x0082e000; - page_size = 0x100; - readsize = 0x100; - ; + memory "apptable" + size = 0x00002000; + offset = 0x0082e000; + page_size = 0x100; + readsize = 0x100; + ; - memory "boot" - size = 0x00002000; - offset = 0x00830000; - page_size = 0x100; - readsize = 0x100; - ; + memory "boot" + size = 0x00002000; + offset = 0x00830000; + page_size = 0x100; + readsize = 0x100; + ; - memory "flash" - size = 0x00032000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "flash" + size = 0x00032000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "prodsig" - size = 0x200; - offset = 0x8e0200; - page_size = 0x100; - readsize = 0x100; - ; + memory "prodsig" + size = 0x200; + offset = 0x8e0200; + page_size = 0x100; + readsize = 0x100; + ; - memory "usersig" - size = 0x200; - offset = 0x8e0400; - page_size = 0x100; - readsize = 0x100; - ; + memory "usersig" + size = 0x200; + offset = 0x8e0400; + page_size = 0x100; + readsize = 0x100; + ; - memory "signature" - size = 3; - offset = 0x1000090; - ; + memory "signature" + size = 3; + offset = 0x1000090; + ; - memory "fuse0" - size = 1; - offset = 0x8f0020; - ; + memory "fuse0" + size = 1; + offset = 0x8f0020; + ; - memory "fuse1" - size = 1; - offset = 0x8f0021; - ; + memory "fuse1" + size = 1; + offset = 0x8f0021; + ; - memory "fuse2" - size = 1; - offset = 0x8f0022; - ; + memory "fuse2" + size = 1; + offset = 0x8f0022; + ; - memory "fuse4" - size = 1; - offset = 0x8f0024; - ; + memory "fuse4" + size = 1; + offset = 0x8f0024; + ; - memory "fuse5" - size = 1; - offset = 0x8f0025; - ; + memory "fuse5" + size = 1; + offset = 0x8f0025; + ; - memory "lock" - size = 1; - offset = 0x8f0027; - ; + memory "lock" + size = 1; + offset = 0x8f0027; + ; ; #------------------------------------------------------------ @@ -14329,96 +14329,96 @@ part #------------------------------------------------------------ part - id = "x256a1"; - desc = "ATXMEGA256A1"; - signature = 0x1e 0x98 0x46; - has_jtag = yes; - has_pdi = yes; - nvm_base = 0x01c0; + id = "x256a1"; + desc = "ATXMEGA256A1"; + signature = 0x1e 0x98 0x46; + has_jtag = yes; + has_pdi = yes; + nvm_base = 0x01c0; - memory "eeprom" - size = 0x1000; - offset = 0x08c0000; - page_size = 0x20; - readsize = 0x100; - ; + memory "eeprom" + size = 0x1000; + offset = 0x08c0000; + page_size = 0x20; + readsize = 0x100; + ; - memory "application" - size = 0x00040000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "application" + size = 0x00040000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "apptable" - size = 0x00002000; - offset = 0x0083e000; - page_size = 0x100; - readsize = 0x100; - ; + memory "apptable" + size = 0x00002000; + offset = 0x0083e000; + page_size = 0x100; + readsize = 0x100; + ; - memory "boot" - size = 0x00002000; - offset = 0x00840000; - page_size = 0x100; - readsize = 0x100; - ; + memory "boot" + size = 0x00002000; + offset = 0x00840000; + page_size = 0x100; + readsize = 0x100; + ; - memory "flash" - size = 0x00042000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "flash" + size = 0x00042000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "prodsig" - size = 0x200; - offset = 0x8e0200; - page_size = 0x100; - readsize = 0x100; - ; + memory "prodsig" + size = 0x200; + offset = 0x8e0200; + page_size = 0x100; + readsize = 0x100; + ; - memory "usersig" - size = 0x200; - offset = 0x8e0400; - page_size = 0x100; - readsize = 0x100; - ; + memory "usersig" + size = 0x200; + offset = 0x8e0400; + page_size = 0x100; + readsize = 0x100; + ; - memory "signature" - size = 3; - offset = 0x1000090; - ; + memory "signature" + size = 3; + offset = 0x1000090; + ; - memory "fuse0" - size = 1; - offset = 0x8f0020; - ; + memory "fuse0" + size = 1; + offset = 0x8f0020; + ; - memory "fuse1" - size = 1; - offset = 0x8f0021; - ; + memory "fuse1" + size = 1; + offset = 0x8f0021; + ; - memory "fuse2" - size = 1; - offset = 0x8f0022; - ; + memory "fuse2" + size = 1; + offset = 0x8f0022; + ; - memory "fuse4" - size = 1; - offset = 0x8f0024; - ; + memory "fuse4" + size = 1; + offset = 0x8f0024; + ; - memory "fuse5" - size = 1; - offset = 0x8f0025; - ; + memory "fuse5" + size = 1; + offset = 0x8f0025; + ; - memory "lock" - size = 1; - offset = 0x8f0027; - ; + memory "lock" + size = 1; + offset = 0x8f0027; + ; ; #------------------------------------------------------------ @@ -14426,96 +14426,96 @@ part #------------------------------------------------------------ part - id = "x64a3"; - desc = "ATXMEGA64A3"; - signature = 0x1e 0x96 0x42; - has_jtag = yes; - has_pdi = yes; - nvm_base = 0x01c0; + id = "x64a3"; + desc = "ATXMEGA64A3"; + signature = 0x1e 0x96 0x42; + has_jtag = yes; + has_pdi = yes; + nvm_base = 0x01c0; - memory "eeprom" - size = 0x0800; - offset = 0x08c0000; - page_size = 0x20; - readsize = 0x100; - ; + memory "eeprom" + size = 0x0800; + offset = 0x08c0000; + page_size = 0x20; + readsize = 0x100; + ; - memory "application" - size = 0x00010000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "application" + size = 0x00010000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "apptable" - size = 0x00001000; - offset = 0x0080f000; - page_size = 0x100; - readsize = 0x100; - ; + memory "apptable" + size = 0x00001000; + offset = 0x0080f000; + page_size = 0x100; + readsize = 0x100; + ; - memory "boot" - size = 0x00001000; - offset = 0x00810000; - page_size = 0x100; - readsize = 0x100; - ; + memory "boot" + size = 0x00001000; + offset = 0x00810000; + page_size = 0x100; + readsize = 0x100; + ; - memory "flash" - size = 0x00011000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "flash" + size = 0x00011000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "prodsig" - size = 0x200; - offset = 0x8e0200; - page_size = 0x100; - readsize = 0x100; - ; + memory "prodsig" + size = 0x200; + offset = 0x8e0200; + page_size = 0x100; + readsize = 0x100; + ; - memory "usersig" - size = 0x200; - offset = 0x8e0400; - page_size = 0x100; - readsize = 0x100; - ; + memory "usersig" + size = 0x200; + offset = 0x8e0400; + page_size = 0x100; + readsize = 0x100; + ; - memory "signature" - size = 3; - offset = 0x1000090; - ; + memory "signature" + size = 3; + offset = 0x1000090; + ; - memory "fuse0" - size = 1; - offset = 0x8f0020; - ; + memory "fuse0" + size = 1; + offset = 0x8f0020; + ; - memory "fuse1" - size = 1; - offset = 0x8f0021; - ; + memory "fuse1" + size = 1; + offset = 0x8f0021; + ; - memory "fuse2" - size = 1; - offset = 0x8f0022; - ; + memory "fuse2" + size = 1; + offset = 0x8f0022; + ; - memory "fuse4" - size = 1; - offset = 0x8f0024; - ; + memory "fuse4" + size = 1; + offset = 0x8f0024; + ; - memory "fuse5" - size = 1; - offset = 0x8f0025; - ; + memory "fuse5" + size = 1; + offset = 0x8f0025; + ; - memory "lock" - size = 1; - offset = 0x8f0027; - ; + memory "lock" + size = 1; + offset = 0x8f0027; + ; ; #------------------------------------------------------------ @@ -14523,96 +14523,96 @@ part #------------------------------------------------------------ part - id = "x128a3"; - desc = "ATXMEGA128A3"; - signature = 0x1e 0x97 0x42; - has_jtag = yes; - has_pdi = yes; - nvm_base = 0x01c0; + id = "x128a3"; + desc = "ATXMEGA128A3"; + signature = 0x1e 0x97 0x42; + has_jtag = yes; + has_pdi = yes; + nvm_base = 0x01c0; - memory "eeprom" - size = 0x0800; - offset = 0x08c0000; - page_size = 0x20; - readsize = 0x100; - ; + memory "eeprom" + size = 0x0800; + offset = 0x08c0000; + page_size = 0x20; + readsize = 0x100; + ; - memory "application" - size = 0x00020000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "application" + size = 0x00020000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "apptable" - size = 0x00002000; - offset = 0x0081e000; - page_size = 0x100; - readsize = 0x100; - ; + memory "apptable" + size = 0x00002000; + offset = 0x0081e000; + page_size = 0x100; + readsize = 0x100; + ; - memory "boot" - size = 0x00002000; - offset = 0x00820000; - page_size = 0x100; - readsize = 0x100; - ; + memory "boot" + size = 0x00002000; + offset = 0x00820000; + page_size = 0x100; + readsize = 0x100; + ; - memory "flash" - size = 0x00022000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "flash" + size = 0x00022000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "prodsig" - size = 0x200; - offset = 0x8e0200; - page_size = 0x100; - readsize = 0x100; - ; + memory "prodsig" + size = 0x200; + offset = 0x8e0200; + page_size = 0x100; + readsize = 0x100; + ; - memory "usersig" - size = 0x200; - offset = 0x8e0400; - page_size = 0x100; - readsize = 0x100; - ; + memory "usersig" + size = 0x200; + offset = 0x8e0400; + page_size = 0x100; + readsize = 0x100; + ; - memory "signature" - size = 3; - offset = 0x1000090; - ; + memory "signature" + size = 3; + offset = 0x1000090; + ; - memory "fuse0" - size = 1; - offset = 0x8f0020; - ; + memory "fuse0" + size = 1; + offset = 0x8f0020; + ; - memory "fuse1" - size = 1; - offset = 0x8f0021; - ; + memory "fuse1" + size = 1; + offset = 0x8f0021; + ; - memory "fuse2" - size = 1; - offset = 0x8f0022; - ; + memory "fuse2" + size = 1; + offset = 0x8f0022; + ; - memory "fuse4" - size = 1; - offset = 0x8f0024; - ; + memory "fuse4" + size = 1; + offset = 0x8f0024; + ; - memory "fuse5" - size = 1; - offset = 0x8f0025; - ; + memory "fuse5" + size = 1; + offset = 0x8f0025; + ; - memory "lock" - size = 1; - offset = 0x8f0027; - ; + memory "lock" + size = 1; + offset = 0x8f0027; + ; ; #------------------------------------------------------------ @@ -14620,96 +14620,96 @@ part #------------------------------------------------------------ part - id = "x192a3"; - desc = "ATXMEGA192A3"; - signature = 0x1e 0x97 0x44; - has_jtag = yes; - has_pdi = yes; - nvm_base = 0x01c0; + id = "x192a3"; + desc = "ATXMEGA192A3"; + signature = 0x1e 0x97 0x44; + has_jtag = yes; + has_pdi = yes; + nvm_base = 0x01c0; - memory "eeprom" - size = 0x0800; - offset = 0x08c0000; - page_size = 0x20; - readsize = 0x100; - ; + memory "eeprom" + size = 0x0800; + offset = 0x08c0000; + page_size = 0x20; + readsize = 0x100; + ; - memory "application" - size = 0x00030000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "application" + size = 0x00030000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "apptable" - size = 0x00002000; - offset = 0x0082e000; - page_size = 0x100; - readsize = 0x100; - ; + memory "apptable" + size = 0x00002000; + offset = 0x0082e000; + page_size = 0x100; + readsize = 0x100; + ; - memory "boot" - size = 0x00002000; - offset = 0x00830000; - page_size = 0x100; - readsize = 0x100; - ; + memory "boot" + size = 0x00002000; + offset = 0x00830000; + page_size = 0x100; + readsize = 0x100; + ; - memory "flash" - size = 0x00032000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "flash" + size = 0x00032000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "prodsig" - size = 0x200; - offset = 0x8e0200; - page_size = 0x100; - readsize = 0x100; - ; + memory "prodsig" + size = 0x200; + offset = 0x8e0200; + page_size = 0x100; + readsize = 0x100; + ; - memory "usersig" - size = 0x200; - offset = 0x8e0400; - page_size = 0x100; - readsize = 0x100; - ; + memory "usersig" + size = 0x200; + offset = 0x8e0400; + page_size = 0x100; + readsize = 0x100; + ; - memory "signature" - size = 3; - offset = 0x1000090; - ; + memory "signature" + size = 3; + offset = 0x1000090; + ; - memory "fuse0" - size = 1; - offset = 0x8f0020; - ; + memory "fuse0" + size = 1; + offset = 0x8f0020; + ; - memory "fuse1" - size = 1; - offset = 0x8f0021; - ; + memory "fuse1" + size = 1; + offset = 0x8f0021; + ; - memory "fuse2" - size = 1; - offset = 0x8f0022; - ; + memory "fuse2" + size = 1; + offset = 0x8f0022; + ; - memory "fuse4" - size = 1; - offset = 0x8f0024; - ; + memory "fuse4" + size = 1; + offset = 0x8f0024; + ; - memory "fuse5" - size = 1; - offset = 0x8f0025; - ; + memory "fuse5" + size = 1; + offset = 0x8f0025; + ; - memory "lock" - size = 1; - offset = 0x8f0027; - ; + memory "lock" + size = 1; + offset = 0x8f0027; + ; ; #------------------------------------------------------------ @@ -14717,96 +14717,96 @@ part #------------------------------------------------------------ part - id = "x256a3"; - desc = "ATXMEGA256A3"; - signature = 0x1e 0x98 0x42; - has_jtag = yes; - has_pdi = yes; - nvm_base = 0x01c0; + id = "x256a3"; + desc = "ATXMEGA256A3"; + signature = 0x1e 0x98 0x42; + has_jtag = yes; + has_pdi = yes; + nvm_base = 0x01c0; - memory "eeprom" - size = 0x1000; - offset = 0x08c0000; - page_size = 0x20; - readsize = 0x100; - ; + memory "eeprom" + size = 0x1000; + offset = 0x08c0000; + page_size = 0x20; + readsize = 0x100; + ; - memory "application" - size = 0x00040000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "application" + size = 0x00040000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "apptable" - size = 0x00002000; - offset = 0x0083e000; - page_size = 0x100; - readsize = 0x100; - ; + memory "apptable" + size = 0x00002000; + offset = 0x0083e000; + page_size = 0x100; + readsize = 0x100; + ; - memory "boot" - size = 0x00002000; - offset = 0x00840000; - page_size = 0x100; - readsize = 0x100; - ; + memory "boot" + size = 0x00002000; + offset = 0x00840000; + page_size = 0x100; + readsize = 0x100; + ; - memory "flash" - size = 0x00042000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "flash" + size = 0x00042000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "prodsig" - size = 0x200; - offset = 0x8e0200; - page_size = 0x100; - readsize = 0x100; - ; + memory "prodsig" + size = 0x200; + offset = 0x8e0200; + page_size = 0x100; + readsize = 0x100; + ; - memory "usersig" - size = 0x200; - offset = 0x8e0400; - page_size = 0x100; - readsize = 0x100; - ; + memory "usersig" + size = 0x200; + offset = 0x8e0400; + page_size = 0x100; + readsize = 0x100; + ; - memory "signature" - size = 3; - offset = 0x1000090; - ; + memory "signature" + size = 3; + offset = 0x1000090; + ; - memory "fuse0" - size = 1; - offset = 0x8f0020; - ; + memory "fuse0" + size = 1; + offset = 0x8f0020; + ; - memory "fuse1" - size = 1; - offset = 0x8f0021; - ; + memory "fuse1" + size = 1; + offset = 0x8f0021; + ; - memory "fuse2" - size = 1; - offset = 0x8f0022; - ; + memory "fuse2" + size = 1; + offset = 0x8f0022; + ; - memory "fuse4" - size = 1; - offset = 0x8f0024; - ; + memory "fuse4" + size = 1; + offset = 0x8f0024; + ; - memory "fuse5" - size = 1; - offset = 0x8f0025; - ; + memory "fuse5" + size = 1; + offset = 0x8f0025; + ; - memory "lock" - size = 1; - offset = 0x8f0027; - ; + memory "lock" + size = 1; + offset = 0x8f0027; + ; ; #------------------------------------------------------------ @@ -14814,96 +14814,96 @@ part #------------------------------------------------------------ part - id = "x256a3b"; - desc = "ATXMEGA256A3B"; - signature = 0x1e 0x98 0x43; - has_jtag = yes; - has_pdi = yes; - nvm_base = 0x01c0; + id = "x256a3b"; + desc = "ATXMEGA256A3B"; + signature = 0x1e 0x98 0x43; + has_jtag = yes; + has_pdi = yes; + nvm_base = 0x01c0; - memory "eeprom" - size = 0x1000; - offset = 0x08c0000; - page_size = 0x20; - readsize = 0x100; - ; + memory "eeprom" + size = 0x1000; + offset = 0x08c0000; + page_size = 0x20; + readsize = 0x100; + ; - memory "application" - size = 0x00040000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "application" + size = 0x00040000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "apptable" - size = 0x00002000; - offset = 0x0083e000; - page_size = 0x100; - readsize = 0x100; - ; + memory "apptable" + size = 0x00002000; + offset = 0x0083e000; + page_size = 0x100; + readsize = 0x100; + ; - memory "boot" - size = 0x00002000; - offset = 0x00840000; - page_size = 0x100; - readsize = 0x100; - ; + memory "boot" + size = 0x00002000; + offset = 0x00840000; + page_size = 0x100; + readsize = 0x100; + ; - memory "flash" - size = 0x00042000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "flash" + size = 0x00042000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "prodsig" - size = 0x200; - offset = 0x8e0200; - page_size = 0x100; - readsize = 0x100; - ; + memory "prodsig" + size = 0x200; + offset = 0x8e0200; + page_size = 0x100; + readsize = 0x100; + ; - memory "usersig" - size = 0x200; - offset = 0x8e0400; - page_size = 0x100; - readsize = 0x100; - ; + memory "usersig" + size = 0x200; + offset = 0x8e0400; + page_size = 0x100; + readsize = 0x100; + ; - memory "signature" - size = 3; - offset = 0x1000090; - ; + memory "signature" + size = 3; + offset = 0x1000090; + ; - memory "fuse0" - size = 1; - offset = 0x8f0020; - ; + memory "fuse0" + size = 1; + offset = 0x8f0020; + ; - memory "fuse1" - size = 1; - offset = 0x8f0021; - ; + memory "fuse1" + size = 1; + offset = 0x8f0021; + ; - memory "fuse2" - size = 1; - offset = 0x8f0022; - ; + memory "fuse2" + size = 1; + offset = 0x8f0022; + ; - memory "fuse4" - size = 1; - offset = 0x8f0024; - ; + memory "fuse4" + size = 1; + offset = 0x8f0024; + ; - memory "fuse5" - size = 1; - offset = 0x8f0025; - ; + memory "fuse5" + size = 1; + offset = 0x8f0025; + ; - memory "lock" - size = 1; - offset = 0x8f0027; - ; + memory "lock" + size = 1; + offset = 0x8f0027; + ; ; #------------------------------------------------------------ @@ -14911,96 +14911,96 @@ part #------------------------------------------------------------ part - id = "x16a4"; - desc = "ATXMEGA16A4"; - signature = 0x1e 0x94 0x41; - has_jtag = yes; - has_pdi = yes; - nvm_base = 0x01c0; + id = "x16a4"; + desc = "ATXMEGA16A4"; + signature = 0x1e 0x94 0x41; + has_jtag = yes; + has_pdi = yes; + nvm_base = 0x01c0; - memory "eeprom" - size = 0x0400; - offset = 0x08c0000; - page_size = 0x20; - readsize = 0x100; - ; + memory "eeprom" + size = 0x0400; + offset = 0x08c0000; + page_size = 0x20; + readsize = 0x100; + ; - memory "application" - size = 0x00004000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "application" + size = 0x00004000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "apptable" - size = 0x00001000; - offset = 0x00803000; - page_size = 0x100; - readsize = 0x100; - ; + memory "apptable" + size = 0x00001000; + offset = 0x00803000; + page_size = 0x100; + readsize = 0x100; + ; - memory "boot" - size = 0x00001000; - offset = 0x00804000; - page_size = 0x100; - readsize = 0x100; - ; + memory "boot" + size = 0x00001000; + offset = 0x00804000; + page_size = 0x100; + readsize = 0x100; + ; - memory "flash" - size = 0x00005000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "flash" + size = 0x00005000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "prodsig" - size = 0x200; - offset = 0x8e0200; - page_size = 0x100; - readsize = 0x100; - ; + memory "prodsig" + size = 0x200; + offset = 0x8e0200; + page_size = 0x100; + readsize = 0x100; + ; - memory "usersig" - size = 0x200; - offset = 0x8e0400; - page_size = 0x100; - readsize = 0x100; - ; + memory "usersig" + size = 0x200; + offset = 0x8e0400; + page_size = 0x100; + readsize = 0x100; + ; - memory "signature" - size = 3; - offset = 0x1000090; - ; + memory "signature" + size = 3; + offset = 0x1000090; + ; - memory "fuse0" - size = 1; - offset = 0x8f0020; - ; + memory "fuse0" + size = 1; + offset = 0x8f0020; + ; - memory "fuse1" - size = 1; - offset = 0x8f0021; - ; + memory "fuse1" + size = 1; + offset = 0x8f0021; + ; - memory "fuse2" - size = 1; - offset = 0x8f0022; - ; + memory "fuse2" + size = 1; + offset = 0x8f0022; + ; - memory "fuse4" - size = 1; - offset = 0x8f0024; - ; + memory "fuse4" + size = 1; + offset = 0x8f0024; + ; - memory "fuse5" - size = 1; - offset = 0x8f0025; - ; + memory "fuse5" + size = 1; + offset = 0x8f0025; + ; - memory "lock" - size = 1; - offset = 0x8f0027; - ; + memory "lock" + size = 1; + offset = 0x8f0027; + ; ; #------------------------------------------------------------ @@ -15008,96 +15008,96 @@ part #------------------------------------------------------------ part - id = "x32a4"; - desc = "ATXMEGA32A4"; - signature = 0x1e 0x95 0x41; - has_jtag = yes; - has_pdi = yes; - nvm_base = 0x01c0; + id = "x32a4"; + desc = "ATXMEGA32A4"; + signature = 0x1e 0x95 0x41; + has_jtag = yes; + has_pdi = yes; + nvm_base = 0x01c0; - memory "eeprom" - size = 0x0400; - offset = 0x08c0000; - page_size = 0x20; - readsize = 0x100; - ; + memory "eeprom" + size = 0x0400; + offset = 0x08c0000; + page_size = 0x20; + readsize = 0x100; + ; - memory "application" - size = 0x00008000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "application" + size = 0x00008000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "apptable" - size = 0x00001000; - offset = 0x00807000; - page_size = 0x100; - readsize = 0x100; - ; + memory "apptable" + size = 0x00001000; + offset = 0x00807000; + page_size = 0x100; + readsize = 0x100; + ; - memory "boot" - size = 0x00001000; - offset = 0x00808000; - page_size = 0x100; - readsize = 0x100; - ; + memory "boot" + size = 0x00001000; + offset = 0x00808000; + page_size = 0x100; + readsize = 0x100; + ; - memory "flash" - size = 0x00009000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "flash" + size = 0x00009000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "prodsig" - size = 0x200; - offset = 0x8e0200; - page_size = 0x100; - readsize = 0x100; - ; + memory "prodsig" + size = 0x200; + offset = 0x8e0200; + page_size = 0x100; + readsize = 0x100; + ; - memory "usersig" - size = 0x200; - offset = 0x8e0400; - page_size = 0x100; - readsize = 0x100; - ; + memory "usersig" + size = 0x200; + offset = 0x8e0400; + page_size = 0x100; + readsize = 0x100; + ; - memory "signature" - size = 3; - offset = 0x1000090; - ; + memory "signature" + size = 3; + offset = 0x1000090; + ; - memory "fuse0" - size = 1; - offset = 0x8f0020; - ; + memory "fuse0" + size = 1; + offset = 0x8f0020; + ; - memory "fuse1" - size = 1; - offset = 0x8f0021; - ; + memory "fuse1" + size = 1; + offset = 0x8f0021; + ; - memory "fuse2" - size = 1; - offset = 0x8f0022; - ; + memory "fuse2" + size = 1; + offset = 0x8f0022; + ; - memory "fuse4" - size = 1; - offset = 0x8f0024; - ; + memory "fuse4" + size = 1; + offset = 0x8f0024; + ; - memory "fuse5" - size = 1; - offset = 0x8f0025; - ; + memory "fuse5" + size = 1; + offset = 0x8f0025; + ; - memory "lock" - size = 1; - offset = 0x8f0027; - ; + memory "lock" + size = 1; + offset = 0x8f0027; + ; ; #------------------------------------------------------------ @@ -15105,96 +15105,96 @@ part #------------------------------------------------------------ part - id = "x64a4"; - desc = "ATXMEGA64A4"; - signature = 0x1e 0x96 0x46; - has_jtag = yes; - has_pdi = yes; - nvm_base = 0x01c0; + id = "x64a4"; + desc = "ATXMEGA64A4"; + signature = 0x1e 0x96 0x46; + has_jtag = yes; + has_pdi = yes; + nvm_base = 0x01c0; - memory "eeprom" - size = 0x0800; - offset = 0x08c0000; - page_size = 0x20; - readsize = 0x100; - ; + memory "eeprom" + size = 0x0800; + offset = 0x08c0000; + page_size = 0x20; + readsize = 0x100; + ; - memory "application" - size = 0x00010000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "application" + size = 0x00010000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "apptable" - size = 0x00001000; - offset = 0x0080f000; - page_size = 0x100; - readsize = 0x100; - ; + memory "apptable" + size = 0x00001000; + offset = 0x0080f000; + page_size = 0x100; + readsize = 0x100; + ; - memory "boot" - size = 0x00001000; - offset = 0x00810000; - page_size = 0x100; - readsize = 0x100; - ; + memory "boot" + size = 0x00001000; + offset = 0x00810000; + page_size = 0x100; + readsize = 0x100; + ; - memory "flash" - size = 0x00011000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "flash" + size = 0x00011000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "prodsig" - size = 0x200; - offset = 0x8e0200; - page_size = 0x100; - readsize = 0x100; - ; + memory "prodsig" + size = 0x200; + offset = 0x8e0200; + page_size = 0x100; + readsize = 0x100; + ; - memory "usersig" - size = 0x200; - offset = 0x8e0400; - page_size = 0x100; - readsize = 0x100; - ; + memory "usersig" + size = 0x200; + offset = 0x8e0400; + page_size = 0x100; + readsize = 0x100; + ; - memory "signature" - size = 3; - offset = 0x1000090; - ; + memory "signature" + size = 3; + offset = 0x1000090; + ; - memory "fuse0" - size = 1; - offset = 0x8f0020; - ; + memory "fuse0" + size = 1; + offset = 0x8f0020; + ; - memory "fuse1" - size = 1; - offset = 0x8f0021; - ; + memory "fuse1" + size = 1; + offset = 0x8f0021; + ; - memory "fuse2" - size = 1; - offset = 0x8f0022; - ; + memory "fuse2" + size = 1; + offset = 0x8f0022; + ; - memory "fuse4" - size = 1; - offset = 0x8f0024; - ; + memory "fuse4" + size = 1; + offset = 0x8f0024; + ; - memory "fuse5" - size = 1; - offset = 0x8f0025; - ; + memory "fuse5" + size = 1; + offset = 0x8f0025; + ; - memory "lock" - size = 1; - offset = 0x8f0027; - ; + memory "lock" + size = 1; + offset = 0x8f0027; + ; ; #------------------------------------------------------------ @@ -15202,96 +15202,96 @@ part #------------------------------------------------------------ part - id = "x128a4"; - desc = "ATXMEGA128A4"; - signature = 0x1e 0x97 0x46; - has_jtag = yes; - has_pdi = yes; - nvm_base = 0x01c0; + id = "x128a4"; + desc = "ATXMEGA128A4"; + signature = 0x1e 0x97 0x46; + has_jtag = yes; + has_pdi = yes; + nvm_base = 0x01c0; - memory "eeprom" - size = 0x0800; - offset = 0x08c0000; - page_size = 0x20; - readsize = 0x100; - ; + memory "eeprom" + size = 0x0800; + offset = 0x08c0000; + page_size = 0x20; + readsize = 0x100; + ; - memory "application" - size = 0x00020000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "application" + size = 0x00020000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "apptable" - size = 0x00002000; - offset = 0x0081e000; - page_size = 0x100; - readsize = 0x100; - ; + memory "apptable" + size = 0x00002000; + offset = 0x0081e000; + page_size = 0x100; + readsize = 0x100; + ; - memory "boot" - size = 0x00002000; - offset = 0x00820000; - page_size = 0x100; - readsize = 0x100; - ; + memory "boot" + size = 0x00002000; + offset = 0x00820000; + page_size = 0x100; + readsize = 0x100; + ; - memory "flash" - size = 0x00022000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "flash" + size = 0x00022000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "prodsig" - size = 0x200; - offset = 0x8e0200; - page_size = 0x100; - readsize = 0x100; - ; + memory "prodsig" + size = 0x200; + offset = 0x8e0200; + page_size = 0x100; + readsize = 0x100; + ; - memory "usersig" - size = 0x200; - offset = 0x8e0400; - page_size = 0x100; - readsize = 0x100; - ; + memory "usersig" + size = 0x200; + offset = 0x8e0400; + page_size = 0x100; + readsize = 0x100; + ; - memory "signature" - size = 3; - offset = 0x1000090; - ; + memory "signature" + size = 3; + offset = 0x1000090; + ; - memory "fuse0" - size = 1; - offset = 0x8f0020; - ; + memory "fuse0" + size = 1; + offset = 0x8f0020; + ; - memory "fuse1" - size = 1; - offset = 0x8f0021; - ; + memory "fuse1" + size = 1; + offset = 0x8f0021; + ; - memory "fuse2" - size = 1; - offset = 0x8f0022; - ; + memory "fuse2" + size = 1; + offset = 0x8f0022; + ; - memory "fuse4" - size = 1; - offset = 0x8f0024; - ; + memory "fuse4" + size = 1; + offset = 0x8f0024; + ; - memory "fuse5" - size = 1; - offset = 0x8f0025; - ; + memory "fuse5" + size = 1; + offset = 0x8f0025; + ; - memory "lock" - size = 1; - offset = 0x8f0027; - ; + memory "lock" + size = 1; + offset = 0x8f0027; + ; ; @@ -15300,20 +15300,20 @@ part #------------------------------------------------------------ part - id = "ucr2"; - desc = "32UC3A0512"; - signature = 0xED 0xC0 0x3F; - has_jtag = yes; - is_avr32 = yes; + id = "ucr2"; + desc = "32UC3A0512"; + signature = 0xED 0xC0 0x3F; + has_jtag = yes; + is_avr32 = yes; - memory "flash" - paged = yes; - page_size = 512; # bytes - readsize = 512; # bytes - num_pages = 1024; # could be set dynamicly - size = 0x00080000; # could be set dynamicly - offset = 0x80000000; - ; + memory "flash" + paged = yes; + page_size = 512; # bytes + readsize = 512; # bytes + num_pages = 1024; # could be set dynamicly + size = 0x00080000; # could be set dynamicly + offset = 0x80000000; + ; ; #------------------------------------------------------------ @@ -15321,38 +15321,38 @@ part #------------------------------------------------------------ part - id = "t4"; - desc = "ATtiny4"; - signature = 0x1e 0x8f 0x0a; - has_tpi = yes; + id = "t4"; + desc = "ATtiny4"; + signature = 0x1e 0x8f 0x0a; + has_tpi = yes; - memory "flash" - size = 512; - offset = 0x4000; - page_size = 16; - blocksize = 128; - ; + memory "flash" + size = 512; + offset = 0x4000; + page_size = 16; + blocksize = 128; + ; - memory "signature" - size = 3; - offset = 0x3fc0; - ; + memory "signature" + size = 3; + offset = 0x3fc0; + ; - memory "fuse" - size = 1; - offset = 0x3f40; - blocksize = 4; - ; + memory "fuse" + size = 1; + offset = 0x3f40; + blocksize = 4; + ; - memory "calibration" - size = 1; - offset = 0x3f80; - ; + memory "calibration" + size = 1; + offset = 0x3f80; + ; - memory "lockbits" - size = 1; - offset = 0x3f00; - ; + memory "lockbits" + size = 1; + offset = 0x3f00; + ; ; @@ -15361,38 +15361,38 @@ part #------------------------------------------------------------ part - id = "t5"; - desc = "ATtiny5"; - signature = 0x1e 0x8f 0x09; - has_tpi = yes; + id = "t5"; + desc = "ATtiny5"; + signature = 0x1e 0x8f 0x09; + has_tpi = yes; - memory "flash" - size = 512; - offset = 0x4000; - page_size = 16; - blocksize = 128; - ; + memory "flash" + size = 512; + offset = 0x4000; + page_size = 16; + blocksize = 128; + ; - memory "signature" - size = 3; - offset = 0x3fc0; - ; + memory "signature" + size = 3; + offset = 0x3fc0; + ; - memory "fuse" - size = 1; - offset = 0x3f40; - blocksize = 4; - ; + memory "fuse" + size = 1; + offset = 0x3f40; + blocksize = 4; + ; - memory "calibration" - size = 1; - offset = 0x3f80; - ; + memory "calibration" + size = 1; + offset = 0x3f80; + ; - memory "lockbits" - size = 1; - offset = 0x3f00; - ; + memory "lockbits" + size = 1; + offset = 0x3f00; + ; ; @@ -15401,38 +15401,38 @@ part #------------------------------------------------------------ part - id = "t8"; - desc = "ATtiny9"; - signature = 0x1e 0x90 0x08; - has_tpi = yes; + id = "t8"; + desc = "ATtiny9"; + signature = 0x1e 0x90 0x08; + has_tpi = yes; - memory "flash" - size = 1024; - offset = 0x4000; - page_size = 16; - blocksize = 128; - ; + memory "flash" + size = 1024; + offset = 0x4000; + page_size = 16; + blocksize = 128; + ; - memory "signature" - size = 3; - offset = 0x3fc0; - ; + memory "signature" + size = 3; + offset = 0x3fc0; + ; - memory "fuse" - size = 1; - offset = 0x3f40; - blocksize = 4; - ; + memory "fuse" + size = 1; + offset = 0x3f40; + blocksize = 4; + ; - memory "calibration" - size = 1; - offset = 0x3f80; - ; + memory "calibration" + size = 1; + offset = 0x3f80; + ; - memory "lockbits" - size = 1; - offset = 0x3f00; - ; + memory "lockbits" + size = 1; + offset = 0x3f00; + ; ; @@ -15441,38 +15441,38 @@ part #------------------------------------------------------------ part - id = "t10"; - desc = "ATtiny10"; - signature = 0x1e 0x90 0x03; - has_tpi = yes; + id = "t10"; + desc = "ATtiny10"; + signature = 0x1e 0x90 0x03; + has_tpi = yes; - memory "flash" - size = 1024; - offset = 0x4000; - page_size = 16; - blocksize = 128; - ; + memory "flash" + size = 1024; + offset = 0x4000; + page_size = 16; + blocksize = 128; + ; - memory "signature" - size = 3; - offset = 0x3fc0; - ; + memory "signature" + size = 3; + offset = 0x3fc0; + ; - memory "fuse" - size = 1; - offset = 0x3f40; - blocksize = 4; - ; + memory "fuse" + size = 1; + offset = 0x3f40; + blocksize = 4; + ; - memory "calibration" - size = 1; - offset = 0x3f80; - ; + memory "calibration" + size = 1; + offset = 0x3f80; + ; - memory "lockbits" - size = 1; - offset = 0x3f00; - ; + memory "lockbits" + size = 1; + offset = 0x3f00; + ; ; diff --git a/buildroot/share/vscode/avrdude_macOS.conf b/buildroot/share/vscode/avrdude_macOS.conf index 6147a2259a..c3235eed2b 100644 --- a/buildroot/share/vscode/avrdude_macOS.conf +++ b/buildroot/share/vscode/avrdude_macOS.conf @@ -240,8 +240,8 @@ #define AT86RF401 0xD0 #define AT89START 0xE0 -#define AT89S51 0xE0 -#define AT89S52 0xE1 +#define AT89S51 0xE0 +#define AT89S52 0xE1 # The following table lists the devices in the original AVR910 # appnote: @@ -293,15 +293,15 @@ # in the Internet. These add the following codes (only devices that # actually exist are listed): -# ATmega8515 0x3A -# ATmega128 0x43 -# ATmega64 0x45 -# ATtiny26 0x5E -# ATmega8535 0x69 -# ATmega32 0x72 -# ATmega16 0x74 -# ATmega8 0x76 -# ATmega169 0x78 +# ATmega8515 0x3A +# ATmega128 0x43 +# ATmega64 0x45 +# ATtiny26 0x5E +# ATmega8535 0x69 +# ATmega32 0x72 +# ATmega16 0x74 +# ATmega8 0x76 +# ATmega169 0x78 # # Overall avrdude defaults @@ -688,63 +688,63 @@ programmer # This is an HVSP-only device. part - id = "t11"; - desc = "ATtiny11"; - stk500_devcode = 0x11; - signature = 0x1e 0x90 0x04; - chip_erase_delay = 20000; + id = "t11"; + desc = "ATtiny11"; + stk500_devcode = 0x11; + signature = 0x1e 0x90 0x04; + chip_erase_delay = 20000; - timeout = 200; - hvsp_controlstack = - 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x00, - 0x68, 0x78, 0x68, 0x68, 0x00, 0x00, 0x68, 0x78, - 0x78, 0x00, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10, - 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - hvspcmdexedelay = 0; - synchcycles = 6; - latchcycles = 1; - togglevtg = 1; - poweroffdelay = 25; - resetdelayms = 0; - resetdelayus = 50; - hvleavestabdelay = 100; - resetdelay = 25; - chiperasepolltimeout = 40; - chiperasetime = 0; - programfusepolltimeout = 25; - programlockpolltimeout = 25; + timeout = 200; + hvsp_controlstack = + 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x00, + 0x68, 0x78, 0x68, 0x68, 0x00, 0x00, 0x68, 0x78, + 0x78, 0x00, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10, + 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + hvspcmdexedelay = 0; + synchcycles = 6; + latchcycles = 1; + togglevtg = 1; + poweroffdelay = 25; + resetdelayms = 0; + resetdelayus = 50; + hvleavestabdelay = 100; + resetdelay = 25; + chiperasepolltimeout = 40; + chiperasetime = 0; + programfusepolltimeout = 25; + programlockpolltimeout = 25; - memory "eeprom" - size = 64; - blocksize = 64; - readsize = 256; - delay = 5; - ; + memory "eeprom" + size = 64; + blocksize = 64; + readsize = 256; + delay = 5; + ; - memory "flash" - size = 1024; - blocksize = 128; - readsize = 256; - delay = 3; - ; + memory "flash" + size = 1024; + blocksize = 128; + readsize = 256; + delay = 3; + ; - memory "signature" - size = 3; - ; + memory "signature" + size = 3; + ; - memory "lock" - size = 1; - ; + memory "lock" + size = 1; + ; - memory "calibration" - size = 1; - ; + memory "calibration" + size = 1; + ; - memory "fuse" - size = 1; - ; + memory "fuse" + size = 1; + ; ; #------------------------------------------------------------ @@ -752,132 +752,132 @@ part #------------------------------------------------------------ part - id = "t12"; - desc = "ATtiny12"; - stk500_devcode = 0x12; - avr910_devcode = 0x55; - signature = 0x1e 0x90 0x05; - chip_erase_delay = 20000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "t12"; + desc = "ATtiny12"; + stk500_devcode = 0x12; + avr910_devcode = 0x55; + signature = 0x1e 0x90 0x05; + chip_erase_delay = 20000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - hvsp_controlstack = - 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x00, - 0x68, 0x78, 0x68, 0x68, 0x00, 0x00, 0x68, 0x78, - 0x78, 0x00, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10, - 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00; - hventerstabdelay = 100; - hvspcmdexedelay = 0; - synchcycles = 6; - latchcycles = 1; - togglevtg = 1; - poweroffdelay = 25; - resetdelayms = 0; - resetdelayus = 50; - hvleavestabdelay = 100; - resetdelay = 25; - chiperasepolltimeout = 40; - chiperasetime = 0; - programfusepolltimeout = 25; - programlockpolltimeout = 25; + hvsp_controlstack = + 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x00, + 0x68, 0x78, 0x68, 0x68, 0x00, 0x00, 0x68, 0x78, + 0x78, 0x00, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10, + 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00; + hventerstabdelay = 100; + hvspcmdexedelay = 0; + synchcycles = 6; + latchcycles = 1; + togglevtg = 1; + poweroffdelay = 25; + resetdelayms = 0; + resetdelayus = 50; + hvleavestabdelay = 100; + resetdelay = 25; + chiperasepolltimeout = 40; + chiperasetime = 0; + programfusepolltimeout = 25; + programlockpolltimeout = 25; - memory "eeprom" - size = 64; - min_write_delay = 9000; - max_write_delay = 20000; - readback_p1 = 0xff; - readback_p2 = 0xff; - read = "1 0 1 0 0 0 0 0 x x x x x x x x", - "x x a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 64; + min_write_delay = 9000; + max_write_delay = 20000; + readback_p1 = 0xff; + readback_p2 = 0xff; + read = "1 0 1 0 0 0 0 0 x x x x x x x x", + "x x a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = "1 1 0 0 0 0 0 0 x x x x x x x x", - "x x a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = "1 1 0 0 0 0 0 0 x x x x x x x x", + "x x a5 a4 a3 a2 a1 a0 i i i i i i i i"; - mode = 0x04; - delay = 8; - blocksize = 64; - readsize = 256; - ; + mode = 0x04; + delay = 8; + blocksize = 64; + readsize = 256; + ; - memory "flash" - size = 1024; - min_write_delay = 4500; - max_write_delay = 20000; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " x x x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + size = 1024; + min_write_delay = 4500; + max_write_delay = 20000; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " x x x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " x x x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " x x x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - write_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - mode = 0x04; - delay = 5; - blocksize = 128; - readsize = 256; - ; + mode = 0x04; + delay = 5; + blocksize = 128; + readsize = 256; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 a1 a0 o o o o o o o o"; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 x x x x x x x x", - "x x x x x x x x x x x x x o o x"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 x x x x x x x x", + "x x x x x x x x x x x x x o o x"; - write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1", - "x x x x x x x x x x x x x x x x"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1", + "x x x x x x x x x x x x x x x x"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; - memory "fuse" - size = 1; - read = "0 1 0 1 0 0 0 0 x x x x x x x x", - "x x x x x x x x o o o o o o o o"; + memory "fuse" + size = 1; + read = "0 1 0 1 0 0 0 0 x x x x x x x x", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 x x x x x", - "x x x x x x x x i i i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 x x x x x", + "x x x x x x x x i i i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; ; #------------------------------------------------------------ @@ -885,170 +885,170 @@ part #------------------------------------------------------------ part - id = "t13"; - desc = "ATtiny13"; - has_debugwire = yes; - flash_instr = 0xB4, 0x0E, 0x1E; - eeprom_instr = 0xBB, 0xFE, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, - 0xBC, 0x0E, 0xB4, 0x0E, 0xBA, 0x0D, 0xBB, 0xBC, - 0x99, 0xE1, 0xBB, 0xAC; - stk500_devcode = 0x14; - signature = 0x1e 0x90 0x07; - chip_erase_delay = 4000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "t13"; + desc = "ATtiny13"; + has_debugwire = yes; + flash_instr = 0xB4, 0x0E, 0x1E; + eeprom_instr = 0xBB, 0xFE, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, + 0xBC, 0x0E, 0xB4, 0x0E, 0xBA, 0x0D, 0xBB, 0xBC, + 0x99, 0xE1, 0xBB, 0xAC; + stk500_devcode = 0x14; + signature = 0x1e 0x90 0x07; + chip_erase_delay = 4000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - hvsp_controlstack = + hvsp_controlstack = 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66, - 0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78, - 0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10, - 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - hvspcmdexedelay = 0; - synchcycles = 6; - latchcycles = 1; - togglevtg = 1; - poweroffdelay = 25; - resetdelayms = 0; - resetdelayus = 90; - hvleavestabdelay = 100; - resetdelay = 25; - chiperasepolltimeout = 40; - chiperasetime = 0; - programfusepolltimeout = 25; - programlockpolltimeout = 25; + 0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78, + 0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10, + 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + hvspcmdexedelay = 0; + synchcycles = 6; + latchcycles = 1; + togglevtg = 1; + poweroffdelay = 25; + resetdelayms = 0; + resetdelayus = 90; + hvleavestabdelay = 100; + resetdelay = 25; + chiperasepolltimeout = 40; + chiperasetime = 0; + programfusepolltimeout = 25; + programlockpolltimeout = 25; - memory "eeprom" - size = 64; - page_size = 4; - min_write_delay = 4000; - max_write_delay = 4000; - readback_p1 = 0xff; - readback_p2 = 0xff; - read = "1 0 1 0 0 0 0 0 0 0 0 x x x x x", - "x x a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 64; + page_size = 4; + min_write_delay = 4000; + max_write_delay = 4000; + readback_p1 = 0xff; + readback_p2 = 0xff; + read = "1 0 1 0 0 0 0 0 0 0 0 x x x x x", + "x x a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = "1 1 0 0 0 0 0 0 0 0 0 x x x x x", - "x x a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = "1 1 0 0 0 0 0 0 0 0 0 x x x x x", + "x x a5 a4 a3 a2 a1 a0 i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x x x", " x x a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 5; - blocksize = 4; - readsize = 256; - ; + mode = 0x41; + delay = 5; + blocksize = 4; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 1024; - page_size = 32; - num_pages = 32; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 0 0 0 0 0 0 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 1024; + page_size = 32; + num_pages = 32; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 0 0 0 0 0 0 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 0 0 0 0 0 0 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 0 0 0 0 0 0 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 x x x x x", - " x x x x a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 x x x x x", + " x x x x a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 x x x x x", - " x x x x a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 x x x x x", + " x x x x a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 0 0 0 0 0 0 a8", - " a7 a6 a5 a4 x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 0 0 0 0 0 0 a8", + " a7 a6 a5 a4 x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 32; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 32; + readsize = 256; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; - memory "lock" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; + memory "lock" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + ; - memory "calibration" - size = 2; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 a0 o o o o o o o o"; - ; + memory "calibration" + size = 2; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 a0 o o o o o o o o"; + ; - memory "lfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; + memory "lfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + ; - memory "hfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; + memory "hfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + ; ; @@ -1058,132 +1058,132 @@ part #------------------------------------------------------------ part - id = "t15"; - desc = "ATtiny15"; - stk500_devcode = 0x13; - avr910_devcode = 0x56; - signature = 0x1e 0x90 0x06; - chip_erase_delay = 8200; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "t15"; + desc = "ATtiny15"; + stk500_devcode = 0x13; + avr910_devcode = 0x56; + signature = 0x1e 0x90 0x06; + chip_erase_delay = 8200; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - hvsp_controlstack = - 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x00, - 0x68, 0x78, 0x68, 0x68, 0x00, 0x00, 0x68, 0x78, - 0x78, 0x00, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10, - 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00; - hventerstabdelay = 100; - hvspcmdexedelay = 5; - synchcycles = 6; - latchcycles = 16; - togglevtg = 1; - poweroffdelay = 25; - resetdelayms = 0; - resetdelayus = 50; - hvleavestabdelay = 100; - resetdelay = 25; - chiperasepolltimeout = 40; - chiperasetime = 0; - programfusepolltimeout = 25; - programlockpolltimeout = 25; + hvsp_controlstack = + 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x00, + 0x68, 0x78, 0x68, 0x68, 0x00, 0x00, 0x68, 0x78, + 0x78, 0x00, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10, + 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00; + hventerstabdelay = 100; + hvspcmdexedelay = 5; + synchcycles = 6; + latchcycles = 16; + togglevtg = 1; + poweroffdelay = 25; + resetdelayms = 0; + resetdelayus = 50; + hvleavestabdelay = 100; + resetdelay = 25; + chiperasepolltimeout = 40; + chiperasetime = 0; + programfusepolltimeout = 25; + programlockpolltimeout = 25; - memory "eeprom" - size = 64; - min_write_delay = 8200; - max_write_delay = 8200; - readback_p1 = 0xff; - readback_p2 = 0xff; - read = "1 0 1 0 0 0 0 0 x x x x x x x x", - "x x a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 64; + min_write_delay = 8200; + max_write_delay = 8200; + readback_p1 = 0xff; + readback_p2 = 0xff; + read = "1 0 1 0 0 0 0 0 x x x x x x x x", + "x x a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = "1 1 0 0 0 0 0 0 x x x x x x x x", - "x x a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = "1 1 0 0 0 0 0 0 x x x x x x x x", + "x x a5 a4 a3 a2 a1 a0 i i i i i i i i"; - mode = 0x04; - delay = 10; - blocksize = 64; - readsize = 256; - ; + mode = 0x04; + delay = 10; + blocksize = 64; + readsize = 256; + ; - memory "flash" - size = 1024; - min_write_delay = 4100; - max_write_delay = 4100; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " x x x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + size = 1024; + min_write_delay = 4100; + max_write_delay = 4100; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " x x x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " x x x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " x x x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - write_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - mode = 0x04; - delay = 5; - blocksize = 128; - readsize = 256; - ; + mode = 0x04; + delay = 5; + blocksize = 128; + readsize = 256; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 a1 a0 o o o o o o o o"; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 x x x x x x x x", - "x x x x x x x x x x x x x o o x"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 x x x x x x x x", + "x x x x x x x x x x x x x o o x"; - write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1", - "x x x x x x x x x x x x x x x x"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1", + "x x x x x x x x x x x x x x x x"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; - memory "fuse" - size = 1; - read = "0 1 0 1 0 0 0 0 x x x x x x x x", - "x x x x x x x x o o o o x x o o"; + memory "fuse" + size = 1; + read = "0 1 0 1 0 0 0 0 x x x x x x x x", + "x x x x x x x x o o o o x x o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 x x x x x", - "x x x x x x x x i i i i 1 1 i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 x x x x x", + "x x x x x x x x i i i i 1 1 i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; ; #------------------------------------------------------------ @@ -1191,114 +1191,114 @@ part #------------------------------------------------------------ part - id = "1200"; - desc = "AT90S1200"; - stk500_devcode = 0x33; - avr910_devcode = 0x13; - signature = 0x1e 0x90 0x01; - pagel = 0xd7; - bs2 = 0xa0; - chip_erase_delay = 20000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "1200"; + desc = "AT90S1200"; + stk500_devcode = 0x33; + avr910_devcode = 0x13; + signature = 0x1e 0x90 0x01; + pagel = 0xd7; + bs2 = 0xa0; + chip_erase_delay = 20000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 1; - bytedelay = 0; - pollindex = 0; - pollvalue = 0xFF; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 1; + bytedelay = 0; + pollindex = 0; + pollvalue = 0xFF; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 0; - togglevtg = 0; - poweroffdelay = 0; - resetdelayms = 0; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 15; - chiperasepolltimeout = 0; - programfusepulsewidth = 2; - programfusepolltimeout = 0; - programlockpulsewidth = 0; - programlockpolltimeout = 1; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 0; + togglevtg = 0; + poweroffdelay = 0; + resetdelayms = 0; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 15; + chiperasepolltimeout = 0; + programfusepulsewidth = 2; + programfusepolltimeout = 0; + programlockpulsewidth = 0; + programlockpolltimeout = 1; - memory "eeprom" - size = 64; - min_write_delay = 4000; - max_write_delay = 9000; - readback_p1 = 0x00; - readback_p2 = 0xff; - read = "1 0 1 0 0 0 0 0 x x x x x x x x", - "x x a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 64; + min_write_delay = 4000; + max_write_delay = 9000; + readback_p1 = 0x00; + readback_p2 = 0xff; + read = "1 0 1 0 0 0 0 0 x x x x x x x x", + "x x a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = "1 1 0 0 0 0 0 0 x x x x x x x x", - "x x a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = "1 1 0 0 0 0 0 0 x x x x x x x x", + "x x a5 a4 a3 a2 a1 a0 i i i i i i i i"; - mode = 0x04; - delay = 20; - blocksize = 32; - readsize = 256; - ; - memory "flash" - size = 1024; - min_write_delay = 4000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " x x x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x04; + delay = 20; + blocksize = 32; + readsize = 256; + ; + memory "flash" + size = 1024; + min_write_delay = 4000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " x x x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " x x x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " x x x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - write_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - mode = 0x02; - delay = 15; - blocksize = 128; - readsize = 256; - ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; - memory "fuse" - size = 1; - ; - memory "lock" - size = 1; - min_write_delay = 9000; - max_write_delay = 20000; - write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1", - "x x x x x x x x x x x x x x x x"; - ; + mode = 0x02; + delay = 15; + blocksize = 128; + readsize = 256; + ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; + memory "fuse" + size = 1; + ; + memory "lock" + size = 1; + min_write_delay = 9000; + max_write_delay = 20000; + write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1", + "x x x x x x x x x x x x x x x x"; + ; ; #------------------------------------------------------------ @@ -1306,112 +1306,112 @@ part #------------------------------------------------------------ part - id = "4414"; - desc = "AT90S4414"; - stk500_devcode = 0x50; - avr910_devcode = 0x28; - signature = 0x1e 0x92 0x01; - chip_erase_delay = 20000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "4414"; + desc = "AT90S4414"; + stk500_devcode = 0x50; + avr910_devcode = 0x28; + signature = 0x1e 0x92 0x01; + chip_erase_delay = 20000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 0; - togglevtg = 0; - poweroffdelay = 0; - resetdelayms = 0; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 15; - chiperasepolltimeout = 0; - programfusepulsewidth = 2; - programfusepolltimeout = 0; - programlockpulsewidth = 0; - programlockpolltimeout = 1; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 0; + togglevtg = 0; + poweroffdelay = 0; + resetdelayms = 0; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 15; + chiperasepolltimeout = 0; + programfusepulsewidth = 2; + programfusepolltimeout = 0; + programlockpulsewidth = 0; + programlockpolltimeout = 1; - memory "eeprom" - size = 256; - min_write_delay = 9000; - max_write_delay = 20000; - readback_p1 = 0x80; - readback_p2 = 0x7f; - read = " 1 0 1 0 0 0 0 0 x x x x x x x a8", - "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 256; + min_write_delay = 9000; + max_write_delay = 20000; + readback_p1 = 0x80; + readback_p2 = 0x7f; + read = " 1 0 1 0 0 0 0 0 x x x x x x x a8", + "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0 x x x x x x x a8", - "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0 x x x x x x x a8", + "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; - mode = 0x04; - delay = 12; - blocksize = 64; - readsize = 256; - ; - memory "flash" - size = 4096; - min_write_delay = 9000; - max_write_delay = 20000; - readback_p1 = 0x7f; - readback_p2 = 0x7f; - read_lo = " 0 0 1 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x04; + delay = 12; + blocksize = 64; + readsize = 256; + ; + memory "flash" + size = 4096; + min_write_delay = 9000; + max_write_delay = 20000; + readback_p1 = 0x7f; + readback_p2 = 0x7f; + read_lo = " 0 0 1 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write_lo = " 0 1 0 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write_lo = " 0 1 0 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - write_hi = " 0 1 0 0 1 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write_hi = " 0 1 0 0 1 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - mode = 0x04; - delay = 12; - blocksize = 64; - readsize = 256; - ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; - memory "fuse" - size = 1; - ; - memory "lock" - size = 1; - write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1", + mode = 0x04; + delay = 12; + blocksize = 64; + readsize = 256; + ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; + memory "fuse" + size = 1; + ; + memory "lock" + size = 1; + write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1", "x x x x x x x x x x x x x x x x"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + min_write_delay = 9000; + max_write_delay = 9000; + ; ; #------------------------------------------------------------ @@ -1419,112 +1419,112 @@ part #------------------------------------------------------------ part - id = "2313"; - desc = "AT90S2313"; - stk500_devcode = 0x40; - avr910_devcode = 0x20; - signature = 0x1e 0x91 0x01; - chip_erase_delay = 20000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "2313"; + desc = "AT90S2313"; + stk500_devcode = 0x40; + avr910_devcode = 0x20; + signature = 0x1e 0x91 0x01; + chip_erase_delay = 20000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 0; - togglevtg = 0; - poweroffdelay = 0; - resetdelayms = 0; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 15; - chiperasepolltimeout = 0; - programfusepulsewidth = 2; - programfusepolltimeout = 0; - programlockpulsewidth = 0; - programlockpolltimeout = 1; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 0; + togglevtg = 0; + poweroffdelay = 0; + resetdelayms = 0; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 15; + chiperasepolltimeout = 0; + programfusepulsewidth = 2; + programfusepolltimeout = 0; + programlockpulsewidth = 0; + programlockpolltimeout = 1; - memory "eeprom" - size = 128; - min_write_delay = 4000; - max_write_delay = 9000; - readback_p1 = 0x80; - readback_p2 = 0x7f; - read = "1 0 1 0 0 0 0 0 x x x x x x x x", - "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 128; + min_write_delay = 4000; + max_write_delay = 9000; + readback_p1 = 0x80; + readback_p2 = 0x7f; + read = "1 0 1 0 0 0 0 0 x x x x x x x x", + "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = "1 1 0 0 0 0 0 0 x x x x x x x x", - "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = "1 1 0 0 0 0 0 0 x x x x x x x x", + "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; - mode = 0x04; - delay = 12; - blocksize = 64; - readsize = 256; - ; - memory "flash" - size = 2048; - min_write_delay = 4000; - max_write_delay = 9000; - readback_p1 = 0x7f; - readback_p2 = 0x7f; - read_lo = " 0 0 1 0 0 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x04; + delay = 12; + blocksize = 64; + readsize = 256; + ; + memory "flash" + size = 2048; + min_write_delay = 4000; + max_write_delay = 9000; + readback_p1 = 0x7f; + readback_p2 = 0x7f; + read_lo = " 0 0 1 0 0 0 0 0", + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - write_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - mode = 0x04; - delay = 12; - blocksize = 128; - readsize = 256; - ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; - memory "fuse" - size = 1; - ; - memory "lock" - size = 1; - write = "1 0 1 0 1 1 0 0 1 1 1 x x i i x", - "x x x x x x x x x x x x x x x x"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + mode = 0x04; + delay = 12; + blocksize = 128; + readsize = 256; + ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; + memory "fuse" + size = 1; + ; + memory "lock" + size = 1; + write = "1 0 1 0 1 1 0 0 1 1 1 x x i i x", + "x x x x x x x x x x x x x x x x"; + min_write_delay = 9000; + max_write_delay = 9000; + ; ; #------------------------------------------------------------ @@ -1532,126 +1532,126 @@ part #------------------------------------------------------------ part - id = "2333"; + id = "2333"; ##### WARNING: No XML file for device 'AT90S2333'! ##### - desc = "AT90S2333"; - stk500_devcode = 0x42; - avr910_devcode = 0x34; - signature = 0x1e 0x91 0x05; - chip_erase_delay = 20000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + desc = "AT90S2333"; + stk500_devcode = 0x42; + avr910_devcode = 0x34; + signature = 0x1e 0x91 0x05; + chip_erase_delay = 20000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 0; - togglevtg = 0; - poweroffdelay = 0; - resetdelayms = 0; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 15; - chiperasepolltimeout = 0; - programfusepulsewidth = 2; - programfusepolltimeout = 0; - programlockpulsewidth = 0; - programlockpolltimeout = 1; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 0; + togglevtg = 0; + poweroffdelay = 0; + resetdelayms = 0; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 15; + chiperasepolltimeout = 0; + programfusepulsewidth = 2; + programfusepolltimeout = 0; + programlockpulsewidth = 0; + programlockpolltimeout = 1; - memory "eeprom" - size = 128; - min_write_delay = 9000; - max_write_delay = 20000; - readback_p1 = 0x00; - readback_p2 = 0xff; - read = "1 0 1 0 0 0 0 0 x x x x x x x x", - "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 128; + min_write_delay = 9000; + max_write_delay = 20000; + readback_p1 = 0x00; + readback_p2 = 0xff; + read = "1 0 1 0 0 0 0 0 x x x x x x x x", + "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = "1 1 0 0 0 0 0 0 x x x x x x x x", - "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = "1 1 0 0 0 0 0 0 x x x x x x x x", + "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; - mode = 0x04; - delay = 12; - blocksize = 128; - readsize = 256; - ; + mode = 0x04; + delay = 12; + blocksize = 128; + readsize = 256; + ; - memory "flash" - size = 2048; - min_write_delay = 9000; - max_write_delay = 20000; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + size = 2048; + min_write_delay = 9000; + max_write_delay = 20000; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - write_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - mode = 0x04; - delay = 12; - blocksize = 128; - readsize = 256; - ; + mode = 0x04; + delay = 12; + blocksize = 128; + readsize = 256; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; - memory "fuse" - size = 1; - min_write_delay = 9000; - max_write_delay = 20000; - pwroff_after_write = yes; - read = "0 1 0 1 0 0 0 0 x x x x x x x x", - "x x x x x x x x x x o o o o o o"; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; + memory "fuse" + size = 1; + min_write_delay = 9000; + max_write_delay = 20000; + pwroff_after_write = yes; + read = "0 1 0 1 0 0 0 0 x x x x x x x x", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 i i i i i", - "x x x x x x x x x x x x x x x x"; - ; - memory "lock" - size = 1; - min_write_delay = 9000; - max_write_delay = 20000; - read = "0 1 0 1 1 0 0 0 x x x x x x x x", - "x x x x x x x x x x x x x o o x"; + write = "1 0 1 0 1 1 0 0 1 0 1 i i i i i", + "x x x x x x x x x x x x x x x x"; + ; + memory "lock" + size = 1; + min_write_delay = 9000; + max_write_delay = 20000; + read = "0 1 0 1 1 0 0 0 x x x x x x x x", + "x x x x x x x x x x x x x o o x"; - write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1", - "x x x x x x x x x x x x x x x x"; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1", + "x x x x x x x x x x x x x x x x"; + ; ; @@ -1660,122 +1660,122 @@ part #------------------------------------------------------------ part - id = "2343"; - desc = "AT90S2343"; - stk500_devcode = 0x43; - avr910_devcode = 0x4c; - signature = 0x1e 0x91 0x03; - chip_erase_delay = 18000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "2343"; + desc = "AT90S2343"; + stk500_devcode = 0x43; + avr910_devcode = 0x4c; + signature = 0x1e 0x91 0x03; + chip_erase_delay = 18000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - hvsp_controlstack = - 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x00, - 0x68, 0x78, 0x68, 0x68, 0x00, 0x00, 0x68, 0x78, - 0x78, 0x00, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10, - 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00; - hventerstabdelay = 100; - hvspcmdexedelay = 0; - synchcycles = 6; - latchcycles = 1; - togglevtg = 0; - poweroffdelay = 25; - resetdelayms = 0; - resetdelayus = 50; - hvleavestabdelay = 100; - resetdelay = 25; - chiperasepolltimeout = 40; - chiperasetime = 0; - programfusepolltimeout = 25; - programlockpolltimeout = 25; + hvsp_controlstack = + 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x00, + 0x68, 0x78, 0x68, 0x68, 0x00, 0x00, 0x68, 0x78, + 0x78, 0x00, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10, + 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00; + hventerstabdelay = 100; + hvspcmdexedelay = 0; + synchcycles = 6; + latchcycles = 1; + togglevtg = 0; + poweroffdelay = 25; + resetdelayms = 0; + resetdelayus = 50; + hvleavestabdelay = 100; + resetdelay = 25; + chiperasepolltimeout = 40; + chiperasetime = 0; + programfusepolltimeout = 25; + programlockpolltimeout = 25; - memory "eeprom" - size = 128; - min_write_delay = 9000; - max_write_delay = 20000; - readback_p1 = 0x00; - readback_p2 = 0xff; - read = "1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0", - "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 128; + min_write_delay = 9000; + max_write_delay = 20000; + readback_p1 = 0x00; + readback_p2 = 0xff; + read = "1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0", + "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = "1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0", - "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = "1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0", + "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; - mode = 0x04; - delay = 12; - blocksize = 64; - readsize = 256; - ; - memory "flash" - size = 2048; - min_write_delay = 9000; - max_write_delay = 20000; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x04; + delay = 12; + blocksize = 64; + readsize = 256; + ; + memory "flash" + size = 2048; + min_write_delay = 9000; + max_write_delay = 20000; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - write_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - mode = 0x04; - delay = 12; - blocksize = 128; - readsize = 128; - ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; - memory "fuse" - size = 1; - min_write_delay = 9000; - max_write_delay = 20000; - read = "0 1 0 1 1 0 0 0 x x x x x x x x", - "x x x x x x x x o o o x x x x o"; + mode = 0x04; + delay = 12; + blocksize = 128; + readsize = 128; + ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; + memory "fuse" + size = 1; + min_write_delay = 9000; + max_write_delay = 20000; + read = "0 1 0 1 1 0 0 0 x x x x x x x x", + "x x x x x x x x o o o x x x x o"; - write = "1 0 1 0 1 1 0 0 1 0 1 1 1 1 1 i", - "x x x x x x x x x x x x x x x x"; - ; - memory "lock" - size = 1; - min_write_delay = 9000; - max_write_delay = 20000; - read = "0 1 0 1 1 0 0 0 x x x x x x x x", - "x x x x x x x x o o o x x x x o"; + write = "1 0 1 0 1 1 0 0 1 0 1 1 1 1 1 i", + "x x x x x x x x x x x x x x x x"; + ; + memory "lock" + size = 1; + min_write_delay = 9000; + max_write_delay = 20000; + read = "0 1 0 1 1 0 0 0 x x x x x x x x", + "x x x x x x x x o o o x x x x o"; - write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1", - "x x x x x x x x x x x x x x x x"; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1", + "x x x x x x x x x x x x x x x x"; + ; ; @@ -1784,123 +1784,123 @@ part #------------------------------------------------------------ part - id = "4433"; - desc = "AT90S4433"; - stk500_devcode = 0x51; - avr910_devcode = 0x30; - signature = 0x1e 0x92 0x03; - chip_erase_delay = 20000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "4433"; + desc = "AT90S4433"; + stk500_devcode = 0x51; + avr910_devcode = 0x30; + signature = 0x1e 0x92 0x03; + chip_erase_delay = 20000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 0; - togglevtg = 0; - poweroffdelay = 0; - resetdelayms = 0; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 15; - chiperasepolltimeout = 0; - programfusepulsewidth = 2; - programfusepolltimeout = 0; - programlockpulsewidth = 0; - programlockpolltimeout = 1; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 0; + togglevtg = 0; + poweroffdelay = 0; + resetdelayms = 0; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 15; + chiperasepolltimeout = 0; + programfusepulsewidth = 2; + programfusepolltimeout = 0; + programlockpulsewidth = 0; + programlockpolltimeout = 1; - memory "eeprom" - size = 256; - min_write_delay = 9000; - max_write_delay = 20000; - readback_p1 = 0x00; - readback_p2 = 0xff; - read = " 1 0 1 0 0 0 0 0 x x x x x x x x", - "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 256; + min_write_delay = 9000; + max_write_delay = 20000; + readback_p1 = 0x00; + readback_p2 = 0xff; + read = " 1 0 1 0 0 0 0 0 x x x x x x x x", + "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0 x x x x x x x x", - "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0 x x x x x x x x", + "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; - mode = 0x04; - delay = 12; - blocksize = 128; - readsize = 256; - ; - memory "flash" - size = 4096; - min_write_delay = 9000; - max_write_delay = 20000; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " x x x x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x04; + delay = 12; + blocksize = 128; + readsize = 256; + ; + memory "flash" + size = 4096; + min_write_delay = 9000; + max_write_delay = 20000; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " x x x x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " x x x x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " x x x x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write_lo = " 0 1 0 0 0 0 0 0", - " x x x x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write_lo = " 0 1 0 0 0 0 0 0", + " x x x x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - write_hi = " 0 1 0 0 1 0 0 0", - " x x x x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write_hi = " 0 1 0 0 1 0 0 0", + " x x x x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - mode = 0x04; - delay = 12; - blocksize = 128; - readsize = 256; - ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; - memory "fuse" - size = 1; - min_write_delay = 9000; - max_write_delay = 20000; - pwroff_after_write = yes; - read = "0 1 0 1 0 0 0 0 x x x x x x x x", - "x x x x x x x x x x o o o o o o"; + mode = 0x04; + delay = 12; + blocksize = 128; + readsize = 256; + ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; + memory "fuse" + size = 1; + min_write_delay = 9000; + max_write_delay = 20000; + pwroff_after_write = yes; + read = "0 1 0 1 0 0 0 0 x x x x x x x x", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 i i i i i", - "x x x x x x x x x x x x x x x x"; - ; - memory "lock" - size = 1; - min_write_delay = 9000; - max_write_delay = 20000; - read = "0 1 0 1 1 0 0 0 x x x x x x x x", - "x x x x x x x x x x x x x o o x"; + write = "1 0 1 0 1 1 0 0 1 0 1 i i i i i", + "x x x x x x x x x x x x x x x x"; + ; + memory "lock" + size = 1; + min_write_delay = 9000; + max_write_delay = 20000; + read = "0 1 0 1 1 0 0 0 x x x x x x x x", + "x x x x x x x x x x x x x o o x"; - write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1", - "x x x x x x x x x x x x x x x x"; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1", + "x x x x x x x x x x x x x x x x"; + ; ; #------------------------------------------------------------ @@ -1908,82 +1908,82 @@ part #------------------------------------------------------------ part - id = "4434"; + id = "4434"; ##### WARNING: No XML file for device 'AT90S4434'! ##### - desc = "AT90S4434"; - stk500_devcode = 0x52; - avr910_devcode = 0x6c; - signature = 0x1e 0x92 0x02; - chip_erase_delay = 20000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + desc = "AT90S4434"; + stk500_devcode = 0x52; + avr910_devcode = 0x6c; + signature = 0x1e 0x92 0x02; + chip_erase_delay = 20000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; - memory "eeprom" - size = 256; - min_write_delay = 9000; - max_write_delay = 20000; - readback_p1 = 0x00; - readback_p2 = 0xff; - read = " 1 0 1 0 0 0 0 0 x x x x x x x x", - "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 256; + min_write_delay = 9000; + max_write_delay = 20000; + readback_p1 = 0x00; + readback_p2 = 0xff; + read = " 1 0 1 0 0 0 0 0 x x x x x x x x", + "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0 x x x x x x x x", - "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; - ; - memory "flash" - size = 4096; - min_write_delay = 9000; - max_write_delay = 20000; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " x x x x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + write = " 1 1 0 0 0 0 0 0 x x x x x x x x", + "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; + ; + memory "flash" + size = 4096; + min_write_delay = 9000; + max_write_delay = 20000; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " x x x x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " x x x x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " x x x x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write_lo = " 0 1 0 0 0 0 0 0", - " x x x x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write_lo = " 0 1 0 0 0 0 0 0", + " x x x x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - write_hi = " 0 1 0 0 1 0 0 0", - " x x x x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; - ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; - memory "fuse" - size = 1; - min_write_delay = 9000; - max_write_delay = 20000; - read = "0 1 0 1 0 0 0 0 x x x x x x x x", - "x x x x x x x x x x o o o o o o"; + write_hi = " 0 1 0 0 1 0 0 0", + " x x x x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; + ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; + memory "fuse" + size = 1; + min_write_delay = 9000; + max_write_delay = 20000; + read = "0 1 0 1 0 0 0 0 x x x x x x x x", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 i i i i i", - "x x x x x x x x x x x x x x x x"; - ; - memory "lock" - size = 1; - min_write_delay = 9000; - max_write_delay = 20000; - read = "0 1 0 1 1 0 0 0 x x x x x x x x", - "x x x x x x x x x x x x x o o x"; + write = "1 0 1 0 1 1 0 0 1 0 1 i i i i i", + "x x x x x x x x x x x x x x x x"; + ; + memory "lock" + size = 1; + min_write_delay = 9000; + max_write_delay = 20000; + read = "0 1 0 1 1 0 0 0 x x x x x x x x", + "x x x x x x x x x x x x x o o x"; - write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1", - "x x x x x x x x x x x x x x x x"; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1", + "x x x x x x x x x x x x x x x x"; + ; ; #------------------------------------------------------------ @@ -1991,113 +1991,113 @@ part #------------------------------------------------------------ part - id = "8515"; - desc = "AT90S8515"; - stk500_devcode = 0x60; - avr910_devcode = 0x38; - signature = 0x1e 0x93 0x01; - chip_erase_delay = 20000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "8515"; + desc = "AT90S8515"; + stk500_devcode = 0x60; + avr910_devcode = 0x38; + signature = 0x1e 0x93 0x01; + chip_erase_delay = 20000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = + pp_controlstack = 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 0; - togglevtg = 0; - poweroffdelay = 0; - resetdelayms = 0; - resetdelayus = 0; - hvleavestabdelay = 15; - resetdelay = 15; - chiperasepulsewidth = 15; - chiperasepolltimeout = 0; - programfusepulsewidth = 2; - programfusepolltimeout = 0; - programlockpulsewidth = 0; - programlockpolltimeout = 1; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 0; + togglevtg = 0; + poweroffdelay = 0; + resetdelayms = 0; + resetdelayus = 0; + hvleavestabdelay = 15; + resetdelay = 15; + chiperasepulsewidth = 15; + chiperasepolltimeout = 0; + programfusepulsewidth = 2; + programfusepolltimeout = 0; + programlockpulsewidth = 0; + programlockpolltimeout = 1; - memory "eeprom" - size = 512; - min_write_delay = 4000; - max_write_delay = 9000; - readback_p1 = 0x80; - readback_p2 = 0x7f; - read = " 1 0 1 0 0 0 0 0 x x x x x x x a8", - "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 512; + min_write_delay = 4000; + max_write_delay = 9000; + readback_p1 = 0x80; + readback_p2 = 0x7f; + read = " 1 0 1 0 0 0 0 0 x x x x x x x a8", + "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0 x x x x x x x a8", - "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0 x x x x x x x a8", + "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; - mode = 0x04; - delay = 12; - blocksize = 128; - readsize = 256; - ; - memory "flash" - size = 8192; - min_write_delay = 4000; - max_write_delay = 9000; - readback_p1 = 0x7f; - readback_p2 = 0x7f; - read_lo = " 0 0 1 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x04; + delay = 12; + blocksize = 128; + readsize = 256; + ; + memory "flash" + size = 8192; + min_write_delay = 4000; + max_write_delay = 9000; + readback_p1 = 0x7f; + readback_p2 = 0x7f; + read_lo = " 0 0 1 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write_lo = " 0 1 0 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write_lo = " 0 1 0 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - write_hi = " 0 1 0 0 1 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write_hi = " 0 1 0 0 1 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - mode = 0x04; - delay = 12; - blocksize = 128; - readsize = 256; - ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; - memory "fuse" - size = 1; - ; - memory "lock" - size = 1; - write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1", + mode = 0x04; + delay = 12; + blocksize = 128; + readsize = 256; + ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; + memory "fuse" + size = 1; + ; + memory "lock" + size = 1; + write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1", "x x x x x x x x x x x x x x x x"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + min_write_delay = 9000; + max_write_delay = 9000; + ; ; #------------------------------------------------------------ @@ -2105,120 +2105,120 @@ part #------------------------------------------------------------ part - id = "8535"; - desc = "AT90S8535"; - stk500_devcode = 0x61; - avr910_devcode = 0x68; - signature = 0x1e 0x93 0x03; - chip_erase_delay = 20000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "8535"; + desc = "AT90S8535"; + stk500_devcode = 0x61; + avr910_devcode = 0x68; + signature = 0x1e 0x93 0x03; + chip_erase_delay = 20000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 0; - togglevtg = 0; - poweroffdelay = 0; - resetdelayms = 0; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 15; - chiperasepolltimeout = 0; - programfusepulsewidth = 2; - programfusepolltimeout = 0; - programlockpulsewidth = 0; - programlockpolltimeout = 1; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 0; + togglevtg = 0; + poweroffdelay = 0; + resetdelayms = 0; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 15; + chiperasepolltimeout = 0; + programfusepulsewidth = 2; + programfusepolltimeout = 0; + programlockpulsewidth = 0; + programlockpolltimeout = 1; - memory "eeprom" - size = 512; - min_write_delay = 9000; - max_write_delay = 20000; - readback_p1 = 0x00; - readback_p2 = 0xff; - read = " 1 0 1 0 0 0 0 0 x x x x x x x a8", - "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 512; + min_write_delay = 9000; + max_write_delay = 20000; + readback_p1 = 0x00; + readback_p2 = 0xff; + read = " 1 0 1 0 0 0 0 0 x x x x x x x a8", + "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0 x x x x x x x a8", - "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0 x x x x x x x a8", + "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; - mode = 0x04; - delay = 12; - blocksize = 128; - readsize = 256; - ; - memory "flash" - size = 8192; - min_write_delay = 9000; - max_write_delay = 20000; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x04; + delay = 12; + blocksize = 128; + readsize = 256; + ; + memory "flash" + size = 8192; + min_write_delay = 9000; + max_write_delay = 20000; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write_lo = " 0 1 0 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write_lo = " 0 1 0 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - write_hi = " 0 1 0 0 1 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write_hi = " 0 1 0 0 1 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - mode = 0x04; - delay = 12; - blocksize = 128; - readsize = 256; - ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; - memory "fuse" - size = 1; - read = "0 1 0 1 1 0 0 0 x x x x x x x x", + mode = 0x04; + delay = 12; + blocksize = 128; + readsize = 256; + ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; + memory "fuse" + size = 1; + read = "0 1 0 1 1 0 0 0 x x x x x x x x", "x x x x x x x x x x x x x x x o"; - write = "1 0 1 0 1 1 0 0 1 0 1 1 1 1 1 i", + write = "1 0 1 0 1 1 0 0 1 0 1 1 1 1 1 i", "x x x x x x x x x x x x x x x x"; - min_write_delay = 9000; - max_write_delay = 9000; - ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 x x x x x x x x", + min_write_delay = 9000; + max_write_delay = 9000; + ; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 x x x x x x x x", "x x x x x x x x o o x x x x x x"; - write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1", + write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1", "x x x x x x x x x x x x x x x x"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + min_write_delay = 9000; + max_write_delay = 9000; + ; ; #------------------------------------------------------------ @@ -2226,138 +2226,138 @@ part #------------------------------------------------------------ part - id = "m103"; - desc = "ATMEGA103"; - stk500_devcode = 0xB1; - avr910_devcode = 0x41; - signature = 0x1e 0x97 0x01; - chip_erase_delay = 112000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "m103"; + desc = "ATMEGA103"; + stk500_devcode = 0xB1; + avr910_devcode = 0x41; + signature = 0x1e 0x97 0x01; + chip_erase_delay = 112000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = - 0x0E, 0x1E, 0x8E, 0x9E, 0x2E, 0x3E, 0xAE, 0xBE, - 0x4E, 0x5E, 0xCE, 0xDE, 0x6E, 0x7E, 0xEE, 0xDE, - 0x66, 0x76, 0xE6, 0xF6, 0x6A, 0x7A, 0xEA, 0x7A, - 0x7F, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 0; - togglevtg = 0; - poweroffdelay = 0; - resetdelayms = 0; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 15; - chiperasepolltimeout = 0; - programfusepulsewidth = 2; - programfusepolltimeout = 0; - programlockpulsewidth = 0; - programlockpolltimeout = 10; + pp_controlstack = + 0x0E, 0x1E, 0x8E, 0x9E, 0x2E, 0x3E, 0xAE, 0xBE, + 0x4E, 0x5E, 0xCE, 0xDE, 0x6E, 0x7E, 0xEE, 0xDE, + 0x66, 0x76, 0xE6, 0xF6, 0x6A, 0x7A, 0xEA, 0x7A, + 0x7F, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 0; + togglevtg = 0; + poweroffdelay = 0; + resetdelayms = 0; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 15; + chiperasepolltimeout = 0; + programfusepulsewidth = 2; + programfusepolltimeout = 0; + programlockpulsewidth = 0; + programlockpolltimeout = 10; - memory "eeprom" - size = 4096; - min_write_delay = 4000; - max_write_delay = 9000; - readback_p1 = 0x80; - readback_p2 = 0x7f; + memory "eeprom" + size = 4096; + min_write_delay = 4000; + max_write_delay = 9000; + readback_p1 = 0x80; + readback_p2 = 0x7f; read = " 1 0 1 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - mode = 0x04; - delay = 12; - blocksize = 64; - readsize = 256; - ; + mode = 0x04; + delay = 12; + blocksize = 64; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 131072; - page_size = 256; - num_pages = 512; - min_write_delay = 22000; - max_write_delay = 56000; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 131072; + page_size = 256; + num_pages = 512; + min_write_delay = 22000; + max_write_delay = 56000; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 x x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 x x x x x x x", + " x x x x x x x x"; - mode = 0x11; - delay = 70; - blocksize = 256; - readsize = 256; - ; + mode = 0x11; + delay = 70; + blocksize = 256; + readsize = 256; + ; - memory "fuse" - size = 1; - read = "0 1 0 1 0 0 0 0 x x x x x x x x", - "x x x x x x x x x x o x o 1 o o"; + memory "fuse" + size = 1; + read = "0 1 0 1 0 0 0 0 x x x x x x x x", + "x x x x x x x x x x o x o 1 o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 1 i 1 i i", - "x x x x x x x x x x x x x x x x"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 1 i 1 i i", + "x x x x x x x x x x x x x x x x"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 x x x x x x x x", - "x x x x x x x x x x x x x o o x"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 x x x x x x x x", + "x x x x x x x x x x x x x o o x"; - write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1", - "x x x x x x x x x x x x x x x x"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1", + "x x x x x x x x x x x x x x x x"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; @@ -2366,177 +2366,177 @@ part #------------------------------------------------------------ part - id = "m64"; - desc = "ATMEGA64"; - has_jtag = yes; - stk500_devcode = 0xA0; - avr910_devcode = 0x45; - signature = 0x1e 0x96 0x02; - chip_erase_delay = 9000; - pagel = 0xD7; - bs2 = 0xA0; - reset = dedicated; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "m64"; + desc = "ATMEGA64"; + has_jtag = yes; + stk500_devcode = 0xA0; + avr910_devcode = 0x45; + signature = 0x1e 0x96 0x02; + chip_erase_delay = 9000; + pagel = 0xD7; + bs2 = 0xA0; + reset = dedicated; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 6; - togglevtg = 0; - poweroffdelay = 0; - resetdelayms = 0; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 6; + togglevtg = 0; + poweroffdelay = 0; + resetdelayms = 0; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x22; - spmcr = 0x68; - allowfullpagebitstream = yes; + idr = 0x22; + spmcr = 0x68; + allowfullpagebitstream = yes; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 8; /* for parallel programming */ - size = 2048; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; - read = " 1 0 1 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 8; /* for parallel programming */ + size = 2048; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; + read = " 1 0 1 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - mode = 0x04; - delay = 20; - blocksize = 64; - readsize = 256; - ; + mode = 0x04; + delay = 20; + blocksize = 64; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 65536; - page_size = 256; - num_pages = 256; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " x a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 65536; + page_size = 256; + num_pages = 256; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " x a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " x a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " x a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " x a14 a13 a12 a11 a10 a9 a8", - " a7 x x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " x a14 a13 a12 a11 a10 a9 a8", + " a7 x x x x x x x", + " x x x x x x x x"; - mode = 0x21; - delay = 6; - blocksize = 128; - readsize = 256; - ; + mode = 0x21; + delay = 6; + blocksize = 128; + readsize = 256; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x x i i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x x i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 4; - read = "0 0 1 1 1 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 a1 a0 o o o o o o o o"; - ; + memory "calibration" + size = 4; + read = "0 0 1 1 1 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 a1 a0 o o o o o o o o"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; @@ -2547,177 +2547,177 @@ part #------------------------------------------------------------ part - id = "m128"; - desc = "ATMEGA128"; - has_jtag = yes; - stk500_devcode = 0xB2; - avr910_devcode = 0x43; - signature = 0x1e 0x97 0x02; - chip_erase_delay = 9000; - pagel = 0xD7; - bs2 = 0xA0; - reset = dedicated; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "m128"; + desc = "ATMEGA128"; + has_jtag = yes; + stk500_devcode = 0xB2; + avr910_devcode = 0x43; + signature = 0x1e 0x97 0x02; + chip_erase_delay = 9000; + pagel = 0xD7; + bs2 = 0xA0; + reset = dedicated; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 6; - togglevtg = 0; - poweroffdelay = 0; - resetdelayms = 0; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 6; + togglevtg = 0; + poweroffdelay = 0; + resetdelayms = 0; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x22; - spmcr = 0x68; - rampz = 0x3b; - allowfullpagebitstream = yes; + idr = 0x22; + spmcr = 0x68; + rampz = 0x3b; + allowfullpagebitstream = yes; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 8; /* for parallel programming */ - size = 4096; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; - read = " 1 0 1 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 8; /* for parallel programming */ + size = 4096; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; + read = " 1 0 1 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - mode = 0x04; - delay = 12; - blocksize = 64; - readsize = 256; - ; + mode = 0x04; + delay = 12; + blocksize = 64; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 131072; - page_size = 256; - num_pages = 512; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 131072; + page_size = 256; + num_pages = 512; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 x x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 x x x x x x x", + " x x x x x x x x"; - mode = 0x21; - delay = 6; - blocksize = 128; - readsize = 256; - ; + mode = 0x21; + delay = 6; + blocksize = 128; + readsize = 256; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x x i i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x x i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 4; - read = "0 0 1 1 1 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 a1 a0 o o o o o o o o"; - ; + memory "calibration" + size = 4; + read = "0 0 1 1 1 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 a1 a0 o o o o o o o o"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -2725,189 +2725,189 @@ part #------------------------------------------------------------ part - id = "c128"; - desc = "AT90CAN128"; - has_jtag = yes; - stk500_devcode = 0xB3; + id = "c128"; + desc = "AT90CAN128"; + has_jtag = yes; + stk500_devcode = 0xB3; # avr910_devcode = 0x43; - signature = 0x1e 0x97 0x81; - chip_erase_delay = 9000; - pagel = 0xD7; - bs2 = 0xA0; - reset = dedicated; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + signature = 0x1e 0x97 0x81; + chip_erase_delay = 9000; + pagel = 0xD7; + bs2 = 0xA0; + reset = dedicated; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 6; - togglevtg = 0; - poweroffdelay = 0; - resetdelayms = 0; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 6; + togglevtg = 0; + poweroffdelay = 0; + resetdelayms = 0; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - rampz = 0x3b; - eecr = 0x3f; - allowfullpagebitstream = no; + idr = 0x31; + spmcr = 0x57; + rampz = 0x3b; + eecr = 0x3f; + allowfullpagebitstream = no; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 8; /* for parallel programming */ - size = 4096; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 8; /* for parallel programming */ + size = 4096; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " 0 0 0 x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " 0 0 0 x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " 0 0 0 x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " 0 0 0 x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 a2 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x a11 a10 a9 a8", " a7 a6 a5 a4 a3 0 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 20; - blocksize = 8; - readsize = 256; - ; + mode = 0x41; + delay = 20; + blocksize = 8; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 131072; - page_size = 256; - num_pages = 512; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 131072; + page_size = 256; + num_pages = 512; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 x x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 x x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 256; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 256; + readsize = 256; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x i i i i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -2915,189 +2915,189 @@ part #------------------------------------------------------------ part - id = "c64"; - desc = "AT90CAN64"; - has_jtag = yes; - stk500_devcode = 0xB3; + id = "c64"; + desc = "AT90CAN64"; + has_jtag = yes; + stk500_devcode = 0xB3; # avr910_devcode = 0x43; - signature = 0x1e 0x96 0x81; - chip_erase_delay = 9000; - pagel = 0xD7; - bs2 = 0xA0; - reset = dedicated; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + signature = 0x1e 0x96 0x81; + chip_erase_delay = 9000; + pagel = 0xD7; + bs2 = 0xA0; + reset = dedicated; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 6; - togglevtg = 0; - poweroffdelay = 0; - resetdelayms = 0; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 6; + togglevtg = 0; + poweroffdelay = 0; + resetdelayms = 0; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - rampz = 0x3b; - eecr = 0x3f; - allowfullpagebitstream = no; + idr = 0x31; + spmcr = 0x57; + rampz = 0x3b; + eecr = 0x3f; + allowfullpagebitstream = no; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 8; /* for parallel programming */ - size = 2048; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 8; /* for parallel programming */ + size = 2048; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " 0 0 0 x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " 0 0 0 x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " 0 0 0 x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " 0 0 0 x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 a2 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x a10 a9 a8", " a7 a6 a5 a4 a3 0 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 20; - blocksize = 8; - readsize = 256; - ; + mode = 0x41; + delay = 20; + blocksize = 8; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 65536; - page_size = 256; - num_pages = 256; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 65536; + page_size = 256; + num_pages = 256; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 x x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 x x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 256; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 256; + readsize = 256; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x i i i i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -3105,189 +3105,189 @@ part #------------------------------------------------------------ part - id = "c32"; - desc = "AT90CAN32"; - has_jtag = yes; - stk500_devcode = 0xB3; + id = "c32"; + desc = "AT90CAN32"; + has_jtag = yes; + stk500_devcode = 0xB3; # avr910_devcode = 0x43; - signature = 0x1e 0x95 0x81; - chip_erase_delay = 9000; - pagel = 0xD7; - bs2 = 0xA0; - reset = dedicated; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + signature = 0x1e 0x95 0x81; + chip_erase_delay = 9000; + pagel = 0xD7; + bs2 = 0xA0; + reset = dedicated; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 6; - togglevtg = 0; - poweroffdelay = 0; - resetdelayms = 0; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 6; + togglevtg = 0; + poweroffdelay = 0; + resetdelayms = 0; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - rampz = 0x3b; - eecr = 0x3f; - allowfullpagebitstream = no; + idr = 0x31; + spmcr = 0x57; + rampz = 0x3b; + eecr = 0x3f; + allowfullpagebitstream = no; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 8; /* for parallel programming */ - size = 1024; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 8; /* for parallel programming */ + size = 1024; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " 0 0 0 x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " 0 0 0 x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " 0 0 0 x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " 0 0 0 x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 a2 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x a9 a8", " a7 a6 a5 a4 a3 0 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 20; - blocksize = 8; - readsize = 256; - ; + mode = 0x41; + delay = 20; + blocksize = 8; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 32768; - page_size = 256; - num_pages = 128; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 32768; + page_size = 256; + num_pages = 128; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 x x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 x x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 256; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 256; + readsize = 256; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x i i i i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; @@ -3296,174 +3296,174 @@ part #------------------------------------------------------------ part - id = "m16"; - desc = "ATMEGA16"; - has_jtag = yes; - stk500_devcode = 0x82; - avr910_devcode = 0x74; - signature = 0x1e 0x94 0x03; - pagel = 0xd7; - bs2 = 0xa0; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "m16"; + desc = "ATMEGA16"; + has_jtag = yes; + stk500_devcode = 0x82; + avr910_devcode = 0x74; + signature = 0x1e 0x94 0x03; + pagel = 0xd7; + bs2 = 0xa0; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = + pp_controlstack = 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 100; - latchcycles = 6; - togglevtg = 0; - poweroffdelay = 0; - resetdelayms = 0; - resetdelayus = 0; - hvleavestabdelay = 15; - resetdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + hventerstabdelay = 100; + progmodedelay = 100; + latchcycles = 6; + togglevtg = 0; + poweroffdelay = 0; + resetdelayms = 0; + resetdelayus = 0; + hvleavestabdelay = 15; + resetdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - allowfullpagebitstream = yes; + idr = 0x31; + spmcr = 0x57; + allowfullpagebitstream = yes; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 4; /* for parallel programming */ - size = 512; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 4; /* for parallel programming */ + size = 512; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " 0 0 x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " 0 0 x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " 0 0 x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " 0 0 x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x a9 a8", " a7 a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x04; - delay = 10; - blocksize = 128; - readsize = 256; - ; + mode = 0x04; + delay = 10; + blocksize = 128; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 16384; - page_size = 128; - num_pages = 128; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 0 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 16384; + page_size = 128; + num_pages = 128; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 0 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 0 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 0 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 0 a13 a12 a11 a10 a9 a8", - " a7 a6 x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 0 a13 a12 a11 a10 a9 a8", + " a7 a6 x x x x x x", + " x x x x x x x x"; - mode = 0x21; - delay = 6; - blocksize = 128; - readsize = 256; - ; + mode = 0x21; + delay = 6; + blocksize = 128; + readsize = 256; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lfuse" - size = 1; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "lfuse" + size = 1; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "hfuse" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; - memory "calibration" - size = 4; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; + memory "calibration" + size = 4; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 a1 a0 o o o o o o o o"; - ; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 a1 a0 o o o o o o o o"; + ; ; @@ -3474,187 +3474,187 @@ part # close to ATmega16 part - id = "m164p"; - desc = "ATMEGA164P"; - has_jtag = yes; - stk500_devcode = 0x82; # no STK500v1 support, use the ATmega16 one - avr910_devcode = 0x74; - signature = 0x1e 0x94 0x0a; - pagel = 0xd7; - bs2 = 0xa0; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "m164p"; + desc = "ATMEGA164P"; + has_jtag = yes; + stk500_devcode = 0x82; # no STK500v1 support, use the ATmega16 one + avr910_devcode = 0x74; + signature = 0x1e 0x94 0x0a; + pagel = 0xd7; + bs2 = 0xa0; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - allowfullpagebitstream = no; + idr = 0x31; + spmcr = 0x57; + allowfullpagebitstream = no; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 4; /* for parallel programming */ - size = 512; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 4; /* for parallel programming */ + size = 512; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " 0 0 x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " 0 0 x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " 0 0 x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " 0 0 x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x a9 a8", " a7 a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 128; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 128; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 16384; - page_size = 128; - num_pages = 128; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 0 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 16384; + page_size = 128; + num_pages = 128; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 0 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 0 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 0 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 0 a13 a12 a11 a10 a9 a8", - " a7 a6 x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 0 a13 a12 a11 a10 a9 a8", + " a7 a6 x x x x x x", + " x x x x x x x x"; - mode = 0x21; - delay = 6; - blocksize = 128; - readsize = 256; - ; + mode = 0x21; + delay = 6; + blocksize = 128; + readsize = 256; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lfuse" - size = 1; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "lfuse" + size = 1; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "hfuse" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; + memory "efuse" + size = 1; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x 1 1 1 1 1 i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x 1 1 1 1 1 i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; - memory "calibration" - size = 1; + memory "calibration" + size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; @@ -3665,187 +3665,187 @@ part # similar to ATmega164P part - id = "m324p"; - desc = "ATMEGA324P"; - has_jtag = yes; - stk500_devcode = 0x82; # no STK500v1 support, use the ATmega16 one - avr910_devcode = 0x74; - signature = 0x1e 0x95 0x08; - pagel = 0xd7; - bs2 = 0xa0; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "m324p"; + desc = "ATMEGA324P"; + has_jtag = yes; + stk500_devcode = 0x82; # no STK500v1 support, use the ATmega16 one + avr910_devcode = 0x74; + signature = 0x1e 0x95 0x08; + pagel = 0xd7; + bs2 = 0xa0; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - allowfullpagebitstream = no; + idr = 0x31; + spmcr = 0x57; + allowfullpagebitstream = no; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 4; /* for parallel programming */ - size = 1024; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 4; /* for parallel programming */ + size = 1024; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " 0 0 x x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " 0 0 x x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " 0 0 x x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " 0 0 x x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x a10 a9 a8", " a7 a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 128; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 128; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 32768; - page_size = 128; - num_pages = 256; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 32768; + page_size = 128; + num_pages = 256; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 x x x x x x", + " x x x x x x x x"; - mode = 0x21; - delay = 6; - blocksize = 256; - readsize = 256; - ; + mode = 0x21; + delay = 6; + blocksize = 256; + readsize = 256; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lfuse" - size = 1; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "lfuse" + size = 1; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "hfuse" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; + memory "efuse" + size = 1; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x 1 1 1 1 1 i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x 1 1 1 1 1 i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; - memory "calibration" - size = 1; + memory "calibration" + size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; @@ -3856,187 +3856,187 @@ part # similar to ATmega164 part - id = "m644"; - desc = "ATMEGA644"; - has_jtag = yes; - stk500_devcode = 0x82; # no STK500v1 support, use the ATmega16 one - avr910_devcode = 0x74; - signature = 0x1e 0x96 0x09; - pagel = 0xd7; - bs2 = 0xa0; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "m644"; + desc = "ATMEGA644"; + has_jtag = yes; + stk500_devcode = 0x82; # no STK500v1 support, use the ATmega16 one + avr910_devcode = 0x74; + signature = 0x1e 0x96 0x09; + pagel = 0xd7; + bs2 = 0xa0; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 6; - togglevtg = 0; - poweroffdelay = 0; - resetdelayms = 0; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 6; + togglevtg = 0; + poweroffdelay = 0; + resetdelayms = 0; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - allowfullpagebitstream = no; + idr = 0x31; + spmcr = 0x57; + allowfullpagebitstream = no; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 8; /* for parallel programming */ - size = 2048; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 8; /* for parallel programming */ + size = 2048; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " 0 0 x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " 0 0 x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " 0 0 x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " 0 0 x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 a2 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x a11 a10 a9 a8", " a7 a6 a5 a4 a3 0 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 128; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 128; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 65536; - page_size = 256; - num_pages = 256; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 65536; + page_size = 256; + num_pages = 256; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 x x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 x x x x x x x", + " x x x x x x x x"; - mode = 0x21; - delay = 6; - blocksize = 256; - readsize = 256; - ; + mode = 0x21; + delay = 6; + blocksize = 256; + readsize = 256; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lfuse" - size = 1; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "lfuse" + size = 1; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "hfuse" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; + memory "efuse" + size = 1; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x 1 1 1 1 1 i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x 1 1 1 1 1 i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; - memory "calibration" - size = 1; + memory "calibration" + size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -4046,187 +4046,187 @@ part # similar to ATmega164p part - id = "m644p"; - desc = "ATMEGA644P"; - has_jtag = yes; - stk500_devcode = 0x82; # no STK500v1 support, use the ATmega16 one - avr910_devcode = 0x74; - signature = 0x1e 0x96 0x0a; - pagel = 0xd7; - bs2 = 0xa0; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "m644p"; + desc = "ATMEGA644P"; + has_jtag = yes; + stk500_devcode = 0x82; # no STK500v1 support, use the ATmega16 one + avr910_devcode = 0x74; + signature = 0x1e 0x96 0x0a; + pagel = 0xd7; + bs2 = 0xa0; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 6; - togglevtg = 0; - poweroffdelay = 0; - resetdelayms = 0; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 6; + togglevtg = 0; + poweroffdelay = 0; + resetdelayms = 0; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - allowfullpagebitstream = no; + idr = 0x31; + spmcr = 0x57; + allowfullpagebitstream = no; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 8; /* for parallel programming */ - size = 2048; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 8; /* for parallel programming */ + size = 2048; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " 0 0 x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " 0 0 x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " 0 0 x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " 0 0 x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 a2 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x a11 a10 a9 a8", " a7 a6 a5 a4 a3 0 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 128; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 128; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 65536; - page_size = 256; - num_pages = 256; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 65536; + page_size = 256; + num_pages = 256; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 x x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 x x x x x x x", + " x x x x x x x x"; - mode = 0x21; - delay = 6; - blocksize = 256; - readsize = 256; - ; + mode = 0x21; + delay = 6; + blocksize = 256; + readsize = 256; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lfuse" - size = 1; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "lfuse" + size = 1; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "hfuse" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; + memory "efuse" + size = 1; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x 1 1 1 1 1 i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x 1 1 1 1 1 i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; - memory "calibration" - size = 1; + memory "calibration" + size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; @@ -4238,187 +4238,187 @@ part # similar to ATmega164p part - id = "m1284p"; - desc = "ATMEGA1284P"; - has_jtag = yes; - stk500_devcode = 0x82; # no STK500v1 support, use the ATmega16 one - avr910_devcode = 0x74; - signature = 0x1e 0x97 0x05; - pagel = 0xd7; - bs2 = 0xa0; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "m1284p"; + desc = "ATMEGA1284P"; + has_jtag = yes; + stk500_devcode = 0x82; # no STK500v1 support, use the ATmega16 one + avr910_devcode = 0x74; + signature = 0x1e 0x97 0x05; + pagel = 0xd7; + bs2 = 0xa0; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 6; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 6; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - allowfullpagebitstream = no; + idr = 0x31; + spmcr = 0x57; + allowfullpagebitstream = no; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 8; /* for parallel programming */ - size = 4096; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 8; /* for parallel programming */ + size = 4096; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " 0 0 x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " 0 0 x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " 0 0 x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " 0 0 x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 a2 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x a11 a10 a9 a8", " a7 a6 a5 a4 a3 0 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 128; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 128; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 131072; - page_size = 256; - num_pages = 512; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 131072; + page_size = 256; + num_pages = 512; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 x x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 x x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 256; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 256; + readsize = 256; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lfuse" - size = 1; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "lfuse" + size = 1; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "hfuse" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; + memory "efuse" + size = 1; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x 1 1 1 1 1 i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x 1 1 1 1 1 i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; - memory "calibration" - size = 1; + memory "calibration" + size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; @@ -4428,193 +4428,193 @@ part #------------------------------------------------------------ part - id = "m162"; - desc = "ATMEGA162"; - has_jtag = yes; - stk500_devcode = 0x83; - avr910_devcode = 0x63; - signature = 0x1e 0x94 0x04; - chip_erase_delay = 9000; - pagel = 0xd7; - bs2 = 0xa0; + id = "m162"; + desc = "ATMEGA162"; + has_jtag = yes; + stk500_devcode = 0x83; + avr910_devcode = 0x63; + signature = 0x1e 0x94 0x04; + chip_erase_delay = 9000; + pagel = 0xd7; + bs2 = 0xa0; - idr = 0x04; - spmcr = 0x57; - allowfullpagebitstream = yes; + idr = 0x04; + spmcr = 0x57; + allowfullpagebitstream = yes; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - memory "flash" - paged = yes; - size = 16384; - page_size = 128; - num_pages = 128; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; + memory "flash" + paged = yes; + size = 16384; + page_size = 128; + num_pages = 128; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 0 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 0 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 0 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 0 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 0 a13 a12 a11 a10 a9 a8", - " a7 a6 x x x x x x", - " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 128; - readsize = 256; + writepage = " 0 1 0 0 1 1 0 0", + " 0 0 a13 a12 a11 a10 a9 a8", + " a7 a6 x x x x x x", + " x x x x x x x x"; + mode = 0x41; + delay = 10; + blocksize = 128; + readsize = 256; - ; + ; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 6; - togglevtg = 0; - poweroffdelay = 0; - resetdelayms = 0; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 6; + togglevtg = 0; + poweroffdelay = 0; + resetdelayms = 0; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 4; /* for parallel programming */ - size = 512; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 4; /* for parallel programming */ + size = 512; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; - read = " 1 0 1 0 0 0 0 0", - " 0 0 x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read = " 1 0 1 0 0 0 0 0", + " 0 0 x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0", - " 0 0 x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0", + " 0 0 x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x a9 a8", " a7 a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 20; - blocksize = 4; - readsize = 256; - ; + mode = 0x41; + delay = 20; + blocksize = 4; + readsize = 256; + ; - memory "lfuse" - size = 1; - min_write_delay = 16000; - max_write_delay = 16000; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "lfuse" + size = 1; + min_write_delay = 16000; + max_write_delay = 16000; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "hfuse" - size = 1; - min_write_delay = 16000; - max_write_delay = 16000; + memory "hfuse" + size = 1; + min_write_delay = 16000; + max_write_delay = 16000; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "efuse" - size = 1; - min_write_delay = 16000; - max_write_delay = 16000; + memory "efuse" + size = 1; + min_write_delay = 16000; + max_write_delay = 16000; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x 1 1 1 1 1 i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x 1 1 1 1 1 i i i"; + ; - memory "lock" - size = 1; - min_write_delay = 16000; - max_write_delay = 16000; + memory "lock" + size = 1; + min_write_delay = 16000; + max_write_delay = 16000; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + ; - memory "signature" - size = 3; + memory "signature" + size = 3; - read = "0 0 1 1 0 0 0 0 0 0 x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + read = "0 0 1 1 0 0 0 0 0 0 x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; - memory "calibration" - size = 1; + memory "calibration" + size = 1; - read = "0 0 1 1 1 0 0 0 0 0 x x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + read = "0 0 1 1 1 0 0 0 0 0 x x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; @@ -4624,157 +4624,157 @@ part #------------------------------------------------------------ part - id = "m163"; - desc = "ATMEGA163"; - stk500_devcode = 0x81; - avr910_devcode = 0x64; - signature = 0x1e 0x94 0x02; - chip_erase_delay = 32000; - pagel = 0xd7; - bs2 = 0xa0; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "m163"; + desc = "ATMEGA163"; + stk500_devcode = 0x81; + avr910_devcode = 0x64; + signature = 0x1e 0x94 0x02; + chip_erase_delay = 32000; + pagel = 0xd7; + bs2 = 0xa0; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 0; - togglevtg = 0; - poweroffdelay = 0; - resetdelayms = 0; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 30; - programfusepulsewidth = 0; - programfusepolltimeout = 2; - programlockpulsewidth = 0; - programlockpolltimeout = 2; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 0; + togglevtg = 0; + poweroffdelay = 0; + resetdelayms = 0; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 30; + programfusepulsewidth = 0; + programfusepolltimeout = 2; + programlockpulsewidth = 0; + programlockpolltimeout = 2; memory "eeprom" - size = 512; - min_write_delay = 4000; - max_write_delay = 4000; - readback_p1 = 0xff; - readback_p2 = 0xff; + size = 512; + min_write_delay = 4000; + max_write_delay = 4000; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " x x x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " x x x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " x x x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; - mode = 0x41; - delay = 20; - blocksize = 4; - readsize = 256; - ; + " x x x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; + mode = 0x41; + delay = 20; + blocksize = 4; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 16384; - page_size = 128; - num_pages = 128; - min_write_delay = 16000; - max_write_delay = 16000; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " x x x a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 16384; + page_size = 128; + num_pages = 128; + min_write_delay = 16000; + max_write_delay = 16000; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " x x x a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " x x x a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " x x x a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " x x x a12 a11 a10 a9 a8", - " a7 a6 x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " x x x a12 a11 a10 a9 a8", + " a7 a6 x x x x x x", + " x x x x x x x x"; - mode = 0x11; - delay = 20; - blocksize = 128; - readsize = 256; - ; + mode = 0x11; + delay = 20; + blocksize = 128; + readsize = 256; + ; - memory "lfuse" - size = 1; - min_write_delay = 2000; - max_write_delay = 2000; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o x x o o o o"; + memory "lfuse" + size = 1; + min_write_delay = 2000; + max_write_delay = 2000; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o x x o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i 1 1 i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i 1 1 i i i i"; + ; - memory "hfuse" - size = 1; - min_write_delay = 2000; - max_write_delay = 2000; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x x x x x 1 o o o"; + memory "hfuse" + size = 1; + min_write_delay = 2000; + max_write_delay = 2000; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x x x x x 1 o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x 1 1 1 1 1 i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x 1 1 1 1 1 i i i"; + ; - memory "lock" - size = 1; - min_write_delay = 2000; - max_write_delay = 2000; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x 0 x x x x x o o o o o o"; + memory "lock" + size = 1; + min_write_delay = 2000; + max_write_delay = 2000; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x 0 x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -4782,179 +4782,179 @@ part #------------------------------------------------------------ part - id = "m169"; - desc = "ATMEGA169"; - has_jtag = yes; - stk500_devcode = 0x85; - avr910_devcode = 0x78; - signature = 0x1e 0x94 0x05; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "m169"; + desc = "ATMEGA169"; + has_jtag = yes; + stk500_devcode = 0x85; + avr910_devcode = 0x78; + signature = 0x1e 0x94 0x05; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; + idr = 0x31; + spmcr = 0x57; memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 4; /* for parallel programming */ - size = 512; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; + paged = no; /* leave this "no" */ + page_size = 4; /* for parallel programming */ + size = 512; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " x x x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " x x x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " x x x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " x x x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x x a8", " a7 a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 20; - blocksize = 4; - readsize = 256; - ; + mode = 0x41; + delay = 20; + blocksize = 4; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 16384; - page_size = 128; - num_pages = 128; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " x x x a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 16384; + page_size = 128; + num_pages = 128; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " x x x a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " x x x a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " x x x a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " x x x a12 a11 a10 a9 a8", - " a7 a6 x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " x x x a12 a11 a10 a9 a8", + " a7 a6 x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 128; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 128; + readsize = 256; + ; - memory "lfuse" - size = 1; - min_write_delay = 2000; - max_write_delay = 2000; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "lfuse" + size = 1; + min_write_delay = 2000; + max_write_delay = 2000; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "hfuse" - size = 1; - min_write_delay = 2000; - max_write_delay = 2000; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "hfuse" + size = 1; + min_write_delay = 2000; + max_write_delay = 2000; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x i i i i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + ; - memory "lock" - size = 1; - min_write_delay = 2000; - max_write_delay = 2000; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + min_write_delay = 2000; + max_write_delay = 2000; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -4962,182 +4962,182 @@ part #------------------------------------------------------------ part - id = "m329"; - desc = "ATMEGA329"; - has_jtag = yes; + id = "m329"; + desc = "ATMEGA329"; + has_jtag = yes; # stk500_devcode = 0x85; # no STK500 support, only STK500v2 # avr910_devcode = 0x?; # try the ATmega169 one: - avr910_devcode = 0x75; - signature = 0x1e 0x95 0x03; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + avr910_devcode = 0x75; + signature = 0x1e 0x95 0x03; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; + idr = 0x31; + spmcr = 0x57; memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 4; /* for parallel programming */ - size = 1024; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; + paged = no; /* leave this "no" */ + page_size = 4; /* for parallel programming */ + size = 1024; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x a9 a8", " a7 a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 20; - blocksize = 8; - readsize = 256; - ; + mode = 0x41; + delay = 20; + blocksize = 8; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 32768; - page_size = 128; - num_pages = 256; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " x a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 32768; + page_size = 128; + num_pages = 256; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " x a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " x a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " x a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " x x x a12 a11 a10 a9 a8", - " a7 a6 x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " x x x a12 a11 a10 a9 a8", + " a7 a6 x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 256; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 256; + readsize = 256; + ; - memory "lfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "lfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "hfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "hfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "efuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "efuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x i i i"; + ; - memory "lock" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -5146,182 +5146,182 @@ part # Identical to ATmega329 except of the signature part - id = "m329p"; - desc = "ATMEGA329P"; - has_jtag = yes; + id = "m329p"; + desc = "ATMEGA329P"; + has_jtag = yes; # stk500_devcode = 0x85; # no STK500 support, only STK500v2 # avr910_devcode = 0x?; # try the ATmega169 one: - avr910_devcode = 0x75; - signature = 0x1e 0x95 0x0b; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + avr910_devcode = 0x75; + signature = 0x1e 0x95 0x0b; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; + idr = 0x31; + spmcr = 0x57; memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 4; /* for parallel programming */ - size = 1024; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; + paged = no; /* leave this "no" */ + page_size = 4; /* for parallel programming */ + size = 1024; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x a9 a8", " a7 a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 20; - blocksize = 8; - readsize = 256; - ; + mode = 0x41; + delay = 20; + blocksize = 8; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 32768; - page_size = 128; - num_pages = 256; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " x a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 32768; + page_size = 128; + num_pages = 256; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " x a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " x a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " x a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " x x x a12 a11 a10 a9 a8", - " a7 a6 x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " x x x a12 a11 a10 a9 a8", + " a7 a6 x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 256; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 256; + readsize = 256; + ; - memory "lfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "lfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "hfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "hfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "efuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "efuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x i i i"; + ; - memory "lock" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -5331,182 +5331,182 @@ part # identical to ATmega329 part - id = "m3290"; - desc = "ATMEGA3290"; - has_jtag = yes; + id = "m3290"; + desc = "ATMEGA3290"; + has_jtag = yes; # stk500_devcode = 0x85; # no STK500 support, only STK500v2 # avr910_devcode = 0x?; # try the ATmega169 one: - avr910_devcode = 0x75; - signature = 0x1e 0x95 0x04; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + avr910_devcode = 0x75; + signature = 0x1e 0x95 0x04; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; + idr = 0x31; + spmcr = 0x57; memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 4; /* for parallel programming */ - size = 1024; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; + paged = no; /* leave this "no" */ + page_size = 4; /* for parallel programming */ + size = 1024; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x a9 a8", " a7 a6 a5 a4 a3 a3 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 20; - blocksize = 8; - readsize = 256; - ; + mode = 0x41; + delay = 20; + blocksize = 8; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 32768; - page_size = 128; - num_pages = 256; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " x a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 32768; + page_size = 128; + num_pages = 256; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " x a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " x a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " x a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " x x x a12 a11 a10 a9 a8", - " a7 a6 x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " x x x a12 a11 a10 a9 a8", + " a7 a6 x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 256; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 256; + readsize = 256; + ; - memory "lfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "lfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "hfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "hfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "efuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "efuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x i i i"; + ; - memory "lock" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -5516,182 +5516,182 @@ part # identical to ATmega3290 except of the signature part - id = "m3290p"; - desc = "ATMEGA3290P"; - has_jtag = yes; + id = "m3290p"; + desc = "ATMEGA3290P"; + has_jtag = yes; # stk500_devcode = 0x85; # no STK500 support, only STK500v2 # avr910_devcode = 0x?; # try the ATmega169 one: - avr910_devcode = 0x75; - signature = 0x1e 0x95 0x0c; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + avr910_devcode = 0x75; + signature = 0x1e 0x95 0x0c; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; + idr = 0x31; + spmcr = 0x57; memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 4; /* for parallel programming */ - size = 1024; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; + paged = no; /* leave this "no" */ + page_size = 4; /* for parallel programming */ + size = 1024; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x a9 a8", " a7 a6 a5 a4 a3 a3 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 20; - blocksize = 8; - readsize = 256; - ; + mode = 0x41; + delay = 20; + blocksize = 8; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 32768; - page_size = 128; - num_pages = 256; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " x a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 32768; + page_size = 128; + num_pages = 256; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " x a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " x a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " x a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " x x x a12 a11 a10 a9 a8", - " a7 a6 x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " x x x a12 a11 a10 a9 a8", + " a7 a6 x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 256; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 256; + readsize = 256; + ; - memory "lfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "lfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "hfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "hfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "efuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "efuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x i i i"; + ; - memory "lock" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -5699,182 +5699,182 @@ part #------------------------------------------------------------ part - id = "m649"; - desc = "ATMEGA649"; - has_jtag = yes; + id = "m649"; + desc = "ATMEGA649"; + has_jtag = yes; # stk500_devcode = 0x85; # no STK500 support, only STK500v2 # avr910_devcode = 0x?; # try the ATmega169 one: - avr910_devcode = 0x75; - signature = 0x1e 0x96 0x03; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + avr910_devcode = 0x75; + signature = 0x1e 0x96 0x03; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; + idr = 0x31; + spmcr = 0x57; memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 8; /* for parallel programming */ - size = 2048; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; + paged = no; /* leave this "no" */ + page_size = 8; /* for parallel programming */ + size = 2048; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " x x x x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " x x x x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " x x x x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " x x x x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 a2 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x a10 a9 a8", " a7 a6 a5 a4 a3 0 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 20; - blocksize = 8; - readsize = 256; - ; + mode = 0x41; + delay = 20; + blocksize = 8; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 65536; - page_size = 256; - num_pages = 256; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 65536; + page_size = 256; + num_pages = 256; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " x x x a12 a11 a10 a9 a8", - " a7 x x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " x x x a12 a11 a10 a9 a8", + " a7 x x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 256; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 256; + readsize = 256; + ; - memory "lfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "lfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "hfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "hfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "efuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "efuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x i i i"; + ; - memory "lock" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -5884,192 +5884,192 @@ part # identical to ATmega649 part - id = "m6490"; - desc = "ATMEGA6490"; - has_jtag = yes; + id = "m6490"; + desc = "ATMEGA6490"; + has_jtag = yes; # stk500_devcode = 0x85; # no STK500 support, only STK500v2 # avr910_devcode = 0x?; # try the ATmega169 one: - avr910_devcode = 0x75; - signature = 0x1e 0x96 0x04; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + avr910_devcode = 0x75; + signature = 0x1e 0x96 0x04; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; + idr = 0x31; + spmcr = 0x57; memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 8; /* for parallel programming */ - size = 2048; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; + paged = no; /* leave this "no" */ + page_size = 8; /* for parallel programming */ + size = 2048; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " x x x x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " x x x x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " x x x x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " x x x x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 a2 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x x a8", " a7 a6 a5 a4 a3 0 0 0", " x x x x x x x x"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 a2 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x a10 a9 a8", " a7 a6 a5 a4 a3 0 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 20; - blocksize = 8; - readsize = 256; - ; + mode = 0x41; + delay = 20; + blocksize = 8; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 65536; - page_size = 256; - num_pages = 256; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 65536; + page_size = 256; + num_pages = 256; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " x x x a12 a11 a10 a9 a8", - " a7 x x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " x x x a12 a11 a10 a9 a8", + " a7 x x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 256; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 256; + readsize = 256; + ; - memory "lfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "lfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "hfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "hfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "efuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "efuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x i i i"; + ; - memory "lock" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -6077,174 +6077,174 @@ part #------------------------------------------------------------ part - id = "m32"; - desc = "ATMEGA32"; - has_jtag = yes; - stk500_devcode = 0x91; - avr910_devcode = 0x72; - signature = 0x1e 0x95 0x02; - chip_erase_delay = 9000; - pagel = 0xd7; - bs2 = 0xa0; - reset = dedicated; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "m32"; + desc = "ATMEGA32"; + has_jtag = yes; + stk500_devcode = 0x91; + avr910_devcode = 0x72; + signature = 0x1e 0x95 0x02; + chip_erase_delay = 9000; + pagel = 0xd7; + bs2 = 0xa0; + reset = dedicated; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 6; - togglevtg = 0; - poweroffdelay = 0; - resetdelayms = 0; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 6; + togglevtg = 0; + poweroffdelay = 0; + resetdelayms = 0; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - allowfullpagebitstream = yes; + idr = 0x31; + spmcr = 0x57; + allowfullpagebitstream = yes; memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 4; /* for parallel programming */ - size = 1024; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; - read = " 1 0 1 0 0 0 0 0", - " 0 0 x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + paged = no; /* leave this "no" */ + page_size = 4; /* for parallel programming */ + size = 1024; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; + read = " 1 0 1 0 0 0 0 0", + " 0 0 x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0", - " 0 0 x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0", + " 0 0 x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x a9 a8", " a7 a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x04; - delay = 10; - blocksize = 64; - readsize = 256; - ; + mode = 0x04; + delay = 10; + blocksize = 64; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 32768; - page_size = 128; - num_pages = 256; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 0 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 32768; + page_size = 128; + num_pages = 256; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 0 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 0 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 0 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 0 a13 a12 a11 a10 a9 a8", - " a7 a6 x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 0 a13 a12 a11 a10 a9 a8", + " a7 a6 x x x x x x", + " x x x x x x x x"; - mode = 0x21; - delay = 6; - blocksize = 64; - readsize = 256; - ; + mode = 0x21; + delay = 6; + blocksize = 64; + readsize = 256; + ; - memory "lfuse" - size = 1; - min_write_delay = 2000; - max_write_delay = 2000; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "lfuse" + size = 1; + min_write_delay = 2000; + max_write_delay = 2000; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "hfuse" - size = 1; - min_write_delay = 2000; - max_write_delay = 2000; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "hfuse" + size = 1; + min_write_delay = 2000; + max_write_delay = 2000; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "lock" - size = 1; - min_write_delay = 2000; - max_write_delay = 2000; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + min_write_delay = 2000; + max_write_delay = 2000; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; - memory "calibration" - size = 4; - read = "0 0 1 1 1 0 0 0 0 0 x x x x x x", - "0 0 0 0 0 0 a1 a0 o o o o o o o o"; - ; + memory "calibration" + size = 4; + read = "0 0 1 1 1 0 0 0 0 0 x x x x x x", + "0 0 0 0 0 0 a1 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -6252,138 +6252,138 @@ part #------------------------------------------------------------ part - id = "m161"; - desc = "ATMEGA161"; - stk500_devcode = 0x80; - avr910_devcode = 0x60; - signature = 0x1e 0x94 0x01; - chip_erase_delay = 28000; - pagel = 0xd7; - bs2 = 0xa0; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "m161"; + desc = "ATMEGA161"; + stk500_devcode = 0x80; + avr910_devcode = 0x60; + signature = 0x1e 0x94 0x01; + chip_erase_delay = 28000; + pagel = 0xd7; + bs2 = 0xa0; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 0; - togglevtg = 0; - poweroffdelay = 0; - resetdelayms = 0; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 30; - programfusepulsewidth = 0; - programfusepolltimeout = 2; - programlockpulsewidth = 0; - programlockpolltimeout = 2; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 0; + togglevtg = 0; + poweroffdelay = 0; + resetdelayms = 0; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 30; + programfusepulsewidth = 0; + programfusepolltimeout = 2; + programlockpulsewidth = 0; + programlockpolltimeout = 2; memory "eeprom" - size = 512; - min_write_delay = 3400; - max_write_delay = 3400; - readback_p1 = 0xff; - readback_p2 = 0xff; + size = 512; + min_write_delay = 3400; + max_write_delay = 3400; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " x x x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " x x x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " x x x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " x x x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - mode = 0x04; - delay = 5; - blocksize = 128; - readsize = 256; - ; + mode = 0x04; + delay = 5; + blocksize = 128; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 16384; - page_size = 128; - num_pages = 128; - min_write_delay = 14000; - max_write_delay = 14000; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " x x x a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 16384; + page_size = 128; + num_pages = 128; + min_write_delay = 14000; + max_write_delay = 14000; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " x x x a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " x x x a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " x x x a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " x x x a12 a11 a10 a9 a8", - " a7 a6 x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " x x x a12 a11 a10 a9 a8", + " a7 a6 x x x x x x", + " x x x x x x x x"; - mode = 0x21; - delay = 16; - blocksize = 128; - readsize = 256; - ; + mode = 0x21; + delay = 16; + blocksize = 128; + readsize = 256; + ; - memory "fuse" - size = 1; - min_write_delay = 2000; - max_write_delay = 2000; - read = "0 1 0 1 0 0 0 0 x x x x x x x x", - "x x x x x x x x x o x o o o o o"; + memory "fuse" + size = 1; + min_write_delay = 2000; + max_write_delay = 2000; + read = "0 1 0 1 0 0 0 0 x x x x x x x x", + "x x x x x x x x x o x o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 x x x x x", - "x x x x x x x x 1 i 1 i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 x x x x x", + "x x x x x x x x 1 i 1 i i i i i"; + ; - memory "lock" - size = 1; - min_write_delay = 2000; - max_write_delay = 2000; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + min_write_delay = 2000; + max_write_delay = 2000; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; @@ -6392,158 +6392,158 @@ part #------------------------------------------------------------ part - id = "m8"; - desc = "ATMEGA8"; - stk500_devcode = 0x70; - avr910_devcode = 0x76; - signature = 0x1e 0x93 0x07; - pagel = 0xd7; - bs2 = 0xc2; - chip_erase_delay = 10000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "m8"; + desc = "ATMEGA8"; + stk500_devcode = 0x70; + avr910_devcode = 0x76; + signature = 0x1e 0x93 0x07; + pagel = 0xd7; + bs2 = 0xc2; + chip_erase_delay = 10000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = + pp_controlstack = 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 2; - resetdelayus = 0; - hvleavestabdelay = 15; - resetdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 2; + resetdelayus = 0; + hvleavestabdelay = 15; + resetdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - memory "eeprom" - size = 512; - page_size = 4; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; + memory "eeprom" + size = 512; + page_size = 4; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " 0 0 x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " 0 0 x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " 0 0 x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " 0 0 x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - mode = 0x04; - delay = 20; - blocksize = 128; - readsize = 256; - ; - memory "flash" - paged = yes; - size = 8192; - page_size = 64; - num_pages = 128; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0x00; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x04; + delay = 20; + blocksize = 128; + readsize = 256; + ; + memory "flash" + paged = yes; + size = 8192; + page_size = 64; + num_pages = 128; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0x00; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 0 x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 0 x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 0 x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 0 x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 x x x x x", + " x x x x x x x x"; - mode = 0x21; - delay = 10; - blocksize = 64; - readsize = 256; - ; + mode = 0x21; + delay = 10; + blocksize = 64; + readsize = 256; + ; - memory "lfuse" - size = 1; - min_write_delay = 2000; - max_write_delay = 2000; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "lfuse" + size = 1; + min_write_delay = 2000; + max_write_delay = 2000; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "hfuse" - size = 1; - min_write_delay = 2000; - max_write_delay = 2000; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "hfuse" + size = 1; + min_write_delay = 2000; + max_write_delay = 2000; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "lock" - size = 1; - min_write_delay = 2000; - max_write_delay = 2000; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + min_write_delay = 2000; + max_write_delay = 2000; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + ; - memory "calibration" - size = 4; - read = "0 0 1 1 1 0 0 0 0 0 x x x x x x", - "0 0 0 0 0 0 a1 a0 o o o o o o o o"; - ; + memory "calibration" + size = 4; + read = "0 0 1 1 1 0 0 0 0 0 x x x x x x", + "0 0 0 0 0 0 a1 a0 o o o o o o o o"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; @@ -6553,154 +6553,154 @@ part #------------------------------------------------------------ part - id = "m8515"; - desc = "ATMEGA8515"; - stk500_devcode = 0x63; - avr910_devcode = 0x3A; - signature = 0x1e 0x93 0x06; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "m8515"; + desc = "ATMEGA8515"; + stk500_devcode = 0x63; + avr910_devcode = 0x3A; + signature = 0x1e 0x93 0x06; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 6; - togglevtg = 0; - poweroffdelay = 0; - resetdelayms = 0; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 6; + togglevtg = 0; + poweroffdelay = 0; + resetdelayms = 0; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - memory "eeprom" - size = 512; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; + memory "eeprom" + size = 512; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " 0 0 x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " 0 0 x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " 0 0 x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " 0 0 x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - mode = 0x04; - delay = 10; - blocksize = 128; - readsize = 256; - ; - memory "flash" - paged = yes; - size = 8192; - page_size = 64; - num_pages = 128; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x04; + delay = 10; + blocksize = 128; + readsize = 256; + ; + memory "flash" + paged = yes; + size = 8192; + page_size = 64; + num_pages = 128; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 0 x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 0 x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 0 x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 0 x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 x x x x x", + " x x x x x x x x"; - mode = 0x21; - delay = 6; - blocksize = 64; - readsize = 256; - ; + mode = 0x21; + delay = 6; + blocksize = 64; + readsize = 256; + ; - memory "lfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "lfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "hfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "hfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "lock" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + ; - memory "calibration" - size = 4; - read = "0 0 1 1 1 0 0 0 0 0 x x x x x x", - "0 0 0 0 0 0 a1 a0 o o o o o o o o"; - ; + memory "calibration" + size = 4; + read = "0 0 1 1 1 0 0 0 0 0 x x x x x x", + "0 0 0 0 0 0 a1 a0 o o o o o o o o"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; @@ -6711,156 +6711,156 @@ part #------------------------------------------------------------ part - id = "m8535"; - desc = "ATMEGA8535"; - stk500_devcode = 0x64; - avr910_devcode = 0x69; - signature = 0x1e 0x93 0x08; - pagel = 0xd7; - bs2 = 0xa0; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "m8535"; + desc = "ATMEGA8535"; + stk500_devcode = 0x64; + avr910_devcode = 0x69; + signature = 0x1e 0x93 0x08; + pagel = 0xd7; + bs2 = 0xa0; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 6; - togglevtg = 0; - poweroffdelay = 0; - resetdelayms = 0; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 6; + togglevtg = 0; + poweroffdelay = 0; + resetdelayms = 0; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - memory "eeprom" - size = 512; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; + memory "eeprom" + size = 512; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " 0 0 x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " 0 0 x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " 0 0 x x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " 0 0 x x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - mode = 0x04; - delay = 10; - blocksize = 128; - readsize = 256; - ; - memory "flash" - paged = yes; - size = 8192; - page_size = 64; - num_pages = 128; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x04; + delay = 10; + blocksize = 128; + readsize = 256; + ; + memory "flash" + paged = yes; + size = 8192; + page_size = 64; + num_pages = 128; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 0 x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 0 x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 0 x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 0 x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 x x x x x", + " x x x x x x x x"; - mode = 0x21; - delay = 6; - blocksize = 64; - readsize = 256; - ; + mode = 0x21; + delay = 6; + blocksize = 64; + readsize = 256; + ; - memory "lfuse" - size = 1; - min_write_delay = 2000; - max_write_delay = 2000; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "lfuse" + size = 1; + min_write_delay = 2000; + max_write_delay = 2000; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "hfuse" - size = 1; - min_write_delay = 2000; - max_write_delay = 2000; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "hfuse" + size = 1; + min_write_delay = 2000; + max_write_delay = 2000; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "lock" - size = 1; - min_write_delay = 2000; - max_write_delay = 2000; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + min_write_delay = 2000; + max_write_delay = 2000; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + ; - memory "calibration" - size = 4; - read = "0 0 1 1 1 0 0 0 0 0 x x x x x x", - "0 0 0 0 0 0 a1 a0 o o o o o o o o"; - ; + memory "calibration" + size = 4; + read = "0 0 1 1 1 0 0 0 0 0 x x x x x x", + "0 0 0 0 0 0 a1 a0 o o o o o o o o"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; @@ -6869,153 +6869,153 @@ part #------------------------------------------------------------ part - id = "t26"; - desc = "ATTINY26"; - stk500_devcode = 0x21; - avr910_devcode = 0x5e; - signature = 0x1e 0x91 0x09; - pagel = 0xb3; - bs2 = 0xb2; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "t26"; + desc = "ATTINY26"; + stk500_devcode = 0x21; + avr910_devcode = 0x5e; + signature = 0x1e 0x91 0x09; + pagel = 0xb3; + bs2 = 0xb2; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = - 0xC4, 0xE4, 0xC4, 0xE4, 0xCC, 0xEC, 0xCC, 0xEC, - 0xD4, 0xF4, 0xD4, 0xF4, 0xDC, 0xFC, 0xDC, 0xFC, - 0xC8, 0xE8, 0xD8, 0xF8, 0x4C, 0x6C, 0x5C, 0x7C, - 0xEC, 0xBC, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 2; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0xC4, 0xE4, 0xC4, 0xE4, 0xCC, 0xEC, 0xCC, 0xEC, + 0xD4, 0xF4, 0xD4, 0xF4, 0xDC, 0xFC, 0xDC, 0xFC, + 0xC8, 0xE8, 0xD8, 0xF8, 0x4C, 0x6C, 0x5C, 0x7C, + 0xEC, 0xBC, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 2; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - memory "eeprom" - size = 128; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; - read = "1 0 1 0 0 0 0 0 x x x x x x x x", - "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 128; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; + read = "1 0 1 0 0 0 0 0 x x x x x x x x", + "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = "1 1 0 0 0 0 0 0 x x x x x x x x", - "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = "1 1 0 0 0 0 0 0 x x x x x x x x", + "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; - mode = 0x04; - delay = 10; - blocksize = 64; - readsize = 256; - ; + mode = 0x04; + delay = 10; + blocksize = 64; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 2048; - page_size = 32; - num_pages = 64; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 2048; + page_size = 32; + num_pages = 64; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x x x x a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x x x x a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x x x x a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x x x x a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " x x x x x x a9 a8", + " a7 a6 a5 a4 x x x x", + " x x x x x x x x"; - mode = 0x21; - delay = 6; - blocksize = 16; - readsize = 256; - ; + mode = 0x21; + delay = 6; + blocksize = 16; + readsize = 256; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 a1 a0 o o o o o o o o"; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 x x x x x x x x", - "x x x x x x x x x x x x x x o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 x x x x x x x x", + "x x x x x x x x x x x x x x o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 1 1 1 i i", - "x x x x x x x x x x x x x x x x"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 1 1 1 i i", + "x x x x x x x x x x x x x x x x"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x x x x i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x x x x i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x x x x o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x x x x o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 4; - read = "0 0 1 1 1 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 a1 a0 o o o o o o o o"; - ; + memory "calibration" + size = 4; + read = "0 0 1 1 1 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 a1 a0 o o o o o o o o"; + ; ; @@ -7026,185 +7026,185 @@ part # Close to ATtiny26 part - id = "t261"; - desc = "ATTINY261"; - has_debugwire = yes; - flash_instr = 0xB4, 0x00, 0x10; - eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, - 0xBC, 0x00, 0xB4, 0x00, 0xBA, 0x0D, 0xBB, 0xBC, - 0x99, 0xE1, 0xBB, 0xAC; + id = "t261"; + desc = "ATTINY261"; + has_debugwire = yes; + flash_instr = 0xB4, 0x00, 0x10; + eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, + 0xBC, 0x00, 0xB4, 0x00, 0xBA, 0x0D, 0xBB, 0xBC, + 0x99, 0xE1, 0xBB, 0xAC; # stk500_devcode = 0x21; # avr910_devcode = 0x5e; - signature = 0x1e 0x91 0x0c; - pagel = 0xb3; - bs2 = 0xb2; - chip_erase_delay = 4000; + signature = 0x1e 0x91 0x0c; + pagel = 0xb3; + bs2 = 0xb2; + chip_erase_delay = 4000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = - 0xC4, 0xE4, 0xC4, 0xE4, 0xCC, 0xEC, 0xCC, 0xEC, - 0xD4, 0xF4, 0xD4, 0xF4, 0xDC, 0xFC, 0xDC, 0xFC, - 0xC8, 0xE8, 0xD8, 0xF8, 0x4C, 0x6C, 0x5C, 0x7C, - 0xEC, 0xBC, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 2; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0xC4, 0xE4, 0xC4, 0xE4, 0xCC, 0xEC, 0xCC, 0xEC, + 0xD4, 0xF4, 0xD4, 0xF4, 0xDC, 0xFC, 0xDC, 0xFC, + 0xC8, 0xE8, 0xD8, 0xF8, 0x4C, 0x6C, 0x5C, 0x7C, + 0xEC, 0xBC, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 2; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - memory "eeprom" - paged = no; - size = 128; - page_size = 4; - num_pages = 32; - min_write_delay = 4000; - max_write_delay = 4000; - readback_p1 = 0xff; - readback_p2 = 0xff; + memory "eeprom" + paged = no; + size = 128; + page_size = 4; + num_pages = 32; + min_write_delay = 4000; + max_write_delay = 4000; + readback_p1 = 0xff; + readback_p2 = 0xff; - read = "1 0 1 0 0 0 0 0 x x x x x x x x", - "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; + read = "1 0 1 0 0 0 0 0 x x x x x x x x", + "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = "1 1 0 0 0 0 0 0 x x x x x x x x", - "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = "1 1 0 0 0 0 0 0 x x x x x x x x", + "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x x x", " x a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 4; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 4; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 2048; - page_size = 32; - num_pages = 64; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; + memory "flash" + paged = yes; + size = 2048; + page_size = 32; + num_pages = 64; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_lo = " 0 0 1 0 0 0 0 0", + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " x x x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x x x x a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x x x x a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x x x x a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x x x x a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " x x x x x x a9 a8", - " a7 a6 a5 a4 x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " x x x x x x a9 a8", + " a7 a6 a5 a4 x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 32; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 32; + readsize = 256; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 a1 a0 o o o o o o o o"; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 x x x x x x x x", - "x x x x x x x x x x x x x x o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 x x x x x x x x", + "x x x x x x x x x x x x x x o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 1 1 1 i i", - "x x x x x x x x x x x x x x x x"; - min_write_delay = 4500; - max_write_delay = 4500; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 1 1 1 i i", + "x x x x x x x x x x x x x x x x"; + min_write_delay = 4500; + max_write_delay = 4500; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 4500; - max_write_delay = 4500; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 4500; + max_write_delay = 4500; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 4500; - max_write_delay = 4500; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 4500; + max_write_delay = 4500; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x x x i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x x x i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x x x x x x x x o"; - min_write_delay = 4500; - max_write_delay = 4500; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x x x x x x x x o"; + min_write_delay = 4500; + max_write_delay = 4500; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; @@ -7215,185 +7215,185 @@ part # Close to ATtiny261 part - id = "t461"; - desc = "ATTINY461"; - has_debugwire = yes; - flash_instr = 0xB4, 0x00, 0x10; - eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, - 0xBC, 0x00, 0xB4, 0x00, 0xBA, 0x0D, 0xBB, 0xBC, - 0x99, 0xE1, 0xBB, 0xAC; + id = "t461"; + desc = "ATTINY461"; + has_debugwire = yes; + flash_instr = 0xB4, 0x00, 0x10; + eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, + 0xBC, 0x00, 0xB4, 0x00, 0xBA, 0x0D, 0xBB, 0xBC, + 0x99, 0xE1, 0xBB, 0xAC; # stk500_devcode = 0x21; # avr910_devcode = 0x5e; - signature = 0x1e 0x92 0x08; - pagel = 0xb3; - bs2 = 0xb2; - chip_erase_delay = 4000; + signature = 0x1e 0x92 0x08; + pagel = 0xb3; + bs2 = 0xb2; + chip_erase_delay = 4000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = - 0xC4, 0xE4, 0xC4, 0xE4, 0xCC, 0xEC, 0xCC, 0xEC, - 0xD4, 0xF4, 0xD4, 0xF4, 0xDC, 0xFC, 0xDC, 0xFC, - 0xC8, 0xE8, 0xD8, 0xF8, 0x4C, 0x6C, 0x5C, 0x7C, - 0xEC, 0xBC, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 2; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0xC4, 0xE4, 0xC4, 0xE4, 0xCC, 0xEC, 0xCC, 0xEC, + 0xD4, 0xF4, 0xD4, 0xF4, 0xDC, 0xFC, 0xDC, 0xFC, + 0xC8, 0xE8, 0xD8, 0xF8, 0x4C, 0x6C, 0x5C, 0x7C, + 0xEC, 0xBC, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 2; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - memory "eeprom" - paged = no; - size = 256; - page_size = 4; - num_pages = 64; - min_write_delay = 4000; - max_write_delay = 4000; - readback_p1 = 0xff; - readback_p2 = 0xff; + memory "eeprom" + paged = no; + size = 256; + page_size = 4; + num_pages = 64; + min_write_delay = 4000; + max_write_delay = 4000; + readback_p1 = 0xff; + readback_p2 = 0xff; - read = " 1 0 1 0 0 0 0 0 x x x x x x x x", - "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; + read = " 1 0 1 0 0 0 0 0 x x x x x x x x", + "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0 x x x x x x x x", - "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0 x x x x x x x x", + "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x x x", " a7 a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 4; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 4; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 4096; - page_size = 64; - num_pages = 64; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; + memory "flash" + paged = yes; + size = 4096; + page_size = 64; + num_pages = 64; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " x x x x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_lo = " 0 0 1 0 0 0 0 0", + " x x x x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " x x x x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " x x x x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " x x x x x a10 a9 a8", - " a7 a6 a5 x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " x x x x x a10 a9 a8", + " a7 a6 a5 x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 64; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 64; + readsize = 256; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 a1 a0 o o o o o o o o"; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 x x x x x x x x", - "x x x x x x x x x x x x x x o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 x x x x x x x x", + "x x x x x x x x x x x x x x o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 1 1 1 i i", - "x x x x x x x x x x x x x x x x"; - min_write_delay = 4500; - max_write_delay = 4500; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 1 1 1 i i", + "x x x x x x x x x x x x x x x x"; + min_write_delay = 4500; + max_write_delay = 4500; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 4500; - max_write_delay = 4500; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 4500; + max_write_delay = 4500; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 4500; - max_write_delay = 4500; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 4500; + max_write_delay = 4500; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x x x i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x x x i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x x x x x x x x o"; - min_write_delay = 4500; - max_write_delay = 4500; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x x x x x x x x o"; + min_write_delay = 4500; + max_write_delay = 4500; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; @@ -7404,185 +7404,185 @@ part # Close to ATtiny461 part - id = "t861"; - desc = "ATTINY861"; - has_debugwire = yes; - flash_instr = 0xB4, 0x00, 0x10; - eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, - 0xBC, 0x00, 0xB4, 0x00, 0xBA, 0x0D, 0xBB, 0xBC, - 0x99, 0xE1, 0xBB, 0xAC; + id = "t861"; + desc = "ATTINY861"; + has_debugwire = yes; + flash_instr = 0xB4, 0x00, 0x10; + eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, + 0xBC, 0x00, 0xB4, 0x00, 0xBA, 0x0D, 0xBB, 0xBC, + 0x99, 0xE1, 0xBB, 0xAC; # stk500_devcode = 0x21; # avr910_devcode = 0x5e; - signature = 0x1e 0x93 0x0d; - pagel = 0xb3; - bs2 = 0xb2; - chip_erase_delay = 4000; + signature = 0x1e 0x93 0x0d; + pagel = 0xb3; + bs2 = 0xb2; + chip_erase_delay = 4000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 0; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 0; - pp_controlstack = - 0xC4, 0xE4, 0xC4, 0xE4, 0xCC, 0xEC, 0xCC, 0xEC, - 0xD4, 0xF4, 0xD4, 0xF4, 0xDC, 0xFC, 0xDC, 0xFC, - 0xC8, 0xE8, 0xD8, 0xF8, 0x4C, 0x6C, 0x5C, 0x7C, - 0xEC, 0xBC, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 2; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0xC4, 0xE4, 0xC4, 0xE4, 0xCC, 0xEC, 0xCC, 0xEC, + 0xD4, 0xF4, 0xD4, 0xF4, 0xDC, 0xFC, 0xDC, 0xFC, + 0xC8, 0xE8, 0xD8, 0xF8, 0x4C, 0x6C, 0x5C, 0x7C, + 0xEC, 0xBC, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 2; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - memory "eeprom" - paged = no; - size = 512; - num_pages = 128; - page_size = 4; - min_write_delay = 4000; - max_write_delay = 4000; - readback_p1 = 0xff; - readback_p2 = 0xff; + memory "eeprom" + paged = no; + size = 512; + num_pages = 128; + page_size = 4; + min_write_delay = 4000; + max_write_delay = 4000; + readback_p1 = 0xff; + readback_p2 = 0xff; - read = " 1 0 1 0 0 0 0 0 x x x x x x x a8", - "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; + read = " 1 0 1 0 0 0 0 0 x x x x x x x a8", + "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0 x x x x x x x a8", - "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0 x x x x x x x a8", + "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x x a8", " a7 a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 4; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 4; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 8192; - page_size = 64; - num_pages = 128; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; + memory "flash" + paged = yes; + size = 8192; + page_size = 64; + num_pages = 128; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_lo = " 0 0 1 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 64; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 64; + readsize = 256; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 a1 a0 o o o o o o o o"; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 x x x x x x x x", - "x x x x x x x x x x x x x x o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 x x x x x x x x", + "x x x x x x x x x x x x x x o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 1 1 1 i i", - "x x x x x x x x x x x x x x x x"; - min_write_delay = 4500; - max_write_delay = 4500; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 1 1 1 i i", + "x x x x x x x x x x x x x x x x"; + min_write_delay = 4500; + max_write_delay = 4500; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 4500; - max_write_delay = 4500; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 4500; + max_write_delay = 4500; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 4500; - max_write_delay = 4500; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 4500; + max_write_delay = 4500; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x x x i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x x x i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x x x x x x x x o"; - min_write_delay = 4500; - max_write_delay = 4500; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x x x x x x x x o"; + min_write_delay = 4500; + max_write_delay = 4500; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; @@ -7592,185 +7592,185 @@ part #------------------------------------------------------------ part - id = "m48"; - desc = "ATMEGA48"; - has_debugwire = yes; - flash_instr = 0xB6, 0x01, 0x11; - eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00, - 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF, - 0x99, 0xF9, 0xBB, 0xAF; - stk500_devcode = 0x59; + id = "m48"; + desc = "ATMEGA48"; + has_debugwire = yes; + flash_instr = 0xB6, 0x01, 0x11; + eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00, + 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF, + 0x99, 0xF9, 0xBB, 0xAF; + stk500_devcode = 0x59; # avr910_devcode = 0x; - signature = 0x1e 0x92 0x05; - pagel = 0xd7; - bs2 = 0xc2; - chip_erase_delay = 45000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + signature = 0x1e 0x92 0x05; + pagel = 0xd7; + bs2 = 0xc2; + chip_erase_delay = 45000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = + pp_controlstack = 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - resetdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + resetdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - memory "eeprom" - paged = no; - page_size = 4; - size = 256; - min_write_delay = 3600; - max_write_delay = 3600; - readback_p1 = 0xff; - readback_p2 = 0xff; + memory "eeprom" + paged = no; + page_size = 4; + size = 256; + min_write_delay = 3600; + max_write_delay = 3600; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " 0 0 0 x x x x x", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " 0 0 0 x x x x x", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " 0 0 0 x x x x x", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " 0 0 0 x x x x x", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x x x", " a7 a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 5; - blocksize = 4; - readsize = 256; - ; - memory "flash" - paged = yes; - size = 4096; - page_size = 64; - num_pages = 64; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0x00; - readback_p2 = 0x00; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 0 0 0 0 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x41; + delay = 5; + blocksize = 4; + readsize = 256; + ; + memory "flash" + paged = yes; + size = 4096; + page_size = 64; + num_pages = 64; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0x00; + readback_p2 = 0x00; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 0 0 0 0 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 0 0 0 0 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 0 0 0 0 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 0 0 0 0 a10 a9 a8", - " a7 a6 a5 x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 0 0 0 0 a10 a9 a8", + " a7 a6 a5 x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 64; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 64; + readsize = 256; + ; - memory "lfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "lfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "hfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "hfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "efuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x x x x x x x x o"; + memory "efuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x x x x x x x x o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x x x i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x x x i"; + ; - memory "lock" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; @@ -7779,185 +7779,185 @@ part #------------------------------------------------------------ part - id = "m88"; - desc = "ATMEGA88"; - has_debugwire = yes; - flash_instr = 0xB6, 0x01, 0x11; - eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00, - 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF, - 0x99, 0xF9, 0xBB, 0xAF; - stk500_devcode = 0x73; + id = "m88"; + desc = "ATMEGA88"; + has_debugwire = yes; + flash_instr = 0xB6, 0x01, 0x11; + eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00, + 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF, + 0x99, 0xF9, 0xBB, 0xAF; + stk500_devcode = 0x73; # avr910_devcode = 0x; - signature = 0x1e 0x93 0x0a; - pagel = 0xd7; - bs2 = 0xc2; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + signature = 0x1e 0x93 0x0a; + pagel = 0xd7; + bs2 = 0xc2; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = + pp_controlstack = 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - resetdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + resetdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - memory "eeprom" - paged = no; - page_size = 4; - size = 512; - min_write_delay = 3600; - max_write_delay = 3600; - readback_p1 = 0xff; - readback_p2 = 0xff; + memory "eeprom" + paged = no; + page_size = 4; + size = 512; + min_write_delay = 3600; + max_write_delay = 3600; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " 0 0 0 x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " 0 0 0 x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " 0 0 0 x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " 0 0 0 x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x x a8", " a7 a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 5; - blocksize = 4; - readsize = 256; - ; - memory "flash" - paged = yes; - size = 8192; - page_size = 64; - num_pages = 128; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x41; + delay = 5; + blocksize = 4; + readsize = 256; + ; + memory "flash" + paged = yes; + size = 8192; + page_size = 64; + num_pages = 128; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 64; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 64; + readsize = 256; + ; - memory "lfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "lfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "hfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "hfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "efuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x x x x x x o o o"; + memory "efuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x x x x x x o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x i i i"; + ; - memory "lock" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -7965,187 +7965,187 @@ part #------------------------------------------------------------ part - id = "m168"; - desc = "ATMEGA168"; - has_debugwire = yes; - flash_instr = 0xB6, 0x01, 0x11; - eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00, - 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF, - 0x99, 0xF9, 0xBB, 0xAF; - stk500_devcode = 0x86; - # avr910_devcode = 0x; - signature = 0x1e 0x94 0x06; - pagel = 0xd7; - bs2 = 0xc2; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + id = "m168"; + desc = "ATMEGA168"; + has_debugwire = yes; + flash_instr = 0xB6, 0x01, 0x11; + eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00, + 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF, + 0x99, 0xF9, 0xBB, 0xAF; + stk500_devcode = 0x86; + # avr910_devcode = 0x; + signature = 0x1e 0x94 0x06; + pagel = 0xd7; + bs2 = 0xc2; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = + pp_controlstack = 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - resetdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + resetdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - memory "eeprom" - paged = no; - page_size = 4; - size = 512; - min_write_delay = 3600; - max_write_delay = 3600; - readback_p1 = 0xff; - readback_p2 = 0xff; - read = " 1 0 1 0 0 0 0 0", - " 0 0 0 x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "eeprom" + paged = no; + page_size = 4; + size = 512; + min_write_delay = 3600; + max_write_delay = 3600; + readback_p1 = 0xff; + readback_p2 = 0xff; + read = " 1 0 1 0 0 0 0 0", + " 0 0 0 x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0", - " 0 0 0 x x x x a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0", + " 0 0 0 x x x x a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x x a8", " a7 a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 5; - blocksize = 4; - readsize = 256; - ; + mode = 0x41; + delay = 5; + blocksize = 4; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 16384; - page_size = 128; - num_pages = 128; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 0 0 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 16384; + page_size = 128; + num_pages = 128; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 0 0 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 0 0 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 0 0 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 0 0 a12 a11 a10 a9 a8", - " a7 a6 x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 0 0 a12 a11 a10 a9 a8", + " a7 a6 x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 128; - readsize = 256; + mode = 0x41; + delay = 6; + blocksize = 128; + readsize = 256; - ; + ; - memory "lfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "lfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "hfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "hfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "efuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x x x x x x o o o"; + memory "efuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x x x x x x o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x i i i"; + ; - memory "lock" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -8153,185 +8153,185 @@ part #------------------------------------------------------------ part - id = "t88"; - desc = "attiny88"; - has_debugwire = yes; - flash_instr = 0xB6, 0x01, 0x11; - eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00, - 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF, - 0x99, 0xF9, 0xBB, 0xAF; - stk500_devcode = 0x73; + id = "t88"; + desc = "attiny88"; + has_debugwire = yes; + flash_instr = 0xB6, 0x01, 0x11; + eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00, + 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF, + 0x99, 0xF9, 0xBB, 0xAF; + stk500_devcode = 0x73; # avr910_devcode = 0x; - signature = 0x1e 0x93 0x11; - pagel = 0xd7; - bs2 = 0xc2; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + signature = 0x1e 0x93 0x11; + pagel = 0xd7; + bs2 = 0xc2; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = + pp_controlstack = 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - resetdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + resetdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - memory "eeprom" - paged = no; - page_size = 4; - size = 64; - min_write_delay = 3600; - max_write_delay = 3600; - readback_p1 = 0xff; - readback_p2 = 0xff; + memory "eeprom" + paged = no; + page_size = 4; + size = 64; + min_write_delay = 3600; + max_write_delay = 3600; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " 0 0 0 x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " 0 0 0 x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " 0 0 0 x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " 0 0 0 x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x x x", " x a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 5; - blocksize = 4; - readsize = 64; - ; - memory "flash" - paged = yes; - size = 8192; - page_size = 64; - num_pages = 128; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x41; + delay = 5; + blocksize = 4; + readsize = 64; + ; + memory "flash" + paged = yes; + size = 8192; + page_size = 64; + num_pages = 128; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 64; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 64; + readsize = 256; + ; - memory "lfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "lfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "hfuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + memory "hfuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; + ; - memory "efuse" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x x x x x x o o o"; + memory "efuse" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x x x x x x o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x x x i"; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x x x i"; + ; - memory "lock" - size = 1; - min_write_delay = 4500; - max_write_delay = 4500; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + min_write_delay = 4500; + max_write_delay = 4500; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -8339,100 +8339,100 @@ part #------------------------------------------------------------ part - id = "m328p"; - desc = "ATMEGA328P"; - has_debugwire = yes; - flash_instr = 0xB6, 0x01, 0x11; - eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00, + id = "m328p"; + desc = "ATMEGA328P"; + has_debugwire = yes; + flash_instr = 0xB6, 0x01, 0x11; + eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00, 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF, 0x99, 0xF9, 0xBB, 0xAF; - stk500_devcode = 0x86; - # avr910_devcode = 0x; - signature = 0x1e 0x95 0x0F; - pagel = 0xd7; - bs2 = 0xc2; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + stk500_devcode = 0x86; + # avr910_devcode = 0x; + signature = 0x1e 0x95 0x0F; + pagel = 0xd7; + bs2 = 0xc2; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = + pp_controlstack = 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - resetdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + resetdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - memory "eeprom" - paged = no; - page_size = 4; - size = 1024; + memory "eeprom" + paged = no; + page_size = 4; + size = 1024; min_write_delay = 3600; max_write_delay = 3600; - readback_p1 = 0xff; - readback_p2 = 0xff; + readback_p1 = 0xff; + readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", - " 0 0 0 x x x a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + " 0 0 0 x x x a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; write = " 1 1 0 0 0 0 0 0", - " 0 0 0 x x x a9 a8", + " 0 0 0 x x x a9 a8", " a7 a6 a5 a4 a3 a2 a1 a0", " i i i i i i i i"; loadpage_lo = " 1 1 0 0 0 0 0 1", - " 0 0 0 0 0 0 0 0", - " 0 0 0 0 0 0 a1 a0", - " i i i i i i i i"; + " 0 0 0 0 0 0 0 0", + " 0 0 0 0 0 0 a1 a0", + " i i i i i i i i"; writepage = " 1 1 0 0 0 0 1 0", - " 0 0 x x x x a9 a8", - " a7 a6 a5 a4 a3 a2 0 0", - " x x x x x x x x"; + " 0 0 x x x x a9 a8", + " a7 a6 a5 a4 a3 a2 0 0", + " x x x x x x x x"; - mode = 0x41; - delay = 5; - blocksize = 4; - readsize = 256; - ; + mode = 0x41; + delay = 5; + blocksize = 4; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 32768; - page_size = 128; - num_pages = 256; + memory "flash" + paged = yes; + size = 32768; + page_size = 128; + num_pages = 256; min_write_delay = 4500; max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; + readback_p1 = 0xff; + readback_p2 = 0xff; read_lo = " 0 0 1 0 0 0 0 0", " 0 0 a13 a12 a11 a10 a9 a8", " a7 a6 a5 a4 a3 a2 a1 a0", @@ -8444,82 +8444,82 @@ part " o o o o o o o o"; loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " 0 0 0 x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + " 0 0 0 x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; writepage = " 0 1 0 0 1 1 0 0", - " 0 0 a13 a12 a11 a10 a9 a8", - " a7 a6 x x x x x x", - " x x x x x x x x"; + " 0 0 a13 a12 a11 a10 a9 a8", + " a7 a6 x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 128; - readsize = 256; + mode = 0x41; + delay = 6; + blocksize = 128; + readsize = 256; - ; + ; - memory "lfuse" + memory "lfuse" size = 1; min_write_delay = 4500; max_write_delay = 4500; read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; + "x x x x x x x x o o o o o o o o"; write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + "x x x x x x x x i i i i i i i i"; + ; - memory "hfuse" + memory "hfuse" size = 1; min_write_delay = 4500; max_write_delay = 4500; read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; + "x x x x x x x x o o o o o o o o"; write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; - ; + "x x x x x x x x i i i i i i i i"; + ; - memory "efuse" + memory "efuse" size = 1; min_write_delay = 4500; max_write_delay = 4500; read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x x x x x x o o o"; + "x x x x x x x x x x x x x o o o"; write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x i i i"; - ; + "x x x x x x x x x x x x x i i i"; + ; - memory "lock" + memory "lock" size = 1; min_write_delay = 4500; max_write_delay = 4500; read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + "x x x x x x x x x x o o o o o o"; write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - ; + "x x x x x x x x 1 1 i i i i i i"; + ; - memory "calibration" + memory "calibration" size = 1; read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; - memory "signature" + memory "signature" size = 3; read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + "x x x x x x a1 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -8527,186 +8527,186 @@ part #------------------------------------------------------------ part - id = "t2313"; - desc = "ATtiny2313"; - has_debugwire = yes; - flash_instr = 0xB2, 0x0F, 0x1F; - eeprom_instr = 0xBB, 0xFE, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, - 0xBA, 0x0F, 0xB2, 0x0F, 0xBA, 0x0D, 0xBB, 0xBC, - 0x99, 0xE1, 0xBB, 0xAC; - stk500_devcode = 0x23; + id = "t2313"; + desc = "ATtiny2313"; + has_debugwire = yes; + flash_instr = 0xB2, 0x0F, 0x1F; + eeprom_instr = 0xBB, 0xFE, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, + 0xBA, 0x0F, 0xB2, 0x0F, 0xBA, 0x0D, 0xBB, 0xBC, + 0x99, 0xE1, 0xBB, 0xAC; + stk500_devcode = 0x23; ## Use the ATtiny26 devcode: - avr910_devcode = 0x5e; - signature = 0x1e 0x91 0x0a; - pagel = 0xD4; - bs2 = 0xD6; - reset = io; - chip_erase_delay = 9000; + avr910_devcode = 0x5e; + signature = 0x1e 0x91 0x0a; + pagel = 0xD4; + bs2 = 0xD6; + reset = io; + chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0E, 0x1E, 0x2E, 0x3E, 0x2E, 0x3E, - 0x4E, 0x5E, 0x4E, 0x5E, 0x6E, 0x7E, 0x6E, 0x7E, - 0x26, 0x36, 0x66, 0x76, 0x2A, 0x3A, 0x6A, 0x7A, - 0x2E, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0E, 0x1E, 0x2E, 0x3E, 0x2E, 0x3E, + 0x4E, 0x5E, 0x4E, 0x5E, 0x6E, 0x7E, 0x6E, 0x7E, + 0x26, 0x36, 0x66, 0x76, 0x2A, 0x3A, 0x6A, 0x7A, + 0x2E, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - memory "eeprom" - size = 128; - paged = no; - page_size = 4; - min_write_delay = 4000; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read = "1 0 1 0 0 0 0 0 0 0 0 x x x x x", - "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 128; + paged = no; + page_size = 4; + min_write_delay = 4000; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read = "1 0 1 0 0 0 0 0 0 0 0 x x x x x", + "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = "1 1 0 0 0 0 0 0 0 0 0 x x x x x", - "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = "1 1 0 0 0 0 0 0 0 0 0 x x x x x", + "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x x x", " x a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 4; - readsize = 256; - ; - memory "flash" - paged = yes; - size = 2048; - page_size = 32; - num_pages = 64; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 0 0 0 0 0 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x41; + delay = 6; + blocksize = 4; + readsize = 256; + ; + memory "flash" + paged = yes; + size = 2048; + page_size = 32; + num_pages = 64; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 0 0 0 0 0 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 0 0 0 0 0 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 0 0 0 0 0 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; # The information in the data sheet of April/2004 is wrong, this works: - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 x x x x x", - " x x x x a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 x x x x x", + " x x x x a3 a2 a1 a0", + " i i i i i i i i"; # The information in the data sheet of April/2004 is wrong, this works: - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 x x x x x", - " x x x x a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 x x x x x", + " x x x x a3 a2 a1 a0", + " i i i i i i i i"; # The information in the data sheet of April/2004 is wrong, this works: - writepage = " 0 1 0 0 1 1 0 0", - " 0 0 0 0 0 0 a9 a8", - " a7 a6 a5 a4 x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 0 0 0 0 0 a9 a8", + " a7 a6 a5 a4 x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 32; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 32; + readsize = 256; + ; # ATtiny2313 has Signature Bytes: 0x1E 0x91 0x0A. - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; - memory "lock" - size = 1; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; + memory "lock" + size = 1; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x x x i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x x x i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; # The Tiny2313 has calibration data for both 4 MHz and 8 MHz. # The information in the data sheet of April/2004 is wrong, this works: - memory "calibration" - size = 2; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 a0 o o o o o o o o"; - ; + memory "calibration" + size = 2; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -8714,181 +8714,181 @@ part #------------------------------------------------------------ part - id = "pwm2"; - desc = "AT90PWM2"; - has_debugwire = yes; - flash_instr = 0xB6, 0x01, 0x11; - eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00, - 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF, - 0x99, 0xF9, 0xBB, 0xAF; - stk500_devcode = 0x65; + id = "pwm2"; + desc = "AT90PWM2"; + has_debugwire = yes; + flash_instr = 0xB6, 0x01, 0x11; + eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00, + 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF, + 0x99, 0xF9, 0xBB, 0xAF; + stk500_devcode = 0x65; ## avr910_devcode = ?; - signature = 0x1e 0x93 0x81; - pagel = 0xD8; - bs2 = 0xE2; - reset = io; - chip_erase_delay = 9000; + signature = 0x1e 0x93 0x81; + pagel = 0xD8; + bs2 = 0xE2; + reset = io; + chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - memory "eeprom" - size = 512; - paged = no; - page_size = 4; - min_write_delay = 4000; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read = "1 0 1 0 0 0 0 0 0 0 0 x x x x a8", - "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 512; + paged = no; + page_size = 4; + min_write_delay = 4000; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read = "1 0 1 0 0 0 0 0 0 0 0 x x x x a8", + "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = "1 1 0 0 0 0 0 0 0 0 0 x x x x a8", - "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = "1 1 0 0 0 0 0 0 0 0 0 x x x x a8", + "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x x x", " a7 a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 4; - readsize = 256; - ; - memory "flash" - paged = yes; - size = 8192; - page_size = 64; - num_pages = 128; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x41; + delay = 6; + blocksize = 4; + readsize = 256; + ; + memory "flash" + paged = yes; + size = 8192; + page_size = 64; + num_pages = 128; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 64; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 64; + readsize = 256; + ; # AT90PWM2 has Signature Bytes: 0x1E 0x93 0x81. - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; - memory "lock" - size = 1; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; + memory "lock" + size = 1; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x x x i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x x x i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -8898,181 +8898,181 @@ part # Completely identical to AT90PWM2 (including the signature!) part - id = "pwm3"; - desc = "AT90PWM3"; - has_debugwire = yes; - flash_instr = 0xB6, 0x01, 0x11; - eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00, - 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF, - 0x99, 0xF9, 0xBB, 0xAF; - stk500_devcode = 0x65; + id = "pwm3"; + desc = "AT90PWM3"; + has_debugwire = yes; + flash_instr = 0xB6, 0x01, 0x11; + eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00, + 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF, + 0x99, 0xF9, 0xBB, 0xAF; + stk500_devcode = 0x65; ## avr910_devcode = ?; - signature = 0x1e 0x93 0x81; - pagel = 0xD8; - bs2 = 0xE2; - reset = io; - chip_erase_delay = 9000; + signature = 0x1e 0x93 0x81; + pagel = 0xD8; + bs2 = 0xE2; + reset = io; + chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - memory "eeprom" - size = 512; - paged = no; - page_size = 4; - min_write_delay = 4000; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read = "1 0 1 0 0 0 0 0 0 0 0 x x x x a8", - "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 512; + paged = no; + page_size = 4; + min_write_delay = 4000; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read = "1 0 1 0 0 0 0 0 0 0 0 x x x x a8", + "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = "1 1 0 0 0 0 0 0 0 0 0 x x x x a8", - "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = "1 1 0 0 0 0 0 0 0 0 0 x x x x a8", + "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x x x", " a7 a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 4; - readsize = 256; - ; - memory "flash" - paged = yes; - size = 8192; - page_size = 64; - num_pages = 128; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x41; + delay = 6; + blocksize = 4; + readsize = 256; + ; + memory "flash" + paged = yes; + size = 8192; + page_size = 64; + num_pages = 128; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 64; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 64; + readsize = 256; + ; # AT90PWM2 has Signature Bytes: 0x1E 0x93 0x81. - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; - memory "lock" - size = 1; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; + memory "lock" + size = 1; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x x x i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x x x i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -9081,180 +9081,180 @@ part # Same as AT90PWM2 but different signature. part - id = "pwm2b"; - desc = "AT90PWM2B"; - has_debugwire = yes; - flash_instr = 0xB6, 0x01, 0x11; - eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00, - 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF, - 0x99, 0xF9, 0xBB, 0xAF; - stk500_devcode = 0x65; + id = "pwm2b"; + desc = "AT90PWM2B"; + has_debugwire = yes; + flash_instr = 0xB6, 0x01, 0x11; + eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00, + 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF, + 0x99, 0xF9, 0xBB, 0xAF; + stk500_devcode = 0x65; ## avr910_devcode = ?; - signature = 0x1e 0x93 0x83; - pagel = 0xD8; - bs2 = 0xE2; - reset = io; - chip_erase_delay = 9000; + signature = 0x1e 0x93 0x83; + pagel = 0xD8; + bs2 = 0xE2; + reset = io; + chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - memory "eeprom" - size = 512; - paged = no; - page_size = 4; - min_write_delay = 4000; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read = "1 0 1 0 0 0 0 0 0 0 0 x x x x a8", - "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 512; + paged = no; + page_size = 4; + min_write_delay = 4000; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read = "1 0 1 0 0 0 0 0 0 0 0 x x x x a8", + "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = "1 1 0 0 0 0 0 0 0 0 0 x x x x a8", - "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = "1 1 0 0 0 0 0 0 0 0 0 x x x x a8", + "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x x x", " a7 a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 4; - readsize = 256; - ; - memory "flash" - paged = yes; - size = 8192; - page_size = 64; - num_pages = 128; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x41; + delay = 6; + blocksize = 4; + readsize = 256; + ; + memory "flash" + paged = yes; + size = 8192; + page_size = 64; + num_pages = 128; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 64; - readsize = 256; - ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; - memory "lock" - size = 1; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; + mode = 0x41; + delay = 6; + blocksize = 64; + readsize = 256; + ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; + memory "lock" + size = 1; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x x x i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x x x i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -9264,180 +9264,180 @@ part # Completely identical to AT90PWM2B (including the signature!) part - id = "pwm3b"; - desc = "AT90PWM3B"; - has_debugwire = yes; - flash_instr = 0xB6, 0x01, 0x11; - eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00, - 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF, - 0x99, 0xF9, 0xBB, 0xAF; - stk500_devcode = 0x65; + id = "pwm3b"; + desc = "AT90PWM3B"; + has_debugwire = yes; + flash_instr = 0xB6, 0x01, 0x11; + eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00, + 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF, + 0x99, 0xF9, 0xBB, 0xAF; + stk500_devcode = 0x65; ## avr910_devcode = ?; - signature = 0x1e 0x93 0x83; - pagel = 0xD8; - bs2 = 0xE2; - reset = io; - chip_erase_delay = 9000; + signature = 0x1e 0x93 0x83; + pagel = 0xD8; + bs2 = 0xE2; + reset = io; + chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - memory "eeprom" - size = 512; - paged = no; - page_size = 4; - min_write_delay = 4000; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read = "1 0 1 0 0 0 0 0 0 0 0 x x x x a8", - "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 512; + paged = no; + page_size = 4; + min_write_delay = 4000; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read = "1 0 1 0 0 0 0 0 0 0 0 x x x x a8", + "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = "1 1 0 0 0 0 0 0 0 0 0 x x x x a8", - "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = "1 1 0 0 0 0 0 0 0 0 0 x x x x a8", + "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x x x", " a7 a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 4; - readsize = 256; - ; - memory "flash" - paged = yes; - size = 8192; - page_size = 64; - num_pages = 128; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x41; + delay = 6; + blocksize = 4; + readsize = 256; + ; + memory "flash" + paged = yes; + size = 8192; + page_size = 64; + num_pages = 128; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 64; - readsize = 256; - ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; - memory "lock" - size = 1; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; + mode = 0x41; + delay = 6; + blocksize = 64; + readsize = 256; + ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; + memory "lock" + size = 1; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x x x i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x x x i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -9445,179 +9445,179 @@ part #------------------------------------------------------------ part - id = "t25"; - desc = "ATtiny25"; - has_debugwire = yes; - flash_instr = 0xB4, 0x02, 0x12; - eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, - 0xBC, 0x02, 0xB4, 0x02, 0xBA, 0x0D, 0xBB, 0xBC, - 0x99, 0xE1, 0xBB, 0xAC; + id = "t25"; + desc = "ATtiny25"; + has_debugwire = yes; + flash_instr = 0xB4, 0x02, 0x12; + eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, + 0xBC, 0x02, 0xB4, 0x02, 0xBA, 0x0D, 0xBB, 0xBC, + 0x99, 0xE1, 0xBB, 0xAC; ## no STK500 devcode in XML file, use the ATtiny45 one - stk500_devcode = 0x14; + stk500_devcode = 0x14; ## avr910_devcode = ?; ## Try the AT90S2313 devcode: - avr910_devcode = 0x20; - signature = 0x1e 0x91 0x08; - reset = io; - chip_erase_delay = 4500; + avr910_devcode = 0x20; + signature = 0x1e 0x91 0x08; + reset = io; + chip_erase_delay = 4500; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - hvsp_controlstack = - 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66, - 0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78, - 0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10, - 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00; - hventerstabdelay = 100; - hvspcmdexedelay = 0; - synchcycles = 6; - latchcycles = 1; - togglevtg = 1; - poweroffdelay = 25; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 100; - resetdelay = 25; - chiperasepolltimeout = 40; - chiperasetime = 0; - programfusepolltimeout = 25; - programlockpolltimeout = 25; + hvsp_controlstack = + 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66, + 0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78, + 0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10, + 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00; + hventerstabdelay = 100; + hvspcmdexedelay = 0; + synchcycles = 6; + latchcycles = 1; + togglevtg = 1; + poweroffdelay = 25; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 100; + resetdelay = 25; + chiperasepolltimeout = 40; + chiperasetime = 0; + programfusepolltimeout = 25; + programlockpolltimeout = 25; - memory "eeprom" - size = 128; - paged = no; - page_size = 4; - min_write_delay = 4000; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read = "1 0 1 0 0 0 0 0 0 0 0 x x x x x", - "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 128; + paged = no; + page_size = 4; + min_write_delay = 4000; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read = "1 0 1 0 0 0 0 0 0 0 0 x x x x x", + "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = "1 1 0 0 0 0 0 0 0 0 0 x x x x x", - "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = "1 1 0 0 0 0 0 0 0 0 0 x x x x x", + "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x x x", " x a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 4; - readsize = 256; - ; - memory "flash" - paged = yes; - size = 2048; - page_size = 32; - num_pages = 64; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 0 0 0 0 0 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x41; + delay = 6; + blocksize = 4; + readsize = 256; + ; + memory "flash" + paged = yes; + size = 2048; + page_size = 32; + num_pages = 64; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 0 0 0 0 0 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 0 0 0 0 0 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 0 0 0 0 0 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 x x x x x", - " x x x x a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 x x x x x", + " x x x x a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 x x x x x", - " x x x x a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 x x x x x", + " x x x x a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 0 0 0 0 0 a9 a8", - " a7 a6 a5 a4 x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 0 0 0 0 0 a9 a8", + " a7 a6 a5 a4 x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 32; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 32; + readsize = 256; + ; # ATtiny25 has Signature Bytes: 0x1E 0x91 0x08. - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; - memory "lock" - size = 1; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; + memory "lock" + size = 1; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x x x i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x x x i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 2; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 a0 o o o o o o o o"; - ; + memory "calibration" + size = 2; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -9625,178 +9625,178 @@ part #------------------------------------------------------------ part - id = "t45"; - desc = "ATtiny45"; - has_debugwire = yes; - flash_instr = 0xB4, 0x02, 0x12; - eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, - 0xBC, 0x02, 0xB4, 0x02, 0xBA, 0x0D, 0xBB, 0xBC, - 0x99, 0xE1, 0xBB, 0xAC; - stk500_devcode = 0x14; + id = "t45"; + desc = "ATtiny45"; + has_debugwire = yes; + flash_instr = 0xB4, 0x02, 0x12; + eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, + 0xBC, 0x02, 0xB4, 0x02, 0xBA, 0x0D, 0xBB, 0xBC, + 0x99, 0xE1, 0xBB, 0xAC; + stk500_devcode = 0x14; ## avr910_devcode = ?; ## Try the AT90S2313 devcode: - avr910_devcode = 0x20; - signature = 0x1e 0x92 0x06; - reset = io; - chip_erase_delay = 4500; + avr910_devcode = 0x20; + signature = 0x1e 0x92 0x06; + reset = io; + chip_erase_delay = 4500; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - hvsp_controlstack = + hvsp_controlstack = 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66, - 0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78, - 0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10, - 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - hvspcmdexedelay = 0; - synchcycles = 6; - latchcycles = 1; - togglevtg = 1; - poweroffdelay = 25; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 100; - resetdelay = 25; - chiperasepolltimeout = 40; - chiperasetime = 0; - programfusepolltimeout = 25; - programlockpolltimeout = 25; + 0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78, + 0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10, + 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + hvspcmdexedelay = 0; + synchcycles = 6; + latchcycles = 1; + togglevtg = 1; + poweroffdelay = 25; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 100; + resetdelay = 25; + chiperasepolltimeout = 40; + chiperasetime = 0; + programfusepolltimeout = 25; + programlockpolltimeout = 25; - memory "eeprom" - size = 256; - page_size = 4; - min_write_delay = 4000; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read = "1 0 1 0 0 0 0 0 0 0 0 x x x x x", - "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 256; + page_size = 4; + min_write_delay = 4000; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read = "1 0 1 0 0 0 0 0 0 0 0 x x x x x", + "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = "1 1 0 0 0 0 0 0 0 0 0 x x x x x", - "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = "1 1 0 0 0 0 0 0 0 0 0 x x x x x", + "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x x x", " a7 a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 4; - readsize = 256; - ; - memory "flash" - paged = yes; - size = 4096; - page_size = 64; - num_pages = 64; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 0 0 0 0 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x41; + delay = 6; + blocksize = 4; + readsize = 256; + ; + memory "flash" + paged = yes; + size = 4096; + page_size = 64; + num_pages = 64; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 0 0 0 0 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 0 0 0 0 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 0 0 0 0 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 0 0 0 0 a10 a9 a8", - " a7 a6 a5 x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 0 0 0 0 a10 a9 a8", + " a7 a6 a5 x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 32; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 32; + readsize = 256; + ; # ATtiny45 has Signature Bytes: 0x1E 0x92 0x08. (Data sheet 2586C-AVR-06/05 (doc2586.pdf) indicates otherwise!) - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; - memory "lock" - size = 1; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; + memory "lock" + size = 1; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x x x i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x x x i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 2; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 a0 o o o o o o o o"; - ; + memory "calibration" + size = 2; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -9804,179 +9804,179 @@ part #------------------------------------------------------------ part - id = "t85"; - desc = "ATtiny85"; - has_debugwire = yes; - flash_instr = 0xB4, 0x02, 0x12; - eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, - 0xBC, 0x02, 0xB4, 0x02, 0xBA, 0x0D, 0xBB, 0xBC, - 0x99, 0xE1, 0xBB, 0xAC; + id = "t85"; + desc = "ATtiny85"; + has_debugwire = yes; + flash_instr = 0xB4, 0x02, 0x12; + eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, + 0xBC, 0x02, 0xB4, 0x02, 0xBA, 0x0D, 0xBB, 0xBC, + 0x99, 0xE1, 0xBB, 0xAC; ## no STK500 devcode in XML file, use the ATtiny45 one - stk500_devcode = 0x14; + stk500_devcode = 0x14; ## avr910_devcode = ?; ## Try the AT90S2313 devcode: - avr910_devcode = 0x20; - signature = 0x1e 0x93 0x0b; - reset = io; - chip_erase_delay = 4500; + avr910_devcode = 0x20; + signature = 0x1e 0x93 0x0b; + reset = io; + chip_erase_delay = 4500; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - hvsp_controlstack = - 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66, - 0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78, - 0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10, - 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00; - hventerstabdelay = 100; - hvspcmdexedelay = 0; - synchcycles = 6; - latchcycles = 1; - togglevtg = 1; - poweroffdelay = 25; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 100; - resetdelay = 25; - chiperasepolltimeout = 40; - chiperasetime = 0; - programfusepolltimeout = 25; - programlockpolltimeout = 25; + hvsp_controlstack = + 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66, + 0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78, + 0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10, + 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00; + hventerstabdelay = 100; + hvspcmdexedelay = 0; + synchcycles = 6; + latchcycles = 1; + togglevtg = 1; + poweroffdelay = 25; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 100; + resetdelay = 25; + chiperasepolltimeout = 40; + chiperasetime = 0; + programfusepolltimeout = 25; + programlockpolltimeout = 25; - memory "eeprom" - size = 512; - paged = no; - page_size = 4; - min_write_delay = 4000; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read = "1 0 1 0 0 0 0 0 0 0 0 x x x x a8", - "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 512; + paged = no; + page_size = 4; + min_write_delay = 4000; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read = "1 0 1 0 0 0 0 0 0 0 0 x x x x a8", + "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = "1 1 0 0 0 0 0 0 0 0 0 x x x x a8", - "a8 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = "1 1 0 0 0 0 0 0 0 0 0 x x x x a8", + "a8 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x x a8", " a7 a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 4; - readsize = 256; - ; - memory "flash" - paged = yes; - size = 8192; - page_size = 64; - num_pages = 128; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x41; + delay = 6; + blocksize = 4; + readsize = 256; + ; + memory "flash" + paged = yes; + size = 8192; + page_size = 64; + num_pages = 128; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 32; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 32; + readsize = 256; + ; # ATtiny85 has Signature Bytes: 0x1E 0x93 0x08. - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; - memory "lock" - size = 1; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; + memory "lock" + size = 1; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x x x i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x x x i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 2; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 a0 o o o o o o o o"; - ; + memory "calibration" + size = 2; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -9985,187 +9985,187 @@ part # Almost same as ATmega1280, except for different memory sizes part - id = "m640"; - desc = "ATMEGA640"; - signature = 0x1e 0x96 0x08; - has_jtag = yes; + id = "m640"; + desc = "ATMEGA640"; + signature = 0x1e 0x96 0x08; + has_jtag = yes; # stk500_devcode = 0xB2; # avr910_devcode = 0x43; - chip_erase_delay = 9000; - pagel = 0xD7; - bs2 = 0xA0; - reset = dedicated; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + chip_erase_delay = 9000; + pagel = 0xD7; + bs2 = 0xA0; + reset = dedicated; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - rampz = 0x3b; - allowfullpagebitstream = no; + idr = 0x31; + spmcr = 0x57; + rampz = 0x3b; + allowfullpagebitstream = no; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 8; /* for parallel programming */ - size = 4096; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0x00; - readback_p2 = 0x00; - read = " 1 0 1 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 8; /* for parallel programming */ + size = 4096; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0x00; + readback_p2 = 0x00; + read = " 1 0 1 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 a2 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x a11 a10 a9 a8", " a7 a6 a5 a4 a3 0 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 8; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 8; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 65536; - page_size = 256; - num_pages = 256; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0x00; - readback_p2 = 0x00; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 65536; + page_size = 256; + num_pages = 256; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0x00; + readback_p2 = 0x00; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 a14 a13 a12 a11 a10 a9 a8", - " a7 x x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 a14 a13 a12 a11 a10 a9 a8", + " a7 x x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 256; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 256; + readsize = 256; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x i i i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -10173,187 +10173,187 @@ part #------------------------------------------------------------ part - id = "m1280"; - desc = "ATMEGA1280"; - signature = 0x1e 0x97 0x03; - has_jtag = yes; + id = "m1280"; + desc = "ATMEGA1280"; + signature = 0x1e 0x97 0x03; + has_jtag = yes; # stk500_devcode = 0xB2; # avr910_devcode = 0x43; - chip_erase_delay = 9000; - pagel = 0xD7; - bs2 = 0xA0; - reset = dedicated; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + chip_erase_delay = 9000; + pagel = 0xD7; + bs2 = 0xA0; + reset = dedicated; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - rampz = 0x3b; - allowfullpagebitstream = no; + idr = 0x31; + spmcr = 0x57; + rampz = 0x3b; + allowfullpagebitstream = no; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 8; /* for parallel programming */ - size = 4096; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0x00; - readback_p2 = 0x00; - read = " 1 0 1 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 8; /* for parallel programming */ + size = 4096; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0x00; + readback_p2 = 0x00; + read = " 1 0 1 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 a2 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x a11 a10 a9 a8", " a7 a6 a5 a4 a3 0 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 8; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 8; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 131072; - page_size = 256; - num_pages = 512; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0x00; - readback_p2 = 0x00; - read_lo = " 0 0 1 0 0 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 131072; + page_size = 256; + num_pages = 512; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0x00; + readback_p2 = 0x00; + read_lo = " 0 0 1 0 0 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 x x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 x x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 256; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 256; + readsize = 256; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x i i i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -10362,187 +10362,187 @@ part # Identical to ATmega1280 part - id = "m1281"; - desc = "ATMEGA1281"; - signature = 0x1e 0x97 0x04; - has_jtag = yes; + id = "m1281"; + desc = "ATMEGA1281"; + signature = 0x1e 0x97 0x04; + has_jtag = yes; # stk500_devcode = 0xB2; # avr910_devcode = 0x43; - chip_erase_delay = 9000; - pagel = 0xD7; - bs2 = 0xA0; - reset = dedicated; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + chip_erase_delay = 9000; + pagel = 0xD7; + bs2 = 0xA0; + reset = dedicated; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - rampz = 0x3b; - allowfullpagebitstream = no; + idr = 0x31; + spmcr = 0x57; + rampz = 0x3b; + allowfullpagebitstream = no; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 8; /* for parallel programming */ - size = 4096; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0x00; - readback_p2 = 0x00; - read = " 1 0 1 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 8; /* for parallel programming */ + size = 4096; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0x00; + readback_p2 = 0x00; + read = " 1 0 1 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 a2 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x a11 a10 a9 a8", " a7 a6 a5 a4 a3 0 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 8; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 8; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 131072; - page_size = 256; - num_pages = 512; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0x00; - readback_p2 = 0x00; - read_lo = " 0 0 1 0 0 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 131072; + page_size = 256; + num_pages = 512; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0x00; + readback_p2 = 0x00; + read_lo = " 0 0 1 0 0 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 x x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 x x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 256; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 256; + readsize = 256; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x i i i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -10550,192 +10550,192 @@ part #------------------------------------------------------------ part - id = "m2560"; - desc = "ATMEGA2560"; - signature = 0x1e 0x98 0x01; - has_jtag = yes; + id = "m2560"; + desc = "ATMEGA2560"; + signature = 0x1e 0x98 0x01; + has_jtag = yes; # stk500_devcode = 0xB2; # avr910_devcode = 0x43; - chip_erase_delay = 9000; - pagel = 0xD7; - bs2 = 0xA0; - reset = dedicated; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + chip_erase_delay = 9000; + pagel = 0xD7; + bs2 = 0xA0; + reset = dedicated; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - rampz = 0x3b; - allowfullpagebitstream = no; + idr = 0x31; + spmcr = 0x57; + rampz = 0x3b; + allowfullpagebitstream = no; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 8; /* for parallel programming */ - size = 4096; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0x00; - readback_p2 = 0x00; - read = " 1 0 1 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 8; /* for parallel programming */ + size = 4096; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0x00; + readback_p2 = 0x00; + read = " 1 0 1 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 a2 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x a11 a10 a9 a8", " a7 a6 a5 a4 a3 0 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 8; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 8; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 262144; - page_size = 256; - num_pages = 1024; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0x00; - readback_p2 = 0x00; - read_lo = " 0 0 1 0 0 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 262144; + page_size = 256; + num_pages = 1024; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0x00; + readback_p2 = 0x00; + read_lo = " 0 0 1 0 0 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 x x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 x x x x x x x", + " x x x x x x x x"; - load_ext_addr = " 0 1 0 0 1 1 0 1", - " 0 0 0 0 0 0 0 0", - " 0 0 0 0 0 0 0 a16", - " 0 0 0 0 0 0 0 0"; + load_ext_addr = " 0 1 0 0 1 1 0 1", + " 0 0 0 0 0 0 0 0", + " 0 0 0 0 0 0 0 a16", + " 0 0 0 0 0 0 0 0"; - mode = 0x41; - delay = 10; - blocksize = 256; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 256; + readsize = 256; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x i i i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -10743,192 +10743,192 @@ part #------------------------------------------------------------ part - id = "m2561"; - desc = "ATMEGA2561"; - signature = 0x1e 0x98 0x02; - has_jtag = yes; + id = "m2561"; + desc = "ATMEGA2561"; + signature = 0x1e 0x98 0x02; + has_jtag = yes; # stk500_devcode = 0xB2; # avr910_devcode = 0x43; - chip_erase_delay = 9000; - pagel = 0xD7; - bs2 = 0xA0; - reset = dedicated; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + chip_erase_delay = 9000; + pagel = 0xD7; + bs2 = 0xA0; + reset = dedicated; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - rampz = 0x3b; - allowfullpagebitstream = no; + idr = 0x31; + spmcr = 0x57; + rampz = 0x3b; + allowfullpagebitstream = no; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 8; /* for parallel programming */ - size = 4096; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0x00; - readback_p2 = 0x00; - read = " 1 0 1 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 8; /* for parallel programming */ + size = 4096; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0x00; + readback_p2 = 0x00; + read = " 1 0 1 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 a2 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x a11 a10 a9 a8", " a7 a6 a5 a4 a3 0 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 8; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 8; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 262144; - page_size = 256; - num_pages = 1024; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0x00; - readback_p2 = 0x00; - read_lo = " 0 0 1 0 0 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 262144; + page_size = 256; + num_pages = 1024; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0x00; + readback_p2 = 0x00; + read_lo = " 0 0 1 0 0 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 x x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 x x x x x x x", + " x x x x x x x x"; - load_ext_addr = " 0 1 0 0 1 1 0 1", - " 0 0 0 0 0 0 0 0", - " 0 0 0 0 0 0 0 a16", - " 0 0 0 0 0 0 0 0"; + load_ext_addr = " 0 1 0 0 1 1 0 1", + " 0 0 0 0 0 0 0 0", + " 0 0 0 0 0 0 0 a16", + " 0 0 0 0 0 0 0 0"; - mode = 0x41; - delay = 10; - blocksize = 256; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 256; + readsize = 256; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x i i i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -10937,187 +10937,187 @@ part # Identical to ATmega2561 but half the ROM part - id = "m128rfa1"; - desc = "ATMEGA128RFA1"; - signature = 0x1e 0xa7 0x01; - has_jtag = yes; + id = "m128rfa1"; + desc = "ATMEGA128RFA1"; + signature = 0x1e 0xa7 0x01; + has_jtag = yes; # stk500_devcode = 0xB2; # avr910_devcode = 0x43; - chip_erase_delay = 9000; - pagel = 0xD7; - bs2 = 0xE2; - reset = dedicated; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + chip_erase_delay = 9000; + pagel = 0xD7; + bs2 = 0xE2; + reset = dedicated; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - rampz = 0x3b; - allowfullpagebitstream = no; + idr = 0x31; + spmcr = 0x57; + rampz = 0x3b; + allowfullpagebitstream = no; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 8; /* for parallel programming */ - size = 4096; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0x00; - readback_p2 = 0x00; - read = " 1 0 1 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 8; /* for parallel programming */ + size = 4096; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0x00; + readback_p2 = 0x00; + read = " 1 0 1 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 a2 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x a11 a10 a9 a8", " a7 a6 a5 a4 a3 0 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 8; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 8; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 131072; - page_size = 256; - num_pages = 512; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0x00; - readback_p2 = 0x00; - read_lo = " 0 0 1 0 0 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 131072; + page_size = 256; + num_pages = 512; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0x00; + readback_p2 = 0x00; + read_lo = " 0 0 1 0 0 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 x x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 x x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 256; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 256; + readsize = 256; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x i i i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -11125,181 +11125,181 @@ part #------------------------------------------------------------ part - id = "t24"; - desc = "ATtiny24"; - has_debugwire = yes; - flash_instr = 0xB4, 0x07, 0x17; - eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, - 0xBC, 0x07, 0xB4, 0x07, 0xBA, 0x0D, 0xBB, 0xBC, - 0x99, 0xE1, 0xBB, 0xAC; + id = "t24"; + desc = "ATtiny24"; + has_debugwire = yes; + flash_instr = 0xB4, 0x07, 0x17; + eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, + 0xBC, 0x07, 0xB4, 0x07, 0xBA, 0x0D, 0xBB, 0xBC, + 0x99, 0xE1, 0xBB, 0xAC; ## no STK500 devcode in XML file, use the ATtiny45 one - stk500_devcode = 0x14; + stk500_devcode = 0x14; ## avr910_devcode = ?; ## Try the AT90S2313 devcode: - avr910_devcode = 0x20; - signature = 0x1e 0x91 0x0b; - reset = io; - chip_erase_delay = 4500; + avr910_devcode = 0x20; + signature = 0x1e 0x91 0x0b; + reset = io; + chip_erase_delay = 4500; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - hvsp_controlstack = - 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66, - 0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78, - 0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10, - 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x0F; - hventerstabdelay = 100; - hvspcmdexedelay = 0; - synchcycles = 6; - latchcycles = 1; - togglevtg = 1; - poweroffdelay = 25; - resetdelayms = 0; - resetdelayus = 70; - hvleavestabdelay = 100; - resetdelay = 25; - chiperasepolltimeout = 40; - chiperasetime = 0; - programfusepolltimeout = 25; - programlockpolltimeout = 25; + hvsp_controlstack = + 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66, + 0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78, + 0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10, + 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x0F; + hventerstabdelay = 100; + hvspcmdexedelay = 0; + synchcycles = 6; + latchcycles = 1; + togglevtg = 1; + poweroffdelay = 25; + resetdelayms = 0; + resetdelayus = 70; + hvleavestabdelay = 100; + resetdelay = 25; + chiperasepolltimeout = 40; + chiperasetime = 0; + programfusepolltimeout = 25; + programlockpolltimeout = 25; - memory "eeprom" - size = 128; - paged = no; - page_size = 4; - min_write_delay = 4000; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read = "1 0 1 0 0 0 0 0 0 0 0 x x x x x", - "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 128; + paged = no; + page_size = 4; + min_write_delay = 4000; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read = "1 0 1 0 0 0 0 0 0 0 0 x x x x x", + "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = "1 1 0 0 0 0 0 0 0 0 0 x x x x x", - "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = "1 1 0 0 0 0 0 0 0 0 0 x x x x x", + "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x x x", " x a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 4; - readsize = 256; - ; - memory "flash" - paged = yes; - size = 2048; - page_size = 32; - num_pages = 64; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 0 0 0 0 0 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x41; + delay = 6; + blocksize = 4; + readsize = 256; + ; + memory "flash" + paged = yes; + size = 2048; + page_size = 32; + num_pages = 64; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 0 0 0 0 0 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 0 0 0 0 0 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 0 0 0 0 0 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 x x x x x", - " x x x x a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 x x x x x", + " x x x x a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 x x x x x", - " x x x x a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 x x x x x", + " x x x x a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 0 0 0 0 0 a9 a8", - " a7 a6 a5 a4 x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 0 0 0 0 0 a9 a8", + " a7 a6 a5 a4 x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 32; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 32; + readsize = 256; + ; # ATtiny24 has Signature Bytes: 0x1E 0x91 0x0B. - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; - memory "lock" - size = 1; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x x x x x x x i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; + memory "lock" + size = 1; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x x x x x x x i i"; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x x x i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x x x i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 a0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -11307,181 +11307,181 @@ part #------------------------------------------------------------ part - id = "t44"; - desc = "ATtiny44"; - has_debugwire = yes; - flash_instr = 0xB4, 0x07, 0x17; - eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, - 0xBC, 0x07, 0xB4, 0x07, 0xBA, 0x0D, 0xBB, 0xBC, - 0x99, 0xE1, 0xBB, 0xAC; + id = "t44"; + desc = "ATtiny44"; + has_debugwire = yes; + flash_instr = 0xB4, 0x07, 0x17; + eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, + 0xBC, 0x07, 0xB4, 0x07, 0xBA, 0x0D, 0xBB, 0xBC, + 0x99, 0xE1, 0xBB, 0xAC; ## no STK500 devcode in XML file, use the ATtiny45 one - stk500_devcode = 0x14; + stk500_devcode = 0x14; ## avr910_devcode = ?; ## Try the AT90S2313 devcode: - avr910_devcode = 0x20; - signature = 0x1e 0x92 0x07; - reset = io; - chip_erase_delay = 4500; + avr910_devcode = 0x20; + signature = 0x1e 0x92 0x07; + reset = io; + chip_erase_delay = 4500; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - hvsp_controlstack = - 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66, - 0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78, - 0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10, - 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x0F; - hventerstabdelay = 100; - hvspcmdexedelay = 0; - synchcycles = 6; - latchcycles = 1; - togglevtg = 1; - poweroffdelay = 25; - resetdelayms = 0; - resetdelayus = 70; - hvleavestabdelay = 100; - resetdelay = 25; - chiperasepolltimeout = 40; - chiperasetime = 0; - programfusepolltimeout = 25; - programlockpolltimeout = 25; + hvsp_controlstack = + 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66, + 0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78, + 0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10, + 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x0F; + hventerstabdelay = 100; + hvspcmdexedelay = 0; + synchcycles = 6; + latchcycles = 1; + togglevtg = 1; + poweroffdelay = 25; + resetdelayms = 0; + resetdelayus = 70; + hvleavestabdelay = 100; + resetdelay = 25; + chiperasepolltimeout = 40; + chiperasetime = 0; + programfusepolltimeout = 25; + programlockpolltimeout = 25; - memory "eeprom" - size = 256; - paged = no; - page_size = 4; - min_write_delay = 4000; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read = "1 0 1 0 0 0 0 0 0 0 0 x x x x x", - "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 256; + paged = no; + page_size = 4; + min_write_delay = 4000; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read = "1 0 1 0 0 0 0 0 0 0 0 x x x x x", + "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = "1 1 0 0 0 0 0 0 0 0 0 x x x x x", - "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = "1 1 0 0 0 0 0 0 0 0 0 x x x x x", + "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x x x", " x a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 4; - readsize = 256; - ; - memory "flash" - paged = yes; - size = 4096; - page_size = 64; - num_pages = 64; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 0 0 0 0 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x41; + delay = 6; + blocksize = 4; + readsize = 256; + ; + memory "flash" + paged = yes; + size = 4096; + page_size = 64; + num_pages = 64; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 0 0 0 0 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 0 0 0 0 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 0 0 0 0 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 0 0 0 0 a10 a9 a8", - " a7 a6 a5 x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 0 0 0 0 a10 a9 a8", + " a7 a6 a5 x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 32; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 32; + readsize = 256; + ; # ATtiny44 has Signature Bytes: 0x1E 0x92 0x07. - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; - memory "lock" - size = 1; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x x x x x x x i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; + memory "lock" + size = 1; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x x x x x x x i i"; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x x x i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x x x i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 a0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -11489,182 +11489,182 @@ part #------------------------------------------------------------ part - id = "t84"; - desc = "ATtiny84"; - has_debugwire = yes; - flash_instr = 0xB4, 0x07, 0x17; - eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, - 0xBC, 0x07, 0xB4, 0x07, 0xBA, 0x0D, 0xBB, 0xBC, - 0x99, 0xE1, 0xBB, 0xAC; + id = "t84"; + desc = "ATtiny84"; + has_debugwire = yes; + flash_instr = 0xB4, 0x07, 0x17; + eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, + 0xBC, 0x07, 0xB4, 0x07, 0xBA, 0x0D, 0xBB, 0xBC, + 0x99, 0xE1, 0xBB, 0xAC; ## no STK500 devcode in XML file, use the ATtiny45 one - stk500_devcode = 0x14; + stk500_devcode = 0x14; ## avr910_devcode = ?; ## Try the AT90S2313 devcode: - avr910_devcode = 0x20; - signature = 0x1e 0x93 0x0c; - reset = io; - chip_erase_delay = 4500; + avr910_devcode = 0x20; + signature = 0x1e 0x93 0x0c; + reset = io; + chip_erase_delay = 4500; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - hvsp_controlstack = - 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66, - 0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78, - 0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10, - 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x0F; - hventerstabdelay = 100; - hvspcmdexedelay = 0; - synchcycles = 6; - latchcycles = 1; - togglevtg = 1; - poweroffdelay = 25; - resetdelayms = 0; - resetdelayus = 70; - hvleavestabdelay = 100; - resetdelay = 25; - chiperasepolltimeout = 40; - chiperasetime = 0; - programfusepolltimeout = 25; - programlockpolltimeout = 25; + hvsp_controlstack = + 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66, + 0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78, + 0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10, + 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x0F; + hventerstabdelay = 100; + hvspcmdexedelay = 0; + synchcycles = 6; + latchcycles = 1; + togglevtg = 1; + poweroffdelay = 25; + resetdelayms = 0; + resetdelayus = 70; + hvleavestabdelay = 100; + resetdelay = 25; + chiperasepolltimeout = 40; + chiperasetime = 0; + programfusepolltimeout = 25; + programlockpolltimeout = 25; - memory "eeprom" - size = 512; - paged = no; - page_size = 4; - min_write_delay = 4000; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read = "1 0 1 0 0 0 0 0 0 0 0 x x x x a8", - "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; + memory "eeprom" + size = 512; + paged = no; + page_size = 4; + min_write_delay = 4000; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read = "1 0 1 0 0 0 0 0 0 0 0 x x x x a8", + "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; - write = "1 1 0 0 0 0 0 0 0 0 0 x x x x a8", - "a8 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; + write = "1 1 0 0 0 0 0 0 0 0 0 x x x x a8", + "a8 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x x x", " x a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 4; - readsize = 256; - ; - memory "flash" - paged = yes; - size = 8192; - page_size = 64; - num_pages = 128; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + mode = 0x41; + delay = 6; + blocksize = 4; + readsize = 256; + ; + memory "flash" + paged = yes; + size = 8192; + page_size = 64; + num_pages = 128; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 x x x x x", - " x x x a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 x x x x x", + " x x x a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 32; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 32; + readsize = 256; + ; # ATtiny84 has Signature Bytes: 0x1E 0x93 0x0C. - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; - memory "lock" - size = 1; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x x x x x x x i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + memory "lock" + size = 1; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x x x x x x x i i"; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x x x x i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x x x x i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 a0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -11672,187 +11672,187 @@ part #------------------------------------------------------------ part - id = "m32u4"; - desc = "ATmega32U4"; - signature = 0x1e 0x95 0x87; - has_jtag = yes; + id = "m32u4"; + desc = "ATmega32U4"; + signature = 0x1e 0x95 0x87; + has_jtag = yes; # stk500_devcode = 0xB2; # avr910_devcode = 0x43; - chip_erase_delay = 9000; - pagel = 0xD7; - bs2 = 0xA0; - reset = dedicated; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + chip_erase_delay = 9000; + pagel = 0xD7; + bs2 = 0xA0; + reset = dedicated; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - rampz = 0x3b; - allowfullpagebitstream = no; + idr = 0x31; + spmcr = 0x57; + rampz = 0x3b; + allowfullpagebitstream = no; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 8; /* for parallel programming */ - size = 1024; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0x00; - readback_p2 = 0x00; - read = " 1 0 1 0 0 0 0 0", - " x x x x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 8; /* for parallel programming */ + size = 1024; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0x00; + readback_p2 = 0x00; + read = " 1 0 1 0 0 0 0 0", + " x x x x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0", - " x x x x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0", + " x x x x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 a2 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x a10 a9 a8", " a7 a6 a5 a4 a3 0 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 8; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 8; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 32768; - page_size = 128; - num_pages = 256; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0x00; - readback_p2 = 0x00; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 32768; + page_size = 128; + num_pages = 256; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0x00; + readback_p2 = 0x00; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 128; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 128; + readsize = 256; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x i i i i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -11860,187 +11860,187 @@ part #------------------------------------------------------------ part - id = "usb646"; - desc = "AT90USB646"; - signature = 0x1e 0x96 0x82; - has_jtag = yes; + id = "usb646"; + desc = "AT90USB646"; + signature = 0x1e 0x96 0x82; + has_jtag = yes; # stk500_devcode = 0xB2; # avr910_devcode = 0x43; - chip_erase_delay = 9000; - pagel = 0xD7; - bs2 = 0xA0; - reset = dedicated; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + chip_erase_delay = 9000; + pagel = 0xD7; + bs2 = 0xA0; + reset = dedicated; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - rampz = 0x3b; - allowfullpagebitstream = no; + idr = 0x31; + spmcr = 0x57; + rampz = 0x3b; + allowfullpagebitstream = no; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 8; /* for parallel programming */ - size = 2048; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0x00; - readback_p2 = 0x00; - read = " 1 0 1 0 0 0 0 0", - " x x x x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 8; /* for parallel programming */ + size = 2048; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0x00; + readback_p2 = 0x00; + read = " 1 0 1 0 0 0 0 0", + " x x x x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0", - " x x x x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0", + " x x x x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 a2 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x a10 a9 a8", " a7 a6 a5 a4 a3 0 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 8; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 8; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 65536; - page_size = 256; - num_pages = 256; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0x00; - readback_p2 = 0x00; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 65536; + page_size = 256; + num_pages = 256; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0x00; + readback_p2 = 0x00; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 a14 a13 a12 a11 a10 a9 a8", - " a7 x x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 a14 a13 a12 a11 a10 a9 a8", + " a7 x x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 256; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 256; + readsize = 256; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x i i i i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -12049,187 +12049,187 @@ part # identical to AT90USB646 part - id = "usb647"; - desc = "AT90USB647"; - signature = 0x1e 0x96 0x82; - has_jtag = yes; + id = "usb647"; + desc = "AT90USB647"; + signature = 0x1e 0x96 0x82; + has_jtag = yes; # stk500_devcode = 0xB2; # avr910_devcode = 0x43; - chip_erase_delay = 9000; - pagel = 0xD7; - bs2 = 0xA0; - reset = dedicated; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + chip_erase_delay = 9000; + pagel = 0xD7; + bs2 = 0xA0; + reset = dedicated; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - rampz = 0x3b; - allowfullpagebitstream = no; + idr = 0x31; + spmcr = 0x57; + rampz = 0x3b; + allowfullpagebitstream = no; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 8; /* for parallel programming */ - size = 2048; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0x00; - readback_p2 = 0x00; - read = " 1 0 1 0 0 0 0 0", - " x x x x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 8; /* for parallel programming */ + size = 2048; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0x00; + readback_p2 = 0x00; + read = " 1 0 1 0 0 0 0 0", + " x x x x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0", - " x x x x x a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0", + " x x x x x a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 a2 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x a10 a9 a8", " a7 a6 a5 a4 a3 0 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 8; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 8; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 65536; - page_size = 256; - num_pages = 256; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0x00; - readback_p2 = 0x00; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 65536; + page_size = 256; + num_pages = 256; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0x00; + readback_p2 = 0x00; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 a14 a13 a12 a11 a10 a9 a8", - " a7 x x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 a14 a13 a12 a11 a10 a9 a8", + " a7 x x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 256; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 256; + readsize = 256; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x i i i i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -12237,187 +12237,187 @@ part #------------------------------------------------------------ part - id = "usb1286"; - desc = "AT90USB1286"; - signature = 0x1e 0x97 0x82; - has_jtag = yes; + id = "usb1286"; + desc = "AT90USB1286"; + signature = 0x1e 0x97 0x82; + has_jtag = yes; # stk500_devcode = 0xB2; # avr910_devcode = 0x43; - chip_erase_delay = 9000; - pagel = 0xD7; - bs2 = 0xA0; - reset = dedicated; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + chip_erase_delay = 9000; + pagel = 0xD7; + bs2 = 0xA0; + reset = dedicated; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - rampz = 0x3b; - allowfullpagebitstream = no; + idr = 0x31; + spmcr = 0x57; + rampz = 0x3b; + allowfullpagebitstream = no; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 8; /* for parallel programming */ - size = 4096; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0x00; - readback_p2 = 0x00; - read = " 1 0 1 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 8; /* for parallel programming */ + size = 4096; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0x00; + readback_p2 = 0x00; + read = " 1 0 1 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 a2 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x a10 a9 a8", " a7 a6 a5 a4 a3 0 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 8; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 8; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 131072; - page_size = 256; - num_pages = 512; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0x00; - readback_p2 = 0x00; - read_lo = " 0 0 1 0 0 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 131072; + page_size = 256; + num_pages = 512; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0x00; + readback_p2 = 0x00; + read_lo = " 0 0 1 0 0 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 x x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 x x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 256; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 256; + readsize = 256; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x i i i i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -12426,187 +12426,187 @@ part # identical to AT90USB1286 part - id = "usb1287"; - desc = "AT90USB1287"; - signature = 0x1e 0x97 0x82; - has_jtag = yes; + id = "usb1287"; + desc = "AT90USB1287"; + signature = 0x1e 0x97 0x82; + has_jtag = yes; # stk500_devcode = 0xB2; # avr910_devcode = 0x43; - chip_erase_delay = 9000; - pagel = 0xD7; - bs2 = 0xA0; - reset = dedicated; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; + chip_erase_delay = 9000; + pagel = 0xD7; + bs2 = 0xA0; + reset = dedicated; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "x x x x x x x x x x x x x x x x"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - rampz = 0x3b; - allowfullpagebitstream = no; + idr = 0x31; + spmcr = 0x57; + rampz = 0x3b; + allowfullpagebitstream = no; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 8; /* for parallel programming */ - size = 4096; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0x00; - readback_p2 = 0x00; - read = " 1 0 1 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 8; /* for parallel programming */ + size = 4096; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0x00; + readback_p2 = 0x00; + read = " 1 0 1 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0", - " x x x x a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0", + " x x x x a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 a2 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", + writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x a10 a9 a8", " a7 a6 a5 a4 a3 0 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 8; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 8; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 131072; - page_size = 256; - num_pages = 512; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0x00; - readback_p2 = 0x00; - read_lo = " 0 0 1 0 0 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 131072; + page_size = 256; + num_pages = 512; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0x00; + readback_p2 = 0x00; + read_lo = " 0 0 1 0 0 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 x x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 x x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 256; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 256; + readsize = 256; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x x x x x i i i i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x x x x x i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 x x x x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 x x x x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 x x x x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 x x x x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; @@ -12615,179 +12615,179 @@ part #------------------------------------------------------------ part - id = "usb162"; - desc = "AT90USB162"; - has_jtag = no; - has_debugwire = yes; - signature = 0x1e 0x94 0x82; - chip_erase_delay = 9000; - reset = io; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; - pagel = 0xD7; - bs2 = 0xC6; + id = "usb162"; + desc = "AT90USB162"; + has_jtag = no; + has_debugwire = yes; + signature = 0x1e 0x94 0x82; + chip_erase_delay = 9000; + reset = io; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; + pagel = 0xD7; + bs2 = 0xC6; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 4; /* for parallel programming */ - size = 512; - num_pages = 128; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0x00; - readback_p2 = 0x00; - read = " 1 0 1 0 0 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 4; /* for parallel programming */ + size = 512; + num_pages = 128; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0x00; + readback_p2 = 0x00; + read = " 1 0 1 0 0 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 0 0", + writepage = " 1 1 0 0 0 0 1 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 20; - blocksize = 4; - readsize = 256; - ; + mode = 0x41; + delay = 20; + blocksize = 4; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 16384; - page_size = 128; - num_pages = 128; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0x00; - readback_p2 = 0x00; - read_lo = " 0 0 1 0 0 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 16384; + page_size = 128; + num_pages = 128; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0x00; + readback_p2 = 0x00; + read_lo = " 0 0 1 0 0 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 128; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 128; + readsize = 256; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x i i i i i i i i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -12799,179 +12799,179 @@ part # num_pages = 64; part - id = "usb82"; - desc = "AT90USB82"; - has_jtag = no; - has_debugwire = yes; - signature = 0x1e 0x93 0x82; - chip_erase_delay = 9000; - reset = io; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "x x x x x x x x x x x x x x x x"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", - "x x x x x x x x x x x x x x x x"; - pagel = 0xD7; - bs2 = 0xC6; + id = "usb82"; + desc = "AT90USB82"; + has_jtag = no; + has_debugwire = yes; + signature = 0x1e 0x93 0x82; + chip_erase_delay = 9000; + reset = io; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "x x x x x x x x x x x x x x x x"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", + "x x x x x x x x x x x x x x x x"; + pagel = 0xD7; + bs2 = 0xC6; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 4; /* for parallel programming */ - size = 512; - num_pages = 128; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0x00; - readback_p2 = 0x00; - read = " 1 0 1 0 0 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 4; /* for parallel programming */ + size = 512; + num_pages = 128; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0x00; + readback_p2 = 0x00; + read = " 1 0 1 0 0 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", + loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", - " 0 0 0 0 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 0 0", + writepage = " 1 1 0 0 0 0 1 0", + " 0 0 0 0 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 0 0", " x x x x x x x x"; - mode = 0x41; - delay = 20; - blocksize = 4; - readsize = 256; - ; + mode = 0x41; + delay = 20; + blocksize = 4; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 8192; - page_size = 128; - num_pages = 64; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0x00; - readback_p2 = 0x00; - read_lo = " 0 0 1 0 0 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 8192; + page_size = 128; + num_pages = 64; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0x00; + readback_p2 = 0x00; + read_lo = " 0 0 1 0 0 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " x x x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " x x x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " x x x x x x x x", - " x x a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " x x x x x x x x", + " x x a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - "a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 x x x x x x", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + "a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 x x x x x x", + " x x x x x x x x"; - mode = 0x41; - delay = 6; - blocksize = 128; - readsize = 256; - ; + mode = 0x41; + delay = 6; + blocksize = 128; + readsize = 256; + ; - memory "lfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "lfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "x x x x x x x x i i i i i i i i"; + memory "hfuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "x x x x x x x x i i i i i i i i"; + memory "efuse" + size = 1; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "x x x x x x x x i i i i i i i i"; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "x x x x x x x x o o o o o o o o"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "x x x x x x x x o o o o o o o o"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", - "x x x x x x x x 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", + "x x x x x x x x 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "calibration" - size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", - "x x x x x x a1 a0 o o o o o o o o"; - ; + memory "calibration" + size = 1; + read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", + "x x x x x x a1 a0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -12979,188 +12979,188 @@ part #------------------------------------------------------------ part - id = "m325"; - desc = "ATMEGA325"; - signature = 0x1e 0x95 0x05; - has_jtag = yes; + id = "m325"; + desc = "ATMEGA325"; + signature = 0x1e 0x95 0x05; + has_jtag = yes; # stk500_devcode = 0x??; # No STK500v1 support? # avr910_devcode = 0x??; # Try the ATmega16 one - avr910_devcode = 0x74; - pagel = 0xd7; - bs2 = 0xa0; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"; + avr910_devcode = 0x74; + pagel = 0xd7; + bs2 = 0xa0; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - allowfullpagebitstream = no; + idr = 0x31; + spmcr = 0x57; + allowfullpagebitstream = no; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 4; /* for parallel programming */ - size = 1024; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; - read = " 1 0 1 0 0 0 0 0", - " 0 0 0 0 0 0 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 4; /* for parallel programming */ + size = 1024; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; + read = " 1 0 1 0 0 0 0 0", + " 0 0 0 0 0 0 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0", - " 0 0 0 0 0 0 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0", + " 0 0 0 0 0 0 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", - " 0 0 0 0 0 0 0 0", - " 0 0 0 0 0 0 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 1 1 0 0 0 0 0 1", + " 0 0 0 0 0 0 0 0", + " 0 0 0 0 0 0 a1 a0", + " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", - " 0 0 0 0 0 0 a9 a8", - " a7 a6 a5 a4 a3 a2 0 0", - " x x x x x x x x"; + writepage = " 1 1 0 0 0 0 1 0", + " 0 0 0 0 0 0 a9 a8", + " a7 a6 a5 a4 a3 a2 0 0", + " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 4; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 4; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 32768; - page_size = 128; - num_pages = 256; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 32768; + page_size = 128; + num_pages = 256; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 0 0 0 0 0", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 0 0 0 0 0", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 0 0 0 0 0", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 0 0 0 0 0", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 128; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 128; + readsize = 256; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 0 0 0 0 0", - "0 0 0 0 0 0 0 0 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 0 0 0 0 0", + "0 0 0 0 0 0 0 0 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lfuse" - size = 1; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "0 0 0 0 0 0 0 0 o o o o o o o o"; + memory "lfuse" + size = 1; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "0 0 0 0 0 0 0 0 o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "0 0 0 0 0 0 0 0 i i i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "0 0 0 0 0 0 0 0 i i i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "0 0 0 0 0 0 0 0 o o o o o o o o"; + memory "hfuse" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "0 0 0 0 0 0 0 0 o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "0 0 0 0 0 0 0 0 i i i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "0 0 0 0 0 0 0 0 i i i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; + memory "efuse" + size = 1; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "0 0 0 0 0 0 0 0 o o o o o o o o"; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "0 0 0 0 0 0 0 0 o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "0 0 0 0 0 0 0 0 1 1 1 1 1 i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "0 0 0 0 0 0 0 0 1 1 1 1 1 i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0", - "0 0 0 0 0 0 a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0", + "0 0 0 0 0 0 a1 a0 o o o o o o o o"; + ; - memory "calibration" - size = 1; + memory "calibration" + size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + read = "0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -13168,188 +13168,188 @@ part #------------------------------------------------------------ part - id = "m645"; - desc = "ATMEGA645"; - signature = 0x1E 0x96 0x05; - has_jtag = yes; + id = "m645"; + desc = "ATMEGA645"; + signature = 0x1E 0x96 0x05; + has_jtag = yes; # stk500_devcode = 0x??; # No STK500v1 support? # avr910_devcode = 0x??; # Try the ATmega16 one - avr910_devcode = 0x74; - pagel = 0xd7; - bs2 = 0xa0; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"; + avr910_devcode = 0x74; + pagel = 0xd7; + bs2 = 0xa0; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - allowfullpagebitstream = no; + idr = 0x31; + spmcr = 0x57; + allowfullpagebitstream = no; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 8; /* for parallel programming */ - size = 2048; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; - read = " 1 0 1 0 0 0 0 0", - " 0 0 0 0 0 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 8; /* for parallel programming */ + size = 2048; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; + read = " 1 0 1 0 0 0 0 0", + " 0 0 0 0 0 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0", - " 0 0 0 0 0 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0", + " 0 0 0 0 0 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", - " 0 0 0 0 0 0 0 0", - " 0 0 0 0 0 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 1 1 0 0 0 0 0 1", + " 0 0 0 0 0 0 0 0", + " 0 0 0 0 0 a2 a1 a0", + " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", - " 0 0 0 0 0 a10 a9 a8", - " a7 a6 a5 a4 a3 0 0 0", - " x x x x x x x x"; + writepage = " 1 1 0 0 0 0 1 0", + " 0 0 0 0 0 a10 a9 a8", + " a7 a6 a5 a4 a3 0 0 0", + " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 8; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 8; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 65536; - page_size = 256; - num_pages = 256; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 65536; + page_size = 256; + num_pages = 256; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 0 0 0 0 0", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 0 0 0 0 0", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 0 0 0 0 0", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 0 0 0 0 0", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " 0 0 0 0 0 0 0 0"; + writepage = " 0 1 0 0 1 1 0 0", + " a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " 0 0 0 0 0 0 0 0"; - mode = 0x41; - delay = 10; - blocksize = 128; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 128; + readsize = 256; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 0 0 0 0 0", - "0 0 0 0 0 0 0 0 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 0 0 0 0 0", + "0 0 0 0 0 0 0 0 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lfuse" - size = 1; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "0 0 0 0 0 0 0 0 o o o o o o o o"; + memory "lfuse" + size = 1; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "0 0 0 0 0 0 0 0 o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "0 0 0 0 0 0 0 0 i i i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "0 0 0 0 0 0 0 0 i i i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "0 0 0 0 0 0 0 0 o o o o o o o o"; + memory "hfuse" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "0 0 0 0 0 0 0 0 o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "0 0 0 0 0 0 0 0 i i i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "0 0 0 0 0 0 0 0 i i i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; + memory "efuse" + size = 1; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "0 0 0 0 0 0 0 0 o o o o o o o o"; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "0 0 0 0 0 0 0 0 o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "0 0 0 0 0 0 0 0 1 1 1 1 1 i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "0 0 0 0 0 0 0 0 1 1 1 1 1 i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0", - "0 0 0 0 0 0 a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0", + "0 0 0 0 0 0 a1 a0 o o o o o o o o"; + ; - memory "calibration" - size = 1; + memory "calibration" + size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + read = "0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -13357,188 +13357,188 @@ part #------------------------------------------------------------ part - id = "m3250"; - desc = "ATMEGA3250"; - signature = 0x1E 0x95 0x06; - has_jtag = yes; + id = "m3250"; + desc = "ATMEGA3250"; + signature = 0x1E 0x95 0x06; + has_jtag = yes; # stk500_devcode = 0x??; # No STK500v1 support? # avr910_devcode = 0x??; # Try the ATmega16 one - avr910_devcode = 0x74; - pagel = 0xd7; - bs2 = 0xa0; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"; + avr910_devcode = 0x74; + pagel = 0xd7; + bs2 = 0xa0; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - allowfullpagebitstream = no; + idr = 0x31; + spmcr = 0x57; + allowfullpagebitstream = no; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 4; /* for parallel programming */ - size = 1024; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; - read = " 1 0 1 0 0 0 0 0", - " 0 0 0 0 0 0 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 4; /* for parallel programming */ + size = 1024; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; + read = " 1 0 1 0 0 0 0 0", + " 0 0 0 0 0 0 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0", - " 0 0 0 0 0 0 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0", + " 0 0 0 0 0 0 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", - " 0 0 0 0 0 0 0 0", - " 0 0 0 0 0 0 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 1 1 0 0 0 0 0 1", + " 0 0 0 0 0 0 0 0", + " 0 0 0 0 0 0 a1 a0", + " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", - " 0 0 0 0 0 0 a9 a8", - " a7 a6 a5 a4 a3 a2 0 0", - " x x x x x x x x"; + writepage = " 1 1 0 0 0 0 1 0", + " 0 0 0 0 0 0 a9 a8", + " a7 a6 a5 a4 a3 a2 0 0", + " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 4; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 4; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 32768; - page_size = 128; - num_pages = 256; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " 0 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 32768; + page_size = 128; + num_pages = 256; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " 0 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " 0 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " 0 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 0 0 0 0 0", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 0 0 0 0 0", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 0 0 0 0 0", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 0 0 0 0 0", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " 0 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " x x x x x x x x"; + writepage = " 0 1 0 0 1 1 0 0", + " 0 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 128; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 128; + readsize = 256; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 0 0 0 0 0", - "0 0 0 0 0 0 0 0 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 0 0 0 0 0", + "0 0 0 0 0 0 0 0 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lfuse" - size = 1; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "0 0 0 0 0 0 0 0 o o o o o o o o"; + memory "lfuse" + size = 1; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "0 0 0 0 0 0 0 0 o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "0 0 0 0 0 0 0 0 i i i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "0 0 0 0 0 0 0 0 i i i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "0 0 0 0 0 0 0 0 o o o o o o o o"; + memory "hfuse" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "0 0 0 0 0 0 0 0 o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "0 0 0 0 0 0 0 0 i i i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "0 0 0 0 0 0 0 0 i i i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; + memory "efuse" + size = 1; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "0 0 0 0 0 0 0 0 o o o o o o o o"; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "0 0 0 0 0 0 0 0 o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "0 0 0 0 0 0 0 0 1 1 1 1 1 i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "0 0 0 0 0 0 0 0 1 1 1 1 1 i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0", - "0 0 0 0 0 0 a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0", + "0 0 0 0 0 0 a1 a0 o o o o o o o o"; + ; - memory "calibration" - size = 1; + memory "calibration" + size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + read = "0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -13546,188 +13546,188 @@ part #------------------------------------------------------------ part - id = "m6450"; - desc = "ATMEGA6450"; - signature = 0x1E 0x96 0x06; - has_jtag = yes; + id = "m6450"; + desc = "ATMEGA6450"; + signature = 0x1E 0x96 0x06; + has_jtag = yes; # stk500_devcode = 0x??; # No STK500v1 support? # avr910_devcode = 0x??; # Try the ATmega16 one - avr910_devcode = 0x74; - pagel = 0xd7; - bs2 = 0xa0; - chip_erase_delay = 9000; - pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", - "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"; + avr910_devcode = 0x74; + pagel = 0xd7; + bs2 = 0xa0; + chip_erase_delay = 9000; + pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", + "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"; - chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", - "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"; + chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0", + "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"; - timeout = 200; - stabdelay = 100; - cmdexedelay = 25; - synchloops = 32; - bytedelay = 0; - pollindex = 3; - pollvalue = 0x53; - predelay = 1; - postdelay = 1; - pollmethod = 1; + timeout = 200; + stabdelay = 100; + cmdexedelay = 25; + synchloops = 32; + bytedelay = 0; + pollindex = 3; + pollvalue = 0x53; + predelay = 1; + postdelay = 1; + pollmethod = 1; - pp_controlstack = - 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, - 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, - 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, - 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; - hventerstabdelay = 100; - progmodedelay = 0; - latchcycles = 5; - togglevtg = 1; - poweroffdelay = 15; - resetdelayms = 1; - resetdelayus = 0; - hvleavestabdelay = 15; - chiperasepulsewidth = 0; - chiperasepolltimeout = 10; - programfusepulsewidth = 0; - programfusepolltimeout = 5; - programlockpulsewidth = 0; - programlockpolltimeout = 5; + pp_controlstack = + 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, + 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, + 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, + 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00; + hventerstabdelay = 100; + progmodedelay = 0; + latchcycles = 5; + togglevtg = 1; + poweroffdelay = 15; + resetdelayms = 1; + resetdelayus = 0; + hvleavestabdelay = 15; + chiperasepulsewidth = 0; + chiperasepolltimeout = 10; + programfusepulsewidth = 0; + programfusepolltimeout = 5; + programlockpulsewidth = 0; + programlockpolltimeout = 5; - idr = 0x31; - spmcr = 0x57; - allowfullpagebitstream = no; + idr = 0x31; + spmcr = 0x57; + allowfullpagebitstream = no; - memory "eeprom" - paged = no; /* leave this "no" */ - page_size = 8; /* for parallel programming */ - size = 2048; - min_write_delay = 9000; - max_write_delay = 9000; - readback_p1 = 0xff; - readback_p2 = 0xff; - read = " 1 0 1 0 0 0 0 0", - " 0 0 0 0 0 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "eeprom" + paged = no; /* leave this "no" */ + page_size = 8; /* for parallel programming */ + size = 2048; + min_write_delay = 9000; + max_write_delay = 9000; + readback_p1 = 0xff; + readback_p2 = 0xff; + read = " 1 0 1 0 0 0 0 0", + " 0 0 0 0 0 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - write = " 1 1 0 0 0 0 0 0", - " 0 0 0 0 0 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + write = " 1 1 0 0 0 0 0 0", + " 0 0 0 0 0 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_lo = " 1 1 0 0 0 0 0 1", - " 0 0 0 0 0 0 0 0", - " 0 0 0 0 0 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 1 1 0 0 0 0 0 1", + " 0 0 0 0 0 0 0 0", + " 0 0 0 0 0 a2 a1 a0", + " i i i i i i i i"; - writepage = " 1 1 0 0 0 0 1 0", - " 0 0 0 0 0 a10 a9 a8", - " a7 a6 a5 a4 a3 0 0 0", - " x x x x x x x x"; + writepage = " 1 1 0 0 0 0 1 0", + " 0 0 0 0 0 a10 a9 a8", + " a7 a6 a5 a4 a3 0 0 0", + " x x x x x x x x"; - mode = 0x41; - delay = 10; - blocksize = 4; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 4; + readsize = 256; + ; - memory "flash" - paged = yes; - size = 65536; - page_size = 256; - num_pages = 256; - min_write_delay = 4500; - max_write_delay = 4500; - readback_p1 = 0xff; - readback_p2 = 0xff; - read_lo = " 0 0 1 0 0 0 0 0", - " a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + memory "flash" + paged = yes; + size = 65536; + page_size = 256; + num_pages = 256; + min_write_delay = 4500; + max_write_delay = 4500; + readback_p1 = 0xff; + readback_p2 = 0xff; + read_lo = " 0 0 1 0 0 0 0 0", + " a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - read_hi = " 0 0 1 0 1 0 0 0", - " a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " o o o o o o o o"; + read_hi = " 0 0 1 0 1 0 0 0", + " a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " o o o o o o o o"; - loadpage_lo = " 0 1 0 0 0 0 0 0", - " 0 0 0 0 0 0 0 0", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_lo = " 0 1 0 0 0 0 0 0", + " 0 0 0 0 0 0 0 0", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - loadpage_hi = " 0 1 0 0 1 0 0 0", - " 0 0 0 0 0 0 0 0", - " a7 a6 a5 a4 a3 a2 a1 a0", - " i i i i i i i i"; + loadpage_hi = " 0 1 0 0 1 0 0 0", + " 0 0 0 0 0 0 0 0", + " a7 a6 a5 a4 a3 a2 a1 a0", + " i i i i i i i i"; - writepage = " 0 1 0 0 1 1 0 0", - " a15 a14 a13 a12 a11 a10 a9 a8", - " a7 a6 a5 a4 a3 a2 a1 a0", - " 0 0 0 0 0 0 0 0"; + writepage = " 0 1 0 0 1 1 0 0", + " a15 a14 a13 a12 a11 a10 a9 a8", + " a7 a6 a5 a4 a3 a2 a1 a0", + " 0 0 0 0 0 0 0 0"; - mode = 0x41; - delay = 10; - blocksize = 128; - readsize = 256; - ; + mode = 0x41; + delay = 10; + blocksize = 128; + readsize = 256; + ; - memory "lock" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", - "x x x x x x x x x x o o o o o o"; + memory "lock" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", + "x x x x x x x x x x o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 1 1 0 0 0 0 0", - "0 0 0 0 0 0 0 0 1 1 i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 1 1 0 0 0 0 0", + "0 0 0 0 0 0 0 0 1 1 i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "lfuse" - size = 1; - read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", - "0 0 0 0 0 0 0 0 o o o o o o o o"; + memory "lfuse" + size = 1; + read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", + "0 0 0 0 0 0 0 0 o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", - "0 0 0 0 0 0 0 0 i i i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", + "0 0 0 0 0 0 0 0 i i i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "hfuse" - size = 1; - read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", - "0 0 0 0 0 0 0 0 o o o o o o o o"; + memory "hfuse" + size = 1; + read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", + "0 0 0 0 0 0 0 0 o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", - "0 0 0 0 0 0 0 0 i i i i i i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", + "0 0 0 0 0 0 0 0 i i i i i i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "efuse" - size = 1; + memory "efuse" + size = 1; - read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", - "0 0 0 0 0 0 0 0 o o o o o o o o"; + read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", + "0 0 0 0 0 0 0 0 o o o o o o o o"; - write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", - "0 0 0 0 0 0 0 0 1 1 1 1 1 i i i"; - min_write_delay = 9000; - max_write_delay = 9000; - ; + write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", + "0 0 0 0 0 0 0 0 1 1 1 1 1 i i i"; + min_write_delay = 9000; + max_write_delay = 9000; + ; - memory "signature" - size = 3; - read = "0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0", - "0 0 0 0 0 0 a1 a0 o o o o o o o o"; - ; + memory "signature" + size = 3; + read = "0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0", + "0 0 0 0 0 0 a1 a0 o o o o o o o o"; + ; - memory "calibration" - size = 1; + memory "calibration" + size = 1; - read = "0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0", - "0 0 0 0 0 0 0 0 o o o o o o o o"; - ; + read = "0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0", + "0 0 0 0 0 0 0 0 o o o o o o o o"; + ; ; #------------------------------------------------------------ @@ -13735,96 +13735,96 @@ part #------------------------------------------------------------ part - id = "x64a1"; - desc = "ATXMEGA64A1"; - signature = 0x1e 0x96 0x4e; - has_jtag = yes; - has_pdi = yes; - nvm_base = 0x01c0; + id = "x64a1"; + desc = "ATXMEGA64A1"; + signature = 0x1e 0x96 0x4e; + has_jtag = yes; + has_pdi = yes; + nvm_base = 0x01c0; - memory "eeprom" - size = 0x0800; - offset = 0x08c0000; - page_size = 0x20; - readsize = 0x100; - ; + memory "eeprom" + size = 0x0800; + offset = 0x08c0000; + page_size = 0x20; + readsize = 0x100; + ; - memory "application" - size = 0x00010000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "application" + size = 0x00010000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "apptable" - size = 0x00001000; - offset = 0x0080f000; - page_size = 0x100; - readsize = 0x100; - ; + memory "apptable" + size = 0x00001000; + offset = 0x0080f000; + page_size = 0x100; + readsize = 0x100; + ; - memory "boot" - size = 0x00001000; - offset = 0x00810000; - page_size = 0x100; - readsize = 0x100; - ; + memory "boot" + size = 0x00001000; + offset = 0x00810000; + page_size = 0x100; + readsize = 0x100; + ; - memory "flash" - size = 0x00011000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "flash" + size = 0x00011000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "prodsig" - size = 0x200; - offset = 0x8e0200; - page_size = 0x100; - readsize = 0x100; - ; + memory "prodsig" + size = 0x200; + offset = 0x8e0200; + page_size = 0x100; + readsize = 0x100; + ; - memory "usersig" - size = 0x200; - offset = 0x8e0400; - page_size = 0x100; - readsize = 0x100; - ; + memory "usersig" + size = 0x200; + offset = 0x8e0400; + page_size = 0x100; + readsize = 0x100; + ; - memory "signature" - size = 3; - offset = 0x1000090; - ; + memory "signature" + size = 3; + offset = 0x1000090; + ; - memory "fuse0" - size = 1; - offset = 0x8f0020; - ; + memory "fuse0" + size = 1; + offset = 0x8f0020; + ; - memory "fuse1" - size = 1; - offset = 0x8f0021; - ; + memory "fuse1" + size = 1; + offset = 0x8f0021; + ; - memory "fuse2" - size = 1; - offset = 0x8f0022; - ; + memory "fuse2" + size = 1; + offset = 0x8f0022; + ; - memory "fuse4" - size = 1; - offset = 0x8f0024; - ; + memory "fuse4" + size = 1; + offset = 0x8f0024; + ; - memory "fuse5" - size = 1; - offset = 0x8f0025; - ; + memory "fuse5" + size = 1; + offset = 0x8f0025; + ; - memory "lock" - size = 1; - offset = 0x8f0027; - ; + memory "lock" + size = 1; + offset = 0x8f0027; + ; ; #------------------------------------------------------------ @@ -13832,96 +13832,96 @@ part #------------------------------------------------------------ part - id = "x128a1"; - desc = "ATXMEGA128A1"; - signature = 0x1e 0x97 0x4c; - has_jtag = yes; - has_pdi = yes; - nvm_base = 0x01c0; + id = "x128a1"; + desc = "ATXMEGA128A1"; + signature = 0x1e 0x97 0x4c; + has_jtag = yes; + has_pdi = yes; + nvm_base = 0x01c0; - memory "eeprom" - size = 0x0800; - offset = 0x08c0000; - page_size = 0x20; - readsize = 0x100; - ; + memory "eeprom" + size = 0x0800; + offset = 0x08c0000; + page_size = 0x20; + readsize = 0x100; + ; - memory "application" - size = 0x00020000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "application" + size = 0x00020000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "apptable" - size = 0x00002000; - offset = 0x0081e000; - page_size = 0x100; - readsize = 0x100; - ; + memory "apptable" + size = 0x00002000; + offset = 0x0081e000; + page_size = 0x100; + readsize = 0x100; + ; - memory "boot" - size = 0x00002000; - offset = 0x00820000; - page_size = 0x100; - readsize = 0x100; - ; + memory "boot" + size = 0x00002000; + offset = 0x00820000; + page_size = 0x100; + readsize = 0x100; + ; - memory "flash" - size = 0x00022000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "flash" + size = 0x00022000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "prodsig" - size = 0x200; - offset = 0x8e0200; - page_size = 0x100; - readsize = 0x100; - ; + memory "prodsig" + size = 0x200; + offset = 0x8e0200; + page_size = 0x100; + readsize = 0x100; + ; - memory "usersig" - size = 0x200; - offset = 0x8e0400; - page_size = 0x100; - readsize = 0x100; - ; + memory "usersig" + size = 0x200; + offset = 0x8e0400; + page_size = 0x100; + readsize = 0x100; + ; - memory "signature" - size = 3; - offset = 0x1000090; - ; + memory "signature" + size = 3; + offset = 0x1000090; + ; - memory "fuse0" - size = 1; - offset = 0x8f0020; - ; + memory "fuse0" + size = 1; + offset = 0x8f0020; + ; - memory "fuse1" - size = 1; - offset = 0x8f0021; - ; + memory "fuse1" + size = 1; + offset = 0x8f0021; + ; - memory "fuse2" - size = 1; - offset = 0x8f0022; - ; + memory "fuse2" + size = 1; + offset = 0x8f0022; + ; - memory "fuse4" - size = 1; - offset = 0x8f0024; - ; + memory "fuse4" + size = 1; + offset = 0x8f0024; + ; - memory "fuse5" - size = 1; - offset = 0x8f0025; - ; + memory "fuse5" + size = 1; + offset = 0x8f0025; + ; - memory "lock" - size = 1; - offset = 0x8f0027; - ; + memory "lock" + size = 1; + offset = 0x8f0027; + ; ; #------------------------------------------------------------ @@ -13929,96 +13929,96 @@ part #------------------------------------------------------------ part - id = "x128a1d"; - desc = "ATXMEGA128A1REVD"; - signature = 0x1e 0x97 0x41; - has_jtag = yes; - has_pdi = yes; - nvm_base = 0x01c0; + id = "x128a1d"; + desc = "ATXMEGA128A1REVD"; + signature = 0x1e 0x97 0x41; + has_jtag = yes; + has_pdi = yes; + nvm_base = 0x01c0; - memory "eeprom" - size = 0x0800; - offset = 0x08c0000; - page_size = 0x20; - readsize = 0x100; - ; + memory "eeprom" + size = 0x0800; + offset = 0x08c0000; + page_size = 0x20; + readsize = 0x100; + ; - memory "application" - size = 0x00020000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "application" + size = 0x00020000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "apptable" - size = 0x00002000; - offset = 0x0081e000; - page_size = 0x100; - readsize = 0x100; - ; + memory "apptable" + size = 0x00002000; + offset = 0x0081e000; + page_size = 0x100; + readsize = 0x100; + ; - memory "boot" - size = 0x00002000; - offset = 0x00820000; - page_size = 0x100; - readsize = 0x100; - ; + memory "boot" + size = 0x00002000; + offset = 0x00820000; + page_size = 0x100; + readsize = 0x100; + ; - memory "flash" - size = 0x00022000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "flash" + size = 0x00022000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "prodsig" - size = 0x200; - offset = 0x8e0200; - page_size = 0x100; - readsize = 0x100; - ; + memory "prodsig" + size = 0x200; + offset = 0x8e0200; + page_size = 0x100; + readsize = 0x100; + ; - memory "usersig" - size = 0x200; - offset = 0x8e0400; - page_size = 0x100; - readsize = 0x100; - ; + memory "usersig" + size = 0x200; + offset = 0x8e0400; + page_size = 0x100; + readsize = 0x100; + ; - memory "signature" - size = 3; - offset = 0x1000090; - ; + memory "signature" + size = 3; + offset = 0x1000090; + ; - memory "fuse0" - size = 1; - offset = 0x8f0020; - ; + memory "fuse0" + size = 1; + offset = 0x8f0020; + ; - memory "fuse1" - size = 1; - offset = 0x8f0021; - ; + memory "fuse1" + size = 1; + offset = 0x8f0021; + ; - memory "fuse2" - size = 1; - offset = 0x8f0022; - ; + memory "fuse2" + size = 1; + offset = 0x8f0022; + ; - memory "fuse4" - size = 1; - offset = 0x8f0024; - ; + memory "fuse4" + size = 1; + offset = 0x8f0024; + ; - memory "fuse5" - size = 1; - offset = 0x8f0025; - ; + memory "fuse5" + size = 1; + offset = 0x8f0025; + ; - memory "lock" - size = 1; - offset = 0x8f0027; - ; + memory "lock" + size = 1; + offset = 0x8f0027; + ; ; #------------------------------------------------------------ @@ -14026,96 +14026,96 @@ part #------------------------------------------------------------ part - id = "x192a1"; - desc = "ATXMEGA192A1"; - signature = 0x1e 0x97 0x4e; - has_jtag = yes; - has_pdi = yes; - nvm_base = 0x01c0; + id = "x192a1"; + desc = "ATXMEGA192A1"; + signature = 0x1e 0x97 0x4e; + has_jtag = yes; + has_pdi = yes; + nvm_base = 0x01c0; - memory "eeprom" - size = 0x0800; - offset = 0x08c0000; - page_size = 0x20; - readsize = 0x100; - ; + memory "eeprom" + size = 0x0800; + offset = 0x08c0000; + page_size = 0x20; + readsize = 0x100; + ; - memory "application" - size = 0x00030000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "application" + size = 0x00030000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "apptable" - size = 0x00002000; - offset = 0x0082e000; - page_size = 0x100; - readsize = 0x100; - ; + memory "apptable" + size = 0x00002000; + offset = 0x0082e000; + page_size = 0x100; + readsize = 0x100; + ; - memory "boot" - size = 0x00002000; - offset = 0x00830000; - page_size = 0x100; - readsize = 0x100; - ; + memory "boot" + size = 0x00002000; + offset = 0x00830000; + page_size = 0x100; + readsize = 0x100; + ; - memory "flash" - size = 0x00032000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "flash" + size = 0x00032000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "prodsig" - size = 0x200; - offset = 0x8e0200; - page_size = 0x100; - readsize = 0x100; - ; + memory "prodsig" + size = 0x200; + offset = 0x8e0200; + page_size = 0x100; + readsize = 0x100; + ; - memory "usersig" - size = 0x200; - offset = 0x8e0400; - page_size = 0x100; - readsize = 0x100; - ; + memory "usersig" + size = 0x200; + offset = 0x8e0400; + page_size = 0x100; + readsize = 0x100; + ; - memory "signature" - size = 3; - offset = 0x1000090; - ; + memory "signature" + size = 3; + offset = 0x1000090; + ; - memory "fuse0" - size = 1; - offset = 0x8f0020; - ; + memory "fuse0" + size = 1; + offset = 0x8f0020; + ; - memory "fuse1" - size = 1; - offset = 0x8f0021; - ; + memory "fuse1" + size = 1; + offset = 0x8f0021; + ; - memory "fuse2" - size = 1; - offset = 0x8f0022; - ; + memory "fuse2" + size = 1; + offset = 0x8f0022; + ; - memory "fuse4" - size = 1; - offset = 0x8f0024; - ; + memory "fuse4" + size = 1; + offset = 0x8f0024; + ; - memory "fuse5" - size = 1; - offset = 0x8f0025; - ; + memory "fuse5" + size = 1; + offset = 0x8f0025; + ; - memory "lock" - size = 1; - offset = 0x8f0027; - ; + memory "lock" + size = 1; + offset = 0x8f0027; + ; ; #------------------------------------------------------------ @@ -14123,96 +14123,96 @@ part #------------------------------------------------------------ part - id = "x256a1"; - desc = "ATXMEGA256A1"; - signature = 0x1e 0x98 0x46; - has_jtag = yes; - has_pdi = yes; - nvm_base = 0x01c0; + id = "x256a1"; + desc = "ATXMEGA256A1"; + signature = 0x1e 0x98 0x46; + has_jtag = yes; + has_pdi = yes; + nvm_base = 0x01c0; - memory "eeprom" - size = 0x1000; - offset = 0x08c0000; - page_size = 0x20; - readsize = 0x100; - ; + memory "eeprom" + size = 0x1000; + offset = 0x08c0000; + page_size = 0x20; + readsize = 0x100; + ; - memory "application" - size = 0x00040000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "application" + size = 0x00040000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "apptable" - size = 0x00002000; - offset = 0x0083e000; - page_size = 0x100; - readsize = 0x100; - ; + memory "apptable" + size = 0x00002000; + offset = 0x0083e000; + page_size = 0x100; + readsize = 0x100; + ; - memory "boot" - size = 0x00002000; - offset = 0x00840000; - page_size = 0x100; - readsize = 0x100; - ; + memory "boot" + size = 0x00002000; + offset = 0x00840000; + page_size = 0x100; + readsize = 0x100; + ; - memory "flash" - size = 0x00042000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "flash" + size = 0x00042000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "prodsig" - size = 0x200; - offset = 0x8e0200; - page_size = 0x100; - readsize = 0x100; - ; + memory "prodsig" + size = 0x200; + offset = 0x8e0200; + page_size = 0x100; + readsize = 0x100; + ; - memory "usersig" - size = 0x200; - offset = 0x8e0400; - page_size = 0x100; - readsize = 0x100; - ; + memory "usersig" + size = 0x200; + offset = 0x8e0400; + page_size = 0x100; + readsize = 0x100; + ; - memory "signature" - size = 3; - offset = 0x1000090; - ; + memory "signature" + size = 3; + offset = 0x1000090; + ; - memory "fuse0" - size = 1; - offset = 0x8f0020; - ; + memory "fuse0" + size = 1; + offset = 0x8f0020; + ; - memory "fuse1" - size = 1; - offset = 0x8f0021; - ; + memory "fuse1" + size = 1; + offset = 0x8f0021; + ; - memory "fuse2" - size = 1; - offset = 0x8f0022; - ; + memory "fuse2" + size = 1; + offset = 0x8f0022; + ; - memory "fuse4" - size = 1; - offset = 0x8f0024; - ; + memory "fuse4" + size = 1; + offset = 0x8f0024; + ; - memory "fuse5" - size = 1; - offset = 0x8f0025; - ; + memory "fuse5" + size = 1; + offset = 0x8f0025; + ; - memory "lock" - size = 1; - offset = 0x8f0027; - ; + memory "lock" + size = 1; + offset = 0x8f0027; + ; ; #------------------------------------------------------------ @@ -14220,96 +14220,96 @@ part #------------------------------------------------------------ part - id = "x64a3"; - desc = "ATXMEGA64A3"; - signature = 0x1e 0x96 0x42; - has_jtag = yes; - has_pdi = yes; - nvm_base = 0x01c0; + id = "x64a3"; + desc = "ATXMEGA64A3"; + signature = 0x1e 0x96 0x42; + has_jtag = yes; + has_pdi = yes; + nvm_base = 0x01c0; - memory "eeprom" - size = 0x0800; - offset = 0x08c0000; - page_size = 0x20; - readsize = 0x100; - ; + memory "eeprom" + size = 0x0800; + offset = 0x08c0000; + page_size = 0x20; + readsize = 0x100; + ; - memory "application" - size = 0x00010000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "application" + size = 0x00010000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "apptable" - size = 0x00001000; - offset = 0x0080f000; - page_size = 0x100; - readsize = 0x100; - ; + memory "apptable" + size = 0x00001000; + offset = 0x0080f000; + page_size = 0x100; + readsize = 0x100; + ; - memory "boot" - size = 0x00001000; - offset = 0x00810000; - page_size = 0x100; - readsize = 0x100; - ; + memory "boot" + size = 0x00001000; + offset = 0x00810000; + page_size = 0x100; + readsize = 0x100; + ; - memory "flash" - size = 0x00011000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "flash" + size = 0x00011000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "prodsig" - size = 0x200; - offset = 0x8e0200; - page_size = 0x100; - readsize = 0x100; - ; + memory "prodsig" + size = 0x200; + offset = 0x8e0200; + page_size = 0x100; + readsize = 0x100; + ; - memory "usersig" - size = 0x200; - offset = 0x8e0400; - page_size = 0x100; - readsize = 0x100; - ; + memory "usersig" + size = 0x200; + offset = 0x8e0400; + page_size = 0x100; + readsize = 0x100; + ; - memory "signature" - size = 3; - offset = 0x1000090; - ; + memory "signature" + size = 3; + offset = 0x1000090; + ; - memory "fuse0" - size = 1; - offset = 0x8f0020; - ; + memory "fuse0" + size = 1; + offset = 0x8f0020; + ; - memory "fuse1" - size = 1; - offset = 0x8f0021; - ; + memory "fuse1" + size = 1; + offset = 0x8f0021; + ; - memory "fuse2" - size = 1; - offset = 0x8f0022; - ; + memory "fuse2" + size = 1; + offset = 0x8f0022; + ; - memory "fuse4" - size = 1; - offset = 0x8f0024; - ; + memory "fuse4" + size = 1; + offset = 0x8f0024; + ; - memory "fuse5" - size = 1; - offset = 0x8f0025; - ; + memory "fuse5" + size = 1; + offset = 0x8f0025; + ; - memory "lock" - size = 1; - offset = 0x8f0027; - ; + memory "lock" + size = 1; + offset = 0x8f0027; + ; ; #------------------------------------------------------------ @@ -14317,96 +14317,96 @@ part #------------------------------------------------------------ part - id = "x128a3"; - desc = "ATXMEGA128A3"; - signature = 0x1e 0x97 0x42; - has_jtag = yes; - has_pdi = yes; - nvm_base = 0x01c0; + id = "x128a3"; + desc = "ATXMEGA128A3"; + signature = 0x1e 0x97 0x42; + has_jtag = yes; + has_pdi = yes; + nvm_base = 0x01c0; - memory "eeprom" - size = 0x0800; - offset = 0x08c0000; - page_size = 0x20; - readsize = 0x100; - ; + memory "eeprom" + size = 0x0800; + offset = 0x08c0000; + page_size = 0x20; + readsize = 0x100; + ; - memory "application" - size = 0x00020000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "application" + size = 0x00020000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "apptable" - size = 0x00002000; - offset = 0x0081e000; - page_size = 0x100; - readsize = 0x100; - ; + memory "apptable" + size = 0x00002000; + offset = 0x0081e000; + page_size = 0x100; + readsize = 0x100; + ; - memory "boot" - size = 0x00002000; - offset = 0x00820000; - page_size = 0x100; - readsize = 0x100; - ; + memory "boot" + size = 0x00002000; + offset = 0x00820000; + page_size = 0x100; + readsize = 0x100; + ; - memory "flash" - size = 0x00022000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "flash" + size = 0x00022000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "prodsig" - size = 0x200; - offset = 0x8e0200; - page_size = 0x100; - readsize = 0x100; - ; + memory "prodsig" + size = 0x200; + offset = 0x8e0200; + page_size = 0x100; + readsize = 0x100; + ; - memory "usersig" - size = 0x200; - offset = 0x8e0400; - page_size = 0x100; - readsize = 0x100; - ; + memory "usersig" + size = 0x200; + offset = 0x8e0400; + page_size = 0x100; + readsize = 0x100; + ; - memory "signature" - size = 3; - offset = 0x1000090; - ; + memory "signature" + size = 3; + offset = 0x1000090; + ; - memory "fuse0" - size = 1; - offset = 0x8f0020; - ; + memory "fuse0" + size = 1; + offset = 0x8f0020; + ; - memory "fuse1" - size = 1; - offset = 0x8f0021; - ; + memory "fuse1" + size = 1; + offset = 0x8f0021; + ; - memory "fuse2" - size = 1; - offset = 0x8f0022; - ; + memory "fuse2" + size = 1; + offset = 0x8f0022; + ; - memory "fuse4" - size = 1; - offset = 0x8f0024; - ; + memory "fuse4" + size = 1; + offset = 0x8f0024; + ; - memory "fuse5" - size = 1; - offset = 0x8f0025; - ; + memory "fuse5" + size = 1; + offset = 0x8f0025; + ; - memory "lock" - size = 1; - offset = 0x8f0027; - ; + memory "lock" + size = 1; + offset = 0x8f0027; + ; ; #------------------------------------------------------------ @@ -14414,96 +14414,96 @@ part #------------------------------------------------------------ part - id = "x192a3"; - desc = "ATXMEGA192A3"; - signature = 0x1e 0x97 0x44; - has_jtag = yes; - has_pdi = yes; - nvm_base = 0x01c0; + id = "x192a3"; + desc = "ATXMEGA192A3"; + signature = 0x1e 0x97 0x44; + has_jtag = yes; + has_pdi = yes; + nvm_base = 0x01c0; - memory "eeprom" - size = 0x0800; - offset = 0x08c0000; - page_size = 0x20; - readsize = 0x100; - ; + memory "eeprom" + size = 0x0800; + offset = 0x08c0000; + page_size = 0x20; + readsize = 0x100; + ; - memory "application" - size = 0x00030000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "application" + size = 0x00030000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "apptable" - size = 0x00002000; - offset = 0x0082e000; - page_size = 0x100; - readsize = 0x100; - ; + memory "apptable" + size = 0x00002000; + offset = 0x0082e000; + page_size = 0x100; + readsize = 0x100; + ; - memory "boot" - size = 0x00002000; - offset = 0x00830000; - page_size = 0x100; - readsize = 0x100; - ; + memory "boot" + size = 0x00002000; + offset = 0x00830000; + page_size = 0x100; + readsize = 0x100; + ; - memory "flash" - size = 0x00032000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "flash" + size = 0x00032000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "prodsig" - size = 0x200; - offset = 0x8e0200; - page_size = 0x100; - readsize = 0x100; - ; + memory "prodsig" + size = 0x200; + offset = 0x8e0200; + page_size = 0x100; + readsize = 0x100; + ; - memory "usersig" - size = 0x200; - offset = 0x8e0400; - page_size = 0x100; - readsize = 0x100; - ; + memory "usersig" + size = 0x200; + offset = 0x8e0400; + page_size = 0x100; + readsize = 0x100; + ; - memory "signature" - size = 3; - offset = 0x1000090; - ; + memory "signature" + size = 3; + offset = 0x1000090; + ; - memory "fuse0" - size = 1; - offset = 0x8f0020; - ; + memory "fuse0" + size = 1; + offset = 0x8f0020; + ; - memory "fuse1" - size = 1; - offset = 0x8f0021; - ; + memory "fuse1" + size = 1; + offset = 0x8f0021; + ; - memory "fuse2" - size = 1; - offset = 0x8f0022; - ; + memory "fuse2" + size = 1; + offset = 0x8f0022; + ; - memory "fuse4" - size = 1; - offset = 0x8f0024; - ; + memory "fuse4" + size = 1; + offset = 0x8f0024; + ; - memory "fuse5" - size = 1; - offset = 0x8f0025; - ; + memory "fuse5" + size = 1; + offset = 0x8f0025; + ; - memory "lock" - size = 1; - offset = 0x8f0027; - ; + memory "lock" + size = 1; + offset = 0x8f0027; + ; ; #------------------------------------------------------------ @@ -14511,96 +14511,96 @@ part #------------------------------------------------------------ part - id = "x256a3"; - desc = "ATXMEGA256A3"; - signature = 0x1e 0x98 0x42; - has_jtag = yes; - has_pdi = yes; - nvm_base = 0x01c0; + id = "x256a3"; + desc = "ATXMEGA256A3"; + signature = 0x1e 0x98 0x42; + has_jtag = yes; + has_pdi = yes; + nvm_base = 0x01c0; - memory "eeprom" - size = 0x1000; - offset = 0x08c0000; - page_size = 0x20; - readsize = 0x100; - ; + memory "eeprom" + size = 0x1000; + offset = 0x08c0000; + page_size = 0x20; + readsize = 0x100; + ; - memory "application" - size = 0x00040000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "application" + size = 0x00040000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "apptable" - size = 0x00002000; - offset = 0x0083e000; - page_size = 0x100; - readsize = 0x100; - ; + memory "apptable" + size = 0x00002000; + offset = 0x0083e000; + page_size = 0x100; + readsize = 0x100; + ; - memory "boot" - size = 0x00002000; - offset = 0x00840000; - page_size = 0x100; - readsize = 0x100; - ; + memory "boot" + size = 0x00002000; + offset = 0x00840000; + page_size = 0x100; + readsize = 0x100; + ; - memory "flash" - size = 0x00042000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "flash" + size = 0x00042000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "prodsig" - size = 0x200; - offset = 0x8e0200; - page_size = 0x100; - readsize = 0x100; - ; + memory "prodsig" + size = 0x200; + offset = 0x8e0200; + page_size = 0x100; + readsize = 0x100; + ; - memory "usersig" - size = 0x200; - offset = 0x8e0400; - page_size = 0x100; - readsize = 0x100; - ; + memory "usersig" + size = 0x200; + offset = 0x8e0400; + page_size = 0x100; + readsize = 0x100; + ; - memory "signature" - size = 3; - offset = 0x1000090; - ; + memory "signature" + size = 3; + offset = 0x1000090; + ; - memory "fuse0" - size = 1; - offset = 0x8f0020; - ; + memory "fuse0" + size = 1; + offset = 0x8f0020; + ; - memory "fuse1" - size = 1; - offset = 0x8f0021; - ; + memory "fuse1" + size = 1; + offset = 0x8f0021; + ; - memory "fuse2" - size = 1; - offset = 0x8f0022; - ; + memory "fuse2" + size = 1; + offset = 0x8f0022; + ; - memory "fuse4" - size = 1; - offset = 0x8f0024; - ; + memory "fuse4" + size = 1; + offset = 0x8f0024; + ; - memory "fuse5" - size = 1; - offset = 0x8f0025; - ; + memory "fuse5" + size = 1; + offset = 0x8f0025; + ; - memory "lock" - size = 1; - offset = 0x8f0027; - ; + memory "lock" + size = 1; + offset = 0x8f0027; + ; ; #------------------------------------------------------------ @@ -14608,96 +14608,96 @@ part #------------------------------------------------------------ part - id = "x256a3b"; - desc = "ATXMEGA256A3B"; - signature = 0x1e 0x98 0x43; - has_jtag = yes; - has_pdi = yes; - nvm_base = 0x01c0; + id = "x256a3b"; + desc = "ATXMEGA256A3B"; + signature = 0x1e 0x98 0x43; + has_jtag = yes; + has_pdi = yes; + nvm_base = 0x01c0; - memory "eeprom" - size = 0x1000; - offset = 0x08c0000; - page_size = 0x20; - readsize = 0x100; - ; + memory "eeprom" + size = 0x1000; + offset = 0x08c0000; + page_size = 0x20; + readsize = 0x100; + ; - memory "application" - size = 0x00040000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "application" + size = 0x00040000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "apptable" - size = 0x00002000; - offset = 0x0083e000; - page_size = 0x100; - readsize = 0x100; - ; + memory "apptable" + size = 0x00002000; + offset = 0x0083e000; + page_size = 0x100; + readsize = 0x100; + ; - memory "boot" - size = 0x00002000; - offset = 0x00840000; - page_size = 0x100; - readsize = 0x100; - ; + memory "boot" + size = 0x00002000; + offset = 0x00840000; + page_size = 0x100; + readsize = 0x100; + ; - memory "flash" - size = 0x00042000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "flash" + size = 0x00042000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "prodsig" - size = 0x200; - offset = 0x8e0200; - page_size = 0x100; - readsize = 0x100; - ; + memory "prodsig" + size = 0x200; + offset = 0x8e0200; + page_size = 0x100; + readsize = 0x100; + ; - memory "usersig" - size = 0x200; - offset = 0x8e0400; - page_size = 0x100; - readsize = 0x100; - ; + memory "usersig" + size = 0x200; + offset = 0x8e0400; + page_size = 0x100; + readsize = 0x100; + ; - memory "signature" - size = 3; - offset = 0x1000090; - ; + memory "signature" + size = 3; + offset = 0x1000090; + ; - memory "fuse0" - size = 1; - offset = 0x8f0020; - ; + memory "fuse0" + size = 1; + offset = 0x8f0020; + ; - memory "fuse1" - size = 1; - offset = 0x8f0021; - ; + memory "fuse1" + size = 1; + offset = 0x8f0021; + ; - memory "fuse2" - size = 1; - offset = 0x8f0022; - ; + memory "fuse2" + size = 1; + offset = 0x8f0022; + ; - memory "fuse4" - size = 1; - offset = 0x8f0024; - ; + memory "fuse4" + size = 1; + offset = 0x8f0024; + ; - memory "fuse5" - size = 1; - offset = 0x8f0025; - ; + memory "fuse5" + size = 1; + offset = 0x8f0025; + ; - memory "lock" - size = 1; - offset = 0x8f0027; - ; + memory "lock" + size = 1; + offset = 0x8f0027; + ; ; #------------------------------------------------------------ @@ -14705,96 +14705,96 @@ part #------------------------------------------------------------ part - id = "x16a4"; - desc = "ATXMEGA16A4"; - signature = 0x1e 0x94 0x41; - has_jtag = yes; - has_pdi = yes; - nvm_base = 0x01c0; + id = "x16a4"; + desc = "ATXMEGA16A4"; + signature = 0x1e 0x94 0x41; + has_jtag = yes; + has_pdi = yes; + nvm_base = 0x01c0; - memory "eeprom" - size = 0x0400; - offset = 0x08c0000; - page_size = 0x20; - readsize = 0x100; - ; + memory "eeprom" + size = 0x0400; + offset = 0x08c0000; + page_size = 0x20; + readsize = 0x100; + ; - memory "application" - size = 0x00004000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "application" + size = 0x00004000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "apptable" - size = 0x00001000; - offset = 0x00803000; - page_size = 0x100; - readsize = 0x100; - ; + memory "apptable" + size = 0x00001000; + offset = 0x00803000; + page_size = 0x100; + readsize = 0x100; + ; - memory "boot" - size = 0x00001000; - offset = 0x00804000; - page_size = 0x100; - readsize = 0x100; - ; + memory "boot" + size = 0x00001000; + offset = 0x00804000; + page_size = 0x100; + readsize = 0x100; + ; - memory "flash" - size = 0x00005000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "flash" + size = 0x00005000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "prodsig" - size = 0x200; - offset = 0x8e0200; - page_size = 0x100; - readsize = 0x100; - ; + memory "prodsig" + size = 0x200; + offset = 0x8e0200; + page_size = 0x100; + readsize = 0x100; + ; - memory "usersig" - size = 0x200; - offset = 0x8e0400; - page_size = 0x100; - readsize = 0x100; - ; + memory "usersig" + size = 0x200; + offset = 0x8e0400; + page_size = 0x100; + readsize = 0x100; + ; - memory "signature" - size = 3; - offset = 0x1000090; - ; + memory "signature" + size = 3; + offset = 0x1000090; + ; - memory "fuse0" - size = 1; - offset = 0x8f0020; - ; + memory "fuse0" + size = 1; + offset = 0x8f0020; + ; - memory "fuse1" - size = 1; - offset = 0x8f0021; - ; + memory "fuse1" + size = 1; + offset = 0x8f0021; + ; - memory "fuse2" - size = 1; - offset = 0x8f0022; - ; + memory "fuse2" + size = 1; + offset = 0x8f0022; + ; - memory "fuse4" - size = 1; - offset = 0x8f0024; - ; + memory "fuse4" + size = 1; + offset = 0x8f0024; + ; - memory "fuse5" - size = 1; - offset = 0x8f0025; - ; + memory "fuse5" + size = 1; + offset = 0x8f0025; + ; - memory "lock" - size = 1; - offset = 0x8f0027; - ; + memory "lock" + size = 1; + offset = 0x8f0027; + ; ; #------------------------------------------------------------ @@ -14802,96 +14802,96 @@ part #------------------------------------------------------------ part - id = "x32a4"; - desc = "ATXMEGA32A4"; - signature = 0x1e 0x95 0x41; - has_jtag = yes; - has_pdi = yes; - nvm_base = 0x01c0; + id = "x32a4"; + desc = "ATXMEGA32A4"; + signature = 0x1e 0x95 0x41; + has_jtag = yes; + has_pdi = yes; + nvm_base = 0x01c0; - memory "eeprom" - size = 0x0400; - offset = 0x08c0000; - page_size = 0x20; - readsize = 0x100; - ; + memory "eeprom" + size = 0x0400; + offset = 0x08c0000; + page_size = 0x20; + readsize = 0x100; + ; - memory "application" - size = 0x00008000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "application" + size = 0x00008000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "apptable" - size = 0x00001000; - offset = 0x00807000; - page_size = 0x100; - readsize = 0x100; - ; + memory "apptable" + size = 0x00001000; + offset = 0x00807000; + page_size = 0x100; + readsize = 0x100; + ; - memory "boot" - size = 0x00001000; - offset = 0x00808000; - page_size = 0x100; - readsize = 0x100; - ; + memory "boot" + size = 0x00001000; + offset = 0x00808000; + page_size = 0x100; + readsize = 0x100; + ; - memory "flash" - size = 0x00009000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "flash" + size = 0x00009000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "prodsig" - size = 0x200; - offset = 0x8e0200; - page_size = 0x100; - readsize = 0x100; - ; + memory "prodsig" + size = 0x200; + offset = 0x8e0200; + page_size = 0x100; + readsize = 0x100; + ; - memory "usersig" - size = 0x200; - offset = 0x8e0400; - page_size = 0x100; - readsize = 0x100; - ; + memory "usersig" + size = 0x200; + offset = 0x8e0400; + page_size = 0x100; + readsize = 0x100; + ; - memory "signature" - size = 3; - offset = 0x1000090; - ; + memory "signature" + size = 3; + offset = 0x1000090; + ; - memory "fuse0" - size = 1; - offset = 0x8f0020; - ; + memory "fuse0" + size = 1; + offset = 0x8f0020; + ; - memory "fuse1" - size = 1; - offset = 0x8f0021; - ; + memory "fuse1" + size = 1; + offset = 0x8f0021; + ; - memory "fuse2" - size = 1; - offset = 0x8f0022; - ; + memory "fuse2" + size = 1; + offset = 0x8f0022; + ; - memory "fuse4" - size = 1; - offset = 0x8f0024; - ; + memory "fuse4" + size = 1; + offset = 0x8f0024; + ; - memory "fuse5" - size = 1; - offset = 0x8f0025; - ; + memory "fuse5" + size = 1; + offset = 0x8f0025; + ; - memory "lock" - size = 1; - offset = 0x8f0027; - ; + memory "lock" + size = 1; + offset = 0x8f0027; + ; ; #------------------------------------------------------------ @@ -14899,96 +14899,96 @@ part #------------------------------------------------------------ part - id = "x64a4"; - desc = "ATXMEGA64A4"; - signature = 0x1e 0x96 0x46; - has_jtag = yes; - has_pdi = yes; - nvm_base = 0x01c0; + id = "x64a4"; + desc = "ATXMEGA64A4"; + signature = 0x1e 0x96 0x46; + has_jtag = yes; + has_pdi = yes; + nvm_base = 0x01c0; - memory "eeprom" - size = 0x0800; - offset = 0x08c0000; - page_size = 0x20; - readsize = 0x100; - ; + memory "eeprom" + size = 0x0800; + offset = 0x08c0000; + page_size = 0x20; + readsize = 0x100; + ; - memory "application" - size = 0x00010000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "application" + size = 0x00010000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "apptable" - size = 0x00001000; - offset = 0x0080f000; - page_size = 0x100; - readsize = 0x100; - ; + memory "apptable" + size = 0x00001000; + offset = 0x0080f000; + page_size = 0x100; + readsize = 0x100; + ; - memory "boot" - size = 0x00001000; - offset = 0x00810000; - page_size = 0x100; - readsize = 0x100; - ; + memory "boot" + size = 0x00001000; + offset = 0x00810000; + page_size = 0x100; + readsize = 0x100; + ; - memory "flash" - size = 0x00011000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "flash" + size = 0x00011000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "prodsig" - size = 0x200; - offset = 0x8e0200; - page_size = 0x100; - readsize = 0x100; - ; + memory "prodsig" + size = 0x200; + offset = 0x8e0200; + page_size = 0x100; + readsize = 0x100; + ; - memory "usersig" - size = 0x200; - offset = 0x8e0400; - page_size = 0x100; - readsize = 0x100; - ; + memory "usersig" + size = 0x200; + offset = 0x8e0400; + page_size = 0x100; + readsize = 0x100; + ; - memory "signature" - size = 3; - offset = 0x1000090; - ; + memory "signature" + size = 3; + offset = 0x1000090; + ; - memory "fuse0" - size = 1; - offset = 0x8f0020; - ; + memory "fuse0" + size = 1; + offset = 0x8f0020; + ; - memory "fuse1" - size = 1; - offset = 0x8f0021; - ; + memory "fuse1" + size = 1; + offset = 0x8f0021; + ; - memory "fuse2" - size = 1; - offset = 0x8f0022; - ; + memory "fuse2" + size = 1; + offset = 0x8f0022; + ; - memory "fuse4" - size = 1; - offset = 0x8f0024; - ; + memory "fuse4" + size = 1; + offset = 0x8f0024; + ; - memory "fuse5" - size = 1; - offset = 0x8f0025; - ; + memory "fuse5" + size = 1; + offset = 0x8f0025; + ; - memory "lock" - size = 1; - offset = 0x8f0027; - ; + memory "lock" + size = 1; + offset = 0x8f0027; + ; ; #------------------------------------------------------------ @@ -14996,96 +14996,96 @@ part #------------------------------------------------------------ part - id = "x128a4"; - desc = "ATXMEGA128A4"; - signature = 0x1e 0x97 0x46; - has_jtag = yes; - has_pdi = yes; - nvm_base = 0x01c0; + id = "x128a4"; + desc = "ATXMEGA128A4"; + signature = 0x1e 0x97 0x46; + has_jtag = yes; + has_pdi = yes; + nvm_base = 0x01c0; - memory "eeprom" - size = 0x0800; - offset = 0x08c0000; - page_size = 0x20; - readsize = 0x100; - ; + memory "eeprom" + size = 0x0800; + offset = 0x08c0000; + page_size = 0x20; + readsize = 0x100; + ; - memory "application" - size = 0x00020000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "application" + size = 0x00020000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "apptable" - size = 0x00002000; - offset = 0x0081e000; - page_size = 0x100; - readsize = 0x100; - ; + memory "apptable" + size = 0x00002000; + offset = 0x0081e000; + page_size = 0x100; + readsize = 0x100; + ; - memory "boot" - size = 0x00002000; - offset = 0x00820000; - page_size = 0x100; - readsize = 0x100; - ; + memory "boot" + size = 0x00002000; + offset = 0x00820000; + page_size = 0x100; + readsize = 0x100; + ; - memory "flash" - size = 0x00022000; - offset = 0x0800000; - page_size = 0x100; - readsize = 0x100; - ; + memory "flash" + size = 0x00022000; + offset = 0x0800000; + page_size = 0x100; + readsize = 0x100; + ; - memory "prodsig" - size = 0x200; - offset = 0x8e0200; - page_size = 0x100; - readsize = 0x100; - ; + memory "prodsig" + size = 0x200; + offset = 0x8e0200; + page_size = 0x100; + readsize = 0x100; + ; - memory "usersig" - size = 0x200; - offset = 0x8e0400; - page_size = 0x100; - readsize = 0x100; - ; + memory "usersig" + size = 0x200; + offset = 0x8e0400; + page_size = 0x100; + readsize = 0x100; + ; - memory "signature" - size = 3; - offset = 0x1000090; - ; + memory "signature" + size = 3; + offset = 0x1000090; + ; - memory "fuse0" - size = 1; - offset = 0x8f0020; - ; + memory "fuse0" + size = 1; + offset = 0x8f0020; + ; - memory "fuse1" - size = 1; - offset = 0x8f0021; - ; + memory "fuse1" + size = 1; + offset = 0x8f0021; + ; - memory "fuse2" - size = 1; - offset = 0x8f0022; - ; + memory "fuse2" + size = 1; + offset = 0x8f0022; + ; - memory "fuse4" - size = 1; - offset = 0x8f0024; - ; + memory "fuse4" + size = 1; + offset = 0x8f0024; + ; - memory "fuse5" - size = 1; - offset = 0x8f0025; - ; + memory "fuse5" + size = 1; + offset = 0x8f0025; + ; - memory "lock" - size = 1; - offset = 0x8f0027; - ; + memory "lock" + size = 1; + offset = 0x8f0027; + ; ; @@ -15094,20 +15094,20 @@ part #------------------------------------------------------------ part - id = "ucr2"; - desc = "32UC3A0512"; - signature = 0xED 0xC0 0x3F; - has_jtag = yes; - is_avr32 = yes; + id = "ucr2"; + desc = "32UC3A0512"; + signature = 0xED 0xC0 0x3F; + has_jtag = yes; + is_avr32 = yes; - memory "flash" - paged = yes; - page_size = 512; # bytes - readsize = 512; # bytes - num_pages = 1024; # could be set dynamicly - size = 0x00080000; # could be set dynamicly - offset = 0x80000000; - ; + memory "flash" + paged = yes; + page_size = 512; # bytes + readsize = 512; # bytes + num_pages = 1024; # could be set dynamicly + size = 0x00080000; # could be set dynamicly + offset = 0x80000000; + ; ; #------------------------------------------------------------ @@ -15115,38 +15115,38 @@ part #------------------------------------------------------------ part - id = "t4"; - desc = "ATtiny4"; - signature = 0x1e 0x8f 0x0a; - has_tpi = yes; + id = "t4"; + desc = "ATtiny4"; + signature = 0x1e 0x8f 0x0a; + has_tpi = yes; - memory "flash" - size = 512; - offset = 0x4000; - page_size = 16; - blocksize = 128; - ; + memory "flash" + size = 512; + offset = 0x4000; + page_size = 16; + blocksize = 128; + ; - memory "signature" - size = 3; - offset = 0x3fc0; - ; + memory "signature" + size = 3; + offset = 0x3fc0; + ; - memory "fuse" - size = 1; - offset = 0x3f40; - blocksize = 4; - ; + memory "fuse" + size = 1; + offset = 0x3f40; + blocksize = 4; + ; - memory "calibration" - size = 1; - offset = 0x3f80; - ; + memory "calibration" + size = 1; + offset = 0x3f80; + ; - memory "lockbits" - size = 1; - offset = 0x3f00; - ; + memory "lockbits" + size = 1; + offset = 0x3f00; + ; ; @@ -15155,38 +15155,38 @@ part #------------------------------------------------------------ part - id = "t5"; - desc = "ATtiny5"; - signature = 0x1e 0x8f 0x09; - has_tpi = yes; + id = "t5"; + desc = "ATtiny5"; + signature = 0x1e 0x8f 0x09; + has_tpi = yes; - memory "flash" - size = 512; - offset = 0x4000; - page_size = 16; - blocksize = 128; - ; + memory "flash" + size = 512; + offset = 0x4000; + page_size = 16; + blocksize = 128; + ; - memory "signature" - size = 3; - offset = 0x3fc0; - ; + memory "signature" + size = 3; + offset = 0x3fc0; + ; - memory "fuse" - size = 1; - offset = 0x3f40; - blocksize = 4; - ; + memory "fuse" + size = 1; + offset = 0x3f40; + blocksize = 4; + ; - memory "calibration" - size = 1; - offset = 0x3f80; - ; + memory "calibration" + size = 1; + offset = 0x3f80; + ; - memory "lockbits" - size = 1; - offset = 0x3f00; - ; + memory "lockbits" + size = 1; + offset = 0x3f00; + ; ; @@ -15195,38 +15195,38 @@ part #------------------------------------------------------------ part - id = "t8"; - desc = "ATtiny9"; - signature = 0x1e 0x90 0x08; - has_tpi = yes; + id = "t8"; + desc = "ATtiny9"; + signature = 0x1e 0x90 0x08; + has_tpi = yes; - memory "flash" - size = 1024; - offset = 0x4000; - page_size = 16; - blocksize = 128; - ; + memory "flash" + size = 1024; + offset = 0x4000; + page_size = 16; + blocksize = 128; + ; - memory "signature" - size = 3; - offset = 0x3fc0; - ; + memory "signature" + size = 3; + offset = 0x3fc0; + ; - memory "fuse" - size = 1; - offset = 0x3f40; - blocksize = 4; - ; + memory "fuse" + size = 1; + offset = 0x3f40; + blocksize = 4; + ; - memory "calibration" - size = 1; - offset = 0x3f80; - ; + memory "calibration" + size = 1; + offset = 0x3f80; + ; - memory "lockbits" - size = 1; - offset = 0x3f00; - ; + memory "lockbits" + size = 1; + offset = 0x3f00; + ; ; @@ -15235,38 +15235,38 @@ part #------------------------------------------------------------ part - id = "t10"; - desc = "ATtiny10"; - signature = 0x1e 0x90 0x03; - has_tpi = yes; + id = "t10"; + desc = "ATtiny10"; + signature = 0x1e 0x90 0x03; + has_tpi = yes; - memory "flash" - size = 1024; - offset = 0x4000; - page_size = 16; - blocksize = 128; - ; + memory "flash" + size = 1024; + offset = 0x4000; + page_size = 16; + blocksize = 128; + ; - memory "signature" - size = 3; - offset = 0x3fc0; - ; + memory "signature" + size = 3; + offset = 0x3fc0; + ; - memory "fuse" - size = 1; - offset = 0x3f40; - blocksize = 4; - ; + memory "fuse" + size = 1; + offset = 0x3f40; + blocksize = 4; + ; - memory "calibration" - size = 1; - offset = 0x3f80; - ; + memory "calibration" + size = 1; + offset = 0x3f80; + ; - memory "lockbits" - size = 1; - offset = 0x3f00; - ; + memory "lockbits" + size = 1; + offset = 0x3f00; + ; ; diff --git a/buildroot/tests/mks_tinybee b/buildroot/tests/mks_tinybee index 8b5aa0f075..9dcc33ede7 100755 --- a/buildroot/tests/mks_tinybee +++ b/buildroot/tests/mks_tinybee @@ -21,10 +21,10 @@ exec_test $1 "$2" "MKS TinyBee with ESP3D_WIFISUPPORT" "$3" # restore_configs opt_set MOTHERBOARD BOARD_MKS_TINYBEE \ - LCD_LANGUAGE en \ - LCD_INFO_SCREEN_STYLE 0 \ - DISPLAY_CHARSET_HD44780 WESTERN \ - NEOPIXEL_TYPE NEO_RGB + LCD_LANGUAGE en \ + LCD_INFO_SCREEN_STYLE 0 \ + DISPLAY_CHARSET_HD44780 WESTERN \ + NEOPIXEL_TYPE NEO_RGB opt_enable FYSETC_MINI_12864_2_1 SDSUPPORT opt_enable LED_CONTROL_MENU LED_USER_PRESET_STARTUP LED_COLOR_PRESETS NEOPIXEL_LED exec_test $1 $2 "MKS TinyBee with NeoPixel LCD, SD and Speaker" "$3" diff --git a/buildroot/web-ui/data/www/webmarlin.js b/buildroot/web-ui/data/www/webmarlin.js index 943f7b9c08..3eb5139fb1 100644 --- a/buildroot/web-ui/data/www/webmarlin.js +++ b/buildroot/web-ui/data/www/webmarlin.js @@ -41,7 +41,7 @@ var WmButtonGroups = { var wmWebSoket = { WSObject: null, Connect: function() { - WsUrl=`ws://${location.host}/ws`; + WsUrl=`ws://${location.host}/ws`; try { if(wmWebSoket.WSObject === null) { jsLog.Debug("WebSocket: Trying connecting to " + WsUrl); From f0f5cd473417b55442069372d8ef80ff1113f117 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 7 Apr 2023 14:45:55 -0500 Subject: [PATCH 131/225] =?UTF-8?q?=F0=9F=A7=B1=20Bump=20all=20the=20dates?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/bump-date.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/bump-date.yml b/.github/workflows/bump-date.yml index 51b58ad493..482fbbbb40 100644 --- a/.github/workflows/bump-date.yml +++ b/.github/workflows/bump-date.yml @@ -18,10 +18,10 @@ jobs: steps: - - name: Check out bugfix-2.1.x + - name: Check out bugfix-2.0.x uses: actions/checkout@v2 with: - ref: bugfix-2.1.x + ref: bugfix-2.0.x - name: Bump Date (bugfix-2.0.x) run: | From fa0b86ff98d39db5b078bc68a9647c3303b4ced2 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 26 Mar 2023 20:26:18 -0500 Subject: [PATCH 132/225] =?UTF-8?q?=F0=9F=94=A7=20Move=20TFT=20sanity=20ch?= =?UTF-8?q?ecks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/AVR/inc/Conditionals_LCD.h | 4 ---- Marlin/src/HAL/AVR/inc/SanityCheck.h | 4 ++++ Marlin/src/HAL/DUE/inc/Conditionals_LCD.h | 4 ---- Marlin/src/HAL/DUE/inc/SanityCheck.h | 6 +++++- Marlin/src/HAL/ESP32/inc/Conditionals_LCD.h | 4 ---- Marlin/src/HAL/ESP32/inc/SanityCheck.h | 11 +++++++++-- Marlin/src/HAL/LINUX/inc/Conditionals_LCD.h | 4 ---- Marlin/src/HAL/LINUX/inc/SanityCheck.h | 10 +++++++--- Marlin/src/HAL/LPC1768/inc/Conditionals_LCD.h | 4 ---- Marlin/src/HAL/LPC1768/inc/SanityCheck.h | 4 ++++ Marlin/src/HAL/NATIVE_SIM/inc/SanityCheck.h | 2 +- Marlin/src/HAL/SAMD21/inc/Conditionals_LCD.h | 8 -------- Marlin/src/HAL/SAMD21/inc/SanityCheck.h | 6 +++++- Marlin/src/HAL/SAMD51/inc/Conditionals_LCD.h | 4 ---- Marlin/src/HAL/SAMD51/inc/SanityCheck.h | 6 +++++- Marlin/src/HAL/TEENSY31_32/inc/Conditionals_LCD.h | 4 ---- Marlin/src/HAL/TEENSY31_32/inc/SanityCheck.h | 12 ++++++++---- Marlin/src/HAL/TEENSY35_36/inc/Conditionals_LCD.h | 4 ---- Marlin/src/HAL/TEENSY35_36/inc/SanityCheck.h | 12 ++++++++---- Marlin/src/HAL/TEENSY40_41/inc/Conditionals_LCD.h | 4 ---- Marlin/src/HAL/TEENSY40_41/inc/SanityCheck.h | 10 +++++++--- 21 files changed, 63 insertions(+), 64 deletions(-) diff --git a/Marlin/src/HAL/AVR/inc/Conditionals_LCD.h b/Marlin/src/HAL/AVR/inc/Conditionals_LCD.h index a611ccd7c4..5f1c4b1601 100644 --- a/Marlin/src/HAL/AVR/inc/Conditionals_LCD.h +++ b/Marlin/src/HAL/AVR/inc/Conditionals_LCD.h @@ -20,7 +20,3 @@ * */ #pragma once - -#if HAS_SPI_TFT || HAS_FSMC_TFT - #error "Sorry! TFT displays are not available for HAL/AVR." -#endif diff --git a/Marlin/src/HAL/AVR/inc/SanityCheck.h b/Marlin/src/HAL/AVR/inc/SanityCheck.h index 45aa3a50b9..665e68043a 100644 --- a/Marlin/src/HAL/AVR/inc/SanityCheck.h +++ b/Marlin/src/HAL/AVR/inc/SanityCheck.h @@ -25,6 +25,10 @@ * Test AVR-specific configuration values for errors at compile-time. */ +#if HAS_SPI_TFT || HAS_FSMC_TFT + #error "Sorry! TFT displays are not available for HAL/AVR." +#endif + /** * Check for common serial pin conflicts */ diff --git a/Marlin/src/HAL/DUE/inc/Conditionals_LCD.h b/Marlin/src/HAL/DUE/inc/Conditionals_LCD.h index 5867414447..5f1c4b1601 100644 --- a/Marlin/src/HAL/DUE/inc/Conditionals_LCD.h +++ b/Marlin/src/HAL/DUE/inc/Conditionals_LCD.h @@ -20,7 +20,3 @@ * */ #pragma once - -#if HAS_SPI_TFT || HAS_FSMC_TFT - #error "Sorry! TFT displays are not available for HAL/DUE." -#endif diff --git a/Marlin/src/HAL/DUE/inc/SanityCheck.h b/Marlin/src/HAL/DUE/inc/SanityCheck.h index 996404a7d0..6bbf04a0ac 100644 --- a/Marlin/src/HAL/DUE/inc/SanityCheck.h +++ b/Marlin/src/HAL/DUE/inc/SanityCheck.h @@ -25,6 +25,10 @@ * Test Arduino Due specific configuration values for errors at compile-time. */ +#if HAS_SPI_TFT || HAS_FSMC_TFT + #error "Sorry! TFT displays are not available for HAL/DUE." +#endif + /** * Check for common serial pin conflicts */ @@ -77,7 +81,7 @@ #endif #if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY - #error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on DUE." + #error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported for HAL/DUE." #endif #if HAS_TMC_SW_SERIAL diff --git a/Marlin/src/HAL/ESP32/inc/Conditionals_LCD.h b/Marlin/src/HAL/ESP32/inc/Conditionals_LCD.h index 4da600179d..5f1c4b1601 100644 --- a/Marlin/src/HAL/ESP32/inc/Conditionals_LCD.h +++ b/Marlin/src/HAL/ESP32/inc/Conditionals_LCD.h @@ -20,7 +20,3 @@ * */ #pragma once - -#if HAS_SPI_TFT || HAS_FSMC_TFT - #error "Sorry! TFT displays are not available for HAL/ESP32." -#endif diff --git a/Marlin/src/HAL/ESP32/inc/SanityCheck.h b/Marlin/src/HAL/ESP32/inc/SanityCheck.h index 2d1b850330..910918b9ea 100644 --- a/Marlin/src/HAL/ESP32/inc/SanityCheck.h +++ b/Marlin/src/HAL/ESP32/inc/SanityCheck.h @@ -21,12 +21,19 @@ */ #pragma once +#if HAS_SPI_TFT || HAS_FSMC_TFT + #error "Sorry! TFT displays are not available for HAL/ESP32." +#endif + #if ENABLED(EMERGENCY_PARSER) #error "EMERGENCY_PARSER is not yet implemented for ESP32. Disable EMERGENCY_PARSER to continue." #endif -#if (ENABLED(SPINDLE_LASER_USE_PWM) && SPINDLE_LASER_FREQUENCY > 78125) || (ENABLED(FAST_PWM_FAN_FREQUENCY) && FAST_PWM_FAN_FREQUENCY > 78125) - #error "SPINDLE_LASER_FREQUENCY and FAST_PWM_FREQUENCY maximum value is 78125Hz for ESP32." +#if ENABLED(SPINDLE_LASER_USE_PWM) && SPINDLE_LASER_FREQUENCY > 78125 + #error "SPINDLE_LASER_FREQUENCY maximum value is 78125Hz for ESP32." +#endif +#if ENABLED(FAST_PWM_FAN) && FAST_PWM_FAN_FREQUENCY > 78125 + #error "FAST_PWM_FREQUENCY maximum value is 78125Hz for ESP32." #endif #if HAS_TMC_SW_SERIAL diff --git a/Marlin/src/HAL/LINUX/inc/Conditionals_LCD.h b/Marlin/src/HAL/LINUX/inc/Conditionals_LCD.h index 99a6fc2753..5f1c4b1601 100644 --- a/Marlin/src/HAL/LINUX/inc/Conditionals_LCD.h +++ b/Marlin/src/HAL/LINUX/inc/Conditionals_LCD.h @@ -20,7 +20,3 @@ * */ #pragma once - -#if HAS_SPI_TFT || HAS_FSMC_TFT - #error "Sorry! TFT displays are not available for HAL/LINUX." -#endif diff --git a/Marlin/src/HAL/LINUX/inc/SanityCheck.h b/Marlin/src/HAL/LINUX/inc/SanityCheck.h index 36d3190a3e..861bade10f 100644 --- a/Marlin/src/HAL/LINUX/inc/SanityCheck.h +++ b/Marlin/src/HAL/LINUX/inc/SanityCheck.h @@ -31,13 +31,17 @@ #endif #if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY - #error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on LINUX." + #error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported for HAL/LINUX." +#endif + +#if HAS_SPI_TFT || HAS_FSMC_TFT + #error "Sorry! TFT displays are not available for HAL/LINUX." #endif #if HAS_TMC_SW_SERIAL - #error "TMC220x Software Serial is not supported on LINUX." + #error "TMC220x Software Serial is not supported for HAL/LINUX." #endif #if ENABLED(POSTMORTEM_DEBUGGING) - #error "POSTMORTEM_DEBUGGING is not yet supported on LINUX." + #error "POSTMORTEM_DEBUGGING is not yet supported for HAL/LINUX." #endif diff --git a/Marlin/src/HAL/LPC1768/inc/Conditionals_LCD.h b/Marlin/src/HAL/LPC1768/inc/Conditionals_LCD.h index 32ef908d63..5f1c4b1601 100644 --- a/Marlin/src/HAL/LPC1768/inc/Conditionals_LCD.h +++ b/Marlin/src/HAL/LPC1768/inc/Conditionals_LCD.h @@ -20,7 +20,3 @@ * */ #pragma once - -#if HAS_FSMC_TFT - #error "Sorry! FSMC TFT displays are not current available for HAL/LPC1768." -#endif diff --git a/Marlin/src/HAL/LPC1768/inc/SanityCheck.h b/Marlin/src/HAL/LPC1768/inc/SanityCheck.h index b9a3360668..9f78f2a70d 100644 --- a/Marlin/src/HAL/LPC1768/inc/SanityCheck.h +++ b/Marlin/src/HAL/LPC1768/inc/SanityCheck.h @@ -77,6 +77,10 @@ static_assert(!(NUM_SERVOS && ENABLED(FAST_PWM_FAN)), "BLTOUCH and Servos are in #endif #endif +#if HAS_FSMC_TFT + #error "Sorry! FSMC TFT displays are not current available for HAL/LPC1768." +#endif + static_assert(DISABLED(BAUD_RATE_GCODE), "BAUD_RATE_GCODE is not yet supported on LPC176x."); /** diff --git a/Marlin/src/HAL/NATIVE_SIM/inc/SanityCheck.h b/Marlin/src/HAL/NATIVE_SIM/inc/SanityCheck.h index 2d7bef23a3..615e5254c9 100644 --- a/Marlin/src/HAL/NATIVE_SIM/inc/SanityCheck.h +++ b/Marlin/src/HAL/NATIVE_SIM/inc/SanityCheck.h @@ -31,7 +31,7 @@ #endif #if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY - #error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on LINUX." + #error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported for HAL/LINUX." #endif #if HAS_TMC_SW_SERIAL diff --git a/Marlin/src/HAL/SAMD21/inc/Conditionals_LCD.h b/Marlin/src/HAL/SAMD21/inc/Conditionals_LCD.h index ca467937c3..9d58e45432 100644 --- a/Marlin/src/HAL/SAMD21/inc/Conditionals_LCD.h +++ b/Marlin/src/HAL/SAMD21/inc/Conditionals_LCD.h @@ -20,12 +20,4 @@ * */ -/** - * SAMD21 HAL developed by Bart Meijer (brupje) - * Based on SAMD51 HAL by Giuliano Zaro (AKA GMagician) - */ #pragma once - -#if HAS_SPI_TFT || HAS_FSMC_TFT - #error "Sorry! TFT displays are not available for HAL/SAMD21." -#endif diff --git a/Marlin/src/HAL/SAMD21/inc/SanityCheck.h b/Marlin/src/HAL/SAMD21/inc/SanityCheck.h index 95fa5e5940..8bf052e3bb 100644 --- a/Marlin/src/HAL/SAMD21/inc/SanityCheck.h +++ b/Marlin/src/HAL/SAMD21/inc/SanityCheck.h @@ -29,6 +29,10 @@ * Test SAMD21 specific configuration values for errors at compile-time. */ +#if HAS_SPI_TFT || HAS_FSMC_TFT + #error "Sorry! TFT displays are not available for HAL/SAMD21." +#endif + #if SERVO_TC == MF_TIMER_RTC #error "Servos can't use RTC timer" #endif @@ -42,7 +46,7 @@ #endif #if ENABLED(FAST_PWM_FAN) - #error "Features requiring Hardware PWM (FAST_PWM_FAN) are not yet supported on SAMD21." + #error "Features requiring Hardware PWM (FAST_PWM_FAN) are not yet supported for HAL/SAMD21." #endif #if ENABLED(POSTMORTEM_DEBUGGING) diff --git a/Marlin/src/HAL/SAMD51/inc/Conditionals_LCD.h b/Marlin/src/HAL/SAMD51/inc/Conditionals_LCD.h index 932348c52f..5f1c4b1601 100644 --- a/Marlin/src/HAL/SAMD51/inc/Conditionals_LCD.h +++ b/Marlin/src/HAL/SAMD51/inc/Conditionals_LCD.h @@ -20,7 +20,3 @@ * */ #pragma once - -#if HAS_SPI_TFT || HAS_FSMC_TFT - #error "Sorry! TFT displays are not available for HAL/SAMD51." -#endif diff --git a/Marlin/src/HAL/SAMD51/inc/SanityCheck.h b/Marlin/src/HAL/SAMD51/inc/SanityCheck.h index ae1bc2f3ef..f9ff090f75 100644 --- a/Marlin/src/HAL/SAMD51/inc/SanityCheck.h +++ b/Marlin/src/HAL/SAMD51/inc/SanityCheck.h @@ -29,6 +29,10 @@ * Test SAMD51 specific configuration values for errors at compile-time. */ +#if HAS_SPI_TFT || HAS_FSMC_TFT + #error "Sorry! TFT displays are not available for HAL/SAMD51." +#endif + #if ENABLED(FLASH_EEPROM_EMULATION) #warning "Did you activate the SmartEEPROM? See https://github.com/GMagician/SAMD51-SmartEEprom-Manager/releases" #endif @@ -55,7 +59,7 @@ #endif #if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY - #error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on SAMD51." + #error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported for HAL/SAMD51." #endif #if ENABLED(POSTMORTEM_DEBUGGING) diff --git a/Marlin/src/HAL/TEENSY31_32/inc/Conditionals_LCD.h b/Marlin/src/HAL/TEENSY31_32/inc/Conditionals_LCD.h index 54ec166643..5f1c4b1601 100644 --- a/Marlin/src/HAL/TEENSY31_32/inc/Conditionals_LCD.h +++ b/Marlin/src/HAL/TEENSY31_32/inc/Conditionals_LCD.h @@ -20,7 +20,3 @@ * */ #pragma once - -#if HAS_SPI_TFT || HAS_FSMC_TFT - #error "Sorry! TFT displays are not available for HAL/TEENSY31_32." -#endif diff --git a/Marlin/src/HAL/TEENSY31_32/inc/SanityCheck.h b/Marlin/src/HAL/TEENSY31_32/inc/SanityCheck.h index dbce187673..c5b25f2cb5 100644 --- a/Marlin/src/HAL/TEENSY31_32/inc/SanityCheck.h +++ b/Marlin/src/HAL/TEENSY31_32/inc/SanityCheck.h @@ -25,22 +25,26 @@ * Test TEENSY35_36 specific configuration values for errors at compile-time. */ +#if HAS_SPI_TFT || HAS_FSMC_TFT + #error "Sorry! TFT displays are not available for Teensy 3.1/3.2." +#endif + #if ENABLED(EMERGENCY_PARSER) #error "EMERGENCY_PARSER is not yet implemented for Teensy 3.1/3.2. Disable EMERGENCY_PARSER to continue." #endif #if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY - #error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on Teensy 3.1/3.2." + #error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported for Teensy 3.1/3.2." #endif #if HAS_TMC_SW_SERIAL - #error "TMC220x Software Serial is not supported on Teensy 3.1/3.2." + #error "TMC220x Software Serial is not supported for Teensy 3.1/3.2." #endif #if ENABLED(POSTMORTEM_DEBUGGING) - #error "POSTMORTEM_DEBUGGING is not yet supported on Teensy 3.1/3.2." + #error "POSTMORTEM_DEBUGGING is not yet supported for Teensy 3.1/3.2." #endif #if USING_PULLDOWNS - #error "PULLDOWN pin mode is not available on Teensy 3.1/3.2 boards." + #error "PULLDOWN pin mode is not available for Teensy 3.1/3.2." #endif diff --git a/Marlin/src/HAL/TEENSY35_36/inc/Conditionals_LCD.h b/Marlin/src/HAL/TEENSY35_36/inc/Conditionals_LCD.h index 632ee533ac..5f1c4b1601 100644 --- a/Marlin/src/HAL/TEENSY35_36/inc/Conditionals_LCD.h +++ b/Marlin/src/HAL/TEENSY35_36/inc/Conditionals_LCD.h @@ -20,7 +20,3 @@ * */ #pragma once - -#if HAS_SPI_TFT || HAS_FSMC_TFT - #error "Sorry! TFT displays are not available for HAL/TEENSY35_36." -#endif diff --git a/Marlin/src/HAL/TEENSY35_36/inc/SanityCheck.h b/Marlin/src/HAL/TEENSY35_36/inc/SanityCheck.h index 3308707371..ff6d772411 100644 --- a/Marlin/src/HAL/TEENSY35_36/inc/SanityCheck.h +++ b/Marlin/src/HAL/TEENSY35_36/inc/SanityCheck.h @@ -25,22 +25,26 @@ * Test TEENSY35_36 specific configuration values for errors at compile-time. */ +#if HAS_SPI_TFT || HAS_FSMC_TFT + #error "Sorry! TFT displays are not available for Teensy 3.5/3.6. +#endif + #if ENABLED(EMERGENCY_PARSER) #error "EMERGENCY_PARSER is not yet implemented for Teensy 3.5/3.6. Disable EMERGENCY_PARSER to continue." #endif #if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY - #error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on Teensy 3.5/3.6." + #error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported for Teensy 3.5/3.6." #endif #if HAS_TMC_SW_SERIAL - #error "TMC220x Software Serial is not supported on Teensy 3.5/3.6." + #error "TMC220x Software Serial is not supported for Teensy 3.5/3.6." #endif #if ENABLED(POSTMORTEM_DEBUGGING) - #error "POSTMORTEM_DEBUGGING is not yet supported on Teensy 3.5/3.6." + #error "POSTMORTEM_DEBUGGING is not yet supported for Teensy 3.5/3.6." #endif #if USING_PULLDOWNS - #error "PULLDOWN pin mode is not available on Teensy 3.5/3.6 boards." + #error "PULLDOWN pin mode is not available for Teensy 3.5/3.6." #endif diff --git a/Marlin/src/HAL/TEENSY40_41/inc/Conditionals_LCD.h b/Marlin/src/HAL/TEENSY40_41/inc/Conditionals_LCD.h index 6a8540927b..5f1c4b1601 100644 --- a/Marlin/src/HAL/TEENSY40_41/inc/Conditionals_LCD.h +++ b/Marlin/src/HAL/TEENSY40_41/inc/Conditionals_LCD.h @@ -20,7 +20,3 @@ * */ #pragma once - -#if HAS_SPI_TFT || HAS_FSMC_TFT - #error "Sorry! TFT displays are not available for HAL/TEENSY40_41." -#endif diff --git a/Marlin/src/HAL/TEENSY40_41/inc/SanityCheck.h b/Marlin/src/HAL/TEENSY40_41/inc/SanityCheck.h index 3d2668d749..731658b4a3 100644 --- a/Marlin/src/HAL/TEENSY40_41/inc/SanityCheck.h +++ b/Marlin/src/HAL/TEENSY40_41/inc/SanityCheck.h @@ -25,18 +25,22 @@ * Test TEENSY41 specific configuration values for errors at compile-time. */ +#if HAS_SPI_TFT || HAS_FSMC_TFT + #error "Sorry! TFT displays are not available for Teensy 4.0/4.1." +#endif + #if ENABLED(EMERGENCY_PARSER) #error "EMERGENCY_PARSER is not yet implemented for Teensy 4.0/4.1. Disable EMERGENCY_PARSER to continue." #endif #if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY - #error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on Teensy 4.0/4.1." + #error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported for Teensy 4.0/4.1." #endif #if HAS_TMC_SW_SERIAL - #error "TMC220x Software Serial is not supported on Teensy 4.0/4.1." + #error "TMC220x Software Serial is not supported for Teensy 4.0/4.1." #endif #if ENABLED(POSTMORTEM_DEBUGGING) - #error "POSTMORTEM_DEBUGGING is not yet supported on Teensy 4.0/4.1." + #error "POSTMORTEM_DEBUGGING is not yet supported for Teensy 4.0/4.1." #endif From f1970b9da80ea3c7795267b02b12a33c354e2139 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sat, 8 Apr 2023 00:18:59 +0000 Subject: [PATCH 133/225] [cron] Bump distribution date (2023-04-08) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 7e27512e97..7968a02f3e 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-04-07" +//#define STRING_DISTRIBUTION_DATE "2023-04-08" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 5b28b7c96f..f19dfc7acf 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-04-07" + #define STRING_DISTRIBUTION_DATE "2023-04-08" #endif /** From c7290f00e01e233c14829f3bd8d899f92a8010e0 Mon Sep 17 00:00:00 2001 From: Jason Smith Date: Fri, 7 Apr 2023 18:52:33 -0700 Subject: [PATCH 134/225] =?UTF-8?q?=F0=9F=8E=A8=20Suppress=20M122=20sign?= =?UTF-8?q?=20warning=20(#25613)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/gcode/feature/trinamic/M122.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/gcode/feature/trinamic/M122.cpp b/Marlin/src/gcode/feature/trinamic/M122.cpp index 07fe9e5bd8..61786d51ad 100644 --- a/Marlin/src/gcode/feature/trinamic/M122.cpp +++ b/Marlin/src/gcode/feature/trinamic/M122.cpp @@ -47,7 +47,7 @@ void GcodeSuite::M122() { if (sflag && !sval) tmc_set_report_interval(0); else if (parser.seenval('P')) - tmc_set_report_interval(_MAX(250, parser.value_ushort())); + tmc_set_report_interval(_MAX(uint16_t(250), parser.value_ushort())); else if (sval) tmc_set_report_interval(MONITOR_DRIVER_STATUS_INTERVAL_MS); #endif From 56f2da8c9d4f0b1a0a337fcf176c805e93fb98bf Mon Sep 17 00:00:00 2001 From: Chris Pepper Date: Sat, 8 Apr 2023 02:55:10 +0100 Subject: [PATCH 135/225] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20SD=20partitionTabl?= =?UTF-8?q?e=20packing=20(#25648)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/sd/SdFatStructs.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Marlin/src/sd/SdFatStructs.h b/Marlin/src/sd/SdFatStructs.h index 03bbc1c194..b3f94b57a0 100644 --- a/Marlin/src/sd/SdFatStructs.h +++ b/Marlin/src/sd/SdFatStructs.h @@ -66,9 +66,9 @@ struct partitionTable { * Sector part of Cylinder-head-sector address of the first block in * the partition. Legal values are 1-63. Only used in old PC BIOS. */ - unsigned beginSector : 6; + uint8_t beginSector : 6; /** High bits cylinder for first block in partition. */ - unsigned beginCylinderHigh : 2; + uint8_t beginCylinderHigh : 2; /** * Combine beginCylinderLow with beginCylinderHigh. Legal values * are 0-1023. Only used in old PC BIOS. @@ -88,9 +88,9 @@ struct partitionTable { * Sector part of cylinder-head-sector address of the last sector in * the partition. Legal values are 1-63. Only used in old PC BIOS. */ - unsigned endSector : 6; + uint8_t endSector : 6; /** High bits of end cylinder */ - unsigned endCylinderHigh : 2; + uint8_t endCylinderHigh : 2; /** * Combine endCylinderLow with endCylinderHigh. Legal values * are 0-1023. Only used in old PC BIOS. From cd5dc7203ca6340017a4f686a456f5d71792f272 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 8 Apr 2023 14:02:14 -0500 Subject: [PATCH 136/225] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20LCD=5FPINS=5FENABL?= =?UTF-8?q?E=20=3D>=20LCD=5FPINS=5FEN?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/AVR/fastio/fastio_1280.h | 1 + Marlin/src/HAL/LINUX/spi_pins.h | 2 +- Marlin/src/HAL/LPC1768/spi_pins.h | 2 +- Marlin/src/HAL/NATIVE_SIM/spi_pins.h | 2 +- Marlin/src/inc/SanityCheck.h | 2 + Marlin/src/lcd/HD44780/marlinui_HD44780.cpp | 2 +- Marlin/src/lcd/dogm/marlinui_DOGM.h | 10 ++- .../lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.h | 2 +- .../extui/ftdi_eve_touch_ui/pin_mappings.h | 18 ++--- Marlin/src/pins/esp32/pins_MKS_TINYBEE.h | 2 +- Marlin/src/pins/esp32/pins_MRR_ESPE.h | 2 +- Marlin/src/pins/esp32/pins_PANDA_common.h | 2 +- Marlin/src/pins/linux/pins_RAMPS_LINUX.h | 10 +-- Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h | 4 +- Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h | 4 +- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h | 2 +- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h | 6 +- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h | 8 +-- Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h | 2 +- Marlin/src/pins/lpc1768/pins_MKS_SBASE.h | 6 +- Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h | 6 +- Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h | 4 +- Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h | 2 +- Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h | 1 - Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h | 4 +- .../src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h | 4 +- .../src/pins/lpc1769/pins_COHESION3D_MINI.h | 2 +- .../src/pins/lpc1769/pins_COHESION3D_REMIX.h | 2 +- Marlin/src/pins/lpc1769/pins_FLY_CDY.h | 2 +- Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h | 6 +- Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h | 2 +- Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h | 2 +- Marlin/src/pins/mega/pins_CHEAPTRONICv2.h | 2 +- Marlin/src/pins/mega/pins_GT2560_REV_A.h | 4 +- Marlin/src/pins/mega/pins_GT2560_V3.h | 4 +- Marlin/src/pins/mega/pins_GT2560_V3_A20.h | 2 +- Marlin/src/pins/mega/pins_GT2560_V4_A20.h | 2 +- Marlin/src/pins/mega/pins_HJC2560C_REV2.h | 4 +- Marlin/src/pins/mega/pins_INTAMSYS40.h | 2 +- Marlin/src/pins/mega/pins_MEGATRONICS.h | 2 +- Marlin/src/pins/mega/pins_MEGATRONICS_2.h | 2 +- Marlin/src/pins/mega/pins_MEGATRONICS_3.h | 4 +- Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h | 2 +- Marlin/src/pins/mega/pins_MINITRONICS.h | 4 +- Marlin/src/pins/mega/pins_OVERLORD.h | 2 +- Marlin/src/pins/mega/pins_PICA.h | 2 +- Marlin/src/pins/mega/pins_SILVER_GATE.h | 2 +- Marlin/src/pins/pinsDebug_list.h | 4 +- Marlin/src/pins/rambo/pins_EINSY_RAMBO.h | 4 +- Marlin/src/pins/rambo/pins_EINSY_RETRO.h | 4 +- Marlin/src/pins/rambo/pins_MINIRAMBO.h | 4 +- Marlin/src/pins/rambo/pins_RAMBO.h | 4 +- Marlin/src/pins/rambo/pins_SCOOVO_X9H.h | 2 +- Marlin/src/pins/ramps/pins_3DRAG.h | 2 +- .../src/pins/ramps/pins_DUPLICATOR_I3_PLUS.h | 2 +- Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h | 2 +- .../src/pins/ramps/pins_FORMBOT_TREX2PLUS.h | 2 +- Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h | 2 +- Marlin/src/pins/ramps/pins_FYSETC_F6_13.h | 2 +- Marlin/src/pins/ramps/pins_K8600.h | 2 +- Marlin/src/pins/ramps/pins_K8800.h | 2 +- Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h | 18 ++--- Marlin/src/pins/ramps/pins_ORTUR_4.h | 2 +- Marlin/src/pins/ramps/pins_RAMPS.h | 10 +-- Marlin/src/pins/ramps/pins_RAMPS_S_12.h | 2 +- Marlin/src/pins/ramps/pins_RUMBA.h | 2 +- Marlin/src/pins/ramps/pins_TENLOG_D3_HERO.h | 2 +- Marlin/src/pins/ramps/pins_TENLOG_MB1_V23.h | 2 +- Marlin/src/pins/ramps/pins_TT_OSCAR.h | 10 +-- Marlin/src/pins/ramps/pins_ULTIMAIN_2.h | 2 +- Marlin/src/pins/ramps/pins_ULTIMAKER.h | 4 +- Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h | 6 +- Marlin/src/pins/ramps/pins_ZRIB_V20.h | 2 +- Marlin/src/pins/ramps/pins_ZRIB_V53.h | 10 +-- Marlin/src/pins/sam/pins_ADSK.h | 2 +- Marlin/src/pins/sam/pins_ALLIGATOR_R2.h | 2 +- Marlin/src/pins/sam/pins_ARCHIM1.h | 2 +- Marlin/src/pins/sam/pins_ARCHIM2.h | 2 +- Marlin/src/pins/sam/pins_DUE3DOM.h | 4 +- Marlin/src/pins/sam/pins_DUE3DOM_MINI.h | 4 +- Marlin/src/pins/sam/pins_KRATOS32.h | 2 +- Marlin/src/pins/sam/pins_RADDS.h | 6 +- Marlin/src/pins/sam/pins_RAMPS_DUO.h | 11 +-- Marlin/src/pins/sam/pins_RAMPS_FD_V1.h | 12 ++-- Marlin/src/pins/sam/pins_RURAMPS4D_11.h | 6 +- Marlin/src/pins/sam/pins_RURAMPS4D_13.h | 4 +- Marlin/src/pins/sam/pins_ULTRATRONICS_PRO.h | 2 +- .../src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h | 34 ++++----- Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h | 34 ++++----- Marlin/src/pins/samd/pins_MINITRONICS20.h | 10 +-- Marlin/src/pins/samd/pins_RAMPS_144.h | 10 +-- Marlin/src/pins/sanguino/pins_ANET_10.h | 70 +++++++++---------- Marlin/src/pins/sanguino/pins_GEN7_CUSTOM.h | 2 +- .../src/pins/sanguino/pins_MELZI_CREALITY.h | 8 +-- Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h | 2 +- Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h | 2 +- .../src/pins/sanguino/pins_SANGUINOLOLU_11.h | 10 +-- Marlin/src/pins/sanguino/pins_ZMIB_V2.h | 2 +- Marlin/src/pins/stm32f1/pins_BEAST.h | 2 +- Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h | 2 +- Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h | 4 +- .../stm32f1/pins_BTT_SKR_MINI_E3_common.h | 6 +- .../src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h | 4 +- .../src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h | 2 +- Marlin/src/pins/stm32f1/pins_CHITU3D.h | 6 +- Marlin/src/pins/stm32f1/pins_CREALITY_V4.h | 2 +- Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h | 2 +- Marlin/src/pins/stm32f1/pins_CREALITY_V521.h | 2 +- .../src/pins/stm32f1/pins_ERYONE_ERY32_MINI.h | 2 +- Marlin/src/pins/stm32f1/pins_FLY_MINI.h | 2 +- Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h | 2 +- Marlin/src/pins/stm32f1/pins_GTM32_MINI.h | 2 +- Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h | 2 +- Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h | 2 +- Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h | 2 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h | 4 +- .../pins/stm32f1/pins_MKS_ROBIN_E3_common.h | 2 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h | 2 +- .../src/pins/stm32f1/pins_MKS_ROBIN_LITE3.h | 2 +- .../src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h | 4 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h | 2 +- Marlin/src/pins/stm32f1/pins_PANDA_PI_V29.h | 2 +- Marlin/src/pins/stm32f1/pins_SOVOL_V131.h | 2 +- Marlin/src/pins/stm32f1/pins_STM32F1R.h | 2 +- Marlin/src/pins/stm32f1/pins_STM3R_MINI.h | 2 +- Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h | 4 +- Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h | 8 +-- Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h | 4 +- Marlin/src/pins/stm32f4/pins_ARMED.h | 2 +- Marlin/src/pins/stm32f4/pins_ARTILLERY_RUBY.h | 2 +- .../src/pins/stm32f4/pins_BLACK_STM32F407VE.h | 2 +- .../src/pins/stm32f4/pins_BTT_BTT002_V1_0.h | 4 +- Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h | 4 +- Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h | 4 +- .../pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h | 4 +- .../stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h | 4 +- .../pins/stm32f4/pins_BTT_SKR_PRO_common.h | 4 +- .../pins/stm32f4/pins_BTT_SKR_V2_0_common.h | 4 +- Marlin/src/pins/stm32f4/pins_FLYF407ZG.h | 2 +- .../pins/stm32f4/pins_FYSETC_CHEETAH_V20.h | 55 ++++++++------- Marlin/src/pins/stm32f4/pins_FYSETC_S6.h | 4 +- .../pins/stm32f4/pins_MKS_MONSTER8_common.h | 2 +- .../stm32f4/pins_MKS_ROBIN_NANO_V3_common.h | 2 +- .../src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h | 2 +- Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h | 4 +- Marlin/src/pins/stm32f4/pins_RUMBA32_common.h | 2 +- .../src/pins/stm32f4/pins_TH3D_EZBOARD_V2.h | 2 +- Marlin/src/pins/stm32f4/pins_VAKE403D.h | 2 +- Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h | 2 +- Marlin/src/pins/stm32f7/pins_REMRAM_V1.h | 2 +- .../pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h | 4 +- .../pins/stm32g0/pins_BTT_MANTA_M4P_V1_0.h | 4 +- .../pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h | 4 +- .../pins/stm32g0/pins_BTT_MANTA_M8P_common.h | 4 +- .../pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h | 8 +-- .../pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h | 4 +- .../pins/stm32h7/pins_BTT_SKR_V3_0_common.h | 4 +- Marlin/src/pins/teensy2/pins_PRINTRBOARD.h | 2 +- .../src/pins/teensy2/pins_PRINTRBOARD_REVF.h | 2 +- Marlin/src/pins/teensy2/pins_SAV_MKI.h | 2 +- Marlin/src/pins/teensy2/pins_TEENSY2.h | 2 +- Marlin/src/pins/teensy3/pins_TEENSY31_32.h | 2 +- Marlin/src/pins/teensy3/pins_TEENSY35_36.h | 4 +- .../MARLIN_TH3D_EZBOARD_V2/PeripheralPins.c | 4 +- ini/lpc176x.ini | 2 +- 165 files changed, 388 insertions(+), 384 deletions(-) diff --git a/Marlin/src/HAL/AVR/fastio/fastio_1280.h b/Marlin/src/HAL/AVR/fastio/fastio_1280.h index e6ecbabb80..6f074cf911 100644 --- a/Marlin/src/HAL/AVR/fastio/fastio_1280.h +++ b/Marlin/src/HAL/AVR/fastio/fastio_1280.h @@ -27,6 +27,7 @@ * Hardware Pin : 02 03 06 07 01 05 15 16 17 18 23 24 25 26 64 63 13 12 46 45 44 43 78 77 76 75 74 73 72 71 60 59 58 57 56 55 54 53 50 70 52 51 42 41 40 39 38 37 36 35 22 21 20 19 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 | 04 08 09 10 11 14 27 28 29 30 31 32 33 34 47 48 49 61 62 65 66 67 68 69 79 80 81 98 99 100 * Port : E0 E1 E4 E5 G5 E3 H3 H4 H5 H6 B4 B5 B6 B7 J1 J0 H1 H0 D3 D2 D1 D0 A0 A1 A2 A3 A4 A5 A6 A7 C7 C6 C5 C4 C3 C2 C1 C0 D7 G2 G1 G0 L7 L6 L5 L4 L3 L2 L1 L0 B3 B2 B1 B0 F0 F1 F2 F3 F4 F5 F6 F7 K0 K1 K2 K3 K4 K5 K6 K7 | E2 E6 E7 xx xx H2 H7 G3 G4 xx xx xx xx xx D4 D5 D6 xx xx J2 J3 J4 J5 J6 J7 xx xx xx xx xx * Logical Pin : 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | 78 79 80 xx xx 84 85 71 70 xx xx xx xx xx 81 82 83 xx xx 72 73 75 76 77 74 xx xx xx xx xx + * Analog Input : 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 * * Arduino Pin Layout video: https://youtu.be/rIqeVCX09FA * AVR alternate pin function overview video: https://youtu.be/1yd8wuI5Plg diff --git a/Marlin/src/HAL/LINUX/spi_pins.h b/Marlin/src/HAL/LINUX/spi_pins.h index 9b40651873..9ecbb04987 100644 --- a/Marlin/src/HAL/LINUX/spi_pins.h +++ b/Marlin/src/HAL/LINUX/spi_pins.h @@ -24,7 +24,7 @@ #include "../../core/macros.h" #include "../../inc/MarlinConfigPre.h" -#if BOTH(HAS_MARLINUI_U8GLIB, SDSUPPORT) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_ENABLE == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN) +#if BOTH(HAS_MARLINUI_U8GLIB, SDSUPPORT) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_EN == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN) #define SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently // needed due to the speed and mode required for communicating with each device being different. // This requirement can be removed if the SPI access to these devices is updated to use diff --git a/Marlin/src/HAL/LPC1768/spi_pins.h b/Marlin/src/HAL/LPC1768/spi_pins.h index a82b21dda9..e716d00fb0 100644 --- a/Marlin/src/HAL/LPC1768/spi_pins.h +++ b/Marlin/src/HAL/LPC1768/spi_pins.h @@ -23,7 +23,7 @@ #include "../../core/macros.h" -#if BOTH(SDSUPPORT, HAS_MARLINUI_U8GLIB) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_ENABLE == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN) +#if BOTH(SDSUPPORT, HAS_MARLINUI_U8GLIB) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_EN == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN) #define SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently // needed due to the speed and mode required for communicating with each device being different. // This requirement can be removed if the SPI access to these devices is updated to use diff --git a/Marlin/src/HAL/NATIVE_SIM/spi_pins.h b/Marlin/src/HAL/NATIVE_SIM/spi_pins.h index fd3378b337..eb20a21c56 100644 --- a/Marlin/src/HAL/NATIVE_SIM/spi_pins.h +++ b/Marlin/src/HAL/NATIVE_SIM/spi_pins.h @@ -24,7 +24,7 @@ #include "../../core/macros.h" #include "../../inc/MarlinConfigPre.h" -#if BOTH(HAS_MARLINUI_U8GLIB, SDSUPPORT) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_ENABLE == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN) +#if BOTH(HAS_MARLINUI_U8GLIB, SDSUPPORT) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_EN == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN) #define SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently // needed due to the speed and mode required for communicating with each device being different. // This requirement can be removed if the SPI access to these devices is updated to use diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 5a0168e845..46c7931a50 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -700,6 +700,8 @@ #error "DEFAULT_STEPPER_DEACTIVE_TIME is now DEFAULT_STEPPER_TIMEOUT_SEC." #elif defined(TFT_SHARED_SPI) #error "TFT_SHARED_SPI is now TFT_SHARED_IO." +#elif defined(LCD_PINS_ENABLE) + #error "LCD_PINS_ENABLE is now LCD_PINS_EN." #endif // L64xx stepper drivers have been removed diff --git a/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp b/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp index 416c07c8f7..e4c0317d12 100644 --- a/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp +++ b/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp @@ -108,7 +108,7 @@ #else // Standard direct-connected LCD implementations - LCD_CLASS lcd(LCD_PINS_RS, LCD_PINS_ENABLE, LCD_PINS_D4, LCD_PINS_D5, LCD_PINS_D6, LCD_PINS_D7); + LCD_CLASS lcd(LCD_PINS_RS, LCD_PINS_EN, LCD_PINS_D4, LCD_PINS_D5, LCD_PINS_D6, LCD_PINS_D7); #endif diff --git a/Marlin/src/lcd/dogm/marlinui_DOGM.h b/Marlin/src/lcd/dogm/marlinui_DOGM.h index f70621574c..2b9eb64a57 100644 --- a/Marlin/src/lcd/dogm/marlinui_DOGM.h +++ b/Marlin/src/lcd/dogm/marlinui_DOGM.h @@ -36,17 +36,15 @@ // RepRapWorld Graphical LCD - - #if DISABLED(SDSUPPORT) && (LCD_PINS_D4 == SD_SCK_PIN) && (LCD_PINS_ENABLE == SD_MOSI_PIN) + #if DISABLED(SDSUPPORT) && (LCD_PINS_D4 == SD_SCK_PIN) && (LCD_PINS_EN == SD_MOSI_PIN) #define U8G_CLASS U8GLIB_ST7920_128X64_4X_HAL #define U8G_PARAM LCD_PINS_RS #elif ENABLED(SDSUPPORT) && __SAMD21__ - #define U8G_CLASS U8GLIB_ST7920_128X64_4X #define U8G_PARAM LCD_PINS_RS #else #define U8G_CLASS U8GLIB_ST7920_128X64_4X - #define U8G_PARAM LCD_PINS_D4, LCD_PINS_ENABLE, LCD_PINS_RS + #define U8G_PARAM LCD_PINS_D4, LCD_PINS_EN, LCD_PINS_RS #endif #elif IS_U8GLIB_ST7920 @@ -54,7 +52,7 @@ // RepRap Discount Full Graphics Smart Controller // and other variant LCDs using ST7920 - #if DISABLED(SDSUPPORT) && (LCD_PINS_D4 == SD_SCK_PIN) && (LCD_PINS_ENABLE == SD_MOSI_PIN) + #if DISABLED(SDSUPPORT) && (LCD_PINS_D4 == SD_SCK_PIN) && (LCD_PINS_EN == SD_MOSI_PIN) #define U8G_CLASS U8GLIB_ST7920_128X64_4X_HAL // 2 stripes, HW SPI (Shared with SD card. Non-standard LCD adapter on AVR.) #define U8G_PARAM LCD_PINS_RS #else @@ -63,7 +61,7 @@ #else #define U8G_CLASS U8GLIB_ST7920_128X64_RRD // Adjust stripes with PAGE_HEIGHT in ultralcd_st7920_u8glib_rrd.h #endif - #define U8G_PARAM LCD_PINS_D4, LCD_PINS_ENABLE, LCD_PINS_RS // AVR version ignores these pin settings + #define U8G_PARAM LCD_PINS_D4, LCD_PINS_EN, LCD_PINS_RS // AVR version ignores these pin settings // HAL version uses these pin settings #endif diff --git a/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.h b/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.h index 446bfcfd42..9a565fc2ef 100644 --- a/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.h +++ b/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.h @@ -28,7 +28,7 @@ #include "../../HAL/shared/Delay.h" #define ST7920_CLK_PIN LCD_PINS_D4 -#define ST7920_DAT_PIN LCD_PINS_ENABLE +#define ST7920_DAT_PIN LCD_PINS_EN #define ST7920_CS_PIN LCD_PINS_RS //#define PAGE_HEIGHT 8 // 128 byte framebuffer diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/pin_mappings.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/pin_mappings.h index 34026f4a26..167ea9d7cf 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/pin_mappings.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/pin_mappings.h @@ -42,13 +42,13 @@ #elif ENABLED(CR10_TFT_PINMAP) // FYSETC S6 - STM32F4 - with TOUCH_UI_ULTIPANEL #define CLCD_USE_SOFT_SPI - #define CLCD_SOFT_SPI_SCLK LCD_PINS_D4 // PORTA1 Pin 6 - #define CLCD_SOFT_SPI_MOSI LCD_PINS_ENABLE // PORTC1 Pin 8 - #define CLCD_SPI_CS LCD_PINS_RS // PORTA3 Pin 7 - #define CLCD_SOFT_SPI_MISO 16 // PORTC0 BTN_ENC Pin 2 - #define CLCD_MOD_RESET 11 // PORTD3 BTN_EN1 Pin 3 - #define CLCD_AUX_0 10 // PORTD2 BTN_EN2 Pin 5 - #define CLCD_AUX_1 BEEPER_PIN // PORTA4 Pin 1 + #define CLCD_SOFT_SPI_SCLK LCD_PINS_D4 // PORTA1 Pin 6 + #define CLCD_SOFT_SPI_MOSI LCD_PINS_EN // PORTC1 Pin 8 + #define CLCD_SPI_CS LCD_PINS_RS // PORTA3 Pin 7 + #define CLCD_SOFT_SPI_MISO 16 // PORTC0 BTN_ENC Pin 2 + #define CLCD_MOD_RESET 11 // PORTD3 BTN_EN1 Pin 3 + #define CLCD_AUX_0 10 // PORTD2 BTN_EN2 Pin 5 + #define CLCD_AUX_1 BEEPER_PIN // PORTA4 Pin 1 #elif ENABLED(AO_EXP1_DEPRECATED_PINMAP) @@ -60,7 +60,7 @@ #define CLCD_MOD_RESET LCD_PINS_D4 #define CLCD_SPI_CS LCD_PINS_D5 - #define CLCD_AUX_0 LCD_PINS_ENABLE + #define CLCD_AUX_0 LCD_PINS_EN #define CLCD_AUX_1 BTN_ENC #define CLCD_AUX_2 BEEPER_PIN @@ -93,7 +93,7 @@ * functionality over software SPI. */ - #define CLCD_MOD_RESET LCD_PINS_ENABLE + #define CLCD_MOD_RESET LCD_PINS_EN #define CLCD_SPI_CS LCD_PINS_D4 #define CLCD_USE_SOFT_SPI diff --git a/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h b/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h index 791ddcab41..493269cf2c 100644 --- a/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h +++ b/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h @@ -158,7 +158,7 @@ #if HAS_WIRED_LCD #define BEEPER_PIN EXP1_01_PIN - #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_RS EXP1_04_PIN #define BTN_ENC EXP1_02_PIN #define BTN_EN1 EXP2_03_PIN diff --git a/Marlin/src/pins/esp32/pins_MRR_ESPE.h b/Marlin/src/pins/esp32/pins_MRR_ESPE.h index b95e54841e..d88a3ab359 100644 --- a/Marlin/src/pins/esp32/pins_MRR_ESPE.h +++ b/Marlin/src/pins/esp32/pins_MRR_ESPE.h @@ -126,7 +126,7 @@ #if HAS_WIRED_LCD #define LCD_PINS_RS 13 - #define LCD_PINS_ENABLE 17 + #define LCD_PINS_EN 17 #define LCD_PINS_D4 16 #if ENABLED(CR10_STOCKDISPLAY) diff --git a/Marlin/src/pins/esp32/pins_PANDA_common.h b/Marlin/src/pins/esp32/pins_PANDA_common.h index 2325805676..c66bdf0bd1 100644 --- a/Marlin/src/pins/esp32/pins_PANDA_common.h +++ b/Marlin/src/pins/esp32/pins_PANDA_common.h @@ -123,6 +123,6 @@ #define BTN_EN2 EXP2_05_PIN #define LCD_PINS_RS EXP1_04_PIN - #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_D4 EXP1_05_PIN #endif diff --git a/Marlin/src/pins/linux/pins_RAMPS_LINUX.h b/Marlin/src/pins/linux/pins_RAMPS_LINUX.h index bfef46c945..d7f53568e6 100644 --- a/Marlin/src/pins/linux/pins_RAMPS_LINUX.h +++ b/Marlin/src/pins/linux/pins_RAMPS_LINUX.h @@ -474,13 +474,13 @@ #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD) #define LCD_PINS_RS 49 // CS chip select /SS chip slave select - #define LCD_PINS_ENABLE 51 // SID (MOSI) + #define LCD_PINS_EN 51 // SID (MOSI) #define LCD_PINS_D4 52 // SCK (CLK) clock #elif BOTH(IS_NEWPANEL, PANEL_ONE) #define LCD_PINS_RS 40 - #define LCD_PINS_ENABLE 42 + #define LCD_PINS_EN 42 #define LCD_PINS_D4 65 #define LCD_PINS_D5 66 #define LCD_PINS_D6 44 @@ -491,7 +491,7 @@ #if ENABLED(CR10_STOCKDISPLAY) #define LCD_PINS_RS 27 - #define LCD_PINS_ENABLE 29 + #define LCD_PINS_EN 29 #define LCD_PINS_D4 25 #if !IS_NEWPANEL @@ -501,7 +501,7 @@ #elif ENABLED(ZONESTAR_LCD) #define LCD_PINS_RS 64 - #define LCD_PINS_ENABLE 44 + #define LCD_PINS_EN 44 #define LCD_PINS_D4 63 #define LCD_PINS_D5 40 #define LCD_PINS_D6 42 @@ -519,7 +519,7 @@ #define DOGLCD_A0 LCD_PINS_DC #else #define LCD_PINS_RS 16 - #define LCD_PINS_ENABLE 17 + #define LCD_PINS_EN 17 #define LCD_PINS_D4 23 #define LCD_PINS_D5 25 #define LCD_PINS_D6 27 diff --git a/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h b/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h index 7115cea0bd..7cbad6a7f9 100644 --- a/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h +++ b/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h @@ -127,7 +127,7 @@ #define SD_DETECT_PIN P0_27 // EXP2-7 #define LCD_PINS_RS P0_16 // EXP1-4 - #define LCD_PINS_ENABLE P0_18 // (MOSI) EXP1-3 + #define LCD_PINS_EN P0_18 // (MOSI) EXP1-3 #define LCD_PINS_D4 P0_15 // (SCK) EXP1-5 #if BOTH(HAS_MARLINUI_HD44780, IS_RRD_SC) @@ -159,7 +159,7 @@ * * There are 6 PWMS. Each PWM can be assigned to one of two pins. * - * PWM1.1 P0_18 LCD_PINS_ENABLE + * PWM1.1 P0_18 LCD_PINS_EN * PWM1.1 P2_0 X_STEP_PIN * PWM1.2 P1_20 * PWM1.2 P2_1 Y_STEP_PIN diff --git a/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h b/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h index d5f1d0a296..914a944027 100644 --- a/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h +++ b/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h @@ -104,7 +104,7 @@ #define SD_DETECT_PIN P0_27 // EXP2-7 #define LCD_PINS_RS P0_16 // EXP1-4 - #define LCD_PINS_ENABLE P0_18 // (MOSI) EXP1-3 + #define LCD_PINS_EN P0_18 // (MOSI) EXP1-3 #define LCD_PINS_D4 P0_15 // (SCK) EXP1-5 #if BOTH(HAS_MARLINUI_HD44780, IS_RRD_SC) @@ -138,7 +138,7 @@ * * There are 6 PWMS. Each PWM can be assigned to one of two pins. * - * PWM1.1 P0_18 LCD_PINS_ENABLE + * PWM1.1 P0_18 LCD_PINS_EN * PWM1.1 P2_0 X_STEP_PIN * PWM1.2 P1_20 * PWM1.2 P2_1 Y_STEP_PIN diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h index d1ea2c0197..aa3c15443e 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h @@ -112,7 +112,7 @@ #define LCD_SDSS EXP2_04_PIN #define LCD_PINS_RS EXP1_04_PIN - #define LCD_PINS_ENABLE EXP2_06_PIN + #define LCD_PINS_EN EXP2_06_PIN #define LCD_PINS_D4 EXP2_02_PIN #if ENABLED(MKS_MINI_12864) diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h index aafc8d3f9f..90a2ef8afc 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h @@ -254,7 +254,7 @@ #define BTN_EN2 EXP1_07_PIN #define BTN_ENC EXP1_03_PIN - #define LCD_PINS_ENABLE EXP1_06_PIN + #define LCD_PINS_EN EXP1_06_PIN #define LCD_PINS_D4 EXP1_04_PIN #elif ENABLED(WYH_L12864) @@ -299,7 +299,7 @@ #define BTN_EN2 EXP1_05_PIN #define BTN_ENC EXP1_02_PIN // (58) open-drain - #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_EN EXP1_08_PIN #define LCD_PINS_D4 EXP1_06_PIN #elif HAS_ADC_BUTTONS @@ -385,7 +385,7 @@ #define BTN_EN2 EXP2_05_PIN // (33) J3-4 & AUX-4 #define BTN_ENC EXP1_02_PIN // (58) open-drain - #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_D4 EXP1_05_PIN #define LCD_SDSS EXP2_04_PIN // (16) J3-7 & AUX-4 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 b4fafbf7a4..41190e644f 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h @@ -316,7 +316,7 @@ #define BTN_EN2 EXP1_07_PIN #define BTN_ENC EXP1_01_PIN - #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_D4 EXP1_05_PIN #define BEEPER_PIN EXP1_08_PIN @@ -352,7 +352,7 @@ #define BTN_EN2 EXP1_07_PIN #define BTN_ENC EXP1_03_PIN - #define LCD_PINS_ENABLE EXP1_06_PIN + #define LCD_PINS_EN EXP1_06_PIN #define LCD_PINS_D4 EXP1_04_PIN #define BEEPER_PIN EXP1_01_PIN @@ -364,7 +364,7 @@ #define BTN_EN2 EXP1_05_PIN #define BTN_ENC EXP1_02_PIN - #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_EN EXP1_08_PIN #define LCD_PINS_D4 EXP1_06_PIN #elif ENABLED(ENDER2_STOCKDISPLAY) @@ -429,7 +429,7 @@ #define BTN_EN1 EXP2_03_PIN // (31) J3-2 & AUX-4 #define BTN_EN2 EXP2_05_PIN // (33) J3-4 & AUX-4 - #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_D4 EXP1_05_PIN #define LCD_SDSS EXP2_04_PIN // (16) J3-7 & AUX-4 diff --git a/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h b/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h index 63760d962b..92c405b267 100644 --- a/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h +++ b/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h @@ -141,7 +141,7 @@ #define BTN_EN2 P1_24 #define BTN_ENC P1_25 #define LCD_PINS_RS P0_20 - #define LCD_PINS_ENABLE P0_21 + #define LCD_PINS_EN P0_21 #define LCD_PINS_D4 P2_11 #define LCD_PINS_D5 P0_22 #define LCD_PINS_D6 P1_29 diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h index 9218bb168d..09a3075301 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h @@ -238,7 +238,7 @@ #define BTN_EN2 P3_25 // EXP2.3 #define LCD_PINS_RS P0_16 // EXP1.4 #define LCD_SDSS P0_28 // EXP2.4 - #define LCD_PINS_ENABLE P0_18 // EXP1.3 + #define LCD_PINS_EN P0_18 // EXP1.3 #define LCD_PINS_D4 P0_15 // EXP1.5 #if EITHER(VIKI2, miniVIKI) #define DOGLCD_SCK SD_SCK_PIN @@ -257,8 +257,8 @@ * Pins 6, 7 & 8 on EXP2 are no connects. That means a second special * cable will be needed if the RGB LEDs are to be active. */ - #define DOGLCD_CS LCD_PINS_ENABLE // EXP1.3 (LCD_EN on FYSETC schematic) - #define DOGLCD_A0 LCD_PINS_RS // EXP1.4 (LCD_A0 on FYSETC schematic) + #define DOGLCD_CS P0_18 // EXP1.3 (LCD_EN on FYSETC schematic) + #define DOGLCD_A0 P0_16 // EXP1.4 (LCD_A0 on FYSETC schematic) #define DOGLCD_SCK P2_11 // J8-5 (SCK on FYSETC schematic) #define DOGLCD_MOSI P4_28 // J8-6 (MOSI on FYSETC schematic) diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h index 155d53c780..0994b20a0c 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h @@ -287,7 +287,7 @@ #define BTN_EN1 EXP1_03_PIN #define BTN_EN2 EXP1_05_PIN - #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_EN EXP1_08_PIN #define LCD_PINS_D4 EXP1_06_PIN #elif HAS_SPI_TFT // Config for Classic UI (emulated DOGM) and Color UI @@ -306,7 +306,7 @@ #define TOUCH_BUTTONS_HW_SPI_DEVICE 2 // Disable any LCD related PINs config - #define LCD_PINS_ENABLE -1 + #define LCD_PINS_EN -1 #define LCD_PINS_RS -1 #ifndef TFT_BUFFER_SIZE @@ -351,7 +351,7 @@ #define LCD_PINS_RS EXP1_04_PIN - #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_D4 EXP1_05_PIN #if ENABLED(FYSETC_MINI_12864) diff --git a/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h b/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h index b9edef8678..6639053d5e 100644 --- a/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h +++ b/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h @@ -301,7 +301,7 @@ #define BTN_ENC P3_25 // J3-4 & AUX-4 #define LCD_PINS_RS P0_15 // J3-9 & AUX-4 (CS) - #define LCD_PINS_ENABLE P0_18 // J3-10 & AUX-3 (SID, MOSI) + #define LCD_PINS_EN P0_18 // J3-10 & AUX-3 (SID, MOSI) #define LCD_PINS_D4 P2_06 // J3-8 & AUX-3 (SCK, CLK) #elif ENABLED(ZONESTAR_LCD) @@ -394,7 +394,7 @@ #endif #define LCD_BACKLIGHT_PIN P0_16 //(16) J3-7 & AUX-4 - only used on DOGLCD controllers - #define LCD_PINS_ENABLE P0_18 // (51) (MOSI) J3-10 & AUX-3 + #define LCD_PINS_EN P0_18 // (51) (MOSI) J3-10 & AUX-3 #define LCD_PINS_D4 P0_15 // (52) (SCK) J3-9 & AUX-3 #if IS_ULTIPANEL #define LCD_PINS_D5 P1_17 // (71) ENET_MDIO diff --git a/Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h b/Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h index 996cb52c6c..16858c0b56 100644 --- a/Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h +++ b/Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h @@ -98,7 +98,7 @@ #if IS_RRD_FG_SC #define LCD_PINS_RS P0_16 - #define LCD_PINS_ENABLE P0_18 + #define LCD_PINS_EN P0_18 #define LCD_PINS_D4 P0_15 #define LCD_PINS_D5 P1_00 #define LCD_PINS_D6 P1_01 diff --git a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h index 9dfb80772f..5899cb0f50 100644 --- a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h +++ b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h @@ -108,7 +108,6 @@ // // Display // - #if EITHER(VIKI2, miniVIKI) #define BEEPER_PIN P1_31 #define DOGLCD_A0 P2_06 diff --git a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h index 2d96194db5..1a8192bafe 100644 --- a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h +++ b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h @@ -128,7 +128,7 @@ #define BTN_ENC P3_25 // J3-4 & AUX-4 #define LCD_PINS_RS P0_15 // J3-9 & AUX-4 (CS) - #define LCD_PINS_ENABLE P0_18 // J3-10 & AUX-3 (SID, MOSI) + #define LCD_PINS_EN P0_18 // J3-10 & AUX-3 (SID, MOSI) #define LCD_PINS_D4 P2_06 // J3-8 & AUX-3 (SCK, CLK) #else @@ -142,7 +142,7 @@ #define LCD_PINS_RS P0_16 // (16) J3-7 & AUX-4 #define LCD_SDSS P0_16 // (16) J3-7 & AUX-4 #define LCD_BACKLIGHT_PIN P0_16 // (16) J3-7 & AUX-4 - only used on DOGLCD controllers - #define LCD_PINS_ENABLE P0_18 // (51) (MOSI) J3-10 & AUX-3 + #define LCD_PINS_EN P0_18 // (51) (MOSI) J3-10 & AUX-3 #define LCD_PINS_D4 P0_15 // (52) (SCK) J3-9 & AUX-3 #define DOGLCD_A0 P2_06 // (59) J3-8 & AUX-2 diff --git a/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h b/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h index f8187babd3..3793f65bfa 100644 --- a/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h +++ b/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h @@ -237,7 +237,7 @@ #define BTN_ENC EXP1_02_PIN #define LCD_PINS_RS EXP1_07_PIN - #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_EN EXP1_08_PIN #define LCD_PINS_D4 EXP1_06_PIN #elif ENABLED(ZONESTAR_LCD) // ANET A8 LCD Controller - Must convert to 3.3V - CONNECTING TO 5V WILL DAMAGE THE BOARD! @@ -247,7 +247,7 @@ #endif #define LCD_PINS_RS EXP1_06_PIN - #define LCD_PINS_ENABLE EXP1_02_PIN + #define LCD_PINS_EN EXP1_02_PIN #define LCD_PINS_D4 EXP1_07_PIN #define LCD_PINS_D5 EXP1_05_PIN #define LCD_PINS_D6 EXP1_03_PIN diff --git a/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h b/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h index fa389f4924..6747a7c2bf 100644 --- a/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h +++ b/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h @@ -149,7 +149,7 @@ #define LCD_PINS_RS P0_16 // EXP1-4 #define LCD_SDSS P0_28 // EXP2-4 - #define LCD_PINS_ENABLE P0_18 // EXP1-3 + #define LCD_PINS_EN P0_18 // EXP1-3 #define LCD_PINS_D4 P0_15 // EXP1-5 #define KILL_PIN P2_11 // EXP2-10 diff --git a/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h b/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h index 2d44a3859b..4dc275eee7 100644 --- a/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h +++ b/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h @@ -215,7 +215,7 @@ #define LCD_PINS_RS P0_16 // EXP1-4 #define LCD_SDSS P0_28 // EXP2-4 - #define LCD_PINS_ENABLE P0_18 // EXP1-3 + #define LCD_PINS_EN P0_18 // EXP1-3 #define LCD_PINS_D4 P0_15 // EXP1-5 #define KILL_PIN P2_11 // EXP2-10 diff --git a/Marlin/src/pins/lpc1769/pins_FLY_CDY.h b/Marlin/src/pins/lpc1769/pins_FLY_CDY.h index 796df12e75..fb768ed46a 100644 --- a/Marlin/src/pins/lpc1769/pins_FLY_CDY.h +++ b/Marlin/src/pins/lpc1769/pins_FLY_CDY.h @@ -155,7 +155,7 @@ // #define BEEPER_PIN P2_07 #define LCD_PINS_RS P2_10 -#define LCD_PINS_ENABLE P0_22 +#define LCD_PINS_EN P0_22 #define LCD_PINS_D4 P1_19 #define LCD_PINS_D5 P2_08 #define LCD_PINS_D6 P1_30 diff --git a/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h b/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h index f49aae0c45..51a8f601ee 100644 --- a/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h +++ b/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h @@ -316,7 +316,7 @@ #define BTN_EN1 EXP1_03_PIN #define BTN_EN2 EXP1_05_PIN - #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_EN EXP1_08_PIN #define LCD_PINS_D4 EXP1_06_PIN #else @@ -355,7 +355,7 @@ #define TOUCH_BUTTONS_HW_SPI_DEVICE 2 // Disable any LCD related PINs config - #define LCD_PINS_ENABLE -1 + #define LCD_PINS_EN -1 #define LCD_PINS_RS -1 #ifndef TFT_BUFFER_SIZE @@ -369,7 +369,7 @@ #define LCD_PINS_RS EXP1_04_PIN - #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_D4 EXP1_05_PIN #if ENABLED(FYSETC_MINI_12864) diff --git a/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h b/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h index c8526611d0..3e7e784b59 100644 --- a/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h +++ b/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h @@ -142,7 +142,7 @@ // EXP1 Pins #define BEEPER_PIN P1_31 // EXP1 Pin 1 #define BTN_ENC P1_30 // EXP1 Pin 2 - #define LCD_PINS_ENABLE P0_18 // EXP1 Pin 3 (MOSI) + #define LCD_PINS_EN P0_18 // EXP1 Pin 3 (MOSI) #define LCD_PINS_RS P0_16 // EXP1 Pin 4 (CS) #define LCD_PINS_D4 P0_15 // EXP1 Pin 5 (SCK) // EXP2 Pins diff --git a/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h b/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h index 8ad3cd2821..a55b9fb646 100644 --- a/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h +++ b/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h @@ -185,7 +185,7 @@ */ #define BEEPER_PIN EXP1_01_PIN #define LCD_PINS_RS EXP1_07_PIN - #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_EN EXP1_08_PIN #define LCD_PINS_D4 EXP1_06_PIN #define KILL_PIN EXP1_04_PIN diff --git a/Marlin/src/pins/mega/pins_CHEAPTRONICv2.h b/Marlin/src/pins/mega/pins_CHEAPTRONICv2.h index 92c5a6f123..4c8dd5c42a 100644 --- a/Marlin/src/pins/mega/pins_CHEAPTRONICv2.h +++ b/Marlin/src/pins/mega/pins_CHEAPTRONICv2.h @@ -113,7 +113,7 @@ // LCD / Controller // #define LCD_PINS_RS 19 -#define LCD_PINS_ENABLE 42 +#define LCD_PINS_EN 42 #define LCD_PINS_D4 18 #define LCD_PINS_D5 38 #define LCD_PINS_D6 41 diff --git a/Marlin/src/pins/mega/pins_GT2560_REV_A.h b/Marlin/src/pins/mega/pins_GT2560_REV_A.h index 99e2031706..61c61f94ff 100644 --- a/Marlin/src/pins/mega/pins_GT2560_REV_A.h +++ b/Marlin/src/pins/mega/pins_GT2560_REV_A.h @@ -135,7 +135,7 @@ #define LCD_BACKLIGHT_PIN -1 #else #define LCD_PINS_RS 20 - #define LCD_PINS_ENABLE 17 + #define LCD_PINS_EN 17 #define LCD_PINS_D4 16 #define LCD_PINS_D5 21 #define LCD_PINS_D6 5 @@ -155,7 +155,7 @@ #define SHIFT_EN_PIN 17 #define LCD_PINS_RS 16 - #define LCD_PINS_ENABLE 5 + #define LCD_PINS_EN 5 #define LCD_PINS_D4 6 #define LCD_PINS_D5 21 #define LCD_PINS_D6 20 diff --git a/Marlin/src/pins/mega/pins_GT2560_V3.h b/Marlin/src/pins/mega/pins_GT2560_V3.h index e4e51c30b3..b04962bbb3 100644 --- a/Marlin/src/pins/mega/pins_GT2560_V3.h +++ b/Marlin/src/pins/mega/pins_GT2560_V3.h @@ -180,8 +180,8 @@ #ifndef LCD_PINS_RS #define LCD_PINS_RS 20 #endif - #ifndef LCD_PINS_ENABLE - #define LCD_PINS_ENABLE 17 + #ifndef LCD_PINS_EN + #define LCD_PINS_EN 17 #endif #ifndef LCD_PINS_D4 #define LCD_PINS_D4 16 diff --git a/Marlin/src/pins/mega/pins_GT2560_V3_A20.h b/Marlin/src/pins/mega/pins_GT2560_V3_A20.h index 628f897b0c..772a45a918 100644 --- a/Marlin/src/pins/mega/pins_GT2560_V3_A20.h +++ b/Marlin/src/pins/mega/pins_GT2560_V3_A20.h @@ -27,7 +27,7 @@ */ #define LCD_PINS_RS 5 -#define LCD_PINS_ENABLE 36 +#define LCD_PINS_EN 36 #define LCD_PINS_D4 21 #define LCD_PINS_D7 6 diff --git a/Marlin/src/pins/mega/pins_GT2560_V4_A20.h b/Marlin/src/pins/mega/pins_GT2560_V4_A20.h index 8ca2d44db9..3b3a80caa8 100644 --- a/Marlin/src/pins/mega/pins_GT2560_V4_A20.h +++ b/Marlin/src/pins/mega/pins_GT2560_V4_A20.h @@ -29,7 +29,7 @@ #define BOARD_INFO_NAME "GT2560 4.x" #define LCD_PINS_RS 5 -#define LCD_PINS_ENABLE 36 +#define LCD_PINS_EN 36 #define LCD_PINS_D4 21 #define LCD_PINS_D7 6 diff --git a/Marlin/src/pins/mega/pins_HJC2560C_REV2.h b/Marlin/src/pins/mega/pins_HJC2560C_REV2.h index ea197e50db..79eef14366 100644 --- a/Marlin/src/pins/mega/pins_HJC2560C_REV2.h +++ b/Marlin/src/pins/mega/pins_HJC2560C_REV2.h @@ -129,7 +129,7 @@ #if IS_NEWPANEL #define LCD_PINS_RS 20 // LCD_CS - #define LCD_PINS_ENABLE 15 // LCD_SDA + #define LCD_PINS_EN 15 // LCD_SDA #define LCD_PINS_D4 14 // LCD_SCK #if ENABLED(HJC_LCD_SMART_CONTROLLER) @@ -161,7 +161,7 @@ #define SHIFT_EN_PIN 17 #define LCD_PINS_RS 16 - #define LCD_PINS_ENABLE 5 + #define LCD_PINS_EN 5 #define LCD_PINS_D4 6 #define LCD_PINS_D5 21 #define LCD_PINS_D6 20 diff --git a/Marlin/src/pins/mega/pins_INTAMSYS40.h b/Marlin/src/pins/mega/pins_INTAMSYS40.h index 903849a140..6b82965065 100644 --- a/Marlin/src/pins/mega/pins_INTAMSYS40.h +++ b/Marlin/src/pins/mega/pins_INTAMSYS40.h @@ -123,7 +123,7 @@ #if HAS_WIRED_LCD #define LCD_PINS_RS 20 - #define LCD_PINS_ENABLE 30 + #define LCD_PINS_EN 30 #define LCD_PINS_D4 14 #define LCD_PINS_D5 21 #define LCD_PINS_D6 5 diff --git a/Marlin/src/pins/mega/pins_MEGATRONICS.h b/Marlin/src/pins/mega/pins_MEGATRONICS.h index b038c9935c..0e2ac291b2 100644 --- a/Marlin/src/pins/mega/pins_MEGATRONICS.h +++ b/Marlin/src/pins/mega/pins_MEGATRONICS.h @@ -112,7 +112,7 @@ #if HAS_WIRED_LCD && IS_NEWPANEL #define LCD_PINS_RS 16 - #define LCD_PINS_ENABLE 17 + #define LCD_PINS_EN 17 #define LCD_PINS_D4 23 #define LCD_PINS_D5 25 #define LCD_PINS_D6 27 diff --git a/Marlin/src/pins/mega/pins_MEGATRONICS_2.h b/Marlin/src/pins/mega/pins_MEGATRONICS_2.h index 5ebcbefe08..d6840de8d0 100644 --- a/Marlin/src/pins/mega/pins_MEGATRONICS_2.h +++ b/Marlin/src/pins/mega/pins_MEGATRONICS_2.h @@ -134,7 +134,7 @@ #if HAS_WIRED_LCD #define LCD_PINS_RS 14 - #define LCD_PINS_ENABLE 15 + #define LCD_PINS_EN 15 #define LCD_PINS_D4 30 #define LCD_PINS_D5 31 #define LCD_PINS_D6 32 diff --git a/Marlin/src/pins/mega/pins_MEGATRONICS_3.h b/Marlin/src/pins/mega/pins_MEGATRONICS_3.h index b3edfc5e17..5e571d5a3f 100644 --- a/Marlin/src/pins/mega/pins_MEGATRONICS_3.h +++ b/Marlin/src/pins/mega/pins_MEGATRONICS_3.h @@ -155,14 +155,14 @@ #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD) #define LCD_PINS_RS 56 // CS chip select / SS chip slave select - #define LCD_PINS_ENABLE 51 // SID (MOSI) + #define LCD_PINS_EN 51 // SID (MOSI) #define LCD_PINS_D4 52 // SCK (CLK) clock #define SD_DETECT_PIN 35 #else #define LCD_PINS_RS 32 - #define LCD_PINS_ENABLE 31 + #define LCD_PINS_EN 31 #define LCD_PINS_D4 14 #define LCD_PINS_D5 30 #define LCD_PINS_D6 39 diff --git a/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h b/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h index 0a1553c64e..e9a0ddc09d 100644 --- a/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h +++ b/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h @@ -192,7 +192,7 @@ #if IS_RRD_FG_SC #define LCD_PINS_RS 33 // C4: LCD-STROBE - #define LCD_PINS_ENABLE 72 // J2: LEFT + #define LCD_PINS_EN 72 // J2: LEFT #define LCD_PINS_D4 35 // C2: LCD-CLK #define LCD_PINS_D5 32 // C5: RLED #define LCD_PINS_D6 34 // C3: LCD-DATA diff --git a/Marlin/src/pins/mega/pins_MINITRONICS.h b/Marlin/src/pins/mega/pins_MINITRONICS.h index 5145cb496d..6d0309c4c1 100644 --- a/Marlin/src/pins/mega/pins_MINITRONICS.h +++ b/Marlin/src/pins/mega/pins_MINITRONICS.h @@ -108,7 +108,7 @@ #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD) #define LCD_PINS_RS 15 // CS chip select /SS chip slave select - #define LCD_PINS_ENABLE 11 // SID (MOSI) + #define LCD_PINS_EN 11 // SID (MOSI) #define LCD_PINS_D4 10 // SCK (CLK) clock #define BTN_EN1 18 @@ -120,7 +120,7 @@ #else #define LCD_PINS_RS -1 - #define LCD_PINS_ENABLE -1 + #define LCD_PINS_EN -1 // Buttons are directly attached using keypad #define BTN_EN1 -1 diff --git a/Marlin/src/pins/mega/pins_OVERLORD.h b/Marlin/src/pins/mega/pins_OVERLORD.h index 3bccbbc741..1ae9e69af0 100644 --- a/Marlin/src/pins/mega/pins_OVERLORD.h +++ b/Marlin/src/pins/mega/pins_OVERLORD.h @@ -126,7 +126,7 @@ // OVERLORD OLED pins #define LCD_PINS_RS 20 #define LCD_PINS_D5 21 - #define LCD_PINS_ENABLE 15 + #define LCD_PINS_EN 15 #define LCD_PINS_D4 14 #define LCD_PINS_D6 5 #define LCD_PINS_D7 6 diff --git a/Marlin/src/pins/mega/pins_PICA.h b/Marlin/src/pins/mega/pins_PICA.h index 3926978e6d..d9f4a858da 100644 --- a/Marlin/src/pins/mega/pins_PICA.h +++ b/Marlin/src/pins/mega/pins_PICA.h @@ -142,7 +142,7 @@ #if HAS_WIRED_LCD #define LCD_PINS_RS 33 - #define LCD_PINS_ENABLE 30 + #define LCD_PINS_EN 30 #define LCD_PINS_D4 35 #define LCD_PINS_D5 32 #define LCD_PINS_D6 37 diff --git a/Marlin/src/pins/mega/pins_SILVER_GATE.h b/Marlin/src/pins/mega/pins_SILVER_GATE.h index dd26a2714c..d739157aaf 100644 --- a/Marlin/src/pins/mega/pins_SILVER_GATE.h +++ b/Marlin/src/pins/mega/pins_SILVER_GATE.h @@ -77,7 +77,7 @@ #if HAS_WIRED_LCD #if IS_U8GLIB_ST7920 // SPI GLCD 12864 ST7920 #define LCD_PINS_RS 30 - #define LCD_PINS_ENABLE 20 + #define LCD_PINS_EN 20 #define LCD_PINS_D4 25 #define BEEPER_PIN 29 #define BTN_EN1 19 diff --git a/Marlin/src/pins/pinsDebug_list.h b/Marlin/src/pins/pinsDebug_list.h index 16dd2a0c45..fa6cbf49b9 100644 --- a/Marlin/src/pins/pinsDebug_list.h +++ b/Marlin/src/pins/pinsDebug_list.h @@ -929,8 +929,8 @@ #if _EXISTS(LCD_PINS_D7) REPORT_NAME_DIGITAL(__LINE__, LCD_PINS_D7) #endif -#if _EXISTS(LCD_PINS_ENABLE) - REPORT_NAME_DIGITAL(__LINE__, LCD_PINS_ENABLE) +#if _EXISTS(LCD_PINS_EN) + REPORT_NAME_DIGITAL(__LINE__, LCD_PINS_EN) #endif #if _EXISTS(LCD_PINS_RS) REPORT_NAME_DIGITAL(__LINE__, LCD_PINS_RS) diff --git a/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h b/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h index be1af14bb1..ced9c722f4 100644 --- a/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h +++ b/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h @@ -211,13 +211,13 @@ #if ENABLED(CR10_STOCKDISPLAY) #define LCD_PINS_RS EXP1_07_PIN - #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_EN EXP1_08_PIN #define LCD_PINS_D4 EXP1_06_PIN #define BTN_EN1 EXP1_03_PIN #define BTN_EN2 EXP1_05_PIN #else #define LCD_PINS_RS EXP1_04_PIN - #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_D4 EXP1_05_PIN #define LCD_PINS_D5 EXP1_06_PIN #define LCD_PINS_D6 EXP1_07_PIN diff --git a/Marlin/src/pins/rambo/pins_EINSY_RETRO.h b/Marlin/src/pins/rambo/pins_EINSY_RETRO.h index 315a17ee03..10736d34a9 100644 --- a/Marlin/src/pins/rambo/pins_EINSY_RETRO.h +++ b/Marlin/src/pins/rambo/pins_EINSY_RETRO.h @@ -178,13 +178,13 @@ #if ENABLED(CR10_STOCKDISPLAY) #define LCD_PINS_RS 85 - #define LCD_PINS_ENABLE 71 + #define LCD_PINS_EN 71 #define LCD_PINS_D4 70 #define BTN_EN1 18 #define BTN_EN2 19 #else #define LCD_PINS_RS 82 - #define LCD_PINS_ENABLE 18 // On 0.6b, use 61 + #define LCD_PINS_EN 18 // On 0.6b, use 61 #define LCD_PINS_D4 19 // On 0.6b, use 59 #define LCD_PINS_D5 70 #define LCD_PINS_D6 85 diff --git a/Marlin/src/pins/rambo/pins_MINIRAMBO.h b/Marlin/src/pins/rambo/pins_MINIRAMBO.h index da55c1ec07..6e1a460838 100644 --- a/Marlin/src/pins/rambo/pins_MINIRAMBO.h +++ b/Marlin/src/pins/rambo/pins_MINIRAMBO.h @@ -162,7 +162,7 @@ #define BTN_ENC 21 #define LCD_PINS_RS 38 - #define LCD_PINS_ENABLE 5 + #define LCD_PINS_EN 5 #define LCD_PINS_D4 14 #define LCD_PINS_D5 15 #define LCD_PINS_D6 32 @@ -181,7 +181,7 @@ #define BTN_ENC 9 #define LCD_PINS_RS 82 - #define LCD_PINS_ENABLE 18 + #define LCD_PINS_EN 18 #define LCD_PINS_D4 19 #define LCD_PINS_D5 70 #define LCD_PINS_D6 85 diff --git a/Marlin/src/pins/rambo/pins_RAMBO.h b/Marlin/src/pins/rambo/pins_RAMBO.h index 7c70c7c753..1e9b9938a5 100644 --- a/Marlin/src/pins/rambo/pins_RAMBO.h +++ b/Marlin/src/pins/rambo/pins_RAMBO.h @@ -204,7 +204,7 @@ #if IS_ULTIPANEL || TOUCH_UI_ULTIPANEL #define LCD_PINS_RS 70 - #define LCD_PINS_ENABLE 71 + #define LCD_PINS_EN 71 #define LCD_PINS_D4 72 #define LCD_PINS_D5 73 #define LCD_PINS_D6 74 @@ -264,7 +264,7 @@ //#define SHIFT_EN_PIN 17 #define LCD_PINS_RS 75 - #define LCD_PINS_ENABLE 17 + #define LCD_PINS_EN 17 #define LCD_PINS_D4 23 #define LCD_PINS_D5 25 #define LCD_PINS_D6 27 diff --git a/Marlin/src/pins/rambo/pins_SCOOVO_X9H.h b/Marlin/src/pins/rambo/pins_SCOOVO_X9H.h index 2230eaa35b..f0e107f398 100644 --- a/Marlin/src/pins/rambo/pins_SCOOVO_X9H.h +++ b/Marlin/src/pins/rambo/pins_SCOOVO_X9H.h @@ -126,7 +126,7 @@ // LCD / Controller // #define LCD_PINS_RS 70 // Ext2_5 -#define LCD_PINS_ENABLE 71 // Ext2_7 +#define LCD_PINS_EN 71 // Ext2_7 #define LCD_PINS_D4 72 // Ext2_9 ? #define LCD_PINS_D5 73 // Ext2_11 ? #define LCD_PINS_D6 74 // Ext2_13 diff --git a/Marlin/src/pins/ramps/pins_3DRAG.h b/Marlin/src/pins/ramps/pins_3DRAG.h index c14284865b..6f57b0eca6 100644 --- a/Marlin/src/pins/ramps/pins_3DRAG.h +++ b/Marlin/src/pins/ramps/pins_3DRAG.h @@ -136,7 +136,7 @@ // TODO: Remap EXP1/2 based on adapter #define LCD_PINS_RS 27 - #define LCD_PINS_ENABLE 29 + #define LCD_PINS_EN 29 #define LCD_PINS_D4 37 #define LCD_PINS_D5 35 #define LCD_PINS_D6 33 diff --git a/Marlin/src/pins/ramps/pins_DUPLICATOR_I3_PLUS.h b/Marlin/src/pins/ramps/pins_DUPLICATOR_I3_PLUS.h index a147eba9fd..90f46fe386 100644 --- a/Marlin/src/pins/ramps/pins_DUPLICATOR_I3_PLUS.h +++ b/Marlin/src/pins/ramps/pins_DUPLICATOR_I3_PLUS.h @@ -90,7 +90,7 @@ #if HAS_WIRED_LCD #if ENABLED(ZONESTAR_LCD) #define LCD_PINS_RS 2 - #define LCD_PINS_ENABLE 36 + #define LCD_PINS_EN 36 #define LCD_PINS_D4 37 #define LCD_PINS_D5 34 #define LCD_PINS_D6 35 diff --git a/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h b/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h index f9e4517a11..b77c325029 100644 --- a/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h +++ b/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h @@ -174,7 +174,7 @@ #define SD_DETECT_PIN 49 #define KILL_PIN 41 #define LCD_PINS_RS 16 - #define LCD_PINS_ENABLE 17 + #define LCD_PINS_EN 17 #define LCD_PINS_D4 23 #define LCD_PINS_D5 25 #define LCD_PINS_D6 27 diff --git a/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h b/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h index e671184a53..2d92306f89 100644 --- a/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h +++ b/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h @@ -175,7 +175,7 @@ #endif #define LCD_PINS_RS 16 - #define LCD_PINS_ENABLE 17 + #define LCD_PINS_EN 17 #define LCD_PINS_D4 23 #define LCD_PINS_D5 25 #define LCD_PINS_D6 27 diff --git a/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h b/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h index 3babc257b4..d84a852915 100644 --- a/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h +++ b/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h @@ -164,7 +164,7 @@ // #if IS_RRD_SC #define LCD_PINS_RS 16 - #define LCD_PINS_ENABLE 17 + #define LCD_PINS_EN 17 #define LCD_PINS_D4 23 #define LCD_PINS_D5 25 #define LCD_PINS_D6 27 diff --git a/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h b/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h index 9cae3797c3..fa5bbb5b9e 100644 --- a/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h +++ b/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h @@ -266,7 +266,7 @@ #elif HAS_MARLINUI_U8GLIB || HAS_MARLINUI_HD44780 #define LCD_PINS_RS 16 - #define LCD_PINS_ENABLE 17 + #define LCD_PINS_EN 17 #define LCD_PINS_D4 23 #define LCD_PINS_D5 25 #define LCD_PINS_D6 27 diff --git a/Marlin/src/pins/ramps/pins_K8600.h b/Marlin/src/pins/ramps/pins_K8600.h index 2ffa8c6b10..eacaf95b38 100644 --- a/Marlin/src/pins/ramps/pins_K8600.h +++ b/Marlin/src/pins/ramps/pins_K8600.h @@ -63,7 +63,7 @@ #if HAS_WIRED_LCD && IS_NEWPANEL #define LCD_PINS_RS 27 - #define LCD_PINS_ENABLE 29 + #define LCD_PINS_EN 29 #define LCD_PINS_D4 37 #define LCD_PINS_D5 35 #define LCD_PINS_D6 33 diff --git a/Marlin/src/pins/ramps/pins_K8800.h b/Marlin/src/pins/ramps/pins_K8800.h index 6c4fa1cc7c..826e1b206a 100644 --- a/Marlin/src/pins/ramps/pins_K8800.h +++ b/Marlin/src/pins/ramps/pins_K8800.h @@ -102,7 +102,7 @@ #define DOGLCD_A0 27 #define LCD_PINS_RS 27 - #define LCD_PINS_ENABLE 29 + #define LCD_PINS_EN 29 #define LCD_PINS_D4 37 #define LCD_PINS_D5 35 #define LCD_PINS_D6 33 diff --git a/Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h b/Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h index d9759153c3..89da25d074 100644 --- a/Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h +++ b/Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h @@ -128,19 +128,19 @@ // ------------------ ---------------- --------------- ------------- #if BOTH(CR10_STOCKDISPLAY, LONGER_LK5) - /** CR-10 Stock Display - * ------ - * GND | 9 10 | 5V - * LCD_PINS_RS D5 | 7 8 | D4 LCD_PINS_ENABLE - * BTN_EN2 D19 | 5 6 D6 LCD_PINS_D4 - * BTN_EN1 D18 | 3 4 | GND - * BEEPER_PIN D11 | 1 2 | D15 BTN_ENC - * ------ + /** CR-10 Stock Display + * ------ + * BEEPER D11 | 1 2 | D15 ENC + * EN1 D18 | 3 4 | GND + * EN2 D19 5 6 | D6 LCD_D4 + * LCD_RS D5 | 7 8 | D4 LCD_ENABLE + * GND | 9 10 | 5V + * ------ * Connected via provided custom cable to: * Aux-1, J21, J17 and Y-Max. */ #define LCD_PINS_RS 5 - #define LCD_PINS_ENABLE 4 + #define LCD_PINS_EN 4 #define LCD_PINS_D4 6 #define BTN_EN1 18 #define BTN_EN2 19 diff --git a/Marlin/src/pins/ramps/pins_ORTUR_4.h b/Marlin/src/pins/ramps/pins_ORTUR_4.h index 7f0fe93084..d2adf9971c 100644 --- a/Marlin/src/pins/ramps/pins_ORTUR_4.h +++ b/Marlin/src/pins/ramps/pins_ORTUR_4.h @@ -83,7 +83,7 @@ #define BEEPER_PIN 35 #define LCD_PINS_RS 27 - #define LCD_PINS_ENABLE 23 + #define LCD_PINS_EN 23 #define LCD_PINS_D4 37 #define LCD_SDSS 53 diff --git a/Marlin/src/pins/ramps/pins_RAMPS.h b/Marlin/src/pins/ramps/pins_RAMPS.h index 58b9b78648..4541aefacb 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS.h +++ b/Marlin/src/pins/ramps/pins_RAMPS.h @@ -594,13 +594,13 @@ #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD) #define LCD_PINS_RS EXP2_07_PIN // CS chip select /SS chip slave select - #define LCD_PINS_ENABLE EXP2_06_PIN // SID (MOSI) + #define LCD_PINS_EN EXP2_06_PIN // SID (MOSI) #define LCD_PINS_D4 EXP2_02_PIN // SCK (CLK) clock #elif BOTH(IS_NEWPANEL, PANEL_ONE) #define LCD_PINS_RS AUX2_06_PIN - #define LCD_PINS_ENABLE AUX2_08_PIN + #define LCD_PINS_EN AUX2_08_PIN #define LCD_PINS_D4 AUX2_10_PIN #define LCD_PINS_D5 AUX2_09_PIN #define LCD_PINS_D6 AUX2_07_PIN @@ -615,7 +615,7 @@ #if ENABLED(CR10_STOCKDISPLAY) #define LCD_PINS_RS EXP1_07_PIN - #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_EN EXP1_08_PIN #define LCD_PINS_D4 EXP1_06_PIN #if !IS_NEWPANEL @@ -629,7 +629,7 @@ #endif #define LCD_PINS_RS AUX2_05_PIN - #define LCD_PINS_ENABLE AUX2_07_PIN + #define LCD_PINS_EN AUX2_07_PIN #define LCD_PINS_D4 AUX2_04_PIN #define LCD_PINS_D5 AUX2_06_PIN #define LCD_PINS_D6 AUX2_08_PIN @@ -651,7 +651,7 @@ #define DOGLCD_SCK EXP1_05_PIN #else #define LCD_PINS_RS EXP1_04_PIN - #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_D4 EXP1_05_PIN #define LCD_PINS_D5 EXP1_06_PIN #define LCD_PINS_D6 EXP1_07_PIN diff --git a/Marlin/src/pins/ramps/pins_RAMPS_S_12.h b/Marlin/src/pins/ramps/pins_RAMPS_S_12.h index bb1e276416..87535a7de8 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS_S_12.h +++ b/Marlin/src/pins/ramps/pins_RAMPS_S_12.h @@ -254,7 +254,7 @@ #if HAS_WIRED_LCD #define BEEPER_PIN 45 #define LCD_PINS_RS 19 - #define LCD_PINS_ENABLE 49 + #define LCD_PINS_EN 49 #define LCD_PINS_D4 18 #define LCD_PINS_D5 30 #define LCD_PINS_D6 41 diff --git a/Marlin/src/pins/ramps/pins_RUMBA.h b/Marlin/src/pins/ramps/pins_RUMBA.h index 3c6873e765..258b9ccca6 100644 --- a/Marlin/src/pins/ramps/pins_RUMBA.h +++ b/Marlin/src/pins/ramps/pins_RUMBA.h @@ -228,7 +228,7 @@ #else #define LCD_PINS_RS 19 - #define LCD_PINS_ENABLE 42 + #define LCD_PINS_EN 42 #define LCD_PINS_D4 18 #define LCD_PINS_D5 38 #define LCD_PINS_D6 41 diff --git a/Marlin/src/pins/ramps/pins_TENLOG_D3_HERO.h b/Marlin/src/pins/ramps/pins_TENLOG_D3_HERO.h index a00720b576..dd9cafc306 100644 --- a/Marlin/src/pins/ramps/pins_TENLOG_D3_HERO.h +++ b/Marlin/src/pins/ramps/pins_TENLOG_D3_HERO.h @@ -169,7 +169,7 @@ //#if IS_RRD_SC #define LCD_PINS_RS -1 -#define LCD_PINS_ENABLE -1 +#define LCD_PINS_EN -1 #define LCD_PINS_D4 -1 #define LCD_PINS_D5 -1 #define LCD_PINS_D6 -1 diff --git a/Marlin/src/pins/ramps/pins_TENLOG_MB1_V23.h b/Marlin/src/pins/ramps/pins_TENLOG_MB1_V23.h index 0cf6e3b18b..1197874d71 100644 --- a/Marlin/src/pins/ramps/pins_TENLOG_MB1_V23.h +++ b/Marlin/src/pins/ramps/pins_TENLOG_MB1_V23.h @@ -139,7 +139,7 @@ //#endif #define LCD_PINS_RS -1 -#define LCD_PINS_ENABLE -1 +#define LCD_PINS_EN -1 #define LCD_PINS_D4 -1 #define LCD_PINS_D5 -1 #define LCD_PINS_D6 -1 diff --git a/Marlin/src/pins/ramps/pins_TT_OSCAR.h b/Marlin/src/pins/ramps/pins_TT_OSCAR.h index 5150ad55b6..56ebf2c663 100644 --- a/Marlin/src/pins/ramps/pins_TT_OSCAR.h +++ b/Marlin/src/pins/ramps/pins_TT_OSCAR.h @@ -276,13 +276,13 @@ #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD) #define LCD_PINS_RS 49 // CS chip select /SS chip slave select - #define LCD_PINS_ENABLE 51 // SID (MOSI) + #define LCD_PINS_EN 51 // SID (MOSI) #define LCD_PINS_D4 52 // SCK (CLK) clock #elif BOTH(IS_NEWPANEL, PANEL_ONE) #define LCD_PINS_RS 40 - #define LCD_PINS_ENABLE 42 + #define LCD_PINS_EN 42 #define LCD_PINS_D4 65 #define LCD_PINS_D5 66 #define LCD_PINS_D6 44 @@ -291,7 +291,7 @@ #elif ENABLED(ZONESTAR_LCD) #define LCD_PINS_RS 64 - #define LCD_PINS_ENABLE 44 + #define LCD_PINS_EN 44 #define LCD_PINS_D4 63 #define LCD_PINS_D5 40 #define LCD_PINS_D6 42 @@ -303,7 +303,7 @@ #if ENABLED(CR10_STOCKDISPLAY) #define LCD_PINS_RS 27 - #define LCD_PINS_ENABLE 29 + #define LCD_PINS_EN 29 #define LCD_PINS_D4 25 #if !IS_NEWPANEL @@ -322,7 +322,7 @@ #define DOGLCD_A0 LCD_PINS_DC #else #define LCD_PINS_RS 16 - #define LCD_PINS_ENABLE 17 + #define LCD_PINS_EN 17 #define LCD_PINS_D4 23 #define LCD_PINS_D5 25 #define LCD_PINS_D6 27 diff --git a/Marlin/src/pins/ramps/pins_ULTIMAIN_2.h b/Marlin/src/pins/ramps/pins_ULTIMAIN_2.h index 16400be059..dc06963289 100644 --- a/Marlin/src/pins/ramps/pins_ULTIMAIN_2.h +++ b/Marlin/src/pins/ramps/pins_ULTIMAIN_2.h @@ -135,7 +135,7 @@ #define BEEPER_PIN 18 #define LCD_PINS_RS 20 -#define LCD_PINS_ENABLE 15 +#define LCD_PINS_EN 15 #define LCD_PINS_D4 14 #define LCD_PINS_D5 21 #define LCD_PINS_D6 5 diff --git a/Marlin/src/pins/ramps/pins_ULTIMAKER.h b/Marlin/src/pins/ramps/pins_ULTIMAKER.h index c29318c372..c822a62faf 100644 --- a/Marlin/src/pins/ramps/pins_ULTIMAKER.h +++ b/Marlin/src/pins/ramps/pins_ULTIMAKER.h @@ -125,7 +125,7 @@ #if IS_NEWPANEL #define LCD_PINS_RS 20 - #define LCD_PINS_ENABLE 17 + #define LCD_PINS_EN 17 #define LCD_PINS_D4 16 #define LCD_PINS_D5 21 #define LCD_PINS_D6 5 @@ -147,7 +147,7 @@ #define SHIFT_EN_PIN 17 #define LCD_PINS_RS 16 - #define LCD_PINS_ENABLE 5 + #define LCD_PINS_EN 5 #define LCD_PINS_D4 6 #define LCD_PINS_D5 21 #define LCD_PINS_D6 20 diff --git a/Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h b/Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h index 25cc278ada..5f5cb6cb12 100644 --- a/Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h +++ b/Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h @@ -169,7 +169,7 @@ #if EITHER(BOARD_REV_1_0, BOARD_REV_1_1_TO_1_3) #define LCD_PINS_RS 24 - #define LCD_PINS_ENABLE 22 + #define LCD_PINS_EN 22 #define LCD_PINS_D4 36 #define LCD_PINS_D5 34 #define LCD_PINS_D6 32 @@ -182,7 +182,7 @@ #if IS_NEWPANEL #define LCD_PINS_RS 20 - #define LCD_PINS_ENABLE 17 + #define LCD_PINS_EN 17 #define LCD_PINS_D4 16 #define LCD_PINS_D5 21 #define LCD_PINS_D6 5 @@ -204,7 +204,7 @@ #define SHIFT_EN_PIN 17 #define LCD_PINS_RS 16 - #define LCD_PINS_ENABLE 5 + #define LCD_PINS_EN 5 #define LCD_PINS_D4 6 #define LCD_PINS_D5 21 #define LCD_PINS_D6 20 diff --git a/Marlin/src/pins/ramps/pins_ZRIB_V20.h b/Marlin/src/pins/ramps/pins_ZRIB_V20.h index 127fffa794..d1c80f6a4a 100644 --- a/Marlin/src/pins/ramps/pins_ZRIB_V20.h +++ b/Marlin/src/pins/ramps/pins_ZRIB_V20.h @@ -53,7 +53,7 @@ #if ENABLED(ZONESTAR_LCD) #define LCD_PINS_RS 16 - #define LCD_PINS_ENABLE 17 + #define LCD_PINS_EN 17 #define LCD_PINS_D4 23 #define LCD_PINS_D5 25 #define LCD_PINS_D6 27 diff --git a/Marlin/src/pins/ramps/pins_ZRIB_V53.h b/Marlin/src/pins/ramps/pins_ZRIB_V53.h index 74188190fe..2b8b583075 100644 --- a/Marlin/src/pins/ramps/pins_ZRIB_V53.h +++ b/Marlin/src/pins/ramps/pins_ZRIB_V53.h @@ -336,9 +336,9 @@ #if ENABLED(ZONESTAR_12864LCD) #define LCDSCREEN_NAME "ZONESTAR LCD12864" #define LCD_SDSS 16 - #define LCD_PINS_RS 16 // ST7920_CS_PIN LCD_PIN_RS (PIN4 of LCD module) - #define LCD_PINS_ENABLE 23 // ST7920_DAT_PIN LCD_PIN_R/W (PIN5 of LCD module) - #define LCD_PINS_D4 17 // ST7920_CLK_PIN LCD_PIN_ENABLE (PIN6 of LCD module) + #define LCD_PINS_RS 16 // ST7920_CS_PIN LCD_PIN_RS (PIN4 of LCD module) + #define LCD_PINS_EN 23 // ST7920_DAT_PIN LCD_PIN_R/W (PIN5 of LCD module) + #define LCD_PINS_D4 17 // ST7920_CLK_PIN LCD_PIN_ENA (PIN6 of LCD module) #define BTN_EN2 25 #define BTN_EN1 27 #define BTN_ENC 29 @@ -348,7 +348,7 @@ #define LCDSCREEN_NAME "Reprap LCD12864" // Use EXP1 & EXP2 connector #define LCD_PINS_RS 16 // ST7920_CS_PIN LCD_PIN_RS - #define LCD_PINS_ENABLE 17 // ST7920_DAT_PIN LCD_PIN_ENABLE + #define LCD_PINS_EN 17 // ST7920_DAT_PIN LCD_PIN_ENA #define LCD_PINS_D4 23 // ST7920_CLK_PIN LCD_PIN_R/W #define BTN_EN1 31 #define BTN_EN2 33 @@ -388,7 +388,7 @@ #if ENABLED(ZONESTAR_LCD) #define LCDSCREEN_NAME "LCD2004 ADCKEY" #define LCD_PINS_RS EXP1_04_PIN - #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_D4 EXP1_05_PIN #define LCD_PINS_D5 EXP1_06_PIN #define LCD_PINS_D6 EXP1_07_PIN diff --git a/Marlin/src/pins/sam/pins_ADSK.h b/Marlin/src/pins/sam/pins_ADSK.h index 7e47f122f6..c264ffb50e 100644 --- a/Marlin/src/pins/sam/pins_ADSK.h +++ b/Marlin/src/pins/sam/pins_ADSK.h @@ -160,7 +160,7 @@ A stepper for E0 extruder // // LCD / Controller // - #define LCD_PINS_ENABLE 14 + #define LCD_PINS_EN 14 #define LCD_PINS_RS 15 #define LCD_PINS_D4 16 #define LCD_PINS_D5 17 diff --git a/Marlin/src/pins/sam/pins_ALLIGATOR_R2.h b/Marlin/src/pins/sam/pins_ALLIGATOR_R2.h index bdbea60150..87a1260c40 100644 --- a/Marlin/src/pins/sam/pins_ALLIGATOR_R2.h +++ b/Marlin/src/pins/sam/pins_ALLIGATOR_R2.h @@ -150,7 +150,7 @@ // #if IS_RRD_FG_SC #define LCD_PINS_RS 18 - #define LCD_PINS_ENABLE 15 + #define LCD_PINS_EN 15 #define LCD_PINS_D4 19 #define BEEPER_PIN 64 #undef UI_VOLTAGE_LEVEL diff --git a/Marlin/src/pins/sam/pins_ARCHIM1.h b/Marlin/src/pins/sam/pins_ARCHIM1.h index e01b93a018..a6ac53e5ec 100644 --- a/Marlin/src/pins/sam/pins_ARCHIM1.h +++ b/Marlin/src/pins/sam/pins_ARCHIM1.h @@ -183,7 +183,7 @@ #if HAS_WIRED_LCD #define BEEPER_PIN 23 // D24 PA15_CTS1 #define LCD_PINS_RS 17 // D17 PA12_RXD1 - #define LCD_PINS_ENABLE 24 // D23 PA14_RTS1 + #define LCD_PINS_EN 24 // D23 PA14_RTS1 #define LCD_PINS_D4 69 // D69 PA0_CANTX0 #define LCD_PINS_D5 54 // D54 PA16_SCK1 #define LCD_PINS_D6 68 // D68 PA1_CANRX0 diff --git a/Marlin/src/pins/sam/pins_ARCHIM2.h b/Marlin/src/pins/sam/pins_ARCHIM2.h index de06a72809..56202cc188 100644 --- a/Marlin/src/pins/sam/pins_ARCHIM2.h +++ b/Marlin/src/pins/sam/pins_ARCHIM2.h @@ -238,7 +238,7 @@ #if ANY(HAS_WIRED_LCD, TOUCH_UI_ULTIPANEL, TOUCH_UI_FTDI_EVE) #define BEEPER_PIN 23 // D24 PA15_CTS1 #define LCD_PINS_RS 17 // D17 PA12_RXD1 - #define LCD_PINS_ENABLE 24 // D23 PA14_RTS1 + #define LCD_PINS_EN 24 // D23 PA14_RTS1 #define LCD_PINS_D4 69 // D69 PA0_CANTX0 #define LCD_PINS_D5 54 // D54 PA16_SCK1 #define LCD_PINS_D6 68 // D68 PA1_CANRX0 diff --git a/Marlin/src/pins/sam/pins_DUE3DOM.h b/Marlin/src/pins/sam/pins_DUE3DOM.h index 5d47f28aba..c8a168228d 100644 --- a/Marlin/src/pins/sam/pins_DUE3DOM.h +++ b/Marlin/src/pins/sam/pins_DUE3DOM.h @@ -114,7 +114,7 @@ #if HAS_WIRED_LCD #define LCD_PINS_RS 42 - #define LCD_PINS_ENABLE 43 + #define LCD_PINS_EN 43 #define LCD_PINS_D4 44 #define LCD_PINS_D5 45 #define LCD_PINS_D6 46 @@ -154,7 +154,7 @@ #elif ENABLED(SPARK_FULL_GRAPHICS) #define LCD_PINS_D4 29 - #define LCD_PINS_ENABLE 27 + #define LCD_PINS_EN 27 #define LCD_PINS_RS 25 #define BTN_EN1 35 diff --git a/Marlin/src/pins/sam/pins_DUE3DOM_MINI.h b/Marlin/src/pins/sam/pins_DUE3DOM_MINI.h index 9d56d36264..66d4f713f8 100644 --- a/Marlin/src/pins/sam/pins_DUE3DOM_MINI.h +++ b/Marlin/src/pins/sam/pins_DUE3DOM_MINI.h @@ -103,7 +103,7 @@ #if HAS_WIRED_LCD #define LCD_PINS_RS 42 - #define LCD_PINS_ENABLE 43 + #define LCD_PINS_EN 43 #define LCD_PINS_D4 44 #define LCD_PINS_D5 45 #define LCD_PINS_D6 46 @@ -147,7 +147,7 @@ #elif ENABLED(SPARK_FULL_GRAPHICS) #define LCD_PINS_D4 29 - #define LCD_PINS_ENABLE 27 + #define LCD_PINS_EN 27 #define LCD_PINS_RS 25 #define BTN_EN1 35 diff --git a/Marlin/src/pins/sam/pins_KRATOS32.h b/Marlin/src/pins/sam/pins_KRATOS32.h index 97449c2d83..f4e3eb479c 100644 --- a/Marlin/src/pins/sam/pins_KRATOS32.h +++ b/Marlin/src/pins/sam/pins_KRATOS32.h @@ -160,7 +160,7 @@ #if IS_RRD_FG_SC #define LCD_PINS_RS 42 - #define LCD_PINS_ENABLE 43 + #define LCD_PINS_EN 43 #define LCD_PINS_D4 44 #define BTN_BACK 52 diff --git a/Marlin/src/pins/sam/pins_RADDS.h b/Marlin/src/pins/sam/pins_RADDS.h index e3de444278..7ebb24fde9 100644 --- a/Marlin/src/pins/sam/pins_RADDS.h +++ b/Marlin/src/pins/sam/pins_RADDS.h @@ -229,7 +229,7 @@ #if ENABLED(RADDS_DISPLAY) #define LCD_PINS_RS 42 - #define LCD_PINS_ENABLE 43 + #define LCD_PINS_EN 43 #define LCD_PINS_D4 44 #define LCD_PINS_D5 45 #define LCD_PINS_D6 46 @@ -252,7 +252,7 @@ // an adapter such as https://www.thingiverse.com/thing:1740725 #define LCD_PINS_RS 42 - #define LCD_PINS_ENABLE 43 + #define LCD_PINS_EN 43 #define LCD_PINS_D4 44 #define BEEPER_PIN 41 @@ -276,7 +276,7 @@ #elif ENABLED(SPARK_FULL_GRAPHICS) #define LCD_PINS_D4 29 - #define LCD_PINS_ENABLE 27 + #define LCD_PINS_EN 27 #define LCD_PINS_RS 25 #define BTN_EN1 35 diff --git a/Marlin/src/pins/sam/pins_RAMPS_DUO.h b/Marlin/src/pins/sam/pins_RAMPS_DUO.h index 5b2b2f0b66..04a4b69ae1 100644 --- a/Marlin/src/pins/sam/pins_RAMPS_DUO.h +++ b/Marlin/src/pins/sam/pins_RAMPS_DUO.h @@ -45,21 +45,16 @@ #define BOARD_INFO_NAME "RAMPS Duo" -#define ALLOW_SAM3X8E -#include "../ramps/pins_RAMPS.h" - // // Temperature Sensors // -#undef TEMP_0_PIN #define TEMP_0_PIN 9 // Analog Input - -#undef TEMP_1_PIN #define TEMP_1_PIN 11 // Analog Input - -#undef TEMP_BED_PIN #define TEMP_BED_PIN 10 // Analog Input +#define ALLOW_SAM3X8E +#include "../ramps/pins_RAMPS.h" + // SPI for MAX Thermocouple #undef TEMP_0_CS_PIN #if DISABLED(SDSUPPORT) diff --git a/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h b/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h index 75d758439c..e1b0d7edc8 100644 --- a/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h +++ b/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h @@ -168,19 +168,21 @@ // ramps-fd lcd adaptor #define BEEPER_PIN EXP1_01_PIN - #define BTN_EN1 EXP2_05_PIN - #define BTN_EN2 EXP2_03_PIN + #define BTN_ENC EXP1_02_PIN + #define BTN_EN2 EXP2_03_PIN + #define BTN_EN1 EXP2_05_PIN + #define SD_DETECT_PIN EXP2_07_PIN #if IS_NEWPANEL #define LCD_PINS_RS EXP1_07_PIN - #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_EN EXP1_08_PIN #endif #if ENABLED(FYSETC_MINI_12864) - #define DOGLCD_CS LCD_PINS_ENABLE - #define DOGLCD_A0 LCD_PINS_RS + #define DOGLCD_CS EXP1_08_PIN + #define DOGLCD_A0 EXP1_07_PIN #define DOGLCD_SCK EXP2_02_PIN #define DOGLCD_MOSI EXP2_06_PIN diff --git a/Marlin/src/pins/sam/pins_RURAMPS4D_11.h b/Marlin/src/pins/sam/pins_RURAMPS4D_11.h index 2ae1f48277..8b078371e9 100644 --- a/Marlin/src/pins/sam/pins_RURAMPS4D_11.h +++ b/Marlin/src/pins/sam/pins_RURAMPS4D_11.h @@ -230,12 +230,12 @@ #if EITHER(RADDS_DISPLAY, IS_RRD_SC) #define LCD_PINS_RS EXP1_04_PIN - #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_EN EXP1_03_PIN #elif IS_RRD_FG_SC #define LCD_PINS_RS EXP1_07_PIN - #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_EN EXP1_08_PIN #elif HAS_U8GLIB_I2C_OLED @@ -273,7 +273,7 @@ //http://doku.radds.org/dokumentation/other-electronics/sparklcd/ #error "Oops! SPARK_FULL_GRAPHICS not supported with RURAMPS4D." //#define LCD_PINS_D4 29 //? - //#define LCD_PINS_ENABLE 27 //? + //#define LCD_PINS_EN 27 //? //#define LCD_PINS_RS 25 //? //#define BTN_EN1 35 //? //#define BTN_EN2 33 //? diff --git a/Marlin/src/pins/sam/pins_RURAMPS4D_13.h b/Marlin/src/pins/sam/pins_RURAMPS4D_13.h index 6034a0e82a..8f107ff4e5 100644 --- a/Marlin/src/pins/sam/pins_RURAMPS4D_13.h +++ b/Marlin/src/pins/sam/pins_RURAMPS4D_13.h @@ -220,12 +220,12 @@ #if EITHER(RADDS_DISPLAY, IS_RRD_SC) #define LCD_PINS_RS EXP1_04_PIN - #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_EN EXP1_03_PIN #elif IS_RRD_FG_SC #define LCD_PINS_RS EXP1_07_PIN - #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_EN EXP1_08_PIN #elif HAS_U8GLIB_I2C_OLED diff --git a/Marlin/src/pins/sam/pins_ULTRATRONICS_PRO.h b/Marlin/src/pins/sam/pins_ULTRATRONICS_PRO.h index 4445cf24e8..e4525acad0 100644 --- a/Marlin/src/pins/sam/pins_ULTRATRONICS_PRO.h +++ b/Marlin/src/pins/sam/pins_ULTRATRONICS_PRO.h @@ -166,7 +166,7 @@ #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD) #define LCD_PINS_RS A8 // CS chip select / SS chip slave select - #define LCD_PINS_ENABLE MOSI // SID (MOSI) + #define LCD_PINS_EN MOSI // SID (MOSI) #define LCD_PINS_D4 SCK // SCK (CLK) clock #define BTN_EN1 20 diff --git a/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h b/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h index 662cccacfc..8af1054a2c 100644 --- a/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h +++ b/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h @@ -130,25 +130,25 @@ * 5B | . . | 5V * ------ * - *- Special mapping of EXP1 to EXP3 to work with Ender displays. + *- Special mapping of EXP1 to work with Ender displays. * - * Enable CR10_STOCKDISPLAY in Configuration.h and connect EXP1 to the display EXP3 with this mapping. * ------ - * VCC | 1 2 | GND - * LCDDE | 3 4 | LCDRS - * LCDD4 | 5 6 BTN_EN2 - * RESET | 7 8 | BTN_EN1 - * BTN_ENCODER | 9 10 | BEEPER + * BEEPER | 1 2 | ENC + * EN1 | 3 4 | RESET + * EN2 5 6 | LCD_D4 + * LCD_RS | 7 8 | LCD_EN + * GND | 9 10 | 5V * ------ + * EXP1 * *- Digital pinout reference of the Bricolemon for advanced users/configurations. * * ------ ------ - * VCC | 1 2 | GND D49 | 1 2 | GND - * D39 | 3 4 | D38 RST | 3 4 | D44 - * D37 | 5 6 D36 D51 | 5 6 D42 - * D34 | 7 8 | D35 D53 | 7 8 | D43 - * D40 | 9 10 | D41 D52 | 9 10 | D50 + * D41 | 1 2 | D40 D50 | 1 2 | D52 + * D35 | 3 4 | D34 D43 | 3 4 | D53 + * D36 5 6 | D37 D42 5 6 | D51 + * D38 | 7 8 | D39 D44 | 7 8 | RST + * GND | 9 10 | VCC GND | 9 10 | D49 * ------ ------ * EXP1 EXP2 * @@ -235,14 +235,14 @@ // TO TEST //#define LCD_PINS_RS EXP2_10_PIN // CS chip select /SS chip slave select - //#define LCD_PINS_ENABLE EXP2_06_PIN // SID (MOSI) + //#define LCD_PINS_EN EXP2_06_PIN // SID (MOSI) //#define LCD_PINS_D4 EXP2_02_PIN // SCK (CLK) clock #elif BOTH(IS_NEWPANEL, PANEL_ONE) // TO TEST //#define LCD_PINS_RS EXP1_02_PIN - //#define LCD_PINS_ENABLE EXP2_05_PIN + //#define LCD_PINS_EN EXP2_05_PIN //#define LCD_PINS_D4 57 // Mega/Due:65 - AGCM4:57 //#define LCD_PINS_D5 58 // Mega/Due:66 - AGCM4:58 //#define LCD_PINS_D6 EXP2_07_PIN @@ -254,7 +254,7 @@ // TO TEST #define LCD_PINS_RS EXP3_04_PIN - #define LCD_PINS_ENABLE EXP3_03_PIN + #define LCD_PINS_EN EXP3_03_PIN #define LCD_PINS_D4 EXP3_05_PIN #if !IS_NEWPANEL @@ -266,7 +266,7 @@ // TO TEST //#define LCD_PINS_RS 56 // Mega/Due:64 - AGCM4:56 - //#define LCD_PINS_ENABLE EXP2_07_PIN + //#define LCD_PINS_EN EXP2_07_PIN //#define LCD_PINS_D4 55 // Mega/Due:63 - AGCM4:55 //#define LCD_PINS_D5 EXP1_02_PIN //#define LCD_PINS_D6 EXP2_05_PIN @@ -287,7 +287,7 @@ #else // Definitions for any standard Display #define LCD_PINS_RS EXP1_04_PIN - #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_D4 EXP1_05_PIN #define LCD_PINS_D5 EXP1_06_PIN #define LCD_PINS_D6 EXP1_07_PIN diff --git a/Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h b/Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h index b70db129a7..7378731c90 100644 --- a/Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h +++ b/Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h @@ -182,25 +182,25 @@ * 5B | . . | 5V * ------ * - *- Special mapping of EXP1 to EXP3 to work with Ender displays. + *- Special mapping of EXP1 to work with Ender displays. * - * Enable CR10_STOCKDISPLAY in Configuration.h and connect EXP1 to the display EXP3 with this mapping. * ------ - * VCC | 1 2 | GND - * LCDDE | 3 4 | LCDRS - * LCDD4 | 5 6 BTN_EN2 - * RESET | 7 8 | BTN_EN1 - * BTN_ENCODER | 9 10 | BEEPER + * BEEPER | 1 2 | ENC + * EN1 | 3 4 | RESET + * EN2 5 6 | LCD_D4 + * LCD_RS | 7 8 | LCD_EN + * GND | 9 10 | 5V * ------ + * EXP1 * *- Digital pinout reference of the Bricolemon for advanced users/configurations. * * ------ ------ - * VCC | 1 2 | GND D49 | 1 2 | GND - * D39 | 3 4 | D38 RST | 3 4 | D44 - * D37 | 5 6 D36 D51 | 5 6 D42 - * D34 | 7 8 | D35 D53 | 7 8 | D43 - * D40 | 9 10 | D41 D52 | 9 10 | D50 + * D41 | 1 2 | D40 D50 | 1 2 | D52 + * D35 | 3 4 | D34 D43 | 3 4 | D53 + * D36 5 6 | D37 D42 5 6 | D51 + * D38 | 7 8 | D39 D44 | 7 8 | RST + * GND | 9 10 | VCC GND | 9 10 | D49 * ------ ------ * EXP1 EXP2 * @@ -288,14 +288,14 @@ // TO TEST //#define LCD_PINS_RS EXP2_10_PIN // CS chip select /SS chip slave select - //#define LCD_PINS_ENABLE EXP2_06_PIN // SID (MOSI) + //#define LCD_PINS_EN EXP2_06_PIN // SID (MOSI) //#define LCD_PINS_D4 EXP2_02_PIN // SCK (CLK) clock #elif BOTH(IS_NEWPANEL, PANEL_ONE) // TO TEST //#define LCD_PINS_RS EXP1_02_PIN - //#define LCD_PINS_ENABLE EXP2_05_PIN + //#define LCD_PINS_EN EXP2_05_PIN //#define LCD_PINS_D4 57 // Mega/Due:65 - AGCM4:57 //#define LCD_PINS_D5 58 // Mega/Due:66 - AGCM4:58 //#define LCD_PINS_D6 EXP2_07_PIN @@ -307,7 +307,7 @@ // TO TEST #define LCD_PINS_RS EXP3_04_PIN - #define LCD_PINS_ENABLE EXP3_03_PIN + #define LCD_PINS_EN EXP3_03_PIN #define LCD_PINS_D4 EXP3_05_PIN #if !IS_NEWPANEL @@ -319,7 +319,7 @@ // TO TEST //#define LCD_PINS_RS 56 // Mega/Due:64 - AGCM4:56 - //#define LCD_PINS_ENABLE EXP2_07_PIN + //#define LCD_PINS_EN EXP2_07_PIN //#define LCD_PINS_D4 55 // Mega/Due:63 - AGCM4:55 //#define LCD_PINS_D5 EXP1_02_PIN //#define LCD_PINS_D6 EXP2_05_PIN @@ -340,7 +340,7 @@ #else // Definitions for any standard Display #define LCD_PINS_RS EXP1_04_PIN - #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_D4 EXP1_05_PIN #define LCD_PINS_D5 EXP1_06_PIN #define LCD_PINS_D6 EXP1_07_PIN diff --git a/Marlin/src/pins/samd/pins_MINITRONICS20.h b/Marlin/src/pins/samd/pins_MINITRONICS20.h index d2a2a27d7c..804750b69a 100644 --- a/Marlin/src/pins/samd/pins_MINITRONICS20.h +++ b/Marlin/src/pins/samd/pins_MINITRONICS20.h @@ -190,7 +190,7 @@ #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD) #define LCD_PINS_RS 18 // CS chip select /SS chip slave select - #define LCD_PINS_ENABLE MOSI // SID (MOSI) + #define LCD_PINS_EN MOSI // SID (MOSI) #define LCD_PINS_D4 SCK // SCK (CLK) clock #define BTN_ENC 23 @@ -201,7 +201,7 @@ // TO TEST //#define LCD_PINS_RS EXP1_02_PIN - //#define LCD_PINS_ENABLE EXP2_05_PIN + //#define LCD_PINS_EN EXP2_05_PIN //#define LCD_PINS_D4 57 // Mega/Due:65 - AGCM4:57 //#define LCD_PINS_D5 58 // Mega/Due:66 - AGCM4:58 //#define LCD_PINS_D6 EXP2_07_PIN @@ -213,7 +213,7 @@ // TO TEST //#define LCD_PINS_RS EXP3_04_PIN - //#define LCD_PINS_ENABLE EXP3_03_PIN + //#define LCD_PINS_EN EXP3_03_PIN //#define LCD_PINS_D4 EXP3_05_PIN #if !IS_NEWPANEL @@ -225,7 +225,7 @@ // TO TEST //#define LCD_PINS_RS 56 // Mega/Due:64 - AGCM4:56 - //#define LCD_PINS_ENABLE EXP2_07_PIN + //#define LCD_PINS_EN EXP2_07_PIN //#define LCD_PINS_D4 55 // Mega/Due:63 - AGCM4:55 //#define LCD_PINS_D5 EXP1_02_PIN //#define LCD_PINS_D6 EXP2_05_PIN @@ -246,7 +246,7 @@ #else // Definitions for any standard Display #define LCD_PINS_RS EXP1_04_PIN - #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_D4 EXP1_05_PIN #define LCD_PINS_D5 EXP1_06_PIN #define LCD_PINS_D6 EXP1_07_PIN diff --git a/Marlin/src/pins/samd/pins_RAMPS_144.h b/Marlin/src/pins/samd/pins_RAMPS_144.h index ed10c4d284..aa262f5a60 100644 --- a/Marlin/src/pins/samd/pins_RAMPS_144.h +++ b/Marlin/src/pins/samd/pins_RAMPS_144.h @@ -273,14 +273,14 @@ // TO TEST //#define LCD_PINS_RS 49 // CS chip select /SS chip slave select - //#define LCD_PINS_ENABLE 51 // SID (MOSI) + //#define LCD_PINS_EN 51 // SID (MOSI) //#define LCD_PINS_D4 52 // SCK (CLK) clock #elif BOTH(IS_NEWPANEL, PANEL_ONE) // TO TEST //#define LCD_PINS_RS 40 - //#define LCD_PINS_ENABLE 42 + //#define LCD_PINS_EN 42 //#define LCD_PINS_D4 57 // Mega/Due:65 - AGCM4:57 //#define LCD_PINS_D5 58 // Mega/Due:66 - AGCM4:58 //#define LCD_PINS_D6 44 @@ -292,7 +292,7 @@ // TO TEST //#define LCD_PINS_RS 27 - //#define LCD_PINS_ENABLE 29 + //#define LCD_PINS_EN 29 //#define LCD_PINS_D4 25 #if !IS_NEWPANEL @@ -304,7 +304,7 @@ // TO TEST //#define LCD_PINS_RS 56 // Mega/Due:64 - AGCM4:56 - //#define LCD_PINS_ENABLE 44 + //#define LCD_PINS_EN 44 //#define LCD_PINS_D4 55 // Mega/Due:63 - AGCM4:55 //#define LCD_PINS_D5 40 //#define LCD_PINS_D6 42 @@ -323,7 +323,7 @@ //#define DOGLCD_A0 LCD_PINS_DC #else #define LCD_PINS_RS 16 - #define LCD_PINS_ENABLE 17 + #define LCD_PINS_EN 17 #define LCD_PINS_D4 23 #define LCD_PINS_D5 25 #define LCD_PINS_D6 27 diff --git a/Marlin/src/pins/sanguino/pins_ANET_10.h b/Marlin/src/pins/sanguino/pins_ANET_10.h index 176bb2be12..e57cc9f6fa 100644 --- a/Marlin/src/pins/sanguino/pins_ANET_10.h +++ b/Marlin/src/pins/sanguino/pins_ANET_10.h @@ -175,7 +175,7 @@ #define SERVO0_PIN 27 // free for BLTouch/3D-Touch #define LCD_PINS_RS 28 - #define LCD_PINS_ENABLE 29 + #define LCD_PINS_EN 29 #define LCD_PINS_D4 10 #define LCD_PINS_D5 11 #define LCD_PINS_D6 16 @@ -192,7 +192,7 @@ #define SERVO0_PIN 30 #define BEEPER_PIN 27 #define LCD_PINS_RS 29 - #define LCD_PINS_ENABLE 16 + #define LCD_PINS_EN 16 #define LCD_PINS_D4 11 #define BTN_EN1 28 #define BTN_EN2 10 @@ -204,7 +204,7 @@ #define SERVO0_PIN 29 // free for BLTouch/3D-Touch #define BEEPER_PIN 17 #define LCD_PINS_RS 27 - #define LCD_PINS_ENABLE 28 + #define LCD_PINS_EN 28 #define LCD_PINS_D4 30 #define BTN_EN1 11 #define BTN_EN2 10 @@ -233,11 +233,11 @@ * published by oderwat on Thingiverse at https://www.thingiverse.com/thing:2103748. * * Using that adapter requires changing the pin definition as follows: - * #define SERVO0_PIN 27 // free for BLTouch/3D-Touch - * #define BEEPER_PIN 28 - * #define LCD_PINS_RS 30 - * #define LCD_PINS_ENABLE 29 - * #define LCD_PINS_D4 17 + * #define SERVO0_PIN 27 // free for BLTouch/3D-Touch + * #define BEEPER_PIN 28 + * #define LCD_PINS_RS 30 + * #define LCD_PINS_EN 29 + * #define LCD_PINS_D4 17 * * The BLTouch pin becomes LCD:3 */ @@ -247,32 +247,32 @@ * ===================== LCD PINOUTS ================================== * ==================================================================== * - * Anet V1.0 controller | ZONESTAR_LCD | ANET_FULL_ | RepRapDiscount Full | Thingiverse RepRap wiring - * physical logical alt | | GRAPHICS_LCD | Graphics Display Wiring | https://www.thingiverse - * pin pin functions | | | | .com/thing:2103748 - *------------------------------------------------------------------------------------------------------------------------ - * ANET-J3.1 8 *** | N/A | J3_TX *** | | - * ANET-J3.2 9 *** | N/A | J3_RX *** | | - * ANET-J3.3 6 MISO | N/A | MISO *** | EXP2.1 MISO | EXP2.1 MISO - * ANET-J3.4 +5V | N/A | +5V | | - * ANET-J3.5 7 SCK | N/A | SCK *** | EXP2.2 SCK | EXP2.2 SCK - * ANET-J3.6 5 MOSI | N/A | MOSI *** | EXP2.6 MOSI | EXP2.6 MOSI - * ANET-J3.7 !RESET | N/A | button | EXP2.8 panel button | EXP2.8 panel button - * ANET-J3.8 GND | N/A | GND | EXP2.9 GND | EXP2.9 GND - * ANET-J3.9 4 Don't use | N/A | N/C | | - * ANET-J3.10 +3.3V | N/A | +3.3V *** | | - * | | | | - * | | | | - * ANET-LCD.1 GND | GND | GND | EXP1.9 GND | EXP1.9 GND - * ANET-LCD.2 +5V | +5V | +5V | EXP1.10 +5V | EXP1.10 +5V - * ANET-LCD.3 27 A4 | N/C * | LCD_PINS_RS | EXP1.4 LCD_PINS_RS | EXP2.4 SDSS or N/C * - * ANET-LCD.4 10 | LCD_PINS_D4 | BTN_EN2 | EXP2.3 BTN_EN2 | EXP2.3 BTN_EN2 - * ANET-LCD.5 28 A3 | LCD_PINS_RS | LCD_PINS_ENABLE | EXP1.3 LCD_PINS_ENABLE | EXP1.1 BEEPER_PIN - * ANET-LCD.6 11 | LCD_PINS_D5 | BTN_EN1 | EXP2.5 BTN_EN1 | EXP2.5 BTN_EN1 - * ANET-LCD.7 29 A2 | LCD_PINS_ENABLE | N/C * | EXP2.4 SDSS or N/C * | EXP1.3 LCD_PINS_ENABLE - * ANET-LCD.8 16 SCL | LCD_PINS_D6 | BTN_ENC | EXP1.2 BTN_ENC | EXP1.2 BTN_ENC - * ANET-LCD.9 30 A1 | ADC_KEYPAD_PIN ** | LCD_PINS_D4 | EXP1.5 LCD_PINS_D4 | EXP1.4 LCD_PINS_RS - * ANET-LCD.10 17 SDA | LCD_PINS_D7 | BEEPER_PIN | EXP1.1 BEEPER_PIN | EXP1.5 LCD_PINS_D4 + * Anet V1.0 controller | ZONESTAR_LCD | ANET_FULL_ | RepRapDiscount Full | Thingiverse RepRap wiring + * physical logical alt | | GRAPHICS_LCD | Graphics Display Wiring | https://www.thingiverse + * pin pin functions | | | | .com/thing:2103748 + *-------------------------------------------------------------------------------------------------------------------- + * ANET-J3.1 8 *** | N/A | J3_TX *** | | + * ANET-J3.2 9 *** | N/A | J3_RX *** | | + * ANET-J3.3 6 MISO | N/A | MISO *** | EXP2.1 MISO | EXP2.1 MISO + * ANET-J3.4 +5V | N/A | +5V | | + * ANET-J3.5 7 SCK | N/A | SCK *** | EXP2.2 SCK | EXP2.2 SCK + * ANET-J3.6 5 MOSI | N/A | MOSI *** | EXP2.6 MOSI | EXP2.6 MOSI + * ANET-J3.7 !RESET | N/A | button | EXP2.8 panel button | EXP2.8 panel button + * ANET-J3.8 GND | N/A | GND | EXP2.9 GND | EXP2.9 GND + * ANET-J3.9 4 Don't use | N/A | N/C | | + * ANET-J3.10 +3.3V | N/A | +3.3V *** | | + * | | | | + * | | | | + * ANET-LCD.1 GND | GND | GND | EXP1.9 GND | EXP1.9 GND + * ANET-LCD.2 +5V | +5V | +5V | EXP1.10 +5V | EXP1.10 +5V + * ANET-LCD.3 27 A4 | N/C * | LCD_PINS_RS | EXP1.4 LCD_PINS_RS | EXP2.4 SDSS or N/C * + * ANET-LCD.4 10 | LCD_PINS_D4 | BTN_EN2 | EXP2.3 BTN_EN2 | EXP2.3 BTN_EN2 + * ANET-LCD.5 28 A3 | LCD_PINS_RS | LCD_PINS_EN | EXP1.3 LCD_PINS_EN | EXP1.1 BEEPER_PIN + * ANET-LCD.6 11 | LCD_PINS_D5 | BTN_EN1 | EXP2.5 BTN_EN1 | EXP2.5 BTN_EN1 + * ANET-LCD.7 29 A2 | LCD_PINS_EN | N/C * | EXP2.4 SDSS or N/C * | EXP1.3 LCD_PINS_EN + * ANET-LCD.8 16 SCL | LCD_PINS_D6 | BTN_ENC | EXP1.2 BTN_ENC | EXP1.2 BTN_ENC + * ANET-LCD.9 30 A1 | ADC_KEYPAD_PIN ** | LCD_PINS_D4 | EXP1.5 LCD_PINS_D4 | EXP1.4 LCD_PINS_RS + * ANET-LCD.10 17 SDA | LCD_PINS_D7 | BEEPER_PIN | EXP1.1 BEEPER_PIN | EXP1.5 LCD_PINS_D4 * * N/C * - if not connected to the LCD can be used for BLTouch servo input * ** - analog pin -WITHOUT a pullup @@ -284,7 +284,7 @@ * physical pin function * EXP1.1 BEEPER * EXP1.2 BTN_ENC - * EXP1.3 LCD_PINS_ENABLE + * EXP1.3 LCD_PINS_EN * EXP1.4 LCD_PINS_RS * EXP1.5 LCD_PINS_D4 * EXP1.6 LCD_PINS_D5 (not used) diff --git a/Marlin/src/pins/sanguino/pins_GEN7_CUSTOM.h b/Marlin/src/pins/sanguino/pins_GEN7_CUSTOM.h index 6d7678e6e3..3927250b15 100644 --- a/Marlin/src/pins/sanguino/pins_GEN7_CUSTOM.h +++ b/Marlin/src/pins/sanguino/pins_GEN7_CUSTOM.h @@ -116,7 +116,7 @@ // 4bit LCD Support #define LCD_PINS_RS 18 -#define LCD_PINS_ENABLE 17 +#define LCD_PINS_EN 17 #define LCD_PINS_D4 16 #define LCD_PINS_D5 15 #define LCD_PINS_D6 13 diff --git a/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h b/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h index 7984e64b5f..398343cb97 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h +++ b/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h @@ -51,7 +51,7 @@ #if ANY(MKS_MINI_12864, CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY) #if EITHER(CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY) #define LCD_PINS_RS 28 // ST9720 CS - #define LCD_PINS_ENABLE 17 // ST9720 DAT + #define LCD_PINS_EN 17 // ST9720 DAT #define LCD_PINS_D4 30 // ST9720 CLK #endif #if EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY) @@ -119,7 +119,7 @@ PIN: 15 Port: D7 X_STEP_PIN protected PIN: 16 Port: C0 BTN_ENC Input = 1 . SCL Input = 1 - PIN: 17 Port: C1 LCD_PINS_ENABLE Output = 0 + PIN: 17 Port: C1 LCD_PINS_EN Output = 0 . SDA Output = 0 PIN: 18 Port: C2 X_MIN_PIN protected . X_STOP_PIN protected @@ -145,8 +145,8 @@ * ------ ------ * PA4 | 1 2 | PC0 BEEPER_PIN | 1 2 | BTN_ENC * PD3 | 3 4 | RESET BTN_EN1 | 3 4 | RESET - * PD2 5 6 | PA1 BTN_EN2 5 6 | LCD_PINS_D4 (ST9720 CLK) - * PA3 | 7 8 | PC1 (ST9720 CS) LCD_PINS_RS | 7 8 | LCD_PINS_ENABLE (ST9720 DAT) + * PD2 5 6 | PA1 BTN_EN2 5 6 | LCD_D4 (ST9720 CLK) + * PA3 | 7 8 | PC1 (ST9720 CS) LCD_RS | 7 8 | LCD_EN (ST9720 DAT) * GND | 9 10 | 5V GND | 9 10 | 5V * ------ ------ */ diff --git a/Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h b/Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h index 00c9db6f81..323ecaa029 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h +++ b/Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h @@ -30,7 +30,7 @@ #if ENABLED(CR10_STOCKDISPLAY) #define LCD_PINS_RS 17 // ST9720 CS - #define LCD_PINS_ENABLE 16 // ST9720 DAT + #define LCD_PINS_EN 16 // ST9720 DAT #define LCD_PINS_D4 11 // ST9720 CLK #define BTN_EN1 30 #define BTN_EN2 29 diff --git a/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h b/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h index da010ab1a6..6b47d9186c 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h +++ b/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h @@ -34,7 +34,7 @@ #if EITHER(CR10_STOCKDISPLAY, LCD_FOR_MELZI) #define LCD_PINS_RS 30 - #define LCD_PINS_ENABLE 28 + #define LCD_PINS_EN 28 #define LCD_PINS_D4 16 #define LCD_PINS_D5 17 #define LCD_PINS_D6 27 diff --git a/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h b/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h index 1459eab646..45b326e74e 100644 --- a/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h +++ b/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h @@ -158,7 +158,7 @@ #if ENABLED(LCD_FOR_MELZI) #define LCD_PINS_RS 17 - #define LCD_PINS_ENABLE 16 + #define LCD_PINS_EN 16 #define LCD_PINS_D4 11 #define KILL_PIN 10 #define BEEPER_PIN 27 @@ -167,7 +167,7 @@ #if IS_MELZI #define LCD_PINS_RS 30 // CS chip select /SS chip slave select - #define LCD_PINS_ENABLE 29 // SID (MOSI) + #define LCD_PINS_EN 29 // SID (MOSI) #define LCD_PINS_D4 17 // SCK (CLK) clock // Pin 27 is taken by LED_PIN, but Melzi LED does nothing with // Marlin so this can be used for BEEPER_PIN. You can use this pin @@ -175,7 +175,7 @@ #define BEEPER_PIN 27 #else // Sanguinololu >=1.3 #define LCD_PINS_RS 4 - #define LCD_PINS_ENABLE 17 + #define LCD_PINS_EN 17 #define LCD_PINS_D4 30 #define LCD_PINS_D5 29 #define LCD_PINS_D6 28 @@ -210,7 +210,7 @@ #elif ENABLED(ZONESTAR_LCD) // For the Tronxy Melzi boards #define LCD_PINS_RS 28 - #define LCD_PINS_ENABLE 29 + #define LCD_PINS_EN 29 #define LCD_PINS_D4 10 #define LCD_PINS_D5 11 #define LCD_PINS_D6 16 @@ -219,7 +219,7 @@ #else #define LCD_PINS_RS 4 - #define LCD_PINS_ENABLE 17 + #define LCD_PINS_EN 17 #define LCD_PINS_D4 30 #define LCD_PINS_D5 29 #define LCD_PINS_D6 28 diff --git a/Marlin/src/pins/sanguino/pins_ZMIB_V2.h b/Marlin/src/pins/sanguino/pins_ZMIB_V2.h index 5b0b996d18..dce01177be 100644 --- a/Marlin/src/pins/sanguino/pins_ZMIB_V2.h +++ b/Marlin/src/pins/sanguino/pins_ZMIB_V2.h @@ -194,7 +194,7 @@ #define FORCE_SOFT_SPI //#define LCD_SDSS EXP1_03_PIN #define LCD_PINS_RS EXP1_03_PIN // ST7920_CS_PIN (LCD module pin 4) - #define LCD_PINS_ENABLE EXP1_06_PIN // ST7920_DAT_PIN (LCD module pin 5) + #define LCD_PINS_EN EXP1_06_PIN // ST7920_DAT_PIN (LCD module pin 5) #define LCD_PINS_D4 EXP1_04_PIN // ST7920_CLK_PIN (LCD module pin 6) #define BOARD_ST7920_DELAY_1 DELAY_2_NOP diff --git a/Marlin/src/pins/stm32f1/pins_BEAST.h b/Marlin/src/pins/stm32f1/pins_BEAST.h index 80967bad07..eca4529636 100644 --- a/Marlin/src/pins/stm32f1/pins_BEAST.h +++ b/Marlin/src/pins/stm32f1/pins_BEAST.h @@ -112,7 +112,7 @@ #error "REPRAPWORLD_GRAPHICAL_LCD is not supported." #else #define LCD_PINS_RS PB8 - #define LCD_PINS_ENABLE PD2 + #define LCD_PINS_EN PD2 #define LCD_PINS_D4 PB12 #define LCD_PINS_D5 PB13 #define LCD_PINS_D6 PB14 diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h index 00dc0613f2..06646e2e59 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h @@ -126,7 +126,7 @@ #define BTN_EN2 PA10 #define LCD_PINS_RS PB8 - #define LCD_PINS_ENABLE PB15 + #define LCD_PINS_EN PB15 #define LCD_PINS_D4 PB9 #define BEEPER_PIN PB5 diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h index 8fb194c27f..aa8795bf3e 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h @@ -184,7 +184,7 @@ #define BTN_EN2 EXP1_05_PIN #define LCD_PINS_RS EXP1_07_PIN - #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_EN EXP1_08_PIN #define LCD_PINS_D4 EXP1_06_PIN #elif ENABLED(ZONESTAR_LCD) // ANET A8 LCD Controller - Must convert to 3.3V - CONNECTING TO 5V WILL DAMAGE THE BOARD! @@ -194,7 +194,7 @@ #endif #define LCD_PINS_RS EXP1_06_PIN - #define LCD_PINS_ENABLE EXP1_02_PIN + #define LCD_PINS_EN EXP1_02_PIN #define LCD_PINS_D4 EXP1_07_PIN #define LCD_PINS_D5 EXP1_05_PIN #define LCD_PINS_D6 EXP1_03_PIN diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h index 9d85e211f7..689e73c4f3 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h @@ -169,7 +169,7 @@ #define BTN_EN2 EXP1_05_PIN #define LCD_PINS_RS EXP1_07_PIN - #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_EN EXP1_08_PIN #define LCD_PINS_D4 EXP1_06_PIN #elif ENABLED(LCD_FOR_MELZI) @@ -200,7 +200,7 @@ #define BTN_EN2 EXP1_07_PIN #define LCD_PINS_RS EXP1_01_PIN - #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_D4 EXP1_05_PIN #elif ENABLED(ZONESTAR_LCD) // ANET A8 LCD Controller - Must convert to 3.3V - CONNECTING TO 5V WILL DAMAGE THE BOARD! @@ -210,7 +210,7 @@ #endif #define LCD_PINS_RS EXP1_06_PIN - #define LCD_PINS_ENABLE EXP1_02_PIN + #define LCD_PINS_EN EXP1_02_PIN #define LCD_PINS_D4 EXP1_07_PIN #define LCD_PINS_D5 EXP1_05_PIN #define LCD_PINS_D6 EXP1_03_PIN diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h index c45e7fb282..eb2f17f40a 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h @@ -180,7 +180,7 @@ #define BTN_EN1 EXP1_03_PIN #define BTN_EN2 EXP1_05_PIN - #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_EN EXP1_08_PIN #define LCD_PINS_D4 EXP1_06_PIN #elif IS_TFTGLCD_PANEL @@ -201,7 +201,7 @@ #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN - #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_EN EXP1_03_PIN #if ENABLED(FYSETC_MINI_12864) diff --git a/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h b/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h index a75825658c..5cb2845d9f 100644 --- a/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h +++ b/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h @@ -151,7 +151,7 @@ #define LCD_PINS_RS EXP1_07_PIN // CS -- SOFT SPI for ENDER3 LCD #define LCD_PINS_D4 EXP1_06_PIN // SCLK - #define LCD_PINS_ENABLE EXP1_08_PIN // DATA MOSI + #define LCD_PINS_EN EXP1_08_PIN // DATA MOSI #endif // Alter timing for graphical display diff --git a/Marlin/src/pins/stm32f1/pins_CHITU3D.h b/Marlin/src/pins/stm32f1/pins_CHITU3D.h index 32894bb72c..73030c8ef6 100644 --- a/Marlin/src/pins/stm32f1/pins_CHITU3D.h +++ b/Marlin/src/pins/stm32f1/pins_CHITU3D.h @@ -102,18 +102,18 @@ #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD) #define LCD_PINS_RS PD1 // 49 // CS chip select /SS chip slave select - #define LCD_PINS_ENABLE PD3 // 51 // SID (MOSI) + #define LCD_PINS_EN PD3 // 51 // SID (MOSI) #define LCD_PINS_D4 PD4 // 52 // SCK (CLK) clock #elif BOTH(IS_NEWPANEL, PANEL_ONE) #define LCD_PINS_RS PB8 - #define LCD_PINS_ENABLE PD2 + #define LCD_PINS_EN PD2 #define LCD_PINS_D4 PB12 #define LCD_PINS_D5 PB13 #define LCD_PINS_D6 PB14 #define LCD_PINS_D7 PB15 #else #define LCD_PINS_RS PB8 - #define LCD_PINS_ENABLE PD2 + #define LCD_PINS_EN PD2 #define LCD_PINS_D4 PB12 #define LCD_PINS_D5 PB13 #define LCD_PINS_D6 PB14 diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h index 00de57ff58..c028deaa99 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h @@ -211,7 +211,7 @@ #if ENABLED(CR10_STOCKDISPLAY) #define LCD_PINS_RS EXP3_07_PIN - #define LCD_PINS_ENABLE EXP3_08_PIN + #define LCD_PINS_EN EXP3_08_PIN #define LCD_PINS_D4 EXP3_06_PIN #define BTN_ENC EXP3_02_PIN diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h index d85758981f..12a5e5ea51 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h @@ -193,7 +193,7 @@ #endif #define LCD_PINS_RS EXP3_07_PIN - #define LCD_PINS_ENABLE EXP3_08_PIN + #define LCD_PINS_EN EXP3_08_PIN #define LCD_PINS_D4 EXP3_06_PIN #define BTN_ENC EXP3_02_PIN diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V521.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V521.h index c90d76d17d..c3b66b034a 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V521.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V521.h @@ -197,7 +197,7 @@ #endif #define LCD_PINS_RS EXP3_07_PIN - #define LCD_PINS_ENABLE EXP3_08_PIN + #define LCD_PINS_EN EXP3_08_PIN #define LCD_PINS_D4 EXP3_06_PIN #define BTN_ENC EXP3_02_PIN diff --git a/Marlin/src/pins/stm32f1/pins_ERYONE_ERY32_MINI.h b/Marlin/src/pins/stm32f1/pins_ERYONE_ERY32_MINI.h index f5a285170e..de85484eae 100644 --- a/Marlin/src/pins/stm32f1/pins_ERYONE_ERY32_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_ERYONE_ERY32_MINI.h @@ -166,7 +166,7 @@ #if HAS_WIRED_LCD #define BEEPER_PIN PE12 #define BTN_ENC PE11 - #define LCD_PINS_ENABLE PE10 + #define LCD_PINS_EN PE10 #define LCD_PINS_RS PE9 #define BTN_EN1 PE4 #define BTN_EN2 PE3 diff --git a/Marlin/src/pins/stm32f1/pins_FLY_MINI.h b/Marlin/src/pins/stm32f1/pins_FLY_MINI.h index c7a6a7639d..e723845a2a 100644 --- a/Marlin/src/pins/stm32f1/pins_FLY_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_FLY_MINI.h @@ -164,7 +164,7 @@ #define BEEPER_PIN EXP1_01_PIN #define LCD_PINS_RS EXP1_04_PIN - #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_D4 EXP1_05_PIN #define LCD_PINS_D5 EXP1_06_PIN #define LCD_PINS_D6 EXP1_07_PIN diff --git a/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h b/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h index 9bc10a26bc..47bea172a8 100644 --- a/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h +++ b/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h @@ -172,7 +172,7 @@ #define LCD_PINS_RS EXP1_07_PIN // CS -- SOFT SPI for ENDER3 LCD #define LCD_PINS_D4 EXP1_06_PIN // SCLK - #define LCD_PINS_ENABLE EXP1_08_PIN // DATA MOSI + #define LCD_PINS_EN EXP1_08_PIN // DATA MOSI //#define LCD_CONTRAST_INIT 190 diff --git a/Marlin/src/pins/stm32f1/pins_GTM32_MINI.h b/Marlin/src/pins/stm32f1/pins_GTM32_MINI.h index c41e20c2ed..9c136c11f6 100644 --- a/Marlin/src/pins/stm32f1/pins_GTM32_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_GTM32_MINI.h @@ -143,7 +143,7 @@ // RepRapDiscount Smart Controller, but adds an FFC40 connector // #define LCD_PINS_RS PE6 // CS chip select /SS chip slave select - #define LCD_PINS_ENABLE PE14 // SID (MOSI) + #define LCD_PINS_EN PE14 // SID (MOSI) #define LCD_PINS_D4 PD8 // SCK (CLK) clock #define LCD_PINS_D5 PD9 #define LCD_PINS_D6 PD10 diff --git a/Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h b/Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h index 7b144f7118..2cd77f42b2 100644 --- a/Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h +++ b/Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h @@ -144,7 +144,7 @@ // connected with a flat wire to J2 connector on the board. // #define LCD_PINS_RS PE6 // CS chip select /SS chip slave select - #define LCD_PINS_ENABLE PE14 // SID (MOSI) + #define LCD_PINS_EN PE14 // SID (MOSI) #define LCD_PINS_D4 PD8 // SCK (CLK) clock #define LCD_PINS_D5 PD9 #define LCD_PINS_D6 PD10 diff --git a/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h b/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h index 633b782e02..5e012c177d 100644 --- a/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h +++ b/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h @@ -148,7 +148,7 @@ // RepRapDiscount Smart Controller, but adds an FFC40 connector // #define LCD_PINS_RS PE6 // CS chip select /SS chip slave select - #define LCD_PINS_ENABLE PE14 // SID (MOSI) + #define LCD_PINS_EN PE14 // SID (MOSI) #define LCD_PINS_D4 PD8 // SCK (CLK) clock #define LCD_PINS_D5 PD9 #define LCD_PINS_D6 PD10 diff --git a/Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h b/Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h index 2316d9d3b6..8a0f15806e 100644 --- a/Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h +++ b/Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h @@ -146,7 +146,7 @@ // #define LCD_PINS_RS PA12 // CS chip select /SS chip slave select // RW is hardwired to VSS - #define LCD_PINS_ENABLE PC7 // SID (MOSI) + #define LCD_PINS_EN PC7 // SID (MOSI) #define LCD_PINS_D4 PD1 // SCK (CLK) clock #define LCD_PINS_D5 PD4 #define LCD_PINS_D6 PD5 diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h index b14b17d0b9..052bed202b 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h @@ -296,7 +296,7 @@ #if ENABLED(TFT_CLASSIC_UI) // Emulated DOGM SPI - #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_RS EXP1_04_PIN #define BTN_ENC EXP1_02_PIN #define BTN_EN1 EXP2_03_PIN @@ -308,7 +308,7 @@ #if HAS_WIRED_LCD && !HAS_SPI_TFT #define BEEPER_PIN EXP1_01_PIN #define BTN_ENC EXP1_02_PIN - #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_RS EXP1_04_PIN #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h index c7aacc4bab..4d71fcf656 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h @@ -181,7 +181,7 @@ #define BEEPER_PIN EXP1_01_PIN #define BTN_ENC EXP1_02_PIN - #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_RS EXP1_04_PIN #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h index e2d4cf5646..af4e121100 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h @@ -110,7 +110,7 @@ #define BTN_EN1 EXP3_03_PIN #define BTN_EN2 EXP3_05_PIN - #define LCD_PINS_ENABLE EXP3_08_PIN + #define LCD_PINS_EN EXP3_08_PIN #if ENABLED(MKS_MINI_12864) diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE3.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE3.h index 161ff658a6..6835ec3b56 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE3.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE3.h @@ -101,7 +101,7 @@ #define BEEPER_PIN PC1 #define BTN_ENC PC3 - #define LCD_PINS_ENABLE PA4 + #define LCD_PINS_EN PA4 #define LCD_PINS_RS PA5 #define BTN_EN1 PB11 #define BTN_EN2 PB0 diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h index 9176ec0ae1..d37d4a10de 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h @@ -296,7 +296,7 @@ #if ENABLED(TFT_CLASSIC_UI) // Emulated DOGM SPI - #define LCD_PINS_ENABLE PD13 + #define LCD_PINS_EN PD13 #define LCD_PINS_RS PC6 #define BTN_ENC PE13 #define BTN_EN1 PE8 @@ -308,7 +308,7 @@ #if HAS_WIRED_LCD && !HAS_SPI_TFT #define BEEPER_PIN PC5 #define BTN_ENC PE13 - #define LCD_PINS_ENABLE PD13 + #define LCD_PINS_EN PD13 #define LCD_PINS_RS PC6 #define BTN_EN1 PE8 #define BTN_EN2 PE11 diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h index 8a213090b1..2a212f1b4a 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h @@ -264,7 +264,7 @@ #define BEEPER_PIN PC5 #define BTN_ENC PG2 - #define LCD_PINS_ENABLE PG0 + #define LCD_PINS_EN PG0 #define LCD_PINS_RS PG1 #define BTN_EN1 PG5 #define BTN_EN2 PG4 diff --git a/Marlin/src/pins/stm32f1/pins_PANDA_PI_V29.h b/Marlin/src/pins/stm32f1/pins_PANDA_PI_V29.h index 7c8906e599..60211f53f4 100644 --- a/Marlin/src/pins/stm32f1/pins_PANDA_PI_V29.h +++ b/Marlin/src/pins/stm32f1/pins_PANDA_PI_V29.h @@ -171,7 +171,7 @@ #define BTN_EN2 PC5 #define LCD_PINS_RS PC0 - #define LCD_PINS_ENABLE PC2 + #define LCD_PINS_EN PC2 #define LCD_PINS_D4 PC1 #endif diff --git a/Marlin/src/pins/stm32f1/pins_SOVOL_V131.h b/Marlin/src/pins/stm32f1/pins_SOVOL_V131.h index ba8a563f39..97ba7f7fec 100644 --- a/Marlin/src/pins/stm32f1/pins_SOVOL_V131.h +++ b/Marlin/src/pins/stm32f1/pins_SOVOL_V131.h @@ -216,7 +216,7 @@ #if ENABLED(RET6_12864_LCD) #define LCD_PINS_RS EXP3_07_PIN - #define LCD_PINS_ENABLE EXP3_08_PIN + #define LCD_PINS_EN EXP3_08_PIN #define LCD_PINS_D4 EXP3_06_PIN #define BTN_ENC EXP3_02_PIN diff --git a/Marlin/src/pins/stm32f1/pins_STM32F1R.h b/Marlin/src/pins/stm32f1/pins_STM32F1R.h index 634cadc1aa..46bd48f93f 100644 --- a/Marlin/src/pins/stm32f1/pins_STM32F1R.h +++ b/Marlin/src/pins/stm32f1/pins_STM32F1R.h @@ -101,7 +101,7 @@ #error "REPRAPWORLD_GRAPHICAL_LCD is not supported." #else #define LCD_PINS_RS PB8 - #define LCD_PINS_ENABLE PD2 + #define LCD_PINS_EN PD2 #define LCD_PINS_D4 PB12 #define LCD_PINS_D5 PB13 #define LCD_PINS_D6 PB14 diff --git a/Marlin/src/pins/stm32f1/pins_STM3R_MINI.h b/Marlin/src/pins/stm32f1/pins_STM3R_MINI.h index 61cb563575..4cf464aaee 100644 --- a/Marlin/src/pins/stm32f1/pins_STM3R_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_STM3R_MINI.h @@ -116,7 +116,7 @@ #error "REPRAPWORLD_GRAPHICAL_LCD is not supported." #else #define LCD_PINS_RS PB8 - #define LCD_PINS_ENABLE PD2 + #define LCD_PINS_EN PD2 #define LCD_PINS_D4 PB12 #define LCD_PINS_D5 PB13 #define LCD_PINS_D6 PB14 diff --git a/Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h b/Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h index fe4fa49f8f..08491fc21c 100644 --- a/Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h +++ b/Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h @@ -186,7 +186,7 @@ // 8 TX1 PA9 LCD_PINS_RS // 7 RX1 PA10 LCD_PINS_D4 // 6 ENA PC5 BTN_EN2 - // 5 DAT PB2 LCD_PINS_ENABLE + // 5 DAT PB2 LCD_PINS_EN // 4 TX3 PB10 BTN_ENC // 3 RX3 PB11 BTN_EN1 // 2 +5V @@ -194,7 +194,7 @@ #define LCDSCREEN_NAME "ZONESTAR LCD12864" #define LCD_PINS_RS EXP1_03_PIN - #define LCD_PINS_ENABLE EXP1_06_PIN + #define LCD_PINS_EN EXP1_06_PIN #define LCD_PINS_D4 EXP1_04_PIN //#define KILL_PIN EXP1_01_PIN #define BEEPER_PIN EXP1_02_PIN diff --git a/Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h b/Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h index c6192191e1..8997a5f1db 100644 --- a/Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h +++ b/Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h @@ -280,7 +280,7 @@ #if ENABLED(ZONESTAR_12864LCD) #define LCDSCREEN_NAME "ZONESTAR LCD12864" #define LCD_PINS_RS EXP1_03_PIN // 7 CS make sure for zonestar zm3e4! - #define LCD_PINS_ENABLE EXP1_06_PIN // 6 DATA make sure for zonestar zm3e4! + #define LCD_PINS_EN EXP1_06_PIN // 6 DATA make sure for zonestar zm3e4! #define LCD_PINS_D4 EXP1_04_PIN // 8 SCK make sure for zonestar zm3e4! #define BEEPER_PIN EXP1_02_PIN #define KILL_PIN -1 // EXP1_01_PIN @@ -290,7 +290,7 @@ #elif ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) #define LCDSCREEN_NAME "REPRAPDISCOUNT LCD12864" #define LCD_PINS_RS EXP1_03_PIN // 7 CS make sure for zonestar zm3e4! - #define LCD_PINS_ENABLE EXP1_04_PIN // 6 DATA make sure for zonestar zm3e4! + #define LCD_PINS_EN EXP1_04_PIN // 6 DATA make sure for zonestar zm3e4! #define LCD_PINS_D4 EXP1_06_PIN // 8 SCK make sure for zonestar zm3e4! #define BEEPER_PIN EXP1_02_PIN #define KILL_PIN EXP2_07_PIN @@ -310,7 +310,7 @@ #if ENABLED(ZONESTAR_LCD2004_KNOB) #define LCDSCREEN_NAME "LCD2004 KNOB" #define LCD_PINS_RS EXP1_03_PIN - #define LCD_PINS_ENABLE EXP1_04_PIN + #define LCD_PINS_EN EXP1_04_PIN #define LCD_PINS_D4 EXP1_06_PIN #define LCD_PINS_D5 EXP1_05_PIN #define LCD_PINS_D6 EXP1_08_PIN @@ -323,7 +323,7 @@ #elif ENABLED(ZONESTAR_LCD2004_ADCKEY) #define LCDSCREEN_NAME "LCD2004 5KEY" #define LCD_PINS_RS EXP1_03_PIN - #define LCD_PINS_ENABLE EXP1_04_PIN + #define LCD_PINS_EN EXP1_04_PIN #define LCD_PINS_D4 EXP1_06_PIN #define LCD_PINS_D5 EXP1_05_PIN #define LCD_PINS_D6 EXP1_08_PIN diff --git a/Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h b/Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h index b8d72061df..b60cca831b 100644 --- a/Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h +++ b/Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h @@ -277,7 +277,7 @@ #if ENABLED(ZONESTAR_12864LCD) #define LCDSCREEN_NAME "ZONESTAR LCD12864" #define LCD_PINS_RS EXP1_03_PIN // 7 CS make sure for zonestar zm3e4! - #define LCD_PINS_ENABLE EXP1_06_PIN // 6 DATA make sure for zonestar zm3e4! + #define LCD_PINS_EN EXP1_06_PIN // 6 DATA make sure for zonestar zm3e4! #define LCD_PINS_D4 EXP1_04_PIN // 8 SCK make sure for zonestar zm3e4! #define BEEPER_PIN EXP1_02_PIN #define KILL_PIN -1 // EXP1_01_PIN @@ -287,7 +287,7 @@ #elif ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) #define LCDSCREEN_NAME "REPRAPDISCOUNT LCD12864" #define LCD_PINS_RS EXP2_03_PIN // 7 CS make sure for zonestar zm3e4! - #define LCD_PINS_ENABLE EXP2_06_PIN // 6 DATA make sure for zonestar zm3e4! + #define LCD_PINS_EN EXP2_06_PIN // 6 DATA make sure for zonestar zm3e4! #define LCD_PINS_D4 EXP2_04_PIN // 8 SCK make sure for zonestar zm3e4! #define BEEPER_PIN EXP2_01_PIN #define KILL_PIN EXP2_02_PIN diff --git a/Marlin/src/pins/stm32f4/pins_ARMED.h b/Marlin/src/pins/stm32f4/pins_ARMED.h index 6ae2674488..357ab1bd3b 100644 --- a/Marlin/src/pins/stm32f4/pins_ARMED.h +++ b/Marlin/src/pins/stm32f4/pins_ARMED.h @@ -173,7 +173,7 @@ #endif #else #define LCD_PINS_RS PE9 - #define LCD_PINS_ENABLE PE8 + #define LCD_PINS_EN PE8 #define LCD_PINS_D4 PB12 #define LCD_PINS_D5 PB13 #define LCD_PINS_D6 PB14 diff --git a/Marlin/src/pins/stm32f4/pins_ARTILLERY_RUBY.h b/Marlin/src/pins/stm32f4/pins_ARTILLERY_RUBY.h index 4c0b7d54b7..869b1e859d 100644 --- a/Marlin/src/pins/stm32f4/pins_ARTILLERY_RUBY.h +++ b/Marlin/src/pins/stm32f4/pins_ARTILLERY_RUBY.h @@ -160,7 +160,7 @@ #define LCD_CONTRAST_INIT 255 #else #define LCD_PINS_RS PC15 - #define LCD_PINS_ENABLE PB6 + #define LCD_PINS_EN PB6 #define LCD_PINS_D4 PB5 #define LCD_PINS_D5 PB9 #define LCD_PINS_D6 PB8 diff --git a/Marlin/src/pins/stm32f4/pins_BLACK_STM32F407VE.h b/Marlin/src/pins/stm32f4/pins_BLACK_STM32F407VE.h index b42bcf5de3..a4af3f8fe3 100644 --- a/Marlin/src/pins/stm32f4/pins_BLACK_STM32F407VE.h +++ b/Marlin/src/pins/stm32f4/pins_BLACK_STM32F407VE.h @@ -121,7 +121,7 @@ #define BEEPER_PIN PD10 #define LCD_PINS_RS PE15 -#define LCD_PINS_ENABLE PD8 +#define LCD_PINS_EN PD8 #define LCD_PINS_D4 PE10 #define LCD_PINS_D5 PE12 #define LCD_PINS_D6 PD1 diff --git a/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h b/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h index fdd56b5c9e..73af02d3ab 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h @@ -248,7 +248,7 @@ #define BTN_EN1 EXP1_03_PIN #define BTN_EN2 EXP1_05_PIN - #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_EN EXP1_08_PIN #define LCD_PINS_D4 EXP1_06_PIN #elif ENABLED(MKS_MINI_12864) @@ -265,7 +265,7 @@ #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN - #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_D4 EXP1_05_PIN #if ENABLED(FYSETC_MINI_12864) diff --git a/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h b/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h index 73f943c3fa..0130d60240 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h @@ -206,7 +206,7 @@ #define BTN_EN2 PB2 #define LCD_PINS_RS PB1 - #define LCD_PINS_ENABLE PE11 + #define LCD_PINS_EN PE11 #define LCD_PINS_D4 PE10 #if ENABLED(LCD_FOR_MELZI) @@ -252,7 +252,7 @@ #endif #define LCD_PINS_RS PE10 - #define LCD_PINS_ENABLE PE9 + #define LCD_PINS_EN PE9 #define LCD_PINS_D4 PB1 #define LCD_PINS_D5 PB2 #define LCD_PINS_D6 PE7 diff --git a/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h b/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h index a21eaefee8..b81859dd61 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h @@ -419,7 +419,7 @@ #define BTN_EN1 EXP1_03_PIN #define BTN_EN2 EXP1_05_PIN - #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_EN EXP1_08_PIN #define LCD_PINS_D4 EXP1_06_PIN #elif ENABLED(MKS_MINI_12864) @@ -438,7 +438,7 @@ #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN - #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_D4 EXP1_05_PIN #if ENABLED(FYSETC_MINI_12864) diff --git a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h index 78766b5c98..711050b747 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h @@ -463,7 +463,7 @@ #define BTN_EN1 EXP1_03_PIN #define BTN_EN2 EXP1_05_PIN - #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_EN EXP1_08_PIN #define LCD_PINS_D4 EXP1_06_PIN #else @@ -473,7 +473,7 @@ #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN - #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_D4 EXP1_05_PIN #if ENABLED(FYSETC_MINI_12864) diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h index d3a04b9d07..ffddeff67c 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h @@ -202,7 +202,7 @@ #define BTN_EN2 EXP1_05_PIN #define LCD_PINS_RS EXP1_07_PIN - #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_EN EXP1_08_PIN #define LCD_PINS_D4 EXP1_06_PIN #elif ENABLED(ZONESTAR_LCD) // ANET A8 LCD Controller - Must convert to 3.3V - CONNECTING TO 5V WILL DAMAGE THE BOARD! @@ -212,7 +212,7 @@ #endif #define LCD_PINS_RS EXP1_06_PIN - #define LCD_PINS_ENABLE EXP1_02_PIN + #define LCD_PINS_EN EXP1_02_PIN #define LCD_PINS_D4 EXP1_07_PIN #define LCD_PINS_D5 EXP1_05_PIN #define LCD_PINS_D6 EXP1_03_PIN diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h index 0cdd34aaee..ad0f594a24 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h @@ -442,7 +442,7 @@ #define BTN_EN1 EXP1_03_PIN #define BTN_EN2 EXP1_05_PIN - #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_EN EXP1_08_PIN #define LCD_PINS_D4 EXP1_06_PIN #elif ENABLED(MKS_MINI_12864) @@ -494,7 +494,7 @@ #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN - #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_D4 EXP1_05_PIN #if ENABLED(FYSETC_MINI_12864) diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h index 95b20c105d..73c2cf9ff8 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h @@ -456,7 +456,7 @@ #define BTN_EN1 EXP1_03_PIN #define BTN_EN2 EXP1_05_PIN - #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_EN EXP1_08_PIN #define LCD_PINS_D4 EXP1_06_PIN #elif ENABLED(MKS_MINI_12864) @@ -473,7 +473,7 @@ #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN - #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_D4 EXP1_05_PIN #if ENABLED(FYSETC_MINI_12864) diff --git a/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h b/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h index 24419cfd1b..b9996aa1f2 100644 --- a/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h +++ b/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h @@ -286,7 +286,7 @@ #if IS_RRD_SC #define BEEPER_PIN EXP1_01_PIN #define LCD_PINS_RS EXP1_04_PIN - #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_D4 EXP1_05_PIN #define LCD_PINS_D5 EXP1_06_PIN #define LCD_PINS_D6 EXP1_07_PIN diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h b/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h index a7b7c079c3..626bdcde76 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h @@ -149,17 +149,15 @@ * GND | 9 10 | 5V GND | 9 10 | 5V * ------ ------ * EXP2 EXP1 - */ - -/** - * ------ - * 5V | 1 2 | GND - * (LCD_EN/MOSI) PB15 | 3 4 | PB12 (LCD_RS) - * (LCD_D4/SCK) PB13 5 6 | PC11 (BTN_EN2) - * (LCD_D5/MISO) PB14 | 7 8 | PC10 (BTN_EN1) - * (BTN_ENC) PC12 | 9 10 | PC9 (BEEPER) - * ------ - * EXP3 + * + * ------ + * (BEEPER) PC9 | 1 2 | PC12 (BTN_ENC) + * (BTN_EN1) PC10 | 3 4 | PB14 (LCD_D5/MISO) + * (BTN_EN2) PC11 5 6 | PB13 (LCD_D4/SCK) + * (LCD_RS) PB12 | 7 8 | PB15 (LCD_EN/MOSI) + * GND | 9 10 | 5V + * ------ + * EXP3 */ #define EXP1_01_PIN PC9 @@ -180,22 +178,31 @@ #define EXP2_07_PIN PC3 #define EXP2_08_PIN -1 -#if HAS_WIRED_LCD +#define EXP3_01_PIN PC9 +#define EXP3_02_PIN PC12 +#define EXP3_03_PIN PC10 +#define EXP3_04_PIN PB14 +#define EXP3_05_PIN PC11 +#define EXP3_06_PIN PB13 +#define EXP3_07_PIN PB12 +#define EXP3_08_PIN PB15 + +#if ENABLED(CR10_STOCKDISPLAY) + + #define BEEPER_PIN EXP3_01_PIN + #define BTN_ENC EXP3_02_PIN + #define BTN_EN1 EXP3_03_PIN + #define BTN_EN2 EXP3_05_PIN + #define LCD_PINS_D4 EXP3_06_PIN + #define LCD_PINS_RS EXP3_07_PIN + #define LCD_PINS_EN EXP3_08_PIN + +#elif HAS_WIRED_LCD #define BEEPER_PIN EXP1_01_PIN #define BTN_ENC EXP1_02_PIN - #if ENABLED(CR10_STOCKDISPLAY) - - #define LCD_PINS_RS EXP1_04_PIN - - #define BTN_EN1 EXP2_03_PIN - #define BTN_EN2 EXP2_05_PIN - - #define LCD_PINS_ENABLE EXP1_03_PIN - #define LCD_PINS_D4 EXP1_05_PIN - - #elif ENABLED(MKS_MINI_12864) + #if ENABLED(MKS_MINI_12864) #define DOGLCD_A0 EXP1_07_PIN #define DOGLCD_CS EXP1_06_PIN @@ -209,7 +216,7 @@ #define BTN_EN1 EXP2_05_PIN #define BTN_EN2 EXP2_03_PIN - #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_D4 EXP1_05_PIN #if ENABLED(FYSETC_MINI_12864) diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h b/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h index 49aab671c5..7780490799 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h @@ -268,7 +268,7 @@ #define BTN_EN1 EXP1_03_PIN #define BTN_EN2 EXP1_05_PIN - #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_EN EXP1_08_PIN #define LCD_PINS_D4 EXP1_06_PIN #else @@ -280,7 +280,7 @@ #define LCD_SDSS EXP2_04_PIN - #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_D4 EXP1_05_PIN #if ENABLED(FYSETC_MINI_12864) diff --git a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_common.h b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_common.h index 1a72722221..367cace424 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_common.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_common.h @@ -311,7 +311,7 @@ #elif HAS_WIRED_LCD - #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_RS EXP1_04_PIN #define LCD_BACKLIGHT_PIN -1 diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h index fed0dc9fa5..3b1c773b29 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h @@ -327,7 +327,7 @@ #elif HAS_WIRED_LCD - #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_RS EXP1_04_PIN #define LCD_BACKLIGHT_PIN -1 diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h index 82c52ad984..7d537c9643 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h @@ -339,7 +339,7 @@ #define BEEPER_PIN EXP1_01_PIN #define BTN_ENC EXP1_02_PIN - #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_RS EXP1_04_PIN #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN diff --git a/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h b/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h index b03fc5419e..b281a8e2a3 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h @@ -307,7 +307,7 @@ #define BTN_EN1 EXP1_03_PIN #define BTN_EN2 EXP1_05_PIN - #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_EN EXP1_08_PIN #define LCD_PINS_D4 EXP1_06_PIN #else @@ -317,7 +317,7 @@ #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN - #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_D4 EXP1_05_PIN #if ENABLED(FYSETC_MINI_12864) diff --git a/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h b/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h index ed4ba34266..daed1da4b0 100644 --- a/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h +++ b/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h @@ -149,7 +149,7 @@ #define BTN_ENC PE7 #define LCD_PINS_RS PE10 - #define LCD_PINS_ENABLE PE9 + #define LCD_PINS_EN PE9 #define LCD_PINS_D4 PE12 #if ENABLED(MKS_MINI_12864) diff --git a/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_V2.h b/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_V2.h index b2fec3b834..448c54f1b3 100644 --- a/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_V2.h +++ b/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_V2.h @@ -233,7 +233,7 @@ #define BEEPER_PIN EXP1_01_PIN // Not connected in dev board #endif #define LCD_PINS_RS EXP1_07_PIN - #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_EN EXP1_08_PIN #define LCD_PINS_D4 EXP1_06_PIN //#define KILL_PIN -1 diff --git a/Marlin/src/pins/stm32f4/pins_VAKE403D.h b/Marlin/src/pins/stm32f4/pins_VAKE403D.h index eba63c5a5b..a17d31f063 100644 --- a/Marlin/src/pins/stm32f4/pins_VAKE403D.h +++ b/Marlin/src/pins/stm32f4/pins_VAKE403D.h @@ -208,7 +208,7 @@ #define BTN_EN2 EXP2_05_PIN #define BTN_ENC EXP1_02_PIN - #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_RS EXP1_04_PIN #define LCD_PINS_D4 EXP1_05_PIN diff --git a/Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h b/Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h index 6f5c179d1c..bf45f94ab8 100644 --- a/Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h +++ b/Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h @@ -186,7 +186,7 @@ #define BTN_ENC PE11 // BTN_ENC #define SD_DETECT_PIN PD14 #define LCD_PINS_RS PF12 // LCD_RS - #define LCD_PINS_ENABLE PD15 // LCD_EN + #define LCD_PINS_EN PD15 // LCD_EN #define LCD_PINS_D4 PB13 // LCD_D4 #define BTN_EN1 PF13 // BTN_EN1 #define BTN_EN2 PE9 // BTN_EN2 diff --git a/Marlin/src/pins/stm32f7/pins_REMRAM_V1.h b/Marlin/src/pins/stm32f7/pins_REMRAM_V1.h index f13eba8ef3..2db21be45e 100644 --- a/Marlin/src/pins/stm32f7/pins_REMRAM_V1.h +++ b/Marlin/src/pins/stm32f7/pins_REMRAM_V1.h @@ -120,7 +120,7 @@ #define SD_DETECT_PIN 56 // SD_CARD_DET #define BEEPER_PIN 46 // LCD_BEEPER #define LCD_PINS_RS 49 // LCD_RS -#define LCD_PINS_ENABLE 48 // LCD_EN +#define LCD_PINS_EN 48 // LCD_EN #define LCD_PINS_D4 50 // LCD_D4 #define LCD_PINS_D5 51 // LCD_D5 #define LCD_PINS_D6 52 // LCD_D6 diff --git a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h index 57e257a7ba..e2e276f89a 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h @@ -266,7 +266,7 @@ #define BTN_ENC EXP1_02_PIN #define LCD_PINS_RS EXP1_07_PIN - #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_EN EXP1_08_PIN #define LCD_PINS_D4 EXP1_06_PIN #elif ENABLED(ZONESTAR_LCD) // ANET A8 LCD Controller - Must convert to 3.3V - CONNECTING TO 5V WILL DAMAGE THE BOARD! @@ -276,7 +276,7 @@ #endif #define LCD_PINS_RS EXP1_06_PIN - #define LCD_PINS_ENABLE EXP1_02_PIN + #define LCD_PINS_EN EXP1_02_PIN #define LCD_PINS_D4 EXP1_07_PIN #define LCD_PINS_D5 EXP1_05_PIN #define LCD_PINS_D6 EXP1_03_PIN diff --git a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V1_0.h b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V1_0.h index 276c951143..8f3cc618e7 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V1_0.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V1_0.h @@ -227,7 +227,7 @@ #define BTN_EN1 EXP1_03_PIN #define BTN_EN2 EXP1_05_PIN - #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_EN EXP1_08_PIN #define LCD_PINS_D4 EXP1_06_PIN #elif ENABLED(MKS_MINI_12864) @@ -244,7 +244,7 @@ #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN - #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_D4 EXP1_05_PIN #if ENABLED(FYSETC_MINI_12864) diff --git a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h index 737330d351..fd926c014f 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h @@ -255,7 +255,7 @@ #define BTN_EN1 EXP1_03_PIN #define BTN_EN2 EXP1_05_PIN - #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_EN EXP1_08_PIN #define LCD_PINS_D4 EXP1_06_PIN #elif ENABLED(MKS_MINI_12864) @@ -272,7 +272,7 @@ #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN - #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_D4 EXP1_05_PIN #if ENABLED(FYSETC_MINI_12864) diff --git a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h index 2c778f8732..bd9a1cf0b5 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h @@ -319,7 +319,7 @@ #define BTN_EN1 EXP1_03_PIN #define BTN_EN2 EXP1_05_PIN - #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_EN EXP1_08_PIN #define LCD_PINS_D4 EXP1_06_PIN #elif ENABLED(MKS_MINI_12864) @@ -336,7 +336,7 @@ #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN - #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_D4 EXP1_05_PIN #if ENABLED(FYSETC_MINI_12864) diff --git a/Marlin/src/pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h b/Marlin/src/pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h index 9be2357043..0f7da52572 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h @@ -196,7 +196,7 @@ * CS | 3 4 | SCK (EN1) PA10 | 3 4 | -- * MOSI | 5 6 | MISO (EN2) PA9 5 6 | MOSI * 3V3 | 7 8 | GND -- | 7 8 | -- - * ------ GND | 9 10| RESET (Kill) + * ------ GND | 9 10 | RESET (Kill) * SPI ------ * EXP2 * @@ -205,7 +205,7 @@ * PA9 | 3 4 | RESET (LCD CS) PB8 | 3 4 | PD6 (LCD_A0) * PA10 5 6 | PB9 (RESET) PB9 5 6 | PA15 (DIN) * PB8 | 7 8 | PD6 -- | 7 8 | -- - * GND | 9 10| 5V GND | 9 10| 5V + * GND | 9 10 | 5V GND | 9 10 | 5V * ------ ------ * EXP1 EXP1 */ @@ -238,7 +238,7 @@ #define BTN_EN2 EXP1_05_PIN #define LCD_PINS_RS EXP1_07_PIN - #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_EN EXP1_08_PIN #define LCD_PINS_D4 EXP1_06_PIN #elif ENABLED(ZONESTAR_LCD) // ANET A8 LCD Controller - Must convert to 3.3V - CONNECTING TO 5V WILL DAMAGE THE BOARD! @@ -248,7 +248,7 @@ #endif #define LCD_PINS_RS EXP1_06_PIN - #define LCD_PINS_ENABLE EXP1_02_PIN + #define LCD_PINS_EN EXP1_02_PIN #define LCD_PINS_D4 EXP1_07_PIN #define LCD_PINS_D5 EXP1_05_PIN #define LCD_PINS_D6 EXP1_03_PIN diff --git a/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h b/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h index cc2dab0e16..e8e984fcb7 100644 --- a/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h +++ b/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h @@ -430,7 +430,7 @@ #define BTN_EN1 EXP1_03_PIN #define BTN_EN2 EXP1_05_PIN - #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_EN EXP1_08_PIN #define LCD_PINS_D4 EXP1_06_PIN #else @@ -440,7 +440,7 @@ #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN - #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_D4 EXP1_05_PIN #if ENABLED(FYSETC_MINI_12864) diff --git a/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h b/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h index 97ac32479e..be56d0d2b7 100644 --- a/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h +++ b/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h @@ -445,7 +445,7 @@ #define BTN_EN1 EXP1_03_PIN #define BTN_EN2 EXP1_05_PIN - #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_EN EXP1_08_PIN #define LCD_PINS_D4 EXP1_06_PIN #elif ENABLED(MKS_MINI_12864) @@ -462,7 +462,7 @@ #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN - #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_D4 EXP1_05_PIN #if ENABLED(FYSETC_MINI_12864) diff --git a/Marlin/src/pins/teensy2/pins_PRINTRBOARD.h b/Marlin/src/pins/teensy2/pins_PRINTRBOARD.h index f80576b509..124faa7691 100644 --- a/Marlin/src/pins/teensy2/pins_PRINTRBOARD.h +++ b/Marlin/src/pins/teensy2/pins_PRINTRBOARD.h @@ -133,7 +133,7 @@ #if HAS_WIRED_LCD && IS_NEWPANEL #define LCD_PINS_RS 9 // E1 JP11-11 - #define LCD_PINS_ENABLE 8 // E0 JP11-10 + #define LCD_PINS_EN 8 // E0 JP11-10 #define LCD_PINS_D4 7 // D7 JP11-8 #define LCD_PINS_D5 6 // D6 JP11-7 #define LCD_PINS_D6 5 // D5 JP11-6 diff --git a/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h b/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h index 06496abdcd..b208b08826 100644 --- a/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h +++ b/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h @@ -214,7 +214,7 @@ #if HAS_WIRED_LCD #define LCD_PINS_RS 9 // E1 JP11-11 - #define LCD_PINS_ENABLE 8 // E0 JP11-10 + #define LCD_PINS_EN 8 // E0 JP11-10 #define LCD_PINS_D4 7 // D7 JP11-8 #define LCD_PINS_D5 6 // D6 JP11-7 #define LCD_PINS_D6 5 // D5 JP11-6 diff --git a/Marlin/src/pins/teensy2/pins_SAV_MKI.h b/Marlin/src/pins/teensy2/pins_SAV_MKI.h index 5044af75d3..c1809eed6b 100644 --- a/Marlin/src/pins/teensy2/pins_SAV_MKI.h +++ b/Marlin/src/pins/teensy2/pins_SAV_MKI.h @@ -155,7 +155,7 @@ // #define BEEPER_PIN -1 #define LCD_PINS_RS -1 -#define LCD_PINS_ENABLE -1 +#define LCD_PINS_EN -1 #if ENABLED(SAV_3DLCD) // For LCD SHIFT register LCD diff --git a/Marlin/src/pins/teensy2/pins_TEENSY2.h b/Marlin/src/pins/teensy2/pins_TEENSY2.h index b31c173869..2b65f17bc5 100644 --- a/Marlin/src/pins/teensy2/pins_TEENSY2.h +++ b/Marlin/src/pins/teensy2/pins_TEENSY2.h @@ -169,7 +169,7 @@ // #if IS_ULTIPANEL #define LCD_PINS_RS 8 // E0 - #define LCD_PINS_ENABLE 9 // E1 + #define LCD_PINS_EN 9 // E1 #define LCD_PINS_D4 10 // C0 #define LCD_PINS_D5 11 // C1 #define LCD_PINS_D6 12 // C2 diff --git a/Marlin/src/pins/teensy3/pins_TEENSY31_32.h b/Marlin/src/pins/teensy3/pins_TEENSY31_32.h index ee5466b54d..a6aa4fd86d 100644 --- a/Marlin/src/pins/teensy3/pins_TEENSY31_32.h +++ b/Marlin/src/pins/teensy3/pins_TEENSY31_32.h @@ -100,7 +100,7 @@ /* #if HAS_WIRED_LCD #define LCD_PINS_RS 40 - #define LCD_PINS_ENABLE 41 + #define LCD_PINS_EN 41 #define LCD_PINS_D4 42 #define LCD_PINS_D5 43 #define LCD_PINS_D6 44 diff --git a/Marlin/src/pins/teensy3/pins_TEENSY35_36.h b/Marlin/src/pins/teensy3/pins_TEENSY35_36.h index 289a8acb1c..54bf6f8835 100644 --- a/Marlin/src/pins/teensy3/pins_TEENSY35_36.h +++ b/Marlin/src/pins/teensy3/pins_TEENSY35_36.h @@ -67,7 +67,7 @@ * * Interior pins: * LCD_PINS_RS 40 * * 53 SCK2 - * LCD_PINS_ENABLE 41 * * 52 MOSI2 + * LCD_PINS_EN 41 * * 52 MOSI2 * LCD_PINS_D4 42 * * 51 MISO2 * LCD_PINS_D5 CS2 43 * * 50 A24 * LCD_PINS_D6 MOSI2 44 * * 49 A23 @@ -132,7 +132,7 @@ #if HAS_WIRED_LCD #define LCD_PINS_RS 40 - #define LCD_PINS_ENABLE 41 + #define LCD_PINS_EN 41 #define LCD_PINS_D4 42 #define LCD_PINS_D5 43 #define LCD_PINS_D6 44 diff --git a/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_V2/PeripheralPins.c b/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_V2/PeripheralPins.c index 03d75bbfa8..edefd00f7a 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_V2/PeripheralPins.c +++ b/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_V2/PeripheralPins.c @@ -161,7 +161,7 @@ WEAK const PinMap PinMap_PWM[] = { //{PB_14, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 1)}, // TIM8_CH2N //{PB_14, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM12, 1, 0)}, // TIM12_CH1 - //{PB_15, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N LCD_PINS_ENABLE + //{PB_15, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N LCD_PINS_EN //{PB_15, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 1)}, // TIM8_CH3N //{PB_15, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM12, 2, 0)}, // TIM12_CH2 @@ -292,7 +292,7 @@ WEAK const PinMap PinMap_USB_OTG_HS[] = { //{PB_12, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_PULLUP, GPIO_AF12_OTG_HS_FS)}, // USB_OTG_HS_ID CS (LCD) //{PB_13, USB_OTG_HS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_OTG_HS_VBUS LCD_PINS_D4 //{PB_14, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_OTG_HS_FS)}, // USB_OTG_HS_DM MISO (LCD) - //{PB_15, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_OTG_HS_FS)}, // USB_OTG_HS_DP LCD_PINS_ENABLE + //{PB_15, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_OTG_HS_FS)}, // USB_OTG_HS_DP LCD_PINS_EN #else //{PA_3, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D0 Z_STEP //{PA_5, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_CK SPI-SCK diff --git a/ini/lpc176x.ini b/ini/lpc176x.ini index 0cb26628fe..223ba3cabd 100644 --- a/ini/lpc176x.ini +++ b/ini/lpc176x.ini @@ -23,7 +23,7 @@ extra_scripts = ${common.extra_scripts} build_src_filter = ${common.default_src_filter} + + lib_deps = ${common.lib_deps} Servo -custom_marlin.USES_LIQUIDCRYSTAL = arduino-libraries/LiquidCrystal@~1.0.7 +custom_marlin.USES_LIQUIDCRYSTAL = arduino-libraries/LiquidCrystal@~1.0.7 custom_marlin.NEOPIXEL_LED = Adafruit NeoPixel=https://github.com/p3p/Adafruit_NeoPixel/archive/1.5.0.zip build_flags = ${common.build_flags} -DU8G_HAL_LINKS -IMarlin/src/HAL/LPC1768/include -IMarlin/src/HAL/LPC1768/u8g # debug options for backtrace From 8c897babce82114b0f589ef4f93a9cd501efd241 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sun, 9 Apr 2023 00:22:09 +0000 Subject: [PATCH 137/225] [cron] Bump distribution date (2023-04-09) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 7968a02f3e..e43a88dba8 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-04-08" +//#define STRING_DISTRIBUTION_DATE "2023-04-09" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index f19dfc7acf..7d1e3e89ef 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-04-08" + #define STRING_DISTRIBUTION_DATE "2023-04-09" #endif /** From 12d6043d86737925f8d5232536b3fc5f9055672a Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Mon, 10 Apr 2023 21:16:52 +1200 Subject: [PATCH 138/225] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20MARLIN=5FF446Zx=5F?= =?UTF-8?q?TRONXY=20variant=20(#25659)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to 9be1554f --- .../variants/MARLIN_F446Zx_TRONXY/variant.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F446Zx_TRONXY/variant.cpp b/buildroot/share/PlatformIO/variants/MARLIN_F446Zx_TRONXY/variant.cpp index 2d94ee763a..7e18e33f7e 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F446Zx_TRONXY/variant.cpp +++ b/buildroot/share/PlatformIO/variants/MARLIN_F446Zx_TRONXY/variant.cpp @@ -173,15 +173,15 @@ uint32_t myvar[] = {1,2,3,4,5,6,7,8}; void myshow(int fre, int times) // YSZ-WORK { uint32_t index = 10; - RCC->AHB1ENR |= 1 << 6; // port G clock - GPIOG->MODER &= ~(3UL << 2 * index); // clear old mode - GPIOG->MODER |= 1 << 2 * index; // mode is output - GPIOG->OSPEEDR &= ~(3UL << 2 * index) // Clear old output speed - GPIOG->OSPEEDR |= 2 << 2 * index; // Set output speed - GPIOG->OTYPER &= ~(1UL << index) // clear old output - GPIOG->OTYPER |= 0 << index; // Set the output mode to push-pull - GPIOG->PUPDR &= ~(3 << 2 * index) // Clear the original settings first - GPIOG->PUPDR |= 1 << 2 * index; // Set new up and down + RCC->AHB1ENR |= 1 << 6; // port G clock + GPIOG->MODER &= ~(3UL << 2 * index); // clear old mode + GPIOG->MODER |= 1 << 2 * index; // mode is output + GPIOG->OSPEEDR &= ~(3UL << 2 * index); // Clear old output speed + GPIOG->OSPEEDR |= 2 << 2 * index; // Set output speed + GPIOG->OTYPER &= ~(1UL << index); // clear old output + GPIOG->OTYPER |= 0 << index; // Set the output mode to push-pull + GPIOG->PUPDR &= ~(3 << 2 * index); // Clear the original settings first + GPIOG->PUPDR |= 1 << 2 * index; // Set new up and down while (times != 0) { GPIOG->BSRR = 1UL << index; for (int i = 0; i < fre; i++) From 54aef53c4d413e9fab2151cc2c85467902c65955 Mon Sep 17 00:00:00 2001 From: David Fries Date: Mon, 10 Apr 2023 04:38:38 -0500 Subject: [PATCH 139/225] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20Skip=20a=20redunda?= =?UTF-8?q?nt=20BLTouch::command=20(#25656)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/feature/bltouch.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Marlin/src/feature/bltouch.cpp b/Marlin/src/feature/bltouch.cpp index fe56341a47..1c6c1eb4aa 100644 --- a/Marlin/src/feature/bltouch.cpp +++ b/Marlin/src/feature/bltouch.cpp @@ -42,9 +42,14 @@ bool BLTouch::od_5v_mode; // Initialized by settings.load, 0 = Open Drai #include "../core/debug_out.h" bool BLTouch::command(const BLTCommand cmd, const millis_t &ms) { - if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("BLTouch Command :", cmd); - servo[Z_PROBE_SERVO_NR].move(cmd); - safe_delay(_MAX(ms, (uint32_t)BLTOUCH_DELAY)); // BLTOUCH_DELAY is also the *minimum* delay + const BLTCommand current = servo[Z_PROBE_SERVO_NR].read(); + if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("BLTouch from ", current, " to ", cmd); + // If the new command is the same, skip it (and the delay). + // The previous write should've already delayed to detect the alarm. + if (cmd != current) { + servo[Z_PROBE_SERVO_NR].move(cmd); + safe_delay(_MAX(ms, (uint32_t)BLTOUCH_DELAY)); // BLTOUCH_DELAY is also the *minimum* delay + } return triggered(); } From 7a5934ff4729267873a94ae3fd95675ddda65daa Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Mon, 10 Apr 2023 22:17:50 +1200 Subject: [PATCH 140/225] =?UTF-8?q?=F0=9F=94=A7=20Update=20thermocouple=20?= =?UTF-8?q?2=20pin=20sanity=20check=20(#25627)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/SanityCheck.h | 4 ++-- Marlin/src/pins/sam/pins_ULTRATRONICS_PRO.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 46c7931a50..7dbd4c765d 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -2646,8 +2646,8 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #error "TEMP_SENSOR_2 is required with 3 or more HOTENDS." #elif !HAS_HEATER_2 #error "HEATER_2_PIN not defined for this board." - #elif !PIN_EXISTS(TEMP_2) && !TEMP_SENSOR_2_IS_DUMMY - #error "TEMP_2_PIN not defined for this board." + #elif !ANY_PIN(TEMP_2, TEMP_2_CS) && !TEMP_SENSOR_2_IS_DUMMY + #error "TEMP_2_PIN or TEMP_2_CS_PIN not defined for this board." #endif #if HOTENDS > 3 #if TEMP_SENSOR_3 == 0 diff --git a/Marlin/src/pins/sam/pins_ULTRATRONICS_PRO.h b/Marlin/src/pins/sam/pins_ULTRATRONICS_PRO.h index e4525acad0..f3ec7806e6 100644 --- a/Marlin/src/pins/sam/pins_ULTRATRONICS_PRO.h +++ b/Marlin/src/pins/sam/pins_ULTRATRONICS_PRO.h @@ -153,7 +153,7 @@ #define TEMP_0_CS_PIN 65 #define TEMP_1_CS_PIN 52 #define TEMP_2_CS_PIN 50 -#define TEMP_3_CS_PIN 51 +#define TEMP_3_CS_PIN 51 // Not yet supported #define ENC424_SS 61 From 182497fc3901b156f139e6884a2e5106f2e208fa Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Mon, 10 Apr 2023 12:07:12 +0000 Subject: [PATCH 141/225] [cron] Bump distribution date (2023-04-10) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index e43a88dba8..6fcb899a7b 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-04-09" +//#define STRING_DISTRIBUTION_DATE "2023-04-10" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 7d1e3e89ef..dcff1bd9bd 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-04-09" + #define STRING_DISTRIBUTION_DATE "2023-04-10" #endif /** From 266786406c3e90654e94b91cd74e646d145cc4ef Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 30 Mar 2023 15:12:56 -0500 Subject: [PATCH 142/225] =?UTF-8?q?=F0=9F=8E=A8=20Misc.=20probe-related=20?= =?UTF-8?q?cleanup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/gcode/calibrate/G34_M422.cpp | 8 ++++---- Marlin/src/gcode/probe/M401_M402.cpp | 4 +++- Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp | 8 ++++---- Marlin/src/lcd/extui/anycubic_vyper/dgus_tft_defs.h | 13 +++++++------ Marlin/src/module/motion.cpp | 9 ++++----- Marlin/src/module/motion.h | 2 ++ Marlin/src/module/probe.cpp | 10 +++++----- Marlin/src/module/probe.h | 5 +++++ 8 files changed, 34 insertions(+), 25 deletions(-) diff --git a/Marlin/src/gcode/calibrate/G34_M422.cpp b/Marlin/src/gcode/calibrate/G34_M422.cpp index 816e455b84..db6ef874d9 100644 --- a/Marlin/src/gcode/calibrate/G34_M422.cpp +++ b/Marlin/src/gcode/calibrate/G34_M422.cpp @@ -153,7 +153,7 @@ void GcodeSuite::G34() { const xy_pos_t diff = z_stepper_align.xy[i] - z_stepper_align.xy[j]; return HYPOT2(diff.x, diff.y); }; - float z_probe = Z_PROBE_SAFE_CLEARANCE + (G34_MAX_GRADE) * 0.01f * SQRT(_MAX(0, magnitude2(0, 1) + float z_probe = (Z_PROBE_SAFE_CLEARANCE) + (G34_MAX_GRADE) * 0.01f * SQRT(_MAX(0, magnitude2(0, 1) #if TRIPLE_Z , magnitude2(2, 1), magnitude2(2, 0) #if QUAD_Z @@ -234,7 +234,7 @@ void GcodeSuite::G34() { // Add height to each value, to provide a more useful target height for // the next iteration of probing. This allows adjustments to be made away from the bed. - z_measured[iprobe] = z_probed_height + Z_CLEARANCE_BETWEEN_PROBES; + z_measured[iprobe] = z_probed_height + (Z_CLEARANCE_BETWEEN_PROBES); if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> Z", iprobe + 1, " measured position is ", z_measured[iprobe]); @@ -248,7 +248,7 @@ void GcodeSuite::G34() { // Adapt the next probe clearance height based on the new measurements. // Safe_height = lowest distance to bed (= highest measurement) plus highest measured misalignment. z_maxdiff = z_measured_max - z_measured_min; - z_probe = Z_PROBE_SAFE_CLEARANCE + z_measured_max + z_maxdiff; + z_probe = (Z_PROBE_SAFE_CLEARANCE) + z_measured_max + z_maxdiff; #if HAS_Z_STEPPER_ALIGN_STEPPER_XY // Replace the initial values in z_measured with calculated heights at @@ -436,7 +436,7 @@ void GcodeSuite::G34() { // Use the probed height from the last iteration to determine the Z height. // z_measured_min is used, because all steppers are aligned to z_measured_min. // Ideally, this would be equal to the 'z_probe * 0.5f' which was added earlier. - current_position.z -= z_measured_min - (float)Z_CLEARANCE_BETWEEN_PROBES; + current_position.z -= z_measured_min - float(Z_CLEARANCE_BETWEEN_PROBES); sync_plan_position(); #endif diff --git a/Marlin/src/gcode/probe/M401_M402.cpp b/Marlin/src/gcode/probe/M401_M402.cpp index 7114cad9e8..d81c04f4a0 100644 --- a/Marlin/src/gcode/probe/M401_M402.cpp +++ b/Marlin/src/gcode/probe/M401_M402.cpp @@ -65,7 +65,9 @@ void GcodeSuite::M401() { */ void GcodeSuite::M402() { probe.stow(parser.boolval('R')); - probe.move_z_after_probing(); + #ifdef Z_AFTER_PROBING + do_z_clearance(Z_AFTER_PROBING); + #endif report_current_position(); } diff --git a/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp b/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp index e9e80101f6..81af2e6e20 100644 --- a/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp +++ b/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp @@ -152,7 +152,7 @@ namespace Anycubic { // Enable levelling and Disable end stops during print // as Z home places nozzle above the bed so we need to allow it past the end stops - injectCommands_P(AC_cmnd_enable_levelling); + injectCommands(AC_cmnd_enable_leveling); // Startup tunes are defined in Tunes.h //PlayTune(BEEPER_PIN, Anycubic_PowerOn, 1); @@ -1299,7 +1299,7 @@ namespace Anycubic { #if ENABLED(POWER_LOSS_RECOVERY) if (printer_state == AC_printer_resuming_from_power_outage) { // Need to home here to restore the Z position - //injectCommands_P(AC_cmnd_power_loss_recovery); + //injectCommands(AC_cmnd_power_loss_recovery); //SERIAL_ECHOLNPGM("start resuming from power outage: ", AC_cmnd_power_loss_recovery); ChangePageOfTFT(PAGE_STATUS2); // show pause injectCommands(F("M1000")); // home and start recovery @@ -2280,11 +2280,11 @@ namespace Anycubic { if (!isPrinting()) { if (filament_status == 1) { if (canMove(E0) && !commandsInQueue()) - injectCommands_P(AC_cmnd_manual_load_filament); + injectCommands(AC_cmnd_manual_load_filament); } else if (filament_status == 2) { if (canMove(E0) && !commandsInQueue()) - injectCommands_P(AC_cmnd_manual_unload_filament); + injectCommands(AC_cmnd_manual_unload_filament); } } } diff --git a/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft_defs.h b/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft_defs.h index dc187690e3..72e812b965 100644 --- a/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft_defs.h +++ b/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft_defs.h @@ -104,13 +104,14 @@ #define MARLIN_msg_filament_purging PSTR("Filament Purging...") #define MARLIN_msg_media_removed PSTR("Media Removed") #define MARLIN_msg_special_pause PSTR("PB") -#define AC_cmnd_auto_unload_filament PSTR("M701") // Use Marlin unload routine -#define AC_cmnd_auto_load_filament PSTR("M702 M0 PB") // Use Marlin load routing then pause for user to clean nozzle -#define AC_cmnd_manual_load_filament PSTR("M83\nG1 E50 F700\nM82") // replace the manual panel commands with something a little faster -#define AC_cmnd_manual_unload_filament PSTR("M83\nG1 E-50 F1200\nM82") -#define AC_cmnd_enable_levelling PSTR("M420 S1 V1") -#define AC_cmnd_power_loss_recovery PSTR("G28 R5 X Y\nG28 Z") // Lift, home X and Y then home Z when in 'safe' position +#define AC_cmnd_auto_unload_filament F("M701") // Use Marlin unload routine +#define AC_cmnd_auto_load_filament F("M702 M0 PB") // Use Marlin load routing then pause for user to clean nozzle + +#define AC_cmnd_manual_load_filament F("M83\nG1 E50 F700\nM82") // replace the manual panel commands with something a little faster +#define AC_cmnd_manual_unload_filament F("M83\nG1 E-50 F1200\nM82") +#define AC_cmnd_enable_leveling F("M420SV") +#define AC_cmnd_power_loss_recovery F("G28XYR5\nG28Z") // Lift, home X and Y then home Z when in 'safe' position namespace Anycubic { enum heater_state_t : uint8_t { diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp index 4e4c174bd8..152b5f70e3 100644 --- a/Marlin/src/module/motion.cpp +++ b/Marlin/src/module/motion.cpp @@ -798,6 +798,10 @@ void do_blocking_move_to_x(const_float_t rx, const_feedRate_t fr_mm_s/*=0.0*/) { if (zdest == current_position.z || (!lower_allowed && zdest < current_position.z)) return; do_blocking_move_to_z(zdest, TERN(HAS_BED_PROBE, z_probe_fast_mm_s, homing_feedrate(Z_AXIS))); } + void do_z_clearance_by(const_float_t zclear) { + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("do_z_clearance_by(", zclear, ")"); + do_z_clearance(current_position.z + zclear); + } #endif // @@ -2458,15 +2462,10 @@ void set_axis_is_at_home(const AxisEnum axis) { #if HAS_BED_PROBE && Z_HOME_TO_MIN if (axis == Z_AXIS) { #if HOMING_Z_WITH_PROBE - current_position.z -= probe.offset.z; - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("*** Z HOMED WITH PROBE (Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) ***\n> probe.offset.z = ", probe.offset.z); - #else - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("*** Z HOMED TO ENDSTOP ***"); - #endif } #endif diff --git a/Marlin/src/module/motion.h b/Marlin/src/module/motion.h index 611d3a17bd..adc11f54d9 100644 --- a/Marlin/src/module/motion.h +++ b/Marlin/src/module/motion.h @@ -404,8 +404,10 @@ void restore_feedrate_and_scaling(); #if HAS_Z_AXIS void do_z_clearance(const_float_t zclear, const bool lower_allowed=false); + void do_z_clearance_by(const_float_t zclear); #else inline void do_z_clearance(float, bool=false) {} + inline void do_z_clearance_by(float) {} #endif /** diff --git a/Marlin/src/module/probe.cpp b/Marlin/src/module/probe.cpp index 230fc30db1..b2c1c2b8de 100644 --- a/Marlin/src/module/probe.cpp +++ b/Marlin/src/module/probe.cpp @@ -757,8 +757,8 @@ float Probe::run_z_probe(const bool sanity_check/*=true*/) { if (try_to_probe(PSTR("FAST"), z_probe_low_point, z_probe_fast_mm_s, sanity_check, Z_CLEARANCE_BETWEEN_PROBES) ) return NAN; - const float first_probe_z = DIFF_TERN(HAS_DELTA_SENSORLESS_PROBING, current_position.z, largest_sensorless_adj); - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("1st Probe Z:", first_probe_z); + const float z1 = DIFF_TERN(HAS_DELTA_SENSORLESS_PROBING, current_position.z, largest_sensorless_adj); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("1st Probe Z:", z1); // Raise to give the probe clearance do_z_clearance(Z_CLEARANCE_MULTI_PROBE); @@ -767,7 +767,7 @@ float Probe::run_z_probe(const bool sanity_check/*=true*/) { // If the nozzle is well over the travel height then // move down quickly before doing the slow probe - const float z = Z_CLEARANCE_DEPLOY_PROBE + 5.0f + _MAX(zoffs, 0.0f); + const float z = (Z_CLEARANCE_DEPLOY_PROBE) + 5.0f + _MAX(zoffs, 0.0f); if (current_position.z > z) { // Probe down fast. If the probe never triggered, raise for probe clearance if (!probe_down_to_z(z, z_probe_fast_mm_s)) @@ -853,10 +853,10 @@ float Probe::run_z_probe(const bool sanity_check/*=true*/) { const float z2 = DIFF_TERN(HAS_DELTA_SENSORLESS_PROBING, current_position.z, largest_sensorless_adj); - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("2nd Probe Z:", z2, " Discrepancy:", first_probe_z - z2); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("2nd Probe Z:", z2, " Discrepancy:", z1 - z2); // Return a weighted average of the fast and slow probes - const float measured_z = (z2 * 3.0f + first_probe_z * 2.0f) * 0.2f; + const float measured_z = (z2 * 3.0f + z1 * 2.0f) * 0.2f; #else diff --git a/Marlin/src/module/probe.h b/Marlin/src/module/probe.h index 069e505ea0..03544690b5 100644 --- a/Marlin/src/module/probe.h +++ b/Marlin/src/module/probe.h @@ -33,6 +33,9 @@ #include "../lcd/e3v2/proui/dwin.h" #endif +#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE) +#include "../core/debug_out.h" + #if HAS_BED_PROBE enum ProbePtRaise : uint8_t { PROBE_PT_NONE, // No raise or stow after run_z_probe @@ -171,6 +174,7 @@ public: #endif // !IS_KINEMATIC static void move_z_after_probing() { + DEBUG_SECTION(mzah, "move_z_after_probing", DEBUGGING(LEVELING)); #ifdef Z_AFTER_PROBING do_z_clearance(Z_AFTER_PROBING, true); // Move down still permitted #endif @@ -193,6 +197,7 @@ public: static void use_probing_tool(const bool=true) IF_DISABLED(DO_TOOLCHANGE_FOR_PROBING, {}); static void move_z_after_homing() { + DEBUG_SECTION(mzah, "move_z_after_homing", DEBUGGING(LEVELING)); #if ALL(DWIN_LCD_PROUI, INDIVIDUAL_AXIS_HOMING_SUBMENU, MESH_BED_LEVELING) || defined(Z_AFTER_HOMING) do_z_clearance(Z_POST_CLEARANCE, true); #elif HAS_BED_PROBE From 25e5a3597fed4c9c9c0b074e4aa7c5a7c69d0403 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 10 Apr 2023 19:26:55 -0500 Subject: [PATCH 143/225] =?UTF-8?q?=F0=9F=9A=B8=20Fix=20G30=20behavior?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: David Fries <2767875+dfries@users.noreply.github.com> --- Marlin/src/gcode/probe/G30.cpp | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/Marlin/src/gcode/probe/G30.cpp b/Marlin/src/gcode/probe/G30.cpp index 0a23e0981c..6548105487 100644 --- a/Marlin/src/gcode/probe/G30.cpp +++ b/Marlin/src/gcode/probe/G30.cpp @@ -53,15 +53,21 @@ */ void GcodeSuite::G30() { + xy_pos_t old_pos = current_position, + probepos = current_position; + + const bool seenX = parser.seenval('X'); + if (seenX) probepos.x = RAW_X_POSITION(parser.value_linear_units()); + const bool seenY = parser.seenval('Y'); + if (seenY) probepos.y = RAW_Y_POSITION(parser.value_linear_units()); + probe.use_probing_tool(); - // Convert the given logical position to native position - const xy_pos_t pos = { - parser.seenval('X') ? RAW_X_POSITION(parser.value_linear_units()) : current_position.x, - parser.seenval('Y') ? RAW_Y_POSITION(parser.value_linear_units()) : current_position.y - }; + if (probe.can_reach(probepos)) { + + if (seenX) old_pos.x = probepos.x; + if (seenY) old_pos.y = probepos.y; - if (probe.can_reach(pos)) { // Disable leveling so the planner won't mess with us TERN_(HAS_LEVELING, set_bed_leveling_enabled(false)); @@ -74,15 +80,15 @@ void GcodeSuite::G30() { const ProbePtRaise raise_after = parser.boolval('E', true) ? PROBE_PT_STOW : PROBE_PT_NONE; TERN_(HAS_PTC, ptc.set_enabled(!parser.seen('C') || parser.value_bool())); - const float measured_z = probe.probe_at_point(pos, raise_after, 1); + const float measured_z = probe.probe_at_point(probepos, raise_after, 1); TERN_(HAS_PTC, ptc.set_enabled(true)); if (!isnan(measured_z)) { - SERIAL_ECHOLNPGM("Bed X: ", pos.asLogical().x, " Y: ", pos.asLogical().y, " Z: ", measured_z); + SERIAL_ECHOLNPGM("Bed X: ", probepos.asLogical().x, " Y: ", probepos.asLogical().y, " Z: ", measured_z); #if EITHER(DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI) char msg[31], str_1[6], str_2[6], str_3[6]; sprintf_P(msg, PSTR("X:%s, Y:%s, Z:%s"), - dtostrf(pos.x, 1, 1, str_1), - dtostrf(pos.y, 1, 1, str_2), + dtostrf(probepos.x, 1, 1, str_1), + dtostrf(probepos.y, 1, 1, str_2), dtostrf(measured_z, 1, 2, str_3) ); ui.set_status(msg); @@ -91,6 +97,8 @@ void GcodeSuite::G30() { restore_feedrate_and_scaling(); + do_blocking_move_to(old_pos); + if (raise_after == PROBE_PT_STOW) probe.move_z_after_probing(); From c4aa39dc863091cbf0b4590ec4bd3a117a9f92d3 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 10 Apr 2023 20:54:55 -0500 Subject: [PATCH 144/225] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20BLTouch=20stow=20i?= =?UTF-8?q?n=20homeaxis(Z)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/module/motion.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp index 152b5f70e3..785cbb09a6 100644 --- a/Marlin/src/module/motion.cpp +++ b/Marlin/src/module/motion.cpp @@ -2153,12 +2153,12 @@ void prepare_line_to_destination() { if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Home Fast: ", move_length, "mm"); do_homing_move(axis, move_length, 0.0, !use_probe_bump); - #if BOTH(HOMING_Z_WITH_PROBE, BLTOUCH) - if (axis == Z_AXIS && !bltouch.high_speed_mode) bltouch.stow(); // Intermediate STOW (in LOW SPEED MODE) - #endif - // If a second homing move is configured... if (bump) { + #if BOTH(HOMING_Z_WITH_PROBE, BLTOUCH) + if (axis == Z_AXIS && !bltouch.high_speed_mode) bltouch.stow(); // Intermediate STOW (in LOW SPEED MODE) + #endif + // Move away from the endstop by the axis HOMING_BUMP_MM if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Move Away: ", -bump, "mm"); do_homing_move(axis, -bump, TERN(HOMING_Z_WITH_PROBE, (axis == Z_AXIS ? z_probe_fast_mm_s : 0), 0), false); @@ -2209,12 +2209,12 @@ void prepare_line_to_destination() { const float rebump = bump * 2; if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Re-bump: ", rebump, "mm"); do_homing_move(axis, rebump, get_homing_bump_feedrate(axis), true); - - #if BOTH(HOMING_Z_WITH_PROBE, BLTOUCH) - if (axis == Z_AXIS) bltouch.stow(); // The final STOW - #endif } + #if BOTH(HOMING_Z_WITH_PROBE, BLTOUCH) + if (axis == Z_AXIS) bltouch.stow(); // The final STOW + #endif + #if HAS_EXTRA_ENDSTOPS const bool pos_dir = axis_home_dir > 0; #if ENABLED(X_DUAL_ENDSTOPS) From 832f769b4614c60b6088f1fde63995e26ee76dcc Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 10 Apr 2023 23:22:30 -0500 Subject: [PATCH 145/225] =?UTF-8?q?=F0=9F=93=9D=20Describe=20G34,=20spellc?= =?UTF-8?q?heck?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration.h | 8 ++++---- Marlin/Configuration_adv.h | 28 ++++++++++++++-------------- Marlin/src/gcode/calibrate/G34.cpp | 17 +++++++++++++++++ 3 files changed, 35 insertions(+), 18 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 4fa07c0871..81591597b2 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -2519,7 +2519,7 @@ #define PASSWORD_ON_STARTUP #define PASSWORD_UNLOCK_GCODE // Unlock with the M511 P command. Disable to prevent brute-force attack. #define PASSWORD_CHANGE_GCODE // Change the password with M512 P S. - //#define PASSWORD_ON_SD_PRINT_MENU // This does not prevent gcodes from running + //#define PASSWORD_ON_SD_PRINT_MENU // This does not prevent G-codes from running //#define PASSWORD_AFTER_SD_PRINT_END //#define PASSWORD_AFTER_SD_PRINT_ABORT //#include "Configuration_Secure.h" // External file with PASSWORD_DEFAULT_VALUE @@ -3268,9 +3268,9 @@ /** * TFT Font for Color_UI. Choose one of the following: * - * NOTOSANS - Default font with antialiasing. Supports Latin Extended and non-Latin characters. - * UNIFONT - Lightweight font, no antialiasing. Supports Latin Extended and non-Latin characters. - * HELVETICA - Lightweight font, no antialiasing. Supports Basic Latin (0x0020-0x007F) and Latin-1 Supplement (0x0080-0x00FF) characters only. + * NOTOSANS - Default font with anti-aliasing. Supports Latin Extended and non-Latin characters. + * UNIFONT - Lightweight font, no anti-aliasing. Supports Latin Extended and non-Latin characters. + * HELVETICA - Lightweight font, no anti-aliasing. Supports Basic Latin (0x0020-0x007F) and Latin-1 Supplement (0x0080-0x00FF) characters only. */ #define TFT_FONT NOTOSANS diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index cbc85283a3..a010480c61 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -372,7 +372,7 @@ * Thermal Protection Variance Monitor - EXPERIMENTAL * Kill the machine on a stuck temperature sensor. * - * This feature may cause some thermally-stable systems to halt. Be sure to test it throughly under + * This feature may cause some thermally-stable systems to halt. Be sure to test it thoroughly under * a variety of conditions. Disable if you get false positives. * * This feature ensures that temperature sensors are updating regularly. If sensors die or get "stuck", @@ -415,7 +415,7 @@ * You can either just add a constant compensation with the DEFAULT_Kf value * or follow the instruction below to get speed-dependent compensation. * - * Constant compensation (use only with fanspeeds of 0% and 100%) + * Constant compensation (use only with fan speeds of 0% and 100%) * --------------------------------------------------------------------- * A good starting point for the Kf-value comes from the calculation: * kf = (power_fan * eff_fan) / power_heater * 255 @@ -442,7 +442,7 @@ //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION) // The alternative definition is used for an easier configuration. - // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED. + // Just figure out Kf at full speed (255) and PID_FAN_SCALING_MIN_SPEED. // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly. #define PID_FAN_SCALING_AT_FULL_SPEED 13.0 //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf @@ -621,7 +621,7 @@ * FAST_PWM_FAN_FREQUENCY * Set this to your desired frequency. * For AVR, if left undefined this defaults to F = F_CPU/(2*255*1) - * i.e., F = 31.4kHz on 16MHz microcontrollers or F = 39.2kHz on 20MHz microcontrollers. + * i.e., F = 31.4kHz on 16MHz micro-controllers or F = 39.2kHz on 20MHz micro-controllers. * For non AVR, if left undefined this defaults to F = 1Khz. * This F value is only to protect the hardware from an absence of configuration * and not to complete it when users are not aware that the frequency must be specifically set to support the target board. @@ -960,9 +960,9 @@ * Danger: Don't activate 5V mode unless attached to a 5V-tolerant controller! * V3.0 or 3.1: Set default mode to 5V mode at Marlin startup. * If disabled, OD mode is the hard-coded default on 3.0 - * On startup, Marlin will compare its eeprom to this value. If the selected mode - * differs, a mode set eeprom write will be completed at initialization. - * Use the option below to force an eeprom write to a V3.1 probe regardless. + * On startup, Marlin will compare its EEPROM to this value. If the selected mode + * differs, a mode set EEPROM write will be completed at initialization. + * Use the option below to force an EEPROM write to a V3.1 probe regardless. */ //#define BLTOUCH_SET_5V_MODE @@ -1328,7 +1328,7 @@ //#define CALIBRATION_MEASURE_WMAX // Probing at the exact top center only works if the center is flat. If - // probing on a screwhead or hollow washer, probe near the edges. + // probing on a screw head or hollow washer, probe near the edges. //#define CALIBRATION_MEASURE_AT_TOP_EDGES // Define the pin to read during calibration @@ -1923,7 +1923,7 @@ #endif /** - * Status (Info) Screen customizations + * Status (Info) Screen customization * These options may affect code size and screen render time. * Custom status screens can forcibly override these settings. */ @@ -2176,7 +2176,7 @@ #if ENABLED(DOUBLECLICK_FOR_Z_BABYSTEPPING) #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds. // Note: Extra time may be added to mitigate controller latency. - //#define MOVE_Z_WHEN_IDLE // Jump to the move Z menu on doubleclick when printer is idle. + //#define MOVE_Z_WHEN_IDLE // Jump to the move Z menu on double-click when printer is idle. #if ENABLED(MOVE_Z_WHEN_IDLE) #define MOVE_Z_IDLE_MULTIPLICATOR 1 // Multiply 1mm by this factor for the move step size. #endif @@ -3536,7 +3536,7 @@ * Feed rates are set by the F parameter of a move command e.g. G1 X0 Y10 F6000 * Laser power would be calculated by bit shifting off 8 LSB's. In binary this is div 256. * The calculation gives us ocr values from 0 to 255, values over F65535 will be set as 255 . - * More refined power control such as compesation for accell/decell will be addressed in future releases. + * More refined power control such as compensation for accel/decel will be addressed in future releases. * * M5 I clears inline mode and set power to 0, M5 sets the power output to 0 but leaves inline mode on. */ @@ -3544,8 +3544,8 @@ /** * Enable M3 commands for laser mode inline power planner syncing. * This feature enables any M3 S-value to be injected into the block buffers while in - * CUTTER_MODE_CONTINUOUS. The option allows M3 laser power to be commited without waiting - * for a planner syncronization + * CUTTER_MODE_CONTINUOUS. The option allows M3 laser power to be committed without waiting + * for a planner synchronization */ //#define LASER_POWER_SYNC @@ -4144,7 +4144,7 @@ #define MAX7219_DEBUG_PROFILE 6 // Display the fraction of CPU time spent in profiled code on this LED matrix // row. By default idle() is profiled so this shows how "idle" the processor is. // See class CodeProfiler. - //#define MAX7219_DEBUG_MULTISTEPPING 6 // Show multistepping 1 to 128 on this LED matrix row. + //#define MAX7219_DEBUG_MULTISTEPPING 6 // Show multi-stepping 1 to 128 on this LED matrix row. #endif /** diff --git a/Marlin/src/gcode/calibrate/G34.cpp b/Marlin/src/gcode/calibrate/G34.cpp index 7ae1e7765c..9a0cb0054b 100644 --- a/Marlin/src/gcode/calibrate/G34.cpp +++ b/Marlin/src/gcode/calibrate/G34.cpp @@ -39,6 +39,23 @@ #define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE) #include "../../core/debug_out.h" +/** + * G34 - Align the ends of the X gantry. See https://youtu.be/3jAFQdTk8iw + * + * - The carriage moves to GANTRY_CALIBRATION_SAFE_POSITION, also called the “pounce” position. + * - If possible, the Z stepper current is reduced to the value specified by 'S' + * (or GANTRY_CALIBRATION_CURRENT) to prevent damage to steppers and other parts. + * The reduced current should be just high enough to move the Z axis when not blocked. + * - The Z axis is jogged past the Z limit, only as far as the specified Z distance + * (or GANTRY_CALIBRATION_EXTRA_HEIGHT) at the GANTRY_CALIBRATION_FEEDRATE. + * - The Z axis is moved back to the working area (also at GANTRY_CALIBRATION_FEEDRATE). + * - Stepper current is restored back to normal. + * - The machine is re-homed, according to GANTRY_CALIBRATION_COMMANDS_POST. + * + * Parameters: + * [S] - Current value to use for the raise move. (Default: GANTRY_CALIBRATION_CURRENT) + * [Z] - Extra distance past Z_MAX_POS to move the Z axis. (Default: GANTRY_CALIBRATION_EXTRA_HEIGHT) + */ void GcodeSuite::G34() { // Home before the alignment procedure From c37797ba2c1516d7cb010d58adcbc9f204865651 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Tue, 11 Apr 2023 06:06:17 +0000 Subject: [PATCH 146/225] [cron] Bump distribution date (2023-04-11) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 6fcb899a7b..3d66f31569 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-04-10" +//#define STRING_DISTRIBUTION_DATE "2023-04-11" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index dcff1bd9bd..b13a8fceef 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-04-10" + #define STRING_DISTRIBUTION_DATE "2023-04-11" #endif /** From c6e564885e65b9bc4fbc490e62ffb3d743eaa1f0 Mon Sep 17 00:00:00 2001 From: David Fries Date: Tue, 11 Apr 2023 18:37:54 -0500 Subject: [PATCH 147/225] =?UTF-8?q?=E2=9C=A8=20BLTOUCH=5FHS=5FEXTRA=5FCLEA?= =?UTF-8?q?RANCE=20(#25655)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/Configuration_adv.h | 11 +++++++++-- Marlin/src/feature/bltouch.h | 2 +- Marlin/src/inc/SanityCheck.h | 10 ++++++++-- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index a010480c61..17255d1f25 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -966,6 +966,9 @@ */ //#define BLTOUCH_SET_5V_MODE + // Safety: Enable voltage mode settings in the LCD menu. + //#define BLTOUCH_LCD_VOLTAGE_MENU + /** * Safety: Activate if connecting a probe with an unknown voltage mode. * V3.0: Set a probe into mode selected above at Marlin startup. Required for 5V mode on 3.0 @@ -984,8 +987,12 @@ */ //#define BLTOUCH_HS_MODE true - // Safety: Enable voltage mode settings in the LCD menu. - //#define BLTOUCH_LCD_VOLTAGE_MENU + #if ENABLED(BLTOUCH_HS_MODE) + // The probe Z offset (M851 Z) is the height at which the probe triggers. + // This must be large enough to keep the probe pin off the bed and prevent + // it from snagging on the bed clips. + #define BLTOUCH_HS_EXTRA_CLEARANCE 7 // Extra Z Clearance + #endif #endif // BLTOUCH diff --git a/Marlin/src/feature/bltouch.h b/Marlin/src/feature/bltouch.h index fa857bb96a..2ced649a4e 100644 --- a/Marlin/src/feature/bltouch.h +++ b/Marlin/src/feature/bltouch.h @@ -76,7 +76,7 @@ public: static constexpr bool high_speed_mode = false; #endif - static float z_extra_clearance() { return high_speed_mode ? 7 : 0; } + static float z_extra_clearance() { return high_speed_mode ? TERN0(BLTOUCH_HS_MODE, BLTOUCH_HS_EXTRA_CLEARANCE) : 0; } // DEPLOY and STOW are wrapped for error handling - these are used by homing and by probing static bool deploy() { return deploy_proc(); } diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 7dbd4c765d..5c594abff3 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -1895,9 +1895,15 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #endif #endif - #if ENABLED(BLTOUCH_HS_MODE) && BLTOUCH_HS_MODE == 0 - #error "BLTOUCH_HS_MODE must now be defined as true or false, indicating the default state." + #if ENABLED(BLTOUCH_HS_MODE) + #if BLTOUCH_HS_MODE == 0 + #error "BLTOUCH_HS_MODE must now be defined as true or false, indicating the default state." + #endif + #ifdef BLTOUCH_HS_EXTRA_CLEARANCE + static_assert(BLTOUCH_HS_EXTRA_CLEARANCE > 0, "BLTOUCH_HS_MODE requires a positive BLTOUCH_HS_EXTRA_CLEARANCE."); + #endif #endif + #if BLTOUCH_DELAY < 200 #error "BLTOUCH_DELAY less than 200 is unsafe and is not supported." #endif From e9f483b4801a541758fdc9d065e1b825e8c53266 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 11 Apr 2023 16:08:04 -0500 Subject: [PATCH 148/225] =?UTF-8?q?=F0=9F=93=9D=20Improve=20G30=20descript?= =?UTF-8?q?ion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/gcode/probe/G30.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/gcode/probe/G30.cpp b/Marlin/src/gcode/probe/G30.cpp index 6548105487..a17ec367df 100644 --- a/Marlin/src/gcode/probe/G30.cpp +++ b/Marlin/src/gcode/probe/G30.cpp @@ -42,7 +42,7 @@ #endif /** - * G30: Do a single Z probe at the current XY + * G30: Do a single Z probe at the given XY (default: current) * * Parameters: * From 185961f898f8c9d2cf5e3d78dcd060e7c576cf7d Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 11 Apr 2023 17:55:58 -0500 Subject: [PATCH 149/225] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Mor?= =?UTF-8?q?e=20debug=20in=20motion.*?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/module/motion.cpp | 2 ++ Marlin/src/module/motion.h | 19 +++++++------------ 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp index 785cbb09a6..ad5be12187 100644 --- a/Marlin/src/module/motion.cpp +++ b/Marlin/src/module/motion.cpp @@ -811,6 +811,7 @@ void do_blocking_move_to_x(const_float_t rx, const_feedRate_t fr_mm_s/*=0.0*/) { static float saved_feedrate_mm_s; static int16_t saved_feedrate_percentage; void remember_feedrate_and_scaling() { + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("remember_feedrate_and_scaling: fr=", feedrate_mm_s, " ", feedrate_percentage, "%"); saved_feedrate_mm_s = feedrate_mm_s; saved_feedrate_percentage = feedrate_percentage; } @@ -821,6 +822,7 @@ void remember_feedrate_scaling_off() { void restore_feedrate_and_scaling() { feedrate_mm_s = saved_feedrate_mm_s; feedrate_percentage = saved_feedrate_percentage; + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("restore_feedrate_and_scaling: fr=", feedrate_mm_s, " ", feedrate_percentage, "%"); } #if HAS_SOFTWARE_ENDSTOPS diff --git a/Marlin/src/module/motion.h b/Marlin/src/module/motion.h index adc11f54d9..cdf1d7a969 100644 --- a/Marlin/src/module/motion.h +++ b/Marlin/src/module/motion.h @@ -436,26 +436,21 @@ void set_axis_is_at_home(const AxisEnum axis); void set_axis_never_homed(const AxisEnum axis); main_axes_bits_t axes_should_home(main_axes_bits_t axes_mask=main_axes_mask); bool homing_needed_error(main_axes_bits_t axes_mask=main_axes_mask); - inline void set_axis_unhomed(const AxisEnum axis) { CBI(axes_homed, axis); } - inline void set_axis_untrusted(const AxisEnum axis) { CBI(axes_trusted, axis); } - inline void set_all_unhomed() { axes_homed = axes_trusted = 0; } - inline void set_axis_homed(const AxisEnum axis) { SBI(axes_homed, axis); } - inline void set_axis_trusted(const AxisEnum axis) { SBI(axes_trusted, axis); } - inline void set_all_homed() { axes_homed = axes_trusted = main_axes_mask; } #else constexpr main_axes_bits_t axes_homed = main_axes_mask, axes_trusted = main_axes_mask; // Zero-endstop machines are always homed and trusted inline void homeaxis(const AxisEnum axis) {} inline void set_axis_never_homed(const AxisEnum) {} inline main_axes_bits_t axes_should_home(main_axes_bits_t=main_axes_mask) { return 0; } inline bool homing_needed_error(main_axes_bits_t=main_axes_mask) { return false; } - inline void set_axis_unhomed(const AxisEnum axis) {} - inline void set_axis_untrusted(const AxisEnum axis) {} - inline void set_all_unhomed() {} - inline void set_axis_homed(const AxisEnum axis) {} - inline void set_axis_trusted(const AxisEnum axis) {} - inline void set_all_homed() {} #endif +inline void set_axis_unhomed(const AxisEnum axis) { TERN_(HAS_ENDSTOPS, CBI(axes_homed, axis)); } +inline void set_axis_untrusted(const AxisEnum axis) { TERN_(HAS_ENDSTOPS, CBI(axes_trusted, axis)); } +inline void set_all_unhomed() { TERN_(HAS_ENDSTOPS, axes_homed = axes_trusted = 0); } +inline void set_axis_homed(const AxisEnum axis) { TERN_(HAS_ENDSTOPS, SBI(axes_homed, axis)); } +inline void set_axis_trusted(const AxisEnum axis) { TERN_(HAS_ENDSTOPS, SBI(axes_trusted, axis)); } +inline void set_all_homed() { TERN_(HAS_ENDSTOPS, axes_homed = axes_trusted = main_axes_mask); } + inline bool axis_was_homed(const AxisEnum axis) { return TEST(axes_homed, axis); } inline bool axis_is_trusted(const AxisEnum axis) { return TEST(axes_trusted, axis); } inline bool axis_should_home(const AxisEnum axis) { return (axes_should_home() & _BV(axis)) != 0; } From f53217b2c5bf7d61d21ee6784ec251bc7a670eb3 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 11 Apr 2023 18:43:01 -0500 Subject: [PATCH 150/225] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Pro?= =?UTF-8?q?be=20flag=20in=20do=5Fz=5Fclearance?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp | 5 ++--- Marlin/src/module/motion.cpp | 13 ++++++++----- Marlin/src/module/motion.h | 4 ++-- Marlin/src/module/probe.cpp | 18 +++++------------- Marlin/src/module/probe.h | 1 - Marlin/src/module/temperature.cpp | 2 +- 6 files changed, 18 insertions(+), 25 deletions(-) diff --git a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp index d9205b7577..a6206b398e 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp @@ -916,15 +916,14 @@ void set_message_with_feedback(FSTR_P const fstr) { echo_and_take_a_measurement(); const float z1 = measure_point_with_encoder(); - do_blocking_move_to_z(current_position.z + SIZE_OF_LITTLE_RAISE); - planner.synchronize(); + do_z_clearance_by(SIZE_OF_LITTLE_RAISE); SERIAL_ECHOPGM("Remove shim"); LCD_MESSAGE(MSG_UBL_BC_REMOVE); echo_and_take_a_measurement(); const float z2 = measure_point_with_encoder(); - do_blocking_move_to_z(current_position.z + Z_CLEARANCE_BETWEEN_PROBES); + do_z_clearance_by(Z_CLEARANCE_BETWEEN_PROBES); const float thickness = ABS(z1 - z2); diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp index ad5be12187..d5d9ca8d34 100644 --- a/Marlin/src/module/motion.cpp +++ b/Marlin/src/module/motion.cpp @@ -792,15 +792,18 @@ void do_blocking_move_to_x(const_float_t rx, const_feedRate_t fr_mm_s/*=0.0*/) { fr_mm_s ); } - void do_z_clearance(const_float_t zclear, const bool lower_allowed/*=false*/) { - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("do_z_clearance(", zclear, ", ", lower_allowed, ")"); - const float zdest = _MIN(zclear, Z_MAX_POS); - if (zdest == current_position.z || (!lower_allowed && zdest < current_position.z)) return; + void do_z_clearance(const_float_t zclear, const bool with_probe/*=true*/, const bool lower_allowed/*=false*/) { + UNUSED(with_probe); + float zdest = zclear; + TERN_(HAS_BED_PROBE, if (with_probe && probe.offset.z < 0) zdest -= probe.offset.z); + NOMORE(zdest, Z_MAX_POS); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("do_z_clearance(", zclear, " [", current_position.z, " to ", zdest, "], ", lower_allowed, ")"); + if ((!lower_allowed && zdest < current_position.z) || zdest == current_position.z) return; do_blocking_move_to_z(zdest, TERN(HAS_BED_PROBE, z_probe_fast_mm_s, homing_feedrate(Z_AXIS))); } void do_z_clearance_by(const_float_t zclear) { if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("do_z_clearance_by(", zclear, ")"); - do_z_clearance(current_position.z + zclear); + do_z_clearance(current_position.z + zclear, false); } #endif diff --git a/Marlin/src/module/motion.h b/Marlin/src/module/motion.h index cdf1d7a969..c93b1ef205 100644 --- a/Marlin/src/module/motion.h +++ b/Marlin/src/module/motion.h @@ -403,10 +403,10 @@ void remember_feedrate_scaling_off(); void restore_feedrate_and_scaling(); #if HAS_Z_AXIS - void do_z_clearance(const_float_t zclear, const bool lower_allowed=false); + void do_z_clearance(const_float_t zclear, const bool with_probe=true, const bool lower_allowed=false); void do_z_clearance_by(const_float_t zclear); #else - inline void do_z_clearance(float, bool=false) {} + inline void do_z_clearance(float, bool=true, bool=false) {} inline void do_z_clearance_by(float) {} #endif diff --git a/Marlin/src/module/probe.cpp b/Marlin/src/module/probe.cpp index b2c1c2b8de..ff4ca58a6f 100644 --- a/Marlin/src/module/probe.cpp +++ b/Marlin/src/module/probe.cpp @@ -349,17 +349,6 @@ xyz_pos_t Probe::offset; // Initialized by settings.load() #endif // HAS_QUIET_PROBING -/** - * Raise Z to a minimum height to make room for a probe to move - */ -void Probe::do_z_raise(const float z_raise) { - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Probe::do_z_raise(", z_raise, ")"); - float z_dest = z_raise; - const float zoffs = DIFF_TERN(HAS_HOTEND_OFFSET, offset.z, hotend_offset[active_extruder].z); - if (zoffs < 0) z_dest -= zoffs; - do_z_clearance(z_dest); -} - FORCE_INLINE void probe_specific_action(const bool deploy) { DEBUG_SECTION(log_psa, "Probe::probe_specific_action", DEBUGGING(LEVELING)); #if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) @@ -522,8 +511,11 @@ bool Probe::set_deployed(const bool deploy, const bool no_return/*=false*/) { constexpr bool z_raise_wanted = true; #endif - if (z_raise_wanted) - do_z_raise(_MAX(Z_CLEARANCE_BETWEEN_PROBES, Z_CLEARANCE_DEPLOY_PROBE)); + if (z_raise_wanted) { + const float zdest = DIFF_TERN(HAS_HOTEND_OFFSET, _MAX(Z_CLEARANCE_BETWEEN_PROBES, Z_CLEARANCE_DEPLOY_PROBE), hotend_offset[active_extruder].z); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Raise Z to ", zdest); + do_z_clearance(zdest); + } #if EITHER(Z_PROBE_SLED, Z_PROBE_ALLEN_KEY) if (homing_needed_error(TERN_(Z_PROBE_SLED, _BV(X_AXIS)))) { diff --git a/Marlin/src/module/probe.h b/Marlin/src/module/probe.h index 03544690b5..4545daa31e 100644 --- a/Marlin/src/module/probe.h +++ b/Marlin/src/module/probe.h @@ -352,7 +352,6 @@ public: private: static bool probe_down_to_z(const_float_t z, const_feedRate_t fr_mm_s); - static void do_z_raise(const float z_raise); static float run_z_probe(const bool sanity_check=true); }; diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 29c3a787c5..43ef774948 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -982,7 +982,7 @@ volatile bool Temperature::raw_temps_ready = false; planner.sync_fan_speeds(fan_speed); #endif - do_z_clearance(MPC_TUNING_END_Z); + do_z_clearance(MPC_TUNING_END_Z, false); TERN_(TEMP_TUNING_MAINTAIN_FAN, adaptive_fan_slowing = true); } From 8c0ae93d2af2b55197de856529384e8a79967f92 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 11 Apr 2023 18:43:18 -0500 Subject: [PATCH 151/225] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Cla?= =?UTF-8?q?rify=20G28=20R=20/=20R0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/gcode/calibrate/G28.cpp | 35 +++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/Marlin/src/gcode/calibrate/G28.cpp b/Marlin/src/gcode/calibrate/G28.cpp index e279b90e33..b5e7a13295 100644 --- a/Marlin/src/gcode/calibrate/G28.cpp +++ b/Marlin/src/gcode/calibrate/G28.cpp @@ -408,17 +408,40 @@ void GcodeSuite::G28() { #endif #endif + // Z may home first, e.g., when homing away from the bed TERN_(HOME_Z_FIRST, if (doZ) homeaxis(Z_AXIS)); + // 'R' to specify a specific raise. 'R0' indicates no raise, e.g., for recovery.resume + // When 'R0' is used, there should already be adequate clearance, e.g., from homing Z to max. const bool seenR = parser.seenval('R'); - const float z_homing_height = seenR ? parser.value_linear_units() : Z_HOMING_HEIGHT; - if (z_homing_height && (seenR || NUM_AXIS_GANG(doX, || doY, || TERN0(Z_SAFE_HOMING, doZ), || doI, || doJ, || doK, || doU, || doV, || doW))) { - // Raise Z before homing any other axes and z is not already high enough (never lower z) - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Raise Z (before homing) by ", z_homing_height); - do_z_clearance(z_homing_height); - TERN_(BLTOUCH, bltouch.init()); + // Use raise given by 'R' or Z_HOMING_HEIGHT (above the probe trigger point) + float z_homing_height = seenR ? parser.value_linear_units() : Z_HOMING_HEIGHT; + + // Check for any lateral motion that might require clearance + const bool may_skate = seenR || NUM_AXIS_GANG(doX, || doY, || TERN0(Z_SAFE_HOMING, doZ), || doI, || doJ, || doK, || doU, || doV, || doW); + + if (seenR && z_homing_height == 0) { + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("R0 = No Z raise"); } + else { + bool with_probe = ENABLED(HOMING_Z_WITH_PROBE); + // Raise above the current Z (which should be synced in the planner) + // The "height" for Z is a coordinate. But if Z is not trusted/homed make it relative. + if (seenR || !TERN(HOME_AFTER_DEACTIVATE, axis_is_trusted, axis_was_homed)(Z_AXIS)) { + z_homing_height += current_position.z; + with_probe = false; + } + + if (may_skate) { + // Apply Z clearance before doing any lateral motion + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Raise Z before homing:"); + do_z_clearance(z_homing_height, with_probe); + } + } + + // Init BLTouch ahead of any lateral motion, even if not homing with the probe + TERN_(BLTOUCH, if (may_skate) bltouch.init()); // Diagonal move first if both are homing TERN_(QUICK_HOME, if (doX && doY) quick_home_xy()); From c599c939c1d50bcda4cd8f491ac6bd36d9c4d56f Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 11 Apr 2023 17:54:02 -0500 Subject: [PATCH 152/225] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Mod?= =?UTF-8?q?ify=20try=5Fto=5Fprobe=20sanity-checking?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/module/probe.cpp | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/Marlin/src/module/probe.cpp b/Marlin/src/module/probe.cpp index ff4ca58a6f..945ebcdca5 100644 --- a/Marlin/src/module/probe.cpp +++ b/Marlin/src/module/probe.cpp @@ -702,6 +702,10 @@ bool Probe::probe_down_to_z(const_float_t z, const_feedRate_t fr_mm_s) { * @details Used by probe_at_point to get the bed Z height at the current XY. * Leaves current_position.z at the height where the probe triggered. * + * @param sanity_check Flag to compare the probe result with the expected result + * based on the probe Z offset. If the result is too far away + * (more than 2mm too early) then consider it an error. + * * @return The Z position of the bed at the current XY or NAN on error. */ float Probe::run_z_probe(const bool sanity_check/*=true*/) { @@ -709,22 +713,24 @@ float Probe::run_z_probe(const bool sanity_check/*=true*/) { const float zoffs = SUM_TERN(HAS_HOTEND_OFFSET, -offset.z, hotend_offset[active_extruder].z); - auto try_to_probe = [&](PGM_P const plbl, const_float_t z_probe_low_point, const feedRate_t fr_mm_s, const bool scheck, const float clearance) -> bool { - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("try_to_probe(..., ", z_probe_low_point, ", ", fr_mm_s, ", ", scheck, ", ", clearance); + auto try_to_probe = [&](PGM_P const plbl, const_float_t z_probe_low_point, const feedRate_t fr_mm_s, const bool scheck) -> bool { + constexpr float error_tolerance = 2.0f; + if (DEBUGGING(LEVELING)) { + DEBUG_ECHOPGM_P(plbl); + DEBUG_ECHOLNPGM("> try_to_probe(..., ", z_probe_low_point, ", ", fr_mm_s, ", ...)"); + } // Tare the probe, if supported if (TERN0(PROBE_TARE, tare())) return true; // Do a first probe at the fast speed - const bool probe_fail = probe_down_to_z(z_probe_low_point, fr_mm_s), // No probe trigger? - early_fail = (scheck && current_position.z > zoffs + clearance); // Probe triggered too high? + const bool probe_fail = probe_down_to_z(z_probe_low_point, fr_mm_s), // No probe trigger? + early_fail = (scheck && current_position.z > zoffs + error_tolerance); // Probe triggered too high? #if ENABLED(DEBUG_LEVELING_FEATURE) if (DEBUGGING(LEVELING) && (probe_fail || early_fail)) { - DEBUG_ECHOPGM_P(plbl); - DEBUG_ECHOPGM(" Probe fail! -"); - if (probe_fail) DEBUG_ECHOPGM(" No trigger."); - if (early_fail) DEBUG_ECHOPGM(" Triggered early."); - DEBUG_EOL(); + DEBUG_ECHOPGM(" Probe fail! - "); + if (probe_fail) DEBUG_ECHOLNPGM("No trigger."); + if (early_fail) DEBUG_ECHOLNPGM("Triggered early (above ", zoffs + error_tolerance, "mm)"); } #else UNUSED(plbl); @@ -733,7 +739,7 @@ float Probe::run_z_probe(const bool sanity_check/*=true*/) { }; // Stop the probe before it goes too low to prevent damage. - // If Z isn't known then probe to -10mm. + // For known Z probe below the expected trigger point, otherwise -10mm. const float z_probe_low_point = axis_is_trusted(Z_AXIS) ? zoffs + Z_PROBE_LOW_POINT : -10.0f; if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Probe Low Point: ", z_probe_low_point); @@ -745,9 +751,7 @@ float Probe::run_z_probe(const bool sanity_check/*=true*/) { if (TERN0(PROBE_TARE, tare())) return NAN; // Do a first probe at the fast speed - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Fast Probe:"); - if (try_to_probe(PSTR("FAST"), z_probe_low_point, z_probe_fast_mm_s, - sanity_check, Z_CLEARANCE_BETWEEN_PROBES) ) return NAN; + if (try_to_probe(PSTR("FAST"), z_probe_low_point, z_probe_fast_mm_s, sanity_check)) return NAN; const float z1 = DIFF_TERN(HAS_DELTA_SENSORLESS_PROBING, current_position.z, largest_sensorless_adj); if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("1st Probe Z:", z1); @@ -787,8 +791,7 @@ float Probe::run_z_probe(const bool sanity_check/*=true*/) { // Probe downward slowly to find the bed if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Slow Probe:"); - if (try_to_probe(PSTR("SLOW"), z_probe_low_point, MMM_TO_MMS(Z_PROBE_FEEDRATE_SLOW), - sanity_check, Z_CLEARANCE_MULTI_PROBE) ) return NAN; + if (try_to_probe(PSTR("SLOW"), z_probe_low_point, MMM_TO_MMS(Z_PROBE_FEEDRATE_SLOW), sanity_check)) return NAN; TERN_(MEASURE_BACKLASH_WHEN_PROBING, backlash.measure_with_probe()); From 4e73fdd03ae4a89ba3449c9da377f2901678ea6d Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 11 Apr 2023 18:11:45 -0500 Subject: [PATCH 153/225] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Upd?= =?UTF-8?q?ate=20move=5Fz=5Fafter=5Fprobing/homing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/module/probe.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Marlin/src/module/probe.h b/Marlin/src/module/probe.h index 4545daa31e..ebae929439 100644 --- a/Marlin/src/module/probe.h +++ b/Marlin/src/module/probe.h @@ -173,12 +173,6 @@ public: #endif // !IS_KINEMATIC - static void move_z_after_probing() { - DEBUG_SECTION(mzah, "move_z_after_probing", DEBUGGING(LEVELING)); - #ifdef Z_AFTER_PROBING - do_z_clearance(Z_AFTER_PROBING, true); // Move down still permitted - #endif - } static float probe_at_point(const_float_t rx, const_float_t ry, const ProbePtRaise raise_after=PROBE_PT_NONE, const uint8_t verbose_level=0, const bool probe_relative=true, const bool sanity_check=true); static float probe_at_point(const xy_pos_t &pos, const ProbePtRaise raise_after=PROBE_PT_NONE, const uint8_t verbose_level=0, const bool probe_relative=true, const bool sanity_check=true) { return probe_at_point(pos.x, pos.y, raise_after, verbose_level, probe_relative, sanity_check); @@ -196,10 +190,17 @@ public: static void use_probing_tool(const bool=true) IF_DISABLED(DO_TOOLCHANGE_FOR_PROBING, {}); + #ifndef Z_AFTER_PROBING + #define Z_AFTER_PROBING 0 + #endif + static void move_z_after_probing(const float z=Z_AFTER_PROBING) { + DEBUG_SECTION(mzah, "move_z_after_probing", DEBUGGING(LEVELING)); + if (z != 0) do_z_clearance(z, true, true); // Move down still permitted + } static void move_z_after_homing() { DEBUG_SECTION(mzah, "move_z_after_homing", DEBUGGING(LEVELING)); - #if ALL(DWIN_LCD_PROUI, INDIVIDUAL_AXIS_HOMING_SUBMENU, MESH_BED_LEVELING) || defined(Z_AFTER_HOMING) - do_z_clearance(Z_POST_CLEARANCE, true); + #if defined(Z_AFTER_HOMING) || ALL(DWIN_LCD_PROUI, INDIVIDUAL_AXIS_HOMING_SUBMENU, MESH_BED_LEVELING) + move_z_after_probing(Z_POST_CLEARANCE); #elif HAS_BED_PROBE move_z_after_probing(); #endif From b5899a96645894af4cdc6815e8b5def1ef85a347 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 11 Apr 2023 18:13:24 -0500 Subject: [PATCH 154/225] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Use?= =?UTF-8?q?=20largest=5Fsensorless=5Fadj=20in=20DELTA=20run=5Fz=5Fprobe?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/module/probe.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/module/probe.cpp b/Marlin/src/module/probe.cpp index 945ebcdca5..ece14caac8 100644 --- a/Marlin/src/module/probe.cpp +++ b/Marlin/src/module/probe.cpp @@ -818,7 +818,7 @@ float Probe::run_z_probe(const bool sanity_check/*=true*/) { #if EXTRA_PROBING > 0 < TOTAL_PROBING - 1 #endif - ) do_z_clearance(Z_CLEARANCE_MULTI_PROBE); + ) do_z_clearance(z + (Z_CLEARANCE_MULTI_PROBE), false); #endif } From b3a3cf28d244c02f89303d09d6b5d6cbdc90dd53 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 11 Apr 2023 18:14:43 -0500 Subject: [PATCH 155/225] =?UTF-8?q?=F0=9F=9A=B8=20More=20clearance=20on=20?= =?UTF-8?q?fast=20probe=20failure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/module/probe.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Marlin/src/module/probe.cpp b/Marlin/src/module/probe.cpp index ece14caac8..7aa6595e28 100644 --- a/Marlin/src/module/probe.cpp +++ b/Marlin/src/module/probe.cpp @@ -767,7 +767,7 @@ float Probe::run_z_probe(const bool sanity_check/*=true*/) { if (current_position.z > z) { // Probe down fast. If the probe never triggered, raise for probe clearance if (!probe_down_to_z(z, z_probe_fast_mm_s)) - do_z_clearance(Z_CLEARANCE_BETWEEN_PROBES); + do_z_clearance(Z_PROBE_SAFE_CLEARANCE); } #endif @@ -886,7 +886,6 @@ float Probe::run_z_probe(const bool sanity_check/*=true*/) { #endif /** - * - Switch to PROBING_TOOL if necessary * - Move to the given XY * - Deploy the probe, if not already deployed * - Probe the bed, get the Z position From b1537135e4abaf6c0dd85aa00160f63306d8a83f Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 11 Apr 2023 18:18:37 -0500 Subject: [PATCH 156/225] =?UTF-8?q?=F0=9F=9A=B8=20BLTouch=20extra=20cleara?= =?UTF-8?q?nce=20for=20PROBE=5FPT=5FRAISE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/module/probe.cpp | 64 ++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/Marlin/src/module/probe.cpp b/Marlin/src/module/probe.cpp index 7aa6595e28..0f2fca119c 100644 --- a/Marlin/src/module/probe.cpp +++ b/Marlin/src/module/probe.cpp @@ -943,45 +943,45 @@ float Probe::probe_at_point(const_float_t rx, const_float_t ry, const ProbePtRai do_blocking_move_to(npos, feedRate_t(XY_PROBE_FEEDRATE_MM_S)); #if ENABLED(BD_SENSOR) + return current_position.z - bdl.read(); // Difference between Z-home-relative Z and sensor reading - #endif - float measured_z = NAN; - if (!deploy()) { - measured_z = run_z_probe(sanity_check) + offset.z; - TERN_(HAS_PTC, ptc.apply_compensation(measured_z)); - TERN_(X_AXIS_TWIST_COMPENSATION, measured_z += xatc.compensation(npos + offset_xy)); - } + #else // !BD_SENSOR - // Deploy succeeded and a successful measurement was done. - // Raise and/or stow the probe depending on 'raise_after' and settings. - if (!isnan(measured_z)) { - const ProbePtRaise raise_type = (TERN0(BLTOUCH, !bltouch.high_speed_mode) && raise_after == PROBE_PT_RAISE) ? PROBE_PT_STOW : raise_after; - switch (raise_type) { - default: break; - case PROBE_PT_RAISE: - do_z_clearance(Z_CLEARANCE_BETWEEN_PROBES); - break; - case PROBE_PT_STOW: case PROBE_PT_LAST_STOW: - if (stow()) measured_z = NAN; // Error on stow? - break; + float measured_z = deploy() ? NAN : run_z_probe(sanity_check) + offset.z; + + // Deploy succeeded and a successful measurement was done. + // Raise and/or stow the probe depending on 'raise_after' and settings. + if (!isnan(measured_z)) { + switch (raise_after) { + default: break; + case PROBE_PT_RAISE: + do_z_clearance(Z_PROBE_SAFE_CLEARANCE); + break; + case PROBE_PT_STOW: case PROBE_PT_LAST_STOW: + if (stow()) measured_z = NAN; // Error on stow? + break; + } } - if (verbose_level > 2) - SERIAL_ECHOLNPGM("Bed X: ", LOGICAL_X_POSITION(rx), " Y: ", LOGICAL_Y_POSITION(ry), " Z: ", measured_z); - } + // If any error occurred stow the probe and set an alert + if (isnan(measured_z)) { + stow(); + LCD_MESSAGE(MSG_LCD_PROBING_FAILED); + #if DISABLED(G29_RETRY_AND_RECOVER) + SERIAL_ERROR_MSG(STR_ERR_PROBING_FAILED); + #endif + } + else { + TERN_(HAS_PTC, ptc.apply_compensation(measured_z)); + TERN_(X_AXIS_TWIST_COMPENSATION, measured_z += xatc.compensation(npos + offset_xy)); + if (verbose_level > 2 || DEBUGGING(LEVELING)) + SERIAL_ECHOLNPGM("Bed X: ", LOGICAL_X_POSITION(rx), " Y: ", LOGICAL_Y_POSITION(ry), " Z: ", measured_z); + } - // If any error occurred stow the probe and set an alert - if (isnan(measured_z)) { - stow(); - LCD_MESSAGE(MSG_LCD_PROBING_FAILED); - #if DISABLED(G29_RETRY_AND_RECOVER) - SERIAL_ERROR_MSG(STR_ERR_PROBING_FAILED); - #endif - } - DEBUG_ECHOLNPGM("measured_z: ", measured_z); + return measured_z; - return measured_z; + #endif // !BD_SENSOR } #if HAS_Z_SERVO_PROBE From 7369a6a37b39d89ce92bcfebec74d60ecd74ff22 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Wed, 12 Apr 2023 00:22:30 +0000 Subject: [PATCH 157/225] [cron] Bump distribution date (2023-04-12) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 3d66f31569..3378da8cb0 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-04-11" +//#define STRING_DISTRIBUTION_DATE "2023-04-12" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index b13a8fceef..050196ca90 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-04-11" + #define STRING_DISTRIBUTION_DATE "2023-04-12" #endif /** From f5c7b190f6169f0a213ef4b088e9c4b5ef33b2b8 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 11 Apr 2023 23:22:36 -0500 Subject: [PATCH 158/225] =?UTF-8?q?=F0=9F=90=9B=20Fix=20BLTOUCH=5FHS=5FMOD?= =?UTF-8?q?E=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration_adv.h | 2 +- Marlin/src/feature/bltouch.cpp | 2 +- Marlin/src/feature/bltouch.h | 4 ++-- Marlin/src/gcode/probe/M401_M402.cpp | 4 ++-- Marlin/src/inc/Conditionals_adv.h | 11 ++++++++--- Marlin/src/inc/SanityCheck.h | 8 ++++---- Marlin/src/lcd/e3v2/proui/dwin.cpp | 8 +++----- Marlin/src/lcd/menu/menu_configuration.cpp | 2 +- Marlin/src/module/settings.cpp | 10 ++++------ 9 files changed, 26 insertions(+), 25 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 17255d1f25..dd96459004 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -987,7 +987,7 @@ */ //#define BLTOUCH_HS_MODE true - #if ENABLED(BLTOUCH_HS_MODE) + #ifdef BLTOUCH_HS_MODE // The probe Z offset (M851 Z) is the height at which the probe triggers. // This must be large enough to keep the probe pin off the bed and prevent // it from snagging on the bed clips. diff --git a/Marlin/src/feature/bltouch.cpp b/Marlin/src/feature/bltouch.cpp index 1c6c1eb4aa..02f76c1392 100644 --- a/Marlin/src/feature/bltouch.cpp +++ b/Marlin/src/feature/bltouch.cpp @@ -29,7 +29,7 @@ BLTouch bltouch; bool BLTouch::od_5v_mode; // Initialized by settings.load, 0 = Open Drain; 1 = 5V Drain -#ifdef BLTOUCH_HS_MODE +#if HAS_BLTOUCH_HS_MODE bool BLTouch::high_speed_mode; // Initialized by settings.load, 0 = Low Speed; 1 = High Speed #else constexpr bool BLTouch::high_speed_mode; diff --git a/Marlin/src/feature/bltouch.h b/Marlin/src/feature/bltouch.h index 2ced649a4e..0f9f2e68ba 100644 --- a/Marlin/src/feature/bltouch.h +++ b/Marlin/src/feature/bltouch.h @@ -70,13 +70,13 @@ public: static void init(const bool set_voltage=false); static bool od_5v_mode; // Initialized by settings.load, 0 = Open Drain; 1 = 5V Drain - #ifdef BLTOUCH_HS_MODE + #if HAS_BLTOUCH_HS_MODE static bool high_speed_mode; // Initialized by settings.load, 0 = Low Speed; 1 = High Speed #else static constexpr bool high_speed_mode = false; #endif - static float z_extra_clearance() { return high_speed_mode ? TERN0(BLTOUCH_HS_MODE, BLTOUCH_HS_EXTRA_CLEARANCE) : 0; } + static float z_extra_clearance() { return TERN0(HAS_BLTOUCH_HS_MODE, high_speed_mode ? BLTOUCH_HS_EXTRA_CLEARANCE : 0); } // DEPLOY and STOW are wrapped for error handling - these are used by homing and by probing static bool deploy() { return deploy_proc(); } diff --git a/Marlin/src/gcode/probe/M401_M402.cpp b/Marlin/src/gcode/probe/M401_M402.cpp index d81c04f4a0..05230e05ea 100644 --- a/Marlin/src/gcode/probe/M401_M402.cpp +++ b/Marlin/src/gcode/probe/M401_M402.cpp @@ -28,7 +28,7 @@ #include "../../module/motion.h" #include "../../module/probe.h" -#ifdef BLTOUCH_HS_MODE +#if HAS_BLTOUCH_HS_MODE #include "../../feature/bltouch.h" #endif @@ -42,7 +42,7 @@ * R Remain in place after deploying (and before activating) the probe */ void GcodeSuite::M401() { - #ifdef BLTOUCH_HS_MODE + #if HAS_BLTOUCH_HS_MODE const bool seenH = parser.seen_test('H'), seenS = parser.seen('S'); if (seenH || seenS) { diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h index 3295626722..edee5e9bd2 100644 --- a/Marlin/src/inc/Conditionals_adv.h +++ b/Marlin/src/inc/Conditionals_adv.h @@ -76,9 +76,14 @@ #endif // !defined(NUM_SERVOS) // Convenience override for a BLTouch alone -#if ENABLED(BLTOUCH) && NUM_SERVOS == 1 - #undef SERVO_DELAY - #define SERVO_DELAY { 50 } +#if ENABLED(BLTOUCH) + #ifdef BLTOUCH_HS_MODE + #define HAS_BLTOUCH_HS_MODE 1 + #endif + #if NUM_SERVOS == 1 + #undef SERVO_DELAY + #define SERVO_DELAY { 50 } + #endif #endif #if !HAS_BED_PROBE diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 5c594abff3..84118729a2 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -1895,10 +1895,10 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #endif #endif - #if ENABLED(BLTOUCH_HS_MODE) - #if BLTOUCH_HS_MODE == 0 - #error "BLTOUCH_HS_MODE must now be defined as true or false, indicating the default state." - #endif + #if HAS_BLTOUCH_HS_MODE + constexpr char hs[] = STRINGIFY(BLTOUCH_HS_MODE); + static_assert(!(strcmp(hs, "1") && strcmp(hs, "true") && strcmp(hs, "0") && strcmp(hs, "false")), \ + "BLTOUCH_HS_MODE must now be defined as true or false, indicating the default state."); #ifdef BLTOUCH_HS_EXTRA_CLEARANCE static_assert(BLTOUCH_HS_EXTRA_CLEARANCE > 0, "BLTOUCH_HS_MODE requires a positive BLTOUCH_HS_EXTRA_CLEARANCE."); #endif diff --git a/Marlin/src/lcd/e3v2/proui/dwin.cpp b/Marlin/src/lcd/e3v2/proui/dwin.cpp index adc6fca72a..af157921d5 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/proui/dwin.cpp @@ -2211,10 +2211,8 @@ void SetMoveZ() { HMI_value.axis = Z_AXIS; SetPFloatOnClick(Z_MIN_POS, Z_MAX_POS void ProbeStow() { probe.stow(); } void ProbeDeploy() { probe.deploy(); } - #if ENABLED(BLTOUCH_HS_MODE) - void SetHSMode() { - Toggle_Chkb_Line(bltouch.high_speed_mode); - } + #if HAS_BLTOUCH_HS_MODE + void SetHSMode() { Toggle_Chkb_Line(bltouch.high_speed_mode); } #endif #endif @@ -3184,7 +3182,7 @@ void Draw_Move_Menu() { MENU_ITEM(ICON_ProbeStow, MSG_MANUAL_STOW, onDrawMenuItem, ProbeStow); MENU_ITEM(ICON_ProbeDeploy, MSG_MANUAL_DEPLOY, onDrawMenuItem, ProbeDeploy); MENU_ITEM(ICON_BltouchReset, MSG_BLTOUCH_RESET, onDrawMenuItem, bltouch._reset); - #if ENABLED(BLTOUCH_HS_MODE) + #if HAS_BLTOUCH_HS_MODE EDIT_ITEM(ICON_HSMode, MSG_ENABLE_HS_MODE, onDrawChkbMenu, SetHSMode, &bltouch.high_speed_mode); #endif #endif diff --git a/Marlin/src/lcd/menu/menu_configuration.cpp b/Marlin/src/lcd/menu/menu_configuration.cpp index e50cd69f63..4dce109b42 100644 --- a/Marlin/src/lcd/menu/menu_configuration.cpp +++ b/Marlin/src/lcd/menu/menu_configuration.cpp @@ -243,7 +243,7 @@ void menu_advanced_settings(); ACTION_ITEM(MSG_BLTOUCH_DEPLOY, bltouch._deploy); ACTION_ITEM(MSG_BLTOUCH_STOW, bltouch._stow); ACTION_ITEM(MSG_BLTOUCH_SW_MODE, bltouch._set_SW_mode); - #ifdef BLTOUCH_HS_MODE + #if HAS_BLTOUCH_HS_MODE EDIT_ITEM(bool, MSG_BLTOUCH_SPEED_MODE, &bltouch.high_speed_mode); #endif #if ENABLED(BLTOUCH_LCD_VOLTAGE_MENU) diff --git a/Marlin/src/module/settings.cpp b/Marlin/src/module/settings.cpp index 0be7f965a4..ca5b940c5d 100644 --- a/Marlin/src/module/settings.cpp +++ b/Marlin/src/module/settings.cpp @@ -322,7 +322,7 @@ typedef struct SettingsDataStruct { // BLTOUCH // bool bltouch_od_5v_mode; - #ifdef BLTOUCH_HS_MODE + #if HAS_BLTOUCH_HS_MODE bool bltouch_high_speed_mode; // M401 S #endif @@ -1016,7 +1016,7 @@ void MarlinSettings::postprocess() { const bool bltouch_od_5v_mode = TERN0(BLTOUCH, bltouch.od_5v_mode); EEPROM_WRITE(bltouch_od_5v_mode); - #ifdef BLTOUCH_HS_MODE + #if HAS_BLTOUCH_HS_MODE _FIELD_TEST(bltouch_high_speed_mode); const bool bltouch_high_speed_mode = TERN0(BLTOUCH, bltouch.high_speed_mode); EEPROM_WRITE(bltouch_high_speed_mode); @@ -1976,7 +1976,7 @@ void MarlinSettings::postprocess() { #endif EEPROM_READ(bltouch_od_5v_mode); - #ifdef BLTOUCH_HS_MODE + #if HAS_BLTOUCH_HS_MODE _FIELD_TEST(bltouch_high_speed_mode); #if ENABLED(BLTOUCH) const bool &bltouch_high_speed_mode = bltouch.high_speed_mode; @@ -3075,9 +3075,7 @@ void MarlinSettings::reset() { // // BLTouch // - #ifdef BLTOUCH_HS_MODE - bltouch.high_speed_mode = ENABLED(BLTOUCH_HS_MODE); - #endif + TERN_(HAS_BLTOUCH_HS_MODE, bltouch.high_speed_mode = BLTOUCH_HS_MODE); // // Kinematic Settings (Delta, SCARA, TPARA, Polargraph...) From 0f341635582a205e56ee8007ba0c4bb4545f59cf Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 11 Apr 2023 21:26:46 -0500 Subject: [PATCH 159/225] =?UTF-8?q?=F0=9F=9A=B8=20Minor=20M43=20improvemen?= =?UTF-8?q?ts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/AVR/pinsDebug.h | 10 ++++++---- Marlin/src/gcode/config/M43.cpp | 35 ++++++++++++++++++++++++++++----- 2 files changed, 36 insertions(+), 9 deletions(-) diff --git a/Marlin/src/HAL/AVR/pinsDebug.h b/Marlin/src/HAL/AVR/pinsDebug.h index dab4e44715..b91bde182d 100644 --- a/Marlin/src/HAL/AVR/pinsDebug.h +++ b/Marlin/src/HAL/AVR/pinsDebug.h @@ -64,11 +64,13 @@ #define VALID_PIN(pin) (pin >= 0 && pin < NUM_DIGITAL_PINS ? 1 : 0) #if AVR_ATmega1284_FAMILY - #define DIGITAL_PIN_TO_ANALOG_PIN(P) int(analogInputToDigitalPin(0) - (P)) - #define IS_ANALOG(P) ((P) >= analogInputToDigitalPin(7) && (P) <= analogInputToDigitalPin(0)) + #define IS_ANALOG(P) WITHIN(P, analogInputToDigitalPin(7), analogInputToDigitalPin(0)) + #define DIGITAL_PIN_TO_ANALOG_PIN(P) int(IS_ANALOG(P) ? (P) - analogInputToDigitalPin(7) : -1) #else - #define DIGITAL_PIN_TO_ANALOG_PIN(P) int((P) - analogInputToDigitalPin(0)) - #define IS_ANALOG(P) ((P) >= analogInputToDigitalPin(0) && ((P) <= analogInputToDigitalPin(15) || (P) <= analogInputToDigitalPin(7))) + #define _ANALOG1(P) WITHIN(P, analogInputToDigitalPin(0), analogInputToDigitalPin(7)) + #define _ANALOG2(P) WITHIN(P, analogInputToDigitalPin(8), analogInputToDigitalPin(15)) + #define IS_ANALOG(P) (_ANALOG1(P) || _ANALOG2(P)) + #define DIGITAL_PIN_TO_ANALOG_PIN(P) int(_ANALOG1(P) ? (P) - analogInputToDigitalPin(0) : _ANALOG2(P) ? (P) - analogInputToDigitalPin(8) + 8 : -1) #endif #define GET_ARRAY_PIN(p) pgm_read_byte(&pin_array[p].pin) #define MULTI_NAME_PAD 26 // space needed to be pretty if not first name assigned to a pin diff --git a/Marlin/src/gcode/config/M43.cpp b/Marlin/src/gcode/config/M43.cpp index d408ded3ac..a3e837eb53 100644 --- a/Marlin/src/gcode/config/M43.cpp +++ b/Marlin/src/gcode/config/M43.cpp @@ -305,7 +305,7 @@ void GcodeSuite::M43() { // 'P' Get the range of pins to test or watch uint8_t first_pin = PARSED_PIN_INDEX('P', 0), - last_pin = parser.seenval('L') ? PARSED_PIN_INDEX('L', 0) : parser.seenval('P') ? first_pin : (NUMBER_PINS_TOTAL) - 1; + last_pin = parser.seenval('L') ? PARSED_PIN_INDEX('L', 0) : (parser.seenval('P') ? first_pin : (NUMBER_PINS_TOTAL) - 1); NOMORE(first_pin, (NUMBER_PINS_TOTAL) - 1); NOMORE(last_pin, (NUMBER_PINS_TOTAL) - 1); @@ -321,15 +321,18 @@ void GcodeSuite::M43() { // 'W' Watch until click, M108, or reset if (parser.boolval('W')) { - SERIAL_ECHOLNPGM("Watching pins"); #ifdef ARDUINO_ARCH_SAM NOLESS(first_pin, 2); // Don't hijack the UART pins #endif - uint8_t pin_state[last_pin - first_pin + 1]; + + const uint8_t pin_count = last_pin - first_pin + 1; + uint8_t pin_state[pin_count]; + bool can_watch = false; LOOP_S_LE_N(i, first_pin, last_pin) { pin_t pin = GET_PIN_MAP_PIN_M43(i); if (!VALID_PIN(pin)) continue; if (M43_NEVER_TOUCH(i) || (!ignore_protection && pin_is_protected(pin))) continue; + can_watch = true; pinMode(pin, INPUT_PULLUP); delay(1); /* @@ -340,11 +343,31 @@ void GcodeSuite::M43() { pin_state[i - first_pin] = extDigitalRead(pin); } + const bool multipin = (pin_count > 1); + + if (!can_watch) { + SERIAL_ECHOPGM("Specified pin"); + SERIAL_ECHOPGM_P(multipin ? PSTR("s are") : PSTR(" is")); + SERIAL_ECHOLNPGM(" protected. Use 'I' to override."); + return; + } + + // "Watching pin(s) # - #" + SERIAL_ECHOPGM("Watching pin"); + if (multipin) SERIAL_CHAR('s'); + SERIAL_CHAR(' '); SERIAL_ECHO(first_pin); + if (multipin) SERIAL_ECHOPGM(" - ", last_pin); + SERIAL_EOL(); + #if HAS_RESUME_CONTINUE KEEPALIVE_STATE(PAUSED_FOR_USER); wait_for_user = true; - TERN_(HOST_PROMPT_SUPPORT, hostui.prompt_do(PROMPT_USER_CONTINUE, F("M43 Wait Called"), FPSTR(CONTINUE_STR))); - TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(F("M43 Wait Called"))); + TERN_(HOST_PROMPT_SUPPORT, hostui.prompt_do(PROMPT_USER_CONTINUE, F("M43 Waiting..."), FPSTR(CONTINUE_STR))); + #if ENABLED(EXTENSIBLE_UI) + ExtUI::onUserConfirmRequired(F("M43 Waiting...")); + #else + LCD_MESSAGE(MSG_USERWAIT); + #endif #endif for (;;) { @@ -372,6 +395,8 @@ void GcodeSuite::M43() { safe_delay(200); } + + TERN_(HAS_RESUME_CONTINUE, ui.reset_status()); } else { // Report current state of selected pin(s) From cbe796e2d61af12b964545abacc35c381f1774a3 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Thu, 13 Apr 2023 00:19:21 +0000 Subject: [PATCH 160/225] [cron] Bump distribution date (2023-04-13) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 3378da8cb0..ae6921d527 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-04-12" +//#define STRING_DISTRIBUTION_DATE "2023-04-13" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 050196ca90..afa580dc40 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-04-12" + #define STRING_DISTRIBUTION_DATE "2023-04-13" #endif /** From c3f34e4eb2fb64c9e38beef6f0bdbc921e688ad4 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 11 Apr 2023 21:28:21 -0500 Subject: [PATCH 161/225] =?UTF-8?q?=F0=9F=94=A7=20Move=20FIL=5FRUNOUT=5FPI?= =?UTF-8?q?N=20for=20Chiron=20+=20GLCD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/ramps/pins_TRIGORILLA_14.h | 34 +++++++++++++++------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/Marlin/src/pins/ramps/pins_TRIGORILLA_14.h b/Marlin/src/pins/ramps/pins_TRIGORILLA_14.h index 0e6e8ee41d..9e761fd247 100644 --- a/Marlin/src/pins/ramps/pins_TRIGORILLA_14.h +++ b/Marlin/src/pins/ramps/pins_TRIGORILLA_14.h @@ -53,6 +53,23 @@ #define E0_AUTO_FAN_PIN FAN2_PIN #endif +/** + * Trigorilla Plugs (oriented with stepper plugs at the top) + * + * AUX : D42 GND 5V (Chiron Y-STOP) + * D43 GND 5V (Chiron Z-STOP) + * + * UART3 : GND D15 D14 5V + * (RX3 TX3) + * + * IIC : 12V GND D21 D20 GND 5V + * (SCL SDA) + * + * END STOPS : D19 D18 D15 D14 D2 D3 + * GND GND GND GND GND GND + * 5V 5V 5V 5V 5V 5V + */ + // // AnyCubic pin mappings // @@ -61,9 +78,6 @@ // - TRIGORILLA_MAPPING_I3MEGA // -// -// Limit Switches -// //#define ANYCUBIC_4_MAX_PRO_ENDSTOPS #if ENABLED(ANYCUBIC_4_MAX_PRO_ENDSTOPS) #define X_MAX_PIN 43 @@ -75,7 +89,7 @@ #define Z2_MIN_PIN 18 // Z- #ifndef Z_MIN_PROBE_PIN - #define Z_MIN_PROBE_PIN 2 + #define Z_MIN_PROBE_PIN 2 // X+ #endif #define CONTROLLER_FAN_PIN FAN1_PIN @@ -86,14 +100,14 @@ #endif #if ENABLED(TRIGORILLA_MAPPING_CHIRON) - #ifndef FIL_RUNOUT_PIN - #define FIL_RUNOUT_PIN 33 + #if ENABLED(ANYCUBIC_LCD_CHIRON) && !defined(FIL_RUNOUT_PIN) + #define FIL_RUNOUT_PIN 33 // Chiron LCD Adapter only #endif #define HEATER_BED_PIN MOSFET_B_PIN // HEATER1 - #else - #ifndef FIL_RUNOUT_PIN - #define FIL_RUNOUT_PIN 19 - #endif + #endif + + #ifndef FIL_RUNOUT_PIN + #define FIL_RUNOUT_PIN 19 // Z+ #endif #if EITHER(TRIGORILLA_MAPPING_CHIRON, SWAP_Z_MOTORS) From b3198ed92942c848bea66a6e41b02ec1d11471ff Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 13 Apr 2023 04:05:56 -0500 Subject: [PATCH 162/225] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20AUTOFAN=5FCASE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to #25554 --- Marlin/src/module/temperature.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 43ef774948..43bf31e0e7 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -1290,8 +1290,9 @@ int16_t Temperature::getHeaterPower(const heater_id_t heater_id) { #else #define _AUTOFAN_SPEED() EXTRUDER_AUTO_FAN_SPEED #endif - #define _AUTOFAN_CASE(N) case N: _UPDATE_AUTO_FAN(E##N, fan_on, _AUTOFAN_SPEED()); break - #define AUTOFAN_CASE(N) OPTCODE(HAS_AUTO_FAN_##N, _AUTOFAN_CASE(N)) + #define _AUTOFAN_CASE(N) case N: _UPDATE_AUTO_FAN(E##N, fan_on, _AUTOFAN_SPEED()); break; + #define _AUTOFAN_NOT(N) + #define AUTOFAN_CASE(N) TERN(HAS_AUTO_FAN_##N, _AUTOFAN_CASE, _AUTOFAN_NOT)(N) switch (f) { REPEAT(8, AUTOFAN_CASE) From c8cb618faca2ec88681dfdd1b36ab6d160036b33 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 13 Apr 2023 04:06:35 -0500 Subject: [PATCH 163/225] =?UTF-8?q?=F0=9F=94=A8=20Improve=20runout=20scrip?= =?UTF-8?q?t=20check?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buildroot/share/PlatformIO/scripts/preflight-checks.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/buildroot/share/PlatformIO/scripts/preflight-checks.py b/buildroot/share/PlatformIO/scripts/preflight-checks.py index 08856350d2..3f7c97af9d 100644 --- a/buildroot/share/PlatformIO/scripts/preflight-checks.py +++ b/buildroot/share/PlatformIO/scripts/preflight-checks.py @@ -129,8 +129,10 @@ if pioutil.is_pio_build(): # if 'FILAMENT_RUNOUT_SENSOR' in env['MARLIN_FEATURES'] and 'NUM_RUNOUT_SENSORS' in env['MARLIN_FEATURES']: if env['MARLIN_FEATURES']['NUM_RUNOUT_SENSORS'].isdigit() and int(env['MARLIN_FEATURES']['NUM_RUNOUT_SENSORS']) > 1: - if 'FILAMENT_RUNOUT_SCRIPT' in env['MARLIN_FEATURES'] and "%c" not in env['MARLIN_FEATURES']['FILAMENT_RUNOUT_SCRIPT']: - err = "ERROR: FILAMENT_RUNOUT_SCRIPT needs a %c parameter when NUM_RUNOUT_SENSORS is > 1" - raise SystemExit(err) + if 'FILAMENT_RUNOUT_SCRIPT' in env['MARLIN_FEATURES']: + frs = env['MARLIN_FEATURES']['FILAMENT_RUNOUT_SCRIPT'] + if "M600" in frs and "%c" not in frs: + err = "ERROR: FILAMENT_RUNOUT_SCRIPT needs a %c parameter (e.g., \"M600 T%c\") when NUM_RUNOUT_SENSORS is > 1" + raise SystemExit(err) sanity_check_target() From c3921bbf3f9eae586ddac773a6992e1b638cbfb2 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Fri, 14 Apr 2023 00:19:41 +0000 Subject: [PATCH 164/225] [cron] Bump distribution date (2023-04-14) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index ae6921d527..f9d7ff2988 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-04-13" +//#define STRING_DISTRIBUTION_DATE "2023-04-14" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index afa580dc40..0bd02a67e8 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-04-13" + #define STRING_DISTRIBUTION_DATE "2023-04-14" #endif /** From 161b99cb54f5d6d183877902581d3d77e8a1fa78 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 14 Apr 2023 01:08:51 -0500 Subject: [PATCH 165/225] =?UTF-8?q?=F0=9F=90=9B=20Fix=20some=20bad=20feedr?= =?UTF-8?q?ates=20(#25672)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/gcode/feature/pause/G61.cpp | 4 +--- .../extui/dgus/fysetc/DGUSScreenHandler.cpp | 6 +++--- .../extui/dgus/hiprecy/DGUSScreenHandler.cpp | 6 +++--- .../lcd/extui/dgus/mks/DGUSScreenHandler.cpp | 6 +++--- .../extui/dgus/origin/DGUSScreenHandler.cpp | 6 +++--- .../generic/move_axis_screen.cpp | 10 ++++----- .../generic/move_axis_screen.h | 8 +++---- Marlin/src/lcd/extui/ui_api.cpp | 9 ++++---- Marlin/src/lcd/menu/menu_probe_offset.cpp | 2 +- Marlin/src/lcd/menu/menu_x_twist.cpp | 2 +- Marlin/src/module/motion.cpp | 18 ++++------------ Marlin/src/module/planner.h | 11 +++++----- Marlin/src/module/tool_change.cpp | 21 +++++++++---------- Marlin/src/module/tool_change.h | 4 ++-- 14 files changed, 50 insertions(+), 63 deletions(-) diff --git a/Marlin/src/gcode/feature/pause/G61.cpp b/Marlin/src/gcode/feature/pause/G61.cpp index 889709c045..0efcfbf208 100644 --- a/Marlin/src/gcode/feature/pause/G61.cpp +++ b/Marlin/src/gcode/feature/pause/G61.cpp @@ -71,7 +71,7 @@ void GcodeSuite::G61() { if (!TEST(saved_slots[slot >> 3], slot & 0x07)) return; // Apply any given feedrate over 0.0 - feedRate_t saved_feedrate = feedrate_mm_s; + REMEMBER(saved, feedrate_mm_s); const float fr = parser.linearval('F'); if (fr > 0.0) feedrate_mm_s = MMM_TO_MMS(fr); @@ -101,8 +101,6 @@ void GcodeSuite::G61() { } #endif } - - feedrate_mm_s = saved_feedrate; } #endif // SAVED_POSITIONS diff --git a/Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.cpp index c6e000eeca..58f0ed8319 100644 --- a/Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.cpp @@ -157,7 +157,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { } #endif char axiscode; - uint16_t speed = _mf[X_AXIS]; // Default feedrate for manual moves + uint16_t speed = manual_feedrate_mm_m[X_AXIS]; // Default feedrate for manual moves switch (var.VP) { default: return; @@ -170,7 +170,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { #if HAS_Y_AXIS case VP_MOVE_Y: axiscode = 'Y'; - speed = _mf[Y_AXIS]; + speed = manual_feedrate_mm_m[Y_AXIS]; if (!ExtUI::canMove(ExtUI::axis_t::Y)) goto cannotmove; break; #endif @@ -178,7 +178,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { #if HAS_Z_AXIS case VP_MOVE_Z: axiscode = 'Z'; - speed = _mf[Z_AXIS]; + speed = manual_feedrate_mm_m[Z_AXIS]; if (!ExtUI::canMove(ExtUI::axis_t::Z)) goto cannotmove; break; #endif diff --git a/Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.cpp index ca1a64123a..ebe3e3ba8a 100644 --- a/Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.cpp @@ -157,7 +157,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { } #endif char axiscode; - uint16_t speed = _mf[X_AXIS]; // Default feedrate for manual moves + uint16_t speed = manual_feedrate_mm_m[X_AXIS]; // Default feedrate for manual moves switch (var.VP) { default: return; @@ -170,7 +170,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { #if HAS_Y_AXIS case VP_MOVE_Y: axiscode = 'Y'; - speed = _mf[Y_AXIS]; + speed = manual_feedrate_mm_m[Y_AXIS]; if (!ExtUI::canMove(ExtUI::axis_t::Y)) goto cannotmove; break; #endif @@ -178,7 +178,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { #if HAS_Z_AXIS case VP_MOVE_Z: axiscode = 'Z'; - speed = _mf[Z_AXIS]; + speed = manual_feedrate_mm_m[Z_AXIS]; if (!ExtUI::canMove(ExtUI::axis_t::Z)) goto cannotmove; break; #endif diff --git a/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp index 2dd4d0d19e..bdd5f4f018 100644 --- a/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp @@ -739,7 +739,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { return; char axiscode; - uint16_t speed = _mf[X_AXIS]; // Default feedrate for manual moves + uint16_t speed = manual_feedrate_mm_m[X_AXIS]; // Default feedrate for manual moves switch (var.VP) { // switch X Y Z or Home default: return; @@ -751,7 +751,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { #if HAS_Y_AXIS case VP_MOVE_Y: axiscode = 'Y'; - speed = _mf[Y_AXIS]; + speed = manual_feedrate_mm_m[Y_AXIS]; if (!ExtUI::canMove(ExtUI::axis_t::Y)) goto cannotmove; break; #endif @@ -759,7 +759,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { #if HAS_Z_AXIS case VP_MOVE_Z: axiscode = 'Z'; - speed = _mf[Z_AXIS]; + speed = manual_feedrate_mm_m[Z_AXIS]; if (!ExtUI::canMove(ExtUI::axis_t::Z)) goto cannotmove; break; #endif diff --git a/Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.cpp index 22fdd80fc9..edf9a5ca82 100644 --- a/Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.cpp @@ -157,7 +157,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { } #endif char axiscode; - uint16_t speed = _mf[X_AXIS]; // Default feedrate for manual moves + uint16_t speed = manual_feedrate_mm_m[X_AXIS]; // Default feedrate for manual moves switch (var.VP) { default: return; @@ -170,7 +170,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { #if HAS_Y_AXIS case VP_MOVE_Y: axiscode = 'Y'; - speed = _mf[Y_AXIS]; + speed = manual_feedrate_mm_m[Y_AXIS]; if (!ExtUI::canMove(ExtUI::axis_t::Y)) goto cannotmove; break; #endif @@ -178,7 +178,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { #if HAS_Z_AXIS case VP_MOVE_Z: axiscode = 'Z'; - speed = _mf[Z_AXIS]; + speed = manual_feedrate_mm_m[Z_AXIS]; if (!ExtUI::canMove(ExtUI::axis_t::Z)) goto cannotmove; break; #endif diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/move_axis_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/move_axis_screen.cpp index c3927c21a7..c15ff1173f 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/move_axis_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/move_axis_screen.cpp @@ -72,7 +72,7 @@ void MoveAxisScreen::onRedraw(draw_mode_t what) { w.increments(); } -bool BaseMoveAxisScreen::onTouchHeld(uint8_t tag) { +bool BaseMoveAxisScreen::onTouchHeld(const uint8_t tag) { #define UI_INCREMENT_AXIS(axis) setManualFeedrate(axis, increment); UI_INCREMENT(AxisPosition_mm, axis); #define UI_DECREMENT_AXIS(axis) setManualFeedrate(axis, increment); UI_DECREMENT(AxisPosition_mm, axis); const float increment = getIncrement(); @@ -120,20 +120,20 @@ void BaseMoveAxisScreen::raiseZtoTop() { setAxisPosition_mm(Z_MAX_POS - 5, Z, homing_feedrate.z); } -float BaseMoveAxisScreen::getManualFeedrate(uint8_t axis, float increment_mm) { +float BaseMoveAxisScreen::getManualFeedrate(const uint8_t axis, const_float_t increment_mm) { // Compute feedrate so that the tool lags the adjuster when it is // being held down, this allows enough margin for the planner to // connect segments and even out the motion. constexpr xyze_feedrate_t max_manual_feedrate = MANUAL_FEEDRATE; - return min(max_manual_feedrate[axis] / 60.0f, ABS(increment_mm * (TOUCH_REPEATS_PER_SECOND) * 0.80f)); + return min(MMM_TO_MMS(max_manual_feedrate[axis]), ABS(increment_mm * (TOUCH_REPEATS_PER_SECOND) * 0.80f)); } -void BaseMoveAxisScreen::setManualFeedrate(ExtUI::axis_t axis, float increment_mm) { +void BaseMoveAxisScreen::setManualFeedrate(const ExtUI::axis_t axis, const_float_t increment_mm) { ExtUI::setFeedrate_mm_s(getManualFeedrate(X_AXIS + (axis - ExtUI::X), increment_mm)); } #if HAS_EXTRUDERS - void BaseMoveAxisScreen::setManualFeedrate(ExtUI::extruder_t, float increment_mm) { + void BaseMoveAxisScreen::setManualFeedrate(const ExtUI::extruder_t, const_float_t increment_mm) { ExtUI::setFeedrate_mm_s(getManualFeedrate(E_AXIS, increment_mm)); } #endif diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/move_axis_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/move_axis_screen.h index 16723cfc13..b26254c4df 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/move_axis_screen.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/move_axis_screen.h @@ -32,14 +32,14 @@ struct MoveAxisScreenData { class BaseMoveAxisScreen : public BaseNumericAdjustmentScreen { private: - static float getManualFeedrate(uint8_t axis, float increment_mm); + static float getManualFeedrate(const uint8_t axis, const_float_t increment_mm); public: static void raiseZtoTop(); - static void setManualFeedrate(ExtUI::axis_t, float increment_mm); - static void setManualFeedrate(ExtUI::extruder_t, float increment_mm); + static void setManualFeedrate(const ExtUI::axis_t, const_float_t increment_mm); + static void setManualFeedrate(const ExtUI::extruder_t, const_float_t increment_mm); static void onEntry(); - static bool onTouchHeld(uint8_t tag); + static bool onTouchHeld(const uint8_t tag); }; class MoveAxisScreen : public BaseMoveAxisScreen, public CachedScreen { diff --git a/Marlin/src/lcd/extui/ui_api.cpp b/Marlin/src/lcd/extui/ui_api.cpp index 7e47bef9c1..2b1f05d2bc 100644 --- a/Marlin/src/lcd/extui/ui_api.cpp +++ b/Marlin/src/lcd/extui/ui_api.cpp @@ -932,22 +932,21 @@ namespace ExtUI { void moveToMeshPoint(const xy_uint8_t &pos, const_float_t z) { #if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) - const feedRate_t old_feedrate = feedrate_mm_s; + REMEMBER(fr, feedrate_mm_s); const float x_target = MESH_MIN_X + pos.x * (MESH_X_DIST), y_target = MESH_MIN_Y + pos.y * (MESH_Y_DIST); if (x_target != current_position.x || y_target != current_position.y) { // If moving across bed, raise nozzle to safe height over bed - feedrate_mm_s = Z_PROBE_FEEDRATE_FAST; + feedrate_mm_s = MMM_TO_MMS(Z_PROBE_FEEDRATE_FAST); destination.set(current_position.x, current_position.y, Z_CLEARANCE_BETWEEN_PROBES); prepare_line_to_destination(); - feedrate_mm_s = XY_PROBE_FEEDRATE; + feedrate_mm_s = XY_PROBE_FEEDRATE_MM_S; destination.set(x_target, y_target); prepare_line_to_destination(); } - feedrate_mm_s = Z_PROBE_FEEDRATE_FAST; + feedrate_mm_s = MMM_TO_MMS(Z_PROBE_FEEDRATE_FAST); destination.z = z; prepare_line_to_destination(); - feedrate_mm_s = old_feedrate; #else UNUSED(pos); UNUSED(z); diff --git a/Marlin/src/lcd/menu/menu_probe_offset.cpp b/Marlin/src/lcd/menu/menu_probe_offset.cpp index 428052bf2a..34172de458 100644 --- a/Marlin/src/lcd/menu/menu_probe_offset.cpp +++ b/Marlin/src/lcd/menu/menu_probe_offset.cpp @@ -119,7 +119,7 @@ void prepare_for_probe_offset_wizard() { // Move Nozzle to Probing/Homing Position ui.wait_for_move = true; current_position += probe.offset_xy; - line_to_current_position(MMM_TO_MMS(XY_PROBE_FEEDRATE)); + line_to_current_position(XY_PROBE_FEEDRATE_MM_S); ui.synchronize(GET_TEXT_F(MSG_PROBE_WIZARD_MOVING)); ui.wait_for_move = false; diff --git a/Marlin/src/lcd/menu/menu_x_twist.cpp b/Marlin/src/lcd/menu/menu_x_twist.cpp index d1850a1eb2..86ef3be7b9 100644 --- a/Marlin/src/lcd/menu/menu_x_twist.cpp +++ b/Marlin/src/lcd/menu/menu_x_twist.cpp @@ -141,7 +141,7 @@ void xatc_wizard_goto_next_point() { xatc.set_enabled(true); current_position += probe.offset_xy; current_position.z = (XATC_START_Z) - probe.offset.z + measured_z; - line_to_current_position(MMM_TO_MMS(XY_PROBE_FEEDRATE)); + line_to_current_position(XY_PROBE_FEEDRATE_MM_S); ui.wait_for_move = false; } else diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp index d5d9ca8d34..219f219e59 100644 --- a/Marlin/src/module/motion.cpp +++ b/Marlin/src/module/motion.cpp @@ -525,25 +525,15 @@ void line_to_current_position(const_feedRate_t fr_mm_s/*=feedrate_mm_s*/) { void _internal_move_to_destination(const_feedRate_t fr_mm_s/*=0.0f*/ OPTARG(IS_KINEMATIC, const bool is_fast/*=false*/) ) { - const feedRate_t old_feedrate = feedrate_mm_s; + REMEMBER(fr, feedrate_mm_s); + REMEMBER(pct, feedrate_percentage, 100); + TERN_(HAS_EXTRUDERS, REMEMBER(fac, planner.e_factor[active_extruder], 1.0f)); + if (fr_mm_s) feedrate_mm_s = fr_mm_s; - - const uint16_t old_pct = feedrate_percentage; - feedrate_percentage = 100; - - #if HAS_EXTRUDERS - const float old_fac = planner.e_factor[active_extruder]; - planner.e_factor[active_extruder] = 1.0f; - #endif - if (TERN0(IS_KINEMATIC, is_fast)) TERN(IS_KINEMATIC, prepare_fast_move_to_destination(), NOOP); else prepare_line_to_destination(); - - feedrate_mm_s = old_feedrate; - feedrate_percentage = old_pct; - TERN_(HAS_EXTRUDERS, planner.e_factor[active_extruder] = old_fac); } /** diff --git a/Marlin/src/module/planner.h b/Marlin/src/module/planner.h index e2d1d6739c..030c1b31db 100644 --- a/Marlin/src/module/planner.h +++ b/Marlin/src/module/planner.h @@ -80,11 +80,12 @@ // Feedrate for manual moves #ifdef MANUAL_FEEDRATE - constexpr xyze_feedrate_t _mf = MANUAL_FEEDRATE, - manual_feedrate_mm_s = LOGICAL_AXIS_ARRAY(_mf.e / 60.0f, - _mf.x / 60.0f, _mf.y / 60.0f, _mf.z / 60.0f, - _mf.i / 60.0f, _mf.j / 60.0f, _mf.k / 60.0f, - _mf.u / 60.0f, _mf.v / 60.0f, _mf.w / 60.0f); + constexpr xyze_feedrate_t manual_feedrate_mm_m = MANUAL_FEEDRATE, + manual_feedrate_mm_s = LOGICAL_AXIS_ARRAY( + MMM_TO_MMS(manual_feedrate_mm_m.e), + MMM_TO_MMS(manual_feedrate_mm_m.x), MMM_TO_MMS(manual_feedrate_mm_m.y), MMM_TO_MMS(manual_feedrate_mm_m.z), + MMM_TO_MMS(manual_feedrate_mm_m.i), MMM_TO_MMS(manual_feedrate_mm_m.j), MMM_TO_MMS(manual_feedrate_mm_m.k), + MMM_TO_MMS(manual_feedrate_mm_m.u), MMM_TO_MMS(manual_feedrate_mm_m.v), MMM_TO_MMS(manual_feedrate_mm_m.w)); #endif #if IS_KINEMATIC && HAS_JUNCTION_DEVIATION diff --git a/Marlin/src/module/tool_change.cpp b/Marlin/src/module/tool_change.cpp index 43a50505ef..a91f6f742d 100644 --- a/Marlin/src/module/tool_change.cpp +++ b/Marlin/src/module/tool_change.cpp @@ -957,13 +957,12 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0. * If cooling fan is enabled, calls filament_swap_cooling(); */ void extruder_prime() { - if (too_cold(active_extruder)) { FS_DEBUG("Priming Aborted - Nozzle Too Cold!"); return; // Extruder too cold to prime } - float fr = toolchange_settings.unretract_speed; // Set default speed for unretract + feedRate_t fr_mm_s = MMM_TO_MMS(toolchange_settings.unretract_speed); // Set default speed for unretract #if ENABLED(TOOLCHANGE_FS_SLOW_FIRST_PRIME) /** @@ -973,18 +972,19 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0. if (!extruder_did_first_prime[active_extruder]) { extruder_did_first_prime.set(active_extruder); // Log first prime complete // new nozzle - prime at user-specified speed. - FS_DEBUG("First time priming T", active_extruder, ", reducing speed from ", MMM_TO_MMS(fr), " to ", MMM_TO_MMS(toolchange_settings.prime_speed), "mm/s"); - fr = toolchange_settings.prime_speed; - unscaled_e_move(0, MMM_TO_MMS(fr)); // Init planner with 0 length move + const feedRate_t prime_mm_s = MMM_TO_MMS(toolchange_settings.prime_speed); + FS_DEBUG("First time priming T", active_extruder, ", reducing speed from ", fr_mm_s, " to ", prime_mm_s, "mm/s"); + fr_mm_s = prime_mm_s; + unscaled_e_move(0, fr_mm_s); // Init planner with 0 length move } #endif // Calculate and perform the priming distance if (toolchange_settings.extra_prime >= 0) { // Positive extra_prime value - // - Return filament at speed (fr) then extra_prime at prime speed - FS_DEBUG("Loading Filament for T", active_extruder, " | Distance: ", toolchange_settings.swap_length, " | Speed: ", MMM_TO_MMS(fr), "mm/s"); - unscaled_e_move(toolchange_settings.swap_length, MMM_TO_MMS(fr)); // Prime (Unretract) filament by extruding equal to Swap Length (Unretract) + // - Return filament at speed (fr_mm_s) then extra_prime at prime speed + FS_DEBUG("Loading Filament for T", active_extruder, " | Distance: ", toolchange_settings.swap_length, " | Speed: ", fr_mm_s, "mm/s"); + unscaled_e_move(toolchange_settings.swap_length, fr_mm_s); // Prime (Unretract) filament by extruding equal to Swap Length (Unretract) if (toolchange_settings.extra_prime > 0) { FS_DEBUG("Performing Extra Priming for T", active_extruder, " | Distance: ", toolchange_settings.extra_prime, " | Speed: ", MMM_TO_MMS(toolchange_settings.prime_speed), "mm/s"); @@ -996,8 +996,8 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0. // - Unretract distance (swap length) is reduced by the value of extra_prime const float eswap = toolchange_settings.swap_length + toolchange_settings.extra_prime; FS_DEBUG("Negative ExtraPrime value - Swap Return Length has been reduced from ", toolchange_settings.swap_length, " to ", eswap); - FS_DEBUG("Loading Filament for T", active_extruder, " | Distance: ", eswap, " | Speed: ", MMM_TO_MMS(fr), "mm/s"); - unscaled_e_move(eswap, MMM_TO_MMS(fr)); + FS_DEBUG("Loading Filament for T", active_extruder, " | Distance: ", eswap, " | Speed: ", fr_mm_s, "mm/s"); + unscaled_e_move(eswap, fr_mm_s); } extruder_was_primed.set(active_extruder); // Log that this extruder has been primed @@ -1010,7 +1010,6 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0. // Cool down with fan filament_swap_cooling(); - } /** diff --git a/Marlin/src/module/tool_change.h b/Marlin/src/module/tool_change.h index ff456485e2..5f03a5495e 100644 --- a/Marlin/src/module/tool_change.h +++ b/Marlin/src/module/tool_change.h @@ -34,8 +34,8 @@ float extra_resume; // M217 B int16_t prime_speed; // M217 P int16_t wipe_retract; // M217 G - int16_t retract_speed; // M217 R - int16_t unretract_speed; // M217 U + int16_t retract_speed; // M217 R (mm/m) + int16_t unretract_speed; // M217 U (mm/m) uint8_t fan_speed; // M217 F uint8_t fan_time; // M217 D #endif From efc725863ab76cfd32fc8bb136aec7b6d884cef0 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 14 Apr 2023 17:14:04 -0500 Subject: [PATCH 166/225] =?UTF-8?q?=F0=9F=94=A7=20Edge=20Stepping=20sanity?= =?UTF-8?q?-check=20(#25674)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/Conditionals_adv.h | 3 +++ Marlin/src/inc/SanityCheck.h | 34 ++++++++++++++++++++++++++++ Marlin/src/module/stepper/trinamic.h | 2 -- 3 files changed, 37 insertions(+), 2 deletions(-) diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h index edee5e9bd2..3a3daa84ac 100644 --- a/Marlin/src/inc/Conditionals_adv.h +++ b/Marlin/src/inc/Conditionals_adv.h @@ -1133,6 +1133,9 @@ #endif #endif +// Test for edge stepping on any axis +#define AXIS_HAS_DEDGE(A) (ENABLED(EDGE_STEPPING) && AXIS_IS_TMC(A)) + #if ENABLED(DIRECT_STEPPING) #ifndef STEPPER_PAGES #define STEPPER_PAGES 16 diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 84118729a2..30b5963e44 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -4313,6 +4313,40 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive."); #error "MONITOR_DRIVER_STATUS and SDSUPPORT cannot be used together on boards with shared SPI." #endif +// Although it just toggles STEP, EDGE_STEPPING requires HIGH state for logic +#if ENABLED(EDGE_STEPPING) + #if AXIS_HAS_DEDGE(X) && STEP_STATE_X != HIGH + #error "STEP_STATE_X must be HIGH for EDGE_STEPPING." + #endif + #if AXIS_HAS_DEDGE(Y) && STEP_STATE_Y != HIGH + #error "STEP_STATE_Y must be HIGH for EDGE_STEPPING." + #endif + #if AXIS_HAS_DEDGE(Z) && STEP_STATE_Z != HIGH + #error "STEP_STATE_Z must be HIGH for EDGE_STEPPING." + #endif + #if AXIS_HAS_DEDGE(I) && STEP_STATE_I != HIGH + #error "STEP_STATE_I must be HIGH for EDGE_STEPPING." + #endif + #if AXIS_HAS_DEDGE(J) && STEP_STATE_J != HIGH + #error "STEP_STATE_J must be HIGH for EDGE_STEPPING." + #endif + #if AXIS_HAS_DEDGE(K) && STEP_STATE_K != HIGH + #error "STEP_STATE_K must be HIGH for EDGE_STEPPING." + #endif + #if AXIS_HAS_DEDGE(U) && STEP_STATE_U != HIGH + #error "STEP_STATE_U must be HIGH for EDGE_STEPPING." + #endif + #if AXIS_HAS_DEDGE(V) && STEP_STATE_V != HIGH + #error "STEP_STATE_V must be HIGH for EDGE_STEPPING." + #endif + #if AXIS_HAS_DEDGE(W) && STEP_STATE_W != HIGH + #error "STEP_STATE_W must be HIGH for EDGE_STEPPING." + #endif + #if AXIS_HAS_DEDGE(E0) && STEP_STATE_E != HIGH + #error "STEP_STATE_E must be HIGH for EDGE_STEPPING." + #endif +#endif + // G60/G61 Position Save #if SAVED_POSITIONS > 256 #error "SAVED_POSITIONS must be an integer from 0 to 256." diff --git a/Marlin/src/module/stepper/trinamic.h b/Marlin/src/module/stepper/trinamic.h index 3705543c99..88c0686fc3 100644 --- a/Marlin/src/module/stepper/trinamic.h +++ b/Marlin/src/module/stepper/trinamic.h @@ -115,8 +115,6 @@ void restore_trinamic_drivers(); void reset_trinamic_drivers(); -#define AXIS_HAS_DEDGE(A) (AXIS_IS_TMC(A) && ENABLED(EDGE_STEPPING)) - // X Stepper #if AXIS_IS_TMC(X) extern TMC_CLASS(X, X) stepperX; From b44d21c595c5266e2590fc99712b107f7cb19067 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sat, 15 Apr 2023 00:21:50 +0000 Subject: [PATCH 167/225] [cron] Bump distribution date (2023-04-15) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index f9d7ff2988..11ce41f42a 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-04-14" +//#define STRING_DISTRIBUTION_DATE "2023-04-15" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 0bd02a67e8..c3c89a1398 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-04-14" + #define STRING_DISTRIBUTION_DATE "2023-04-15" #endif /** From 756fd1b9acc6238ff677513cfaa3da2da7aa6fa4 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 14 Apr 2023 22:22:07 -0500 Subject: [PATCH 168/225] =?UTF-8?q?=F0=9F=94=A7=20Trigorilla=20/=20Chiron?= =?UTF-8?q?=20updates?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to c3f34e4e --- Marlin/src/pins/ramps/pins_RAMPS.h | 41 ++++++----- Marlin/src/pins/ramps/pins_TRIGORILLA_14.h | 80 +++++++++++----------- 2 files changed, 65 insertions(+), 56 deletions(-) diff --git a/Marlin/src/pins/ramps/pins_RAMPS.h b/Marlin/src/pins/ramps/pins_RAMPS.h index 4541aefacb..0334da2da3 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS.h +++ b/Marlin/src/pins/ramps/pins_RAMPS.h @@ -97,10 +97,10 @@ #define Z_MAX_PIN -1 #endif #ifndef I_STOP_PIN - #define I_STOP_PIN 18 + #define I_STOP_PIN 18 // Z- #endif #ifndef J_STOP_PIN - #define J_STOP_PIN 19 + #define J_STOP_PIN 19 // Z+ #endif #endif @@ -109,26 +109,26 @@ // #ifndef X_STOP_PIN #ifndef X_MIN_PIN - #define X_MIN_PIN 3 + #define X_MIN_PIN 3 // X- #endif #ifndef X_MAX_PIN - #define X_MAX_PIN 2 + #define X_MAX_PIN 2 // X+ #endif #endif #ifndef Y_STOP_PIN #ifndef Y_MIN_PIN - #define Y_MIN_PIN 14 + #define Y_MIN_PIN 14 // Y- #endif #ifndef Y_MAX_PIN - #define Y_MAX_PIN 15 + #define Y_MAX_PIN 15 // Y+ #endif #endif #ifndef Z_STOP_PIN #ifndef Z_MIN_PIN - #define Z_MIN_PIN 18 + #define Z_MIN_PIN 18 // Z- #endif #ifndef Z_MAX_PIN - #define Z_MAX_PIN 19 + #define Z_MAX_PIN 19 // Z+ #endif #endif @@ -687,8 +687,6 @@ #if IS_RRD_SC - #define BEEPER_PIN EXP1_01_PIN - #if ENABLED(CR10_STOCKDISPLAY) #define BTN_EN1 EXP1_03_PIN #define BTN_EN2 EXP1_05_PIN @@ -743,7 +741,9 @@ #define DOGLCD_A0 AUX2_07_PIN #define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 - #define BEEPER_PIN EXP2_05_PIN + #ifndef BEEPER_PIN + #define BEEPER_PIN EXP2_05_PIN + #endif #define STAT_LED_RED_PIN AUX4_03_PIN #define STAT_LED_BLUE_PIN EXP1_02_PIN @@ -761,7 +761,9 @@ #define DOGLCD_CS EXP1_08_PIN #define DOGLCD_A0 EXP1_07_PIN - #define BEEPER_PIN EXP1_05_PIN + #ifndef BEEPER_PIN + #define BEEPER_PIN EXP1_05_PIN + #endif #define LCD_BACKLIGHT_PIN EXP2_05_PIN #define BTN_EN1 EXP1_02_PIN @@ -776,7 +778,6 @@ #elif EITHER(MKS_MINI_12864, FYSETC_MINI_12864) - #define BEEPER_PIN EXP1_01_PIN #define BTN_ENC EXP1_02_PIN #ifndef SD_DETECT_PIN #define SD_DETECT_PIN EXP2_07_PIN @@ -830,7 +831,9 @@ #elif ENABLED(MINIPANEL) - #define BEEPER_PIN AUX2_08_PIN + #ifndef BEEPER_PIN + #define BEEPER_PIN AUX2_08_PIN + #endif #define LCD_BACKLIGHT_PIN AUX2_10_PIN #define DOGLCD_A0 AUX2_07_PIN @@ -855,8 +858,6 @@ #elif ENABLED(G3D_PANEL) - #define BEEPER_PIN EXP1_01_PIN - #ifndef SD_DETECT_PIN #define SD_DETECT_PIN EXP2_07_PIN #endif @@ -874,7 +875,9 @@ #else - #define BEEPER_PIN EXP2_05_PIN + #ifndef BEEPER_PIN + #define BEEPER_PIN EXP2_05_PIN + #endif #if ENABLED(PANEL_ONE) // Buttons connect directly to AUX-2 #define BTN_EN1 AUX2_03_PIN @@ -889,6 +892,10 @@ #endif #endif // IS_NEWPANEL + #ifndef BEEPER_PIN + #define BEEPER_PIN EXP1_01_PIN // Most common mapping + #endif + #endif // HAS_WIRED_LCD && !LCD_PINS_DEFINED #if IS_RRW_KEYPAD && !HAS_ADC_BUTTONS diff --git a/Marlin/src/pins/ramps/pins_TRIGORILLA_14.h b/Marlin/src/pins/ramps/pins_TRIGORILLA_14.h index 9e761fd247..4399014c48 100644 --- a/Marlin/src/pins/ramps/pins_TRIGORILLA_14.h +++ b/Marlin/src/pins/ramps/pins_TRIGORILLA_14.h @@ -56,6 +56,10 @@ /** * Trigorilla Plugs (oriented with stepper plugs at the top) * + * SENSORS : GND GND GND GND + * A12 A15 A14 A13 + * (D66 D69 D68 D67) + * * AUX : D42 GND 5V (Chiron Y-STOP) * D43 GND 5V (Chiron Z-STOP) * @@ -70,6 +74,34 @@ * 5V 5V 5V 5V 5V 5V */ +/** Expansion Headers + * ------ ------ + * 37 | 1 2 | 35 (MISO) 50 | 1 2 | 52 (SCK) + * 17 | 3 4 | 16 31 | 3 4 | 53 + * 23 5 6 | 25 33 5 6 | 51 (MOSI) + * 27 | 7 8 | 29 49 | 7 8 | 41 + * (GND) | 9 10 | (5V) (GND) | 9 10 | RESET + * ------ ------ + * EXP1 EXP2 + */ +#define EXP1_01_PIN 37 +#define EXP1_02_PIN 35 +#define EXP1_03_PIN 17 +#define EXP1_04_PIN 16 +#define EXP1_05_PIN 23 +#define EXP1_06_PIN 25 +#define EXP1_07_PIN 27 +#define EXP1_08_PIN 29 + +#define EXP2_01_PIN 50 // MISO +#define EXP2_02_PIN 52 // SCK +#define EXP2_03_PIN 31 +#define EXP2_04_PIN 53 +#define EXP2_05_PIN 33 +#define EXP2_06_PIN 51 // MOSI +#define EXP2_07_PIN 49 +#define EXP2_08_PIN 41 + // // AnyCubic pin mappings // @@ -80,12 +112,12 @@ //#define ANYCUBIC_4_MAX_PRO_ENDSTOPS #if ENABLED(ANYCUBIC_4_MAX_PRO_ENDSTOPS) - #define X_MAX_PIN 43 - #define Y_STOP_PIN 19 + #define X_MAX_PIN 43 // AUX (2) + #define Y_STOP_PIN 19 // Z+ #elif EITHER(TRIGORILLA_MAPPING_CHIRON, TRIGORILLA_MAPPING_I3MEGA) // Chiron uses AUX header for Y and Z endstops - #define Y_STOP_PIN 42 // AUX - #define Z_STOP_PIN 43 // AUX + #define Y_STOP_PIN 42 // AUX (1) + #define Z_STOP_PIN 43 // AUX (2) #define Z2_MIN_PIN 18 // Z- #ifndef Z_MIN_PROBE_PIN @@ -101,7 +133,7 @@ #if ENABLED(TRIGORILLA_MAPPING_CHIRON) #if ENABLED(ANYCUBIC_LCD_CHIRON) && !defined(FIL_RUNOUT_PIN) - #define FIL_RUNOUT_PIN 33 // Chiron LCD Adapter only + #define FIL_RUNOUT_PIN EXP2_05_PIN // Chiron Standard Adapter #endif #define HEATER_BED_PIN MOSFET_B_PIN // HEATER1 #endif @@ -125,8 +157,10 @@ #endif #if EITHER(ANYCUBIC_LCD_CHIRON, ANYCUBIC_LCD_I3MEGA) - #define BEEPER_PIN 31 - #define SD_DETECT_PIN 49 + #ifndef BEEPER_PIN + #define BEEPER_PIN EXP2_03_PIN // Chiron Standard Adapter + #endif + #define SD_DETECT_PIN EXP2_07_PIN // Chiron Standard Adapter #endif #if HAS_TMC_UART @@ -145,35 +179,3 @@ #endif #include "pins_RAMPS.h" - -// -// AnyCubic made the following changes to 1.1.0-RC8 -// If these are appropriate for your LCD let us know. -// -#if 0 && HAS_WIRED_LCD - - // LCD Display output pins - #if BOTH(IS_NEWPANEL, PANEL_ONE) - #undef LCD_PINS_D6 - #define LCD_PINS_D6 57 - #endif - - // LCD Display input pins - #if IS_NEWPANEL - #if EITHER(VIKI2, miniVIKI) - #undef DOGLCD_A0 - #define DOGLCD_A0 23 - #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) - #undef BEEPER_PIN - #define BEEPER_PIN 33 - #undef LCD_BACKLIGHT_PIN - #define LCD_BACKLIGHT_PIN 67 - #endif - #elif ENABLED(MINIPANEL) - #undef BEEPER_PIN - #define BEEPER_PIN 33 - #undef DOGLCD_A0 - #define DOGLCD_A0 42 - #endif - -#endif // HAS_WIRED_LCD From d77e921a1512c22670b5ccf421a186d7ce3bd815 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 14 Apr 2023 22:26:06 -0500 Subject: [PATCH 169/225] =?UTF-8?q?=E2=9C=A8=20STARTUP=5FTUNE=20option?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/MarlinCore.cpp | 5 +++++ Marlin/src/gcode/lcd/M300.cpp | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index d2a9f395b7..aaa8e0b4b4 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -1660,6 +1660,11 @@ void setup() { marlin_state = MF_RUNNING; + #if ENABLED(SPEAKER) && defined(STARTUP_TUNE) + constexpr uint16_t tune[] = STARTUP_TUNE; + for (uint8_t i = 0; i < COUNT(tune); i += 2) BUZZ(tune[i + 1], tune[i]); + #endif + SETUP_LOG("setup() completed."); TERN_(MARLIN_TEST_BUILD, runStartupTests()); diff --git a/Marlin/src/gcode/lcd/M300.cpp b/Marlin/src/gcode/lcd/M300.cpp index 76d4b96b24..7ee811f0bd 100644 --- a/Marlin/src/gcode/lcd/M300.cpp +++ b/Marlin/src/gcode/lcd/M300.cpp @@ -30,10 +30,13 @@ #include "../../libs/buzzer.h" // Buzzer, if possible /** - * M300: Play beep sound S P + * M300: Play a Tone / Add a tone to the queue + * + * S - (Hz) The frequency of the tone. 0 for silence. + * P - (ms) The duration of the tone. */ void GcodeSuite::M300() { - uint16_t const frequency = parser.ushortval('S', 260); + const uint16_t frequency = parser.ushortval('S', 260); uint16_t duration = parser.ushortval('P', 1000); // Limits the tone duration to 0-5 seconds. From cc3a355ffbc85a9908c8e7986e3453de951c2316 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sun, 16 Apr 2023 00:21:45 +0000 Subject: [PATCH 170/225] [cron] Bump distribution date (2023-04-16) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 11ce41f42a..b345bef514 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-04-15" +//#define STRING_DISTRIBUTION_DATE "2023-04-16" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index c3c89a1398..bf22ae4ded 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-04-15" + #define STRING_DISTRIBUTION_DATE "2023-04-16" #endif /** From 42c62ff84e9e5322daa61ac2e582414d0304acc8 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 15 Apr 2023 17:33:56 -0500 Subject: [PATCH 171/225] =?UTF-8?q?=E2=9C=A8=20STARTUP=5FTUNE=20configurat?= =?UTF-8?q?ion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration.h | 12 ++++++++++++ Marlin/src/MarlinCore.cpp | 5 +++-- Marlin/src/inc/SanityCheck.h | 10 ++++++++++ buildroot/tests/NUCLEO_F767ZI | 2 +- 4 files changed, 26 insertions(+), 3 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 81591597b2..9844b44e10 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -2681,6 +2681,18 @@ //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2 //#define LCD_FEEDBACK_FREQUENCY_HZ 5000 +// +// Tone queue size, used to keep beeps from blocking execution. +// Default is 4, or override here. Costs 4 bytes of SRAM per entry. +// +//#define TONE_QUEUE_LENGTH 4 + +// +// A sequence of tones to play at startup, in pairs of tone (Hz), duration (ms). +// Silence in-between tones. +// +//#define STARTUP_TUNE { 698, 300, 0, 50, 523, 50, 0, 25, 494, 50, 0, 25, 523, 100, 0, 50, 554, 300, 0, 100, 523, 300 } + //============================================================================= //======================== LCD / Controller Selection ========================= //======================== (Character-based LCDs) ========================= diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index aaa8e0b4b4..8c0f7a29e8 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -1660,9 +1660,10 @@ void setup() { marlin_state = MF_RUNNING; - #if ENABLED(SPEAKER) && defined(STARTUP_TUNE) + #ifdef STARTUP_TUNE + // Play a short startup tune before continuing. constexpr uint16_t tune[] = STARTUP_TUNE; - for (uint8_t i = 0; i < COUNT(tune); i += 2) BUZZ(tune[i + 1], tune[i]); + for (uint8_t i = 0; i < COUNT(tune) - 1; i += 2) BUZZ(tune[i + 1], tune[i]); #endif SETUP_LOG("setup() completed."); diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 30b5963e44..fd58a9c54e 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -3324,6 +3324,16 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #endif #endif +// Startup Tune requirements +#ifdef STARTUP_TUNE + #if EITHER(ANYCUBIC_LCD_CHIRON, ANYCUBIC_LCD_VYPER) + #error "STARTUP_TUNE should be disabled with ANYCUBIC_LCD_CHIRON or ANYCUBIC_LCD_VYPER." + #elif !(BOTH(HAS_BEEPER, SPEAKER) || USE_MARLINUI_BUZZER) + #error "STARTUP_TUNE requires a BEEPER_PIN with SPEAKER or USE_MARLINUI_BUZZER." + #undef STARTUP_TUNE + #endif +#endif + /** * Display Sleep is not supported by these common displays */ diff --git a/buildroot/tests/NUCLEO_F767ZI b/buildroot/tests/NUCLEO_F767ZI index 9e23246606..a331618a09 100755 --- a/buildroot/tests/NUCLEO_F767ZI +++ b/buildroot/tests/NUCLEO_F767ZI @@ -11,7 +11,7 @@ set -e # restore_configs opt_set MOTHERBOARD BOARD_NUCLEO_F767ZI SERIAL_PORT -1 X_DRIVER_TYPE TMC2209 Y_DRIVER_TYPE TMC2208 -opt_enable BLTOUCH Z_SAFE_HOMING SPEAKER SOFTWARE_DRIVER_ENABLE +opt_enable BLTOUCH Z_SAFE_HOMING REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER SPEAKER STARTUP_TUNE SOFTWARE_DRIVER_ENABLE exec_test $1 $2 "Mixed timer usage" "$3" # clean up From 92721d1bf7d3516ffa591bf7fa9b0b03099f5156 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 14 Apr 2023 17:45:45 -0500 Subject: [PATCH 172/225] =?UTF-8?q?=F0=9F=9A=B8=20"Main"=20=3D>=20"Main=20?= =?UTF-8?q?Menu"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/e3v2/creality/dwin.cpp | 2 +- .../extui/ftdi_eve_touch_ui/bioprinter/main_menu.cpp | 2 +- Marlin/src/lcd/language/language_an.h | 2 +- Marlin/src/lcd/language/language_bg.h | 2 +- Marlin/src/lcd/language/language_ca.h | 2 +- Marlin/src/lcd/language/language_cz.h | 2 +- Marlin/src/lcd/language/language_da.h | 2 +- Marlin/src/lcd/language/language_de.h | 2 +- Marlin/src/lcd/language/language_el.h | 2 +- Marlin/src/lcd/language/language_el_gr.h | 2 +- Marlin/src/lcd/language/language_en.h | 2 +- Marlin/src/lcd/language/language_es.h | 2 +- Marlin/src/lcd/language/language_eu.h | 2 +- Marlin/src/lcd/language/language_fi.h | 2 +- Marlin/src/lcd/language/language_fr.h | 2 +- Marlin/src/lcd/language/language_fr_na.h | 2 +- Marlin/src/lcd/language/language_gl.h | 2 +- Marlin/src/lcd/language/language_hr.h | 2 +- Marlin/src/lcd/language/language_hu.h | 2 +- Marlin/src/lcd/language/language_it.h | 2 +- Marlin/src/lcd/language/language_jp_kana.h | 2 +- Marlin/src/lcd/language/language_ko_KR.h | 2 +- Marlin/src/lcd/language/language_nl.h | 2 +- Marlin/src/lcd/language/language_pl.h | 2 +- Marlin/src/lcd/language/language_pt.h | 2 +- Marlin/src/lcd/language/language_pt_br.h | 2 +- Marlin/src/lcd/language/language_ro.h | 2 +- Marlin/src/lcd/language/language_ru.h | 2 +- Marlin/src/lcd/language/language_sk.h | 2 +- Marlin/src/lcd/language/language_sv.h | 2 +- Marlin/src/lcd/language/language_test.h | 12 ++++++------ Marlin/src/lcd/language/language_tr.h | 2 +- Marlin/src/lcd/language/language_uk.h | 2 +- Marlin/src/lcd/language/language_vi.h | 2 +- Marlin/src/lcd/language/language_zh_CN.h | 2 +- Marlin/src/lcd/language/language_zh_TW.h | 2 +- Marlin/src/lcd/menu/menu_backlash.cpp | 2 +- Marlin/src/lcd/menu/menu_cancelobject.cpp | 2 +- Marlin/src/lcd/menu/menu_configuration.cpp | 4 ++-- Marlin/src/lcd/menu/menu_delta_calibrate.cpp | 2 +- Marlin/src/lcd/menu/menu_filament.cpp | 2 +- Marlin/src/lcd/menu/menu_game.cpp | 2 +- Marlin/src/lcd/menu/menu_info.cpp | 2 +- Marlin/src/lcd/menu/menu_language.cpp | 2 +- Marlin/src/lcd/menu/menu_led.cpp | 2 +- Marlin/src/lcd/menu/menu_main.cpp | 2 +- Marlin/src/lcd/menu/menu_media.cpp | 4 ++-- Marlin/src/lcd/menu/menu_mixer.cpp | 2 +- Marlin/src/lcd/menu/menu_mmu2.cpp | 2 +- Marlin/src/lcd/menu/menu_motion.cpp | 2 +- Marlin/src/lcd/menu/menu_power_monitor.cpp | 2 +- Marlin/src/lcd/menu/menu_spindle_laser.cpp | 2 +- Marlin/src/lcd/menu/menu_temperature.cpp | 4 ++-- Marlin/src/lcd/menu/menu_tune.cpp | 2 +- 54 files changed, 62 insertions(+), 62 deletions(-) diff --git a/Marlin/src/lcd/e3v2/creality/dwin.cpp b/Marlin/src/lcd/e3v2/creality/dwin.cpp index 02bfa624fa..66baff1611 100644 --- a/Marlin/src/lcd/e3v2/creality/dwin.cpp +++ b/Marlin/src/lcd/e3v2/creality/dwin.cpp @@ -1273,7 +1273,7 @@ void Goto_MainMenu() { DWIN_Frame_TitleCopy(2, 2, 26, 13); // "Home" etc else { #ifdef USE_STRING_HEADINGS - Draw_Title(GET_TEXT_F(MSG_MAIN)); + Draw_Title(GET_TEXT_F(MSG_MAIN_MENU)); #else DWIN_Frame_TitleCopy(0, 2, 40, 11); // "Home" #endif diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/main_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/main_menu.cpp index edae2cb042..8de81a98ae 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/main_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/main_menu.cpp @@ -43,7 +43,7 @@ void MainMenu::onRedraw(draw_mode_t what) { if (what & FOREGROUND) { CommandProcessor cmd; cmd.cmd(COLOR_RGB(bg_text_enabled)) - .font(font_large).text( BTN_POS(1,1), BTN_SIZE(2,1), GET_TEXT_F(MSG_MAIN)) + .font(font_large).text( BTN_POS(1,1), BTN_SIZE(2,1), GET_TEXT_F(MSG_MAIN_MENU)) .colors(normal_btn) .font(font_medium) .tag(2).button(BTN_POS(1,2), BTN_SIZE(2,1), GET_TEXT_F(MSG_MOVE_TO_HOME)) diff --git a/Marlin/src/lcd/language/language_an.h b/Marlin/src/lcd/language/language_an.h index a7da7c6e96..7d6b6de33b 100644 --- a/Marlin/src/lcd/language/language_an.h +++ b/Marlin/src/lcd/language/language_an.h @@ -41,7 +41,7 @@ namespace Language_an { LSTR MSG_MEDIA_INSERTED = _UxGT("Tarcheta mesa"); LSTR MSG_MEDIA_REMOVED = _UxGT("Tarcheta sacada"); LSTR MSG_LCD_ENDSTOPS = _UxGT("Endstops"); // Max length 8 characters - LSTR MSG_MAIN = _UxGT("Menu prencipal"); + LSTR MSG_MAIN_MENU = _UxGT("Menu prencipal"); LSTR MSG_RUN_AUTO_FILES = _UxGT("Inicio automatico"); LSTR MSG_DISABLE_STEPPERS = _UxGT("Amortar motors"); LSTR MSG_HOMING = _UxGT("Orichen"); diff --git a/Marlin/src/lcd/language/language_bg.h b/Marlin/src/lcd/language/language_bg.h index 87199ffbc9..17f631090d 100644 --- a/Marlin/src/lcd/language/language_bg.h +++ b/Marlin/src/lcd/language/language_bg.h @@ -39,7 +39,7 @@ namespace Language_bg { LSTR WELCOME_MSG = MACHINE_NAME _UxGT(" Готов."); LSTR MSG_MEDIA_INSERTED = _UxGT("Картата е поставена"); LSTR MSG_MEDIA_REMOVED = _UxGT("Картата е извадена"); - LSTR MSG_MAIN = _UxGT("Меню"); + LSTR MSG_MAIN_MENU = _UxGT("Меню"); LSTR MSG_RUN_AUTO_FILES = _UxGT("Автостарт"); LSTR MSG_DISABLE_STEPPERS = _UxGT("Изкл. двигатели"); LSTR MSG_AUTO_HOME = _UxGT("Паркиране"); diff --git a/Marlin/src/lcd/language/language_ca.h b/Marlin/src/lcd/language/language_ca.h index fec9c44741..ac6d4388e1 100644 --- a/Marlin/src/lcd/language/language_ca.h +++ b/Marlin/src/lcd/language/language_ca.h @@ -37,7 +37,7 @@ namespace Language_ca { LSTR MSG_MEDIA_INSERTED = _UxGT("Targeta detectada."); LSTR MSG_MEDIA_REMOVED = _UxGT("Targeta extreta."); LSTR MSG_LCD_ENDSTOPS = _UxGT("Endstops"); - LSTR MSG_MAIN = _UxGT("Menú principal"); + LSTR MSG_MAIN_MENU = _UxGT("Menú principal"); LSTR MSG_RUN_AUTO_FILES = _UxGT("Inici automatic"); LSTR MSG_DISABLE_STEPPERS = _UxGT("Desactiva motors"); LSTR MSG_DEBUG_MENU = _UxGT("Menu de depuracio"); diff --git a/Marlin/src/lcd/language/language_cz.h b/Marlin/src/lcd/language/language_cz.h index f0da141069..d06c5554fd 100644 --- a/Marlin/src/lcd/language/language_cz.h +++ b/Marlin/src/lcd/language/language_cz.h @@ -54,7 +54,7 @@ namespace Language_cz { LSTR MSG_MEDIA_USB_FAILED = _UxGT("Chyba USB"); LSTR MSG_LCD_ENDSTOPS = _UxGT("Endstopy"); // max 8 znaku LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Soft Endstopy"); - LSTR MSG_MAIN = _UxGT("Hlavní nabídka"); + LSTR MSG_MAIN_MENU = _UxGT("Hlavní nabídka"); LSTR MSG_ADVANCED_SETTINGS = _UxGT("Další nastavení"); LSTR MSG_CONFIGURATION = _UxGT("Konfigurace"); LSTR MSG_RUN_AUTO_FILES = _UxGT("Autostart"); diff --git a/Marlin/src/lcd/language/language_da.h b/Marlin/src/lcd/language/language_da.h index ec1a769783..a424883000 100644 --- a/Marlin/src/lcd/language/language_da.h +++ b/Marlin/src/lcd/language/language_da.h @@ -39,7 +39,7 @@ namespace Language_da { LSTR WELCOME_MSG = MACHINE_NAME _UxGT(" er klar"); LSTR MSG_MEDIA_INSERTED = _UxGT("Kort isat"); LSTR MSG_MEDIA_REMOVED = _UxGT("Kort fjernet"); - LSTR MSG_MAIN = _UxGT("Menu"); + LSTR MSG_MAIN_MENU = _UxGT("Menu"); LSTR MSG_DISABLE_STEPPERS = _UxGT("Slå alle steppere fra"); LSTR MSG_AUTO_HOME = _UxGT("Auto Home"); // G28 LSTR MSG_LEVEL_BED_WAITING = _UxGT("Klik når du er klar"); diff --git a/Marlin/src/lcd/language/language_de.h b/Marlin/src/lcd/language/language_de.h index 32da975e04..4313a80490 100644 --- a/Marlin/src/lcd/language/language_de.h +++ b/Marlin/src/lcd/language/language_de.h @@ -52,7 +52,7 @@ namespace Language_de { LSTR MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Subcall überschritten"); LSTR MSG_LCD_ENDSTOPS = _UxGT("Endstopp"); // Max length 8 characters LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Software-Endstopp"); - LSTR MSG_MAIN = _UxGT("Hauptmenü"); + LSTR MSG_MAIN_MENU = _UxGT("Hauptmenü"); LSTR MSG_ADVANCED_SETTINGS = _UxGT("Erw. Einstellungen"); LSTR MSG_TOOLBAR_SETUP = _UxGT("Toolbar Einstellung"); LSTR MSG_OPTION_DISABLED = _UxGT("Option Deaktiviert"); diff --git a/Marlin/src/lcd/language/language_el.h b/Marlin/src/lcd/language/language_el.h index a411f33155..e18bda4edf 100644 --- a/Marlin/src/lcd/language/language_el.h +++ b/Marlin/src/lcd/language/language_el.h @@ -51,7 +51,7 @@ namespace Language_el { LSTR MSG_MEDIA_USB_REMOVED = _UxGT("USB αφαιρέθη"); LSTR MSG_MEDIA_USB_FAILED = _UxGT("Αποτυχία εκκίνησης USB"); LSTR MSG_MEDIA_INIT_FAIL = _UxGT("Αποτυχία αρχικοποίησης SD"); - LSTR MSG_MAIN = _UxGT("Αρχική Οθόνη"); + LSTR MSG_MAIN_MENU = _UxGT("Αρχική Οθόνη"); LSTR MSG_RUN_AUTO_FILES = _UxGT("Αυτόματη εκκίνηση"); LSTR MSG_DISABLE_STEPPERS = _UxGT("Απενεργοποίηση μοτέρ"); LSTR MSG_AUTO_HOME = _UxGT("Αυτόμ. επαναφορά XYZ"); diff --git a/Marlin/src/lcd/language/language_el_gr.h b/Marlin/src/lcd/language/language_el_gr.h index 463d6d4c7b..d4eabb70ce 100644 --- a/Marlin/src/lcd/language/language_el_gr.h +++ b/Marlin/src/lcd/language/language_el_gr.h @@ -40,7 +40,7 @@ namespace Language_el_gr { LSTR MSG_MEDIA_INSERTED = _UxGT("Εισαγωγή κάρτας"); LSTR MSG_MEDIA_REMOVED = _UxGT("Αφαίρεση κάρτας"); LSTR MSG_LCD_ENDSTOPS = _UxGT("Endstops"); // Max length 8 characters - LSTR MSG_MAIN = _UxGT("Βασική Οθόνη"); + LSTR MSG_MAIN_MENU = _UxGT("Βασική Οθόνη"); LSTR MSG_RUN_AUTO_FILES = _UxGT("Αυτόματη εκκίνηση"); LSTR MSG_DISABLE_STEPPERS = _UxGT("Απενεργοποίηση βηματιστή"); LSTR MSG_AUTO_HOME = _UxGT("Αυτομ. επαναφορά στο αρχικό σημείο"); diff --git a/Marlin/src/lcd/language/language_en.h b/Marlin/src/lcd/language/language_en.h index 55f426017c..68c231d556 100644 --- a/Marlin/src/lcd/language/language_en.h +++ b/Marlin/src/lcd/language/language_en.h @@ -67,7 +67,7 @@ namespace Language_en { LSTR MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Subcall Overflow"); LSTR MSG_LCD_ENDSTOPS = _UxGT("Endstops"); // Max length 8 characters LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Soft Endstops"); - LSTR MSG_MAIN = _UxGT("Main"); + LSTR MSG_MAIN_MENU = _UxGT("Main Menu"); LSTR MSG_ADVANCED_SETTINGS = _UxGT("Advanced Settings"); LSTR MSG_TOOLBAR_SETUP = _UxGT("Toolbar Setup"); LSTR MSG_OPTION_DISABLED = _UxGT("Option Disabled"); diff --git a/Marlin/src/lcd/language/language_es.h b/Marlin/src/lcd/language/language_es.h index 13d9a9b655..371df360ee 100644 --- a/Marlin/src/lcd/language/language_es.h +++ b/Marlin/src/lcd/language/language_es.h @@ -49,7 +49,7 @@ namespace Language_es { LSTR MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Desbordamiento de subllamada"); LSTR MSG_LCD_ENDSTOPS = _UxGT("Endstops"); // Max length 8 characters LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Soft Endstops"); - LSTR MSG_MAIN = _UxGT("Menú principal"); + LSTR MSG_MAIN_MENU = _UxGT("Menú principal"); LSTR MSG_ADVANCED_SETTINGS = _UxGT("Ajustes avanzados"); LSTR MSG_CONFIGURATION = _UxGT("Configuración"); LSTR MSG_RUN_AUTO_FILES = _UxGT("Inicio automático"); diff --git a/Marlin/src/lcd/language/language_eu.h b/Marlin/src/lcd/language/language_eu.h index f000b5fcfb..9b969762d5 100644 --- a/Marlin/src/lcd/language/language_eu.h +++ b/Marlin/src/lcd/language/language_eu.h @@ -41,7 +41,7 @@ namespace Language_eu { LSTR MSG_BACK = _UxGT("Atzera"); LSTR MSG_MEDIA_INSERTED = _UxGT("Txartela sartuta"); LSTR MSG_MEDIA_REMOVED = _UxGT("Txartela kenduta"); - LSTR MSG_MAIN = _UxGT("Menu nagusia"); + LSTR MSG_MAIN_MENU = _UxGT("Menu nagusia"); LSTR MSG_RUN_AUTO_FILES = _UxGT("Auto hasiera"); LSTR MSG_DISABLE_STEPPERS = _UxGT("Itzali motoreak"); LSTR MSG_DEBUG_MENU = _UxGT("Arazketa Menua"); diff --git a/Marlin/src/lcd/language/language_fi.h b/Marlin/src/lcd/language/language_fi.h index 300da9b956..57fc0a7c21 100644 --- a/Marlin/src/lcd/language/language_fi.h +++ b/Marlin/src/lcd/language/language_fi.h @@ -39,7 +39,7 @@ namespace Language_fi { LSTR WELCOME_MSG = MACHINE_NAME _UxGT(" valmis."); LSTR MSG_MEDIA_INSERTED = _UxGT("Kortti asetettu"); LSTR MSG_MEDIA_REMOVED = _UxGT("Kortti poistettu"); - LSTR MSG_MAIN = _UxGT("Palaa"); + LSTR MSG_MAIN_MENU = _UxGT("Palaa"); LSTR MSG_RUN_AUTO_FILES = _UxGT("Automaatti"); LSTR MSG_DISABLE_STEPPERS = _UxGT("Vapauta moottorit"); LSTR MSG_AUTO_HOME = _UxGT("Aja referenssiin"); diff --git a/Marlin/src/lcd/language/language_fr.h b/Marlin/src/lcd/language/language_fr.h index 1128328391..f7eec7f5ce 100644 --- a/Marlin/src/lcd/language/language_fr.h +++ b/Marlin/src/lcd/language/language_fr.h @@ -49,7 +49,7 @@ namespace Language_fr { LSTR MSG_MEDIA_USB_FAILED = _UxGT("Erreur média USB"); LSTR MSG_LCD_ENDSTOPS = _UxGT("Butées"); LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Butées SW"); - LSTR MSG_MAIN = _UxGT("Menu principal"); + LSTR MSG_MAIN_MENU = _UxGT("Menu principal"); LSTR MSG_ADVANCED_SETTINGS = _UxGT("Config. avancée"); LSTR MSG_CONFIGURATION = _UxGT("Configuration"); LSTR MSG_RUN_AUTO_FILES = _UxGT("Exéc. auto.gcode"); diff --git a/Marlin/src/lcd/language/language_fr_na.h b/Marlin/src/lcd/language/language_fr_na.h index 48030dd031..9300b299eb 100644 --- a/Marlin/src/lcd/language/language_fr_na.h +++ b/Marlin/src/lcd/language/language_fr_na.h @@ -49,7 +49,7 @@ namespace Language_fr_na { LSTR MSG_MEDIA_USB_FAILED = _UxGT("Erreur media USB"); LSTR MSG_LCD_ENDSTOPS = _UxGT("Butees"); LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Butees SW"); - LSTR MSG_MAIN = _UxGT("Menu principal"); + LSTR MSG_MAIN_MENU = _UxGT("Menu principal"); LSTR MSG_ADVANCED_SETTINGS = _UxGT("Config. avancee"); LSTR MSG_CONFIGURATION = _UxGT("Configuration"); LSTR MSG_RUN_AUTO_FILES = _UxGT("Exec. auto.gcode"); diff --git a/Marlin/src/lcd/language/language_gl.h b/Marlin/src/lcd/language/language_gl.h index 7d6b285834..da8a7047c7 100644 --- a/Marlin/src/lcd/language/language_gl.h +++ b/Marlin/src/lcd/language/language_gl.h @@ -50,7 +50,7 @@ namespace Language_gl { LSTR MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Desbord. Subch."); LSTR MSG_LCD_ENDSTOPS = _UxGT("FinCarro"); LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("FinCarro SW"); - LSTR MSG_MAIN = _UxGT("Menú principal"); + LSTR MSG_MAIN_MENU = _UxGT("Menú principal"); LSTR MSG_ADVANCED_SETTINGS = _UxGT("Axustes avanzados"); LSTR MSG_CONFIGURATION = _UxGT("Configuración"); LSTR MSG_RUN_AUTO_FILES = _UxGT("Autoarranque"); diff --git a/Marlin/src/lcd/language/language_hr.h b/Marlin/src/lcd/language/language_hr.h index 697341fc44..1f51c5c539 100644 --- a/Marlin/src/lcd/language/language_hr.h +++ b/Marlin/src/lcd/language/language_hr.h @@ -40,7 +40,7 @@ namespace Language_hr { LSTR MSG_MEDIA_INSERTED = _UxGT("SD kartica umetnuta"); LSTR MSG_MEDIA_REMOVED = _UxGT("SD kartica uklonjena"); LSTR MSG_LCD_ENDSTOPS = _UxGT("Endstops"); // Max length 8 characters - LSTR MSG_MAIN = _UxGT("Main"); + LSTR MSG_MAIN_MENU = _UxGT("Main"); LSTR MSG_RUN_AUTO_FILES = _UxGT("Auto pokretanje"); LSTR MSG_DISABLE_STEPPERS = _UxGT("Ugasi steppere"); LSTR MSG_AUTO_HOME = _UxGT("Automatski homing"); diff --git a/Marlin/src/lcd/language/language_hu.h b/Marlin/src/lcd/language/language_hu.h index caa8fc62df..471f2ee8cb 100644 --- a/Marlin/src/lcd/language/language_hu.h +++ b/Marlin/src/lcd/language/language_hu.h @@ -54,7 +54,7 @@ namespace Language_hu { LSTR MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Túlfolyás"); LSTR MSG_LCD_ENDSTOPS = _UxGT("Végállás"); // Maximum 8 karakter LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Szoft. végállás"); - LSTR MSG_MAIN = _UxGT(""); + LSTR MSG_MAIN_MENU = _UxGT(""); LSTR MSG_ADVANCED_SETTINGS = _UxGT("További beállítások"); LSTR MSG_CONFIGURATION = _UxGT("Konfiguráció"); LSTR MSG_RUN_AUTO_FILES = _UxGT("Fájl auto. futtatás"); diff --git a/Marlin/src/lcd/language/language_it.h b/Marlin/src/lcd/language/language_it.h index fb9178c67e..4bc7c0303a 100644 --- a/Marlin/src/lcd/language/language_it.h +++ b/Marlin/src/lcd/language/language_it.h @@ -62,7 +62,7 @@ namespace Language_it { LSTR MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Overflow subchiamate"); LSTR MSG_LCD_ENDSTOPS = _UxGT("Finecor."); // Max 8 characters LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Finecorsa Soft"); - LSTR MSG_MAIN = _UxGT("Menu principale"); + LSTR MSG_MAIN_MENU = _UxGT("Menu principale"); LSTR MSG_ADVANCED_SETTINGS = _UxGT("Impostaz. avanzate"); LSTR MSG_TOOLBAR_SETUP = _UxGT("Cnf barra strumenti"); LSTR MSG_OPTION_DISABLED = _UxGT("Opzione disab."); diff --git a/Marlin/src/lcd/language/language_jp_kana.h b/Marlin/src/lcd/language/language_jp_kana.h index 8ed1a7865e..7570710838 100644 --- a/Marlin/src/lcd/language/language_jp_kana.h +++ b/Marlin/src/lcd/language/language_jp_kana.h @@ -46,7 +46,7 @@ namespace Language_jp_kana { LSTR MSG_MEDIA_REMOVED = _UxGT("メディアガアリマセン"); // "Card removed" LSTR MSG_RELEASE_MEDIA = _UxGT("メディアノトリダシ"); LSTR MSG_LCD_ENDSTOPS = _UxGT("エンドストップ"); // "Endstops" // Max length 8 characters - LSTR MSG_MAIN = _UxGT("メイン"); // "Main" + LSTR MSG_MAIN_MENU = _UxGT("メイン"); // "Main" LSTR MSG_RUN_AUTO_FILES = _UxGT("ジドウカイシ"); // "Autostart" LSTR MSG_DISABLE_STEPPERS = _UxGT("モーターデンゲン オフ"); // "Disable steppers" LSTR MSG_DEBUG_MENU = _UxGT("デバッグメニュー"); // "Debug Menu" diff --git a/Marlin/src/lcd/language/language_ko_KR.h b/Marlin/src/lcd/language/language_ko_KR.h index 50c73f69e9..e52ced2dad 100644 --- a/Marlin/src/lcd/language/language_ko_KR.h +++ b/Marlin/src/lcd/language/language_ko_KR.h @@ -39,7 +39,7 @@ namespace Language_ko_KR { LSTR MSG_MEDIA_REMOVED = _UxGT("카드 제거됨"); LSTR MSG_LCD_ENDSTOPS = _UxGT("엔드스탑"); LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("소프트 엔드스탑"); - LSTR MSG_MAIN = _UxGT("뒤로"); + LSTR MSG_MAIN_MENU = _UxGT("뒤로"); LSTR MSG_ADVANCED_SETTINGS = _UxGT("고급 설정"); LSTR MSG_CONFIGURATION = _UxGT("설정"); LSTR MSG_RUN_AUTO_FILES = _UxGT("자동 시작"); diff --git a/Marlin/src/lcd/language/language_nl.h b/Marlin/src/lcd/language/language_nl.h index 6397a95a7e..d708135fac 100644 --- a/Marlin/src/lcd/language/language_nl.h +++ b/Marlin/src/lcd/language/language_nl.h @@ -42,7 +42,7 @@ namespace Language_nl { LSTR MSG_MEDIA_INSERTED = _UxGT("Kaart ingestoken"); LSTR MSG_MEDIA_REMOVED = _UxGT("Kaart verwijderd"); LSTR MSG_LCD_ENDSTOPS = _UxGT("Endstops"); // Max length 8 characters - LSTR MSG_MAIN = _UxGT("Hoofdmenu"); + LSTR MSG_MAIN_MENU = _UxGT("Hoofdmenu"); LSTR MSG_RUN_AUTO_FILES = _UxGT("Autostart"); LSTR MSG_DISABLE_STEPPERS = _UxGT("Motoren uit"); LSTR MSG_DEBUG_MENU = _UxGT("Debug Menu"); // accepted English terms diff --git a/Marlin/src/lcd/language/language_pl.h b/Marlin/src/lcd/language/language_pl.h index 1b5715aedd..5bf4884941 100644 --- a/Marlin/src/lcd/language/language_pl.h +++ b/Marlin/src/lcd/language/language_pl.h @@ -58,7 +58,7 @@ namespace Language_pl { LSTR MSG_MEDIA_USB_FAILED = _UxGT("Błąd uruchomienia USB"); LSTR MSG_LCD_ENDSTOPS = _UxGT("Krańców."); // Max length 8 characters LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Progr. Krańcówki"); - LSTR MSG_MAIN = _UxGT("Menu główne"); + LSTR MSG_MAIN_MENU = _UxGT("Menu główne"); LSTR MSG_ADVANCED_SETTINGS = _UxGT("Ustawienie zaawansowane"); LSTR MSG_CONFIGURATION = _UxGT("Konfiguracja"); LSTR MSG_RUN_AUTO_FILES = _UxGT("Autostart"); diff --git a/Marlin/src/lcd/language/language_pt.h b/Marlin/src/lcd/language/language_pt.h index 7f09d71e48..ac2cbbdc20 100644 --- a/Marlin/src/lcd/language/language_pt.h +++ b/Marlin/src/lcd/language/language_pt.h @@ -40,7 +40,7 @@ namespace Language_pt { LSTR WELCOME_MSG = MACHINE_NAME _UxGT(" pronta."); LSTR MSG_MEDIA_INSERTED = _UxGT("Cartão inserido"); LSTR MSG_MEDIA_REMOVED = _UxGT("Cartão removido"); - LSTR MSG_MAIN = _UxGT("Menu principal"); + LSTR MSG_MAIN_MENU = _UxGT("Menu principal"); LSTR MSG_DISABLE_STEPPERS = _UxGT("Desactivar motores"); LSTR MSG_AUTO_HOME = _UxGT("Ir para origem"); LSTR MSG_AUTO_HOME_X = _UxGT("Ir para origem X"); diff --git a/Marlin/src/lcd/language/language_pt_br.h b/Marlin/src/lcd/language/language_pt_br.h index 1bd3f61682..c17ca124ed 100644 --- a/Marlin/src/lcd/language/language_pt_br.h +++ b/Marlin/src/lcd/language/language_pt_br.h @@ -48,7 +48,7 @@ namespace Language_pt_br { LSTR MSG_MEDIA_USB_FAILED = _UxGT("USB falhou"); LSTR MSG_LCD_ENDSTOPS = _UxGT("Fins de curso"); LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Soft Fins curso"); - LSTR MSG_MAIN = _UxGT("Menu principal"); + LSTR MSG_MAIN_MENU = _UxGT("Menu principal"); LSTR MSG_ADVANCED_SETTINGS = _UxGT("Config. Avançada"); LSTR MSG_CONFIGURATION = _UxGT("Configuração"); LSTR MSG_RUN_AUTO_FILES = _UxGT("Início automático"); diff --git a/Marlin/src/lcd/language/language_ro.h b/Marlin/src/lcd/language/language_ro.h index 938aa71c57..bdb9f226a9 100644 --- a/Marlin/src/lcd/language/language_ro.h +++ b/Marlin/src/lcd/language/language_ro.h @@ -49,7 +49,7 @@ namespace Language_ro { LSTR MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Eroare:Subcall Overflow"); LSTR MSG_LCD_ENDSTOPS = _UxGT("Endstops"); // Max length 8 characters LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Soft Endstops"); - LSTR MSG_MAIN = _UxGT("Principal"); + LSTR MSG_MAIN_MENU = _UxGT("Principal"); LSTR MSG_ADVANCED_SETTINGS = _UxGT("Setari Avansate"); LSTR MSG_CONFIGURATION = _UxGT("Configurare"); LSTR MSG_RUN_AUTO_FILES = _UxGT("Autostart"); diff --git a/Marlin/src/lcd/language/language_ru.h b/Marlin/src/lcd/language/language_ru.h index ab5d7fca98..6dd773f77b 100644 --- a/Marlin/src/lcd/language/language_ru.h +++ b/Marlin/src/lcd/language/language_ru.h @@ -57,7 +57,7 @@ namespace Language_ru { LSTR MSG_MEDIA_USB_FAILED = _UxGT("Ошибка USB диска"); LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Прогр. концевики"); LSTR MSG_LCD_ENDSTOPS = _UxGT("Концевик"); // Max length 8 characters - LSTR MSG_MAIN = _UxGT("Главное меню"); + LSTR MSG_MAIN_MENU = _UxGT("Главное меню"); LSTR MSG_CONFIGURATION = _UxGT("Конфигурация"); LSTR MSG_RUN_AUTO_FILES = _UxGT("Автостарт"); LSTR MSG_DISABLE_STEPPERS = _UxGT("Выключить двигатели"); diff --git a/Marlin/src/lcd/language/language_sk.h b/Marlin/src/lcd/language/language_sk.h index 0e00ce4b12..c78029048b 100644 --- a/Marlin/src/lcd/language/language_sk.h +++ b/Marlin/src/lcd/language/language_sk.h @@ -65,7 +65,7 @@ namespace Language_sk { LSTR MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Preteč. podprogramu"); LSTR MSG_LCD_ENDSTOPS = _UxGT("Endstopy"); // max 8 znakov LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Soft. endstopy"); - LSTR MSG_MAIN = _UxGT("Hlavná ponuka"); + LSTR MSG_MAIN_MENU = _UxGT("Hlavná ponuka"); LSTR MSG_ADVANCED_SETTINGS = _UxGT("Pokročilé nastav."); LSTR MSG_TOOLBAR_SETUP = _UxGT("Panel nástrojov"); LSTR MSG_OPTION_DISABLED = _UxGT("Možnosť vypnutá"); diff --git a/Marlin/src/lcd/language/language_sv.h b/Marlin/src/lcd/language/language_sv.h index c7e6c19bd7..13ae8fcd29 100644 --- a/Marlin/src/lcd/language/language_sv.h +++ b/Marlin/src/lcd/language/language_sv.h @@ -51,7 +51,7 @@ namespace Language_sv { LSTR MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Underanrop överskriden"); LSTR MSG_LCD_ENDSTOPS = _UxGT("Slutstop"); // Max length 8 characters LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Mjuk slutstopp"); - LSTR MSG_MAIN = _UxGT("Huvud"); + LSTR MSG_MAIN_MENU = _UxGT("Huvud"); LSTR MSG_ADVANCED_SETTINGS = _UxGT("Advancerade inställningar"); LSTR MSG_CONFIGURATION = _UxGT("Konfiguration"); LSTR MSG_RUN_AUTO_FILES = _UxGT("Autostarta Filer"); diff --git a/Marlin/src/lcd/language/language_test.h b/Marlin/src/lcd/language/language_test.h index 20b5a7e686..657e4e2e48 100644 --- a/Marlin/src/lcd/language/language_test.h +++ b/Marlin/src/lcd/language/language_test.h @@ -133,7 +133,7 @@ namespace Language_test { LSTR MSG_PREPARE = _UxGT("UTF8"); LSTR MSG_CONTROL = _UxGT("ASCII"); - LSTR MSG_MAIN = _UxGT(".."); + LSTR MSG_MAIN_MENU = _UxGT(".."); LSTR MSG_DISABLE_STEPPERS = STRG_C2_8; LSTR MSG_AUTO_HOME = STRG_C2_9; LSTR MSG_SET_HOME_OFFSETS = STRG_C2_a; @@ -143,7 +143,7 @@ namespace Language_test { LSTR MSG_SWITCH_PS_OFF = STRG_C3_a; LSTR MSG_MOVE_AXIS = STRG_C3_b; - LSTR MSG_MAIN = STRG_OKTAL_2; + LSTR MSG_MAIN_MENU = STRG_OKTAL_2; LSTR MSG_TEMPERATURE = STRG_OKTAL_3; LSTR MSG_MOTION = STRG_OKTAL_4; LSTR MSG_FILAMENT = STRG_OKTAL_5; @@ -170,7 +170,7 @@ namespace Language_test { LSTR MSG_PREPARE = _UxGT("UTF8"); LSTR MSG_CONTROL = _UxGT("ASCII"); - LSTR MSG_MAIN = _UxGT(".."); + LSTR MSG_MAIN_MENU = _UxGT(".."); LSTR MSG_DISABLE_STEPPERS = STRG_D0_8; LSTR MSG_AUTO_HOME = STRG_D0_9; LSTR MSG_SET_HOME_OFFSETS = STRG_D0_a; @@ -180,7 +180,7 @@ namespace Language_test { LSTR MSG_SWITCH_PS_OFF = STRG_D1_a; LSTR MSG_MOVE_AXIS = STRG_D1_b; - LSTR MSG_MAIN = STRG_OKTAL_2; + LSTR MSG_MAIN_MENU = STRG_OKTAL_2; LSTR MSG_TEMPERATURE = STRG_OKTAL_3; LSTR MSG_MOTION = STRG_OKTAL_4; LSTR MSG_FILAMENT = STRG_OKTAL_5; @@ -206,7 +206,7 @@ namespace Language_test { LSTR MSG_PREPARE = _UxGT("UTF8"); LSTR MSG_CONTROL = _UxGT("ASCII"); - LSTR MSG_MAIN = _UxGT(".."); + LSTR MSG_MAIN_MENU = _UxGT(".."); LSTR MSG_DISABLE_STEPPERS = STRG_E382_8; LSTR MSG_AUTO_HOME = STRG_E382_9; LSTR MSG_SET_HOME_OFFSETS = STRG_E382_a; @@ -216,7 +216,7 @@ namespace Language_test { LSTR MSG_SWITCH_PS_OFF = STRG_E383_a; LSTR MSG_MOVE_AXIS = STRG_E383_b; - LSTR MSG_MAIN = STRG_OKTAL_2; + LSTR MSG_MAIN_MENU = STRG_OKTAL_2; LSTR MSG_TEMPERATURE = STRG_OKTAL_3; LSTR MSG_MOTION = STRG_OKTAL_4; LSTR MSG_FILAMENT = STRG_OKTAL_5; diff --git a/Marlin/src/lcd/language/language_tr.h b/Marlin/src/lcd/language/language_tr.h index 569b32b93d..414d545927 100644 --- a/Marlin/src/lcd/language/language_tr.h +++ b/Marlin/src/lcd/language/language_tr.h @@ -55,7 +55,7 @@ namespace Language_tr { LSTR MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Subcall Overflow"); LSTR MSG_LCD_ENDSTOPS = _UxGT("Endstops"); // Max length 8 characters LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Yazılımsal Endstops"); - LSTR MSG_MAIN = _UxGT("Ana"); + LSTR MSG_MAIN_MENU = _UxGT("Ana"); LSTR MSG_ADVANCED_SETTINGS = _UxGT("Gelişmiş Ayarlar"); LSTR MSG_TOOLBAR_SETUP = _UxGT("Araç Çubuğu Kurulumu"); LSTR MSG_OPTION_DISABLED = _UxGT("Seçenek Devre Dışı"); diff --git a/Marlin/src/lcd/language/language_uk.h b/Marlin/src/lcd/language/language_uk.h index 7e7ef5eb37..7bdd896a33 100644 --- a/Marlin/src/lcd/language/language_uk.h +++ b/Marlin/src/lcd/language/language_uk.h @@ -60,7 +60,7 @@ namespace Language_uk { LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Прогр.кінцевики"); #endif LSTR MSG_LCD_ENDSTOPS = _UxGT("Кінцевик"); // Max length 8 characters - LSTR MSG_MAIN = _UxGT("Основне меню"); + LSTR MSG_MAIN_MENU = _UxGT("Основне меню"); LSTR MSG_ADVANCED_SETTINGS = _UxGT("Інші налаштування"); LSTR MSG_CONFIGURATION = _UxGT("Конфігурація"); LSTR MSG_RUN_AUTO_FILES = _UxGT("Автостарт"); diff --git a/Marlin/src/lcd/language/language_vi.h b/Marlin/src/lcd/language/language_vi.h index 3925eb8b83..5795c58a1e 100644 --- a/Marlin/src/lcd/language/language_vi.h +++ b/Marlin/src/lcd/language/language_vi.h @@ -44,7 +44,7 @@ namespace Language_vi { LSTR MSG_MEDIA_USB_FAILED = _UxGT("USB khởi thất bại"); LSTR MSG_LCD_ENDSTOPS = _UxGT("Công tắc"); // Endstops - công tắc hành trình LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Công tắc mềm"); // soft Endstops - LSTR MSG_MAIN = _UxGT("Chính"); // Main + LSTR MSG_MAIN_MENU = _UxGT("Chính"); // Main LSTR MSG_ADVANCED_SETTINGS = _UxGT("Thiết lập cấp cao"); // Advanced Settings LSTR MSG_CONFIGURATION = _UxGT("Cấu hình"); // Configuration LSTR MSG_RUN_AUTO_FILES = _UxGT("Khởi chạy tự động"); // Autostart diff --git a/Marlin/src/lcd/language/language_zh_CN.h b/Marlin/src/lcd/language/language_zh_CN.h index 0fd72b410c..3e8ab9870f 100644 --- a/Marlin/src/lcd/language/language_zh_CN.h +++ b/Marlin/src/lcd/language/language_zh_CN.h @@ -48,7 +48,7 @@ namespace Language_zh_CN { LSTR MSG_KILL_SUBCALL_OVERFLOW = _UxGT("子响应溢出"); LSTR MSG_LCD_ENDSTOPS = _UxGT("挡块"); // "Endstops" // Max length 8 characters LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("软挡块"); - LSTR MSG_MAIN = _UxGT("主菜单"); // "Main" + LSTR MSG_MAIN_MENU = _UxGT("主菜单"); // "Main" LSTR MSG_ADVANCED_SETTINGS = _UxGT("高级设置"); LSTR MSG_CONFIGURATION = _UxGT("配置"); LSTR MSG_RUN_AUTO_FILES = _UxGT("自动开始"); // "Autostart" diff --git a/Marlin/src/lcd/language/language_zh_TW.h b/Marlin/src/lcd/language/language_zh_TW.h index a00303864a..5f9f0e3904 100644 --- a/Marlin/src/lcd/language/language_zh_TW.h +++ b/Marlin/src/lcd/language/language_zh_TW.h @@ -46,7 +46,7 @@ namespace Language_zh_TW { LSTR MSG_MEDIA_USB_FAILED = _UxGT("USB啟動失敗"); // "USB start failed" LSTR MSG_LCD_ENDSTOPS = _UxGT("擋塊"); // "Endstops" // Max length 8 characters LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("軟體擋塊"); // "Soft Endstops" - LSTR MSG_MAIN = _UxGT("主選單"); // "Main" + LSTR MSG_MAIN_MENU = _UxGT("主選單"); // "Main" LSTR MSG_ADVANCED_SETTINGS = _UxGT("進階設置"); // "Advanced Settings" LSTR MSG_CONFIGURATION = _UxGT("設置"); //Configuration LSTR MSG_RUN_AUTO_FILES = _UxGT("自動開始"); // "Autostart" diff --git a/Marlin/src/lcd/menu/menu_backlash.cpp b/Marlin/src/lcd/menu/menu_backlash.cpp index e71606fc12..2b9404b0f6 100644 --- a/Marlin/src/lcd/menu/menu_backlash.cpp +++ b/Marlin/src/lcd/menu/menu_backlash.cpp @@ -34,7 +34,7 @@ void menu_backlash() { START_MENU(); - BACK_ITEM(MSG_MAIN); + BACK_ITEM(MSG_MAIN_MENU); editable.uint8 = backlash.get_correction_uint8(); EDIT_ITEM_FAST(percent, MSG_BACKLASH_CORRECTION, &editable.uint8, backlash.all_off, backlash.all_on, []{ backlash.set_correction_uint8(editable.uint8); }); diff --git a/Marlin/src/lcd/menu/menu_cancelobject.cpp b/Marlin/src/lcd/menu/menu_cancelobject.cpp index b2d36bf8c3..b2784bcd41 100644 --- a/Marlin/src/lcd/menu/menu_cancelobject.cpp +++ b/Marlin/src/lcd/menu/menu_cancelobject.cpp @@ -56,7 +56,7 @@ void menu_cancelobject() { const int8_t ao = cancelable.active_object; START_MENU(); - BACK_ITEM(MSG_MAIN); + BACK_ITEM(MSG_MAIN_MENU); // Draw cancelable items in a loop for (int8_t i = -1; i < cancelable.object_count; i++) { diff --git a/Marlin/src/lcd/menu/menu_configuration.cpp b/Marlin/src/lcd/menu/menu_configuration.cpp index 4dce109b42..3ff4b2e562 100644 --- a/Marlin/src/lcd/menu/menu_configuration.cpp +++ b/Marlin/src/lcd/menu/menu_configuration.cpp @@ -360,7 +360,7 @@ void menu_advanced_settings(); void custom_menus_configuration() { START_MENU(); - BACK_ITEM(MSG_MAIN); + BACK_ITEM(MSG_MAIN_MENU); #define HAS_CUSTOM_ITEM_CONF(N) (defined(CONFIG_MENU_ITEM_##N##_DESC) && defined(CONFIG_MENU_ITEM_##N##_GCODE)) @@ -472,7 +472,7 @@ void menu_configuration() { const bool busy = printer_busy(); START_MENU(); - BACK_ITEM(MSG_MAIN); + BACK_ITEM(MSG_MAIN_MENU); // // Debug Menu when certain options are enabled diff --git a/Marlin/src/lcd/menu/menu_delta_calibrate.cpp b/Marlin/src/lcd/menu/menu_delta_calibrate.cpp index 94663744ea..a33edd1659 100644 --- a/Marlin/src/lcd/menu/menu_delta_calibrate.cpp +++ b/Marlin/src/lcd/menu/menu_delta_calibrate.cpp @@ -132,7 +132,7 @@ void menu_delta_calibrate() { #endif START_MENU(); - BACK_ITEM(MSG_MAIN); + BACK_ITEM(MSG_MAIN_MENU); #if ENABLED(DELTA_AUTO_CALIBRATION) GCODES_ITEM(MSG_DELTA_AUTO_CALIBRATE, F("G33")); diff --git a/Marlin/src/lcd/menu/menu_filament.cpp b/Marlin/src/lcd/menu/menu_filament.cpp index 122f0c4050..6fdcc2b488 100644 --- a/Marlin/src/lcd/menu/menu_filament.cpp +++ b/Marlin/src/lcd/menu/menu_filament.cpp @@ -130,7 +130,7 @@ void menu_change_filament() { #endif START_MENU(); - BACK_ITEM(MSG_MAIN); + BACK_ITEM(MSG_MAIN_MENU); // Change filament #if E_STEPPERS == 1 diff --git a/Marlin/src/lcd/menu/menu_game.cpp b/Marlin/src/lcd/menu/menu_game.cpp index fa56d7eee2..750c3c7e82 100644 --- a/Marlin/src/lcd/menu/menu_game.cpp +++ b/Marlin/src/lcd/menu/menu_game.cpp @@ -29,7 +29,7 @@ void menu_game() { START_MENU(); - BACK_ITEM(TERN(LCD_INFO_MENU, MSG_INFO_MENU, MSG_MAIN)); + BACK_ITEM(TERN(LCD_INFO_MENU, MSG_INFO_MENU, MSG_MAIN_MENU)); #if ENABLED(MARLIN_BRICKOUT) SUBMENU(MSG_BRICKOUT, brickout.enter_game); #endif diff --git a/Marlin/src/lcd/menu/menu_info.cpp b/Marlin/src/lcd/menu/menu_info.cpp index 101861074d..abca4a7d15 100644 --- a/Marlin/src/lcd/menu/menu_info.cpp +++ b/Marlin/src/lcd/menu/menu_info.cpp @@ -276,7 +276,7 @@ void menu_info_board() { // void menu_info() { START_MENU(); - BACK_ITEM(MSG_MAIN); + BACK_ITEM(MSG_MAIN_MENU); #if ENABLED(LCD_PRINTER_INFO_IS_BOOTSCREEN) SUBMENU(MSG_INFO_PRINTER_MENU, TERN(SHOW_CUSTOM_BOOTSCREEN, menu_show_custom_bootscreen, menu_show_marlin_bootscreen)); #else diff --git a/Marlin/src/lcd/menu/menu_language.cpp b/Marlin/src/lcd/menu/menu_language.cpp index 2ea4359c6b..9361d595f7 100644 --- a/Marlin/src/lcd/menu/menu_language.cpp +++ b/Marlin/src/lcd/menu/menu_language.cpp @@ -39,7 +39,7 @@ static void set_lcd_language(const uint8_t inlang) { void menu_language() { START_MENU(); - BACK_ITEM(MSG_MAIN); + BACK_ITEM(MSG_MAIN_MENU); MENU_ITEM_F(function, FPSTR(GET_LANGUAGE_NAME(1)), []{ set_lcd_language(0); }); MENU_ITEM_F(function, FPSTR(GET_LANGUAGE_NAME(2)), []{ set_lcd_language(1); }); diff --git a/Marlin/src/lcd/menu/menu_led.cpp b/Marlin/src/lcd/menu/menu_led.cpp index 867e4dafa9..dea5ecceeb 100644 --- a/Marlin/src/lcd/menu/menu_led.cpp +++ b/Marlin/src/lcd/menu/menu_led.cpp @@ -126,7 +126,7 @@ void menu_led() { START_MENU(); - BACK_ITEM(MSG_MAIN); + BACK_ITEM(MSG_MAIN_MENU); #if ENABLED(LED_CONTROL_MENU) if (TERN1(PSU_CONTROL, powerManager.psu_on)) { diff --git a/Marlin/src/lcd/menu/menu_main.cpp b/Marlin/src/lcd/menu/menu_main.cpp index 81b36d2b01..3b1cd73745 100644 --- a/Marlin/src/lcd/menu/menu_main.cpp +++ b/Marlin/src/lcd/menu/menu_main.cpp @@ -114,7 +114,7 @@ void menu_configuration(); void custom_menus_main() { START_MENU(); - BACK_ITEM(MSG_MAIN); + BACK_ITEM(MSG_MAIN_MENU); #define HAS_CUSTOM_ITEM_MAIN(N) (defined(MAIN_MENU_ITEM_##N##_DESC) && defined(MAIN_MENU_ITEM_##N##_GCODE)) diff --git a/Marlin/src/lcd/menu/menu_media.cpp b/Marlin/src/lcd/menu/menu_media.cpp index d43053da62..79cca1d97a 100644 --- a/Marlin/src/lcd/menu/menu_media.cpp +++ b/Marlin/src/lcd/menu/menu_media.cpp @@ -119,7 +119,7 @@ void menu_media_filelist() { #if ENABLED(MULTI_VOLUME) ACTION_ITEM(MSG_BACK, []{ ui.goto_screen(menu_media); }); #else - BACK_ITEM_F(TERN1(BROWSE_MEDIA_ON_INSERT, screen_history_depth) ? GET_TEXT_F(MSG_MAIN) : GET_TEXT_F(MSG_BACK)); + BACK_ITEM_F(TERN1(BROWSE_MEDIA_ON_INSERT, screen_history_depth) ? GET_TEXT_F(MSG_MAIN_MENU) : GET_TEXT_F(MSG_BACK)); #endif if (card.flag.workDirIsRoot) { #if !HAS_SD_DETECT @@ -146,7 +146,7 @@ void menu_media_filelist() { #if ENABLED(MULTI_VOLUME) void menu_media_select() { START_MENU(); - BACK_ITEM_F(TERN1(BROWSE_MEDIA_ON_INSERT, screen_history_depth) ? GET_TEXT_F(MSG_MAIN) : GET_TEXT_F(MSG_BACK)); + BACK_ITEM_F(TERN1(BROWSE_MEDIA_ON_INSERT, screen_history_depth) ? GET_TEXT_F(MSG_MAIN_MENU) : GET_TEXT_F(MSG_BACK)); #if ENABLED(VOLUME_SD_ONBOARD) ACTION_ITEM(MSG_SD_CARD, []{ card.changeMedia(&card.media_driver_sdcard); card.mount(); ui.goto_screen(menu_media_filelist); }); #endif diff --git a/Marlin/src/lcd/menu/menu_mixer.cpp b/Marlin/src/lcd/menu/menu_mixer.cpp index f787d47d0f..478792479c 100644 --- a/Marlin/src/lcd/menu/menu_mixer.cpp +++ b/Marlin/src/lcd/menu/menu_mixer.cpp @@ -225,7 +225,7 @@ void lcd_mixer_mix_edit() { void menu_mixer() { START_MENU(); - BACK_ITEM(MSG_MAIN); + BACK_ITEM(MSG_MAIN_MENU); v_index = mixer.get_current_vtool(); EDIT_ITEM(uint8, MSG_ACTIVE_VTOOL, &v_index, 0, MIXING_VIRTUAL_TOOLS - 1, _lcd_mixer_select_vtool, ENABLED(HAS_DUAL_MIXING)); diff --git a/Marlin/src/lcd/menu/menu_mmu2.cpp b/Marlin/src/lcd/menu/menu_mmu2.cpp index a2412b0f6a..22230687e4 100644 --- a/Marlin/src/lcd/menu/menu_mmu2.cpp +++ b/Marlin/src/lcd/menu/menu_mmu2.cpp @@ -104,7 +104,7 @@ void action_mmu2_reset() { void menu_mmu2() { START_MENU(); - BACK_ITEM(MSG_MAIN); + BACK_ITEM(MSG_MAIN_MENU); SUBMENU(MSG_MMU2_LOAD_FILAMENT, menu_mmu2_load_filament); SUBMENU(MSG_MMU2_LOAD_TO_NOZZLE, menu_mmu2_load_to_nozzle); SUBMENU(MSG_MMU2_EJECT_FILAMENT, menu_mmu2_eject_filament); diff --git a/Marlin/src/lcd/menu/menu_motion.cpp b/Marlin/src/lcd/menu/menu_motion.cpp index d5c1a8a38a..200d46a8af 100644 --- a/Marlin/src/lcd/menu/menu_motion.cpp +++ b/Marlin/src/lcd/menu/menu_motion.cpp @@ -317,7 +317,7 @@ void menu_motion() { // // ^ Main // - BACK_ITEM(MSG_MAIN); + BACK_ITEM(MSG_MAIN_MENU); // // Move Axis diff --git a/Marlin/src/lcd/menu/menu_power_monitor.cpp b/Marlin/src/lcd/menu/menu_power_monitor.cpp index 3cd9909e5c..3d718c108a 100644 --- a/Marlin/src/lcd/menu/menu_power_monitor.cpp +++ b/Marlin/src/lcd/menu/menu_power_monitor.cpp @@ -33,7 +33,7 @@ void menu_power_monitor() { START_MENU(); - BACK_ITEM(MSG_MAIN); + BACK_ITEM(MSG_MAIN_MENU); #if ENABLED(POWER_MONITOR_CURRENT) { diff --git a/Marlin/src/lcd/menu/menu_spindle_laser.cpp b/Marlin/src/lcd/menu/menu_spindle_laser.cpp index de16316987..e053361fb0 100644 --- a/Marlin/src/lcd/menu/menu_spindle_laser.cpp +++ b/Marlin/src/lcd/menu/menu_spindle_laser.cpp @@ -39,7 +39,7 @@ #endif START_MENU(); - BACK_ITEM(MSG_MAIN); + BACK_ITEM(MSG_MAIN_MENU); #if ENABLED(SPINDLE_LASER_USE_PWM) // Change the cutter's "current power" value without turning the cutter on or off diff --git a/Marlin/src/lcd/menu/menu_temperature.cpp b/Marlin/src/lcd/menu/menu_temperature.cpp index 2e5b8f1e54..ec6d49c16f 100644 --- a/Marlin/src/lcd/menu/menu_temperature.cpp +++ b/Marlin/src/lcd/menu/menu_temperature.cpp @@ -162,7 +162,7 @@ void menu_temperature() { #endif START_MENU(); - BACK_ITEM(MSG_MAIN); + BACK_ITEM(MSG_MAIN_MENU); // // Nozzle: @@ -291,7 +291,7 @@ void menu_temperature() { void menu_preheat_only() { START_MENU(); - BACK_ITEM(MSG_MAIN); + BACK_ITEM(MSG_MAIN_MENU); LOOP_L_N(m, PREHEAT_COUNT) { editable.int8 = m; diff --git a/Marlin/src/lcd/menu/menu_tune.cpp b/Marlin/src/lcd/menu/menu_tune.cpp index 9247607269..8a2636ba5d 100644 --- a/Marlin/src/lcd/menu/menu_tune.cpp +++ b/Marlin/src/lcd/menu/menu_tune.cpp @@ -109,7 +109,7 @@ void menu_tune() { START_MENU(); - BACK_ITEM(MSG_MAIN); + BACK_ITEM(MSG_MAIN_MENU); // // Speed: From 6d819eb8d419bad0bea5c9ce33a673eef5ef03eb Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 14 Apr 2023 18:09:16 -0500 Subject: [PATCH 173/225] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20App?= =?UTF-8?q?ly=20simplified=20=3F:?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/feature/tmc_util.cpp | 4 ++-- Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp | 6 +++--- .../ftdi_eve_lib/extended/command_processor.h | 2 +- .../ftdi_eve_lib/extended/sound_player.cpp | 2 +- .../ftdi_eve_touch_ui/generic/dialog_box_base_class.cpp | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Marlin/src/feature/tmc_util.cpp b/Marlin/src/feature/tmc_util.cpp index 0867686363..2e5a5c5585 100644 --- a/Marlin/src/feature/tmc_util.cpp +++ b/Marlin/src/feature/tmc_util.cpp @@ -601,8 +601,8 @@ case TMC_STEALTHCHOP: serialprint_truefalse(st.en_pwm_mode()); break; case TMC_GLOBAL_SCALER: { - uint16_t value = st.GLOBAL_SCALER(); - SERIAL_ECHO(value ? value : 256); + const uint16_t value = st.GLOBAL_SCALER(); + SERIAL_ECHO(value ?: 256); SERIAL_ECHOPGM("/256"); } break; diff --git a/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp b/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp index 3d1594aca2..96f2eeae96 100644 --- a/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp +++ b/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp @@ -629,14 +629,14 @@ void ST7920_Lite_Status_Screen::draw_position(const xyze_pos_t &pos, const bool #endif } else { - write_byte(alt_label ? alt_label : 'X'); + write_byte(alt_label ?: 'X'); write_str(dtostrf(pos.x, -4, 0, str), 4); - write_byte(alt_label ? alt_label : 'Y'); + write_byte(alt_label ?: 'Y'); write_str(dtostrf(pos.y, -4, 0, str), 4); } - write_byte(alt_label ? alt_label : 'Z'); + write_byte(alt_label ?: 'Z'); write_str(dtostrf(pos.z, -5, 1, str), 5); } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/command_processor.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/command_processor.h index 648ed5330a..fd3e8f921c 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/command_processor.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/command_processor.h @@ -125,7 +125,7 @@ class CommandProcessor : public CLCD::CommandFifo { } inline CommandProcessor& set_button_style_callback(const btn_style_func_t *func) { - _btn_style_callback = func ? func : default_button_style_func; + _btn_style_callback = func ?: default_button_style_func; return *this; } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/sound_player.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/sound_player.cpp index 47bf79e467..3d53f2d99b 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/sound_player.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/sound_player.cpp @@ -41,7 +41,7 @@ namespace FTDI { #endif // Play the note - CLCD::mem_write_16(REG::SOUND, (note == REST) ? 0 : (((note ? note : NOTE_C4) << 8) | effect)); + CLCD::mem_write_16(REG::SOUND, (note == REST) ? 0 : (((note ?: NOTE_C4) << 8) | effect)); CLCD::mem_write_8(REG::PLAY, 1); } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/dialog_box_base_class.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/dialog_box_base_class.cpp index a006d30942..ea177bfdc1 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/dialog_box_base_class.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/dialog_box_base_class.cpp @@ -39,7 +39,7 @@ void DialogBoxBaseClass::drawMessage(T message, const int16_t font) { .cmd(CLEAR(true,true,true)) .cmd(COLOR_RGB(bg_text_enabled)) .tag(0); - draw_text_box(cmd, BTN_POS(1,1), BTN_SIZE(2,6), message, OPT_CENTER, font ? font : font_large); + draw_text_box(cmd, BTN_POS(1,1), BTN_SIZE(2,6), message, OPT_CENTER, font ?: font_large); cmd.colors(normal_btn); } From 48b712fdc013cfbda94bc1e2452e4538999916a4 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 14 Apr 2023 18:00:25 -0500 Subject: [PATCH 174/225] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Jye?= =?UTF-8?q?rsUI=20code=20cleanup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/e3v2/jyersui/dwin.cpp | 142 +++++++++++++-------------- Marlin/src/lcd/e3v2/jyersui/dwin.h | 63 ++++++------ 2 files changed, 102 insertions(+), 103 deletions(-) diff --git a/Marlin/src/lcd/e3v2/jyersui/dwin.cpp b/Marlin/src/lcd/e3v2/jyersui/dwin.cpp index 285723e278..a24adec8e9 100644 --- a/Marlin/src/lcd/e3v2/jyersui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/jyersui/dwin.cpp @@ -377,7 +377,7 @@ private: return min; } - void Draw_Bed_Mesh(int16_t selected = -1, uint8_t gridline_width = 1, uint16_t padding_x = 8, uint16_t padding_y_top = 40 + 53 - 7) { + void Draw_Bed_Mesh(const int16_t selected=-1, const uint8_t gridline_width=1, const uint16_t padding_x=8, const uint16_t padding_y_top=40 + 53 - 7) { drawing_mesh = true; const uint16_t total_width_px = DWIN_WIDTH - padding_x - padding_x, cell_width_px = total_width_px / (GRID_MAX_POINTS_X), @@ -470,15 +470,15 @@ constexpr const char * const CrealityDWINClass::preheat_modes[3]; // 3=Title bar and Menu area (default) // 2=Menu area // 1=Title bar -void CrealityDWINClass::Clear_Screen(uint8_t e/*=3*/) { +void CrealityDWINClass::Clear_Screen(const uint8_t e/*=3*/) { if (e == 1 || e == 3 || e == 4) DWIN_Draw_Rectangle(1, GetColor(eeprom_settings.menu_top_bg, Color_Bg_Blue, false), 0, 0, DWIN_WIDTH, TITLE_HEIGHT); // Clear Title Bar if (e == 2 || e == 3) DWIN_Draw_Rectangle(1, Color_Bg_Black, 0, 31, DWIN_WIDTH, STATUS_Y); // Clear Menu Area if (e == 4) DWIN_Draw_Rectangle(1, Color_Bg_Black, 0, 31, DWIN_WIDTH, DWIN_HEIGHT); // Clear Popup Area } -void CrealityDWINClass::Draw_Float(float value, uint8_t row, bool selected/*=false*/, uint8_t minunit/*=10*/) { +void CrealityDWINClass::Draw_Float(const_float_t value, const uint8_t row, const bool selected/*=false*/, const uint8_t minunit/*=10*/) { const uint8_t digits = (uint8_t)floor(log10(abs(value))) + log10(minunit) + (minunit > 1); - const uint16_t bColor = (selected) ? Select_Color : Color_Bg_Black; + const uint16_t bColor = selected ? Select_Color : Color_Bg_Black; const uint16_t xpos = 240 - (digits * 8); DWIN_Draw_Rectangle(1, Color_Bg_Black, 194, MBASE(row), 234 - (digits * 8), MBASE(row) + 16); if (isnan(value)) @@ -489,44 +489,44 @@ void CrealityDWINClass::Draw_Float(float value, uint8_t row, bool selected/*=fal } } -void CrealityDWINClass::Draw_Option(uint8_t value, const char * const * options, uint8_t row, bool selected/*=false*/, bool color/*=false*/) { - uint16_t bColor = (selected) ? Select_Color : Color_Bg_Black, - tColor = (color) ? GetColor(value, Color_White, false) : Color_White; +void CrealityDWINClass::Draw_Option(const uint8_t value, const char * const * options, const uint8_t row, const bool selected/*=false*/, const bool color/*=false*/) { + const uint16_t bColor = selected ? Select_Color : Color_Bg_Black, + tColor = color ? GetColor(value, Color_White, false) : Color_White; DWIN_Draw_Rectangle(1, bColor, 202, MBASE(row) + 14, 258, MBASE(row) - 2); DWIN_Draw_String(false, DWIN_FONT_MENU, tColor, bColor, 202, MBASE(row) - 1, options[value]); } -uint16_t CrealityDWINClass::GetColor(uint8_t color, uint16_t original, bool light/*=false*/) { +uint16_t CrealityDWINClass::GetColor(const uint8_t color, const uint16_t original, const bool light/*=false*/) { switch (color) { case Default: return original; break; case White: - return (light) ? Color_Light_White : Color_White; + return light ? Color_Light_White : Color_White; break; case Green: - return (light) ? Color_Light_Green : Color_Green; + return light ? Color_Light_Green : Color_Green; break; case Cyan: - return (light) ? Color_Light_Cyan : Color_Cyan; + return light ? Color_Light_Cyan : Color_Cyan; break; case Blue: - return (light) ? Color_Light_Blue : Color_Blue; + return light ? Color_Light_Blue : Color_Blue; break; case Magenta: - return (light) ? Color_Light_Magenta : Color_Magenta; + return light ? Color_Light_Magenta : Color_Magenta; break; case Red: - return (light) ? Color_Light_Red : Color_Red; + return light ? Color_Light_Red : Color_Red; break; case Orange: - return (light) ? Color_Light_Orange : Color_Orange; + return light ? Color_Light_Orange : Color_Orange; break; case Yellow: - return (light) ? Color_Light_Yellow : Color_Yellow; + return light ? Color_Light_Yellow : Color_Yellow; break; case Brown: - return (light) ? Color_Light_Brown : Color_Brown; + return light ? Color_Light_Brown : Color_Brown; break; case Black: return Color_Black; @@ -535,7 +535,7 @@ uint16_t CrealityDWINClass::GetColor(uint8_t color, uint16_t original, bool ligh return Color_White; } -void CrealityDWINClass::Draw_Title(const char * ctitle) { +void CrealityDWINClass::Draw_Title(const char * const ctitle) { DWIN_Draw_String(false, DWIN_FONT_HEAD, GetColor(eeprom_settings.menu_top_txt, Color_White, false), Color_Bg_Blue, (DWIN_WIDTH - strlen(ctitle) * STAT_CHR_W) / 2, 5, ctitle); } void CrealityDWINClass::Draw_Title(FSTR_P const ftitle) { @@ -548,7 +548,7 @@ void _Decorate_Menu_Item(uint8_t row, uint8_t icon, bool more) { DWIN_Draw_Line(CrealityDWIN.GetColor(CrealityDWIN.eeprom_settings.menu_split_line, Line_Color, true), 16, MBASE(row) + 33, 256, MBASE(row) + 33); // Draw Menu Line } -void CrealityDWINClass::Draw_Menu_Item(uint8_t row, uint8_t icon/*=0*/, const char * label1, const char * label2, bool more/*=false*/, bool centered/*=false*/) { +void CrealityDWINClass::Draw_Menu_Item(const uint8_t row, const uint8_t icon/*=0*/, const char * const label1, const char * const label2, const bool more/*=false*/, const bool centered/*=false*/) { const uint8_t label_offset_y = (label1 || label2) ? MENU_CHR_H * 3 / 5 : 0, label1_offset_x = !centered ? LBLX : LBLX * 4/5 + _MAX(LBLX * 1U/5, (DWIN_WIDTH - LBLX - (label1 ? strlen(label1) : 0) * MENU_CHR_W) / 2), label2_offset_x = !centered ? LBLX : LBLX * 4/5 + _MAX(LBLX * 1U/5, (DWIN_WIDTH - LBLX - (label2 ? strlen(label2) : 0) * MENU_CHR_W) / 2); @@ -557,7 +557,7 @@ void CrealityDWINClass::Draw_Menu_Item(uint8_t row, uint8_t icon/*=0*/, const ch _Decorate_Menu_Item(row, icon, more); } -void CrealityDWINClass::Draw_Menu_Item(uint8_t row, uint8_t icon/*=0*/, FSTR_P const flabel1, FSTR_P const flabel2, bool more/*=false*/, bool centered/*=false*/) { +void CrealityDWINClass::Draw_Menu_Item(const uint8_t row, const uint8_t icon/*=0*/, FSTR_P const flabel1, FSTR_P const flabel2, const bool more/*=false*/, const bool centered/*=false*/) { const uint8_t label_offset_y = (flabel1 || flabel2) ? MENU_CHR_H * 3 / 5 : 0, label1_offset_x = !centered ? LBLX : LBLX * 4/5 + _MAX(LBLX * 1U/5, (DWIN_WIDTH - LBLX - (flabel1 ? strlen_P(FTOP(flabel1)) : 0) * MENU_CHR_W) / 2), label2_offset_x = !centered ? LBLX : LBLX * 4/5 + _MAX(LBLX * 1U/5, (DWIN_WIDTH - LBLX - (flabel2 ? strlen_P(FTOP(flabel2)) : 0) * MENU_CHR_W) / 2); @@ -566,7 +566,7 @@ void CrealityDWINClass::Draw_Menu_Item(uint8_t row, uint8_t icon/*=0*/, FSTR_P c _Decorate_Menu_Item(row, icon, more); } -void CrealityDWINClass::Draw_Checkbox(uint8_t row, bool value) { +void CrealityDWINClass::Draw_Checkbox(const uint8_t row, const bool value) { #if ENABLED(DWIN_CREALITY_LCD_CUSTOM_ICONS) // Draw appropriate checkbox icon DWIN_ICON_Show(ICON, (value ? ICON_Checkbox_T : ICON_Checkbox_F), 226, MBASE(row) - 3); #else // Draw a basic checkbox using rectangles and lines @@ -583,7 +583,7 @@ void CrealityDWINClass::Draw_Checkbox(uint8_t row, bool value) { #endif } -void CrealityDWINClass::Draw_Menu(uint8_t menu, uint8_t select/*=0*/, uint8_t scroll/*=0*/) { +void CrealityDWINClass::Draw_Menu(const uint8_t menu, const uint8_t select/*=0*/, const uint8_t scroll/*=0*/) { if (active_menu != menu) { last_menu = active_menu; if (process == Menu) last_selection = selection; @@ -600,12 +600,12 @@ void CrealityDWINClass::Draw_Menu(uint8_t menu, uint8_t select/*=0*/, uint8_t sc DWIN_Draw_Rectangle(1, GetColor(eeprom_settings.cursor_color, Rectangle_Color), 0, MBASE(selection - scrollpos) - 18, 14, MBASE(selection - scrollpos) + 33); } -void CrealityDWINClass::Redraw_Menu(bool lastprocess/*=true*/, bool lastselection/*=false*/, bool lastmenu/*=false*/) { - switch ((lastprocess) ? last_process : process) { +void CrealityDWINClass::Redraw_Menu(const bool lastproc/*=true*/, const bool lastsel/*=false*/, const bool lastmenu/*=false*/) { + switch (lastproc ? last_process : process) { case Menu: - Draw_Menu((lastmenu) ? last_menu : active_menu, (lastselection) ? last_selection : selection, (lastmenu) ? 0 : scrollpos); + Draw_Menu(lastmenu ? last_menu : active_menu, lastsel ? last_selection : selection, lastmenu ? 0 : scrollpos); break; - case Main: Draw_Main_Menu((lastselection) ? last_selection : selection); break; + case Main: Draw_Main_Menu(lastsel ? last_selection : selection); break; case Print: Draw_Print_Screen(); break; case File: Draw_SD_List(); break; default: break; @@ -671,7 +671,7 @@ void CrealityDWINClass::Main_Menu_Icons() { #endif } -void CrealityDWINClass::Draw_Main_Menu(uint8_t select/*=0*/) { +void CrealityDWINClass::Draw_Main_Menu(const uint8_t select/*=0*/) { process = Main; active_menu = MainMenu; selection = select; @@ -803,7 +803,7 @@ void CrealityDWINClass::Draw_Print_confirm() { DWIN_Draw_Rectangle(0, GetColor(eeprom_settings.highlight_box, Color_White), 85, 281, 188, 322); } -void CrealityDWINClass::Draw_SD_Item(uint8_t item, uint8_t row) { +void CrealityDWINClass::Draw_SD_Item(const uint8_t item, const uint8_t row) { if (item == 0) Draw_Menu_Item(0, ICON_Back, card.flag.workDirIsRoot ? F("Back") : F("..")); else { @@ -824,7 +824,7 @@ void CrealityDWINClass::Draw_SD_Item(uint8_t item, uint8_t row) { } } -void CrealityDWINClass::Draw_SD_List(bool removed/*=false*/) { +void CrealityDWINClass::Draw_SD_List(const bool removed/*=false*/) { Clear_Screen(); Draw_Title("Select File"); selection = 0; @@ -842,7 +842,7 @@ void CrealityDWINClass::Draw_SD_List(bool removed/*=false*/) { DWIN_Draw_Rectangle(1, GetColor(eeprom_settings.cursor_color, Rectangle_Color), 0, MBASE(0) - 18, 14, MBASE(0) + 33); } -void CrealityDWINClass::Draw_Status_Area(bool icons/*=false*/) { +void CrealityDWINClass::Draw_Status_Area(const bool icons/*=false*/) { if (icons) DWIN_Draw_Rectangle(1, Color_Bg_Black, 0, STATUS_Y, DWIN_WIDTH, DWIN_HEIGHT - 1); @@ -965,7 +965,7 @@ void CrealityDWINClass::Draw_Status_Area(bool icons/*=false*/) { if ((update_z = axis_should_home(Z_AXIS) && ui.get_blink())) DWIN_Draw_String(true, DWIN_FONT_MENU, GetColor(eeprom_settings.coordinates_text, Color_White), Color_Bg_Black, 205, 459, F(" -?- ")); else - DWIN_Draw_FloatValue(true, true, 0, DWIN_FONT_MENU, GetColor(eeprom_settings.coordinates_text, Color_White), Color_Bg_Black, 3, 2, 205, 459, (current_position.z>=0) ? current_position.z : 0); + DWIN_Draw_FloatValue(true, true, 0, DWIN_FONT_MENU, GetColor(eeprom_settings.coordinates_text, Color_White), Color_Bg_Black, 3, 2, 205, 459, current_position.z >= 0 ? current_position.z : 0); } DWIN_UpdateLCD(); } @@ -1001,15 +1001,15 @@ void MarlinUI::kill_screen(FSTR_P const error, FSTR_P const) { } void CrealityDWINClass::Popup_Select() { - const uint16_t c1 = (selection == 0) ? GetColor(eeprom_settings.highlight_box, Color_White) : Color_Bg_Window, - c2 = (selection == 0) ? Color_Bg_Window : GetColor(eeprom_settings.highlight_box, Color_White); + const uint16_t c1 = selection ? Color_Bg_Window : GetColor(eeprom_settings.highlight_box, Color_White), + c2 = selection ? GetColor(eeprom_settings.highlight_box, Color_White) : Color_Bg_Window; DWIN_Draw_Rectangle(0, c1, 25, 279, 126, 318); DWIN_Draw_Rectangle(0, c1, 24, 278, 127, 319); DWIN_Draw_Rectangle(0, c2, 145, 279, 246, 318); DWIN_Draw_Rectangle(0, c2, 144, 278, 247, 319); } -void CrealityDWINClass::Update_Status_Bar(bool refresh/*=false*/) { +void CrealityDWINClass::Update_Status_Bar(const bool refresh/*=false*/) { typedef TextScroller<30> Scroller; static bool new_msg; static Scroller scroller; @@ -1039,7 +1039,7 @@ void CrealityDWINClass::Update_Status_Bar(bool refresh/*=false*/) { /* Menu Item Config */ -void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/*=true*/) { +void CrealityDWINClass::Menu_Item_Handler(const uint8_t menu, const uint8_t item, bool draw/*=true*/) { const uint8_t row = item - scrollpos; #if HAS_LEVELING static bool level_state; @@ -1199,7 +1199,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ #if ENABLED(ADVANCED_PAUSE_FEATURE) case PREPARE_CHANGEFIL: if (draw) { - Draw_Menu_Item(row, ICON_ResumeEEPROM, F("Change Filament") + Draw_Menu_Item(row, ICON_ResumeEEPROM, GET_TEXT_F(MSG_FILAMENTCHANGE) #if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES) , nullptr, true #endif @@ -1737,7 +1737,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ break; case CHANGEFIL_LOAD: if (draw) - Draw_Menu_Item(row, ICON_WriteEEPROM, F("Load Filament")); + Draw_Menu_Item(row, ICON_WriteEEPROM, GET_TEXT_F(MSG_FILAMENTLOAD)); else { if (thermalManager.temp_hotend[0].target < thermalManager.extrude_min_temp) Popup_Handler(ETemp); @@ -1755,7 +1755,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ break; case CHANGEFIL_UNLOAD: if (draw) - Draw_Menu_Item(row, ICON_ReadEEPROM, F("Unload Filament")); + Draw_Menu_Item(row, ICON_ReadEEPROM, GET_TEXT_F(MSG_FILAMENTUNLOAD)); else { if (thermalManager.temp_hotend[0].target < thermalManager.extrude_min_temp) { Popup_Handler(ETemp); @@ -1774,7 +1774,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ break; case CHANGEFIL_CHANGE: if (draw) - Draw_Menu_Item(row, ICON_ResumeEEPROM, F("Change Filament")); + Draw_Menu_Item(row, ICON_ResumeEEPROM, GET_TEXT_F(MSG_FILAMENTCHANGE)); else { if (thermalManager.temp_hotend[0].target < thermalManager.extrude_min_temp) Popup_Handler(ETemp); @@ -3805,7 +3805,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ #if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES) case TUNE_CHANGEFIL: if (draw) - Draw_Menu_Item(row, ICON_ResumeEEPROM, F("Change Filament")); + Draw_Menu_Item(row, ICON_ResumeEEPROM, GET_TEXT_F(MSG_FILAMENTCHANGE)); else Popup_Handler(ConfFilChange); break; @@ -3931,32 +3931,32 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ } } -FSTR_P CrealityDWINClass::Get_Menu_Title(uint8_t menu) { +FSTR_P CrealityDWINClass::Get_Menu_Title(const uint8_t menu) { switch (menu) { - case MainMenu: return F("Main Menu"); - case Prepare: return F("Prepare"); + case MainMenu: return GET_TEXT_F(MSG_MAIN_MENU); + case Prepare: return GET_TEXT_F(MSG_PREPARE); case HomeMenu: return F("Homing Menu"); - case Move: return F("Move"); - case ManualLevel: return F("Manual Leveling"); + case Move: return GET_TEXT_F(MSG_MOVE_AXIS); + case ManualLevel: return GET_TEXT_F(MSG_BED_TRAMMING_MANUAL); #if HAS_ZOFFSET_ITEM - case ZOffset: return F("Z Offset"); + case ZOffset: return GET_TEXT_F(MSG_ZPROBE_ZOFFSET); #endif #if HAS_PREHEAT case Preheat: return F("Preheat"); #endif #if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES) - case ChangeFilament: return F("Change Filament"); + case ChangeFilament: return GET_TEXT_F(MSG_FILAMENTCHANGE); #endif #if HAS_CUSTOM_MENU case MenuCustom: #ifdef CUSTOM_MENU_CONFIG_TITLE return F(CUSTOM_MENU_CONFIG_TITLE); #else - return F("Custom Commands"); + return GET_TEXT_F(MSG_CUSTOM_COMMANDS); #endif #endif - case Control: return F("Control"); - case TempMenu: return F("Temperature"); + case Control: return GET_TEXT_F(MSG_CONTROL); + case TempMenu: return GET_TEXT_F(MSG_TEMPERATURE); #if HAS_HOTEND || HAS_HEATED_BED case PID: return F("PID Menu"); #endif @@ -3977,14 +3977,14 @@ FSTR_P CrealityDWINClass::Get_Menu_Title(uint8_t menu) { #if HAS_CLASSIC_JERK case MaxJerk: return F("Max Jerk"); #endif - case Steps: return F("Steps/mm"); + case Steps: return GET_TEXT_F(MSG_STEPS_PER_MM); case Visual: return F("Visual Settings"); - case Advanced: return F("Advanced Settings"); + case Advanced: return GET_TEXT_F(MSG_ADVANCED_SETTINGS); #if HAS_BED_PROBE case ProbeMenu: return F("Bed Probe"); #endif #if HAS_TRINAMIC_CONFIG - case TMCMenu: return F("TMC Drivers"); + case TMCMenu: return GET_TEXT_F(MSG_TMC_DRIVERS); #endif case ColorSettings: return F("UI Color Settings"); case Info: return F("Info"); @@ -4000,15 +4000,15 @@ FSTR_P CrealityDWINClass::Get_Menu_Title(uint8_t menu) { case UBLMesh: return F("UBL Bed Leveling"); #endif #if ENABLED(PROBE_MANUALLY) - case ManualMesh: return F("Mesh Bed Leveling"); + case ManualMesh: return GET_TEXT_F(MSG_MANUAL_LEVELING); #endif - case Tune: return F("Tune"); - case PreheatHotend: return F("Preheat Hotend"); + case Tune: return GET_TEXT_F(MSG_TUNE); + case PreheatHotend: return GET_TEXT_F(MSG_PREHEAT_HOTEND); } return F(""); } -uint8_t CrealityDWINClass::Get_Menu_Size(uint8_t menu) { +uint8_t CrealityDWINClass::Get_Menu_Size(const uint8_t menu) { switch (menu) { case Prepare: return PREPARE_TOTAL; case HomeMenu: return HOME_TOTAL; @@ -4085,7 +4085,7 @@ uint8_t CrealityDWINClass::Get_Menu_Size(uint8_t menu) { /* Popup Config */ -void CrealityDWINClass::Popup_Handler(PopupID popupid, bool option/*=false*/) { +void CrealityDWINClass::Popup_Handler(const PopupID popupid, const bool option/*=false*/) { popup = last_popup = popupid; switch (popupid) { case Pause: Draw_Popup(F("Pause Print"), F(""), F(""), Popup); break; @@ -4522,7 +4522,7 @@ void CrealityDWINClass::Popup_Control() { else { pause_menu_response = PAUSE_RESPONSE_RESUME_PRINT; if (printing) Popup_Handler(Resuming); - else Redraw_Menu(true, true, (active_menu==PreheatHotend)); + else Redraw_Menu(true, true, active_menu == PreheatHotend); } break; #endif // ADVANCED_PAUSE_FEATURE @@ -4581,7 +4581,7 @@ void CrealityDWINClass::Confirm_Control() { /* In-Menu Value Modification */ -void CrealityDWINClass::Setup_Value(float value, float min, float max, float unit, uint8_t type) { +void CrealityDWINClass::Setup_Value(const_float_t value, const_float_t min, const_float_t max, const_float_t unit, const uint8_t type) { if (TERN0(HAS_HOTEND, valuepointer == &thermalManager.temp_hotend[0].pid.Ki) || TERN0(HAS_HEATED_BED, valuepointer == &thermalManager.temp_bed.pid.Ki)) tempvalue = unscalePID_i(value) * unit; else if (TERN0(HAS_HOTEND, valuepointer == &thermalManager.temp_hotend[0].pid.Kd) || TERN0(HAS_HEATED_BED, valuepointer == &thermalManager.temp_bed.pid.Kd)) @@ -4597,38 +4597,38 @@ void CrealityDWINClass::Setup_Value(float value, float min, float max, float uni Draw_Float(tempvalue / unit, selection - scrollpos, true, valueunit); } -void CrealityDWINClass::Modify_Value(float &value, float min, float max, float unit, void (*f)()/*=nullptr*/) { +void CrealityDWINClass::Modify_Value(float &value, const_float_t min, const_float_t max, const_float_t unit, void (*f)()/*=nullptr*/) { valuepointer = &value; funcpointer = f; Setup_Value((float)value, min, max, unit, 0); } -void CrealityDWINClass::Modify_Value(uint8_t &value, float min, float max, float unit, void (*f)()/*=nullptr*/) { +void CrealityDWINClass::Modify_Value(uint8_t &value, const_float_t min, const_float_t max, const_float_t unit, void (*f)()/*=nullptr*/) { valuepointer = &value; funcpointer = f; Setup_Value((float)value, min, max, unit, 1); } -void CrealityDWINClass::Modify_Value(uint16_t &value, float min, float max, float unit, void (*f)()/*=nullptr*/) { +void CrealityDWINClass::Modify_Value(uint16_t &value, const_float_t min, const_float_t max, const_float_t unit, void (*f)()/*=nullptr*/) { valuepointer = &value; funcpointer = f; Setup_Value((float)value, min, max, unit, 2); } -void CrealityDWINClass::Modify_Value(int16_t &value, float min, float max, float unit, void (*f)()/*=nullptr*/) { +void CrealityDWINClass::Modify_Value(int16_t &value, const_float_t min, const_float_t max, const_float_t unit, void (*f)()/*=nullptr*/) { valuepointer = &value; funcpointer = f; Setup_Value((float)value, min, max, unit, 3); } -void CrealityDWINClass::Modify_Value(uint32_t &value, float min, float max, float unit, void (*f)()/*=nullptr*/) { +void CrealityDWINClass::Modify_Value(uint32_t &value, const_float_t min, const_float_t max, const_float_t unit, void (*f)()/*=nullptr*/) { valuepointer = &value; funcpointer = f; Setup_Value((float)value, min, max, unit, 4); } -void CrealityDWINClass::Modify_Value(int8_t &value, float min, float max, float unit, void (*f)()/*=nullptr*/) { +void CrealityDWINClass::Modify_Value(int8_t &value, const_float_t min, const_float_t max, const_float_t unit, void (*f)()/*=nullptr*/) { valuepointer = &value; funcpointer = f; Setup_Value((float)value, min, max, unit, 5); } -void CrealityDWINClass::Modify_Option(uint8_t value, const char * const * options, uint8_t max) { +void CrealityDWINClass::Modify_Option(const uint8_t value, const char * const * options, const uint8_t max) { tempvalue = value; valuepointer = const_cast(options); valuemin = 0; @@ -4652,7 +4652,7 @@ void CrealityDWINClass::Update_Status(const char * const text) { } } -void CrealityDWINClass::Start_Print(bool sd) { +void CrealityDWINClass::Start_Print(const bool sd) { sdprint = sd; if (!printing) { printing = true; @@ -4723,7 +4723,7 @@ void CrealityDWINClass::State_Update() { Popup_Handler(FilChange); else if (pause_menu_response == PAUSE_RESPONSE_RESUME_PRINT) { if (printing) Popup_Handler(Resuming); - else Redraw_Menu(true, true, (active_menu==PreheatHotend)); + else Redraw_Menu(true, true, active_menu == PreheatHotend); } } #endif @@ -4869,13 +4869,13 @@ void CrealityDWINClass::AudioFeedback(const bool success/*=true*/) { Update_Status(success ? "Success" : "Failed"); } -void CrealityDWINClass::Save_Settings(char *buff) { +void CrealityDWINClass::Save_Settings(char * const buff) { TERN_(AUTO_BED_LEVELING_UBL, eeprom_settings.tilt_grid_size = mesh_conf.tilt_grid - 1); eeprom_settings.corner_pos = corner_pos * 10; memcpy(buff, &eeprom_settings, _MIN(sizeof(eeprom_settings), eeprom_data_size)); } -void CrealityDWINClass::Load_Settings(const char *buff) { +void CrealityDWINClass::Load_Settings(const char * const buff) { memcpy(&eeprom_settings, buff, _MIN(sizeof(eeprom_settings), eeprom_data_size)); TERN_(AUTO_BED_LEVELING_UBL, mesh_conf.tilt_grid = eeprom_settings.tilt_grid_size + 1); if (eeprom_settings.corner_pos == 0) eeprom_settings.corner_pos = 325; diff --git a/Marlin/src/lcd/e3v2/jyersui/dwin.h b/Marlin/src/lcd/e3v2/jyersui/dwin.h index f360819df5..71db445aa8 100644 --- a/Marlin/src/lcd/e3v2/jyersui/dwin.h +++ b/Marlin/src/lcd/e3v2/jyersui/dwin.h @@ -172,17 +172,17 @@ public: static constexpr const char * const color_names[11] = { "Default", "White", "Green", "Cyan", "Blue", "Magenta", "Red", "Orange", "Yellow", "Brown", "Black" }; static constexpr const char * const preheat_modes[3] = { "Both", "Hotend", "Bed" }; - static void Clear_Screen(uint8_t e=3); - static void Draw_Float(float value, uint8_t row, bool selected=false, uint8_t minunit=10); - static void Draw_Option(uint8_t value, const char * const * options, uint8_t row, bool selected=false, bool color=false); - static uint16_t GetColor(uint8_t color, uint16_t original, bool light=false); - static void Draw_Checkbox(uint8_t row, bool value); - static void Draw_Title(const char * title); + static void Clear_Screen(const uint8_t e=3); + static void Draw_Float(const_float_t value, const uint8_t row, const bool selected=false, const uint8_t minunit=10); + static void Draw_Option(const uint8_t value, const char * const * options, const uint8_t row, const bool selected=false, const bool color=false); + static uint16_t GetColor(const uint8_t color, const uint16_t original, const bool light=false); + static void Draw_Checkbox(const uint8_t row, const bool value); + static void Draw_Title(const char * const title); static void Draw_Title(FSTR_P const title); - static void Draw_Menu_Item(uint8_t row, uint8_t icon=0, const char * const label1=nullptr, const char * const label2=nullptr, bool more=false, bool centered=false); - static void Draw_Menu_Item(uint8_t row, uint8_t icon=0, FSTR_P const flabel1=nullptr, FSTR_P const flabel2=nullptr, bool more=false, bool centered=false); - static void Draw_Menu(uint8_t menu, uint8_t select=0, uint8_t scroll=0); - static void Redraw_Menu(bool lastprocess=true, bool lastselection=false, bool lastmenu=false); + static void Draw_Menu_Item(const uint8_t row, uint8_t icon=0, const char * const label1=nullptr, const char * const label2=nullptr, const bool more=false, const bool centered=false); + static void Draw_Menu_Item(const uint8_t row, uint8_t icon=0, FSTR_P const flabel1=nullptr, FSTR_P const flabel2=nullptr, const bool more=false, const bool centered=false); + static void Draw_Menu(const uint8_t menu, const uint8_t select=0, const uint8_t scroll=0); + static void Redraw_Menu(const bool lastproc=true, const bool lastsel=false, const bool lastmenu=false); static void Redraw_Screen(); static void Main_Menu_Icons(); @@ -196,24 +196,23 @@ public: #endif static void Draw_Print_ProgressElapsed(); static void Draw_Print_confirm(); - static void Draw_SD_Item(uint8_t item, uint8_t row); - static void Draw_SD_List(bool removed=false); - static void Draw_Status_Area(bool icons=false); + static void Draw_SD_Item(const uint8_t item, const uint8_t row); + static void Draw_SD_List(const bool removed=false); + static void Draw_Status_Area(const bool icons=false); static void Draw_Popup(FSTR_P const line1, FSTR_P const line2, FSTR_P const line3, uint8_t mode, uint8_t icon=0); static void Popup_Select(); - static void Update_Status_Bar(bool refresh=false); + static void Update_Status_Bar(const bool refresh=false); - #if ENABLED(AUTO_BED_LEVELING_UBL) - static void Draw_Bed_Mesh(int16_t selected = -1, uint8_t gridline_width = 1, uint16_t padding_x = 8, uint16_t padding_y_top = 40 + 53 - 7); + #if HAS_MESH static void Set_Mesh_Viewer_Status(); #endif - static FSTR_P Get_Menu_Title(uint8_t menu); - static uint8_t Get_Menu_Size(uint8_t menu); - static void Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw=true); + static FSTR_P Get_Menu_Title(const uint8_t menu); + static uint8_t Get_Menu_Size(const uint8_t menu); + static void Menu_Item_Handler(const uint8_t menu, const uint8_t item, bool draw=true); - static void Popup_Handler(PopupID popupid, bool option = false); - static void Confirm_Handler(PopupID popupid); + static void Popup_Handler(const PopupID popupid, bool option=false); + static void Confirm_Handler(const PopupID popupid); static void Main_Menu_Control(); static void Menu_Control(); @@ -224,24 +223,24 @@ public: static void Popup_Control(); static void Confirm_Control(); - static void Setup_Value(float value, float min, float max, float unit, uint8_t type); - static void Modify_Value(float &value, float min, float max, float unit, void (*f)()=nullptr); - static void Modify_Value(uint8_t &value, float min, float max, float unit, void (*f)()=nullptr); - static void Modify_Value(uint16_t &value, float min, float max, float unit, void (*f)()=nullptr); - static void Modify_Value(int16_t &value, float min, float max, float unit, void (*f)()=nullptr); - static void Modify_Value(uint32_t &value, float min, float max, float unit, void (*f)()=nullptr); - static void Modify_Value(int8_t &value, float min, float max, float unit, void (*f)()=nullptr); - static void Modify_Option(uint8_t value, const char * const * options, uint8_t max); + static void Setup_Value(const_float_t value, const_float_t min, const_float_t max, const_float_t unit, const uint8_t type); + static void Modify_Value(float &value, const_float_t min, const_float_t max, const_float_t unit, void (*f)()=nullptr); + static void Modify_Value(uint8_t &value, const_float_t min, const_float_t max, const_float_t unit, void (*f)()=nullptr); + static void Modify_Value(uint16_t &value, const_float_t min, const_float_t max, const_float_t unit, void (*f)()=nullptr); + static void Modify_Value(int16_t &value, const_float_t min, const_float_t max, const_float_t unit, void (*f)()=nullptr); + static void Modify_Value(uint32_t &value, const_float_t min, const_float_t max, const_float_t unit, void (*f)()=nullptr); + static void Modify_Value(int8_t &value, const_float_t min, const_float_t max, const_float_t unit, void (*f)()=nullptr); + static void Modify_Option(const uint8_t value, const char * const * options, const uint8_t max); static void Update_Status(const char * const text); - static void Start_Print(bool sd); + static void Start_Print(const bool sd); static void Stop_Print(); static void Update(); static void State_Update(); static void Screen_Update(); static void AudioFeedback(const bool success=true); - static void Save_Settings(char *buff); - static void Load_Settings(const char *buff); + static void Save_Settings(char * const buff); + static void Load_Settings(const char * const buff); static void Reset_Settings(); }; From 9a1c02591ba4c3d5b41f4c64edd819ea1860b75b Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 14 Apr 2023 17:51:45 -0500 Subject: [PATCH 175/225] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Sta?= =?UTF-8?q?tus=20Message=20cleanup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/feature/mmu/mmu2.cpp | 6 ++-- Marlin/src/feature/pause.cpp | 15 ++++---- Marlin/src/gcode/bedlevel/G26.cpp | 36 ++++++++------------ Marlin/src/gcode/calibrate/M48.cpp | 2 +- Marlin/src/lcd/language/language_en.h | 4 ++- Marlin/src/lcd/marlinui.cpp | 4 +-- Marlin/src/lcd/marlinui.h | 8 +++++ Marlin/src/lcd/menu/menu_delta_calibrate.cpp | 4 +-- Marlin/src/module/settings.cpp | 4 +-- 9 files changed, 43 insertions(+), 40 deletions(-) diff --git a/Marlin/src/feature/mmu/mmu2.cpp b/Marlin/src/feature/mmu/mmu2.cpp index 7b6a48954b..b56e3d9c29 100644 --- a/Marlin/src/feature/mmu/mmu2.cpp +++ b/Marlin/src/feature/mmu/mmu2.cpp @@ -978,10 +978,10 @@ bool MMU2::eject_filament(const uint8_t index, const bool recover) { manage_response(false, false); if (recover) { - LCD_MESSAGE(MSG_MMU2_EJECT_RECOVER); + LCD_MESSAGE(MSG_MMU2_REMOVE_AND_CLICK); mmu2_attn_buzz(); - TERN_(HOST_PROMPT_SUPPORT, hostui.prompt_do(PROMPT_USER_CONTINUE, F("MMU2 Eject Recover"), FPSTR(CONTINUE_STR))); - TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(F("MMU2 Eject Recover"))); + TERN_(HOST_PROMPT_SUPPORT, hostui.prompt_do(PROMPT_USER_CONTINUE, GET_TEXT_F(MSG_MMU2_EJECT_RECOVER), FPSTR(CONTINUE_STR))); + TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_MMU2_EJECT_RECOVER))); TERN_(HAS_RESUME_CONTINUE, wait_for_user_response()); mmu2_attn_buzz(true); diff --git a/Marlin/src/feature/pause.cpp b/Marlin/src/feature/pause.cpp index 488f5920c2..9e0f51fad6 100644 --- a/Marlin/src/feature/pause.cpp +++ b/Marlin/src/feature/pause.cpp @@ -201,7 +201,7 @@ bool load_filament(const_float_t slow_load_length/*=0*/, const_float_t fast_load KEEPALIVE_STATE(PAUSED_FOR_USER); wait_for_user = true; // LCD click or M108 will clear this - TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(F("Load Filament"))); + TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_FILAMENTLOAD))); #if ENABLED(HOST_PROMPT_SUPPORT) const char tool = '0' + TERN0(MULTI_FILAMENT_SENSOR, active_extruder); @@ -465,7 +465,7 @@ bool pause_print(const_float_t retract, const xyz_pos_t &park_point, const bool // If axes don't need to home then the nozzle can park if (do_park) nozzle.park(0, park_point); // Park the nozzle by doing a Minimum Z Raise followed by an XY Move - TERN_(DWIN_LCD_PROUI, if (!do_park) ui.set_status(GET_TEXT_F(MSG_PARK_FAILED))); + if (!do_park) LCD_MESSAGE(MSG_PARK_FAILED); #if ENABLED(DUAL_X_CARRIAGE) const int8_t saved_ext = active_extruder; @@ -554,9 +554,7 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep TERN_(HOST_PROMPT_SUPPORT, hostui.prompt_do(PROMPT_INFO, GET_TEXT_F(MSG_REHEATING))); - TERN_(EXTENSIBLE_UI, ExtUI::onStatusChanged(GET_TEXT_F(MSG_REHEATING))); - - TERN_(DWIN_LCD_PROUI, LCD_MESSAGE(MSG_REHEATING)); + LCD_MESSAGE(MSG_REHEATING); // Re-enable the heaters if they timed out HOTEND_LOOP() thermalManager.reset_hotend_idle_timer(e); @@ -573,8 +571,11 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep HOTEND_LOOP() thermalManager.heater_idle[e].start(nozzle_timeout); TERN_(HOST_PROMPT_SUPPORT, hostui.prompt_do(PROMPT_USER_CONTINUE, GET_TEXT_F(MSG_REHEATDONE), FPSTR(CONTINUE_STR))); - TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_REHEATDONE))); - TERN_(DWIN_LCD_PROUI, LCD_MESSAGE(MSG_REHEATDONE)); + #if ENABLED(EXTENSIBLE_UI) + ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_REHEATDONE)); + #else + LCD_MESSAGE(MSG_REHEATDONE); + #endif IF_DISABLED(PAUSE_REHEAT_FAST_RESUME, wait_for_user = true); diff --git a/Marlin/src/gcode/bedlevel/G26.cpp b/Marlin/src/gcode/bedlevel/G26.cpp index aa6e0c1f0c..fe20423b8d 100644 --- a/Marlin/src/gcode/bedlevel/G26.cpp +++ b/Marlin/src/gcode/bedlevel/G26.cpp @@ -162,8 +162,8 @@ float g26_random_deviation = 0.0; */ bool user_canceled() { if (!ui.button_pressed()) return false; // Return if the button isn't pressed - ui.set_status(GET_TEXT_F(MSG_G26_CANCELED), 99); - TERN_(HAS_MARLINUI_MENU, ui.quick_feedback()); + LCD_MESSAGE_MAX(MSG_G26_CANCELED); + ui.quick_feedback(); ui.wait_for_release(); return true; } @@ -321,11 +321,9 @@ typedef struct { #if HAS_HEATED_BED if (bed_temp > 25) { - #if HAS_WIRED_LCD - ui.set_status(GET_TEXT_F(MSG_G26_HEATING_BED), 99); - ui.quick_feedback(); - TERN_(HAS_MARLINUI_MENU, ui.capture()); - #endif + LCD_MESSAGE_MAX(MSG_G26_HEATING_BED); + ui.quick_feedback(); + TERN_(HAS_MARLINUI_MENU, ui.capture()); thermalManager.setTargetBed(bed_temp); // Wait for the temperature to stabilize @@ -340,20 +338,16 @@ typedef struct { #endif // HAS_HEATED_BED // Start heating the active nozzle - #if HAS_WIRED_LCD - ui.set_status(GET_TEXT_F(MSG_G26_HEATING_NOZZLE), 99); - ui.quick_feedback(); - #endif + LCD_MESSAGE_MAX(MSG_G26_HEATING_NOZZLE); + ui.quick_feedback(); thermalManager.setTargetHotend(hotend_temp, active_extruder); // Wait for the temperature to stabilize if (!thermalManager.wait_for_hotend(active_extruder, true OPTARG(G26_CLICK_CAN_CANCEL, true))) return G26_ERR; - #if HAS_WIRED_LCD - ui.reset_status(); - ui.quick_feedback(); - #endif + ui.reset_status(); + ui.completion_feedback(); return G26_OK; } @@ -371,7 +365,7 @@ typedef struct { if (prime_flag == -1) { // The user wants to control how much filament gets purged ui.capture(); - ui.set_status(GET_TEXT_F(MSG_G26_MANUAL_PRIME), 99); + LCD_MESSAGE_MAX(MSG_G26_MANUAL_PRIME); ui.chirp(); destination = current_position; @@ -398,17 +392,15 @@ typedef struct { ui.wait_for_release(); - ui.set_status(GET_TEXT_F(MSG_G26_PRIME_DONE), 99); + LCD_MESSAGE_MAX(MSG_G26_PRIME_DONE); ui.quick_feedback(); ui.release(); } else #endif { - #if HAS_WIRED_LCD - ui.set_status(GET_TEXT_F(MSG_G26_FIXED_LENGTH), 99); - ui.quick_feedback(); - #endif + LCD_MESSAGE_MAX(MSG_G26_FIXED_LENGTH); + ui.quick_feedback(); destination = current_position; destination.e += prime_length; prepare_internal_move_to_destination(fr_slow_e); @@ -853,7 +845,7 @@ void GcodeSuite::G26() { } while (--g26_repeats && location.valid()); LEAVE: - ui.set_status(GET_TEXT_F(MSG_G26_LEAVING), -1); + LCD_MESSAGE_MIN(MSG_G26_LEAVING); TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(location, ExtUI::G26_FINISH)); g26.retract_filament(destination); diff --git a/Marlin/src/gcode/calibrate/M48.cpp b/Marlin/src/gcode/calibrate/M48.cpp index ff14175c71..5e0c21b42e 100644 --- a/Marlin/src/gcode/calibrate/M48.cpp +++ b/Marlin/src/gcode/calibrate/M48.cpp @@ -84,7 +84,7 @@ void GcodeSuite::M48() { }; if (!probe.can_reach(test_position)) { - ui.set_status(GET_TEXT_F(MSG_M48_OUT_OF_BOUNDS), 99); + LCD_MESSAGE_MAX(MSG_M48_OUT_OF_BOUNDS); SERIAL_ECHOLNPGM("? (X,Y) out of bounds."); return; } diff --git a/Marlin/src/lcd/language/language_en.h b/Marlin/src/lcd/language/language_en.h index 68c231d556..244d61a712 100644 --- a/Marlin/src/lcd/language/language_en.h +++ b/Marlin/src/lcd/language/language_en.h @@ -639,6 +639,7 @@ namespace Language_en { LSTR MSG_CHAMBER_COOLING = _UxGT("Chamber Cooling..."); LSTR MSG_LASER_COOLING = _UxGT("Laser Cooling..."); LSTR MSG_DELTA_CALIBRATE = _UxGT("Delta Calibration"); + LSTR MSG_DELTA_CALIBRATION_IN_PROGRESS = _UxGT("Delta Calibration in progress"); LSTR MSG_DELTA_CALIBRATE_X = _UxGT("Calibrate X"); LSTR MSG_DELTA_CALIBRATE_Y = _UxGT("Calibrate Y"); LSTR MSG_DELTA_CALIBRATE_Z = _UxGT("Calibrate Z"); @@ -749,7 +750,8 @@ namespace Language_en { LSTR MSG_MMU2_FILAMENT_N = _UxGT("Filament ~"); LSTR MSG_MMU2_RESET = _UxGT("Reset MMU"); LSTR MSG_MMU2_RESETTING = _UxGT("MMU Resetting..."); - LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("Remove, click"); + LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("MMU2 Eject Recover"); + LSTR MSG_MMU2_REMOVE_AND_CLICK = _UxGT("Remove and click..."); LSTR MSG_MIX = _UxGT("Mix"); LSTR MSG_MIX_COMPONENT_N = _UxGT("Component ="); diff --git a/Marlin/src/lcd/marlinui.cpp b/Marlin/src/lcd/marlinui.cpp index 88cdb99076..22b3fa27d7 100644 --- a/Marlin/src/lcd/marlinui.cpp +++ b/Marlin/src/lcd/marlinui.cpp @@ -671,7 +671,7 @@ void MarlinUI::init() { #if HAS_MARLINUI_MENU if (use_click()) { #if BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) - next_filament_display = millis() + 5000UL; // Show status message for 5s + pause_filament_display(); #endif goto_screen(menu_main); reinit_lcd(); // Revive a noisy shared SPI LCD @@ -1592,7 +1592,7 @@ void MarlinUI::init() { #endif #if BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) - next_filament_display = ms + 5000UL; // Show status message for 5s + pause_filament_display(ms); // Show status message for 5s #endif #endif diff --git a/Marlin/src/lcd/marlinui.h b/Marlin/src/lcd/marlinui.h index 9d6d235e96..32d747da43 100644 --- a/Marlin/src/lcd/marlinui.h +++ b/Marlin/src/lcd/marlinui.h @@ -469,6 +469,7 @@ public: #if BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) static millis_t next_filament_display; + static void pause_filament_display(const millis_t ms=millis()) { next_filament_display = ms + 5000UL; } #endif #if HAS_TOUCH_SLEEP @@ -493,6 +494,11 @@ public: static void status_screen(); + #else + + static void quick_feedback(const bool=true) {} + static void completion_feedback(const bool=true) {} + #endif #if HAS_MARLINUI_U8GLIB @@ -803,5 +809,7 @@ private: #define LCD_MESSAGE_F(S) ui.set_status(F(S)) #define LCD_MESSAGE(M) ui.set_status(GET_TEXT_F(M)) +#define LCD_MESSAGE_MIN(M) ui.set_status(GET_TEXT_F(M), -1) +#define LCD_MESSAGE_MAX(M) ui.set_status(GET_TEXT_F(M), 99) #define LCD_ALERTMESSAGE_F(S) ui.set_alert_status(F(S)) #define LCD_ALERTMESSAGE(M) ui.set_alert_status(GET_TEXT_F(M)) diff --git a/Marlin/src/lcd/menu/menu_delta_calibrate.cpp b/Marlin/src/lcd/menu/menu_delta_calibrate.cpp index a33edd1659..3b04de9eb0 100644 --- a/Marlin/src/lcd/menu/menu_delta_calibrate.cpp +++ b/Marlin/src/lcd/menu/menu_delta_calibrate.cpp @@ -68,8 +68,8 @@ void _man_probe_pt(const xy_pos_t &xy) { float lcd_probe_pt(const xy_pos_t &xy) { _man_probe_pt(xy); ui.defer_status_screen(); - TERN_(HOST_PROMPT_SUPPORT, hostui.prompt_do(PROMPT_USER_CONTINUE, F("Delta Calibration in progress"), FPSTR(CONTINUE_STR))); - TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(F("Delta Calibration in progress"))); + TERN_(HOST_PROMPT_SUPPORT, hostui.prompt_do(PROMPT_USER_CONTINUE, GET_TEXT_F(MSG_DELTA_CALIBRATION_IN_PROGRESS), FPSTR(CONTINUE_STR))); + TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_DELTA_CALIBRATION_IN_PROGRESS))); TERN_(HAS_RESUME_CONTINUE, wait_for_user_response()); ui.goto_previous_screen_no_defer(); return current_position.z; diff --git a/Marlin/src/module/settings.cpp b/Marlin/src/module/settings.cpp index ca5b940c5d..8ebc8c61f5 100644 --- a/Marlin/src/module/settings.cpp +++ b/Marlin/src/module/settings.cpp @@ -1706,7 +1706,7 @@ void MarlinSettings::postprocess() { stored_ver[1] = '\0'; } DEBUG_ECHO_MSG("EEPROM version mismatch (EEPROM=", stored_ver, " Marlin=" EEPROM_VERSION ")"); - TERN_(DWIN_LCD_PROUI, LCD_MESSAGE(MSG_ERR_EEPROM_VERSION)); + LCD_MESSAGE(MSG_ERR_EEPROM_VERSION); TERN_(HOST_PROMPT_SUPPORT, hostui.notify(GET_TEXT_F(MSG_ERR_EEPROM_VERSION))); IF_DISABLED(EEPROM_AUTO_INIT, ui.eeprom_alert_version()); @@ -2662,7 +2662,7 @@ void MarlinSettings::postprocess() { else if (working_crc != stored_crc) { eeprom_error = true; DEBUG_ERROR_MSG("EEPROM CRC mismatch - (stored) ", stored_crc, " != ", working_crc, " (calculated)!"); - TERN_(DWIN_LCD_PROUI, LCD_MESSAGE(MSG_ERR_EEPROM_CRC)); + LCD_MESSAGE(MSG_ERR_EEPROM_CRC); TERN_(HOST_EEPROM_CHITCHAT, hostui.notify(GET_TEXT_F(MSG_ERR_EEPROM_CRC))); IF_DISABLED(EEPROM_AUTO_INIT, ui.eeprom_alert_crc()); } From 78bdf34b7bc56a0a8aa193cfd824ad2841ed25dc Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 14 Apr 2023 18:06:56 -0500 Subject: [PATCH 176/225] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Hos?= =?UTF-8?q?tUI::continue=5Fprompt=20method?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/feature/host_actions.h | 7 +++++-- Marlin/src/feature/mmu/mmu2.cpp | 2 +- Marlin/src/feature/pause.cpp | 6 +++--- Marlin/src/gcode/config/M43.cpp | 2 +- Marlin/src/gcode/lcd/M0_M1.cpp | 4 ++-- Marlin/src/gcode/sd/M1001.cpp | 2 +- Marlin/src/lcd/menu/menu_delta_calibrate.cpp | 2 +- Marlin/src/module/probe.cpp | 4 ++-- 8 files changed, 16 insertions(+), 13 deletions(-) diff --git a/Marlin/src/feature/host_actions.h b/Marlin/src/feature/host_actions.h index 3f75562398..c030ebad01 100644 --- a/Marlin/src/feature/host_actions.h +++ b/Marlin/src/feature/host_actions.h @@ -35,6 +35,8 @@ PROMPT_INFO }; + extern const char CONTINUE_STR[], DISMISS_STR[]; + #endif class HostUI { @@ -111,6 +113,9 @@ class HostUI { static void prompt_do(const PromptReason reason, FSTR_P const pstr, const char extra_char, FSTR_P const btn1=nullptr, FSTR_P const btn2=nullptr); static void prompt_do(const PromptReason reason, const char * const cstr, const char extra_char, FSTR_P const btn1=nullptr, FSTR_P const btn2=nullptr); + static void continue_prompt(FSTR_P const fstr) { prompt_do(PROMPT_USER_CONTINUE, fstr, FPSTR(CONTINUE_STR)); } + static void continue_prompt(const char * const cstr) { prompt_do(PROMPT_USER_CONTINUE, cstr, FPSTR(CONTINUE_STR)); } + static void prompt_open(const PromptReason reason, FSTR_P const pstr, FSTR_P const btn1=nullptr, FSTR_P const btn2=nullptr) { if (host_prompt_reason == PROMPT_NOT_DEFINED) prompt_do(reason, pstr, btn1, btn2); } @@ -124,5 +129,3 @@ class HostUI { }; extern HostUI hostui; - -extern const char CONTINUE_STR[], DISMISS_STR[]; diff --git a/Marlin/src/feature/mmu/mmu2.cpp b/Marlin/src/feature/mmu/mmu2.cpp index b56e3d9c29..ea58c2859b 100644 --- a/Marlin/src/feature/mmu/mmu2.cpp +++ b/Marlin/src/feature/mmu/mmu2.cpp @@ -980,7 +980,7 @@ bool MMU2::eject_filament(const uint8_t index, const bool recover) { if (recover) { LCD_MESSAGE(MSG_MMU2_REMOVE_AND_CLICK); mmu2_attn_buzz(); - TERN_(HOST_PROMPT_SUPPORT, hostui.prompt_do(PROMPT_USER_CONTINUE, GET_TEXT_F(MSG_MMU2_EJECT_RECOVER), FPSTR(CONTINUE_STR))); + TERN_(HOST_PROMPT_SUPPORT, hostui.continue_prompt(GET_TEXT_F(MSG_MMU2_EJECT_RECOVER))); TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_MMU2_EJECT_RECOVER))); TERN_(HAS_RESUME_CONTINUE, wait_for_user_response()); mmu2_attn_buzz(true); diff --git a/Marlin/src/feature/pause.cpp b/Marlin/src/feature/pause.cpp index 9e0f51fad6..35d1fd79f9 100644 --- a/Marlin/src/feature/pause.cpp +++ b/Marlin/src/feature/pause.cpp @@ -262,7 +262,7 @@ bool load_filament(const_float_t slow_load_length/*=0*/, const_float_t fast_load if (show_lcd) ui.pause_show_message(PAUSE_MESSAGE_PURGE); TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_FILAMENT_CHANGE_PURGE))); - TERN_(HOST_PROMPT_SUPPORT, hostui.prompt_do(PROMPT_USER_CONTINUE, GET_TEXT_F(MSG_FILAMENT_CHANGE_PURGE), FPSTR(CONTINUE_STR))); + TERN_(HOST_PROMPT_SUPPORT, hostui.continue_prompt(GET_TEXT_F(MSG_FILAMENT_CHANGE_PURGE))); wait_for_user = true; // A click or M108 breaks the purge_length loop for (float purge_count = purge_length; purge_count > 0 && wait_for_user; --purge_count) unscaled_e_move(1, ADVANCED_PAUSE_PURGE_FEEDRATE); @@ -530,7 +530,7 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep // Wait for filament insert by user and press button KEEPALIVE_STATE(PAUSED_FOR_USER); - TERN_(HOST_PROMPT_SUPPORT, hostui.prompt_do(PROMPT_USER_CONTINUE, GET_TEXT_F(MSG_NOZZLE_PARKED), FPSTR(CONTINUE_STR))); + TERN_(HOST_PROMPT_SUPPORT, hostui.continue_prompt(GET_TEXT_F(MSG_NOZZLE_PARKED))); TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_NOZZLE_PARKED))); wait_for_user = true; // LCD click or M108 will clear this while (wait_for_user) { @@ -570,7 +570,7 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep HOTEND_LOOP() thermalManager.heater_idle[e].start(nozzle_timeout); - TERN_(HOST_PROMPT_SUPPORT, hostui.prompt_do(PROMPT_USER_CONTINUE, GET_TEXT_F(MSG_REHEATDONE), FPSTR(CONTINUE_STR))); + TERN_(HOST_PROMPT_SUPPORT, hostui.continue_prompt(GET_TEXT_F(MSG_REHEATDONE))); #if ENABLED(EXTENSIBLE_UI) ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_REHEATDONE)); #else diff --git a/Marlin/src/gcode/config/M43.cpp b/Marlin/src/gcode/config/M43.cpp index a3e837eb53..c427fe7a31 100644 --- a/Marlin/src/gcode/config/M43.cpp +++ b/Marlin/src/gcode/config/M43.cpp @@ -362,7 +362,7 @@ void GcodeSuite::M43() { #if HAS_RESUME_CONTINUE KEEPALIVE_STATE(PAUSED_FOR_USER); wait_for_user = true; - TERN_(HOST_PROMPT_SUPPORT, hostui.prompt_do(PROMPT_USER_CONTINUE, F("M43 Waiting..."), FPSTR(CONTINUE_STR))); + TERN_(HOST_PROMPT_SUPPORT, hostui.continue_prompt(F("M43 Waiting..."))); #if ENABLED(EXTENSIBLE_UI) ExtUI::onUserConfirmRequired(F("M43 Waiting...")); #else diff --git a/Marlin/src/gcode/lcd/M0_M1.cpp b/Marlin/src/gcode/lcd/M0_M1.cpp index 35afea0f6e..120a36a578 100644 --- a/Marlin/src/gcode/lcd/M0_M1.cpp +++ b/Marlin/src/gcode/lcd/M0_M1.cpp @@ -87,9 +87,9 @@ void GcodeSuite::M0_M1() { #if ENABLED(HOST_PROMPT_SUPPORT) if (parser.string_arg) - hostui.prompt_do(PROMPT_USER_CONTINUE, parser.string_arg, FPSTR(CONTINUE_STR)); + hostui.continue_prompt(parser.string_arg); else - hostui.prompt_do(PROMPT_USER_CONTINUE, parser.codenum ? F("M1 Stop") : F("M0 Stop"), FPSTR(CONTINUE_STR)); + hostui.continue_prompt(parser.codenum ? F("M1 Stop") : F("M0 Stop")); #endif TERN_(HAS_RESUME_CONTINUE, wait_for_user_response(ms)); diff --git a/Marlin/src/gcode/sd/M1001.cpp b/Marlin/src/gcode/sd/M1001.cpp index c7728a5a47..1d1d1a4b7f 100644 --- a/Marlin/src/gcode/sd/M1001.cpp +++ b/Marlin/src/gcode/sd/M1001.cpp @@ -97,7 +97,7 @@ void GcodeSuite::M1001() { if (long_print) { printerEventLEDs.onPrintCompleted(); TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_PRINT_DONE))); - TERN_(HOST_PROMPT_SUPPORT, hostui.prompt_do(PROMPT_USER_CONTINUE, GET_TEXT_F(MSG_PRINT_DONE), FPSTR(CONTINUE_STR))); + TERN_(HOST_PROMPT_SUPPORT, hostui.continue_prompt(GET_TEXT_F(MSG_PRINT_DONE))); TERN_(HAS_RESUME_CONTINUE, wait_for_user_response(SEC_TO_MS(TERN(HAS_MARLINUI_MENU, PE_LEDS_COMPLETED_TIME, 30)))); printerEventLEDs.onResumeAfterWait(); } diff --git a/Marlin/src/lcd/menu/menu_delta_calibrate.cpp b/Marlin/src/lcd/menu/menu_delta_calibrate.cpp index 3b04de9eb0..fe0be04398 100644 --- a/Marlin/src/lcd/menu/menu_delta_calibrate.cpp +++ b/Marlin/src/lcd/menu/menu_delta_calibrate.cpp @@ -68,7 +68,7 @@ void _man_probe_pt(const xy_pos_t &xy) { float lcd_probe_pt(const xy_pos_t &xy) { _man_probe_pt(xy); ui.defer_status_screen(); - TERN_(HOST_PROMPT_SUPPORT, hostui.prompt_do(PROMPT_USER_CONTINUE, GET_TEXT_F(MSG_DELTA_CALIBRATION_IN_PROGRESS), FPSTR(CONTINUE_STR))); + TERN_(HOST_PROMPT_SUPPORT, hostui.continue_prompt(GET_TEXT_F(MSG_DELTA_CALIBRATION_IN_PROGRESS))); TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_DELTA_CALIBRATION_IN_PROGRESS))); TERN_(HAS_RESUME_CONTINUE, wait_for_user_response()); ui.goto_previous_screen_no_defer(); diff --git a/Marlin/src/module/probe.cpp b/Marlin/src/module/probe.cpp index 0f2fca119c..75295c5f5a 100644 --- a/Marlin/src/module/probe.cpp +++ b/Marlin/src/module/probe.cpp @@ -168,7 +168,7 @@ xyz_pos_t Probe::offset; // Initialized by settings.load() LCD_MESSAGE(MSG_MANUAL_DEPLOY_TOUCHMI); ui.return_to_status(); - TERN_(HOST_PROMPT_SUPPORT, hostui.prompt_do(PROMPT_USER_CONTINUE, F("Deploy TouchMI"), FPSTR(CONTINUE_STR))); + TERN_(HOST_PROMPT_SUPPORT, hostui.continue_prompt(F("Deploy TouchMI"))); TERN_(HAS_RESUME_CONTINUE, wait_for_user_response()); ui.reset_status(); ui.goto_screen(prev_screen); @@ -364,7 +364,7 @@ FORCE_INLINE void probe_specific_action(const bool deploy) { ui.set_status(ds_str, 99); SERIAL_ECHOLNF(deploy ? GET_EN_TEXT_F(MSG_MANUAL_DEPLOY) : GET_EN_TEXT_F(MSG_MANUAL_STOW)); - TERN_(HOST_PROMPT_SUPPORT, hostui.prompt_do(PROMPT_USER_CONTINUE, ds_str, FPSTR(CONTINUE_STR))); + TERN_(HOST_PROMPT_SUPPORT, hostui.continue_prompt(ds_str)); TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(ds_str)); TERN_(DWIN_LCD_PROUI, DWIN_Popup_Confirm(ICON_BLTouch, ds_str, FPSTR(CONTINUE_STR))); TERN_(HAS_RESUME_CONTINUE, wait_for_user_response()); From cc35cb3876ed95163b4715bc29da96813906663a Mon Sep 17 00:00:00 2001 From: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Sun, 16 Apr 2023 03:26:08 +0200 Subject: [PATCH 177/225] =?UTF-8?q?=F0=9F=90=9B=20Fix=20Configuration=20Em?= =?UTF-8?q?bedding=20(#25688)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/gcode/eeprom/M500-M504.cpp | 16 ++++++++++++---- buildroot/share/PlatformIO/scripts/signature.py | 3 ++- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Marlin/src/gcode/eeprom/M500-M504.cpp b/Marlin/src/gcode/eeprom/M500-M504.cpp index 6da1d1cbd7..31da2c5adf 100644 --- a/Marlin/src/gcode/eeprom/M500-M504.cpp +++ b/Marlin/src/gcode/eeprom/M500-M504.cpp @@ -66,11 +66,19 @@ void GcodeSuite::M502() { #if ENABLED(CONFIGURATION_EMBEDDING) if (parser.seen_test('C')) { - SdBaseFile file; - const uint16_t size = sizeof(mc_zip); + MediaFile file; // Need to create the config size on the SD card - if (file.open(card.getroot(), "mc.zip", O_WRITE|O_CREAT) && file.write(pgm_read_ptr(mc_zip), size) != -1 && file.close()) - SERIAL_ECHO_MSG("Configuration saved as 'mc.zip'"); + MediaFile root = card.getroot(); + if (file.open(&root, "mc.zip", O_WRITE|O_CREAT)) { + bool success = true; + for (uint16_t i = 0; success && i < sizeof(mc_zip); ++i) { + const uint8_t c = pgm_read_byte(&mc_zip[i]); + file.write(c); + } + success = file.close() && success; + + if (success) SERIAL_ECHO_MSG("Configuration saved as 'mc.zip'"); + } } #endif } diff --git a/buildroot/share/PlatformIO/scripts/signature.py b/buildroot/share/PlatformIO/scripts/signature.py index 4fc0084e57..0da02f837b 100644 --- a/buildroot/share/PlatformIO/scripts/signature.py +++ b/buildroot/share/PlatformIO/scripts/signature.py @@ -56,13 +56,14 @@ def compute_build_signature(env): files_to_keep = [ 'Marlin/Configuration.h', 'Marlin/Configuration_adv.h' ] build_path = Path(env['PROJECT_BUILD_DIR'], env['PIOENV']) + build_path_relative = Path('.pio', 'build', env['PIOENV']) # Check if we can skip processing hashes = '' for header in files_to_keep: hashes += get_file_sha256sum(header)[0:10] - marlin_json = build_path / 'marlin_config.json' + marlin_json = build_path_relative / 'marlin_config.json' marlin_zip = build_path / 'mc.zip' # Read existing config file From 883bde07c650068f10995b7c58cd72a432d4b78e Mon Sep 17 00:00:00 2001 From: Andrew <18502096+classicrocker883@users.noreply.github.com> Date: Sat, 15 Apr 2023 21:51:51 -0400 Subject: [PATCH 178/225] =?UTF-8?q?=F0=9F=94=A7=20Animated=20bootscreen=20?= =?UTF-8?q?U8glib-only=20(#25684)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration_adv.h | 4 +++- ini/stm32f4.ini | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index dd96459004..294cc44487 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -1535,6 +1535,9 @@ //#define SHOW_CUSTOM_BOOTSCREEN // Show the bitmap in Marlin/_Bootscreen.h on startup. #endif #if HAS_MARLINUI_U8GLIB + #if ENABLED(SHOW_BOOTSCREEN) + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~3260 (or ~940) bytes of flash. + #endif //#define CUSTOM_STATUS_SCREEN_IMAGE // Show the bitmap in Marlin/_Statusscreen.h on the status screen. #endif #endif @@ -1947,7 +1950,6 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar - //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~3260 (or ~940) bytes of flash. // Frivolous Game Options //#define MARLIN_BRICKOUT diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini index e9b9a956de..7060f95db7 100644 --- a/ini/stm32f4.ini +++ b/ini/stm32f4.ini @@ -47,6 +47,7 @@ board = marlin_STM32F407ZGT6 board_build.variant = MARLIN_FLY_F407ZG board_build.offset = 0x8000 upload_protocol = dfu + # # FYSETC S6 (STM32F446RET6 ARM Cortex-M4) # From 6e3b58d76a00e861a9945f3073719f82473a0faf Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 15 Apr 2023 22:24:14 -0500 Subject: [PATCH 179/225] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Any?= =?UTF-8?q?cubic=20shared=20code=20(#25690)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{anycubic_vyper => anycubic}/Tunes.cpp | 27 +-- .../{anycubic_vyper => anycubic}/Tunes.h | 137 ++--------- Marlin/src/lcd/extui/anycubic/common_defs.h | 138 +++++++++++ .../extui/anycubic_chiron/FileNavigator.cpp | 28 +-- .../lcd/extui/anycubic_chiron/FileNavigator.h | 38 +-- .../src/lcd/extui/anycubic_chiron/Tunes.cpp | 61 ----- Marlin/src/lcd/extui/anycubic_chiron/Tunes.h | 224 ------------------ .../lcd/extui/anycubic_chiron/chiron_tft.cpp | 10 +- .../extui/anycubic_chiron/chiron_tft_defs.h | 140 ++--------- .../lcd/extui/anycubic_vyper/FileNavigator.h | 33 ++- .../src/lcd/extui/anycubic_vyper/dgus_tft.cpp | 18 +- .../lcd/extui/anycubic_vyper/dgus_tft_defs.h | 119 +--------- ini/features.ini | 1 + platformio.ini | 4 +- 14 files changed, 264 insertions(+), 714 deletions(-) rename Marlin/src/lcd/extui/{anycubic_vyper => anycubic}/Tunes.cpp (71%) rename Marlin/src/lcd/extui/{anycubic_vyper => anycubic}/Tunes.h (54%) create mode 100644 Marlin/src/lcd/extui/anycubic/common_defs.h delete mode 100644 Marlin/src/lcd/extui/anycubic_chiron/Tunes.cpp delete mode 100644 Marlin/src/lcd/extui/anycubic_chiron/Tunes.h diff --git a/Marlin/src/lcd/extui/anycubic_vyper/Tunes.cpp b/Marlin/src/lcd/extui/anycubic/Tunes.cpp similarity index 71% rename from Marlin/src/lcd/extui/anycubic_vyper/Tunes.cpp rename to Marlin/src/lcd/extui/anycubic/Tunes.cpp index d7f0e4b6d4..118f049bc1 100644 --- a/Marlin/src/lcd/extui/anycubic_vyper/Tunes.cpp +++ b/Marlin/src/lcd/extui/anycubic/Tunes.cpp @@ -21,7 +21,7 @@ */ /** - * lcd/extui/anycubic_vyper/Tunes.cpp + * lcd/extui/anycubic/Tunes.cpp */ /*********************************************************************** @@ -31,28 +31,23 @@ #include "../../../inc/MarlinConfigPre.h" -#if ENABLED(ANYCUBIC_LCD_VYPER) +#if EITHER(ANYCUBIC_LCD_CHIRON, ANYCUBIC_LCD_VYPER) #include "Tunes.h" +#include "../../../libs/buzzer.h" #include "../ui_api.h" namespace Anycubic { - void PlayTune(const uint8_t beeperPin, const uint16_t *tune, const uint8_t speed=1) { - uint8_t pos = 1; - uint16_t wholenotelen = tune[0] / speed; - do { - uint16_t freq = tune[pos]; - uint16_t notelen = wholenotelen / tune[pos + 1]; - - ::tone(beeperPin, freq, notelen); - ExtUI::delay_ms(notelen); - pos += 2; - - if (pos >= MAX_TUNE_LENGTH) break; - } while (tune[pos] != n_END); + void PlayTune(const uint16_t *tune, const uint8_t speed=1) { + const uint16_t wholenotelen = tune[0] / speed; + for (uint8_t pos = 1; pos < MAX_TUNE_LENGTH; pos += 2) { + const uint16_t freq = tune[pos]; + if (freq == n_END) break; + BUZZ(freq, wholenotelen / tune[pos + 1]); + } } } -#endif // ANYCUBIC_LCD_VYPER +#endif // ANYCUBIC_LCD_CHIRON || ANYCUBIC_LCD_VYPER diff --git a/Marlin/src/lcd/extui/anycubic_vyper/Tunes.h b/Marlin/src/lcd/extui/anycubic/Tunes.h similarity index 54% rename from Marlin/src/lcd/extui/anycubic_vyper/Tunes.h rename to Marlin/src/lcd/extui/anycubic/Tunes.h index 9a06768ac6..a05107738d 100644 --- a/Marlin/src/lcd/extui/anycubic_vyper/Tunes.h +++ b/Marlin/src/lcd/extui/anycubic/Tunes.h @@ -22,7 +22,7 @@ #pragma once /** - * lcd/extui/anycubic_vyper/Tunes.h + * lcd/extui/anycubic/Tunes.h */ /************************************************************************** @@ -41,127 +41,23 @@ #define MAX_TUNE_LENGTH 128 -// Special notes! -#define n_P 0 // silence or pause -#define n_END 10000 // end of tune marker - // Note duration divisors -#define l_T1 1 -#define l_T2 2 -#define l_T3 3 -#define l_T4 4 -#define l_T8 8 -#define l_T16 16 +enum { l_T1=1, l_T2 =2, l_T3=3, l_T4 =4, l_T8=8, l_T16=16 }; // Note Frequency -#define n_C0 16 -#define n_CS0 17 -#define n_D0 18 -#define n_DS0 19 -#define n_E0 21 -#define n_F0 22 -#define n_FS0 23 -#define n_G0 25 -#define n_GS0 26 -#define n_A0 28 -#define n_AS0 29 -#define n_B0 31 -#define n_C1 33 -#define n_CS1 35 -#define n_D1 37 -#define n_DS1 39 -#define n_E1 41 -#define n_F1 44 -#define n_FS1 46 -#define n_G1 49 -#define n_GS1 52 -#define n_A1 55 -#define n_AS1 58 -#define n_B1 62 -#define n_C2 65 -#define n_CS2 69 -#define n_D2 73 -#define n_DS2 78 -#define n_E2 82 -#define n_F2 87 -#define n_FS2 93 -#define n_G2 98 -#define n_GS2 104 -#define n_A2 110 -#define n_AS2 117 -#define n_B2 123 -#define n_C3 131 -#define n_CS3 139 -#define n_D3 147 -#define n_DS3 156 -#define n_E3 165 -#define n_F3 175 -#define n_FS3 185 -#define n_G3 196 -#define n_GS3 208 -#define n_A3 220 -#define n_AS3 233 -#define n_B3 247 -#define n_C4 262 -#define n_CS4 277 -#define n_D4 294 -#define n_DS4 311 -#define n_E4 330 -#define n_F4 349 -#define n_FS4 370 -#define n_G4 392 -#define n_GS4 415 -#define n_A4 440 -#define n_AS4 466 -#define n_B4 494 -#define n_C5 523 -#define n_CS5 554 -#define n_D5 587 -#define n_DS5 622 -#define n_E5 659 -#define n_F5 698 -#define n_FS5 740 -#define n_G5 784 -#define n_GS5 831 -#define n_A5 880 -#define n_AS5 932 -#define n_B5 988 -#define n_C6 1047 -#define n_CS6 1109 -#define n_D6 1175 -#define n_DS6 1245 -#define n_E6 1319 -#define n_F6 1397 -#define n_FS6 1480 -#define n_G6 1568 -#define n_GS6 1661 -#define n_A6 1760 -#define n_AS6 1865 -#define n_B6 1976 -#define n_C7 2093 -#define n_CS7 2217 -#define n_D7 2349 -#define n_DS7 2489 -#define n_E7 2637 -#define n_F7 2794 -#define n_FS7 2960 -#define n_G7 3136 -#define n_GS7 3322 -#define n_A7 3520 -#define n_AS7 3729 -#define n_B7 3951 -#define n_C8 4186 -#define n_CS8 4435 -#define n_D8 4699 -#define n_DS8 4978 -#define n_E8 5274 -#define n_F8 5587 -#define n_FS8 5920 -#define n_G8 6272 -#define n_GS8 6645 -#define n_A8 7040 -#define n_AS8 7459 -#define n_B8 7902 +enum { +n_P = 0, // silence or pause +n_C0= 16, n_CS0= 17, n_D0= 18, n_DS0= 19, n_E0= 21, n_F0= 22, n_FS0= 23, n_G0= 25, n_GS0= 26, n_A0= 28, n_AS0= 29, n_B0= 31, +n_C1= 33, n_CS1= 35, n_D1= 37, n_DS1= 39, n_E1= 41, n_F1= 44, n_FS1= 46, n_G1= 49, n_GS1= 52, n_A1= 55, n_AS1= 58, n_B1= 62, +n_C2= 65, n_CS2= 69, n_D2= 73, n_DS2= 78, n_E2= 82, n_F2= 87, n_FS2= 93, n_G2= 98, n_GS2= 104, n_A2= 110, n_AS2= 117, n_B2= 123, +n_C3= 131, n_CS3= 139, n_D3= 147, n_DS3= 156, n_E3= 165, n_F3= 175, n_FS3= 185, n_G3= 196, n_GS3= 208, n_A3= 220, n_AS3= 233, n_B3= 247, +n_C4= 262, n_CS4= 277, n_D4= 294, n_DS4= 311, n_E4= 330, n_F4= 349, n_FS4= 370, n_G4= 392, n_GS4= 415, n_A4= 440, n_AS4= 466, n_B4= 494, +n_C5= 523, n_CS5= 554, n_D5= 587, n_DS5= 622, n_E5= 659, n_F5= 698, n_FS5= 740, n_G5= 784, n_GS5= 831, n_A5= 880, n_AS5= 932, n_B5= 988, +n_C6=1047, n_CS6=1109, n_D6=1175, n_DS6=1245, n_E6=1319, n_F6=1397, n_FS6=1480, n_G6=1568, n_GS6=1661, n_A6=1760, n_AS6=1865, n_B6=1976, +n_C7=2093, n_CS7=2217, n_D7=2349, n_DS7=2489, n_E7=2637, n_F7=2794, n_FS7=2960, n_G7=3136, n_GS7=3322, n_A7=3520, n_AS7=3729, n_B7=3951, +n_C8=4186, n_CS8=4435, n_D8=4699, n_DS8=4978, n_E8=5274, n_F8=5587, n_FS8=5920, n_G8=6272, n_GS8=6645, n_A8=7040, n_AS8=7459, n_B8=7902, +n_END=10000 // end of tune marker +}; namespace Anycubic { @@ -194,8 +90,7 @@ namespace Anycubic { const uint16_t Anycubic_PowerOn[] = { 1000, n_F7,l_T8, n_P,l_T8, n_C7,l_T8, n_P,l_T8, n_D7,l_T8, n_P,l_T8, - n_E7,l_T8, n_P,l_T8, n_D7,l_T4, n_P,l_T4, n_G7,l_T4, n_P,l_T4, - n_A7,l_T2, n_P,l_T1, + n_E7,l_T8, n_P,l_T8, n_D7,l_T4, n_P,l_T4, n_END }; diff --git a/Marlin/src/lcd/extui/anycubic/common_defs.h b/Marlin/src/lcd/extui/anycubic/common_defs.h new file mode 100644 index 0000000000..4257f1dabf --- /dev/null +++ b/Marlin/src/lcd/extui/anycubic/common_defs.h @@ -0,0 +1,138 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2023 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 + +/** + * lcd/extui/anycubic/common_defs.h + */ + +#include "../../../inc/MarlinConfigPre.h" + +#define ACDEBUGLEVEL 0 // 0: off, 255: all levels enabled + +#if ACDEBUGLEVEL + // Bit-masks for selective debug: + enum ACDebugMask : uint8_t { + AC_INFO = 1, + AC_ACTION = 2, + AC_FILE = 4, + AC_PANEL = 8, + AC_MARLIN = 16, + AC_SOME = 32, + AC_ALL = 64 + }; + #define ACDEBUG(mask) ( ((mask) & ACDEBUGLEVEL) == mask ) // Debug flag macro +#else + #define ACDEBUG(mask) false +#endif + +#define TFTSer LCD_SERIAL // Serial interface for TFT panel now uses marlinserial +#define MAX_FOLDER_DEPTH 4 // Limit folder depth TFT has a limit for the file path +#define MAX_CMND_LEN 16 * MAX_FOLDER_DEPTH // Maximum Length for a Panel command +#define MAX_PATH_LEN 16 * MAX_FOLDER_DEPTH // Maximum number of characters in a SD file path + +#define AC_HEATER_FAULT_VALIDATION_TIME 5 // number of 1/2 second loops before signalling a heater fault +#define AC_LOWEST_MESHPOINT_VAL Z_PROBE_LOW_POINT // The lowest value you can set for a single mesh point offset + +// TFT panel commands +#define AC_msg_sd_card_inserted F("J00") +#define AC_msg_sd_card_removed F("J01") +#define AC_msg_no_sd_card F("J02") +#define AC_msg_usb_connected F("J03") +#define AC_msg_print_from_sd_card F("J04") +#define AC_msg_pause F("J05") +#define AC_msg_nozzle_heating F("J06") +#define AC_msg_nozzle_heating_done F("J07") +#define AC_msg_bed_heating F("J08") +#define AC_msg_bed_heating_done F("J09") +#define AC_msg_nozzle_temp_abnormal F("J10") +#define AC_msg_kill_lcd F("J11") +#define AC_msg_ready F("J12") +#define AC_msg_low_nozzle_temp F("J13") +#define AC_msg_print_complete F("J14") +#define AC_msg_filament_out_alert F("J15") +#define AC_msg_stop F("J16") +#define AC_msg_main_board_has_reset F("J17") +#define AC_msg_paused F("J18") +#define AC_msg_j19_unknown F("J19") +#define AC_msg_sd_file_open_success F("J20") +#define AC_msg_sd_file_open_failed F("J21") +#define AC_msg_level_monitor_finished F("J22") +#define AC_msg_filament_out_block F("J23") +#define AC_msg_probing_not_allowed F("J24") +#define AC_msg_probing_complete F("J25") +#define AC_msg_start_probing F("J26") +#define AC_msg_version F("J27") + +// TFT panel messages +#define MARLIN_msg_start_probing PSTR("Probing Point 1/25") +#define MARLIN_msg_probing_failed PSTR("Probing Failed") +#define MARLIN_msg_ready PSTR(" Ready.") +#define MARLIN_msg_print_paused PSTR("Print Paused") +#define MARLIN_msg_print_aborted PSTR("Print Aborted") +#define MARLIN_msg_extruder_heating PSTR("E Heating...") +#define MARLIN_msg_bed_heating PSTR("Bed Heating...") + +#define MARLIN_msg_nozzle_parked PSTR("Nozzle Parked") +#define MARLIN_msg_heater_timeout PSTR("Heater Timeout") +#define MARLIN_msg_reheating PSTR("Reheating...") +#define MARLIN_msg_reheat_done PSTR("Reheat finished.") +#define MARLIN_msg_filament_purging PSTR("Filament Purging...") + +#define MARLIN_msg_special_pause PSTR("PB") // AnyCubic + +#define AC_cmnd_auto_unload_filament F("M701") // Marlin unload routine +#define AC_cmnd_auto_load_filament F("M702 M0 PB") // AnyCubic: Marlin load routine, pause for user to clean nozzle + +#define AC_cmnd_manual_load_filament F("M83\nG1 E50 F700\nM82") // replace the manual panel commands with something a little faster +#define AC_cmnd_manual_unload_filament F("M83\nG1 E-50 F1200\nM82") +#define AC_cmnd_enable_leveling F("M420SV") +#define AC_cmnd_power_loss_recovery F("G28XYR5\nG28Z") // Lift, home X and Y then home Z when in 'safe' position + +namespace Anycubic { + + enum heater_state_t : uint8_t { + AC_heater_off, + AC_heater_temp_set, + AC_heater_temp_reached + }; + + enum timer_event_t : uint8_t { + AC_timer_started, + AC_timer_paused, + AC_timer_stopped + }; + + enum media_event_t : uint8_t { + AC_media_inserted, + AC_media_removed, + AC_media_error + }; + + enum file_menu_t : uint8_t { + AC_menu_file, + AC_menu_command, + AC_menu_change_to_file, + AC_menu_change_to_command + }; + +} // Anycubic diff --git a/Marlin/src/lcd/extui/anycubic_chiron/FileNavigator.cpp b/Marlin/src/lcd/extui/anycubic_chiron/FileNavigator.cpp index 90e3321252..6e77b2b2fd 100644 --- a/Marlin/src/lcd/extui/anycubic_chiron/FileNavigator.cpp +++ b/Marlin/src/lcd/extui/anycubic_chiron/FileNavigator.cpp @@ -63,7 +63,7 @@ FileNavigator filenavigator; FileList FileNavigator::filelist; // Instance of the Marlin file API uint16_t FileNavigator::lastpanelindex; uint16_t FileNavigator::currentindex; // override the panel request -uint8_t FileNavigator::currentfolderdepth; +uint8_t FileNavigator::folderdepth; uint16_t FileNavigator::currentfolderindex[MAX_FOLDER_DEPTH]; // track folder pos for iteration char FileNavigator::currentfoldername[MAX_PATH_LEN + 1]; // Current folder path @@ -71,7 +71,7 @@ FileNavigator::FileNavigator() { reset(); } void FileNavigator::reset() { currentfoldername[0] = '\0'; - currentfolderdepth = 0; + folderdepth = 0; currentindex = 0; lastpanelindex = 0; ZERO(currentfolderindex); @@ -84,25 +84,25 @@ void FileNavigator::reset() { void FileNavigator::refresh() { filelist.refresh(); } void FileNavigator::changeDIR(const char *folder) { - if (currentfolderdepth >= MAX_FOLDER_DEPTH) return; // limit the folder depth - currentfolderindex[currentfolderdepth] = currentindex; + if (folderdepth >= MAX_FOLDER_DEPTH) return; // limit the folder depth + currentfolderindex[folderdepth] = currentindex; strcat(currentfoldername, folder); strcat(currentfoldername, "/"); filelist.changeDir(folder); - currentfolderdepth++; + folderdepth++; currentindex = 0; } void FileNavigator::upDIR() { if (!filelist.isAtRootDir()) { filelist.upDir(); - currentfolderdepth--; - currentindex = currentfolderindex[currentfolderdepth]; // restore last position in the folder + folderdepth--; + currentindex = currentfolderindex[folderdepth]; // restore last position in the folder filelist.seek(currentindex); // restore file information } // Remove the child folder from the stored path - if (currentfolderdepth == 0) + if (folderdepth == 0) currentfoldername[0] = '\0'; else { char * const pos = strchr(currentfoldername, '/'); @@ -122,7 +122,7 @@ void FileNavigator::skiptofileindex(uint16_t skip) { changeDIR(filelist.shortFilename()); } // valid file if (currentindex == filelist.count()) { - if (currentfolderdepth > 0) { + if (folderdepth > 0) { upDIR(); currentindex++; } @@ -147,7 +147,7 @@ void FileNavigator::skiptofileindex(uint16_t skip) { } lastpanelindex = index; - if (currentindex == 0 && currentfolderdepth > 0) { // Add a link to go up a folder + if (currentindex == 0 && folderdepth > 0) { // Add a link to go up a folder // The new panel ignores entries that don't end in .GCO or .gcode so add and pad them. if (paneltype <= AC_panel_new) { TFTSer.println("<<.GCO"); @@ -186,7 +186,7 @@ void FileNavigator::skiptofileindex(uint16_t skip) { } else { // Not DIR TFTSer.write('/'); - if (currentfolderdepth > 0) TFTSer.print(currentfoldername); + if (folderdepth > 0) TFTSer.print(currentfoldername); TFTSer.println(filelist.shortFilename()); TFTSer.print(filelist.longFilename()); @@ -221,7 +221,7 @@ void FileNavigator::skiptofileindex(uint16_t skip) { } // valid file if (currentindex == filelist.count()) { - if (currentfolderdepth > 0) { + if (folderdepth > 0) { upDIR(); currentindex++; } @@ -233,9 +233,9 @@ void FileNavigator::skiptofileindex(uint16_t skip) { void FileNavigator::sendFile(panel_type_t paneltype) { TFTSer.write('/'); - if (currentfolderdepth > 0) TFTSer.print(currentfoldername); + if (folderdepth > 0) TFTSer.print(currentfoldername); TFTSer.println(filelist.shortFilename()); - if (currentfolderdepth > 0) TFTSer.print(currentfoldername); + if (folderdepth > 0) TFTSer.print(currentfoldername); TFTSer.println(filelist.longFilename()); } diff --git a/Marlin/src/lcd/extui/anycubic_chiron/FileNavigator.h b/Marlin/src/lcd/extui/anycubic_chiron/FileNavigator.h index ca4283f54b..71236c4df9 100644 --- a/Marlin/src/lcd/extui/anycubic_chiron/FileNavigator.h +++ b/Marlin/src/lcd/extui/anycubic_chiron/FileNavigator.h @@ -36,26 +36,26 @@ using namespace ExtUI; namespace Anycubic { -class FileNavigator { - public: - FileNavigator(); - static void reset(); - static void getFiles(uint16_t, panel_type_t, uint8_t filesneeded=4); - static void upDIR(); - static void changeDIR(const char *); - static void sendFile(panel_type_t); - static void refresh(); - static void skiptofileindex(uint16_t); + class FileNavigator { + public: + static FileList filelist; - static FileList filelist; - private: - static uint16_t lastpanelindex; - static uint16_t currentindex; - static uint8_t currentfolderdepth; - static uint16_t currentfolderindex[MAX_FOLDER_DEPTH]; - static char currentfoldername[MAX_PATH_LEN + 1]; -}; + FileNavigator(); + static void reset(); + static void getFiles(uint16_t, panel_type_t, uint8_t filesneeded=4); + static void upDIR(); + static void changeDIR(const char *); + static void sendFile(panel_type_t); + static void refresh(); + static void skiptofileindex(uint16_t); + private: + static uint16_t lastpanelindex; + static uint16_t currentindex; + static uint8_t folderdepth; + static uint16_t currentfolderindex[MAX_FOLDER_DEPTH]; + static char currentfoldername[MAX_PATH_LEN + 1]; + }; -extern FileNavigator filenavigator; + extern FileNavigator filenavigator; } diff --git a/Marlin/src/lcd/extui/anycubic_chiron/Tunes.cpp b/Marlin/src/lcd/extui/anycubic_chiron/Tunes.cpp deleted file mode 100644 index adbf98e3bb..0000000000 --- a/Marlin/src/lcd/extui/anycubic_chiron/Tunes.cpp +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (c) 2020 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 . - * - */ - -/** - * lcd/extui/anycubic_chiron/Tunes.cpp - * - * Extensible_UI implementation for Anycubic Chiron - * Written By Nick Wells, 2020 [https://github.com/SwiftNick] - * (not affiliated with Anycubic, Ltd.) - */ - -/*********************************************************************** - * A Utility to play tunes using the buzzer in the printer controller. * - * See Tunes.h for note and tune definitions. * - ***********************************************************************/ - -#include "../../../inc/MarlinConfigPre.h" - -// TODO: Use Marlin's built-in tone player instead. - -#if ENABLED(ANYCUBIC_LCD_CHIRON) - -#include "Tunes.h" -#include "../ui_api.h" - -namespace Anycubic { - - void PlayTune(uint8_t beeperPin, const uint16_t *tune, uint8_t speed=1) { - uint8_t pos = 1; - const uint16_t wholenotelen = tune[0] / speed; - do { - const uint16_t freq = tune[pos], notelen = wholenotelen / tune[pos + 1]; - ::tone(beeperPin, freq, notelen); - ExtUI::delay_ms(notelen); - pos += 2; - if (pos >= MAX_TUNE_LENGTH) break; - } while (tune[pos] != n_END); - } - -} - -#endif // ANYCUBIC_LCD_CHIRON diff --git a/Marlin/src/lcd/extui/anycubic_chiron/Tunes.h b/Marlin/src/lcd/extui/anycubic_chiron/Tunes.h deleted file mode 100644 index bf2e92d03e..0000000000 --- a/Marlin/src/lcd/extui/anycubic_chiron/Tunes.h +++ /dev/null @@ -1,224 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (c) 2020 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 - -/** - * lcd/extui/anycubic_chiron/Tunes.h - * - * Extensible_UI implementation for Anycubic Chiron - * Written By Nick Wells, 2020 [https://github.com/SwiftNick] - * (not affiliated with Anycubic, Ltd.) - */ - -/************************************************************************** - * Notes definition from https://pages.mtu.edu/~suits/NoteFreqCalcs.html * - * * - * The format of a tune is: * - * {,,, ,, ... } * - * * - * 1) The first value is the length of a whole note in milliseconds * - * 2) Then a sequence of pitch and duration pairs * - * 3) Finally the END marker so your tunes can be any length up to * - * MAX_TUNE_LEN * - *************************************************************************/ - -#include - -#define MAX_TUNE_LENGTH 128 - -// Special notes! -#define n_P 0 // silence or pause -#define n_END 10000 // end of tune marker - -// Note duration divisors -#define l_T1 1 -#define l_T2 2 -#define l_T3 3 -#define l_T4 4 -#define l_T8 8 -#define l_T16 16 - -// Note Frequency -#define n_C0 16 -#define n_CS0 17 -#define n_D0 18 -#define n_DS0 19 -#define n_E0 21 -#define n_F0 22 -#define n_FS0 23 -#define n_G0 25 -#define n_GS0 26 -#define n_A0 28 -#define n_AS0 29 -#define n_B0 31 -#define n_C1 33 -#define n_CS1 35 -#define n_D1 37 -#define n_DS1 39 -#define n_E1 41 -#define n_F1 44 -#define n_FS1 46 -#define n_G1 49 -#define n_GS1 52 -#define n_A1 55 -#define n_AS1 58 -#define n_B1 62 -#define n_C2 65 -#define n_CS2 69 -#define n_D2 73 -#define n_DS2 78 -#define n_E2 82 -#define n_F2 87 -#define n_FS2 93 -#define n_G2 98 -#define n_GS2 104 -#define n_A2 110 -#define n_AS2 117 -#define n_B2 123 -#define n_C3 131 -#define n_CS3 139 -#define n_D3 147 -#define n_DS3 156 -#define n_E3 165 -#define n_F3 175 -#define n_FS3 185 -#define n_G3 196 -#define n_GS3 208 -#define n_A3 220 -#define n_AS3 233 -#define n_B3 247 -#define n_C4 262 -#define n_CS4 277 -#define n_D4 294 -#define n_DS4 311 -#define n_E4 330 -#define n_F4 349 -#define n_FS4 370 -#define n_G4 392 -#define n_GS4 415 -#define n_A4 440 -#define n_AS4 466 -#define n_B4 494 -#define n_C5 523 -#define n_CS5 554 -#define n_D5 587 -#define n_DS5 622 -#define n_E5 659 -#define n_F5 698 -#define n_FS5 740 -#define n_G5 784 -#define n_GS5 831 -#define n_A5 880 -#define n_AS5 932 -#define n_B5 988 -#define n_C6 1047 -#define n_CS6 1109 -#define n_D6 1175 -#define n_DS6 1245 -#define n_E6 1319 -#define n_F6 1397 -#define n_FS6 1480 -#define n_G6 1568 -#define n_GS6 1661 -#define n_A6 1760 -#define n_AS6 1865 -#define n_B6 1976 -#define n_C7 2093 -#define n_CS7 2217 -#define n_D7 2349 -#define n_DS7 2489 -#define n_E7 2637 -#define n_F7 2794 -#define n_FS7 2960 -#define n_G7 3136 -#define n_GS7 3322 -#define n_A7 3520 -#define n_AS7 3729 -#define n_B7 3951 -#define n_C8 4186 -#define n_CS8 4435 -#define n_D8 4699 -#define n_DS8 4978 -#define n_E8 5274 -#define n_F8 5587 -#define n_FS8 5920 -#define n_G8 6272 -#define n_GS8 6645 -#define n_A8 7040 -#define n_AS8 7459 -#define n_B8 7902 - -namespace Anycubic { - - void PlayTune(uint8_t beeperPin, const uint16_t *tune, uint8_t speed); - - // Only uncomment the tunes you are using to save memory - // This will help you write tunes! - // https://www.apronus.com/music/flashpiano.htm - - const uint16_t SOS[] = { - 250, - n_G6,l_T3, n_P,l_T3, n_G6,l_T3, n_P,l_T3, n_G6,l_T3, n_P,l_T1, - n_G6,l_T1, n_P,l_T3, n_G6,l_T1, n_P,l_T3, n_G6,l_T1, n_P,l_T1, - n_G6,l_T3, n_P,l_T3, n_G6,l_T3, n_P,l_T3, n_G6,l_T3, n_P,l_T1, - n_END - }; - - const uint16_t BeepBeep[] = { - 500, - n_C7,l_T8, n_P,l_T16, n_C7,l_T8, n_P,l_T8, - n_END - }; - - const uint16_t BeepBeepBeeep[] = { - 1000, - n_G7,l_T4, n_P,l_T16, n_G7,l_T4, n_P,l_T8, n_G7,l_T2, - n_END - }; - - const uint16_t Anycubic_PowerOn[] = { - 1000, - n_F7,l_T8, n_P,l_T8, n_C7,l_T8, n_P,l_T8, n_D7,l_T8, n_P,l_T8, - n_E7,l_T8, n_P,l_T8, n_D7,l_T4, n_P,l_T4, n_G7,l_T4, n_P,l_T4, - n_A7,l_T2, n_P,l_T1, - n_END - }; - - const uint16_t GB_PowerOn[] = { - 500, - n_C6,l_T4, n_P,l_T16, n_C7,l_T2, n_P,l_T8, - n_END - }; - - const uint16_t Heater_Timedout[] = { - 1000, - n_C6,l_T1, - n_END - }; - - const uint16_t FilamentOut[] = { - 1000, - n_AS7,l_T4, n_P,l_T16, n_FS7,l_T2, - n_END - }; - -} diff --git a/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.cpp b/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.cpp index dce503776b..45fb73c02f 100644 --- a/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.cpp +++ b/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.cpp @@ -33,7 +33,7 @@ #if ENABLED(ANYCUBIC_LCD_CHIRON) #include "chiron_tft.h" -#include "Tunes.h" +#include "../anycubic/Tunes.h" #include "FileNavigator.h" #include "../../../gcode/queue.h" @@ -104,7 +104,7 @@ void ChironTFT::Startup() { injectCommands(AC_cmnd_enable_leveling); // Startup tunes are defined in Tunes.h - PlayTune(BEEPER_PIN, TERN(AC_DEFAULT_STARTUP_TUNE, Anycubic_PowerOn, GB_PowerOn), 1); + PlayTune(TERN(AC_DEFAULT_STARTUP_TUNE, Anycubic_PowerOn, GB_PowerOn), 1); #if ACDEBUGLEVEL SERIAL_ECHOLNPGM("AC Debug Level ", ACDEBUGLEVEL); @@ -192,7 +192,7 @@ void ChironTFT::FilamentRunout() { // 1 Signal filament out last_error = AC_error_filament_runout; SendtoTFTLN(isPrintingFromMedia() ? AC_msg_filament_out_alert : AC_msg_filament_out_block); - PlayTune(BEEPER_PIN, FilamentOut, 1); + PlayTune(FilamentOut, 1); } void ChironTFT::ConfirmationRequest(const char * const msg) { @@ -253,7 +253,7 @@ void ChironTFT::StatusChange(const char * const msg) { } // If probing fails don't save the mesh raise the probe above the bad point if (strcmp_P(msg, MARLIN_msg_probing_failed) == 0) { - PlayTune(BEEPER_PIN, BeepBeepBeeep, 1); + PlayTune(BeepBeepBeeep, 1); injectCommands(F("G1 Z50 F500")); SendtoTFTLN(AC_msg_probing_complete); printer_state = AC_printer_idle; @@ -307,7 +307,7 @@ void ChironTFT::StatusChange(const char * const msg) { void ChironTFT::PowerLossRecovery() { printer_state = AC_printer_resuming_from_power_outage; // Play tune to notify user we can recover. last_error = AC_error_powerloss; - PlayTune(BEEPER_PIN, SOS, 1); + PlayTune(SOS, 1); SERIAL_ECHOLNF(AC_msg_powerloss_recovery); } diff --git a/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft_defs.h b/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft_defs.h index e3609b5408..6cad95e68d 100644 --- a/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft_defs.h +++ b/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft_defs.h @@ -29,116 +29,39 @@ * (not affiliated with Anycubic, Ltd.) */ -#include "../../../inc/MarlinConfigPre.h" -//#define ACDEBUGLEVEL 4 +#include "../anycubic/common_defs.h" -#if ACDEBUGLEVEL - // Bit-masks for selective debug: - enum ACDebugMask : uint8_t { - AC_INFO = 1, - AC_ACTION = 2, - AC_FILE = 4, - AC_PANEL = 8, - AC_MARLIN = 16, - AC_SOME = 32, - AC_ALL = 64 - }; - #define ACDEBUG(mask) ( ((mask) & ACDEBUGLEVEL) == mask ) // Debug flag macro -#else - #define ACDEBUG(mask) false -#endif +// TFT panel messages +#define AC_msg_mesh_changes_abandoned F("Mesh changes abandoned, previous mesh restored.") +#define AC_msg_mesh_changes_saved F("Mesh changes saved.") +#define AC_msg_old_panel_detected F("Standard TFT panel detected!") +#define AC_msg_new_panel_detected F("New TFT panel detected!") +#define AC_msg_auto_panel_detection F("Auto detect panel type (assuming new panel)") +#define AC_msg_old_panel_set F("Set for standard TFT panel.") +#define AC_msg_new_panel_set F("Set for new TFT panel.") -#define TFTSer LCD_SERIAL // Serial interface for TFT panel now uses marlinserial -#define MAX_FOLDER_DEPTH 4 // Limit folder depth TFT has a limit for the file path -#define MAX_CMND_LEN 16 * MAX_FOLDER_DEPTH // Maximum Length for a Panel command -#define MAX_PATH_LEN 16 * MAX_FOLDER_DEPTH // Maximum number of characters in a SD file path - -#define AC_HEATER_FAULT_VALIDATION_TIME 5 // number of 1/2 second loops before signalling a heater fault -#define AC_LOWEST_MESHPOINT_VAL -10 // The lowest value you can set for a single mesh point offset - - // TFT panel commands -#define AC_msg_sd_card_inserted F("J00") -#define AC_msg_sd_card_removed F("J01") -#define AC_msg_no_sd_card F("J02") -#define AC_msg_usb_connected F("J03") -#define AC_msg_print_from_sd_card F("J04") -#define AC_msg_pause F("J05") -#define AC_msg_nozzle_heating F("J06") -#define AC_msg_nozzle_heating_done F("J07") -#define AC_msg_bed_heating F("J08") -#define AC_msg_bed_heating_done F("J09") -#define AC_msg_nozzle_temp_abnormal F("J10") -#define AC_msg_kill_lcd F("J11") -#define AC_msg_ready F("J12") -#define AC_msg_low_nozzle_temp F("J13") -#define AC_msg_print_complete F("J14") -#define AC_msg_filament_out_alert F("J15") -#define AC_msg_stop F("J16") -#define AC_msg_main_board_has_reset F("J17") -#define AC_msg_paused F("J18") -#define AC_msg_j19_unknown F("J19") -#define AC_msg_sd_file_open_success F("J20") -#define AC_msg_sd_file_open_failed F("J21") -#define AC_msg_level_monitor_finished F("J22") -#define AC_msg_filament_out_block F("J23") -#define AC_msg_probing_not_allowed F("J24") -#define AC_msg_probing_complete F("J25") -#define AC_msg_start_probing F("J26") -#define AC_msg_version F("J27") -#define AC_msg_mesh_changes_abandoned F("Mesh changes abandoned, previous mesh restored.") -#define AC_msg_mesh_changes_saved F("Mesh changes saved.") -#define AC_msg_old_panel_detected F("Standard TFT panel detected!") -#define AC_msg_new_panel_detected F("New TFT panel detected!") -#define AC_msg_auto_panel_detection F("Auto detect panel type (assuming new panel)") -#define AC_msg_old_panel_set F("Set for standard TFT panel.") -#define AC_msg_new_panel_set F("Set for new TFT panel.") - -#define AC_msg_powerloss_recovery F("Resuming from power outage! select the same SD file then press resume") +#define AC_msg_powerloss_recovery F("Resuming from power outage! select the same SD file then press resume") // Error messages must not contain spaces -#define AC_msg_error_bed_temp F("Abnormal_bed_temp") -#define AC_msg_error_hotend_temp F("Abnormal_hotend_temp") -#define AC_msg_error_sd_card F("SD_card_error") -#define AC_msg_filament_out F("Filament_runout") -#define AC_msg_power_loss F("Power_failure") -#define AC_msg_eeprom_version F("EEPROM_ver_wrong") +#define AC_msg_error_bed_temp F("Abnormal_bed_temp") +#define AC_msg_error_hotend_temp F("Abnormal_hotend_temp") +#define AC_msg_error_sd_card F("SD_card_error") +#define AC_msg_filament_out F("Filament_runout") +#define AC_msg_power_loss F("Power_failure") +#define AC_msg_eeprom_version F("EEPROM_ver_wrong") -#define MARLIN_msg_start_probing PSTR("Probing Point 1/25") -#define MARLIN_msg_probing_failed PSTR("Probing Failed") -#define MARLIN_msg_ready PSTR(" Ready.") -#define MARLIN_msg_print_paused PSTR("Print Paused") -#define MARLIN_msg_print_aborted PSTR("Print Aborted") -#define MARLIN_msg_extruder_heating PSTR("E Heating...") -#define MARLIN_msg_bed_heating PSTR("Bed Heating...") -#define MARLIN_msg_EEPROM_version PSTR("EEPROM Version Error") -#define MARLIN_msg_nozzle_parked PSTR("Nozzle Parked") -#define MARLIN_msg_heater_timeout PSTR("Heater Timeout") -#define MARLIN_msg_reheating PSTR("Reheating...") -#define MARLIN_msg_reheat_done PSTR("Reheat finished.") -#define MARLIN_msg_filament_purging PSTR("Filament Purging...") -#define MARLIN_msg_special_pause PSTR("PB") +#define MARLIN_msg_EEPROM_version PSTR("EEPROM Version Error") -#define AC_cmnd_auto_unload_filament F("M701") // Use Marlin unload routine -#define AC_cmnd_auto_load_filament F("M702 M0 PB") // Use Marlin load routing then pause for user to clean nozzle - -#define AC_cmnd_manual_load_filament F("M83\nG1 E50 F700\nM82") // replace the manual panel commands with something a little faster -#define AC_cmnd_manual_unload_filament F("M83\nG1 E-50 F1200\nM82") -#define AC_cmnd_enable_leveling F("M420SV") -#define AC_cmnd_power_loss_recovery F("G28XYR5\nG28Z") // Lift, home X and Y then home Z when in 'safe' position - -#define AC_Test_for_OldPanel F("SIZE") // An old panel will respond with 'SXY 480 320' a new panel wont respond. -#define AC_Test_for_NewPanel F("J200") // A new panel will respond with '[0]=0 [1]=0' to '[19]=0 ' an old panel wont respond +#define AC_Test_for_OldPanel F("SIZE") // An old panel will respond with 'SXY 480 320' a new panel wont respond. +#define AC_Test_for_NewPanel F("J200") // A new panel will respond with '[0]=0 [1]=0' to '[19]=0 ' an old panel wont respond namespace Anycubic { - enum heater_state_t : uint8_t { - AC_heater_off, - AC_heater_temp_set, - AC_heater_temp_reached - }; + enum paused_state_t : uint8_t { AC_paused_heater_timed_out, AC_paused_purging_filament, AC_paused_idle }; + enum printer_state_t : uint8_t { AC_printer_booting, AC_printer_idle, @@ -149,27 +72,13 @@ namespace Anycubic { AC_printer_stopping, AC_printer_resuming_from_power_outage }; - enum timer_event_t : uint8_t { - AC_timer_started, - AC_timer_paused, - AC_timer_stopped - }; - enum media_event_t : uint8_t { - AC_media_inserted, - AC_media_removed, - AC_media_error - }; - enum file_menu_t : uint8_t { - AC_menu_file, - AC_menu_command, - AC_menu_change_to_file, - AC_menu_change_to_command - }; + enum panel_type_t : uint8_t { // order is important here as we assume new panel if type is unknown AC_panel_unknown, AC_panel_new, AC_panel_standard }; + enum last_error_t : uint8_t { AC_error_none, AC_error_abnormal_temp_t0, @@ -179,4 +88,5 @@ namespace Anycubic { AC_error_filament_runout, AC_error_EEPROM }; -} // Anycubic namespace + +} // Anycubic diff --git a/Marlin/src/lcd/extui/anycubic_vyper/FileNavigator.h b/Marlin/src/lcd/extui/anycubic_vyper/FileNavigator.h index c39e66b63e..dd4b0b0f74 100644 --- a/Marlin/src/lcd/extui/anycubic_vyper/FileNavigator.h +++ b/Marlin/src/lcd/extui/anycubic_vyper/FileNavigator.h @@ -31,27 +31,26 @@ using namespace ExtUI; namespace Anycubic { + class FileNavigator { public: + static FileList filelist; + FileNavigator(); - - static FileList filelist; - - void reset(); - void getFiles(uint16_t); - void upDIR(); - void changeDIR(char *); - void sendFile(); - void refresh(); - char * getCurrentFolderName(); - uint16_t getFileNum(); - + static void reset(); + static void getFiles(uint16_t); + static void upDIR(); + static void changeDIR(char *); + static void sendFile(); + static void refresh(); + static char* getCurrentFolderName(); + static uint16_t getFileNum(); private: - - static char currentfoldername[MAX_PATH_LEN]; - static uint16_t lastindex; - static uint8_t folderdepth; - static uint16_t currentindex; + static uint16_t lastindex; + static uint16_t currentindex; + static uint8_t folderdepth; + static char currentfoldername[MAX_PATH_LEN + 1]; }; + extern FileNavigator filenavigator; } diff --git a/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp b/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp index 81af2e6e20..e2bc343d67 100644 --- a/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp +++ b/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp @@ -29,7 +29,7 @@ #if ENABLED(ANYCUBIC_LCD_VYPER) #include "dgus_tft.h" -#include "Tunes.h" +#include "../anycubic/Tunes.h" #include "FileNavigator.h" #include "../../../gcode/queue.h" @@ -154,9 +154,6 @@ namespace Anycubic { // as Z home places nozzle above the bed so we need to allow it past the end stops injectCommands(AC_cmnd_enable_leveling); - // Startup tunes are defined in Tunes.h - //PlayTune(BEEPER_PIN, Anycubic_PowerOn, 1); - //PlayTune(BEEPER_PIN, GB_PowerOn, 1); #if ACDEBUGLEVEL DEBUG_ECHOLNPGM("Startup AC Debug Level ", ACDEBUGLEVEL); #endif @@ -466,7 +463,7 @@ namespace Anycubic { pop_up_index = 15; // show filament lack. if (READ(FIL_RUNOUT_PIN) == FIL_RUNOUT_STATE) { - PlayTune(BEEPER_PIN, FilamentOut, 1); + PlayTune(FilamentOut, 1); feedrate_back = getFeedrate_percent(); @@ -508,7 +505,7 @@ namespace Anycubic { if (strcmp_P(msg, MARLIN_msg_heater_timeout) == 0) { pause_state = AC_paused_heater_timed_out; SendtoTFTLN(AC_msg_paused); // enable continue button - PlayTune(BEEPER_PIN, Heater_Timedout, 1); + PlayTune(Heater_Timedout, 1); } // Reheat finished, send acknowledgement else if (strcmp_P(msg, MARLIN_msg_reheat_done) == 0) { @@ -579,7 +576,7 @@ namespace Anycubic { // If probing fails don't save the mesh raise the probe above the bad point if (strcmp_P(msg, MARLIN_msg_probing_failed) == 0) { - PlayTune(BEEPER_PIN, BeepBeepBeeep, 1); + PlayTune(BeepBeepBeeep, 1); injectCommands(F("G1 Z50 F500")); ChangePageOfTFT(PAGE_CHS_ABNORMAL_LEVELING_SENSOR); SendtoTFTLN(AC_msg_probing_complete); @@ -1073,7 +1070,7 @@ namespace Anycubic { #else SendTxtToTFT(recovery.info.sd_filename, TXT_OUTAGE_RECOVERY_FILE); #endif - PlayTune(BEEPER_PIN, SOS, 1); + PlayTune(SOS, 1); } #else constexpr bool is_outage = false; @@ -1083,12 +1080,13 @@ namespace Anycubic { } else if (control_value == 0x010000) { // startup first gif - PlayTune(BEEPER_PIN, Anycubic_PowerOn, 1); // takes 3500 ms + // Startup tunes are defined in Tunes.h + PlayTune(Anycubic_PowerOn, 1); // takes 3500 ms } } /* - else if ((control_index & 0xF000) == 0x2000) { // is TXT ADDRESS + else if ((control_index & 0xF000) == 0x2000) { // is TXT ADDRESS tft_txt_index = control_index; j = 0; for (i = 4; ;i++) { diff --git a/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft_defs.h b/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft_defs.h index 72e812b965..1133d670cd 100644 --- a/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft_defs.h +++ b/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft_defs.h @@ -19,106 +19,24 @@ * along with this program. If not, see . * */ +#pragma once /** * lcd/extui/anycubic_vyper/dgus_defs.h */ -#pragma once -#include "../../../inc/MarlinConfigPre.h" +#include "../anycubic/common_defs.h" -#define ACDEBUGLEVEL 0 // 0: off, 255: all levels enabled +// TFT panel commands +#define AC_msg_bed_temp_abnormal F("J28") -#if ACDEBUGLEVEL - // Bit-masks for selective debug: - enum ACDebugMask : uint8_t { - AC_INFO = 1, - AC_ACTION = 2, - AC_FILE = 4, - AC_PANEL = 8, - AC_MARLIN = 16, - AC_SOME = 32, - AC_ALL = 64 - }; - #define ACDEBUG(mask) ( ((mask) & ACDEBUGLEVEL) == mask ) // Debug flag macro -#else - #define ACDEBUG(mask) false -#endif - -#define TFTSer LCD_SERIAL // Serial interface for TFT panel now uses marlinserial -#define MAX_FOLDER_DEPTH 4 // Limit folder depth TFT has a limit for the file path -#define MAX_CMND_LEN 16 * MAX_FOLDER_DEPTH // Maximum Length for a Panel command -#define MAX_PATH_LEN 16 * MAX_FOLDER_DEPTH // Maximum number of characters in a SD file path - -#define AC_HEATER_FAULT_VALIDATION_TIME 5 // number of 1/2 second loops before signalling a heater fault -#define AC_LOWEST_MESHPOINT_VAL Z_PROBE_LOW_POINT // The lowest value you can set for a single mesh point offset - - // TFT panel commands -#define AC_msg_sd_card_inserted F("J00") -#define AC_msg_sd_card_removed F("J01") -#define AC_msg_no_sd_card F("J02") -#define AC_msg_usb_connected F("J03") -#define AC_msg_print_from_sd_card F("J04") -#define AC_msg_pause F("J05") -#define AC_msg_nozzle_heating F("J06") -#define AC_msg_nozzle_heating_done F("J07") -#define AC_msg_bed_heating F("J08") -#define AC_msg_bed_heating_done F("J09") -#define AC_msg_nozzle_temp_abnormal F("J10") -#define AC_msg_kill_lcd F("J11") -#define AC_msg_ready F("J12") -#define AC_msg_low_nozzle_temp F("J13") -#define AC_msg_print_complete F("J14") -#define AC_msg_filament_out_alert F("J15") -#define AC_msg_stop F("J16") -#define AC_msg_main_board_has_reset F("J17") -#define AC_msg_paused F("J18") -#define AC_msg_j19_unknown F("J19") -#define AC_msg_sd_file_open_success F("J20") -#define AC_msg_sd_file_open_failed F("J21") -#define AC_msg_level_monitor_finished F("J22") -#define AC_msg_filament_out_block F("J23") -#define AC_msg_probing_not_allowed F("J24") -#define AC_msg_probing_complete F("J25") -#define AC_msg_start_probing F("J26") -#define AC_msg_version F("J27") -#define AC_msg_bed_temp_abnormal F("J28") - -#define MARLIN_msg_probing_point PSTR("Probing Point ") -#define MARLIN_msg_start_probing PSTR("Probing Point 1/25") -#define MARLIN_msg_probing_failed PSTR("Probing Failed") -#define MARLIN_msg_ready PSTR(" Ready.") -#define MARLIN_msg_print_paused PSTR("Print Paused") -#define MARLIN_msg_print_aborted PSTR("Print Aborted") -#define MARLIN_msg_extruder_heating PSTR("E Heating...") -#define MARLIN_msg_bed_heating PSTR("Bed Heating...") - -#define MARLIN_msg_probe_preheat_start PSTR("Probe preheat start") -#define MARLIN_msg_probe_preheat_stop PSTR("Probe preheat stop") - - -#define MARLIN_msg_nozzle_parked PSTR("Nozzle Parked") -#define MARLIN_msg_heater_timeout PSTR("Heater Timeout") -#define MARLIN_msg_reheating PSTR("Reheating...") -#define MARLIN_msg_reheat_done PSTR("Reheat finished.") -#define MARLIN_msg_filament_purging PSTR("Filament Purging...") -#define MARLIN_msg_media_removed PSTR("Media Removed") -#define MARLIN_msg_special_pause PSTR("PB") - -#define AC_cmnd_auto_unload_filament F("M701") // Use Marlin unload routine -#define AC_cmnd_auto_load_filament F("M702 M0 PB") // Use Marlin load routing then pause for user to clean nozzle - -#define AC_cmnd_manual_load_filament F("M83\nG1 E50 F700\nM82") // replace the manual panel commands with something a little faster -#define AC_cmnd_manual_unload_filament F("M83\nG1 E-50 F1200\nM82") -#define AC_cmnd_enable_leveling F("M420SV") -#define AC_cmnd_power_loss_recovery F("G28XYR5\nG28Z") // Lift, home X and Y then home Z when in 'safe' position +// TFT panel messages +#define MARLIN_msg_probing_point PSTR("Probing Point ") +#define MARLIN_msg_probe_preheat_start PSTR("Probe preheat start") +#define MARLIN_msg_probe_preheat_stop PSTR("Probe preheat stop") +#define MARLIN_msg_media_removed PSTR("Media Removed") namespace Anycubic { - enum heater_state_t : uint8_t { - AC_heater_off, - AC_heater_temp_set, - AC_heater_temp_reached - }; enum paused_state_t : uint8_t { AC_paused_heater_timed_out, @@ -138,21 +56,4 @@ namespace Anycubic { AC_printer_resuming_from_power_outage }; - enum timer_event_t : uint8_t { - AC_timer_started, - AC_timer_paused, - AC_timer_stopped - }; - - enum media_event_t : uint8_t { - AC_media_inserted, - AC_media_removed, - AC_media_error - }; - enum file_menu_t : uint8_t { - AC_menu_file, - AC_menu_command, - AC_menu_change_to_file, - AC_menu_change_to_command - }; -} +} // Anycubic diff --git a/ini/features.ini b/ini/features.ini index d8ba74f2db..3c5eb1adec 100644 --- a/ini/features.ini +++ b/ini/features.ini @@ -80,6 +80,7 @@ HAS_MENU_TMC = src_filter=+ HAS_MENU_TOUCH_SCREEN = src_filter=+ HAS_MENU_TRAMMING_WIZARD = src_filter=+ HAS_MENU_UBL = src_filter=+ +ANYCUBIC_LCD_(CHIRON|VYPER) = src_filter=+ ANYCUBIC_LCD_CHIRON = src_filter=+ ANYCUBIC_LCD_VYPER = src_filter=+ ANYCUBIC_LCD_I3MEGA = src_filter=+ diff --git a/platformio.ini b/platformio.ini index 3478dcc1fb..885fdd87d6 100644 --- a/platformio.ini +++ b/platformio.ini @@ -80,9 +80,7 @@ default_src_filter = + - - + - - - - - - - - - + - - - - - - - - - - - From 2fcc140c0d4353149c24fa8a3845b417738d7620 Mon Sep 17 00:00:00 2001 From: XDA-Bam <1209896+XDA-Bam@users.noreply.github.com> Date: Sun, 16 Apr 2023 05:26:46 +0200 Subject: [PATCH 180/225] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20'G29=20J'=20status?= =?UTF-8?q?=20message=20(#25677)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp index a6206b398e..5bc5e6ec61 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp @@ -1499,7 +1499,7 @@ void unified_bed_leveling::smart_fill_mesh() { LOOP_L_N(i, 3) { SERIAL_ECHOLNPGM("Tilting mesh (", i + 1, "/3)"); - TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT " %i/3"), i + 1, GET_TEXT(MSG_LCD_TILTING_MESH))); + TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT " %i/3"), GET_TEXT(MSG_LCD_TILTING_MESH), i + 1)); measured_z = probe.probe_at_point(points[i], i < 2 ? PROBE_PT_RAISE : PROBE_PT_LAST_STOW, param.V_verbosity); if ((abort_flag = isnan(measured_z))) break; From e49cf0665a112e7de0601e5a86c977435b2142c3 Mon Sep 17 00:00:00 2001 From: Dennis Lawler <4824647+drawlerr@users.noreply.github.com> Date: Sat, 15 Apr 2023 22:50:26 -0600 Subject: [PATCH 181/225] =?UTF-8?q?=F0=9F=9A=B8=20Echo=20G30=20out-of-boun?= =?UTF-8?q?ds=20(#25671)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/gcode/probe/G30.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/Marlin/src/gcode/probe/G30.cpp b/Marlin/src/gcode/probe/G30.cpp index a17ec367df..468189bf5a 100644 --- a/Marlin/src/gcode/probe/G30.cpp +++ b/Marlin/src/gcode/probe/G30.cpp @@ -28,6 +28,7 @@ #include "../../module/motion.h" #include "../../module/probe.h" #include "../../feature/bedlevel/bedlevel.h" +#include "../../lcd/marlinui.h" #if HAS_PTC #include "../../feature/probe_temp_comp.h" @@ -37,10 +38,6 @@ #include "../../module/tool_change.h" #endif -#if EITHER(DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI) - #include "../../lcd/marlinui.h" -#endif - /** * G30: Do a single Z probe at the given XY (default: current) * @@ -105,10 +102,8 @@ void GcodeSuite::G30() { report_current_position(); } else { - #if ENABLED(DWIN_LCD_PROUI) - SERIAL_ECHOLNF(GET_EN_TEXT_F(MSG_ZPROBE_OUT)); - LCD_MESSAGE(MSG_ZPROBE_OUT); - #endif + SERIAL_ECHOLNF(GET_EN_TEXT_F(MSG_ZPROBE_OUT)); + LCD_MESSAGE(MSG_ZPROBE_OUT); } probe.use_probing_tool(false); From b6a1a6273fcff835002c5645ebdd157b5f180bab Mon Sep 17 00:00:00 2001 From: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Sun, 16 Apr 2023 06:59:23 +0200 Subject: [PATCH 182/225] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20MPC=20compile=20(#?= =?UTF-8?q?25669)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/menu/menu_advanced.cpp | 2 +- Marlin/src/module/temperature.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/src/lcd/menu/menu_advanced.cpp b/Marlin/src/lcd/menu/menu_advanced.cpp index 71188a8688..719838f6be 100644 --- a/Marlin/src/lcd/menu/menu_advanced.cpp +++ b/Marlin/src/lcd/menu/menu_advanced.cpp @@ -370,6 +370,7 @@ void menu_backlash(); #if ENABLED(MPC_EDIT_MENU) #define _MPC_EDIT_ITEMS(N) \ + MPC_t &mpc = thermalManager.temp_hotend[MenuItemBase::itemIndex].mpc; \ EDIT_ITEM_FAST_N(float31sign, N, MSG_MPC_POWER_E, &mpc.heater_power, 1, 200); \ EDIT_ITEM_FAST_N(float31sign, N, MSG_MPC_BLOCK_HEAT_CAPACITY_E, &mpc.block_heat_capacity, 0, 40); \ EDIT_ITEM_FAST_N(float43, N, MSG_SENSOR_RESPONSIVENESS_E, &mpc.sensor_responsiveness, 0, 1); \ @@ -377,7 +378,6 @@ void menu_backlash(); #if ENABLED(MPC_INCLUDE_FAN) #define MPC_EDIT_ITEMS(N) \ - MPC_t &mpc = thermalManager.temp_hotend[MenuItemBase::itemIndex].mpc; \ _MPC_EDIT_ITEMS(N); \ EDIT_ITEM_FAST_N(float43, N, MSG_MPC_AMBIENT_XFER_COEFF_FAN_E, &editable.decimal, 0, 1, []{ \ thermalManager.temp_hotend[MenuItemBase::itemIndex].applyFanAdjustment(editable.decimal); \ diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 43bf31e0e7..ce46d3d43d 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -1085,9 +1085,9 @@ volatile bool Temperature::raw_temps_ready = false; block_responsiveness = -log((t2 - asymp_temp) / (t1 - asymp_temp)) / (sample_distance * (sample_count >> 1)); mpc.ambient_xfer_coeff_fan0 = mpc.heater_power * (MPC_MAX) / 255 / (asymp_temp - ambient_temp); - mpc.fan255_adjustment = 0.0f; mpc.block_heat_capacity = mpc.ambient_xfer_coeff_fan0 / block_responsiveness; mpc.sensor_responsiveness = block_responsiveness / (1.0f - (ambient_temp - asymp_temp) * exp(-block_responsiveness * t1_time) / (t1 - asymp_temp)); + TERN_(MPC_INCLUDE_FAN, mpc.fan255_adjustment = 0.0f); hotend.modeled_block_temp = asymp_temp + (ambient_temp - asymp_temp) * exp(-block_responsiveness * (ms - heat_start_time) / 1000.0f); hotend.modeled_sensor_temp = current_temp; From 802fe519a310e94c7658d7c60deffd240770565b Mon Sep 17 00:00:00 2001 From: Bob Kuhn Date: Sun, 16 Apr 2023 18:35:13 -0500 Subject: [PATCH 183/225] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20laser=20with=20no?= =?UTF-8?q?=20PWM=20compile=20(#25290)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/feature/spindle_laser.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/feature/spindle_laser.h b/Marlin/src/feature/spindle_laser.h index a49e5611a4..9750d4807f 100644 --- a/Marlin/src/feature/spindle_laser.h +++ b/Marlin/src/feature/spindle_laser.h @@ -281,7 +281,7 @@ public: set_enabled(state); if (state) { if (!menuPower) menuPower = cpwr_to_upwr(SPEED_POWER_STARTUP); - power = upower_to_ocr(menuPower); + power = TERN(SPINDLE_LASER_USE_PWM, upower_to_ocr(menuPower), 255); apply_power(power); } else apply_power(0); From 09ddf9c6ef9708baf42c3145332b2921e75f8d73 Mon Sep 17 00:00:00 2001 From: "Alexey D. Filimonov" Date: Mon, 17 Apr 2023 02:38:12 +0300 Subject: [PATCH 184/225] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20Spindle/Laser=20EN?= =?UTF-8?q?A=20pin=20test=20(#25622)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/feature/spindle_laser.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/feature/spindle_laser.h b/Marlin/src/feature/spindle_laser.h index 9750d4807f..5cbc20866c 100644 --- a/Marlin/src/feature/spindle_laser.h +++ b/Marlin/src/feature/spindle_laser.h @@ -210,7 +210,7 @@ public: enable = false; apply_power(0); } - #if SPINDLE_LASER_ENA_PIN + #if PIN_EXISTS(SPINDLE_LASER_ENA) WRITE(SPINDLE_LASER_ENA_PIN, enable ? SPINDLE_LASER_ACTIVE_STATE : !SPINDLE_LASER_ACTIVE_STATE); #endif enable_state = enable; From ace9855d6fe4fc956c1c3ad584ca07e25216376b Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 16 Apr 2023 19:11:56 -0500 Subject: [PATCH 185/225] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Min?= =?UTF-8?q?or=20SpindleLaser::set=5Fenabled=20tweak?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/feature/spindle_laser.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/Marlin/src/feature/spindle_laser.h b/Marlin/src/feature/spindle_laser.h index 5cbc20866c..8908ae6df5 100644 --- a/Marlin/src/feature/spindle_laser.h +++ b/Marlin/src/feature/spindle_laser.h @@ -201,8 +201,6 @@ public: apply_power(enable ? TERN(SPINDLE_LASER_USE_PWM, (power ?: (unitPower ? upower_to_ocr(cpwr_to_upwr(SPEED_POWER_STARTUP)) : 0)), 255) : 0); break; case CUTTER_MODE_CONTINUOUS: - TERN_(LASER_FEATURE, set_inline_enabled(enable)); - break; case CUTTER_MODE_DYNAMIC: TERN_(LASER_FEATURE, set_inline_enabled(enable)); break; From b39b5bbbc92d3a15c53ec5027d8b2e05b34ea6eb Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Mon, 17 Apr 2023 00:20:56 +0000 Subject: [PATCH 186/225] [cron] Bump distribution date (2023-04-17) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index b345bef514..ea6679cba9 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-04-16" +//#define STRING_DISTRIBUTION_DATE "2023-04-17" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index bf22ae4ded..bdfac93020 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-04-16" + #define STRING_DISTRIBUTION_DATE "2023-04-17" #endif /** From ff44663f5fe4e9ddc1cb2ddd8c2a6c5994e3d143 Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Tue, 18 Apr 2023 07:51:25 +1200 Subject: [PATCH 187/225] =?UTF-8?q?=F0=9F=94=A8=20Fix,=20clean=20up=20STM3?= =?UTF-8?q?2F1=20envs=20(#25697)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- ini/stm32f1.ini | 143 +++++++++++++++++++++--------------------------- 1 file changed, 62 insertions(+), 81 deletions(-) diff --git a/ini/stm32f1.ini b/ini/stm32f1.ini index 783d05fab4..9aaa39ea20 100644 --- a/ini/stm32f1.ini +++ b/ini/stm32f1.ini @@ -134,16 +134,6 @@ monitor_speed = 115200 debug_tool = jlink upload_protocol = jlink -# -# Trigorilla V0.0.6 (GD32F103) -# modified version of env:STM32F103RE_creality -# -[env:trigorilla_v006] -extends = STM32F103Rx_creality -board = genericSTM32F103RE -board_build.offset = 0x8000 -board_upload.offset_address = 0x08008000 - # # Creality (STM32F103Rx) # With custom upload to SD via Marlin with binary protocol. @@ -176,10 +166,19 @@ board = genericSTM32F103RE # Creality 512K (STM32F103RE) for new 64KiB bootloader (CR-10 Smart Pro printer) # [env:STM32F103RE_creality_smartPro] -extends = STM32F103Rx_creality +extends = env:STM32F103RE_creality board_build.offset = 0x10000 board_upload.offset_address = 0x08010000 +# +# Trigorilla V0.0.6 (GD32F103) +# modified version of env:STM32F103RE_creality +# +[env:trigorilla_v006] +extends = env:STM32F103RE_creality +board_build.offset = 0x8000 +board_upload.offset_address = 0x08008000 + # # Creality 256K (STM32F103RC) # @@ -230,54 +229,7 @@ platform_packages = ${stm_flash_drive.platform_packages} build_flags = ${env:STM32F103RE_btt.build_flags} -DUSE_USB_FS -DUSBD_IRQ_PRIO=5 -DUSBD_IRQ_SUBPRIO=6 -DUSBD_USE_CDC_MSC -build_unflags = ${stm32_variant.build_unflags} -DUSBD_USE_CDC - -# -# FLSUN QQS Pro (STM32F103VET6) -# board Hispeedv1 -# -[env:flsun_hispeedv1] -extends = stm32_variant -board = genericSTM32F103VE -board_build.variant = MARLIN_F103Vx -board_build.encrypt_mks = Robin_mini.bin -board_build.offset = 0x7000 -board_upload.offset_address = 0x08007000 -build_flags = ${stm32_variant.build_flags} - -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3 - -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2 -build_unflags = ${stm32_variant.build_unflags} - -DUSBCON -DUSBD_USE_CDC - -[mks_robin_nano_v1v2_common] -extends = stm32_variant -board = genericSTM32F103VE -board_build.variant = MARLIN_F103Vx -board_build.encrypt_mks = Robin_nano35.bin -board_build.offset = 0x7000 -board_upload.offset_address = 0x08007000 -debug_tool = stlink -upload_protocol = stlink - -# -# MKS Robin Nano V1.2 and V2 -# -[env:mks_robin_nano_v1v2] -extends = mks_robin_nano_v1v2_common -build_flags = ${stm32_variant.build_flags} - -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3 - -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2 -build_unflags = ${stm32_variant.build_unflags} - -DUSBCON -DUSBD_USE_CDC - -# -# MKS/ZNP Robin Nano V1.2 and V2 with native USB modification -# -[env:mks_robin_nano_v1v2_usbmod] -extends = mks_robin_nano_v1v2_common -build_flags = ${common_stm32.build_flags} - -DMCU_STM32F103VE -DSS_TIMER=4 - -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2 +build_unflags = ${env:STM32F103RE_btt.build_unflags} -DUSBD_USE_CDC # # Mingda MPX_ARM_MINI @@ -315,17 +267,63 @@ board_upload.offset_address = 0x08005000 build_flags = ${stm32_variant.build_flags} -DSS_TIMER=4 # -# MKS Robin Mini (STM32F103VET6) +# (STM32F103VE_robin) # -[env:mks_robin_mini] +[STM32F103VE_robin] extends = stm32_variant board = genericSTM32F103VE board_build.variant = MARLIN_F103Vx -board_build.encrypt_mks = Robin_mini.bin board_build.offset = 0x7000 board_upload.offset_address = 0x08007000 -build_flags = ${stm32_variant.build_flags} - -DMCU_STM32F103VE -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2 +build_flags = ${stm32_variant.build_flags} -DMCU_STM32F103VE -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2 -DSS_TIMER=4 + +[mks_robin_nano_v1v2_common] +extends = STM32F103VE_robin +board_build.encrypt_mks = Robin_nano35.bin +debug_tool = stlink +upload_protocol = stlink + +# +# MKS/ZNP Robin Nano V1.2 and V2 with native USB modification +# +[env:mks_robin_nano_v1v2_usbmod] +extends = mks_robin_nano_v1v2_common + +# +# MKS Robin Nano V1.2 and V2 +# +[env:mks_robin_nano_v1v2] +extends = mks_robin_nano_v1v2_common +build_flags = ${mks_robin_nano_v1v2_common.build_flags} -DENABLE_HWSERIAL3 +build_unflags = ${mks_robin_nano_v1v2_common.build_unflags} -DUSBCON -DUSBD_USE_CDC + +# +# MKS Robin Mini (STM32F103VET6) +# +[env:mks_robin_mini] +extends = STM32F103VE_robin +board_build.encrypt_mks = Robin_mini.bin +build_unflags = ${STM32F103VE_robin.build_unflags} -DSS_TIMER=4 + +# +# MKS Robin E3p (STM32F103VET6) +# - LVGL UI +# +[env:mks_robin_e3p] +extends = STM32F103VE_robin +board_build.encrypt_mks = Robin_e3p.bin +debug_tool = jlink +upload_protocol = jlink + +# +# FLSUN QQS Pro (STM32F103VET6) +# Hispeedv1 Robin mini variant +# +[env:flsun_hispeedv1] +extends = STM32F103VE_robin +board_build.encrypt_mks = Robin_mini.bin +build_flags = ${STM32F103VE_robin.build_flags} -DENABLE_HWSERIAL3 +build_unflags = ${STM32F103VE_robin.build_unflags} -DUSBCON -DUSBD_USE_CDC # # MKS Robin Lite/Lite2 (STM32F103RCT6) @@ -352,23 +350,6 @@ board_build.encrypt_mks = mksLite3.bin extends = env:mks_robin board_build.encrypt_mks = Robin_pro.bin -# -# MKS Robin E3p (STM32F103VET6) -# - LVGL UI -# -[env:mks_robin_e3p] -extends = stm32_variant -board = genericSTM32F103VE -board_build.variant = MARLIN_F103Vx -board_build.encrypt_mks = Robin_e3p.bin -board_build.offset = 0x7000 -board_upload.offset_address = 0x08007000 -build_flags = ${stm32_variant.build_flags} - -DMCU_STM32F103VE -DSS_TIMER=4 - -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2 -debug_tool = jlink -upload_protocol = jlink - # # JGAurora A5S A1 (STM32F103ZET6) # From 4d8ab1c401170e345b11e971773a87d87272a82a Mon Sep 17 00:00:00 2001 From: tombrazier <68918209+tombrazier@users.noreply.github.com> Date: Mon, 17 Apr 2023 23:48:56 +0100 Subject: [PATCH 188/225] =?UTF-8?q?=F0=9F=90=9B=20Prevent=20Linear=20Advan?= =?UTF-8?q?ce=20stall=20(#25696)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/module/stepper.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index 7bf50e557f..3cca0516ff 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -1578,7 +1578,7 @@ void Stepper::isr() { advance_isr(); nextAdvanceISR = la_interval; } - else if (nextAdvanceISR == LA_ADV_NEVER) // Start LA steps if necessary + else if (nextAdvanceISR > la_interval) // Start/accelerate LA steps if necessary nextAdvanceISR = la_interval; #endif @@ -2169,7 +2169,8 @@ hal_timer_t Stepper::calc_timer_interval(uint32_t step_rate) { #ifdef CPU_32_BIT // A fast processor can just do integer division - return step_rate ? uint32_t(STEPPER_TIMER_RATE) / step_rate : HAL_TIMER_TYPE_MAX; + constexpr uint32_t min_step_rate = uint32_t(STEPPER_TIMER_RATE) / HAL_TIMER_TYPE_MAX; + return step_rate > min_step_rate ? uint32_t(STEPPER_TIMER_RATE) / step_rate : HAL_TIMER_TYPE_MAX; #else From e6308f5d027d2e8ff633aaf035787a1be9da0d58 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 17 Apr 2023 18:10:07 -0500 Subject: [PATCH 189/225] =?UTF-8?q?=F0=9F=A9=B9=20const=5Ffloat=5Ft=20=3D>?= =?UTF-8?q?=20float?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/module/stepper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index 3cca0516ff..9728a90896 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -3198,9 +3198,9 @@ void Stepper::init() { else if (zeta >= 1.0f) factor2 = 0.0f; else { factor2 = 64.44056192 + -99.02008832 * zeta; - const_float_t zeta2 = zeta * zeta; + const float zeta2 = sq(zeta); factor2 += -7.58095488 * zeta2; - const_float_t zeta3 = zeta2 * zeta; + const float zeta3 = zeta2 * zeta; factor2 += 43.073216 * zeta3; factor2 = floor(factor2); } From 364d8566b01ff7555c6075c857c1a727642e88ad Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Tue, 18 Apr 2023 00:25:20 +0000 Subject: [PATCH 190/225] [cron] Bump distribution date (2023-04-18) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index ea6679cba9..c6846adb43 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-04-17" +//#define STRING_DISTRIBUTION_DATE "2023-04-18" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index bdfac93020..2274701600 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-04-17" + #define STRING_DISTRIBUTION_DATE "2023-04-18" #endif /** From c8c5ab22ce242b93632a7e2b9f855bbaf38b557f Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 17 Apr 2023 19:29:53 -0500 Subject: [PATCH 191/225] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Gat?= =?UTF-8?q?her=20Z=20clearances=20(#25701)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration.h | 8 +- Marlin/src/gcode/bedlevel/G35.cpp | 7 -- Marlin/src/gcode/bedlevel/abl/G29.cpp | 15 +--- Marlin/src/gcode/calibrate/G28.cpp | 85 ++++++++++--------- Marlin/src/inc/Conditionals_post.h | 14 +-- Marlin/src/inc/SanityCheck.h | 10 ++- .../lcd/extui/mks_ui/draw_z_offset_wizard.cpp | 10 +-- Marlin/src/lcd/menu/menu_probe_offset.cpp | 14 ++- Marlin/src/module/motion.cpp | 19 +++-- Marlin/src/module/motion.h | 10 ++- Marlin/src/module/probe.h | 29 +------ 11 files changed, 102 insertions(+), 119 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 9844b44e10..19407b6158 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -1402,7 +1402,7 @@ * on the right, enable and set TOUCH_MI_DEPLOY_XPOS to the deploy position. * * Also requires: BABYSTEPPING, BABYSTEP_ZPROBE_OFFSET, Z_SAFE_HOMING, - * and a minimum Z_HOMING_HEIGHT of 10. + * and a minimum Z_CLEARANCE_FOR_HOMING of 10. */ //#define TOUCH_MI_PROBE #if ENABLED(TOUCH_MI_PROBE) @@ -1730,10 +1730,10 @@ */ //#define Z_IDLE_HEIGHT Z_HOME_POS -//#define Z_HOMING_HEIGHT 4 // (mm) Minimal Z height before homing (G28) for Z clearance above the bed, clamps, ... - // Be sure to have this much clearance over your Z_MAX_POS to prevent grinding. +//#define Z_CLEARANCE_FOR_HOMING 4 // (mm) Minimal Z height before homing (G28) for Z clearance above the bed, clamps, ... + // Be sure to have this much clearance over your Z_MAX_POS to prevent grinding. -//#define Z_AFTER_HOMING 10 // (mm) Height to move to after homing Z +//#define Z_AFTER_HOMING 10 // (mm) Height to move to after homing Z // Direction of endstops when homing; 1=MAX, -1=MIN // :[-1,1] diff --git a/Marlin/src/gcode/bedlevel/G35.cpp b/Marlin/src/gcode/bedlevel/G35.cpp index c1cef2b987..27c57cf62e 100644 --- a/Marlin/src/gcode/bedlevel/G35.cpp +++ b/Marlin/src/gcode/bedlevel/G35.cpp @@ -98,14 +98,7 @@ void GcodeSuite::G35() { // Probe all positions LOOP_L_N(i, G35_PROBE_COUNT) { - - // In BLTOUCH HS mode, the probe travels in a deployed state. - // Users of G35 might have a badly misaligned bed, so raise Z by the - // length of the deployed pin (BLTOUCH stroke < 7mm) - - // Unsure if this is even required. The probe seems to lift correctly after probe done. const float z_probed_height = probe.probe_at_point(tramming_points[i], PROBE_PT_RAISE, 0, true); - if (isnan(z_probed_height)) { SERIAL_ECHOPGM("G35 failed at point ", i + 1, " ("); SERIAL_ECHOPGM_P((char *)pgm_read_ptr(&tramming_point_name[i])); diff --git a/Marlin/src/gcode/bedlevel/abl/G29.cpp b/Marlin/src/gcode/bedlevel/abl/G29.cpp index e334412054..dd325284af 100644 --- a/Marlin/src/gcode/bedlevel/abl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/abl/G29.cpp @@ -494,20 +494,13 @@ G29_TYPE GcodeSuite::G29() { #endif #if ENABLED(AUTO_BED_LEVELING_BILINEAR) - if (!abl.dryrun - && (abl.gridSpacing != bedlevel.grid_spacing || abl.probe_position_lf != bedlevel.grid_start) - ) { - // Reset grid to 0.0 or "not probed". (Also disables ABL) - reset_bed_level(); - - // Can't re-enable (on error) until the new grid is written - abl.reenable = false; + if (!abl.dryrun && (abl.gridSpacing != bedlevel.grid_spacing || abl.probe_position_lf != bedlevel.grid_start)) { + reset_bed_level(); // Reset grid to 0.0 or "not probed". (Also disables ABL) + abl.reenable = false; // Can't re-enable (on error) until the new grid is written } - // Pre-populate local Z values from the stored mesh TERN_(IS_KINEMATIC, COPY(abl.z_values, bedlevel.z_values)); - - #endif // AUTO_BED_LEVELING_BILINEAR + #endif } // !g29_in_progress diff --git a/Marlin/src/gcode/calibrate/G28.cpp b/Marlin/src/gcode/calibrate/G28.cpp index b5e7a13295..89e0c8d8d4 100644 --- a/Marlin/src/gcode/calibrate/G28.cpp +++ b/Marlin/src/gcode/calibrate/G28.cpp @@ -399,49 +399,50 @@ void GcodeSuite::G28() { doU = home_all || homeU, doV = home_all || homeV, doW = home_all || homeW ); - #if HAS_Z_AXIS - UNUSED(needZ); UNUSED(homeZZ); - #else - constexpr bool doZ = false; - #if !HAS_Y_AXIS - constexpr bool doY = false; - #endif + #if !HAS_Y_AXIS + constexpr bool doY = false; #endif - // Z may home first, e.g., when homing away from the bed - TERN_(HOME_Z_FIRST, if (doZ) homeaxis(Z_AXIS)); + #if HAS_Z_AXIS - // 'R' to specify a specific raise. 'R0' indicates no raise, e.g., for recovery.resume - // When 'R0' is used, there should already be adequate clearance, e.g., from homing Z to max. - const bool seenR = parser.seenval('R'); + UNUSED(needZ); UNUSED(homeZZ); - // Use raise given by 'R' or Z_HOMING_HEIGHT (above the probe trigger point) - float z_homing_height = seenR ? parser.value_linear_units() : Z_HOMING_HEIGHT; + // Z may home first, e.g., when homing away from the bed + TERN_(HOME_Z_FIRST, if (doZ) homeaxis(Z_AXIS)); - // Check for any lateral motion that might require clearance - const bool may_skate = seenR || NUM_AXIS_GANG(doX, || doY, || TERN0(Z_SAFE_HOMING, doZ), || doI, || doJ, || doK, || doU, || doV, || doW); + // 'R' to specify a specific raise. 'R0' indicates no raise, e.g., for recovery.resume + // When 'R0' is used, there should already be adequate clearance, e.g., from homing Z to max. + const bool seenR = parser.seenval('R'); - if (seenR && z_homing_height == 0) { - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("R0 = No Z raise"); - } - else { - bool with_probe = ENABLED(HOMING_Z_WITH_PROBE); - // Raise above the current Z (which should be synced in the planner) - // The "height" for Z is a coordinate. But if Z is not trusted/homed make it relative. - if (seenR || !TERN(HOME_AFTER_DEACTIVATE, axis_is_trusted, axis_was_homed)(Z_AXIS)) { - z_homing_height += current_position.z; - with_probe = false; + // Use raise given by 'R' or Z_CLEARANCE_FOR_HOMING (above the probe trigger point) + float z_homing_height = seenR ? parser.value_linear_units() : Z_CLEARANCE_FOR_HOMING; + + // Check for any lateral motion that might require clearance + const bool may_skate = seenR || NUM_AXIS_GANG(doX, || doY, || TERN0(Z_SAFE_HOMING, doZ), || doI, || doJ, || doK, || doU, || doV, || doW); + + if (seenR && z_homing_height == 0) { + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("R0 = No Z raise"); + } + else { + bool with_probe = ENABLED(HOMING_Z_WITH_PROBE); + // Raise above the current Z (which should be synced in the planner) + // The "height" for Z is a coordinate. But if Z is not trusted/homed make it relative. + if (seenR || !TERN(HOME_AFTER_DEACTIVATE, axis_is_trusted, axis_was_homed)(Z_AXIS)) { + z_homing_height += current_position.z; + with_probe = false; + } + + if (may_skate) { + // Apply Z clearance before doing any lateral motion + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Raise Z before homing:"); + do_z_clearance(z_homing_height, with_probe); + } } - if (may_skate) { - // Apply Z clearance before doing any lateral motion - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Raise Z before homing:"); - do_z_clearance(z_homing_height, with_probe); - } - } + // Init BLTouch ahead of any lateral motion, even if not homing with the probe + TERN_(BLTOUCH, if (may_skate) bltouch.init()); - // Init BLTouch ahead of any lateral motion, even if not homing with the probe - TERN_(BLTOUCH, if (may_skate) bltouch.init()); + #endif // HAS_Z_AXIS // Diagonal move first if both are homing TERN_(QUICK_HOME, if (doX && doY) quick_home_xy()); @@ -497,11 +498,14 @@ void GcodeSuite::G28() { TERN_(IMPROVE_HOMING_RELIABILITY, end_slow_homing(saved_motion_state)); #if ENABLED(FOAMCUTTER_XYUV) - // skip homing of unused Z axis for foamcutters + + // Skip homing of unused Z axis for foamcutters if (doZ) set_axis_is_at_home(Z_AXIS); - #else + + #elif HAS_Z_AXIS + // Home Z last if homing towards the bed - #if HAS_Z_AXIS && DISABLED(HOME_Z_FIRST) + #if DISABLED(HOME_Z_FIRST) if (doZ) { #if EITHER(Z_MULTI_ENDSTOPS, Z_STEPPER_AUTO_ALIGN) stepper.set_all_z_lock(false); @@ -513,7 +517,7 @@ void GcodeSuite::G28() { #else homeaxis(Z_AXIS); #endif - probe.move_z_after_homing(); + do_move_after_z_homing(); } #endif @@ -525,7 +529,8 @@ void GcodeSuite::G28() { if (doV) homeaxis(V_AXIS), if (doW) homeaxis(W_AXIS) ); - #endif + + #endif // HAS_Z_AXIS sync_plan_position(); @@ -629,7 +634,7 @@ void GcodeSuite::G28() { report_current_position(); - if (ENABLED(NANODLP_Z_SYNC) && (doZ || ENABLED(NANODLP_ALL_AXIS))) + if (BOTH(NANODLP_Z_SYNC, NANODLP_ALL_AXIS) || TERN0(HAS_Z_AXIS, doZ)) SERIAL_ECHOLNPGM(STR_Z_MOVE_COMP); TERN_(FULL_REPORT_TO_HOST_FEATURE, set_and_report_grblstate(old_grblstate)); diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 4bbb43a216..c09f668450 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -3180,24 +3180,24 @@ #endif /** - * Z_HOMING_HEIGHT / Z_CLEARANCE_BETWEEN_PROBES + * Z_CLEARANCE_FOR_HOMING / Z_CLEARANCE_BETWEEN_PROBES */ -#ifndef Z_HOMING_HEIGHT +#ifndef Z_CLEARANCE_FOR_HOMING #ifdef Z_CLEARANCE_BETWEEN_PROBES - #define Z_HOMING_HEIGHT Z_CLEARANCE_BETWEEN_PROBES + #define Z_CLEARANCE_FOR_HOMING Z_CLEARANCE_BETWEEN_PROBES #else - #define Z_HOMING_HEIGHT 0 + #define Z_CLEARANCE_FOR_HOMING 0 #endif #endif #if PROBE_SELECTED #ifndef Z_CLEARANCE_BETWEEN_PROBES - #define Z_CLEARANCE_BETWEEN_PROBES Z_HOMING_HEIGHT + #define Z_CLEARANCE_BETWEEN_PROBES Z_CLEARANCE_FOR_HOMING #endif - #if Z_CLEARANCE_BETWEEN_PROBES > Z_HOMING_HEIGHT + #if Z_CLEARANCE_BETWEEN_PROBES > Z_CLEARANCE_FOR_HOMING #define Z_CLEARANCE_BETWEEN_MANUAL_PROBES Z_CLEARANCE_BETWEEN_PROBES #else - #define Z_CLEARANCE_BETWEEN_MANUAL_PROBES Z_HOMING_HEIGHT + #define Z_CLEARANCE_BETWEEN_MANUAL_PROBES Z_CLEARANCE_FOR_HOMING #endif #ifndef Z_CLEARANCE_MULTI_PROBE #define Z_CLEARANCE_MULTI_PROBE Z_CLEARANCE_BETWEEN_PROBES diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index fd58a9c54e..8a3e0a6cda 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -214,9 +214,11 @@ #elif defined(PID_ADD_EXTRUSION_RATE) #error "PID_ADD_EXTRUSION_RATE is now PID_EXTRUSION_SCALING and is DISABLED by default." #elif defined(Z_RAISE_BEFORE_HOMING) - #error "Z_RAISE_BEFORE_HOMING is now Z_HOMING_HEIGHT." + #error "Z_RAISE_BEFORE_HOMING is now Z_CLEARANCE_FOR_HOMING." #elif defined(MIN_Z_HEIGHT_FOR_HOMING) - #error "MIN_Z_HEIGHT_FOR_HOMING is now Z_HOMING_HEIGHT." + #error "MIN_Z_HEIGHT_FOR_HOMING is now Z_CLEARANCE_FOR_HOMING." +#elif defined(Z_HOMING_HEIGHT) + #error "Z_HOMING_HEIGHT is now Z_CLEARANCE_FOR_HOMING." #elif defined(Z_RAISE_BEFORE_PROBING) || defined(Z_RAISE_AFTER_PROBING) #error "Z_RAISE_(BEFORE|AFTER)_PROBING are deprecated. Use Z_CLEARANCE_DEPLOY_PROBE and Z_AFTER_PROBING instead." #elif defined(Z_RAISE_PROBE_DEPLOY_STOW) || defined(Z_RAISE_BETWEEN_PROBINGS) @@ -1945,8 +1947,8 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #error "TOUCH_MI_PROBE requires TOUCH_MI_RETRACT_Z." #elif defined(Z_AFTER_PROBING) #error "TOUCH_MI_PROBE requires Z_AFTER_PROBING to be disabled." - #elif Z_HOMING_HEIGHT < 10 - #error "TOUCH_MI_PROBE requires Z_HOMING_HEIGHT >= 10." + #elif Z_CLEARANCE_FOR_HOMING < 10 + #error "TOUCH_MI_PROBE requires Z_CLEARANCE_FOR_HOMING >= 10." #elif DISABLED(BABYSTEP_ZPROBE_OFFSET) #error "TOUCH_MI_PROBE requires BABYSTEPPING with BABYSTEP_ZPROBE_OFFSET." #elif !HAS_RESUME_CONTINUE diff --git a/Marlin/src/lcd/extui/mks_ui/draw_z_offset_wizard.cpp b/Marlin/src/lcd/extui/mks_ui/draw_z_offset_wizard.cpp index dbe8577dc9..69e547a68c 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_z_offset_wizard.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_z_offset_wizard.cpp @@ -102,8 +102,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { current_position.z = z_offset_ref; // Set Z to z_offset_ref, as we can expect it is at probe height probe.offset.z = calculated_z_offset; sync_plan_position(); - // Raise Z as if it was homed - do_z_clearance(Z_POST_CLEARANCE); + do_z_post_clearance(); hal.watchdog_refresh(); draw_return_ui(); return; @@ -111,11 +110,12 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { probe.offset.z = z_offset_backup; SET_SOFT_ENDSTOP_LOOSE(false); TERN_(HAS_LEVELING, set_bed_leveling_enabled(mks_leveling_was_active)); + // On cancel the Z position needs correction #if HOMING_Z_WITH_PROBE && defined(PROBE_OFFSET_WIZARD_START_Z) - set_axis_never_homed(Z_AXIS); // On cancel the Z position needs correction + set_axis_never_homed(Z_AXIS); queue.inject_P(PSTR("G28Z")); - #else // Otherwise do a Z clearance move like after Homing - do_z_clearance(Z_POST_CLEARANCE); + #else + do_z_post_clearance(); #endif hal.watchdog_refresh(); draw_return_ui(); diff --git a/Marlin/src/lcd/menu/menu_probe_offset.cpp b/Marlin/src/lcd/menu/menu_probe_offset.cpp index 34172de458..62704cdede 100644 --- a/Marlin/src/lcd/menu/menu_probe_offset.cpp +++ b/Marlin/src/lcd/menu/menu_probe_offset.cpp @@ -44,10 +44,6 @@ void _goto_manual_move_z(const_float_t); // Global storage float z_offset_backup, calculated_z_offset, z_offset_ref; -inline void z_clearance_move() { - do_z_clearance(Z_POST_CLEARANCE); -} - void set_offset_and_go_back(const_float_t z) { probe.offset.z = z; SET_SOFT_ENDSTOP_LOOSE(false); @@ -75,17 +71,17 @@ void probe_offset_wizard_menu() { set_offset_and_go_back(calculated_z_offset); current_position.z = z_offset_ref; // Set Z to z_offset_ref, as we can expect it is at probe height sync_plan_position(); - z_clearance_move(); // Raise Z as if it was homed + do_z_post_clearance(); }); ACTION_ITEM(MSG_BUTTON_CANCEL, []{ set_offset_and_go_back(z_offset_backup); - // If wizard-homing was done by probe with PROBE_OFFSET_WIZARD_START_Z + // On cancel the Z position needs correction #if HOMING_Z_WITH_PROBE && defined(PROBE_OFFSET_WIZARD_START_Z) - set_axis_never_homed(Z_AXIS); // On cancel the Z position needs correction + set_axis_never_homed(Z_AXIS); queue.inject(F("G28Z")); - #else // Otherwise do a Z clearance move like after Homing - z_clearance_move(); + #else + do_z_post_clearance(); #endif }); diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp index 219f219e59..6917bbc42a 100644 --- a/Marlin/src/module/motion.cpp +++ b/Marlin/src/module/motion.cpp @@ -38,6 +38,10 @@ #include "../lcd/marlinui.h" #endif +#if ALL(DWIN_LCD_PROUI, INDIVIDUAL_AXIS_HOMING_SUBMENU, MESH_BED_LEVELING) + #include "../lcd/e3v2/proui/dwin.h" +#endif + #if ENABLED(POLAR) #include "polar.h" #endif @@ -795,6 +799,14 @@ void do_blocking_move_to_x(const_float_t rx, const_feedRate_t fr_mm_s/*=0.0*/) { if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("do_z_clearance_by(", zclear, ")"); do_z_clearance(current_position.z + zclear, false); } + void do_move_after_z_homing() { + DEBUG_SECTION(mzah, "do_move_after_z_homing", DEBUGGING(LEVELING)); + #if defined(Z_AFTER_HOMING) || ALL(DWIN_LCD_PROUI, INDIVIDUAL_AXIS_HOMING_SUBMENU, MESH_BED_LEVELING) + do_z_clearance(Z_POST_CLEARANCE, true, true); + #elif ENABLED(USE_PROBE_FOR_Z_HOMING) + probe.move_z_after_probing(); + #endif + } #endif // @@ -803,13 +815,10 @@ void do_blocking_move_to_x(const_float_t rx, const_feedRate_t fr_mm_s/*=0.0*/) { // static float saved_feedrate_mm_s; static int16_t saved_feedrate_percentage; -void remember_feedrate_and_scaling() { - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("remember_feedrate_and_scaling: fr=", feedrate_mm_s, " ", feedrate_percentage, "%"); +void remember_feedrate_scaling_off() { + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("remember_feedrate_scaling_off: fr=", feedrate_mm_s, " ", feedrate_percentage, "%"); saved_feedrate_mm_s = feedrate_mm_s; saved_feedrate_percentage = feedrate_percentage; -} -void remember_feedrate_scaling_off() { - remember_feedrate_and_scaling(); feedrate_percentage = 100; } void restore_feedrate_and_scaling() { diff --git a/Marlin/src/module/motion.h b/Marlin/src/module/motion.h index c93b1ef205..4cd4641e3d 100644 --- a/Marlin/src/module/motion.h +++ b/Marlin/src/module/motion.h @@ -398,13 +398,21 @@ void do_blocking_move_to_x(const_float_t rx, const_feedRate_t fr_mm_s=0.0f); FORCE_INLINE void do_blocking_move_to_xy_z(const xyze_pos_t &raw, const_float_t z, const_feedRate_t fr_mm_s=0.0f) { do_blocking_move_to_xy_z(xy_pos_t(raw), z, fr_mm_s); } #endif -void remember_feedrate_and_scaling(); void remember_feedrate_scaling_off(); void restore_feedrate_and_scaling(); #if HAS_Z_AXIS + #if ALL(DWIN_LCD_PROUI, INDIVIDUAL_AXIS_HOMING_SUBMENU, MESH_BED_LEVELING) + #define Z_POST_CLEARANCE HMI_data.z_after_homing + #elif defined(Z_AFTER_HOMING) + #define Z_POST_CLEARANCE Z_AFTER_HOMING + #else + #define Z_POST_CLEARANCE Z_CLEARANCE_FOR_HOMING + #endif void do_z_clearance(const_float_t zclear, const bool with_probe=true, const bool lower_allowed=false); void do_z_clearance_by(const_float_t zclear); + void do_move_after_z_homing(); + inline void do_z_post_clearance() { do_z_clearance(Z_POST_CLEARANCE); } #else inline void do_z_clearance(float, bool=true, bool=false) {} inline void do_z_clearance_by(float) {} diff --git a/Marlin/src/module/probe.h b/Marlin/src/module/probe.h index ebae929439..4c6f233905 100644 --- a/Marlin/src/module/probe.h +++ b/Marlin/src/module/probe.h @@ -29,10 +29,6 @@ #include "motion.h" -#if ENABLED(DWIN_LCD_PROUI) - #include "../lcd/e3v2/proui/dwin.h" -#endif - #define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE) #include "../core/debug_out.h" @@ -51,16 +47,6 @@ #define PROBE_TRIGGERED() (READ(Z_MIN_PIN) == Z_MIN_ENDSTOP_HIT_STATE) #endif -#if ALL(DWIN_LCD_PROUI, INDIVIDUAL_AXIS_HOMING_SUBMENU, MESH_BED_LEVELING) - #define Z_POST_CLEARANCE HMI_data.z_after_homing -#elif defined(Z_AFTER_HOMING) - #define Z_POST_CLEARANCE Z_AFTER_HOMING -#elif defined(Z_HOMING_HEIGHT) - #define Z_POST_CLEARANCE Z_HOMING_HEIGHT -#else - #define Z_POST_CLEARANCE 10 -#endif - // In BLTOUCH HS mode, the probe travels in a deployed state. #define Z_PROBE_SAFE_CLEARANCE SUM_TERN(BLTOUCH, Z_CLEARANCE_BETWEEN_PROBES, bltouch.z_extra_clearance()) @@ -190,19 +176,10 @@ public: static void use_probing_tool(const bool=true) IF_DISABLED(DO_TOOLCHANGE_FOR_PROBING, {}); - #ifndef Z_AFTER_PROBING - #define Z_AFTER_PROBING 0 - #endif - static void move_z_after_probing(const float z=Z_AFTER_PROBING) { + static void move_z_after_probing() { DEBUG_SECTION(mzah, "move_z_after_probing", DEBUGGING(LEVELING)); - if (z != 0) do_z_clearance(z, true, true); // Move down still permitted - } - static void move_z_after_homing() { - DEBUG_SECTION(mzah, "move_z_after_homing", DEBUGGING(LEVELING)); - #if defined(Z_AFTER_HOMING) || ALL(DWIN_LCD_PROUI, INDIVIDUAL_AXIS_HOMING_SUBMENU, MESH_BED_LEVELING) - move_z_after_probing(Z_POST_CLEARANCE); - #elif HAS_BED_PROBE - move_z_after_probing(); + #ifdef Z_AFTER_PROBING + do_z_clearance(Z_AFTER_PROBING, true, true); // Move down still permitted #endif } From 0c2ed8688dd387b56b318f6207ee1cc70811b5a5 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 17 Apr 2023 21:00:12 -0500 Subject: [PATCH 192/225] =?UTF-8?q?=F0=9F=A9=B9=20Z=20clearance=20followup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/gcode/calibrate/G28.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/gcode/calibrate/G28.cpp b/Marlin/src/gcode/calibrate/G28.cpp index 89e0c8d8d4..782761ee14 100644 --- a/Marlin/src/gcode/calibrate/G28.cpp +++ b/Marlin/src/gcode/calibrate/G28.cpp @@ -634,7 +634,7 @@ void GcodeSuite::G28() { report_current_position(); - if (BOTH(NANODLP_Z_SYNC, NANODLP_ALL_AXIS) || TERN0(HAS_Z_AXIS, doZ)) + if (ENABLED(NANODLP_Z_SYNC) && (ENABLED(NANODLP_ALL_AXIS) || TERN0(HAS_Z_AXIS, doZ))) SERIAL_ECHOLNPGM(STR_Z_MOVE_COMP); TERN_(FULL_REPORT_TO_HOST_FEATURE, set_and_report_grblstate(old_grblstate)); From 158c4de4f6d5a91379226f00e6e9e0e7c153d22f Mon Sep 17 00:00:00 2001 From: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Tue, 18 Apr 2023 10:40:13 +0200 Subject: [PATCH 193/225] =?UTF-8?q?=F0=9F=A9=B9=20Bail=20on=20'mc.zip'=20w?= =?UTF-8?q?rite=20error=20(#25695)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/src/gcode/eeprom/M500-M504.cpp | 2 +- Marlin/src/sd/SdBaseFile.cpp | 2 +- Marlin/src/sd/SdBaseFile.h | 2 +- Marlin/src/sd/SdFile.cpp | 6 +----- Marlin/src/sd/SdFile.h | 7 +------ buildroot/tests/STM32F103RE_creality | 2 +- 6 files changed, 6 insertions(+), 15 deletions(-) diff --git a/Marlin/src/gcode/eeprom/M500-M504.cpp b/Marlin/src/gcode/eeprom/M500-M504.cpp index 31da2c5adf..c3962117e5 100644 --- a/Marlin/src/gcode/eeprom/M500-M504.cpp +++ b/Marlin/src/gcode/eeprom/M500-M504.cpp @@ -73,7 +73,7 @@ void GcodeSuite::M502() { bool success = true; for (uint16_t i = 0; success && i < sizeof(mc_zip); ++i) { const uint8_t c = pgm_read_byte(&mc_zip[i]); - file.write(c); + success = (file.write(c) == 1); } success = file.close() && success; diff --git a/Marlin/src/sd/SdBaseFile.cpp b/Marlin/src/sd/SdBaseFile.cpp index 4f4a8e9fa9..5ee0db2b9e 100644 --- a/Marlin/src/sd/SdBaseFile.cpp +++ b/Marlin/src/sd/SdBaseFile.cpp @@ -2169,7 +2169,7 @@ bool SdBaseFile::truncate(uint32_t length) { * include write() is called before a file has been opened, write is called * for a read-only file, device is full, a corrupt file system or an I/O error. */ -int16_t SdBaseFile::write(const void *buf, uint16_t nbyte) { +int16_t SdBaseFile::write(const void *buf, const uint16_t nbyte) { #if ENABLED(SDCARD_READONLY) writeError = true; return -1; #endif diff --git a/Marlin/src/sd/SdBaseFile.h b/Marlin/src/sd/SdBaseFile.h index 046c2447cb..3ac23138b1 100644 --- a/Marlin/src/sd/SdBaseFile.h +++ b/Marlin/src/sd/SdBaseFile.h @@ -345,7 +345,7 @@ class SdBaseFile { * \return SdVolume that contains this file. */ SdVolume* volume() const { return vol_; } - int16_t write(const void *buf, uint16_t nbyte); + int16_t write(const void *buf, const uint16_t nbyte); private: friend class SdFat; // allow SdFat to set cwd_ diff --git a/Marlin/src/sd/SdFile.cpp b/Marlin/src/sd/SdFile.cpp index ac5f6f9234..a1dd793727 100644 --- a/Marlin/src/sd/SdFile.cpp +++ b/Marlin/src/sd/SdFile.cpp @@ -67,11 +67,7 @@ int16_t SdFile::write(const void * const buf, const uint16_t nbyte) { return SdB * \param[in] b the byte to be written. * Use writeError to check for errors. */ -#if ARDUINO >= 100 - size_t SdFile::write(const uint8_t b) { return SdBaseFile::write(&b, 1); } -#else - void SdFile::write(const uint8_t b) { SdBaseFile::write(&b, 1); } -#endif +size_t SdFile::write(const uint8_t b) { return SdBaseFile::write(&b, 1); } /** * Write a string to a file. Used by the Arduino Print class. diff --git a/Marlin/src/sd/SdFile.h b/Marlin/src/sd/SdFile.h index b075239ebb..cdce1ffe12 100644 --- a/Marlin/src/sd/SdFile.h +++ b/Marlin/src/sd/SdFile.h @@ -42,12 +42,7 @@ class SdFile : public SdBaseFile { public: SdFile() {} SdFile(const char * const name, const uint8_t oflag); - #if ARDUINO >= 100 - size_t write(const uint8_t b); - #else - void write(const uint8_t b); - #endif - + size_t write(const uint8_t b); int16_t write(const void * const buf, const uint16_t nbyte); void write(const char * const str); void write_P(PGM_P str); diff --git a/buildroot/tests/STM32F103RE_creality b/buildroot/tests/STM32F103RE_creality index 6677559720..d407dc4301 100755 --- a/buildroot/tests/STM32F103RE_creality +++ b/buildroot/tests/STM32F103RE_creality @@ -19,7 +19,7 @@ opt_enable DWIN_CREALITY_LCD_JYERSUI AUTO_BED_LEVELING_BILINEAR PROBE_MANUALLY exec_test $1 $2 "Ender-3 v2 with JyersUI" "$3" use_example_configs "Creality/Ender-3 S1/STM32F1" -opt_disable DWIN_CREALITY_LCD Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN AUTO_BED_LEVELING_BILINEAR CONFIGURATION_EMBEDDING CANCEL_OBJECTS FWRETRACT +opt_disable DWIN_CREALITY_LCD Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN AUTO_BED_LEVELING_BILINEAR CANCEL_OBJECTS FWRETRACT opt_enable DWIN_LCD_PROUI INDIVIDUAL_AXIS_HOMING_SUBMENU SET_PROGRESS_MANUALLY SET_PROGRESS_PERCENT STATUS_MESSAGE_SCROLLING \ SOUND_MENU_ITEM PRINTCOUNTER NOZZLE_PARK_FEATURE ADVANCED_PAUSE_FEATURE FILAMENT_RUNOUT_SENSOR \ BLTOUCH Z_SAFE_HOMING AUTO_BED_LEVELING_UBL MESH_EDIT_MENU \ From 5e2e00306e034c9bb0ad5180e1c7b138f6616f5e Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Wed, 19 Apr 2023 00:22:13 +0000 Subject: [PATCH 194/225] [cron] Bump distribution date (2023-04-19) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index c6846adb43..e1ea5a7d53 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-04-18" +//#define STRING_DISTRIBUTION_DATE "2023-04-19" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 2274701600..38c87f0d1a 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-04-18" + #define STRING_DISTRIBUTION_DATE "2023-04-19" #endif /** From 19b4ae862b4db32f94f3ff004b5e5e3116502e3f Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Wed, 19 Apr 2023 12:50:11 +1200 Subject: [PATCH 195/225] =?UTF-8?q?=F0=9F=A9=B9=20Correctly=20add=20JSON?= =?UTF-8?q?=20to=20mc.zip=20(#25706)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buildroot/share/PlatformIO/scripts/signature.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/buildroot/share/PlatformIO/scripts/signature.py b/buildroot/share/PlatformIO/scripts/signature.py index 0da02f837b..84312da01b 100644 --- a/buildroot/share/PlatformIO/scripts/signature.py +++ b/buildroot/share/PlatformIO/scripts/signature.py @@ -39,9 +39,9 @@ def get_file_sha256sum(filepath): # Compress a JSON file into a zip file # import zipfile -def compress_file(filepath, outpath): +def compress_file(filepath, storedname, outpath): with zipfile.ZipFile(outpath, 'w', compression=zipfile.ZIP_BZIP2, compresslevel=9) as zipf: - zipf.write(filepath, compress_type=zipfile.ZIP_BZIP2, compresslevel=9) + zipf.write(filepath, arcname=storedname, compress_type=zipfile.ZIP_BZIP2, compresslevel=9) # # Compute the build signature. The idea is to extract all defines in the configuration headers @@ -56,14 +56,13 @@ def compute_build_signature(env): files_to_keep = [ 'Marlin/Configuration.h', 'Marlin/Configuration_adv.h' ] build_path = Path(env['PROJECT_BUILD_DIR'], env['PIOENV']) - build_path_relative = Path('.pio', 'build', env['PIOENV']) # Check if we can skip processing hashes = '' for header in files_to_keep: hashes += get_file_sha256sum(header)[0:10] - marlin_json = build_path_relative / 'marlin_config.json' + marlin_json = build_path / 'marlin_config.json' marlin_zip = build_path / 'mc.zip' # Read existing config file @@ -72,7 +71,7 @@ def compute_build_signature(env): conf = json.load(infile) if conf['__INITIAL_HASH'] == hashes: # Same configuration, skip recomputing the building signature - compress_file(marlin_json, marlin_zip) + compress_file(marlin_json, 'marlin_config.json', marlin_zip) return except: pass @@ -256,7 +255,7 @@ def compute_build_signature(env): return # Compress the JSON file as much as we can - compress_file(marlin_json, marlin_zip) + compress_file(marlin_json, 'marlin_config.json', marlin_zip) # Generate a C source file for storing this array with open('Marlin/src/mczip.h','wb') as result_file: From fad1dcefbcd300128b474783f1183ea8a6d18496 Mon Sep 17 00:00:00 2001 From: Jay Robson <45777442+jsrobson10@users.noreply.github.com> Date: Thu, 20 Apr 2023 06:58:42 +1000 Subject: [PATCH 196/225] =?UTF-8?q?=F0=9F=90=9B=20Fix=20G38=20with=20Z,=20?= =?UTF-8?q?support=209=20axes=20(#25691)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/src/inc/Conditionals_post.h | 6 +++--- Marlin/src/module/endstops.cpp | 14 +++++--------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index c09f668450..96b7313f29 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -341,21 +341,21 @@ #ifdef MANUAL_U_HOME_POS #define U_HOME_POS MANUAL_U_HOME_POS #else - #define U_HOME_POS (U_HOME_DIR < 0 ? U_MIN_POS : U_MAX_POS) + #define U_HOME_POS TERN(U_HOME_TO_MIN, U_MIN_POS, U_MAX_POS) #endif #endif #if HAS_V_AXIS #ifdef MANUAL_V_HOME_POS #define V_HOME_POS MANUAL_V_HOME_POS #else - #define V_HOME_POS (V_HOME_DIR < 0 ? V_MIN_POS : V_MAX_POS) + #define V_HOME_POS TERN(V_HOME_TO_MIN, V_MIN_POS, V_MAX_POS) #endif #endif #if HAS_W_AXIS #ifdef MANUAL_W_HOME_POS #define W_HOME_POS MANUAL_W_HOME_POS #else - #define W_HOME_POS (W_HOME_DIR < 0 ? W_MIN_POS : W_MAX_POS) + #define W_HOME_POS TERN(W_HOME_TO_MIN, W_MIN_POS, W_MAX_POS) #endif #endif diff --git a/Marlin/src/module/endstops.cpp b/Marlin/src/module/endstops.cpp index 6719925f15..ccad00062e 100644 --- a/Marlin/src/module/endstops.cpp +++ b/Marlin/src/module/endstops.cpp @@ -913,17 +913,13 @@ void Endstops::update() { #endif #if HAS_G38_PROBE // TODO (DerAndere): Add support for HAS_I_AXIS - #define _G38_OPEN_STATE TERN(G38_PROBE_AWAY, (G38_move >= 4), LOW) // For G38 moves check the probe's pin for ALL movement - if (G38_move && TEST_ENDSTOP(_ENDSTOP(Z, TERN(USES_Z_MIN_PROBE_PIN, MIN_PROBE, MIN))) != _G38_OPEN_STATE) { - if (stepper.axis_is_moving(X_AXIS)) { _ENDSTOP_HIT(X, TERN(X_HOME_TO_MIN, MIN, MAX)); planner.endstop_triggered(X_AXIS); } - #if HAS_Y_AXIS - else if (stepper.axis_is_moving(Y_AXIS)) { _ENDSTOP_HIT(Y, TERN(Y_HOME_TO_MIN, MIN, MAX)); planner.endstop_triggered(Y_AXIS); } - #endif - #if HAS_Z_AXIS - else if (stepper.axis_is_moving(Z_AXIS)) { _ENDSTOP_HIT(Z, TERN(Z_HOME_TO_MIN, MIN, MAX)); planner.endstop_triggered(Z_AXIS); } - #endif + if (G38_move && TEST_ENDSTOP(_ENDSTOP(Z, TERN(USES_Z_MIN_PROBE_PIN, MIN_PROBE, MIN))) == TERN1(G38_PROBE_AWAY, (G38_move < 4))) { G38_did_trigger = true; + #define _G38_SET(Q) | (stepper.axis_is_moving(_AXIS(Q)) << _AXIS(Q)) + #define _G38_RESP(Q) if (moving[_AXIS(Q)]) { _ENDSTOP_HIT(Q, ENDSTOP); planner.endstop_triggered(_AXIS(Q)); } + const Flags moving = { value_t(NUM_AXES)(0 MAIN_AXIS_MAP(_G38_SET)) }; + MAIN_AXIS_MAP(_G38_RESP); } #endif From 4ac9cfba4f44235047e95d3dd64579577262d4fa Mon Sep 17 00:00:00 2001 From: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Wed, 19 Apr 2023 14:53:11 -0700 Subject: [PATCH 197/225] =?UTF-8?q?=F0=9F=94=A7=20Check=20renamed=20LIN=5F?= =?UTF-8?q?ADVANCE=5FK=20(#25710)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/SanityCheck.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 8a3e0a6cda..f5d0c785eb 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -656,6 +656,8 @@ #error "USE_M73_REMAINING_TIME is now SET_REMAINING_TIME." #elif defined(SHOW_SD_PERCENT) #error "SHOW_SD_PERCENT is now SHOW_PROGRESS_PERCENT." +#elif defined(LIN_ADVANCE_K) + #error "LIN_ADVANCE_K is now ADVANCE_K." #elif defined(EXTRA_LIN_ADVANCE_K) #error "EXTRA_LIN_ADVANCE_K is now ADVANCE_K_EXTRA." #elif defined(POLAR_SEGMENTS_PER_SECOND) || defined(DELTA_SEGMENTS_PER_SECOND) || defined(SCARA_SEGMENTS_PER_SECOND) || defined(TPARA_SEGMENTS_PER_SECOND) From c087ad04d3fb95fff1ae032d4f395e4fa33e31ed Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Thu, 20 Apr 2023 00:20:18 +0000 Subject: [PATCH 198/225] [cron] Bump distribution date (2023-04-20) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index e1ea5a7d53..c803516490 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-04-19" +//#define STRING_DISTRIBUTION_DATE "2023-04-20" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 38c87f0d1a..ed0440a7db 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-04-19" + #define STRING_DISTRIBUTION_DATE "2023-04-20" #endif /** From de7726ca019461d029f9fe2a14a85b8ecf8723fe Mon Sep 17 00:00:00 2001 From: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Wed, 19 Apr 2023 17:21:53 -0700 Subject: [PATCH 199/225] =?UTF-8?q?=F0=9F=9A=B8=20Permit=20G38=20with=20Co?= =?UTF-8?q?re=20(#25713)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/module/endstops.cpp | 7 +++---- Marlin/src/module/endstops.h | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Marlin/src/module/endstops.cpp b/Marlin/src/module/endstops.cpp index ccad00062e..02af062eca 100644 --- a/Marlin/src/module/endstops.cpp +++ b/Marlin/src/module/endstops.cpp @@ -517,8 +517,7 @@ void Endstops::update() { #define UPDATE_ENDSTOP_BIT(AXIS, MINMAX) SET_BIT_TO(live_state, _ENDSTOP(AXIS, MINMAX), (READ_ENDSTOP(_ENDSTOP_PIN(AXIS, MINMAX)) == _ENDSTOP_HIT_STATE(AXIS, MINMAX))) #define COPY_LIVE_STATE(SRC_BIT, DST_BIT) SET_BIT_TO(live_state, DST_BIT, TEST(live_state, SRC_BIT)) - #if ENABLED(G38_PROBE_TARGET) && NONE(CORE_IS_XY, CORE_IS_XZ, MARKFORGED_XY, MARKFORGED_YX) - #define HAS_G38_PROBE 1 + #if ENABLED(G38_PROBE_TARGET) // For G38 moves check the probe's pin for ALL movement if (G38_move) UPDATE_ENDSTOP_BIT(Z, TERN(USES_Z_MIN_PROBE_PIN, MIN_PROBE, MIN)); #endif @@ -912,9 +911,9 @@ void Endstops::update() { #define PROCESS_ENDSTOP_Z(MINMAX) PROCESS_DUAL_ENDSTOP(Z, MINMAX) #endif - #if HAS_G38_PROBE // TODO (DerAndere): Add support for HAS_I_AXIS + #if ENABLED(G38_PROBE_TARGET) // For G38 moves check the probe's pin for ALL movement - if (G38_move && TEST_ENDSTOP(_ENDSTOP(Z, TERN(USES_Z_MIN_PROBE_PIN, MIN_PROBE, MIN))) == TERN1(G38_PROBE_AWAY, (G38_move < 4))) { + if (G38_move && TEST_ENDSTOP(Z_MIN_PROBE) == TERN1(G38_PROBE_AWAY, (G38_move < 4))) { G38_did_trigger = true; #define _G38_SET(Q) | (stepper.axis_is_moving(_AXIS(Q)) << _AXIS(Q)) #define _G38_RESP(Q) if (moving[_AXIS(Q)]) { _ENDSTOP_HIT(Q, ENDSTOP); planner.endstop_triggered(_AXIS(Q)); } diff --git a/Marlin/src/module/endstops.h b/Marlin/src/module/endstops.h index 76c8d454d7..e0c0de39a1 100644 --- a/Marlin/src/module/endstops.h +++ b/Marlin/src/module/endstops.h @@ -96,7 +96,7 @@ enum EndstopEnum : char { #endif #endif #if HAS_Z_MIN || HAS_Z_MAX || HOMING_Z_WITH_PROBE - , Z_ENDSTOP = TERN(Z_HOME_TO_MAX, Z_MAX, TERN(HOMING_Z_WITH_PROBE, Z_MIN_PROBE, Z_MIN)) + , Z_ENDSTOP = TERN(HOMING_Z_WITH_PROBE, Z_MIN_PROBE, TERN(Z_HOME_TO_MAX, Z_MAX, Z_MIN)) #endif #if HAS_I_MIN || HAS_I_MAX , I_ENDSTOP = TERN(I_HOME_TO_MAX, I_MAX, I_MIN) From 91cce2a7b39f1b64e37224fe6bef4ce00463fecf Mon Sep 17 00:00:00 2001 From: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Wed, 19 Apr 2023 19:42:05 -0700 Subject: [PATCH 200/225] =?UTF-8?q?=E2=9C=A8=20Panowin=20Cutlass=20/=20Bar?= =?UTF-8?q?do=20(F1=20/=20Trinus)=20(#25663)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/AVR/pinsDebug.h | 1 - Marlin/src/HAL/AVR/pinsDebug_plus_70.h | 1 - Marlin/src/HAL/TEENSY35_36/pinsDebug.h | 2 +- Marlin/src/HAL/TEENSY40_41/pinsDebug.h | 2 +- Marlin/src/core/boards.h | 2 + Marlin/src/gcode/control/M42.cpp | 3 +- Marlin/src/inc/Conditionals_LCD.h | 7 +- Marlin/src/pins/pins.h | 4 + Marlin/src/pins/ramps/pins_KODAMA_BARDO.h | 34 +++++ Marlin/src/pins/ramps/pins_PANOWIN_CUTLASS.h | 133 +++++++++++++++++++ 10 files changed, 183 insertions(+), 6 deletions(-) create mode 100644 Marlin/src/pins/ramps/pins_KODAMA_BARDO.h create mode 100755 Marlin/src/pins/ramps/pins_PANOWIN_CUTLASS.h diff --git a/Marlin/src/HAL/AVR/pinsDebug.h b/Marlin/src/HAL/AVR/pinsDebug.h index b91bde182d..3fe877cd00 100644 --- a/Marlin/src/HAL/AVR/pinsDebug.h +++ b/Marlin/src/HAL/AVR/pinsDebug.h @@ -90,7 +90,6 @@ void PRINT_ARRAY_NAME(uint8_t x) { #define GET_ARRAY_IS_DIGITAL(x) pgm_read_byte(&pin_array[x].is_digital) - #if defined(__AVR_ATmega1284P__) // 1284 IDE extensions set this to the number of #undef NUM_DIGITAL_PINS // digital only pins while all other CPUs have it #define NUM_DIGITAL_PINS 32 // set to digital only + digital/analog diff --git a/Marlin/src/HAL/AVR/pinsDebug_plus_70.h b/Marlin/src/HAL/AVR/pinsDebug_plus_70.h index d9aa44c3cb..fa479cfe8f 100644 --- a/Marlin/src/HAL/AVR/pinsDebug_plus_70.h +++ b/Marlin/src/HAL/AVR/pinsDebug_plus_70.h @@ -231,7 +231,6 @@ const uint8_t PROGMEM digital_pin_to_bit_mask_PGM_plus_70[] = { #define digitalPinToBitMask_plus_70(P) ( pgm_read_byte( digital_pin_to_bit_mask_PGM_plus_70 + (P) ) ) - const uint8_t PROGMEM digital_pin_to_timer_PGM_plus_70[] = { // TIMERS // ------------------------ diff --git a/Marlin/src/HAL/TEENSY35_36/pinsDebug.h b/Marlin/src/HAL/TEENSY35_36/pinsDebug.h index 7a2e1d6e59..235c0e4a48 100644 --- a/Marlin/src/HAL/TEENSY35_36/pinsDebug.h +++ b/Marlin/src/HAL/TEENSY35_36/pinsDebug.h @@ -77,7 +77,7 @@ void HAL_analog_pin_state(char buffer[], int8_t pin) { * Print a pin's PWM status. * Return true if it's currently a PWM pin. */ -bool HAL_pwm_status(int8_t pin) { +bool HAL_pwm_status(const int8_t pin) { char buffer[20]; // for the sprintf statements switch (pin) { FTM_CASE(0,0); diff --git a/Marlin/src/HAL/TEENSY40_41/pinsDebug.h b/Marlin/src/HAL/TEENSY40_41/pinsDebug.h index fc90f671cf..c85a88c9ae 100644 --- a/Marlin/src/HAL/TEENSY40_41/pinsDebug.h +++ b/Marlin/src/HAL/TEENSY40_41/pinsDebug.h @@ -136,7 +136,7 @@ void HAL_analog_pin_state(char buffer[], int8_t pin) { * Print a pin's PWM status. * Return true if it's currently a PWM pin. */ -bool HAL_pwm_status(int8_t pin) { +bool HAL_pwm_status(const int8_t pin) { char buffer[20]; // for the sprintf statements const struct pwm_pin_info_struct *info; diff --git a/Marlin/src/core/boards.h b/Marlin/src/core/boards.h index 147080542d..2f2ac1664e 100644 --- a/Marlin/src/core/boards.h +++ b/Marlin/src/core/boards.h @@ -118,6 +118,8 @@ #define BOARD_LONGER3D_LKx_PRO 1162 // Longer LKx PRO / Alfawise Uxx Pro (PRO version) #define BOARD_ZRIB_V53 1163 // Zonestar zrib V5.3 (Chinese RAMPS replica) #define BOARD_PXMALION_CORE_I3 1164 // Pxmalion Core I3 +#define BOARD_PANOWIN_CUTLASS 1165 // Panowin Cutlass (as found in the Panowin F1) +#define BOARD_KODAMA_BARDO 1166 // Kodama Bardo V1.x (as found in the Kodama Trinus) // // RAMBo and derivatives diff --git a/Marlin/src/gcode/control/M42.cpp b/Marlin/src/gcode/control/M42.cpp index 1b3a29d100..55ece67de7 100644 --- a/Marlin/src/gcode/control/M42.cpp +++ b/Marlin/src/gcode/control/M42.cpp @@ -53,6 +53,7 @@ void protected_pin_err() { * I Flag to ignore Marlin's pin protection * * T Pin mode: 0=INPUT 1=OUTPUT 2=INPUT_PULLUP 3=INPUT_PULLDOWN + * 4=INPUT_ANALOG 5=OUTPUT_OPEN_DRAIN */ void GcodeSuite::M42() { const int pin_index = PARSED_PIN_INDEX('P', GET_PIN_MAP_INDEX(LED_PIN)); @@ -119,7 +120,7 @@ void GcodeSuite::M42() { } // An OUTPUT_OPEN_DRAIN should not be changed to normal OUTPUT (STM32) - // Use M42 Px M1/5 S0/1 to set the output type and then set value + // Use M42 Px T1/5 S0/1 to set the output type and then set value #ifndef OUTPUT_OPEN_DRAIN pinMode(pin, OUTPUT); #endif diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 60bc653560..5cc1d07b09 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -484,8 +484,13 @@ #endif #endif +// Serial Controllers require LCD_SERIAL_PORT +#if ANY(HAS_DGUS_LCD, MALYAN_LCD, ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, NEXTION_TFT) + #define LCD_NEEDS_SERIAL_PORT 1 +#endif + // Extensible UI serial touch screens. (See src/lcd/extui) -#if ANY(HAS_DGUS_LCD, MALYAN_LCD, TOUCH_UI_FTDI_EVE, ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, ANYCUBIC_LCD_VYPER, NEXTION_TFT) +#if EITHER(LCD_NEEDS_SERIAL_PORT, TOUCH_UI_FTDI_EVE) #define IS_EXTUI 1 #define EXTENSIBLE_UI #endif diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index 124c940422..d3b3bbbd21 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -205,6 +205,10 @@ #include "ramps/pins_LONGER3D_LKx_PRO.h" // ATmega2560 env:mega2560 #elif MB(PXMALION_CORE_I3) #include "ramps/pins_PXMALION_CORE_I3.h" // ATmega2560 env:mega2560 +#elif MB(PANOWIN_CUTLASS) + #include "ramps/pins_PANOWIN_CUTLASS.h" // ATmega2560 env:mega2560ext +#elif MB(KODAMA_BARDO) + #include "ramps/pins_KODAMA_BARDO.h" // ATmega2560 env:mega2560ext // // RAMBo and derivatives diff --git a/Marlin/src/pins/ramps/pins_KODAMA_BARDO.h b/Marlin/src/pins/ramps/pins_KODAMA_BARDO.h new file mode 100644 index 0000000000..12597c4270 --- /dev/null +++ b/Marlin/src/pins/ramps/pins_KODAMA_BARDO.h @@ -0,0 +1,34 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2023 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 + +/** + * Kodama Bardo V1.x as found in the Kodama Trinus (MEGA2560) board pin assignments + * + * Ported from https://github.com/sambuls/MarlinOnTrinus + * Board photo https://imgur.com/a/JbQH5SI + */ + +#define BOARD_NAME "Kodama Bardo V1.x" +#define DEFAULT_MACHINE_NAME "Kodama Trinus" + +#include "pins_PANOWIN_CUTLASS.h" diff --git a/Marlin/src/pins/ramps/pins_PANOWIN_CUTLASS.h b/Marlin/src/pins/ramps/pins_PANOWIN_CUTLASS.h new file mode 100755 index 0000000000..cc651cc8ef --- /dev/null +++ b/Marlin/src/pins/ramps/pins_PANOWIN_CUTLASS.h @@ -0,0 +1,133 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2023 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 + +/** + * Panowin V?.? as found in the Panowin F1 (MEGA2560) board pin assignments + * + * Ported from https://github.com/sambuls/MarlinOnTrinus + * Board photo https://imgur.com/a/xvol1Bo + */ + +#include "env_validate.h" + +#ifndef BOARD_NAME + #define BOARD_NAME "Panowin Cutlass" +#endif + +#ifndef DEFAULT_MACHINE_NAME + #define DEFAULT_MACHINE_NAME "Panowin F1" +#endif + +// +// Limit Switches +// +#define X_STOP_PIN 71 // G3 +#define Y_STOP_PIN 85 // H7 +#define Z_STOP_PIN 13 // B7 + +// +// Steppers +// +#define X_STEP_PIN 38 // D7 +#define X_DIR_PIN 83 +#define X_ENABLE_PIN 82 + +#define Y_STEP_PIN 37 +#define Y_DIR_PIN 40 +#define Y_ENABLE_PIN 41 + +#define Z_STEP_PIN 30 // C7 +#define Z_DIR_PIN 32 // C5 +#define Z_ENABLE_PIN 34 // C3 + +#define E0_STEP_PIN 42 +#define E0_DIR_PIN 43 +#define E0_ENABLE_PIN 44 + +// Microstepping mode pins +#define X_MS1_PIN 19 // D2 +#define X_MS2_PIN 18 // D3 +#define X_MS3_PIN 81 // D4 + +#define Y_MS1_PIN 19 // D2 +#define Y_MS2_PIN 18 // D3 +#define Y_MS3_PIN 81 // D4 + +#define Z_MS1_PIN 73 // J3 +#define Z_MS2_PIN 75 // J4 +#define Z_MS3_PIN 76 // J5 + +#define E0_MS1_PIN 46 // L3 +#define E0_MS2_PIN 47 // L2 +#define E0_MS3_PIN 45 // L4 + +// +// Temperature Sensors +// +#define TEMP_0_PIN 12 // Analog Input +#define TEMP_BED_PIN 14 // Analog Input + +// +// Heaters / Fans +// +#define HEATER_0_PIN 9 // H6 +#define HEATER_BED_PIN 8 +#define FAN0_PIN 62 // K0 +#define FAN_SOFT_PWM_REQUIRED + +// +// M3/M4/M5 - Spindle/Laser Control +// +#if HAS_CUTTER + #define SPINDLE_LASER_ENA_PIN 74 // J7 +#endif + +// +// Serial LCD +// +#if LCD_NEEDS_SERIAL_PORT && !defined(LCD_SERIAL_PORT) + #define LCD_SERIAL_PORT 2 // D16 H1 (TX2), D17 H0 (RX2) +#endif + +// +// SD Card +// +#define SD_DETECT_PIN 28 // A6 Onboard SD + +// +// Misc. Functions +// +#define BEEPER_PIN 24 // A2 + +// +// Onboard (bright!) RGB LED +// +#ifndef RGB_LED_R_PIN + #define RGB_LED_R_PIN 64 // K2 +#endif +#ifndef RGB_LED_G_PIN + #define RGB_LED_G_PIN 65 // K3 +#endif +#ifndef RGB_LED_B_PIN + #define RGB_LED_B_PIN 63 // K1 +#endif From 335ba32a0e71991402d3686162afc429130db4ec Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 20 Apr 2023 17:21:59 -0500 Subject: [PATCH 201/225] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20Core=20Kinematics?= =?UTF-8?q?=20BABYSTEP=5FXY?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/module/stepper.cpp | 38 +++++++++++++++++------------------ buildroot/tests/rambo | 2 +- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index 9728a90896..373d86970a 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -3627,7 +3627,7 @@ void Stepper::report_positions() { #if DISABLED(DELTA) - #define BABYSTEP_AXIS(AXIS, INV, DIR) do{ \ + #define BABYSTEP_AXIS(AXIS, DIR, INV) do{ \ const uint8_t old_dir = _READ_DIR(AXIS); \ _ENABLE_AXIS(AXIS); \ DIR_WAIT_BEFORE(); \ @@ -3646,12 +3646,12 @@ void Stepper::report_positions() { #if IS_CORE - #define BABYSTEP_CORE(A, B, INV, DIR, ALT) do{ \ + #define BABYSTEP_CORE(A, B, DIR, INV, ALT) do{ \ const xy_byte_t old_dir = { _READ_DIR(A), _READ_DIR(B) }; \ _ENABLE_AXIS(A); _ENABLE_AXIS(B); \ DIR_WAIT_BEFORE(); \ - _APPLY_DIR(A, INVERT_DIR(A, (DIR)^(INV)); \ - _APPLY_DIR(B, INVERT_DIR(B, (DIR)^(INV)^(ALT)); \ + _APPLY_DIR(A, INVERT_DIR(A, (DIR)^(INV))); \ + _APPLY_DIR(B, INVERT_DIR(B, (DIR)^(INV)^(ALT))); \ DIR_WAIT_AFTER(); \ _SAVE_START(); \ _APPLY_STEP(A, _STEP_STATE(A), true); \ @@ -3678,21 +3678,21 @@ void Stepper::report_positions() { case X_AXIS: #if CORE_IS_XY - BABYSTEP_CORE(X, Y, 0, direction, 0); + BABYSTEP_CORE(X, Y, direction, 0, 0); #elif CORE_IS_XZ - BABYSTEP_CORE(X, Z, 0, direction, 0); + BABYSTEP_CORE(X, Z, direction, 0, 0); #else - BABYSTEP_AXIS(X, 0, direction); + BABYSTEP_AXIS(X, direction, 0); #endif break; case Y_AXIS: #if CORE_IS_XY - BABYSTEP_CORE(X, Y, 1, !direction, (CORESIGN(1)>0)); + BABYSTEP_CORE(X, Y, !direction, 1, (CORESIGN(1)>0)); #elif CORE_IS_YZ - BABYSTEP_CORE(Y, Z, 0, direction, (CORESIGN(1)<0)); + BABYSTEP_CORE(Y, Z, direction, 0, (CORESIGN(1)<0)); #else - BABYSTEP_AXIS(Y, 0, direction); + BABYSTEP_AXIS(Y, direction, 0); #endif break; @@ -3701,11 +3701,11 @@ void Stepper::report_positions() { case Z_AXIS: { #if CORE_IS_XZ - BABYSTEP_CORE(X, Z, BABYSTEP_INVERT_Z, direction, (CORESIGN(1)<0)); + BABYSTEP_CORE(X, Z, direction, BABYSTEP_INVERT_Z, (CORESIGN(1)<0)); #elif CORE_IS_YZ - BABYSTEP_CORE(Y, Z, BABYSTEP_INVERT_Z, direction, (CORESIGN(1)<0)); + BABYSTEP_CORE(Y, Z, direction, BABYSTEP_INVERT_Z, (CORESIGN(1)<0)); #elif DISABLED(DELTA) - BABYSTEP_AXIS(Z, BABYSTEP_INVERT_Z, direction); + BABYSTEP_AXIS(Z, direction, BABYSTEP_INVERT_Z); #else // DELTA @@ -3781,22 +3781,22 @@ void Stepper::report_positions() { } break; #if HAS_I_AXIS - case I_AXIS: BABYSTEP_AXIS(I, 0, direction); break; + case I_AXIS: BABYSTEP_AXIS(I, direction, 0); break; #endif #if HAS_J_AXIS - case J_AXIS: BABYSTEP_AXIS(J, 0, direction); break; + case J_AXIS: BABYSTEP_AXIS(J, direction, 0); break; #endif #if HAS_K_AXIS - case K_AXIS: BABYSTEP_AXIS(K, 0, direction); break; + case K_AXIS: BABYSTEP_AXIS(K, direction, 0); break; #endif #if HAS_U_AXIS - case U_AXIS: BABYSTEP_AXIS(U, 0, direction); break; + case U_AXIS: BABYSTEP_AXIS(U, direction, 0); break; #endif #if HAS_V_AXIS - case V_AXIS: BABYSTEP_AXIS(V, 0, direction); break; + case V_AXIS: BABYSTEP_AXIS(V, direction, 0); break; #endif #if HAS_W_AXIS - case W_AXIS: BABYSTEP_AXIS(W, 0, direction); break; + case W_AXIS: BABYSTEP_AXIS(W, direction, 0); break; #endif default: break; diff --git a/buildroot/tests/rambo b/buildroot/tests/rambo index ca6aae471f..040773230a 100755 --- a/buildroot/tests/rambo +++ b/buildroot/tests/rambo @@ -116,7 +116,7 @@ opt_set MOTHERBOARD BOARD_RAMBO \ FAN_MIN_PWM 50 FAN_KICKSTART_TIME 100 \ XY_FREQUENCY_LIMIT 15 opt_enable COREYX USE_XMAX_PLUG MIXING_EXTRUDER GRADIENT_MIX \ - BABYSTEPPING BABYSTEP_DISPLAY_TOTAL FILAMENT_LCD_DISPLAY \ + BABYSTEPPING BABYSTEP_XY BABYSTEP_DISPLAY_TOTAL FILAMENT_LCD_DISPLAY \ REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER MENU_ADDAUTOSTART SDSUPPORT SDCARD_SORT_ALPHA \ ENDSTOP_NOISE_THRESHOLD FAN_SOFT_PWM \ FIX_MOUNTED_PROBE PROBING_ESTEPPERS_OFF PROBE_OFFSET_WIZARD \ From ded9ffa1e7cc154518fe94b5c7da4f4332eb8a27 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 20 Apr 2023 17:35:20 -0500 Subject: [PATCH 202/225] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20App?= =?UTF-8?q?ly=20INVERT=5FDIR=20to=20SET=5FSTEP=5FDIR?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/module/stepper.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index 373d86970a..045df05981 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -591,14 +591,14 @@ void Stepper::disable_all_steppers() { TERN_(EXTENSIBLE_UI, ExtUI::onSteppersDisabled()); } -#define SET_STEP_DIR(A) \ - if (motor_direction(_AXIS(A))) { \ - A##_APPLY_DIR(INVERT_##A##_DIR, false); \ - count_direction[_AXIS(A)] = -1; \ - } \ - else { \ - A##_APPLY_DIR(!INVERT_##A##_DIR, false); \ - count_direction[_AXIS(A)] = 1; \ +#define SET_STEP_DIR(A) \ + if (motor_direction(_AXIS(A))) { \ + A##_APPLY_DIR(INVERT_DIR(A, LOW), false); \ + count_direction[_AXIS(A)] = -1; \ + } \ + else { \ + A##_APPLY_DIR(INVERT_DIR(A, HIGH), false); \ + count_direction[_AXIS(A)] = 1; \ } /** From 98277f2c1cb1f8ec66938689f6728ea9f52143c8 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Fri, 21 Apr 2023 00:20:12 +0000 Subject: [PATCH 203/225] [cron] Bump distribution date (2023-04-21) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index c803516490..df1b974a81 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-04-20" +//#define STRING_DISTRIBUTION_DATE "2023-04-21" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index ed0440a7db..4e228d659f 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-04-20" + #define STRING_DISTRIBUTION_DATE "2023-04-21" #endif /** From 4233e4864f0c621612ce35a9b6ca882312e3aa4d Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 22 Apr 2023 01:56:10 -0500 Subject: [PATCH 204/225] =?UTF-8?q?=F0=9F=9A=B8=20MarlinUI=20Endstop=20Tes?= =?UTF-8?q?t=20Screen,=20and=20more=20(#25667)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration_adv.h | 3 + Marlin/src/gcode/calibrate/G425.cpp | 36 +- Marlin/src/gcode/calibrate/M425.cpp | 7 +- Marlin/src/inc/Conditionals_post.h | 51 +- Marlin/src/inc/SanityCheck.h | 108 +-- Marlin/src/lcd/HD44780/marlinui_HD44780.cpp | 35 +- Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp | 40 +- Marlin/src/lcd/dogm/marlinui_DOGM.cpp | 32 +- Marlin/src/lcd/e3v2/marlinui/ui_common.cpp | 36 +- Marlin/src/lcd/e3v2/proui/endstop_diag.cpp | 34 +- Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp | 88 +- Marlin/src/lcd/language/language_en.h | 3 + Marlin/src/lcd/menu/menu.h | 5 +- Marlin/src/lcd/menu/menu_configuration.cpp | 89 +- Marlin/src/lcd/menu/menu_info.cpp | 96 +- Marlin/src/lcd/menu/menu_item.h | 30 +- Marlin/src/lcd/tft/ui_common.cpp | 23 +- Marlin/src/module/endstops.h | 91 +- Marlin/src/module/motion.cpp | 29 +- Marlin/src/module/probe.cpp | 8 +- Marlin/src/pins/pins_postprocess.h | 884 +++++++++---------- buildroot/tests/STM32F103RE_creality | 15 +- 22 files changed, 952 insertions(+), 791 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 294cc44487..993e0d8dde 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -1512,6 +1512,9 @@ // Insert a menu for preheating at the top level to allow for quick access //#define PREHEAT_SHORTCUT_MENU_ITEM + // Add Configuration > Debug Menu > Endstop Test for endstop/probe/runout testing + //#define LCD_ENDSTOP_TEST + #endif // HAS_MARLINUI_MENU #if HAS_DISPLAY diff --git a/Marlin/src/gcode/calibrate/G425.cpp b/Marlin/src/gcode/calibrate/G425.cpp index a22608f5b4..e3f8913125 100644 --- a/Marlin/src/gcode/calibrate/G425.cpp +++ b/Marlin/src/gcode/calibrate/G425.cpp @@ -271,10 +271,10 @@ inline void probe_side(measurements_t &m, const float uncertainty, const side_t #if AXIS_CAN_CALIBRATE(X) _ACASE(X, RIGHT, LEFT); #endif - #if HAS_Y_AXIS && AXIS_CAN_CALIBRATE(Y) + #if AXIS_CAN_CALIBRATE(Y) _ACASE(Y, BACK, FRONT); #endif - #if HAS_Z_AXIS && AXIS_CAN_CALIBRATE(Z) + #if AXIS_CAN_CALIBRATE(Z) case TOP: { const float measurement = measure(Z_AXIS, -1, true, &m.backlash[TOP], uncertainty); m.obj_center.z = measurement - dimensions.z / 2; @@ -282,22 +282,22 @@ inline void probe_side(measurements_t &m, const float uncertainty, const side_t return; } #endif - #if HAS_I_AXIS && AXIS_CAN_CALIBRATE(I) + #if AXIS_CAN_CALIBRATE(I) _PCASE(I); #endif - #if HAS_J_AXIS && AXIS_CAN_CALIBRATE(J) + #if AXIS_CAN_CALIBRATE(J) _PCASE(J); #endif - #if HAS_K_AXIS && AXIS_CAN_CALIBRATE(K) + #if AXIS_CAN_CALIBRATE(K) _PCASE(K); #endif - #if HAS_U_AXIS && AXIS_CAN_CALIBRATE(U) + #if AXIS_CAN_CALIBRATE(U) _PCASE(U); #endif - #if HAS_V_AXIS && AXIS_CAN_CALIBRATE(V) + #if AXIS_CAN_CALIBRATE(V) _PCASE(V); #endif - #if HAS_W_AXIS && AXIS_CAN_CALIBRATE(W) + #if AXIS_CAN_CALIBRATE(W) _PCASE(W); #endif default: return; @@ -395,7 +395,7 @@ inline void probe_sides(measurements_t &m, const float uncertainty) { #if ENABLED(CALIBRATION_REPORTING) inline void report_measured_faces(const measurements_t &m) { SERIAL_ECHOLNPGM("Sides:"); - #if HAS_Z_AXIS && AXIS_CAN_CALIBRATE(Z) + #if AXIS_CAN_CALIBRATE(Z) SERIAL_ECHOLNPGM(" Top: ", m.obj_side[TOP]); #endif #if ENABLED(CALIBRATION_MEASURE_LEFT) @@ -503,7 +503,7 @@ inline void probe_sides(measurements_t &m, const float uncertainty) { SERIAL_ECHOLNPGM(" Right: ", m.backlash[RIGHT]); #endif #endif - #if HAS_Y_AXIS && AXIS_CAN_CALIBRATE(Y) + #if AXIS_CAN_CALIBRATE(Y) #if ENABLED(CALIBRATION_MEASURE_FRONT) SERIAL_ECHOLNPGM(" Front: ", m.backlash[FRONT]); #endif @@ -511,10 +511,10 @@ inline void probe_sides(measurements_t &m, const float uncertainty) { SERIAL_ECHOLNPGM(" Back: ", m.backlash[BACK]); #endif #endif - #if HAS_Z_AXIS && AXIS_CAN_CALIBRATE(Z) + #if AXIS_CAN_CALIBRATE(Z) SERIAL_ECHOLNPGM(" Top: ", m.backlash[TOP]); #endif - #if HAS_I_AXIS && AXIS_CAN_CALIBRATE(I) + #if AXIS_CAN_CALIBRATE(I) #if ENABLED(CALIBRATION_MEASURE_IMIN) SERIAL_ECHOLNPGM(" " STR_I_MIN ": ", m.backlash[IMINIMUM]); #endif @@ -522,7 +522,7 @@ inline void probe_sides(measurements_t &m, const float uncertainty) { SERIAL_ECHOLNPGM(" " STR_I_MAX ": ", m.backlash[IMAXIMUM]); #endif #endif - #if HAS_J_AXIS && AXIS_CAN_CALIBRATE(J) + #if AXIS_CAN_CALIBRATE(J) #if ENABLED(CALIBRATION_MEASURE_JMIN) SERIAL_ECHOLNPGM(" " STR_J_MIN ": ", m.backlash[JMINIMUM]); #endif @@ -530,7 +530,7 @@ inline void probe_sides(measurements_t &m, const float uncertainty) { SERIAL_ECHOLNPGM(" " STR_J_MAX ": ", m.backlash[JMAXIMUM]); #endif #endif - #if HAS_K_AXIS && AXIS_CAN_CALIBRATE(K) + #if AXIS_CAN_CALIBRATE(K) #if ENABLED(CALIBRATION_MEASURE_KMIN) SERIAL_ECHOLNPGM(" " STR_K_MIN ": ", m.backlash[KMINIMUM]); #endif @@ -538,7 +538,7 @@ inline void probe_sides(measurements_t &m, const float uncertainty) { SERIAL_ECHOLNPGM(" " STR_K_MAX ": ", m.backlash[KMAXIMUM]); #endif #endif - #if HAS_U_AXIS && AXIS_CAN_CALIBRATE(U) + #if AXIS_CAN_CALIBRATE(U) #if ENABLED(CALIBRATION_MEASURE_UMIN) SERIAL_ECHOLNPGM(" " STR_U_MIN ": ", m.backlash[UMINIMUM]); #endif @@ -546,7 +546,7 @@ inline void probe_sides(measurements_t &m, const float uncertainty) { SERIAL_ECHOLNPGM(" " STR_U_MAX ": ", m.backlash[UMAXIMUM]); #endif #endif - #if HAS_V_AXIS && AXIS_CAN_CALIBRATE(V) + #if AXIS_CAN_CALIBRATE(V) #if ENABLED(CALIBRATION_MEASURE_VMIN) SERIAL_ECHOLNPGM(" " STR_V_MIN ": ", m.backlash[VMINIMUM]); #endif @@ -554,7 +554,7 @@ inline void probe_sides(measurements_t &m, const float uncertainty) { SERIAL_ECHOLNPGM(" " STR_V_MAX ": ", m.backlash[VMAXIMUM]); #endif #endif - #if HAS_W_AXIS && AXIS_CAN_CALIBRATE(W) + #if AXIS_CAN_CALIBRATE(W) #if ENABLED(CALIBRATION_MEASURE_WMIN) SERIAL_ECHOLNPGM(" " STR_W_MIN ": ", m.backlash[WMINIMUM]); #endif @@ -575,7 +575,7 @@ inline void probe_sides(measurements_t &m, const float uncertainty) { #if HAS_Y_CENTER && AXIS_CAN_CALIBRATE(Y) SERIAL_ECHOLNPGM_P(SP_Y_STR, m.pos_error.y); #endif - #if HAS_Z_AXIS && AXIS_CAN_CALIBRATE(Z) + #if AXIS_CAN_CALIBRATE(Z) SERIAL_ECHOLNPGM_P(SP_Z_STR, m.pos_error.z); #endif #if HAS_I_CENTER && AXIS_CAN_CALIBRATE(I) diff --git a/Marlin/src/gcode/calibrate/M425.cpp b/Marlin/src/gcode/calibrate/M425.cpp index a6c6ff9dae..0432b4c962 100644 --- a/Marlin/src/gcode/calibrate/M425.cpp +++ b/Marlin/src/gcode/calibrate/M425.cpp @@ -46,12 +46,13 @@ void GcodeSuite::M425() { bool noArgs = true; - auto axis_can_calibrate = [](const uint8_t a) { - #define _CAN_CASE(N) case N##_AXIS: return AXIS_CAN_CALIBRATE(N); + auto axis_can_calibrate = [](const uint8_t a) -> bool { + #define _CAN_CASE(N) case N##_AXIS: return bool(AXIS_CAN_CALIBRATE(N)); switch (a) { - default: return false; MAIN_AXIS_MAP(_CAN_CASE) + default: break; } + return false; }; LOOP_NUM_AXES(a) { diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 96b7313f29..eaf2d03cea 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -255,12 +255,14 @@ // Calibration codes only for non-core axes #if EITHER(BACKLASH_GCODE, CALIBRATION_GCODE) #if ANY(IS_CORE, MARKFORGED_XY, MARKFORGED_YX) - #define CAN_CALIBRATE(A,B) (_AXIS(A) == B) + #define CAN_CALIBRATE(A,B) TERN0(HAS_##A##_AXIS, (_AXIS(A) == B)) #else - #define CAN_CALIBRATE(A,B) true + #define CAN_CALIBRATE(A,B) ENABLED(HAS_##A##_AXIS) #endif + #define AXIS_CAN_CALIBRATE(A) CAN_CALIBRATE(A,NORMAL_AXIS) +#else + #define AXIS_CAN_CALIBRATE(A) false #endif -#define AXIS_CAN_CALIBRATE(A) CAN_CALIBRATE(A,NORMAL_AXIS) /** * No adjustable bed on non-cartesians @@ -2296,6 +2298,49 @@ #define HAS_Z4_MAX 1 #endif +#if HAS_X_MIN || HAS_X_MAX + #define HAS_X_ENDSTOP 1 +#endif +#if HAS_X2_MIN || HAS_X2_MAX + #define HAS_X2_ENDSTOP 1 +#endif +#if HAS_Y_MIN || HAS_Y_MAX + #define HAS_Y_ENDSTOP 1 +#endif +#if HAS_Y2_MIN || HAS_Y2_MAX + #define HAS_Y2_ENDSTOP 1 +#endif +#if HAS_Z_MIN || HAS_Z_MAX + #define HAS_Z_ENDSTOP 1 +#endif +#if HAS_Z2_MIN || HAS_Z2_MAX + #define HAS_Z2_ENDSTOP 1 +#endif +#if HAS_Z3_MIN || HAS_Z3_MAX + #define HAS_Z3_ENDSTOP 1 +#endif +#if HAS_Z4_MIN || HAS_Z4_MAX + #define HAS_Z4_ENDSTOP 1 +#endif +#if HAS_I_MIN || HAS_I_MAX + #define HAS_I_ENDSTOP 1 +#endif +#if HAS_J_MIN || HAS_J_MAX + #define HAS_J_ENDSTOP 1 +#endif +#if HAS_K_MIN || HAS_K_MAX + #define HAS_K_ENDSTOP 1 +#endif +#if HAS_U_MIN || HAS_U_MAX + #define HAS_U_ENDSTOP 1 +#endif +#if HAS_V_MIN || HAS_V_MAX + #define HAS_V_ENDSTOP 1 +#endif +#if HAS_W_MIN || HAS_W_MAX + #define HAS_W_ENDSTOP 1 +#endif + #if HAS_BED_PROBE && PIN_EXISTS(Z_MIN_PROBE) #define HAS_Z_MIN_PROBE_PIN 1 #endif diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index f5d0c785eb..a7aec8e833 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -3618,41 +3618,41 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #if NONE(SPI_ENDSTOPS, ONBOARD_ENDSTOPPULLUPS, ENDSTOPPULLUPS) #if X_SENSORLESS && X_HOME_TO_MIN && DISABLED(ENDSTOPPULLUP_XMIN) - #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_XMIN (or ENDSTOPPULLUPS) for X_MIN homing." + #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_XMIN (or ENDSTOPPULLUPS) for X MIN homing." #elif X_SENSORLESS && X_HOME_TO_MAX && DISABLED(ENDSTOPPULLUP_XMAX) - #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_XMAX (or ENDSTOPPULLUPS) for X_MAX homing." + #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_XMAX (or ENDSTOPPULLUPS) for X MAX homing." #elif Y_SENSORLESS && Y_HOME_TO_MIN && DISABLED(ENDSTOPPULLUP_YMIN) - #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_YMIN (or ENDSTOPPULLUPS) for Y_MIN homing." + #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_YMIN (or ENDSTOPPULLUPS) for Y MIN homing." #elif Y_SENSORLESS && Y_HOME_TO_MAX && DISABLED(ENDSTOPPULLUP_YMAX) - #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_YMAX (or ENDSTOPPULLUPS) for Y_MAX homing." + #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_YMAX (or ENDSTOPPULLUPS) for Y MAX homing." #elif Z_SENSORLESS && Z_HOME_TO_MIN && DISABLED(ENDSTOPPULLUP_ZMIN) - #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_ZMIN (or ENDSTOPPULLUPS) for Z_MIN homing." + #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_ZMIN (or ENDSTOPPULLUPS) for Z MIN homing." #elif Z_SENSORLESS && Z_HOME_TO_MAX && DISABLED(ENDSTOPPULLUP_ZMAX) - #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_ZMAX (or ENDSTOPPULLUPS) for Z_MAX homing." + #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_ZMAX (or ENDSTOPPULLUPS) for Z MAX homing." #elif I_SENSORLESS && I_HOME_TO_MIN && DISABLED(ENDSTOPPULLUP_IMIN) - #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_IMIN (or ENDSTOPPULLUPS) for I_MIN homing." + #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_IMIN (or ENDSTOPPULLUPS) for I MIN homing." #elif I_SENSORLESS && I_HOME_TO_MAX && DISABLED(ENDSTOPPULLUP_IMAX) - #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_IMAX (or ENDSTOPPULLUPS) for I_MAX homing." + #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_IMAX (or ENDSTOPPULLUPS) for I MAX homing." #elif J_SENSORLESS && J_HOME_TO_MIN && DISABLED(ENDSTOPPULLUP_JMIN) - #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_JMIN (or ENDSTOPPULLUPS) for J_MIN homing." + #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_JMIN (or ENDSTOPPULLUPS) for J MIN homing." #elif J_SENSORLESS && J_HOME_TO_MAX && DISABLED(ENDSTOPPULLUP_JMAX) - #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_JMAX (or ENDSTOPPULLUPS) for J_MAX homing." + #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_JMAX (or ENDSTOPPULLUPS) for J MAX homing." #elif K_SENSORLESS && K_HOME_TO_MIN && DISABLED(ENDSTOPPULLUP_KMIN) - #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_KMIN (or ENDSTOPPULLUPS) for K_MIN homing." + #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_KMIN (or ENDSTOPPULLUPS) for K MIN homing." #elif K_SENSORLESS && K_HOME_TO_MAX && DISABLED(ENDSTOPPULLUP_KMAX) - #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_KMAX (or ENDSTOPPULLUPS) for K_MAX homing." + #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_KMAX (or ENDSTOPPULLUPS) for K MAX homing." #elif U_SENSORLESS && U_HOME_TO_MIN && DISABLED(ENDSTOPPULLUP_UMIN) - #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_UMIN (or ENDSTOPPULLUPS) for U_MIN homing." + #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_UMIN (or ENDSTOPPULLUPS) for U MIN homing." #elif U_SENSORLESS && U_HOME_TO_MAX && DISABLED(ENDSTOPPULLUP_UMAX) - #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_UMAX (or ENDSTOPPULLUPS) for U_MAX homing." + #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_UMAX (or ENDSTOPPULLUPS) for U MAX homing." #elif V_SENSORLESS && V_HOME_TO_MIN && DISABLED(ENDSTOPPULLUP_VMIN) - #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_VMIN (or ENDSTOPPULLUPS) for V_MIN homing." + #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_VMIN (or ENDSTOPPULLUPS) for V MIN homing." #elif V_SENSORLESS && V_HOME_TO_MAX && DISABLED(ENDSTOPPULLUP_VMAX) - #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_VMAX (or ENDSTOPPULLUPS) for V_MAX homing." + #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_VMAX (or ENDSTOPPULLUPS) for V MAX homing." #elif W_SENSORLESS && W_HOME_TO_MIN && DISABLED(ENDSTOPPULLUP_WMIN) - #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_WMIN (or ENDSTOPPULLUPS) for W_MIN homing." + #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_WMIN (or ENDSTOPPULLUPS) for W MIN homing." #elif W_SENSORLESS && W_HOME_TO_MAX && DISABLED(ENDSTOPPULLUP_WMAX) - #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_WMAX (or ENDSTOPPULLUPS) for W_MAX homing." + #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_WMAX (or ENDSTOPPULLUPS) for W MAX homing." #endif #endif @@ -3668,15 +3668,15 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #define _HIT_STATE AXIS_DRIVER_TYPE(X,TMC2209) #if X_HOME_TO_MIN && X_MIN_ENDSTOP_HIT_STATE != _HIT_STATE #if _HIT_STATE - #error "SENSORLESS_HOMING requires X_MIN_ENDSTOP_HIT_STATE HIGH for X_MIN homing with TMC2209." + #error "SENSORLESS_HOMING requires X_MIN_ENDSTOP_HIT_STATE HIGH for X MIN homing with TMC2209." #else - #error "SENSORLESS_HOMING requires X_MIN_ENDSTOP_HIT_STATE LOW for X_MIN homing." + #error "SENSORLESS_HOMING requires X_MIN_ENDSTOP_HIT_STATE LOW for X MIN homing." #endif #elif X_HOME_TO_MAX && X_MAX_ENDSTOP_HIT_STATE != _HIT_STATE #if _HIT_STATE - #error "SENSORLESS_HOMING requires X_MAX_ENDSTOP_HIT_STATE HIGH for X_MAX homing with TMC2209." + #error "SENSORLESS_HOMING requires X_MAX_ENDSTOP_HIT_STATE HIGH for X MAX homing with TMC2209." #else - #error "SENSORLESS_HOMING requires X_MAX_ENDSTOP_HIT_STATE LOW for X_MAX homing." + #error "SENSORLESS_HOMING requires X_MAX_ENDSTOP_HIT_STATE LOW for X MAX homing." #endif #endif #undef _HIT_STATE @@ -3686,15 +3686,15 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #define _HIT_STATE AXIS_DRIVER_TYPE(Y,TMC2209) #if Y_HOME_TO_MIN && Y_MIN_ENDSTOP_HIT_STATE != _HIT_STATE #if _HIT_STATE - #error "SENSORLESS_HOMING requires Y_MIN_ENDSTOP_HIT_STATE HIGH for Y_MIN homing with TMC2209." + #error "SENSORLESS_HOMING requires Y_MIN_ENDSTOP_HIT_STATE HIGH for Y MIN homing with TMC2209." #else - #error "SENSORLESS_HOMING requires Y_MIN_ENDSTOP_HIT_STATE LOW for Y_MIN homing." + #error "SENSORLESS_HOMING requires Y_MIN_ENDSTOP_HIT_STATE LOW for Y MIN homing." #endif #elif Y_HOME_TO_MAX && Y_MAX_ENDSTOP_HIT_STATE != _HIT_STATE #if _HIT_STATE - #error "SENSORLESS_HOMING requires Y_MAY_ENDSTOP_HIT_STATE HIGH for Y_MAX homing with TMC2209." + #error "SENSORLESS_HOMING requires Y_MAX_ENDSTOP_HIT_STATE HIGH for Y MAX homing with TMC2209." #else - #error "SENSORLESS_HOMING requires Y_MAY_ENDSTOP_HIT_STATE LOW for Y_MAX homing." + #error "SENSORLESS_HOMING requires Y_MAX_ENDSTOP_HIT_STATE LOW for Y MAX homing." #endif #endif #undef _HIT_STATE @@ -3704,15 +3704,15 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #define _HIT_STATE AXIS_DRIVER_TYPE(Z,TMC2209) #if Z_HOME_TO_MIN && Z_MIN_ENDSTOP_HIT_STATE != _HIT_STATE #if _HIT_STATE - #error "SENSORLESS_HOMING requires Z_MIN_ENDSTOP_HIT_STATE HIGH for Z_MIN homing with TMC2209." + #error "SENSORLESS_HOMING requires Z_MIN_ENDSTOP_HIT_STATE HIGH for Z MIN homing with TMC2209." #else - #error "SENSORLESS_HOMING requires Z_MIN_ENDSTOP_HIT_STATE LOW for Z_MIN homing." + #error "SENSORLESS_HOMING requires Z_MIN_ENDSTOP_HIT_STATE LOW for Z MIN homing." #endif #elif Z_HOME_TO_MAX && Z_MAX_ENDSTOP_HIT_STATE != _HIT_STATE #if _HIT_STATE - #error "SENSORLESS_HOMING requires Z_MAZ_ENDSTOP_HIT_STATE HIGH for Z_MAX homing with TMC2209." + #error "SENSORLESS_HOMING requires Z_MAX_ENDSTOP_HIT_STATE HIGH for Z MAX homing with TMC2209." #else - #error "SENSORLESS_HOMING requires Z_MAZ_ENDSTOP_HIT_STATE LOW for Z_MAX homing." + #error "SENSORLESS_HOMING requires Z_MAX_ENDSTOP_HIT_STATE LOW for Z MAX homing." #endif #endif #undef _HIT_STATE @@ -3722,15 +3722,15 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #define _HIT_STATE AXIS_DRIVER_TYPE(I,TMC2209) #if I_HOME_TO_MIN && I_MIN_ENDSTOP_HIT_STATE != _HIT_STATE #if _HIT_STATE - #error "SENSORLESS_HOMING requires I_MIN_ENDSTOP_HIT_STATE HIGH for I_MIN homing with TMC2209." + #error "SENSORLESS_HOMING requires I_MIN_ENDSTOP_HIT_STATE HIGH for I MIN homing with TMC2209." #else - #error "SENSORLESS_HOMING requires I_MIN_ENDSTOP_HIT_STATE LOW for I_MIN homing." + #error "SENSORLESS_HOMING requires I_MIN_ENDSTOP_HIT_STATE LOW for I MIN homing." #endif #elif I_HOME_TO_MAX && I_MAX_ENDSTOP_HIT_STATE != _HIT_STATE #if _HIT_STATE - #error "SENSORLESS_HOMING requires I_MAI_ENDSTOP_HIT_STATE HIGH for I_MAX homing with TMC2209." + #error "SENSORLESS_HOMING requires I_MAX_ENDSTOP_HIT_STATE HIGH for I MAX homing with TMC2209." #else - #error "SENSORLESS_HOMING requires I_MAI_ENDSTOP_HIT_STATE LOW for I_MAX homing." + #error "SENSORLESS_HOMING requires I_MAX_ENDSTOP_HIT_STATE LOW for I MAX homing." #endif #endif #undef _HIT_STATE @@ -3740,15 +3740,15 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #define _HIT_STATE AXIS_DRIVER_TYPE(J,TMC2209) #if J_HOME_TO_MIN && J_MIN_ENDSTOP_HIT_STATE != _HIT_STATE #if _HIT_STATE - #error "SENSORLESS_HOMING requires J_MIN_ENDSTOP_HIT_STATE HIGH for J_MIN homing with TMC2209." + #error "SENSORLESS_HOMING requires J_MIN_ENDSTOP_HIT_STATE HIGH for J MIN homing with TMC2209." #else - #error "SENSORLESS_HOMING requires J_MIN_ENDSTOP_HIT_STATE LOW for J_MIN homing." + #error "SENSORLESS_HOMING requires J_MIN_ENDSTOP_HIT_STATE LOW for J MIN homing." #endif #elif J_HOME_TO_MAX && J_MAX_ENDSTOP_HIT_STATE != _HIT_STATE #if _HIT_STATE - #error "SENSORLESS_HOMING requires J_MAJ_ENDSTOP_HIT_STATE HIGH for J_MAX homing with TMC2209." + #error "SENSORLESS_HOMING requires J_MAX_ENDSTOP_HIT_STATE HIGH for J MAX homing with TMC2209." #else - #error "SENSORLESS_HOMING requires J_MAJ_ENDSTOP_HIT_STATE LOW for J_MAX homing." + #error "SENSORLESS_HOMING requires J_MAX_ENDSTOP_HIT_STATE LOW for J MAX homing." #endif #endif #undef _HIT_STATE @@ -3758,15 +3758,15 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #define _HIT_STATE AXIS_DRIVER_TYPE(K,TMC2209) #if K_HOME_TO_MIN && K_MIN_ENDSTOP_HIT_STATE != _HIT_STATE #if _HIT_STATE - #error "SENSORLESS_HOMING requires K_MIN_ENDSTOP_HIT_STATE HIGH for K_MIN homing with TMC2209." + #error "SENSORLESS_HOMING requires K_MIN_ENDSTOP_HIT_STATE HIGH for K MIN homing with TMC2209." #else - #error "SENSORLESS_HOMING requires K_MIN_ENDSTOP_HIT_STATE LOW for K_MIN homing." + #error "SENSORLESS_HOMING requires K_MIN_ENDSTOP_HIT_STATE LOW for K MIN homing." #endif #elif K_HOME_TO_MAX && K_MAX_ENDSTOP_HIT_STATE != _HIT_STATE #if _HIT_STATE - #error "SENSORLESS_HOMING requires K_MAK_ENDSTOP_HIT_STATE HIGH for K_MAX homing with TMC2209." + #error "SENSORLESS_HOMING requires K_MAX_ENDSTOP_HIT_STATE HIGH for K MAX homing with TMC2209." #else - #error "SENSORLESS_HOMING requires K_MAK_ENDSTOP_HIT_STATE LOW for K_MAX homing." + #error "SENSORLESS_HOMING requires K_MAX_ENDSTOP_HIT_STATE LOW for K MAX homing." #endif #endif #undef _HIT_STATE @@ -3776,15 +3776,15 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #define _HIT_STATE AXIS_DRIVER_TYPE(U,TMC2209) #if U_HOME_TO_MIN && U_MIN_ENDSTOP_HIT_STATE != _HIT_STATE #if _HIT_STATE - #error "SENSORLESS_HOMING requires U_MIN_ENDSTOP_HIT_STATE HIGH for U_MIN homing with TMC2209." + #error "SENSORLESS_HOMING requires U_MIN_ENDSTOP_HIT_STATE HIGH for U MIN homing with TMC2209." #else - #error "SENSORLESS_HOMING requires U_MIN_ENDSTOP_HIT_STATE LOW for U_MIN homing." + #error "SENSORLESS_HOMING requires U_MIN_ENDSTOP_HIT_STATE LOW for U MIN homing." #endif #elif U_HOME_TO_MAX && U_MAX_ENDSTOP_HIT_STATE != _HIT_STATE #if _HIT_STATE - #error "SENSORLESS_HOMING requires U_MAU_ENDSTOP_HIT_STATE HIGH for U_MAX homing with TMC2209." + #error "SENSORLESS_HOMING requires U_MAX_ENDSTOP_HIT_STATE HIGH for U MAX homing with TMC2209." #else - #error "SENSORLESS_HOMING requires U_MAU_ENDSTOP_HIT_STATE LOW for U_MAX homing." + #error "SENSORLESS_HOMING requires U_MAX_ENDSTOP_HIT_STATE LOW for U MAX homing." #endif #endif #undef _HIT_STATE @@ -3794,15 +3794,15 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #define _HIT_STATE AXIS_DRIVER_TYPE(V,TMC2209) #if V_HOME_TO_MIN && V_MIN_ENDSTOP_HIT_STATE != _HIT_STATE #if _HIT_STATE - #error "SENSORLESS_HOMING requires V_MIN_ENDSTOP_HIT_STATE HIGH for V_MIN homing with TMC2209." + #error "SENSORLESS_HOMING requires V_MIN_ENDSTOP_HIT_STATE HIGH for V MIN homing with TMC2209." #else - #error "SENSORLESS_HOMING requires V_MIN_ENDSTOP_HIT_STATE LOW for V_MIN homing." + #error "SENSORLESS_HOMING requires V_MIN_ENDSTOP_HIT_STATE LOW for V MIN homing." #endif #elif V_HOME_TO_MAX && V_MAX_ENDSTOP_HIT_STATE != _HIT_STATE #if _HIT_STATE - #error "SENSORLESS_HOMING requires V_MAV_ENDSTOP_HIT_STATE HIGH for V_MAX homing with TMC2209." + #error "SENSORLESS_HOMING requires V_MAX_ENDSTOP_HIT_STATE HIGH for V MAX homing with TMC2209." #else - #error "SENSORLESS_HOMING requires V_MAV_ENDSTOP_HIT_STATE LOW for V_MAX homing." + #error "SENSORLESS_HOMING requires V_MAX_ENDSTOP_HIT_STATE LOW for V MAX homing." #endif #endif #undef _HIT_STATE @@ -3812,15 +3812,15 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #define _HIT_STATE AXIS_DRIVER_TYPE(W,TMC2209) #if W_HOME_TO_MIN && W_MIN_ENDSTOP_HIT_STATE != _HIT_STATE #if _HIT_STATE - #error "SENSORLESS_HOMING requires W_MIN_ENDSTOP_HIT_STATE HIGH for W_MIN homing with TMC2209." + #error "SENSORLESS_HOMING requires W_MIN_ENDSTOP_HIT_STATE HIGH for W MIN homing with TMC2209." #else - #error "SENSORLESS_HOMING requires W_MIN_ENDSTOP_HIT_STATE LOW for W_MIN homing." + #error "SENSORLESS_HOMING requires W_MIN_ENDSTOP_HIT_STATE LOW for W MIN homing." #endif #elif W_HOME_TO_MAX && W_MAX_ENDSTOP_HIT_STATE != _HIT_STATE #if _HIT_STATE - #error "SENSORLESS_HOMING requires W_MAW_ENDSTOP_HIT_STATE HIGH for W_MAX homing with TMC2209." + #error "SENSORLESS_HOMING requires W_MAX_ENDSTOP_HIT_STATE HIGH for W MAX homing with TMC2209." #else - #error "SENSORLESS_HOMING requires W_MAW_ENDSTOP_HIT_STATE LOW for W_MAX homing." + #error "SENSORLESS_HOMING requires W_MAX_ENDSTOP_HIT_STATE LOW for W MAX homing." #endif #endif #undef _HIT_STATE diff --git a/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp b/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp index e4c0317d12..8a5e5c5ad9 100644 --- a/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp +++ b/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp @@ -1137,17 +1137,38 @@ void MarlinUI::draw_status_screen() { #endif // ADVANCED_PAUSE_FEATURE // Draw a static item with no left-right margin required. Centered by default. - void MenuItem_static::draw(const uint8_t row, FSTR_P const fstr, const uint8_t style/*=SS_DEFAULT*/, const char * const vstr/*=nullptr*/) { - int8_t n = LCD_WIDTH; + void MenuItem_static::draw(const uint8_t row, FSTR_P const fstr, const uint8_t style/*=SS_DEFAULT*/, const char *vstr/*=nullptr*/) { lcd_moveto(0, row); + + int8_t n = LCD_WIDTH; + const bool center = bool(style & SS_CENTER), full = bool(style & SS_FULL); const int8_t plen = fstr ? utf8_strlen(fstr) : 0, vlen = vstr ? utf8_strlen(vstr) : 0; - if (style & SS_CENTER) { - int8_t pad = (LCD_WIDTH - plen - vlen) / 2; - while (--pad >= 0) { lcd_put_u8str(F(" ")); n--; } + int8_t pad = (center || full) ? n - plen - vlen : 0; + + // SS_CENTER: Pad with half of the unused space first + if (center) for (int8_t lpad = pad / 2; lpad > 0; --lpad) { lcd_put_u8str(F(" ")); n--; } + + // Draw as much of the label as fits + if (plen) { + const int8_t expl = n; + n = lcd_put_u8str(fstr, itemIndex, itemStringC, itemStringF, n); + pad -= (expl - n - plen); // Reduce the padding } - if (plen) n = lcd_put_u8str(fstr, itemIndex, itemStringC, itemStringF, n); - if (vlen) n -= lcd_put_u8str_max(vstr, n); + + if (vlen && n > 0) { + // SS_FULL: Pad with enough space to justify the value + if (full && !center) { + // Move the leading colon from the value to the label + if (*vstr == ':') { n -= lcd_put_u8str(F(":")); vstr++; } + // Move spaces to the padding + while (*vstr == ' ') { vstr++; pad++; } + // Pad in-between + for (; pad > 0; --pad) { lcd_put_u8str(F(" ")); n--; } + } + n -= lcd_put_u8str_max(vstr, n); + } + for (; n > 0; --n) lcd_put_u8str(F(" ")); } diff --git a/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp b/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp index e4f9e4eafc..fc568c55db 100644 --- a/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp +++ b/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp @@ -962,17 +962,41 @@ void MarlinUI::draw_status_screen() { #endif // Draw a static item with no left-right margin required. Centered by default. - void MenuItem_static::draw(const uint8_t row, FSTR_P const fstr, const uint8_t style/*=SS_DEFAULT*/, const char * const valstr/*=nullptr*/) { + void MenuItem_static::draw(const uint8_t row, FSTR_P const fstr, const uint8_t style/*=SS_DEFAULT*/, const char *vstr/*=nullptr*/) { if (!PanelDetected) return; - uint8_t n = LCD_WIDTH; lcd_moveto(0, row); - if ((style & SS_CENTER) && !valstr) { - int8_t pad = (LCD_WIDTH - utf8_strlen(fstr)) / 2; - while (--pad >= 0) { lcd.write(' '); n--; } + + uint8_t n = LCD_WIDTH; + const bool center = bool(style & SS_CENTER), full = bool(style & SS_FULL); + const int8_t plen = fstr ? utf8_strlen(fstr) : 0, + vlen = vstr ? utf8_strlen(vstr) : 0; + int8_t pad = (center || full) ? n - plen - vlen : 0; + + // SS_CENTER: Pad with half of the unused space first + if (center) for (int8_t lpad = pad / 2; lpad > 0; --lpad) { lcd.write(' '); n--; } + + // Draw as much of the label as fits + if (plen) { + const int8_t expl = n; + n = lcd_put_u8str(fstr, itemIndex, itemStringC, itemStringF, n); + pad -= (expl - n - plen); // Reduce the padding } - n = lcd_put_u8str(fstr, itemIndex, itemStringC, itemStringF, n); - if (valstr) n -= lcd_put_u8str_max(valstr, n); - for (; n; --n) lcd.write(' '); + + if (vlen && n > 0) { + // SS_FULL: Pad with enough space to justify the value + if (full && !center) { + // Move the leading colon from the value to the label + if (*vstr == ':') { lcd.write(':'); vstr++; n--; } + // Move spaces to the padding + while (*vstr == ' ') { vstr++; pad++; } + // Pad in-between + for (; pad > 0; --pad) { lcd.write(' '); n--; } + } + n -= lcd_put_u8str_max(vstr, n); + } + + for (; n > 0; --n) lcd.write(' '); + lcd.print_line(); } diff --git a/Marlin/src/lcd/dogm/marlinui_DOGM.cpp b/Marlin/src/lcd/dogm/marlinui_DOGM.cpp index aa32fd403f..ce9a31668a 100644 --- a/Marlin/src/lcd/dogm/marlinui_DOGM.cpp +++ b/Marlin/src/lcd/dogm/marlinui_DOGM.cpp @@ -411,20 +411,38 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop } // Draw a static line of text in the same idiom as a menu item - void MenuItem_static::draw(const uint8_t row, FSTR_P const ftpl, const uint8_t style/*=SS_DEFAULT*/, const char * const vstr/*=nullptr*/) { + void MenuItem_static::draw(const uint8_t row, FSTR_P const ftpl, const uint8_t style/*=SS_DEFAULT*/, const char *vstr/*=nullptr*/) { if (mark_as_selected(row, style & SS_INVERT)) { pixel_len_t n = LCD_PIXEL_WIDTH; // pixel width of string allowed - const int plen = ftpl ? calculateWidth(ftpl) : 0, + const bool center = bool(style & SS_CENTER), full = bool(style & SS_FULL); + const int pwide = ftpl ? calculateWidth(ftpl) : 0, vlen = vstr ? utf8_strlen(vstr) : 0; - if (style & SS_CENTER) { - int pad = (LCD_PIXEL_WIDTH - plen - vlen * MENU_FONT_WIDTH) / MENU_FONT_WIDTH / 2; - while (--pad >= 0) n -= lcd_put_u8str(F(" ")); + int pad = (center || full) ? ((LCD_PIXEL_WIDTH) - pwide - vlen * (MENU_FONT_WIDTH)) / (MENU_FONT_WIDTH) : 0; + + // SS_CENTER: Pad with half of the unused space first + if (center) for (int lpad = pad / 2; lpad > 0; --lpad) n -= lcd_put_u8str(F(" ")); + + // Draw as much of the label as fits + if (pwide) { + const pixel_len_t expw = n; + n = lcd_put_u8str(ftpl, itemIndex, itemStringC, itemStringF, n / (MENU_FONT_WIDTH)) * (MENU_FONT_WIDTH); + pad -= (expw - n - pwide) / (MENU_FONT_WIDTH); // Reduce the padding } - if (plen) n = lcd_put_u8str(ftpl, itemIndex, itemStringC, itemStringF, n / (MENU_FONT_WIDTH)) * (MENU_FONT_WIDTH); - if (vlen) n -= lcd_put_u8str_max(vstr, n); + if (vlen) { + // SS_FULL: Pad with enough space to justify the value + if (full && !center && n > MENU_FONT_WIDTH) { + // Move the leading colon from the value to the label + if (*vstr == ':') { n -= lcd_put_u8str(F(":")); vstr++; } + // Move spaces to the padding + while (*vstr == ' ') { vstr++; pad++; } + // Pad in-between + for (; pad > 0; --pad) n -= lcd_put_u8str(F(" ")); + } + n -= lcd_put_u8str_max(vstr, n); + } while (n > MENU_FONT_WIDTH) n -= lcd_put_u8str(F(" ")); } } diff --git a/Marlin/src/lcd/e3v2/marlinui/ui_common.cpp b/Marlin/src/lcd/e3v2/marlinui/ui_common.cpp index 778bed6335..c267d32048 100644 --- a/Marlin/src/lcd/e3v2/marlinui/ui_common.cpp +++ b/Marlin/src/lcd/e3v2/marlinui/ui_common.cpp @@ -311,7 +311,7 @@ void MarlinUI::draw_status_message(const bool blink) { // Draw a static line of text in the same idiom as a menu item - void MenuItem_static::draw(const uint8_t row, FSTR_P const ftpl, const uint8_t style/*=SS_DEFAULT*/, const char * const vstr/*=nullptr*/) { + void MenuItem_static::draw(const uint8_t row, FSTR_P const ftpl, const uint8_t style/*=SS_DEFAULT*/, const char *vstr/*=nullptr*/) { // Call mark_as_selected to draw a bigger selection box // and draw the text without a background if (mark_as_selected(row, (bool)(style & SS_INVERT), true)) { @@ -320,20 +320,38 @@ void MarlinUI::draw_status_message(const bool blink) { dwin_font.fg = Color_White; dwin_string.set(); + + const bool center = bool(style & SS_CENTER), full = bool(style & SS_FULL); const int8_t plen = ftpl ? utf8_strlen(ftpl) : 0, vlen = vstr ? utf8_strlen(vstr) : 0; - if (style & SS_CENTER) { - int8_t pad = (LCD_WIDTH - 1 - plen - vlen) / 2; - while (--pad) dwin_string.add(' '); + int8_t pad = (center || full) ? (LCD_WIDTH) - 1 - plen - vlen : 0; + + // SS_CENTER: Pad with half of the unused space first + if (center) for (int8_t lpad = pad / 2; lpad > 0; --lpad) dwin_string.add(' '); + + // Append the templated label string + if (plen) { + dwin_string.add(ftpl, itemIndex, itemStringC, itemStringF); + pad -= dwin_string.length - plen; } - if (plen) dwin_string.add(ftpl, itemIndex, itemStringC, itemStringF); - if (vlen) dwin_string.add(vstr); - if (style & SS_CENTER) { - int8_t pad = (LCD_WIDTH - 1 - plen - vlen) / 2; - while (--pad) dwin_string.add(' '); + // SS_FULL: Pad with enough space to justify the value + if (vlen) { + if (full && !center) { + // Move the leading colon from the value to the label + if (*vstr == ':') { dwin_string.add(':'); vstr++; } + // Move spaces to the padding + while (*vstr == ' ') { vstr++; pad++; } + // Pad in-between + for (; pad > 0; --pad) dwin_string.add(' '); + } + // Append the value + dwin_string.add(vstr); } + // SS_CENTER: Pad the rest of the string + if (center) for (int8_t rpad = pad - (pad / 2); rpad > 0; --rpad) dwin_string.add(' '); + lcd_moveto(1, row); lcd_put_dwin_string(); } diff --git a/Marlin/src/lcd/e3v2/proui/endstop_diag.cpp b/Marlin/src/lcd/e3v2/proui/endstop_diag.cpp index c3edba53df..96ee732678 100644 --- a/Marlin/src/lcd/e3v2/proui/endstop_diag.cpp +++ b/Marlin/src/lcd/e3v2/proui/endstop_diag.cpp @@ -66,42 +66,26 @@ void draw_es_state(const bool is_hit) { } void ESDiagClass::Draw() { - Title.ShowCaption(F("End-stops Diagnostic")); + Title.ShowCaption(GET_TEXT_F(MSG_ENDSTOP_TEST)); DWINUI::ClearMainArea(); Draw_Popup_Bkgd(); DWINUI::Draw_Button(BTN_Continue, 86, 250); DWINUI::cursor.y = 80; #define ES_LABEL(S) draw_es_label(F(STR_##S)) - #if HAS_X_MIN - ES_LABEL(X_MIN); - #endif - #if HAS_Y_MIN - ES_LABEL(Y_MIN); - #endif - #if HAS_Z_MIN - ES_LABEL(Z_MIN); - #endif - #if HAS_FILAMENT_SENSOR - draw_es_label(F(STR_FILAMENT)); - #endif + TERN_(HAS_X_MIN, ES_LABEL(X_MIN)); TERN_(HAS_X_MAX, ES_LABEL(X_MAX)); + TERN_(HAS_Y_MIN, ES_LABEL(Y_MIN)); TERN_(HAS_Y_MAX, ES_LABEL(Y_MAX)); + TERN_(HAS_Z_MIN, ES_LABEL(Z_MIN)); TERN_(HAS_Z_MAX, ES_LABEL(Z_MAX)); + TERN_(HAS_FILAMENT_SENSOR, draw_es_label(F(STR_FILAMENT))); Update(); } void ESDiagClass::Update() { DWINUI::cursor.y = 80; #define ES_REPORT(S) draw_es_state(READ(S##_PIN) == S##_ENDSTOP_HIT_STATE) - #if HAS_X_MIN - ES_REPORT(X_MIN); - #endif - #if HAS_Y_MIN - ES_REPORT(Y_MIN); - #endif - #if HAS_Z_MIN - ES_REPORT(Z_MIN); - #endif - #if HAS_FILAMENT_SENSOR - draw_es_state(READ(FIL_RUNOUT1_PIN) != FIL_RUNOUT1_STATE); - #endif + TERN_(HAS_X_MIN, ES_REPORT(X_MIN)); TERN_(HAS_X_MAX, ES_REPORT(X_MAX)); + TERN_(HAS_Y_MIN, ES_REPORT(Y_MIN)); TERN_(HAS_Y_MAX, ES_REPORT(Y_MAX)); + TERN_(HAS_Z_MIN, ES_REPORT(Z_MIN)); TERN_(HAS_Z_MAX, ES_REPORT(Z_MAX)); + TERN_(HAS_FILAMENT_SENSOR, draw_es_state(READ(FIL_RUNOUT1_PIN) != FIL_RUNOUT1_STATE)); DWIN_UpdateLCD(); } diff --git a/Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp b/Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp index d1679d402f..24e177df39 100644 --- a/Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp +++ b/Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp @@ -45,32 +45,32 @@ #if PIN_EXISTS(MT_DET_2) bool mt_det2_sta; #endif - #if X_HOME_DIR + #if HAS_X_ENDSTOP bool endstopx1_sta; #else constexpr static bool endstopx1_sta = true; #endif - #if HAS_X2_MIN || HAS_X2_MAX + #if HAS_X2_ENDSTOP bool endstopx2_sta; #else constexpr static bool endstopx2_sta = true; #endif - #if HAS_Y_AXIS && Y_HOME_DIR + #if HAS_Y_ENDSTOP bool endstopy1_sta; #else constexpr static bool endstopy1_sta = true; #endif - #if HAS_Y2_MIN || HAS_Y2_MAX + #if HAS_Y2_ENDSTOP bool endstopy2_sta; #else constexpr static bool endstopy2_sta = true; #endif - #if HAS_Z_AXIS && Z_HOME_DIR + #if HAS_Z_ENDSTOP bool endstopz1_sta; #else constexpr static bool endstopz1_sta = true; #endif - #if HAS_Z2_MIN || HAS_Z2_MAX + #if HAS_Z2_ENDSTOP bool endstopz2_sta; #else constexpr static bool endstopz2_sta = true; @@ -87,36 +87,12 @@ #if PIN_EXISTS(MT_DET_2) mt_det2_sta = (READ(MT_DET_2_PIN) == LOW); #endif - #if HAS_X_MIN - endstopx1_sta = ESTATE(X_MIN); - #elif HAS_X_MAX - endstopx1_sta = ESTATE(X_MAX); - #endif - #if HAS_X2_MIN - endstopx2_sta = ESTATE(X2_MIN); - #elif HAS_X2_MAX - endstopx2_sta = ESTATE(X2_MAX); - #endif - #if HAS_Y_MIN - endstopy1_sta = ESTATE(Y_MIN); - #elif HAS_Y_MAX - endstopy1_sta = ESTATE(Y_MAX); - #endif - #if HAS_Y2_MIN - endstopy2_sta = ESTATE(Y2_MIN); - #elif HAS_Y2_MAX - endstopy2_sta = ESTATE(Y2_MAX); - #endif - #if HAS_Z_MIN - endstopz1_sta = ESTATE(Z_MIN); - #elif HAS_Z_MAX - endstopz1_sta = ESTATE(Z_MAX); - #endif - #if HAS_Z2_MIN - endstopz2_sta = ESTATE(Z2_MIN); - #elif HAS_Z2_MAX - endstopz2_sta = ESTATE(Z2_MAX); - #endif + TERN_(HAS_X_ENDSTOP, endstopx1_sta = ESTATE(TERN(HAS_X_MIN, X_MIN, X_MAX))); + TERN_(HAS_X2_ENDSTOP, endstopx2_sta = ESTATE(TERN(HAS_X2_MIN, X2_MIN, X2_MAX))); + TERN_(HAS_Y_ENDSTOP, endstopy1_sta = ESTATE(TERN(HAS_Y_MIN, Y_MIN, Y_MAX))); + TERN_(HAS_Y2_ENDSTOP, endstopy2_sta = ESTATE(TERN(HAS_Y2_MIN, Y2_MIN, Y2_MAX))); + TERN_(HAS_Z_ENDSTOP, endstopz1_sta = ESTATE(TERN(HAS_Z_MIN, Z_MIN, Z_MAX))); + TERN_(HAS_Z2_ENDSTOP, endstopz2_sta = ESTATE(TERN(HAS_Z2_MIN, Z2_MIN, Z2_MAX))); } void test_gpio_readlevel_H() { @@ -128,36 +104,12 @@ #if PIN_EXISTS(MT_DET_2) mt_det2_sta = (READ(MT_DET_2_PIN) == HIGH); #endif - #if HAS_X_MIN - endstopx1_sta = !ESTATE(X_MIN); - #elif HAS_X_MAX - endstopx1_sta = !ESTATE(X_MAX); - #endif - #if HAS_X2_MIN - endstopx2_sta = !ESTATE(X2_MIN); - #elif HAS_X2_MAX - endstopx2_sta = !ESTATE(X2_MAX); - #endif - #if HAS_Y_MIN - endstopy1_sta = !ESTATE(Y_MIN); - #elif HAS_Y_MAX - endstopy1_sta = !ESTATE(Y_MAX); - #endif - #if HAS_Y2_MIN - endstopy2_sta = !ESTATE(Y2_MIN); - #elif HAS_Y2_MAX - endstopy2_sta = !ESTATE(Y2_MAX); - #endif - #if HAS_Z_MIN - endstopz1_sta = !ESTATE(Z_MIN); - #elif HAS_Z_MAX - endstopz1_sta = !ESTATE(Z_MAX); - #endif - #if HAS_Z2_MIN - endstopz2_sta = !ESTATE(Z2_MIN); - #elif HAS_Z2_MAX - endstopz2_sta = !ESTATE(Z2_MAX); - #endif + TERN_(HAS_X_ENDSTOP, endstopx1_sta = !ESTATE(TERN(HAS_X_MIN, X_MIN, X_MAX))); + TERN_(HAS_X2_ENDSTOP, endstopx2_sta = !ESTATE(TERN(HAS_X2_MIN, X2_MIN, X2_MAX))); + TERN_(HAS_Y_ENDSTOP, endstopy1_sta = !ESTATE(TERN(HAS_Y_MIN, Y_MIN, Y_MAX))); + TERN_(HAS_Y2_ENDSTOP, endstopy2_sta = !ESTATE(TERN(HAS_Y2_MIN, Y2_MIN, Y2_MAX))); + TERN_(HAS_Z_ENDSTOP, endstopz1_sta = !ESTATE(TERN(HAS_Z_MIN, Z_MIN, Z_MAX))); + TERN_(HAS_Z2_ENDSTOP, endstopz2_sta = !ESTATE(TERN(HAS_Z2_MIN, Z2_MIN, Z2_MAX))); } #include "../../../libs/buzzer.h" @@ -178,7 +130,9 @@ SET_INPUT_PULLUP(MKS_TEST_PS_ON_PIN); SET_INPUT_PULLUP(SERVO0_PIN); - OUT_WRITE(X_ENABLE_PIN, LOW); + #if HAS_X_AXIS + OUT_WRITE(X_ENABLE_PIN, LOW); + #endif #if HAS_Y_AXIS OUT_WRITE(Y_ENABLE_PIN, LOW); #endif diff --git a/Marlin/src/lcd/language/language_en.h b/Marlin/src/lcd/language/language_en.h index 244d61a712..9a64587f15 100644 --- a/Marlin/src/lcd/language/language_en.h +++ b/Marlin/src/lcd/language/language_en.h @@ -76,6 +76,8 @@ namespace Language_en { LSTR MSG_DISABLE_STEPPERS = _UxGT("Disable Steppers"); LSTR MSG_DEBUG_MENU = _UxGT("Debug Menu"); LSTR MSG_PROGRESS_BAR_TEST = _UxGT("Progress Bar Test"); + LSTR MSG_ENDSTOP_TEST = _UxGT("Endstop Test"); + LSTR MSG_Z_PROBE = _UxGT("Z Probe"); LSTR MSG_HOMING = _UxGT("Homing"); LSTR MSG_AUTO_HOME = _UxGT("Auto Home"); LSTR MSG_AUTO_HOME_A = _UxGT("Home @"); @@ -430,6 +432,7 @@ namespace Language_en { LSTR MSG_TEMPERATURE = _UxGT("Temperature"); LSTR MSG_MOTION = _UxGT("Motion"); LSTR MSG_FILAMENT = _UxGT("Filament"); + LSTR MSG_FILAMENT_EN = _UxGT("Filament *"); LSTR MSG_VOLUMETRIC_ENABLED = _UxGT("E in mm") SUPERSCRIPT_THREE; LSTR MSG_VOLUMETRIC_LIMIT = _UxGT("E Limit in mm") SUPERSCRIPT_THREE; LSTR MSG_VOLUMETRIC_LIMIT_E = _UxGT("E Limit *"); diff --git a/Marlin/src/lcd/menu/menu.h b/Marlin/src/lcd/menu/menu.h index 9b9c678868..06d9c846cc 100644 --- a/Marlin/src/lcd/menu/menu.h +++ b/Marlin/src/lcd/menu/menu.h @@ -35,7 +35,8 @@ typedef void (*selectFunc_t)(); #define SS_LEFT 0x00 #define SS_CENTER 0x01 -#define SS_INVERT 0x02 +#define SS_FULL 0x02 +#define SS_INVERT 0x04 #define SS_DEFAULT SS_CENTER #if ENABLED(BABYSTEP_ZPROBE_OFFSET) && Z_PROBE_OFFSET_RANGE_MIN >= -9 && Z_PROBE_OFFSET_RANGE_MAX <= 9 @@ -75,7 +76,7 @@ class MenuItemBase { // STATIC_ITEM(LABEL,...) class MenuItem_static : public MenuItemBase { public: - static void draw(const uint8_t row, FSTR_P const fstr, const uint8_t style=SS_DEFAULT, const char * const vstr=nullptr); + static void draw(const uint8_t row, FSTR_P const fstr, const uint8_t style=SS_DEFAULT, const char *vstr=nullptr); }; // BACK_ITEM(LABEL) diff --git a/Marlin/src/lcd/menu/menu_configuration.cpp b/Marlin/src/lcd/menu/menu_configuration.cpp index 3ff4b2e562..2fe4b77018 100644 --- a/Marlin/src/lcd/menu/menu_configuration.cpp +++ b/Marlin/src/lcd/menu/menu_configuration.cpp @@ -32,6 +32,10 @@ #include "../../MarlinCore.h" +#if ENABLED(LCD_ENDSTOP_TEST) + #include "../../module/endstops.h" +#endif + #if HAS_FILAMENT_SENSOR #include "../../feature/runout.h" #endif @@ -57,7 +61,7 @@ #include "../../core/debug_out.h" -#define HAS_DEBUG_MENU ENABLED(LCD_PROGRESS_BAR_TEST) +#define HAS_DEBUG_MENU EITHER(LCD_PROGRESS_BAR_TEST, LCD_ENDSTOP_TEST) void menu_advanced_settings(); #if EITHER(DELTA_CALIBRATION_MENU, DELTA_AUTO_CALIBRATION) @@ -90,6 +94,83 @@ void menu_advanced_settings(); #endif // LCD_PROGRESS_BAR_TEST +#if ENABLED(LCD_ENDSTOP_TEST) + + #include "../lcdprint.h" + + #define __STOP_ITEM(F,S) PSTRING_ITEM_F_P(F, TEST(stops, S) ? PSTR(STR_ENDSTOP_HIT) : PSTR(STR_ENDSTOP_OPEN), SS_FULL) + #define _STOP_ITEM(L,S) __STOP_ITEM(F(L), S) + #define STOP_ITEM(A,I) _STOP_ITEM(STRINGIFY(A) STRINGIFY(I) " " TERN(A##_HOME_TO_MAX, "Max", "Min"), A##I##_ENDSTOP) + #define FIL_ITEM(N) PSTRING_ITEM_N_P(N-1, MSG_FILAMENT_EN, (READ(FIL_RUNOUT##N##_PIN) != FIL_RUNOUT##N##_STATE) ? PSTR("PRESENT") : PSTR("out"), SS_FULL); + + static void endstop_test() { + if (ui.use_click()) { + ui.goto_previous_screen(); + //endstops.enable_globally(false); + return; + } + TemporaryGlobalEndstopsState temp(true); + ui.defer_status_screen(true); + const Endstops::endstop_mask_t stops = endstops.state(); + + START_SCREEN(); + STATIC_ITEM_F(GET_TEXT_F(MSG_ENDSTOP_TEST), SS_DEFAULT|SS_INVERT); + + #if HAS_X_ENDSTOP + STOP_ITEM(X,); + #if ENABLED(X_DUAL_ENDSTOPS) + STOP_ITEM(X,2); + #endif + #endif + #if HAS_Y_ENDSTOP + STOP_ITEM(Y,); + #if ENABLED(Y_DUAL_ENDSTOPS) + STOP_ITEM(Y,2); + #endif + #endif + #if HAS_Z_ENDSTOP + STOP_ITEM(Z,); + #if ENABLED(Z_MULTI_ENDSTOPS) + STOP_ITEM(Z,2); + #if NUM_Z_STEPPERS >= 3 + STOP_ITEM(Z,3); + #if NUM_Z_STEPPERS >= 4 + STOP_ITEM(Z,4); + #endif + #endif + #endif + #endif + #if HAS_I_ENDSTOP + STOP_ITEM(I,); + #endif + #if HAS_J_ENDSTOP + STOP_ITEM(J,); + #endif + #if HAS_K_ENDSTOP + STOP_ITEM(K,); + #endif + #if HAS_U_ENDSTOP + STOP_ITEM(U,); + #endif + #if HAS_V_ENDSTOP + STOP_ITEM(V,); + #endif + #if HAS_W_ENDSTOP + STOP_ITEM(W,); + #endif + #if HAS_BED_PROBE && !HAS_DELTA_SENSORLESS_PROBING + __STOP_ITEM(GET_TEXT_F(MSG_Z_PROBE), Z_MIN_PROBE); + #endif + #if ENABLED(FILAMENT_RUNOUT_SENSOR) + REPEAT_1(NUM_RUNOUT_SENSORS, FIL_ITEM) + #endif + + END_SCREEN(); + ui.refresh(LCDVIEW_CALL_REDRAW_NEXT); + } + +#endif // LCD_ENDSTOP_TEST + #if HAS_DEBUG_MENU void menu_debug() { @@ -101,6 +182,10 @@ void menu_advanced_settings(); SUBMENU(MSG_PROGRESS_BAR_TEST, _progress_bar_test); #endif + #if ENABLED(LCD_ENDSTOP_TEST) + SUBMENU(MSG_ENDSTOP_TEST, endstop_test); + #endif + END_MENU(); } @@ -161,7 +246,7 @@ void menu_advanced_settings(); } #endif -#endif +#endif // HAS_MULTI_EXTRUDER #if HAS_HOTEND_OFFSET #include "../../module/motion.h" diff --git a/Marlin/src/lcd/menu/menu_info.cpp b/Marlin/src/lcd/menu/menu_info.cpp index abca4a7d15..e2dd6c6475 100644 --- a/Marlin/src/lcd/menu/menu_info.cpp +++ b/Marlin/src/lcd/menu/menu_info.cpp @@ -51,40 +51,40 @@ char buffer[21]; - START_SCREEN(); // 12345678901234567890 - VALUE_ITEM(MSG_INFO_PRINT_COUNT, i16tostr3left(stats.totalPrints), SS_LEFT); // Print Count: 999 - VALUE_ITEM(MSG_INFO_COMPLETED_PRINTS, i16tostr3left(stats.finishedPrints), SS_LEFT); // Completed : 666 + START_SCREEN(); // 12345678901234567890 + VALUE_ITEM(MSG_INFO_PRINT_COUNT, i16tostr3left(stats.totalPrints), SS_FULL); // Print Count: 999 + VALUE_ITEM(MSG_INFO_COMPLETED_PRINTS, i16tostr3left(stats.finishedPrints), SS_FULL); // Completed : 666 - STATIC_ITEM(MSG_INFO_PRINT_TIME, SS_LEFT); // Total print Time: - STATIC_ITEM_F(F("> "), SS_LEFT, duration_t(stats.printTime).toString(buffer)); // > 99y 364d 23h 59m 59s + STATIC_ITEM(MSG_INFO_PRINT_TIME, SS_FULL); // Total print Time: + STATIC_ITEM_F(nullptr, SS_FULL, duration_t(stats.printTime).toString(buffer)); // > 99y 364d 23h 59m 59s - STATIC_ITEM(MSG_INFO_PRINT_LONGEST, SS_LEFT); // Longest job time: - STATIC_ITEM_F(F("> "), SS_LEFT, duration_t(stats.longestPrint).toString(buffer)); // > 99y 364d 23h 59m 59s + STATIC_ITEM(MSG_INFO_PRINT_LONGEST, SS_FULL); // Longest job time: + STATIC_ITEM_F(nullptr, SS_FULL, duration_t(stats.longestPrint).toString(buffer)); // > 99y 364d 23h 59m 59s - STATIC_ITEM(MSG_INFO_PRINT_FILAMENT, SS_LEFT); // Extruded total: + STATIC_ITEM(MSG_INFO_PRINT_FILAMENT, SS_FULL); // Extruded total: sprintf_P(buffer, PSTR("%ld.%im") , long(stats.filamentUsed / 1000) , int16_t(stats.filamentUsed / 100) % 10 ); - STATIC_ITEM_F(F("> "), SS_LEFT, buffer); // > 125m + STATIC_ITEM_F(nullptr, SS_FULL, buffer); // > 125m #if SERVICE_INTERVAL_1 > 0 || SERVICE_INTERVAL_2 > 0 || SERVICE_INTERVAL_3 > 0 strcpy_P(buffer, GET_TEXT(MSG_SERVICE_IN)); #endif #if SERVICE_INTERVAL_1 > 0 - STATIC_ITEM_F(F(SERVICE_NAME_1 " "), SS_LEFT, buffer); // Service X in: - STATIC_ITEM_F(F("> "), SS_LEFT, duration_t(stats.nextService1).toString(buffer)); // > 7d 12h 11m 10s + STATIC_ITEM_F(F(SERVICE_NAME_1 " "), SS_FULL, buffer); // Service X in: + STATIC_ITEM_F(nullptr, SS_FULL, duration_t(stats.nextService1).toString(buffer)); // > 7d 12h 11m 10s #endif #if SERVICE_INTERVAL_2 > 0 - STATIC_ITEM_F(F(SERVICE_NAME_2 " "), SS_LEFT, buffer); - STATIC_ITEM_F(F("> "), SS_LEFT, duration_t(stats.nextService2).toString(buffer)); + STATIC_ITEM_F(F(SERVICE_NAME_2 " "), SS_FULL, buffer); + STATIC_ITEM_F(nullptr, SS_FULL, duration_t(stats.nextService2).toString(buffer)); #endif #if SERVICE_INTERVAL_3 > 0 - STATIC_ITEM_F(F(SERVICE_NAME_3 " "), SS_LEFT, buffer); - STATIC_ITEM_F(F("> "), SS_LEFT, duration_t(stats.nextService3).toString(buffer)); + STATIC_ITEM_F(F(SERVICE_NAME_3 " "), SS_FULL, buffer); + STATIC_ITEM_F(nullptr, SS_FULL, duration_t(stats.nextService3).toString(buffer)); #endif END_SCREEN(); @@ -104,9 +104,9 @@ void menu_info_thermistors() { #define THERMISTOR_ID TEMP_SENSOR_0 #include "../thermistornames.h" STATIC_ITEM_F(F(STR_E0 ": " THERMISTOR_NAME), SS_INVERT); - PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_0_MINTEMP), SS_LEFT); - PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_0_MAXTEMP), SS_LEFT); - STATIC_ITEM(TERN(WATCH_HOTENDS, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_LEFT); + PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_0_MINTEMP), SS_FULL); + PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_0_MAXTEMP), SS_FULL); + STATIC_ITEM(TERN(WATCH_HOTENDS, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_FULL); #endif #if TEMP_SENSOR_1 != 0 @@ -114,9 +114,9 @@ void menu_info_thermistors() { #define THERMISTOR_ID TEMP_SENSOR_1 #include "../thermistornames.h" STATIC_ITEM_F(F(STR_E1 ": " THERMISTOR_NAME), SS_INVERT); - PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_1_MINTEMP), SS_LEFT); - PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_1_MAXTEMP), SS_LEFT); - STATIC_ITEM(TERN(WATCH_HOTENDS, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_LEFT); + PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_1_MINTEMP), SS_FULL); + PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_1_MAXTEMP), SS_FULL); + STATIC_ITEM(TERN(WATCH_HOTENDS, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_FULL); #endif #if TEMP_SENSOR_2 != 0 @@ -124,9 +124,9 @@ void menu_info_thermistors() { #define THERMISTOR_ID TEMP_SENSOR_2 #include "../thermistornames.h" STATIC_ITEM_F(F(STR_E2 ": " THERMISTOR_NAME), SS_INVERT); - PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_2_MINTEMP), SS_LEFT); - PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_2_MAXTEMP), SS_LEFT); - STATIC_ITEM(TERN(WATCH_HOTENDS, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_LEFT); + PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_2_MINTEMP), SS_FULL); + PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_2_MAXTEMP), SS_FULL); + STATIC_ITEM(TERN(WATCH_HOTENDS, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_FULL); #endif #if TEMP_SENSOR_3 != 0 @@ -134,9 +134,9 @@ void menu_info_thermistors() { #define THERMISTOR_ID TEMP_SENSOR_3 #include "../thermistornames.h" STATIC_ITEM_F(F(STR_E3 ": " THERMISTOR_NAME), SS_INVERT); - PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_3_MINTEMP), SS_LEFT); - PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_3_MAXTEMP), SS_LEFT); - STATIC_ITEM(TERN(WATCH_HOTENDS, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_LEFT); + PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_3_MINTEMP), SS_FULL); + PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_3_MAXTEMP), SS_FULL); + STATIC_ITEM(TERN(WATCH_HOTENDS, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_FULL); #endif #if TEMP_SENSOR_4 != 0 @@ -144,9 +144,9 @@ void menu_info_thermistors() { #define THERMISTOR_ID TEMP_SENSOR_4 #include "../thermistornames.h" STATIC_ITEM_F(F(STR_E4 ": " THERMISTOR_NAME), SS_INVERT); - PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_4_MINTEMP), SS_LEFT); - PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_4_MAXTEMP), SS_LEFT); - STATIC_ITEM(TERN(WATCH_HOTENDS, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_LEFT); + PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_4_MINTEMP), SS_FULL); + PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_4_MAXTEMP), SS_FULL); + STATIC_ITEM(TERN(WATCH_HOTENDS, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_FULL); #endif #if TEMP_SENSOR_5 != 0 @@ -154,9 +154,9 @@ void menu_info_thermistors() { #define THERMISTOR_ID TEMP_SENSOR_5 #include "../thermistornames.h" STATIC_ITEM_F(F(STR_E5 ": " THERMISTOR_NAME), SS_INVERT); - PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_5_MINTEMP), SS_LEFT); - PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_5_MAXTEMP), SS_LEFT); - STATIC_ITEM(TERN(WATCH_HOTENDS, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_LEFT); + PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_5_MINTEMP), SS_FULL); + PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_5_MAXTEMP), SS_FULL); + STATIC_ITEM(TERN(WATCH_HOTENDS, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_FULL); #endif #if TEMP_SENSOR_6 != 0 @@ -164,9 +164,9 @@ void menu_info_thermistors() { #define THERMISTOR_ID TEMP_SENSOR_6 #include "../thermistornames.h" STATIC_ITEM_F(F(STR_E6 ": " THERMISTOR_NAME), SS_INVERT); - PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_6_MINTEMP), SS_LEFT); - PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_6_MAXTEMP), SS_LEFT); - STATIC_ITEM(TERN(WATCH_HOTENDS, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_LEFT); + PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_6_MINTEMP), SS_FULL); + PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_6_MAXTEMP), SS_FULL); + STATIC_ITEM(TERN(WATCH_HOTENDS, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_FULL); #endif #if TEMP_SENSOR_7 != 0 @@ -174,9 +174,9 @@ void menu_info_thermistors() { #define THERMISTOR_ID TEMP_SENSOR_7 #include "../thermistornames.h" STATIC_ITEM_F(F(STR_E7 ": " THERMISTOR_NAME), SS_INVERT); - PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_7_MINTEMP), SS_LEFT); - PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_7_MAXTEMP), SS_LEFT); - STATIC_ITEM(TERN(WATCH_HOTENDS, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_LEFT); + PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_7_MINTEMP), SS_FULL); + PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_7_MAXTEMP), SS_FULL); + STATIC_ITEM(TERN(WATCH_HOTENDS, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_FULL); #endif #if HAS_HEATED_BED @@ -184,9 +184,9 @@ void menu_info_thermistors() { #define THERMISTOR_ID TEMP_SENSOR_BED #include "../thermistornames.h" STATIC_ITEM_F(F("BED: " THERMISTOR_NAME), SS_INVERT); - PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(BED_MINTEMP), SS_LEFT); - PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(BED_MAXTEMP), SS_LEFT); - STATIC_ITEM(TERN(WATCH_BED, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_LEFT); + PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(BED_MINTEMP), SS_FULL); + PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(BED_MAXTEMP), SS_FULL); + STATIC_ITEM(TERN(WATCH_BED, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_FULL); #endif #if HAS_HEATED_CHAMBER @@ -194,9 +194,9 @@ void menu_info_thermistors() { #define THERMISTOR_ID TEMP_SENSOR_CHAMBER #include "../thermistornames.h" STATIC_ITEM_F(F("CHAM: " THERMISTOR_NAME), SS_INVERT); - PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(CHAMBER_MINTEMP), SS_LEFT); - PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(CHAMBER_MAXTEMP), SS_LEFT); - STATIC_ITEM(TERN(WATCH_CHAMBER, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_LEFT); + PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(CHAMBER_MINTEMP), SS_FULL); + PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(CHAMBER_MAXTEMP), SS_FULL); + STATIC_ITEM(TERN(WATCH_CHAMBER, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_FULL); #endif #if HAS_COOLER @@ -204,9 +204,9 @@ void menu_info_thermistors() { #define THERMISTOR_ID TEMP_SENSOR_COOLER #include "../thermistornames.h" STATIC_ITEM_F(F("COOL: " THERMISTOR_NAME), SS_INVERT); - PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(COOLER_MINTEMP), SS_LEFT); - PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(COOLER_MAXTEMP), SS_LEFT); - STATIC_ITEM(TERN(WATCH_COOLER, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_LEFT); + PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(COOLER_MINTEMP), SS_FULL); + PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(COOLER_MAXTEMP), SS_FULL); + STATIC_ITEM(TERN(WATCH_COOLER, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_FULL); #endif END_SCREEN(); diff --git a/Marlin/src/lcd/menu/menu_item.h b/Marlin/src/lcd/menu/menu_item.h index 3186852002..805caa1d90 100644 --- a/Marlin/src/lcd/menu/menu_item.h +++ b/Marlin/src/lcd/menu/menu_item.h @@ -368,19 +368,29 @@ class MenuItem_bool : public MenuEditItemBase { NEXT_ITEM(); \ }while(0) -// PSTRING_ITEM is like STATIC_ITEM but it takes -// two PSTRs with the style as the last parameter. +// PSTRING_ITEM is like STATIC_ITEM +// but also takes a PSTR and style. -#define PSTRING_ITEM_F(FLABEL, PVAL, STYL) do{ \ - constexpr int m = 20; \ - char msg[m+1]; \ - msg[0] = ':'; msg[1] = ' '; \ - strncpy_P(msg+2, PSTR(PVAL), m-2); \ - if (msg[m-1] & 0x80) msg[m-1] = '\0'; \ - STATIC_ITEM_F(FLABEL, STYL, msg); \ +#define PSTRING_ITEM_F_P(FLABEL, PVAL, STYL) do{ \ + constexpr int m = 20; \ + char msg[m+1]; \ + if (_menuLineNr == _thisItemNr) { \ + msg[0] = ':'; msg[1] = ' '; \ + strncpy_P(msg+2, PVAL, m-2); \ + if (msg[m-1] & 0x80) msg[m-1] = '\0'; \ + } \ + STATIC_ITEM_F(FLABEL, STYL, msg); \ }while(0) -#define PSTRING_ITEM(LABEL, V...) PSTRING_ITEM_F(GET_TEXT_F(LABEL), ##V) +#define PSTRING_ITEM_N_F_P(N, V...) do{ \ + if (_menuLineNr == _thisItemNr) \ + MenuItemBase::init(N); \ + PSTRING_ITEM_F_P(V); \ +}while(0) + +#define PSTRING_ITEM_N_P(N, LABEL, V...) PSTRING_ITEM_N_F_P(N, GET_TEXT_F(LABEL), ##V) +#define PSTRING_ITEM_P(LABEL, V...) PSTRING_ITEM_F_P(GET_TEXT_F(LABEL), ##V) +#define PSTRING_ITEM(LABEL, S, V...) PSTRING_ITEM_P(LABEL, PSTR(S), ##V) #define STATIC_ITEM(LABEL, V...) STATIC_ITEM_F(GET_TEXT_F(LABEL), ##V) #define STATIC_ITEM_N(N, LABEL, V...) STATIC_ITEM_N_F(N, GET_TEXT_F(LABEL), ##V) diff --git a/Marlin/src/lcd/tft/ui_common.cpp b/Marlin/src/lcd/tft/ui_common.cpp index 6fbde79154..6dee62820e 100644 --- a/Marlin/src/lcd/tft/ui_common.cpp +++ b/Marlin/src/lcd/tft/ui_common.cpp @@ -164,11 +164,28 @@ void MenuEditItemBase::draw(const bool sel, const uint8_t row, FSTR_P const fstr } // Draw a static item with no left-right margin required. Centered by default. -void MenuItem_static::draw(const uint8_t row, FSTR_P const fstr, const uint8_t style/*=SS_DEFAULT*/, const char * const vstr/*=nullptr*/) { +void MenuItem_static::draw(const uint8_t row, FSTR_P const fstr, const uint8_t style/*=SS_DEFAULT*/, const char *vstr/*=nullptr*/) { menu_item(row); + tft_string.set(fstr, itemIndex, itemStringC, itemStringF); - if (vstr) tft_string.add(vstr); - tft.add_text(tft_string.center(TFT_WIDTH), MENU_TEXT_Y_OFFSET, COLOR_YELLOW, tft_string); + + const bool center = bool(style & SS_CENTER), full = bool(style & SS_FULL); + if (!full || !vstr) { + if (vstr) tft_string.add(vstr); + tft.add_text(center ? tft_string.center(TFT_WIDTH) : 0, MENU_TEXT_Y_OFFSET, COLOR_YELLOW, tft_string); + return; + } + + // Move the leading colon from the value to the label + if (*vstr == ':') { tft_string.add(':'); vstr++; } + + // Left-justified label + tft.add_text(0, MENU_TEXT_Y_OFFSET, COLOR_YELLOW, tft_string); + + // Right-justified value, after spaces + while (*vstr == ' ') vstr++; + tft_string.set(vstr); + tft.add_text(TFT_WIDTH - 1 - tft_string.width(), MENU_TEXT_Y_OFFSET, COLOR_YELLOW, tft_string); } #if ENABLED(SDSUPPORT) diff --git a/Marlin/src/module/endstops.h b/Marlin/src/module/endstops.h index e0c0de39a1..9e942dc18e 100644 --- a/Marlin/src/module/endstops.h +++ b/Marlin/src/module/endstops.h @@ -31,46 +31,43 @@ #define __ES_ITEM(N) N, #define _ES_ITEM(K,N) TERN_(K,DEFER4(__ES_ITEM)(N)) +/** + * Basic Endstop Flag Bits: + * - Each axis gets one endstop flag bit based on the homing direction (e.g., "EndstopEnum::X_MIN"). + * (The use of "MIN" or "MAX" makes it easier to pair with similarly-named endstop pins.) + * - Multi-stepper axes can optionally enable endstops for all axis steppers. + * - The bed probe gets a 'Z_PROBE' flag bit (but DELTA sensorless probing uses 3 endstops). + * + * Endstop Flag Bit Aliases: + * - Each *_MIN or *_MAX flag is aliased to *_ENDSTOP. + * - 'Z_ENDSTOP' is aliased to 'Z_PROBE' if homing with the probe. + */ enum EndstopEnum : char { // Common XYZ (ABC) endstops. Defined according to USE_[XYZ](MIN|MAX)_PLUG settings. - _ES_ITEM(HAS_X_MIN, X_MIN) - _ES_ITEM(HAS_X_MAX, X_MAX) - _ES_ITEM(HAS_Y_MIN, Y_MIN) - _ES_ITEM(HAS_Y_MAX, Y_MAX) - _ES_ITEM(HAS_Z_MIN, Z_MIN) - _ES_ITEM(HAS_Z_MAX, Z_MAX) - _ES_ITEM(HAS_I_MIN, I_MIN) - _ES_ITEM(HAS_I_MAX, I_MAX) - _ES_ITEM(HAS_J_MIN, J_MIN) - _ES_ITEM(HAS_J_MAX, J_MAX) - _ES_ITEM(HAS_K_MIN, K_MIN) - _ES_ITEM(HAS_K_MAX, K_MAX) - _ES_ITEM(HAS_U_MIN, U_MIN) - _ES_ITEM(HAS_U_MAX, U_MAX) - _ES_ITEM(HAS_V_MIN, V_MIN) - _ES_ITEM(HAS_V_MAX, V_MAX) - _ES_ITEM(HAS_W_MIN, W_MIN) - _ES_ITEM(HAS_W_MAX, W_MAX) + _ES_ITEM(HAS_X_MIN, X_MIN) _ES_ITEM(HAS_X_MAX, X_MAX) + _ES_ITEM(HAS_Y_MIN, Y_MIN) _ES_ITEM(HAS_Y_MAX, Y_MAX) + _ES_ITEM(HAS_Z_MIN, Z_MIN) _ES_ITEM(HAS_Z_MAX, Z_MAX) + _ES_ITEM(HAS_I_MIN, I_MIN) _ES_ITEM(HAS_I_MAX, I_MAX) + _ES_ITEM(HAS_J_MIN, J_MIN) _ES_ITEM(HAS_J_MAX, J_MAX) + _ES_ITEM(HAS_K_MIN, K_MIN) _ES_ITEM(HAS_K_MAX, K_MAX) + _ES_ITEM(HAS_U_MIN, U_MIN) _ES_ITEM(HAS_U_MAX, U_MAX) + _ES_ITEM(HAS_V_MIN, V_MIN) _ES_ITEM(HAS_V_MAX, V_MAX) + _ES_ITEM(HAS_W_MIN, W_MIN) _ES_ITEM(HAS_W_MAX, W_MAX) // Extra Endstops for XYZ #if ENABLED(X_DUAL_ENDSTOPS) - _ES_ITEM(HAS_X_MIN, X2_MIN) - _ES_ITEM(HAS_X_MAX, X2_MAX) + _ES_ITEM(HAS_X_MIN, X2_MIN) _ES_ITEM(HAS_X_MAX, X2_MAX) #endif #if ENABLED(Y_DUAL_ENDSTOPS) - _ES_ITEM(HAS_Y_MIN, Y2_MIN) - _ES_ITEM(HAS_Y_MAX, Y2_MAX) + _ES_ITEM(HAS_Y_MIN, Y2_MIN) _ES_ITEM(HAS_Y_MAX, Y2_MAX) #endif #if ENABLED(Z_MULTI_ENDSTOPS) - _ES_ITEM(HAS_Z_MIN, Z2_MIN) - _ES_ITEM(HAS_Z_MAX, Z2_MAX) + _ES_ITEM(HAS_Z_MIN, Z2_MIN) _ES_ITEM(HAS_Z_MAX, Z2_MAX) #if NUM_Z_STEPPERS >= 3 - _ES_ITEM(HAS_Z_MIN, Z3_MIN) - _ES_ITEM(HAS_Z_MAX, Z3_MAX) - #endif - #if NUM_Z_STEPPERS >= 4 - _ES_ITEM(HAS_Z_MIN, Z4_MIN) - _ES_ITEM(HAS_Z_MAX, Z4_MAX) + _ES_ITEM(HAS_Z_MIN, Z3_MIN) _ES_ITEM(HAS_Z_MAX, Z3_MAX) + #if NUM_Z_STEPPERS >= 4 + _ES_ITEM(HAS_Z_MIN, Z4_MIN) _ES_ITEM(HAS_Z_MAX, Z4_MAX) + #endif #endif #endif @@ -83,30 +80,50 @@ enum EndstopEnum : char { NUM_ENDSTOP_STATES // Endstops can be either MIN or MAX but not both - #if HAS_X_MIN || HAS_X_MAX + #if HAS_X_ENDSTOP , X_ENDSTOP = TERN(X_HOME_TO_MAX, X_MAX, X_MIN) #if ENABLED(X_DUAL_ENDSTOPS) , X2_ENDSTOP = TERN(X_HOME_TO_MAX, X2_MAX, X2_MIN) #endif #endif - #if HAS_Y_MIN || HAS_Y_MAX + #if HAS_Y_ENDSTOP , Y_ENDSTOP = TERN(Y_HOME_TO_MAX, Y_MAX, Y_MIN) #if ENABLED(Y_DUAL_ENDSTOPS) , Y2_ENDSTOP = TERN(Y_HOME_TO_MAX, Y2_MAX, Y2_MIN) #endif #endif - #if HAS_Z_MIN || HAS_Z_MAX || HOMING_Z_WITH_PROBE - , Z_ENDSTOP = TERN(HOMING_Z_WITH_PROBE, Z_MIN_PROBE, TERN(Z_HOME_TO_MAX, Z_MAX, Z_MIN)) + #if HOMING_Z_WITH_PROBE + , Z_ENDSTOP = Z_MIN_PROBE + #elif HAS_Z_ENDSTOP + , Z_ENDSTOP = TERN(Z_HOME_TO_MAX, Z_MAX, Z_MIN) + #if ENABLED(Z_MULTI_ENDSTOPS) + , Z2_ENDSTOP = TERN(Z_HOME_TO_MAX, Z2_MAX, Z2_MIN) + #if NUM_Z_STEPPERS >= 3 + , Z3_ENDSTOP = TERN(Z_HOME_TO_MAX, Z3_MAX, Z3_MIN) + #if NUM_Z_STEPPERS >= 4 + , Z4_ENDSTOP = TERN(Z_HOME_TO_MAX, Z4_MAX, Z4_MIN) + #endif + #endif + #endif #endif - #if HAS_I_MIN || HAS_I_MAX + #if HAS_I_ENDSTOP , I_ENDSTOP = TERN(I_HOME_TO_MAX, I_MAX, I_MIN) #endif - #if HAS_J_MIN || HAS_J_MAX + #if HAS_J_ENDSTOP , J_ENDSTOP = TERN(J_HOME_TO_MAX, J_MAX, J_MIN) #endif - #if HAS_K_MIN || HAS_K_MAX + #if HAS_K_ENDSTOP , K_ENDSTOP = TERN(K_HOME_TO_MAX, K_MAX, K_MIN) #endif + #if HAS_U_ENDSTOP + , U_ENDSTOP = TERN(U_HOME_TO_MAX, U_MAX, U_MIN) + #endif + #if HAS_V_ENDSTOP + , V_ENDSTOP = TERN(V_HOME_TO_MAX, V_MAX, V_MIN) + #endif + #if HAS_W_ENDSTOP + , W_ENDSTOP = TERN(W_HOME_TO_MAX, W_MAX, W_MIN) + #endif }; #undef __ES_ITEM diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp index 6917bbc42a..589299f2f1 100644 --- a/Marlin/src/module/motion.cpp +++ b/Marlin/src/module/motion.cpp @@ -2171,32 +2171,9 @@ void prepare_line_to_destination() { // Check for a broken endstop EndstopEnum es; switch (axis) { - default: - case X_AXIS: es = X_ENDSTOP; break; - #if HAS_Y_AXIS - case Y_AXIS: es = Y_ENDSTOP; break; - #endif - #if HAS_Z_AXIS - case Z_AXIS: es = Z_ENDSTOP; break; - #endif - #if HAS_I_AXIS - case I_AXIS: es = I_ENDSTOP; break; - #endif - #if HAS_J_AXIS - case J_AXIS: es = J_ENDSTOP; break; - #endif - #if HAS_K_AXIS - case K_AXIS: es = K_ENDSTOP; break; - #endif - #if HAS_U_AXIS - case U_AXIS: es = U_ENDSTOP; break; - #endif - #if HAS_V_AXIS - case V_AXIS: es = V_ENDSTOP; break; - #endif - #if HAS_W_AXIS - case W_AXIS: es = W_ENDSTOP; break; - #endif + #define _ESCASE(A) case A##_AXIS: es = A##_ENDSTOP; break; + MAIN_AXIS_MAP(_ESCASE) + default: break; } if (TEST(endstops.state(), es)) { SERIAL_ECHO_MSG("Bad ", AS_CHAR(AXIS_CHAR(axis)), " Endstop?"); diff --git a/Marlin/src/module/probe.cpp b/Marlin/src/module/probe.cpp index 75295c5f5a..3e7db5a077 100644 --- a/Marlin/src/module/probe.cpp +++ b/Marlin/src/module/probe.cpp @@ -551,6 +551,7 @@ bool Probe::set_deployed(const bool deploy, const bool no_return/*=false*/) { #endif // If preheating is required before any probing... + // TODO: Consider skipping this for things like M401, G34, etc. TERN_(PREHEAT_BEFORE_PROBING, if (deploy) preheat_for_probing(PROBING_NOZZLE_TEMP, PROBING_BED_TEMP)); if (!no_return) do_blocking_move_to(old_xy); // Return to the original location unless handled externally @@ -1020,15 +1021,16 @@ float Probe::probe_at_point(const_float_t rx, const_float_t ry, const ProbePtRai void Probe::refresh_largest_sensorless_adj() { DEBUG_SECTION(rso, "Probe::refresh_largest_sensorless_adj", true); largest_sensorless_adj = -3; // A reference away from any real probe height - if (TEST(endstops.state(), X_MAX)) { + const Endstops::endstop_mask_t state = endstops.state(); + if (TEST(state, X_MAX)) { NOLESS(largest_sensorless_adj, offset_sensorless_adj.a); DEBUG_ECHOLNPGM("Endstop_X: ", largest_sensorless_adj, " TowerX"); } - if (TEST(endstops.state(), Y_MAX)) { + if (TEST(state, Y_MAX)) { NOLESS(largest_sensorless_adj, offset_sensorless_adj.b); DEBUG_ECHOLNPGM("Endstop_Y: ", largest_sensorless_adj, " TowerY"); } - if (TEST(endstops.state(), Z_MAX)) { + if (TEST(state, Z_MAX)) { NOLESS(largest_sensorless_adj, offset_sensorless_adj.c); DEBUG_ECHOLNPGM("Endstop_Z: ", largest_sensorless_adj, " TowerZ"); } diff --git a/Marlin/src/pins/pins_postprocess.h b/Marlin/src/pins/pins_postprocess.h index 708eb7f8e6..6ae99d2f57 100644 --- a/Marlin/src/pins/pins_postprocess.h +++ b/Marlin/src/pins/pins_postprocess.h @@ -1867,487 +1867,467 @@ * X_DUAL_ENDSTOPS endstop reassignment */ #if ENABLED(X_DUAL_ENDSTOPS) - #if X_HOME_TO_MAX - #ifndef X2_MAX_PIN - #if PIN_EXISTS(X2_STOP) - #define X2_MAX_PIN X2_STOP_PIN - #elif X2_USE_ENDSTOP == _XMIN_ - #define X2_MAX_PIN X_MIN_PIN - #elif X2_USE_ENDSTOP == _XMAX_ - #define X2_MAX_PIN X_MAX_PIN - #elif X2_USE_ENDSTOP == _XSTOP_ - #define X2_MAX_PIN X_STOP_PIN - #elif X2_USE_ENDSTOP == _YMIN_ - #define X2_MAX_PIN Y_MIN_PIN - #elif X2_USE_ENDSTOP == _YMAX_ - #define X2_MAX_PIN Y_MAX_PIN - #elif X2_USE_ENDSTOP == _YSTOP_ - #define X2_MAX_PIN Y_STOP_PIN - #elif X2_USE_ENDSTOP == _ZMIN_ - #define X2_MAX_PIN Z_MIN_PIN - #elif X2_USE_ENDSTOP == _ZMAX_ - #define X2_MAX_PIN Z_MAX_PIN - #elif X2_USE_ENDSTOP == _ZSTOP_ - #define X2_MAX_PIN Z_STOP_PIN - #elif X2_USE_ENDSTOP == _XDIAG_ - #define X2_MAX_PIN X_DIAG_PIN - #elif X2_USE_ENDSTOP == _YDIAG_ - #define X2_MAX_PIN Y_DIAG_PIN - #elif X2_USE_ENDSTOP == _ZDIAG_ - #define X2_MAX_PIN Z_DIAG_PIN - #elif X2_USE_ENDSTOP == _E0DIAG_ - #define X2_MAX_PIN E0_DIAG_PIN - #elif X2_USE_ENDSTOP == _E1DIAG_ - #define X2_MAX_PIN E1_DIAG_PIN - #elif X2_USE_ENDSTOP == _E2DIAG_ - #define X2_MAX_PIN E2_DIAG_PIN - #elif X2_USE_ENDSTOP == _E3DIAG_ - #define X2_MAX_PIN E3_DIAG_PIN - #elif X2_USE_ENDSTOP == _E4DIAG_ - #define X2_MAX_PIN E4_DIAG_PIN - #elif X2_USE_ENDSTOP == _E5DIAG_ - #define X2_MAX_PIN E5_DIAG_PIN - #elif X2_USE_ENDSTOP == _E6DIAG_ - #define X2_MAX_PIN E6_DIAG_PIN - #elif X2_USE_ENDSTOP == _E7DIAG_ - #define X2_MAX_PIN E7_DIAG_PIN - #endif + #if X_HOME_TO_MAX && !defined(X2_MAX_PIN) + #if PIN_EXISTS(X2_STOP) + #define X2_MAX_PIN X2_STOP_PIN + #elif X2_USE_ENDSTOP == _XMIN_ + #define X2_MAX_PIN X_MIN_PIN + #elif X2_USE_ENDSTOP == _XMAX_ + #define X2_MAX_PIN X_MAX_PIN + #elif X2_USE_ENDSTOP == _XSTOP_ + #define X2_MAX_PIN X_STOP_PIN + #elif X2_USE_ENDSTOP == _YMIN_ + #define X2_MAX_PIN Y_MIN_PIN + #elif X2_USE_ENDSTOP == _YMAX_ + #define X2_MAX_PIN Y_MAX_PIN + #elif X2_USE_ENDSTOP == _YSTOP_ + #define X2_MAX_PIN Y_STOP_PIN + #elif X2_USE_ENDSTOP == _ZMIN_ + #define X2_MAX_PIN Z_MIN_PIN + #elif X2_USE_ENDSTOP == _ZMAX_ + #define X2_MAX_PIN Z_MAX_PIN + #elif X2_USE_ENDSTOP == _ZSTOP_ + #define X2_MAX_PIN Z_STOP_PIN + #elif X2_USE_ENDSTOP == _XDIAG_ + #define X2_MAX_PIN X_DIAG_PIN + #elif X2_USE_ENDSTOP == _YDIAG_ + #define X2_MAX_PIN Y_DIAG_PIN + #elif X2_USE_ENDSTOP == _ZDIAG_ + #define X2_MAX_PIN Z_DIAG_PIN + #elif X2_USE_ENDSTOP == _E0DIAG_ + #define X2_MAX_PIN E0_DIAG_PIN + #elif X2_USE_ENDSTOP == _E1DIAG_ + #define X2_MAX_PIN E1_DIAG_PIN + #elif X2_USE_ENDSTOP == _E2DIAG_ + #define X2_MAX_PIN E2_DIAG_PIN + #elif X2_USE_ENDSTOP == _E3DIAG_ + #define X2_MAX_PIN E3_DIAG_PIN + #elif X2_USE_ENDSTOP == _E4DIAG_ + #define X2_MAX_PIN E4_DIAG_PIN + #elif X2_USE_ENDSTOP == _E5DIAG_ + #define X2_MAX_PIN E5_DIAG_PIN + #elif X2_USE_ENDSTOP == _E6DIAG_ + #define X2_MAX_PIN E6_DIAG_PIN + #elif X2_USE_ENDSTOP == _E7DIAG_ + #define X2_MAX_PIN E7_DIAG_PIN #endif - #else - #ifndef X2_MIN_PIN - #if PIN_EXISTS(X2_STOP) - #define X2_MIN_PIN X2_STOP_PIN - #elif X2_USE_ENDSTOP == _XMIN_ - #define X2_MIN_PIN X_MIN_PIN - #elif X2_USE_ENDSTOP == _XMAX_ - #define X2_MIN_PIN X_MAX_PIN - #elif X2_USE_ENDSTOP == _XSTOP_ - #define X2_MIN_PIN X_STOP_PIN - #elif X2_USE_ENDSTOP == _YMIN_ - #define X2_MIN_PIN Y_MIN_PIN - #elif X2_USE_ENDSTOP == _YMAX_ - #define X2_MIN_PIN Y_MAX_PIN - #elif X2_USE_ENDSTOP == _YSTOP_ - #define X2_MIN_PIN Y_STOP_PIN - #elif X2_USE_ENDSTOP == _ZMIN_ - #define X2_MIN_PIN Z_MIN_PIN - #elif X2_USE_ENDSTOP == _ZMAX_ - #define X2_MIN_PIN Z_MAX_PIN - #elif X2_USE_ENDSTOP == _ZSTOP_ - #define X2_MIN_PIN Z_STOP_PIN - #elif X2_USE_ENDSTOP == _XDIAG_ - #define X2_MIN_PIN X_DIAG_PIN - #elif X2_USE_ENDSTOP == _YDIAG_ - #define X2_MIN_PIN Y_DIAG_PIN - #elif X2_USE_ENDSTOP == _ZDIAG_ - #define X2_MIN_PIN Z_DIAG_PIN - #elif X2_USE_ENDSTOP == _E0DIAG_ - #define X2_MIN_PIN E0_DIAG_PIN - #elif X2_USE_ENDSTOP == _E1DIAG_ - #define X2_MIN_PIN E1_DIAG_PIN - #elif X2_USE_ENDSTOP == _E2DIAG_ - #define X2_MIN_PIN E2_DIAG_PIN - #elif X2_USE_ENDSTOP == _E3DIAG_ - #define X2_MIN_PIN E3_DIAG_PIN - #elif X2_USE_ENDSTOP == _E4DIAG_ - #define X2_MIN_PIN E4_DIAG_PIN - #elif X2_USE_ENDSTOP == _E5DIAG_ - #define X2_MIN_PIN E5_DIAG_PIN - #elif X2_USE_ENDSTOP == _E6DIAG_ - #define X2_MIN_PIN E6_DIAG_PIN - #elif X2_USE_ENDSTOP == _E7DIAG_ - #define X2_MIN_PIN E7_DIAG_PIN - #endif + #elif X_HOME_TO_MIN && !defined(X2_MIN_PIN) + #if PIN_EXISTS(X2_STOP) + #define X2_MIN_PIN X2_STOP_PIN + #elif X2_USE_ENDSTOP == _XMIN_ + #define X2_MIN_PIN X_MIN_PIN + #elif X2_USE_ENDSTOP == _XMAX_ + #define X2_MIN_PIN X_MAX_PIN + #elif X2_USE_ENDSTOP == _XSTOP_ + #define X2_MIN_PIN X_STOP_PIN + #elif X2_USE_ENDSTOP == _YMIN_ + #define X2_MIN_PIN Y_MIN_PIN + #elif X2_USE_ENDSTOP == _YMAX_ + #define X2_MIN_PIN Y_MAX_PIN + #elif X2_USE_ENDSTOP == _YSTOP_ + #define X2_MIN_PIN Y_STOP_PIN + #elif X2_USE_ENDSTOP == _ZMIN_ + #define X2_MIN_PIN Z_MIN_PIN + #elif X2_USE_ENDSTOP == _ZMAX_ + #define X2_MIN_PIN Z_MAX_PIN + #elif X2_USE_ENDSTOP == _ZSTOP_ + #define X2_MIN_PIN Z_STOP_PIN + #elif X2_USE_ENDSTOP == _XDIAG_ + #define X2_MIN_PIN X_DIAG_PIN + #elif X2_USE_ENDSTOP == _YDIAG_ + #define X2_MIN_PIN Y_DIAG_PIN + #elif X2_USE_ENDSTOP == _ZDIAG_ + #define X2_MIN_PIN Z_DIAG_PIN + #elif X2_USE_ENDSTOP == _E0DIAG_ + #define X2_MIN_PIN E0_DIAG_PIN + #elif X2_USE_ENDSTOP == _E1DIAG_ + #define X2_MIN_PIN E1_DIAG_PIN + #elif X2_USE_ENDSTOP == _E2DIAG_ + #define X2_MIN_PIN E2_DIAG_PIN + #elif X2_USE_ENDSTOP == _E3DIAG_ + #define X2_MIN_PIN E3_DIAG_PIN + #elif X2_USE_ENDSTOP == _E4DIAG_ + #define X2_MIN_PIN E4_DIAG_PIN + #elif X2_USE_ENDSTOP == _E5DIAG_ + #define X2_MIN_PIN E5_DIAG_PIN + #elif X2_USE_ENDSTOP == _E6DIAG_ + #define X2_MIN_PIN E6_DIAG_PIN + #elif X2_USE_ENDSTOP == _E7DIAG_ + #define X2_MIN_PIN E7_DIAG_PIN #endif #endif -#endif +#endif // X_DUAL_ENDSTOPS /** * Y_DUAL_ENDSTOPS endstop reassignment */ #if ENABLED(Y_DUAL_ENDSTOPS) - #if Y_HOME_TO_MAX - #ifndef Y2_MAX_PIN - #if PIN_EXISTS(Y2_STOP) - #define Y2_MAX_PIN Y2_STOP_PIN - #elif Y2_USE_ENDSTOP == _XMIN_ - #define Y2_MAX_PIN X_MIN_PIN - #elif Y2_USE_ENDSTOP == _XMAX_ - #define Y2_MAX_PIN X_MAX_PIN - #elif Y2_USE_ENDSTOP == _XSTOP_ - #define Y2_MAX_PIN X_STOP_PIN - #elif Y2_USE_ENDSTOP == _YMIN_ - #define Y2_MAX_PIN Y_MIN_PIN - #elif Y2_USE_ENDSTOP == _YMAX_ - #define Y2_MAX_PIN Y_MAX_PIN - #elif Y2_USE_ENDSTOP == _YSTOP_ - #define Y2_MAX_PIN Y_STOP_PIN - #elif Y2_USE_ENDSTOP == _ZMIN_ - #define Y2_MAX_PIN Z_MIN_PIN - #elif Y2_USE_ENDSTOP == _ZMAX_ - #define Y2_MAX_PIN Z_MAX_PIN - #elif Y2_USE_ENDSTOP == _ZSTOP_ - #define Y2_MAX_PIN Z_STOP_PIN - #elif Y2_USE_ENDSTOP == _XDIAG_ - #define Y2_MAX_PIN X_DIAG_PIN - #elif Y2_USE_ENDSTOP == _YDIAG_ - #define Y2_MAX_PIN Y_DIAG_PIN - #elif Y2_USE_ENDSTOP == _ZDIAG_ - #define Y2_MAX_PIN Z_DIAG_PIN - #elif Y2_USE_ENDSTOP == _E0DIAG_ - #define Y2_MAX_PIN E0_DIAG_PIN - #elif Y2_USE_ENDSTOP == _E1DIAG_ - #define Y2_MAX_PIN E1_DIAG_PIN - #elif Y2_USE_ENDSTOP == _E2DIAG_ - #define Y2_MAX_PIN E2_DIAG_PIN - #elif Y2_USE_ENDSTOP == _E3DIAG_ - #define Y2_MAX_PIN E3_DIAG_PIN - #elif Y2_USE_ENDSTOP == _E4DIAG_ - #define Y2_MAX_PIN E4_DIAG_PIN - #elif Y2_USE_ENDSTOP == _E5DIAG_ - #define Y2_MAX_PIN E5_DIAG_PIN - #elif Y2_USE_ENDSTOP == _E6DIAG_ - #define Y2_MAX_PIN E6_DIAG_PIN - #elif Y2_USE_ENDSTOP == _E7DIAG_ - #define Y2_MAX_PIN E7_DIAG_PIN - #endif + #if Y_HOME_TO_MAX && !defined(Y2_MAX_PIN) + #if PIN_EXISTS(Y2_STOP) + #define Y2_MAX_PIN Y2_STOP_PIN + #elif Y2_USE_ENDSTOP == _XMIN_ + #define Y2_MAX_PIN X_MIN_PIN + #elif Y2_USE_ENDSTOP == _XMAX_ + #define Y2_MAX_PIN X_MAX_PIN + #elif Y2_USE_ENDSTOP == _XSTOP_ + #define Y2_MAX_PIN X_STOP_PIN + #elif Y2_USE_ENDSTOP == _YMIN_ + #define Y2_MAX_PIN Y_MIN_PIN + #elif Y2_USE_ENDSTOP == _YMAX_ + #define Y2_MAX_PIN Y_MAX_PIN + #elif Y2_USE_ENDSTOP == _YSTOP_ + #define Y2_MAX_PIN Y_STOP_PIN + #elif Y2_USE_ENDSTOP == _ZMIN_ + #define Y2_MAX_PIN Z_MIN_PIN + #elif Y2_USE_ENDSTOP == _ZMAX_ + #define Y2_MAX_PIN Z_MAX_PIN + #elif Y2_USE_ENDSTOP == _ZSTOP_ + #define Y2_MAX_PIN Z_STOP_PIN + #elif Y2_USE_ENDSTOP == _XDIAG_ + #define Y2_MAX_PIN X_DIAG_PIN + #elif Y2_USE_ENDSTOP == _YDIAG_ + #define Y2_MAX_PIN Y_DIAG_PIN + #elif Y2_USE_ENDSTOP == _ZDIAG_ + #define Y2_MAX_PIN Z_DIAG_PIN + #elif Y2_USE_ENDSTOP == _E0DIAG_ + #define Y2_MAX_PIN E0_DIAG_PIN + #elif Y2_USE_ENDSTOP == _E1DIAG_ + #define Y2_MAX_PIN E1_DIAG_PIN + #elif Y2_USE_ENDSTOP == _E2DIAG_ + #define Y2_MAX_PIN E2_DIAG_PIN + #elif Y2_USE_ENDSTOP == _E3DIAG_ + #define Y2_MAX_PIN E3_DIAG_PIN + #elif Y2_USE_ENDSTOP == _E4DIAG_ + #define Y2_MAX_PIN E4_DIAG_PIN + #elif Y2_USE_ENDSTOP == _E5DIAG_ + #define Y2_MAX_PIN E5_DIAG_PIN + #elif Y2_USE_ENDSTOP == _E6DIAG_ + #define Y2_MAX_PIN E6_DIAG_PIN + #elif Y2_USE_ENDSTOP == _E7DIAG_ + #define Y2_MAX_PIN E7_DIAG_PIN #endif - #else - #ifndef Y2_MIN_PIN - #if PIN_EXISTS(Y2_STOP) - #define Y2_MIN_PIN Y2_STOP_PIN - #elif Y2_USE_ENDSTOP == _XMIN_ - #define Y2_MIN_PIN X_MIN_PIN - #elif Y2_USE_ENDSTOP == _XMAX_ - #define Y2_MIN_PIN X_MAX_PIN - #elif Y2_USE_ENDSTOP == _XSTOP_ - #define Y2_MIN_PIN X_STOP_PIN - #elif Y2_USE_ENDSTOP == _YMIN_ - #define Y2_MIN_PIN Y_MIN_PIN - #elif Y2_USE_ENDSTOP == _YMAX_ - #define Y2_MIN_PIN Y_MAX_PIN - #elif Y2_USE_ENDSTOP == _YSTOP_ - #define Y2_MIN_PIN Y_STOP_PIN - #elif Y2_USE_ENDSTOP == _ZMIN_ - #define Y2_MIN_PIN Z_MIN_PIN - #elif Y2_USE_ENDSTOP == _ZMAX_ - #define Y2_MIN_PIN Z_MAX_PIN - #elif Y2_USE_ENDSTOP == _ZSTOP_ - #define Y2_MIN_PIN Z_STOP_PIN - #elif Y2_USE_ENDSTOP == _XDIAG_ - #define Y2_MIN_PIN X_DIAG_PIN - #elif Y2_USE_ENDSTOP == _YDIAG_ - #define Y2_MIN_PIN Y_DIAG_PIN - #elif Y2_USE_ENDSTOP == _ZDIAG_ - #define Y2_MIN_PIN Z_DIAG_PIN - #elif Y2_USE_ENDSTOP == _E0DIAG_ - #define Y2_MIN_PIN E0_DIAG_PIN - #elif Y2_USE_ENDSTOP == _E1DIAG_ - #define Y2_MIN_PIN E1_DIAG_PIN - #elif Y2_USE_ENDSTOP == _E2DIAG_ - #define Y2_MIN_PIN E2_DIAG_PIN - #elif Y2_USE_ENDSTOP == _E3DIAG_ - #define Y2_MIN_PIN E3_DIAG_PIN - #elif Y2_USE_ENDSTOP == _E4DIAG_ - #define Y2_MIN_PIN E4_DIAG_PIN - #elif Y2_USE_ENDSTOP == _E5DIAG_ - #define Y2_MIN_PIN E5_DIAG_PIN - #elif Y2_USE_ENDSTOP == _E6DIAG_ - #define Y2_MIN_PIN E6_DIAG_PIN - #elif Y2_USE_ENDSTOP == _E7DIAG_ - #define Y2_MIN_PIN E7_DIAG_PIN - #endif + #elif Y_HOME_TO_MIN && !defined(Y2_MIN_PIN) + #if PIN_EXISTS(Y2_STOP) + #define Y2_MIN_PIN Y2_STOP_PIN + #elif Y2_USE_ENDSTOP == _XMIN_ + #define Y2_MIN_PIN X_MIN_PIN + #elif Y2_USE_ENDSTOP == _XMAX_ + #define Y2_MIN_PIN X_MAX_PIN + #elif Y2_USE_ENDSTOP == _XSTOP_ + #define Y2_MIN_PIN X_STOP_PIN + #elif Y2_USE_ENDSTOP == _YMIN_ + #define Y2_MIN_PIN Y_MIN_PIN + #elif Y2_USE_ENDSTOP == _YMAX_ + #define Y2_MIN_PIN Y_MAX_PIN + #elif Y2_USE_ENDSTOP == _YSTOP_ + #define Y2_MIN_PIN Y_STOP_PIN + #elif Y2_USE_ENDSTOP == _ZMIN_ + #define Y2_MIN_PIN Z_MIN_PIN + #elif Y2_USE_ENDSTOP == _ZMAX_ + #define Y2_MIN_PIN Z_MAX_PIN + #elif Y2_USE_ENDSTOP == _ZSTOP_ + #define Y2_MIN_PIN Z_STOP_PIN + #elif Y2_USE_ENDSTOP == _XDIAG_ + #define Y2_MIN_PIN X_DIAG_PIN + #elif Y2_USE_ENDSTOP == _YDIAG_ + #define Y2_MIN_PIN Y_DIAG_PIN + #elif Y2_USE_ENDSTOP == _ZDIAG_ + #define Y2_MIN_PIN Z_DIAG_PIN + #elif Y2_USE_ENDSTOP == _E0DIAG_ + #define Y2_MIN_PIN E0_DIAG_PIN + #elif Y2_USE_ENDSTOP == _E1DIAG_ + #define Y2_MIN_PIN E1_DIAG_PIN + #elif Y2_USE_ENDSTOP == _E2DIAG_ + #define Y2_MIN_PIN E2_DIAG_PIN + #elif Y2_USE_ENDSTOP == _E3DIAG_ + #define Y2_MIN_PIN E3_DIAG_PIN + #elif Y2_USE_ENDSTOP == _E4DIAG_ + #define Y2_MIN_PIN E4_DIAG_PIN + #elif Y2_USE_ENDSTOP == _E5DIAG_ + #define Y2_MIN_PIN E5_DIAG_PIN + #elif Y2_USE_ENDSTOP == _E6DIAG_ + #define Y2_MIN_PIN E6_DIAG_PIN + #elif Y2_USE_ENDSTOP == _E7DIAG_ + #define Y2_MIN_PIN E7_DIAG_PIN #endif #endif -#endif +#endif // Y_DUAL_ENDSTOPS /** * Z_MULTI_ENDSTOPS endstop reassignment */ #if ENABLED(Z_MULTI_ENDSTOPS) - #if Z_HOME_TO_MAX - #ifndef Z2_MAX_PIN - #if PIN_EXISTS(Z2_STOP) - #define Z2_MAX_PIN Z2_STOP_PIN - #elif Z2_USE_ENDSTOP == _XMIN_ - #define Z2_MAX_PIN X_MIN_PIN - #elif Z2_USE_ENDSTOP == _XMAX_ - #define Z2_MAX_PIN X_MAX_PIN - #elif Z2_USE_ENDSTOP == _XSTOP_ - #define Z2_MAX_PIN X_STOP_PIN - #elif Z2_USE_ENDSTOP == _YMIN_ - #define Z2_MAX_PIN Y_MIN_PIN - #elif Z2_USE_ENDSTOP == _YMAX_ - #define Z2_MAX_PIN Y_MAX_PIN - #elif Z2_USE_ENDSTOP == _YSTOP_ - #define Z2_MAX_PIN Y_STOP_PIN - #elif Z2_USE_ENDSTOP == _ZMIN_ - #define Z2_MAX_PIN Z_MIN_PIN - #elif Z2_USE_ENDSTOP == _ZMAX_ - #define Z2_MAX_PIN Z_MAX_PIN - #elif Z2_USE_ENDSTOP == _ZSTOP_ - #define Z2_MAX_PIN Z_STOP_PIN - #elif Z2_USE_ENDSTOP == _XDIAG_ - #define Z2_MAX_PIN X_DIAG_PIN - #elif Z2_USE_ENDSTOP == _YDIAG_ - #define Z2_MAX_PIN Y_DIAG_PIN - #elif Z2_USE_ENDSTOP == _ZDIAG_ - #define Z2_MAX_PIN Z_DIAG_PIN - #elif Z2_USE_ENDSTOP == _E0DIAG_ - #define Z2_MAX_PIN E0_DIAG_PIN - #elif Z2_USE_ENDSTOP == _E1DIAG_ - #define Z2_MAX_PIN E1_DIAG_PIN - #elif Z2_USE_ENDSTOP == _E2DIAG_ - #define Z2_MAX_PIN E2_DIAG_PIN - #elif Z2_USE_ENDSTOP == _E3DIAG_ - #define Z2_MAX_PIN E3_DIAG_PIN - #elif Z2_USE_ENDSTOP == _E4DIAG_ - #define Z2_MAX_PIN E4_DIAG_PIN - #elif Z2_USE_ENDSTOP == _E5DIAG_ - #define Z2_MAX_PIN E5_DIAG_PIN - #elif Z2_USE_ENDSTOP == _E6DIAG_ - #define Z2_MAX_PIN E6_DIAG_PIN - #elif Z2_USE_ENDSTOP == _E7DIAG_ - #define Z2_MAX_PIN E7_DIAG_PIN - #endif + #if Z_HOME_TO_MAX && !defined(Z2_MAX_PIN) + #if PIN_EXISTS(Z2_STOP) + #define Z2_MAX_PIN Z2_STOP_PIN + #elif Z2_USE_ENDSTOP == _XMIN_ + #define Z2_MAX_PIN X_MIN_PIN + #elif Z2_USE_ENDSTOP == _XMAX_ + #define Z2_MAX_PIN X_MAX_PIN + #elif Z2_USE_ENDSTOP == _XSTOP_ + #define Z2_MAX_PIN X_STOP_PIN + #elif Z2_USE_ENDSTOP == _YMIN_ + #define Z2_MAX_PIN Y_MIN_PIN + #elif Z2_USE_ENDSTOP == _YMAX_ + #define Z2_MAX_PIN Y_MAX_PIN + #elif Z2_USE_ENDSTOP == _YSTOP_ + #define Z2_MAX_PIN Y_STOP_PIN + #elif Z2_USE_ENDSTOP == _ZMIN_ + #define Z2_MAX_PIN Z_MIN_PIN + #elif Z2_USE_ENDSTOP == _ZMAX_ + #define Z2_MAX_PIN Z_MAX_PIN + #elif Z2_USE_ENDSTOP == _ZSTOP_ + #define Z2_MAX_PIN Z_STOP_PIN + #elif Z2_USE_ENDSTOP == _XDIAG_ + #define Z2_MAX_PIN X_DIAG_PIN + #elif Z2_USE_ENDSTOP == _YDIAG_ + #define Z2_MAX_PIN Y_DIAG_PIN + #elif Z2_USE_ENDSTOP == _ZDIAG_ + #define Z2_MAX_PIN Z_DIAG_PIN + #elif Z2_USE_ENDSTOP == _E0DIAG_ + #define Z2_MAX_PIN E0_DIAG_PIN + #elif Z2_USE_ENDSTOP == _E1DIAG_ + #define Z2_MAX_PIN E1_DIAG_PIN + #elif Z2_USE_ENDSTOP == _E2DIAG_ + #define Z2_MAX_PIN E2_DIAG_PIN + #elif Z2_USE_ENDSTOP == _E3DIAG_ + #define Z2_MAX_PIN E3_DIAG_PIN + #elif Z2_USE_ENDSTOP == _E4DIAG_ + #define Z2_MAX_PIN E4_DIAG_PIN + #elif Z2_USE_ENDSTOP == _E5DIAG_ + #define Z2_MAX_PIN E5_DIAG_PIN + #elif Z2_USE_ENDSTOP == _E6DIAG_ + #define Z2_MAX_PIN E6_DIAG_PIN + #elif Z2_USE_ENDSTOP == _E7DIAG_ + #define Z2_MAX_PIN E7_DIAG_PIN #endif - #else - #ifndef Z2_MIN_PIN - #if PIN_EXISTS(Z2_STOP) - #define Z2_MIN_PIN Z2_STOP_PIN - #elif Z2_USE_ENDSTOP == _XMIN_ - #define Z2_MIN_PIN X_MIN_PIN - #elif Z2_USE_ENDSTOP == _XMAX_ - #define Z2_MIN_PIN X_MAX_PIN - #elif Z2_USE_ENDSTOP == _XSTOP_ - #define Z2_MIN_PIN X_STOP_PIN - #elif Z2_USE_ENDSTOP == _YMIN_ - #define Z2_MIN_PIN Y_MIN_PIN - #elif Z2_USE_ENDSTOP == _YMAX_ - #define Z2_MIN_PIN Y_MAX_PIN - #elif Z2_USE_ENDSTOP == _YSTOP_ - #define Z2_MIN_PIN Y_STOP_PIN - #elif Z2_USE_ENDSTOP == _ZMIN_ - #define Z2_MIN_PIN Z_MIN_PIN - #elif Z2_USE_ENDSTOP == _ZMAX_ - #define Z2_MIN_PIN Z_MAX_PIN - #elif Z2_USE_ENDSTOP == _ZSTOP_ - #define Z2_MIN_PIN Z_STOP_PIN - #elif Z2_USE_ENDSTOP == _XDIAG_ - #define Z2_MIN_PIN X_DIAG_PIN - #elif Z2_USE_ENDSTOP == _YDIAG_ - #define Z2_MIN_PIN Y_DIAG_PIN - #elif Z2_USE_ENDSTOP == _ZDIAG_ - #define Z2_MIN_PIN Z_DIAG_PIN - #elif Z2_USE_ENDSTOP == _E0DIAG_ - #define Z2_MIN_PIN E0_DIAG_PIN - #elif Z2_USE_ENDSTOP == _E1DIAG_ - #define Z2_MIN_PIN E1_DIAG_PIN - #elif Z2_USE_ENDSTOP == _E2DIAG_ - #define Z2_MIN_PIN E2_DIAG_PIN - #elif Z2_USE_ENDSTOP == _E3DIAG_ - #define Z2_MIN_PIN E3_DIAG_PIN - #elif Z2_USE_ENDSTOP == _E4DIAG_ - #define Z2_MIN_PIN E4_DIAG_PIN - #elif Z2_USE_ENDSTOP == _E5DIAG_ - #define Z2_MIN_PIN E5_DIAG_PIN - #elif Z2_USE_ENDSTOP == _E6DIAG_ - #define Z2_MIN_PIN E6_DIAG_PIN - #elif Z2_USE_ENDSTOP == _E7DIAG_ - #define Z2_MIN_PIN E7_DIAG_PIN - #endif + #elif Z_HOME_TO_MIN && !defined(Z2_MIN_PIN) + #if PIN_EXISTS(Z2_STOP) + #define Z2_MIN_PIN Z2_STOP_PIN + #elif Z2_USE_ENDSTOP == _XMIN_ + #define Z2_MIN_PIN X_MIN_PIN + #elif Z2_USE_ENDSTOP == _XMAX_ + #define Z2_MIN_PIN X_MAX_PIN + #elif Z2_USE_ENDSTOP == _XSTOP_ + #define Z2_MIN_PIN X_STOP_PIN + #elif Z2_USE_ENDSTOP == _YMIN_ + #define Z2_MIN_PIN Y_MIN_PIN + #elif Z2_USE_ENDSTOP == _YMAX_ + #define Z2_MIN_PIN Y_MAX_PIN + #elif Z2_USE_ENDSTOP == _YSTOP_ + #define Z2_MIN_PIN Y_STOP_PIN + #elif Z2_USE_ENDSTOP == _ZMIN_ + #define Z2_MIN_PIN Z_MIN_PIN + #elif Z2_USE_ENDSTOP == _ZMAX_ + #define Z2_MIN_PIN Z_MAX_PIN + #elif Z2_USE_ENDSTOP == _ZSTOP_ + #define Z2_MIN_PIN Z_STOP_PIN + #elif Z2_USE_ENDSTOP == _XDIAG_ + #define Z2_MIN_PIN X_DIAG_PIN + #elif Z2_USE_ENDSTOP == _YDIAG_ + #define Z2_MIN_PIN Y_DIAG_PIN + #elif Z2_USE_ENDSTOP == _ZDIAG_ + #define Z2_MIN_PIN Z_DIAG_PIN + #elif Z2_USE_ENDSTOP == _E0DIAG_ + #define Z2_MIN_PIN E0_DIAG_PIN + #elif Z2_USE_ENDSTOP == _E1DIAG_ + #define Z2_MIN_PIN E1_DIAG_PIN + #elif Z2_USE_ENDSTOP == _E2DIAG_ + #define Z2_MIN_PIN E2_DIAG_PIN + #elif Z2_USE_ENDSTOP == _E3DIAG_ + #define Z2_MIN_PIN E3_DIAG_PIN + #elif Z2_USE_ENDSTOP == _E4DIAG_ + #define Z2_MIN_PIN E4_DIAG_PIN + #elif Z2_USE_ENDSTOP == _E5DIAG_ + #define Z2_MIN_PIN E5_DIAG_PIN + #elif Z2_USE_ENDSTOP == _E6DIAG_ + #define Z2_MIN_PIN E6_DIAG_PIN + #elif Z2_USE_ENDSTOP == _E7DIAG_ + #define Z2_MIN_PIN E7_DIAG_PIN #endif #endif #if NUM_Z_STEPPERS >= 3 - #if Z_HOME_TO_MAX - #ifndef Z3_MAX_PIN - #if PIN_EXISTS(Z3_STOP) - #define Z3_MAX_PIN Z3_STOP_PIN - #elif Z3_USE_ENDSTOP == _XMIN_ - #define Z3_MAX_PIN X_MIN_PIN - #elif Z3_USE_ENDSTOP == _XMAX_ - #define Z3_MAX_PIN X_MAX_PIN - #elif Z3_USE_ENDSTOP == _XSTOP_ - #define Z3_MAX_PIN X_STOP_PIN - #elif Z3_USE_ENDSTOP == _YMIN_ - #define Z3_MAX_PIN Y_MIN_PIN - #elif Z3_USE_ENDSTOP == _YMAX_ - #define Z3_MAX_PIN Y_MAX_PIN - #elif Z3_USE_ENDSTOP == _YSTOP_ - #define Z3_MAX_PIN Y_STOP_PIN - #elif Z3_USE_ENDSTOP == _ZMIN_ - #define Z3_MAX_PIN Z_MIN_PIN - #elif Z3_USE_ENDSTOP == _ZMAX_ - #define Z3_MAX_PIN Z_MAX_PIN - #elif Z3_USE_ENDSTOP == _ZSTOP_ - #define Z3_MAX_PIN Z_STOP_PIN - #elif Z3_USE_ENDSTOP == _XDIAG_ - #define Z3_MAX_PIN X_DIAG_PIN - #elif Z3_USE_ENDSTOP == _YDIAG_ - #define Z3_MAX_PIN Y_DIAG_PIN - #elif Z3_USE_ENDSTOP == _ZDIAG_ - #define Z3_MAX_PIN Z_DIAG_PIN - #elif Z3_USE_ENDSTOP == _E0DIAG_ - #define Z3_MAX_PIN E0_DIAG_PIN - #elif Z3_USE_ENDSTOP == _E1DIAG_ - #define Z3_MAX_PIN E1_DIAG_PIN - #elif Z3_USE_ENDSTOP == _E2DIAG_ - #define Z3_MAX_PIN E2_DIAG_PIN - #elif Z3_USE_ENDSTOP == _E3DIAG_ - #define Z3_MAX_PIN E3_DIAG_PIN - #elif Z3_USE_ENDSTOP == _E4DIAG_ - #define Z3_MAX_PIN E4_DIAG_PIN - #elif Z3_USE_ENDSTOP == _E5DIAG_ - #define Z3_MAX_PIN E5_DIAG_PIN - #elif Z3_USE_ENDSTOP == _E6DIAG_ - #define Z3_MAX_PIN E6_DIAG_PIN - #elif Z3_USE_ENDSTOP == _E7DIAG_ - #define Z3_MAX_PIN E7_DIAG_PIN - #endif + #if Z_HOME_TO_MAX && !defined(Z3_MAX_PIN) + #if PIN_EXISTS(Z3_STOP) + #define Z3_MAX_PIN Z3_STOP_PIN + #elif Z3_USE_ENDSTOP == _XMIN_ + #define Z3_MAX_PIN X_MIN_PIN + #elif Z3_USE_ENDSTOP == _XMAX_ + #define Z3_MAX_PIN X_MAX_PIN + #elif Z3_USE_ENDSTOP == _XSTOP_ + #define Z3_MAX_PIN X_STOP_PIN + #elif Z3_USE_ENDSTOP == _YMIN_ + #define Z3_MAX_PIN Y_MIN_PIN + #elif Z3_USE_ENDSTOP == _YMAX_ + #define Z3_MAX_PIN Y_MAX_PIN + #elif Z3_USE_ENDSTOP == _YSTOP_ + #define Z3_MAX_PIN Y_STOP_PIN + #elif Z3_USE_ENDSTOP == _ZMIN_ + #define Z3_MAX_PIN Z_MIN_PIN + #elif Z3_USE_ENDSTOP == _ZMAX_ + #define Z3_MAX_PIN Z_MAX_PIN + #elif Z3_USE_ENDSTOP == _ZSTOP_ + #define Z3_MAX_PIN Z_STOP_PIN + #elif Z3_USE_ENDSTOP == _XDIAG_ + #define Z3_MAX_PIN X_DIAG_PIN + #elif Z3_USE_ENDSTOP == _YDIAG_ + #define Z3_MAX_PIN Y_DIAG_PIN + #elif Z3_USE_ENDSTOP == _ZDIAG_ + #define Z3_MAX_PIN Z_DIAG_PIN + #elif Z3_USE_ENDSTOP == _E0DIAG_ + #define Z3_MAX_PIN E0_DIAG_PIN + #elif Z3_USE_ENDSTOP == _E1DIAG_ + #define Z3_MAX_PIN E1_DIAG_PIN + #elif Z3_USE_ENDSTOP == _E2DIAG_ + #define Z3_MAX_PIN E2_DIAG_PIN + #elif Z3_USE_ENDSTOP == _E3DIAG_ + #define Z3_MAX_PIN E3_DIAG_PIN + #elif Z3_USE_ENDSTOP == _E4DIAG_ + #define Z3_MAX_PIN E4_DIAG_PIN + #elif Z3_USE_ENDSTOP == _E5DIAG_ + #define Z3_MAX_PIN E5_DIAG_PIN + #elif Z3_USE_ENDSTOP == _E6DIAG_ + #define Z3_MAX_PIN E6_DIAG_PIN + #elif Z3_USE_ENDSTOP == _E7DIAG_ + #define Z3_MAX_PIN E7_DIAG_PIN #endif - #else - #ifndef Z3_MIN_PIN - #if PIN_EXISTS(Z3_STOP) - #define Z3_MIN_PIN Z3_STOP_PIN - #elif Z3_USE_ENDSTOP == _XMIN_ - #define Z3_MIN_PIN X_MIN_PIN - #elif Z3_USE_ENDSTOP == _XMAX_ - #define Z3_MIN_PIN X_MAX_PIN - #elif Z3_USE_ENDSTOP == _XSTOP_ - #define Z3_MIN_PIN X_STOP_PIN - #elif Z3_USE_ENDSTOP == _YMIN_ - #define Z3_MIN_PIN Y_MIN_PIN - #elif Z3_USE_ENDSTOP == _YMAX_ - #define Z3_MIN_PIN Y_MAX_PIN - #elif Z3_USE_ENDSTOP == _YSTOP_ - #define Z3_MIN_PIN Y_STOP_PIN - #elif Z3_USE_ENDSTOP == _ZMIN_ - #define Z3_MIN_PIN Z_MIN_PIN - #elif Z3_USE_ENDSTOP == _ZMAX_ - #define Z3_MIN_PIN Z_MAX_PIN - #elif Z3_USE_ENDSTOP == _ZSTOP_ - #define Z3_MIN_PIN Z_STOP_PIN - #elif Z3_USE_ENDSTOP == _XDIAG_ - #define Z3_MIN_PIN X_DIAG_PIN - #elif Z3_USE_ENDSTOP == _YDIAG_ - #define Z3_MIN_PIN Y_DIAG_PIN - #elif Z3_USE_ENDSTOP == _ZDIAG_ - #define Z3_MIN_PIN Z_DIAG_PIN - #elif Z3_USE_ENDSTOP == _E0DIAG_ - #define Z3_MIN_PIN E0_DIAG_PIN - #elif Z3_USE_ENDSTOP == _E1DIAG_ - #define Z3_MIN_PIN E1_DIAG_PIN - #elif Z3_USE_ENDSTOP == _E2DIAG_ - #define Z3_MIN_PIN E2_DIAG_PIN - #elif Z3_USE_ENDSTOP == _E3DIAG_ - #define Z3_MIN_PIN E3_DIAG_PIN - #elif Z3_USE_ENDSTOP == _E4DIAG_ - #define Z3_MIN_PIN E4_DIAG_PIN - #elif Z3_USE_ENDSTOP == _E5DIAG_ - #define Z3_MIN_PIN E5_DIAG_PIN - #elif Z3_USE_ENDSTOP == _E6DIAG_ - #define Z3_MIN_PIN E6_DIAG_PIN - #elif Z3_USE_ENDSTOP == _E7DIAG_ - #define Z3_MIN_PIN E7_DIAG_PIN - #endif + #elif Z_HOME_TO_MIN && !defined(Z3_MIN_PIN) + #if PIN_EXISTS(Z3_STOP) + #define Z3_MIN_PIN Z3_STOP_PIN + #elif Z3_USE_ENDSTOP == _XMIN_ + #define Z3_MIN_PIN X_MIN_PIN + #elif Z3_USE_ENDSTOP == _XMAX_ + #define Z3_MIN_PIN X_MAX_PIN + #elif Z3_USE_ENDSTOP == _XSTOP_ + #define Z3_MIN_PIN X_STOP_PIN + #elif Z3_USE_ENDSTOP == _YMIN_ + #define Z3_MIN_PIN Y_MIN_PIN + #elif Z3_USE_ENDSTOP == _YMAX_ + #define Z3_MIN_PIN Y_MAX_PIN + #elif Z3_USE_ENDSTOP == _YSTOP_ + #define Z3_MIN_PIN Y_STOP_PIN + #elif Z3_USE_ENDSTOP == _ZMIN_ + #define Z3_MIN_PIN Z_MIN_PIN + #elif Z3_USE_ENDSTOP == _ZMAX_ + #define Z3_MIN_PIN Z_MAX_PIN + #elif Z3_USE_ENDSTOP == _ZSTOP_ + #define Z3_MIN_PIN Z_STOP_PIN + #elif Z3_USE_ENDSTOP == _XDIAG_ + #define Z3_MIN_PIN X_DIAG_PIN + #elif Z3_USE_ENDSTOP == _YDIAG_ + #define Z3_MIN_PIN Y_DIAG_PIN + #elif Z3_USE_ENDSTOP == _ZDIAG_ + #define Z3_MIN_PIN Z_DIAG_PIN + #elif Z3_USE_ENDSTOP == _E0DIAG_ + #define Z3_MIN_PIN E0_DIAG_PIN + #elif Z3_USE_ENDSTOP == _E1DIAG_ + #define Z3_MIN_PIN E1_DIAG_PIN + #elif Z3_USE_ENDSTOP == _E2DIAG_ + #define Z3_MIN_PIN E2_DIAG_PIN + #elif Z3_USE_ENDSTOP == _E3DIAG_ + #define Z3_MIN_PIN E3_DIAG_PIN + #elif Z3_USE_ENDSTOP == _E4DIAG_ + #define Z3_MIN_PIN E4_DIAG_PIN + #elif Z3_USE_ENDSTOP == _E5DIAG_ + #define Z3_MIN_PIN E5_DIAG_PIN + #elif Z3_USE_ENDSTOP == _E6DIAG_ + #define Z3_MIN_PIN E6_DIAG_PIN + #elif Z3_USE_ENDSTOP == _E7DIAG_ + #define Z3_MIN_PIN E7_DIAG_PIN #endif #endif #endif #if NUM_Z_STEPPERS >= 4 - #if Z_HOME_TO_MAX - #ifndef Z4_MAX_PIN - #if PIN_EXISTS(Z4_STOP) - #define Z4_MAX_PIN Z4_STOP_PIN - #elif Z4_USE_ENDSTOP == _XMIN_ - #define Z4_MAX_PIN X_MIN_PIN - #elif Z4_USE_ENDSTOP == _XMAX_ - #define Z4_MAX_PIN X_MAX_PIN - #elif Z4_USE_ENDSTOP == _XSTOP_ - #define Z4_MAX_PIN X_STOP_PIN - #elif Z4_USE_ENDSTOP == _YMIN_ - #define Z4_MAX_PIN Y_MIN_PIN - #elif Z4_USE_ENDSTOP == _YMAX_ - #define Z4_MAX_PIN Y_MAX_PIN - #elif Z4_USE_ENDSTOP == _YSTOP_ - #define Z4_MAX_PIN Y_STOP_PIN - #elif Z4_USE_ENDSTOP == _ZMIN_ - #define Z4_MAX_PIN Z_MIN_PIN - #elif Z4_USE_ENDSTOP == _ZMAX_ - #define Z4_MAX_PIN Z_MAX_PIN - #elif Z4_USE_ENDSTOP == _ZSTOP_ - #define Z4_MAX_PIN Z_STOP_PIN - #elif Z4_USE_ENDSTOP == _XDIAG_ - #define Z4_MAX_PIN X_DIAG_PIN - #elif Z4_USE_ENDSTOP == _YDIAG_ - #define Z4_MAX_PIN Y_DIAG_PIN - #elif Z4_USE_ENDSTOP == _ZDIAG_ - #define Z4_MAX_PIN Z_DIAG_PIN - #elif Z4_USE_ENDSTOP == _E0DIAG_ - #define Z4_MAX_PIN E0_DIAG_PIN - #elif Z4_USE_ENDSTOP == _E1DIAG_ - #define Z4_MAX_PIN E1_DIAG_PIN - #elif Z4_USE_ENDSTOP == _E2DIAG_ - #define Z4_MAX_PIN E2_DIAG_PIN - #elif Z4_USE_ENDSTOP == _E3DIAG_ - #define Z4_MAX_PIN E3_DIAG_PIN - #elif Z4_USE_ENDSTOP == _E4DIAG_ - #define Z4_MAX_PIN E4_DIAG_PIN - #elif Z4_USE_ENDSTOP == _E5DIAG_ - #define Z4_MAX_PIN E5_DIAG_PIN - #elif Z4_USE_ENDSTOP == _E6DIAG_ - #define Z4_MAX_PIN E6_DIAG_PIN - #elif Z4_USE_ENDSTOP == _E7DIAG_ - #define Z4_MAX_PIN E7_DIAG_PIN - #endif + #if Z_HOME_TO_MAX && !defined(Z4_MAX_PIN) + #if PIN_EXISTS(Z4_STOP) + #define Z4_MAX_PIN Z4_STOP_PIN + #elif Z4_USE_ENDSTOP == _XMIN_ + #define Z4_MAX_PIN X_MIN_PIN + #elif Z4_USE_ENDSTOP == _XMAX_ + #define Z4_MAX_PIN X_MAX_PIN + #elif Z4_USE_ENDSTOP == _XSTOP_ + #define Z4_MAX_PIN X_STOP_PIN + #elif Z4_USE_ENDSTOP == _YMIN_ + #define Z4_MAX_PIN Y_MIN_PIN + #elif Z4_USE_ENDSTOP == _YMAX_ + #define Z4_MAX_PIN Y_MAX_PIN + #elif Z4_USE_ENDSTOP == _YSTOP_ + #define Z4_MAX_PIN Y_STOP_PIN + #elif Z4_USE_ENDSTOP == _ZMIN_ + #define Z4_MAX_PIN Z_MIN_PIN + #elif Z4_USE_ENDSTOP == _ZMAX_ + #define Z4_MAX_PIN Z_MAX_PIN + #elif Z4_USE_ENDSTOP == _ZSTOP_ + #define Z4_MAX_PIN Z_STOP_PIN + #elif Z4_USE_ENDSTOP == _XDIAG_ + #define Z4_MAX_PIN X_DIAG_PIN + #elif Z4_USE_ENDSTOP == _YDIAG_ + #define Z4_MAX_PIN Y_DIAG_PIN + #elif Z4_USE_ENDSTOP == _ZDIAG_ + #define Z4_MAX_PIN Z_DIAG_PIN + #elif Z4_USE_ENDSTOP == _E0DIAG_ + #define Z4_MAX_PIN E0_DIAG_PIN + #elif Z4_USE_ENDSTOP == _E1DIAG_ + #define Z4_MAX_PIN E1_DIAG_PIN + #elif Z4_USE_ENDSTOP == _E2DIAG_ + #define Z4_MAX_PIN E2_DIAG_PIN + #elif Z4_USE_ENDSTOP == _E3DIAG_ + #define Z4_MAX_PIN E3_DIAG_PIN + #elif Z4_USE_ENDSTOP == _E4DIAG_ + #define Z4_MAX_PIN E4_DIAG_PIN + #elif Z4_USE_ENDSTOP == _E5DIAG_ + #define Z4_MAX_PIN E5_DIAG_PIN + #elif Z4_USE_ENDSTOP == _E6DIAG_ + #define Z4_MAX_PIN E6_DIAG_PIN + #elif Z4_USE_ENDSTOP == _E7DIAG_ + #define Z4_MAX_PIN E7_DIAG_PIN #endif - #else - #ifndef Z4_MIN_PIN - #if PIN_EXISTS(Z4_STOP) - #define Z4_MIN_PIN Z4_STOP_PIN - #elif Z4_USE_ENDSTOP == _XMIN_ - #define Z4_MIN_PIN X_MIN_PIN - #elif Z4_USE_ENDSTOP == _XMAX_ - #define Z4_MIN_PIN X_MAX_PIN - #elif Z4_USE_ENDSTOP == _XSTOP_ - #define Z4_MIN_PIN X_STOP_PIN - #elif Z4_USE_ENDSTOP == _YMIN_ - #define Z4_MIN_PIN Y_MIN_PIN - #elif Z4_USE_ENDSTOP == _YMAX_ - #define Z4_MIN_PIN Y_MAX_PIN - #elif Z4_USE_ENDSTOP == _YSTOP_ - #define Z4_MIN_PIN Y_STOP_PIN - #elif Z4_USE_ENDSTOP == _ZMIN_ - #define Z4_MIN_PIN Z_MIN_PIN - #elif Z4_USE_ENDSTOP == _ZMAX_ - #define Z4_MIN_PIN Z_MAX_PIN - #elif Z4_USE_ENDSTOP == _ZSTOP_ - #define Z4_MIN_PIN Z_STOP_PIN - #elif Z4_USE_ENDSTOP == _XDIAG_ - #define Z4_MIN_PIN X_DIAG_PIN - #elif Z4_USE_ENDSTOP == _YDIAG_ - #define Z4_MIN_PIN Y_DIAG_PIN - #elif Z4_USE_ENDSTOP == _ZDIAG_ - #define Z4_MIN_PIN Z_DIAG_PIN - #elif Z4_USE_ENDSTOP == _E0DIAG_ - #define Z4_MIN_PIN E0_DIAG_PIN - #elif Z4_USE_ENDSTOP == _E1DIAG_ - #define Z4_MIN_PIN E1_DIAG_PIN - #elif Z4_USE_ENDSTOP == _E2DIAG_ - #define Z4_MIN_PIN E2_DIAG_PIN - #elif Z4_USE_ENDSTOP == _E3DIAG_ - #define Z4_MIN_PIN E3_DIAG_PIN - #elif Z4_USE_ENDSTOP == _E4DIAG_ - #define Z4_MIN_PIN E4_DIAG_PIN - #elif Z4_USE_ENDSTOP == _E5DIAG_ - #define Z4_MIN_PIN E5_DIAG_PIN - #elif Z4_USE_ENDSTOP == _E6DIAG_ - #define Z4_MIN_PIN E6_DIAG_PIN - #elif Z4_USE_ENDSTOP == _E7DIAG_ - #define Z4_MIN_PIN E7_DIAG_PIN - #endif + #elif Z_HOME_TO_MIN && !defined(Z4_MIN_PIN) + #if PIN_EXISTS(Z4_STOP) + #define Z4_MIN_PIN Z4_STOP_PIN + #elif Z4_USE_ENDSTOP == _XMIN_ + #define Z4_MIN_PIN X_MIN_PIN + #elif Z4_USE_ENDSTOP == _XMAX_ + #define Z4_MIN_PIN X_MAX_PIN + #elif Z4_USE_ENDSTOP == _XSTOP_ + #define Z4_MIN_PIN X_STOP_PIN + #elif Z4_USE_ENDSTOP == _YMIN_ + #define Z4_MIN_PIN Y_MIN_PIN + #elif Z4_USE_ENDSTOP == _YMAX_ + #define Z4_MIN_PIN Y_MAX_PIN + #elif Z4_USE_ENDSTOP == _YSTOP_ + #define Z4_MIN_PIN Y_STOP_PIN + #elif Z4_USE_ENDSTOP == _ZMIN_ + #define Z4_MIN_PIN Z_MIN_PIN + #elif Z4_USE_ENDSTOP == _ZMAX_ + #define Z4_MIN_PIN Z_MAX_PIN + #elif Z4_USE_ENDSTOP == _ZSTOP_ + #define Z4_MIN_PIN Z_STOP_PIN + #elif Z4_USE_ENDSTOP == _XDIAG_ + #define Z4_MIN_PIN X_DIAG_PIN + #elif Z4_USE_ENDSTOP == _YDIAG_ + #define Z4_MIN_PIN Y_DIAG_PIN + #elif Z4_USE_ENDSTOP == _ZDIAG_ + #define Z4_MIN_PIN Z_DIAG_PIN + #elif Z4_USE_ENDSTOP == _E0DIAG_ + #define Z4_MIN_PIN E0_DIAG_PIN + #elif Z4_USE_ENDSTOP == _E1DIAG_ + #define Z4_MIN_PIN E1_DIAG_PIN + #elif Z4_USE_ENDSTOP == _E2DIAG_ + #define Z4_MIN_PIN E2_DIAG_PIN + #elif Z4_USE_ENDSTOP == _E3DIAG_ + #define Z4_MIN_PIN E3_DIAG_PIN + #elif Z4_USE_ENDSTOP == _E4DIAG_ + #define Z4_MIN_PIN E4_DIAG_PIN + #elif Z4_USE_ENDSTOP == _E5DIAG_ + #define Z4_MIN_PIN E5_DIAG_PIN + #elif Z4_USE_ENDSTOP == _E6DIAG_ + #define Z4_MIN_PIN E6_DIAG_PIN + #elif Z4_USE_ENDSTOP == _E7DIAG_ + #define Z4_MIN_PIN E7_DIAG_PIN #endif #endif #endif diff --git a/buildroot/tests/STM32F103RE_creality b/buildroot/tests/STM32F103RE_creality index d407dc4301..834580fac8 100755 --- a/buildroot/tests/STM32F103RE_creality +++ b/buildroot/tests/STM32F103RE_creality @@ -11,12 +11,17 @@ set -e # use_example_configs "Creality/Ender-3 V2/CrealityV422/CrealityUI" opt_enable MARLIN_DEV_MODE BUFFER_MONITORING BLTOUCH AUTO_BED_LEVELING_BILINEAR Z_SAFE_HOMING -exec_test $1 $2 "Ender-3 v2 with CrealityUI" "$3" +exec_test $1 $2 "Ender-3 v2 - CrealityUI" "$3" use_example_configs "Creality/Ender-3 V2/CrealityV422/CrealityUI" opt_disable DWIN_CREALITY_LCD opt_enable DWIN_CREALITY_LCD_JYERSUI AUTO_BED_LEVELING_BILINEAR PROBE_MANUALLY -exec_test $1 $2 "Ender-3 v2 with JyersUI" "$3" +exec_test $1 $2 "Ender-3 v2 - JyersUI (ABL Bilinear/Manual)" "$3" + +use_example_configs "Creality/Ender-3 V2/CrealityV422/CrealityUI" +opt_disable DWIN_CREALITY_LCD PIDTEMP +opt_enable DWIN_MARLINUI_LANDSCAPE LCD_ENDSTOP_TEST AUTO_BED_LEVELING_UBL BLTOUCH Z_SAFE_HOMING MPCTEMP MPC_AUTOTUNE +exec_test $1 $2 "Ender-3 v2 - MarlinUI (UBL+BLTOUCH, MPCTEMP, LCD_ENDSTOP_TEST)" "$3" use_example_configs "Creality/Ender-3 S1/STM32F1" opt_disable DWIN_CREALITY_LCD Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN AUTO_BED_LEVELING_BILINEAR CANCEL_OBJECTS FWRETRACT @@ -25,11 +30,7 @@ opt_enable DWIN_LCD_PROUI INDIVIDUAL_AXIS_HOMING_SUBMENU SET_PROGRESS_MANUALLY S BLTOUCH Z_SAFE_HOMING AUTO_BED_LEVELING_UBL MESH_EDIT_MENU \ LIMITED_MAX_FR_EDITING LIMITED_MAX_ACCEL_EDITING LIMITED_JERK_EDITING BAUD_RATE_GCODE opt_set PREHEAT_3_LABEL '"CUSTOM"' PREHEAT_3_TEMP_HOTEND 240 PREHEAT_3_TEMP_BED 60 PREHEAT_3_FAN_SPEED 128 -exec_test $1 $2 "Ender-3 S1 with ProUI (PIDTEMP)" "$3" - -opt_disable PIDTEMP -opt_enable MPCTEMP MPC_AUTOTUNE -exec_test $1 $2 "Ender-3 S1 with ProUI (MPCTEMP)" "$3" +exec_test $1 $2 "Ender-3 S1 - ProUI (PIDTEMP)" "$3" restore_configs opt_set MOTHERBOARD BOARD_CREALITY_V452 SERIAL_PORT 1 From 726de7e82136c1a718b0c62425231eb0662592b6 Mon Sep 17 00:00:00 2001 From: Nomis-97 <72187111+Nomis-97@users.noreply.github.com> Date: Sat, 22 Apr 2023 10:16:19 +0200 Subject: [PATCH 205/225] =?UTF-8?q?=F0=9F=90=9B=20Fix=20MKS=20Gen-L=20MOSF?= =?UTF-8?q?ETs=20(#25717)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/ramps/pins_MKS_GEN_L.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Marlin/src/pins/ramps/pins_MKS_GEN_L.h b/Marlin/src/pins/ramps/pins_MKS_GEN_L.h index 5d1136e4ef..06bb35c72b 100644 --- a/Marlin/src/pins/ramps/pins_MKS_GEN_L.h +++ b/Marlin/src/pins/ramps/pins_MKS_GEN_L.h @@ -38,10 +38,10 @@ // Heaters / Fans // -#define MOSFET_A_PIN 9 // HE0 -#define MOSFET_B_PIN 8 // HE1 -#define MOSFET_C_PIN 10 // HBED -#define FAN0_PIN 7 +#define MOSFET_A_PIN 10 // HE0 +#define MOSFET_B_PIN 7 // HE1 or FAN Hotend Cooling +#define MOSFET_C_PIN 8 // HBED +#define FAN0_PIN 9 // FAN Part Cooling // // CS Pins wired to avoid conflict with the LCD From fba1f838551d13339df3a0f6f82c46b92631c730 Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Sat, 22 Apr 2023 21:02:51 +1200 Subject: [PATCH 206/225] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20Anycubic=20PlayTun?= =?UTF-8?q?e=20(#25728)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to #25690 --- Marlin/src/lcd/extui/anycubic/Tunes.h | 2 +- Marlin/src/lcd/extui/anycubic_vyper/FileNavigator.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Marlin/src/lcd/extui/anycubic/Tunes.h b/Marlin/src/lcd/extui/anycubic/Tunes.h index a05107738d..be8bc7223c 100644 --- a/Marlin/src/lcd/extui/anycubic/Tunes.h +++ b/Marlin/src/lcd/extui/anycubic/Tunes.h @@ -61,7 +61,7 @@ n_END=10000 // end of tune marker namespace Anycubic { - void PlayTune(const uint8_t beeperPin, const uint16_t *tune, const uint8_t speed); + void PlayTune(const uint16_t *tune, const uint8_t speed); // Only uncomment the tunes you are using to save memory // This will help you write tunes! diff --git a/Marlin/src/lcd/extui/anycubic_vyper/FileNavigator.cpp b/Marlin/src/lcd/extui/anycubic_vyper/FileNavigator.cpp index 38603f5679..03eba4c5b3 100644 --- a/Marlin/src/lcd/extui/anycubic_vyper/FileNavigator.cpp +++ b/Marlin/src/lcd/extui/anycubic_vyper/FileNavigator.cpp @@ -40,8 +40,8 @@ using namespace ExtUI; namespace Anycubic { - FileList FileNavigator::filelist; // Instance of the Marlin file API - char FileNavigator::currentfoldername[MAX_PATH_LEN]; // Current folder path + FileList FileNavigator::filelist; // Instance of the Marlin file API + char FileNavigator::currentfoldername[MAX_PATH_LEN + 1]; // Current folder path uint16_t FileNavigator::lastindex; uint8_t FileNavigator::folderdepth; uint16_t FileNavigator::currentindex; // override the panel request From 89ccede139963091768985eeb4ca5a6e3111647c Mon Sep 17 00:00:00 2001 From: "Alexey D. Filimonov" Date: Sat, 22 Apr 2023 12:06:19 +0300 Subject: [PATCH 207/225] =?UTF-8?q?=F0=9F=8E=A8=20Clean=20up=20TFT=20Color?= =?UTF-8?q?=20UI=20display=20items=20(#25712)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/src/lcd/tft/ui_1024x600.cpp | 14 +++++----- Marlin/src/lcd/tft/ui_320x240.cpp | 14 +++++----- Marlin/src/lcd/tft/ui_480x320.cpp | 14 +++++----- Marlin/src/lcd/tft/ui_common.h | 41 +++++++++--------------------- 4 files changed, 33 insertions(+), 50 deletions(-) diff --git a/Marlin/src/lcd/tft/ui_1024x600.cpp b/Marlin/src/lcd/tft/ui_1024x600.cpp index 6b628bc4cf..638e32a9b3 100644 --- a/Marlin/src/lcd/tft/ui_1024x600.cpp +++ b/Marlin/src/lcd/tft/ui_1024x600.cpp @@ -228,25 +228,25 @@ void MarlinUI::draw_status_screen() { for (i = 0 ; i < ITEMS_COUNT; i++) { x = (TFT_WIDTH / ITEMS_COUNT - 80) / 2 + (TFT_WIDTH * i / ITEMS_COUNT); switch (i) { - #ifdef ITEM_E0 + #if HAS_EXTRUDERS case ITEM_E0: draw_heater_status(x, y, H_E0); break; #endif - #ifdef ITEM_E1 + #if HAS_MULTI_HOTEND case ITEM_E1: draw_heater_status(x, y, H_E1); break; #endif - #ifdef ITEM_E2 + #if HOTENDS > 2 case ITEM_E2: draw_heater_status(x, y, H_E2); break; #endif - #ifdef ITEM_BED + #if HAS_HEATED_BED case ITEM_BED: draw_heater_status(x, y, H_BED); break; #endif - #ifdef ITEM_CHAMBER + #if HAS_TEMP_CHAMBER case ITEM_CHAMBER: draw_heater_status(x, y, H_CHAMBER); break; #endif - #ifdef ITEM_COOLER + #if HAS_TEMP_COOLER case ITEM_COOLER: draw_heater_status(x, y, H_COOLER); break; #endif - #ifdef ITEM_FAN + #if HAS_FAN case ITEM_FAN: draw_fan_status(x, y, blink); break; #endif } diff --git a/Marlin/src/lcd/tft/ui_320x240.cpp b/Marlin/src/lcd/tft/ui_320x240.cpp index 11e4730239..e606dca7ce 100644 --- a/Marlin/src/lcd/tft/ui_320x240.cpp +++ b/Marlin/src/lcd/tft/ui_320x240.cpp @@ -230,25 +230,25 @@ void MarlinUI::draw_status_screen() { for (i = 0 ; i < ITEMS_COUNT; i++) { x = (TFT_WIDTH / ITEMS_COUNT - 64) / 2 + (TFT_WIDTH * i / ITEMS_COUNT); switch (i) { - #ifdef ITEM_E0 + #if HAS_EXTRUDERS case ITEM_E0: draw_heater_status(x, y, H_E0); break; #endif - #ifdef ITEM_E1 + #if HAS_MULTI_HOTEND case ITEM_E1: draw_heater_status(x, y, H_E1); break; #endif - #ifdef ITEM_E2 + #if HOTENDS > 2 case ITEM_E2: draw_heater_status(x, y, H_E2); break; #endif - #ifdef ITEM_BED + #if HAS_HEATED_BED case ITEM_BED: draw_heater_status(x, y, H_BED); break; #endif - #ifdef ITEM_CHAMBER + #if HAS_TEMP_CHAMBER case ITEM_CHAMBER: draw_heater_status(x, y, H_CHAMBER); break; #endif - #ifdef ITEM_COOLER + #if HAS_TEMP_COOLER case ITEM_COOLER: draw_heater_status(x, y, H_COOLER); break; #endif - #ifdef ITEM_FAN + #if HAS_FAN case ITEM_FAN: draw_fan_status(x, y, blink); break; #endif } diff --git a/Marlin/src/lcd/tft/ui_480x320.cpp b/Marlin/src/lcd/tft/ui_480x320.cpp index 54762da671..edc3d321f2 100644 --- a/Marlin/src/lcd/tft/ui_480x320.cpp +++ b/Marlin/src/lcd/tft/ui_480x320.cpp @@ -228,25 +228,25 @@ void MarlinUI::draw_status_screen() { for (i = 0 ; i < ITEMS_COUNT; i++) { x = (TFT_WIDTH / ITEMS_COUNT - 80) / 2 + (TFT_WIDTH * i / ITEMS_COUNT); switch (i) { - #ifdef ITEM_E0 + #if HAS_EXTRUDERS case ITEM_E0: draw_heater_status(x, y, H_E0); break; #endif - #ifdef ITEM_E1 + #if HAS_MULTI_HOTEND case ITEM_E1: draw_heater_status(x, y, H_E1); break; #endif - #ifdef ITEM_E2 + #if HOTENDS > 2 case ITEM_E2: draw_heater_status(x, y, H_E2); break; #endif - #ifdef ITEM_BED + #if HAS_HEATED_BED case ITEM_BED: draw_heater_status(x, y, H_BED); break; #endif - #ifdef ITEM_CHAMBER + #if HAS_TEMP_CHAMBER case ITEM_CHAMBER: draw_heater_status(x, y, H_CHAMBER); break; #endif - #ifdef ITEM_COOLER + #if HAS_TEMP_COOLER case ITEM_COOLER: draw_heater_status(x, y, H_COOLER); break; #endif - #ifdef ITEM_FAN + #if HAS_FAN case ITEM_FAN: draw_fan_status(x, y, blink); break; #endif } diff --git a/Marlin/src/lcd/tft/ui_common.h b/Marlin/src/lcd/tft/ui_common.h index 7329c31a52..2a81ee2114 100644 --- a/Marlin/src/lcd/tft/ui_common.h +++ b/Marlin/src/lcd/tft/ui_common.h @@ -57,32 +57,15 @@ void menu_item(const uint8_t row, bool sel = false); #define ABSOLUTE_ZERO -273.15 -#if HAS_TEMP_CHAMBER && HAS_MULTI_HOTEND - #define ITEM_E0 0 - #define ITEM_E1 1 - #define ITEM_BED 2 - #define ITEM_CHAMBER 3 - #define ITEM_FAN 4 - #define ITEMS_COUNT 5 -#elif HAS_TEMP_CHAMBER - #define ITEM_E0 0 - #define ITEM_BED 1 - #define ITEM_CHAMBER 2 - #define ITEM_FAN 3 - #define ITEMS_COUNT 4 -#elif HAS_TEMP_COOLER - #define ITEM_COOLER 0 - #define ITEM_FAN 1 - #define ITEMS_COUNT 2 -#elif HAS_MULTI_HOTEND - #define ITEM_E0 0 - #define ITEM_E1 1 - #define ITEM_BED 2 - #define ITEM_FAN 3 - #define ITEMS_COUNT 4 -#else - #define ITEM_E0 0 - #define ITEM_BED 1 - #define ITEM_FAN 2 - #define ITEMS_COUNT 3 -#endif +enum { + OPTITEM(HAS_EXTRUDERS, ITEM_E0) + OPTITEM(HAS_MULTI_HOTEND, ITEM_E1) + #if HOTENDS > 2 + ITEM_E2, + #endif + OPTITEM(HAS_HEATED_BED, ITEM_BED) + OPTITEM(HAS_TEMP_CHAMBER, ITEM_CHAMBER) + OPTITEM(HAS_TEMP_COOLER, ITEM_COOLER) + OPTITEM(HAS_FAN, ITEM_FAN) + ITEMS_COUNT +}; From c8ed7950f40f9f454fc769b02d53f1086b17576c Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Sat, 22 Apr 2023 21:09:17 +1200 Subject: [PATCH 208/225] =?UTF-8?q?=F0=9F=94=A7=20Permit=20extrude=20witho?= =?UTF-8?q?ut=20hotend=20(#25709)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/src/gcode/gcode.cpp | 2 +- Marlin/src/gcode/gcode.h | 2 +- Marlin/src/gcode/temp/M104_M109.cpp | 4 +- Marlin/src/inc/Conditionals_LCD.h | 83 +++++++------ Marlin/src/inc/Conditionals_adv.h | 178 +++++++++++++--------------- Marlin/src/inc/SanityCheck.h | 143 +++++++++++----------- Marlin/src/module/temperature.cpp | 2 +- 7 files changed, 201 insertions(+), 213 deletions(-) diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index 0711d39204..9d1014e8bf 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -581,7 +581,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { case 102: M102(); break; // M102: Configure Bed Distance Sensor #endif - #if HAS_EXTRUDERS + #if HAS_HOTEND case 104: M104(); break; // M104: Set hot end temperature case 109: M109(); break; // M109: Wait for hotend temperature to reach target #endif diff --git a/Marlin/src/gcode/gcode.h b/Marlin/src/gcode/gcode.h index 8493d7f291..d49c544623 100644 --- a/Marlin/src/gcode/gcode.h +++ b/Marlin/src/gcode/gcode.h @@ -716,7 +716,7 @@ private: static void M102_report(const bool forReplay=true); #endif - #if HAS_EXTRUDERS + #if HAS_HOTEND static void M104_M109(const bool isM109); FORCE_INLINE static void M104() { M104_M109(false); } FORCE_INLINE static void M109() { M104_M109(true); } diff --git a/Marlin/src/gcode/temp/M104_M109.cpp b/Marlin/src/gcode/temp/M104_M109.cpp index 331ceeb61d..db150d5518 100644 --- a/Marlin/src/gcode/temp/M104_M109.cpp +++ b/Marlin/src/gcode/temp/M104_M109.cpp @@ -28,7 +28,7 @@ #include "../../inc/MarlinConfigPre.h" -#if HAS_EXTRUDERS +#if HAS_HOTEND #include "../gcode.h" #include "../../module/temperature.h" @@ -135,4 +135,4 @@ void GcodeSuite::M104_M109(const bool isM109) { (void)thermalManager.wait_for_hotend(target_extruder, no_wait_for_cooling); } -#endif // EXTRUDERS +#endif // HAS_HOTEND diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 5cc1d07b09..32a2eda7c7 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -624,8 +624,6 @@ #undef MIXING_EXTRUDER #undef HOTEND_IDLE_TIMEOUT #undef DISABLE_E - #undef THERMAL_PROTECTION_HOTENDS - #undef PREVENT_COLD_EXTRUSION #undef PREVENT_LENGTHY_EXTRUDE #undef FILAMENT_RUNOUT_SENSOR #undef FILAMENT_RUNOUT_DISTANCE_MM @@ -657,9 +655,6 @@ #else #define E_STEPPERS 1 #endif - #if !HAS_SWITCHING_NOZZLE - #define HOTENDS E_STEPPERS - #endif #elif ENABLED(MIXING_EXTRUDER) // Multiple feeds are mixed proportionally @@ -691,16 +686,7 @@ #define SINGLENOZZLE #endif -#if EITHER(SINGLENOZZLE, MIXING_EXTRUDER) // One hotend, one thermistor, no XY offset - #undef HOTENDS - #define HOTENDS 1 - #undef HOTEND_OFFSET_X - #undef HOTEND_OFFSET_Y -#endif - -#ifndef HOTENDS - #define HOTENDS EXTRUDERS -#endif +// Default E steppers / manual motion is one per extruder #ifndef E_STEPPERS #define E_STEPPERS EXTRUDERS #endif @@ -708,6 +694,45 @@ #define E_MANUAL EXTRUDERS #endif +// Number of hotends... +#if EITHER(SINGLENOZZLE, MIXING_EXTRUDER) // Only one for singlenozzle or mixing extruder + #define HOTENDS 1 +#elif HAS_SWITCHING_EXTRUDER && !HAS_SWITCHING_NOZZLE // One for each pair of abstract "extruders" + #define HOTENDS E_STEPPERS +#elif TEMP_SENSOR_0 + #define HOTENDS EXTRUDERS // One per extruder if at least one heater exists +#else + #define HOTENDS 0 // A machine with no hotends at all can still extrude +#endif + +// More than one hotend... +#if HOTENDS > 1 + #define HAS_MULTI_HOTEND 1 + #define HAS_HOTEND_OFFSET 1 + #ifndef HOTEND_OFFSET_X + #define HOTEND_OFFSET_X { 0 } // X offsets for each extruder + #endif + #ifndef HOTEND_OFFSET_Y + #define HOTEND_OFFSET_Y { 0 } // Y offsets for each extruder + #endif + #ifndef HOTEND_OFFSET_Z + #define HOTEND_OFFSET_Z { 0 } // Z offsets for each extruder + #endif +#else + #undef HOTEND_OFFSET_X + #undef HOTEND_OFFSET_Y + #undef HOTEND_OFFSET_Z +#endif + +// At least one hotend... +#if HOTENDS + #define HAS_HOTEND 1 + #ifndef HOTEND_OVERSHOOT + #define HOTEND_OVERSHOOT 15 + #endif +#endif + +// Clean up E-stepper-based settings... #if E_STEPPERS <= 7 #undef INVERT_E7_DIR #undef E7_DRIVER_TYPE @@ -1037,19 +1062,6 @@ #define E_INDEX_N(E) 0 #endif -#if HOTENDS - #define HAS_HOTEND 1 - #ifndef HOTEND_OVERSHOOT - #define HOTEND_OVERSHOOT 15 - #endif - #if HOTENDS > 1 - #define HAS_MULTI_HOTEND 1 - #define HAS_HOTEND_OFFSET 1 - #endif -#else - #undef PID_PARAMS_PER_HOTEND -#endif - // Helper macros for extruder and hotend arrays #define _EXTRUDER_LOOP(E) for (int8_t E = 0; E < EXTRUDERS; E++) #define EXTRUDER_LOOP() _EXTRUDER_LOOP(e) @@ -1061,21 +1073,6 @@ #define ARRAY_BY_HOTENDS(V...) ARRAY_N(HOTENDS, V) #define ARRAY_BY_HOTENDS1(v1) ARRAY_N_1(HOTENDS, v1) -/** - * Default hotend offsets, if not defined - */ -#if HAS_HOTEND_OFFSET - #ifndef HOTEND_OFFSET_X - #define HOTEND_OFFSET_X { 0 } // X offsets for each extruder - #endif - #ifndef HOTEND_OFFSET_Y - #define HOTEND_OFFSET_Y { 0 } // Y offsets for each extruder - #endif - #ifndef HOTEND_OFFSET_Z - #define HOTEND_OFFSET_Z { 0 } // Z offsets for each extruder - #endif -#endif - /** * Disable unused SINGLENOZZLE sub-options */ diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h index 3a3daa84ac..c9c8fdf2d5 100644 --- a/Marlin/src/inc/Conditionals_adv.h +++ b/Marlin/src/inc/Conditionals_adv.h @@ -184,7 +184,6 @@ #if !HAS_EXTRUDERS #define NO_VOLUMETRICS #undef ADVANCED_PAUSE_FEATURE - #undef AUTOTEMP #undef DISABLE_IDLE_E #undef EXTRUDER_RUNOUT_PREVENT #undef FILAMENT_LOAD_UNLOAD_GCODES @@ -193,11 +192,8 @@ #undef LIN_ADVANCE #undef MANUAL_E_MOVES_RELATIVE #undef PID_EXTRUSION_SCALING - #undef PIDTEMP #undef SHOW_TEMP_ADC_VALUES #undef STEALTHCHOP_E - #undef THERMAL_PROTECTION_PERIOD - #undef WATCH_TEMP_PERIOD #endif #if ENABLED(DISABLE_X) && !defined(DISABLE_IDLE_X) @@ -237,22 +233,47 @@ #endif #undef _OR_HAS_DI -#if HOTENDS <= 7 +// Remove hotend-dependent settings +#if HOTENDS < 8 #undef E7_AUTO_FAN_PIN - #if HOTENDS <= 6 + #undef HEATER_7_MAXTEMP + #undef HEATER_7_MINTEMP + #if HOTENDS < 7 #undef E6_AUTO_FAN_PIN - #if HOTENDS <= 5 + #undef HEATER_6_MAXTEMP + #undef HEATER_6_MINTEMP + #if HOTENDS < 6 #undef E5_AUTO_FAN_PIN - #if HOTENDS <= 4 + #undef HEATER_5_MAXTEMP + #undef HEATER_5_MINTEMP + #if HOTENDS < 5 #undef E4_AUTO_FAN_PIN - #if HOTENDS <= 3 + #undef HEATER_4_MAXTEMP + #undef HEATER_4_MINTEMP + #if HOTENDS < 4 #undef E3_AUTO_FAN_PIN - #if HOTENDS <= 2 + #undef HEATER_3_MAXTEMP + #undef HEATER_3_MINTEMP + #if HOTENDS < 3 #undef E2_AUTO_FAN_PIN - #if HOTENDS <= 1 + #undef HEATER_2_MAXTEMP + #undef HEATER_2_MINTEMP + #if HOTENDS < 2 #undef E1_AUTO_FAN_PIN - #if HOTENDS == 0 + #undef HEATER_1_MAXTEMP + #undef HEATER_1_MINTEMP + #if HOTENDS < 1 + #undef AUTOTEMP #undef E0_AUTO_FAN_PIN + #undef HEATER_0_MAXTEMP + #undef HEATER_0_MINTEMP + #undef PID_PARAMS_PER_HOTEND + #undef PIDTEMP + #undef MPCTEMP + #undef PREVENT_COLD_EXTRUSION + #undef THERMAL_PROTECTION_HOTENDS + #undef THERMAL_PROTECTION_PERIOD + #undef WATCH_TEMP_PERIOD #endif #endif #endif @@ -325,15 +346,13 @@ #define TEMP_SENSOR_0_IS_AD8495 1 #elif TEMP_SENSOR_0 == -1 #define TEMP_SENSOR_0_IS_AD595 1 -#elif TEMP_SENSOR_0 == 1000 - #define TEMP_SENSOR_0_IS_CUSTOM 1 #elif TEMP_SENSOR_0 == 998 || TEMP_SENSOR_0 == 999 #define TEMP_SENSOR_0_IS_DUMMY 1 #elif TEMP_SENSOR_0 > 0 #define TEMP_SENSOR_0_IS_THERMISTOR 1 -#else - #undef HEATER_0_MINTEMP - #undef HEATER_0_MAXTEMP + #if TEMP_SENSOR_0 == 1000 + #define TEMP_SENSOR_0_IS_CUSTOM 1 + #endif #endif #if TEMP_SENSOR_IS_MAX_TC(1) @@ -370,15 +389,13 @@ #define TEMP_SENSOR_1_IS_AD8495 1 #elif TEMP_SENSOR_1 == -1 #define TEMP_SENSOR_1_IS_AD595 1 -#elif TEMP_SENSOR_1 == 1000 - #define TEMP_SENSOR_1_IS_CUSTOM 1 #elif TEMP_SENSOR_1 == 998 || TEMP_SENSOR_1 == 999 #define TEMP_SENSOR_1_IS_DUMMY 1 #elif TEMP_SENSOR_1 > 0 #define TEMP_SENSOR_1_IS_THERMISTOR 1 -#else - #undef HEATER_1_MINTEMP - #undef HEATER_1_MAXTEMP + #if TEMP_SENSOR_1 == 1000 + #define TEMP_SENSOR_1_IS_CUSTOM 1 + #endif #endif #if TEMP_SENSOR_IS_MAX_TC(2) @@ -415,70 +432,58 @@ #define TEMP_SENSOR_2_IS_AD8495 1 #elif TEMP_SENSOR_2 == -1 #define TEMP_SENSOR_2_IS_AD595 1 -#elif TEMP_SENSOR_2 == 1000 - #define TEMP_SENSOR_2_IS_CUSTOM 1 #elif TEMP_SENSOR_2 == 998 || TEMP_SENSOR_2 == 999 #define TEMP_SENSOR_2_IS_DUMMY 1 #elif TEMP_SENSOR_2 > 0 #define TEMP_SENSOR_2_IS_THERMISTOR 1 -#else - #undef HEATER_2_MINTEMP - #undef HEATER_2_MAXTEMP + #if TEMP_SENSOR_2 == 1000 + #define TEMP_SENSOR_2_IS_CUSTOM 1 + #endif #endif -#if TEMP_SENSOR_3 == 1000 - #define TEMP_SENSOR_3_IS_CUSTOM 1 -#elif TEMP_SENSOR_3 == 998 || TEMP_SENSOR_3 == 999 +#if TEMP_SENSOR_3 == 998 || TEMP_SENSOR_3 == 999 #define TEMP_SENSOR_3_IS_DUMMY 1 #elif TEMP_SENSOR_3 > 0 #define TEMP_SENSOR_3_IS_THERMISTOR 1 -#elif !TEMP_SENSOR_3 - #undef HEATER_3_MINTEMP - #undef HEATER_3_MAXTEMP + #if TEMP_SENSOR_3 == 1000 + #define TEMP_SENSOR_3_IS_CUSTOM 1 + #endif #endif -#if TEMP_SENSOR_4 == 1000 - #define TEMP_SENSOR_4_IS_CUSTOM 1 -#elif TEMP_SENSOR_4 == 998 || TEMP_SENSOR_4 == 999 +#if TEMP_SENSOR_4 == 998 || TEMP_SENSOR_4 == 999 #define TEMP_SENSOR_4_IS_DUMMY 1 #elif TEMP_SENSOR_4 > 0 #define TEMP_SENSOR_4_IS_THERMISTOR 1 -#elif !TEMP_SENSOR_4 - #undef HEATER_4_MINTEMP - #undef HEATER_4_MAXTEMP + #if TEMP_SENSOR_4 == 1000 + #define TEMP_SENSOR_4_IS_CUSTOM 1 + #endif #endif -#if TEMP_SENSOR_5 == 1000 - #define TEMP_SENSOR_5_IS_CUSTOM 1 -#elif TEMP_SENSOR_5 == 998 || TEMP_SENSOR_5 == 999 +#if TEMP_SENSOR_5 == 998 || TEMP_SENSOR_5 == 999 #define TEMP_SENSOR_5_IS_DUMMY 1 #elif TEMP_SENSOR_5 > 0 #define TEMP_SENSOR_5_IS_THERMISTOR 1 -#elif !TEMP_SENSOR_5 - #undef HEATER_5_MINTEMP - #undef HEATER_5_MAXTEMP + #if TEMP_SENSOR_5 == 1000 + #define TEMP_SENSOR_5_IS_CUSTOM 1 + #endif #endif -#if TEMP_SENSOR_6 == 1000 - #define TEMP_SENSOR_6_IS_CUSTOM 1 -#elif TEMP_SENSOR_6 == 998 || TEMP_SENSOR_6 == 999 +#if TEMP_SENSOR_6 == 998 || TEMP_SENSOR_6 == 999 #define TEMP_SENSOR_6_IS_DUMMY 1 #elif TEMP_SENSOR_6 > 0 #define TEMP_SENSOR_6_IS_THERMISTOR 1 -#elif !TEMP_SENSOR_6 - #undef HEATER_6_MINTEMP - #undef HEATER_6_MAXTEMP + #if TEMP_SENSOR_6 == 1000 + #define TEMP_SENSOR_6_IS_CUSTOM 1 + #endif #endif -#if TEMP_SENSOR_7 == 1000 - #define TEMP_SENSOR_7_IS_CUSTOM 1 -#elif TEMP_SENSOR_7 == 998 || TEMP_SENSOR_7 == 999 +#if TEMP_SENSOR_7 == 998 || TEMP_SENSOR_7 == 999 #define TEMP_SENSOR_7_IS_DUMMY 1 #elif TEMP_SENSOR_7 > 0 #define TEMP_SENSOR_7_IS_THERMISTOR 1 -#elif !TEMP_SENSOR_7 - #undef HEATER_7_MINTEMP - #undef HEATER_7_MAXTEMP + #if TEMP_SENSOR_7 == 1000 + #define TEMP_SENSOR_7_IS_CUSTOM 1 + #endif #endif #if TEMP_SENSOR_IS_MAX_TC(REDUNDANT) @@ -542,12 +547,12 @@ #define TEMP_SENSOR_REDUNDANT_IS_AD8495 1 #elif TEMP_SENSOR_REDUNDANT == -1 #define TEMP_SENSOR_REDUNDANT_IS_AD595 1 +#elif TEMP_SENSOR_REDUNDANT == 998 || TEMP_SENSOR_REDUNDANT == 999 + #error "Dummy sensors are not supported for TEMP_SENSOR_REDUNDANT." #elif TEMP_SENSOR_REDUNDANT > 0 #define TEMP_SENSOR_REDUNDANT_IS_THERMISTOR 1 #if TEMP_SENSOR_REDUNDANT == 1000 #define TEMP_SENSOR_REDUNDANT_IS_CUSTOM 1 - #elif TEMP_SENSOR_REDUNDANT == 998 || TEMP_SENSOR_REDUNDANT == 999 - #error "Dummy sensors are not supported for TEMP_SENSOR_REDUNDANT." #endif #endif @@ -572,16 +577,13 @@ #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_3." #elif TEMP_SENSOR_3 == -1 #define TEMP_SENSOR_3_IS_AD595 1 +#elif TEMP_SENSOR_3 == 998 || TEMP_SENSOR_3 == 999 + #define TEMP_SENSOR_3_IS_DUMMY 1 #elif TEMP_SENSOR_3 > 0 #define TEMP_SENSOR_3_IS_THERMISTOR 1 #if TEMP_SENSOR_3 == 1000 #define TEMP_SENSOR_3_IS_CUSTOM 1 - #elif TEMP_SENSOR_3 == 998 || TEMP_SENSOR_3 == 999 - #define TEMP_SENSOR_3_IS_DUMMY 1 #endif -#else - #undef HEATER_3_MINTEMP - #undef HEATER_3_MAXTEMP #endif #if TEMP_SENSOR_4 == -4 @@ -592,16 +594,13 @@ #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_4." #elif TEMP_SENSOR_4 == -1 #define TEMP_SENSOR_4_IS_AD595 1 +#elif TEMP_SENSOR_4 == 998 || TEMP_SENSOR_4 == 999 + #define TEMP_SENSOR_4_IS_DUMMY 1 #elif TEMP_SENSOR_4 > 0 #define TEMP_SENSOR_4_IS_THERMISTOR 1 #if TEMP_SENSOR_4 == 1000 #define TEMP_SENSOR_4_IS_CUSTOM 1 - #elif TEMP_SENSOR_4 == 998 || TEMP_SENSOR_4 == 999 - #define TEMP_SENSOR_4_IS_DUMMY 1 #endif -#else - #undef HEATER_4_MINTEMP - #undef HEATER_4_MAXTEMP #endif #if TEMP_SENSOR_5 == -4 @@ -612,16 +611,13 @@ #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_5." #elif TEMP_SENSOR_5 == -1 #define TEMP_SENSOR_5_IS_AD595 1 +#elif TEMP_SENSOR_5 == 998 || TEMP_SENSOR_5 == 999 + #define TEMP_SENSOR_5_IS_DUMMY 1 #elif TEMP_SENSOR_5 > 0 #define TEMP_SENSOR_5_IS_THERMISTOR 1 #if TEMP_SENSOR_5 == 1000 #define TEMP_SENSOR_5_IS_CUSTOM 1 - #elif TEMP_SENSOR_5 == 998 || TEMP_SENSOR_5 == 999 - #define TEMP_SENSOR_5_IS_DUMMY 1 #endif -#else - #undef HEATER_5_MINTEMP - #undef HEATER_5_MAXTEMP #endif #if TEMP_SENSOR_6 == -4 @@ -632,16 +628,13 @@ #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_6." #elif TEMP_SENSOR_6 == -1 #define TEMP_SENSOR_6_IS_AD595 1 +#elif TEMP_SENSOR_6 == 998 || TEMP_SENSOR_6 == 999 + #define TEMP_SENSOR_6_IS_DUMMY 1 #elif TEMP_SENSOR_6 > 0 #define TEMP_SENSOR_6_IS_THERMISTOR 1 #if TEMP_SENSOR_6 == 1000 #define TEMP_SENSOR_6_IS_CUSTOM 1 - #elif TEMP_SENSOR_6 == 998 || TEMP_SENSOR_6 == 999 - #define TEMP_SENSOR_6_IS_DUMMY 1 #endif -#else - #undef HEATER_6_MINTEMP - #undef HEATER_6_MAXTEMP #endif #if TEMP_SENSOR_7 == -4 @@ -652,16 +645,13 @@ #error "MAX7775 Thermocouples (-2) not supported for TEMP_SENSOR_7." #elif TEMP_SENSOR_7 == -1 #define TEMP_SENSOR_7_IS_AD595 1 +#elif TEMP_SENSOR_7 == 998 || TEMP_SENSOR_7 == 999 + #define TEMP_SENSOR_7_IS_DUMMY 1 #elif TEMP_SENSOR_7 > 0 #define TEMP_SENSOR_7_IS_THERMISTOR 1 #if TEMP_SENSOR_7 == 1000 #define TEMP_SENSOR_7_IS_CUSTOM 1 - #elif TEMP_SENSOR_7 == 998 || TEMP_SENSOR_7 == 999 - #define TEMP_SENSOR_7_IS_DUMMY 1 #endif -#else - #undef HEATER_7_MINTEMP - #undef HEATER_7_MAXTEMP #endif #if TEMP_SENSOR_BED == -4 @@ -672,12 +662,12 @@ #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_BED." #elif TEMP_SENSOR_BED == -1 #define TEMP_SENSOR_BED_IS_AD595 1 +#elif TEMP_SENSOR_BED == 998 || TEMP_SENSOR_BED == 999 + #define TEMP_SENSOR_BED_IS_DUMMY 1 #elif TEMP_SENSOR_BED > 0 #define TEMP_SENSOR_BED_IS_THERMISTOR 1 #if TEMP_SENSOR_BED == 1000 #define TEMP_SENSOR_BED_IS_CUSTOM 1 - #elif TEMP_SENSOR_BED == 998 || TEMP_SENSOR_BED == 999 - #define TEMP_SENSOR_BED_IS_DUMMY 1 #endif #else #undef THERMAL_PROTECTION_BED @@ -694,12 +684,12 @@ #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_CHAMBER." #elif TEMP_SENSOR_CHAMBER == -1 #define TEMP_SENSOR_CHAMBER_IS_AD595 1 +#elif TEMP_SENSOR_CHAMBER == 998 || TEMP_SENSOR_CHAMBER == 999 + #define TEMP_SENSOR_CHAMBER_IS_DUMMY 1 #elif TEMP_SENSOR_CHAMBER > 0 #define TEMP_SENSOR_CHAMBER_IS_THERMISTOR 1 #if TEMP_SENSOR_CHAMBER == 1000 #define TEMP_SENSOR_CHAMBER_IS_CUSTOM 1 - #elif TEMP_SENSOR_CHAMBER == 998 || TEMP_SENSOR_CHAMBER == 999 - #define TEMP_SENSOR_CHAMBER_IS_DUMMY 1 #endif #else #undef THERMAL_PROTECTION_CHAMBER @@ -715,12 +705,12 @@ #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_COOLER." #elif TEMP_SENSOR_COOLER == -1 #define TEMP_SENSOR_COOLER_IS_AD595 1 +#elif TEMP_SENSOR_COOLER == 998 || TEMP_SENSOR_COOLER == 999 + #define TEMP_SENSOR_COOLER_IS_DUMMY 1 #elif TEMP_SENSOR_COOLER > 0 #define TEMP_SENSOR_COOLER_IS_THERMISTOR 1 #if TEMP_SENSOR_COOLER == 1000 #define TEMP_SENSOR_COOLER_IS_CUSTOM 1 - #elif TEMP_SENSOR_COOLER == 998 || TEMP_SENSOR_COOLER == 999 - #define TEMP_SENSOR_COOLER_IS_DUMMY 1 #endif #else #undef THERMAL_PROTECTION_COOLER @@ -736,12 +726,12 @@ #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_PROBE." #elif TEMP_SENSOR_PROBE == -1 #define TEMP_SENSOR_PROBE_IS_AD595 1 +#elif TEMP_SENSOR_PROBE == 998 || TEMP_SENSOR_PROBE == 999 + #define TEMP_SENSOR_PROBE_IS_DUMMY 1 #elif TEMP_SENSOR_PROBE > 0 #define TEMP_SENSOR_PROBE_IS_THERMISTOR 1 #if TEMP_SENSOR_PROBE == 1000 #define TEMP_SENSOR_PROBE_IS_CUSTOM 1 - #elif TEMP_SENSOR_PROBE == 998 || TEMP_SENSOR_PROBE == 999 - #define TEMP_SENSOR_PROBE_IS_DUMMY 1 #endif #endif @@ -753,12 +743,12 @@ #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_BOARD." #elif TEMP_SENSOR_BOARD == -1 #define TEMP_SENSOR_BOARD_IS_AD595 1 +#elif TEMP_SENSOR_BOARD == 998 || TEMP_SENSOR_BOARD == 999 + #define TEMP_SENSOR_BOARD_IS_DUMMY 1 #elif TEMP_SENSOR_BOARD > 0 #define TEMP_SENSOR_BOARD_IS_THERMISTOR 1 #if TEMP_SENSOR_BOARD == 1000 #define TEMP_SENSOR_BOARD_IS_CUSTOM 1 - #elif TEMP_SENSOR_BOARD == 998 || TEMP_SENSOR_BOARD == 999 - #define TEMP_SENSOR_BOARD_IS_DUMMY 1 #endif #endif diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index a7aec8e833..d431415559 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -2628,84 +2628,85 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #endif /** - * Test Sensor & Heater pin combos. * Pins and Sensor IDs must be set for each heater */ -#if HAS_EXTRUDERS && !ANY_PIN(TEMP_0, TEMP_0_CS) - #error "TEMP_0_PIN or TEMP_0_CS_PIN not defined for this board." -#elif HAS_EXTRUDERS && !HAS_HEATER_0 - #error "HEATER_0_PIN not defined for this board." -#elif TEMP_SENSOR_IS_MAX_TC(0) && !PIN_EXISTS(TEMP_0_CS) - #error "TEMP_SENSOR_0 MAX thermocouple requires TEMP_0_CS_PIN." -#elif HAS_HOTEND && !HAS_TEMP_HOTEND && !TEMP_SENSOR_0_IS_DUMMY - #error "TEMP_0_PIN (required for TEMP_SENSOR_0) not defined for this board." -#elif EITHER(HAS_MULTI_HOTEND, HEATERS_PARALLEL) && !HAS_HEATER_1 - #error "HEATER_1_PIN is not defined. TEMP_SENSOR_1 might not be set, or the board (not EEB / EEF?) doesn't define a pin." -#endif - -#if HAS_MULTI_HOTEND - #if TEMP_SENSOR_IS_MAX_TC(1) && !PIN_EXISTS(TEMP_1_CS) - #error "TEMP_SENSOR_1 MAX thermocouple requires TEMP_1_CS_PIN." - #elif TEMP_SENSOR_1 == 0 - #error "TEMP_SENSOR_1 is required with 2 or more HOTENDS." - #elif !ANY_PIN(TEMP_1, TEMP_1_CS) && !TEMP_SENSOR_1_IS_DUMMY - #error "TEMP_1_PIN or TEMP_1_CS_PIN not defined for this board." +#if HAS_HOTEND + #if !HAS_HEATER_0 + #error "HEATER_0_PIN not defined for this board." + #elif TEMP_SENSOR_IS_MAX_TC(0) && !PIN_EXISTS(TEMP_0_CS) + #error "TEMP_SENSOR_0 MAX thermocouple requires TEMP_0_CS_PIN." + #elif TEMP_SENSOR_0 == 0 + #error "TEMP_SENSOR_0 is required with 1 or more HOTENDS." + #elif !ANY_PIN(TEMP_0, TEMP_0_CS) && !TEMP_SENSOR_0_IS_DUMMY + #error "TEMP_0_PIN or TEMP_0_CS_PIN not defined for this board." #endif - #if HOTENDS > 2 - #if TEMP_SENSOR_2 == 0 - #error "TEMP_SENSOR_2 is required with 3 or more HOTENDS." - #elif !HAS_HEATER_2 - #error "HEATER_2_PIN not defined for this board." - #elif !ANY_PIN(TEMP_2, TEMP_2_CS) && !TEMP_SENSOR_2_IS_DUMMY - #error "TEMP_2_PIN or TEMP_2_CS_PIN not defined for this board." + #if EITHER(HAS_MULTI_HOTEND, HEATERS_PARALLEL) && !HAS_HEATER_1 + #error "HEATER_1_PIN is not defined. TEMP_SENSOR_1 might not be set, or the board (not EEB / EEF?) doesn't define a pin." + #endif + #if HAS_MULTI_HOTEND + #if TEMP_SENSOR_IS_MAX_TC(1) && !PIN_EXISTS(TEMP_1_CS) + #error "TEMP_SENSOR_1 MAX thermocouple requires TEMP_1_CS_PIN." + #elif TEMP_SENSOR_1 == 0 + #error "TEMP_SENSOR_1 is required with 2 or more HOTENDS." + #elif !ANY_PIN(TEMP_1, TEMP_1_CS) && !TEMP_SENSOR_1_IS_DUMMY + #error "TEMP_1_PIN or TEMP_1_CS_PIN not defined for this board." #endif - #if HOTENDS > 3 - #if TEMP_SENSOR_3 == 0 - #error "TEMP_SENSOR_3 is required with 4 or more HOTENDS." - #elif !HAS_HEATER_3 - #error "HEATER_3_PIN not defined for this board." - #elif !PIN_EXISTS(TEMP_3) && !TEMP_SENSOR_3_IS_DUMMY - #error "TEMP_3_PIN not defined for this board." + #if HOTENDS > 2 + #if TEMP_SENSOR_2 == 0 + #error "TEMP_SENSOR_2 is required with 3 or more HOTENDS." + #elif !HAS_HEATER_2 + #error "HEATER_2_PIN not defined for this board." + #elif !ANY_PIN(TEMP_2, TEMP_2_CS) && !TEMP_SENSOR_2_IS_DUMMY + #error "TEMP_2_PIN or TEMP_2_CS_PIN not defined for this board." #endif - #if HOTENDS > 4 - #if TEMP_SENSOR_4 == 0 - #error "TEMP_SENSOR_4 is required with 5 or more HOTENDS." - #elif !HAS_HEATER_4 - #error "HEATER_4_PIN not defined for this board." - #elif !PIN_EXISTS(TEMP_4) && !TEMP_SENSOR_4_IS_DUMMY - #error "TEMP_4_PIN not defined for this board." + #if HOTENDS > 3 + #if TEMP_SENSOR_3 == 0 + #error "TEMP_SENSOR_3 is required with 4 or more HOTENDS." + #elif !HAS_HEATER_3 + #error "HEATER_3_PIN not defined for this board." + #elif !PIN_EXISTS(TEMP_3) && !TEMP_SENSOR_3_IS_DUMMY + #error "TEMP_3_PIN not defined for this board." #endif - #if HOTENDS > 5 - #if TEMP_SENSOR_5 == 0 - #error "TEMP_SENSOR_5 is required with 6 HOTENDS." - #elif !HAS_HEATER_5 - #error "HEATER_5_PIN not defined for this board." - #elif !PIN_EXISTS(TEMP_5) && !TEMP_SENSOR_5_IS_DUMMY - #error "TEMP_5_PIN not defined for this board." + #if HOTENDS > 4 + #if TEMP_SENSOR_4 == 0 + #error "TEMP_SENSOR_4 is required with 5 or more HOTENDS." + #elif !HAS_HEATER_4 + #error "HEATER_4_PIN not defined for this board." + #elif !PIN_EXISTS(TEMP_4) && !TEMP_SENSOR_4_IS_DUMMY + #error "TEMP_4_PIN not defined for this board." #endif - #if HOTENDS > 6 - #if TEMP_SENSOR_6 == 0 - #error "TEMP_SENSOR_6 is required with 6 HOTENDS." - #elif !HAS_HEATER_6 - #error "HEATER_6_PIN not defined for this board." - #elif !PIN_EXISTS(TEMP_6) && !TEMP_SENSOR_6_IS_DUMMY - #error "TEMP_6_PIN not defined for this board." + #if HOTENDS > 5 + #if TEMP_SENSOR_5 == 0 + #error "TEMP_SENSOR_5 is required with 6 HOTENDS." + #elif !HAS_HEATER_5 + #error "HEATER_5_PIN not defined for this board." + #elif !PIN_EXISTS(TEMP_5) && !TEMP_SENSOR_5_IS_DUMMY + #error "TEMP_5_PIN not defined for this board." #endif - #if HOTENDS > 7 - #if TEMP_SENSOR_7 == 0 - #error "TEMP_SENSOR_7 is required with 7 HOTENDS." - #elif !HAS_HEATER_7 - #error "HEATER_7_PIN not defined for this board." - #elif !PIN_EXISTS(TEMP_7) && !TEMP_SENSOR_7_IS_DUMMY - #error "TEMP_7_PIN not defined for this board." + #if HOTENDS > 6 + #if TEMP_SENSOR_6 == 0 + #error "TEMP_SENSOR_6 is required with 6 HOTENDS." + #elif !HAS_HEATER_6 + #error "HEATER_6_PIN not defined for this board." + #elif !PIN_EXISTS(TEMP_6) && !TEMP_SENSOR_6_IS_DUMMY + #error "TEMP_6_PIN not defined for this board." #endif - #endif // HOTENDS > 7 - #endif // HOTENDS > 6 - #endif // HOTENDS > 5 - #endif // HOTENDS > 4 - #endif // HOTENDS > 3 - #endif // HOTENDS > 2 -#endif // HAS_MULTI_HOTEND + #if HOTENDS > 7 + #if TEMP_SENSOR_7 == 0 + #error "TEMP_SENSOR_7 is required with 7 HOTENDS." + #elif !HAS_HEATER_7 + #error "HEATER_7_PIN not defined for this board." + #elif !PIN_EXISTS(TEMP_7) && !TEMP_SENSOR_7_IS_DUMMY + #error "TEMP_7_PIN not defined for this board." + #endif + #endif // HOTENDS > 7 + #endif // HOTENDS > 6 + #endif // HOTENDS > 5 + #endif // HOTENDS > 4 + #endif // HOTENDS > 3 + #endif // HOTENDS > 2 + #endif // HAS_MULTI_HOTEND +#endif // HAS_HOTEND #if DO_TOOLCHANGE_FOR_PROBING && PROBING_TOOL >= EXTRUDERS #error "PROBING_TOOL must be a valid tool index." @@ -2836,8 +2837,8 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #error "E0_STEP_PIN or E0_DIR_PIN not defined for this board." #elif ( !(defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)) && (!PINS_EXIST(E0_STEP, E0_DIR) || !HAS_E0_ENABLE)) #error "E0_STEP_PIN, E0_DIR_PIN, or E0_ENABLE_PIN not defined for this board." - #elif EXTRUDERS && TEMP_SENSOR_0 == 0 - #error "TEMP_SENSOR_0 is required if there are any extruders." + #elif HOTENDS && TEMP_SENSOR_0 == 0 + #error "TEMP_SENSOR_0 is required if there are any hotends." #endif #endif diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index ce46d3d43d..5bf809c955 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -2785,7 +2785,7 @@ void Temperature::init() { temp_range[NR].raw_max -= TEMPDIR(NR) * (OVERSAMPLENR); \ }while(0) - #define _MINMAX_TEST(N,M) (HOTENDS > N && TEMP_SENSOR(N) > 0 && TEMP_SENSOR(N) != 998 && TEMP_SENSOR(N) != 999 && defined(HEATER_##N##_##M##TEMP)) + #define _MINMAX_TEST(N,M) (HOTENDS > N && TEMP_SENSOR_##NR##_IS_THERMISTOR && defined(HEATER_##N##_##M##TEMP)) #if _MINMAX_TEST(0, MIN) _TEMP_MIN_E(0); From 31173394b871a9a3e26ab58eae51c62c7d780ba2 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sat, 22 Apr 2023 12:06:22 +0000 Subject: [PATCH 209/225] [cron] Bump distribution date (2023-04-22) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index df1b974a81..a2a7fd05d2 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-04-21" +//#define STRING_DISTRIBUTION_DATE "2023-04-22" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 4e228d659f..edd46fd203 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-04-21" + #define STRING_DISTRIBUTION_DATE "2023-04-22" #endif /** From 5d8d38a911f96dadd56471f6dacaa6bda64b66fb Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Sun, 23 Apr 2023 08:59:51 +1200 Subject: [PATCH 210/225] =?UTF-8?q?=F0=9F=A9=B9=20Status=20/=20Host=20Prom?= =?UTF-8?q?pt=20followup=20(#25720)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to #25679 Co-authored-by: Scott Lahteine --- Marlin/src/lcd/marlinui.cpp | 7 +++++++ Marlin/src/lcd/marlinui.h | 10 +++++----- Marlin/src/lcd/menu/menu.cpp | 7 ------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Marlin/src/lcd/marlinui.cpp b/Marlin/src/lcd/marlinui.cpp index 22b3fa27d7..c1ec15dc19 100644 --- a/Marlin/src/lcd/marlinui.cpp +++ b/Marlin/src/lcd/marlinui.cpp @@ -1424,6 +1424,13 @@ void MarlinUI::init() { #endif // HAS_ENCODER_ACTION + #if HAS_SOUND + void MarlinUI::completion_feedback(const bool good/*=true*/) { + TERN_(HAS_TOUCH_SLEEP, wakeup_screen()); // Wake up on rotary encoder click... + if (good) OKAY_BUZZ(); else ERR_BUZZ(); + } + #endif + #endif // HAS_WIRED_LCD #if HAS_STATUS_MESSAGE diff --git a/Marlin/src/lcd/marlinui.h b/Marlin/src/lcd/marlinui.h index 32d747da43..de1e30fe4e 100644 --- a/Marlin/src/lcd/marlinui.h +++ b/Marlin/src/lcd/marlinui.h @@ -494,11 +494,6 @@ public: static void status_screen(); - #else - - static void quick_feedback(const bool=true) {} - static void completion_feedback(const bool=true) {} - #endif #if HAS_MARLINUI_U8GLIB @@ -529,6 +524,11 @@ public: #endif + #if !HAS_WIRED_LCD + static void quick_feedback(const bool=true) {} + static void completion_feedback(const bool=true) {} + #endif + #if ENABLED(SDSUPPORT) #if BOTH(SCROLL_LONG_FILENAMES, HAS_MARLINUI_MENU) #define MARLINUI_SCROLL_NAME 1 diff --git a/Marlin/src/lcd/menu/menu.cpp b/Marlin/src/lcd/menu/menu.cpp index 85b773bebc..5c4dc12d26 100644 --- a/Marlin/src/lcd/menu/menu.cpp +++ b/Marlin/src/lcd/menu/menu.cpp @@ -271,13 +271,6 @@ void scroll_screen(const uint8_t limit, const bool is_menu) { encoderTopLine = encoderLine; } -#if HAS_SOUND - void MarlinUI::completion_feedback(const bool good/*=true*/) { - TERN_(HAS_TOUCH_SLEEP, wakeup_screen()); // Wake up on rotary encoder click... - if (good) OKAY_BUZZ(); else ERR_BUZZ(); - } -#endif - #if HAS_LINE_TO_Z void line_to_z(const_float_t z) { From 95cfc98fe406bda0d0dc8d08d31e0f4416fb109a Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sun, 23 Apr 2023 00:22:56 +0000 Subject: [PATCH 211/225] [cron] Bump distribution date (2023-04-23) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index a2a7fd05d2..e18ee687ed 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-04-22" +//#define STRING_DISTRIBUTION_DATE "2023-04-23" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index edd46fd203..51f45936ca 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-04-22" + #define STRING_DISTRIBUTION_DATE "2023-04-23" #endif /** From ce85b98db471685404d6e4975dcff645b09d771b Mon Sep 17 00:00:00 2001 From: Jason Smith Date: Sat, 22 Apr 2023 20:27:01 -0700 Subject: [PATCH 212/225] =?UTF-8?q?=F0=9F=A9=B9=20Relocate=20Fan=20conditi?= =?UTF-8?q?onals,=20sanity-checks=20(#25731)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/src/inc/Conditionals_adv.h | 11 ------ Marlin/src/inc/Conditionals_post.h | 60 +++++++++++++++--------------- Marlin/src/inc/SanityCheck.h | 31 +++++++++++---- 3 files changed, 53 insertions(+), 49 deletions(-) diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h index c9c8fdf2d5..fd7ba59224 100644 --- a/Marlin/src/inc/Conditionals_adv.h +++ b/Marlin/src/inc/Conditionals_adv.h @@ -1233,17 +1233,6 @@ #define CANNOT_EMBED_CONFIGURATION defined(__AVR__) #endif -// Fan Kickstart -#if FAN_KICKSTART_TIME && !defined(FAN_KICKSTART_POWER) - #define FAN_KICKSTART_POWER 180 -#endif - -#if FAN_MIN_PWM == 0 && FAN_MAX_PWM == 255 - #define CALC_FAN_SPEED(f) (f ?: FAN_OFF_PWM) -#else - #define CALC_FAN_SPEED(f) (f ? map(f, 1, 255, FAN_MIN_PWM, FAN_MAX_PWM) : FAN_OFF_PWM) -#endif - // Input shaping #if EITHER(INPUT_SHAPING_X, INPUT_SHAPING_Y) #define HAS_ZV_SHAPING 1 diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index eaf2d03cea..59b5dab462 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -2719,37 +2719,8 @@ #define HAS_FAN 1 #endif -/** - * Part Cooling fan multipliexer - */ #if PIN_EXISTS(FANMUX0) - #define HAS_FANMUX 1 -#endif - -/** - * MIN/MAX fan PWM scaling - */ -#ifndef FAN_OFF_PWM - #define FAN_OFF_PWM 0 -#endif -#ifndef FAN_MIN_PWM - #if FAN_OFF_PWM > 0 - #define FAN_MIN_PWM (FAN_OFF_PWM + 1) - #else - #define FAN_MIN_PWM 0 - #endif -#endif -#ifndef FAN_MAX_PWM - #define FAN_MAX_PWM 255 -#endif -#if FAN_MIN_PWM < 0 || FAN_MIN_PWM > 255 - #error "FAN_MIN_PWM must be a value from 0 to 255." -#elif FAN_MAX_PWM < 0 || FAN_MAX_PWM > 255 - #error "FAN_MAX_PWM must be a value from 0 to 255." -#elif FAN_MIN_PWM > FAN_MAX_PWM - #error "FAN_MIN_PWM must be less than or equal to FAN_MAX_PWM." -#elif FAN_OFF_PWM > FAN_MIN_PWM - #error "FAN_OFF_PWM must be less than or equal to FAN_MIN_PWM." + #define HAS_FANMUX 1 // Part Cooling fan multipliexer #endif /** @@ -2773,6 +2744,35 @@ #endif #endif +/** + * MIN/MAX fan PWM scaling + */ +#if EITHER(HAS_FAN, USE_CONTROLLER_FAN) + #ifndef FAN_OFF_PWM + #define FAN_OFF_PWM 0 + #endif + #ifndef FAN_MIN_PWM + #if FAN_OFF_PWM > 0 + #define FAN_MIN_PWM (FAN_OFF_PWM + 1) + #else + #define FAN_MIN_PWM 0 + #endif + #endif + #ifndef FAN_MAX_PWM + #define FAN_MAX_PWM 255 + #endif + #if FAN_MIN_PWM == 0 && FAN_MAX_PWM == 255 + #define CALC_FAN_SPEED(f) (f ?: FAN_OFF_PWM) + #else + #define CALC_FAN_SPEED(f) (f ? map(f, 1, 255, FAN_MIN_PWM, FAN_MAX_PWM) : FAN_OFF_PWM) + #endif +#endif + +// Fan Kickstart +#if FAN_KICKSTART_TIME && !defined(FAN_KICKSTART_POWER) + #define FAN_KICKSTART_POWER 180 +#endif + // Servos #if PIN_EXISTS(SERVO0) && NUM_SERVOS > 0 #define HAS_SERVO_0 1 diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index d431415559..034e472e84 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -1560,11 +1560,11 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS /** * Part-Cooling Fan Multiplexer requirements */ -#if PIN_EXISTS(FANMUX1) - #if !HAS_FANMUX - #error "FANMUX0_PIN must be set before FANMUX1_PIN can be set." - #endif -#elif PIN_EXISTS(FANMUX2) +#if HAS_FANMUX && !HAS_FAN0 + #error "FAN0_PIN must be defined to use Fan Multiplexing." +#elif PIN_EXISTS(FANMUX1) && !PIN_EXISTS(FANMUX0) + #error "FANMUX0_PIN must be set before FANMUX1_PIN can be set." +#elif PIN_EXISTS(FANMUX2) && !PINS_EXIST(FANMUX0, FANMUX1) #error "FANMUX0_PIN and FANMUX1_PIN must be set before FANMUX2_PIN can be set." #endif @@ -1608,7 +1608,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #endif #if ENABLED(MPC_INCLUDE_FAN) - #if FAN_COUNT < 1 + #if !HAS_FAN #error "MPC_INCLUDE_FAN requires at least one fan." #endif #if FAN_COUNT < HOTENDS @@ -1627,8 +1627,8 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #error "To use BED_LIMIT_SWITCHING you must disable PIDTEMPBED." #endif -// Fan Kickstart -#if FAN_KICKSTART_TIME && defined(FAN_KICKSTART_POWER) && !WITHIN(FAN_KICKSTART_POWER, 64, 255) +// Fan Kickstart power +#if FAN_KICKSTART_TIME && !WITHIN(FAN_KICKSTART_POWER, 64, 255) #error "FAN_KICKSTART_POWER must be an integer from 64 to 255." #endif @@ -2454,6 +2454,21 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #endif #endif +/** + * Make sure FAN_*_PWM values are sensible + */ +#if EITHER(HAS_FAN, USE_CONTROLLER_FAN) + #if !WITHIN(FAN_MIN_PWM, 0, 255) + #error "FAN_MIN_PWM must be a value from 0 to 255." + #elif !WITHIN(FAN_MAX_PWM, 0, 255) + #error "FAN_MAX_PWM must be a value from 0 to 255." + #elif FAN_MIN_PWM > FAN_MAX_PWM + #error "FAN_MIN_PWM must be less than or equal to FAN_MAX_PWM." + #elif FAN_OFF_PWM > FAN_MIN_PWM + #error "FAN_OFF_PWM must be less than or equal to FAN_MIN_PWM." + #endif +#endif + #ifdef REDUNDANT_PART_COOLING_FAN #if FAN_COUNT < 2 #error "REDUNDANT_PART_COOLING_FAN requires a board with at least two PWM fans." From 5664c02d077e028f84a24efd96c2eebe97ce8763 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 22 Apr 2023 22:43:09 -0500 Subject: [PATCH 213/225] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Gen?= =?UTF-8?q?eralize=20SDSUPPORT=20as=20HAS=5FMEDIA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In preparation for single- and multi-volume refactoring. --- Marlin/Configuration_adv.h | 14 +++---- Marlin/src/HAL/AVR/HAL.cpp | 6 +-- Marlin/src/HAL/DUE/HAL.cpp | 2 +- Marlin/src/HAL/DUE/inc/SanityCheck.h | 2 +- Marlin/src/HAL/DUE/usb/conf_usb.h | 4 +- Marlin/src/HAL/DUE/usb/sd_mmc_spi_mem.cpp | 4 +- Marlin/src/HAL/DUE/usb/udi_cdc_desc.c | 4 +- Marlin/src/HAL/DUE/usb/udi_composite_desc.c | 4 +- Marlin/src/HAL/DUE/usb/udi_msc.c | 4 +- Marlin/src/HAL/DUE/usb/usb_task.c | 12 +++--- Marlin/src/HAL/ESP32/HAL_SPI.cpp | 2 +- Marlin/src/HAL/ESP32/u8g_esp32_spi.cpp | 2 +- Marlin/src/HAL/LINUX/spi_pins.h | 2 +- Marlin/src/HAL/LPC1768/inc/SanityCheck.h | 2 +- Marlin/src/HAL/LPC1768/spi_pins.h | 2 +- Marlin/src/HAL/NATIVE_SIM/spi_pins.h | 2 +- Marlin/src/HAL/SAMD21/HAL.cpp | 2 +- Marlin/src/HAL/SAMD51/HAL.cpp | 2 +- Marlin/src/HAL/STM32/HAL.cpp | 2 +- Marlin/src/HAL/STM32/inc/Conditionals_adv.h | 2 +- Marlin/src/HAL/STM32/inc/SanityCheck.h | 2 +- .../src/HAL/STM32F1/inc/Conditionals_post.h | 4 +- Marlin/src/HAL/STM32F1/inc/SanityCheck.h | 2 +- Marlin/src/MarlinCore.cpp | 14 +++---- Marlin/src/feature/binary_stream.h | 2 +- Marlin/src/feature/e_parser.cpp | 2 +- Marlin/src/feature/e_parser.h | 10 ++--- Marlin/src/feature/host_actions.cpp | 2 +- Marlin/src/feature/leds/printer_event_leds.h | 4 +- Marlin/src/feature/pause.cpp | 6 +-- Marlin/src/feature/power_monitor.h | 2 +- Marlin/src/gcode/control/M993_M994.cpp | 4 +- Marlin/src/gcode/feature/pause/M125.cpp | 2 +- Marlin/src/gcode/gcode.cpp | 10 ++--- Marlin/src/gcode/gcode.h | 12 +++--- Marlin/src/gcode/gcode_d.cpp | 4 +- Marlin/src/gcode/host/M115.cpp | 6 +-- Marlin/src/gcode/host/M360.cpp | 2 +- Marlin/src/gcode/queue.cpp | 12 +++--- Marlin/src/gcode/queue.h | 2 +- Marlin/src/gcode/sd/M1001.cpp | 4 +- Marlin/src/gcode/sd/M20.cpp | 4 +- Marlin/src/gcode/sd/M21_M22.cpp | 4 +- Marlin/src/gcode/sd/M23.cpp | 4 +- Marlin/src/gcode/sd/M24_M25.cpp | 8 ++-- Marlin/src/gcode/sd/M26.cpp | 4 +- Marlin/src/gcode/sd/M27.cpp | 4 +- Marlin/src/gcode/sd/M28_M29.cpp | 4 +- Marlin/src/gcode/sd/M30.cpp | 4 +- Marlin/src/gcode/sd/M524.cpp | 4 +- Marlin/src/gcode/sd/M928.cpp | 4 +- Marlin/src/inc/Conditionals_LCD.h | 6 ++- Marlin/src/inc/Conditionals_adv.h | 10 ++--- Marlin/src/inc/Conditionals_post.h | 4 +- Marlin/src/inc/SanityCheck.h | 18 ++++----- Marlin/src/lcd/HD44780/marlinui_HD44780.cpp | 14 +++---- Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp | 10 ++--- Marlin/src/lcd/dogm/marlinui_DOGM.cpp | 6 +-- Marlin/src/lcd/dogm/marlinui_DOGM.h | 6 +-- Marlin/src/lcd/dogm/status_screen_DOGM.cpp | 10 ++--- .../lcd/dogm/status_screen_lite_ST7920.cpp | 2 +- Marlin/src/lcd/e3v2/jyersui/dwin.cpp | 4 +- Marlin/src/lcd/e3v2/marlinui/ui_common.cpp | 6 +-- .../lcd/e3v2/marlinui/ui_status_480x272.cpp | 2 +- .../anycubic_i3mega/anycubic_i3mega_lcd.cpp | 40 +++++++++---------- .../src/lcd/extui/dgus/DGUSScreenHandler.cpp | 6 +-- .../lcd/extui/dgus/DGUSScreenHandlerBase.h | 4 +- Marlin/src/lcd/extui/dgus/dgus_extui.cpp | 6 +-- .../lcd/extui/dgus/fysetc/DGUSDisplayDef.cpp | 4 +- .../extui/dgus/fysetc/DGUSScreenHandler.cpp | 4 +- .../lcd/extui/dgus/hiprecy/DGUSDisplayDef.cpp | 4 +- .../extui/dgus/hiprecy/DGUSScreenHandler.cpp | 4 +- .../src/lcd/extui/dgus/mks/DGUSDisplayDef.cpp | 4 +- .../lcd/extui/dgus/mks/DGUSScreenHandler.cpp | 6 +-- .../lcd/extui/dgus/mks/DGUSScreenHandler.h | 2 +- .../lcd/extui/dgus/origin/DGUSDisplayDef.cpp | 4 +- .../extui/dgus/origin/DGUSScreenHandler.cpp | 4 +- .../lcd/extui/dgus_reloaded/DGUSRxHandler.cpp | 6 +-- .../lcd/extui/dgus_reloaded/DGUSRxHandler.h | 2 +- .../extui/dgus_reloaded/DGUSScreenHandler.cpp | 6 +-- .../extui/dgus_reloaded/DGUSScreenHandler.h | 4 +- .../extui/dgus_reloaded/DGUSSetupHandler.cpp | 2 +- .../extui/dgus_reloaded/DGUSSetupHandler.h | 2 +- .../lcd/extui/dgus_reloaded/DGUSTxHandler.cpp | 4 +- .../lcd/extui/dgus_reloaded/DGUSTxHandler.h | 2 +- .../definition/DGUS_ScreenAddrList.cpp | 4 +- .../definition/DGUS_ScreenSetup.cpp | 2 +- .../dgus_reloaded/definition/DGUS_VPList.cpp | 4 +- .../dgus_reloaded/dgus_reloaded_extui.cpp | 6 +-- .../archim2-flash/flash_storage.cpp | 4 +- .../archim2-flash/media_file_reader.cpp | 2 +- .../archim2-flash/media_file_reader.h | 4 +- .../bioprinter/printing_dialog_box.cpp | 2 +- .../ftdi_eve_touch_ui/ftdi_eve_extui.cpp | 4 +- .../generic/developer_menu.cpp | 4 +- .../generic/media_player_screen.cpp | 2 +- .../extui/ftdi_eve_touch_ui/generic/screens.h | 4 +- .../generic/status_screen.cpp | 2 +- .../extui/ftdi_eve_touch_ui/pin_mappings.h | 2 +- Marlin/src/lcd/extui/malyan/malyan.cpp | 8 ++-- Marlin/src/lcd/extui/malyan/malyan_extui.cpp | 2 +- Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp | 4 +- .../src/lcd/extui/mks_ui/draw_operation.cpp | 2 +- .../src/lcd/extui/mks_ui/draw_print_file.cpp | 28 ++++++------- Marlin/src/lcd/extui/mks_ui/draw_printing.cpp | 6 +-- Marlin/src/lcd/extui/mks_ui/draw_ui.cpp | 10 ++--- Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp | 4 +- Marlin/src/lcd/extui/mks_ui/mks_hardware.h | 2 +- Marlin/src/lcd/extui/mks_ui/pic_manager.cpp | 6 +-- .../lcd/extui/mks_ui/printer_operation.cpp | 2 +- .../extui/mks_ui/tft_lvgl_configuration.cpp | 6 +-- Marlin/src/lcd/extui/mks_ui/wifi_module.cpp | 22 +++++----- Marlin/src/lcd/extui/ui_api.cpp | 26 ++++++------ Marlin/src/lcd/marlinui.cpp | 26 ++++++------ Marlin/src/lcd/marlinui.h | 6 +-- Marlin/src/lcd/menu/menu.h | 4 +- Marlin/src/lcd/menu/menu_main.cpp | 12 +++--- Marlin/src/lcd/menu/menu_media.cpp | 4 +- Marlin/src/lcd/tft/ui_1024x600.cpp | 4 +- Marlin/src/lcd/tft/ui_320x240.cpp | 4 +- Marlin/src/lcd/tft/ui_480x320.cpp | 4 +- Marlin/src/lcd/tft/ui_common.cpp | 2 +- Marlin/src/module/endstops.cpp | 4 +- Marlin/src/module/temperature.cpp | 2 +- Marlin/src/pins/esp32/pins_MKS_TINYBEE.h | 2 +- Marlin/src/pins/esp32/pins_PANDA_common.h | 2 +- Marlin/src/pins/linux/pins_RAMPS_LINUX.h | 2 +- Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h | 4 +- Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h | 6 +-- .../src/pins/lpc1769/pins_COHESION3D_MINI.h | 2 +- Marlin/src/pins/mega/pins_CHEAPTRONICv2.h | 2 +- Marlin/src/pins/mega/pins_PICA.h | 2 +- Marlin/src/pins/mega/pins_WEEDO_62A.h | 2 +- Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h | 2 +- .../src/pins/ramps/pins_FORMBOT_TREX2PLUS.h | 2 +- Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h | 2 +- Marlin/src/pins/ramps/pins_RAMPS_OLD.h | 2 +- Marlin/src/pins/ramps/pins_RIGIDBOARD.h | 2 +- Marlin/src/pins/ramps/pins_RUMBA.h | 2 +- Marlin/src/pins/ramps/pins_TENLOG_D3_HERO.h | 2 +- Marlin/src/pins/ramps/pins_TT_OSCAR.h | 2 +- Marlin/src/pins/sam/pins_DUE3DOM.h | 2 +- Marlin/src/pins/sam/pins_DUE3DOM_MINI.h | 2 +- Marlin/src/pins/sam/pins_RADDS.h | 2 +- Marlin/src/pins/sam/pins_RAMPS_DUO.h | 2 +- Marlin/src/pins/sam/pins_RAMPS_FD_V1.h | 2 +- Marlin/src/pins/sam/pins_RAMPS_SMART.h | 2 +- Marlin/src/pins/sam/pins_RURAMPS4D_11.h | 2 +- Marlin/src/pins/sam/pins_RURAMPS4D_13.h | 2 +- Marlin/src/pins/sanguino/pins_ZMIB_V2.h | 2 +- Marlin/src/pins/stm32f4/pins_ANET_ET4.h | 2 +- Marlin/src/pins/stm32f4/pins_ARTILLERY_RUBY.h | 2 +- .../pins/stm32f4/pins_MKS_MONSTER8_common.h | 2 +- Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h | 2 +- Marlin/src/pins/stm32f4/pins_VAKE403D.h | 4 +- Marlin/src/sd/SdBaseFile.cpp | 4 +- Marlin/src/sd/SdFatUtil.cpp | 4 +- Marlin/src/sd/SdFile.cpp | 4 +- Marlin/src/sd/SdVolume.cpp | 4 +- Marlin/src/sd/cardreader.cpp | 6 +-- Marlin/src/sd/cardreader.h | 6 +-- .../PlatformIO/scripts/common-dependencies.h | 2 +- ini/features.ini | 2 +- ini/samd51.ini | 2 +- 164 files changed, 399 insertions(+), 397 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 993e0d8dde..22c97c3b8c 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -1601,13 +1601,13 @@ #define SET_REMAINING_TIME // Add 'R' parameter to set remaining time //#define SET_INTERACTION_TIME // Add 'C' parameter to set time until next filament change or other user interaction //#define M73_REPORT // Report M73 values to host - #if BOTH(M73_REPORT, SDSUPPORT) + #if BOTH(M73_REPORT, HAS_MEDIA) #define M73_REPORT_SD_ONLY // Report only when printing from SD #endif #endif // LCD Print Progress options. Multiple times may be displayed in turn. -#if HAS_DISPLAY && EITHER(SDSUPPORT, SET_PROGRESS_MANUALLY) +#if HAS_DISPLAY && EITHER(HAS_MEDIA, SET_PROGRESS_MANUALLY) #define SHOW_PROGRESS_PERCENT // Show print progress percentage (doesn't affect progress bar) #define SHOW_ELAPSED_TIME // Display elapsed printing time (prefix 'E') //#define SHOW_REMAINING_TIME // Display estimated time to completion (prefix 'R') @@ -1628,7 +1628,7 @@ #endif #endif -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA /** * SD Card SPI Speed * May be required to resolve "volume init" errors. @@ -1868,7 +1868,7 @@ #define DEFAULT_SHARED_VOLUME SV_USB_FLASH_DRIVE #endif -#endif // SDSUPPORT +#endif // HAS_MEDIA /** * By default an onboard SD card reader may be shared as a USB mass- @@ -2492,9 +2492,9 @@ // The number of linear moves that can be in the planner at once. // The value of BLOCK_BUFFER_SIZE must be a power of 2 (e.g., 8, 16, 32) -#if BOTH(SDSUPPORT, DIRECT_STEPPING) +#if BOTH(HAS_MEDIA, DIRECT_STEPPING) #define BLOCK_BUFFER_SIZE 8 -#elif ENABLED(SDSUPPORT) +#elif HAS_MEDIA #define BLOCK_BUFFER_SIZE 16 #else #define BLOCK_BUFFER_SIZE 16 @@ -2527,7 +2527,7 @@ //#define SERIAL_XON_XOFF #endif -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA // Enable this option to collect and display the maximum // RX queue usage after transferring a file to SD. //#define SERIAL_STATS_MAX_RX_QUEUED diff --git a/Marlin/src/HAL/AVR/HAL.cpp b/Marlin/src/HAL/AVR/HAL.cpp index 5382eb36a2..b3dcfbdf59 100644 --- a/Marlin/src/HAL/AVR/HAL.cpp +++ b/Marlin/src/HAL/AVR/HAL.cpp @@ -145,12 +145,12 @@ void MarlinHAL::reboot() { // Free Memory Accessor // ------------------------ -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA #include "../../sd/SdFatUtil.h" int freeMemory() { return SdFatUtil::FreeRam(); } -#else // !SDSUPPORT +#else // !HAS_MEDIA extern "C" { extern char __bss_end; @@ -167,6 +167,6 @@ void MarlinHAL::reboot() { } } -#endif // !SDSUPPORT +#endif // !HAS_MEDIA #endif // __AVR__ diff --git a/Marlin/src/HAL/DUE/HAL.cpp b/Marlin/src/HAL/DUE/HAL.cpp index 4353f16497..1b57bdb2fa 100644 --- a/Marlin/src/HAL/DUE/HAL.cpp +++ b/Marlin/src/HAL/DUE/HAL.cpp @@ -45,7 +45,7 @@ uint16_t MarlinHAL::adc_result; #endif void MarlinHAL::init() { - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA OUT_WRITE(SDSS, HIGH); // Try to set SDSS inactive before any other SPI users start up #endif usb_task_init(); // Initialize the USB stack diff --git a/Marlin/src/HAL/DUE/inc/SanityCheck.h b/Marlin/src/HAL/DUE/inc/SanityCheck.h index 6bbf04a0ac..a8f5de8298 100644 --- a/Marlin/src/HAL/DUE/inc/SanityCheck.h +++ b/Marlin/src/HAL/DUE/inc/SanityCheck.h @@ -70,7 +70,7 @@ */ #define _IS_HW_SPI(P) (defined(TMC_SPI_##P) && (TMC_SPI_##P == SD_MOSI_PIN || TMC_SPI_##P == SD_MISO_PIN || TMC_SPI_##P == SD_SCK_PIN)) -#if ENABLED(SDSUPPORT) && HAS_DRIVER(TMC2130) +#if HAS_MEDIA && HAS_DRIVER(TMC2130) #if ENABLED(TMC_USE_SW_SPI) #if DISABLED(DUE_SOFTWARE_SPI) && (_IS_HW_SPI(MOSI) || _IS_HW_SPI(MISO) || _IS_HW_SPI(SCK)) #error "DUE hardware SPI is required but is incompatible with TMC2130 software SPI. Either disable TMC_USE_SW_SPI or use separate pins for the two SPIs." diff --git a/Marlin/src/HAL/DUE/usb/conf_usb.h b/Marlin/src/HAL/DUE/usb/conf_usb.h index 4de9e347e2..f66194c6e6 100644 --- a/Marlin/src/HAL/DUE/usb/conf_usb.h +++ b/Marlin/src/HAL/DUE/usb/conf_usb.h @@ -101,7 +101,7 @@ #define USB_DEVICE_SPECIFIC_REQUEST() usb_task_other_requests() //@} -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA /** * USB Device low level configuration * When only one interface is used, these configurations are defined by the class module. @@ -185,7 +185,7 @@ //! Enable id string of interface to add an extra USB string #define UDI_CDC_IAD_STRING_ID 4 -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA /** * USB CDC low level configuration * In standalone these configurations are defined by the CDC module. diff --git a/Marlin/src/HAL/DUE/usb/sd_mmc_spi_mem.cpp b/Marlin/src/HAL/DUE/usb/sd_mmc_spi_mem.cpp index 34cc256b30..65a926ff36 100644 --- a/Marlin/src/HAL/DUE/usb/sd_mmc_spi_mem.cpp +++ b/Marlin/src/HAL/DUE/usb/sd_mmc_spi_mem.cpp @@ -6,7 +6,7 @@ #include "../../../inc/MarlinConfig.h" -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA #include "../../../sd/cardreader.h" extern "C" { @@ -138,5 +138,5 @@ Ctrl_status sd_mmc_spi_usb_write_10(uint32_t addr, uint16_t nb_sector) { #endif // ACCESS_USB == true -#endif // SDSUPPORT +#endif // HAS_MEDIA #endif // ARDUINO_ARCH_SAM diff --git a/Marlin/src/HAL/DUE/usb/udi_cdc_desc.c b/Marlin/src/HAL/DUE/usb/udi_cdc_desc.c index 97c334e2a8..4c79e8df13 100644 --- a/Marlin/src/HAL/DUE/usb/udi_cdc_desc.c +++ b/Marlin/src/HAL/DUE/usb/udi_cdc_desc.c @@ -51,7 +51,7 @@ #include "udc_desc.h" #include "udi_cdc.h" -#if DISABLED(SDSUPPORT) +#if !HAS_MEDIA /** * \defgroup udi_cdc_group_single_desc USB device descriptors for a single interface @@ -256,6 +256,6 @@ UDC_DESC_STORAGE udc_config_t udc_config = { //@} //@} -#endif // SDSUPPORT +#endif // HAS_MEDIA #endif // ARDUINO_ARCH_SAM diff --git a/Marlin/src/HAL/DUE/usb/udi_composite_desc.c b/Marlin/src/HAL/DUE/usb/udi_composite_desc.c index da74fbe60d..b10d043b9f 100644 --- a/Marlin/src/HAL/DUE/usb/udi_composite_desc.c +++ b/Marlin/src/HAL/DUE/usb/udi_composite_desc.c @@ -50,7 +50,7 @@ #include "udd.h" #include "udc_desc.h" -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA /** * \defgroup udi_group_desc Descriptors for a USB Device @@ -189,4 +189,4 @@ UDC_DESC_STORAGE udc_config_t udc_config = { #endif // ARDUINO_ARCH_SAM -#endif // SDSUPPORT +#endif // HAS_MEDIA diff --git a/Marlin/src/HAL/DUE/usb/udi_msc.c b/Marlin/src/HAL/DUE/usb/udi_msc.c index dd34048772..a75b5936b3 100644 --- a/Marlin/src/HAL/DUE/usb/udi_msc.c +++ b/Marlin/src/HAL/DUE/usb/udi_msc.c @@ -57,7 +57,7 @@ #include "ctrl_access.h" #include -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA #ifndef UDI_MSC_NOTIFY_TRANS_EXT # define UDI_MSC_NOTIFY_TRANS_EXT() @@ -1127,6 +1127,6 @@ bool udi_msc_trans_block(bool b_read, uint8_t * block, iram_size_t block_size, //@} -#endif // SDSUPPORT +#endif // HAS_MEDIA #endif // ARDUINO_ARCH_SAM diff --git a/Marlin/src/HAL/DUE/usb/usb_task.c b/Marlin/src/HAL/DUE/usb/usb_task.c index 86ab27217a..6f027f83a1 100644 --- a/Marlin/src/HAL/DUE/usb/usb_task.c +++ b/Marlin/src/HAL/DUE/usb/usb_task.c @@ -51,14 +51,14 @@ #include "conf_usb.h" #include "udc.h" -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA static volatile bool main_b_msc_enable = false; #endif static volatile bool main_b_cdc_enable = false; static volatile bool main_b_dtr_active = false; void usb_task_idle(void) { - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA // Attend SD card access from the USB MSD -- Prioritize access to improve speed int delay = 2; while (main_b_msc_enable && --delay > 0) { @@ -70,7 +70,7 @@ void usb_task_idle(void) { #endif } -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA bool usb_task_msc_enable(void) { return ((main_b_msc_enable = true)); } void usb_task_msc_disable(void) { main_b_msc_enable = false; } bool usb_task_msc_isenabled(void) { return main_b_msc_enable; } @@ -206,13 +206,13 @@ static USB_MicrosoftExtendedPropertiesDescriptor microsoft_extended_properties_d bool usb_task_extra_string(void) { static uint8_t udi_msft_magic[] = "MSFT100\xEE"; static uint8_t udi_cdc_name[] = "CDC interface"; - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA static uint8_t udi_msc_name[] = "MSC interface"; #endif struct extra_strings_desc_t { usb_str_desc_t header; - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA le16_t string[Max(Max(sizeof(udi_cdc_name) - 1, sizeof(udi_msc_name) - 1), sizeof(udi_msft_magic) - 1)]; #else le16_t string[Max(sizeof(udi_cdc_name) - 1, sizeof(udi_msft_magic) - 1)]; @@ -231,7 +231,7 @@ bool usb_task_extra_string(void) { str_lgt = sizeof(udi_cdc_name) - 1; str = udi_cdc_name; break; - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA case UDI_MSC_STRING_ID: str_lgt = sizeof(udi_msc_name) - 1; str = udi_msc_name; diff --git a/Marlin/src/HAL/ESP32/HAL_SPI.cpp b/Marlin/src/HAL/ESP32/HAL_SPI.cpp index 868ab1b671..6dc540864e 100644 --- a/Marlin/src/HAL/ESP32/HAL_SPI.cpp +++ b/Marlin/src/HAL/ESP32/HAL_SPI.cpp @@ -53,7 +53,7 @@ static SPISettings spiConfig; // ------------------------ void spiBegin() { - #if ENABLED(SDSUPPORT) && PIN_EXISTS(SD_SS) + #if HAS_MEDIA && PIN_EXISTS(SD_SS) OUT_WRITE(SD_SS_PIN, HIGH); #endif } diff --git a/Marlin/src/HAL/ESP32/u8g_esp32_spi.cpp b/Marlin/src/HAL/ESP32/u8g_esp32_spi.cpp index bd7ecdc9f2..955c751e48 100644 --- a/Marlin/src/HAL/ESP32/u8g_esp32_spi.cpp +++ b/Marlin/src/HAL/ESP32/u8g_esp32_spi.cpp @@ -32,7 +32,7 @@ #include "HAL.h" #include "SPI.h" -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA #include "../../sd/cardreader.h" #if ENABLED(ESP3D_WIFISUPPORT) #include "sd_ESP32.h" diff --git a/Marlin/src/HAL/LINUX/spi_pins.h b/Marlin/src/HAL/LINUX/spi_pins.h index 9ecbb04987..f09d1decb8 100644 --- a/Marlin/src/HAL/LINUX/spi_pins.h +++ b/Marlin/src/HAL/LINUX/spi_pins.h @@ -24,7 +24,7 @@ #include "../../core/macros.h" #include "../../inc/MarlinConfigPre.h" -#if BOTH(HAS_MARLINUI_U8GLIB, SDSUPPORT) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_EN == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN) +#if BOTH(HAS_MARLINUI_U8GLIB, HAS_MEDIA) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_EN == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN) #define SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently // needed due to the speed and mode required for communicating with each device being different. // This requirement can be removed if the SPI access to these devices is updated to use diff --git a/Marlin/src/HAL/LPC1768/inc/SanityCheck.h b/Marlin/src/HAL/LPC1768/inc/SanityCheck.h index 9f78f2a70d..f49bc34c92 100644 --- a/Marlin/src/HAL/LPC1768/inc/SanityCheck.h +++ b/Marlin/src/HAL/LPC1768/inc/SanityCheck.h @@ -201,7 +201,7 @@ static_assert(DISABLED(BAUD_RATE_GCODE), "BAUD_RATE_GCODE is not yet supported o #if USEDI2CDEV_M == 0 // P0_27 [D57] (AUX-1) .......... P0_28 [D58] (AUX-1) #define PIN_IS_SDA0(P) (P##_PIN == P0_27) #define IS_SCL0(P) (P == P0_28) - #if ENABLED(SDSUPPORT) && PIN_IS_SDA0(SD_DETECT) + #if HAS_MEDIA && PIN_IS_SDA0(SD_DETECT) #error "SDA0 overlaps with SD_DETECT_PIN!" #elif PIN_IS_SDA0(E0_AUTO_FAN) #error "SDA0 overlaps with E0_AUTO_FAN_PIN!" diff --git a/Marlin/src/HAL/LPC1768/spi_pins.h b/Marlin/src/HAL/LPC1768/spi_pins.h index e716d00fb0..33a5b369ad 100644 --- a/Marlin/src/HAL/LPC1768/spi_pins.h +++ b/Marlin/src/HAL/LPC1768/spi_pins.h @@ -23,7 +23,7 @@ #include "../../core/macros.h" -#if BOTH(SDSUPPORT, HAS_MARLINUI_U8GLIB) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_EN == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN) +#if BOTH(HAS_MEDIA, HAS_MARLINUI_U8GLIB) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_EN == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN) #define SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently // needed due to the speed and mode required for communicating with each device being different. // This requirement can be removed if the SPI access to these devices is updated to use diff --git a/Marlin/src/HAL/NATIVE_SIM/spi_pins.h b/Marlin/src/HAL/NATIVE_SIM/spi_pins.h index eb20a21c56..02fb359238 100644 --- a/Marlin/src/HAL/NATIVE_SIM/spi_pins.h +++ b/Marlin/src/HAL/NATIVE_SIM/spi_pins.h @@ -24,7 +24,7 @@ #include "../../core/macros.h" #include "../../inc/MarlinConfigPre.h" -#if BOTH(HAS_MARLINUI_U8GLIB, SDSUPPORT) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_EN == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN) +#if BOTH(HAS_MARLINUI_U8GLIB, HAS_MEDIA) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_EN == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN) #define SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently // needed due to the speed and mode required for communicating with each device being different. // This requirement can be removed if the SPI access to these devices is updated to use diff --git a/Marlin/src/HAL/SAMD21/HAL.cpp b/Marlin/src/HAL/SAMD21/HAL.cpp index 14c439eeb9..1bc0406ab3 100644 --- a/Marlin/src/HAL/SAMD21/HAL.cpp +++ b/Marlin/src/HAL/SAMD21/HAL.cpp @@ -105,7 +105,7 @@ void MarlinHAL::dma_init() {} // HAL initialization task void MarlinHAL::init() { TERN_(DMA_IS_REQUIRED, dma_init()); - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA #if HAS_SD_DETECT && SD_CONNECTION_IS(ONBOARD) SET_INPUT_PULLUP(SD_DETECT_PIN); #endif diff --git a/Marlin/src/HAL/SAMD51/HAL.cpp b/Marlin/src/HAL/SAMD51/HAL.cpp index 8c102b643d..bc7a9b6d91 100644 --- a/Marlin/src/HAL/SAMD51/HAL.cpp +++ b/Marlin/src/HAL/SAMD51/HAL.cpp @@ -602,7 +602,7 @@ void MarlinHAL::dma_init() { // HAL initialization task void MarlinHAL::init() { TERN_(DMA_IS_REQUIRED, dma_init()); - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA #if HAS_SD_DETECT && SD_CONNECTION_IS(ONBOARD) SET_INPUT_PULLUP(SD_DETECT_PIN); #endif diff --git a/Marlin/src/HAL/STM32/HAL.cpp b/Marlin/src/HAL/STM32/HAL.cpp index aff52f597f..d8a12aad7e 100644 --- a/Marlin/src/HAL/STM32/HAL.cpp +++ b/Marlin/src/HAL/STM32/HAL.cpp @@ -70,7 +70,7 @@ void MarlinHAL::init() { constexpr int cpuFreq = F_CPU; UNUSED(cpuFreq); - #if ENABLED(SDSUPPORT) && DISABLED(SDIO_SUPPORT) && (defined(SDSS) && SDSS != -1) + #if HAS_MEDIA && DISABLED(SDIO_SUPPORT) && (defined(SDSS) && SDSS != -1) OUT_WRITE(SDSS, HIGH); // Try to set SDSS inactive before any other SPI users start up #endif diff --git a/Marlin/src/HAL/STM32/inc/Conditionals_adv.h b/Marlin/src/HAL/STM32/inc/Conditionals_adv.h index 451c94f25d..ee8c49e4e0 100644 --- a/Marlin/src/HAL/STM32/inc/Conditionals_adv.h +++ b/Marlin/src/HAL/STM32/inc/Conditionals_adv.h @@ -21,7 +21,7 @@ */ #pragma once -#if BOTH(SDSUPPORT, USBD_USE_CDC_MSC) && DISABLED(NO_SD_HOST_DRIVE) +#if BOTH(HAS_MEDIA, USBD_USE_CDC_MSC) && DISABLED(NO_SD_HOST_DRIVE) #define HAS_SD_HOST_DRIVE 1 #endif diff --git a/Marlin/src/HAL/STM32/inc/SanityCheck.h b/Marlin/src/HAL/STM32/inc/SanityCheck.h index eaad8db4d3..9b0c232bdf 100644 --- a/Marlin/src/HAL/STM32/inc/SanityCheck.h +++ b/Marlin/src/HAL/STM32/inc/SanityCheck.h @@ -29,7 +29,7 @@ //#endif -#if ENABLED(SDCARD_EEPROM_EMULATION) && DISABLED(SDSUPPORT) +#if ENABLED(SDCARD_EEPROM_EMULATION) && !HAS_MEDIA #undef SDCARD_EEPROM_EMULATION // Avoid additional error noise #if USE_FALLBACK_EEPROM #warning "EEPROM type not specified. Fallback is SDCARD_EEPROM_EMULATION." diff --git a/Marlin/src/HAL/STM32F1/inc/Conditionals_post.h b/Marlin/src/HAL/STM32F1/inc/Conditionals_post.h index 656fbe1ce2..228e869688 100644 --- a/Marlin/src/HAL/STM32F1/inc/Conditionals_post.h +++ b/Marlin/src/HAL/STM32F1/inc/Conditionals_post.h @@ -28,7 +28,7 @@ #define USE_SHARED_EEPROM 1 #endif -// Allow SDSUPPORT to be disabled -#if DISABLED(SDSUPPORT) +// Allow for no media drives +#if !HAS_MEDIA #undef SDIO_SUPPORT #endif diff --git a/Marlin/src/HAL/STM32F1/inc/SanityCheck.h b/Marlin/src/HAL/STM32F1/inc/SanityCheck.h index fe8f6e0ec2..1da42dcc8f 100644 --- a/Marlin/src/HAL/STM32F1/inc/SanityCheck.h +++ b/Marlin/src/HAL/STM32F1/inc/SanityCheck.h @@ -25,7 +25,7 @@ * Test STM32F1-specific configuration values for errors at compile-time. */ -#if ENABLED(SDCARD_EEPROM_EMULATION) && DISABLED(SDSUPPORT) +#if ENABLED(SDCARD_EEPROM_EMULATION) && !HAS_MEDIA #undef SDCARD_EEPROM_EMULATION // Avoid additional error noise #if USE_FALLBACK_EEPROM #warning "EEPROM type not specified. Fallback is SDCARD_EEPROM_EMULATION." diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index 8c0f7a29e8..e478a35445 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -160,7 +160,7 @@ #include "feature/spindle_laser.h" #endif -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA CardReader card; #endif @@ -363,7 +363,7 @@ void startOrResumeJob() { print_job_timer.start(); } -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA inline void abortSDPrinting() { IF_DISABLED(NO_SD_AUTOSTART, card.autofile_cancel()); @@ -397,7 +397,7 @@ void startOrResumeJob() { } } -#endif // SDSUPPORT +#endif // HAS_MEDIA /** * Minimal management of Marlin's core activities: @@ -834,7 +834,7 @@ void idle(const bool no_stepper_sleep/*=false*/) { #endif // Handle SD Card insert / remove - TERN_(SDSUPPORT, card.manage_media()); + TERN_(HAS_MEDIA, card.manage_media()); // Handle USB Flash Drive insert / remove TERN_(USB_FLASH_DRIVE_SUPPORT, card.diskIODriver()->idle()); @@ -1340,7 +1340,7 @@ void setup() { #endif #endif - #if BOTH(SDSUPPORT, SDCARD_EEPROM_EMULATION) + #if BOTH(HAS_MEDIA, SDCARD_EEPROM_EMULATION) SETUP_RUN(card.mount()); // Mount media with settings before first_load #endif @@ -1624,7 +1624,7 @@ void setup() { #endif #if HAS_TFT_LVGL_UI - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA if (!card.isMounted()) SETUP_RUN(card.mount()); // Mount SD to load graphics and fonts #endif SETUP_RUN(tft_lvgl_init()); @@ -1688,7 +1688,7 @@ void loop() { do { idle(); - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA if (card.flag.abort_sd_printing) abortSDPrinting(); if (marlin_state == MF_SD_COMPLETE) finishSDPrinting(); #endif diff --git a/Marlin/src/feature/binary_stream.h b/Marlin/src/feature/binary_stream.h index 417e39c745..a9cd12b85e 100644 --- a/Marlin/src/feature/binary_stream.h +++ b/Marlin/src/feature/binary_stream.h @@ -281,7 +281,7 @@ public: uint8_t data = 0; millis_t transfer_window = millis() + RX_TIMESLICE; - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA PORT_REDIRECT(SERIAL_PORTMASK(card.transfer_port_index)); #endif diff --git a/Marlin/src/feature/e_parser.cpp b/Marlin/src/feature/e_parser.cpp index cfe0956aa7..b50a12d1af 100644 --- a/Marlin/src/feature/e_parser.cpp +++ b/Marlin/src/feature/e_parser.cpp @@ -33,7 +33,7 @@ // Static data members bool EmergencyParser::killed_by_M112, // = false EmergencyParser::quickstop_by_M410, - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA EmergencyParser::sd_abort_by_M524, #endif EmergencyParser::enabled; diff --git a/Marlin/src/feature/e_parser.h b/Marlin/src/feature/e_parser.h index 3a15a7ffa0..df4456d8d3 100644 --- a/Marlin/src/feature/e_parser.h +++ b/Marlin/src/feature/e_parser.h @@ -58,7 +58,7 @@ public: EP_M10, EP_M108, EP_M11, EP_M112, EP_M4, EP_M41, EP_M410, - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA EP_M5, EP_M52, EP_M524, #endif #if ENABLED(HOST_PROMPT_SUPPORT) @@ -79,7 +79,7 @@ public: static bool killed_by_M112; static bool quickstop_by_M410; - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA static bool sd_abort_by_M524; #endif @@ -152,7 +152,7 @@ public: case ' ': break; case '1': state = EP_M1; break; case '4': state = EP_M4; break; - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA case '5': state = EP_M5; break; #endif #if ENABLED(HOST_PROMPT_SUPPORT) @@ -175,7 +175,7 @@ public: case EP_M4: state = (c == '1') ? EP_M41 : EP_IGNORE; break; case EP_M41: state = (c == '0') ? EP_M410 : EP_IGNORE; break; - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA case EP_M5: state = (c == '2') ? EP_M52 : EP_IGNORE; break; case EP_M52: state = (c == '4') ? EP_M524 : EP_IGNORE; break; #endif @@ -215,7 +215,7 @@ public: case EP_M108: wait_for_user = wait_for_heatup = false; break; case EP_M112: killed_by_M112 = true; break; case EP_M410: quickstop_by_M410 = true; break; - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA case EP_M524: sd_abort_by_M524 = true; break; #endif #if ENABLED(HOST_PROMPT_SUPPORT) diff --git a/Marlin/src/feature/host_actions.cpp b/Marlin/src/feature/host_actions.cpp index 773b6ebc61..a1c1bad5bb 100644 --- a/Marlin/src/feature/host_actions.cpp +++ b/Marlin/src/feature/host_actions.cpp @@ -209,7 +209,7 @@ void HostUI::action(FSTR_P const fstr, const bool eol) { TERN_(HAS_RESUME_CONTINUE, wait_for_user = false); break; case PROMPT_PAUSE_RESUME: - #if BOTH(ADVANCED_PAUSE_FEATURE, SDSUPPORT) + #if BOTH(ADVANCED_PAUSE_FEATURE, HAS_MEDIA) extern const char M24_STR[]; queue.inject_P(M24_STR); #endif diff --git a/Marlin/src/feature/leds/printer_event_leds.h b/Marlin/src/feature/leds/printer_event_leds.h index 2a4342e8f5..3a037eba96 100644 --- a/Marlin/src/feature/leds/printer_event_leds.h +++ b/Marlin/src/feature/leds/printer_event_leds.h @@ -59,7 +59,7 @@ public: static void onPidTuningDone(LEDColor c) { leds.set_color(c); } #endif - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA static void onPrintCompleted() { leds.set_green(); @@ -80,7 +80,7 @@ public: #endif } - #endif // SDSUPPORT + #endif // HAS_MEDIA }; extern PrinterEventLEDs printerEventLEDs; diff --git a/Marlin/src/feature/pause.cpp b/Marlin/src/feature/pause.cpp index 35d1fd79f9..7b814e57f7 100644 --- a/Marlin/src/feature/pause.cpp +++ b/Marlin/src/feature/pause.cpp @@ -91,7 +91,7 @@ static xyze_pos_t resume_position; fil_change_settings_t fc_settings[EXTRUDERS]; -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA #include "../sd/cardreader.h" #endif @@ -420,7 +420,7 @@ bool pause_print(const_float_t retract, const xyz_pos_t &park_point, const bool ++did_pause_print; // Pause the print job and timer - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA const bool was_sd_printing = IS_SD_PRINTING(); if (was_sd_printing) { card.pauseSDPrint(); @@ -701,7 +701,7 @@ void resume_print(const_float_t slow_load_length/*=0*/, const_float_t fast_load_ // Resume the print job timer if it was running if (print_job_timer.isPaused()) print_job_timer.start(); - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA if (did_pause_print) { --did_pause_print; card.startOrResumeFilePrinting(); diff --git a/Marlin/src/feature/power_monitor.h b/Marlin/src/feature/power_monitor.h index fa06909053..89e92fb773 100644 --- a/Marlin/src/feature/power_monitor.h +++ b/Marlin/src/feature/power_monitor.h @@ -119,7 +119,7 @@ public: volts.reset(); #endif - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA display_item_ms = 0; display_item = 0; #endif diff --git a/Marlin/src/gcode/control/M993_M994.cpp b/Marlin/src/gcode/control/M993_M994.cpp index 598a73fab7..f6fe0f34ad 100644 --- a/Marlin/src/gcode/control/M993_M994.cpp +++ b/Marlin/src/gcode/control/M993_M994.cpp @@ -22,7 +22,7 @@ #include "../../inc/MarlinConfig.h" -#if ALL(SPI_FLASH, SDSUPPORT, MARLIN_DEV_MODE) +#if ALL(SPI_FLASH, HAS_MEDIA, MARLIN_DEV_MODE) #include "../gcode.h" #include "../../sd/cardreader.h" @@ -85,4 +85,4 @@ void GcodeSuite::M994() { card.closefile(); } -#endif // SPI_FLASH && SDSUPPORT && MARLIN_DEV_MODE +#endif // SPI_FLASH && HAS_MEDIA && MARLIN_DEV_MODE diff --git a/Marlin/src/gcode/feature/pause/M125.cpp b/Marlin/src/gcode/feature/pause/M125.cpp index 9b18eda4fb..d6e6cb9315 100644 --- a/Marlin/src/gcode/feature/pause/M125.cpp +++ b/Marlin/src/gcode/feature/pause/M125.cpp @@ -88,7 +88,7 @@ void GcodeSuite::M125() { park_point += hotend_offset[active_extruder]; #endif - const bool sd_printing = TERN0(SDSUPPORT, IS_SD_PRINTING()); + const bool sd_printing = TERN0(HAS_MEDIA, IS_SD_PRINTING()); ui.pause_show_message(PAUSE_MESSAGE_PARKING, PAUSE_MODE_PAUSE_PRINT); diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index 9d1014e8bf..06a9600c43 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -519,7 +519,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { case 17: M17(); break; // M17: Enable all stepper motors - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA case 20: M20(); break; // M20: List SD card case 21: M21(); break; // M21: Init SD card case 22: M22(); break; // M22: Release SD card @@ -545,7 +545,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { #endif case 928: M928(); break; // M928: Start SD write - #endif // SDSUPPORT + #endif // HAS_MEDIA case 31: M31(); break; // M31: Report time since the start of SD print or last M109 @@ -919,7 +919,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { #endif #endif - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA case 524: M524(); break; // M524: Abort the current SD print job #endif @@ -1061,7 +1061,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { case 422: M422(); break; // M422: Set Z Stepper automatic alignment position using probe #endif - #if ALL(SPI_FLASH, SDSUPPORT, MARLIN_DEV_MODE) + #if ALL(SPI_FLASH, HAS_MEDIA, MARLIN_DEV_MODE) case 993: M993(); break; // M993: Backup SPI Flash to SD case 994: M994(); break; // M994: Load a Backup from SD to SPI Flash #endif @@ -1081,7 +1081,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { case 1000: M1000(); break; // M1000: [INTERNAL] Resume from power-loss #endif - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA case 1001: M1001(); break; // M1001: [INTERNAL] Handle SD completion #endif diff --git a/Marlin/src/gcode/gcode.h b/Marlin/src/gcode/gcode.h index d49c544623..6a66fa911a 100644 --- a/Marlin/src/gcode/gcode.h +++ b/Marlin/src/gcode/gcode.h @@ -642,7 +642,7 @@ private: static void M18_M84(); - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA static void M20(); static void M21(); static void M22(); @@ -658,7 +658,7 @@ private: static void M31(); - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA #if HAS_MEDIA_SUBCALLS static void M32(); #endif @@ -1062,7 +1062,7 @@ private: #endif #endif - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA static void M524(); #endif @@ -1195,7 +1195,7 @@ private: static void M910(); #endif - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA static void M928(); #endif @@ -1207,7 +1207,7 @@ private: static void M995(); #endif - #if BOTH(SPI_FLASH, SDSUPPORT) + #if BOTH(SPI_FLASH, HAS_MEDIA) static void M993(); static void M994(); #endif @@ -1229,7 +1229,7 @@ private: static void M423_report(const bool forReplay=true); #endif - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA static void M1001(); #endif diff --git a/Marlin/src/gcode/gcode_d.cpp b/Marlin/src/gcode/gcode_d.cpp index be431eed0d..28edf9dcdb 100644 --- a/Marlin/src/gcode/gcode_d.cpp +++ b/Marlin/src/gcode/gcode_d.cpp @@ -199,7 +199,7 @@ void GcodeSuite::D(const int16_t dcode) { SERIAL_ECHOLNPGM("FAILURE: Watchdog did not trigger board reset."); } break; - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA case 101: { // D101 Test SD Write card.openFileWrite("test.gco"); @@ -250,7 +250,7 @@ void GcodeSuite::D(const int16_t dcode) { card.closefile(); } break; - #endif // SDSUPPORT + #endif // HAS_MEDIA #if ENABLED(POSTMORTEM_DEBUGGING) diff --git a/Marlin/src/gcode/host/M115.cpp b/Marlin/src/gcode/host/M115.cpp index d28d53eedd..236895e107 100644 --- a/Marlin/src/gcode/host/M115.cpp +++ b/Marlin/src/gcode/host/M115.cpp @@ -168,10 +168,10 @@ void GcodeSuite::M115() { cap_line(F("PROMPT_SUPPORT"), ENABLED(HOST_PROMPT_SUPPORT)); // SDCARD (M20, M23, M24, etc.) - cap_line(F("SDCARD"), ENABLED(SDSUPPORT)); + cap_line(F("SDCARD"), ENABLED(HAS_MEDIA)); // MULTI_VOLUME (M21 S/M21 U) - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA cap_line(F("MULTI_VOLUME"), ENABLED(MULTI_VOLUME)); #endif @@ -179,7 +179,7 @@ void GcodeSuite::M115() { cap_line(F("REPEAT"), ENABLED(GCODE_REPEAT_MARKERS)); // SD_WRITE (M928, M28, M29) - cap_line(F("SD_WRITE"), ENABLED(SDSUPPORT) && DISABLED(SDCARD_READONLY)); + cap_line(F("SD_WRITE"), ENABLED(HAS_MEDIA) && DISABLED(SDCARD_READONLY)); // AUTOREPORT_SD_STATUS (M27 extension) cap_line(F("AUTOREPORT_SD_STATUS"), ENABLED(AUTO_REPORT_SD_STATUS)); diff --git a/Marlin/src/gcode/host/M360.cpp b/Marlin/src/gcode/host/M360.cpp index d8e166dad8..9649e99e17 100644 --- a/Marlin/src/gcode/host/M360.cpp +++ b/Marlin/src/gcode/host/M360.cpp @@ -70,7 +70,7 @@ void GcodeSuite::M360() { config_line(F("InputBuffer"), MAX_CMD_SIZE); config_line(F("PrintlineCache"), BUFSIZE); config_line(F("MixingExtruder"), ENABLED(MIXING_EXTRUDER)); - config_line(F("SDCard"), ENABLED(SDSUPPORT)); + config_line(F("SDCard"), ENABLED(HAS_MEDIA)); config_line(F("Fan"), ENABLED(HAS_FAN)); config_line(F("LCD"), ENABLED(HAS_DISPLAY)); config_line(F("SoftwarePowerSwitch"), 1); diff --git a/Marlin/src/gcode/queue.cpp b/Marlin/src/gcode/queue.cpp index edf0ddfdbf..af8e877436 100644 --- a/Marlin/src/gcode/queue.cpp +++ b/Marlin/src/gcode/queue.cpp @@ -512,7 +512,7 @@ void GCodeQueue::get_serial_commands() { serial.last_N = gcode_N; } - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA // Pronterface "M29" and "M29 " has no line number else if (card.flag.saving && !is_M29(command)) { gcode_line_error(F(STR_ERR_NO_CHECKSUM), p); @@ -562,7 +562,7 @@ void GCodeQueue::get_serial_commands() { } // queue has space, serial has data } -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA /** * Get lines from the SD Card until the command buffer is full @@ -615,7 +615,7 @@ void GCodeQueue::get_serial_commands() { } } -#endif // SDSUPPORT +#endif // HAS_MEDIA /** * Add to the circular command queue the next command from: @@ -628,7 +628,7 @@ void GCodeQueue::get_available_commands() { get_serial_commands(); - TERN_(SDSUPPORT, get_sdcard_commands()); + TERN_(HAS_MEDIA, get_sdcard_commands()); } /** @@ -667,7 +667,7 @@ void GCodeQueue::advance() { } #endif - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA if (card.flag.saving) { char * const cmd = ring_buffer.peek_next_command_string(); @@ -703,7 +703,7 @@ void GCodeQueue::advance() { gcode.process_next_command(); - #endif // SDSUPPORT + #endif // HAS_MEDIA // The queue may be reset by a command handler or by code invoked by idle() within a handler ring_buffer.advance_pos(ring_buffer.index_r, -1); diff --git a/Marlin/src/gcode/queue.h b/Marlin/src/gcode/queue.h index 19fb359e15..2cb72f2e15 100644 --- a/Marlin/src/gcode/queue.h +++ b/Marlin/src/gcode/queue.h @@ -256,7 +256,7 @@ private: static void get_serial_commands(); - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA static void get_sdcard_commands(); #endif diff --git a/Marlin/src/gcode/sd/M1001.cpp b/Marlin/src/gcode/sd/M1001.cpp index 1d1d1a4b7f..3c8f38a144 100644 --- a/Marlin/src/gcode/sd/M1001.cpp +++ b/Marlin/src/gcode/sd/M1001.cpp @@ -22,7 +22,7 @@ #include "../../inc/MarlinConfig.h" -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA #include "../gcode.h" #include "../../module/planner.h" @@ -114,4 +114,4 @@ void GcodeSuite::M1001() { TERN_(SD_REPRINT_LAST_SELECTED_FILE, ui.reselect_last_file()); } -#endif // SDSUPPORT +#endif // HAS_MEDIA diff --git a/Marlin/src/gcode/sd/M20.cpp b/Marlin/src/gcode/sd/M20.cpp index 2a7e0d08df..9dca2bb3e0 100644 --- a/Marlin/src/gcode/sd/M20.cpp +++ b/Marlin/src/gcode/sd/M20.cpp @@ -22,7 +22,7 @@ #include "../../inc/MarlinConfig.h" -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA #include "../gcode.h" #include "../../sd/cardreader.h" @@ -51,4 +51,4 @@ void GcodeSuite::M20() { SERIAL_ECHO_MSG(STR_NO_MEDIA); } -#endif // SDSUPPORT +#endif // HAS_MEDIA diff --git a/Marlin/src/gcode/sd/M21_M22.cpp b/Marlin/src/gcode/sd/M21_M22.cpp index aec0de27ca..3347168151 100644 --- a/Marlin/src/gcode/sd/M21_M22.cpp +++ b/Marlin/src/gcode/sd/M21_M22.cpp @@ -22,7 +22,7 @@ #include "../../inc/MarlinConfig.h" -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA #include "../gcode.h" #include "../../sd/cardreader.h" @@ -52,4 +52,4 @@ void GcodeSuite::M22() { if (!IS_SD_PRINTING()) card.release(); } -#endif // SDSUPPORT +#endif // HAS_MEDIA diff --git a/Marlin/src/gcode/sd/M23.cpp b/Marlin/src/gcode/sd/M23.cpp index 8722e9b6de..7727d4958f 100644 --- a/Marlin/src/gcode/sd/M23.cpp +++ b/Marlin/src/gcode/sd/M23.cpp @@ -22,7 +22,7 @@ #include "../../inc/MarlinConfig.h" -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA #include "../gcode.h" #include "../../sd/cardreader.h" @@ -41,4 +41,4 @@ void GcodeSuite::M23() { TERN_(SET_PROGRESS_PERCENT, ui.set_progress(0)); } -#endif // SDSUPPORT +#endif // HAS_MEDIA diff --git a/Marlin/src/gcode/sd/M24_M25.cpp b/Marlin/src/gcode/sd/M24_M25.cpp index 847af65b12..45c596ae99 100644 --- a/Marlin/src/gcode/sd/M24_M25.cpp +++ b/Marlin/src/gcode/sd/M24_M25.cpp @@ -22,7 +22,7 @@ #include "../../inc/MarlinConfig.h" -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA #include "../gcode.h" #include "../../sd/cardreader.h" @@ -101,9 +101,7 @@ void GcodeSuite::M25() { #else // Set initial pause flag to prevent more commands from landing in the queue while we try to pause - #if ENABLED(SDSUPPORT) - if (IS_SD_PRINTING()) card.pauseSDPrint(); - #endif + if (IS_SD_PRINTING()) card.pauseSDPrint(); #if ENABLED(POWER_LOSS_RECOVERY) && DISABLED(DGUS_LCD_UI_MKS) if (recovery.enabled) recovery.save(true); @@ -125,4 +123,4 @@ void GcodeSuite::M25() { #endif } -#endif // SDSUPPORT +#endif // HAS_MEDIA diff --git a/Marlin/src/gcode/sd/M26.cpp b/Marlin/src/gcode/sd/M26.cpp index e0557bfa14..9ddc436e8c 100644 --- a/Marlin/src/gcode/sd/M26.cpp +++ b/Marlin/src/gcode/sd/M26.cpp @@ -22,7 +22,7 @@ #include "../../inc/MarlinConfig.h" -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA #include "../gcode.h" #include "../../sd/cardreader.h" @@ -35,4 +35,4 @@ void GcodeSuite::M26() { card.setIndex(parser.value_long()); } -#endif // SDSUPPORT +#endif // HAS_MEDIA diff --git a/Marlin/src/gcode/sd/M27.cpp b/Marlin/src/gcode/sd/M27.cpp index 88238190e2..590efbf79d 100644 --- a/Marlin/src/gcode/sd/M27.cpp +++ b/Marlin/src/gcode/sd/M27.cpp @@ -22,7 +22,7 @@ #include "../../inc/MarlinConfig.h" -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA #include "../gcode.h" #include "../../sd/cardreader.h" @@ -49,4 +49,4 @@ void GcodeSuite::M27() { card.report_status(); } -#endif // SDSUPPORT +#endif // HAS_MEDIA diff --git a/Marlin/src/gcode/sd/M28_M29.cpp b/Marlin/src/gcode/sd/M28_M29.cpp index 373938d99b..ac1ba08788 100644 --- a/Marlin/src/gcode/sd/M28_M29.cpp +++ b/Marlin/src/gcode/sd/M28_M29.cpp @@ -22,7 +22,7 @@ #include "../../inc/MarlinConfig.h" -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA #include "../gcode.h" #include "../../sd/cardreader.h" @@ -69,4 +69,4 @@ void GcodeSuite::M29() { card.flag.saving = false; } -#endif // SDSUPPORT +#endif // HAS_MEDIA diff --git a/Marlin/src/gcode/sd/M30.cpp b/Marlin/src/gcode/sd/M30.cpp index b95a895f1e..da8e51bb8b 100644 --- a/Marlin/src/gcode/sd/M30.cpp +++ b/Marlin/src/gcode/sd/M30.cpp @@ -22,7 +22,7 @@ #include "../../inc/MarlinConfig.h" -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA #include "../gcode.h" #include "../../sd/cardreader.h" @@ -37,4 +37,4 @@ void GcodeSuite::M30() { } } -#endif // SDSUPPORT +#endif // HAS_MEDIA diff --git a/Marlin/src/gcode/sd/M524.cpp b/Marlin/src/gcode/sd/M524.cpp index f2b9274223..a3c03e90ba 100644 --- a/Marlin/src/gcode/sd/M524.cpp +++ b/Marlin/src/gcode/sd/M524.cpp @@ -22,7 +22,7 @@ #include "../../inc/MarlinConfig.h" -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA #include "../gcode.h" #include "../../sd/cardreader.h" @@ -51,4 +51,4 @@ void GcodeSuite::M524() { } -#endif // SDSUPPORT +#endif // HAS_MEDIA diff --git a/Marlin/src/gcode/sd/M928.cpp b/Marlin/src/gcode/sd/M928.cpp index 03a7877a90..0d86b330c7 100644 --- a/Marlin/src/gcode/sd/M928.cpp +++ b/Marlin/src/gcode/sd/M928.cpp @@ -22,7 +22,7 @@ #include "../../inc/MarlinConfig.h" -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA #include "../gcode.h" #include "../../sd/cardreader.h" @@ -36,4 +36,4 @@ void GcodeSuite::M928() { } -#endif // SDSUPPORT +#endif // HAS_MEDIA diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 32a2eda7c7..b11ede3dc5 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -26,6 +26,10 @@ * Conditionals that need to be set before Configuration_adv.h or pins.h */ +#if ENABLED(SDSUPPORT) + #define HAS_MEDIA 1 +#endif + // MKS_LCD12864A/B is a variant of MKS_MINI_12864 #if EITHER(MKS_LCD12864A, MKS_LCD12864B) #define MKS_MINI_12864 @@ -217,7 +221,7 @@ #define IS_TFTGLCD_PANEL 1 #define IS_ULTIPANEL 1 // Note that IS_ULTIPANEL leads to HAS_WIRED_LCD - #if ENABLED(SDSUPPORT) && DISABLED(LCD_PROGRESS_BAR) + #if HAS_MEDIA && DISABLED(LCD_PROGRESS_BAR) #define LCD_PROGRESS_BAR #endif #if ENABLED(TFTGLCD_PANEL_I2C) diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h index fd7ba59224..929a7c78cf 100644 --- a/Marlin/src/inc/Conditionals_adv.h +++ b/Marlin/src/inc/Conditionals_adv.h @@ -794,7 +794,7 @@ #undef MENU_ADDAUTOSTART #endif -#if EITHER(SDSUPPORT, SET_PROGRESS_MANUALLY) +#if EITHER(HAS_MEDIA, SET_PROGRESS_MANUALLY) #define HAS_PRINT_PROGRESS 1 #endif @@ -812,7 +812,7 @@ #define HAS_STATUS_MESSAGE_TIMEOUT 1 #endif -#if ENABLED(SDSUPPORT) && SD_PROCEDURE_DEPTH +#if HAS_MEDIA && SD_PROCEDURE_DEPTH #define HAS_MEDIA_SUBCALLS 1 #endif @@ -850,7 +850,7 @@ #else #undef LED_POWEROFF_TIMEOUT #endif -#if ALL(HAS_RESUME_CONTINUE, PRINTER_EVENT_LEDS, SDSUPPORT) +#if ALL(HAS_RESUME_CONTINUE, PRINTER_EVENT_LEDS, HAS_MEDIA) #define HAS_LEDS_OFF_FLAG 1 #endif #if DISPLAY_SLEEP_MINUTES || TOUCH_IDLE_SLEEP_MINS @@ -1148,7 +1148,7 @@ // SD Card connection methods // Defined here so pins and sanity checks can use them // -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA #define _SDCARD_LCD 1 #define _SDCARD_ONBOARD 2 #define _SDCARD_CUSTOM_CABLE 3 @@ -1228,7 +1228,7 @@ #endif // AVR are (usually) too limited in resources to store the configuration into the binary -#if ENABLED(CONFIGURATION_EMBEDDING) && !defined(FORCE_CONFIG_EMBED) && (defined(__AVR__) || DISABLED(SDSUPPORT) || EITHER(SDCARD_READONLY, DISABLE_M503)) +#if ENABLED(CONFIGURATION_EMBEDDING) && !defined(FORCE_CONFIG_EMBED) && (defined(__AVR__) || !HAS_MEDIA || EITHER(SDCARD_READONLY, DISABLE_M503)) #undef CONFIGURATION_EMBEDDING #define CANNOT_EMBED_CONFIGURATION defined(__AVR__) #endif diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 59b5dab462..bf4810cd8a 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -510,7 +510,7 @@ * Override the SD_DETECT_STATE set in Configuration_adv.h * and enable sharing of onboard SD host drives (all platforms but AGCM4) */ -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA #if HAS_SD_HOST_DRIVE && SD_CONNECTION_IS(ONBOARD) // @@ -3351,7 +3351,7 @@ #endif // Fallback SPI Speed for SD -#if ENABLED(SDSUPPORT) && !defined(SD_SPI_SPEED) +#if HAS_MEDIA && !defined(SD_SPI_SPEED) #define SD_SPI_SPEED SPI_FULL_SPEED #endif diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 034e472e84..40e76b6149 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -978,7 +978,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS * Progress Bar */ #if ENABLED(LCD_PROGRESS_BAR) - #if NONE(SDSUPPORT, SET_PROGRESS_MANUALLY) + #if NONE(HAS_MEDIA, SET_PROGRESS_MANUALLY) #error "LCD_PROGRESS_BAR requires SDSUPPORT or SET_PROGRESS_MANUALLY." #elif NONE(HAS_MARLINUI_HD44780, IS_TFTGLCD_PANEL) #error "LCD_PROGRESS_BAR only applies to HD44780 character LCD and TFTGLCD_PANEL_(SPI|I2C)." @@ -1028,7 +1028,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS /** * SD Card Settings */ -#if ALL(SDSUPPORT, HAS_SD_DETECT, SD_CONNECTION_TYPICAL, ELB_FULL_GRAPHIC_CONTROLLER, HAS_MARLINUI_MENU) && SD_DETECT_STATE == LOW +#if ALL(HAS_MEDIA, HAS_SD_DETECT, SD_CONNECTION_TYPICAL, ELB_FULL_GRAPHIC_CONTROLLER, HAS_MARLINUI_MENU) && SD_DETECT_STATE == LOW #error "SD_DETECT_STATE must be set HIGH for SD on the ELB_FULL_GRAPHIC_CONTROLLER." #endif #undef SD_CONNECTION_TYPICAL @@ -1176,8 +1176,8 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #error "ADVANCED_PAUSE_FEATURE requires FILAMENT_UNLOAD_PURGE_FEEDRATE." #elif ENABLED(EXTRUDER_RUNOUT_PREVENT) #error "EXTRUDER_RUNOUT_PREVENT is incompatible with ADVANCED_PAUSE_FEATURE." - #elif ENABLED(PARK_HEAD_ON_PAUSE) && NONE(SDSUPPORT, IS_NEWPANEL, EMERGENCY_PARSER) - #error "PARK_HEAD_ON_PAUSE requires SDSUPPORT, EMERGENCY_PARSER, or an LCD controller." + #elif ENABLED(PARK_HEAD_ON_PAUSE) && NONE(HAS_MEDIA, IS_NEWPANEL, EMERGENCY_PARSER) + #error "PARK_HEAD_ON_PAUSE requires HAS_MEDIA, EMERGENCY_PARSER, or an LCD controller." #elif ENABLED(HOME_BEFORE_FILAMENT_CHANGE) && DISABLED(PAUSE_PARK_NO_STEPPER_TIMEOUT) #error "HOME_BEFORE_FILAMENT_CHANGE requires PAUSE_PARK_NO_STEPPER_TIMEOUT." #elif ENABLED(PREVENT_LENGTHY_EXTRUDE) && FILAMENT_CHANGE_UNLOAD_LENGTH > EXTRUDE_MAXLENGTH @@ -3266,7 +3266,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #if ENABLED(TFT_LVGL_UI) #if DISABLED(TFT_RES_480x320) #error "TFT_LVGL_UI requires TFT_RES_480x320." - #elif DISABLED(SDSUPPORT) + #elif !HAS_MEDIA #error "TFT_LVGL_UI requires SDSUPPORT." #endif #endif @@ -3282,7 +3282,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #if ENABLED(ANYCUBIC_LCD_CHIRON) #ifndef BEEPER_PIN #error "ANYCUBIC_LCD_CHIRON requires BEEPER_PIN" - #elif DISABLED(SDSUPPORT) + #elif !HAS_MEDIA #error "ANYCUBIC_LCD_CHIRON requires SDSUPPORT" #elif TEMP_SENSOR_BED == 0 #error "ANYCUBIC_LCD_CHIRON requires heatbed (TEMP_SENSOR_BED)" @@ -3305,7 +3305,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS * Ender-3 V2 controller has some limitations */ #if ENABLED(DWIN_CREALITY_LCD) - #if DISABLED(SDSUPPORT) + #if !HAS_MEDIA #error "DWIN_CREALITY_LCD requires SDSUPPORT to be enabled." #elif EITHER(PID_EDIT_MENU, PID_AUTOTUNE_MENU) #error "DWIN_CREALITY_LCD does not support PID_EDIT_MENU or PID_AUTOTUNE_MENU." @@ -3317,7 +3317,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #error "DWIN_CREALITY_LCD does not support LCD_BED_LEVELING with PROBE_MANUALLY." #endif #elif ENABLED(DWIN_LCD_PROUI) - #if DISABLED(SDSUPPORT) + #if !HAS_MEDIA #error "DWIN_LCD_PROUI requires SDSUPPORT to be enabled." #elif EITHER(PID_EDIT_MENU, PID_AUTOTUNE_MENU) #error "DWIN_LCD_PROUI does not support PID_EDIT_MENU or PID_AUTOTUNE_MENU." @@ -4339,7 +4339,7 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive."); * Check to make sure MONITOR_DRIVER_STATUS isn't enabled * on boards where TMC drivers share the SPI bus with SD. */ -#if HAS_TMC_SPI && ALL(MONITOR_DRIVER_STATUS, SDSUPPORT, USES_SHARED_SPI) +#if HAS_TMC_SPI && ALL(MONITOR_DRIVER_STATUS, HAS_MEDIA, USES_SHARED_SPI) #error "MONITOR_DRIVER_STATUS and SDSUPPORT cannot be used together on boards with shared SPI." #endif diff --git a/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp b/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp index 8a5e5c5ad9..e33814589c 100644 --- a/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp +++ b/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp @@ -41,7 +41,7 @@ #include "../../module/planner.h" #include "../../module/motion.h" -#if DISABLED(LCD_PROGRESS_BAR) && BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) +#if DISABLED(LCD_PROGRESS_BAR) && BOTH(FILAMENT_LCD_DISPLAY, HAS_MEDIA) #include "../../feature/filwidth.h" #include "../../gcode/parser.h" #endif @@ -289,7 +289,7 @@ void MarlinUI::set_custom_characters(const HD44780CharSet screen_charset/*=CHARS #endif // LCD_PROGRESS_BAR - #if BOTH(SDSUPPORT, HAS_MARLINUI_MENU) + #if BOTH(HAS_MEDIA, HAS_MARLINUI_MENU) // CHARSET_MENU const static PROGMEM byte refresh[8] = { @@ -313,7 +313,7 @@ void MarlinUI::set_custom_characters(const HD44780CharSet screen_charset/*=CHARS B00000 }; - #endif // SDSUPPORT + #endif // HAS_MEDIA #if ENABLED(SHOW_BOOTSCREEN) // Set boot screen corner characters @@ -339,7 +339,7 @@ void MarlinUI::set_custom_characters(const HD44780CharSet screen_charset/*=CHARS #endif { createChar_P(LCD_STR_UPLEVEL[0], uplevel); - #if BOTH(SDSUPPORT, HAS_MARLINUI_MENU) + #if BOTH(HAS_MEDIA, HAS_MARLINUI_MENU) // SD Card sub-menu special characters createChar_P(LCD_STR_REFRESH[0], refresh); createChar_P(LCD_STR_FOLDER[0], folder); @@ -697,7 +697,7 @@ void MarlinUI::draw_status_message(const bool blink) { if (progress > 2) return draw_progress_bar(progress); } - #elif BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) + #elif BOTH(FILAMENT_LCD_DISPLAY, HAS_MEDIA) // Alternate Status message and Filament display if (ELAPSED(millis(), next_filament_display)) { @@ -709,7 +709,7 @@ void MarlinUI::draw_status_message(const bool blink) { return; } - #endif // FILAMENT_LCD_DISPLAY && SDSUPPORT + #endif // FILAMENT_LCD_DISPLAY && HAS_MEDIA #if ENABLED(STATUS_MESSAGE_SCROLLING) static bool last_blink = false; @@ -1218,7 +1218,7 @@ void MarlinUI::draw_status_screen() { } } - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA void MenuItem_sdbase::draw(const bool sel, const uint8_t row, FSTR_P const, CardReader &theCard, const bool isDir) { lcd_put_lchar(0, row, sel ? LCD_STR_ARROW_RIGHT[0] : ' '); diff --git a/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp b/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp index fc568c55db..969b3fb036 100644 --- a/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp +++ b/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp @@ -52,7 +52,7 @@ #include "../../module/planner.h" #include "../../module/motion.h" -#if DISABLED(LCD_PROGRESS_BAR) && BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) +#if DISABLED(LCD_PROGRESS_BAR) && BOTH(FILAMENT_LCD_DISPLAY, HAS_MEDIA) #include "../../feature/filwidth.h" #include "../../gcode/parser.h" #endif @@ -672,7 +672,7 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const void MarlinUI::draw_status_message(const bool blink) { if (!PanelDetected) return; lcd_moveto(0, 3); - #if BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) + #if BOTH(FILAMENT_LCD_DISPLAY, HAS_MEDIA) // Alternate Status message and Filament display if (ELAPSED(millis(), next_filament_display)) { @@ -689,7 +689,7 @@ void MarlinUI::draw_status_message(const bool blink) { return; } - #endif // FILAMENT_LCD_DISPLAY && SDSUPPORT + #endif // FILAMENT_LCD_DISPLAY && HAS_MEDIA // Get the UTF8 character count of the string uint8_t slen = utf8_strlen(status_message); @@ -1061,7 +1061,7 @@ void MarlinUI::draw_status_screen() { lcd.print_line(); } - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA void MenuItem_sdbase::draw(const bool sel, const uint8_t row, FSTR_P const, CardReader &theCard, const bool isDir) { if (!PanelDetected) return; @@ -1074,7 +1074,7 @@ void MarlinUI::draw_status_screen() { lcd.print_line(); } - #endif // SDSUPPORT + #endif // HAS_MEDIA #if ENABLED(LCD_HAS_STATUS_INDICATORS) diff --git a/Marlin/src/lcd/dogm/marlinui_DOGM.cpp b/Marlin/src/lcd/dogm/marlinui_DOGM.cpp index ce9a31668a..76fa7842a3 100644 --- a/Marlin/src/lcd/dogm/marlinui_DOGM.cpp +++ b/Marlin/src/lcd/dogm/marlinui_DOGM.cpp @@ -56,7 +56,7 @@ #include "../../module/printcounter.h" #include "../../MarlinCore.h" -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA #include "../../libs/duration_t.h" #endif @@ -545,7 +545,7 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop if (yes) draw_boxed_string(LCD_WIDTH - (utf8_strlen(yes) * (USE_WIDE_GLYPH ? 2 : 1) + 1), LCD_HEIGHT - 1, yes, yesno); } - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA void MenuItem_sdbase::draw(const bool sel, const uint8_t row, FSTR_P const, CardReader &theCard, const bool isDir) { if (mark_as_selected(row, sel)) { @@ -557,7 +557,7 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop } } - #endif // SDSUPPORT + #endif // HAS_MEDIA #if ENABLED(AUTO_BED_LEVELING_UBL) diff --git a/Marlin/src/lcd/dogm/marlinui_DOGM.h b/Marlin/src/lcd/dogm/marlinui_DOGM.h index 2b9eb64a57..afdda5ac5b 100644 --- a/Marlin/src/lcd/dogm/marlinui_DOGM.h +++ b/Marlin/src/lcd/dogm/marlinui_DOGM.h @@ -36,10 +36,10 @@ // RepRapWorld Graphical LCD - #if DISABLED(SDSUPPORT) && (LCD_PINS_D4 == SD_SCK_PIN) && (LCD_PINS_EN == SD_MOSI_PIN) + #if !HAS_MEDIA && (LCD_PINS_D4 == SD_SCK_PIN) && (LCD_PINS_EN == SD_MOSI_PIN) #define U8G_CLASS U8GLIB_ST7920_128X64_4X_HAL #define U8G_PARAM LCD_PINS_RS - #elif ENABLED(SDSUPPORT) && __SAMD21__ + #elif HAS_MEDIA && __SAMD21__ #define U8G_CLASS U8GLIB_ST7920_128X64_4X #define U8G_PARAM LCD_PINS_RS #else @@ -52,7 +52,7 @@ // RepRap Discount Full Graphics Smart Controller // and other variant LCDs using ST7920 - #if DISABLED(SDSUPPORT) && (LCD_PINS_D4 == SD_SCK_PIN) && (LCD_PINS_EN == SD_MOSI_PIN) + #if !HAS_MEDIA && (LCD_PINS_D4 == SD_SCK_PIN) && (LCD_PINS_EN == SD_MOSI_PIN) #define U8G_CLASS U8GLIB_ST7920_128X64_4X_HAL // 2 stripes, HW SPI (Shared with SD card. Non-standard LCD adapter on AVR.) #define U8G_PARAM LCD_PINS_RS #else diff --git a/Marlin/src/lcd/dogm/status_screen_DOGM.cpp b/Marlin/src/lcd/dogm/status_screen_DOGM.cpp index 22e71251ff..cb3515a694 100644 --- a/Marlin/src/lcd/dogm/status_screen_DOGM.cpp +++ b/Marlin/src/lcd/dogm/status_screen_DOGM.cpp @@ -67,7 +67,7 @@ #include "../../feature/power_monitor.h" #endif -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA #include "../../sd/cardreader.h" #endif @@ -742,7 +742,7 @@ void MarlinUI::draw_status_screen() { #endif } - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA // // SD Card Symbol // @@ -756,7 +756,7 @@ void MarlinUI::draw_status_screen() { // Corner pixel u8g.drawPixel(50, 43); // 43 (or 42) } - #endif // SDSUPPORT + #endif // HAS_MEDIA #if HAS_PRINT_PROGRESS // Progress bar frame @@ -871,7 +871,7 @@ void MarlinUI::draw_status_screen() { // // Filament sensor display if SD is disabled // - #if ENABLED(FILAMENT_LCD_DISPLAY) && DISABLED(SDSUPPORT) + #if ENABLED(FILAMENT_LCD_DISPLAY) && !HAS_MEDIA lcd_put_u8str(56, EXTRAS_2_BASELINE, wstring); lcd_put_u8str(102, EXTRAS_2_BASELINE, mstring); lcd_put_u8str(F("%")); @@ -887,7 +887,7 @@ void MarlinUI::draw_status_screen() { if (PAGE_CONTAINS(STATUS_BASELINE - INFO_FONT_ASCENT, STATUS_BASELINE + INFO_FONT_DESCENT)) { lcd_moveto(0, STATUS_BASELINE); - #if BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) + #if BOTH(FILAMENT_LCD_DISPLAY, HAS_MEDIA) // Alternate Status message and Filament display if (ELAPSED(millis(), next_filament_display)) { lcd_put_u8str(F(LCD_STR_FILAM_DIA)); diff --git a/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp b/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp index 96f2eeae96..a4ace1ce8a 100644 --- a/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp +++ b/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp @@ -81,7 +81,7 @@ #include "../../module/temperature.h" #include "../../libs/numtostr.h" -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA #include "../../sd/cardreader.h" #endif diff --git a/Marlin/src/lcd/e3v2/jyersui/dwin.cpp b/Marlin/src/lcd/e3v2/jyersui/dwin.cpp index a24adec8e9..e685fe16fd 100644 --- a/Marlin/src/lcd/e3v2/jyersui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/jyersui/dwin.cpp @@ -4389,7 +4389,7 @@ void CrealityDWINClass::Print_Screen_Control() { #endif TERN_(HAS_FAN, thermalManager.fan_speed[0] = pausefan); planner.synchronize(); - TERN_(SDSUPPORT, queue.inject(F("M24"))); + TERN_(HAS_MEDIA, queue.inject(F("M24"))); #endif } else { @@ -4427,7 +4427,7 @@ void CrealityDWINClass::Popup_Control() { #endif #if ENABLED(PARK_HEAD_ON_PAUSE) Popup_Handler(Home, true); - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA if (IS_SD_PRINTING()) card.pauseSDPrint(); #endif planner.synchronize(); diff --git a/Marlin/src/lcd/e3v2/marlinui/ui_common.cpp b/Marlin/src/lcd/e3v2/marlinui/ui_common.cpp index c267d32048..4b34d65100 100644 --- a/Marlin/src/lcd/e3v2/marlinui/ui_common.cpp +++ b/Marlin/src/lcd/e3v2/marlinui/ui_common.cpp @@ -39,7 +39,7 @@ #include "../../../module/temperature.h" #include "../../../module/printcounter.h" -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA #include "../../../libs/duration_t.h" #endif @@ -467,7 +467,7 @@ void MarlinUI::draw_status_message(const bool blink) { if (yes) draw_boxed_string(true, yes, yesno); } - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA void MenuItem_sdbase::draw(const bool sel, const uint8_t row, FSTR_P const, CardReader &theCard, const bool isDir) { if (mark_as_selected(row, sel)) { @@ -487,7 +487,7 @@ void MarlinUI::draw_status_message(const bool blink) { } } - #endif // SDSUPPORT + #endif // HAS_MEDIA #if ENABLED(AUTO_BED_LEVELING_UBL) diff --git a/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp b/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp index 5ec94b853f..cfa326667a 100644 --- a/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp +++ b/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp @@ -39,7 +39,7 @@ #include "../../../module/printcounter.h" #include "../../../module/planner.h" -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA #include "../../../libs/duration_t.h" #endif diff --git a/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp b/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp index 1bc52bfcaf..36b24861fe 100644 --- a/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp +++ b/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp @@ -94,7 +94,7 @@ void AnycubicTFTClass::OnSetup() { delay_ms(10); // Init the state of the key pins running on the TFT - #if BOTH(SDSUPPORT, HAS_SD_DETECT) + #if BOTH(HAS_MEDIA, HAS_SD_DETECT) SET_INPUT_PULLUP(SD_DETECT_PIN); #endif #if ENABLED(FILAMENT_RUNOUT_SENSOR) @@ -176,7 +176,7 @@ void AnycubicTFTClass::OnUserConfirmRequired(const char * const msg) { SERIAL_ECHOLNPGM("TFT Serial Debug: OnUserConfirmRequired triggered... ", msg); #endif - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA /** * Need to handle the process of following states * "Nozzle Parked" @@ -380,7 +380,7 @@ void AnycubicTFTClass::HandleSpecialMenu() { } void AnycubicTFTClass::RenderCurrentFileList() { - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA uint16_t selectedNumber = 0; SelectedDirectory[0] = 0; SelectedFile[0] = 0; @@ -404,7 +404,7 @@ void AnycubicTFTClass::RenderCurrentFileList() { RenderCurrentFolder(selectedNumber); } SENDLINE_PGM("END"); // Filelist stop - #endif // SDSUPPORT + #endif // HAS_MEDIA } void AnycubicTFTClass::RenderSpecialMenu(uint16_t selectedNumber) { @@ -516,7 +516,7 @@ void AnycubicTFTClass::RenderCurrentFolder(uint16_t selectedNumber) { } void AnycubicTFTClass::OnPrintTimerStarted() { - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA if (mediaPrintingState == AMPRINTSTATE_PRINTING) SENDLINE_DBG_PGM("J04", "TFT Serial Debug: Starting SD Print... J04"); // J04 Starting Print @@ -524,7 +524,7 @@ void AnycubicTFTClass::OnPrintTimerStarted() { } void AnycubicTFTClass::OnPrintTimerPaused() { - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA if (isPrintingFromMedia()) { mediaPrintingState = AMPRINTSTATE_PAUSED; mediaPauseState = AMPAUSESTATE_PARKING; @@ -533,7 +533,7 @@ void AnycubicTFTClass::OnPrintTimerPaused() { } void AnycubicTFTClass::OnPrintTimerStopped() { - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA if (mediaPrintingState == AMPRINTSTATE_PRINTING) { mediaPrintingState = AMPRINTSTATE_NOT_PRINTING; mediaPauseState = AMPAUSESTATE_NOT_PAUSED; @@ -608,7 +608,7 @@ void AnycubicTFTClass::GetCommandFromTFT() { } break; case 6: // A6 GET SD CARD PRINTING STATUS - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA if (isPrintingFromMedia()) { SEND_PGM("A6V "); if (isMediaInserted()) @@ -637,28 +637,28 @@ void AnycubicTFTClass::GetCommandFromTFT() { break; case 8: // A8 GET SD LIST - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA SelectedFile[0] = 0; RenderCurrentFileList(); #endif break; case 9: // A9 pause sd print - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA if (isPrintingFromMedia()) PausePrint(); #endif break; case 10: // A10 resume sd print - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA if (isPrintingFromMediaPaused()) ResumePrint(); #endif break; case 11: // A11 STOP SD PRINT - TERN_(SDSUPPORT, StopPrint()); + TERN_(HAS_MEDIA, StopPrint()); break; case 12: // A12 kill @@ -666,7 +666,7 @@ void AnycubicTFTClass::GetCommandFromTFT() { break; case 13: // A13 SELECTION FILE - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA if (isMediaInserted()) { starpos = (strchr(TFTstrchr_pointer + 4, '*')); if (TFTstrchr_pointer[4] == '/') { @@ -695,7 +695,7 @@ void AnycubicTFTClass::GetCommandFromTFT() { break; case 14: // A14 START PRINTING - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA if (!isPrinting() && strlen(SelectedFile) > 0) StartPrint(); #endif @@ -868,7 +868,7 @@ void AnycubicTFTClass::GetCommandFromTFT() { break; case 26: // A26 refresh SD - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA if (isMediaInserted()) { if (strlen(SelectedDirectory) > 0) { FileList currentFileList; @@ -924,7 +924,7 @@ void AnycubicTFTClass::GetCommandFromTFT() { } void AnycubicTFTClass::DoSDCardStateCheck() { - #if BOTH(SDSUPPORT, HAS_SD_DETECT) + #if BOTH(HAS_MEDIA, HAS_SD_DETECT) bool isInserted = isMediaInserted(); if (isInserted) SENDLINE_DBG_PGM("J00", "TFT Serial Debug: SD card state changed... isInserted"); @@ -954,7 +954,7 @@ void AnycubicTFTClass::DoFilamentRunoutCheck() { } void AnycubicTFTClass::StartPrint() { - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA if (!isPrinting() && strlen(SelectedFile) > 0) { #if ENABLED(ANYCUBIC_LCD_DEBUG) SERIAL_ECHOPGM("TFT Serial Debug: About to print file ... "); @@ -970,7 +970,7 @@ void AnycubicTFTClass::StartPrint() { } void AnycubicTFTClass::PausePrint() { - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA if (isPrintingFromMedia() && mediaPrintingState != AMPRINTSTATE_STOP_REQUESTED && mediaPauseState == AMPAUSESTATE_NOT_PAUSED) { mediaPrintingState = AMPRINTSTATE_PAUSE_REQUESTED; mediaPauseState = AMPAUSESTATE_NOT_PAUSED; // need the userconfirm method to update pause state @@ -984,7 +984,7 @@ void AnycubicTFTClass::PausePrint() { } void AnycubicTFTClass::ResumePrint() { - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA #if ENABLED(FILAMENT_RUNOUT_SENSOR) if (READ(FIL_RUNOUT1_PIN)) { #if ENABLED(ANYCUBIC_LCD_DEBUG) @@ -1020,7 +1020,7 @@ void AnycubicTFTClass::ResumePrint() { } void AnycubicTFTClass::StopPrint() { - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA mediaPrintingState = AMPRINTSTATE_STOP_REQUESTED; mediaPauseState = AMPAUSESTATE_NOT_PAUSED; SENDLINE_DBG_PGM("J16", "TFT Serial Debug: SD print stop called... J16"); diff --git a/Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp index b2363c4ee9..e8abc259a2 100644 --- a/Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp @@ -52,7 +52,7 @@ bool DGUSScreenHandler::ScreenComplete; void (*DGUSScreenHandler::confirm_action_cb)() = nullptr; -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA int16_t DGUSScreenHandler::top_file = 0, DGUSScreenHandler::file_to_print = 0; ExtUI::FileList filelist; @@ -260,7 +260,7 @@ void DGUSScreenHandler::DGUSLCD_SendHeaterStatusToDisplay(DGUS_VP_Variable &var) #endif -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA void DGUSScreenHandler::ScreenChangeHookIfSD(DGUS_VP_Variable &var, void *val_ptr) { // default action executed when there is a SD card, but not printing @@ -329,7 +329,7 @@ void DGUSScreenHandler::DGUSLCD_SendHeaterStatusToDisplay(DGUS_VP_Variable &var) GotoScreen(DGUSLCD_SCREEN_POPUP); } -#endif // SDSUPPORT +#endif // HAS_MEDIA void DGUSScreenHandler::ScreenConfirmedOK(DGUS_VP_Variable &var, void *val_ptr) { DGUS_VP_Variable ramcopy; diff --git a/Marlin/src/lcd/extui/dgus/DGUSScreenHandlerBase.h b/Marlin/src/lcd/extui/dgus/DGUSScreenHandlerBase.h index 7ff9ac673f..9ebca87be1 100644 --- a/Marlin/src/lcd/extui/dgus/DGUSScreenHandlerBase.h +++ b/Marlin/src/lcd/extui/dgus/DGUSScreenHandlerBase.h @@ -114,7 +114,7 @@ public: static void HandleFilamentLoadUnload(DGUS_VP_Variable &var); #endif - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA // Callback for VP "Display wants to change screen when there is a SD card" static void ScreenChangeHookIfSD(DGUS_VP_Variable &var, void *val_ptr); // Scroll buttons on the file listing screen. @@ -233,7 +233,7 @@ protected: static uint16_t ConfirmVP; //< context for confirm screen (VP that will be emulated-sent on "OK"). - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA static int16_t top_file; //< file on top of file chooser static int16_t file_to_print; //< touched file to be confirmed #endif diff --git a/Marlin/src/lcd/extui/dgus/dgus_extui.cpp b/Marlin/src/lcd/extui/dgus/dgus_extui.cpp index 2fe4e03016..1d86d8bd55 100644 --- a/Marlin/src/lcd/extui/dgus/dgus_extui.cpp +++ b/Marlin/src/lcd/extui/dgus/dgus_extui.cpp @@ -48,9 +48,9 @@ namespace ExtUI { while (!ScreenHandler.loop()); // Wait while anything is left to be sent } - void onMediaInserted() { TERN_(SDSUPPORT, ScreenHandler.SDCardInserted()); } - void onMediaError() { TERN_(SDSUPPORT, ScreenHandler.SDCardError()); } - void onMediaRemoved() { TERN_(SDSUPPORT, ScreenHandler.SDCardRemoved()); } + void onMediaInserted() { TERN_(HAS_MEDIA, ScreenHandler.SDCardInserted()); } + void onMediaError() { TERN_(HAS_MEDIA, ScreenHandler.SDCardError()); } + void onMediaRemoved() { TERN_(HAS_MEDIA, ScreenHandler.SDCardRemoved()); } void onPlayTone(const uint16_t frequency, const uint16_t duration) {} void onPrintTimerStarted() {} diff --git a/Marlin/src/lcd/extui/dgus/fysetc/DGUSDisplayDef.cpp b/Marlin/src/lcd/extui/dgus/fysetc/DGUSDisplayDef.cpp index 3e731de438..6b670368b6 100644 --- a/Marlin/src/lcd/extui/dgus/fysetc/DGUSDisplayDef.cpp +++ b/Marlin/src/lcd/extui/dgus/fysetc/DGUSDisplayDef.cpp @@ -320,7 +320,7 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = { // Helper to detect touch events VPHELPER(VP_SCREENCHANGE, nullptr, ScreenHandler.ScreenChangeHook, nullptr), VPHELPER(VP_SCREENCHANGE_ASK, nullptr, ScreenHandler.ScreenChangeHookIfIdle, nullptr), - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA VPHELPER(VP_SCREENCHANGE_WHENSD, nullptr, ScreenHandler.ScreenChangeHookIfSD, nullptr), #endif VPHELPER(VP_CONFIRMED, nullptr, ScreenHandler.ScreenConfirmedOK, nullptr), @@ -442,7 +442,7 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = { #endif // SDCard File listing. - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA VPHELPER(VP_SD_ScrollEvent, nullptr, ScreenHandler.DGUSLCD_SD_ScrollFilelist, nullptr), VPHELPER(VP_SD_FileSelected, nullptr, ScreenHandler.DGUSLCD_SD_FileSelected, nullptr), VPHELPER(VP_SD_FileSelectConfirm, nullptr, ScreenHandler.DGUSLCD_SD_StartPrint, nullptr), diff --git a/Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.cpp index 58f0ed8319..0c76454d74 100644 --- a/Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.cpp @@ -40,7 +40,7 @@ #include "../../../../feature/powerloss.h" #endif -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA extern ExtUI::FileList filelist; @@ -124,7 +124,7 @@ ) GotoScreen(DGUSLCD_SCREEN_MAIN); } -#endif // SDSUPPORT +#endif // HAS_MEDIA void DGUSScreenHandler::ScreenChangeHook(DGUS_VP_Variable &var, void *val_ptr) { uint8_t *tmp = (uint8_t*)val_ptr; diff --git a/Marlin/src/lcd/extui/dgus/hiprecy/DGUSDisplayDef.cpp b/Marlin/src/lcd/extui/dgus/hiprecy/DGUSDisplayDef.cpp index a348a1f9a1..c278179e3f 100644 --- a/Marlin/src/lcd/extui/dgus/hiprecy/DGUSDisplayDef.cpp +++ b/Marlin/src/lcd/extui/dgus/hiprecy/DGUSDisplayDef.cpp @@ -317,7 +317,7 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = { // Helper to detect touch events VPHELPER(VP_SCREENCHANGE, nullptr, ScreenHandler.ScreenChangeHook, nullptr), VPHELPER(VP_SCREENCHANGE_ASK, nullptr, ScreenHandler.ScreenChangeHookIfIdle, nullptr), - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA VPHELPER(VP_SCREENCHANGE_WHENSD, nullptr, ScreenHandler.ScreenChangeHookIfSD, nullptr), #endif VPHELPER(VP_CONFIRMED, nullptr, ScreenHandler.ScreenConfirmedOK, nullptr), @@ -435,7 +435,7 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = { #endif // SDCard File listing. - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA VPHELPER(VP_SD_ScrollEvent, nullptr, ScreenHandler.DGUSLCD_SD_ScrollFilelist, nullptr), VPHELPER(VP_SD_FileSelected, nullptr, ScreenHandler.DGUSLCD_SD_FileSelected, nullptr), VPHELPER(VP_SD_FileSelectConfirm, nullptr, ScreenHandler.DGUSLCD_SD_StartPrint, nullptr), diff --git a/Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.cpp index ebe3e3ba8a..83658cc8c0 100644 --- a/Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.cpp @@ -40,7 +40,7 @@ #include "../../../../feature/powerloss.h" #endif -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA extern ExtUI::FileList filelist; @@ -124,7 +124,7 @@ ) GotoScreen(DGUSLCD_SCREEN_MAIN); } -#endif // SDSUPPORT +#endif // HAS_MEDIA void DGUSScreenHandler::ScreenChangeHook(DGUS_VP_Variable &var, void *val_ptr) { uint8_t *tmp = (uint8_t*)val_ptr; diff --git a/Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.cpp b/Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.cpp index 40f6a349d5..8dee8e26d7 100644 --- a/Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.cpp +++ b/Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.cpp @@ -502,7 +502,7 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = { // Helper to detect touch events VPHELPER(VP_SCREENCHANGE, nullptr, ScreenHandler.ScreenChangeHook, nullptr), VPHELPER(VP_SCREENCHANGE_ASK, nullptr, ScreenHandler.ScreenChangeHookIfIdle, nullptr), - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA VPHELPER(VP_SCREENCHANGE_WHENSD, nullptr, ScreenHandler.ScreenChangeHookIfSD, nullptr), #endif VPHELPER(VP_CONFIRMED, nullptr, ScreenHandler.ScreenConfirmedOK, nullptr), @@ -751,7 +751,7 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = { // SDCard File listing - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA VPHELPER(VP_SD_FileSelected, nullptr, ScreenHandler.DGUSLCD_SD_FileSelected, nullptr), VPHELPER(VP_SD_ScrollEvent, nullptr, ScreenHandler.DGUSLCD_SD_ScrollFilelist, nullptr), VPHELPER(VP_SD_FileSelectConfirm, nullptr, ScreenHandler.DGUSLCD_SD_StartPrint, nullptr), diff --git a/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp index bdd5f4f018..8cddcb074e 100644 --- a/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp @@ -47,7 +47,7 @@ #include "../../../../feature/powerloss.h" #endif -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA extern ExtUI::FileList filelist; #endif @@ -140,7 +140,7 @@ void DGUSScreenHandlerMKS::DGUSLCD_SendTMCStepValue(DGUS_VP_Variable &var) { #endif } -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA void DGUSScreenHandler::DGUSLCD_SD_FileSelected(DGUS_VP_Variable &var, void *val_ptr) { uint16_t touched_nr = (int16_t)BE16_P(val_ptr) + top_file; @@ -262,7 +262,7 @@ void DGUSScreenHandlerMKS::DGUSLCD_SendTMCStepValue(DGUS_VP_Variable &var) { const uint16_t value = BE16_P(val_ptr); if (value == 0x0F) GotoScreen(DGUSLCD_SCREEN_MAIN); } -#endif // SDSUPPORT +#endif // HAS_MEDIA void DGUSScreenHandler::ScreenChangeHook(DGUS_VP_Variable &var, void *val_ptr) { uint8_t *tmp = (uint8_t*)val_ptr; diff --git a/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.h b/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.h index 823ed4297c..69ded29ffb 100644 --- a/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.h +++ b/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.h @@ -83,7 +83,7 @@ public: static void GetManualFilamentSpeed(DGUS_VP_Variable &var, void *val_ptr); #endif - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA // Marlin informed us about SD print completion. static void SDPrintingFinished(); #else diff --git a/Marlin/src/lcd/extui/dgus/origin/DGUSDisplayDef.cpp b/Marlin/src/lcd/extui/dgus/origin/DGUSDisplayDef.cpp index 004b453e6e..c5711320ec 100644 --- a/Marlin/src/lcd/extui/dgus/origin/DGUSDisplayDef.cpp +++ b/Marlin/src/lcd/extui/dgus/origin/DGUSDisplayDef.cpp @@ -128,7 +128,7 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = { // Helper to detect touch events VPHELPER(VP_SCREENCHANGE, nullptr, ScreenHandler.ScreenChangeHook, nullptr), VPHELPER(VP_SCREENCHANGE_ASK, nullptr, ScreenHandler.ScreenChangeHookIfIdle, nullptr), - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA VPHELPER(VP_SCREENCHANGE_WHENSD, nullptr, ScreenHandler.ScreenChangeHookIfSD, nullptr), #endif VPHELPER(VP_CONFIRMED, nullptr, ScreenHandler.ScreenConfirmedOK, nullptr), @@ -243,7 +243,7 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = { #endif // SDCard File listing. - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA VPHELPER(VP_SD_ScrollEvent, nullptr, ScreenHandler.DGUSLCD_SD_ScrollFilelist, nullptr), VPHELPER(VP_SD_FileSelected, nullptr, ScreenHandler.DGUSLCD_SD_FileSelected, nullptr), VPHELPER(VP_SD_FileSelectConfirm, nullptr, ScreenHandler.DGUSLCD_SD_StartPrint, nullptr), diff --git a/Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.cpp index edf9a5ca82..6921cdc737 100644 --- a/Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.cpp @@ -40,7 +40,7 @@ #include "../../../../feature/powerloss.h" #endif -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA extern ExtUI::FileList filelist; @@ -124,7 +124,7 @@ ) GotoScreen(DGUSLCD_SCREEN_MAIN); } -#endif // SDSUPPORT +#endif // HAS_MEDIA void DGUSScreenHandler::ScreenChangeHook(DGUS_VP_Variable &var, void *val_ptr) { uint8_t *tmp = (uint8_t*)val_ptr; diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.cpp b/Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.cpp index 7a0318a555..40f3bbf1d5 100644 --- a/Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.cpp +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.cpp @@ -46,7 +46,7 @@ void DGUSRxHandler::ScreenChange(DGUS_VP &vp, void *data_ptr) { const DGUS_Screen screen = (DGUS_Screen)((uint8_t*)data_ptr)[1]; if (vp.addr == DGUS_Addr::SCREENCHANGE_SD) { - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA IF_DISABLED(HAS_SD_DETECT, card.mount()); if (!ExtUI::isMediaInserted()) { @@ -76,7 +76,7 @@ void DGUSRxHandler::ScreenChange(DGUS_VP &vp, void *data_ptr) { dgus_screen_handler.TriggerScreenChange(screen); } -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA void DGUSRxHandler::Scroll(DGUS_VP &vp, void *data_ptr) { UNUSED(vp); @@ -154,7 +154,7 @@ void DGUSRxHandler::ScreenChange(DGUS_VP &vp, void *data_ptr) { ExtUI::printFile(dgus_screen_handler.filelist.shortFilename()); dgus_screen_handler.TriggerScreenChange(DGUS_Screen::PRINT_STATUS); } -#endif // SDSUPPORT +#endif // HAS_MEDIA void DGUSRxHandler::PrintAbort(DGUS_VP &vp, void *data_ptr) { UNUSED(vp); diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.h b/Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.h index 4cad11fc0b..d6d5855b9d 100644 --- a/Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.h +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.h @@ -28,7 +28,7 @@ namespace DGUSRxHandler { void ScreenChange(DGUS_VP &, void *); - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA void Scroll(DGUS_VP &, void *); void SelectFile(DGUS_VP &, void *); void PrintFile(DGUS_VP &, void *); diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp index e1d8778567..e8c23b3226 100644 --- a/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp @@ -34,7 +34,7 @@ uint8_t DGUSScreenHandler::debug_count = 0; -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA ExtUI::FileList DGUSScreenHandler::filelist; uint16_t DGUSScreenHandler::filelist_offset = 0; int16_t DGUSScreenHandler::filelist_selected = -1; @@ -281,7 +281,7 @@ void DGUSScreenHandler::FilamentRunout(const ExtUI::extruder_t extruder) { dgus_display.PlaySound(3); } -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA void DGUSScreenHandler::SDCardInserted() { if (current_screen == DGUS_Screen::HOME) @@ -299,7 +299,7 @@ void DGUSScreenHandler::FilamentRunout(const ExtUI::extruder_t extruder) { TriggerScreenChange(DGUS_Screen::HOME); } -#endif // SDSUPPORT +#endif // HAS_MEDIA #if ENABLED(POWER_LOSS_RECOVERY) diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.h b/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.h index 295df311df..0f71ebdc3d 100644 --- a/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.h +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.h @@ -52,7 +52,7 @@ public: static void PrintTimerStopped(); static void FilamentRunout(const ExtUI::extruder_t extruder); - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA /// Marlin informed us that a new SD has been inserted. static void SDCardInserted(); /// Marlin informed us that the SD Card has been removed(). @@ -89,7 +89,7 @@ public: static uint8_t debug_count; - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA static ExtUI::FileList filelist; static uint16_t filelist_offset; static int16_t filelist_selected; diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.cpp b/Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.cpp index c95d7d0453..3b1a38502d 100644 --- a/Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.cpp +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.cpp @@ -31,7 +31,7 @@ #include "../../../gcode/queue.h" -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA bool DGUSSetupHandler::Print() { dgus_screen_handler.filelist.refresh(); diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.h b/Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.h index 9e3866467f..10063446b7 100644 --- a/Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.h +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.h @@ -23,7 +23,7 @@ namespace DGUSSetupHandler { - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA bool Print(); #endif bool PrintStatus(); diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.cpp b/Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.cpp index b27988a89f..c7d650c03e 100644 --- a/Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.cpp +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.cpp @@ -36,7 +36,7 @@ #include "../../../feature/pause.h" #endif -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA void DGUSTxHandler::SetFileControlState(int16_t file, bool state) { DGUS_Control control; @@ -177,7 +177,7 @@ dgus_display.WriteString((uint16_t)vp.addr, dgus_screen_handler.filelist.filename(), vp.size); } -#endif // SDSUPPORT +#endif // HAS_MEDIA void DGUSTxHandler::PositionZ(DGUS_VP &vp) { const float position = ExtUI::isAxisPositionKnown(ExtUI::Z) ? planner.get_axis_position_mm(Z_AXIS) : 0; diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.h b/Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.h index 161d73f813..6e4f1db5dc 100644 --- a/Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.h +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.h @@ -28,7 +28,7 @@ namespace DGUSTxHandler { - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA void SetFileControlState(int16_t, bool); void FileType(DGUS_VP &); void FileName(DGUS_VP &); diff --git a/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenAddrList.cpp b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenAddrList.cpp index 706038f0ed..4c99ff6a00 100644 --- a/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenAddrList.cpp +++ b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenAddrList.cpp @@ -36,7 +36,7 @@ constexpr DGUS_Addr LIST_HOME[] PROGMEM = { (DGUS_Addr)0 }; -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA constexpr DGUS_Addr LIST_PRINT[] PROGMEM = { DGUS_Addr::SD_Type, DGUS_Addr::SD_FileName0, @@ -210,7 +210,7 @@ constexpr DGUS_Addr LIST_WAIT[] PROGMEM = { const struct DGUS_ScreenAddrList screen_addr_list_map[] PROGMEM = { MAP_HELPER(DGUS_Screen::HOME, LIST_HOME), - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA MAP_HELPER(DGUS_Screen::PRINT, LIST_PRINT), #endif MAP_HELPER(DGUS_Screen::PRINT_STATUS, LIST_PRINT_STATUS), diff --git a/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenSetup.cpp b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenSetup.cpp index a9f13b5ee5..e3ba393af2 100644 --- a/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenSetup.cpp +++ b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenSetup.cpp @@ -35,7 +35,7 @@ .setup_fn = SETUP } const struct DGUS_ScreenSetup screen_setup_list[] PROGMEM = { - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA SETUP_HELPER(DGUS_Screen::PRINT, &DGUSSetupHandler::Print), #endif SETUP_HELPER(DGUS_Screen::PRINT_STATUS, &DGUSSetupHandler::PrintStatus), diff --git a/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VPList.cpp b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VPList.cpp index 3f00dbb037..cd5408e190 100644 --- a/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VPList.cpp +++ b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VPList.cpp @@ -80,7 +80,7 @@ const struct DGUS_VP vp_list[] PROGMEM = { VP_HELPER_RX(DGUS_Addr::SCREENCHANGE_Idle, &DGUSRxHandler::ScreenChange), VP_HELPER_RX(DGUS_Addr::SCREENCHANGE_Printing, &DGUSRxHandler::ScreenChange), - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA VP_HELPER_RX(DGUS_Addr::SD_SelectFile, &DGUSRxHandler::SelectFile), VP_HELPER_RX(DGUS_Addr::SD_Scroll, &DGUSRxHandler::Scroll), VP_HELPER_RX_NODATA(DGUS_Addr::SD_Print, &DGUSRxHandler::PrintFile), @@ -150,7 +150,7 @@ const struct DGUS_VP vp_list[] PROGMEM = { // WRITE-ONLY VARIABLES - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA VP_HELPER_TX(DGUS_Addr::SD_Type, &DGUSTxHandler::FileType), VP_HELPER_TX_SIZE(DGUS_Addr::SD_FileName0, DGUS_FILENAME_LEN, diff --git a/Marlin/src/lcd/extui/dgus_reloaded/dgus_reloaded_extui.cpp b/Marlin/src/lcd/extui/dgus_reloaded/dgus_reloaded_extui.cpp index fb8ef8cc84..75ef5f5d66 100644 --- a/Marlin/src/lcd/extui/dgus_reloaded/dgus_reloaded_extui.cpp +++ b/Marlin/src/lcd/extui/dgus_reloaded/dgus_reloaded_extui.cpp @@ -50,9 +50,9 @@ namespace ExtUI { dgus_screen_handler.PrinterKilled(error, component); } - void onMediaInserted() { TERN_(SDSUPPORT, dgus_screen_handler.SDCardInserted()); } - void onMediaError() { TERN_(SDSUPPORT, dgus_screen_handler.SDCardError()); } - void onMediaRemoved() { TERN_(SDSUPPORT, dgus_screen_handler.SDCardRemoved()); } + void onMediaInserted() { TERN_(HAS_MEDIA, dgus_screen_handler.SDCardInserted()); } + void onMediaError() { TERN_(HAS_MEDIA, dgus_screen_handler.SDCardError()); } + void onMediaRemoved() { TERN_(HAS_MEDIA, dgus_screen_handler.SDCardRemoved()); } void onPlayTone(const uint16_t frequency, const uint16_t duration) { dgus_screen_handler.PlayTone(frequency, duration); diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/flash_storage.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/flash_storage.cpp index a23ad6e37e..c3a4118f20 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/flash_storage.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/flash_storage.cpp @@ -416,7 +416,7 @@ bool UIFlashStorage::is_present = false; * files must be written sequentially following by a chip erase and it is not possible to * overwrite files. */ UIFlashStorage::error_t UIFlashStorage::write_media_file(FSTR_P filename, uint8_t slot) { - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA uint32_t addr; uint8_t buff[write_page_size]; @@ -500,7 +500,7 @@ bool UIFlashStorage::is_present = false; } #else return VERIFY_ERROR; - #endif // SDSUPPORT + #endif // HAS_MEDIA } bool UIFlashStorage::BootMediaReader::isAvailable(uint32_t slot) { diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/media_file_reader.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/media_file_reader.cpp index b4165a742a..99e875712a 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/media_file_reader.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/media_file_reader.cpp @@ -25,7 +25,7 @@ #if ENABLED(TOUCH_UI_FTDI_EVE) #include "media_file_reader.h" - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA bool MediaFileReader::open(const char *filename) { root = CardReader::getroot(); return file.open(&root, filename, O_READ); diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/media_file_reader.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/media_file_reader.h index 9a20c2a038..78b1652c50 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/media_file_reader.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/media_file_reader.h @@ -24,14 +24,14 @@ #include "../../../../inc/MarlinConfigPre.h" -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA #include "../../../../sd/SdFile.h" #include "../../../../sd/cardreader.h" #endif class MediaFileReader { private: - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA MediaFile root, file; #endif diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/printing_dialog_box.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/printing_dialog_box.cpp index 4af38dcb9d..9b67f0e3c8 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/printing_dialog_box.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/printing_dialog_box.cpp @@ -75,7 +75,7 @@ void BioPrintingDialogBox::draw_interaction_buttons(draw_mode_t what) { .font(font_medium) .colors(isPrinting() ? action_btn : normal_btn) .tag(2).button(BTN_POS(1,9), BTN_SIZE(1,1), F("Menu")) - .enabled(isPrinting() ? TERN0(SDSUPPORT, isPrintingFromMedia()) : 1) + .enabled(isPrinting() ? TERN0(HAS_MEDIA, isPrintingFromMedia()) : 1) .tag(3) .colors(isPrinting() ? normal_btn : action_btn) .button(BTN_POS(2,9), BTN_SIZE(1,1), isPrinting() ? F("Cancel") : F("Back")); diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_extui.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_extui.cpp index b82b4a07bd..86f470ee19 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_extui.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_extui.cpp @@ -45,14 +45,14 @@ namespace ExtUI { } void onMediaInserted() { - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA sound.play(media_inserted, PLAY_ASYNCHRONOUS); StatusScreen::onMediaInserted(); #endif } void onMediaRemoved() { - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA if (isPrintingFromMedia()) { stopPrint(); InterfaceSoundsScreen::playEventSound(InterfaceSoundsScreen::PRINTING_FAILED); diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/developer_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/developer_menu.cpp index 2ec8a3bbd1..4a60733723 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/developer_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/developer_menu.cpp @@ -44,7 +44,7 @@ void DeveloperMenu::onRedraw(draw_mode_t what) { constexpr bool has_flash = false; #endif - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA constexpr bool has_media = true; #else constexpr bool has_media = false; @@ -98,7 +98,7 @@ bool DeveloperMenu::onTouchEnd(uint8_t tag) { break; case 4: GOTO_SCREEN(TouchRegistersScreen); break; case 5: sound.play(js_bach_joy, PLAY_ASYNCHRONOUS); break; - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA case 6: if (!MediaPlayerScreen::playCardMedia()) AlertDialogBox::showError(F("Cannot open STARTUP.AVI")); diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/media_player_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/media_player_screen.cpp index 061c8555df..fbfce19a75 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/media_player_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/media_player_screen.cpp @@ -57,7 +57,7 @@ void MediaPlayerScreen::onRedraw(draw_mode_t) { } bool MediaPlayerScreen::playCardMedia() { - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA char fname[15]; strcpy_P(fname, PSTR("STARTUP.AVI")); diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/screens.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/screens.h index b88e517576..e2df29cb83 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/screens.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/screens.h @@ -83,7 +83,7 @@ enum { #if ENABLED(FILAMENT_RUNOUT_SENSOR) FILAMENT_RUNOUT_SCREEN_CACHE, #endif - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA FILES_SCREEN_CACHE, #endif #if ENABLED(CUSTOM_MENU_MAIN) @@ -204,7 +204,7 @@ enum { #include "linear_advance_screen.h" #endif -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA #include "files_screen.h" #endif diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/status_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/status_screen.cpp index f1c65357e0..738d8ee64f 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/status_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/status_screen.cpp @@ -417,7 +417,7 @@ bool StatusScreen::onTouchEnd(uint8_t tag) { using namespace ExtUI; switch (tag) { - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA case 3: GOTO_SCREEN(FilesScreen); break; #endif case 4: diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/pin_mappings.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/pin_mappings.h index 167ea9d7cf..3963493841 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/pin_mappings.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/pin_mappings.h @@ -137,7 +137,7 @@ #define CLCD_SPI_CS BTN_EN1 #define CLCD_MOD_RESET BTN_EN2 - #if MB(EINSY_RAMBO, EINSY_RETRO) && DISABLED(SDSUPPORT) + #if MB(EINSY_RAMBO, EINSY_RETRO) && !HAS_MEDIA #define CLCD_SPI_EXTRA_CS SDSS #endif diff --git a/Marlin/src/lcd/extui/malyan/malyan.cpp b/Marlin/src/lcd/extui/malyan/malyan.cpp index 66c52878cc..1c051f4504 100644 --- a/Marlin/src/lcd/extui/malyan/malyan.cpp +++ b/Marlin/src/lcd/extui/malyan/malyan.cpp @@ -167,7 +167,7 @@ void process_lcd_eb_command(const char *command) { char message_buffer[MAX_CURLY_COMMAND]; uint8_t done_pct = print_job_timer.isRunning() ? (iteration * 10) : 100; iteration = (iteration + 1) % 10; // Provide progress animation - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA if (ExtUI::isPrintingFromMedia() || ExtUI::isPrintingFromMediaPaused()) done_pct = card.percentDone(); #endif @@ -180,7 +180,7 @@ void process_lcd_eb_command(const char *command) { #else 0, 0, #endif - TERN(SDSUPPORT, done_pct, 0), + TERN(HAS_MEDIA, done_pct, 0), elapsed_buffer ); write_to_lcd(message_buffer); @@ -257,7 +257,7 @@ void process_lcd_p_command(const char *command) { break; case 'H': queue.enqueue_now_P(G28_STR); break; // Home all axes default: { - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA // Print file 000 - a three digit number indicating which // file to print in the SD card. If it's a directory, // then switch to the directory. @@ -316,7 +316,7 @@ void process_lcd_s_command(const char *command) { } break; case 'L': { - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA if (!card.isMounted()) card.mount(); // A more efficient way to do this would be to diff --git a/Marlin/src/lcd/extui/malyan/malyan_extui.cpp b/Marlin/src/lcd/extui/malyan/malyan_extui.cpp index 8bffa442b6..042062b7c9 100644 --- a/Marlin/src/lcd/extui/malyan/malyan_extui.cpp +++ b/Marlin/src/lcd/extui/malyan/malyan_extui.cpp @@ -78,7 +78,7 @@ namespace ExtUI { while (LCD_SERIAL.available()) parse_lcd_byte((byte)LCD_SERIAL.read()); - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA // The way last printing status works is simple: // The UI needs to see at least one TQ which is not 100% // and then when the print is complete, one which is. diff --git a/Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp b/Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp index a214e7d1e0..f0609f4ebb 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp @@ -85,7 +85,7 @@ static void btn_ok_event_cb(lv_obj_t *btn, lv_event_t event) { lv_clear_dialog(); lv_draw_printing(); - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA if (!gcode_preview_over) { char *cur_name; cur_name = strrchr(list_file.file_name[sel_id], '/'); @@ -121,7 +121,7 @@ static void btn_ok_event_cb(lv_obj_t *btn, lv_event_t event) { lv_clear_dialog(); lv_draw_ready_print(); - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA uiCfg.print_state = IDLE; card.abortFilePrintSoon(); #endif diff --git a/Marlin/src/lcd/extui/mks_ui/draw_operation.cpp b/Marlin/src/lcd/extui/mks_ui/draw_operation.cpp index ffe714fca9..bf39a52fe9 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_operation.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_operation.cpp @@ -70,7 +70,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { uiCfg.extruderIndexBak = active_extruder; #endif if (uiCfg.print_state == WORKING) { - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA card.pauseSDPrint(); stop_print_time(); uiCfg.print_state = PAUSING; diff --git a/Marlin/src/lcd/extui/mks_ui/draw_print_file.cpp b/Marlin/src/lcd/extui/mks_ui/draw_print_file.cpp index 6b41981fb8..4997641e15 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_print_file.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_print_file.cpp @@ -55,7 +55,7 @@ extern char public_buf_m[100]; uint8_t sel_id = 0; -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA static uint8_t search_file() { int valid_name_cnt = 0; @@ -100,10 +100,10 @@ uint8_t sel_id = 0; return valid_name_cnt; } -#endif // SDSUPPORT +#endif // HAS_MEDIA bool have_pre_pic(char *path) { - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA char *ps1, *ps2, *cur_name = strrchr(path, '/'); card.openFileRead(cur_name); card.read(public_buf, 512); @@ -130,7 +130,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { if (dir_offset[curDirLever].cur_page_first_offset >= FILE_NUM) list_file.Sd_file_offset = dir_offset[curDirLever].cur_page_first_offset - FILE_NUM; - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA file_count = search_file(); #endif if (file_count != 0) { @@ -144,7 +144,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { if (dir_offset[curDirLever].cur_page_last_offset > 0) { list_file.Sd_file_cnt = 0; list_file.Sd_file_offset = dir_offset[curDirLever].cur_page_last_offset + 1; - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA file_count = search_file(); #endif if (file_count != 0) { @@ -161,7 +161,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { int8_t *ch = (int8_t *)strrchr(list_file.curDirPath, '/'); if (ch) { *ch = 0; - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA card.cdup(); #endif dir_offset[curDirLever].curPage = 0; @@ -169,7 +169,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { dir_offset[curDirLever].cur_page_last_offset = 0; curDirLever--; list_file.Sd_file_offset = dir_offset[curDirLever].cur_page_first_offset; - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA file_count = search_file(); #endif lv_clear_print_file(); @@ -189,7 +189,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { strcpy(list_file.curDirPath, list_file.file_name[i]); curDirLever++; list_file.Sd_file_offset = dir_offset[curDirLever].cur_page_first_offset; - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA file_count = search_file(); #endif lv_clear_print_file(); @@ -222,7 +222,7 @@ void lv_draw_print_file() { ZERO(list_file.curDirPath); list_file.Sd_file_offset = dir_offset[curDirLever].cur_page_first_offset; - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA card.mount(); file_count = search_file(); #endif @@ -359,7 +359,7 @@ void disp_gcode_icon(uint8_t file_num) { } uint32_t lv_open_gcode_file(char *path) { - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA uint32_t *ps4; uintptr_t pre_sread_cnt = UINTPTR_MAX; char *cur_name; @@ -375,7 +375,7 @@ uint32_t lv_open_gcode_file(char *path) { card.setIndex(pre_sread_cnt); } return pre_sread_cnt; - #endif // SDSUPPORT + #endif // HAS_MEDIA } int ascii2dec_test(char *ascii) { @@ -395,7 +395,7 @@ int ascii2dec_test(char *ascii) { } void lv_gcode_file_read(uint8_t *data_buf) { - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA uint16_t i = 0, j = 0, k = 0; uint16_t row_1 = 0; bool ignore_start = true; @@ -454,10 +454,10 @@ void lv_gcode_file_read(uint8_t *data_buf) { } #endif // !HAS_TFT_LVGL_UI_SPI memcpy(data_buf, public_buf, 200); - #endif // SDSUPPORT + #endif // HAS_MEDIA } -void lv_close_gcode_file() {TERN_(SDSUPPORT, card.closefile());} +void lv_close_gcode_file() {TERN_(HAS_MEDIA, card.closefile());} void lv_gcode_file_seek(uint32_t pos) { card.setIndex(pos); diff --git a/Marlin/src/lcd/extui/mks_ui/draw_printing.cpp b/Marlin/src/lcd/extui/mks_ui/draw_printing.cpp index 5dc3861f65..345c5dd732 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_printing.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_printing.cpp @@ -80,7 +80,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { switch (obj->mks_obj_id) { case ID_PAUSE: if (uiCfg.print_state == WORKING) { - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA card.pauseSDPrint(); stop_print_time(); uiCfg.print_state = PAUSING; @@ -274,13 +274,13 @@ void setProBarRate() { volatile long long rate_tmp_r; if (!gCfgItems.from_flash_pic) { - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA rate_tmp_r = (long long)card.getIndex() * 100; #endif rate = rate_tmp_r / gCfgItems.curFilesize; } else { - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA rate_tmp_r = (long long)card.getIndex(); #endif rate = (rate_tmp_r - (PREVIEW_SIZE + To_pre_view)) * 100 / (gCfgItems.curFilesize - (PREVIEW_SIZE + To_pre_view)); diff --git a/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp b/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp index b510e3c0c6..102109a136 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp @@ -563,7 +563,7 @@ char *creat_title_text() { uintptr_t gPicturePreviewStart = 0; void preview_gcode_prehandle(char *path) { - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA uintptr_t pre_read_cnt = 0; uint32_t *p1; char *cur_name; @@ -593,7 +593,7 @@ char *creat_title_text() { } void gcode_preview(char *path, int xpos_pixel, int ypos_pixel) { - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA volatile uint32_t i, j; volatile uint16_t *p_index; char *cur_name; @@ -672,7 +672,7 @@ char *creat_title_text() { } return; } - #endif // SDSUPPORT + #endif // HAS_MEDIA } void draw_default_preview(int xpos_pixel, int ypos_pixel, uint8_t sel) { @@ -1345,7 +1345,7 @@ void lv_screen_menu_item_onoff_update(lv_obj_t *btn, const bool curValue) { lv_label_set_text((lv_obj_t*)btn->child_ll.head, curValue ? machine_menu.enable : machine_menu.disable); } -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA void sd_detection() { static bool last_sd_status; @@ -1377,7 +1377,7 @@ void LV_TASK_HANDLER() { if (TERN1(USE_SPI_DMA_TC, !get_lcd_dma_lock())) lv_task_handler(); - #if BOTH(MKS_TEST, SDSUPPORT) + #if BOTH(MKS_TEST, HAS_MEDIA) if (mks_test_flag == 0x1E) mks_hardware_test(); #endif diff --git a/Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp b/Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp index 24e177df39..45a54f6177 100644 --- a/Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp +++ b/Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp @@ -159,7 +159,7 @@ void mks_test_beeper() { buzzer.click(100); } - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA void mks_gpio_test() { init_test_gpio(); @@ -677,7 +677,7 @@ void disp_assets_update_progress(FSTR_P const fmsg) { #endif } -#if BOTH(MKS_TEST, SDSUPPORT) +#if BOTH(MKS_TEST, HAS_MEDIA) uint8_t mks_test_flag = 0; const char *MKSTestPath = "MKS_TEST"; void mks_test_get() { diff --git a/Marlin/src/lcd/extui/mks_ui/mks_hardware.h b/Marlin/src/lcd/extui/mks_ui/mks_hardware.h index c0cdacd963..6a2574e3b0 100644 --- a/Marlin/src/lcd/extui/mks_ui/mks_hardware.h +++ b/Marlin/src/lcd/extui/mks_ui/mks_hardware.h @@ -26,7 +26,7 @@ #include // Functions for MKS_TEST -#if BOTH(MKS_TEST, SDSUPPORT) +#if BOTH(MKS_TEST, HAS_MEDIA) void mks_hardware_test(); void mks_test_get(); void mks_gpio_test(); diff --git a/Marlin/src/lcd/extui/mks_ui/pic_manager.cpp b/Marlin/src/lcd/extui/mks_ui/pic_manager.cpp index d642d81f6b..6570176a29 100644 --- a/Marlin/src/lcd/extui/mks_ui/pic_manager.cpp +++ b/Marlin/src/lcd/extui/mks_ui/pic_manager.cpp @@ -36,7 +36,7 @@ extern uint16_t DeviceCode; -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA extern char *createFilename(char * const buffer, const dir_t &p); #endif @@ -374,7 +374,7 @@ uint32_t Pic_Info_Write(uint8_t *P_name, uint32_t P_size) { return Pic_SaveAddr; } -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA static void dosName2LongName(const char dosName[11], char *longName) { uint8_t j = 0; @@ -547,7 +547,7 @@ uint32_t Pic_Info_Write(uint8_t *P_name, uint32_t P_size) { void spi_flash_read_test() { W25QXX.SPI_FLASH_BufferRead(public_buf, UNIGBK_FLASH_ADDR, BMP_WRITE_BUF_LEN); } #endif -#endif // SDSUPPORT +#endif // HAS_MEDIA void Pic_Read(uint8_t *Pname, uint8_t *P_Rbuff) { uint8_t i, j; diff --git a/Marlin/src/lcd/extui/mks_ui/printer_operation.cpp b/Marlin/src/lcd/extui/mks_ui/printer_operation.cpp index 8f5b89cf34..26979af270 100644 --- a/Marlin/src/lcd/extui/mks_ui/printer_operation.cpp +++ b/Marlin/src/lcd/extui/mks_ui/printer_operation.cpp @@ -45,7 +45,7 @@ extern bool flash_preview_begin, default_preview_flg, gcode_preview_over; void printer_state_polling() { char str_1[16]; if (uiCfg.print_state == PAUSING) { - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA if (!planner.has_blocks_queued() && card.getIndex() > MIN_FILE_PRINTED) uiCfg.waitEndMoves++; diff --git a/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp b/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp index 08db5ae7ad..972349d287 100644 --- a/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp +++ b/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp @@ -78,7 +78,7 @@ XPT2046 touch; static lv_disp_buf_t disp_buf; lv_group_t* g; -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA void UpdateAssets(); #endif uint16_t DeviceCode = 0x9488; @@ -153,7 +153,7 @@ void tft_lvgl_init() { hal.watchdog_refresh(); // LVGL init takes time - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA UpdateAssets(); hal.watchdog_refresh(); // LVGL init takes time TERN_(MKS_TEST, mks_test_get()); @@ -246,7 +246,7 @@ void tft_lvgl_init() { if (ready) lv_draw_ready_print(); - #if BOTH(MKS_TEST, SDSUPPORT) + #if BOTH(MKS_TEST, HAS_MEDIA) if (mks_test_flag == 0x1E) mks_gpio_test(); #endif } diff --git a/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp b/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp index d6d2ce3945..cf2411ee7e 100644 --- a/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp +++ b/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp @@ -135,7 +135,7 @@ void wifi_reset() { void mount_file_sys(const uint8_t disk_type) { switch (disk_type) { - case FILE_SYS_SD: TERN_(SDSUPPORT, card.mount()); break; + case FILE_SYS_SD: TERN_(HAS_MEDIA, card.mount()); break; case FILE_SYS_USB: break; } } @@ -718,7 +718,7 @@ void get_file_list(const char * const path, const bool with_longnames) { if (!path) return; if (gCfgItems.fileSysType == FILE_SYS_SD) { - TERN_(SDSUPPORT, card.mount()); + TERN_(HAS_MEDIA, card.mount()); } else if (gCfgItems.fileSysType == FILE_SYS_USB) { // udisk @@ -993,7 +993,7 @@ static void wifi_gcode_exec(uint8_t * const cmd_line) { uiCfg.print_state = WORKING; lv_draw_printing(); - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA if (!gcode_preview_over) { char *cur_name = strrchr(list_file.file_name[sel_id], '/'); @@ -1058,7 +1058,7 @@ static void wifi_gcode_exec(uint8_t * const cmd_line) { clear_cur_ui(); - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA card.pauseSDPrint(); uiCfg.print_state = PAUSING; #endif @@ -1077,7 +1077,7 @@ static void wifi_gcode_exec(uint8_t * const cmd_line) { stop_print_time(); clear_cur_ui(); - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA uiCfg.print_state = IDLE; card.abortFilePrintSoon(); #endif @@ -1118,7 +1118,7 @@ static void wifi_gcode_exec(uint8_t * const cmd_line) { } mount_file_sys(gCfgItems.fileSysType); - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA char *cur_name = strrchr(list_file.file_name[sel_id], '/'); card.openFileWrite(cur_name); if (card.isFileOpen()) { @@ -1529,7 +1529,7 @@ static void file_first_msg_handle(const uint8_t * const msg, const uint16_t msgL ZERO(saveFilePath); if (gCfgItems.fileSysType == FILE_SYS_SD) { - TERN_(SDSUPPORT, card.mount()); + TERN_(HAS_MEDIA, card.mount()); } else if (gCfgItems.fileSysType == FILE_SYS_USB) { // nothing @@ -1541,11 +1541,11 @@ static void file_first_msg_handle(const uint8_t * const msg, const uint16_t msgL wifiTransError.start_tick = 0; wifiTransError.now_tick = 0; - TERN_(SDSUPPORT, card.closefile()); + TERN_(HAS_MEDIA, card.closefile()); wifi_delay(1000); - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA char dosName[FILENAME_LENGTH]; @@ -1574,7 +1574,7 @@ static void file_first_msg_handle(const uint8_t * const msg, const uint16_t msgL return; } - #endif // SDSUPPORT + #endif // HAS_MEDIA wifi_link_state = WIFI_TRANS_FILE; @@ -1774,7 +1774,7 @@ void stopEspTransfer() { if (wifi_link_state == WIFI_TRANS_FILE) wifi_link_state = WIFI_CONNECTED; - TERN_(SDSUPPORT, card.closefile()); + TERN_(HAS_MEDIA, card.closefile()); if (upload_result != 3) { wifiTransError.flag = 1; diff --git a/Marlin/src/lcd/extui/ui_api.cpp b/Marlin/src/lcd/extui/ui_api.cpp index 2b1f05d2bc..a742a82a5b 100644 --- a/Marlin/src/lcd/extui/ui_api.cpp +++ b/Marlin/src/lcd/extui/ui_api.cpp @@ -1082,14 +1082,14 @@ namespace ExtUI { #endif void printFile(const char *filename) { - TERN(SDSUPPORT, card.openAndPrintFile(filename), UNUSED(filename)); + TERN(HAS_MEDIA, card.openAndPrintFile(filename), UNUSED(filename)); } bool isPrintingFromMediaPaused() { - return TERN0(SDSUPPORT, IS_SD_PAUSED()); + return TERN0(HAS_MEDIA, IS_SD_PAUSED()); } - bool isPrintingFromMedia() { return TERN0(SDSUPPORT, IS_SD_PRINTING() || IS_SD_PAUSED()); } + bool isPrintingFromMedia() { return TERN0(HAS_MEDIA, IS_SD_PRINTING() || IS_SD_PAUSED()); } bool isPrinting() { return commandsInQueue() || isPrintingFromMedia() || printJobOngoing() || printingIsPaused(); @@ -1099,7 +1099,7 @@ namespace ExtUI { return isPrinting() && (isPrintingFromMediaPaused() || print_job_timer.isPaused()); } - bool isMediaInserted() { return TERN0(SDSUPPORT, IS_SD_INSERTED()); } + bool isMediaInserted() { return TERN0(HAS_MEDIA, IS_SD_INSERTED()); } void pausePrint() { ui.pause_print(); } void resumePrint() { ui.resume_print(); } @@ -1138,7 +1138,7 @@ namespace ExtUI { void FileList::refresh() { } bool FileList::seek(const uint16_t pos, const bool skip_range_check) { - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA if (!skip_range_check && (pos + 1) > count()) return false; card.selectFileByIndexSorted(pos); return card.filename[0] != '\0'; @@ -1150,35 +1150,35 @@ namespace ExtUI { } const char* FileList::filename() { - return TERN(SDSUPPORT, card.longest_filename(), ""); + return TERN(HAS_MEDIA, card.longest_filename(), ""); } const char* FileList::shortFilename() { - return TERN(SDSUPPORT, card.filename, ""); + return TERN(HAS_MEDIA, card.filename, ""); } const char* FileList::longFilename() { - return TERN(SDSUPPORT, card.longFilename, ""); + return TERN(HAS_MEDIA, card.longFilename, ""); } bool FileList::isDir() { - return TERN0(SDSUPPORT, card.flag.filenameIsDir); + return TERN0(HAS_MEDIA, card.flag.filenameIsDir); } uint16_t FileList::count() { - return TERN0(SDSUPPORT, card.get_num_items()); + return TERN0(HAS_MEDIA, card.get_num_items()); } bool FileList::isAtRootDir() { - return TERN1(SDSUPPORT, card.flag.workDirIsRoot); + return TERN1(HAS_MEDIA, card.flag.workDirIsRoot); } void FileList::upDir() { - TERN_(SDSUPPORT, card.cdup()); + TERN_(HAS_MEDIA, card.cdup()); } void FileList::changeDir(const char * const dirname) { - TERN(SDSUPPORT, card.cd(dirname), UNUSED(dirname)); + TERN(HAS_MEDIA, card.cd(dirname), UNUSED(dirname)); } } // namespace ExtUI diff --git a/Marlin/src/lcd/marlinui.cpp b/Marlin/src/lcd/marlinui.cpp index c1ec15dc19..0153a11a15 100644 --- a/Marlin/src/lcd/marlinui.cpp +++ b/Marlin/src/lcd/marlinui.cpp @@ -339,7 +339,7 @@ void MarlinUI::init() { uint8_t MarlinUI::lcd_status_update_delay = 1; // First update one loop delayed - #if BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) + #if BOTH(FILAMENT_LCD_DISPLAY, HAS_MEDIA) millis_t MarlinUI::next_filament_display; // = 0 #endif @@ -353,7 +353,7 @@ void MarlinUI::init() { bool MarlinUI::did_first_redraw; #endif - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA #if MARLINUI_SCROLL_NAME uint8_t MarlinUI::filename_scroll_pos, MarlinUI::filename_scroll_max; @@ -670,7 +670,7 @@ void MarlinUI::init() { #if HAS_MARLINUI_MENU if (use_click()) { - #if BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) + #if BOTH(FILAMENT_LCD_DISPLAY, HAS_MEDIA) pause_filament_display(); #endif goto_screen(menu_main); @@ -1490,7 +1490,7 @@ void MarlinUI::init() { FSTR_P msg; if (printingIsPaused()) msg = GET_TEXT_F(MSG_PRINT_PAUSED); - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA else if (IS_SD_PRINTING()) return set_status(card.longest_filename(), true); #endif @@ -1587,7 +1587,7 @@ void MarlinUI::init() { #if HAS_WIRED_LCD - #if BASIC_PROGRESS_BAR || BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) + #if BASIC_PROGRESS_BAR || BOTH(FILAMENT_LCD_DISPLAY, HAS_MEDIA) const millis_t ms = millis(); #endif @@ -1598,7 +1598,7 @@ void MarlinUI::init() { #endif #endif - #if BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) + #if BOTH(FILAMENT_LCD_DISPLAY, HAS_MEDIA) pause_filament_display(ms); // Show status message for 5s #endif @@ -1651,12 +1651,12 @@ void MarlinUI::init() { #if HAS_DISPLAY - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA extern bool wait_for_user, wait_for_heatup; #endif void MarlinUI::abort_print() { - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA wait_for_heatup = wait_for_user = false; card.abortFilePrintSoon(); #endif @@ -1699,7 +1699,7 @@ void MarlinUI::init() { #if ENABLED(PARK_HEAD_ON_PAUSE) pause_show_message(PAUSE_MESSAGE_PARKING, PAUSE_MODE_PAUSE_PRINT); // Show message immediately to let user know about pause in progress queue.inject(F("M25 P\nM24")); - #elif ENABLED(SDSUPPORT) + #elif HAS_MEDIA queue.inject(F("M25")); #elif defined(ACTION_ON_PAUSE) hostui.pause(); @@ -1709,7 +1709,7 @@ void MarlinUI::init() { void MarlinUI::resume_print() { reset_status(); TERN_(PARK_HEAD_ON_PAUSE, wait_for_heatup = wait_for_user = false); - TERN_(SDSUPPORT, if (IS_SD_PAUSED()) queue.inject_P(M24_STR)); + TERN_(HAS_MEDIA, if (IS_SD_PAUSED()) queue.inject_P(M24_STR)); #ifdef ACTION_ON_RESUME hostui.resume(); #endif @@ -1754,7 +1754,7 @@ void MarlinUI::init() { MarlinUI::progress_t MarlinUI::_get_progress() { return ( TERN0(SET_PROGRESS_PERCENT, (progress_override & PROGRESS_MASK)) - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA ?: TERN(HAS_PRINT_PROGRESS_PERMYRIAD, card.permyriadDone(), card.percentDone()) #endif ); @@ -1784,7 +1784,7 @@ void MarlinUI::init() { #endif // HAS_PRINT_PROGRESS -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA #if ENABLED(EXTENSIBLE_UI) #include "extui/ui_api.h" @@ -1837,7 +1837,7 @@ void MarlinUI::init() { #endif } -#endif // SDSUPPORT +#endif // HAS_MEDIA #if HAS_MARLINUI_MENU void MarlinUI::reset_settings() { diff --git a/Marlin/src/lcd/marlinui.h b/Marlin/src/lcd/marlinui.h index de1e30fe4e..65176507fc 100644 --- a/Marlin/src/lcd/marlinui.h +++ b/Marlin/src/lcd/marlinui.h @@ -248,7 +248,7 @@ public: } #endif - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA #define MEDIA_MENU_GATEWAY TERN(PASSWORD_ON_SD_PRINT_MENU, password.media_gatekeeper, menu_media) static void media_changed(const uint8_t old_stat, const uint8_t stat); #endif @@ -467,7 +467,7 @@ public: FORCE_INLINE static void refresh_contrast() { set_contrast(contrast); } #endif - #if BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) + #if BOTH(FILAMENT_LCD_DISPLAY, HAS_MEDIA) static millis_t next_filament_display; static void pause_filament_display(const millis_t ms=millis()) { next_filament_display = ms + 5000UL; } #endif @@ -529,7 +529,7 @@ public: static void completion_feedback(const bool=true) {} #endif - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA #if BOTH(SCROLL_LONG_FILENAMES, HAS_MARLINUI_MENU) #define MARLINUI_SCROLL_NAME 1 #endif diff --git a/Marlin/src/lcd/menu/menu.h b/Marlin/src/lcd/menu/menu.h index 06d9c846cc..9d824e2a4c 100644 --- a/Marlin/src/lcd/menu/menu.h +++ b/Marlin/src/lcd/menu/menu.h @@ -191,7 +191,7 @@ class MenuEditItemBase : public MenuItemBase { static void draw_edit_screen(const char * const value) { draw_edit_screen(editLabel, value); } }; -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA class CardReader; class MenuItem_sdbase { public: @@ -207,7 +207,7 @@ class MenuEditItemBase : public MenuItemBase { void menu_main(); void menu_move(); -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA void menu_media(); #endif diff --git a/Marlin/src/lcd/menu/menu_main.cpp b/Marlin/src/lcd/menu/menu_main.cpp index 3b1cd73745..a202f624f7 100644 --- a/Marlin/src/lcd/menu/menu_main.cpp +++ b/Marlin/src/lcd/menu/menu_main.cpp @@ -43,10 +43,10 @@ #include "game/game.h" #endif -#if EITHER(SDSUPPORT, HOST_PROMPT_SUPPORT) || defined(ACTION_ON_CANCEL) +#if EITHER(HAS_MEDIA, HOST_PROMPT_SUPPORT) || defined(ACTION_ON_CANCEL) #define MACHINE_CAN_STOP 1 #endif -#if ANY(SDSUPPORT, HOST_PROMPT_SUPPORT, PARK_HEAD_ON_PAUSE) || defined(ACTION_ON_PAUSE) +#if ANY(HAS_MEDIA, HOST_PROMPT_SUPPORT, PARK_HEAD_ON_PAUSE) || defined(ACTION_ON_PAUSE) #define MACHINE_CAN_PAUSE 1 #endif @@ -234,7 +234,7 @@ void menu_configuration(); void menu_main() { const bool busy = printingIsActive() - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA , card_detected = card.isMounted() , card_open = card_detected && card.isFileOpen() #endif @@ -243,7 +243,7 @@ void menu_main() { START_MENU(); BACK_ITEM(MSG_INFO_SCREEN); - #if ENABLED(SDSUPPORT) && !defined(MEDIA_MENU_AT_TOP) && !HAS_ENCODER_WHEEL + #if HAS_MEDIA && !defined(MEDIA_MENU_AT_TOP) && !HAS_ENCODER_WHEEL #define MEDIA_MENU_AT_TOP #endif @@ -273,7 +273,7 @@ void menu_main() { #endif } else { - #if BOTH(SDSUPPORT, MEDIA_MENU_AT_TOP) + #if BOTH(HAS_MEDIA, MEDIA_MENU_AT_TOP) // BEGIN MEDIA MENU #if ENABLED(MENU_ADDAUTOSTART) ACTION_ITEM(MSG_RUN_AUTO_FILES, card.autofile_begin); // Run Auto Files @@ -388,7 +388,7 @@ void menu_main() { GCODES_ITEM(MSG_SWITCH_PS_ON, F("M80")); #endif - #if ENABLED(SDSUPPORT) && DISABLED(MEDIA_MENU_AT_TOP) + #if HAS_MEDIA && DISABLED(MEDIA_MENU_AT_TOP) // BEGIN MEDIA MENU #if ENABLED(MENU_ADDAUTOSTART) ACTION_ITEM(MSG_RUN_AUTO_FILES, card.autofile_begin); // Run Auto Files diff --git a/Marlin/src/lcd/menu/menu_media.cpp b/Marlin/src/lcd/menu/menu_media.cpp index 79cca1d97a..e32f41a9a6 100644 --- a/Marlin/src/lcd/menu/menu_media.cpp +++ b/Marlin/src/lcd/menu/menu_media.cpp @@ -26,7 +26,7 @@ #include "../../inc/MarlinConfigPre.h" -#if BOTH(HAS_MARLINUI_MENU, SDSUPPORT) +#if BOTH(HAS_MARLINUI_MENU, HAS_MEDIA) #include "menu_item.h" #include "../../sd/cardreader.h" @@ -161,4 +161,4 @@ void menu_media() { TERN(MULTI_VOLUME, menu_media_select, menu_media_filelist)(); } -#endif // HAS_MARLINUI_MENU && SDSUPPORT +#endif // HAS_MARLINUI_MENU && HAS_MEDIA diff --git a/Marlin/src/lcd/tft/ui_1024x600.cpp b/Marlin/src/lcd/tft/ui_1024x600.cpp index 638e32a9b3..cf5911cdc1 100644 --- a/Marlin/src/lcd/tft/ui_1024x600.cpp +++ b/Marlin/src/lcd/tft/ui_1024x600.cpp @@ -36,7 +36,7 @@ #include "../../module/planner.h" #include "../../module/motion.h" -#if DISABLED(LCD_PROGRESS_BAR) && BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) +#if DISABLED(LCD_PROGRESS_BAR) && BOTH(FILAMENT_LCD_DISPLAY, HAS_MEDIA) #include "../../feature/filwidth.h" #include "../../gcode/parser.h" #endif @@ -326,7 +326,7 @@ void MarlinUI::draw_status_screen() { #if ENABLED(TOUCH_SCREEN) add_control(900, y, menu_main, imgSettings); - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA const bool cm = card.isMounted(), pa = printingIsActive(); if (cm && pa) add_control(12, y, STOP, imgCancel, true, COLOR_CONTROL_CANCEL); diff --git a/Marlin/src/lcd/tft/ui_320x240.cpp b/Marlin/src/lcd/tft/ui_320x240.cpp index e606dca7ce..bac7586a25 100644 --- a/Marlin/src/lcd/tft/ui_320x240.cpp +++ b/Marlin/src/lcd/tft/ui_320x240.cpp @@ -36,7 +36,7 @@ #include "../../module/planner.h" #include "../../module/motion.h" -#if DISABLED(LCD_PROGRESS_BAR) && BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) +#if DISABLED(LCD_PROGRESS_BAR) && BOTH(FILAMENT_LCD_DISPLAY, HAS_MEDIA) #include "../../feature/filwidth.h" #include "../../gcode/parser.h" #endif @@ -448,7 +448,7 @@ void MarlinUI::draw_status_screen() { #endif , menu_main, imgSettings ); - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA const bool cm = card.isMounted(), pa = printingIsActive(); if (cm && pa) add_control(0, TERN(TFT_COLOR_UI_PORTRAIT, 210, 130), STOP, imgCancel, true, COLOR_CONTROL_CANCEL); diff --git a/Marlin/src/lcd/tft/ui_480x320.cpp b/Marlin/src/lcd/tft/ui_480x320.cpp index edc3d321f2..efb58754c7 100644 --- a/Marlin/src/lcd/tft/ui_480x320.cpp +++ b/Marlin/src/lcd/tft/ui_480x320.cpp @@ -36,7 +36,7 @@ #include "../../module/planner.h" #include "../../module/motion.h" -#if DISABLED(LCD_PROGRESS_BAR) && BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) +#if DISABLED(LCD_PROGRESS_BAR) && BOTH(FILAMENT_LCD_DISPLAY, HAS_MEDIA) #include "../../feature/filwidth.h" #include "../../gcode/parser.h" #endif @@ -320,7 +320,7 @@ void MarlinUI::draw_status_screen() { #if ENABLED(TOUCH_SCREEN) add_control(404, y, menu_main, imgSettings); - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA const bool cm = card.isMounted(), pa = printingIsActive(); if (cm && pa) add_control(12, y, STOP, imgCancel, true, COLOR_CONTROL_CANCEL); diff --git a/Marlin/src/lcd/tft/ui_common.cpp b/Marlin/src/lcd/tft/ui_common.cpp index 6dee62820e..962daadb19 100644 --- a/Marlin/src/lcd/tft/ui_common.cpp +++ b/Marlin/src/lcd/tft/ui_common.cpp @@ -188,7 +188,7 @@ void MenuItem_static::draw(const uint8_t row, FSTR_P const fstr, const uint8_t s tft.add_text(TFT_WIDTH - 1 - tft_string.width(), MENU_TEXT_Y_OFFSET, COLOR_YELLOW, tft_string); } -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA void MenuItem_sdbase::draw(const bool sel, const uint8_t row, FSTR_P const, CardReader &theCard, const bool isDir) { menu_item(row, sel); diff --git a/Marlin/src/module/endstops.cpp b/Marlin/src/module/endstops.cpp index 02af062eca..56444d1aee 100644 --- a/Marlin/src/module/endstops.cpp +++ b/Marlin/src/module/endstops.cpp @@ -38,7 +38,7 @@ #include HAL_PATH(../HAL, endstop_interrupts.h) #endif -#if BOTH(SD_ABORT_ON_ENDSTOP_HIT, SDSUPPORT) +#if BOTH(SD_ABORT_ON_ENDSTOP_HIT, HAS_MEDIA) #include "printcounter.h" // for print_job_timer #endif @@ -352,7 +352,7 @@ void Endstops::event_handler() { ) ); - #if BOTH(SD_ABORT_ON_ENDSTOP_HIT, SDSUPPORT) + #if BOTH(SD_ABORT_ON_ENDSTOP_HIT, HAS_MEDIA) if (planner.abort_on_endstop_hit) { card.abortFilePrintNow(); quickstop_stepper(); diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 5bf809c955..3274136f41 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -1929,7 +1929,7 @@ void Temperature::task() { quickstop_stepper(); } - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA if (emergency_parser.sd_abort_by_M524) { // abort SD print immediately emergency_parser.sd_abort_by_M524 = false; card.flag.abort_sd_printing = true; diff --git a/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h b/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h index 493269cf2c..cfb682df54 100644 --- a/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h +++ b/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h @@ -179,7 +179,7 @@ #if SD_CONNECTION_IS(ONBOARD) #define FORCE_SOFT_SPI #endif - #if BOTH(MKS_MINI_12864_V3, SDSUPPORT) + #if BOTH(MKS_MINI_12864_V3, HAS_MEDIA) #define PAUSE_LCD_FOR_BUSY_SD #endif #else diff --git a/Marlin/src/pins/esp32/pins_PANDA_common.h b/Marlin/src/pins/esp32/pins_PANDA_common.h index c66bdf0bd1..971525622a 100644 --- a/Marlin/src/pins/esp32/pins_PANDA_common.h +++ b/Marlin/src/pins/esp32/pins_PANDA_common.h @@ -107,7 +107,7 @@ // // SD Card // -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA #define SD_MOSI_PIN EXP2_06_PIN #define SD_MISO_PIN EXP2_01_PIN #define SD_SCK_PIN EXP2_02_PIN diff --git a/Marlin/src/pins/linux/pins_RAMPS_LINUX.h b/Marlin/src/pins/linux/pins_RAMPS_LINUX.h index d7f53568e6..b414c0015f 100644 --- a/Marlin/src/pins/linux/pins_RAMPS_LINUX.h +++ b/Marlin/src/pins/linux/pins_RAMPS_LINUX.h @@ -136,7 +136,7 @@ #define TEMP_BED_PIN 2 // Analog Input // SPI for MAX Thermocouple -#if DISABLED(SDSUPPORT) +#if !HAS_MEDIA #define TEMP_0_CS_PIN 66 // Don't use 53 if using Display/SD card #else #define TEMP_0_CS_PIN 66 // Don't use 49 (SD_DETECT_PIN) diff --git a/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h b/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h index 7cbad6a7f9..423c89b8c9 100644 --- a/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h +++ b/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h @@ -134,7 +134,7 @@ #error "REPRAP_DISCOUNT_SMART_CONTROLLER displays aren't supported by the BIQU B300 v1.0" #endif - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA #error "SDSUPPORT is not supported by the BIQU B300 v1.0 when an LCD controller is used" #endif @@ -146,7 +146,7 @@ * Software SPI is used to interface with a stand-alone SD card reader connected to EXP1. * Hardware SPI can't be used because P0_17 (MISO) is not brought out on this board. */ -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA #define SD_SCK_PIN P0_15 // EXP1-5 #define SD_MISO_PIN P0_16 // EXP1-4 #define SD_MOSI_PIN P0_18 // EXP1-3 diff --git a/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h b/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h index 914a944027..278ba12dd5 100644 --- a/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h +++ b/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h @@ -111,7 +111,7 @@ #error "REPRAP_DISCOUNT_SMART_CONTROLLER displays aren't supported by the BIQU BQ111-A4" #endif - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA #error "SDSUPPORT is not supported by the BIQU BQ111-A4 when an LCD controller is used" #endif @@ -123,7 +123,7 @@ * Software SPI is used to interface with a stand-alone SD card reader connected to EXP1. * Hardware SPI can't be used because P0_17 (MISO) is not brought out on this board. */ -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA #define SD_SCK_PIN P0_15 // EXP1-5 #define SD_MISO_PIN P0_16 // EXP1-4 @@ -131,7 +131,7 @@ #define SD_SS_PIN P1_30 // EXP1-2 #define SDSS SD_SS_PIN -#endif // SDSUPPORT +#endif // HAS_MEDIA /** * PWMS diff --git a/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h b/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h index 6747a7c2bf..70781cb0b5 100644 --- a/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h +++ b/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h @@ -154,7 +154,7 @@ #define KILL_PIN P2_11 // EXP2-10 - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA #error "SDSUPPORT is not currently supported by the Cohesion3D boards" #endif diff --git a/Marlin/src/pins/mega/pins_CHEAPTRONICv2.h b/Marlin/src/pins/mega/pins_CHEAPTRONICv2.h index 4c8dd5c42a..62215a8224 100644 --- a/Marlin/src/pins/mega/pins_CHEAPTRONICv2.h +++ b/Marlin/src/pins/mega/pins_CHEAPTRONICv2.h @@ -128,7 +128,7 @@ // #define BEEPER_PIN 44 -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA #define SDSS 53 #define SD_DETECT_PIN 49 #endif diff --git a/Marlin/src/pins/mega/pins_PICA.h b/Marlin/src/pins/mega/pins_PICA.h index d9f4a858da..0541e1af58 100644 --- a/Marlin/src/pins/mega/pins_PICA.h +++ b/Marlin/src/pins/mega/pins_PICA.h @@ -123,7 +123,7 @@ #define SSR_PIN 6 // SPI for MAX Thermocouple -#if DISABLED(SDSUPPORT) +#if !HAS_MEDIA #define TEMP_0_CS_PIN 66 // Don't use 53 if using Display/SD card #else #define TEMP_0_CS_PIN 66 // Don't use 49 (SD_DETECT_PIN) diff --git a/Marlin/src/pins/mega/pins_WEEDO_62A.h b/Marlin/src/pins/mega/pins_WEEDO_62A.h index 7b417c19a1..d13de7ed30 100644 --- a/Marlin/src/pins/mega/pins_WEEDO_62A.h +++ b/Marlin/src/pins/mega/pins_WEEDO_62A.h @@ -85,7 +85,7 @@ // // SD Support // -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA #define SDSS 53 #define SD_DETECT_PIN 49 #endif diff --git a/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h b/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h index b77c325029..f6ee06846d 100644 --- a/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h +++ b/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h @@ -116,7 +116,7 @@ #define TEMP_BED_PIN 14 // Analog Input // SPI for MAX Thermocouple -#if DISABLED(SDSUPPORT) +#if !HAS_MEDIA #define TEMP_0_CS_PIN 66 // Don't use 53 if using Display/SD card #else #define TEMP_0_CS_PIN 66 // Don't use 49 (SD_DETECT_PIN) diff --git a/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h b/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h index 2d92306f89..179bad04a5 100644 --- a/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h +++ b/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h @@ -113,7 +113,7 @@ #define TEMP_BED_PIN 3 // Analog Input // SPI for MAX Thermocouple -#if DISABLED(SDSUPPORT) +#if !HAS_MEDIA #define TEMP_0_CS_PIN 66 // Don't use 53 if using Display/SD card #else #define TEMP_0_CS_PIN 66 // Don't use 49 (SD_DETECT_PIN) diff --git a/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h b/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h index d84a852915..fd799e0d49 100644 --- a/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h +++ b/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h @@ -119,7 +119,7 @@ #define TEMP_BED_PIN 14 // Analog Input // SPI for MAX Thermocouple -#if DISABLED(SDSUPPORT) +#if !HAS_MEDIA #define TEMP_0_CS_PIN 66 // Don't use 53 if using Display/SD card #else #define TEMP_0_CS_PIN 66 // Don't use 49 (SD_DETECT_PIN) diff --git a/Marlin/src/pins/ramps/pins_RAMPS_OLD.h b/Marlin/src/pins/ramps/pins_RAMPS_OLD.h index 663c6e4792..19b048ec81 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS_OLD.h +++ b/Marlin/src/pins/ramps/pins_RAMPS_OLD.h @@ -76,7 +76,7 @@ #define TEMP_BED_PIN 1 // Analog Input // SPI for MAX Thermocouple -#if DISABLED(SDSUPPORT) +#if !HAS_MEDIA #define TEMP_0_CS_PIN 66 // Don't use 53 if using Display/SD card #else #define TEMP_0_CS_PIN 66 // Don't use 49 (SD_DETECT_PIN) diff --git a/Marlin/src/pins/ramps/pins_RIGIDBOARD.h b/Marlin/src/pins/ramps/pins_RIGIDBOARD.h index 8eab6c7d9b..afd31eeead 100644 --- a/Marlin/src/pins/ramps/pins_RIGIDBOARD.h +++ b/Marlin/src/pins/ramps/pins_RIGIDBOARD.h @@ -72,7 +72,7 @@ // SPI for MAX Thermocouple #undef TEMP_0_CS_PIN -#if DISABLED(SDSUPPORT) +#if !HAS_MEDIA #define TEMP_0_CS_PIN 53 // Don't use pin 53 if there is even the remote possibility of using Display/SD card #else #define TEMP_0_CS_PIN 49 // Don't use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present diff --git a/Marlin/src/pins/ramps/pins_RUMBA.h b/Marlin/src/pins/ramps/pins_RUMBA.h index 258b9ccca6..ba3c97c87a 100644 --- a/Marlin/src/pins/ramps/pins_RUMBA.h +++ b/Marlin/src/pins/ramps/pins_RUMBA.h @@ -241,7 +241,7 @@ // #define BEEPER_PIN 44 -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA #define SDSS 53 #define SD_DETECT_PIN 49 #endif diff --git a/Marlin/src/pins/ramps/pins_TENLOG_D3_HERO.h b/Marlin/src/pins/ramps/pins_TENLOG_D3_HERO.h index dd9cafc306..f68b9ef8a6 100644 --- a/Marlin/src/pins/ramps/pins_TENLOG_D3_HERO.h +++ b/Marlin/src/pins/ramps/pins_TENLOG_D3_HERO.h @@ -125,7 +125,7 @@ #define TEMP_BED_PIN 14 // Analog Input // SPI for MAX Thermocouple -#if DISABLED(SDSUPPORT) +#if !HAS_MEDIA #define TEMP_0_CS_PIN -1 // Don't use 53 if using Display/SD card #else #define TEMP_0_CS_PIN -1 // Don't use 49 (SD_DETECT_PIN) diff --git a/Marlin/src/pins/ramps/pins_TT_OSCAR.h b/Marlin/src/pins/ramps/pins_TT_OSCAR.h index 56ebf2c663..7078b11b6b 100644 --- a/Marlin/src/pins/ramps/pins_TT_OSCAR.h +++ b/Marlin/src/pins/ramps/pins_TT_OSCAR.h @@ -178,7 +178,7 @@ #endif // SPI for MAX Thermocouple -//#if DISABLED(SDSUPPORT) +//#if !HAS_MEDIA // #define TEMP_0_CS_PIN 66 // Don't use 53 if using Display/SD card //#else // #define TEMP_0_CS_PIN 66 // Don't use 49 (SD_DETECT_PIN) diff --git a/Marlin/src/pins/sam/pins_DUE3DOM.h b/Marlin/src/pins/sam/pins_DUE3DOM.h index c8a168228d..bd6cb7a6cd 100644 --- a/Marlin/src/pins/sam/pins_DUE3DOM.h +++ b/Marlin/src/pins/sam/pins_DUE3DOM.h @@ -83,7 +83,7 @@ #define TEMP_BED_PIN 1 // Analog Input (BED thermistor) // SPI for MAX Thermocouple -#if DISABLED(SDSUPPORT) +#if !HAS_MEDIA #define TEMP_0_CS_PIN -1 #else #define TEMP_0_CS_PIN -1 diff --git a/Marlin/src/pins/sam/pins_DUE3DOM_MINI.h b/Marlin/src/pins/sam/pins_DUE3DOM_MINI.h index 66d4f713f8..41d43c0b04 100644 --- a/Marlin/src/pins/sam/pins_DUE3DOM_MINI.h +++ b/Marlin/src/pins/sam/pins_DUE3DOM_MINI.h @@ -72,7 +72,7 @@ #define TEMP_BOARD_PIN 5 // Analog Input (OnBoard thermistor beta 3950) // SPI for MAX Thermocouple -#if DISABLED(SDSUPPORT) +#if !HAS_MEDIA #define TEMP_0_CS_PIN 53 #else #define TEMP_0_CS_PIN 53 diff --git a/Marlin/src/pins/sam/pins_RADDS.h b/Marlin/src/pins/sam/pins_RADDS.h index 7ebb24fde9..9301167959 100644 --- a/Marlin/src/pins/sam/pins_RADDS.h +++ b/Marlin/src/pins/sam/pins_RADDS.h @@ -180,7 +180,7 @@ #define TEMP_BED_PIN 4 // Analog Input // SPI for MAX Thermocouple -#if DISABLED(SDSUPPORT) +#if !HAS_MEDIA #define TEMP_0_CS_PIN 53 #else #define TEMP_0_CS_PIN 49 diff --git a/Marlin/src/pins/sam/pins_RAMPS_DUO.h b/Marlin/src/pins/sam/pins_RAMPS_DUO.h index 04a4b69ae1..92de79bd7f 100644 --- a/Marlin/src/pins/sam/pins_RAMPS_DUO.h +++ b/Marlin/src/pins/sam/pins_RAMPS_DUO.h @@ -57,7 +57,7 @@ // SPI for MAX Thermocouple #undef TEMP_0_CS_PIN -#if DISABLED(SDSUPPORT) +#if !HAS_MEDIA #define TEMP_0_CS_PIN 69 // Don't use 53 if using Display/SD card #else #define TEMP_0_CS_PIN 69 // Don't use 49 (SD_DETECT_PIN) diff --git a/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h b/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h index e1b0d7edc8..c84d84105c 100644 --- a/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h +++ b/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h @@ -110,7 +110,7 @@ #define TEMP_BED_PIN 0 // Analog Input // SPI for MAX Thermocouple -#if DISABLED(SDSUPPORT) +#if !HAS_MEDIA #define TEMP_0_CS_PIN 53 #else #define TEMP_0_CS_PIN 49 diff --git a/Marlin/src/pins/sam/pins_RAMPS_SMART.h b/Marlin/src/pins/sam/pins_RAMPS_SMART.h index b02ddef166..2a0733c601 100644 --- a/Marlin/src/pins/sam/pins_RAMPS_SMART.h +++ b/Marlin/src/pins/sam/pins_RAMPS_SMART.h @@ -82,7 +82,7 @@ #define TEMP_BED_PIN 11 // Analog Input // SPI for MAX Thermocouple -#if DISABLED(SDSUPPORT) +#if !HAS_MEDIA #define TEMP_0_CS_PIN 67 // Don't use 53 if using Display/SD card #else #define TEMP_0_CS_PIN 67 // Don't use 49 (SD_DETECT_PIN) diff --git a/Marlin/src/pins/sam/pins_RURAMPS4D_11.h b/Marlin/src/pins/sam/pins_RURAMPS4D_11.h index 8b078371e9..516063d158 100644 --- a/Marlin/src/pins/sam/pins_RURAMPS4D_11.h +++ b/Marlin/src/pins/sam/pins_RURAMPS4D_11.h @@ -145,7 +145,7 @@ // SPI for MAX Thermocouple /* -#if DISABLED(SDSUPPORT) +#if !HAS_MEDIA #define TEMP_0_CS_PIN EXP1_08_PIN #else #define TEMP_0_CS_PIN 49 diff --git a/Marlin/src/pins/sam/pins_RURAMPS4D_13.h b/Marlin/src/pins/sam/pins_RURAMPS4D_13.h index 8f107ff4e5..9e9aeb9fec 100644 --- a/Marlin/src/pins/sam/pins_RURAMPS4D_13.h +++ b/Marlin/src/pins/sam/pins_RURAMPS4D_13.h @@ -135,7 +135,7 @@ // SPI for MAX Thermocouple /* -#if DISABLED(SDSUPPORT) +#if !HAS_MEDIA #define TEMP_0_CS_PIN 53 #else #define TEMP_0_CS_PIN 49 diff --git a/Marlin/src/pins/sanguino/pins_ZMIB_V2.h b/Marlin/src/pins/sanguino/pins_ZMIB_V2.h index dce01177be..1e449579cf 100644 --- a/Marlin/src/pins/sanguino/pins_ZMIB_V2.h +++ b/Marlin/src/pins/sanguino/pins_ZMIB_V2.h @@ -159,7 +159,7 @@ // // SD card // -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA #define SDSS 4 #endif #define SD_DETECT_PIN -1 diff --git a/Marlin/src/pins/stm32f4/pins_ANET_ET4.h b/Marlin/src/pins/stm32f4/pins_ANET_ET4.h index 347ef8451d..bd8a2d9762 100644 --- a/Marlin/src/pins/stm32f4/pins_ANET_ET4.h +++ b/Marlin/src/pins/stm32f4/pins_ANET_ET4.h @@ -201,7 +201,7 @@ #define SDCARD_CONNECTION CUSTOM_CABLE #endif -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA #if DISABLED(SDIO_SUPPORT) #define SOFTWARE_SPI diff --git a/Marlin/src/pins/stm32f4/pins_ARTILLERY_RUBY.h b/Marlin/src/pins/stm32f4/pins_ARTILLERY_RUBY.h index 869b1e859d..7b0206e287 100644 --- a/Marlin/src/pins/stm32f4/pins_ARTILLERY_RUBY.h +++ b/Marlin/src/pins/stm32f4/pins_ARTILLERY_RUBY.h @@ -173,7 +173,7 @@ // #define BEEPER_PIN PC13 - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA #define SDSS PA15 #define SD_DETECT_PIN PD2 #endif diff --git a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_common.h b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_common.h index 367cace424..33dedf7e8e 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_common.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_common.h @@ -238,7 +238,7 @@ #define EXP2_07_PIN PB11 #define EXP2_08_PIN -1 // RESET -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA #ifndef SDCARD_CONNECTION #define SDCARD_CONNECTION ONBOARD #endif diff --git a/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h b/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h index b281a8e2a3..c4a7cd886f 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h @@ -262,7 +262,7 @@ // SD Support // Onboard SD card use hardware SPI3 (defined in variant), LCD SD card use hardware SPI1 // -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA #ifndef SDCARD_CONNECTION #define SDCARD_CONNECTION LCD #endif diff --git a/Marlin/src/pins/stm32f4/pins_VAKE403D.h b/Marlin/src/pins/stm32f4/pins_VAKE403D.h index a17d31f063..e4150f3bd2 100644 --- a/Marlin/src/pins/stm32f4/pins_VAKE403D.h +++ b/Marlin/src/pins/stm32f4/pins_VAKE403D.h @@ -160,7 +160,7 @@ #define KILL_PIN PD5 #define POWER_LOSS_PIN PA4 // ?? Power loss / nAC_FAULT -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA #define SD_DETECT_PIN EXP2_07_PIN #define SD_SS_PIN PB15 // USD_CS -> CS for onboard SD #endif @@ -198,7 +198,7 @@ // #if HAS_WIRED_LCD - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA #define SDSS PB6 // CS for SD card in LCD #endif diff --git a/Marlin/src/sd/SdBaseFile.cpp b/Marlin/src/sd/SdBaseFile.cpp index 5ee0db2b9e..cf403d4b3a 100644 --- a/Marlin/src/sd/SdBaseFile.cpp +++ b/Marlin/src/sd/SdBaseFile.cpp @@ -35,7 +35,7 @@ #include "../inc/MarlinConfig.h" -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA #include "SdBaseFile.h" @@ -2269,4 +2269,4 @@ int16_t SdBaseFile::write(const void *buf, const uint16_t nbyte) { return -1; } -#endif // SDSUPPORT +#endif // HAS_MEDIA diff --git a/Marlin/src/sd/SdFatUtil.cpp b/Marlin/src/sd/SdFatUtil.cpp index e6f7a9a013..a68bd73ebe 100644 --- a/Marlin/src/sd/SdFatUtil.cpp +++ b/Marlin/src/sd/SdFatUtil.cpp @@ -31,7 +31,7 @@ #include "../inc/MarlinConfig.h" -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA #include "SdFatUtil.h" #include @@ -59,4 +59,4 @@ #endif -#endif // SDSUPPORT +#endif // HAS_MEDIA diff --git a/Marlin/src/sd/SdFile.cpp b/Marlin/src/sd/SdFile.cpp index a1dd793727..c6a3577e1d 100644 --- a/Marlin/src/sd/SdFile.cpp +++ b/Marlin/src/sd/SdFile.cpp @@ -31,7 +31,7 @@ #include "../inc/MarlinConfig.h" -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA #include "SdFile.h" @@ -95,4 +95,4 @@ void SdFile::writeln_P(PGM_P const str) { write_P(PSTR("\r\n")); } -#endif // SDSUPPORT +#endif // HAS_MEDIA diff --git a/Marlin/src/sd/SdVolume.cpp b/Marlin/src/sd/SdVolume.cpp index 8c06c74537..1b8cdbdcae 100644 --- a/Marlin/src/sd/SdVolume.cpp +++ b/Marlin/src/sd/SdVolume.cpp @@ -31,7 +31,7 @@ #include "../inc/MarlinConfig.h" -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA #include "SdVolume.h" @@ -402,4 +402,4 @@ bool SdVolume::init(DiskIODriver * const dev, const uint8_t part) { return true; } -#endif // SDSUPPORT +#endif // HAS_MEDIA diff --git a/Marlin/src/sd/cardreader.cpp b/Marlin/src/sd/cardreader.cpp index 3a377d694d..4e864e5672 100644 --- a/Marlin/src/sd/cardreader.cpp +++ b/Marlin/src/sd/cardreader.cpp @@ -22,7 +22,7 @@ #include "../inc/MarlinConfig.h" -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA //#define DEBUG_CARDREADER @@ -172,7 +172,7 @@ CardReader::CardReader() { workDirDepth = 0; ZERO(workDirParents); - #if BOTH(SDSUPPORT, HAS_SD_DETECT) + #if BOTH(HAS_MEDIA, HAS_SD_DETECT) SET_INPUT_PULLUP(SD_DETECT_PIN); #endif @@ -1368,4 +1368,4 @@ void CardReader::fileHasFinished() { #endif // POWER_LOSS_RECOVERY -#endif // SDSUPPORT +#endif // HAS_MEDIA diff --git a/Marlin/src/sd/cardreader.h b/Marlin/src/sd/cardreader.h index d5eca9c915..3b7b7debcf 100644 --- a/Marlin/src/sd/cardreader.h +++ b/Marlin/src/sd/cardreader.h @@ -23,7 +23,7 @@ #include "../inc/MarlinConfig.h" -#if ENABLED(SDSUPPORT) +#if HAS_MEDIA extern const char M23_STR[], M24_STR[]; @@ -364,7 +364,7 @@ private: extern CardReader card; -#else // !SDSUPPORT +#else // !HAS_MEDIA #define IS_SD_PRINTING() false #define IS_SD_FETCHING() false @@ -373,4 +373,4 @@ extern CardReader card; #define LONG_FILENAME_LENGTH 0 -#endif // !SDSUPPORT +#endif // !HAS_MEDIA diff --git a/buildroot/share/PlatformIO/scripts/common-dependencies.h b/buildroot/share/PlatformIO/scripts/common-dependencies.h index 344669c49b..9bdcac5db1 100644 --- a/buildroot/share/PlatformIO/scripts/common-dependencies.h +++ b/buildroot/share/PlatformIO/scripts/common-dependencies.h @@ -68,7 +68,7 @@ #if ENABLED(ADVANCED_PAUSE_FEATURE) #define HAS_MENU_FILAMENT #endif - #if ENABLED(SDSUPPORT) + #if HAS_MEDIA #define HAS_MENU_MEDIA #endif #if ENABLED(MIXING_EXTRUDER) diff --git a/ini/features.ini b/ini/features.ini index 3c5eb1adec..a8ee50b9ed 100644 --- a/ini/features.ini +++ b/ini/features.ini @@ -220,7 +220,7 @@ BABYSTEPPING = src_filter=+ Z_PROBE_SLED = src_filter=+ G38_PROBE_TARGET = src_filter=+ MAGNETIC_PARKING_EXTRUDER = src_filter=+ -SDSUPPORT = src_filter=+ + + + + + + +HAS_MEDIA = src_filter=+ + + + + + + HAS_MEDIA_SUBCALLS = src_filter=+ GCODE_REPEAT_MARKERS = src_filter=+ + HAS_EXTRUDERS = src_filter=+ + + diff --git a/ini/samd51.ini b/ini/samd51.ini index d7d9b3a421..70bda9ca52 100644 --- a/ini/samd51.ini +++ b/ini/samd51.ini @@ -22,5 +22,5 @@ lib_deps = ${common.lib_deps} SoftwareSerialM extra_scripts = ${common.extra_scripts} pre:buildroot/share/PlatformIO/scripts/SAMD51_grandcentral_m4.py -custom_marlin.SDSUPPORT = SdFat - Adafruit Fork, Adafruit SPIFlash +custom_marlin.HAS_MEDIA = SdFat - Adafruit Fork, Adafruit SPIFlash debug_tool = jlink From 921591d2b899000e3181a098a069392ac0ac4b42 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 22 Apr 2023 23:15:31 -0500 Subject: [PATCH 214/225] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20SDI?= =?UTF-8?q?O=5FSUPPORT=20=3D>=20ONBOARD=5FSDIO?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/SAMD21/inc/SanityCheck.h | 4 ++-- Marlin/src/HAL/SAMD51/inc/SanityCheck.h | 4 ++-- Marlin/src/HAL/STM32/HAL.cpp | 2 +- Marlin/src/HAL/STM32/sdio.cpp | 4 ++-- Marlin/src/HAL/STM32F1/inc/Conditionals_post.h | 2 +- Marlin/src/inc/Conditionals_post.h | 2 +- Marlin/src/pins/gd32f1/pins_TRIGORILLA_V006.h | 6 +++--- Marlin/src/pins/stm32f1/pins_CHITU3D_common.h | 2 +- Marlin/src/pins/stm32f1/pins_CREALITY_V25S1.h | 2 +- Marlin/src/pins/stm32f1/pins_CREALITY_V4.h | 2 +- Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h | 2 +- Marlin/src/pins/stm32f1/pins_CREALITY_V45x.h | 2 +- Marlin/src/pins/stm32f1/pins_CREALITY_V521.h | 2 +- Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h | 2 +- Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h | 2 +- Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h | 2 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h | 4 ++-- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h | 2 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h | 2 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h | 2 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_common.h | 2 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h | 2 +- Marlin/src/pins/stm32f1/pins_SOVOL_V131.h | 2 +- Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h | 2 +- Marlin/src/pins/stm32f4/pins_ANET_ET4.h | 4 ++-- Marlin/src/pins/stm32f4/pins_BLACK_STM32F407VE.h | 4 ++-- Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h | 2 +- Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h | 2 +- Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h | 2 +- Marlin/src/pins/stm32f4/pins_FLYF407ZG.h | 4 ++-- Marlin/src/pins/stm32f4/pins_LERDGE_K.h | 4 ++-- Marlin/src/pins/stm32f4/pins_LERDGE_S.h | 4 ++-- Marlin/src/pins/stm32f4/pins_LERDGE_X.h | 4 ++-- Marlin/src/pins/stm32f4/pins_TRONXY_V10.h | 2 +- Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h | 2 +- 35 files changed, 47 insertions(+), 47 deletions(-) diff --git a/Marlin/src/HAL/SAMD21/inc/SanityCheck.h b/Marlin/src/HAL/SAMD21/inc/SanityCheck.h index 8bf052e3bb..83fafc9689 100644 --- a/Marlin/src/HAL/SAMD21/inc/SanityCheck.h +++ b/Marlin/src/HAL/SAMD21/inc/SanityCheck.h @@ -41,8 +41,8 @@ #error "EMERGENCY_PARSER is not yet implemented for SAMD21. Disable EMERGENCY_PARSER to continue." #endif -#if ENABLED(SDIO_SUPPORT) - #error "SDIO_SUPPORT is not supported on SAMD21." +#if ENABLED(ONBOARD_SDIO) + #error "ONBOARD_SDIO is not supported on SAMD21." #endif #if ENABLED(FAST_PWM_FAN) diff --git a/Marlin/src/HAL/SAMD51/inc/SanityCheck.h b/Marlin/src/HAL/SAMD51/inc/SanityCheck.h index f9ff090f75..4719ac6eb8 100644 --- a/Marlin/src/HAL/SAMD51/inc/SanityCheck.h +++ b/Marlin/src/HAL/SAMD51/inc/SanityCheck.h @@ -54,8 +54,8 @@ #error "EMERGENCY_PARSER is not yet implemented for SAMD51. Disable EMERGENCY_PARSER to continue." #endif -#if ENABLED(SDIO_SUPPORT) - #error "SDIO_SUPPORT is not supported on SAMD51." +#if ENABLED(ONBOARD_SDIO) + #error "ONBOARD_SDIO is not supported on SAMD51." #endif #if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY diff --git a/Marlin/src/HAL/STM32/HAL.cpp b/Marlin/src/HAL/STM32/HAL.cpp index d8a12aad7e..ce49f27a8e 100644 --- a/Marlin/src/HAL/STM32/HAL.cpp +++ b/Marlin/src/HAL/STM32/HAL.cpp @@ -70,7 +70,7 @@ void MarlinHAL::init() { constexpr int cpuFreq = F_CPU; UNUSED(cpuFreq); - #if HAS_MEDIA && DISABLED(SDIO_SUPPORT) && (defined(SDSS) && SDSS != -1) + #if HAS_MEDIA && DISABLED(ONBOARD_SDIO) && (defined(SDSS) && SDSS != -1) OUT_WRITE(SDSS, HIGH); // Try to set SDSS inactive before any other SPI users start up #endif diff --git a/Marlin/src/HAL/STM32/sdio.cpp b/Marlin/src/HAL/STM32/sdio.cpp index 72518ef1cc..de388b8e14 100644 --- a/Marlin/src/HAL/STM32/sdio.cpp +++ b/Marlin/src/HAL/STM32/sdio.cpp @@ -26,7 +26,7 @@ #include "../../inc/MarlinConfig.h" -#if ENABLED(SDIO_SUPPORT) +#if ENABLED(ONBOARD_SDIO) #include "sdio.h" @@ -453,5 +453,5 @@ uint32_t SDIO_GetCardSize() { return (uint32_t)(hsd.SdCard.BlockNbr) * (hsd.SdCard.BlockSize); } -#endif // SDIO_SUPPORT +#endif // ONBOARD_SDIO #endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32F1/inc/Conditionals_post.h b/Marlin/src/HAL/STM32F1/inc/Conditionals_post.h index 228e869688..5a4bde16a5 100644 --- a/Marlin/src/HAL/STM32F1/inc/Conditionals_post.h +++ b/Marlin/src/HAL/STM32F1/inc/Conditionals_post.h @@ -30,5 +30,5 @@ // Allow for no media drives #if !HAS_MEDIA - #undef SDIO_SUPPORT + #undef ONBOARD_SDIO #endif diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index bf4810cd8a..de983dd608 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -545,7 +545,7 @@ #endif #if DISABLED(USB_FLASH_DRIVE_SUPPORT) || BOTH(MULTI_VOLUME, VOLUME_SD_ONBOARD) - #if ENABLED(SDIO_SUPPORT) + #if ENABLED(ONBOARD_SDIO) #define NEED_SD2CARD_SDIO 1 #else #define NEED_SD2CARD_SPI 1 diff --git a/Marlin/src/pins/gd32f1/pins_TRIGORILLA_V006.h b/Marlin/src/pins/gd32f1/pins_TRIGORILLA_V006.h index f09f633220..ee4376c50a 100644 --- a/Marlin/src/pins/gd32f1/pins_TRIGORILLA_V006.h +++ b/Marlin/src/pins/gd32f1/pins_TRIGORILLA_V006.h @@ -115,10 +115,10 @@ // #define SD_DETECT_PIN PC7 -#ifndef SDIO_SUPPORT - #define SDIO_SUPPORT +#ifndef ONBOARD_SDIO + #define ONBOARD_SDIO #endif -#if ENABLED(SDIO_SUPPORT) +#if ENABLED(ONBOARD_SDIO) // // SPI // diff --git a/Marlin/src/pins/stm32f1/pins_CHITU3D_common.h b/Marlin/src/pins/stm32f1/pins_CHITU3D_common.h index c85c107bd9..22f78350cf 100644 --- a/Marlin/src/pins/stm32f1/pins_CHITU3D_common.h +++ b/Marlin/src/pins/stm32f1/pins_CHITU3D_common.h @@ -169,7 +169,7 @@ // // SD Card // -#define SDIO_SUPPORT +#define ONBOARD_SDIO #define SD_DETECT_PIN -1 // PF0, but it isn't connected #define SDIO_CLOCK 4500000 #define SDIO_READ_RETRIES 16 diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V25S1.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V25S1.h index 9e422e62b0..f78bad624d 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V25S1.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V25S1.h @@ -127,7 +127,7 @@ #define SDCARD_CONNECTION ONBOARD #define ON_BOARD_SPI_DEVICE 1 #define ONBOARD_SD_CS_PIN PC12 // SDSS -#define SDIO_SUPPORT +#define ONBOARD_SDIO #define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer // diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h index c028deaa99..fd96799372 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h @@ -159,7 +159,7 @@ // #define SD_DETECT_PIN PC7 #define SDCARD_CONNECTION ONBOARD -#define SDIO_SUPPORT +#define ONBOARD_SDIO #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) diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h index 12a5e5ea51..7a7ec35508 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h @@ -140,7 +140,7 @@ #define SDCARD_CONNECTION ONBOARD #define ONBOARD_SPI_DEVICE 1 #define ONBOARD_SD_CS_PIN PA4 // SDSS -#define SDIO_SUPPORT +#define ONBOARD_SDIO #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) diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V45x.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V45x.h index a9ff02d1f4..d592b4808a 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V45x.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V45x.h @@ -105,7 +105,7 @@ #define SD_DETECT_PIN PC7 #define NO_SD_HOST_DRIVE // SD is only seen by the printer -#define SDIO_SUPPORT // Extra added by Creality +#define ONBOARD_SDIO // Extra added by Creality #define SDIO_CLOCK 6000000 // In original source code overridden by Creality in sdio.h // diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V521.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V521.h index c3b66b034a..e54469afff 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V521.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V521.h @@ -144,7 +144,7 @@ #define SDCARD_CONNECTION ONBOARD #define ONBOARD_SPI_DEVICE 1 #define ONBOARD_SD_CS_PIN PC11 // SDSS -#define SDIO_SUPPORT +#define ONBOARD_SDIO #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) diff --git a/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h b/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h index 4978f84abe..a02b270337 100644 --- a/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h +++ b/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h @@ -256,7 +256,7 @@ #define SD_SS_PIN -1 #define SD_DETECT_PIN PD12 // SD_CD (if -1 no detection) #else - #define SDIO_SUPPORT + #define ONBOARD_SDIO #define SDIO_CLOCK 4500000 // 4.5 MHz #define SDIO_READ_RETRIES 16 #define ONBOARD_SPI_DEVICE 1 // SPI1 diff --git a/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h b/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h index b1498d13b9..168317d8b5 100644 --- a/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h +++ b/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h @@ -158,7 +158,7 @@ #define LCD_BRIGHTNESS_DEFAULT TFT_BACKLIGHT_PWM #endif -#if ENABLED(SDIO_SUPPORT) +#if ENABLED(ONBOARD_SDIO) #define SD_SS_PIN -1 // else SDSS set to PA4 in M43 (spi_pins.h) #endif diff --git a/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h b/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h index cc26942002..a7fc323ba0 100644 --- a/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h @@ -120,7 +120,7 @@ #define SDCARD_CONNECTION ONBOARD #endif -#define SDIO_SUPPORT +#define ONBOARD_SDIO #define SDIO_CLOCK 4500000 // 4.5 MHz #define SDIO_READ_RETRIES 16 diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h index 5f290d153d..e53ffa008b 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h @@ -197,10 +197,10 @@ // SPI1(PA7) & SPI3(PB5) not available #define SPI_DEVICE 2 -#define SDIO_SUPPORT +#define ONBOARD_SDIO #define SDIO_CLOCK 4500000 #define SDIO_READ_RETRIES 16 -#if ENABLED(SDIO_SUPPORT) +#if ENABLED(ONBOARD_SDIO) #define SD_SCK_PIN PB13 // SPI2 #define SD_MISO_PIN PB14 // SPI2 #define SD_MOSI_PIN PB15 // SPI2 diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h index 052bed202b..3ec2c2cfd9 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h @@ -239,7 +239,7 @@ #endif #if SD_CONNECTION_IS(ONBOARD) - #define SDIO_SUPPORT + #define ONBOARD_SDIO #define SDIO_CLOCK 4500000 // 4.5 MHz #define SD_DETECT_PIN PD12 #define ONBOARD_SD_CS_PIN PC11 diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h index 46c2fa8065..3a50465a9a 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h @@ -133,7 +133,7 @@ #define SDCARD_CONNECTION ONBOARD #endif -#define SDIO_SUPPORT +#define ONBOARD_SDIO #define SDIO_CLOCK 4500000 // 4.5 MHz #define SD_DETECT_PIN PD12 #define ONBOARD_SPI_DEVICE 1 // SPI1 diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h index d37d4a10de..6f641f20dd 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h @@ -239,7 +239,7 @@ #endif #if SD_CONNECTION_IS(ONBOARD) - #define SDIO_SUPPORT + #define ONBOARD_SDIO #define SDIO_CLOCK 4500000 // 4.5 MHz #define SD_DETECT_PIN PD12 #define ONBOARD_SD_CS_PIN PC11 diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_common.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_common.h index 28dd19938b..a329b8a4bb 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_common.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_common.h @@ -163,7 +163,7 @@ #define SDCARD_CONNECTION ONBOARD #endif -#define SDIO_SUPPORT +#define ONBOARD_SDIO #define SDIO_CLOCK 4500000 // 4.5 MHz #define SD_DETECT_PIN PD12 #define ONBOARD_SD_CS_PIN PC11 diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h index 2a212f1b4a..922caa556e 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h @@ -210,7 +210,7 @@ #define SD_MOSI_PIN PB15 #define SD_SS_PIN PG6 #elif SD_CONNECTION_IS(ONBOARD) - #define SDIO_SUPPORT + #define ONBOARD_SDIO #define SD_DETECT_PIN PD12 #define ONBOARD_SD_CS_PIN PC11 #elif SD_CONNECTION_IS(CUSTOM_CABLE) diff --git a/Marlin/src/pins/stm32f1/pins_SOVOL_V131.h b/Marlin/src/pins/stm32f1/pins_SOVOL_V131.h index 97ba7f7fec..ee50f32738 100644 --- a/Marlin/src/pins/stm32f1/pins_SOVOL_V131.h +++ b/Marlin/src/pins/stm32f1/pins_SOVOL_V131.h @@ -187,7 +187,7 @@ #define SDCARD_CONNECTION ONBOARD #define ONBOARD_SPI_DEVICE 1 #define ONBOARD_SD_CS_PIN PA4 // SDSS -#define SDIO_SUPPORT +#define ONBOARD_SDIO #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) diff --git a/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h b/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h index d2f3645d94..ff2bf5fd8e 100644 --- a/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h +++ b/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h @@ -186,7 +186,7 @@ // SPI1(PA7) & SPI3(PB5) not available #define SPI_DEVICE 2 -#if ENABLED(SDIO_SUPPORT) +#if ENABLED(ONBOARD_SDIO) #define SD_SCK_PIN PB13 // SPI2 ok #define SD_MISO_PIN PB14 // SPI2 ok #define SD_MOSI_PIN PB15 // SPI2 ok diff --git a/Marlin/src/pins/stm32f4/pins_ANET_ET4.h b/Marlin/src/pins/stm32f4/pins_ANET_ET4.h index bd8a2d9762..edfee05166 100644 --- a/Marlin/src/pins/stm32f4/pins_ANET_ET4.h +++ b/Marlin/src/pins/stm32f4/pins_ANET_ET4.h @@ -195,7 +195,7 @@ // // SD Card // -//#define SDIO_SUPPORT +//#define ONBOARD_SDIO #ifndef SDCARD_CONNECTION #define SDCARD_CONNECTION CUSTOM_CABLE @@ -203,7 +203,7 @@ #if HAS_MEDIA - #if DISABLED(SDIO_SUPPORT) + #if DISABLED(ONBOARD_SDIO) #define SOFTWARE_SPI #define SDSS PC11 #define SD_SS_PIN SDSS diff --git a/Marlin/src/pins/stm32f4/pins_BLACK_STM32F407VE.h b/Marlin/src/pins/stm32f4/pins_BLACK_STM32F407VE.h index a4af3f8fe3..025a1fc9f1 100644 --- a/Marlin/src/pins/stm32f4/pins_BLACK_STM32F407VE.h +++ b/Marlin/src/pins/stm32f4/pins_BLACK_STM32F407VE.h @@ -145,8 +145,8 @@ #endif #if SD_CONNECTION_IS(ONBOARD) - #define SDIO_SUPPORT // Use SDIO for onboard SD - #if DISABLED(SDIO_SUPPORT) + #define ONBOARD_SDIO // Use SDIO for onboard SD + #if DISABLED(ONBOARD_SDIO) #define SOFTWARE_SPI // Use soft SPI for onboard SD #define SDSS PC11 #define SD_SCK_PIN PC12 diff --git a/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h b/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h index 0130d60240..7e3f070786 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h @@ -383,7 +383,7 @@ #endif #if SD_CONNECTION_IS(ONBOARD) - #define SDIO_SUPPORT // Use SDIO for onboard SD + #define ONBOARD_SDIO // Use SDIO for onboard SD //#define SDIO_CLOCK 48000000 #define SD_DETECT_PIN PC4 #elif SD_CONNECTION_IS(CUSTOM_CABLE) diff --git a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h index 711050b747..d69d8fbef0 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h @@ -351,7 +351,7 @@ // Must use soft SPI because Marlin's default hardware SPI is tied to LCD's EXP2 // #if SD_CONNECTION_IS(ONBOARD) - #define SDIO_SUPPORT // Use SDIO for onboard SD + #define ONBOARD_SDIO // Use SDIO for onboard SD #ifndef SD_DETECT_STATE #define SD_DETECT_STATE HIGH #elif SD_DETECT_STATE == LOW diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h index 73c2cf9ff8..183927a5a6 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h @@ -372,7 +372,7 @@ #define SD_MOSI_PIN EXP2_06_PIN #define SD_DETECT_PIN EXP2_07_PIN #elif SD_CONNECTION_IS(ONBOARD) - #define SDIO_SUPPORT // Use SDIO for onboard SD + #define ONBOARD_SDIO // Use SDIO for onboard SD #elif SD_CONNECTION_IS(CUSTOM_CABLE) #error "No custom SD drive cable defined for this board." #endif diff --git a/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h b/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h index b9996aa1f2..725d326ec2 100644 --- a/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h +++ b/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h @@ -214,9 +214,9 @@ #if SD_CONNECTION_IS(ONBOARD) - #define SDIO_SUPPORT // Use SDIO for onboard SD + #define ONBOARD_SDIO // Use SDIO for onboard SD - #if DISABLED(SDIO_SUPPORT) + #if DISABLED(ONBOARD_SDIO) #define SOFTWARE_SPI // Use soft SPI for onboard SD #define SDSS PC11 #define SD_SCK_PIN PC12 diff --git a/Marlin/src/pins/stm32f4/pins_LERDGE_K.h b/Marlin/src/pins/stm32f4/pins_LERDGE_K.h index 5471613679..04264ea2e7 100644 --- a/Marlin/src/pins/stm32f4/pins_LERDGE_K.h +++ b/Marlin/src/pins/stm32f4/pins_LERDGE_K.h @@ -217,10 +217,10 @@ // // SD support // -#define SDIO_SUPPORT +#define ONBOARD_SDIO #define SDIO_CLOCK 4800000 #define SD_DETECT_PIN PA8 -#if DISABLED(SDIO_SUPPORT) +#if DISABLED(ONBOARD_SDIO) #define SOFTWARE_SPI #define SD_SCK_PIN PC12 #define SD_MISO_PIN PC8 diff --git a/Marlin/src/pins/stm32f4/pins_LERDGE_S.h b/Marlin/src/pins/stm32f4/pins_LERDGE_S.h index 180235019a..c7c9e3db3b 100644 --- a/Marlin/src/pins/stm32f4/pins_LERDGE_S.h +++ b/Marlin/src/pins/stm32f4/pins_LERDGE_S.h @@ -160,10 +160,10 @@ // // SD support // -#define SDIO_SUPPORT +#define ONBOARD_SDIO #define SDIO_CLOCK 4800000 #define SD_DETECT_PIN PG15 -#if DISABLED(SDIO_SUPPORT) +#if DISABLED(ONBOARD_SDIO) #define SOFTWARE_SPI #define SD_SCK_PIN PC12 #define SD_MISO_PIN PC8 diff --git a/Marlin/src/pins/stm32f4/pins_LERDGE_X.h b/Marlin/src/pins/stm32f4/pins_LERDGE_X.h index 20985f263c..22e7f6e2e2 100644 --- a/Marlin/src/pins/stm32f4/pins_LERDGE_X.h +++ b/Marlin/src/pins/stm32f4/pins_LERDGE_X.h @@ -118,10 +118,10 @@ // // SD support (On board) // -#define SDIO_SUPPORT +#define ONBOARD_SDIO #define SD_DETECT_PIN PA8 #define SDIO_CLOCK 4800000 -#if DISABLED(SDIO_SUPPORT) +#if DISABLED(ONBOARD_SDIO) #define SOFTWARE_SPI #define SD_SCK_PIN PC12 #define SD_MISO_PIN PC8 diff --git a/Marlin/src/pins/stm32f4/pins_TRONXY_V10.h b/Marlin/src/pins/stm32f4/pins_TRONXY_V10.h index 8d2584fe10..1677b45697 100644 --- a/Marlin/src/pins/stm32f4/pins_TRONXY_V10.h +++ b/Marlin/src/pins/stm32f4/pins_TRONXY_V10.h @@ -251,7 +251,7 @@ // // SD Card // -#define SDIO_SUPPORT +#define ONBOARD_SDIO #define SD_DETECT_PIN -1 // PF0, but not connected #define SDIO_CLOCK 4500000 #define SDIO_READ_RETRIES 16 diff --git a/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h b/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h index be56d0d2b7..09b305f700 100644 --- a/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h +++ b/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h @@ -360,7 +360,7 @@ #define SD_MOSI_PIN EXP2_06_PIN #define SD_DETECT_PIN EXP2_07_PIN #elif SD_CONNECTION_IS(ONBOARD) - #define SDIO_SUPPORT + #define ONBOARD_SDIO #define SDIO_CLOCK 24000000 // 24MHz #elif SD_CONNECTION_IS(CUSTOM_CABLE) #error "No custom SD drive cable defined for this board." From f0f7ec88823318c7d778e42b4dc7604120943032 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 23 Apr 2023 00:47:44 -0500 Subject: [PATCH 215/225] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Ste?= =?UTF-8?q?pper::set=5Fdirections()=20=3D>=20apply=5Fdirections()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/feature/bedlevel/bdl/bdl.cpp | 4 ++-- Marlin/src/module/motion.cpp | 6 +++--- Marlin/src/module/stepper.cpp | 2 +- Marlin/src/module/stepper.h | 4 ++-- Marlin/src/module/stepper/trinamic.cpp | 2 +- Marlin/src/module/tool_change.cpp | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Marlin/src/feature/bedlevel/bdl/bdl.cpp b/Marlin/src/feature/bedlevel/bdl/bdl.cpp index e729022f21..5ce5e894ca 100644 --- a/Marlin/src/feature/bedlevel/bdl/bdl.cpp +++ b/Marlin/src/feature/bedlevel/bdl/bdl.cpp @@ -110,7 +110,7 @@ void BDS_Leveling::process() { } else { babystep.set_mm(Z_AXIS, 0); //if (old_cur_z <= cur_z) Z_DIR_WRITE(INVERT_DIR(Z, HIGH)); - stepper.set_directions(); + stepper.apply_directions(); } #endif old_cur_z = cur_z; @@ -119,7 +119,7 @@ void BDS_Leveling::process() { //endstops.update(); } else - stepper.set_directions(); + stepper.apply_directions(); #if ENABLED(DEBUG_OUT_BD) SERIAL_ECHOLNPGM("BD:", tmp & 0x3FF, ", Z:", cur_z, "|", current_position.z); diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp index 589299f2f1..f7671e3135 100644 --- a/Marlin/src/module/motion.cpp +++ b/Marlin/src/module/motion.cpp @@ -1419,13 +1419,13 @@ float get_move_distance(const xyze_pos_t &diff OPTARG(HAS_ROTATIONAL_AXES, bool void idex_set_mirrored_mode(const bool mirr) { idex_mirrored_mode = mirr; - stepper.set_directions(); + stepper.apply_directions(); } void set_duplication_enabled(const bool dupe, const int8_t tool_index/*=-1*/) { extruder_duplication_enabled = dupe; if (tool_index >= 0) active_extruder = tool_index; - stepper.set_directions(); + stepper.apply_directions(); } void idex_set_parked(const bool park/*=true*/) { @@ -1471,7 +1471,7 @@ float get_move_distance(const xyze_pos_t &diff OPTARG(HAS_ROTATIONAL_AXES, bool line_to_current_position(fr_zfast); } } - stepper.set_directions(); + stepper.apply_directions(); idex_set_parked(false); if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("idex_set_parked(false)"); diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index 045df05981..f26e10a4bd 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -608,7 +608,7 @@ void Stepper::disable_all_steppers() { * COREXZ: X_AXIS=A_AXIS and Z_AXIS=C_AXIS * COREYZ: Y_AXIS=B_AXIS and Z_AXIS=C_AXIS */ -void Stepper::set_directions() { +void Stepper::apply_directions() { DIR_WAIT_BEFORE(); diff --git a/Marlin/src/module/stepper.h b/Marlin/src/module/stepper.h index 4c54a5dbf9..63285398cd 100644 --- a/Marlin/src/module/stepper.h +++ b/Marlin/src/module/stepper.h @@ -814,12 +814,12 @@ class Stepper { static void disable_all_steppers(); // Update direction states for all steppers - static void set_directions(); + static void apply_directions(); // Set direction bits and update all stepper DIR states static void set_directions(const axis_bits_t bits) { last_direction_bits = bits; - set_directions(); + apply_directions(); } #if ENABLED(FT_MOTION) diff --git a/Marlin/src/module/stepper/trinamic.cpp b/Marlin/src/module/stepper/trinamic.cpp index 02ae9cb1e4..893ce3f8db 100644 --- a/Marlin/src/module/stepper/trinamic.cpp +++ b/Marlin/src/module/stepper/trinamic.cpp @@ -1010,7 +1010,7 @@ void reset_trinamic_drivers() { TMC_ADV() #endif - stepper.set_directions(); + stepper.apply_directions(); } // TMC Slave Address Conflict Detection diff --git a/Marlin/src/module/tool_change.cpp b/Marlin/src/module/tool_change.cpp index a91f6f742d..cce3669355 100644 --- a/Marlin/src/module/tool_change.cpp +++ b/Marlin/src/module/tool_change.cpp @@ -880,7 +880,7 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0. } // Ensure X axis DIR pertains to the correct carriage - stepper.set_directions(); + stepper.apply_directions(); DEBUG_ECHOLNPGM("Active extruder parked: ", active_extruder_parked ? "yes" : "no"); DEBUG_POS("New extruder (parked)", current_position); From 69f8da468247986225b33e9a373856650746b5d7 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 23 Apr 2023 01:58:01 -0500 Subject: [PATCH 216/225] =?UTF-8?q?=F0=9F=94=A7=20Split=20Changes.h=20from?= =?UTF-8?q?=20SanityCheck.h=20(#25732)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/Changes.h | 665 +++++++++++++++++++++ Marlin/src/inc/Conditionals_post.h | 224 +------ Marlin/src/inc/MarlinConfig.h | 1 + Marlin/src/inc/SanityCheck.h | 693 ++-------------------- Marlin/src/pins/esp32/pins_PANDA_common.h | 8 +- 5 files changed, 726 insertions(+), 865 deletions(-) create mode 100644 Marlin/src/inc/Changes.h diff --git a/Marlin/src/inc/Changes.h b/Marlin/src/inc/Changes.h new file mode 100644 index 0000000000..4b7627adb4 --- /dev/null +++ b/Marlin/src/inc/Changes.h @@ -0,0 +1,665 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2023 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 + +/** + * Changes.h + * + * Alert about Configuration changes at compile-time. + */ + +/** + * Warnings for old configurations + */ +#if WATCH_TEMP_PERIOD > 500 + #error "WATCH_TEMP_PERIOD now uses seconds instead of milliseconds." +#elif DISABLED(THERMAL_PROTECTION_HOTENDS) && (defined(WATCH_TEMP_PERIOD) || defined(THERMAL_PROTECTION_PERIOD)) + #error "Thermal Runaway Protection for hotends is now enabled with THERMAL_PROTECTION_HOTENDS." +#elif DISABLED(THERMAL_PROTECTION_BED) && defined(THERMAL_PROTECTION_BED_PERIOD) + #error "Thermal Runaway Protection for the bed is now enabled with THERMAL_PROTECTION_BED." +#elif defined(NO_FAN_SLOWING_IN_PID_TUNING) + #error "NO_FAN_SLOWING_IN_PID_TUNING is now TEMP_TUNING_MAINTAIN_FAN." +#elif (CORE_IS_XZ || CORE_IS_YZ) && ENABLED(Z_LATE_ENABLE) + #error "Z_LATE_ENABLE can't be used with COREXZ, COREZX, COREYZ, or COREZY." +#elif defined(X_HOME_RETRACT_MM) + #error "[XYZ]_HOME_RETRACT_MM settings have been renamed [XYZ]_HOME_BUMP_MM." +#elif defined(SDCARDDETECTINVERTED) + #error "SDCARDDETECTINVERTED is now SD_DETECT_STATE (HIGH)." +#elif defined(SD_DETECT_INVERTED) + #error "SD_DETECT_INVERTED is now SD_DETECT_STATE (HIGH)." +#elif defined(BTENABLED) + #error "BTENABLED is now BLUETOOTH." +#elif defined(CUSTOM_MENDEL_NAME) + #error "CUSTOM_MENDEL_NAME is now CUSTOM_MACHINE_NAME." +#elif defined(HAS_AUTOMATIC_VERSIONING) + #error "HAS_AUTOMATIC_VERSIONING is now CUSTOM_VERSION_FILE." +#elif defined(USE_AUTOMATIC_VERSIONING) + #error "USE_AUTOMATIC_VERSIONING is now CUSTOM_VERSION_FILE." +#elif defined(SDSLOW) + #error "SDSLOW deprecated. Set SD_SPI_SPEED to SPI_HALF_SPEED instead." +#elif defined(SDEXTRASLOW) + #error "SDEXTRASLOW deprecated. Set SD_SPI_SPEED to SPI_QUARTER_SPEED instead." +#elif defined(FILAMENT_SENSOR) + #error "FILAMENT_SENSOR is now FILAMENT_WIDTH_SENSOR." +#elif defined(ENDSTOPPULLUP_FIL_RUNOUT) + #error "ENDSTOPPULLUP_FIL_RUNOUT is now FIL_RUNOUT_PULLUP." +#elif defined(DISABLE_MAX_ENDSTOPS) || defined(DISABLE_MIN_ENDSTOPS) + #error "DISABLE_MAX_ENDSTOPS and DISABLE_MIN_ENDSTOPS deprecated. Use individual USE_*_PLUG options instead." +#elif defined(LANGUAGE_INCLUDE) + #error "LANGUAGE_INCLUDE has been replaced by LCD_LANGUAGE." +#elif defined(EXTRUDER_OFFSET_X) || defined(EXTRUDER_OFFSET_Y) + #error "EXTRUDER_OFFSET_[XY] is deprecated. Use HOTEND_OFFSET_[XY] instead." +#elif defined(PID_PARAMS_PER_EXTRUDER) + #error "PID_PARAMS_PER_EXTRUDER is deprecated. Use PID_PARAMS_PER_HOTEND instead." +#elif defined(EXTRUDER_WATTS) || defined(BED_WATTS) + #error "EXTRUDER_WATTS and BED_WATTS are deprecated and should be removed." +#elif defined(SERVO_ENDSTOP_ANGLES) + #error "SERVO_ENDSTOP_ANGLES is deprecated. Use Z_SERVO_ANGLES instead." +#elif defined(X_ENDSTOP_SERVO_NR) || defined(Y_ENDSTOP_SERVO_NR) + #error "X_ENDSTOP_SERVO_NR and Y_ENDSTOP_SERVO_NR are deprecated and should be removed." +#elif defined(Z_ENDSTOP_SERVO_NR) + #error "Z_ENDSTOP_SERVO_NR is now Z_PROBE_SERVO_NR." +#elif defined(DEFAULT_XYJERK) + #error "DEFAULT_XYJERK is deprecated. Use DEFAULT_XJERK and DEFAULT_YJERK instead." +#elif defined(XY_TRAVEL_SPEED) + #error "XY_TRAVEL_SPEED is now XY_PROBE_FEEDRATE." +#elif defined(XY_PROBE_SPEED) + #error "XY_PROBE_SPEED is now XY_PROBE_FEEDRATE." +#elif defined(Z_PROBE_SPEED_FAST) + #error "Z_PROBE_SPEED_FAST is now Z_PROBE_FEEDRATE_FAST." +#elif defined(Z_PROBE_SPEED_SLOW) + #error "Z_PROBE_SPEED_SLOW is now Z_PROBE_FEEDRATE_SLOW." +#elif defined(PROBE_SERVO_DEACTIVATION_DELAY) + #error "PROBE_SERVO_DEACTIVATION_DELAY is deprecated. Use DEACTIVATE_SERVOS_AFTER_MOVE instead." +#elif defined(SERVO_DEACTIVATION_DELAY) + #error "SERVO_DEACTIVATION_DELAY is now SERVO_DELAY." +#elif ENABLED(FILAMENTCHANGEENABLE) + #error "FILAMENTCHANGEENABLE is now ADVANCED_PAUSE_FEATURE." +#elif ENABLED(FILAMENT_CHANGE_FEATURE) + #error "FILAMENT_CHANGE_FEATURE is now ADVANCED_PAUSE_FEATURE." +#elif defined(FILAMENT_CHANGE_X_POS) || defined(FILAMENT_CHANGE_Y_POS) + #error "FILAMENT_CHANGE_[XY]_POS is now set with NOZZLE_PARK_POINT." +#elif defined(FILAMENT_CHANGE_Z_ADD) + #error "FILAMENT_CHANGE_Z_ADD is now set with NOZZLE_PARK_POINT." +#elif defined(FILAMENT_CHANGE_XY_FEEDRATE) + #error "FILAMENT_CHANGE_XY_FEEDRATE is now NOZZLE_PARK_XY_FEEDRATE." +#elif defined(FILAMENT_CHANGE_Z_FEEDRATE) + #error "FILAMENT_CHANGE_Z_FEEDRATE is now NOZZLE_PARK_Z_FEEDRATE." +#elif defined(PAUSE_PARK_X_POS) || defined(PAUSE_PARK_Y_POS) + #error "PAUSE_PARK_[XY]_POS is now set with NOZZLE_PARK_POINT." +#elif defined(PAUSE_PARK_Z_ADD) + #error "PAUSE_PARK_Z_ADD is now set with NOZZLE_PARK_POINT." +#elif defined(PAUSE_PARK_XY_FEEDRATE) + #error "PAUSE_PARK_XY_FEEDRATE is now NOZZLE_PARK_XY_FEEDRATE." +#elif defined(PAUSE_PARK_Z_FEEDRATE) + #error "PAUSE_PARK_Z_FEEDRATE is now NOZZLE_PARK_Z_FEEDRATE." +#elif defined(FILAMENT_CHANGE_RETRACT_FEEDRATE) + #error "FILAMENT_CHANGE_RETRACT_FEEDRATE is now PAUSE_PARK_RETRACT_FEEDRATE." +#elif defined(FILAMENT_CHANGE_RETRACT_LENGTH) + #error "FILAMENT_CHANGE_RETRACT_LENGTH is now PAUSE_PARK_RETRACT_LENGTH." +#elif defined(FILAMENT_CHANGE_EXTRUDE_FEEDRATE) + #error "FILAMENT_CHANGE_EXTRUDE_FEEDRATE is now ADVANCED_PAUSE_PURGE_FEEDRATE." +#elif defined(ADVANCED_PAUSE_EXTRUDE_FEEDRATE) + #error "ADVANCED_PAUSE_EXTRUDE_FEEDRATE is now ADVANCED_PAUSE_PURGE_FEEDRATE." +#elif defined(FILAMENT_CHANGE_EXTRUDE_LENGTH) + #error "FILAMENT_CHANGE_EXTRUDE_LENGTH is now ADVANCED_PAUSE_PURGE_LENGTH." +#elif defined(ADVANCED_PAUSE_EXTRUDE_LENGTH) + #error "ADVANCED_PAUSE_EXTRUDE_LENGTH is now ADVANCED_PAUSE_PURGE_LENGTH." +#elif defined(FILAMENT_CHANGE_NOZZLE_TIMEOUT) + #error "FILAMENT_CHANGE_NOZZLE_TIMEOUT is now PAUSE_PARK_NOZZLE_TIMEOUT." +#elif defined(FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS) + #error "FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS is now FILAMENT_CHANGE_ALERT_BEEPS." +#elif defined(FILAMENT_CHANGE_NO_STEPPER_TIMEOUT) + #error "FILAMENT_CHANGE_NO_STEPPER_TIMEOUT is now PAUSE_PARK_NO_STEPPER_TIMEOUT." +#elif defined(PLA_PREHEAT_HOTEND_TEMP) + #error "PLA_PREHEAT_HOTEND_TEMP is now PREHEAT_1_TEMP_HOTEND." +#elif defined(PLA_PREHEAT_HPB_TEMP) + #error "PLA_PREHEAT_HPB_TEMP is now PREHEAT_1_TEMP_BED." +#elif defined(PLA_PREHEAT_FAN_SPEED) + #error "PLA_PREHEAT_FAN_SPEED is now PREHEAT_1_FAN_SPEED." +#elif defined(ABS_PREHEAT_HOTEND_TEMP) + #error "ABS_PREHEAT_HOTEND_TEMP is now PREHEAT_2_TEMP_HOTEND." +#elif defined(ABS_PREHEAT_HPB_TEMP) + #error "ABS_PREHEAT_HPB_TEMP is now PREHEAT_2_TEMP_BED." +#elif defined(ABS_PREHEAT_FAN_SPEED) + #error "ABS_PREHEAT_FAN_SPEED is now PREHEAT_2_FAN_SPEED." +#elif defined(ENDSTOPS_ONLY_FOR_HOMING) + #error "ENDSTOPS_ONLY_FOR_HOMING is deprecated. Use (disable) ENDSTOPS_ALWAYS_ON_DEFAULT instead." +#elif defined(HOMING_FEEDRATE) + #error "HOMING_FEEDRATE is now set using the HOMING_FEEDRATE_MM_M array instead." +#elif (defined(HOMING_FEEDRATE_XY) || defined(HOMING_FEEDRATE_Z)) && !defined(HOMING_FEEDRATE_MM_M) + #error "HOMING_FEEDRATE_XY and HOMING_FEEDRATE_Z are now set using the HOMING_FEEDRATE_MM_M array instead." +#elif defined(MANUAL_HOME_POSITIONS) + #error "MANUAL_HOME_POSITIONS is deprecated. Set MANUAL_[XYZ]_HOME_POS as-needed instead." +#elif defined(PID_ADD_EXTRUSION_RATE) + #error "PID_ADD_EXTRUSION_RATE is now PID_EXTRUSION_SCALING and is DISABLED by default." +#elif defined(Z_RAISE_BEFORE_HOMING) + #error "Z_RAISE_BEFORE_HOMING is now Z_CLEARANCE_FOR_HOMING." +#elif defined(MIN_Z_HEIGHT_FOR_HOMING) + #error "MIN_Z_HEIGHT_FOR_HOMING is now Z_CLEARANCE_FOR_HOMING." +#elif defined(Z_HOMING_HEIGHT) + #error "Z_HOMING_HEIGHT is now Z_CLEARANCE_FOR_HOMING." +#elif defined(Z_RAISE_BEFORE_PROBING) || defined(Z_RAISE_AFTER_PROBING) + #error "Z_RAISE_(BEFORE|AFTER)_PROBING are deprecated. Use Z_CLEARANCE_DEPLOY_PROBE and Z_AFTER_PROBING instead." +#elif defined(Z_RAISE_PROBE_DEPLOY_STOW) || defined(Z_RAISE_BETWEEN_PROBINGS) + #error "Z_RAISE_PROBE_DEPLOY_STOW and Z_RAISE_BETWEEN_PROBINGS are now Z_CLEARANCE_DEPLOY_PROBE and Z_CLEARANCE_BETWEEN_PROBES." +#elif defined(Z_PROBE_DEPLOY_HEIGHT) || defined(Z_PROBE_TRAVEL_HEIGHT) + #error "Z_PROBE_DEPLOY_HEIGHT and Z_PROBE_TRAVEL_HEIGHT are now Z_CLEARANCE_DEPLOY_PROBE and Z_CLEARANCE_BETWEEN_PROBES." +#elif defined(MANUAL_BED_LEVELING) + #error "MANUAL_BED_LEVELING is now LCD_BED_LEVELING." +#elif defined(MESH_HOME_SEARCH_Z) + #error "MESH_HOME_SEARCH_Z is now LCD_PROBE_Z_RANGE." +#elif defined(MANUAL_PROBE_Z_RANGE) + #error "MANUAL_PROBE_Z_RANGE is now LCD_PROBE_Z_RANGE." +#elif !defined(MIN_STEPS_PER_SEGMENT) + #error "Please replace 'const int dropsegments' with '#define MIN_STEPS_PER_SEGMENT' (and increase by 1)." +#elif MIN_STEPS_PER_SEGMENT <= 0 + #error "MIN_STEPS_PER_SEGMENT must be at least 1." +#elif defined(PREVENT_DANGEROUS_EXTRUDE) + #error "PREVENT_DANGEROUS_EXTRUDE is now PREVENT_COLD_EXTRUSION." +#elif defined(SCARA) + #error "SCARA is now MORGAN_SCARA." +#elif defined(ENABLE_AUTO_BED_LEVELING) + #error "ENABLE_AUTO_BED_LEVELING is deprecated. Specify AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR, or AUTO_BED_LEVELING_3POINT." +#elif defined(AUTO_BED_LEVELING_FEATURE) + #error "AUTO_BED_LEVELING_FEATURE is deprecated. Specify AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR, or AUTO_BED_LEVELING_3POINT." +#elif defined(ABL_GRID_POINTS) + #error "ABL_GRID_POINTS is now GRID_MAX_POINTS_X and GRID_MAX_POINTS_Y." +#elif defined(ABL_GRID_POINTS_X) || defined(ABL_GRID_POINTS_Y) + #error "ABL_GRID_POINTS_[XY] is now GRID_MAX_POINTS_[XY]." +#elif defined(ABL_GRID_MAX_POINTS_X) || defined(ABL_GRID_MAX_POINTS_Y) + #error "ABL_GRID_MAX_POINTS_[XY] is now GRID_MAX_POINTS_[XY]." +#elif defined(MESH_NUM_X_POINTS) || defined(MESH_NUM_Y_POINTS) + #error "MESH_NUM_[XY]_POINTS is now GRID_MAX_POINTS_[XY]." +#elif defined(UBL_MESH_NUM_X_POINTS) || defined(UBL_MESH_NUM_Y_POINTS) + #error "UBL_MESH_NUM_[XY]_POINTS is now GRID_MAX_POINTS_[XY]." +#elif defined(UBL_G26_MESH_VALIDATION) + #error "UBL_G26_MESH_VALIDATION is now G26_MESH_VALIDATION." +#elif defined(UBL_MESH_EDIT_ENABLED) + #error "UBL_MESH_EDIT_ENABLED is now G26_MESH_VALIDATION." +#elif defined(UBL_MESH_EDITING) + #error "UBL_MESH_EDITING is now G26_MESH_VALIDATION." +#elif defined(BLTOUCH_HEATERS_OFF) + #error "BLTOUCH_HEATERS_OFF is now PROBING_HEATERS_OFF." +#elif defined(BLTOUCH_V3) + #error "BLTOUCH_V3 is obsolete." +#elif defined(BLTOUCH_FORCE_OPEN_DRAIN_MODE) + #error "BLTOUCH_FORCE_OPEN_DRAIN_MODE is obsolete." +#elif defined(BEEPER) + #error "BEEPER is now BEEPER_PIN." +#elif defined(SDCARDDETECT) + #error "SDCARDDETECT is now SD_DETECT_PIN." +#elif defined(STAT_LED_RED) || defined(STAT_LED_BLUE) + #error "STAT_LED_RED/STAT_LED_BLUE are now STAT_LED_RED_PIN/STAT_LED_BLUE_PIN." +#elif defined(LCD_PIN_BL) + #error "LCD_PIN_BL is now LCD_BACKLIGHT_PIN." +#elif defined(LCD_PIN_RESET) + #error "LCD_PIN_RESET is now LCD_RESET_PIN." +#elif defined(EXTRUDER_0_AUTO_FAN_PIN) || defined(EXTRUDER_1_AUTO_FAN_PIN) || defined(EXTRUDER_2_AUTO_FAN_PIN) || defined(EXTRUDER_3_AUTO_FAN_PIN) + #error "EXTRUDER_[0123]_AUTO_FAN_PIN is now E[0123]_AUTO_FAN_PIN." +#elif defined(min_software_endstops) || defined(max_software_endstops) + #error "(min|max)_software_endstops are now (MIN|MAX)_SOFTWARE_ENDSTOPS." +#elif ENABLED(Z_PROBE_SLED) && defined(SLED_PIN) + #error "Replace SLED_PIN with SOL1_PIN (applies to both Z_PROBE_SLED and SOLENOID_PROBE)." +#elif defined(CONTROLLERFAN_PIN) + #error "CONTROLLERFAN_PIN is now CONTROLLER_FAN_PIN, enabled with USE_CONTROLLER_FAN." +#elif defined(CONTROLLERFAN_SPEED) + #error "CONTROLLERFAN_SPEED is now CONTROLLERFAN_SPEED_ACTIVE." +#elif defined(CONTROLLERFAN_SECS) + #error "CONTROLLERFAN_SECS is now CONTROLLERFAN_IDLE_TIME." +#elif defined(MIN_RETRACT) + #error "MIN_RETRACT is now MIN_AUTORETRACT and MAX_AUTORETRACT." +#elif defined(ADVANCE) + #error "ADVANCE is now LIN_ADVANCE." +#elif defined(LIN_ADVANCE_E_D_RATIO) + #error "LIN_ADVANCE (1.5) no longer uses LIN_ADVANCE_E_D_RATIO." +#elif defined(NEOPIXEL_RGBW_LED) + #error "NEOPIXEL_RGBW_LED is now NEOPIXEL_LED." +#elif ENABLED(DELTA) && defined(DELTA_PROBEABLE_RADIUS) + #error "Remove DELTA_PROBEABLE_RADIUS and use PROBING_MARGIN to inset the probe area instead." +#elif ENABLED(DELTA) && defined(DELTA_CALIBRATION_RADIUS) + #error "Remove DELTA_CALIBRATION_RADIUS and use PROBING_MARGIN to inset the probe area instead." +#elif defined(UBL_MESH_INSET) + #error "UBL_MESH_INSET is now just MESH_INSET." +#elif defined(UBL_MESH_MIN_X) || defined(UBL_MESH_MIN_Y) || defined(UBL_MESH_MAX_X) || defined(UBL_MESH_MAX_Y) + #error "UBL_MESH_(MIN|MAX)_[XY] is now just MESH_(MIN|MAX)_[XY]." +#elif defined(ABL_PROBE_PT_1_X) || defined(ABL_PROBE_PT_1_Y) || defined(ABL_PROBE_PT_2_X) || defined(ABL_PROBE_PT_2_Y) || defined(ABL_PROBE_PT_3_X) || defined(ABL_PROBE_PT_3_Y) + #error "ABL_PROBE_PT_[123]_[XY] is no longer required. Please remove it." +#elif defined(UBL_PROBE_PT_1_X) || defined(UBL_PROBE_PT_1_Y) || defined(UBL_PROBE_PT_2_X) || defined(UBL_PROBE_PT_2_Y) || defined(UBL_PROBE_PT_3_X) || defined(UBL_PROBE_PT_3_Y) + #error "UBL_PROBE_PT_[123]_[XY] is no longer required. Please remove it." +#elif defined(MIN_PROBE_EDGE) + #error "MIN_PROBE_EDGE is now called PROBING_MARGIN." +#elif defined(MIN_PROBE_EDGE_LEFT) + #error "MIN_PROBE_EDGE_LEFT is now called PROBING_MARGIN_LEFT." +#elif defined(MIN_PROBE_EDGE_RIGHT) + #error "MIN_PROBE_EDGE_RIGHT is now called PROBING_MARGIN_RIGHT." +#elif defined(MIN_PROBE_EDGE_FRONT) + #error "MIN_PROBE_EDGE_FRONT is now called PROBING_MARGIN_FRONT." +#elif defined(MIN_PROBE_EDGE_BACK) + #error "MIN_PROBE_EDGE_BACK is now called PROBING_MARGIN_BACK." +#elif defined(LEFT_PROBE_BED_POSITION) + #error "LEFT_PROBE_BED_POSITION is obsolete. Set a margin with PROBING_MARGIN or PROBING_MARGIN_LEFT instead." +#elif defined(RIGHT_PROBE_BED_POSITION) + #error "RIGHT_PROBE_BED_POSITION is obsolete. Set a margin with PROBING_MARGIN or PROBING_MARGIN_RIGHT instead." +#elif defined(FRONT_PROBE_BED_POSITION) + #error "FRONT_PROBE_BED_POSITION is obsolete. Set a margin with PROBING_MARGIN or PROBING_MARGIN_FRONT instead." +#elif defined(BACK_PROBE_BED_POSITION) + #error "BACK_PROBE_BED_POSITION is obsolete. Set a margin with PROBING_MARGIN or PROBING_MARGIN_BACK instead." +#elif defined(ENABLE_MESH_EDIT_GFX_OVERLAY) + #error "ENABLE_MESH_EDIT_GFX_OVERLAY is now MESH_EDIT_GFX_OVERLAY." +#elif defined(BABYSTEP_ZPROBE_GFX_REVERSE) + #error "BABYSTEP_ZPROBE_GFX_REVERSE is now set by OVERLAY_GFX_REVERSE." +#elif defined(UBL_GRANULAR_SEGMENTATION_FOR_CARTESIAN) + #error "UBL_GRANULAR_SEGMENTATION_FOR_CARTESIAN is now SEGMENT_LEVELED_MOVES." +#elif HAS_PID_HEATING && (defined(K1) || !defined(PID_K1)) + #error "K1 is now PID_K1." +#elif defined(PROBE_DOUBLE_TOUCH) + #error "PROBE_DOUBLE_TOUCH is now MULTIPLE_PROBING." +#elif defined(ANET_KEYPAD_LCD) + #error "ANET_KEYPAD_LCD is now ZONESTAR_LCD." +#elif defined(LCD_I2C_SAINSMART_YWROBOT) + #error "LCD_I2C_SAINSMART_YWROBOT is now LCD_SAINSMART_I2C_(1602|2004)." +#elif defined(MEASURED_LOWER_LIMIT) || defined(MEASURED_UPPER_LIMIT) + #error "MEASURED_(UPPER|LOWER)_LIMIT is now FILWIDTH_ERROR_MARGIN." +#elif defined(HAVE_TMCDRIVER) + #error "HAVE_TMCDRIVER is now [AXIS]_DRIVER_TYPE TMC26X." +#elif defined(STEALTHCHOP) + #error "STEALTHCHOP is now STEALTHCHOP_(XY|Z|E)." +#elif defined(HAVE_TMC26X) + #error "HAVE_TMC26X is now [AXIS]_DRIVER_TYPE TMC26X." +#elif defined(HAVE_TMC2130) + #error "HAVE_TMC2130 is now [AXIS]_DRIVER_TYPE TMC2130." +#elif defined(HAVE_TMC2208) + #error "HAVE_TMC2208 is now [AXIS]_DRIVER_TYPE TMC2208." +#elif defined(HAVE_L6470DRIVER) + #error "HAVE_L6470DRIVER is obsolete. L64xx stepper drivers are no longer supported in Marlin." +#elif defined(X_IS_TMC) || defined(X2_IS_TMC) || defined(Y_IS_TMC) || defined(Y2_IS_TMC) || defined(Z_IS_TMC) || defined(Z2_IS_TMC) || defined(Z3_IS_TMC) \ + || defined(E0_IS_TMC) || defined(E1_IS_TMC) || defined(E2_IS_TMC) || defined(E3_IS_TMC) || defined(E4_IS_TMC) || defined(E5_IS_TMC) || defined(E6_IS_TMC) || defined(E7_IS_TMC) + #error "[AXIS]_IS_TMC is now [AXIS]_DRIVER_TYPE TMC26X." +#elif defined(X_IS_TMC26X) || defined(X2_IS_TMC26X) || defined(Y_IS_TMC26X) || defined(Y2_IS_TMC26X) || defined(Z_IS_TMC26X) || defined(Z2_IS_TMC26X) || defined(Z3_IS_TMC26X) \ + || defined(E0_IS_TMC26X) || defined(E1_IS_TMC26X) || defined(E2_IS_TMC26X) || defined(E3_IS_TMC26X) || defined(E4_IS_TMC26X) || defined(E5_IS_TMC26X) || defined(E6_IS_TMC26X) || defined(E7_IS_TMC26X) + #error "[AXIS]_IS_TMC26X is now [AXIS]_DRIVER_TYPE TMC26X." +#elif defined(X_IS_TMC2130) || defined(X2_IS_TMC2130) || defined(Y_IS_TMC2130) || defined(Y2_IS_TMC2130) || defined(Z_IS_TMC2130) || defined(Z2_IS_TMC2130) || defined(Z3_IS_TMC2130) \ + || defined(E0_IS_TMC2130) || defined(E1_IS_TMC2130) || defined(E2_IS_TMC2130) || defined(E3_IS_TMC2130) || defined(E4_IS_TMC2130) || defined(E5_IS_TMC2130) || defined(E6_IS_TMC2130) || defined(E7_IS_TMC2130) + #error "[AXIS]_IS_TMC2130 is now [AXIS]_DRIVER_TYPE TMC2130." +#elif defined(X_IS_TMC2208) || defined(X2_IS_TMC2208) || defined(Y_IS_TMC2208) || defined(Y2_IS_TMC2208) || defined(Z_IS_TMC2208) || defined(Z2_IS_TMC2208) || defined(Z3_IS_TMC2208) \ + || defined(E0_IS_TMC2208) || defined(E1_IS_TMC2208) || defined(E2_IS_TMC2208) || defined(E3_IS_TMC2208) || defined(E4_IS_TMC2208) || defined(E5_IS_TMC2208) || defined(E6_IS_TMC2208) || defined(E7_IS_TMC2208) + #error "[AXIS]_IS_TMC2208 is now [AXIS]_DRIVER_TYPE TMC2208." +#elif defined(AUTOMATIC_CURRENT_CONTROL) + #error "AUTOMATIC_CURRENT_CONTROL is now MONITOR_DRIVER_STATUS." +#elif defined(FILAMENT_CHANGE_LOAD_LENGTH) + #error "FILAMENT_CHANGE_LOAD_LENGTH is now FILAMENT_CHANGE_FAST_LOAD_LENGTH." +#elif defined(LEVEL_CORNERS_INSET) + #error "LEVEL_CORNERS_INSET is now BED_TRAMMING_INSET_LFRB." +#elif defined(BEZIER_JERK_CONTROL) + #error "BEZIER_JERK_CONTROL is now S_CURVE_ACCELERATION." +#elif HAS_JUNCTION_DEVIATION && defined(JUNCTION_DEVIATION_FACTOR) + #error "JUNCTION_DEVIATION_FACTOR is now JUNCTION_DEVIATION_MM." +#elif defined(JUNCTION_ACCELERATION_FACTOR) + #error "JUNCTION_ACCELERATION_FACTOR is obsolete. Delete it from Configuration_adv.h." +#elif defined(JUNCTION_ACCELERATION) + #error "JUNCTION_ACCELERATION is obsolete. Delete it from Configuration_adv.h." +#elif defined(MAX7219_DEBUG_STEPPER_HEAD) + #error "MAX7219_DEBUG_STEPPER_HEAD is now MAX7219_DEBUG_PLANNER_HEAD." +#elif defined(MAX7219_DEBUG_STEPPER_TAIL) + #error "MAX7219_DEBUG_STEPPER_TAIL is now MAX7219_DEBUG_PLANNER_TAIL." +#elif defined(MAX7219_DEBUG_STEPPER_QUEUE) + #error "MAX7219_DEBUG_STEPPER_QUEUE is now MAX7219_DEBUG_PLANNER_QUEUE." +#elif defined(ENDSTOP_NOISE_FILTER) + #error "ENDSTOP_NOISE_FILTER is now ENDSTOP_NOISE_THRESHOLD [2-7]." +#elif defined(RETRACT_ZLIFT) + #error "RETRACT_ZLIFT is now RETRACT_ZRAISE." +#elif defined(TOOLCHANGE_FS_INIT_BEFORE_SWAP) + #error "TOOLCHANGE_FS_INIT_BEFORE_SWAP is now TOOLCHANGE_FS_SLOW_FIRST_PRIME." +#elif defined(TOOLCHANGE_PARK_ZLIFT) || defined(TOOLCHANGE_UNPARK_ZLIFT) + #error "TOOLCHANGE_PARK_ZLIFT and TOOLCHANGE_UNPARK_ZLIFT are now TOOLCHANGE_ZRAISE." +#elif defined(SINGLENOZZLE_TOOLCHANGE_ZRAISE) + #error "SINGLENOZZLE_TOOLCHANGE_ZRAISE is now TOOLCHANGE_ZRAISE." +#elif defined(SINGLENOZZLE_SWAP_LENGTH) + #error "SINGLENOZZLE_SWAP_LENGTH is now TOOLCHANGE_FIL_SWAP_LENGTH." +#elif defined(SINGLENOZZLE_SWAP_RETRACT_SPEED) + #error "SINGLENOZZLE_SWAP_RETRACT_SPEED is now TOOLCHANGE_FIL_SWAP_RETRACT_SPEED." +#elif defined(SINGLENOZZLE_SWAP_PRIME_SPEED) + #error "SINGLENOZZLE_SWAP_PRIME_SPEED is now TOOLCHANGE_FIL_SWAP_PRIME_SPEED." +#elif defined(SINGLENOZZLE_SWAP_PARK) + #error "SINGLENOZZLE_SWAP_PARK is now TOOLCHANGE_PARK." +#elif defined(SINGLENOZZLE_TOOLCHANGE_XY) + #error "SINGLENOZZLE_TOOLCHANGE_XY is now TOOLCHANGE_PARK_XY." +#elif defined(SINGLENOZZLE_PARK_XY_FEEDRATE) + #error "SINGLENOZZLE_PARK_XY_FEEDRATE is now TOOLCHANGE_PARK_XY_FEEDRATE." +#elif defined(PARKING_EXTRUDER_SECURITY_RAISE) + #error "PARKING_EXTRUDER_SECURITY_RAISE is now TOOLCHANGE_ZRAISE." +#elif defined(SWITCHING_TOOLHEAD_SECURITY_RAISE) + #error "SWITCHING_TOOLHEAD_SECURITY_RAISE is now TOOLCHANGE_ZRAISE." +#elif defined(G0_FEEDRATE) && G0_FEEDRATE == 0 + #error "G0_FEEDRATE is now used to set the G0 feedrate." +#elif defined(MBL_Z_STEP) + #error "MBL_Z_STEP is now MESH_EDIT_Z_STEP." +#elif defined(CHDK) + #error "CHDK is now CHDK_PIN." +#elif ANY_PIN( \ + MAX6675_SS, MAX6675_SS2, MAX6675_SS3, MAX6675_CS, MAX6675_CS2, MAX6675_CS3,\ + MAX31855_SS, MAX31855_SS2, MAX31855_SS3, MAX31855_CS, MAX31855_CS2, MAX31855_CS3, \ + MAX31865_SS, MAX31865_SS2, MAX31865_SS3, MAX31865_CS, MAX31865_CS2, MAX31865_CS3) + #warning "MAX*_SS_PIN, MAX*_SS2_PIN, MAX*_SS3_PIN, MAX*_CS_PIN, MAX*_CS2_PIN, and MAX*_CS3_PIN, are obsolete. Please use TEMP_0_CS_PIN/TEMP_1_CS_PIN/TEMP_2_CS_PIN instead." +#elif ANY_PIN(MAX6675_SCK, MAX31855_SCK, MAX31865_SCK) + #warning "MAX*_SCK_PIN is obsolete. Please use TEMP_0_SCK_PIN/TEMP_1_SCK_PIN/TEMP_2_SCK_PIN instead." +#elif ANY_PIN(MAX6675_MISO, MAX6675_DO, MAX31855_MISO, MAX31855_DO, MAX31865_MISO, MAX31865_DO) + #warning "MAX*_MISO_PIN and MAX*_DO_PIN are obsolete. Please use TEMP_0_MISO_PIN/TEMP_1_MISO_PIN/TEMP_2_MISO_PIN instead." +#elif PIN_EXISTS(MAX31865_MOSI) + #warning "MAX31865_MOSI_PIN is obsolete. Please use TEMP_0_MOSI_PIN/TEMP_1_MOSI_PIN/TEMP_2_MOSI_PIN instead." +#elif ANY_PIN(THERMO_CS1_PIN, THERMO_CS2_PIN, THERMO_CS3_PIN, THERMO_DO_PIN, THERMO_SCK_PIN) + #error "THERMO_*_PIN is now TEMP_n_CS_PIN, TEMP_n_SCK_PIN, TEMP_n_MOSI_PIN, TEMP_n_MISO_PIN." +#elif defined(MAX31865_SENSOR_OHMS) + #error "MAX31865_SENSOR_OHMS is now MAX31865_SENSOR_OHMS_0." +#elif defined(MAX31865_CALIBRATION_OHMS) + #error "MAX31865_CALIBRATION_OHMS is now MAX31865_CALIBRATION_OHMS_0." +#elif defined(SPINDLE_LASER_ENABLE) + #error "SPINDLE_LASER_ENABLE is now SPINDLE_FEATURE or LASER_FEATURE." +#elif defined(SPINDLE_LASER_ENABLE_PIN) + #error "SPINDLE_LASER_ENABLE_PIN is now SPINDLE_LASER_ENA_PIN." +#elif defined(SPINDLE_DIR_CHANGE) + #error "SPINDLE_DIR_CHANGE is now SPINDLE_CHANGE_DIR." +#elif defined(SPINDLE_STOP_ON_DIR_CHANGE) + #error "SPINDLE_STOP_ON_DIR_CHANGE is now SPINDLE_CHANGE_DIR_STOP." +#elif defined(SPINDLE_LASER_ACTIVE_HIGH) + #error "SPINDLE_LASER_ACTIVE_HIGH is now SPINDLE_LASER_ACTIVE_STATE." +#elif defined(SPINDLE_LASER_ENABLE_INVERT) + #error "SPINDLE_LASER_ENABLE_INVERT is now SPINDLE_LASER_ACTIVE_STATE." +#elif defined(LASER_POWER_INLINE) + #error "LASER_POWER_INLINE is not required, inline mode is enabled with 'M3 I' and disabled with 'M5 I'." +#elif defined(LASER_POWER_INLINE_TRAPEZOID) + #error "LASER_POWER_INLINE_TRAPEZOID is now LASER_POWER_TRAP." +#elif defined(LASER_POWER_INLINE_TRAPEZOID_CONT) + #error "LASER_POWER_INLINE_TRAPEZOID_CONT is replaced with LASER_POWER_TRAP." +#elif defined(LASER_POWER_INLINE_TRAPEZOID_PER) + #error "LASER_POWER_INLINE_TRAPEZOID_CONT_PER replaced with LASER_POWER_TRAP." +#elif defined(LASER_POWER_INLINE_CONTINUOUS) + #error "LASER_POWER_INLINE_CONTINUOUS is not required, inline mode is enabled with 'M3 I' and disabled with 'M5 I'." +#elif defined(CUTTER_POWER_DISPLAY) + #error "CUTTER_POWER_DISPLAY is now CUTTER_POWER_UNIT." +#elif defined(CHAMBER_HEATER_PIN) + #error "CHAMBER_HEATER_PIN is now HEATER_CHAMBER_PIN." +#elif defined(TMC_Z_CALIBRATION) + #error "TMC_Z_CALIBRATION has been deprecated in favor of MECHANICAL_GANTRY_CALIBRATION." +#elif defined(Z_MIN_PROBE_ENDSTOP) + #error "Z_MIN_PROBE_ENDSTOP is no longer required. Please remove it." +#elif defined(DUAL_NOZZLE_DUPLICATION_MODE) + #error "DUAL_NOZZLE_DUPLICATION_MODE is now MULTI_NOZZLE_DUPLICATION." +#elif defined(MENU_ITEM_CASE_LIGHT) + #error "MENU_ITEM_CASE_LIGHT is now CASE_LIGHT_MENU." +#elif defined(CASE_LIGHT_NEOPIXEL_COLOR) + #error "CASE_LIGHT_NEOPIXEL_COLOR is now CASE_LIGHT_DEFAULT_COLOR." +#elif defined(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED) + #error "ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED is now SD_ABORT_ON_ENDSTOP_HIT." +#elif defined(LPC_SD_LCD) || defined(LPC_SD_ONBOARD) || defined(LPC_SD_CUSTOM_CABLE) + #error "LPC_SD_(LCD|ONBOARD|CUSTOM_CABLE) are now SDCARD_CONNECTION." +#elif defined(USB_SD_DISABLED) + #error "USB_SD_DISABLED is now NO_SD_HOST_DRIVE." +#elif defined(USB_SD_ONBOARD) + #error "USB_SD_ONBOARD is obsolete. Disable NO_SD_HOST_DRIVE instead." +#elif defined(PSU_ACTIVE_HIGH) + #error "PSU_ACTIVE_HIGH is now PSU_ACTIVE_STATE." +#elif POWER_SUPPLY == 1 + #error "Replace POWER_SUPPLY 1 by enabling PSU_CONTROL and setting PSU_ACTIVE_STATE to 'LOW'." +#elif POWER_SUPPLY == 2 + #error "Replace POWER_SUPPLY 2 by enabling PSU_CONTROL and setting PSU_ACTIVE_STATE to 'HIGH'." +#elif defined(POWER_SUPPLY) + #error "POWER_SUPPLY is now obsolete. Please remove it." +#elif defined(MKS_ROBIN_TFT) + #error "MKS_ROBIN_TFT is now FSMC_GRAPHICAL_TFT." +#elif defined(SDPOWER) + #error "SDPOWER is now SDPOWER_PIN." +#elif defined(STRING_SPLASH_LINE1) || defined(STRING_SPLASH_LINE2) + #error "STRING_SPLASH_LINE[12] are now obsolete. Please remove them." +#elif defined(Z_PROBE_ALLEN_KEY_DEPLOY_1_X) || defined(Z_PROBE_ALLEN_KEY_STOW_1_X) + #error "Z_PROBE_ALLEN_KEY_(DEPLOY|STOW) coordinates are now a single setting." +#elif defined(X_PROBE_OFFSET_FROM_EXTRUDER) || defined(Y_PROBE_OFFSET_FROM_EXTRUDER) || defined(Z_PROBE_OFFSET_FROM_EXTRUDER) + #error "[XYZ]_PROBE_OFFSET_FROM_EXTRUDER is now NOZZLE_TO_PROBE_OFFSET." +#elif defined(MIN_PROBE_X) || defined(MIN_PROBE_Y) || defined(MAX_PROBE_X) || defined(MAX_PROBE_Y) + #error "(MIN|MAX)_PROBE_[XY] are now calculated at runtime. Please remove them." +#elif defined(Z_STEPPER_ALIGN_X) || defined(Z_STEPPER_ALIGN_X) + #error "Z_STEPPER_ALIGN_X and Z_STEPPER_ALIGN_Y are now combined as Z_STEPPER_ALIGN_XY." +#elif defined(JUNCTION_DEVIATION) + #error "JUNCTION_DEVIATION is no longer required. (See CLASSIC_JERK). Please remove it." +#elif defined(BABYSTEP_MULTIPLICATOR) + #error "BABYSTEP_MULTIPLICATOR is now BABYSTEP_MULTIPLICATOR_[XY|Z]." +#elif defined(LULZBOT_TOUCH_UI) + #error "LULZBOT_TOUCH_UI is now TOUCH_UI_FTDI_EVE." +#elif defined(PS_DEFAULT_OFF) + #error "PS_DEFAULT_OFF is now PSU_DEFAULT_OFF." +#elif defined(FILAMENT_UNLOAD_RETRACT_LENGTH) + #error "FILAMENT_UNLOAD_RETRACT_LENGTH is now FILAMENT_UNLOAD_PURGE_RETRACT." +#elif defined(FILAMENT_UNLOAD_DELAY) + #error "FILAMENT_UNLOAD_DELAY is now FILAMENT_UNLOAD_PURGE_DELAY." +#elif defined(HOME_USING_SPREADCYCLE) + #error "HOME_USING_SPREADCYCLE is now obsolete. Please remove it." +#elif defined(DGUS_LCD) + #error "DGUS_LCD is now DGUS_LCD_UI ORIGIN|FYSETC|HIPRECY)." +#elif defined(DGUS_SERIAL_PORT) + #error "DGUS_SERIAL_PORT is now LCD_SERIAL_PORT." +#elif defined(DGUS_BAUDRATE) + #error "DGUS_BAUDRATE is now LCD_BAUDRATE." +#elif defined(DGUS_STATS_RX_BUFFER_OVERRUNS) + #error "DGUS_STATS_RX_BUFFER_OVERRUNS is now STATS_RX_BUFFER_OVERRUNS." +#elif defined(ANYCUBIC_LCD_SERIAL_PORT) + #error "ANYCUBIC_LCD_SERIAL_PORT is now LCD_SERIAL_PORT." +#elif defined(INTERNAL_SERIAL_PORT) + #error "INTERNAL_SERIAL_PORT is now MMU2_SERIAL_PORT." +#elif defined(X_DUAL_ENDSTOPS_ADJUSTMENT) || defined(Y_DUAL_ENDSTOPS_ADJUSTMENT) || defined(Z_DUAL_ENDSTOPS_ADJUSTMENT) + #error "[XYZ]_DUAL_ENDSTOPS_ADJUSTMENT is now [XYZ]2_ENDSTOP_ADJUSTMENT." +#elif defined(Z_TRIPLE_ENDSTOPS_ADJUSTMENT2) || defined(Z_TRIPLE_ENDSTOPS_ADJUSTMENT3) + #error "Z_TRIPLE_ENDSTOPS_ADJUSTMENT[23] is now Z[23]_ENDSTOP_ADJUSTMENT." +#elif defined(Z_QUAD_ENDSTOPS_ADJUSTMENT2) || defined(Z_QUAD_ENDSTOPS_ADJUSTMENT3) || defined(Z_QUAD_ENDSTOPS_ADJUSTMENT4) + #error "Z_QUAD_ENDSTOPS_ADJUSTMENT[234] is now Z[234]_ENDSTOP_ADJUSTMENT." +#elif defined(Z_DUAL_STEPPER_DRIVERS) + #error "Z_DUAL_STEPPER_DRIVERS is no longer needed and should be removed." +#elif defined(Z_TRIPLE_STEPPER_DRIVERS) + #error "Z_TRIPLE_STEPPER_DRIVERS is no longer needed and should be removed." +#elif defined(Z_QUAD_STEPPER_DRIVERS) + #error "Z_QUAD_STEPPER_DRIVERS is no longer needed and should be removed." +#elif defined(Z_DUAL_ENDSTOPS) || defined(Z_TRIPLE_ENDSTOPS) || defined(Z_QUAD_ENDSTOPS) + #error "Z_(DUAL|TRIPLE|QUAD)_ENDSTOPS is now Z_MULTI_ENDSTOPS." +#elif defined(DUGS_UI_MOVE_DIS_OPTION) + #error "DUGS_UI_MOVE_DIS_OPTION is spelled DGUS_UI_MOVE_DIS_OPTION." +#elif defined(ORIG_E0_AUTO_FAN_PIN) || defined(ORIG_E1_AUTO_FAN_PIN) || defined(ORIG_E2_AUTO_FAN_PIN) || defined(ORIG_E3_AUTO_FAN_PIN) || defined(ORIG_E4_AUTO_FAN_PIN) || defined(ORIG_E5_AUTO_FAN_PIN) || defined(ORIG_E6_AUTO_FAN_PIN) || defined(ORIG_E7_AUTO_FAN_PIN) + #error "ORIG_Ex_AUTO_FAN_PIN is now just Ex_AUTO_FAN_PIN." +#elif defined(ORIG_CHAMBER_AUTO_FAN_PIN) + #error "ORIG_CHAMBER_AUTO_FAN_PIN is now just CHAMBER_AUTO_FAN_PIN." +#elif defined(HOMING_BACKOFF_MM) + #error "HOMING_BACKOFF_MM is now HOMING_BACKOFF_POST_MM." +#elif defined(X_HOME_BUMP_MM) || defined(Y_HOME_BUMP_MM) || defined(Z_HOME_BUMP_MM) + #error "[XYZ]_HOME_BUMP_MM is now HOMING_BUMP_MM." +#elif defined(DIGIPOT_I2C) + #error "DIGIPOT_I2C is now DIGIPOT_MCP4451 (or DIGIPOT_MCP4018)." +#elif defined(TOUCH_BUTTONS) + #error "TOUCH_BUTTONS is now TOUCH_SCREEN." +#elif defined(LCD_FULL_PIXEL_HEIGHT) || defined(LCD_FULL_PIXEL_WIDTH) + #error "LCD_FULL_PIXEL_(WIDTH|HEIGHT) is deprecated and should be removed." +#elif defined(FSMC_UPSCALE) + #error "FSMC_UPSCALE is now GRAPHICAL_TFT_UPSCALE." +#elif defined(ANYCUBIC_TFT_MODEL) + #error "ANYCUBIC_TFT_MODEL is now ANYCUBIC_LCD_I3MEGA." +#elif defined(EVENT_GCODE_SD_STOP) + #error "EVENT_GCODE_SD_STOP is now EVENT_GCODE_SD_ABORT." +#elif defined(GRAPHICAL_TFT_ROTATE_180) + #error "GRAPHICAL_TFT_ROTATE_180 is now TFT_ROTATION set to TFT_ROTATE_180." +#elif defined(PROBE_OFFSET_START) + #error "PROBE_OFFSET_START is now PROBE_OFFSET_WIZARD_START_Z." +#elif defined(POWER_LOSS_PULL) + #error "POWER_LOSS_PULL is now specifically POWER_LOSS_PULL(UP|DOWN)." +#elif defined(SHORT_MANUAL_Z_MOVE) + #error "SHORT_MANUAL_Z_MOVE is now FINE_MANUAL_MOVE, applying to Z on most printers." +#elif defined(FIL_RUNOUT_INVERTING) + #if FIL_RUNOUT_INVERTING + #error "FIL_RUNOUT_INVERTING true is now FIL_RUNOUT_STATE HIGH." + #else + #error "FIL_RUNOUT_INVERTING false is now FIL_RUNOUT_STATE LOW." + #endif +#elif defined(ASSISTED_TRAMMING_MENU_ITEM) + #error "ASSISTED_TRAMMING_MENU_ITEM is deprecated and should be removed." +#elif defined(UNKNOWN_Z_NO_RAISE) + #error "UNKNOWN_Z_NO_RAISE is replaced by setting Z_IDLE_HEIGHT to Z_MAX_POS." +#elif defined(Z_AFTER_DEACTIVATE) + #error "Z_AFTER_DEACTIVATE is replaced by Z_IDLE_HEIGHT." +#elif defined(MEATPACK) + #error "MEATPACK is now enabled with MEATPACK_ON_SERIAL_PORT_1, MEATPACK_ON_SERIAL_PORT_2, etc." +#elif defined(CUSTOM_USER_MENUS) + #error "CUSTOM_USER_MENUS has been replaced by CUSTOM_MENU_MAIN and CUSTOM_MENU_CONFIG." +#elif defined(MKS_LCD12864) + #error "MKS_LCD12864 is now MKS_LCD12864A or MKS_LCD12864B." +#elif defined(DOGM_SD_PERCENT) + #error "DOGM_SD_PERCENT is now SHOW_PROGRESS_PERCENT." +#elif defined(NEOPIXEL_BKGD_LED_INDEX) + #error "NEOPIXEL_BKGD_LED_INDEX is now NEOPIXEL_BKGD_INDEX_FIRST." +#elif defined(TEMP_SENSOR_1_AS_REDUNDANT) + #error "TEMP_SENSOR_1_AS_REDUNDANT is now TEMP_SENSOR_REDUNDANT, with associated TEMP_SENSOR_REDUNDANT_* config." +#elif defined(MAX_REDUNDANT_TEMP_SENSOR_DIFF) + #error "MAX_REDUNDANT_TEMP_SENSOR_DIFF is now TEMP_SENSOR_REDUNDANT_MAX_DIFF" +#elif defined(LCD_ALEPHOBJECTS_CLCD_UI) + #error "LCD_ALEPHOBJECTS_CLCD_UI is now LCD_LULZBOT_CLCD_UI." +#elif defined(MIN_ARC_SEGMENTS) + #error "MIN_ARC_SEGMENTS is now MIN_CIRCLE_SEGMENTS." +#elif defined(ARC_SEGMENTS_PER_R) + #error "ARC_SUPPORT no longer uses ARC_SEGMENTS_PER_R." +#elif ENABLED(ARC_SUPPORT) && (!defined(MIN_ARC_SEGMENT_MM) || !defined(MAX_ARC_SEGMENT_MM)) + #error "ARC_SUPPORT now requires MIN_ARC_SEGMENT_MM and MAX_ARC_SEGMENT_MM." +#elif defined(LASER_POWER_INLINE) + #error "LASER_POWER_INLINE is obsolete." +#elif defined(SPINDLE_LASER_PWM) + #error "SPINDLE_LASER_PWM (true) is now set with SPINDLE_LASER_USE_PWM (enabled)." +#elif ANY(IS_RAMPS_EEB, IS_RAMPS_EEF, IS_RAMPS_EFB, IS_RAMPS_EFF, IS_RAMPS_SF) + #error "The IS_RAMPS_* conditionals (for heater/fan/bed pins) are now called FET_ORDER_*." +#elif defined(PROBE_TEMP_COMPENSATION) + #error "PROBE_TEMP_COMPENSATION is now set using the PTC_PROBE, PTC_BED, PTC_HOTEND options." +#elif defined(BTC_PROBE_TEMP) + #error "BTC_PROBE_TEMP is now PTC_PROBE_TEMP." +#elif defined(LCD_SCREEN_ROT_90) + #error "LCD_SCREEN_ROT_90 is now LCD_SCREEN_ROTATE with a value of 90." +#elif defined(LCD_SCREEN_ROT_180) + #error "LCD_SCREEN_ROT_180 is now LCD_SCREEN_ROTATE with a value of 180." +#elif defined(LCD_SCREEN_ROT_270) + #error "LCD_SCREEN_ROT_270 is now LCD_SCREEN_ROTATE with a value of 270." +#elif defined(DEFAULT_LCD_BRIGHTNESS) + #error "DEFAULT_LCD_BRIGHTNESS is now LCD_BRIGHTNESS_DEFAULT." +#elif defined(NOZZLE_PARK_X_ONLY) + #error "NOZZLE_PARK_X_ONLY is now NOZZLE_PARK_MOVE 1." +#elif defined(NOZZLE_PARK_Y_ONLY) + #error "NOZZLE_PARK_Y_ONLY is now NOZZLE_PARK_MOVE 2." +#elif defined(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS) + #error "Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS is now just Z_STEPPER_ALIGN_STEPPER_XY." +#elif defined(DWIN_CREALITY_LCD_ENHANCED) + #error "DWIN_CREALITY_LCD_ENHANCED is now DWIN_LCD_PROUI." +#elif defined(LINEAR_AXES) + #error "LINEAR_AXES is now NUM_AXES (to account for rotational axes)." +#elif defined(X_DUAL_STEPPER_DRIVERS) + #error "X_DUAL_STEPPER_DRIVERS is no longer needed and should be removed." +#elif defined(Y_DUAL_STEPPER_DRIVERS) + #error "Y_DUAL_STEPPER_DRIVERS is no longer needed and should be removed." +#elif defined(NUM_Z_STEPPER_DRIVERS) + #error "NUM_Z_STEPPER_DRIVERS is no longer needed and should be removed." +#elif defined(LEVEL_BED_CORNERS) + #error "LEVEL_BED_CORNERS is now LCD_BED_TRAMMING." +#elif defined(LEVEL_CORNERS_INSET_LFRB) || defined(LEVEL_CORNERS_HEIGHT) || defined(LEVEL_CORNERS_Z_HOP) || defined(LEVEL_CORNERS_USE_PROBE) || defined(LEVEL_CORNERS_PROBE_TOLERANCE) || defined(LEVEL_CORNERS_VERIFY_RAISED) || defined(LEVEL_CORNERS_AUDIO_FEEDBACK) + #error "LEVEL_CORNERS_* settings have been renamed BED_TRAMMING_*." +#elif defined(LEVEL_CENTER_TOO) + #error "LEVEL_CENTER_TOO is now BED_TRAMMING_INCLUDE_CENTER." +#elif defined(TOUCH_IDLE_SLEEP) + #error "TOUCH_IDLE_SLEEP (seconds) is now TOUCH_IDLE_SLEEP_MINS (minutes)." +#elif defined(LCD_BACKLIGHT_TIMEOUT) + #error "LCD_BACKLIGHT_TIMEOUT (seconds) is now LCD_BACKLIGHT_TIMEOUT_MINS (minutes)." +#elif defined(LCD_SET_PROGRESS_MANUALLY) + #error "LCD_SET_PROGRESS_MANUALLY is now SET_PROGRESS_MANUALLY." +#elif defined(USE_M73_REMAINING_TIME) + #error "USE_M73_REMAINING_TIME is now SET_REMAINING_TIME." +#elif defined(SHOW_SD_PERCENT) + #error "SHOW_SD_PERCENT is now SHOW_PROGRESS_PERCENT." +#elif defined(LIN_ADVANCE_K) + #error "LIN_ADVANCE_K is now ADVANCE_K." +#elif defined(EXTRA_LIN_ADVANCE_K) + #error "EXTRA_LIN_ADVANCE_K is now ADVANCE_K_EXTRA." +#elif defined(POLAR_SEGMENTS_PER_SECOND) || defined(DELTA_SEGMENTS_PER_SECOND) || defined(SCARA_SEGMENTS_PER_SECOND) || defined(TPARA_SEGMENTS_PER_SECOND) + #error "(POLAR|DELTA|SCARA|TPARA)_SEGMENTS_PER_SECOND is now DEFAULT_SEGMENTS_PER_SECOND." +#elif defined(TMC_SW_MOSI) || defined(TMC_SW_MISO) || defined(TMC_SW_SCK) + #error "TMC_SW_(MOSI|MISO|SCK) is now TMC_SPI_(MOSI|MISO|SCK)." +#elif ANY(DGUS_LCD_UI_ORIGIN, DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY, DGUS_LCD_UI_MKS, DGUS_LCD_UI_RELOADED) && !defined(DGUS_LCD_UI) + #error "DGUS_LCD_UI_[TYPE] is now set using DGUS_LCD_UI TYPE." +#elif defined(DELTA_PRINTABLE_RADIUS) + #error "DELTA_PRINTABLE_RADIUS is now PRINTABLE_RADIUS." +#elif defined(SCARA_PRINTABLE_RADIUS) + #error "SCARA_PRINTABLE_RADIUS is now PRINTABLE_RADIUS." +#elif defined(SCARA_FEEDRATE_SCALING) + #error "SCARA_FEEDRATE_SCALING is now FEEDRATE_SCALING." +#elif defined(MILLISECONDS_PREHEAT_TIME) + #error "MILLISECONDS_PREHEAT_TIME is now PREHEAT_TIME_HOTEND_MS." +#elif defined(EXPERIMENTAL_SCURVE) + #error "EXPERIMENTAL_SCURVE is no longer needed and should be removed." +#elif defined(BABYSTEP_ZPROBE_GFX_OVERLAY) + #error "BABYSTEP_ZPROBE_GFX_OVERLAY is now BABYSTEP_GFX_OVERLAY." +#elif defined(DISABLE_INACTIVE_EXTRUDER) + #error "DISABLE_INACTIVE_EXTRUDER is now DISABLE_OTHER_EXTRUDERS." +#elif defined(INVERT_X_STEP_PIN) || defined(INVERT_Y_STEP_PIN) || defined(INVERT_Z_STEP_PIN) || defined(INVERT_I_STEP_PIN) || defined(INVERT_J_STEP_PIN) || defined(INVERT_K_STEP_PIN) || defined(INVERT_U_STEP_PIN) || defined(INVERT_V_STEP_PIN) || defined(INVERT_W_STEP_PIN) || defined(INVERT_E_STEP_PIN) + #error "INVERT_*_STEP_PIN true is now STEP_STATE_* LOW, and INVERT_*_STEP_PIN false is now STEP_STATE_* HIGH." +#elif defined(PROBE_PT_1_X) || defined(PROBE_PT_1_Y) || defined(PROBE_PT_2_X) || defined(PROBE_PT_2_Y) || defined(PROBE_PT_3_X) || defined(PROBE_PT_3_Y) + #error "PROBE_PT_[123]_[XY] is now defined using PROBE_PT_[123] with an array { x, y }." +#elif defined(SQUARE_WAVE_STEPPING) + #error "SQUARE_WAVE_STEPPING is now EDGE_STEPPING." +#elif defined(FAN_PIN) + #error "FAN_PIN is now FAN0_PIN." +#elif defined(X_MIN_ENDSTOP_INVERTING) || defined(Y_MIN_ENDSTOP_INVERTING) || defined(Z_MIN_ENDSTOP_INVERTING) \ + || defined(I_MIN_ENDSTOP_INVERTING) || defined(J_MIN_ENDSTOP_INVERTING) || defined(K_MIN_ENDSTOP_INVERTING) \ + || defined(U_MIN_ENDSTOP_INVERTING) || defined(V_MIN_ENDSTOP_INVERTING) || defined(W_MIN_ENDSTOP_INVERTING) \ + || defined(X_MAX_ENDSTOP_INVERTING) || defined(Y_MAX_ENDSTOP_INVERTING) || defined(Z_MAX_ENDSTOP_INVERTING) \ + || defined(I_MAX_ENDSTOP_INVERTING) || defined(J_MAX_ENDSTOP_INVERTING) || defined(K_MAX_ENDSTOP_INVERTING) \ + || defined(U_MAX_ENDSTOP_INVERTING) || defined(V_MAX_ENDSTOP_INVERTING) || defined(W_MAX_ENDSTOP_INVERTING) \ + || defined(Z_MIN_PROBE_ENDSTOP_INVERTING) + #error "*_ENDSTOP_INVERTING false/true is now set with *_ENDSTOP_HIT_STATE HIGH/LOW." +#elif defined(DISABLE_INACTIVE_X) || defined(DISABLE_INACTIVE_Y) || defined(DISABLE_INACTIVE_Z) \ + || defined(DISABLE_INACTIVE_I) || defined(DISABLE_INACTIVE_J) || defined(DISABLE_INACTIVE_K) \ + || defined(DISABLE_INACTIVE_U) || defined(DISABLE_INACTIVE_V) || defined(DISABLE_INACTIVE_W) || defined(DISABLE_INACTIVE_E) + #error "DISABLE_INACTIVE_[XYZIJKUVWE] is now DISABLE_IDLE_[XYZIJKUVWE]." +#elif defined(DEFAULT_STEPPER_DEACTIVE_TIME) + #error "DEFAULT_STEPPER_DEACTIVE_TIME is now DEFAULT_STEPPER_TIMEOUT_SEC." +#elif defined(TFT_SHARED_SPI) + #error "TFT_SHARED_SPI is now TFT_SHARED_IO." +#elif defined(LCD_PINS_ENABLE) + #error "LCD_PINS_ENABLE is now LCD_PINS_EN." +#endif + +// L64xx stepper drivers have been removed +#define _L6470 0x6470 +#define _L6474 0x6474 +#define _L6480 0x6480 +#define _POWERSTEP01 0xF00D +#if HAS_DRIVER(L6470) + #error "L6470 stepper drivers are no longer supported in Marlin." +#elif HAS_DRIVER(L6474) + #error "L6474 stepper drivers are no longer supported in Marlin." +#elif HAS_DRIVER(L6480) + #error "L6480 stepper drivers are no longer supported in Marlin." +#elif HAS_DRIVER(POWERSTEP01) + #error "POWERSTEP01 stepper drivers are no longer supported in Marlin." +#endif +#undef _L6470 +#undef _L6474 +#undef _L6480 +#undef _POWERSTEP01 diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index de983dd608..30c2613b03 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -683,213 +683,33 @@ */ #if HAS_MAX_TC - // Translate old _SS, _CS, _SCK, _DO, _DI, _MISO, and _MOSI PIN defines. - #if TEMP_SENSOR_IS_MAX_TC(0) || (TEMP_SENSOR_IS_MAX_TC(REDUNDANT) && REDUNDANT_TEMP_MATCH(SOURCE, E1)) - - #if !PIN_EXISTS(TEMP_0_CS) // SS, CS - #if PIN_EXISTS(MAX6675_SS) - #define TEMP_0_CS_PIN MAX6675_SS_PIN - #elif PIN_EXISTS(MAX6675_CS) - #define TEMP_0_CS_PIN MAX6675_CS_PIN - #elif PIN_EXISTS(MAX31855_SS) - #define TEMP_0_CS_PIN MAX31855_SS_PIN - #elif PIN_EXISTS(MAX31855_CS) - #define TEMP_0_CS_PIN MAX31855_CS_PIN - #elif PIN_EXISTS(MAX31865_SS) - #define TEMP_0_CS_PIN MAX31865_SS_PIN - #elif PIN_EXISTS(MAX31865_CS) - #define TEMP_0_CS_PIN MAX31865_CS_PIN - #endif + // Software SPI - enable if MISO/SCK are defined. + #if (TEMP_SENSOR_IS_MAX_TC(0) || (TEMP_SENSOR_IS_MAX_TC(REDUNDANT) && REDUNDANT_TEMP_MATCH(SOURCE, E1))) \ + && PIN_EXISTS(TEMP_0_MISO) && PIN_EXISTS(TEMP_0_SCK) && DISABLED(TEMP_SENSOR_0_FORCE_HW_SPI) + #if TEMP_SENSOR_0_IS_MAX31865 && !PIN_EXISTS(TEMP_0_MOSI) + #error "TEMP_SENSOR_0 MAX31865 requires TEMP_0_MOSI_PIN defined for Software SPI. To use Hardware SPI instead, undefine MISO/SCK or enable TEMP_SENSOR_0_FORCE_HW_SPI." + #else + #define TEMP_SENSOR_0_HAS_SPI_PINS 1 #endif + #endif - #if TEMP_SENSOR_0_IS_MAX6675 - #if !PIN_EXISTS(TEMP_0_MISO) // DO - #if PIN_EXISTS(MAX6675_MISO) - #define TEMP_0_MISO_PIN MAX6675_MISO_PIN - #elif PIN_EXISTS(MAX6675_DO) - #define TEMP_0_MISO_PIN MAX6675_DO_PIN - #endif - #endif - #if !PIN_EXISTS(TEMP_0_SCK) && PIN_EXISTS(MAX6675_SCK) - #define TEMP_0_SCK_PIN MAX6675_SCK_PIN - #endif - - #elif TEMP_SENSOR_0_IS_MAX31855 - #if !PIN_EXISTS(TEMP_0_MISO) // DO - #if PIN_EXISTS(MAX31855_MISO) - #define TEMP_0_MISO_PIN MAX31855_MISO_PIN - #elif PIN_EXISTS(MAX31855_DO) - #define TEMP_0_MISO_PIN MAX31855_DO_PIN - #endif - #endif - #if !PIN_EXISTS(TEMP_0_SCK) && PIN_EXISTS(MAX31855_SCK) - #define TEMP_0_SCK_PIN MAX31855_SCK_PIN - #endif - - #elif TEMP_SENSOR_0_IS_MAX31865 - #if !PIN_EXISTS(TEMP_0_MISO) // DO - #if PIN_EXISTS(MAX31865_MISO) - #define TEMP_0_MISO_PIN MAX31865_MISO_PIN - #elif PIN_EXISTS(MAX31865_DO) - #define TEMP_0_MISO_PIN MAX31865_DO_PIN - #endif - #endif - #if !PIN_EXISTS(TEMP_0_SCK) && PIN_EXISTS(MAX31865_SCK) - #define TEMP_0_SCK_PIN MAX31865_SCK_PIN - #endif - #if !PIN_EXISTS(TEMP_0_MOSI) && PIN_EXISTS(MAX31865_MOSI) // MOSI for '65 only - #define TEMP_0_MOSI_PIN MAX31865_MOSI_PIN - #endif + #if (TEMP_SENSOR_IS_MAX_TC(1) || (TEMP_SENSOR_IS_MAX_TC(REDUNDANT) && REDUNDANT_TEMP_MATCH(SOURCE, E1))) \ + && PIN_EXISTS(TEMP_1_MISO) && PIN_EXISTS(TEMP_1_SCK) && DISABLED(TEMP_SENSOR_1_FORCE_HW_SPI) + #if TEMP_SENSOR_1_IS_MAX31865 && !PIN_EXISTS(TEMP_1_MOSI) + #error "TEMP_SENSOR_1 MAX31865 requires TEMP_1_MOSI_PIN defined for Software SPI. To use Hardware SPI instead, undefine MISO/SCK or enable TEMP_SENSOR_1_FORCE_HW_SPI." + #else + #define TEMP_SENSOR_1_HAS_SPI_PINS 1 #endif + #endif - // Software SPI - enable if MISO/SCK are defined. - #if PIN_EXISTS(TEMP_0_MISO) && PIN_EXISTS(TEMP_0_SCK) && DISABLED(TEMP_SENSOR_0_FORCE_HW_SPI) - #if TEMP_SENSOR_0_IS_MAX31865 && !PIN_EXISTS(TEMP_0_MOSI) - #error "TEMP_SENSOR_0 MAX31865 requires TEMP_0_MOSI_PIN defined for Software SPI. To use Hardware SPI instead, undefine MISO/SCK or enable TEMP_SENSOR_0_FORCE_HW_SPI." - #else - #define TEMP_SENSOR_0_HAS_SPI_PINS 1 - #endif + #if (TEMP_SENSOR_IS_MAX_TC(2) || (TEMP_SENSOR_IS_MAX_TC(REDUNDANT) && REDUNDANT_TEMP_MATCH(SOURCE, E2))) \ + && PIN_EXISTS(TEMP_2_MISO) && PIN_EXISTS(TEMP_2_SCK) && DISABLED(TEMP_SENSOR_2_FORCE_HW_SPI) + #if TEMP_SENSOR_2_IS_MAX31865 && !PIN_EXISTS(TEMP_2_MOSI) + #error "TEMP_SENSOR_2 MAX31865 requires TEMP_2_MOSI_PIN defined for Software SPI. To use Hardware SPI instead, undefine MISO/SCK or enable TEMP_SENSOR_2_FORCE_HW_SPI." + #else + #define TEMP_SENSOR_2_HAS_SPI_PINS 1 #endif - - #endif // TEMP_SENSOR_IS_MAX_TC(0) - - #if TEMP_SENSOR_IS_MAX_TC(1) || (TEMP_SENSOR_IS_MAX_TC(REDUNDANT) && REDUNDANT_TEMP_MATCH(SOURCE, E1)) - - #if !PIN_EXISTS(TEMP_1_CS) // SS2, CS2 - #if PIN_EXISTS(MAX6675_SS2) - #define TEMP_1_CS_PIN MAX6675_SS2_PIN - #elif PIN_EXISTS(MAX6675_CS) - #define TEMP_1_CS_PIN MAX6675_CS2_PIN - #elif PIN_EXISTS(MAX31855_SS2) - #define TEMP_1_CS_PIN MAX31855_SS2_PIN - #elif PIN_EXISTS(MAX31855_CS2) - #define TEMP_1_CS_PIN MAX31855_CS2_PIN - #elif PIN_EXISTS(MAX31865_SS2) - #define TEMP_1_CS_PIN MAX31865_SS2_PIN - #elif PIN_EXISTS(MAX31865_CS2) - #define TEMP_1_CS_PIN MAX31865_CS2_PIN - #endif - #endif - - #if TEMP_SENSOR_1_IS_MAX6675 - #if !PIN_EXISTS(TEMP_1_MISO) // DO - #if PIN_EXISTS(MAX6675_MISO) - #define TEMP_1_MISO_PIN MAX6675_MISO_PIN - #elif PIN_EXISTS(MAX6675_DO) - #define TEMP_1_MISO_PIN MAX6675_DO_PIN - #endif - #endif - #if !PIN_EXISTS(TEMP_1_SCK) && PIN_EXISTS(MAX6675_SCK) - #define TEMP_1_SCK_PIN MAX6675_SCK_PIN - #endif - - #elif TEMP_SENSOR_1_IS_MAX31855 - #if !PIN_EXISTS(TEMP_1_MISO) // DO - #if PIN_EXISTS(MAX31855_MISO) - #define TEMP_1_MISO_PIN MAX31855_MISO_PIN - #elif PIN_EXISTS(MAX31855_DO) - #define TEMP_1_MISO_PIN MAX31855_DO_PIN - #endif - #endif - #if !PIN_EXISTS(TEMP_1_SCK) && PIN_EXISTS(MAX31855_SCK) - #define TEMP_1_SCK_PIN MAX31855_SCK_PIN - #endif - - #elif TEMP_SENSOR_1_IS_MAX31865 - #if !PIN_EXISTS(TEMP_1_MISO) // DO - #if PIN_EXISTS(MAX31865_MISO) - #define TEMP_1_MISO_PIN MAX31865_MISO_PIN - #elif PIN_EXISTS(MAX31865_DO) - #define TEMP_1_MISO_PIN MAX31865_DO_PIN - #endif - #endif - #if !PIN_EXISTS(TEMP_1_SCK) && PIN_EXISTS(MAX31865_SCK) - #define TEMP_1_SCK_PIN MAX31865_SCK_PIN - #endif - #if !PIN_EXISTS(TEMP_1_MOSI) && PIN_EXISTS(MAX31865_MOSI) // MOSI for '65 only - #define TEMP_1_MOSI_PIN MAX31865_MOSI_PIN - #endif - #endif - - // Software SPI - enable if MISO/SCK are defined. - #if PIN_EXISTS(TEMP_1_MISO) && PIN_EXISTS(TEMP_1_SCK) && DISABLED(TEMP_SENSOR_1_FORCE_HW_SPI) - #if TEMP_SENSOR_1_IS_MAX31865 && !PIN_EXISTS(TEMP_1_MOSI) - #error "TEMP_SENSOR_1 MAX31865 requires TEMP_1_MOSI_PIN defined for Software SPI. To use Hardware SPI instead, undefine MISO/SCK or enable TEMP_SENSOR_1_FORCE_HW_SPI." - #else - #define TEMP_SENSOR_1_HAS_SPI_PINS 1 - #endif - #endif - - #endif // TEMP_SENSOR_IS_MAX_TC(1) - - #if TEMP_SENSOR_IS_MAX_TC(2) || (TEMP_SENSOR_IS_MAX_TC(REDUNDANT) && REDUNDANT_TEMP_MATCH(SOURCE, E2)) - - #if !PIN_EXISTS(TEMP_2_CS) // SS3, CS3 - #if PIN_EXISTS(MAX6675_SS3) - #define TEMP_2_CS_PIN MAX6675_SS3_PIN - #elif PIN_EXISTS(MAX6675_CS) - #define TEMP_2_CS_PIN MAX6675_CS3_PIN - #elif PIN_EXISTS(MAX31855_SS3) - #define TEMP_2_CS_PIN MAX31855_SS3_PIN - #elif PIN_EXISTS(MAX31855_CS3) - #define TEMP_2_CS_PIN MAX31855_CS3_PIN - #elif PIN_EXISTS(MAX31865_SS3) - #define TEMP_2_CS_PIN MAX31865_SS3_PIN - #elif PIN_EXISTS(MAX31865_CS3) - #define TEMP_2_CS_PIN MAX31865_CS3_PIN - #endif - #endif - - #if TEMP_SENSOR_2_IS_MAX6675 - #if !PIN_EXISTS(TEMP_2_MISO) // DO - #if PIN_EXISTS(MAX6675_MISO) - #define TEMP_2_MISO_PIN MAX6675_MISO_PIN - #elif PIN_EXISTS(MAX6675_DO) - #define TEMP_2_MISO_PIN MAX6675_DO_PIN - #endif - #endif - #if !PIN_EXISTS(TEMP_2_SCK) && PIN_EXISTS(MAX6675_SCK) - #define TEMP_2_SCK_PIN MAX6675_SCK_PIN - #endif - - #elif TEMP_SENSOR_2_IS_MAX31855 - #if !PIN_EXISTS(TEMP_2_MISO) // DO - #if PIN_EXISTS(MAX31855_MISO) - #define TEMP_2_MISO_PIN MAX31855_MISO_PIN - #elif PIN_EXISTS(MAX31855_DO) - #define TEMP_2_MISO_PIN MAX31855_DO_PIN - #endif - #endif - #if !PIN_EXISTS(TEMP_2_SCK) && PIN_EXISTS(MAX31855_SCK) - #define TEMP_2_SCK_PIN MAX31855_SCK_PIN - #endif - - #elif TEMP_SENSOR_2_IS_MAX31865 - #if !PIN_EXISTS(TEMP_2_MISO) // DO - #if PIN_EXISTS(MAX31865_MISO) - #define TEMP_2_MISO_PIN MAX31865_MISO_PIN - #elif PIN_EXISTS(MAX31865_DO) - #define TEMP_2_MISO_PIN MAX31865_DO_PIN - #endif - #endif - #if !PIN_EXISTS(TEMP_2_SCK) && PIN_EXISTS(MAX31865_SCK) - #define TEMP_2_SCK_PIN MAX31865_SCK_PIN - #endif - #if !PIN_EXISTS(TEMP_2_MOSI) && PIN_EXISTS(MAX31865_MOSI) // MOSI for '65 only - #define TEMP_2_MOSI_PIN MAX31865_MOSI_PIN - #endif - #endif - - // Software SPI - enable if MISO/SCK are defined. - #if PIN_EXISTS(TEMP_2_MISO) && PIN_EXISTS(TEMP_2_SCK) && DISABLED(TEMP_SENSOR_2_FORCE_HW_SPI) - #if TEMP_SENSOR_2_IS_MAX31865 && !PIN_EXISTS(TEMP_2_MOSI) - #error "TEMP_SENSOR_2 MAX31865 requires TEMP_2_MOSI_PIN defined for Software SPI. To use Hardware SPI instead, undefine MISO/SCK or enable TEMP_SENSOR_2_FORCE_HW_SPI." - #else - #define TEMP_SENSOR_2_HAS_SPI_PINS 1 - #endif - #endif - - #endif // TEMP_SENSOR_IS_MAX_TC(2) + #endif // // User-defined thermocouple libraries diff --git a/Marlin/src/inc/MarlinConfig.h b/Marlin/src/inc/MarlinConfig.h index 8fdb4b9bae..ad11cc67b2 100644 --- a/Marlin/src/inc/MarlinConfig.h +++ b/Marlin/src/inc/MarlinConfig.h @@ -46,6 +46,7 @@ #include "../core/types.h" // Ahead of sanity-checks + #include "Changes.h" #include "SanityCheck.h" #include HAL_PATH(../HAL, inc/SanityCheck.h) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 40e76b6149..f496a4e880 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -89,643 +89,28 @@ */ #ifndef MOTHERBOARD #error "MOTHERBOARD is required. You must '#define MOTHERBOARD BOARD_MYNAME' (not just '#define BOARD_MYNAME')." -#elif !defined(X_BED_SIZE) || !defined(Y_BED_SIZE) - #error "X_BED_SIZE and Y_BED_SIZE are now required!" -#elif WATCH_TEMP_PERIOD > 500 - #error "WATCH_TEMP_PERIOD now uses seconds instead of milliseconds." -#elif DISABLED(THERMAL_PROTECTION_HOTENDS) && (defined(WATCH_TEMP_PERIOD) || defined(THERMAL_PROTECTION_PERIOD)) - #error "Thermal Runaway Protection for hotends is now enabled with THERMAL_PROTECTION_HOTENDS." -#elif DISABLED(THERMAL_PROTECTION_BED) && defined(THERMAL_PROTECTION_BED_PERIOD) - #error "Thermal Runaway Protection for the bed is now enabled with THERMAL_PROTECTION_BED." -#elif defined(NO_FAN_SLOWING_IN_PID_TUNING) - #error "NO_FAN_SLOWING_IN_PID_TUNING is now TEMP_TUNING_MAINTAIN_FAN." -#elif (CORE_IS_XZ || CORE_IS_YZ) && ENABLED(Z_LATE_ENABLE) - #error "Z_LATE_ENABLE can't be used with COREXZ, COREZX, COREYZ, or COREZY." -#elif defined(X_HOME_RETRACT_MM) - #error "[XYZ]_HOME_RETRACT_MM settings have been renamed [XYZ]_HOME_BUMP_MM." -#elif defined(SDCARDDETECTINVERTED) - #error "SDCARDDETECTINVERTED is now SD_DETECT_STATE (HIGH)." -#elif defined(SD_DETECT_INVERTED) - #error "SD_DETECT_INVERTED is now SD_DETECT_STATE (HIGH)." -#elif defined(BTENABLED) - #error "BTENABLED is now BLUETOOTH." -#elif defined(CUSTOM_MENDEL_NAME) - #error "CUSTOM_MENDEL_NAME is now CUSTOM_MACHINE_NAME." -#elif defined(HAS_AUTOMATIC_VERSIONING) - #error "HAS_AUTOMATIC_VERSIONING is now CUSTOM_VERSION_FILE." -#elif defined(USE_AUTOMATIC_VERSIONING) - #error "USE_AUTOMATIC_VERSIONING is now CUSTOM_VERSION_FILE." -#elif defined(SDSLOW) - #error "SDSLOW deprecated. Set SD_SPI_SPEED to SPI_HALF_SPEED instead." -#elif defined(SDEXTRASLOW) - #error "SDEXTRASLOW deprecated. Set SD_SPI_SPEED to SPI_QUARTER_SPEED instead." -#elif defined(FILAMENT_SENSOR) - #error "FILAMENT_SENSOR is now FILAMENT_WIDTH_SENSOR." -#elif defined(ENDSTOPPULLUP_FIL_RUNOUT) - #error "ENDSTOPPULLUP_FIL_RUNOUT is now FIL_RUNOUT_PULLUP." -#elif defined(DISABLE_MAX_ENDSTOPS) || defined(DISABLE_MIN_ENDSTOPS) - #error "DISABLE_MAX_ENDSTOPS and DISABLE_MIN_ENDSTOPS deprecated. Use individual USE_*_PLUG options instead." -#elif defined(LANGUAGE_INCLUDE) - #error "LANGUAGE_INCLUDE has been replaced by LCD_LANGUAGE." -#elif defined(EXTRUDER_OFFSET_X) || defined(EXTRUDER_OFFSET_Y) - #error "EXTRUDER_OFFSET_[XY] is deprecated. Use HOTEND_OFFSET_[XY] instead." -#elif defined(PID_PARAMS_PER_EXTRUDER) - #error "PID_PARAMS_PER_EXTRUDER is deprecated. Use PID_PARAMS_PER_HOTEND instead." -#elif defined(EXTRUDER_WATTS) || defined(BED_WATTS) - #error "EXTRUDER_WATTS and BED_WATTS are deprecated and should be removed." -#elif defined(SERVO_ENDSTOP_ANGLES) - #error "SERVO_ENDSTOP_ANGLES is deprecated. Use Z_SERVO_ANGLES instead." -#elif defined(X_ENDSTOP_SERVO_NR) || defined(Y_ENDSTOP_SERVO_NR) - #error "X_ENDSTOP_SERVO_NR and Y_ENDSTOP_SERVO_NR are deprecated and should be removed." -#elif defined(Z_ENDSTOP_SERVO_NR) - #error "Z_ENDSTOP_SERVO_NR is now Z_PROBE_SERVO_NR." -#elif defined(DEFAULT_XYJERK) - #error "DEFAULT_XYJERK is deprecated. Use DEFAULT_XJERK and DEFAULT_YJERK instead." -#elif defined(XY_TRAVEL_SPEED) - #error "XY_TRAVEL_SPEED is now XY_PROBE_FEEDRATE." -#elif defined(XY_PROBE_SPEED) - #error "XY_PROBE_SPEED is now XY_PROBE_FEEDRATE." -#elif defined(Z_PROBE_SPEED_FAST) - #error "Z_PROBE_SPEED_FAST is now Z_PROBE_FEEDRATE_FAST." -#elif defined(Z_PROBE_SPEED_SLOW) - #error "Z_PROBE_SPEED_SLOW is now Z_PROBE_FEEDRATE_SLOW." -#elif defined(PROBE_SERVO_DEACTIVATION_DELAY) - #error "PROBE_SERVO_DEACTIVATION_DELAY is deprecated. Use DEACTIVATE_SERVOS_AFTER_MOVE instead." -#elif defined(SERVO_DEACTIVATION_DELAY) - #error "SERVO_DEACTIVATION_DELAY is now SERVO_DELAY." -#elif ENABLED(FILAMENTCHANGEENABLE) - #error "FILAMENTCHANGEENABLE is now ADVANCED_PAUSE_FEATURE." -#elif ENABLED(FILAMENT_CHANGE_FEATURE) - #error "FILAMENT_CHANGE_FEATURE is now ADVANCED_PAUSE_FEATURE." -#elif defined(FILAMENT_CHANGE_X_POS) || defined(FILAMENT_CHANGE_Y_POS) - #error "FILAMENT_CHANGE_[XY]_POS is now set with NOZZLE_PARK_POINT." -#elif defined(FILAMENT_CHANGE_Z_ADD) - #error "FILAMENT_CHANGE_Z_ADD is now set with NOZZLE_PARK_POINT." -#elif defined(FILAMENT_CHANGE_XY_FEEDRATE) - #error "FILAMENT_CHANGE_XY_FEEDRATE is now NOZZLE_PARK_XY_FEEDRATE." -#elif defined(FILAMENT_CHANGE_Z_FEEDRATE) - #error "FILAMENT_CHANGE_Z_FEEDRATE is now NOZZLE_PARK_Z_FEEDRATE." -#elif defined(PAUSE_PARK_X_POS) || defined(PAUSE_PARK_Y_POS) - #error "PAUSE_PARK_[XY]_POS is now set with NOZZLE_PARK_POINT." -#elif defined(PAUSE_PARK_Z_ADD) - #error "PAUSE_PARK_Z_ADD is now set with NOZZLE_PARK_POINT." -#elif defined(PAUSE_PARK_XY_FEEDRATE) - #error "PAUSE_PARK_XY_FEEDRATE is now NOZZLE_PARK_XY_FEEDRATE." -#elif defined(PAUSE_PARK_Z_FEEDRATE) - #error "PAUSE_PARK_Z_FEEDRATE is now NOZZLE_PARK_Z_FEEDRATE." -#elif defined(FILAMENT_CHANGE_RETRACT_FEEDRATE) - #error "FILAMENT_CHANGE_RETRACT_FEEDRATE is now PAUSE_PARK_RETRACT_FEEDRATE." -#elif defined(FILAMENT_CHANGE_RETRACT_LENGTH) - #error "FILAMENT_CHANGE_RETRACT_LENGTH is now PAUSE_PARK_RETRACT_LENGTH." -#elif defined(FILAMENT_CHANGE_EXTRUDE_FEEDRATE) - #error "FILAMENT_CHANGE_EXTRUDE_FEEDRATE is now ADVANCED_PAUSE_PURGE_FEEDRATE." -#elif defined(ADVANCED_PAUSE_EXTRUDE_FEEDRATE) - #error "ADVANCED_PAUSE_EXTRUDE_FEEDRATE is now ADVANCED_PAUSE_PURGE_FEEDRATE." -#elif defined(FILAMENT_CHANGE_EXTRUDE_LENGTH) - #error "FILAMENT_CHANGE_EXTRUDE_LENGTH is now ADVANCED_PAUSE_PURGE_LENGTH." -#elif defined(ADVANCED_PAUSE_EXTRUDE_LENGTH) - #error "ADVANCED_PAUSE_EXTRUDE_LENGTH is now ADVANCED_PAUSE_PURGE_LENGTH." -#elif defined(FILAMENT_CHANGE_NOZZLE_TIMEOUT) - #error "FILAMENT_CHANGE_NOZZLE_TIMEOUT is now PAUSE_PARK_NOZZLE_TIMEOUT." -#elif defined(FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS) - #error "FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS is now FILAMENT_CHANGE_ALERT_BEEPS." -#elif defined(FILAMENT_CHANGE_NO_STEPPER_TIMEOUT) - #error "FILAMENT_CHANGE_NO_STEPPER_TIMEOUT is now PAUSE_PARK_NO_STEPPER_TIMEOUT." -#elif defined(PLA_PREHEAT_HOTEND_TEMP) - #error "PLA_PREHEAT_HOTEND_TEMP is now PREHEAT_1_TEMP_HOTEND." -#elif defined(PLA_PREHEAT_HPB_TEMP) - #error "PLA_PREHEAT_HPB_TEMP is now PREHEAT_1_TEMP_BED." -#elif defined(PLA_PREHEAT_FAN_SPEED) - #error "PLA_PREHEAT_FAN_SPEED is now PREHEAT_1_FAN_SPEED." -#elif defined(ABS_PREHEAT_HOTEND_TEMP) - #error "ABS_PREHEAT_HOTEND_TEMP is now PREHEAT_2_TEMP_HOTEND." -#elif defined(ABS_PREHEAT_HPB_TEMP) - #error "ABS_PREHEAT_HPB_TEMP is now PREHEAT_2_TEMP_BED." -#elif defined(ABS_PREHEAT_FAN_SPEED) - #error "ABS_PREHEAT_FAN_SPEED is now PREHEAT_2_FAN_SPEED." -#elif defined(ENDSTOPS_ONLY_FOR_HOMING) - #error "ENDSTOPS_ONLY_FOR_HOMING is deprecated. Use (disable) ENDSTOPS_ALWAYS_ON_DEFAULT instead." -#elif defined(HOMING_FEEDRATE) - #error "HOMING_FEEDRATE is now set using the HOMING_FEEDRATE_MM_M array instead." -#elif (defined(HOMING_FEEDRATE_XY) || defined(HOMING_FEEDRATE_Z)) && !defined(HOMING_FEEDRATE_MM_M) - #error "HOMING_FEEDRATE_XY and HOMING_FEEDRATE_Z are now set using the HOMING_FEEDRATE_MM_M array instead." -#elif defined(MANUAL_HOME_POSITIONS) - #error "MANUAL_HOME_POSITIONS is deprecated. Set MANUAL_[XYZ]_HOME_POS as-needed instead." -#elif defined(PID_ADD_EXTRUSION_RATE) - #error "PID_ADD_EXTRUSION_RATE is now PID_EXTRUSION_SCALING and is DISABLED by default." -#elif defined(Z_RAISE_BEFORE_HOMING) - #error "Z_RAISE_BEFORE_HOMING is now Z_CLEARANCE_FOR_HOMING." -#elif defined(MIN_Z_HEIGHT_FOR_HOMING) - #error "MIN_Z_HEIGHT_FOR_HOMING is now Z_CLEARANCE_FOR_HOMING." -#elif defined(Z_HOMING_HEIGHT) - #error "Z_HOMING_HEIGHT is now Z_CLEARANCE_FOR_HOMING." -#elif defined(Z_RAISE_BEFORE_PROBING) || defined(Z_RAISE_AFTER_PROBING) - #error "Z_RAISE_(BEFORE|AFTER)_PROBING are deprecated. Use Z_CLEARANCE_DEPLOY_PROBE and Z_AFTER_PROBING instead." -#elif defined(Z_RAISE_PROBE_DEPLOY_STOW) || defined(Z_RAISE_BETWEEN_PROBINGS) - #error "Z_RAISE_PROBE_DEPLOY_STOW and Z_RAISE_BETWEEN_PROBINGS are now Z_CLEARANCE_DEPLOY_PROBE and Z_CLEARANCE_BETWEEN_PROBES." -#elif defined(Z_PROBE_DEPLOY_HEIGHT) || defined(Z_PROBE_TRAVEL_HEIGHT) - #error "Z_PROBE_DEPLOY_HEIGHT and Z_PROBE_TRAVEL_HEIGHT are now Z_CLEARANCE_DEPLOY_PROBE and Z_CLEARANCE_BETWEEN_PROBES." -#elif defined(MANUAL_BED_LEVELING) - #error "MANUAL_BED_LEVELING is now LCD_BED_LEVELING." -#elif defined(MESH_HOME_SEARCH_Z) - #error "MESH_HOME_SEARCH_Z is now LCD_PROBE_Z_RANGE." -#elif defined(MANUAL_PROBE_Z_RANGE) - #error "MANUAL_PROBE_Z_RANGE is now LCD_PROBE_Z_RANGE." -#elif !defined(MIN_STEPS_PER_SEGMENT) - #error "Please replace 'const int dropsegments' with '#define MIN_STEPS_PER_SEGMENT' (and increase by 1)." -#elif MIN_STEPS_PER_SEGMENT <= 0 - #error "MIN_STEPS_PER_SEGMENT must be at least 1." -#elif defined(PREVENT_DANGEROUS_EXTRUDE) - #error "PREVENT_DANGEROUS_EXTRUDE is now PREVENT_COLD_EXTRUSION." -#elif defined(SCARA) - #error "SCARA is now MORGAN_SCARA." -#elif defined(ENABLE_AUTO_BED_LEVELING) - #error "ENABLE_AUTO_BED_LEVELING is deprecated. Specify AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR, or AUTO_BED_LEVELING_3POINT." -#elif defined(AUTO_BED_LEVELING_FEATURE) - #error "AUTO_BED_LEVELING_FEATURE is deprecated. Specify AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR, or AUTO_BED_LEVELING_3POINT." -#elif defined(ABL_GRID_POINTS) - #error "ABL_GRID_POINTS is now GRID_MAX_POINTS_X and GRID_MAX_POINTS_Y." -#elif defined(ABL_GRID_POINTS_X) || defined(ABL_GRID_POINTS_Y) - #error "ABL_GRID_POINTS_[XY] is now GRID_MAX_POINTS_[XY]." -#elif defined(ABL_GRID_MAX_POINTS_X) || defined(ABL_GRID_MAX_POINTS_Y) - #error "ABL_GRID_MAX_POINTS_[XY] is now GRID_MAX_POINTS_[XY]." -#elif defined(MESH_NUM_X_POINTS) || defined(MESH_NUM_Y_POINTS) - #error "MESH_NUM_[XY]_POINTS is now GRID_MAX_POINTS_[XY]." -#elif defined(UBL_MESH_NUM_X_POINTS) || defined(UBL_MESH_NUM_Y_POINTS) - #error "UBL_MESH_NUM_[XY]_POINTS is now GRID_MAX_POINTS_[XY]." -#elif defined(UBL_G26_MESH_VALIDATION) - #error "UBL_G26_MESH_VALIDATION is now G26_MESH_VALIDATION." -#elif defined(UBL_MESH_EDIT_ENABLED) - #error "UBL_MESH_EDIT_ENABLED is now G26_MESH_VALIDATION." -#elif defined(UBL_MESH_EDITING) - #error "UBL_MESH_EDITING is now G26_MESH_VALIDATION." -#elif defined(BLTOUCH_HEATERS_OFF) - #error "BLTOUCH_HEATERS_OFF is now PROBING_HEATERS_OFF." -#elif defined(BLTOUCH_V3) - #error "BLTOUCH_V3 is obsolete." -#elif defined(BLTOUCH_FORCE_OPEN_DRAIN_MODE) - #error "BLTOUCH_FORCE_OPEN_DRAIN_MODE is obsolete." -#elif defined(BEEPER) - #error "BEEPER is now BEEPER_PIN." -#elif defined(SDCARDDETECT) - #error "SDCARDDETECT is now SD_DETECT_PIN." -#elif defined(STAT_LED_RED) || defined(STAT_LED_BLUE) - #error "STAT_LED_RED/STAT_LED_BLUE are now STAT_LED_RED_PIN/STAT_LED_BLUE_PIN." -#elif defined(LCD_PIN_BL) - #error "LCD_PIN_BL is now LCD_BACKLIGHT_PIN." -#elif defined(LCD_PIN_RESET) - #error "LCD_PIN_RESET is now LCD_RESET_PIN." -#elif defined(EXTRUDER_0_AUTO_FAN_PIN) || defined(EXTRUDER_1_AUTO_FAN_PIN) || defined(EXTRUDER_2_AUTO_FAN_PIN) || defined(EXTRUDER_3_AUTO_FAN_PIN) - #error "EXTRUDER_[0123]_AUTO_FAN_PIN is now E[0123]_AUTO_FAN_PIN." -#elif defined(PID_FAN_SCALING) && !HAS_FAN - #error "PID_FAN_SCALING needs at least one fan enabled." -#elif defined(min_software_endstops) || defined(max_software_endstops) - #error "(min|max)_software_endstops are now (MIN|MAX)_SOFTWARE_ENDSTOPS." -#elif ENABLED(Z_PROBE_SLED) && defined(SLED_PIN) - #error "Replace SLED_PIN with SOL1_PIN (applies to both Z_PROBE_SLED and SOLENOID_PROBE)." -#elif defined(CONTROLLERFAN_PIN) - #error "CONTROLLERFAN_PIN is now CONTROLLER_FAN_PIN, enabled with USE_CONTROLLER_FAN." -#elif defined(CONTROLLERFAN_SPEED) - #error "CONTROLLERFAN_SPEED is now CONTROLLERFAN_SPEED_ACTIVE." -#elif defined(CONTROLLERFAN_SECS) - #error "CONTROLLERFAN_SECS is now CONTROLLERFAN_IDLE_TIME." -#elif defined(MIN_RETRACT) - #error "MIN_RETRACT is now MIN_AUTORETRACT and MAX_AUTORETRACT." -#elif defined(ADVANCE) - #error "ADVANCE is now LIN_ADVANCE." -#elif defined(LIN_ADVANCE_E_D_RATIO) - #error "LIN_ADVANCE (1.5) no longer uses LIN_ADVANCE_E_D_RATIO." -#elif defined(NEOPIXEL_RGBW_LED) - #error "NEOPIXEL_RGBW_LED is now NEOPIXEL_LED." -#elif ENABLED(DELTA) && defined(DELTA_PROBEABLE_RADIUS) - #error "Remove DELTA_PROBEABLE_RADIUS and use PROBING_MARGIN to inset the probe area instead." -#elif ENABLED(DELTA) && defined(DELTA_CALIBRATION_RADIUS) - #error "Remove DELTA_CALIBRATION_RADIUS and use PROBING_MARGIN to inset the probe area instead." -#elif defined(UBL_MESH_INSET) - #error "UBL_MESH_INSET is now just MESH_INSET." -#elif defined(UBL_MESH_MIN_X) || defined(UBL_MESH_MIN_Y) || defined(UBL_MESH_MAX_X) || defined(UBL_MESH_MAX_Y) - #error "UBL_MESH_(MIN|MAX)_[XY] is now just MESH_(MIN|MAX)_[XY]." -#elif defined(ABL_PROBE_PT_1_X) || defined(ABL_PROBE_PT_1_Y) || defined(ABL_PROBE_PT_2_X) || defined(ABL_PROBE_PT_2_Y) || defined(ABL_PROBE_PT_3_X) || defined(ABL_PROBE_PT_3_Y) - #error "ABL_PROBE_PT_[123]_[XY] is no longer required. Please remove it." -#elif defined(UBL_PROBE_PT_1_X) || defined(UBL_PROBE_PT_1_Y) || defined(UBL_PROBE_PT_2_X) || defined(UBL_PROBE_PT_2_Y) || defined(UBL_PROBE_PT_3_X) || defined(UBL_PROBE_PT_3_Y) - #error "UBL_PROBE_PT_[123]_[XY] is no longer required. Please remove it." -#elif defined(MIN_PROBE_EDGE) - #error "MIN_PROBE_EDGE is now called PROBING_MARGIN." -#elif defined(MIN_PROBE_EDGE_LEFT) - #error "MIN_PROBE_EDGE_LEFT is now called PROBING_MARGIN_LEFT." -#elif defined(MIN_PROBE_EDGE_RIGHT) - #error "MIN_PROBE_EDGE_RIGHT is now called PROBING_MARGIN_RIGHT." -#elif defined(MIN_PROBE_EDGE_FRONT) - #error "MIN_PROBE_EDGE_FRONT is now called PROBING_MARGIN_FRONT." -#elif defined(MIN_PROBE_EDGE_BACK) - #error "MIN_PROBE_EDGE_BACK is now called PROBING_MARGIN_BACK." -#elif defined(LEFT_PROBE_BED_POSITION) - #error "LEFT_PROBE_BED_POSITION is obsolete. Set a margin with PROBING_MARGIN or PROBING_MARGIN_LEFT instead." -#elif defined(RIGHT_PROBE_BED_POSITION) - #error "RIGHT_PROBE_BED_POSITION is obsolete. Set a margin with PROBING_MARGIN or PROBING_MARGIN_RIGHT instead." -#elif defined(FRONT_PROBE_BED_POSITION) - #error "FRONT_PROBE_BED_POSITION is obsolete. Set a margin with PROBING_MARGIN or PROBING_MARGIN_FRONT instead." -#elif defined(BACK_PROBE_BED_POSITION) - #error "BACK_PROBE_BED_POSITION is obsolete. Set a margin with PROBING_MARGIN or PROBING_MARGIN_BACK instead." -#elif defined(ENABLE_MESH_EDIT_GFX_OVERLAY) - #error "ENABLE_MESH_EDIT_GFX_OVERLAY is now MESH_EDIT_GFX_OVERLAY." -#elif defined(BABYSTEP_ZPROBE_GFX_REVERSE) - #error "BABYSTEP_ZPROBE_GFX_REVERSE is now set by OVERLAY_GFX_REVERSE." -#elif defined(UBL_GRANULAR_SEGMENTATION_FOR_CARTESIAN) - #error "UBL_GRANULAR_SEGMENTATION_FOR_CARTESIAN is now SEGMENT_LEVELED_MOVES." -#elif HAS_PID_HEATING && (defined(K1) || !defined(PID_K1)) - #error "K1 is now PID_K1." -#elif defined(PROBE_DOUBLE_TOUCH) - #error "PROBE_DOUBLE_TOUCH is now MULTIPLE_PROBING." -#elif defined(ANET_KEYPAD_LCD) - #error "ANET_KEYPAD_LCD is now ZONESTAR_LCD." -#elif defined(LCD_I2C_SAINSMART_YWROBOT) - #error "LCD_I2C_SAINSMART_YWROBOT is now LCD_SAINSMART_I2C_(1602|2004)." -#elif defined(MEASURED_LOWER_LIMIT) || defined(MEASURED_UPPER_LIMIT) - #error "MEASURED_(UPPER|LOWER)_LIMIT is now FILWIDTH_ERROR_MARGIN." -#elif defined(HAVE_TMCDRIVER) - #error "HAVE_TMCDRIVER is now [AXIS]_DRIVER_TYPE TMC26X." -#elif defined(STEALTHCHOP) - #error "STEALTHCHOP is now STEALTHCHOP_(XY|Z|E)." -#elif defined(HAVE_TMC26X) - #error "HAVE_TMC26X is now [AXIS]_DRIVER_TYPE TMC26X." -#elif defined(HAVE_TMC2130) - #error "HAVE_TMC2130 is now [AXIS]_DRIVER_TYPE TMC2130." -#elif defined(HAVE_TMC2208) - #error "HAVE_TMC2208 is now [AXIS]_DRIVER_TYPE TMC2208." -#elif defined(HAVE_L6470DRIVER) - #error "HAVE_L6470DRIVER is obsolete. L64xx stepper drivers are no longer supported in Marlin." -#elif defined(X_IS_TMC) || defined(X2_IS_TMC) || defined(Y_IS_TMC) || defined(Y2_IS_TMC) || defined(Z_IS_TMC) || defined(Z2_IS_TMC) || defined(Z3_IS_TMC) \ - || defined(E0_IS_TMC) || defined(E1_IS_TMC) || defined(E2_IS_TMC) || defined(E3_IS_TMC) || defined(E4_IS_TMC) || defined(E5_IS_TMC) || defined(E6_IS_TMC) || defined(E7_IS_TMC) - #error "[AXIS]_IS_TMC is now [AXIS]_DRIVER_TYPE TMC26X." -#elif defined(X_IS_TMC26X) || defined(X2_IS_TMC26X) || defined(Y_IS_TMC26X) || defined(Y2_IS_TMC26X) || defined(Z_IS_TMC26X) || defined(Z2_IS_TMC26X) || defined(Z3_IS_TMC26X) \ - || defined(E0_IS_TMC26X) || defined(E1_IS_TMC26X) || defined(E2_IS_TMC26X) || defined(E3_IS_TMC26X) || defined(E4_IS_TMC26X) || defined(E5_IS_TMC26X) || defined(E6_IS_TMC26X) || defined(E7_IS_TMC26X) - #error "[AXIS]_IS_TMC26X is now [AXIS]_DRIVER_TYPE TMC26X." -#elif defined(X_IS_TMC2130) || defined(X2_IS_TMC2130) || defined(Y_IS_TMC2130) || defined(Y2_IS_TMC2130) || defined(Z_IS_TMC2130) || defined(Z2_IS_TMC2130) || defined(Z3_IS_TMC2130) \ - || defined(E0_IS_TMC2130) || defined(E1_IS_TMC2130) || defined(E2_IS_TMC2130) || defined(E3_IS_TMC2130) || defined(E4_IS_TMC2130) || defined(E5_IS_TMC2130) || defined(E6_IS_TMC2130) || defined(E7_IS_TMC2130) - #error "[AXIS]_IS_TMC2130 is now [AXIS]_DRIVER_TYPE TMC2130." -#elif defined(X_IS_TMC2208) || defined(X2_IS_TMC2208) || defined(Y_IS_TMC2208) || defined(Y2_IS_TMC2208) || defined(Z_IS_TMC2208) || defined(Z2_IS_TMC2208) || defined(Z3_IS_TMC2208) \ - || defined(E0_IS_TMC2208) || defined(E1_IS_TMC2208) || defined(E2_IS_TMC2208) || defined(E3_IS_TMC2208) || defined(E4_IS_TMC2208) || defined(E5_IS_TMC2208) || defined(E6_IS_TMC2208) || defined(E7_IS_TMC2208) - #error "[AXIS]_IS_TMC2208 is now [AXIS]_DRIVER_TYPE TMC2208." -#elif defined(AUTOMATIC_CURRENT_CONTROL) - #error "AUTOMATIC_CURRENT_CONTROL is now MONITOR_DRIVER_STATUS." -#elif defined(FILAMENT_CHANGE_LOAD_LENGTH) - #error "FILAMENT_CHANGE_LOAD_LENGTH is now FILAMENT_CHANGE_FAST_LOAD_LENGTH." -#elif defined(LEVEL_CORNERS_INSET) - #error "LEVEL_CORNERS_INSET is now BED_TRAMMING_INSET_LFRB." -#elif defined(BEZIER_JERK_CONTROL) - #error "BEZIER_JERK_CONTROL is now S_CURVE_ACCELERATION." -#elif HAS_JUNCTION_DEVIATION && defined(JUNCTION_DEVIATION_FACTOR) - #error "JUNCTION_DEVIATION_FACTOR is now JUNCTION_DEVIATION_MM." -#elif defined(JUNCTION_ACCELERATION_FACTOR) - #error "JUNCTION_ACCELERATION_FACTOR is obsolete. Delete it from Configuration_adv.h." -#elif defined(JUNCTION_ACCELERATION) - #error "JUNCTION_ACCELERATION is obsolete. Delete it from Configuration_adv.h." -#elif defined(MAX7219_DEBUG_STEPPER_HEAD) - #error "MAX7219_DEBUG_STEPPER_HEAD is now MAX7219_DEBUG_PLANNER_HEAD." -#elif defined(MAX7219_DEBUG_STEPPER_TAIL) - #error "MAX7219_DEBUG_STEPPER_TAIL is now MAX7219_DEBUG_PLANNER_TAIL." -#elif defined(MAX7219_DEBUG_STEPPER_QUEUE) - #error "MAX7219_DEBUG_STEPPER_QUEUE is now MAX7219_DEBUG_PLANNER_QUEUE." -#elif defined(ENDSTOP_NOISE_FILTER) - #error "ENDSTOP_NOISE_FILTER is now ENDSTOP_NOISE_THRESHOLD [2-7]." -#elif defined(RETRACT_ZLIFT) - #error "RETRACT_ZLIFT is now RETRACT_ZRAISE." -#elif defined(TOOLCHANGE_FS_INIT_BEFORE_SWAP) - #error "TOOLCHANGE_FS_INIT_BEFORE_SWAP is now TOOLCHANGE_FS_SLOW_FIRST_PRIME." -#elif defined(TOOLCHANGE_PARK_ZLIFT) || defined(TOOLCHANGE_UNPARK_ZLIFT) - #error "TOOLCHANGE_PARK_ZLIFT and TOOLCHANGE_UNPARK_ZLIFT are now TOOLCHANGE_ZRAISE." -#elif defined(SINGLENOZZLE_TOOLCHANGE_ZRAISE) - #error "SINGLENOZZLE_TOOLCHANGE_ZRAISE is now TOOLCHANGE_ZRAISE." -#elif defined(SINGLENOZZLE_SWAP_LENGTH) - #error "SINGLENOZZLE_SWAP_LENGTH is now TOOLCHANGE_FIL_SWAP_LENGTH." -#elif defined(SINGLENOZZLE_SWAP_RETRACT_SPEED) - #error "SINGLENOZZLE_SWAP_RETRACT_SPEED is now TOOLCHANGE_FIL_SWAP_RETRACT_SPEED." -#elif defined(SINGLENOZZLE_SWAP_PRIME_SPEED) - #error "SINGLENOZZLE_SWAP_PRIME_SPEED is now TOOLCHANGE_FIL_SWAP_PRIME_SPEED." -#elif defined(SINGLENOZZLE_SWAP_PARK) - #error "SINGLENOZZLE_SWAP_PARK is now TOOLCHANGE_PARK." -#elif defined(SINGLENOZZLE_TOOLCHANGE_XY) - #error "SINGLENOZZLE_TOOLCHANGE_XY is now TOOLCHANGE_PARK_XY." -#elif defined(SINGLENOZZLE_PARK_XY_FEEDRATE) - #error "SINGLENOZZLE_PARK_XY_FEEDRATE is now TOOLCHANGE_PARK_XY_FEEDRATE." -#elif defined(PARKING_EXTRUDER_SECURITY_RAISE) - #error "PARKING_EXTRUDER_SECURITY_RAISE is now TOOLCHANGE_ZRAISE." -#elif defined(SWITCHING_TOOLHEAD_SECURITY_RAISE) - #error "SWITCHING_TOOLHEAD_SECURITY_RAISE is now TOOLCHANGE_ZRAISE." -#elif defined(G0_FEEDRATE) && G0_FEEDRATE == 0 - #error "G0_FEEDRATE is now used to set the G0 feedrate." -#elif defined(MBL_Z_STEP) - #error "MBL_Z_STEP is now MESH_EDIT_Z_STEP." -#elif defined(CHDK) - #error "CHDK is now CHDK_PIN." -#elif ANY_PIN( \ - MAX6675_SS, MAX6675_SS2, MAX6675_SS3, MAX6675_CS, MAX6675_CS2, MAX6675_CS3,\ - MAX31855_SS, MAX31855_SS2, MAX31855_SS3, MAX31855_CS, MAX31855_CS2, MAX31855_CS3, \ - MAX31865_SS, MAX31865_SS2, MAX31865_SS3, MAX31865_CS, MAX31865_CS2, MAX31865_CS3) - #warning "MAX*_SS_PIN, MAX*_SS2_PIN, MAX*_SS3_PIN, MAX*_CS_PIN, MAX*_CS2_PIN, and MAX*_CS3_PIN, are deprecated and will be removed in a future version. Please use TEMP_0_CS_PIN/TEMP_1_CS_PIN/TEMP_2_CS_PIN instead." -#elif ANY_PIN(MAX6675_SCK, MAX31855_SCK, MAX31865_SCK) - #warning "MAX*_SCK_PIN is deprecated and will be removed in a future version. Please use TEMP_0_SCK_PIN/TEMP_1_SCK_PIN/TEMP_2_SCK_PIN instead." -#elif ANY_PIN(MAX6675_MISO, MAX6675_DO, MAX31855_MISO, MAX31855_DO, MAX31865_MISO, MAX31865_DO) - #warning "MAX*_MISO_PIN and MAX*_DO_PIN are deprecated and will be removed in a future version. Please use TEMP_0_MISO_PIN/TEMP_1_MISO_PIN/TEMP_2_MISO_PIN instead." -#elif PIN_EXISTS(MAX31865_MOSI) - #warning "MAX31865_MOSI_PIN is deprecated and will be removed in a future version. Please use TEMP_0_MOSI_PIN/TEMP_1_MOSI_PIN/TEMP_2_MOSI_PIN instead." -#elif ANY_PIN(THERMO_CS1_PIN, THERMO_CS2_PIN, THERMO_CS3_PIN, THERMO_DO_PIN, THERMO_SCK_PIN) - #error "THERMO_*_PIN is now TEMP_n_CS_PIN, TEMP_n_SCK_PIN, TEMP_n_MOSI_PIN, TEMP_n_MISO_PIN." -#elif defined(MAX31865_SENSOR_OHMS) - #error "MAX31865_SENSOR_OHMS is now MAX31865_SENSOR_OHMS_0." -#elif defined(MAX31865_CALIBRATION_OHMS) - #error "MAX31865_CALIBRATION_OHMS is now MAX31865_CALIBRATION_OHMS_0." -#elif defined(SPINDLE_LASER_ENABLE) - #error "SPINDLE_LASER_ENABLE is now SPINDLE_FEATURE or LASER_FEATURE." -#elif defined(SPINDLE_LASER_ENABLE_PIN) - #error "SPINDLE_LASER_ENABLE_PIN is now SPINDLE_LASER_ENA_PIN." -#elif defined(SPINDLE_DIR_CHANGE) - #error "SPINDLE_DIR_CHANGE is now SPINDLE_CHANGE_DIR." -#elif defined(SPINDLE_STOP_ON_DIR_CHANGE) - #error "SPINDLE_STOP_ON_DIR_CHANGE is now SPINDLE_CHANGE_DIR_STOP." -#elif defined(SPINDLE_LASER_ACTIVE_HIGH) - #error "SPINDLE_LASER_ACTIVE_HIGH is now SPINDLE_LASER_ACTIVE_STATE." -#elif defined(SPINDLE_LASER_ENABLE_INVERT) - #error "SPINDLE_LASER_ENABLE_INVERT is now SPINDLE_LASER_ACTIVE_STATE." -#elif defined(LASER_POWER_INLINE) - #error "LASER_POWER_INLINE is not required, inline mode is enabled with 'M3 I' and disabled with 'M5 I'." -#elif defined(LASER_POWER_INLINE_TRAPEZOID) - #error "LASER_POWER_INLINE_TRAPEZOID is now LASER_POWER_TRAP." -#elif defined(LASER_POWER_INLINE_TRAPEZOID_CONT) - #error "LASER_POWER_INLINE_TRAPEZOID_CONT is replaced with LASER_POWER_TRAP." -#elif defined(LASER_POWER_INLINE_TRAPEZOID_PER) - #error "LASER_POWER_INLINE_TRAPEZOID_CONT_PER replaced with LASER_POWER_TRAP." -#elif defined(LASER_POWER_INLINE_CONTINUOUS) - #error "LASER_POWER_INLINE_CONTINUOUS is not required, inline mode is enabled with 'M3 I' and disabled with 'M5 I'." -#elif defined(CUTTER_POWER_DISPLAY) - #error "CUTTER_POWER_DISPLAY is now CUTTER_POWER_UNIT." -#elif defined(CHAMBER_HEATER_PIN) - #error "CHAMBER_HEATER_PIN is now HEATER_CHAMBER_PIN." -#elif defined(TMC_Z_CALIBRATION) - #error "TMC_Z_CALIBRATION has been deprecated in favor of MECHANICAL_GANTRY_CALIBRATION." -#elif defined(Z_MIN_PROBE_ENDSTOP) - #error "Z_MIN_PROBE_ENDSTOP is no longer required. Please remove it." -#elif defined(DUAL_NOZZLE_DUPLICATION_MODE) - #error "DUAL_NOZZLE_DUPLICATION_MODE is now MULTI_NOZZLE_DUPLICATION." -#elif defined(MENU_ITEM_CASE_LIGHT) - #error "MENU_ITEM_CASE_LIGHT is now CASE_LIGHT_MENU." -#elif defined(CASE_LIGHT_NEOPIXEL_COLOR) - #error "CASE_LIGHT_NEOPIXEL_COLOR is now CASE_LIGHT_DEFAULT_COLOR." -#elif defined(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED) - #error "ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED is now SD_ABORT_ON_ENDSTOP_HIT." -#elif defined(LPC_SD_LCD) || defined(LPC_SD_ONBOARD) || defined(LPC_SD_CUSTOM_CABLE) - #error "LPC_SD_(LCD|ONBOARD|CUSTOM_CABLE) are now SDCARD_CONNECTION." -#elif defined(USB_SD_DISABLED) - #error "USB_SD_DISABLED is now NO_SD_HOST_DRIVE." -#elif defined(USB_SD_ONBOARD) - #error "USB_SD_ONBOARD is obsolete. Disable NO_SD_HOST_DRIVE instead." -#elif defined(PSU_ACTIVE_HIGH) - #error "PSU_ACTIVE_HIGH is now PSU_ACTIVE_STATE." -#elif POWER_SUPPLY == 1 - #error "Replace POWER_SUPPLY 1 by enabling PSU_CONTROL and setting PSU_ACTIVE_STATE to 'LOW'." -#elif POWER_SUPPLY == 2 - #error "Replace POWER_SUPPLY 2 by enabling PSU_CONTROL and setting PSU_ACTIVE_STATE to 'HIGH'." -#elif defined(POWER_SUPPLY) - #error "POWER_SUPPLY is now obsolete. Please remove it." -#elif defined(MKS_ROBIN_TFT) - #error "MKS_ROBIN_TFT is now FSMC_GRAPHICAL_TFT." -#elif defined(SDPOWER) - #error "SDPOWER is now SDPOWER_PIN." -#elif defined(STRING_SPLASH_LINE1) || defined(STRING_SPLASH_LINE2) - #error "STRING_SPLASH_LINE[12] are now obsolete. Please remove them." -#elif defined(Z_PROBE_ALLEN_KEY_DEPLOY_1_X) || defined(Z_PROBE_ALLEN_KEY_STOW_1_X) - #error "Z_PROBE_ALLEN_KEY_(DEPLOY|STOW) coordinates are now a single setting." -#elif defined(X_PROBE_OFFSET_FROM_EXTRUDER) || defined(Y_PROBE_OFFSET_FROM_EXTRUDER) || defined(Z_PROBE_OFFSET_FROM_EXTRUDER) - #error "[XYZ]_PROBE_OFFSET_FROM_EXTRUDER is now NOZZLE_TO_PROBE_OFFSET." -#elif defined(MIN_PROBE_X) || defined(MIN_PROBE_Y) || defined(MAX_PROBE_X) || defined(MAX_PROBE_Y) - #error "(MIN|MAX)_PROBE_[XY] are now calculated at runtime. Please remove them." -#elif defined(Z_STEPPER_ALIGN_X) || defined(Z_STEPPER_ALIGN_X) - #error "Z_STEPPER_ALIGN_X and Z_STEPPER_ALIGN_Y are now combined as Z_STEPPER_ALIGN_XY." -#elif defined(JUNCTION_DEVIATION) - #error "JUNCTION_DEVIATION is no longer required. (See CLASSIC_JERK). Please remove it." -#elif defined(BABYSTEP_MULTIPLICATOR) - #error "BABYSTEP_MULTIPLICATOR is now BABYSTEP_MULTIPLICATOR_[XY|Z]." -#elif defined(LULZBOT_TOUCH_UI) - #error "LULZBOT_TOUCH_UI is now TOUCH_UI_FTDI_EVE." -#elif defined(PS_DEFAULT_OFF) - #error "PS_DEFAULT_OFF is now PSU_DEFAULT_OFF." -#elif defined(FILAMENT_UNLOAD_RETRACT_LENGTH) - #error "FILAMENT_UNLOAD_RETRACT_LENGTH is now FILAMENT_UNLOAD_PURGE_RETRACT." -#elif defined(FILAMENT_UNLOAD_DELAY) - #error "FILAMENT_UNLOAD_DELAY is now FILAMENT_UNLOAD_PURGE_DELAY." -#elif defined(HOME_USING_SPREADCYCLE) - #error "HOME_USING_SPREADCYCLE is now obsolete. Please remove it." -#elif defined(DGUS_LCD) - #error "DGUS_LCD is now DGUS_LCD_UI ORIGIN|FYSETC|HIPRECY)." -#elif defined(DGUS_SERIAL_PORT) - #error "DGUS_SERIAL_PORT is now LCD_SERIAL_PORT." -#elif defined(DGUS_BAUDRATE) - #error "DGUS_BAUDRATE is now LCD_BAUDRATE." -#elif defined(DGUS_STATS_RX_BUFFER_OVERRUNS) - #error "DGUS_STATS_RX_BUFFER_OVERRUNS is now STATS_RX_BUFFER_OVERRUNS." -#elif defined(ANYCUBIC_LCD_SERIAL_PORT) - #error "ANYCUBIC_LCD_SERIAL_PORT is now LCD_SERIAL_PORT." -#elif defined(INTERNAL_SERIAL_PORT) - #error "INTERNAL_SERIAL_PORT is now MMU2_SERIAL_PORT." -#elif defined(X_DUAL_ENDSTOPS_ADJUSTMENT) || defined(Y_DUAL_ENDSTOPS_ADJUSTMENT) || defined(Z_DUAL_ENDSTOPS_ADJUSTMENT) - #error "[XYZ]_DUAL_ENDSTOPS_ADJUSTMENT is now [XYZ]2_ENDSTOP_ADJUSTMENT." -#elif defined(Z_TRIPLE_ENDSTOPS_ADJUSTMENT2) || defined(Z_TRIPLE_ENDSTOPS_ADJUSTMENT3) - #error "Z_TRIPLE_ENDSTOPS_ADJUSTMENT[23] is now Z[23]_ENDSTOP_ADJUSTMENT." -#elif defined(Z_QUAD_ENDSTOPS_ADJUSTMENT2) || defined(Z_QUAD_ENDSTOPS_ADJUSTMENT3) || defined(Z_QUAD_ENDSTOPS_ADJUSTMENT4) - #error "Z_QUAD_ENDSTOPS_ADJUSTMENT[234] is now Z[234]_ENDSTOP_ADJUSTMENT." -#elif defined(Z_DUAL_STEPPER_DRIVERS) - #error "Z_DUAL_STEPPER_DRIVERS is no longer needed and should be removed." -#elif defined(Z_TRIPLE_STEPPER_DRIVERS) - #error "Z_TRIPLE_STEPPER_DRIVERS is no longer needed and should be removed." -#elif defined(Z_QUAD_STEPPER_DRIVERS) - #error "Z_QUAD_STEPPER_DRIVERS is no longer needed and should be removed." -#elif defined(Z_DUAL_ENDSTOPS) || defined(Z_TRIPLE_ENDSTOPS) || defined(Z_QUAD_ENDSTOPS) - #error "Z_(DUAL|TRIPLE|QUAD)_ENDSTOPS is now Z_MULTI_ENDSTOPS." -#elif defined(DUGS_UI_MOVE_DIS_OPTION) - #error "DUGS_UI_MOVE_DIS_OPTION is spelled DGUS_UI_MOVE_DIS_OPTION." -#elif defined(ORIG_E0_AUTO_FAN_PIN) || defined(ORIG_E1_AUTO_FAN_PIN) || defined(ORIG_E2_AUTO_FAN_PIN) || defined(ORIG_E3_AUTO_FAN_PIN) || defined(ORIG_E4_AUTO_FAN_PIN) || defined(ORIG_E5_AUTO_FAN_PIN) || defined(ORIG_E6_AUTO_FAN_PIN) || defined(ORIG_E7_AUTO_FAN_PIN) - #error "ORIG_Ex_AUTO_FAN_PIN is now just Ex_AUTO_FAN_PIN." -#elif defined(ORIG_CHAMBER_AUTO_FAN_PIN) - #error "ORIG_CHAMBER_AUTO_FAN_PIN is now just CHAMBER_AUTO_FAN_PIN." -#elif defined(HOMING_BACKOFF_MM) - #error "HOMING_BACKOFF_MM is now HOMING_BACKOFF_POST_MM." -#elif defined(X_HOME_BUMP_MM) || defined(Y_HOME_BUMP_MM) || defined(Z_HOME_BUMP_MM) - #error "[XYZ]_HOME_BUMP_MM is now HOMING_BUMP_MM." -#elif defined(DIGIPOT_I2C) - #error "DIGIPOT_I2C is now DIGIPOT_MCP4451 (or DIGIPOT_MCP4018)." -#elif defined(TOUCH_BUTTONS) - #error "TOUCH_BUTTONS is now TOUCH_SCREEN." -#elif defined(LCD_FULL_PIXEL_HEIGHT) || defined(LCD_FULL_PIXEL_WIDTH) - #error "LCD_FULL_PIXEL_(WIDTH|HEIGHT) is deprecated and should be removed." -#elif defined(FSMC_UPSCALE) - #error "FSMC_UPSCALE is now GRAPHICAL_TFT_UPSCALE." -#elif defined(ANYCUBIC_TFT_MODEL) - #error "ANYCUBIC_TFT_MODEL is now ANYCUBIC_LCD_I3MEGA." -#elif defined(EVENT_GCODE_SD_STOP) - #error "EVENT_GCODE_SD_STOP is now EVENT_GCODE_SD_ABORT." -#elif defined(GRAPHICAL_TFT_ROTATE_180) - #error "GRAPHICAL_TFT_ROTATE_180 is now TFT_ROTATION set to TFT_ROTATE_180." -#elif defined(PROBE_OFFSET_START) - #error "PROBE_OFFSET_START is now PROBE_OFFSET_WIZARD_START_Z." -#elif defined(POWER_LOSS_PULL) - #error "POWER_LOSS_PULL is now specifically POWER_LOSS_PULL(UP|DOWN)." -#elif defined(SHORT_MANUAL_Z_MOVE) - #error "SHORT_MANUAL_Z_MOVE is now FINE_MANUAL_MOVE, applying to Z on most printers." -#elif defined(FIL_RUNOUT_INVERTING) - #if FIL_RUNOUT_INVERTING - #error "FIL_RUNOUT_INVERTING true is now FIL_RUNOUT_STATE HIGH." - #else - #error "FIL_RUNOUT_INVERTING false is now FIL_RUNOUT_STATE LOW." - #endif -#elif defined(ASSISTED_TRAMMING_MENU_ITEM) - #error "ASSISTED_TRAMMING_MENU_ITEM is deprecated and should be removed." -#elif defined(UNKNOWN_Z_NO_RAISE) - #error "UNKNOWN_Z_NO_RAISE is replaced by setting Z_IDLE_HEIGHT to Z_MAX_POS." -#elif defined(Z_AFTER_DEACTIVATE) - #error "Z_AFTER_DEACTIVATE is replaced by Z_IDLE_HEIGHT." -#elif defined(MEATPACK) - #error "MEATPACK is now enabled with MEATPACK_ON_SERIAL_PORT_1, MEATPACK_ON_SERIAL_PORT_2, etc." -#elif defined(CUSTOM_USER_MENUS) - #error "CUSTOM_USER_MENUS has been replaced by CUSTOM_MENU_MAIN and CUSTOM_MENU_CONFIG." -#elif defined(MKS_LCD12864) - #error "MKS_LCD12864 is now MKS_LCD12864A or MKS_LCD12864B." -#elif defined(DOGM_SD_PERCENT) - #error "DOGM_SD_PERCENT is now SHOW_PROGRESS_PERCENT." -#elif defined(NEOPIXEL_BKGD_LED_INDEX) - #error "NEOPIXEL_BKGD_LED_INDEX is now NEOPIXEL_BKGD_INDEX_FIRST." -#elif defined(TEMP_SENSOR_1_AS_REDUNDANT) - #error "TEMP_SENSOR_1_AS_REDUNDANT is now TEMP_SENSOR_REDUNDANT, with associated TEMP_SENSOR_REDUNDANT_* config." -#elif defined(MAX_REDUNDANT_TEMP_SENSOR_DIFF) - #error "MAX_REDUNDANT_TEMP_SENSOR_DIFF is now TEMP_SENSOR_REDUNDANT_MAX_DIFF" -#elif defined(LCD_ALEPHOBJECTS_CLCD_UI) - #error "LCD_ALEPHOBJECTS_CLCD_UI is now LCD_LULZBOT_CLCD_UI." -#elif defined(MIN_ARC_SEGMENTS) - #error "MIN_ARC_SEGMENTS is now MIN_CIRCLE_SEGMENTS." -#elif defined(ARC_SEGMENTS_PER_R) - #error "ARC_SUPPORT no longer uses ARC_SEGMENTS_PER_R." -#elif ENABLED(ARC_SUPPORT) && (!defined(MIN_ARC_SEGMENT_MM) || !defined(MAX_ARC_SEGMENT_MM)) - #error "ARC_SUPPORT now requires MIN_ARC_SEGMENT_MM and MAX_ARC_SEGMENT_MM." -#elif defined(LASER_POWER_INLINE) - #error "LASER_POWER_INLINE is obsolete." -#elif defined(SPINDLE_LASER_PWM) - #error "SPINDLE_LASER_PWM (true) is now set with SPINDLE_LASER_USE_PWM (enabled)." -#elif ANY(IS_RAMPS_EEB, IS_RAMPS_EEF, IS_RAMPS_EFB, IS_RAMPS_EFF, IS_RAMPS_SF) - #error "The IS_RAMPS_* conditionals (for heater/fan/bed pins) are now called FET_ORDER_*." -#elif defined(PROBE_TEMP_COMPENSATION) - #error "PROBE_TEMP_COMPENSATION is now set using the PTC_PROBE, PTC_BED, PTC_HOTEND options." -#elif defined(BTC_PROBE_TEMP) - #error "BTC_PROBE_TEMP is now PTC_PROBE_TEMP." -#elif defined(LCD_SCREEN_ROT_90) - #error "LCD_SCREEN_ROT_90 is now LCD_SCREEN_ROTATE with a value of 90." -#elif defined(LCD_SCREEN_ROT_180) - #error "LCD_SCREEN_ROT_180 is now LCD_SCREEN_ROTATE with a value of 180." -#elif defined(LCD_SCREEN_ROT_270) - #error "LCD_SCREEN_ROT_270 is now LCD_SCREEN_ROTATE with a value of 270." -#elif defined(DEFAULT_LCD_BRIGHTNESS) - #error "DEFAULT_LCD_BRIGHTNESS is now LCD_BRIGHTNESS_DEFAULT." -#elif defined(NOZZLE_PARK_X_ONLY) - #error "NOZZLE_PARK_X_ONLY is now NOZZLE_PARK_MOVE 1." -#elif defined(NOZZLE_PARK_Y_ONLY) - #error "NOZZLE_PARK_Y_ONLY is now NOZZLE_PARK_MOVE 2." -#elif defined(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS) - #error "Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS is now just Z_STEPPER_ALIGN_STEPPER_XY." -#elif defined(DWIN_CREALITY_LCD_ENHANCED) - #error "DWIN_CREALITY_LCD_ENHANCED is now DWIN_LCD_PROUI." -#elif defined(LINEAR_AXES) - #error "LINEAR_AXES is now NUM_AXES (to account for rotational axes)." -#elif defined(X_DUAL_STEPPER_DRIVERS) - #error "X_DUAL_STEPPER_DRIVERS is no longer needed and should be removed." -#elif defined(Y_DUAL_STEPPER_DRIVERS) - #error "Y_DUAL_STEPPER_DRIVERS is no longer needed and should be removed." -#elif defined(NUM_Z_STEPPER_DRIVERS) - #error "NUM_Z_STEPPER_DRIVERS is no longer needed and should be removed." -#elif defined(LEVEL_BED_CORNERS) - #error "LEVEL_BED_CORNERS is now LCD_BED_TRAMMING." -#elif defined(LEVEL_CORNERS_INSET_LFRB) || defined(LEVEL_CORNERS_HEIGHT) || defined(LEVEL_CORNERS_Z_HOP) || defined(LEVEL_CORNERS_USE_PROBE) || defined(LEVEL_CORNERS_PROBE_TOLERANCE) || defined(LEVEL_CORNERS_VERIFY_RAISED) || defined(LEVEL_CORNERS_AUDIO_FEEDBACK) - #error "LEVEL_CORNERS_* settings have been renamed BED_TRAMMING_*." -#elif defined(LEVEL_CENTER_TOO) - #error "LEVEL_CENTER_TOO is now BED_TRAMMING_INCLUDE_CENTER." -#elif defined(TOUCH_IDLE_SLEEP) - #error "TOUCH_IDLE_SLEEP (seconds) is now TOUCH_IDLE_SLEEP_MINS (minutes)." -#elif defined(LCD_BACKLIGHT_TIMEOUT) - #error "LCD_BACKLIGHT_TIMEOUT (seconds) is now LCD_BACKLIGHT_TIMEOUT_MINS (minutes)." -#elif defined(LCD_SET_PROGRESS_MANUALLY) - #error "LCD_SET_PROGRESS_MANUALLY is now SET_PROGRESS_MANUALLY." -#elif defined(USE_M73_REMAINING_TIME) - #error "USE_M73_REMAINING_TIME is now SET_REMAINING_TIME." -#elif defined(SHOW_SD_PERCENT) - #error "SHOW_SD_PERCENT is now SHOW_PROGRESS_PERCENT." -#elif defined(LIN_ADVANCE_K) - #error "LIN_ADVANCE_K is now ADVANCE_K." -#elif defined(EXTRA_LIN_ADVANCE_K) - #error "EXTRA_LIN_ADVANCE_K is now ADVANCE_K_EXTRA." -#elif defined(POLAR_SEGMENTS_PER_SECOND) || defined(DELTA_SEGMENTS_PER_SECOND) || defined(SCARA_SEGMENTS_PER_SECOND) || defined(TPARA_SEGMENTS_PER_SECOND) - #error "(POLAR|DELTA|SCARA|TPARA)_SEGMENTS_PER_SECOND is now DEFAULT_SEGMENTS_PER_SECOND." -#elif defined(TMC_SW_MOSI) || defined(TMC_SW_MISO) || defined(TMC_SW_SCK) - #error "TMC_SW_(MOSI|MISO|SCK) is now TMC_SPI_(MOSI|MISO|SCK)." -#elif ANY(DGUS_LCD_UI_ORIGIN, DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY, DGUS_LCD_UI_MKS, DGUS_LCD_UI_RELOADED) && !defined(DGUS_LCD_UI) - #error "DGUS_LCD_UI_[TYPE] is now set using DGUS_LCD_UI TYPE." -#elif defined(DELTA_PRINTABLE_RADIUS) - #error "DELTA_PRINTABLE_RADIUS is now PRINTABLE_RADIUS." -#elif defined(SCARA_PRINTABLE_RADIUS) - #error "SCARA_PRINTABLE_RADIUS is now PRINTABLE_RADIUS." -#elif defined(SCARA_FEEDRATE_SCALING) - #error "SCARA_FEEDRATE_SCALING is now FEEDRATE_SCALING." -#elif defined(MILLISECONDS_PREHEAT_TIME) - #error "MILLISECONDS_PREHEAT_TIME is now PREHEAT_TIME_HOTEND_MS." -#elif defined(EXPERIMENTAL_SCURVE) - #error "EXPERIMENTAL_SCURVE is no longer needed and should be removed." -#elif defined(BABYSTEP_ZPROBE_GFX_OVERLAY) - #error "BABYSTEP_ZPROBE_GFX_OVERLAY is now BABYSTEP_GFX_OVERLAY." -#elif defined(DISABLE_INACTIVE_EXTRUDER) - #error "DISABLE_INACTIVE_EXTRUDER is now DISABLE_OTHER_EXTRUDERS." -#elif defined(INVERT_X_STEP_PIN) || defined(INVERT_Y_STEP_PIN) || defined(INVERT_Z_STEP_PIN) || defined(INVERT_I_STEP_PIN) || defined(INVERT_J_STEP_PIN) || defined(INVERT_K_STEP_PIN) || defined(INVERT_U_STEP_PIN) || defined(INVERT_V_STEP_PIN) || defined(INVERT_W_STEP_PIN) || defined(INVERT_E_STEP_PIN) - #error "INVERT_*_STEP_PIN true is now STEP_STATE_* LOW, and INVERT_*_STEP_PIN false is now STEP_STATE_* HIGH." -#elif defined(PROBE_PT_1_X) || defined(PROBE_PT_1_Y) || defined(PROBE_PT_2_X) || defined(PROBE_PT_2_Y) || defined(PROBE_PT_3_X) || defined(PROBE_PT_3_Y) - #error "PROBE_PT_[123]_[XY] is now defined using PROBE_PT_[123] with an array { x, y }." -#elif defined(SQUARE_WAVE_STEPPING) - #error "SQUARE_WAVE_STEPPING is now EDGE_STEPPING." -#elif defined(FAN_PIN) - #error "FAN_PIN is now FAN0_PIN." -#elif defined(X_MIN_ENDSTOP_INVERTING) || defined(Y_MIN_ENDSTOP_INVERTING) || defined(Z_MIN_ENDSTOP_INVERTING) \ - || defined(I_MIN_ENDSTOP_INVERTING) || defined(J_MIN_ENDSTOP_INVERTING) || defined(K_MIN_ENDSTOP_INVERTING) \ - || defined(U_MIN_ENDSTOP_INVERTING) || defined(V_MIN_ENDSTOP_INVERTING) || defined(W_MIN_ENDSTOP_INVERTING) \ - || defined(X_MAX_ENDSTOP_INVERTING) || defined(Y_MAX_ENDSTOP_INVERTING) || defined(Z_MAX_ENDSTOP_INVERTING) \ - || defined(I_MAX_ENDSTOP_INVERTING) || defined(J_MAX_ENDSTOP_INVERTING) || defined(K_MAX_ENDSTOP_INVERTING) \ - || defined(U_MAX_ENDSTOP_INVERTING) || defined(V_MAX_ENDSTOP_INVERTING) || defined(W_MAX_ENDSTOP_INVERTING) \ - || defined(Z_MIN_PROBE_ENDSTOP_INVERTING) - #error "*_ENDSTOP_INVERTING false/true is now set with *_ENDSTOP_HIT_STATE HIGH/LOW." -#elif defined(DISABLE_INACTIVE_X) || defined(DISABLE_INACTIVE_Y) || defined(DISABLE_INACTIVE_Z) \ - || defined(DISABLE_INACTIVE_I) || defined(DISABLE_INACTIVE_J) || defined(DISABLE_INACTIVE_K) \ - || defined(DISABLE_INACTIVE_U) || defined(DISABLE_INACTIVE_V) || defined(DISABLE_INACTIVE_W) || defined(DISABLE_INACTIVE_E) - #error "DISABLE_INACTIVE_[XYZIJKUVWE] is now DISABLE_IDLE_[XYZIJKUVWE]." -#elif defined(DEFAULT_STEPPER_DEACTIVE_TIME) - #error "DEFAULT_STEPPER_DEACTIVE_TIME is now DEFAULT_STEPPER_TIMEOUT_SEC." -#elif defined(TFT_SHARED_SPI) - #error "TFT_SHARED_SPI is now TFT_SHARED_IO." -#elif defined(LCD_PINS_ENABLE) - #error "LCD_PINS_ENABLE is now LCD_PINS_EN." #endif -// L64xx stepper drivers have been removed -#define _L6470 0x6470 -#define _L6474 0x6474 -#define _L6480 0x6480 -#define _POWERSTEP01 0xF00D -#if HAS_DRIVER(L6470) - #error "L6470 stepper drivers are no longer supported in Marlin." -#elif HAS_DRIVER(L6474) - #error "L6474 stepper drivers are no longer supported in Marlin." -#elif HAS_DRIVER(L6480) - #error "L6480 stepper drivers are no longer supported in Marlin." -#elif HAS_DRIVER(POWERSTEP01) - #error "POWERSTEP01 stepper drivers are no longer supported in Marlin." +/** + * Required Version defines + */ +#ifndef SHORT_BUILD_VERSION + #error "SHORT_BUILD_VERSION must be specified." +#elif !defined(DETAILED_BUILD_VERSION) + #error "BUILD_VERSION must be specified." +#elif !defined(STRING_DISTRIBUTION_DATE) + #error "STRING_DISTRIBUTION_DATE must be specified." +#elif !defined(PROTOCOL_VERSION) + #error "PROTOCOL_VERSION must be specified." +#elif !defined(MACHINE_NAME) + #error "MACHINE_NAME must be specified." +#elif !defined(SOURCE_CODE_URL) + #error "SOURCE_CODE_URL must be specified." +#elif !defined(DEFAULT_MACHINE_UUID) + #error "DEFAULT_MACHINE_UUID must be specified." +#elif !defined(WEBSITE_URL) + #error "WEBSITE_URL must be specified." #endif -#undef _L6470 -#undef _L6474 -#undef _L6480 -#undef _POWERSTEP01 // Check AXIS_RELATIVE_MODES constexpr float arm[] = AXIS_RELATIVE_MODES; @@ -823,27 +208,6 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L #endif #endif // HAS_PTC -/** - * Marlin release, version and default string - */ -#ifndef SHORT_BUILD_VERSION - #error "SHORT_BUILD_VERSION must be specified." -#elif !defined(DETAILED_BUILD_VERSION) - #error "BUILD_VERSION must be specified." -#elif !defined(STRING_DISTRIBUTION_DATE) - #error "STRING_DISTRIBUTION_DATE must be specified." -#elif !defined(PROTOCOL_VERSION) - #error "PROTOCOL_VERSION must be specified." -#elif !defined(MACHINE_NAME) - #error "MACHINE_NAME must be specified." -#elif !defined(SOURCE_CODE_URL) - #error "SOURCE_CODE_URL must be specified." -#elif !defined(DEFAULT_MACHINE_UUID) - #error "DEFAULT_MACHINE_UUID must be specified." -#elif !defined(WEBSITE_URL) - #error "WEBSITE_URL must be specified." -#endif - /** * Serial */ @@ -895,11 +259,17 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L #endif /** - * Validate that the bed size fits + * Validate bed size */ -static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS) are too narrow to contain X_BED_SIZE."); -#if HAS_Y_AXIS - static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS) are too narrow to contain Y_BED_SIZE."); +#if !defined(X_BED_SIZE) || !defined(Y_BED_SIZE) + #error "X_BED_SIZE and Y_BED_SIZE are now required!" +#else + #if HAS_Y_AXIS + static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS) are too narrow to contain X_BED_SIZE."); + #endif + #if HAS_Y_AXIS + static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS) are too narrow to contain Y_BED_SIZE."); + #endif #endif /** @@ -1568,6 +938,11 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS #error "FANMUX0_PIN and FANMUX1_PIN must be set before FANMUX2_PIN can be set." #endif +// PID Fan Scaling requires a fan +#if defined(PID_FAN_SCALING) && !HAS_FAN + #error "PID_FAN_SCALING needs at least one fan enabled." +#endif + /** * Limited user-controlled fans */ diff --git a/Marlin/src/pins/esp32/pins_PANDA_common.h b/Marlin/src/pins/esp32/pins_PANDA_common.h index 971525622a..b24babd96b 100644 --- a/Marlin/src/pins/esp32/pins_PANDA_common.h +++ b/Marlin/src/pins/esp32/pins_PANDA_common.h @@ -63,10 +63,10 @@ #define TEMP_BED_PIN 36 // Analog Input #if ENABLED(MAX31856_PANDAPI) - #define MAX31856_CLK_PIN 29 - #define MAX31856_MISO_PIN 24 - #define MAX31856_MOSI_PIN 28 - #define MAX31856_CS_PIN 27 + #define TEMP_0_CLK_PIN 29 + #define TEMP_0_MISO_PIN 24 + #define TEMP_0_MOSI_PIN 28 + #define TEMP_0_CS_PIN 27 #endif // From aaf55a21ad9fa0f72e166b4b3f74fda427ccf91f Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 23 Apr 2023 02:07:42 -0500 Subject: [PATCH 217/225] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20UBL=20safe=20measu?= =?UTF-8?q?re=20move=20with=20extra=20axes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to 7e79fc5b --- Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp index 5bc5e6ec61..7277b293aa 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp @@ -883,7 +883,7 @@ void set_message_with_feedback(FSTR_P const fstr) { save_ubl_active_state_and_disable(); // Disable bed level correction for probing do_blocking_move_to( - NUM_AXIS_LIST( + xyz_pos_t({ 0.5f * ((MESH_MAX_X) - (MESH_MIN_X)), 0.5f * ((MESH_MAX_Y) - (MESH_MIN_Y)), MANUAL_PROBE_START_Z @@ -905,7 +905,7 @@ void set_message_with_feedback(FSTR_P const fstr) { #ifdef SAFE_BED_LEVELING_START_W , SAFE_BED_LEVELING_START_W #endif - ) + }) //, _MIN(planner.settings.max_feedrate_mm_s[X_AXIS], planner.settings.max_feedrate_mm_s[Y_AXIS]) * 0.5f ); planner.synchronize(); From 166935641a335664213cf21ff7ffe08c10eaf5be Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 23 Apr 2023 03:00:56 -0500 Subject: [PATCH 218/225] =?UTF-8?q?=F0=9F=94=A7=20Split=20followup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/SanityCheck.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index f496a4e880..196b1dc4e3 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -264,7 +264,7 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L #if !defined(X_BED_SIZE) || !defined(Y_BED_SIZE) #error "X_BED_SIZE and Y_BED_SIZE are now required!" #else - #if HAS_Y_AXIS + #if HAS_X_AXIS static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS) are too narrow to contain X_BED_SIZE."); #endif #if HAS_Y_AXIS From 10ed5ab01c43a09429e1eb885196308fca71f492 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 23 Apr 2023 03:17:55 -0500 Subject: [PATCH 219/225] =?UTF-8?q?=F0=9F=9A=B8=20Improve=20PAUSE=5FPROBE?= =?UTF-8?q?=5FDEPLOY=5FWHEN=5FTRIGGERED=20(#25681)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/feature/leds/pca9632.cpp | 2 +- Marlin/src/feature/leds/pca9632.h | 2 +- Marlin/src/lcd/HD44780/marlinui_HD44780.cpp | 2 +- Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp | 2 +- Marlin/src/lcd/marlinui.cpp | 2 +- Marlin/src/lcd/marlinui.h | 2 +- Marlin/src/libs/buzzer.h | 13 +++-- Marlin/src/module/probe.cpp | 54 ++++++++++++--------- Marlin/src/module/probe.h | 2 +- 9 files changed, 45 insertions(+), 36 deletions(-) diff --git a/Marlin/src/feature/leds/pca9632.cpp b/Marlin/src/feature/leds/pca9632.cpp index abea988004..07c379a815 100644 --- a/Marlin/src/feature/leds/pca9632.cpp +++ b/Marlin/src/feature/leds/pca9632.cpp @@ -148,7 +148,7 @@ void PCA9632_set_led_color(const LEDColor &color) { #if ENABLED(PCA9632_BUZZER) - void PCA9632_buzz(const long, const uint16_t) { + void PCA9632_buzz(const long, const uint16_t=0) { uint8_t data[] = PCA9632_BUZZER_DATA; Wire.beginTransmission(I2C_ADDRESS(PCA9632_ADDRESS)); Wire.write(data, sizeof(data)); diff --git a/Marlin/src/feature/leds/pca9632.h b/Marlin/src/feature/leds/pca9632.h index fb59a8c184..adef0200af 100644 --- a/Marlin/src/feature/leds/pca9632.h +++ b/Marlin/src/feature/leds/pca9632.h @@ -33,5 +33,5 @@ void PCA9632_set_led_color(const LEDColor &color); #if ENABLED(PCA9632_BUZZER) #include - void PCA9632_buzz(const long, const uint16_t); + void PCA9632_buzz(const long, const uint16_t=0); #endif diff --git a/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp b/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp index e33814589c..36831767f3 100644 --- a/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp +++ b/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp @@ -125,7 +125,7 @@ static void createChar_P(const char c, const byte * const ptr) { #if ENABLED(LCD_USE_I2C_BUZZER) - void MarlinUI::buzz(const long duration, const uint16_t freq) { + void MarlinUI::buzz(const long duration, const uint16_t freq/*=0*/) { if (sound_on) lcd.buzz(duration, freq); } diff --git a/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp b/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp index 969b3fb036..6090b13732 100644 --- a/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp +++ b/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp @@ -299,7 +299,7 @@ uint8_t MarlinUI::read_slow_buttons() { } // Duration in ms, freq in Hz -void MarlinUI::buzz(const long duration, const uint16_t freq) { +void MarlinUI::buzz(const long duration, const uint16_t freq/*=0*/) { if (!PanelDetected) return; if (!sound_on) return; #if ENABLED(TFTGLCD_PANEL_SPI) diff --git a/Marlin/src/lcd/marlinui.cpp b/Marlin/src/lcd/marlinui.cpp index 0153a11a15..b3db930fe4 100644 --- a/Marlin/src/lcd/marlinui.cpp +++ b/Marlin/src/lcd/marlinui.cpp @@ -127,7 +127,7 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP; #endif #if ENABLED(PCA9632_BUZZER) - void MarlinUI::buzz(const long duration, const uint16_t freq) { + void MarlinUI::buzz(const long duration, const uint16_t freq/*=0*/) { if (sound_on) PCA9632_buzz(duration, freq); } #endif diff --git a/Marlin/src/lcd/marlinui.h b/Marlin/src/lcd/marlinui.h index 65176507fc..9c5e192fb2 100644 --- a/Marlin/src/lcd/marlinui.h +++ b/Marlin/src/lcd/marlinui.h @@ -228,7 +228,7 @@ public: #endif #if USE_MARLINUI_BUZZER - static void buzz(const long duration, const uint16_t freq); + static void buzz(const long duration, const uint16_t freq=0); #endif static void chirp() { diff --git a/Marlin/src/libs/buzzer.h b/Marlin/src/libs/buzzer.h index aa4d48ae5d..f6d5b49d73 100644 --- a/Marlin/src/libs/buzzer.h +++ b/Marlin/src/libs/buzzer.h @@ -117,21 +117,20 @@ extern Buzzer buzzer; // Buzz directly via the BEEPER pin tone queue - #define BUZZ(d,f) buzzer.tone(d, f) + #define BUZZ(V...) buzzer.tone(V) #elif USE_MARLINUI_BUZZER // Use MarlinUI for a buzzer on the LCD - #include "../lcd/marlinui.h" - #define BUZZ(d,f) ui.buzz(d,f) + #define BUZZ(V...) ui.buzz(V) #else // No buzz capability - #define BUZZ(d,f) NOOP + #define BUZZ(...) NOOP #endif -#define ERR_BUZZ() BUZZ(400, 40); -#define OKAY_BUZZ() do{ BUZZ(100, 659); BUZZ(10, 0); BUZZ(100, 698); }while(0) -#define DONE_BUZZ(OK) do{ if (OK) OKAY_BUZZ(); else ERR_BUZZ(); }while(0) +#define ERR_BUZZ() BUZZ(400, 40) +#define OKAY_BUZZ() do{ BUZZ(100, 659); BUZZ(10); BUZZ(100, 698); }while(0) +#define DONE_BUZZ(ok) do{ if (ok) OKAY_BUZZ(); else ERR_BUZZ(); }while(0) diff --git a/Marlin/src/module/probe.cpp b/Marlin/src/module/probe.cpp index 3e7db5a077..a03125a73a 100644 --- a/Marlin/src/module/probe.cpp +++ b/Marlin/src/module/probe.cpp @@ -352,25 +352,35 @@ xyz_pos_t Probe::offset; // Initialized by settings.load() FORCE_INLINE void probe_specific_action(const bool deploy) { DEBUG_SECTION(log_psa, "Probe::probe_specific_action", DEBUGGING(LEVELING)); #if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) - do { - #if ENABLED(PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED) - if (deploy != PROBE_TRIGGERED()) break; - #endif - OKAY_BUZZ(); + // Start preheating before waiting for user confirmation that the probe is ready. + TERN_(PREHEAT_BEFORE_PROBING, if (deploy) probe.preheat_for_probing(0, PROBING_BED_TEMP, true)); - FSTR_P const ds_str = deploy ? GET_TEXT_F(MSG_MANUAL_DEPLOY) : GET_TEXT_F(MSG_MANUAL_STOW); - ui.return_to_status(); // To display the new status message - ui.set_status(ds_str, 99); - SERIAL_ECHOLNF(deploy ? GET_EN_TEXT_F(MSG_MANUAL_DEPLOY) : GET_EN_TEXT_F(MSG_MANUAL_STOW)); + FSTR_P const ds_str = deploy ? GET_TEXT_F(MSG_MANUAL_DEPLOY) : GET_TEXT_F(MSG_MANUAL_STOW); + ui.return_to_status(); // To display the new status message + ui.set_status(ds_str, 99); + SERIAL_ECHOLNF(deploy ? GET_EN_TEXT_F(MSG_MANUAL_DEPLOY) : GET_EN_TEXT_F(MSG_MANUAL_STOW)); - TERN_(HOST_PROMPT_SUPPORT, hostui.continue_prompt(ds_str)); - TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(ds_str)); - TERN_(DWIN_LCD_PROUI, DWIN_Popup_Confirm(ICON_BLTouch, ds_str, FPSTR(CONTINUE_STR))); - TERN_(HAS_RESUME_CONTINUE, wait_for_user_response()); - ui.reset_status(); + OKAY_BUZZ(); - } while (ENABLED(PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED)); + #if ENABLED(PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED) + // Wait for the probe to be attached or detached before asking for explicit user confirmation + // Allow the user to interrupt + { + KEEPALIVE_STATE(PAUSED_FOR_USER); + TERN_(HAS_RESUME_CONTINUE, wait_for_user = true); + while (deploy == PROBE_TRIGGERED() && TERN1(HAS_RESUME_CONTINUE, wait_for_user)) idle_no_sleep(); + TERN_(HAS_RESUME_CONTINUE, wait_for_user = false); + OKAY_BUZZ(); + } + #endif + + TERN_(HOST_PROMPT_SUPPORT, hostui.continue_prompt(ds_str)); + TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(ds_str)); + TERN_(DWIN_LCD_PROUI, DWIN_Popup_Confirm(ICON_BLTouch, ds_str, FPSTR(CONTINUE_STR))); + TERN_(HAS_RESUME_CONTINUE, wait_for_user_response()); + + ui.reset_status(); #endif // PAUSE_BEFORE_DEPLOY_STOW @@ -435,7 +445,7 @@ FORCE_INLINE void probe_specific_action(const bool deploy) { * - If a preheat input is higher than the current target, raise the target temperature. * - If a preheat input is higher than the current temperature, wait for stabilization. */ - void Probe::preheat_for_probing(const celsius_t hotend_temp, const celsius_t bed_temp) { + void Probe::preheat_for_probing(const celsius_t hotend_temp, const celsius_t bed_temp, const bool early/*=false*/) { #if HAS_HOTEND && (PROBING_NOZZLE_TEMP || LEVELING_NOZZLE_TEMP) #define WAIT_FOR_NOZZLE_HEAT #endif @@ -443,7 +453,7 @@ FORCE_INLINE void probe_specific_action(const bool deploy) { #define WAIT_FOR_BED_HEAT #endif - LCD_MESSAGE(MSG_PREHEATING); + if (!early) LCD_MESSAGE(MSG_PREHEATING); DEBUG_ECHOPGM("Preheating "); @@ -453,14 +463,12 @@ FORCE_INLINE void probe_specific_action(const bool deploy) { DEBUG_ECHOPGM("hotend (", hotendPreheat, ")"); thermalManager.setTargetHotend(hotendPreheat, 0); } - #elif ENABLED(WAIT_FOR_BED_HEAT) - constexpr celsius_t hotendPreheat = 0; #endif #if ENABLED(WAIT_FOR_BED_HEAT) const celsius_t bedPreheat = bed_temp > thermalManager.degTargetBed() ? bed_temp : 0; if (bedPreheat) { - if (hotendPreheat) DEBUG_ECHOPGM(" and "); + if (TERN0(WAIT_FOR_NOZZLE_HEAT, hotendPreheat)) DEBUG_ECHOPGM(" and "); DEBUG_ECHOPGM("bed (", bedPreheat, ")"); thermalManager.setTargetBed(bedPreheat); } @@ -468,8 +476,10 @@ FORCE_INLINE void probe_specific_action(const bool deploy) { DEBUG_EOL(); - TERN_(WAIT_FOR_NOZZLE_HEAT, if (hotend_temp > thermalManager.wholeDegHotend(0) + (TEMP_WINDOW)) thermalManager.wait_for_hotend(0)); - TERN_(WAIT_FOR_BED_HEAT, if (bed_temp > thermalManager.wholeDegBed() + (TEMP_BED_WINDOW)) thermalManager.wait_for_bed_heating()); + if (!early) { + TERN_(WAIT_FOR_NOZZLE_HEAT, if (hotend_temp > thermalManager.wholeDegHotend(0) + (TEMP_WINDOW)) thermalManager.wait_for_hotend(0)); + TERN_(WAIT_FOR_BED_HEAT, if (bed_temp > thermalManager.wholeDegBed() + (TEMP_BED_WINDOW)) thermalManager.wait_for_bed_heating()); + } } #endif diff --git a/Marlin/src/module/probe.h b/Marlin/src/module/probe.h index 4c6f233905..fd0302c665 100644 --- a/Marlin/src/module/probe.h +++ b/Marlin/src/module/probe.h @@ -76,7 +76,7 @@ public: static xyz_pos_t offset; #if EITHER(PREHEAT_BEFORE_PROBING, PREHEAT_BEFORE_LEVELING) - static void preheat_for_probing(const celsius_t hotend_temp, const celsius_t bed_temp); + static void preheat_for_probing(const celsius_t hotend_temp, const celsius_t bed_temp, const bool early=false); #endif static void probe_error_stop(); From 9902097d916e42977e7a4992e2e5773d5e5e9731 Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Mon, 24 Apr 2023 11:11:02 +1200 Subject: [PATCH 220/225] =?UTF-8?q?=F0=9F=94=A8=20Gather=20GD32,=20suppres?= =?UTF-8?q?s=20redundant=20#error=20(#25665)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/src/pins/esp32/env_validate.h | 5 +- Marlin/src/pins/esp32/pins_E4D.h | 4 +- Marlin/src/pins/esp32/pins_FYSETC_E4.h | 4 +- Marlin/src/pins/esp32/pins_MRR_ESPA.h | 4 +- Marlin/src/pins/esp32/pins_PANDA_M4.h | 4 + Marlin/src/pins/esp32/pins_PANDA_ZHU.h | 6 + Marlin/src/pins/gd32f1/env_validate.h | 11 +- Marlin/src/pins/gd32f1/pins_SOVOL_V131.h | 74 ++++++ Marlin/src/pins/lpc1768/env_validate.h | 5 +- Marlin/src/pins/lpc1769/env_validate.h | 5 +- Marlin/src/pins/mega/env_validate.h | 5 +- Marlin/src/pins/mega/pins_GT2560_V3.h | 4 + Marlin/src/pins/mega/pins_PICA.h | 4 + Marlin/src/pins/pins.h | 2 +- Marlin/src/pins/rambo/env_validate.h | 5 +- Marlin/src/pins/ramps/env_validate.h | 5 +- Marlin/src/pins/sam/env_validate.h | 5 +- Marlin/src/pins/sanguino/env_validate.h | 5 +- Marlin/src/pins/stm32f1/env_validate.h | 5 +- Marlin/src/pins/stm32f1/pins_CREALITY_V24S1.h | 5 + .../pins/stm32f1/pins_CREALITY_V24S1_301.h | 1 + Marlin/src/pins/stm32f1/pins_CREALITY_V4.h | 2 +- Marlin/src/pins/stm32f1/pins_CREALITY_V425.h | 4 - Marlin/src/pins/stm32f1/pins_SOVOL_V131.h | 236 ------------------ Marlin/src/pins/stm32f4/env_validate.h | 5 +- Marlin/src/pins/stm32f4/pins_ARTILLERY_RUBY.h | 2 +- .../stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h | 2 +- .../src/pins/stm32f4/pins_TH3D_EZBOARD_V2.h | 2 +- Marlin/src/pins/stm32g0/env_validate.h | 5 +- Marlin/src/pins/stm32h7/env_validate.h | 5 +- Marlin/src/pins/teensy2/env_validate.h | 5 +- 31 files changed, 162 insertions(+), 274 deletions(-) create mode 100644 Marlin/src/pins/gd32f1/pins_SOVOL_V131.h delete mode 100644 Marlin/src/pins/stm32f1/pins_SOVOL_V131.h diff --git a/Marlin/src/pins/esp32/env_validate.h b/Marlin/src/pins/esp32/env_validate.h index ce14c33414..0bfd0ebd92 100644 --- a/Marlin/src/pins/esp32/env_validate.h +++ b/Marlin/src/pins/esp32/env_validate.h @@ -19,8 +19,11 @@ * along with this program. If not, see . * */ -#pragma once +#ifndef ENV_VALIDATE_H +#define ENV_VALIDATE_H #if NOT_TARGET(ARDUINO_ARCH_ESP32) #error "Oops! Select an ESP32 board in 'Tools > Board.'" #endif + +#endif diff --git a/Marlin/src/pins/esp32/pins_E4D.h b/Marlin/src/pins/esp32/pins_E4D.h index 15b697a85b..06e46e3c4c 100644 --- a/Marlin/src/pins/esp32/pins_E4D.h +++ b/Marlin/src/pins/esp32/pins_E4D.h @@ -30,9 +30,7 @@ #include "env_validate.h" -#if EXTRUDERS > 1 || E_STEPPERS > 1 - #error "E4d@box only supports 1 E stepper." -#elif HAS_MULTI_HOTEND +#if HAS_MULTI_HOTEND || E_STEPPERS > 1 #error "E4d@box only supports 1 hotend / E stepper." #endif diff --git a/Marlin/src/pins/esp32/pins_FYSETC_E4.h b/Marlin/src/pins/esp32/pins_FYSETC_E4.h index 7dc59979c8..4bcffb545e 100644 --- a/Marlin/src/pins/esp32/pins_FYSETC_E4.h +++ b/Marlin/src/pins/esp32/pins_FYSETC_E4.h @@ -30,9 +30,7 @@ #include "env_validate.h" -#if EXTRUDERS > 1 || E_STEPPERS > 1 - #error "FYSETC E4 only supports 1 E stepper." -#elif HAS_MULTI_HOTEND +#if HAS_MULTI_HOTEND || E_STEPPERS > 1 #error "FYSETC E4 only supports 1 hotend / E stepper." #endif diff --git a/Marlin/src/pins/esp32/pins_MRR_ESPA.h b/Marlin/src/pins/esp32/pins_MRR_ESPA.h index e9e3db5758..ba5f6cbe35 100644 --- a/Marlin/src/pins/esp32/pins_MRR_ESPA.h +++ b/Marlin/src/pins/esp32/pins_MRR_ESPA.h @@ -30,9 +30,7 @@ #include "env_validate.h" -#if EXTRUDERS > 1 || E_STEPPERS > 1 - #error "MRR ESPA only supports 1 E stepper." -#elif HAS_MULTI_HOTEND +#if HAS_MULTI_HOTEND || E_STEPPERS > 1 #error "MRR ESPA only supports 1 hotend / E stepper." #endif diff --git a/Marlin/src/pins/esp32/pins_PANDA_M4.h b/Marlin/src/pins/esp32/pins_PANDA_M4.h index 5e2e72af05..c619be43a5 100644 --- a/Marlin/src/pins/esp32/pins_PANDA_M4.h +++ b/Marlin/src/pins/esp32/pins_PANDA_M4.h @@ -27,6 +27,10 @@ #define BOARD_INFO_NAME "Panda_M4" +#if HAS_MULTI_HOTEND || E_STEPPERS > 1 + #error "PANDA M4 only supports 1 hotend / E stepper." +#endif + #include "pins_PANDA_common.h" // diff --git a/Marlin/src/pins/esp32/pins_PANDA_ZHU.h b/Marlin/src/pins/esp32/pins_PANDA_ZHU.h index 4750057897..f2a5f440f6 100644 --- a/Marlin/src/pins/esp32/pins_PANDA_ZHU.h +++ b/Marlin/src/pins/esp32/pins_PANDA_ZHU.h @@ -27,6 +27,12 @@ #define BOARD_INFO_NAME "Panda_ZHU" +#if E_STEPPERS > 5 + #error "PANDA ZHU supports up to 5 E steppers." +#if HAS_MULTI_HOTEND + #error "PANDA ZHU only supports 1 hotend." +#endif + #include "pins_PANDA_common.h" // diff --git a/Marlin/src/pins/gd32f1/env_validate.h b/Marlin/src/pins/gd32f1/env_validate.h index 4b07cce4e5..f6882e70d6 100644 --- a/Marlin/src/pins/gd32f1/env_validate.h +++ b/Marlin/src/pins/gd32f1/env_validate.h @@ -19,14 +19,11 @@ * along with this program. If not, see . * */ -#pragma once +#ifndef ENV_VALIDATE_H +#define ENV_VALIDATE_H #if NOT_TARGET(__STM32F1__, STM32F1) - #if DISABLED(ALLOW_STM32F4) - #error "Oops! Select an STM32F1 board in 'Tools > Board.'" - #elif NOT_TARGET(STM32F4) - #error "Oops! Select an STM32F4 board in 'Tools > Board.'" - #endif + #error "Oops! Select an STM32F1 board in 'Tools > Board.'" #endif -#undef ALLOW_STM32F4 +#endif diff --git a/Marlin/src/pins/gd32f1/pins_SOVOL_V131.h b/Marlin/src/pins/gd32f1/pins_SOVOL_V131.h new file mode 100644 index 0000000000..44e5275423 --- /dev/null +++ b/Marlin/src/pins/gd32f1/pins_SOVOL_V131.h @@ -0,0 +1,74 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2023 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 + +/** + * Sovol 1.3.1 (GD32F103RET6) board pin assignments + */ + +#include "env_validate.h" + +#if HAS_MULTI_HOTEND || E_STEPPERS > 1 + #error "SOVOL V131 only supports 1 hotend / E-stepper." + #define E_ERROR 1 +#endif + +#ifndef BOARD_INFO_NAME + #define BOARD_INFO_NAME "Sovol V131" +#endif +#ifndef DEFAULT_MACHINE_NAME + #define DEFAULT_MACHINE_NAME "Sovol SV06" +#endif + +#include "../stm32f1/pins_CREALITY_V4.h" + +#if HAS_TMC_UART + + /** + * TMC2208/TMC2209 stepper drivers + * + * Hardware serial communication ports. + * If undefined software serial is used according to the pins below + */ + + #define X_SERIAL_TX_PIN PC1 + #define X_SERIAL_RX_PIN PC1 + + #define Y_SERIAL_TX_PIN PC0 + #define Y_SERIAL_RX_PIN PC0 + + #define Z_SERIAL_TX_PIN PA15 + #define Z_SERIAL_RX_PIN PA15 + + #define E0_SERIAL_TX_PIN PC14 + #define E0_SERIAL_RX_PIN PC14 + + // Reduce baud rate to improve software serial reliability + #define TMC_BAUD_RATE 19200 + +#endif // HAS_TMC_UART + +// +// SD Card +// +#define ONBOARD_SPI_DEVICE 1 +#define ONBOARD_SD_CS_PIN PA4 // SDSS diff --git a/Marlin/src/pins/lpc1768/env_validate.h b/Marlin/src/pins/lpc1768/env_validate.h index adb3ea938d..8a6a1cebd3 100644 --- a/Marlin/src/pins/lpc1768/env_validate.h +++ b/Marlin/src/pins/lpc1768/env_validate.h @@ -19,7 +19,8 @@ * along with this program. If not, see . * */ -#pragma once +#ifndef ENV_VALIDATE_H +#define ENV_VALIDATE_H #if ENABLED(REQUIRE_LPC1769) && NOT_TARGET(MCU_LPC1769) #error "Oops! Make sure you have the LPC1769 environment selected in your IDE." @@ -28,3 +29,5 @@ #endif #undef REQUIRE_LPC1769 + +#endif diff --git a/Marlin/src/pins/lpc1769/env_validate.h b/Marlin/src/pins/lpc1769/env_validate.h index 2e2b63d520..0f62412453 100644 --- a/Marlin/src/pins/lpc1769/env_validate.h +++ b/Marlin/src/pins/lpc1769/env_validate.h @@ -19,8 +19,11 @@ * along with this program. If not, see . * */ -#pragma once +#ifndef ENV_VALIDATE_H +#define ENV_VALIDATE_H #if NOT_TARGET(MCU_LPC1769) #error "Oops! Make sure you have the LPC1769 environment selected in your IDE." #endif + +#endif diff --git a/Marlin/src/pins/mega/env_validate.h b/Marlin/src/pins/mega/env_validate.h index 97c52d4e5e..7b6462ab7a 100644 --- a/Marlin/src/pins/mega/env_validate.h +++ b/Marlin/src/pins/mega/env_validate.h @@ -19,7 +19,8 @@ * along with this program. If not, see . * */ -#pragma once +#ifndef ENV_VALIDATE_H +#define ENV_VALIDATE_H #if NOT_TARGET(__AVR_ATmega2560__) #if DISABLED(ALLOW_MEGA1280) @@ -30,3 +31,5 @@ #endif #undef ALLOW_MEGA1280 + +#endif diff --git a/Marlin/src/pins/mega/pins_GT2560_V3.h b/Marlin/src/pins/mega/pins_GT2560_V3.h index b04962bbb3..61f30fc7d4 100644 --- a/Marlin/src/pins/mega/pins_GT2560_V3.h +++ b/Marlin/src/pins/mega/pins_GT2560_V3.h @@ -33,6 +33,10 @@ #define ALLOW_MEGA1280 #include "env_validate.h" +#if HOTENDS > 3 || E_STEPPERS > 3 + #error "GT2560 supports up to 3 hotends / E steppers." +#endif + #ifndef BOARD_INFO_NAME #define BOARD_INFO_NAME "GT2560 3.x" #endif diff --git a/Marlin/src/pins/mega/pins_PICA.h b/Marlin/src/pins/mega/pins_PICA.h index 0541e1af58..5e9d607a78 100644 --- a/Marlin/src/pins/mega/pins_PICA.h +++ b/Marlin/src/pins/mega/pins_PICA.h @@ -35,6 +35,10 @@ #include "env_validate.h" +#if HOTENDS > 2 || E_STEPPERS > 2 + #error "PICA supports up to 2 hotends / E steppers." +#endif + #ifndef BOARD_INFO_NAME #define BOARD_INFO_NAME "PICA" #endif diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index d3b3bbbd21..86a36c7580 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -632,7 +632,7 @@ #elif MB(PANDA_PI_V29) #include "stm32f1/pins_PANDA_PI_V29.h" // STM32F103RCT6 env:PANDA_PI_V29 #elif MB(SOVOL_V131) - #include "stm32f1/pins_SOVOL_V131.h" // GD32F1 env:GD32F103RET6_sovol_maple + #include "gd32f1/pins_SOVOL_V131.h" // GD32F1 env:GD32F103RET6_sovol_maple #elif MB(TRIGORILLA_V006) #include "gd32f1/pins_TRIGORILLA_V006.h" // GD32F103 env:trigorilla_v006 diff --git a/Marlin/src/pins/rambo/env_validate.h b/Marlin/src/pins/rambo/env_validate.h index 84cf8392cd..ce2818f596 100644 --- a/Marlin/src/pins/rambo/env_validate.h +++ b/Marlin/src/pins/rambo/env_validate.h @@ -19,8 +19,11 @@ * along with this program. If not, see . * */ -#pragma once +#ifndef ENV_VALIDATE_H +#define ENV_VALIDATE_H #if NOT_TARGET(__AVR_ATmega2560__) #error "Oops! Select 'Arduino Mega 2560 or Rambo' in 'Tools > Board.'" #endif + +#endif diff --git a/Marlin/src/pins/ramps/env_validate.h b/Marlin/src/pins/ramps/env_validate.h index 6006a78f01..86d7bce16c 100644 --- a/Marlin/src/pins/ramps/env_validate.h +++ b/Marlin/src/pins/ramps/env_validate.h @@ -19,7 +19,8 @@ * along with this program. If not, see . * */ -#pragma once +#ifndef ENV_VALIDATE_H +#define ENV_VALIDATE_H #if ENABLED(ALLOW_SAM3X8E) #if NOT_TARGET(__SAM3X8E__, __AVR_ATmega2560__) @@ -33,3 +34,5 @@ #undef ALLOW_SAM3X8E #undef REQUIRE_MEGA2560 + +#endif diff --git a/Marlin/src/pins/sam/env_validate.h b/Marlin/src/pins/sam/env_validate.h index 09bcd13649..c6f4d76894 100644 --- a/Marlin/src/pins/sam/env_validate.h +++ b/Marlin/src/pins/sam/env_validate.h @@ -19,7 +19,8 @@ * along with this program. If not, see . * */ -#pragma once +#ifndef ENV_VALIDATE_H +#define ENV_VALIDATE_H #if BOTH(ALLOW_MEGA1280, ALLOW_MEGA2560) && NOT_TARGET(__SAM3X8E__, __AVR_ATmega1280__, __AVR_ATmega2560__) #error "Oops! Select 'Arduino Due or Mega' in 'Tools > Board.'" @@ -31,3 +32,5 @@ #undef ALLOW_MEGA1280 #undef ALLOW_MEGA2560 + +#endif diff --git a/Marlin/src/pins/sanguino/env_validate.h b/Marlin/src/pins/sanguino/env_validate.h index d229b6f102..bd7947f469 100644 --- a/Marlin/src/pins/sanguino/env_validate.h +++ b/Marlin/src/pins/sanguino/env_validate.h @@ -19,7 +19,8 @@ * along with this program. If not, see . * */ -#pragma once +#ifndef ENV_VALIDATE_H +#define ENV_VALIDATE_H #if ENABLED(ALLOW_MEGA644) #if NOT_TARGET(__AVR_ATmega644__, __AVR_ATmega644P__, __AVR_ATmega1284P__) @@ -40,3 +41,5 @@ #undef ALLOW_MEGA644 #undef ALLOW_MEGA644P #undef REQUIRE_MEGA644P + +#endif diff --git a/Marlin/src/pins/stm32f1/env_validate.h b/Marlin/src/pins/stm32f1/env_validate.h index 2d325428ac..47399a062d 100644 --- a/Marlin/src/pins/stm32f1/env_validate.h +++ b/Marlin/src/pins/stm32f1/env_validate.h @@ -19,7 +19,8 @@ * along with this program. If not, see . * */ -#pragma once +#ifndef ENV_VALIDATE_H +#define ENV_VALIDATE_H #if NOT_TARGET(__STM32F1__, STM32F1) #if DISABLED(ALLOW_STM32F4) @@ -30,3 +31,5 @@ #endif #undef ALLOW_STM32F4 + +#endif diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1.h index f7a73de284..058dcdf94f 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1.h @@ -25,6 +25,11 @@ * Creality v2.4.S1 (STM32F103RE / STM32F103RC) v101 as found in the Ender-7 */ +#if HAS_MULTI_HOTEND || E_STEPPERS > 1 + #error "Creality 2.4.S1 V101 only supports 1 hotend / E stepper." + #define E_ERROR 1 +#endif + #define BOARD_INFO_NAME "Creality v2.4.S1 V101" #define DEFAULT_MACHINE_NAME "Creality3D" diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1_301.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1_301.h index 4276db5e9f..f2450ffcb4 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1_301.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1_301.h @@ -30,6 +30,7 @@ #if HAS_MULTI_HOTEND || E_STEPPERS > 1 #error "Creality v24S1 only supports 1 hotend / E stepper." + #define E_ERROR 1 #endif #if BOTH(BLTOUCH, Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h index fd96799372..6cb4d48d58 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h @@ -27,7 +27,7 @@ #include "env_validate.h" -#if HAS_MULTI_HOTEND || E_STEPPERS > 1 +#if !E_ERROR && (HAS_MULTI_HOTEND || E_STEPPERS > 1) #error "Creality v4 only supports 1 hotend / E stepper." #endif diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V425.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V425.h index 2d9b9f38f5..a225fe11be 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V425.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V425.h @@ -27,10 +27,6 @@ #include "env_validate.h" -#if HAS_MULTI_HOTEND || E_STEPPERS > 1 - #error "Creality v4.2.5 only supports 1 hotend / E stepper." -#endif - #define BOARD_INFO_NAME "Creality V4.2.5" #define DEFAULT_MACHINE_NAME "CR200B" diff --git a/Marlin/src/pins/stm32f1/pins_SOVOL_V131.h b/Marlin/src/pins/stm32f1/pins_SOVOL_V131.h deleted file mode 100644 index ee50f32738..0000000000 --- a/Marlin/src/pins/stm32f1/pins_SOVOL_V131.h +++ /dev/null @@ -1,236 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (c) 2023 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 - -/** - * Sovol 1.3.1 (GD32F103RET6) board pin assignments - */ - -#include "env_validate.h" - -#if HOTENDS > 1 || E_STEPPERS > 1 - #error "SOVOL V131 only supports 1 hotend / E-stepper." -#endif - -#ifndef BOARD_INFO_NAME - #define BOARD_INFO_NAME "Sovol V131" -#endif -#ifndef DEFAULT_MACHINE_NAME - #define DEFAULT_MACHINE_NAME "Sovol SV06" -#endif - -//#define BOARD_NO_NATIVE_USB - -// -// Release PB4 (Y_ENABLE_PIN) from JTAG NRST role -// -#ifndef DISABLE_DEBUG - #define DISABLE_DEBUG -#endif - -// -// EEPROM -// -#if NO_EEPROM_SELECTED - #define IIC_BL24CXX_EEPROM // EEPROM on I2C-0 - //#define SDCARD_EEPROM_EMULATION - #undef NO_EEPROM_SELECTED -#endif - -#if ENABLED(IIC_BL24CXX_EEPROM) - #define IIC_EEPROM_SDA PA11 - #define IIC_EEPROM_SCL PA12 - #define MARLIN_EEPROM_SIZE 0x800 // 2K (24C16) -#elif ENABLED(SDCARD_EEPROM_EMULATION) - #define MARLIN_EEPROM_SIZE 0x800 // 2K -#endif - -// -// Servos -// -#ifndef SERVO0_PIN - #ifndef HAS_PIN_27_BOARD - #define SERVO0_PIN PB0 // BLTouch OUT - #else - #define SERVO0_PIN PC6 - #endif -#endif - -// -// Limit Switches -// -#ifndef X_STOP_PIN - #define X_STOP_PIN PA5 -#endif -#ifndef Y_STOP_PIN - #define Y_STOP_PIN PA6 -#endif -#ifndef Z_STOP_PIN - #define Z_STOP_PIN PA7 -#endif - -#ifndef Z_MIN_PROBE_PIN - #define Z_MIN_PROBE_PIN PB1 // BLTouch IN -#endif - -// -// Filament Runout Sensor -// -#ifndef FIL_RUNOUT_PIN - #define FIL_RUNOUT_PIN PA4 // "Pulled-high" -#endif - -// -// Steppers -// -#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 // Shared - -#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 - -#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 - -#ifndef E0_STEP_PIN - #define E0_STEP_PIN PB4 -#endif -#ifndef E0_DIR_PIN - #define E0_DIR_PIN PB3 -#endif -#define E0_ENABLE_PIN X_ENABLE_PIN - -#if HAS_TMC_UART - - /** - * TMC2208/TMC2209 stepper drivers - * - * Hardware serial communication ports. - * If undefined software serial is used according to the pins below - */ - - #define X_SERIAL_TX_PIN PC1 - #define X_SERIAL_RX_PIN PC1 - - #define Y_SERIAL_TX_PIN PC0 - #define Y_SERIAL_RX_PIN PC0 - - #define Z_SERIAL_TX_PIN PA15 - #define Z_SERIAL_RX_PIN PA15 - - #define E0_SERIAL_TX_PIN PC14 - #define E0_SERIAL_RX_PIN PC14 - - // Reduce baud rate to improve software serial reliability - #define TMC_BAUD_RATE 19200 - -#endif // HAS_TMC_UART - -// -// Temperature Sensors -// -#define TEMP_0_PIN PC5 // TH1 -#define TEMP_BED_PIN PC4 // TB1 - -// -// Heaters / Fans -// -#ifndef HEATER_0_PIN - #define HEATER_0_PIN PA1 // HEATER1 -#endif -#ifndef HEATER_BED_PIN - #define HEATER_BED_PIN PA2 // HOT BED -#endif -#ifndef FAN0_PIN - #define FAN0_PIN PA0 // FAN -#endif -#define FAN_SOFT_PWM_REQUIRED - -// -// SD Card -// -#define SD_DETECT_PIN PC7 -#define SDCARD_CONNECTION ONBOARD -#define ONBOARD_SPI_DEVICE 1 -#define ONBOARD_SD_CS_PIN PA4 // SDSS -#define ONBOARD_SDIO -#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 | 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 -#endif - -#if ENABLED(CR10_STOCKDISPLAY) - - #if ENABLED(RET6_12864_LCD) - - #define LCD_PINS_RS EXP3_07_PIN - #define LCD_PINS_EN 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 - - #ifndef HAS_PIN_27_BOARD - #define BEEPER_PIN EXP3_01_PIN - #endif - - #else - - #error "Only the RET6_12864_LCD variant of CR10_STOCKDISPLAY is supported." - - #endif - -#endif diff --git a/Marlin/src/pins/stm32f4/env_validate.h b/Marlin/src/pins/stm32f4/env_validate.h index c01401f06c..91adbfc869 100644 --- a/Marlin/src/pins/stm32f4/env_validate.h +++ b/Marlin/src/pins/stm32f4/env_validate.h @@ -19,10 +19,13 @@ * along with this program. If not, see . * */ -#pragma once +#ifndef ENV_VALIDATE_H +#define ENV_VALIDATE_H #if NOT_TARGET(STM32F4) && (DISABLED(ALLOW_STM32DUINO) || NOT_TARGET(STM32F4xx)) #error "Oops! Select an STM32F4 board in 'Tools > Board.'" #endif #undef ALLOW_STM32DUINO + +#endif diff --git a/Marlin/src/pins/stm32f4/pins_ARTILLERY_RUBY.h b/Marlin/src/pins/stm32f4/pins_ARTILLERY_RUBY.h index 7b0206e287..8510e81482 100644 --- a/Marlin/src/pins/stm32f4/pins_ARTILLERY_RUBY.h +++ b/Marlin/src/pins/stm32f4/pins_ARTILLERY_RUBY.h @@ -23,7 +23,7 @@ #include "env_validate.h" -#if HOTENDS > 1 || E_STEPPERS > 1 +#if HAS_MULTI_HOTEND || E_STEPPERS > 1 #error "Artillery Ruby only supports 1 hotend / E stepper." #endif diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h index ffddeff67c..6f2de83b51 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h @@ -25,7 +25,7 @@ #include "env_validate.h" -#if HOTENDS > 1 || E_STEPPERS > 1 +#if HAS_MULTI_HOTEND || E_STEPPERS > 1 #error "BTT SKR Mini E3 V3.0.1 supports up to 1 hotend / E stepper." #endif diff --git a/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_V2.h b/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_V2.h index 448c54f1b3..b74db89f3a 100644 --- a/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_V2.h +++ b/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_V2.h @@ -24,7 +24,7 @@ #define ALLOW_STM32DUINO #include "env_validate.h" -#if HOTENDS > 1 || E_STEPPERS > 1 +#if HAS_MULTI_HOTEND || E_STEPPERS > 1 #error "TH3D EZBoard only supports 1 hotend / E stepper." #endif diff --git a/Marlin/src/pins/stm32g0/env_validate.h b/Marlin/src/pins/stm32g0/env_validate.h index a7be76bd8b..03887eb7a4 100644 --- a/Marlin/src/pins/stm32g0/env_validate.h +++ b/Marlin/src/pins/stm32g0/env_validate.h @@ -19,8 +19,11 @@ * along with this program. If not, see . * */ -#pragma once +#ifndef ENV_VALIDATE_H +#define ENV_VALIDATE_H #if NOT_TARGET(STM32G0xx) || NOT_TARGET(STM32G0B1xx) #error "Oops! Select an STM32G0 board in 'Tools > Board.'" #endif + +#endif diff --git a/Marlin/src/pins/stm32h7/env_validate.h b/Marlin/src/pins/stm32h7/env_validate.h index 0c515e5df6..7feaf20959 100644 --- a/Marlin/src/pins/stm32h7/env_validate.h +++ b/Marlin/src/pins/stm32h7/env_validate.h @@ -19,8 +19,11 @@ * along with this program. If not, see . * */ -#pragma once +#ifndef ENV_VALIDATE_H +#define ENV_VALIDATE_H #if NOT_TARGET(STM32H7) #error "Oops! Select an STM32H7 board in 'Tools > Board.'" #endif + +#endif diff --git a/Marlin/src/pins/teensy2/env_validate.h b/Marlin/src/pins/teensy2/env_validate.h index 5f0ea4f3b6..8fd6fba319 100644 --- a/Marlin/src/pins/teensy2/env_validate.h +++ b/Marlin/src/pins/teensy2/env_validate.h @@ -19,10 +19,13 @@ * along with this program. If not, see . * */ -#pragma once +#ifndef ENV_VALIDATE_H +#define ENV_VALIDATE_H #if NOT_TARGET(__AVR_AT90USB1286__) && (DISABLED(ALLOW_AT90USB1286P) || NOT_TARGET(__AVR_AT90USB1286P__)) #error "Oops! Select 'Teensy++ 2.0' or 'Printrboard' in 'Tools > Board.'" #endif #undef ALLOW_AT90USB1286P + +#endif From df4f80622eb262fe39cc898e0237257b2870aa7f Mon Sep 17 00:00:00 2001 From: plampix Date: Mon, 24 Apr 2023 01:12:47 +0200 Subject: [PATCH 221/225] =?UTF-8?q?=E2=9C=A8=20NOZZLE=5FCLEAN=5FPATTERN=5F?= =?UTF-8?q?*=20(#25666)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/Configuration.h | 28 ++- Marlin/src/gcode/feature/clean/G12.cpp | 14 +- Marlin/src/inc/SanityCheck.h | 15 ++ Marlin/src/libs/nozzle.cpp | 277 +++++++++++++------------ buildroot/tests/rambo | 4 +- 5 files changed, 195 insertions(+), 143 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 19407b6158..6e2f409613 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -2409,23 +2409,31 @@ //#define NOZZLE_CLEAN_FEATURE #if ENABLED(NOZZLE_CLEAN_FEATURE) - // Default number of pattern repetitions - #define NOZZLE_CLEAN_STROKES 12 + #define NOZZLE_CLEAN_PATTERN_LINE // Provide 'G12 P0' - a simple linear cleaning pattern + #define NOZZLE_CLEAN_PATTERN_ZIGZAG // Provide 'G12 P1' - a zigzag cleaning pattern + #define NOZZLE_CLEAN_PATTERN_CIRCLE // Provide 'G12 P2' - a circular cleaning pattern - // Default number of triangles - #define NOZZLE_CLEAN_TRIANGLES 3 + // Default pattern to use when 'P' is not provided to G12. One of the enabled options above. + #define NOZZLE_CLEAN_DEFAULT_PATTERN 0 + + #if ENABLED(NOZZLE_CLEAN_PATTERN_LINE) + #define NOZZLE_CLEAN_STROKES 12 // Default number of pattern repetitions + #endif + + #if ENABLED(NOZZLE_CLEAN_PATTERN_ZIGZAG) + #define NOZZLE_CLEAN_TRIANGLES 3 // Default number of triangles + #endif // Specify positions for each tool as { { X, Y, Z }, { X, Y, Z } } // Dual hotend system may use { { -20, (Y_BED_SIZE / 2), (Z_MIN_POS + 1) }, { 420, (Y_BED_SIZE / 2), (Z_MIN_POS + 1) }} #define NOZZLE_CLEAN_START_POINT { { 30, 30, (Z_MIN_POS + 1) } } #define NOZZLE_CLEAN_END_POINT { { 100, 60, (Z_MIN_POS + 1) } } - // Circular pattern radius - #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5 - // Circular pattern circle fragments number - #define NOZZLE_CLEAN_CIRCLE_FN 10 - // Middle point of circle - #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT + #if ENABLED(NOZZLE_CLEAN_PATTERN_CIRCLE) + #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5 // (mm) Circular pattern radius + #define NOZZLE_CLEAN_CIRCLE_FN 10 // Circular pattern circle number of segments + #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT // Middle point of circle + #endif // Move the nozzle to the initial position after cleaning #define NOZZLE_CLEAN_GOBACK diff --git a/Marlin/src/gcode/feature/clean/G12.cpp b/Marlin/src/gcode/feature/clean/G12.cpp index 0113170f1d..597d8ce0a0 100644 --- a/Marlin/src/gcode/feature/clean/G12.cpp +++ b/Marlin/src/gcode/feature/clean/G12.cpp @@ -57,10 +57,16 @@ void GcodeSuite::G12() { } #endif - const uint8_t pattern = parser.ushortval('P', 0), - strokes = parser.ushortval('S', NOZZLE_CLEAN_STROKES), - objects = parser.ushortval('T', NOZZLE_CLEAN_TRIANGLES); - const float radius = parser.linearval('R', NOZZLE_CLEAN_CIRCLE_RADIUS); + const uint8_t pattern = ( + #if COUNT_ENABLED(NOZZLE_CLEAN_PATTERN_LINE, NOZZLE_CLEAN_PATTERN_ZIGZAG, NOZZLE_CLEAN_PATTERN_CIRCLE) > 1 + parser.ushortval('P', NOZZLE_CLEAN_DEFAULT_PATTERN) + #else + NOZZLE_CLEAN_DEFAULT_PATTERN + #endif + ); + const uint8_t strokes = TERN0(NOZZLE_CLEAN_PATTERN_LINEAR, parser.ushortval('S', NOZZLE_CLEAN_STROKES)), + objects = TERN0(NOZZLE_CLEAN_PATTERN_ZIGZAG, parser.ushortval('T', NOZZLE_CLEAN_TRIANGLES)); + const float radius = TERN0(NOZZLE_CLEAN_PATTERN_CIRCLE, parser.linearval('R', NOZZLE_CLEAN_CIRCLE_RADIUS)); const bool seenxyz = parser.seen("XYZ"); const uint8_t cleans = (!seenxyz || parser.boolval('X') ? _BV(X_AXIS) : 0) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 196b1dc4e3..2c2e17f4e3 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -3816,6 +3816,21 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive."); #undef _CLEAN_ASSERT #endif +/** + * Sanity check nozzle cleaning pattern settings + */ +#if ENABLED(NOZZLE_CLEAN_FEATURE) + #if NONE(NOZZLE_CLEAN_PATTERN_LINE, NOZZLE_CLEAN_PATTERN_ZIGZAG, NOZZLE_CLEAN_PATTERN_CIRCLE) + #error "NOZZLE_CLEAN_FEATURE requires at least one of NOZZLE_CLEAN_PATTERN_LINE, NOZZLE_CLEAN_PATTERN_ZIGZAG, and/or NOZZLE_CLEAN_PATTERN_CIRCLE." + #elif NOZZLE_CLEAN_DEFAULT_PATTERN == 0 && DISABLED(NOZZLE_CLEAN_PATTERN_LINE) + #error "NOZZLE_CLEAN_DEFAULT_PATTERN 0 (LINE) is not available. Enable NOZZLE_CLEAN_PATTERN_LINE or set a different NOZZLE_CLEAN_DEFAULT_PATTERN." + #elif NOZZLE_CLEAN_DEFAULT_PATTERN == 1 && DISABLED(NOZZLE_CLEAN_PATTERN_ZIGZAG) + #error "NOZZLE_CLEAN_DEFAULT_PATTERN 1 (ZIGZAG) is not available. Enable NOZZLE_CLEAN_PATTERN_ZIGZAG or set a different NOZZLE_CLEAN_DEFAULT_PATTERN." + #elif NOZZLE_CLEAN_DEFAULT_PATTERN == 2 && DISABLED(NOZZLE_CLEAN_PATTERN_CIRCLE) + #error "NOZZLE_CLEAN_DEFAULT_PATTERN 2 (CIRCLE) is not available. Enable NOZZLE_CLEAN_PATTERN_CIRCLE or set a different NOZZLE_CLEAN_DEFAULT_PATTERN." + #endif +#endif + /** * Sanity check for MIXING_EXTRUDER & DISTINCT_E_FACTORS these are not compatible */ diff --git a/Marlin/src/libs/nozzle.cpp b/Marlin/src/libs/nozzle.cpp index 74f61c33d0..8f44c69c5c 100644 --- a/Marlin/src/libs/nozzle.cpp +++ b/Marlin/src/libs/nozzle.cpp @@ -37,119 +37,125 @@ Nozzle nozzle; #if ENABLED(NOZZLE_CLEAN_FEATURE) - /** - * @brief Stroke clean pattern - * @details Wipes the nozzle back and forth in a linear movement - * - * @param start xyz_pos_t defining the starting point - * @param end xyz_pos_t defining the ending point - * @param strokes number of strokes to execute - */ - void Nozzle::stroke(const xyz_pos_t &start, const xyz_pos_t &end, const uint8_t &strokes) { - #if ENABLED(NOZZLE_CLEAN_GOBACK) - const xyz_pos_t oldpos = current_position; - #endif - - // Move to the starting point - #if ENABLED(NOZZLE_CLEAN_NO_Z) - #if ENABLED(NOZZLE_CLEAN_NO_Y) - do_blocking_move_to_x(start.x); - #else - do_blocking_move_to_xy(start); + #if ENABLED(NOZZLE_CLEAN_PATTERN_LINE) + /** + * @brief Stroke clean pattern + * @details Wipes the nozzle back and forth in a linear movement + * + * @param start xyz_pos_t defining the starting point + * @param end xyz_pos_t defining the ending point + * @param strokes number of strokes to execute + */ + void Nozzle::stroke(const xyz_pos_t &start, const xyz_pos_t &end, const uint8_t &strokes) { + #if ENABLED(NOZZLE_CLEAN_GOBACK) + const xyz_pos_t oldpos = current_position; #endif - #else - do_blocking_move_to(start); - #endif - // Start the stroke pattern - LOOP_L_N(i, strokes >> 1) { - #if ENABLED(NOZZLE_CLEAN_NO_Y) - do_blocking_move_to_x(end.x); - do_blocking_move_to_x(start.x); + // Move to the starting point + #if ENABLED(NOZZLE_CLEAN_NO_Z) + #if ENABLED(NOZZLE_CLEAN_NO_Y) + do_blocking_move_to_x(start.x); + #else + do_blocking_move_to_xy(start); + #endif #else - do_blocking_move_to_xy(end); - do_blocking_move_to_xy(start); + do_blocking_move_to(start); #endif + + // Start the stroke pattern + LOOP_L_N(i, strokes >> 1) { + #if ENABLED(NOZZLE_CLEAN_NO_Y) + do_blocking_move_to_x(end.x); + do_blocking_move_to_x(start.x); + #else + do_blocking_move_to_xy(end); + do_blocking_move_to_xy(start); + #endif + } + + TERN_(NOZZLE_CLEAN_GOBACK, do_blocking_move_to(oldpos)); } + #endif - TERN_(NOZZLE_CLEAN_GOBACK, do_blocking_move_to(oldpos)); - } + #if ENABLED(NOZZLE_CLEAN_PATTERN_ZIGZAG) + /** + * @brief Zig-zag clean pattern + * @details Apply a zig-zag cleaning pattern + * + * @param start xyz_pos_t defining the starting point + * @param end xyz_pos_t defining the ending point + * @param strokes number of strokes to execute + * @param objects number of triangles to do + */ + void Nozzle::zigzag(const xyz_pos_t &start, const xyz_pos_t &end, const uint8_t &strokes, const uint8_t &objects) { + const xy_pos_t diff = end - start; + if (!diff.x || !diff.y) return; - /** - * @brief Zig-zag clean pattern - * @details Apply a zig-zag cleaning pattern - * - * @param start xyz_pos_t defining the starting point - * @param end xyz_pos_t defining the ending point - * @param strokes number of strokes to execute - * @param objects number of triangles to do - */ - void Nozzle::zigzag(const xyz_pos_t &start, const xyz_pos_t &end, const uint8_t &strokes, const uint8_t &objects) { - const xy_pos_t diff = end - start; - if (!diff.x || !diff.y) return; + #if ENABLED(NOZZLE_CLEAN_GOBACK) + const xyz_pos_t back = current_position; + #endif - #if ENABLED(NOZZLE_CLEAN_GOBACK) - const xyz_pos_t back = current_position; - #endif + #if ENABLED(NOZZLE_CLEAN_NO_Z) + do_blocking_move_to_xy(start); + #else + do_blocking_move_to(start); + #endif - #if ENABLED(NOZZLE_CLEAN_NO_Z) + const uint8_t zigs = objects << 1; + const bool horiz = ABS(diff.x) >= ABS(diff.y); // Do a horizontal wipe? + const float P = (horiz ? diff.x : diff.y) / zigs; // Period of each zig / zag + const xyz_pos_t *side; + LOOP_L_N(j, strokes) { + for (int8_t i = 0; i < zigs; i++) { + side = (i & 1) ? &end : &start; + if (horiz) + do_blocking_move_to_xy(start.x + i * P, side->y); + else + do_blocking_move_to_xy(side->x, start.y + i * P); + } + for (int8_t i = zigs; i >= 0; i--) { + side = (i & 1) ? &end : &start; + if (horiz) + do_blocking_move_to_xy(start.x + i * P, side->y); + else + do_blocking_move_to_xy(side->x, start.y + i * P); + } + } + + TERN_(NOZZLE_CLEAN_GOBACK, do_blocking_move_to(back)); + } + #endif + + #if ENABLED(NOZZLE_CLEAN_PATTERN_CIRCLE) + /** + * @brief Circular clean pattern + * @details Apply a circular cleaning pattern + * + * @param start xyz_pos_t defining the middle of circle + * @param strokes number of strokes to execute + * @param radius radius of circle + */ + void Nozzle::circle(const xyz_pos_t &start, const xyz_pos_t &middle, const uint8_t &strokes, const_float_t radius) { + if (strokes == 0) return; + + #if ENABLED(NOZZLE_CLEAN_GOBACK) + const xyz_pos_t back = current_position; + #endif + TERN(NOZZLE_CLEAN_NO_Z, do_blocking_move_to_xy, do_blocking_move_to)(start); + + LOOP_L_N(s, strokes) + LOOP_L_N(i, NOZZLE_CLEAN_CIRCLE_FN) + do_blocking_move_to_xy( + middle.x + sin((RADIANS(360) / NOZZLE_CLEAN_CIRCLE_FN) * i) * radius, + middle.y + cos((RADIANS(360) / NOZZLE_CLEAN_CIRCLE_FN) * i) * radius + ); + + // Let's be safe do_blocking_move_to_xy(start); - #else - do_blocking_move_to(start); - #endif - const uint8_t zigs = objects << 1; - const bool horiz = ABS(diff.x) >= ABS(diff.y); // Do a horizontal wipe? - const float P = (horiz ? diff.x : diff.y) / zigs; // Period of each zig / zag - const xyz_pos_t *side; - LOOP_L_N(j, strokes) { - for (int8_t i = 0; i < zigs; i++) { - side = (i & 1) ? &end : &start; - if (horiz) - do_blocking_move_to_xy(start.x + i * P, side->y); - else - do_blocking_move_to_xy(side->x, start.y + i * P); - } - for (int8_t i = zigs; i >= 0; i--) { - side = (i & 1) ? &end : &start; - if (horiz) - do_blocking_move_to_xy(start.x + i * P, side->y); - else - do_blocking_move_to_xy(side->x, start.y + i * P); - } + TERN_(NOZZLE_CLEAN_GOBACK, do_blocking_move_to(back)); } - - TERN_(NOZZLE_CLEAN_GOBACK, do_blocking_move_to(back)); - } - - /** - * @brief Circular clean pattern - * @details Apply a circular cleaning pattern - * - * @param start xyz_pos_t defining the middle of circle - * @param strokes number of strokes to execute - * @param radius radius of circle - */ - void Nozzle::circle(const xyz_pos_t &start, const xyz_pos_t &middle, const uint8_t &strokes, const_float_t radius) { - if (strokes == 0) return; - - #if ENABLED(NOZZLE_CLEAN_GOBACK) - const xyz_pos_t back = current_position; - #endif - TERN(NOZZLE_CLEAN_NO_Z, do_blocking_move_to_xy, do_blocking_move_to)(start); - - LOOP_L_N(s, strokes) - LOOP_L_N(i, NOZZLE_CLEAN_CIRCLE_FN) - do_blocking_move_to_xy( - middle.x + sin((RADIANS(360) / NOZZLE_CLEAN_CIRCLE_FN) * i) * radius, - middle.y + cos((RADIANS(360) / NOZZLE_CLEAN_CIRCLE_FN) * i) * radius - ); - - // Let's be safe - do_blocking_move_to_xy(start); - - TERN_(NOZZLE_CLEAN_GOBACK, do_blocking_move_to(back)); - } + #endif /** * @brief Clean the nozzle @@ -159,10 +165,25 @@ Nozzle nozzle; * @param argument depends on the cleaning pattern */ void Nozzle::clean(const uint8_t &pattern, const uint8_t &strokes, const_float_t radius, const uint8_t &objects, const uint8_t cleans) { - xyz_pos_t start[HOTENDS] = NOZZLE_CLEAN_START_POINT, end[HOTENDS] = NOZZLE_CLEAN_END_POINT, middle[HOTENDS] = NOZZLE_CLEAN_CIRCLE_MIDDLE; + xyz_pos_t start[HOTENDS] = NOZZLE_CLEAN_START_POINT, end[HOTENDS] = NOZZLE_CLEAN_END_POINT; + #if ENABLED(NOZZLE_CLEAN_PATTERN_CIRCLE) + xyz_pos_t middle[HOTENDS] = NOZZLE_CLEAN_CIRCLE_MIDDLE; + #endif const uint8_t arrPos = EITHER(SINGLENOZZLE, MIXING_EXTRUDER) ? 0 : active_extruder; + switch (pattern) { + #if DISABLED(NOZZLE_CLEAN_PATTERN_LINE) + case 0: SERIAL_ECHOLNPGM("Pattern ", F("LINE"), " not enabled."); return; + #endif + #if DISABLED(NOZZLE_CLEAN_PATTERN_ZIGZAG) + case 1: SERIAL_ECHOLNPGM("Pattern ", F("ZIGZAG"), " not enabled."); return; + #endif + #if DISABLED(NOZZLE_CLEAN_PATTERN_CIRCLE) + case 2: SERIAL_ECHOLNPGM("Pattern ", F("CIRCULAR"), " not enabled."); return; + #endif + } + #if NOZZLE_CLEAN_MIN_TEMP > 20 if (thermalManager.degTargetHotend(arrPos) < NOZZLE_CLEAN_MIN_TEMP) { #if ENABLED(NOZZLE_CLEAN_HEATUP) @@ -179,45 +200,47 @@ Nozzle nozzle; #if HAS_SOFTWARE_ENDSTOPS #define LIMIT_AXIS(A) do{ \ - LIMIT( start[arrPos].A, soft_endstop.min.A, soft_endstop.max.A); \ - LIMIT(middle[arrPos].A, soft_endstop.min.A, soft_endstop.max.A); \ - LIMIT( end[arrPos].A, soft_endstop.min.A, soft_endstop.max.A); \ + LIMIT( start[arrPos].A, soft_endstop.min.A, soft_endstop.max.A); \ + LIMIT( end[arrPos].A, soft_endstop.min.A, soft_endstop.max.A); \ + TERN_(NOZZLE_CLEAN_PATTERN_CIRCLE, LIMIT(middle[arrPos].A, soft_endstop.min.A, soft_endstop.max.A)); \ }while(0) if (soft_endstop.enabled()) { - - LIMIT_AXIS(x); - LIMIT_AXIS(y); - LIMIT_AXIS(z); - const bool radiusOutOfRange = (middle[arrPos].x + radius > soft_endstop.max.x) - || (middle[arrPos].x - radius < soft_endstop.min.x) - || (middle[arrPos].y + radius > soft_endstop.max.y) - || (middle[arrPos].y - radius < soft_endstop.min.y); - if (radiusOutOfRange && pattern == 2) { - SERIAL_ECHOLNPGM("Warning: Radius Out of Range"); - return; - } - + LIMIT_AXIS(x); LIMIT_AXIS(y); LIMIT_AXIS(z); + #if ENABLED(NOZZLE_CLEAN_PATTERN_CIRCLE) + if (pattern == 2 && !(WITHIN(middle[arrPos].x, soft_endstop.min.x + radius, soft_endstop.max.x - radius) + && WITHIN(middle[arrPos].y, soft_endstop.min.y + radius, soft_endstop.max.y - radius)) + ) { + SERIAL_ECHOLNPGM("Warning: Radius Out of Range"); return; + } + #endif } #endif - if (pattern == 2) { - if (!(cleans & (_BV(X_AXIS) | _BV(Y_AXIS)))) { - SERIAL_ECHOLNPGM("Warning: Clean Circle requires XY"); - return; + #if ENABLED(NOZZLE_CLEAN_PATTERN_CIRCLE) + if (pattern == 2 && !(cleans & (_BV(X_AXIS) | _BV(Y_AXIS)))) { + SERIAL_ECHOLNPGM("Warning: Clean Circle requires XY"); return; } - } - else { + #endif + + if (TERN1(NOZZLE_CLEAN_PATTERN_CIRCLE, pattern != 2)) { if (!TEST(cleans, X_AXIS)) start[arrPos].x = end[arrPos].x = current_position.x; if (!TEST(cleans, Y_AXIS)) start[arrPos].y = end[arrPos].y = current_position.y; } if (!TEST(cleans, Z_AXIS)) start[arrPos].z = end[arrPos].z = current_position.z; switch (pattern) { - case 1: zigzag(start[arrPos], end[arrPos], strokes, objects); break; - case 2: circle(start[arrPos], middle[arrPos], strokes, radius); break; - default: stroke(start[arrPos], end[arrPos], strokes); + default: + #if ENABLED(NOZZLE_CLEAN_PATTERN_LINE) + case 0: stroke(start[arrPos], end[arrPos], strokes); + #endif + #if ENABLED(NOZZLE_CLEAN_PATTERN_ZIGZAG) + case 1: zigzag(start[arrPos], end[arrPos], strokes, objects); break; + #endif + #if ENABLED(NOZZLE_CLEAN_PATTERN_CIRCLE) + case 2: circle(start[arrPos], middle[arrPos], strokes, radius); break; + #endif } } diff --git a/buildroot/tests/rambo b/buildroot/tests/rambo index 040773230a..b50f220404 100755 --- a/buildroot/tests/rambo +++ b/buildroot/tests/rambo @@ -98,8 +98,8 @@ opt_enable EEPROM_SETTINGS EEPROM_CHITCHAT REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CO NOZZLE_PARK_FEATURE NOZZLE_CLEAN_FEATURE \ ADVANCED_PAUSE_FEATURE PARK_HEAD_ON_PAUSE ADVANCED_PAUSE_CONTINUOUS_PURGE FILAMENT_LOAD_UNLOAD_GCODES \ PRINTCOUNTER SERVICE_NAME_1 SERVICE_INTERVAL_1 M114_DETAIL -opt_add M100_FREE_MEMORY_DUMPER -opt_add M100_FREE_MEMORY_CORRUPTOR +opt_disable NOZZLE_CLEAN_PATTERN_CIRCLE +opt_add M100_FREE_MEMORY_DUMPER M100_FREE_MEMORY_CORRUPTOR exec_test $1 $2 "MINIRAMBO | RRDGFSC | ABL Linear Manual | M100 | PWM_MOTOR_CURRENT | M600..." "$3" # From 02a14d31b2bbe6f723dc8da75f1f124a99deedba Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Mon, 24 Apr 2023 00:21:28 +0000 Subject: [PATCH 222/225] [cron] Bump distribution date (2023-04-24) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index e18ee687ed..a2a254824d 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-04-23" +//#define STRING_DISTRIBUTION_DATE "2023-04-24" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 51f45936ca..146d422033 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-04-23" + #define STRING_DISTRIBUTION_DATE "2023-04-24" #endif /** From 743903b96fd64ef8cbe23d84eed7de1e29b1abed Mon Sep 17 00:00:00 2001 From: Nick Date: Mon, 24 Apr 2023 01:50:39 +0100 Subject: [PATCH 223/225] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20Anycubic=20PlayTun?= =?UTF-8?q?e=20(#25735)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to #25690 Co-authored-by: Scott Lahteine --- Marlin/src/lcd/extui/anycubic/Tunes.cpp | 4 ++-- Marlin/src/lcd/extui/anycubic/Tunes.h | 4 ++-- Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.cpp | 10 +++++----- Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp | 10 +++++----- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Marlin/src/lcd/extui/anycubic/Tunes.cpp b/Marlin/src/lcd/extui/anycubic/Tunes.cpp index 118f049bc1..d1fb888d17 100644 --- a/Marlin/src/lcd/extui/anycubic/Tunes.cpp +++ b/Marlin/src/lcd/extui/anycubic/Tunes.cpp @@ -39,12 +39,12 @@ namespace Anycubic { - void PlayTune(const uint16_t *tune, const uint8_t speed=1) { + void PlayTune(const uint16_t *tune, const uint8_t speed/*=1*/) { const uint16_t wholenotelen = tune[0] / speed; for (uint8_t pos = 1; pos < MAX_TUNE_LENGTH; pos += 2) { const uint16_t freq = tune[pos]; if (freq == n_END) break; - BUZZ(freq, wholenotelen / tune[pos + 1]); + BUZZ(wholenotelen / tune[pos + 1], freq); } } diff --git a/Marlin/src/lcd/extui/anycubic/Tunes.h b/Marlin/src/lcd/extui/anycubic/Tunes.h index be8bc7223c..8b99f1f863 100644 --- a/Marlin/src/lcd/extui/anycubic/Tunes.h +++ b/Marlin/src/lcd/extui/anycubic/Tunes.h @@ -61,7 +61,7 @@ n_END=10000 // end of tune marker namespace Anycubic { - void PlayTune(const uint16_t *tune, const uint8_t speed); + void PlayTune(const uint16_t *tune, const uint8_t speed=1); // Only uncomment the tunes you are using to save memory // This will help you write tunes! @@ -100,7 +100,7 @@ namespace Anycubic { n_END }; - const uint16_t Heater_Timedout[] = { + const uint16_t HeaterTimeout[] = { 1000, n_C6,l_T1, n_END diff --git a/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.cpp b/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.cpp index 45fb73c02f..f3bc64a024 100644 --- a/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.cpp +++ b/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.cpp @@ -104,7 +104,7 @@ void ChironTFT::Startup() { injectCommands(AC_cmnd_enable_leveling); // Startup tunes are defined in Tunes.h - PlayTune(TERN(AC_DEFAULT_STARTUP_TUNE, Anycubic_PowerOn, GB_PowerOn), 1); + PlayTune(TERN(AC_DEFAULT_STARTUP_TUNE, Anycubic_PowerOn, GB_PowerOn)); #if ACDEBUGLEVEL SERIAL_ECHOLNPGM("AC Debug Level ", ACDEBUGLEVEL); @@ -192,7 +192,7 @@ void ChironTFT::FilamentRunout() { // 1 Signal filament out last_error = AC_error_filament_runout; SendtoTFTLN(isPrintingFromMedia() ? AC_msg_filament_out_alert : AC_msg_filament_out_block); - PlayTune(FilamentOut, 1); + PlayTune(FilamentOut); } void ChironTFT::ConfirmationRequest(const char * const msg) { @@ -215,7 +215,7 @@ void ChironTFT::ConfirmationRequest(const char * const msg) { if (strcmp_P(msg, MARLIN_msg_heater_timeout) == 0) { pause_state = AC_paused_heater_timed_out; SendtoTFTLN(AC_msg_paused); // enable continue button - PlayTune(BEEPER_PIN,Heater_Timedout,1); + PlayTune(HeaterTimeout); } // Reheat finished, send acknowledgement else if (strcmp_P(msg, MARLIN_msg_reheat_done) == 0) { @@ -253,7 +253,7 @@ void ChironTFT::StatusChange(const char * const msg) { } // If probing fails don't save the mesh raise the probe above the bad point if (strcmp_P(msg, MARLIN_msg_probing_failed) == 0) { - PlayTune(BeepBeepBeeep, 1); + PlayTune(BeepBeepBeeep); injectCommands(F("G1 Z50 F500")); SendtoTFTLN(AC_msg_probing_complete); printer_state = AC_printer_idle; @@ -307,7 +307,7 @@ void ChironTFT::StatusChange(const char * const msg) { void ChironTFT::PowerLossRecovery() { printer_state = AC_printer_resuming_from_power_outage; // Play tune to notify user we can recover. last_error = AC_error_powerloss; - PlayTune(SOS, 1); + PlayTune(SOS); SERIAL_ECHOLNF(AC_msg_powerloss_recovery); } diff --git a/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp b/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp index e2bc343d67..387557f2af 100644 --- a/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp +++ b/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp @@ -463,7 +463,7 @@ namespace Anycubic { pop_up_index = 15; // show filament lack. if (READ(FIL_RUNOUT_PIN) == FIL_RUNOUT_STATE) { - PlayTune(FilamentOut, 1); + PlayTune(FilamentOut); feedrate_back = getFeedrate_percent(); @@ -505,7 +505,7 @@ namespace Anycubic { if (strcmp_P(msg, MARLIN_msg_heater_timeout) == 0) { pause_state = AC_paused_heater_timed_out; SendtoTFTLN(AC_msg_paused); // enable continue button - PlayTune(Heater_Timedout, 1); + PlayTune(HeaterTimeout); } // Reheat finished, send acknowledgement else if (strcmp_P(msg, MARLIN_msg_reheat_done) == 0) { @@ -576,7 +576,7 @@ namespace Anycubic { // If probing fails don't save the mesh raise the probe above the bad point if (strcmp_P(msg, MARLIN_msg_probing_failed) == 0) { - PlayTune(BeepBeepBeeep, 1); + PlayTune(BeepBeepBeeep); injectCommands(F("G1 Z50 F500")); ChangePageOfTFT(PAGE_CHS_ABNORMAL_LEVELING_SENSOR); SendtoTFTLN(AC_msg_probing_complete); @@ -1070,7 +1070,7 @@ namespace Anycubic { #else SendTxtToTFT(recovery.info.sd_filename, TXT_OUTAGE_RECOVERY_FILE); #endif - PlayTune(SOS, 1); + PlayTune(SOS); } #else constexpr bool is_outage = false; @@ -1081,7 +1081,7 @@ namespace Anycubic { } else if (control_value == 0x010000) { // startup first gif // Startup tunes are defined in Tunes.h - PlayTune(Anycubic_PowerOn, 1); // takes 3500 ms + PlayTune(Anycubic_PowerOn); // takes 3500 ms } } From 2954bf26979e43c6b36ca2739af4e887b651f3f8 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 24 Apr 2023 00:24:40 -0500 Subject: [PATCH 224/225] =?UTF-8?q?=F0=9F=8C=90=20Replace=20'=3D'=20with?= =?UTF-8?q?=20'{'=20for=20substitution?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/e3v2/marlinui/dwin_string.cpp | 6 +-- Marlin/src/lcd/language/language_cz.h | 4 +- Marlin/src/lcd/language/language_de.h | 6 +-- Marlin/src/lcd/language/language_en.h | 10 ++-- Marlin/src/lcd/language/language_es.h | 4 +- Marlin/src/lcd/language/language_fr.h | 4 +- Marlin/src/lcd/language/language_fr_na.h | 4 +- Marlin/src/lcd/language/language_gl.h | 6 +-- Marlin/src/lcd/language/language_hu.h | 12 ++--- Marlin/src/lcd/language/language_it.h | 8 ++-- Marlin/src/lcd/language/language_pl.h | 8 ++-- Marlin/src/lcd/language/language_pt_br.h | 2 +- Marlin/src/lcd/language/language_ro.h | 4 +- Marlin/src/lcd/language/language_ru.h | 6 +-- Marlin/src/lcd/language/language_sk.h | 8 ++-- Marlin/src/lcd/language/language_sv.h | 6 +-- Marlin/src/lcd/language/language_tr.h | 8 ++-- Marlin/src/lcd/language/language_uk.h | 6 +-- Marlin/src/lcd/language/language_zh_CN.h | 44 ++++++++--------- Marlin/src/lcd/language/language_zh_TW.h | 50 ++++++++++---------- Marlin/src/lcd/lcdprint.cpp | 6 +-- Marlin/src/lcd/lcdprint.h | 2 +- Marlin/src/lcd/tft/tft_string.cpp | 6 +-- 23 files changed, 110 insertions(+), 110 deletions(-) diff --git a/Marlin/src/lcd/e3v2/marlinui/dwin_string.cpp b/Marlin/src/lcd/e3v2/marlinui/dwin_string.cpp index 38a8eafe23..6d60608426 100644 --- a/Marlin/src/lcd/e3v2/marlinui/dwin_string.cpp +++ b/Marlin/src/lcd/e3v2/marlinui/dwin_string.cpp @@ -44,7 +44,7 @@ uint8_t read_byte(const uint8_t *byte) { return *byte; } * Add a string, applying substitutions for the following characters: * * $ displays the clipped string given by fstr or cstr - * = displays '0'....'10' for indexes 0 - 10 + * { displays '0'....'10' for indexes 0 - 10 * ~ displays '1'....'11' for indexes 0 - 10 * * displays 'E1'...'E11' for indexes 0 - 10 (By default. Uses LCD_FIRST_TOOL) * @ displays an axis name such as XYZUVW, or E for an extruder @@ -57,9 +57,9 @@ void DWIN_String::add(const char *tpl, const int8_t index, const char *cstr/*=nu if (wc > 255) wc |= 0x0080; const uint8_t ch = uint8_t(wc & 0x00FF); - if (ch == '=' || ch == '~' || ch == '*') { + if (ch == '{' || ch == '~' || ch == '*') { if (index >= 0) { - int8_t inum = index + ((ch == '=') ? 0 : LCD_FIRST_TOOL); + int8_t inum = index + ((ch == '{') ? 0 : LCD_FIRST_TOOL); if (ch == '*') add_character('E'); if (inum >= 10) { add_character('0' + (inum / 10)); inum %= 10; } add_character('0' + inum); diff --git a/Marlin/src/lcd/language/language_cz.h b/Marlin/src/lcd/language/language_cz.h index d06c5554fd..1f697f8d5a 100644 --- a/Marlin/src/lcd/language/language_cz.h +++ b/Marlin/src/lcd/language/language_cz.h @@ -334,7 +334,7 @@ namespace Language_cz { LSTR MSG_STOP_PRINT = _UxGT("Zastavit tisk"); LSTR MSG_PRINTING_OBJECT = _UxGT("Tisk objektu"); LSTR MSG_CANCEL_OBJECT = _UxGT("Zrušit objekt"); - LSTR MSG_CANCEL_OBJECT_N = _UxGT("Zrušit objekt ="); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Zrušit objekt {"); LSTR MSG_OUTAGE_RECOVERY = _UxGT("Obnova výpadku"); LSTR MSG_MEDIA_MENU = _UxGT("Tisknout z SD"); LSTR MSG_NO_MEDIA = _UxGT("Žádná SD karta"); @@ -512,7 +512,7 @@ namespace Language_cz { LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("Vytáhněte, klikněte"); LSTR MSG_MIX = _UxGT("Mix"); - LSTR MSG_MIX_COMPONENT_N = _UxGT("Komponenta ="); + LSTR MSG_MIX_COMPONENT_N = _UxGT("Komponenta {"); LSTR MSG_MIXER = _UxGT("Mixér"); LSTR MSG_GRADIENT = _UxGT("Přechod"); LSTR MSG_FULL_GRADIENT = _UxGT("Celý přechod"); diff --git a/Marlin/src/lcd/language/language_de.h b/Marlin/src/lcd/language/language_de.h index 4313a80490..534d49ade9 100644 --- a/Marlin/src/lcd/language/language_de.h +++ b/Marlin/src/lcd/language/language_de.h @@ -277,7 +277,7 @@ namespace Language_de { LSTR MSG_SET_LEDS_VIOLET = _UxGT("Violett"); LSTR MSG_SET_LEDS_WHITE = _UxGT("Weiß"); LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Standard"); - LSTR MSG_LED_CHANNEL_N = _UxGT("Kanal ="); + LSTR MSG_LED_CHANNEL_N = _UxGT("Kanal {"); LSTR MSG_LEDS2 = _UxGT("Lichter #2"); LSTR MSG_NEO2_PRESETS = _UxGT("Licht #2 Voreinst."); LSTR MSG_NEO2_BRIGHTNESS = _UxGT("Helligkeit"); @@ -461,7 +461,7 @@ namespace Language_de { LSTR MSG_END_LOOPS = _UxGT("Wiederholung beenden"); LSTR MSG_PRINTING_OBJECT = _UxGT("Objekt drucken"); LSTR MSG_CANCEL_OBJECT = _UxGT("Objekt abbrechen"); - LSTR MSG_CANCEL_OBJECT_N = _UxGT("Objekt abbrechen ="); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Objekt abbrechen {"); LSTR MSG_OUTAGE_RECOVERY = _UxGT("Wiederh. n. Stroma."); LSTR MSG_CONTINUE_PRINT_JOB = _UxGT("Druckauftrag fortset."); LSTR MSG_MEDIA_MENU = _UxGT("Druck vom Medium"); @@ -692,7 +692,7 @@ namespace Language_de { LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("Entfernen, klicken"); LSTR MSG_MIX = _UxGT("Mix"); - LSTR MSG_MIX_COMPONENT_N = _UxGT("Komponente ="); + LSTR MSG_MIX_COMPONENT_N = _UxGT("Komponente {"); LSTR MSG_MIXER = _UxGT("Mixer"); LSTR MSG_GRADIENT = _UxGT("Gradient"); // equal Farbverlauf LSTR MSG_FULL_GRADIENT = _UxGT("Volle Gradient"); diff --git a/Marlin/src/lcd/language/language_en.h b/Marlin/src/lcd/language/language_en.h index 9a64587f15..0cfd2f8bea 100644 --- a/Marlin/src/lcd/language/language_en.h +++ b/Marlin/src/lcd/language/language_en.h @@ -30,7 +30,7 @@ * Substitutions are applied for the following characters when used in menu items titles: * * $ displays an inserted string - * = displays '0'....'10' for indexes 0 - 10 + * { displays '0'....'10' for indexes 0 - 10 * ~ displays '1'....'11' for indexes 0 - 10 * * displays 'E1'...'E11' for indexes 0 - 10 (By default. Uses LCD_FIRST_TOOL) * @ displays an axis name such as XYZUVW, or E for an extruder @@ -298,7 +298,7 @@ namespace Language_en { LSTR MSG_SET_LEDS_VIOLET = _UxGT("Violet"); LSTR MSG_SET_LEDS_WHITE = _UxGT("White"); LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Default"); - LSTR MSG_LED_CHANNEL_N = _UxGT("Channel ="); + LSTR MSG_LED_CHANNEL_N = _UxGT("Channel {"); LSTR MSG_LEDS2 = _UxGT("Lights #2"); LSTR MSG_NEO2_PRESETS = _UxGT("Light #2 Presets"); LSTR MSG_NEO2_BRIGHTNESS = _UxGT("Brightness"); @@ -505,7 +505,7 @@ namespace Language_en { LSTR MSG_HOST_START_PRINT = _UxGT("Start Host Print"); LSTR MSG_PRINTING_OBJECT = _UxGT("Printing Object"); LSTR MSG_CANCEL_OBJECT = _UxGT("Cancel Object"); - LSTR MSG_CANCEL_OBJECT_N = _UxGT("Cancel Object ="); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Cancel Object {"); LSTR MSG_CONTINUE_PRINT_JOB = _UxGT("Continue Print Job"); LSTR MSG_MEDIA_MENU = _UxGT("Print from ") MEDIA_TYPE_EN; LSTR MSG_TURN_OFF = _UxGT("Turn off the printer"); @@ -514,7 +514,7 @@ namespace Language_en { LSTR MSG_HOST_START_PRINT = _UxGT("Host Start"); LSTR MSG_PRINTING_OBJECT = _UxGT("Print Obj"); LSTR MSG_CANCEL_OBJECT = _UxGT("Cancel Obj"); - LSTR MSG_CANCEL_OBJECT_N = _UxGT("Cancel Obj ="); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Cancel Obj {"); LSTR MSG_CONTINUE_PRINT_JOB = _UxGT("Continue Job"); LSTR MSG_MEDIA_MENU = MEDIA_TYPE_EN _UxGT(" Print"); LSTR MSG_TURN_OFF = _UxGT("Turn off now"); @@ -757,7 +757,7 @@ namespace Language_en { LSTR MSG_MMU2_REMOVE_AND_CLICK = _UxGT("Remove and click..."); LSTR MSG_MIX = _UxGT("Mix"); - LSTR MSG_MIX_COMPONENT_N = _UxGT("Component ="); + LSTR MSG_MIX_COMPONENT_N = _UxGT("Component {"); LSTR MSG_MIXER = _UxGT("Mixer"); LSTR MSG_GRADIENT = _UxGT("Gradient"); LSTR MSG_FULL_GRADIENT = _UxGT("Full Gradient"); diff --git a/Marlin/src/lcd/language/language_es.h b/Marlin/src/lcd/language/language_es.h index 371df360ee..f3d6fc577d 100644 --- a/Marlin/src/lcd/language/language_es.h +++ b/Marlin/src/lcd/language/language_es.h @@ -338,7 +338,7 @@ namespace Language_es { LSTR MSG_STOP_PRINT = _UxGT("Detener impresión"); LSTR MSG_PRINTING_OBJECT = _UxGT("Imprimiendo Objeto"); LSTR MSG_CANCEL_OBJECT = _UxGT("Cancelar Objeto"); - LSTR MSG_CANCEL_OBJECT_N = _UxGT("Cancelar Objeto ="); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Cancelar Objeto {"); LSTR MSG_OUTAGE_RECOVERY = _UxGT("Rec. Fallo electrico"); LSTR MSG_MEDIA_MENU = _UxGT("Imprim. desde SD/FD"); LSTR MSG_NO_MEDIA = _UxGT("SD/FD no presente"); @@ -510,7 +510,7 @@ namespace Language_es { LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("Retirar, y pulsar"); LSTR MSG_MIX = _UxGT("Mezcla"); - LSTR MSG_MIX_COMPONENT_N = _UxGT("Componente ="); + LSTR MSG_MIX_COMPONENT_N = _UxGT("Componente {"); LSTR MSG_MIXER = _UxGT("Miezclador"); LSTR MSG_GRADIENT = _UxGT("Degradado"); LSTR MSG_FULL_GRADIENT = _UxGT("Degradado Total"); diff --git a/Marlin/src/lcd/language/language_fr.h b/Marlin/src/lcd/language/language_fr.h index f7eec7f5ce..01422f5c76 100644 --- a/Marlin/src/lcd/language/language_fr.h +++ b/Marlin/src/lcd/language/language_fr.h @@ -353,7 +353,7 @@ namespace Language_fr { LSTR MSG_STOP_PRINT = _UxGT("Arrêter impr."); LSTR MSG_PRINTING_OBJECT = _UxGT("Impression objet"); LSTR MSG_CANCEL_OBJECT = _UxGT("Annuler objet"); - LSTR MSG_CANCEL_OBJECT_N = _UxGT("Annuler objet ="); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Annuler objet {"); LSTR MSG_OUTAGE_RECOVERY = _UxGT("Récup. coup."); LSTR MSG_MEDIA_MENU = _UxGT("Impression SD"); LSTR MSG_NO_MEDIA = _UxGT("Pas de média"); @@ -540,7 +540,7 @@ namespace Language_fr { LSTR MSG_MMU2_RESETTING = _UxGT("Réinit. MMU..."); LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("Retrait, click"); - LSTR MSG_MIX_COMPONENT_N = _UxGT("Composante ="); + LSTR MSG_MIX_COMPONENT_N = _UxGT("Composante {"); LSTR MSG_MIXER = _UxGT("Mixeur"); LSTR MSG_GRADIENT = _UxGT("Dégradé"); LSTR MSG_FULL_GRADIENT = _UxGT("Dégradé complet"); diff --git a/Marlin/src/lcd/language/language_fr_na.h b/Marlin/src/lcd/language/language_fr_na.h index 9300b299eb..12fa0295ea 100644 --- a/Marlin/src/lcd/language/language_fr_na.h +++ b/Marlin/src/lcd/language/language_fr_na.h @@ -353,7 +353,7 @@ namespace Language_fr_na { LSTR MSG_STOP_PRINT = _UxGT("Arreter impr."); LSTR MSG_PRINTING_OBJECT = _UxGT("Impression objet"); LSTR MSG_CANCEL_OBJECT = _UxGT("Annuler objet"); - LSTR MSG_CANCEL_OBJECT_N = _UxGT("Annuler objet ="); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Annuler objet {"); LSTR MSG_OUTAGE_RECOVERY = _UxGT("Recup. coup."); LSTR MSG_MEDIA_MENU = _UxGT("Impression SD"); LSTR MSG_NO_MEDIA = _UxGT("Pas de media"); @@ -543,7 +543,7 @@ namespace Language_fr_na { LSTR MSG_MMU2_RESETTING = _UxGT("Reinit. MMU..."); LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("Retrait, click"); - LSTR MSG_MIX_COMPONENT_N = _UxGT("Composante ="); + LSTR MSG_MIX_COMPONENT_N = _UxGT("Composante {"); LSTR MSG_MIXER = _UxGT("Mixeur"); LSTR MSG_GRADIENT = _UxGT("Degrade"); LSTR MSG_FULL_GRADIENT = _UxGT("Degrade complet"); diff --git a/Marlin/src/lcd/language/language_gl.h b/Marlin/src/lcd/language/language_gl.h index da8a7047c7..83855dd56d 100644 --- a/Marlin/src/lcd/language/language_gl.h +++ b/Marlin/src/lcd/language/language_gl.h @@ -22,7 +22,7 @@ #pragma once /** - * Galician language (ISO "gl") + * Galician language * * LCD Menu Messages * See also https://marlinfw.org/docs/development/lcd_language.html @@ -342,7 +342,7 @@ namespace Language_gl { LSTR MSG_STOP_PRINT = _UxGT("Deter impresión"); LSTR MSG_PRINTING_OBJECT = _UxGT("Imprimindo Obxecto"); LSTR MSG_CANCEL_OBJECT = _UxGT("Cancelar Obxecto"); - LSTR MSG_CANCEL_OBJECT_N = _UxGT("Cancelar Obxecto ="); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Cancelar Obxecto {"); LSTR MSG_OUTAGE_RECOVERY = _UxGT("Recuperar Impresión"); LSTR MSG_MEDIA_MENU = _UxGT("Tarxeta SD"); LSTR MSG_NO_MEDIA = _UxGT("Sen tarxeta SD"); @@ -525,7 +525,7 @@ namespace Language_gl { LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("Expulsar, premer"); LSTR MSG_MIX = _UxGT("Mestura"); - LSTR MSG_MIX_COMPONENT_N = _UxGT("Compoñente ="); + LSTR MSG_MIX_COMPONENT_N = _UxGT("Compoñente {"); LSTR MSG_MIXER = _UxGT("Mesturadora"); LSTR MSG_GRADIENT = _UxGT("Degradado"); LSTR MSG_FULL_GRADIENT = _UxGT("Degradado Total"); diff --git a/Marlin/src/lcd/language/language_hu.h b/Marlin/src/lcd/language/language_hu.h index 471f2ee8cb..99062ca5c3 100644 --- a/Marlin/src/lcd/language/language_hu.h +++ b/Marlin/src/lcd/language/language_hu.h @@ -240,7 +240,7 @@ namespace Language_hu { LSTR MSG_SET_LEDS_VIOLET = _UxGT("Viola"); LSTR MSG_SET_LEDS_WHITE = _UxGT("Fehér"); LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Alapérték"); - LSTR MSG_LED_CHANNEL_N = _UxGT("Csatorna ="); + LSTR MSG_LED_CHANNEL_N = _UxGT("Csatorna {"); LSTR MSG_LEDS2 = _UxGT("LED-ek #2"); LSTR MSG_NEO2_PRESETS = _UxGT("Fény #2 megadott"); LSTR MSG_NEO2_BRIGHTNESS = _UxGT("Fényerö"); @@ -284,10 +284,10 @@ namespace Language_hu { LSTR MSG_FLOWMETER_SAFETY = _UxGT("Áramlásbiztonság"); LSTR MSG_LASER = _UxGT("Lézer"); LSTR MSG_FAN_SPEED = _UxGT("Hütés sebesség"); - LSTR MSG_FAN_SPEED_N = _UxGT("Hütés sebesség ="); - LSTR MSG_STORED_FAN_N = _UxGT("Tárolt hütés ="); + LSTR MSG_FAN_SPEED_N = _UxGT("Hütés sebesség {"); + LSTR MSG_STORED_FAN_N = _UxGT("Tárolt hütés {"); LSTR MSG_EXTRA_FAN_SPEED = _UxGT("Extra hütés sebesség"); - LSTR MSG_EXTRA_FAN_SPEED_N = _UxGT("Extra hütés sebesség ="); + LSTR MSG_EXTRA_FAN_SPEED_N = _UxGT("Extra hütés sebesség {"); LSTR MSG_CONTROLLER_FAN = _UxGT("Hütésvezérlés"); LSTR MSG_CONTROLLER_FAN_IDLE_SPEED = _UxGT("Alapjárat"); LSTR MSG_CONTROLLER_FAN_AUTO_ON = _UxGT("Automatikus mód"); @@ -396,7 +396,7 @@ namespace Language_hu { LSTR MSG_END_LOOPS = _UxGT("Hurok ismétlés vége"); LSTR MSG_PRINTING_OBJECT = _UxGT("Objektum nyomtatása"); LSTR MSG_CANCEL_OBJECT = _UxGT("Objektum törlése"); - LSTR MSG_CANCEL_OBJECT_N = _UxGT("Objektum törlése ="); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Objektum törlése {"); LSTR MSG_OUTAGE_RECOVERY = _UxGT("Kiesés helyreáll."); LSTR MSG_MEDIA_MENU = _UxGT("Nyomtatás tárolóról"); LSTR MSG_NO_MEDIA = _UxGT("Nincs tároló"); @@ -587,7 +587,7 @@ namespace Language_hu { LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("Kidob, kattint"); LSTR MSG_MIX = _UxGT("Kever"); - LSTR MSG_MIX_COMPONENT_N = _UxGT("Összetevö ="); + LSTR MSG_MIX_COMPONENT_N = _UxGT("Összetevö {"); LSTR MSG_MIXER = _UxGT("Keverö"); LSTR MSG_GRADIENT = _UxGT("Színátm."); LSTR MSG_FULL_GRADIENT = _UxGT("Teljes színátm."); diff --git a/Marlin/src/lcd/language/language_it.h b/Marlin/src/lcd/language/language_it.h index 4bc7c0303a..bd0d2f2257 100644 --- a/Marlin/src/lcd/language/language_it.h +++ b/Marlin/src/lcd/language/language_it.h @@ -30,7 +30,7 @@ * Substitutions are applied for the following characters when used in menu items titles: * * $ displays an inserted string - * = displays '0'....'10' for indexes 0 - 10 + * { displays '0'....'10' for indexes 0 - 10 * ~ displays '1'....'11' for indexes 0 - 10 * * displays 'E1'...'E11' for indexes 0 - 10 (By default. Uses LCD_FIRST_TOOL) * @ displays an axis name such as XYZUVW, or E for an extruder @@ -293,7 +293,7 @@ namespace Language_it { LSTR MSG_SET_LEDS_VIOLET = _UxGT("Viola"); LSTR MSG_SET_LEDS_WHITE = _UxGT("Bianco"); LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Predefinito"); - LSTR MSG_LED_CHANNEL_N = _UxGT("Canale ="); + LSTR MSG_LED_CHANNEL_N = _UxGT("Canale {"); LSTR MSG_LEDS2 = _UxGT("Luci #2"); LSTR MSG_NEO2_PRESETS = _UxGT("Presets luce #2"); LSTR MSG_NEO2_BRIGHTNESS = _UxGT("Luminosità"); @@ -498,7 +498,7 @@ namespace Language_it { LSTR MSG_END_LOOPS = _UxGT("Fine cicli di rip."); LSTR MSG_PRINTING_OBJECT = _UxGT("Stampa Oggetto"); LSTR MSG_CANCEL_OBJECT = _UxGT("Cancella Oggetto"); - LSTR MSG_CANCEL_OBJECT_N = _UxGT("Canc. Oggetto ="); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Canc. Oggetto {"); LSTR MSG_OUTAGE_RECOVERY = _UxGT("Ripresa da PowerLoss"); LSTR MSG_CONTINUE_PRINT_JOB = _UxGT("Cont.proc.stampa"); LSTR MSG_MEDIA_MENU = _UxGT("Stampa da media"); @@ -734,7 +734,7 @@ namespace Language_it { LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("Rimuovi, click"); LSTR MSG_MIX = _UxGT("Miscela"); - LSTR MSG_MIX_COMPONENT_N = _UxGT("Componente ="); + LSTR MSG_MIX_COMPONENT_N = _UxGT("Componente {"); LSTR MSG_MIXER = _UxGT("Miscelatore"); LSTR MSG_GRADIENT = _UxGT("Gradiente"); LSTR MSG_FULL_GRADIENT = _UxGT("Gradiente pieno"); diff --git a/Marlin/src/lcd/language/language_pl.h b/Marlin/src/lcd/language/language_pl.h index 5bf4884941..855a1e3bd1 100644 --- a/Marlin/src/lcd/language/language_pl.h +++ b/Marlin/src/lcd/language/language_pl.h @@ -30,7 +30,7 @@ * Substitutions are applied for the following characters when used in menu items titles: * * $ displays an inserted string - * = displays '0'....'10' for indexes 0 - 10 + * { displays '0'....'10' for indexes 0 - 10 * ~ displays '1'....'11' for indexes 0 - 10 * * displays 'E1'...'E11' for indexes 0 - 10 (By default. Uses LCD_FIRST_TOOL) * @ displays an axis name such as XYZUVW, or E for an extruder @@ -221,7 +221,7 @@ namespace Language_pl { LSTR MSG_SET_LEDS_VIOLET = _UxGT("Fioletowy"); LSTR MSG_SET_LEDS_WHITE = _UxGT("Biały"); LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Domyślny"); - LSTR MSG_LED_CHANNEL_N = _UxGT("Kanał ="); + LSTR MSG_LED_CHANNEL_N = _UxGT("Kanał {"); LSTR MSG_NEO2_BRIGHTNESS = _UxGT("Jasność"); LSTR MSG_CUSTOM_LEDS = _UxGT("Własne światła"); LSTR MSG_INTENSITY_R = _UxGT("Czerwony"); @@ -330,7 +330,7 @@ namespace Language_pl { LSTR MSG_STOP_PRINT = _UxGT("Stop"); LSTR MSG_PRINTING_OBJECT = _UxGT("Drukowanie obiektu"); LSTR MSG_CANCEL_OBJECT = _UxGT("Anunuj obiekt"); - LSTR MSG_CANCEL_OBJECT_N = _UxGT("Anunuj obiekt ="); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Anunuj obiekt {"); LSTR MSG_OUTAGE_RECOVERY = _UxGT("Odzyskiwanie po awarii"); LSTR MSG_MEDIA_MENU = _UxGT("Karta SD"); LSTR MSG_NO_MEDIA = _UxGT("Brak karty"); @@ -474,7 +474,7 @@ namespace Language_pl { LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("Usuń, kliknij"); LSTR MSG_MIX = _UxGT("Miks"); - LSTR MSG_MIX_COMPONENT_N = _UxGT("Komponent ="); + LSTR MSG_MIX_COMPONENT_N = _UxGT("Komponent {"); LSTR MSG_MIXER = _UxGT("Mikser"); LSTR MSG_FULL_GRADIENT = _UxGT("Pełny gradient"); LSTR MSG_TOGGLE_MIX = _UxGT("Przełacz miks"); diff --git a/Marlin/src/lcd/language/language_pt_br.h b/Marlin/src/lcd/language/language_pt_br.h index c17ca124ed..4ace61e116 100644 --- a/Marlin/src/lcd/language/language_pt_br.h +++ b/Marlin/src/lcd/language/language_pt_br.h @@ -293,7 +293,7 @@ namespace Language_pt_br { LSTR MSG_STOP_PRINT = _UxGT("Parar impressão"); LSTR MSG_PRINTING_OBJECT = _UxGT("Imprimindo objeto"); LSTR MSG_CANCEL_OBJECT = _UxGT("Cancelar Objeto"); - LSTR MSG_CANCEL_OBJECT_N = _UxGT("Cancelar Objeto ="); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Cancelar Objeto {"); LSTR MSG_OUTAGE_RECOVERY = _UxGT("Recuperar Impressão"); LSTR MSG_MEDIA_MENU = _UxGT("Imprimir do SD"); LSTR MSG_NO_MEDIA = _UxGT("Sem cartão SD"); diff --git a/Marlin/src/lcd/language/language_ro.h b/Marlin/src/lcd/language/language_ro.h index bdb9f226a9..327ba7ad81 100644 --- a/Marlin/src/lcd/language/language_ro.h +++ b/Marlin/src/lcd/language/language_ro.h @@ -348,7 +348,7 @@ namespace Language_ro { LSTR MSG_STOP_PRINT = _UxGT("Stop Print"); LSTR MSG_PRINTING_OBJECT = _UxGT("Printing Object"); LSTR MSG_CANCEL_OBJECT = _UxGT("Cancel Object"); - LSTR MSG_CANCEL_OBJECT_N = _UxGT("Cancel Object ="); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Cancel Object {"); LSTR MSG_OUTAGE_RECOVERY = _UxGT("Outage Recovery"); LSTR MSG_MEDIA_MENU = _UxGT("Print from Media"); LSTR MSG_NO_MEDIA = _UxGT("No Media"); @@ -532,7 +532,7 @@ namespace Language_ro { LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("Remove, click"); LSTR MSG_MIX = _UxGT("Mix"); - LSTR MSG_MIX_COMPONENT_N = _UxGT("Component ="); + LSTR MSG_MIX_COMPONENT_N = _UxGT("Component {"); LSTR MSG_MIXER = _UxGT("Mixer"); LSTR MSG_GRADIENT = _UxGT("Gradient"); LSTR MSG_FULL_GRADIENT = _UxGT("Full Gradient"); diff --git a/Marlin/src/lcd/language/language_ru.h b/Marlin/src/lcd/language/language_ru.h index 6dd773f77b..b5815be1bd 100644 --- a/Marlin/src/lcd/language/language_ru.h +++ b/Marlin/src/lcd/language/language_ru.h @@ -310,7 +310,7 @@ namespace Language_ru { LSTR MSG_SET_LEDS_VIOLET = _UxGT("Фиолетовый"); LSTR MSG_SET_LEDS_WHITE = _UxGT("Белый"); LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Свет по умолчанию"); - LSTR MSG_LED_CHANNEL_N = _UxGT("Канал ="); + LSTR MSG_LED_CHANNEL_N = _UxGT("Канал {"); LSTR MSG_LEDS2 = _UxGT("Свет #2"); #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_NEO2_PRESETS = _UxGT("Свет #2 предустановки"); @@ -485,7 +485,7 @@ namespace Language_ru { LSTR MSG_STOP_PRINT = _UxGT("Остановить печать"); LSTR MSG_PRINTING_OBJECT = _UxGT("Печать объекта"); LSTR MSG_CANCEL_OBJECT = _UxGT("Завершить объект"); - LSTR MSG_CANCEL_OBJECT_N = _UxGT("Завершить объект ="); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Завершить объект {"); LSTR MSG_OUTAGE_RECOVERY = _UxGT("Восстановение сбоя"); LSTR MSG_MEDIA_MENU = _UxGT("Печать с SD карты"); LSTR MSG_NO_MEDIA = _UxGT("Нет SD карты"); @@ -734,7 +734,7 @@ namespace Language_ru { #else LSTR MSG_MIX = _UxGT("Смешив."); #endif - LSTR MSG_MIX_COMPONENT_N = _UxGT("Компонент ="); + LSTR MSG_MIX_COMPONENT_N = _UxGT("Компонент {"); LSTR MSG_MIXER = _UxGT("Смеситель"); LSTR MSG_GRADIENT = _UxGT("Градиент"); LSTR MSG_FULL_GRADIENT = _UxGT("Полный градиент"); diff --git a/Marlin/src/lcd/language/language_sk.h b/Marlin/src/lcd/language/language_sk.h index c78029048b..907b865bd9 100644 --- a/Marlin/src/lcd/language/language_sk.h +++ b/Marlin/src/lcd/language/language_sk.h @@ -34,7 +34,7 @@ * Substitutions are applied for the following characters when used in menu items titles: * * $ displays an inserted string - * = displays '0'....'10' for indexes 0 - 10 + * { displays '0'....'10' for indexes 0 - 10 * ~ displays '1'....'11' for indexes 0 - 10 * * displays 'E1'...'E11' for indexes 0 - 10 (By default. Uses LCD_FIRST_TOOL) * @ displays an axis name such as XYZUVW, or E for an extruder @@ -294,7 +294,7 @@ namespace Language_sk { LSTR MSG_SET_LEDS_VIOLET = _UxGT("Fialová"); LSTR MSG_SET_LEDS_WHITE = _UxGT("Biela"); LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Obnoviť nastavenie"); - LSTR MSG_LED_CHANNEL_N = _UxGT("Kanál ="); + LSTR MSG_LED_CHANNEL_N = _UxGT("Kanál {"); LSTR MSG_LEDS2 = _UxGT("Svetlo #2"); LSTR MSG_NEO2_PRESETS = _UxGT("Predvolby svetla #2"); LSTR MSG_NEO2_BRIGHTNESS = _UxGT("Jas"); @@ -500,7 +500,7 @@ namespace Language_sk { LSTR MSG_HOST_START_PRINT = _UxGT("Spustiť z hosta"); LSTR MSG_PRINTING_OBJECT = _UxGT("Tlačím objekt"); LSTR MSG_CANCEL_OBJECT = _UxGT("Zrušiť objekt"); - LSTR MSG_CANCEL_OBJECT_N = _UxGT("Zrušiť objekt ="); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Zrušiť objekt {"); LSTR MSG_CONTINUE_PRINT_JOB = _UxGT("Pokračovať v úlohe"); LSTR MSG_MEDIA_MENU = _UxGT("Vytlačiť z karty"); LSTR MSG_TURN_OFF = _UxGT("Vypnite tlačiareň"); @@ -509,7 +509,7 @@ namespace Language_sk { LSTR MSG_HOST_START_PRINT = _UxGT("Spustiť z hosta"); LSTR MSG_PRINTING_OBJECT = _UxGT("Tlačím obj."); LSTR MSG_CANCEL_OBJECT = _UxGT("Zrušiť obj."); - LSTR MSG_CANCEL_OBJECT_N = _UxGT("Zrušiť obj. ="); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Zrušiť obj. {"); LSTR MSG_CONTINUE_PRINT_JOB = _UxGT("Pokrač. v úlohe"); LSTR MSG_MEDIA_MENU = _UxGT("Tlač z karty"); LSTR MSG_TURN_OFF = _UxGT("Vypnit. teraz"); diff --git a/Marlin/src/lcd/language/language_sv.h b/Marlin/src/lcd/language/language_sv.h index 13ae8fcd29..570bc3df8d 100644 --- a/Marlin/src/lcd/language/language_sv.h +++ b/Marlin/src/lcd/language/language_sv.h @@ -233,7 +233,7 @@ namespace Language_sv { LSTR MSG_SET_LEDS_VIOLET = _UxGT("Violet"); LSTR MSG_SET_LEDS_WHITE = _UxGT("Vitt"); LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Standard"); - LSTR MSG_LED_CHANNEL_N = _UxGT("Kanal ="); + LSTR MSG_LED_CHANNEL_N = _UxGT("Kanal {"); LSTR MSG_LEDS2 = _UxGT("Ljus #2"); LSTR MSG_NEO2_PRESETS = _UxGT("Ljus #2 Förinställd"); LSTR MSG_NEO2_BRIGHTNESS = _UxGT("Ljusstyrka"); @@ -381,7 +381,7 @@ namespace Language_sv { LSTR MSG_END_LOOPS = _UxGT("Slut Upprepningsloop"); LSTR MSG_PRINTING_OBJECT = _UxGT("Skriver Objekt"); LSTR MSG_CANCEL_OBJECT = _UxGT("Avbryt Objekt"); - LSTR MSG_CANCEL_OBJECT_N = _UxGT("Avbryt Objekt ="); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Avbryt Objekt {"); LSTR MSG_OUTAGE_RECOVERY = _UxGT("Ström Avbrott"); LSTR MSG_MEDIA_MENU = _UxGT("Skriv fråm Media"); LSTR MSG_NO_MEDIA = _UxGT("Inget Media"); @@ -569,7 +569,7 @@ namespace Language_sv { LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("Ta bort, Klicka"); LSTR MSG_MIX = _UxGT("Mixa"); - LSTR MSG_MIX_COMPONENT_N = _UxGT("Komponent ="); + LSTR MSG_MIX_COMPONENT_N = _UxGT("Komponent {"); LSTR MSG_MIXER = _UxGT("Mixer"); LSTR MSG_GRADIENT = _UxGT("Gradient"); LSTR MSG_FULL_GRADIENT = _UxGT("Full Gradient"); diff --git a/Marlin/src/lcd/language/language_tr.h b/Marlin/src/lcd/language/language_tr.h index 414d545927..1054137230 100644 --- a/Marlin/src/lcd/language/language_tr.h +++ b/Marlin/src/lcd/language/language_tr.h @@ -280,7 +280,7 @@ namespace Language_tr { LSTR MSG_SET_LEDS_VIOLET = _UxGT("Menekşe"); LSTR MSG_SET_LEDS_WHITE = _UxGT("Beyaz"); LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Varsayılan"); - LSTR MSG_LED_CHANNEL_N = _UxGT("Kanal ="); + LSTR MSG_LED_CHANNEL_N = _UxGT("Kanal {"); LSTR MSG_LEDS2 = _UxGT("Işıklar #2"); LSTR MSG_NEO2_PRESETS = _UxGT("Işık #2 Ön Ayarları"); LSTR MSG_NEO2_BRIGHTNESS = _UxGT("Parlaklık"); @@ -479,7 +479,7 @@ namespace Language_tr { LSTR MSG_HOST_START_PRINT = _UxGT("Host Baskıyı başlat"); LSTR MSG_PRINTING_OBJECT = _UxGT("Yazdırma Nesnesi"); LSTR MSG_CANCEL_OBJECT = _UxGT("Nesneyi İptal Et"); - LSTR MSG_CANCEL_OBJECT_N = _UxGT("Nesneyi İptal Et ="); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Nesneyi İptal Et {"); LSTR MSG_CONTINUE_PRINT_JOB = _UxGT("Yazdırmaya Devam Et"); LSTR MSG_MEDIA_MENU = _UxGT("SD Karttan Yazdır"); LSTR MSG_TURN_OFF = _UxGT("Yazıcıyı kapat"); @@ -488,7 +488,7 @@ namespace Language_tr { LSTR MSG_HOST_START_PRINT = _UxGT("Host Başlatma"); LSTR MSG_PRINTING_OBJECT = _UxGT("Nesneyi Yazdır"); LSTR MSG_CANCEL_OBJECT = _UxGT("Nesneyi İptal Et"); - LSTR MSG_CANCEL_OBJECT_N = _UxGT("Nesneyi İptal Et ="); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Nesneyi İptal Et {"); LSTR MSG_CONTINUE_PRINT_JOB = _UxGT("İşe Devam Et"); LSTR MSG_MEDIA_MENU = MEDIA_TYPE_EN _UxGT(" Yazdır"); LSTR MSG_TURN_OFF = _UxGT("Şimdi kapat"); @@ -720,7 +720,7 @@ namespace Language_tr { LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("Kaldır, tıkla"); LSTR MSG_MIX = _UxGT("Karışım"); - LSTR MSG_MIX_COMPONENT_N = _UxGT("Bileşen ="); + LSTR MSG_MIX_COMPONENT_N = _UxGT("Bileşen {"); LSTR MSG_MIXER = _UxGT("Karıştırıcı"); LSTR MSG_GRADIENT = _UxGT("Gradyan"); LSTR MSG_FULL_GRADIENT = _UxGT("Tam Gradyan"); diff --git a/Marlin/src/lcd/language/language_uk.h b/Marlin/src/lcd/language/language_uk.h index 7bdd896a33..4ee32fe4bc 100644 --- a/Marlin/src/lcd/language/language_uk.h +++ b/Marlin/src/lcd/language/language_uk.h @@ -313,7 +313,7 @@ namespace Language_uk { LSTR MSG_SET_LEDS_VIOLET = _UxGT("Фіолетовий"); LSTR MSG_SET_LEDS_WHITE = _UxGT("Білий"); LSTR MSG_SET_LEDS_DEFAULT = _UxGT("За умовчанням"); - LSTR MSG_LED_CHANNEL_N = _UxGT("Канал ="); + LSTR MSG_LED_CHANNEL_N = _UxGT("Канал {"); LSTR MSG_LEDS2 = _UxGT("Світло #2"); #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_NEO2_PRESETS = _UxGT("Передустановка світла #2"); @@ -507,7 +507,7 @@ namespace Language_uk { LSTR MSG_END_LOOPS = _UxGT("End Repeat Loops"); // needs translation LSTR MSG_PRINTING_OBJECT = _UxGT("Друк об'єкта"); LSTR MSG_CANCEL_OBJECT = _UxGT("Завершити об'єкт"); - LSTR MSG_CANCEL_OBJECT_N = _UxGT("Завершити об'єкт ="); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Завершити об'єкт {"); LSTR MSG_OUTAGE_RECOVERY = _UxGT("Віднов. після збою"); LSTR MSG_MEDIA_MENU = _UxGT("Друкувати з SD"); LSTR MSG_NO_MEDIA = _UxGT("SD-картки немає"); @@ -780,7 +780,7 @@ namespace Language_uk { #else LSTR MSG_MIX = _UxGT("Змішув."); #endif - LSTR MSG_MIX_COMPONENT_N = _UxGT("Компонент ="); + LSTR MSG_MIX_COMPONENT_N = _UxGT("Компонент {"); LSTR MSG_MIXER = _UxGT("Змішувач"); LSTR MSG_GRADIENT = _UxGT("Градієнт"); LSTR MSG_FULL_GRADIENT = _UxGT("Повний градієнт"); diff --git a/Marlin/src/lcd/language/language_zh_CN.h b/Marlin/src/lcd/language/language_zh_CN.h index 3e8ab9870f..27f2a597c6 100644 --- a/Marlin/src/lcd/language/language_zh_CN.h +++ b/Marlin/src/lcd/language/language_zh_CN.h @@ -198,27 +198,27 @@ namespace Language_zh_CN { LSTR MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6. 细调所有的"); LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7. 保存热床网格"); - LSTR MSG_LED_CONTROL = _UxGT("LED控制"); // "LED Control") - LSTR MSG_LEDS = _UxGT("灯"); // "Lights") - LSTR MSG_LED_PRESETS = _UxGT("灯预置"); // "Light Presets") - LSTR MSG_SET_LEDS_RED = _UxGT("红"); // "Red") - LSTR MSG_SET_LEDS_ORANGE = _UxGT("橙"); // "Orange") - LSTR MSG_SET_LEDS_YELLOW = _UxGT("黄"); // "Yellow") - LSTR MSG_SET_LEDS_GREEN = _UxGT("绿"); // "Green") - LSTR MSG_SET_LEDS_BLUE = _UxGT("蓝"); // "Blue") - LSTR MSG_SET_LEDS_INDIGO = _UxGT("青"); // "Indigo") - LSTR MSG_SET_LEDS_VIOLET = _UxGT("紫"); // "Violet") - LSTR MSG_SET_LEDS_WHITE = _UxGT("白"); // "White") - LSTR MSG_SET_LEDS_DEFAULT = _UxGT("缺省"); // "Default") - LSTR MSG_CUSTOM_LEDS = _UxGT("定制灯"); // "Custom Lights") - LSTR MSG_INTENSITY_R = _UxGT("红饱和度"); // "Red Intensity") - LSTR MSG_INTENSITY_G = _UxGT("绿饱和度"); // "Green Intensity") - LSTR MSG_INTENSITY_B = _UxGT("蓝饱和度"); // "Blue Intensity") - LSTR MSG_INTENSITY_W = _UxGT("白饱和度"); // "White Intensity") - LSTR MSG_LED_BRIGHTNESS = _UxGT("亮度"); // "Brightness") + LSTR MSG_LED_CONTROL = _UxGT("LED控制"); // "LED Control" + LSTR MSG_LEDS = _UxGT("灯"); // "Lights" + LSTR MSG_LED_PRESETS = _UxGT("灯预置"); // "Light Presets" + LSTR MSG_SET_LEDS_RED = _UxGT("红"); // "Red" + LSTR MSG_SET_LEDS_ORANGE = _UxGT("橙"); // "Orange" + LSTR MSG_SET_LEDS_YELLOW = _UxGT("黄"); // "Yellow" + LSTR MSG_SET_LEDS_GREEN = _UxGT("绿"); // "Green" + LSTR MSG_SET_LEDS_BLUE = _UxGT("蓝"); // "Blue" + LSTR MSG_SET_LEDS_INDIGO = _UxGT("青"); // "Indigo" + LSTR MSG_SET_LEDS_VIOLET = _UxGT("紫"); // "Violet" + LSTR MSG_SET_LEDS_WHITE = _UxGT("白"); // "White" + LSTR MSG_SET_LEDS_DEFAULT = _UxGT("缺省"); // "Default" + LSTR MSG_CUSTOM_LEDS = _UxGT("定制灯"); // "Custom Lights" + LSTR MSG_INTENSITY_R = _UxGT("红饱和度"); // "Red Intensity" + LSTR MSG_INTENSITY_G = _UxGT("绿饱和度"); // "Green Intensity" + LSTR MSG_INTENSITY_B = _UxGT("蓝饱和度"); // "Blue Intensity" + LSTR MSG_INTENSITY_W = _UxGT("白饱和度"); // "White Intensity" + LSTR MSG_LED_BRIGHTNESS = _UxGT("亮度"); // "Brightness" - LSTR MSG_MOVING = _UxGT("移动..."); // "Moving...") - LSTR MSG_FREE_XY = _UxGT("释放 XY"); // "Free XY") + LSTR MSG_MOVING = _UxGT("移动..."); // "Moving..." + LSTR MSG_FREE_XY = _UxGT("释放 XY"); // "Free XY" LSTR MSG_MOVE_X = _UxGT("移动X"); // "Move X" LSTR MSG_MOVE_Y = _UxGT("移动Y"); // "Move Y" LSTR MSG_MOVE_Z = _UxGT("移动Z"); // "Move Z" @@ -348,7 +348,7 @@ namespace Language_zh_CN { LSTR MSG_STOP_PRINT = _UxGT("停止打印"); // "Stop print" LSTR MSG_PRINTING_OBJECT = _UxGT("打印物体"); LSTR MSG_CANCEL_OBJECT = _UxGT("取消物体"); - LSTR MSG_CANCEL_OBJECT_N = _UxGT("取消物体 ="); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("取消物体 {"); LSTR MSG_OUTAGE_RECOVERY = _UxGT("中断恢复"); LSTR MSG_MEDIA_MENU = _UxGT("从存储卡上打印"); // "Print from SD" LSTR MSG_NO_MEDIA = _UxGT("无存储卡"); // "No SD card" @@ -532,7 +532,7 @@ namespace Language_zh_CN { LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("移出, 按下"); LSTR MSG_MIX = _UxGT("混合"); - LSTR MSG_MIX_COMPONENT_N = _UxGT("器件 ="); + LSTR MSG_MIX_COMPONENT_N = _UxGT("器件 {"); LSTR MSG_MIXER = _UxGT("混合器"); LSTR MSG_GRADIENT = _UxGT("梯度"); LSTR MSG_FULL_GRADIENT = _UxGT("全梯度"); diff --git a/Marlin/src/lcd/language/language_zh_TW.h b/Marlin/src/lcd/language/language_zh_TW.h index 5f9f0e3904..570dc292c5 100644 --- a/Marlin/src/lcd/language/language_zh_TW.h +++ b/Marlin/src/lcd/language/language_zh_TW.h @@ -129,7 +129,7 @@ namespace Language_zh_TW { LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("啟動UBL"); // "Activate UBL" LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("關閉UBL"); // "Deactivate UBL" LSTR MSG_UBL_SET_TEMP_BED = _UxGT("置設熱床溫度"); // "Bed Temp" - LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("置設熱床溫度"); // "Bed Temp") + LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("置設熱床溫度"); // "Bed Temp" LSTR MSG_UBL_SET_TEMP_HOTEND = _UxGT("置設噴嘴溫度"); // "Hotend Temp" LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("熱端溫度"); // "Hotend Temp" LSTR MSG_UBL_MESH_EDIT = _UxGT("網格編輯"); // "Mesh Edit" @@ -194,27 +194,27 @@ namespace Language_zh_TW { LSTR MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6. 細調所有的"); LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7. 保存熱床網格"); - LSTR MSG_LED_CONTROL = _UxGT("燈管控制"); // "LED Control") - LSTR MSG_LEDS = _UxGT("燈"); // "Lights") - LSTR MSG_LED_PRESETS = _UxGT("燈預置"); // "Light Presets") - LSTR MSG_SET_LEDS_RED = _UxGT("红"); // "Red") - LSTR MSG_SET_LEDS_ORANGE = _UxGT("橙"); // "Orange") - LSTR MSG_SET_LEDS_YELLOW = _UxGT("黃"); // "Yellow") - LSTR MSG_SET_LEDS_GREEN = _UxGT("綠"); // "Green") - LSTR MSG_SET_LEDS_BLUE = _UxGT("藍"); // "Blue") - LSTR MSG_SET_LEDS_INDIGO = _UxGT("青"); // "Indigo") - LSTR MSG_SET_LEDS_VIOLET = _UxGT("紫"); // "Violet") - LSTR MSG_SET_LEDS_WHITE = _UxGT("白"); // "White") - LSTR MSG_SET_LEDS_DEFAULT = _UxGT("復歸"); // "Default") - LSTR MSG_CUSTOM_LEDS = _UxGT("定制燈"); // "Custom Lights") - LSTR MSG_INTENSITY_R = _UxGT("紅飽和度"); // "Red Intensity") - LSTR MSG_INTENSITY_G = _UxGT("綠飽和度"); // "Green Intensity") - LSTR MSG_INTENSITY_B = _UxGT("藍飽和度"); // "Blue Intensity") - LSTR MSG_INTENSITY_W = _UxGT("白飽和度"); // "White Intensity") - LSTR MSG_LED_BRIGHTNESS = _UxGT("亮度"); // "Brightness") + LSTR MSG_LED_CONTROL = _UxGT("燈管控制"); // "LED Control" + LSTR MSG_LEDS = _UxGT("燈"); // "Lights" + LSTR MSG_LED_PRESETS = _UxGT("燈預置"); // "Light Presets" + LSTR MSG_SET_LEDS_RED = _UxGT("红"); // "Red" + LSTR MSG_SET_LEDS_ORANGE = _UxGT("橙"); // "Orange" + LSTR MSG_SET_LEDS_YELLOW = _UxGT("黃"); // "Yellow" + LSTR MSG_SET_LEDS_GREEN = _UxGT("綠"); // "Green" + LSTR MSG_SET_LEDS_BLUE = _UxGT("藍"); // "Blue" + LSTR MSG_SET_LEDS_INDIGO = _UxGT("青"); // "Indigo" + LSTR MSG_SET_LEDS_VIOLET = _UxGT("紫"); // "Violet" + LSTR MSG_SET_LEDS_WHITE = _UxGT("白"); // "White" + LSTR MSG_SET_LEDS_DEFAULT = _UxGT("復歸"); // "Default" + LSTR MSG_CUSTOM_LEDS = _UxGT("定制燈"); // "Custom Lights" + LSTR MSG_INTENSITY_R = _UxGT("紅飽和度"); // "Red Intensity" + LSTR MSG_INTENSITY_G = _UxGT("綠飽和度"); // "Green Intensity" + LSTR MSG_INTENSITY_B = _UxGT("藍飽和度"); // "Blue Intensity" + LSTR MSG_INTENSITY_W = _UxGT("白飽和度"); // "White Intensity" + LSTR MSG_LED_BRIGHTNESS = _UxGT("亮度"); // "Brightness" - LSTR MSG_MOVING = _UxGT("移動 ..."); // "Moving...") - LSTR MSG_FREE_XY = _UxGT("釋放 XY"); // "Free XY") + LSTR MSG_MOVING = _UxGT("移動 ..."); // "Moving..." + LSTR MSG_FREE_XY = _UxGT("釋放 XY"); // "Free XY" LSTR MSG_MOVE_X = _UxGT("移動X"); // "Move X" LSTR MSG_MOVE_Y = _UxGT("移動Y"); // "Move Y" LSTR MSG_MOVE_Z = _UxGT("移動Z"); // "Move Z" @@ -235,10 +235,10 @@ namespace Language_zh_TW { LSTR MSG_BED = " " LCD_STR_THERMOMETER _UxGT(" 熱床"); // "Bed" LSTR MSG_CHAMBER = _UxGT("Enclosure"); LSTR MSG_FAN_SPEED = _UxGT("風扇速率"); // "Fan speed" - LSTR MSG_FAN_SPEED_N = _UxGT("風扇速率 ="); - LSTR MSG_STORED_FAN_N = _UxGT("Stored Fan ="); + LSTR MSG_FAN_SPEED_N = _UxGT("風扇速率 {"); + LSTR MSG_STORED_FAN_N = _UxGT("Stored Fan {"); LSTR MSG_EXTRA_FAN_SPEED = _UxGT("額外風扇速率"); // "Extra fan speed" - LSTR MSG_EXTRA_FAN_SPEED_N = _UxGT("額外風扇速率 ="); + LSTR MSG_EXTRA_FAN_SPEED_N = _UxGT("額外風扇速率 {"); LSTR MSG_FLOW = _UxGT("擠出速率"); LSTR MSG_FLOW_N = _UxGT("擠出速率 ~"); // "Flow" LSTR MSG_CONTROL = _UxGT("控制"); // "Control" @@ -322,7 +322,7 @@ namespace Language_zh_TW { LSTR MSG_STOP_PRINT = _UxGT("停止列印"); // "Stop print" LSTR MSG_PRINTING_OBJECT = _UxGT("列印物件"); // "Printing Object" LSTR MSG_CANCEL_OBJECT = _UxGT("中止物件"); // "Cancel Object" - LSTR MSG_CANCEL_OBJECT_N = _UxGT("中止物件 ="); // "Cancel Object =" + LSTR MSG_CANCEL_OBJECT_N = _UxGT("中止物件 {"); // "Cancel Object {" LSTR MSG_OUTAGE_RECOVERY = _UxGT("中斷恢復"); // "Outage Recovery" LSTR MSG_MEDIA_MENU = _UxGT("從記憶卡上列印"); // "Print from SD" LSTR MSG_NO_MEDIA = _UxGT("無記憶卡"); // "No SD card" diff --git a/Marlin/src/lcd/lcdprint.cpp b/Marlin/src/lcd/lcdprint.cpp index 650824e553..162f01a12c 100644 --- a/Marlin/src/lcd/lcdprint.cpp +++ b/Marlin/src/lcd/lcdprint.cpp @@ -37,7 +37,7 @@ * Print a string with optional substitutions: * * $ displays the clipped string given by fstr or cstr - * = displays '0'....'10' for indexes 0 - 10 + * { displays '0'....'10' for indexes 0 - 10 * ~ displays '1'....'11' for indexes 0 - 10 * * displays 'E1'...'E11' for indexes 0 - 10 (By default. Uses LCD_FIRST_TOOL) * @ displays an axis name such as XYZUVW, or E for an extruder @@ -50,11 +50,11 @@ lcd_uint_t lcd_put_u8str_P(PGM_P const ptpl, const int8_t ind, const char *cstr/ lchar_t wc; p = get_utf8_value_cb(p, read_byte_rom, wc); if (!wc) break; - if (wc == '=' || wc == '~' || wc == '*') { + if (wc == '{' || wc == '~' || wc == '*') { if (ind >= 0) { if (wc == '*') { lcd_put_u8str(F("E")); n--; } if (n) { - int8_t inum = ind + ((wc == '=') ? 0 : LCD_FIRST_TOOL); + int8_t inum = ind + ((wc == '{') ? 0 : LCD_FIRST_TOOL); if (inum >= 10) { lcd_put_lchar('0' + (inum / 10)); n--; inum %= 10; diff --git a/Marlin/src/lcd/lcdprint.h b/Marlin/src/lcd/lcdprint.h index bcf85cb693..623c9dd4b9 100644 --- a/Marlin/src/lcd/lcdprint.h +++ b/Marlin/src/lcd/lcdprint.h @@ -209,7 +209,7 @@ inline int lcd_put_u8str(const lcd_uint_t col, const lcd_uint_t row, FSTR_P cons * @brief Draw a string with optional substitution * @details Print a string with optional substitutions: * $ displays the clipped string given by fstr or cstr - * = displays '0'....'10' for indexes 0 - 10 + * { displays '0'....'10' for indexes 0 - 10 * ~ displays '1'....'11' for indexes 0 - 10 * * displays 'E1'...'E11' for indexes 0 - 10 (By default. Uses LCD_FIRST_TOOL) * @ displays an axis name such as XYZUVW, or E for an extruder diff --git a/Marlin/src/lcd/tft/tft_string.cpp b/Marlin/src/lcd/tft/tft_string.cpp index 1b65f226d9..82444a4398 100644 --- a/Marlin/src/lcd/tft/tft_string.cpp +++ b/Marlin/src/lcd/tft/tft_string.cpp @@ -179,7 +179,7 @@ void TFT_String::set() { * Add a string, applying substitutions for the following characters: * * $ displays the string given by fstr or cstr - * = displays '0'....'10' for indexes 0 - 10 + * { displays '0'....'10' for indexes 0 - 10 * ~ displays '1'....'11' for indexes 0 - 10 * * displays 'E1'...'E11' for indexes 0 - 10 (By default. Uses LCD_FIRST_TOOL) * @ displays an axis name such as XYZUVW, or E for an extruder @@ -191,9 +191,9 @@ void TFT_String::add(const char *tpl, const int8_t index, const char *cstr/*=nul tpl = get_utf8_value_cb(tpl, read_byte_ram, wc); const uint16_t ch = uint16_t(wc); - if (ch == '=' || ch == '~' || ch == '*') { + if (ch == '{' || ch == '~' || ch == '*') { if (index >= 0) { - int8_t inum = index + ((ch == '=') ? 0 : LCD_FIRST_TOOL); + int8_t inum = index + ((ch == '{') ? 0 : LCD_FIRST_TOOL); if (ch == '*') add_character('E'); if (inum >= 10) { add_character('0' + (inum / 10)); inum %= 10; } add_character('0' + inum); From 077a620e21fcb1cd355129a56f12125d067f2e0f Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 24 Apr 2023 05:24:10 -0500 Subject: [PATCH 225/225] =?UTF-8?q?=F0=9F=93=9D=20Developer=20note=20in=20?= =?UTF-8?q?boards.h?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/core/boards.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Marlin/src/core/boards.h b/Marlin/src/core/boards.h index 2f2ac1664e..a51d9a12e1 100644 --- a/Marlin/src/core/boards.h +++ b/Marlin/src/core/boards.h @@ -21,6 +21,11 @@ */ #pragma once +/** + * Whenever changes are made to this file, please update Marlin/Makefile + * and _data/boards.yml in the MarlinDocumentation repo. + */ + #include "macros.h" #define BOARD_UNKNOWN -1